{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:////home/deploy/abenson-app-live/shared/node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/turbolinks/dist/turbolinks.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/@rails/activestorage/app/assets/javascripts/activestorage.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/chartkick/dist/chartkick.js","webpack:///./app/javascript/channels/index.js","webpack:///./app/javascript/channels sync _channel\\.js$","webpack:////home/deploy/abenson-app-live/shared/node_modules/@hotwired/stimulus/dist/stimulus.js","webpack:///./app/javascript/controllers/application.js","webpack:///./app/javascript/controllers/filter_controller.js","webpack:///./app/javascript/controllers/flash_controller.js","webpack:///./app/javascript/controllers/form_element_controller.js","webpack:///./app/javascript/controllers/hello_controller.js","webpack:///./app/javascript/controllers/sign_up_controller.js","webpack:///./app/javascript/controllers/tickets_controller.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js","webpack:///./app/javascript/controllers/toggle_filter_controller.js","webpack:///./app/javascript/controllers/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/@hotwired/turbo-rails/app/javascript/turbo/form_submissions.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/chart.js/dist/chunks/helpers.segment.mjs","webpack:////home/deploy/abenson-app-live/shared/node_modules/chart.js/dist/chart.mjs","webpack:////home/deploy/abenson-app-live/shared/node_modules/chart.js/auto/auto.mjs","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/toDate/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/locale/en-US/_lib/formatDistance/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/locale/_lib/buildFormatLongFn/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/locale/en-US/_lib/formatLong/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/locale/en-US/_lib/formatRelative/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/locale/_lib/buildLocalizeFn/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/locale/en-US/_lib/localize/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/locale/_lib/buildMatchFn/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/locale/en-US/_lib/match/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/locale/_lib/buildMatchPatternFn/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/defaultLocale/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/locale/en-US/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/toInteger/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/addMilliseconds/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/subMilliseconds/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/assign/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/format/longFormatters/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/getTimezoneOffsetInMilliseconds/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/protectedTokens/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/Setter.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/Parser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/EraParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/constants/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/constants.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/utils.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/YearParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/defaultOptions/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/getUTCWeekYear/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekYearParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekYearParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/ExtendedYearParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/QuarterParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/StandAloneQuarterParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/MonthParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/StandAloneMonthParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/getUTCWeek/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/LocalWeekParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/ISOWeekParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/DateParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/DayOfYearParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/setUTCDay/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/DayParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/LocalDayParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/StandAloneLocalDayParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/ISODayParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/AMPMParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/AMPMMidnightParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/DayPeriodParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/Hour1to12Parser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/Hour0to23Parser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/Hour0To11Parser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/Hour1To24Parser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/MinuteParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/SecondParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/FractionOfSecondParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneWithZParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/ISOTimezoneParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/TimestampSecondsParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/TimestampMillisecondsParser.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/_lib/parsers/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/setUTCWeek/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/setUTCISOWeek/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/setUTCISODay/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parse/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/parseISO/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/isDate/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/isValid/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/getUTCDayOfYear/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/addLeadingZeros/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/format/lightFormatters/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/format/formatters/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/format/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/addHours/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/addDays/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/addMonths/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInMilliseconds/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/_lib/roundingMethods/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/startOfDay/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInCalendarDays/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInDays/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInCalendarMonths/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/compareAsc/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/endOfDay/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/endOfMonth/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/isLastDayOfMonth/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInMonths/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInCalendarYears/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/startOfWeek/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.esm.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/addSeconds/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/addMinutes/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/addWeeks/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/addQuarters/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/addYears/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInSeconds/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInMinutes/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInHours/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInWeeks/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInQuarters/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/differenceInYears/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/startOfSecond/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/startOfMinute/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/startOfHour/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/startOfMonth/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/startOfQuarter/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/startOfYear/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/endOfSecond/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/endOfMinute/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/endOfHour/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/endOfWeek/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/endOfQuarter/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/date-fns/esm/endOfYear/index.js","webpack:////home/deploy/abenson-app-live/shared/node_modules/chartkick/chart.js/chart.esm.js","webpack:///./app/javascript/packs/application.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","__webpack_require__","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice","s","this","Rails","linkClickSelector","buttonClickSelector","selector","exclude","inputChangeSelector","formSubmitSelector","formInputClickSelector","formDisableSelector","formEnableSelector","fileInputSelector","linkDisableSelector","buttonDisableSelector","nonce","loadCSPNonce","ref","querySelector","content","cspNonce","Element","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","element","getData","setData","$","Array","querySelectorAll","csrfParam","csrfToken","meta","CSRFProtection","xhr","token","setRequestHeader","refreshCSRFTokens","param","forEach","input","CustomEvent","fire","preventDefault","params","evt","createEvent","initCustomEvent","bubbles","cancelable","detail","Event","result","defaultPrevented","obj","dispatchEvent","stopEverything","stopPropagation","stopImmediatePropagation","delegate","eventType","handler","addEventListener","parentNode","AcceptHeaders","createXHR","prepareOptions","processResponse","text","html","xml","json","ajax","options","response","responseText","getResponseHeader","Math","floor","status","success","statusText","complete","beforeSend","readyState","XMLHttpRequest","OPENED","send","url","location","href","toUpperCase","indexOf","dataType","accept","done","open","crossDomain","withCredentials","onreadystatechange","DONE","parser","match","JSON","parse","removeChild","DOMParser","replace","parseFromString","isCrossDomain","originAnchor","urlAnchor","protocol","host","toArray","serializeElement","additionalParam","inputs","elements","disabled","option","selected","checked","map","encodeURIComponent","join","formElements","form","filter","el","allowAction","handleConfirm","confirm","answer","callback","getAttribute","disableFormElement","disableFormElements","disableLinkElement","enableFormElement","enableFormElements","enableLinkElement","isXhrRedirect","handleDisabledElement","enableElement","disableElement","replacement","innerHTML","originalText","removeEventListener","handleMethod","formContent","link","method","action","style","display","body","click","isRemote","handleRemote","button","enctype","FormData","append","args","arguments","formSubmitButtonClick","formNoValidate","preventInsignificantClick","insignificantMetaClick","metaKey","ctrlKey","jQuery","rails","ajaxPrefilter","originalOptions","start","_rails_loaded","Turbolinks","supported","history","pushState","requestAnimationFrame","visit","controller","clearCache","setProgressBarDelay","copyObject","closest","documentElement","nodeType","Node","ELEMENT_NODE","defer","throttle","apply","dispatch","a","u","initEvent","uuid","random","toString","Location","absoluteURL","hash","requestURL","anchor","wrap","getOrigin","split","getPath","getPathComponents","getLastPathComponent","getExtension","isHTML","isPrefixedBy","isEqualTo","toCacheKey","toJSON","valueOf","HttpRequest","requestCanceled","requestTimedOut","requestFailed","requestLoaded","requestProgressed","referrer","NETWORK_FAILURE","TIMEOUT_FAILURE","sent","notifyApplicationBeforeRequestStart","setProgress","requestStarted","cancel","abort","lengthComputable","loaded","total","endRequest","requestCompletedWithResponse","failed","requestFailedWithStatusCode","constructor","notifyApplicationAfterRequestEnd","onprogress","ontimeout","onabort","destroy","progress","requestFinished","ProgressBar","trickle","stylesheetElement","createStylesheetElement","progressElement","createProgressElement","defaultCSS","show","visible","installStylesheetElement","installProgressElement","startTrickling","hide","hiding","fadeProgressElement","uninstallProgressElement","stopTrickling","setValue","refresh","insertBefore","firstChild","width","opacity","trickleInterval","setInterval","clearInterval","textContent","className","BrowserAdapter","showProgressBar","progressBar","visitProposedToLocationWithAction","startVisitToLocationWithAction","visitStarted","issueRequest","changeHistory","loadCachedSnapshot","visitRequestStarted","hasCachedSnapshot","showProgressBarAfterDelay","visitRequestProgressed","visitRequestCompleted","loadResponse","visitRequestFailedWithStatusCode","reload","visitRequestFinished","hideProgressBar","visitCompleted","followRedirect","pageInvalidated","progressBarTimeout","progressBarDelay","History","onPageLoad","onPopState","started","stop","update","shouldHandlePopState","state","turbolinks","restorationIdentifier","historyPoppedToLocationWithRestorationIdentifier","pageLoaded","pageIsLoaded","HeadDetails","outerHTML","tracked","fromHeadElement","childNodes","hasElementWithKey","getTrackedElementSignature","getScriptElementsNotInDetails","getElementsMatchingTypeNotInDetails","getStylesheetElementsNotInDetails","getProvisionalElements","getMetaValue","findMetaElementByName","tagName","toLowerCase","Snapshot","headDetails","bodyElement","fromHTMLString","fromHTMLElement","clone","cloneNode","getRootLocation","getSetting","getCacheControlValue","getElementForAnchor","getPermanentElements","getPermanentElementById","getPermanentElementsPresentInSnapshot","id","findFirstAutofocusableElement","hasAnchor","isPreviewable","isCacheable","isVisitable","Renderer","render","renderView","viewWillRender","newBody","viewRendered","invalidateView","viewInvalidated","createScriptElement","async","attributes","__super__","SnapshotRenderer","currentSnapshot","newSnapshot","isPreview","currentHeadDetails","newHeadDetails","currentBody","shouldRender","mergeHead","replaceBody","focusFirstAutofocusableElement","copyNewHeadStylesheetElements","copyNewHeadScriptElements","removeCurrentHeadProvisionalElements","copyNewHeadProvisionalElements","relocateCurrentBodyPermanentElements","activateNewBodyScriptElements","assignNewBody","replacePlaceholderElementsWithClonedPermanentElements","trackedElementsAreIdentical","getNewHeadStylesheetElements","getNewHeadScriptElements","getCurrentHeadProvisionalElements","getNewHeadProvisionalElements","getCurrentBodyPermanentElements","permanentElement","getNewBodyScriptElements","focus","replaceChild","ErrorRenderer","newHead","replaceHeadAndBody","activateBodyScriptElements","getScriptElements","View","htmlElement","getSnapshot","snapshot","markAsPreview","renderSnapshot","renderError","removeAttribute","ScrollManager","onScroll","scrollToElement","scrollIntoView","scrollToPosition","x","y","scrollTo","updatePosition","pageXOffset","pageYOffset","position","scrollPositionChanged","SnapshotCache","size","keys","snapshots","has","read","touch","put","write","splice","unshift","trim","Visit","performScroll","identifier","adapter","timingMetrics","recordTimingMetric","cancelRender","fail","visitFailed","historyChanged","shouldIssueRequest","getCachedSnapshot","getCachedSnapshotForLocation","cacheSnapshot","visitRendered","redirectedToLocation","followedRedirect","replaceHistoryWithLocationAndRestorationIdentifier","scrolled","scrollToRestoredPosition","scrollToTop","scrollToAnchor","restorationData","scrollPosition","Date","getTime","getTimingMetrics","snapshotCached","frame","cancelAnimationFrame","Controller","clickBubbled","clickCaptured","view","scrollManager","startHistory","enabled","disable","stopHistory","cache","applicationAllowsVisitingLocation","locationIsVisitable","getRestorationDataForIdentifier","startVisit","pushHistoryWithLocationAndRestorationIdentifier","shouldCacheSnapshot","notifyApplicationBeforeCachingSnapshot","lastRenderedLocation","getCurrentRestorationData","notifyApplicationBeforeRender","currentVisit","notifyApplicationAfterRender","notifyApplicationAfterPageLoad","clickEventIsSignificant","getVisitableLinkForNode","getVisitableLocationForLink","applicationAllowsFollowingLinkToLocation","getActionForLink","notifyApplicationAfterClickingLinkToLocation","notifyApplicationBeforeVisitingLocation","notifyApplicationAfterVisitingLocation","timing","createVisit","isContentEditable","which","altKey","shiftKey","nodeIsVisitable","currentScript","hasAttribute","warn","createCommonjsModule","fn","sparkMd5","factory","hex_chr","md5cycle","k","b","md5blk","md5blks","charCodeAt","md5blk_array","md51","tail","tmp","lo","hi","substring","parseInt","md51_array","subarray","Uint8Array","rhex","j","hex","toUtf8","str","test","unescape","utf8Str2ArrayBuffer","returnUInt8Array","buff","ArrayBuffer","arr","arrayBuffer2Utf8Str","String","fromCharCode","concatenateArrayBuffers","first","second","byteLength","set","buffer","hexToBinaryString","bytes","substr","SparkMD5","reset","clamp","val","max","min","from","to","num","targetArray","sourceArray","begin","end","appendBinary","contents","_buff","_length","_hash","raw","ret","_finish","getState","setState","hashBinary","classCallCheck","instance","Constructor","TypeError","createClass","defineProperties","props","descriptor","configurable","writable","protoProps","staticProps","fileSlice","File","mozSlice","webkitSlice","FileChecksum","file","chunkSize","chunkCount","ceil","chunkIndex","_this","md5Buffer","fileReader","FileReader","fileReaderDidLoad","fileReaderDidError","readNextChunk","binaryDigest","base64digest","btoa","readAsArrayBuffer","findElement","findElements","root","toArray$1","eventInit","isArray","BlobRecord","checksum","filename","content_type","byte_size","responseType","requestDidLoad","requestDidError","stringify","blob","direct_upload","directUploadData","_xhr","BlobUpload","_blob$directUploadDat","headers","DirectUpload","notify","upload","methodName","_len","messages","_key","DirectUploadController","directUpload","hiddenInput","insertAdjacentElement","dispatchError","signed_id","alert","_this2","uploadRequestDidProgress","inputSelector","DirectUploadsController","files","controllers","createDirectUploadControllers","startNextController","processingAttribute","submitButtonsByForm","WeakMap","didClick","didSubmitForm","didSubmitRemoteElement","handleFormSubmissionEvent","enable","submitForm","delete","autostart","ActiveStorage","variable","isFunction","Function","isPlainObject","extend","source","merge","obj1","obj2","DATE_PATTERN","negativeValues","series","toStr","toFloat","parseFloat","toDate","year","month","day","toArr","jsOptionsFunc","defaultOptions","hideLegend","setTitle","setMin","setMax","setStacked","setXtitle","setYtitle","chart","opts","chartOptions","singleSeriesFormat","legend","title","stacked","colors","xtitle","ytitle","library","sortByTime","sortByNumberSeries","sortByNumber","isMinute","getMilliseconds","getSeconds","isHour","getMinutes","isDay","getHours","isWeek","dayOfWeek","getDay","isMonth","getDate","isYear","getMonth","isDate","isNaN","isNumber","byteSuffixes","formatValue","pre","axis","prefix","suffix","precision","round","byteScale","suffixIdx","baseValue","toPrecision","zeros","pow","toFixed","thousands","decimal","parts","seriesOption","allZeros","baseOptions","maintainAspectRatio","animation","plugins","tooltip","displayColors","callbacks","font","color","interaction","defaultOptions$2","scales","ticks","maxTicksLimit","grid","drawOnChartArea","time","defaultColors","hideLegend$2","setTitle$2","setMin$2","setMax$2","setBarMin$1","setBarMax$1","setStacked$2","setXtitle$2","setYtitle$2","addOpacity","exec","notnull","setLabelSize","maxLabelSize","offsetWidth","labels","getLabelForValue","setFormatOptions$1","chartType","formatOptions","scale","stepSize","label","context","dataset","formattedValue","dataPoint","v","dataLabel","parsed","valueLabel","jsOptions$2","createDataTable","datasets","week","hour","minute","i$1","s$1","j$1","backgroundColor","rows","rows2","xtype","sortedLabels","sort","i$2","s$2","d$1","j$2","point","j$3","fill","borderColor","borderWidth","pointChart","pointBackgroundColor","pointHoverBackgroundColor","pointHitRadius","pointHoverBorderWidth","stack","tension","pointRadius","pointHoverRadius","xmin","xmax","minTime","maxTime","value$1","step","timeDiff","unit","displayFormats","unitStepSize","tooltipFormat","defaultExport$2","renderLineChart","drawChart","renderPieChart","donut","cutout","values","renderColumnChart","barOptions","indexAxis","renderAreaChart","renderBarChart","renderScatterChart","showLine","renderBubbleChart","destroyed","code","log","ctx","getElementsByTagName","defaultOptions$1","xAxis","fontSize","yAxis","credits","plotOptions","areaspline","area","marker","useUTC","hideLegend$1","verticalAlign","layout","align","setTitle$1","jsOptions$1","stackedValue","stacking","setFormatOptions","formatter","pointFormatter","pointFormat","defaultExport$1","curve","symbol","points","pie","innerSize","categories","d2","newSeries","renderTo","Chart","chartArea","fontName","pointSize","textStyle","alignment","curveType","hAxis","titleTextStyle","gridlines","baselineColor","viewWindow","vAxis","setBarMin","setBarMax","isStacked","italic","jsOptions","resize","attachEvent","defaultExport","formatSeriesData","keyType","keyFunc","detectXType","noDatetime","dataEmpty","detectXTypeWithFunction","func","copySeries","copy","processSeries","rawData","discrete","processSimple","perfectData","addDownloadButton","download","top","right","zIndex","lineHeight","image","alt","border","__downloadAttached","__enterEvent","addEvent","related","relatedTarget","childOf","toImage","__leaveEvent","elem","fn2","removeEvent","detachEvent","this$1$1","waitForLoaded","height","pieHole","visualization","DataTable","addColumn","addRows","areaOpacity","renderGeoChart","colorAxis","row","renderTimeline","clearChart","draw","pack","runCallbacks","loadOptions","packages","config","__config","language","mapsApiKey","charts","load","cb","LineChart","Timeline","GeoChart","columnType","concat","pendingRequests","runningRequests","maxRequests","pushRequest","runNext","getJSON","requestComplete","ajaxCall","jqXHR","textStatus","errorThrown","Zepto","adapters","setText","innerText","chartError","noPrefix","errorCatcher","__render","fetchDataSource","dataSource","showLoading","loading","getAdapterType","product","addAdapter","loadAdapters","Highcharts","google","renderChart","empty","callAdapter","fnName","adapterName","__adapterObject","elementId","getElementById","Chartkick","startRefresh","getElement","getDataSource","getOptions","getChartObject","getAdapter","updateData","__updateOptions","setOptions","redraw","refreshData","sep","intervalId","stopRefresh","background","canvas","tmpCanvas","tmpCtx","getContext","fillStyle","fillRect","drawImage","toDataURL","toBase64Image","updateRefresh","__processData","__chartName","__proto__","PieChart","ColumnChart","BarChart","AreaChart","ScatterChart","BubbleChart","configure","setDefaultOptions","eachChart","chartId","destroyAll","use","autoDestroy","default","channels","require","webpackEmptyContext","req","_slicedToArray","_arrayWithHoles","_i","iterator","_s","_e","_arr","_n","_d","next","_iterableToArrayLimit","minLen","_arrayLikeToArray","_unsupportedIterableToArray","_nonIterableRest","len","arr2","EventListener","eventTarget","eventName","eventOptions","unorderedBindings","Set","connect","disconnect","bindingConnected","binding","add","bindingDisconnected","handleEvent","extendedEvent","assign","immediatePropagationStopped","extendEvent","bindings","left","leftIndex","index","rightIndex","Dispatcher","application","eventListenerMaps","Map","eventListeners","eventListener","reduce","listeners","fetchEventListenerForBinding","handleError","fetchEventListener","eventListenerMap","fetchEventListenerMapForEventTarget","cacheKey","createEventListener","descriptorPattern","parseEventTarget","eventTargetName","camelize","_","char","capitalize","charAt","dasherize","defaultEventNames","typecast","o_O","Binding","willBeInvokedByEvent","shouldBeInvokedPerSelf","processStopPropagation","processPreventDefault","invokeWithEvent","prevent","currentTarget","actionEvent","logDebugActivity","self","contains","scope","containsElement","ElementObserver","mutationObserverInit","childList","subtree","mutationObserver","MutationObserver","mutations","processMutations","observe","pause","takeRecords","matchElementsInTree","removeElement","addElement","mutation","processMutation","processAttributeChange","attributeName","processRemovedNodes","removedNodes","processAddedNodes","addedNodes","node","elementAttributeChanged","matchElement","nodes","elementFromNode","processTree","elementIsActive","tree","processor","isConnected","elementMatched","elementUnmatched","AttributeObserver","elementObserver","elementMatchedAttribute","elementUnmatchedAttribute","elementAttributeValueChanged","StringMapObserver","stringMap","attributeOldValue","knownAttributeNames","refreshAttribute","oldValue","getStringMapKeyForAttribute","stringMapKeyAdded","stringMapValueChanged","stringMapKeyRemoved","currentAttributeNames","recordedAttributeNames","attribute","del","prune","Multimap","valuesByKey","hasKey","hasValue","some","getValuesForKey","getKeysForValue","_ref2","_ref3","_ref4","_ref5","TokenListObserver","attributeObserver","tokensByElement","tokensMatched","readTokensForElement","_this$refreshTokensFo2","refreshTokensForElement","unmatchedTokens","matchedTokens","tokensUnmatched","tokens","tokenMatched","tokenUnmatched","previousTokens","currentTokens","firstDifferingIndex","zip","findIndex","_ref6","_ref7","previousToken","currentToken","tokenString","parseTokenString","ValueListObserver","tokenListObserver","parseResultsByToken","valuesByTokenByElement","fetchParseResultForToken","fetchValuesByTokenForElement","elementMatchedValue","elementUnmatchedValue","parseResult","parseToken","valuesByToken","parseValueForToken","BindingObserver","bindingsByAction","valueListObserver","actionAttribute","disconnectAllActions","schema","connectAction","disconnectAction","clear","getDefaultEventNameForElement","static","descriptorString","parseActionDescriptorString","eventNameSuffix","pattern","RegExp","_ref","forToken","ValueObserver","receiver","stringMapObserver","valueDescriptorMap","invokeChangedCallbacksForDefaultValues","invokeChangedCallback","writer","defaultValue","valueDescriptorNameMap","_ref8","valueDescriptors","rawValue","rawOldValue","changedMethodName","changedMethod","reader","descriptors","hasMethodName","TargetObserver","targetsByName","disconnectAllTargets","_ref9","connectTarget","_ref10","disconnectTarget","_a","targetConnected","targetDisconnected","Context","functionName","controllerConstructor","bindingObserver","dispatcher","valueObserver","targetObserver","initialize","parentElement","invokeControllerMethod","readInheritableStaticArrayValues","propertyName","ancestors","getAncestorsForConstructor","definition","getOwnStaticArrayValues","readInheritableStaticObjectPairs","pairs","getOwnStaticObjectPairs","getPrototypeOf","reverse","bless","properties","shadowConstructor","shadowProperties","getOwnKeys","shadowingDescriptor","getOwnPropertyDescriptor","getShadowedDescriptor","getShadowProperties","shadow","blessedProperties","blessing","getBlessedProperties","getOwnPropertySymbols","getOwnPropertyNames","extendWithReflect","extended","Reflect","construct","setPrototypeOf","testReflectExtension","Module","blessDefinition","contextsByScope","connectedContexts","contexts","connectContextForScope","fetchContextForScope","disconnectContextForScope","ClassMap","getDataKey","getAll","getAttributeName","getAttributeNameForKey","DataMap","Guide","logger","warnedKeysByObject","warnedKeys","attributeValueContainsToken","TargetSet","targetName","find","_len2","targetNames","_key2","findTarget","findLegacyTarget","findAll","_len3","_key3","targets","findAllTargets","findAllLegacyTargets","getSelectorForTargetName","findAllElements","targetAttributeForScope","getLegacySelectorForTargetName","deprecate","targetDescriptor","targetAttribute","revisedAttributeName","guide","Scope","classes","controllerSelector","queryElements","controllerAttribute","ScopeObserver","scopesByIdentifierByElement","scopeReferenceCounts","scopesByIdentifier","fetchScopesByIdentifierForElement","createScopeForElementAndIdentifier","referenceCount","scopeConnected","scopeDisconnected","Router","scopeObserver","modulesByIdentifier","loadDefinition","unloadIdentifier","connectModule","disconnectModule","getContextForElementAndIdentifier","defaultSchema","Application","debug","logFormattedMessage","router","register","_len4","rest","_key4","shouldLoad","unload","_len5","_key5","getControllerForElementAndIdentifier","groupCollapsed","groupEnd","parseValueDefinitionPair","_ref11","_ref12","payload","typeFromObject","parseValueTypeConstant","typeObject","defaultValueType","parseValueTypeDefault","propertyPath","parseValueTypeObject","typeDefinition","typeFromDefaultValue","typeFromConstant","parseValueTypeDefinition","constant","defaultValuesByType","defaultValueForDefinition","hasCustomDefaultValue","readers","writers","valueDescriptorForTokenAndTypeDefinition","Boolean","Number","array","boolean","number","string","writeJSON","_ref13","_ref13$target","_ref13$detail","_ref13$prefix","_ref13$bubbles","_ref13$cancelable","blessings","classDefinition","targetDefinition","valueDefinitionPairs","propertyDescriptorMap","valueDefinitionPair","valueDescriptor","propertiesForValueDefinitionPair","Stimulus","filter_btn","checkboxes2","checkedValues","getElementsByClassName","dropdownArr","toggleDropdown","classList","remove","checkboxes","updateDropdown","allCheckboxes","getElementsByName","parent_id","dropdownCheckList_id","dismiss","submitbtnTarget","hidden","inp","handleInputFocus","handleRadioChange","radio","lastNameLabel","nextElementSibling","_templateObject","_templateObject2","ready","collapse","_taggedTemplateLiteral","strings","freeze","FilterController","FlashController","FormElementController","HelloController","SignUpController","TicketController","ToggleFilterController","customElements","polyfillWrapFlushCallback","BuiltInHTMLElement","HTMLElement","wrapperForTheName","raise","errorConstructor","requestSubmit","submitter","DOMException","validateSubmitter","HTMLFormElement","submittersByForm","candidate","findSubmitterFromClickTarget","FrameLoadingStyle","FetchMethod","FormSubmissionState","FormEnctype","TimingMetric","VisitState","navigator","vendor","SubmitEvent","FrameElement","super","delegateConstructor","observedAttributes","connectedCallback","disconnectedCallback","attributeChangedCallback","loadingStyleChanged","sourceURLChanged","disabledChanged","lazy","eager","frameLoadingStyleFromString","autoscroll","isLoading","isActive","ownerDocument","_b","expandURL","locatable","URL","baseURI","getAnchor","anchorMatch","getAction","pathname","baseURL","origin","endsWith","getPrefix","startsWith","rootLocation","getRequestURL","FetchResponse","succeeded","ok","clientError","statusCode","serverError","redirected","contentType","header","responseHTML","nextAnimationFrame","parseHTMLDocument","unindent","lines","interpolate","indent","line","markAsBusy","localName","clearBusyState","FetchRequest","URLSearchParams","abortController","AbortController","resolveRequestPromise","defaultHeaders","searchParams","entries","fetchOptions","prepareHeadersForRequest","allowRequestToBeIntercepted","fetch","receive","requestErrored","fetchResponse","requestPreventedHandlingResponse","requestSucceededWithResponse","requestFailedWithResponse","credentials","redirect","isIdempotent","signal","abortSignal","requestInterception","resume","AppearanceObserver","intersect","lastEntry","isIntersecting","elementAppearedInViewport","intersectionObserver","IntersectionObserver","unobserve","StreamMessage","templateElement","fragment","createDocumentFragment","foreignElements","importNode","templateChildren","streamElements","child","children","FormSubmission","formElement","mustRedirect","initialized","formData","buildFormData","search","mergeFormDataEntries","fetchRequest","post","patch","fetchMethodFromString","formElementAction","urlEncoded","stringFormData","encoding","multipart","plain","formEnctypeFromString","confirmationMessage","needsConfirmation","_FormSubmissionState","requesting","confirmMethod","perform","_FormSubmissionState2","stopping","stopped","cookieName","cookie","decodeURIComponent","getCookieValue","getMetaContent","waiting","formSubmission","formSubmissionStarted","formSubmissionFailedWithResponse","requestMustRedirect","responseSucceededWithoutRedirect","formSubmissionErrored","receiving","formSubmissionSucceededWithResponse","formSubmissionFinished","firstAutofocusableElement","permanentElements","getPermanentElementMapForSnapshot","permanentElementMap","currentPermanentElement","newPermanentElement","FormInterceptor","submitBubbled","shouldInterceptFormSubmission","formSubmissionIntercepted","resolveRenderPromise","resolveInterceptionPromise","focusElement","scrollToAnchorFromLocation","scrollRoot","renderer","renderPromise","prepareToRenderSnapshot","renderInterception","allowsImmediateRender","viewRenderedSnapshot","finishRenderingSnapshot","invalidate","prepareToRender","finishRendering","FrameView","LinkInterceptor","respondsToEventTarget","clickEvent","linkClicked","shouldInterceptLinkClick","linkClickIntercepted","willVisit","willRender","resolvingFunctions","createdScriptElement","destinationElement","sourceElement","copyElementAttributes","preservingPermanentElements","bardo","enter","leave","replaceNewPermanentElementWithPlaceholder","replaceCurrentPermanentElementWithClone","replacePlaceholderWithPermanentElement","placeholder","createPlaceholderForPermanentElement","replaceWith","getPlaceholderById","placeholders","connectedSnapshot","elementIsFocusable","currentElement","newElement","FrameRenderer","loadFrameElement","scrollFrameIntoView","activateScriptElements","destinationRange","createRange","selectNodeContents","deleteContents","frameElement","sourceRange","extractContents","firstElementChild","block","inertScriptElement","newScriptElements","activatedScriptElement","animationDuration","HeadSnapshot","detailsByOuterHTML","elementIsNoscript","elementWithoutNonce","details","elementIsTracked","trackedElementSignature","getScriptElementsNotInSnapshot","getElementsMatchingTypeNotInSnapshot","getStylesheetElementsNotInSnapshot","matchedType","provisionalElements","_this$detailsByOuterH","elementIsMetaElementWithName","elementIsScript","elementIsStylesheet","PageSnapshot","headSnapshot","fromDocument","headElement","cacheControlValue","visitCachedSnapshot","SystemStatusCode","PageStage","_Object$assign","snapshotHTML","isSamePage","locationWithActionIsSamePage","silent","visitStart","canceled","visitEnd","completed","actionForHistory","getHistoryMethodForAction","hasPreloadedResponse","simulateRequest","startRequest","recordResponse","finishRequest","requestStart","isSuccessful","requestEnd","_this$response","renderPage","getPreloadedSnapshot","visitProposedToLocation","goToSamePageAnchor","contentTypeMismatch","networkFailure","visitScrolledToSamePageLocation","metric","replaceState","then","session","showVisitProgressBarAfterDelay","timeoutFailure","hideVisitProgressBar","showFormProgressBarAfterDelay","hideFormProgressBar","visitProgressBarTimeout","formProgressBarTimeout","CacheObserver","removeStaleElements","staleElements","FormSubmitObserver","submitCaptured","willSubmitForm","formSubmitted","FrameRedirector","linkInterceptor","formInterceptor","shouldRedirect","findFrameElement","shouldSubmit","turbo","updateRestorationData","additionalData","assumeControlOfScrollRestoration","previousScrollRestoration","scrollRestoration","relinquishControlOfScrollRestoration","LinkClickObserver","composedPath","findLinkFromClickTarget","getLocationForLink","willFollowLinkToLocation","followedLinkToLocation","isAction","Navigator","proposeVisit","allowsVisitingLocationWithAction","clearSnapshotCache","visitOptions","getActionForFormSubmission","currentAnchor","isRestorationToTop","oldURL","newURL","PageObserver","stage","initial","interpretReadyState","pageIsInteractive","pageIsComplete","pageWillUnload","interactive","pageBecameInteractive","ScrollObserver","StreamObserver","sources","inspectFetchResponse","fetchResponseFromEvent","fetchResponseIsStream","receiveMessageResponse","receiveMessageEvent","receiveMessageHTML","connectStreamSource","streamSourceIsConnected","disconnectStreamSource","receivedMessageFromStream","_document","replaceableElement","scriptElements","PageRenderer","currentHeadSnapshot","newHeadSnapshot","activateNewBody","newHeadStylesheetElements","newHeadScriptElements","currentHeadProvisionalElements","newHeadProvisionalElements","adoptNode","newBodyScriptElements","HTMLBodyElement","PageView","snapshotCache","viewWillCacheSnapshot","cachedSnapshot","fromElement","extendURLWithDeprecatedProperties","deprecatedLocationPropertyDescriptors","pageObserver","cacheObserver","linkClickObserver","formSubmitObserver","scrollObserver","streamObserver","frameRedirector","drive","registerAdapter","renderStreamMessage","delay","elementDriveEnabled","convertLinkWithMethodClickToFormSubmission","linkMethod","getTargetFrameForLink","notifyApplicationAfterVisitingSamePageLocation","frameLoaded","notifyApplicationAfterFrameLoad","frameRendered","notifyApplicationAfterFrameRender","HashChangeEvent","container","navigator$1","Turbo","setConfirmMethod","SnapshotSubstitution","_ref15","getFrameElementById","activateElement","currentURL","StreamActions","after","targetElements","templateContent","nextSibling","removeDuplicateTargetChildren","before","prepend","StreamElement","beforeRenderEvent","performAction","duplicateChildren","existingChildren","flatMap","newChildrenIds","includes","actionFunction","targetElementsById","targetElementsByQuery","HTMLTemplateElement","description","consumer","getConsumer","setConsumer","_await$import","createConsumer","newConsumer","walk","acc","ownKeys","enumerableOnly","symbols","sym","_objectSpread","_defineProperty","getOwnPropertyDescriptors","fetchResponseLoaded","currentFetchRequest","resolveVisitPromise","connected","hasBeenLoaded","settingSourceURL","appearanceObserver","reloadable","loadingStyle","loadSourceURL","sourceURL","previousURL","extractForeignFrameElement","shouldInterceptNavigation","navigateFrame","proposeVisitIfNavigatedWithAction","_ref14","CSS","escape","formActionIsVisitable","define","subscription","channel","mixin","subscriptions","subscribeTo","received","dispatchMessageEvent","unsubscribe","MessageEvent","signed_stream_name","_ref$detail$formSubmi","formMethod","noop","uid","isNullOrUndef","isObject","isNumberFinite","isFinite","finiteOrDefault","valueOrDefault","toDimension","dimension","thisArg","each","loopable","_elementsEqual","a0","a1","ilen","v0","v1","datasetIndex","clone$1","klen","isValidKey","_merger","tval","sval","merger","mergeIf","_mergerIf","keyResolvers","resolveObjectKey","resolver","part","_splitKey","_getKeyResolver","_capitalize","defined","setsEqual","item","PI","TAU","PITAU","INFINITY","POSITIVE_INFINITY","RAD_PER_DEG","HALF_PI","QUARTER_PI","TWO_THIRDS_PI","log10","sign","niceNum","range","roundedRange","almostEquals","niceRange","fraction","epsilon","abs","_setMinAndMaxByKey","toRadians","degrees","toDegrees","radians","_decimalPlaces","getAngleFromPoint","centrePoint","anglePoint","distanceFromXCenter","distanceFromYCenter","radialDistanceFromCenter","sqrt","angle","atan2","distance","distanceBetweenPoints","pt1","pt2","_angleDiff","_normalizeAngle","_angleBetween","sameAngleIsFullCircle","angleToStart","angleToEnd","startToAngle","endToAngle","_limitValue","_isBetween","_lookup","table","cmp","mid","_lookupByKey","last","_rlookupByKey","arrayEvents","unlistenArrayEvents","listener","stub","_chartjs","_arrayUnique","items","requestAnimFrame","throttled","updateFn","updateArgs","ticking","_toLeftRightCenter","_alignStartEnd","_getStartAndCountOfVisiblePoints","animationsDisabled","pointCount","count","_sorted","iScale","_parsed","_iScale$getUserBounds","getUserBounds","minDefined","maxDefined","getPixelForValue","_scaleRangesChanged","xScale","yScale","_scaleRanges","newRanges","ymin","ymax","changed","atEdge","elasticIn","sin","elasticOut","effects","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","cos","easeOutSine","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInElastic","easeOutElastic","easeInOutElastic","easeInBack","easeOutBack","easeInOutBack","easeInBounce","easeOutBounce","easeInOutBounce","lim","h","p2b","n2b","b2n","n2p","map$1","A","B","C","D","E","F","f","h1","h2","eq","hexString","g","isShort","HUE_RE","hsl2rgbn","hsv2rgbn","hwb2rgbn","w","rgb","rgb2hsl","hueValue","calln","hsl2rgb","hue","hueParse","p1","p2","hwb2rgb","hsv2rgb","Z","Y","X","W","V","U","T","S","R","Q","P","O","N","M","L","K","G","H","I","J","names$1","OiceXe","antiquewEte","aqua","aquamarRe","azuY","beige","bisque","black","blanKedOmond","Xe","XeviTet","bPwn","burlywood","caMtXe","KartYuse","KocTate","cSO","cSnflowerXe","cSnsilk","crimson","cyan","xXe","xcyan","xgTMnPd","xWay","xgYF","xgYy","xkhaki","xmagFta","xTivegYF","xSange","xScEd","xYd","xsOmon","xsHgYF","xUXe","xUWay","xUgYy","xQe","xviTet","dAppRk","dApskyXe","dimWay","dimgYy","dodgerXe","fiYbrick","flSOwEte","foYstWAn","fuKsia","gaRsbSo","ghostwEte","gTd","gTMnPd","Way","gYF","gYFLw","gYy","honeyMw","hotpRk","RdianYd","Rdigo","ivSy","khaki","lavFMr","lavFMrXsh","lawngYF","NmoncEffon","ZXe","ZcSO","Zcyan","ZgTMnPdLw","ZWay","ZgYF","ZgYy","ZpRk","ZsOmon","ZsHgYF","ZskyXe","ZUWay","ZUgYy","ZstAlXe","ZLw","lime","limegYF","lRF","magFta","maPon","VaquamarRe","VXe","VScEd","VpurpN","VsHgYF","VUXe","VsprRggYF","VQe","VviTetYd","midnightXe","mRtcYam","mistyPse","moccasR","navajowEte","navy","Tdlace","Tive","TivedBb","Sange","SangeYd","ScEd","pOegTMnPd","pOegYF","pOeQe","pOeviTetYd","papayawEp","pHKpuff","peru","pRk","plum","powMrXe","purpN","YbeccapurpN","Yd","Psybrown","PyOXe","saddNbPwn","sOmon","sandybPwn","sHgYF","sHshell","siFna","silver","skyXe","UXe","UWay","UgYy","snow","sprRggYF","stAlXe","tan","teO","tEstN","tomato","Qe","viTet","JHt","wEte","wEtesmoke","Lw","LwgYF","nameParse","unpacked","tkeys","nk","unpack","transparent","RGB_RE","modHSL","ratio","proto","fromObject","functionParse","rgbParse","Color","_rgb","_valid","valid","rgbString","hslString","mix","weight","c1","c2","w2","w1","rgb1","rgb2","alpha","clearer","greyscale","opaquer","negate","lighten","darken","saturate","desaturate","rotate","deg","index_esm","isPatternOrGradient","getHoverColor","overrides","getScope$1","defaults","_descriptors","devicePixelRatio","platform","getDevicePixelRatio","events","family","hover","hoverBackgroundColor","hoverBorderColor","hoverColor","includeInvisible","onHover","onClick","parsing","responsive","drawActiveElementsOnTop","describe","override","route","targetScope","scopeObject","targetScopeObject","privateName","local","_scriptable","_indexable","_fallback","_measureText","gc","longest","textWidth","measureText","_longestText","arrayOfThings","garbageCollect","save","jlen","thing","nestedThing","restore","gcLen","_alignPixel","pixel","currentDevicePixelRatio","halfWidth","clearCanvas","resetTransform","clearRect","drawPoint","drawPointLegend","xOffset","yOffset","cornerRadius","pointStyle","rotation","radius","rad","translate","beginPath","ellipse","arc","closePath","moveTo","lineTo","SQRT1_2","rect","stroke","_isPointInArea","margin","bottom","clipArea","clip","unclipArea","_steppedLineTo","previous","flip","midpoint","_bezierCurveTo","bezierCurveTo","cp1x","cp2x","cp1y","cp2y","renderText","strokeWidth","strokeColor","setRenderOpts","strokeStyle","lineWidth","strokeText","maxWidth","fillText","decorateText","translation","textAlign","textBaseline","strikethrough","underline","metrics","actualBoundingBoxLeft","actualBoundingBoxRight","actualBoundingBoxAscent","actualBoundingBoxDescent","yDecoration","decorationWidth","addRoundedRectPath","topLeft","bottomLeft","bottomRight","topRight","LINE_HEIGHT","FONT_STYLE","toLineHeight","_readValueToProps","objProps","prop","toTRBL","toTRBLCorners","toPadding","toFont","fallback","toFontString","info","cacheable","createContext","parentContext","_createResolver","scopes","prefixes","rootScopes","getTarget","_resolve","_cacheable","_scopes","_rootScopes","_getTarget","Proxy","deleteProperty","_keys","_cached","_resolveWithPrefixes","getKeysFromAllScopes","storage","_storage","_attachContext","proxy","subProxy","descriptorDefaults","_proxy","_context","_subProxy","_stack","setContext","isScriptable","needsSubResolver","createSubResolver","_resolveScriptable","isIndexable","_resolveArray","_resolveWithContext","allKeys","scriptable","indexable","_proxy$_scriptable","_proxy$_indexable","_proxy$_allKeys","_allKeys","readKey","resolveFallback","getScope","parent","addScopes","parentScopes","parentFallback","allScopes","addScopesFromKey","subGetTarget","resolveKeysFromAllScopes","_parseObjectDataRadialScale","_this$_parsing$key","_parsing","EPSILON","getPoint","skip","getValueAxis","splineCurve","firstPoint","middlePoint","afterPoint","current","d01","d12","s01","s12","fa","fb","monotoneAdjust","deltaK","mK","pointsLen","alphaK","betaK","tauK","squaredMagnitude","pointCurrent","pointAfter","monotoneCompute","valueAxis","delta","pointBefore","iPixel","vPixel","capControlPoint","pt","_updateBezierControlPoints","loop","controlPoints","spanGaps","cubicInterpolationMode","slopeDelta","splineCurveMonotone","prev","capBezierPoints","inArea","inAreaPrev","inAreaNext","_isDomSupported","_getParentNode","domNode","parseMaxStyle","styleValue","parentProperty","valueInPixels","getComputedStyle","positions","getPositionedStyle","styles","pos","getRelativePosition","borderBox","boxSizing","paddings","borders","_getCanvasPosition","touches","offsetX","offsetY","box","shadowRoot","useOffsetPos","getBoundingClientRect","clientX","clientY","getCanvasPosition","round1","getMaximumSize","bbWidth","bbHeight","aspectRatio","margins","maxHeight","containerSize","containerStyle","containerBorder","containerPadding","clientWidth","clientHeight","getContainerSize","retinaScale","forceRatio","forceStyle","pixelRatio","deviceHeight","deviceWidth","setTransform","supportsEventListenerOptions","passiveSupported","passive","readUsedSize","getPropertyValue","getStyle","_pointInLine","_steppedInterpolation","_bezierInterpolation","cp1","cp2","intlCache","formatNumber","locale","Intl","NumberFormat","getNumberFormat","format","getRtlAdapter","rtl","rectX","setWidth","xPlus","leftForLtr","itemWidth","getRightToLeftAdapter","_itemWidth","overrideTextDirection","direction","original","getPropertyPriority","setProperty","prevTextDirection","restoreTextDirection","propertyFn","between","compare","normalize","normalizeSegment","_boundSegment","segment","bounds","startBound","endBound","_propertyFn2","_getSegment","_propertyFn","getSegment","prevValue","inside","subStart","shouldStart","shouldStop","_boundSegments","segments","sub","splitByStyles","segmentOptions","chartContext","_chart","baseStyle","readStyle","_datasetIndex","prevStyle","addStyle","st","dir","p0","p0DataIndex","p1DataIndex","styleChanged","doSplitByStyles","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","animator","_request","_charts","_running","_lastDate","_notify","anims","date","numSteps","duration","currentStep","_refresh","_update","now","remaining","running","_active","_total","tick","pop","_getAnims","listen","cur","_duration","interpolators","factor","c0","cfg","currentValue","_fn","_easing","easing","_start","_loop","_target","_prop","_from","_to","_promises","active","elapsed","remain","wait","res","rej","resolved","numbers","animations","_properties","animatedProps","_animateOptions","newOptions","$shared","$animations","resolveTargetOptions","_createAnimations","anim","awaitAll","scaleClip","allowedOverflow","getSortedDatasetIndices","filterVisible","metasets","_getSortedDatasetMetas","applyStack","dsIndex","singleMode","otherValue","getOrCreateStack","stacks","stackKey","indexValue","subStack","getLastIndexInStack","vScale","positive","getMatchingVisibleMetas","updateStacks","_cachedMeta","_stacks","iAxis","indexScale","valueScale","getStackKey","_top","_bottom","getFirstScaleId","clearStacks","isDirectUpdateMode","cloneIfNotShared","cached","shared","_ctx","_cachedDataOpts","getMeta","_type","_data","_objectData","_sharedOptions","_drawStart","_drawCount","enableOptionSharing","supportsDecimation","$context","_syncList","linkScales","_stacked","addElements","updateIndex","getDataset","chooseId","xid","xAxisID","yid","yAxisID","rid","rAxisID","iid","iAxisID","vid","vAxisID","getScaleForId","rScale","getDatasetMeta","scaleID","_getOtherScale","_destroy","_dataCheck","adata","convertObjectDataToArray","isExtensible","base","datasetElementType","buildOrUpdateElements","resetNewElements","stackChanged","oldStacked","_resyncElements","scopeKeys","datasetScopeKeys","getOptionScopes","createResolver","sorted","parseArrayData","parseObjectData","parsePrimitiveData","isNotInOrderComparedToPrev","getLabels","singleScale","_this$_parsing","_this$_parsing$xAxisK","xAxisKey","_this$_parsing$yAxisK","yAxisKey","getParsed","getDataElement","updateRangeFromParsed","parsedValue","NaN","getMinMax","canStack","otherScale","createStack","NEGATIVE_INFINITY","_getUserBounds","_scale$getUserBounds","otherMin","otherMax","_skip","getAllParsedValues","getMaxOverflow","getLabelAndValue","_clip","toClip","defaultClip","resolveDatasetElementOptions","resolveDataElementOptions","dataIndex","createDataContext","createDatasetContext","_resolveElementOptions","dataElementType","elementType","sharing","datasetElementScopeKeys","names","resolveNamedOptions","_resolveAnimations","transition","datasetAnimationScopeKeys","getSharedOptions","includeOptions","sharedOptions","_animationsDisabled","_getSharedOptions","firstOpts","previouslySharedOptions","updateSharedOptions","updateElement","_setStyle","removeHoverStyle","setHoverStyle","_removeDatasetHoverStyle","_setDatasetHoverStyle","arg1","arg2","numMeta","numData","_insertElements","_removeElements","move","updateElements","removed","_sync","_args2","_dataChanges","_onDataPush","_onDataPop","_onDataShift","_onDataSplice","newCount","_onDataUnshift","computeMinSampleSize","_cache","$bar","visibleMetas","getAllScaleValues","curr","updateMinAndPrev","getPixelForTick","parseValue","entry","startValue","endValue","barStart","barEnd","_custom","parseFloatBar","parseArrayOrPrimitive","isFloatBar","custom","setBorderSkipped","edge","borderSkipped","_borderProps","horizontal","borderProps","enableBorderRadius","parseEdge","orig","v2","startEnd","setInflateAmount","inflateAmount","_this$_parsing2","_this$_parsing2$xAxis","_this$_parsing2$yAxis","iAxisKey","vAxisKey","bars","getBasePixel","isHorizontal","ruler","_getRuler","_this$_getSharedOptio","vpixels","_calculateBarValuePixels","ipixels","_calculateBarIndexPixels","center","_getStacks","grouped","skipNull","_getStackCount","_getStackIndex","pixels","barThickness","_startPixel","_endPixel","stackCount","categoryPercentage","barPercentage","_this$_cachedMeta","_this$options","minBarLength","actualBase","floating","getDataVisibility","barSign","startPixel","getPixelForDecimal","endPixel","halfGrid","getLineWidthForValue","maxBarThickness","Infinity","percent","computeFlexCategoryTraits","thickness","computeFitCategoryTraits","stackIndex","rects","_index_","offset","_value_","beginAtZero","_this$_cachedMeta2","_this$_getSharedOptio2","innerRadius","outerRadius","_getRotation","_getCircumference","circumference","_getRotationExtents","isDatasetVisible","arcs","spacing","getMaxBorderWidth","getMaxOffset","maxSize","chartWeight","_getRingWeight","_this$_getRotationExt","_getRatioAndOffset","ratioX","ratioY","startAngle","endAngle","startX","startY","endX","endY","calcMax","calcMin","maxX","maxY","minX","minY","getRatioAndOffset","maxRadius","radiusLength","_getVisibleDatasetWeightTotal","calculateTotal","_getRingWeightOffset","_circumference","animateRotate","calculateCircumference","animationOpts","centerX","centerY","animateScale","_this$_getSharedOptio3","metaData","borderAlign","hoverBorderWidth","hoverOffset","ringWeightOffset","generateLabels","legendItem","toggleDataVisibility","tooltipItem","_meta$data","_dataset","_getStartAndCountOfVi","_decimated","animated","_this$_cachedMeta3","_this$_getSharedOptio4","_this$options2","maxGapLength","directUpdate","prevParsed","nullData","lastPoint","updateControlPoints","_updateRadius","minSize","cutoutPercentage","getVisibleDatasetCount","xCenter","yCenter","datasetStartAngle","getIndexAngle","defaultAngle","countVisibleElements","_computeAngle","getDistanceFromCenterForValue","angleLines","circular","pointLabels","PieController","_fullLoop","pointPosition","getPointPositionForValue","tooltipPosition","useFinalPosition","_this$getProps","getProps","final","defaultRoutes","formatters","numeric","tickValue","notation","maxTick","calculateDelta","logDelta","numDecimal","minimumFractionDigits","maximumFractionDigits","logarithmic","Ticks","autoSkip","tickOpts","ticksLimit","tickLength","_tickSize","maxScale","maxChart","_maxLength","determineMaxTicks","majorIndices","major","getMajorIndices","numMajorIndices","newTicks","skipMajors","evenMajorSpacing","diff","getEvenSpacing","factors","_factorize","calculateSpacing","avgMajorSpacing","majorStart","majorEnd","grace","drawBorder","drawTicks","tickWidth","tickColor","padding","minRotation","maxRotation","mirror","textStrokeWidth","textStrokeColor","autoSkipPadding","labelOffset","minor","crossAlign","showLabelBackdrop","backdropColor","backdropPadding","offsetFromEdge","sample","numItems","increment","getPixelForGridLine","offsetGridLines","validIndex","lineValue","getTickMarkLength","getTitleHeight","titleAlign","reverseAlign","_margins","paddingTop","paddingBottom","paddingLeft","paddingRight","labelRotation","_range","_gridLineItems","_labelItems","_labelSizes","_longestTextCache","_reversePixels","_userMax","_userMin","_suggestedMax","_suggestedMin","_ticksLength","_borderValue","_dataLimitsCached","init","suggestedMin","suggestedMax","_this$getUserBounds","metas","getPadding","getTicks","xLabels","yLabels","beforeLayout","beforeUpdate","_this$options3","sampleSize","beforeSetDimensions","setDimensions","afterSetDimensions","beforeDataLimits","determineDataLimits","afterDataLimits","minmax","change","keepZero","_addGrace","beforeBuildTicks","buildTicks","afterBuildTicks","samplingEnabled","_convertTicksToLabels","beforeCalculateLabelRotation","calculateLabelRotation","afterCalculateLabelRotation","afterAutoSkip","beforeFit","fit","afterFit","afterUpdate","reversePixels","_alignToPixels","alignToPixels","_callHooks","notifyPlugins","beforeTickToLabelConversion","generateTickLabels","afterTickToLabelConversion","numTicks","maxLabelDiagonal","_isVisible","labelSizes","_getLabelSizes","maxLabelWidth","widest","maxLabelHeight","highest","asin","_this$options4","titleOpts","gridOpts","titleHeight","_this$_getLabelSizes","tickPadding","angleRadians","labelHeight","labelWidth","_calculatePadding","_handleMargins","_this$options5","_this$options5$ticks","isRotated","labelsBelowTicks","offsetLeft","offsetRight","_this$options6","isFullSize","fullSize","_computeLabelSizes","caches","widths","heights","tickFont","fontString","nestedLabel","widestLabelSize","highestLabelSize","_resolveTickFontOptions","valueAt","idx","getValueForPixel","getDecimalForPixel","getBaseValue","createTickContext","optionTicks","rot","_computeGridLineItems","ticksLength","tl","borderOpts","axisWidth","axisHalfWidth","alignBorderValue","borderValue","alignedLineValue","tx1","ty1","tx2","ty2","x1","y1","x2","y2","positionAxisID","limit","optsAtIndex","lineColor","tickBorderDash","tickBorderDashOffset","_computeLabelItems","tickAndPadding","hTickAndPadding","lineCount","textOffset","_getXAxisLabelAlignment","_getYAxisLabelAlignment","halfCount","backdrop","tickTextAlign","labelPadding","_this$options7","_this$options8","_this$options8$ticks","_computeLabelArea","drawBackground","drawGrid","drawLine","setLineDash","lineDashOffset","lastLineWidth","drawLabels","drawTitle","_this$options9","_titleArgs","titleX","titleY","titleArgs","_layers","tz","z","gz","getSortedVisibleDatasetMetas","axisID","_maxDigits","isForType","isPrototypeOf","parentScope","isIChartComponent","itemDefaults","routes","propertyParts","sourceName","sourceScope","routeDefaults","registerDefaults","unregister","_typedRegistries","_each","addControllers","addPlugins","addScales","_len6","_key6","getController","_get","getPlugin","getScale","removeControllers","_len7","_key7","removeElements","_len8","_key8","removePlugins","_len9","_key9","removeScales","_len10","_key10","typedRegistry","arg","reg","_getRegistryForType","_exec","itemReg","registry","component","camelMethod","_meta$data2","_getStartAndCountOfVi2","_this$_cachedMeta4","_this$options10","BarController","BubbleController","DoughnutController","LineController","PolarAreaController","RadarController","ScatterController","DateAdapter","formats","timestamp","amount","startOf","weekday","endOf","members","_date","binarySearch","metaset","lookupMethod","getRange","evaluateInteractionItems","_metasets$i","_binarySearch","getIntersectItems","isPointInArea","inRange","getNearestCartesianItems","distanceMetric","useX","useY","deltaX","deltaY","getDistanceMetricForAxis","minDistance","getCenterPoint","getNearestItems","_element$getProps","getNearestRadialItems","getAxisItems","rangeMethod","intersectsItem","Interaction","modes","nearest","STATIC_POSITIONS","filterByPosition","filterDynamicPositionByAxis","sortByWeight","setLayoutDims","layouts","stackWeight","placed","buildStacks","vBoxMaxWidth","hBoxMaxHeight","availableWidth","availableHeight","getCombinedMax","maxPadding","updateMaxPadding","boxPadding","updateDims","newWidth","outerWidth","newHeight","outerHeight","widthChanged","heightChanged","same","other","getMargins","marginForPositions","fitBoxes","boxes","refitBoxes","refit","_updateDims","setBoxDims","placeBoxes","userPadding","autoPadding","addBox","removeBox","layoutItem","minPadding","layoutBoxes","_box","_box$options","_box$options$stackWei","wrapBoxes","centerHorizontal","centerVertical","leftAndTop","rightAndBottom","vertical","buildLayoutBoxes","verticalBoxes","horizontalBoxes","visibleVerticalBoxCount","updatePos","handleMaxPadding","BasePlatform","acquireContext","releaseContext","isAttached","updateConfig","BasicPlatform","EVENT_TYPES","touchstart","touchmove","touchend","pointerenter","pointerdown","pointermove","pointerup","pointerleave","pointerout","isNullOrEmpty","eventListenerOptions","removeListener","nodeListContains","nodeList","createAttachObserver","observer","trigger","createDetachObserver","drpListeningCharts","oldDevicePixelRatio","onWindowResize","dpr","createResizeObserver","ResizeObserver","contentRect","listenDevicePixelRatioChanges","releaseObserver","unlistenDevicePixelRatioChanges","createProxyAndListen","_getRelativePosition","native","fromNativeEvent","addListener","renderHeight","renderWidth","displayWidth","displayHeight","initCanvas","proxies","$proxies","attach","detach","_init","hook","_createDescriptors","plugin","_oldCache","_notifyStateChanges","localIds","allPlugins","getOpts","pluginOpts","createDescriptors","previousDescriptors","pluginScopeKeys","getIndexAxis","datasetDefaults","determineAxis","scaleOptions","initOptions","chartDefaults","configScales","chartIndexAxis","firstIDs","scaleConf","defaultId","getDefaultScaleIDFromAxis","defaultScaleOptions","defaultID","getAxisFromDefaultScaleID","mergeScaleConfig","initData","keyCache","keysCached","cachedKeys","generate","addIfFound","_config","initConfig","_scopeCache","_resolverCache","datasetType","additionalOptionScopes","_cachedScopes","mainScope","resetCache","keyLists","chartOptionScopes","_getResolver","getResolver","subPrefixes","_descriptors2","hasFunction","needContext","resolverCache","KNOWN_POSITIONS","positionIsHorizontal","compare2Level","l1","l2","onAnimationsComplete","animationOptions","onComplete","onAnimationProgress","onProgress","getCanvas","instances","getChart","moveNumericKeys","intKey","userConfig","initialCanvas","existingChart","OffscreenCanvas","_detectPlatform","_options","_aspectRatio","_metasets","_lastEvent","_listeners","_responsiveListeners","_sortedMetasets","_plugins","_hiddenIndices","attached","_doResize","debounce","resizeDelay","_initialize","_this$options11","bindEvents","_resizeBeforeDraw","_resize","newSize","newRatio","onResize","ensureScalesHaveIDs","axisOptions","buildOrUpdateScales","scaleOpts","updated","isRadial","dposition","dtype","scaleType","hasUpdated","_updateMetasets","_destroyDatasetMeta","_removeUnreferencedMetasets","buildOrUpdateControllers","newControllers","order","ControllerClass","_defaults$datasets$ty","_resetElements","animsDisabled","_updateScales","_checkEventBindings","_updateHiddenIndices","_minPadding","_updateLayout","_updateDatasets","_eventHandler","_updateHoverStyles","existingEvents","newEvents","unbindEvents","changes","_getUniformDataChanges","datasetCount","makeSet","changeSet","noArea","_idx","_updateDataset","_this$_resizeBeforeDr","layers","_drawDatasets","_drawDataset","useClip","getElementsAtEventForMode","setDatasetVisibility","_updateVisibility","_stop","bindUserEvents","bindResponsiveEvents","_add","_remove","detached","updateHoverStyle","getActiveElements","setActiveElements","activeElements","lastActive","replay","hoverOptions","deactivated","activated","inChartArea","eventFilter","_handleEvent","_this$_active","_getActiveElements","isClick","_isClickEvent","lastEvent","determineLastEvent","invalidatePlugins","clipArc","pixelMargin","angleMargin","parseBorderRadius$1","angleDelta","borderRadius","halfThickness","innerLimit","computeOuterLimit","outerArcLimit","outerStart","outerEnd","innerStart","innerEnd","rThetaToXY","theta","pathArc","innerR","spacingOffset","avNogSpacingRadius","angleOffset","_parseBorderRadius$","outerStartAdjustedRadius","outerEndAdjustedRadius","outerStartAdjustedAngle","outerEndAdjustedAngle","innerStartAdjustedRadius","innerEndAdjustedRadius","innerStartAdjustedAngle","innerEndAdjustedAngle","pCenter","p4","p8","outerStartX","outerStartY","outerEndX","outerEndY","inner","lineJoin","fullCircles","drawFullCircleBorders","version","chartX","chartY","_getAngleFromPoint2","_this$getProps2","rAdjust","betweenAngles","withinRadius","_this$getProps3","_this$options12","halfAngle","halfRadius","radiusOffset","drawArc","setStyle","lineCap","pathVars","_params$start","paramsStart","_params$end","paramsEnd","segmentStart","segmentEnd","outside","pathSegment","_pathVars","lineMethod","stepped","getLineMethod","_ref8$move","fastPathSegment","_pathVars2","_ref9$move","prevX","lastY","avgX","countX","pointIndex","drawX","truncX","_getSegmentMethod","usePath2D","Path2D","path","_path","strokePathWithCache","segmentMethod","strokePathDirect","_points","_segments","_pointsUpdated","_findStartAndEnd","findStartAndEnd","solidSegments","_computeSegments","_interpolate","_getInterpolationMethod","_segments$i","interpolated","inRange$1","hitRadius","mouseX","mouseY","_this$getProps4","inXRange","inYRange","_this$getProps5","hoverRadius","getBarBounds","bar","_bar$getProps","half","skipOrLimit","boundingRects","maxW","maxH","parseBorderWidth","maxR","enableBorder","parseBorderRadius","outer","skipX","skipY","addNormalRectPath","inflateRect","refRect","_this$options13","_boundingRects","addRectPath","_this$getProps6","ArcElement","LineElement","PointElement","BarElement","cleanDecimatedDataset","cleanDecimatedData","plugin_decimation","algorithm","beforeElementsUpdate","_getStartAndCountOfVi3","getStartAndCountOfVisiblePointsSimplified","threshold","decimated","samples","bucketWidth","sampledIndex","endIndex","maxAreaPoint","maxArea","nextA","avgY","avgRangeStart","avgRangeEnd","avgRangeLength","rangeOffs","rangeTo","_data$a","pointAx","pointAy","lttbDecimation","minIndex","maxIndex","startIndex","xMin","dx","lastIndex","intermediateIndex1","intermediateIndex2","minMaxDecimation","_getBounds","_findSegmentEnd","_getEdge","_createBoundaryLine","boundary","_ref10$x","_ref10$y","linePoints","_pointsFromSegments","_shouldApplyFill","_resolveTarget","propagate","visited","_decodeFill","fillOption","parseFillOption","firstCh","decodeTargetIndex","addPointsBelow","sourcePoint","linesBelow","postponed","_findPoint","findPoint","pointValue","firstValue","lastValue","getLineByIndex","sourcePoints","below","getLinesBelow","_buildStackLine","_getTargetValue","computeCircularBoundary","_source$scale","_getTargetPixel","computeLinearBoundary","computeBoundary","_drawfill","lineOpts","_ref12$above","above","_ref12$below","clipVertical","doFill","clipY","lineLoop","tpoints","targetSegments","tgt","subBounds","fillSources","fillSource","_src$style","_src$style2$backgroun","notShape","clipBounds","interpolatedLineTo","targetLoop","_scale$chart$chartAre","interpolatedPoint","afterDatasetsUpdate","_args","$filler","beforeDraw","drawTime","beforeDatasetsDraw","beforeDatasetDraw","getBoxSize","labelOpts","_labelOpts$boxHeight","boxHeight","_labelOpts$boxWidth","boxWidth","usePointStyle","pointStyleWidth","itemHeight","_added","legendHitBoxes","_hoveredItem","doughnutMode","legendItems","columnSizes","lineWidths","buildLabels","labelFont","_computeTitleHeight","_getBoxSize","_fitRows","_fitCols","hitboxes","totalHeight","heightLimit","totalWidth","currentColWidth","currentColHeight","col","adjustHitBoxes","_this$options14","rtlHelper","hitbox","_draw","defaultColor","fontColor","halfFontSize","cursor","_getBoxSize2","textDirection","lineDash","drawOptions","SQRT2","yBoxTop","xBoxLeft","drawLegendBox","_textX","titleFont","titlePadding","topPaddingPlusHalfFontSize","_getLegendItemAt","hitBox","lh","onLeave","isListened","hoveredItem","sameItem","plugin_legend","_element","afterEvent","ci","_chart$legend$options","_padding","textSize","_drawArgs","fontOpts","_this$_drawArgs","plugin_title","titleBlock","createTitle","plugin_subtitle","positioners","average","eventPosition","nearestElement","tp","pushOrConcat","toPush","splitNewlines","createTooltipItem","_controller$getLabelA","getTooltipSize","footer","bodyFont","footerFont","titleLineCount","footerLineCount","bodyLineItemCount","combinedBodyLength","bodyItem","beforeBody","afterBody","titleSpacing","titleMarginBottom","bodySpacing","footerMarginTop","footerSpacing","widthPadding","maxLineWidth","determineXAlign","yAlign","chartWidth","_chart$chartArea","xAlign","caret","caretSize","caretPadding","doesNotFitWithAlign","determineAlignment","determineYAlign","getBackgroundPoint","paddingAndSize","_toTRBLCorners","alignX","alignY","getAlignedX","getBeforeAfterBodyLines","overrideCallbacks","_eventPosition","_size","_cachedAnimations","_tooltipItems","dataPoints","caretX","caretY","labelColors","labelPointStyles","labelTextColors","tooltipItems","getTitle","beforeTitle","afterTitle","getBeforeBody","getBody","bodyItems","scoped","beforeLabel","afterLabel","getAfterBody","getFooter","beforeFooter","afterFooter","_createItems","itemSort","labelColor","labelPointStyle","labelTextColor","positionAndSize","backgroundPoint","external","drawCaret","tooltipPoint","caretPosition","getCaretPosition","x3","y3","_toTRBLCorners2","ptX","ptY","titleColor","_drawColorBox","colorX","rtlColorX","yOffSet","colorY","multiKeyBackground","outerX","innerX","strokeRect","drawBody","bodyAlign","bodyLineHeight","xLinePadding","fillLineOfText","bodyAlignForCalculation","textColor","bodyColor","drawFooter","footerAlign","footerColor","tooltipSize","_toTRBLCorners3","quadraticCurveTo","_updateAnimationTarget","animX","animY","_willRender","hasTooltipContent","globalAlpha","positionChanged","_positionChanged","_ignoreReplayEvents","plugin_tooltip","afterInit","afterDraw","labelCount","Decimation","Filler","Legend","SubTitle","Title","Tooltip","findOrAddLabel","addedLabels","addIfString","lastIndexOf","_startValue","_valueRange","_addedLabels","added","_ref16","_this$getUserBounds2","_this$getMinMax","generateTicks$1","generationOptions","dataRange","maxTicks","maxDigits","includeBounds","maxSpaces","rmin","rmax","countDefined","minSpacing","niceMin","niceMax","numSpaces","rounded","almostWhole","decimalPlaces","relativeLabelSize","_ref17","_endValue","handleTickRangeOptions","_this$getUserBounds3","minSign","maxSign","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","getTickLimit","computeTickLimit","_this$getMinMax2","isMajor","tickVal","_zero","_this$getMinMax3","_this$getUserBounds4","exp","endExp","endSignificand","significand","lastTick","generateTicks","getTickBackdropHeight","determineLimits","fitWithPointLabels","limits","valueCount","_pointLabels","pointLabelOpts","additionalAngle","centerPointLabels","getPointLabelContext","getPointPosition","drawingArea","plFont","updateLimits","setCenterPoint","_pointLabelItems","extra","outerDistance","pointLabelPosition","yForAngle","getTextAlignForAngle","leftForTextAlign","buildPointLabelItems","hLimits","vLimits","pathRadiusLine","_this$getMinMax4","leftMovement","rightMovement","topMovement","bottomMovement","scalingFactor","getValueForDistanceFromCenter","scaledDistance","pointLabel","createPointLabelContext","distanceFromCenter","getBasePosition","getPointLabelPosition","_this$_pointLabelItem","_this$options15","_scale$_pointLabelIte","backdropLeft","backdropTop","backdropWidth","backdropHeight","drawPointLabels","gridLineOpts","drawRadiusLine","animate","INTERVALS","millisecond","common","steps","quarter","UNITS","sorter","_adapter","_scale$_parseOpts","_parseOpts","isoWeekday","determineUnitForAutoTicks","minUnit","capacity","interval","addTick","timestamps","_lookup2","ticksFromTimestamps","majorUnit","setMajorTicks","_unit","_majorUnit","_offsets","_normalized","normalized","_this$getUserBounds5","_applyBounds","_getLabelBounds","getLabelTimestamps","timeOpts","_generate","_filterBetween","_getLabelCapacity","determineUnitForFormatting","determineMajorUnit","initOffsets","offsetAfterAutoskip","getDecimalForValue","hasWeekday","getDataTimestamps","datetime","_tickFormatFunction","minorFormat","majorFormat","offsets","_getLabelSize","ticksOpts","tickLabelWidth","cosRotation","sinRotation","tickFontSize","exampleTime","exampleLabel","prevSource","nextSource","prevTarget","nextTarget","_lookupByKey2","_table$lo","_table$hi","_lookupByKey3","_table$lo2","_table$hi2","span","TimeSeriesScale","_table","_minPos","_tableRange","_getTimestampsForTable","buildLookupTable","registerables","CategoryScale","LinearScale","LogarithmicScale","RadialLinearScale","TimeScale","requiredArgs","required","argument","argStr","formatDistanceLocale","lessThanXSeconds","one","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","tokenValue","addSuffix","comparison","buildFormatLongFn","defaultWidth","full","long","medium","short","dateTime","formatRelativeLocale","lastWeek","yesterday","today","tomorrow","nextWeek","_baseDate","buildLocalizeFn","dirtyIndex","valuesArray","formattingValues","defaultFormattingWidth","_defaultWidth","_width","argumentCallback","ordinalNumber","dirtyNumber","rem100","era","narrow","abbreviated","wide","dayPeriod","am","pm","midnight","noon","morning","afternoon","evening","night","buildMatchFn","matchPattern","matchPatterns","defaultMatchWidth","matchResult","matchedString","parsePatterns","defaultParseWidth","findKey","valueCallback","predicate","parsePattern","any","defaultLocale","formatDistance","formatLong","formatRelative","localize","weekStartsOn","firstWeekContainsDate","toInteger","addMilliseconds","dirtyDate","dirtyAmount","subMilliseconds","dateLongFormatter","timeLongFormatter","longFormatters","dateTimeFormat","datePattern","timePattern","getTimezoneOffsetInMilliseconds","utcDate","UTC","getFullYear","setUTCFullYear","protectedDayOfYearTokens","protectedWeekYearTokens","isProtectedDayOfYearToken","isProtectedWeekYearToken","throwProtectedError","RangeError","Setter","validate","_utcDate","ValueSetter","validateValue","priority","subPriority","flags","DateToSystemTimezoneSetter","timestampIsSet","convertedDate","setFullYear","getUTCFullYear","getUTCMonth","getUTCDate","setHours","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","run","dateString","setter","_value","millisecondsInMinute","millisecondsInHour","numericPatterns","timezonePatterns","mapValue","parseFnResult","mapFn","parseNumericPattern","parseTimezonePattern","hours","minutes","seconds","parseAnyDigitsSigned","parseNDigits","parseNDigitsSigned","dayPeriodEnumToHours","normalizeTwoDigitYear","twoDigitYear","currentYear","isCommonEra","absCurrentYear","rangeEnd","isLeapYearIndex","getDefaultOptions","startOfUTCWeek","_options$weekStartsOn","_options$locale","_options$locale$optio","_defaultOptions$local","_defaultOptions$local2","getUTCDay","setUTCDate","setUTCHours","getUTCWeekYear","_options$firstWeekCon","firstWeekOfNextYear","startOfNextYear","firstWeekOfThisYear","startOfThisYear","startOfUTCISOWeek","startOfUTCWeekYear","firstWeek","MILLISECONDS_IN_WEEK","getUTCWeek","getUTCISOWeekYear","fourthOfJanuaryOfNextYear","fourthOfJanuaryOfThisYear","startOfUTCISOWeekYear","fourthOfJanuary","getUTCISOWeek","DAYS_IN_MONTH","DAYS_IN_MONTH_LEAP_YEAR","setUTCDay","dirtyDay","currentDay","remainder","dayIndex","parsers","isTwoDigitYear","normalizedTwoDigitYear","_flags","firstWeekOfYear","setUTCMonth","q","dirtyWeek","setUTCWeek","dirtyISOWeek","isoWeek","setUTCISOWeek","isLeapYear","wholeWeekDays","setUTCISODay","isPM","setUTCMinutes","setUTCSeconds","setUTCMilliseconds","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","notWhitespaceRegExp","unescapedLatinCharacterRegExp","cleanEscapedString","patterns","dateTimeDelimiter","timeZoneDelimiter","timezone","dateRegex","timeRegex","timezoneRegex","splitDateString","timeString","dateStrings","parseYear","additionalDigits","regex","captures","restDateString","century","parseDate","isWeekDate","dayOfYear","parseDateUnit","_year","validateWeekDate","isoWeekYear","fourthOfJanuaryDay","dayOfISOWeekYear","daysInMonths","validateDate","validateDayOfYearDate","parseTime","parseTimeUnit","validateTime","parseTimezone","timezoneString","_hours","validateTimezone","isValid","MILLISECONDS_IN_DAY","addLeadingZeros","targetLength","output","signedYear","dayPeriodEnumValue","numberOfDigits","milliseconds","dayPeriodEnum","lightFormatters","signedWeekYear","weekYear","startOfYearTimestamp","difference","getUTCDayOfYear","localDayOfWeek","isoDayOfWeek","_localize","timezoneOffset","_originalDate","getTimezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","originalDate","dirtyDelimiter","absOffset","delimiter","matched","MILLISECONDS_IN_HOUR","addDays","setDate","addMonths","dayOfMonth","endOfDesiredMonth","setMonth","daysInMonth","differenceInMilliseconds","dateLeft","dateRight","roundingMap","trunc","getRoundingMethod","startOfDay","differenceInCalendarDays","dirtyDateLeft","dirtyDateRight","startOfDayLeft","startOfDayRight","timestampLeft","timestampRight","compareLocalAsc","differenceInDays","isLastDayNotFull","differenceInCalendarMonths","yearDiff","monthDiff","compareAsc","endOfDay","endOfMonth","isLastDayOfMonth","differenceInMonths","isLastMonthNotFull","differenceInCalendarYears","startOfWeek","FORMATS","_id","fmt","dirtyDateString","dirtyFormatString","dirtyReferenceDate","_options$locale2","_options$locale2$opti","_options$locale3","_options$locale3$opti","_defaultOptions$local3","_defaultOptions$local4","formatString","subFnOptions","setters","firstCharacter","longFormatter","usedTokens","_token","useAdditionalWeekYearTokens","useAdditionalDayOfYearTokens","incompatibleTokens","incompatibleToken","usedToken","fullToken","_ret","uniquePrioritySetters","setterArray","_options$additionalDi","parseYearResult","parseISO","dirtyFormatStr","formatStr","formatterOptions","addSeconds","addMinutes","addHours","addWeeks","addQuarters","addYears","roundingMethod","differenceInSeconds","differenceInMinutes","differenceInHours","differenceInWeeks","differenceInQuarters","isLastYearNotFull","differenceInYears","setMilliseconds","startOfSecond","setSeconds","startOfMinute","setMinutes","startOfHour","startOfMonth","currentMonth","startOfQuarter","cleanDate","startOfYear","endOfSecond","endOfMinute","endOfHour","endOfWeek","endOfQuarter","endOfYear"],"mappings":";aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GAKAK,EAAI,EAAGC,EAAW,GACpCD,EAAIF,EAASI,OAAQF,IACzBH,EAAUC,EAASE,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBV,IAAYU,EAAgBV,IACpFI,EAASO,KAAKD,EAAgBV,GAAS,IAExCU,EAAgBV,GAAW,EAE5B,IAAID,KAAYG,EACZI,OAAOC,UAAUC,eAAeC,KAAKP,EAAaH,KACpDa,EAAQb,GAAYG,EAAYH,IAKlC,IAFGc,GAAqBA,EAAoBf,GAEtCM,EAASC,QACdD,EAASU,OAATV,EAGF,CAIA,IAAIW,EAAmB,CAAC,EAKpBL,EAAkB,CACrB,EAAG,GAWJ,SAASM,EA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oBAAmC,IAATpmG,EAAkBA,EAAO,GAEn4B,KAAMomG,GAAgB,GAAKA,GAAgB,GACzC,MAAM,IAAIuB,WAAW,oDAGvB,IAAIlrD,EAAO5gE,GAAO2qH,GACdxqH,EAAMygE,EAAKv+D,SACX44E,EAAuC,GAA/B96E,EAAMoqH,GAAgB,EAAI,IAAUpqH,EAAMoqH,GAGtD,OAFA3pD,EAAKi2D,QAAQj2D,EAAKr+D,UAAY04E,GAC9Bra,EAAKksD,SAAS,GAAI,GAAI,GAAI,KACnBlsD,CACT,CrBoHei8D,CAAU53H,GAEnB,IAAK,QACH,OAAOwzH,GAAWxzH,GAEpB,IAAK,UACH,OsBtJO,SAAsB0lH,GACnCrF,GAAa,EAAGplI,WAChB,IAAI0gF,EAAO5gE,GAAO2qH,GACd2R,EAAe17D,EAAKn+D,WACpBvC,EAAQo8H,EAAeA,EAAe,EAAI,EAG9C,OAFA17D,EAAKq2D,SAAS/2H,EAAO,GACrB0gE,EAAKksD,SAAS,GAAI,GAAI,GAAI,KACnBlsD,CACT,CtB8Iek8D,CAAa73H,GAEtB,IAAK,OACH,OuBzJO,SAAmB0lH,GAChCrF,GAAa,EAAGplI,WAChB,IAAI0gF,EAAO5gE,GAAO2qH,GACd1qH,EAAO2gE,EAAK2qD,cAGhB,OAFA3qD,EAAK8rD,YAAYzsH,EAAO,EAAG,EAAG,GAC9B2gE,EAAKksD,SAAS,GAAI,GAAI,GAAI,KACnBlsD,CACT,CvBkJem8D,CAAU93H,GAEnB,QACE,OAAOA,EAEb,IwBhLF,KAAUsS,IAAI,ICUd7hC,IAAMmL,QACNE,IAAWF,QACXme,S","file":"js/application-cc450e3dcc6f024963cd.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"js/\" + ({\"0\":\"actioncable\"}[chunkId]||chunkId) + \"-\" + {\"0\":\"ac7871b78d2e1024f777\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/packs/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/assets/javascripts\nReleased under the MIT license\n */\n;\n(function () {\n  var context = this;\n  (function () {\n    (function () {\n      this.Rails = {\n        linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n        buttonClickSelector: {\n          selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n          exclude: 'form button'\n        },\n        inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n        formSubmitSelector: 'form:not([data-turbo=true])',\n        formInputClickSelector: 'form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n        formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n        formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n        fileInputSelector: 'input[name][type=file]:not([disabled])',\n        linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n        buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n      };\n    }).call(this);\n  }).call(context);\n  var Rails = context.Rails;\n  (function () {\n    (function () {\n      var nonce;\n      nonce = null;\n\n      Rails.loadCSPNonce = function () {\n        var ref;\n        return nonce = (ref = document.querySelector(\"meta[name=csp-nonce]\")) != null ? ref.content : void 0;\n      };\n\n      Rails.cspNonce = function () {\n        return nonce != null ? nonce : Rails.loadCSPNonce();\n      };\n    }).call(this);\n    (function () {\n      var expando, m;\n      m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n      Rails.matches = function (element, selector) {\n        if (selector.exclude != null) {\n          return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n        } else {\n          return m.call(element, selector);\n        }\n      };\n\n      expando = '_ujsData';\n\n      Rails.getData = function (element, key) {\n        var ref;\n        return (ref = element[expando]) != null ? ref[key] : void 0;\n      };\n\n      Rails.setData = function (element, key, value) {\n        if (element[expando] == null) {\n          element[expando] = {};\n        }\n\n        return element[expando][key] = value;\n      };\n\n      Rails.$ = function (selector) {\n        return Array.prototype.slice.call(document.querySelectorAll(selector));\n      };\n    }).call(this);\n    (function () {\n      var $, csrfParam, csrfToken;\n      $ = Rails.$;\n\n      csrfToken = Rails.csrfToken = function () {\n        var meta;\n        meta = document.querySelector('meta[name=csrf-token]');\n        return meta && meta.content;\n      };\n\n      csrfParam = Rails.csrfParam = function () {\n        var meta;\n        meta = document.querySelector('meta[name=csrf-param]');\n        return meta && meta.content;\n      };\n\n      Rails.CSRFProtection = function (xhr) {\n        var token;\n        token = csrfToken();\n\n        if (token != null) {\n          return xhr.setRequestHeader('X-CSRF-Token', token);\n        }\n      };\n\n      Rails.refreshCSRFTokens = function () {\n        var param, token;\n        token = csrfToken();\n        param = csrfParam();\n\n        if (token != null && param != null) {\n          return $('form input[name=\"' + param + '\"]').forEach(function (input) {\n            return input.value = token;\n          });\n        }\n      };\n    }).call(this);\n    (function () {\n      var CustomEvent, fire, matches, preventDefault;\n      matches = Rails.matches;\n      CustomEvent = window.CustomEvent;\n\n      if (typeof CustomEvent !== 'function') {\n        CustomEvent = function (event, params) {\n          var evt;\n          evt = document.createEvent('CustomEvent');\n          evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n          return evt;\n        };\n\n        CustomEvent.prototype = window.Event.prototype;\n        preventDefault = CustomEvent.prototype.preventDefault;\n\n        CustomEvent.prototype.preventDefault = function () {\n          var result;\n          result = preventDefault.call(this);\n\n          if (this.cancelable && !this.defaultPrevented) {\n            Object.defineProperty(this, 'defaultPrevented', {\n              get: function () {\n                return true;\n              }\n            });\n          }\n\n          return result;\n        };\n      }\n\n      fire = Rails.fire = function (obj, name, data) {\n        var event;\n        event = new CustomEvent(name, {\n          bubbles: true,\n          cancelable: true,\n          detail: data\n        });\n        obj.dispatchEvent(event);\n        return !event.defaultPrevented;\n      };\n\n      Rails.stopEverything = function (e) {\n        fire(e.target, 'ujs:everythingStopped');\n        e.preventDefault();\n        e.stopPropagation();\n        return e.stopImmediatePropagation();\n      };\n\n      Rails.delegate = function (element, selector, eventType, handler) {\n        return element.addEventListener(eventType, function (e) {\n          var target;\n          target = e.target;\n\n          while (!(!(target instanceof Element) || matches(target, selector))) {\n            target = target.parentNode;\n          }\n\n          if (target instanceof Element && handler.call(target, e) === false) {\n            e.preventDefault();\n            return e.stopPropagation();\n          }\n        });\n      };\n    }).call(this);\n    (function () {\n      var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n      cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n      AcceptHeaders = {\n        '*': '*/*',\n        text: 'text/plain',\n        html: 'text/html',\n        xml: 'application/xml, text/xml',\n        json: 'application/json, text/javascript',\n        script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n      };\n\n      Rails.ajax = function (options) {\n        var xhr;\n        options = prepareOptions(options);\n        xhr = createXHR(options, function () {\n          var ref, response;\n          response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n\n          if (Math.floor(xhr.status / 100) === 2) {\n            if (typeof options.success === \"function\") {\n              options.success(response, xhr.statusText, xhr);\n            }\n          } else {\n            if (typeof options.error === \"function\") {\n              options.error(response, xhr.statusText, xhr);\n            }\n          }\n\n          return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n        });\n\n        if (options.beforeSend != null && !options.beforeSend(xhr, options)) {\n          return false;\n        }\n\n        if (xhr.readyState === XMLHttpRequest.OPENED) {\n          return xhr.send(options.data);\n        }\n      };\n\n      prepareOptions = function (options) {\n        options.url = options.url || location.href;\n        options.type = options.type.toUpperCase();\n\n        if (options.type === 'GET' && options.data) {\n          if (options.url.indexOf('?') < 0) {\n            options.url += '?' + options.data;\n          } else {\n            options.url += '&' + options.data;\n          }\n        }\n\n        if (AcceptHeaders[options.dataType] == null) {\n          options.dataType = '*';\n        }\n\n        options.accept = AcceptHeaders[options.dataType];\n\n        if (options.dataType !== '*') {\n          options.accept += ', */*; q=0.01';\n        }\n\n        return options;\n      };\n\n      createXHR = function (options, done) {\n        var xhr;\n        xhr = new XMLHttpRequest();\n        xhr.open(options.type, options.url, true);\n        xhr.setRequestHeader('Accept', options.accept);\n\n        if (typeof options.data === 'string') {\n          xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n        }\n\n        if (!options.crossDomain) {\n          xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n          CSRFProtection(xhr);\n        }\n\n        xhr.withCredentials = !!options.withCredentials;\n\n        xhr.onreadystatechange = function () {\n          if (xhr.readyState === XMLHttpRequest.DONE) {\n            return done(xhr);\n          }\n        };\n\n        return xhr;\n      };\n\n      processResponse = function (response, type) {\n        var parser, script;\n\n        if (typeof response === 'string' && typeof type === 'string') {\n          if (type.match(/\\bjson\\b/)) {\n            try {\n              response = JSON.parse(response);\n            } catch (error) {}\n          } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n            script = document.createElement('script');\n            script.setAttribute('nonce', cspNonce());\n            script.text = response;\n            document.head.appendChild(script).parentNode.removeChild(script);\n          } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n            parser = new DOMParser();\n            type = type.replace(/;.+/, '');\n\n            try {\n              response = parser.parseFromString(response, type);\n            } catch (error) {}\n          }\n        }\n\n        return response;\n      };\n\n      Rails.href = function (element) {\n        return element.href;\n      };\n\n      Rails.isCrossDomain = function (url) {\n        var e, originAnchor, urlAnchor;\n        originAnchor = document.createElement('a');\n        originAnchor.href = location.href;\n        urlAnchor = document.createElement('a');\n\n        try {\n          urlAnchor.href = url;\n          return !((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host || originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host);\n        } catch (error) {\n          e = error;\n          return true;\n        }\n      };\n    }).call(this);\n    (function () {\n      var matches, toArray;\n      matches = Rails.matches;\n\n      toArray = function (e) {\n        return Array.prototype.slice.call(e);\n      };\n\n      Rails.serializeElement = function (element, additionalParam) {\n        var inputs, params;\n        inputs = [element];\n\n        if (matches(element, 'form')) {\n          inputs = toArray(element.elements);\n        }\n\n        params = [];\n        inputs.forEach(function (input) {\n          if (!input.name || input.disabled) {\n            return;\n          }\n\n          if (matches(input, 'fieldset[disabled] *')) {\n            return;\n          }\n\n          if (matches(input, 'select')) {\n            return toArray(input.options).forEach(function (option) {\n              if (option.selected) {\n                return params.push({\n                  name: input.name,\n                  value: option.value\n                });\n              }\n            });\n          } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n            return params.push({\n              name: input.name,\n              value: input.value\n            });\n          }\n        });\n\n        if (additionalParam) {\n          params.push(additionalParam);\n        }\n\n        return params.map(function (param) {\n          if (param.name != null) {\n            return encodeURIComponent(param.name) + \"=\" + encodeURIComponent(param.value);\n          } else {\n            return param;\n          }\n        }).join('&');\n      };\n\n      Rails.formElements = function (form, selector) {\n        if (matches(form, 'form')) {\n          return toArray(form.elements).filter(function (el) {\n            return matches(el, selector);\n          });\n        } else {\n          return toArray(form.querySelectorAll(selector));\n        }\n      };\n    }).call(this);\n    (function () {\n      var allowAction, fire, stopEverything;\n      fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n      Rails.handleConfirm = function (e) {\n        if (!allowAction(this)) {\n          return stopEverything(e);\n        }\n      };\n\n      Rails.confirm = function (message, element) {\n        return confirm(message);\n      };\n\n      allowAction = function (element) {\n        var answer, callback, message;\n        message = element.getAttribute('data-confirm');\n\n        if (!message) {\n          return true;\n        }\n\n        answer = false;\n\n        if (fire(element, 'confirm')) {\n          try {\n            answer = Rails.confirm(message, element);\n          } catch (error) {}\n\n          callback = fire(element, 'confirm:complete', [answer]);\n        }\n\n        return answer && callback;\n      };\n    }).call(this);\n    (function () {\n      var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isXhrRedirect, matches, setData, stopEverything;\n      matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;\n\n      Rails.handleDisabledElement = function (e) {\n        var element;\n        element = this;\n\n        if (element.disabled) {\n          return stopEverything(e);\n        }\n      };\n\n      Rails.enableElement = function (e) {\n        var element;\n\n        if (e instanceof Event) {\n          if (isXhrRedirect(e)) {\n            return;\n          }\n\n          element = e.target;\n        } else {\n          element = e;\n        }\n\n        if (matches(element, Rails.linkDisableSelector)) {\n          return enableLinkElement(element);\n        } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n          return enableFormElement(element);\n        } else if (matches(element, Rails.formSubmitSelector)) {\n          return enableFormElements(element);\n        }\n      };\n\n      Rails.disableElement = function (e) {\n        var element;\n        element = e instanceof Event ? e.target : e;\n\n        if (matches(element, Rails.linkDisableSelector)) {\n          return disableLinkElement(element);\n        } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n          return disableFormElement(element);\n        } else if (matches(element, Rails.formSubmitSelector)) {\n          return disableFormElements(element);\n        }\n      };\n\n      disableLinkElement = function (element) {\n        var replacement;\n\n        if (getData(element, 'ujs:disabled')) {\n          return;\n        }\n\n        replacement = element.getAttribute('data-disable-with');\n\n        if (replacement != null) {\n          setData(element, 'ujs:enable-with', element.innerHTML);\n          element.innerHTML = replacement;\n        }\n\n        element.addEventListener('click', stopEverything);\n        return setData(element, 'ujs:disabled', true);\n      };\n\n      enableLinkElement = function (element) {\n        var originalText;\n        originalText = getData(element, 'ujs:enable-with');\n\n        if (originalText != null) {\n          element.innerHTML = originalText;\n          setData(element, 'ujs:enable-with', null);\n        }\n\n        element.removeEventListener('click', stopEverything);\n        return setData(element, 'ujs:disabled', null);\n      };\n\n      disableFormElements = function (form) {\n        return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n      };\n\n      disableFormElement = function (element) {\n        var replacement;\n\n        if (getData(element, 'ujs:disabled')) {\n          return;\n        }\n\n        replacement = element.getAttribute('data-disable-with');\n\n        if (replacement != null) {\n          if (matches(element, 'button')) {\n            setData(element, 'ujs:enable-with', element.innerHTML);\n            element.innerHTML = replacement;\n          } else {\n            setData(element, 'ujs:enable-with', element.value);\n            element.value = replacement;\n          }\n        }\n\n        element.disabled = true;\n        return setData(element, 'ujs:disabled', true);\n      };\n\n      enableFormElements = function (form) {\n        return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n      };\n\n      enableFormElement = function (element) {\n        var originalText;\n        originalText = getData(element, 'ujs:enable-with');\n\n        if (originalText != null) {\n          if (matches(element, 'button')) {\n            element.innerHTML = originalText;\n          } else {\n            element.value = originalText;\n          }\n\n          setData(element, 'ujs:enable-with', null);\n        }\n\n        element.disabled = false;\n        return setData(element, 'ujs:disabled', null);\n      };\n\n      isXhrRedirect = function (event) {\n        var ref, xhr;\n        xhr = (ref = event.detail) != null ? ref[0] : void 0;\n        return (xhr != null ? xhr.getResponseHeader(\"X-Xhr-Redirect\") : void 0) != null;\n      };\n    }).call(this);\n    (function () {\n      var stopEverything;\n      stopEverything = Rails.stopEverything;\n\n      Rails.handleMethod = function (e) {\n        var csrfParam, csrfToken, form, formContent, href, link, method;\n        link = this;\n        method = link.getAttribute('data-method');\n\n        if (!method) {\n          return;\n        }\n\n        href = Rails.href(link);\n        csrfToken = Rails.csrfToken();\n        csrfParam = Rails.csrfParam();\n        form = document.createElement('form');\n        formContent = \"<input name='_method' value='\" + method + \"' type='hidden' />\";\n\n        if (csrfParam != null && csrfToken != null && !Rails.isCrossDomain(href)) {\n          formContent += \"<input name='\" + csrfParam + \"' value='\" + csrfToken + \"' type='hidden' />\";\n        }\n\n        formContent += '<input type=\"submit\" />';\n        form.method = 'post';\n        form.action = href;\n        form.target = link.target;\n        form.innerHTML = formContent;\n        form.style.display = 'none';\n        document.body.appendChild(form);\n        form.querySelector('[type=\"submit\"]').click();\n        return stopEverything(e);\n      };\n    }).call(this);\n    (function () {\n      var ajax,\n          fire,\n          getData,\n          isCrossDomain,\n          isRemote,\n          matches,\n          serializeElement,\n          setData,\n          stopEverything,\n          slice = [].slice;\n      matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;\n\n      isRemote = function (element) {\n        var value;\n        value = element.getAttribute('data-remote');\n        return value != null && value !== 'false';\n      };\n\n      Rails.handleRemote = function (e) {\n        var button, data, dataType, element, method, url, withCredentials;\n        element = this;\n\n        if (!isRemote(element)) {\n          return true;\n        }\n\n        if (!fire(element, 'ajax:before')) {\n          fire(element, 'ajax:stopped');\n          return false;\n        }\n\n        withCredentials = element.getAttribute('data-with-credentials');\n        dataType = element.getAttribute('data-type') || 'script';\n\n        if (matches(element, Rails.formSubmitSelector)) {\n          button = getData(element, 'ujs:submit-button');\n          method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n          url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n\n          if (method.toUpperCase() === 'GET') {\n            url = url.replace(/\\?.*$/, '');\n          }\n\n          if (element.enctype === 'multipart/form-data') {\n            data = new FormData(element);\n\n            if (button != null) {\n              data.append(button.name, button.value);\n            }\n          } else {\n            data = serializeElement(element, button);\n          }\n\n          setData(element, 'ujs:submit-button', null);\n          setData(element, 'ujs:submit-button-formmethod', null);\n          setData(element, 'ujs:submit-button-formaction', null);\n        } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n          method = element.getAttribute('data-method');\n          url = element.getAttribute('data-url');\n          data = serializeElement(element, element.getAttribute('data-params'));\n        } else {\n          method = element.getAttribute('data-method');\n          url = Rails.href(element);\n          data = element.getAttribute('data-params');\n        }\n\n        ajax({\n          type: method || 'GET',\n          url: url,\n          data: data,\n          dataType: dataType,\n          beforeSend: function (xhr, options) {\n            if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n              return fire(element, 'ajax:send', [xhr]);\n            } else {\n              fire(element, 'ajax:stopped');\n              return false;\n            }\n          },\n          success: function () {\n            var args;\n            args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n            return fire(element, 'ajax:success', args);\n          },\n          error: function () {\n            var args;\n            args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n            return fire(element, 'ajax:error', args);\n          },\n          complete: function () {\n            var args;\n            args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n            return fire(element, 'ajax:complete', args);\n          },\n          crossDomain: isCrossDomain(url),\n          withCredentials: withCredentials != null && withCredentials !== 'false'\n        });\n        return stopEverything(e);\n      };\n\n      Rails.formSubmitButtonClick = function (e) {\n        var button, form;\n        button = this;\n        form = button.form;\n\n        if (!form) {\n          return;\n        }\n\n        if (button.name) {\n          setData(form, 'ujs:submit-button', {\n            name: button.name,\n            value: button.value\n          });\n        }\n\n        setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n        setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n        return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n      };\n\n      Rails.preventInsignificantClick = function (e) {\n        var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;\n        link = this;\n        method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n        data = link.getAttribute('data-params');\n        metaClick = e.metaKey || e.ctrlKey;\n        insignificantMetaClick = metaClick && method === 'GET' && !data;\n        nonPrimaryMouseClick = e.button != null && e.button !== 0;\n\n        if (nonPrimaryMouseClick || insignificantMetaClick) {\n          return e.stopImmediatePropagation();\n        }\n      };\n    }).call(this);\n    (function () {\n      var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;\n      fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;\n\n      if (typeof jQuery !== \"undefined\" && jQuery !== null && jQuery.ajax != null) {\n        if (jQuery.rails) {\n          throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n        }\n\n        jQuery.rails = Rails;\n        jQuery.ajaxPrefilter(function (options, originalOptions, xhr) {\n          if (!options.crossDomain) {\n            return CSRFProtection(xhr);\n          }\n        });\n      }\n\n      Rails.start = function () {\n        if (window._rails_loaded) {\n          throw new Error('rails-ujs has already been loaded!');\n        }\n\n        window.addEventListener('pageshow', function () {\n          $(Rails.formEnableSelector).forEach(function (el) {\n            if (getData(el, 'ujs:disabled')) {\n              return enableElement(el);\n            }\n          });\n          return $(Rails.linkDisableSelector).forEach(function (el) {\n            if (getData(el, 'ujs:disabled')) {\n              return enableElement(el);\n            }\n          });\n        });\n        delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n        delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n        delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n        delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n        delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);\n        delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n        delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n        delegate(document, Rails.linkClickSelector, 'click', disableElement);\n        delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n        delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n        delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);\n        delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n        delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n        delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n        delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n        delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n        delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n        delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n        delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n        delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n        delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n        delegate(document, Rails.formSubmitSelector, 'submit', function (e) {\n          return setTimeout(function () {\n            return disableElement(e);\n          }, 13);\n        });\n        delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n        delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n        delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);\n        delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n        delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n        delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n        document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n        document.addEventListener('DOMContentLoaded', loadCSPNonce);\n        return window._rails_loaded = true;\n      };\n\n      if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n        Rails.start();\n      }\n    }).call(this);\n  }).call(this);\n\n  if (typeof module === \"object\" && module.exports) {\n    module.exports = Rails;\n  } else if (typeof define === \"function\" && define.amd) {\n    define(Rails);\n  }\n}).call(this);","/*\nTurbolinks 5.2.0\nCopyright © 2018 Basecamp, LLC\n */\n(function () {\n  var t = this;\n  (function () {\n    (function () {\n      this.Turbolinks = {\n        supported: function () {\n          return null != window.history.pushState && null != window.requestAnimationFrame && null != window.addEventListener;\n        }(),\n        visit: function (t, r) {\n          return e.controller.visit(t, r);\n        },\n        clearCache: function () {\n          return e.controller.clearCache();\n        },\n        setProgressBarDelay: function (t) {\n          return e.controller.setProgressBarDelay(t);\n        }\n      };\n    }).call(this);\n  }).call(t);\n  var e = t.Turbolinks;\n  (function () {\n    (function () {\n      var t,\n          r,\n          n,\n          o = [].slice;\n      e.copyObject = function (t) {\n        var e, r, n;\n        r = {};\n\n        for (e in t) n = t[e], r[e] = n;\n\n        return r;\n      }, e.closest = function (e, r) {\n        return t.call(e, r);\n      }, t = function () {\n        var t, e;\n        return t = document.documentElement, null != (e = t.closest) ? e : function (t) {\n          var e;\n\n          for (e = this; e;) {\n            if (e.nodeType === Node.ELEMENT_NODE && r.call(e, t)) return e;\n            e = e.parentNode;\n          }\n        };\n      }(), e.defer = function (t) {\n        return setTimeout(t, 1);\n      }, e.throttle = function (t) {\n        var e;\n        return e = null, function () {\n          var r;\n          return r = 1 <= arguments.length ? o.call(arguments, 0) : [], null != e ? e : e = requestAnimationFrame(function (n) {\n            return function () {\n              return e = null, t.apply(n, r);\n            };\n          }(this));\n        };\n      }, e.dispatch = function (t, e) {\n        var r, o, i, s, a, u;\n        return a = null != e ? e : {}, u = a.target, r = a.cancelable, o = a.data, i = document.createEvent(\"Events\"), i.initEvent(t, !0, r === !0), i.data = null != o ? o : {}, i.cancelable && !n && (s = i.preventDefault, i.preventDefault = function () {\n          return this.defaultPrevented || Object.defineProperty(this, \"defaultPrevented\", {\n            get: function () {\n              return !0;\n            }\n          }), s.call(this);\n        }), (null != u ? u : document).dispatchEvent(i), i;\n      }, n = function () {\n        var t;\n        return t = document.createEvent(\"Events\"), t.initEvent(\"test\", !0, !0), t.preventDefault(), t.defaultPrevented;\n      }(), e.match = function (t, e) {\n        return r.call(t, e);\n      }, r = function () {\n        var t, e, r, n;\n        return t = document.documentElement, null != (e = null != (r = null != (n = t.matchesSelector) ? n : t.webkitMatchesSelector) ? r : t.msMatchesSelector) ? e : t.mozMatchesSelector;\n      }(), e.uuid = function () {\n        var t, e, r;\n\n        for (r = \"\", t = e = 1; 36 >= e; t = ++e) r += 9 === t || 14 === t || 19 === t || 24 === t ? \"-\" : 15 === t ? \"4\" : 20 === t ? (Math.floor(4 * Math.random()) + 8).toString(16) : Math.floor(15 * Math.random()).toString(16);\n\n        return r;\n      };\n    }).call(this), function () {\n      e.Location = function () {\n        function t(t) {\n          var e, r;\n          null == t && (t = \"\"), r = document.createElement(\"a\"), r.href = t.toString(), this.absoluteURL = r.href, e = r.hash.length, 2 > e ? this.requestURL = this.absoluteURL : (this.requestURL = this.absoluteURL.slice(0, -e), this.anchor = r.hash.slice(1));\n        }\n\n        var e, r, n, o;\n        return t.wrap = function (t) {\n          return t instanceof this ? t : new this(t);\n        }, t.prototype.getOrigin = function () {\n          return this.absoluteURL.split(\"/\", 3).join(\"/\");\n        }, t.prototype.getPath = function () {\n          var t, e;\n          return null != (t = null != (e = this.requestURL.match(/\\/\\/[^\\/]*(\\/[^?;]*)/)) ? e[1] : void 0) ? t : \"/\";\n        }, t.prototype.getPathComponents = function () {\n          return this.getPath().split(\"/\").slice(1);\n        }, t.prototype.getLastPathComponent = function () {\n          return this.getPathComponents().slice(-1)[0];\n        }, t.prototype.getExtension = function () {\n          var t, e;\n          return null != (t = null != (e = this.getLastPathComponent().match(/\\.[^.]*$/)) ? e[0] : void 0) ? t : \"\";\n        }, t.prototype.isHTML = function () {\n          return this.getExtension().match(/^(?:|\\.(?:htm|html|xhtml))$/);\n        }, t.prototype.isPrefixedBy = function (t) {\n          var e;\n          return e = r(t), this.isEqualTo(t) || o(this.absoluteURL, e);\n        }, t.prototype.isEqualTo = function (t) {\n          return this.absoluteURL === (null != t ? t.absoluteURL : void 0);\n        }, t.prototype.toCacheKey = function () {\n          return this.requestURL;\n        }, t.prototype.toJSON = function () {\n          return this.absoluteURL;\n        }, t.prototype.toString = function () {\n          return this.absoluteURL;\n        }, t.prototype.valueOf = function () {\n          return this.absoluteURL;\n        }, r = function (t) {\n          return e(t.getOrigin() + t.getPath());\n        }, e = function (t) {\n          return n(t, \"/\") ? t : t + \"/\";\n        }, o = function (t, e) {\n          return t.slice(0, e.length) === e;\n        }, n = function (t, e) {\n          return t.slice(-e.length) === e;\n        }, t;\n      }();\n    }.call(this), function () {\n      var t = function (t, e) {\n        return function () {\n          return t.apply(e, arguments);\n        };\n      };\n\n      e.HttpRequest = function () {\n        function r(r, n, o) {\n          this.delegate = r, this.requestCanceled = t(this.requestCanceled, this), this.requestTimedOut = t(this.requestTimedOut, this), this.requestFailed = t(this.requestFailed, this), this.requestLoaded = t(this.requestLoaded, this), this.requestProgressed = t(this.requestProgressed, this), this.url = e.Location.wrap(n).requestURL, this.referrer = e.Location.wrap(o).absoluteURL, this.createXHR();\n        }\n\n        return r.NETWORK_FAILURE = 0, r.TIMEOUT_FAILURE = -1, r.timeout = 60, r.prototype.send = function () {\n          var t;\n          return this.xhr && !this.sent ? (this.notifyApplicationBeforeRequestStart(), this.setProgress(0), this.xhr.send(), this.sent = !0, \"function\" == typeof (t = this.delegate).requestStarted ? t.requestStarted() : void 0) : void 0;\n        }, r.prototype.cancel = function () {\n          return this.xhr && this.sent ? this.xhr.abort() : void 0;\n        }, r.prototype.requestProgressed = function (t) {\n          return t.lengthComputable ? this.setProgress(t.loaded / t.total) : void 0;\n        }, r.prototype.requestLoaded = function () {\n          return this.endRequest(function (t) {\n            return function () {\n              var e;\n              return 200 <= (e = t.xhr.status) && 300 > e ? t.delegate.requestCompletedWithResponse(t.xhr.responseText, t.xhr.getResponseHeader(\"Turbolinks-Location\")) : (t.failed = !0, t.delegate.requestFailedWithStatusCode(t.xhr.status, t.xhr.responseText));\n            };\n          }(this));\n        }, r.prototype.requestFailed = function () {\n          return this.endRequest(function (t) {\n            return function () {\n              return t.failed = !0, t.delegate.requestFailedWithStatusCode(t.constructor.NETWORK_FAILURE);\n            };\n          }(this));\n        }, r.prototype.requestTimedOut = function () {\n          return this.endRequest(function (t) {\n            return function () {\n              return t.failed = !0, t.delegate.requestFailedWithStatusCode(t.constructor.TIMEOUT_FAILURE);\n            };\n          }(this));\n        }, r.prototype.requestCanceled = function () {\n          return this.endRequest();\n        }, r.prototype.notifyApplicationBeforeRequestStart = function () {\n          return e.dispatch(\"turbolinks:request-start\", {\n            data: {\n              url: this.url,\n              xhr: this.xhr\n            }\n          });\n        }, r.prototype.notifyApplicationAfterRequestEnd = function () {\n          return e.dispatch(\"turbolinks:request-end\", {\n            data: {\n              url: this.url,\n              xhr: this.xhr\n            }\n          });\n        }, r.prototype.createXHR = function () {\n          return this.xhr = new XMLHttpRequest(), this.xhr.open(\"GET\", this.url, !0), this.xhr.timeout = 1e3 * this.constructor.timeout, this.xhr.setRequestHeader(\"Accept\", \"text/html, application/xhtml+xml\"), this.xhr.setRequestHeader(\"Turbolinks-Referrer\", this.referrer), this.xhr.onprogress = this.requestProgressed, this.xhr.onload = this.requestLoaded, this.xhr.onerror = this.requestFailed, this.xhr.ontimeout = this.requestTimedOut, this.xhr.onabort = this.requestCanceled;\n        }, r.prototype.endRequest = function (t) {\n          return this.xhr ? (this.notifyApplicationAfterRequestEnd(), null != t && t.call(this), this.destroy()) : void 0;\n        }, r.prototype.setProgress = function (t) {\n          var e;\n          return this.progress = t, \"function\" == typeof (e = this.delegate).requestProgressed ? e.requestProgressed(this.progress) : void 0;\n        }, r.prototype.destroy = function () {\n          var t;\n          return this.setProgress(1), \"function\" == typeof (t = this.delegate).requestFinished && t.requestFinished(), this.delegate = null, this.xhr = null;\n        }, r;\n      }();\n    }.call(this), function () {\n      var t = function (t, e) {\n        return function () {\n          return t.apply(e, arguments);\n        };\n      };\n\n      e.ProgressBar = function () {\n        function e() {\n          this.trickle = t(this.trickle, this), this.stylesheetElement = this.createStylesheetElement(), this.progressElement = this.createProgressElement();\n        }\n\n        var r;\n        return r = 300, e.defaultCSS = \".turbolinks-progress-bar {\\n  position: fixed;\\n  display: block;\\n  top: 0;\\n  left: 0;\\n  height: 3px;\\n  background: #0076ff;\\n  z-index: 9999;\\n  transition: width \" + r + \"ms ease-out, opacity \" + r / 2 + \"ms \" + r / 2 + \"ms ease-in;\\n  transform: translate3d(0, 0, 0);\\n}\", e.prototype.show = function () {\n          return this.visible ? void 0 : (this.visible = !0, this.installStylesheetElement(), this.installProgressElement(), this.startTrickling());\n        }, e.prototype.hide = function () {\n          return this.visible && !this.hiding ? (this.hiding = !0, this.fadeProgressElement(function (t) {\n            return function () {\n              return t.uninstallProgressElement(), t.stopTrickling(), t.visible = !1, t.hiding = !1;\n            };\n          }(this))) : void 0;\n        }, e.prototype.setValue = function (t) {\n          return this.value = t, this.refresh();\n        }, e.prototype.installStylesheetElement = function () {\n          return document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n        }, e.prototype.installProgressElement = function () {\n          return this.progressElement.style.width = 0, this.progressElement.style.opacity = 1, document.documentElement.insertBefore(this.progressElement, document.body), this.refresh();\n        }, e.prototype.fadeProgressElement = function (t) {\n          return this.progressElement.style.opacity = 0, setTimeout(t, 1.5 * r);\n        }, e.prototype.uninstallProgressElement = function () {\n          return this.progressElement.parentNode ? document.documentElement.removeChild(this.progressElement) : void 0;\n        }, e.prototype.startTrickling = function () {\n          return null != this.trickleInterval ? this.trickleInterval : this.trickleInterval = setInterval(this.trickle, r);\n        }, e.prototype.stopTrickling = function () {\n          return clearInterval(this.trickleInterval), this.trickleInterval = null;\n        }, e.prototype.trickle = function () {\n          return this.setValue(this.value + Math.random() / 100);\n        }, e.prototype.refresh = function () {\n          return requestAnimationFrame(function (t) {\n            return function () {\n              return t.progressElement.style.width = 10 + 90 * t.value + \"%\";\n            };\n          }(this));\n        }, e.prototype.createStylesheetElement = function () {\n          var t;\n          return t = document.createElement(\"style\"), t.type = \"text/css\", t.textContent = this.constructor.defaultCSS, t;\n        }, e.prototype.createProgressElement = function () {\n          var t;\n          return t = document.createElement(\"div\"), t.className = \"turbolinks-progress-bar\", t;\n        }, e;\n      }();\n    }.call(this), function () {\n      var t = function (t, e) {\n        return function () {\n          return t.apply(e, arguments);\n        };\n      };\n\n      e.BrowserAdapter = function () {\n        function r(r) {\n          this.controller = r, this.showProgressBar = t(this.showProgressBar, this), this.progressBar = new e.ProgressBar();\n        }\n\n        var n, o, i;\n        return i = e.HttpRequest, n = i.NETWORK_FAILURE, o = i.TIMEOUT_FAILURE, r.prototype.visitProposedToLocationWithAction = function (t, e) {\n          return this.controller.startVisitToLocationWithAction(t, e);\n        }, r.prototype.visitStarted = function (t) {\n          return t.issueRequest(), t.changeHistory(), t.loadCachedSnapshot();\n        }, r.prototype.visitRequestStarted = function (t) {\n          return this.progressBar.setValue(0), t.hasCachedSnapshot() || \"restore\" !== t.action ? this.showProgressBarAfterDelay() : this.showProgressBar();\n        }, r.prototype.visitRequestProgressed = function (t) {\n          return this.progressBar.setValue(t.progress);\n        }, r.prototype.visitRequestCompleted = function (t) {\n          return t.loadResponse();\n        }, r.prototype.visitRequestFailedWithStatusCode = function (t, e) {\n          switch (e) {\n            case n:\n            case o:\n              return this.reload();\n\n            default:\n              return t.loadResponse();\n          }\n        }, r.prototype.visitRequestFinished = function (t) {\n          return this.hideProgressBar();\n        }, r.prototype.visitCompleted = function (t) {\n          return t.followRedirect();\n        }, r.prototype.pageInvalidated = function () {\n          return this.reload();\n        }, r.prototype.showProgressBarAfterDelay = function () {\n          return this.progressBarTimeout = setTimeout(this.showProgressBar, this.controller.progressBarDelay);\n        }, r.prototype.showProgressBar = function () {\n          return this.progressBar.show();\n        }, r.prototype.hideProgressBar = function () {\n          return this.progressBar.hide(), clearTimeout(this.progressBarTimeout);\n        }, r.prototype.reload = function () {\n          return window.location.reload();\n        }, r;\n      }();\n    }.call(this), function () {\n      var t = function (t, e) {\n        return function () {\n          return t.apply(e, arguments);\n        };\n      };\n\n      e.History = function () {\n        function r(e) {\n          this.delegate = e, this.onPageLoad = t(this.onPageLoad, this), this.onPopState = t(this.onPopState, this);\n        }\n\n        return r.prototype.start = function () {\n          return this.started ? void 0 : (addEventListener(\"popstate\", this.onPopState, !1), addEventListener(\"load\", this.onPageLoad, !1), this.started = !0);\n        }, r.prototype.stop = function () {\n          return this.started ? (removeEventListener(\"popstate\", this.onPopState, !1), removeEventListener(\"load\", this.onPageLoad, !1), this.started = !1) : void 0;\n        }, r.prototype.push = function (t, r) {\n          return t = e.Location.wrap(t), this.update(\"push\", t, r);\n        }, r.prototype.replace = function (t, r) {\n          return t = e.Location.wrap(t), this.update(\"replace\", t, r);\n        }, r.prototype.onPopState = function (t) {\n          var r, n, o, i;\n          return this.shouldHandlePopState() && (i = null != (n = t.state) ? n.turbolinks : void 0) ? (r = e.Location.wrap(window.location), o = i.restorationIdentifier, this.delegate.historyPoppedToLocationWithRestorationIdentifier(r, o)) : void 0;\n        }, r.prototype.onPageLoad = function (t) {\n          return e.defer(function (t) {\n            return function () {\n              return t.pageLoaded = !0;\n            };\n          }(this));\n        }, r.prototype.shouldHandlePopState = function () {\n          return this.pageIsLoaded();\n        }, r.prototype.pageIsLoaded = function () {\n          return this.pageLoaded || \"complete\" === document.readyState;\n        }, r.prototype.update = function (t, e, r) {\n          var n;\n          return n = {\n            turbolinks: {\n              restorationIdentifier: r\n            }\n          }, history[t + \"State\"](n, null, e);\n        }, r;\n      }();\n    }.call(this), function () {\n      e.HeadDetails = function () {\n        function t(t) {\n          var e, r, n, s, a, u;\n\n          for (this.elements = {}, n = 0, a = t.length; a > n; n++) u = t[n], u.nodeType === Node.ELEMENT_NODE && (s = u.outerHTML, r = null != (e = this.elements)[s] ? e[s] : e[s] = {\n            type: i(u),\n            tracked: o(u),\n            elements: []\n          }, r.elements.push(u));\n        }\n\n        var e, r, n, o, i;\n        return t.fromHeadElement = function (t) {\n          var e;\n          return new this(null != (e = null != t ? t.childNodes : void 0) ? e : []);\n        }, t.prototype.hasElementWithKey = function (t) {\n          return t in this.elements;\n        }, t.prototype.getTrackedElementSignature = function () {\n          var t, e;\n          return function () {\n            var r, n;\n            r = this.elements, n = [];\n\n            for (t in r) e = r[t].tracked, e && n.push(t);\n\n            return n;\n          }.call(this).join(\"\");\n        }, t.prototype.getScriptElementsNotInDetails = function (t) {\n          return this.getElementsMatchingTypeNotInDetails(\"script\", t);\n        }, t.prototype.getStylesheetElementsNotInDetails = function (t) {\n          return this.getElementsMatchingTypeNotInDetails(\"stylesheet\", t);\n        }, t.prototype.getElementsMatchingTypeNotInDetails = function (t, e) {\n          var r, n, o, i, s, a;\n          o = this.elements, s = [];\n\n          for (n in o) i = o[n], a = i.type, r = i.elements, a !== t || e.hasElementWithKey(n) || s.push(r[0]);\n\n          return s;\n        }, t.prototype.getProvisionalElements = function () {\n          var t, e, r, n, o, i, s;\n          r = [], n = this.elements;\n\n          for (e in n) o = n[e], s = o.type, i = o.tracked, t = o.elements, null != s || i ? t.length > 1 && r.push.apply(r, t.slice(1)) : r.push.apply(r, t);\n\n          return r;\n        }, t.prototype.getMetaValue = function (t) {\n          var e;\n          return null != (e = this.findMetaElementByName(t)) ? e.getAttribute(\"content\") : void 0;\n        }, t.prototype.findMetaElementByName = function (t) {\n          var r, n, o, i;\n          r = void 0, i = this.elements;\n\n          for (o in i) n = i[o].elements, e(n[0], t) && (r = n[0]);\n\n          return r;\n        }, i = function (t) {\n          return r(t) ? \"script\" : n(t) ? \"stylesheet\" : void 0;\n        }, o = function (t) {\n          return \"reload\" === t.getAttribute(\"data-turbolinks-track\");\n        }, r = function (t) {\n          var e;\n          return e = t.tagName.toLowerCase(), \"script\" === e;\n        }, n = function (t) {\n          var e;\n          return e = t.tagName.toLowerCase(), \"style\" === e || \"link\" === e && \"stylesheet\" === t.getAttribute(\"rel\");\n        }, e = function (t, e) {\n          var r;\n          return r = t.tagName.toLowerCase(), \"meta\" === r && t.getAttribute(\"name\") === e;\n        }, t;\n      }();\n    }.call(this), function () {\n      e.Snapshot = function () {\n        function t(t, e) {\n          this.headDetails = t, this.bodyElement = e;\n        }\n\n        return t.wrap = function (t) {\n          return t instanceof this ? t : \"string\" == typeof t ? this.fromHTMLString(t) : this.fromHTMLElement(t);\n        }, t.fromHTMLString = function (t) {\n          var e;\n          return e = document.createElement(\"html\"), e.innerHTML = t, this.fromHTMLElement(e);\n        }, t.fromHTMLElement = function (t) {\n          var r, n, o, i;\n          return o = t.querySelector(\"head\"), r = null != (i = t.querySelector(\"body\")) ? i : document.createElement(\"body\"), n = e.HeadDetails.fromHeadElement(o), new this(n, r);\n        }, t.prototype.clone = function () {\n          return new this.constructor(this.headDetails, this.bodyElement.cloneNode(!0));\n        }, t.prototype.getRootLocation = function () {\n          var t, r;\n          return r = null != (t = this.getSetting(\"root\")) ? t : \"/\", new e.Location(r);\n        }, t.prototype.getCacheControlValue = function () {\n          return this.getSetting(\"cache-control\");\n        }, t.prototype.getElementForAnchor = function (t) {\n          try {\n            return this.bodyElement.querySelector(\"[id='\" + t + \"'], a[name='\" + t + \"']\");\n          } catch (e) {}\n        }, t.prototype.getPermanentElements = function () {\n          return this.bodyElement.querySelectorAll(\"[id][data-turbolinks-permanent]\");\n        }, t.prototype.getPermanentElementById = function (t) {\n          return this.bodyElement.querySelector(\"#\" + t + \"[data-turbolinks-permanent]\");\n        }, t.prototype.getPermanentElementsPresentInSnapshot = function (t) {\n          var e, r, n, o, i;\n\n          for (o = this.getPermanentElements(), i = [], r = 0, n = o.length; n > r; r++) e = o[r], t.getPermanentElementById(e.id) && i.push(e);\n\n          return i;\n        }, t.prototype.findFirstAutofocusableElement = function () {\n          return this.bodyElement.querySelector(\"[autofocus]\");\n        }, t.prototype.hasAnchor = function (t) {\n          return null != this.getElementForAnchor(t);\n        }, t.prototype.isPreviewable = function () {\n          return \"no-preview\" !== this.getCacheControlValue();\n        }, t.prototype.isCacheable = function () {\n          return \"no-cache\" !== this.getCacheControlValue();\n        }, t.prototype.isVisitable = function () {\n          return \"reload\" !== this.getSetting(\"visit-control\");\n        }, t.prototype.getSetting = function (t) {\n          return this.headDetails.getMetaValue(\"turbolinks-\" + t);\n        }, t;\n      }();\n    }.call(this), function () {\n      var t = [].slice;\n\n      e.Renderer = function () {\n        function e() {}\n\n        var r;\n        return e.render = function () {\n          var e, r, n, o;\n          return n = arguments[0], r = arguments[1], e = 3 <= arguments.length ? t.call(arguments, 2) : [], o = function (t, e, r) {\n            r.prototype = t.prototype;\n            var n = new r(),\n                o = t.apply(n, e);\n            return Object(o) === o ? o : n;\n          }(this, e, function () {}), o.delegate = n, o.render(r), o;\n        }, e.prototype.renderView = function (t) {\n          return this.delegate.viewWillRender(this.newBody), t(), this.delegate.viewRendered(this.newBody);\n        }, e.prototype.invalidateView = function () {\n          return this.delegate.viewInvalidated();\n        }, e.prototype.createScriptElement = function (t) {\n          var e;\n          return \"false\" === t.getAttribute(\"data-turbolinks-eval\") ? t : (e = document.createElement(\"script\"), e.textContent = t.textContent, e.async = !1, r(e, t), e);\n        }, r = function (t, e) {\n          var r, n, o, i, s, a, u;\n\n          for (i = e.attributes, a = [], r = 0, n = i.length; n > r; r++) s = i[r], o = s.name, u = s.value, a.push(t.setAttribute(o, u));\n\n          return a;\n        }, e;\n      }();\n    }.call(this), function () {\n      var t,\n          r,\n          n = function (t, e) {\n        function r() {\n          this.constructor = t;\n        }\n\n        for (var n in e) o.call(e, n) && (t[n] = e[n]);\n\n        return r.prototype = e.prototype, t.prototype = new r(), t.__super__ = e.prototype, t;\n      },\n          o = {}.hasOwnProperty;\n\n      e.SnapshotRenderer = function (e) {\n        function o(t, e, r) {\n          this.currentSnapshot = t, this.newSnapshot = e, this.isPreview = r, this.currentHeadDetails = this.currentSnapshot.headDetails, this.newHeadDetails = this.newSnapshot.headDetails, this.currentBody = this.currentSnapshot.bodyElement, this.newBody = this.newSnapshot.bodyElement;\n        }\n\n        return n(o, e), o.prototype.render = function (t) {\n          return this.shouldRender() ? (this.mergeHead(), this.renderView(function (e) {\n            return function () {\n              return e.replaceBody(), e.isPreview || e.focusFirstAutofocusableElement(), t();\n            };\n          }(this))) : this.invalidateView();\n        }, o.prototype.mergeHead = function () {\n          return this.copyNewHeadStylesheetElements(), this.copyNewHeadScriptElements(), this.removeCurrentHeadProvisionalElements(), this.copyNewHeadProvisionalElements();\n        }, o.prototype.replaceBody = function () {\n          var t;\n          return t = this.relocateCurrentBodyPermanentElements(), this.activateNewBodyScriptElements(), this.assignNewBody(), this.replacePlaceholderElementsWithClonedPermanentElements(t);\n        }, o.prototype.shouldRender = function () {\n          return this.newSnapshot.isVisitable() && this.trackedElementsAreIdentical();\n        }, o.prototype.trackedElementsAreIdentical = function () {\n          return this.currentHeadDetails.getTrackedElementSignature() === this.newHeadDetails.getTrackedElementSignature();\n        }, o.prototype.copyNewHeadStylesheetElements = function () {\n          var t, e, r, n, o;\n\n          for (n = this.getNewHeadStylesheetElements(), o = [], e = 0, r = n.length; r > e; e++) t = n[e], o.push(document.head.appendChild(t));\n\n          return o;\n        }, o.prototype.copyNewHeadScriptElements = function () {\n          var t, e, r, n, o;\n\n          for (n = this.getNewHeadScriptElements(), o = [], e = 0, r = n.length; r > e; e++) t = n[e], o.push(document.head.appendChild(this.createScriptElement(t)));\n\n          return o;\n        }, o.prototype.removeCurrentHeadProvisionalElements = function () {\n          var t, e, r, n, o;\n\n          for (n = this.getCurrentHeadProvisionalElements(), o = [], e = 0, r = n.length; r > e; e++) t = n[e], o.push(document.head.removeChild(t));\n\n          return o;\n        }, o.prototype.copyNewHeadProvisionalElements = function () {\n          var t, e, r, n, o;\n\n          for (n = this.getNewHeadProvisionalElements(), o = [], e = 0, r = n.length; r > e; e++) t = n[e], o.push(document.head.appendChild(t));\n\n          return o;\n        }, o.prototype.relocateCurrentBodyPermanentElements = function () {\n          var e, n, o, i, s, a, u;\n\n          for (a = this.getCurrentBodyPermanentElements(), u = [], e = 0, n = a.length; n > e; e++) i = a[e], s = t(i), o = this.newSnapshot.getPermanentElementById(i.id), r(i, s.element), r(o, i), u.push(s);\n\n          return u;\n        }, o.prototype.replacePlaceholderElementsWithClonedPermanentElements = function (t) {\n          var e, n, o, i, s, a, u;\n\n          for (u = [], o = 0, i = t.length; i > o; o++) a = t[o], n = a.element, s = a.permanentElement, e = s.cloneNode(!0), u.push(r(n, e));\n\n          return u;\n        }, o.prototype.activateNewBodyScriptElements = function () {\n          var t, e, n, o, i, s;\n\n          for (i = this.getNewBodyScriptElements(), s = [], e = 0, o = i.length; o > e; e++) n = i[e], t = this.createScriptElement(n), s.push(r(n, t));\n\n          return s;\n        }, o.prototype.assignNewBody = function () {\n          return document.body = this.newBody;\n        }, o.prototype.focusFirstAutofocusableElement = function () {\n          var t;\n          return null != (t = this.newSnapshot.findFirstAutofocusableElement()) ? t.focus() : void 0;\n        }, o.prototype.getNewHeadStylesheetElements = function () {\n          return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails);\n        }, o.prototype.getNewHeadScriptElements = function () {\n          return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails);\n        }, o.prototype.getCurrentHeadProvisionalElements = function () {\n          return this.currentHeadDetails.getProvisionalElements();\n        }, o.prototype.getNewHeadProvisionalElements = function () {\n          return this.newHeadDetails.getProvisionalElements();\n        }, o.prototype.getCurrentBodyPermanentElements = function () {\n          return this.currentSnapshot.getPermanentElementsPresentInSnapshot(this.newSnapshot);\n        }, o.prototype.getNewBodyScriptElements = function () {\n          return this.newBody.querySelectorAll(\"script\");\n        }, o;\n      }(e.Renderer), t = function (t) {\n        var e;\n        return e = document.createElement(\"meta\"), e.setAttribute(\"name\", \"turbolinks-permanent-placeholder\"), e.setAttribute(\"content\", t.id), {\n          element: e,\n          permanentElement: t\n        };\n      }, r = function (t, e) {\n        var r;\n        return (r = t.parentNode) ? r.replaceChild(e, t) : void 0;\n      };\n    }.call(this), function () {\n      var t = function (t, e) {\n        function n() {\n          this.constructor = t;\n        }\n\n        for (var o in e) r.call(e, o) && (t[o] = e[o]);\n\n        return n.prototype = e.prototype, t.prototype = new n(), t.__super__ = e.prototype, t;\n      },\n          r = {}.hasOwnProperty;\n\n      e.ErrorRenderer = function (e) {\n        function r(t) {\n          var e;\n          e = document.createElement(\"html\"), e.innerHTML = t, this.newHead = e.querySelector(\"head\"), this.newBody = e.querySelector(\"body\");\n        }\n\n        return t(r, e), r.prototype.render = function (t) {\n          return this.renderView(function (e) {\n            return function () {\n              return e.replaceHeadAndBody(), e.activateBodyScriptElements(), t();\n            };\n          }(this));\n        }, r.prototype.replaceHeadAndBody = function () {\n          var t, e;\n          return e = document.head, t = document.body, e.parentNode.replaceChild(this.newHead, e), t.parentNode.replaceChild(this.newBody, t);\n        }, r.prototype.activateBodyScriptElements = function () {\n          var t, e, r, n, o, i;\n\n          for (n = this.getScriptElements(), i = [], e = 0, r = n.length; r > e; e++) o = n[e], t = this.createScriptElement(o), i.push(o.parentNode.replaceChild(t, o));\n\n          return i;\n        }, r.prototype.getScriptElements = function () {\n          return document.documentElement.querySelectorAll(\"script\");\n        }, r;\n      }(e.Renderer);\n    }.call(this), function () {\n      e.View = function () {\n        function t(t) {\n          this.delegate = t, this.htmlElement = document.documentElement;\n        }\n\n        return t.prototype.getRootLocation = function () {\n          return this.getSnapshot().getRootLocation();\n        }, t.prototype.getElementForAnchor = function (t) {\n          return this.getSnapshot().getElementForAnchor(t);\n        }, t.prototype.getSnapshot = function () {\n          return e.Snapshot.fromHTMLElement(this.htmlElement);\n        }, t.prototype.render = function (t, e) {\n          var r, n, o;\n          return o = t.snapshot, r = t.error, n = t.isPreview, this.markAsPreview(n), null != o ? this.renderSnapshot(o, n, e) : this.renderError(r, e);\n        }, t.prototype.markAsPreview = function (t) {\n          return t ? this.htmlElement.setAttribute(\"data-turbolinks-preview\", \"\") : this.htmlElement.removeAttribute(\"data-turbolinks-preview\");\n        }, t.prototype.renderSnapshot = function (t, r, n) {\n          return e.SnapshotRenderer.render(this.delegate, n, this.getSnapshot(), e.Snapshot.wrap(t), r);\n        }, t.prototype.renderError = function (t, r) {\n          return e.ErrorRenderer.render(this.delegate, r, t);\n        }, t;\n      }();\n    }.call(this), function () {\n      var t = function (t, e) {\n        return function () {\n          return t.apply(e, arguments);\n        };\n      };\n\n      e.ScrollManager = function () {\n        function r(r) {\n          this.delegate = r, this.onScroll = t(this.onScroll, this), this.onScroll = e.throttle(this.onScroll);\n        }\n\n        return r.prototype.start = function () {\n          return this.started ? void 0 : (addEventListener(\"scroll\", this.onScroll, !1), this.onScroll(), this.started = !0);\n        }, r.prototype.stop = function () {\n          return this.started ? (removeEventListener(\"scroll\", this.onScroll, !1), this.started = !1) : void 0;\n        }, r.prototype.scrollToElement = function (t) {\n          return t.scrollIntoView();\n        }, r.prototype.scrollToPosition = function (t) {\n          var e, r;\n          return e = t.x, r = t.y, window.scrollTo(e, r);\n        }, r.prototype.onScroll = function (t) {\n          return this.updatePosition({\n            x: window.pageXOffset,\n            y: window.pageYOffset\n          });\n        }, r.prototype.updatePosition = function (t) {\n          var e;\n          return this.position = t, null != (e = this.delegate) ? e.scrollPositionChanged(this.position) : void 0;\n        }, r;\n      }();\n    }.call(this), function () {\n      e.SnapshotCache = function () {\n        function t(t) {\n          this.size = t, this.keys = [], this.snapshots = {};\n        }\n\n        var r;\n        return t.prototype.has = function (t) {\n          var e;\n          return e = r(t), e in this.snapshots;\n        }, t.prototype.get = function (t) {\n          var e;\n          if (this.has(t)) return e = this.read(t), this.touch(t), e;\n        }, t.prototype.put = function (t, e) {\n          return this.write(t, e), this.touch(t), e;\n        }, t.prototype.read = function (t) {\n          var e;\n          return e = r(t), this.snapshots[e];\n        }, t.prototype.write = function (t, e) {\n          var n;\n          return n = r(t), this.snapshots[n] = e;\n        }, t.prototype.touch = function (t) {\n          var e, n;\n          return n = r(t), e = this.keys.indexOf(n), e > -1 && this.keys.splice(e, 1), this.keys.unshift(n), this.trim();\n        }, t.prototype.trim = function () {\n          var t, e, r, n, o;\n\n          for (n = this.keys.splice(this.size), o = [], t = 0, r = n.length; r > t; t++) e = n[t], o.push(delete this.snapshots[e]);\n\n          return o;\n        }, r = function (t) {\n          return e.Location.wrap(t).toCacheKey();\n        }, t;\n      }();\n    }.call(this), function () {\n      var t = function (t, e) {\n        return function () {\n          return t.apply(e, arguments);\n        };\n      };\n\n      e.Visit = function () {\n        function r(r, n, o) {\n          this.controller = r, this.action = o, this.performScroll = t(this.performScroll, this), this.identifier = e.uuid(), this.location = e.Location.wrap(n), this.adapter = this.controller.adapter, this.state = \"initialized\", this.timingMetrics = {};\n        }\n\n        var n;\n        return r.prototype.start = function () {\n          return \"initialized\" === this.state ? (this.recordTimingMetric(\"visitStart\"), this.state = \"started\", this.adapter.visitStarted(this)) : void 0;\n        }, r.prototype.cancel = function () {\n          var t;\n          return \"started\" === this.state ? (null != (t = this.request) && t.cancel(), this.cancelRender(), this.state = \"canceled\") : void 0;\n        }, r.prototype.complete = function () {\n          var t;\n          return \"started\" === this.state ? (this.recordTimingMetric(\"visitEnd\"), this.state = \"completed\", \"function\" == typeof (t = this.adapter).visitCompleted && t.visitCompleted(this), this.controller.visitCompleted(this)) : void 0;\n        }, r.prototype.fail = function () {\n          var t;\n          return \"started\" === this.state ? (this.state = \"failed\", \"function\" == typeof (t = this.adapter).visitFailed ? t.visitFailed(this) : void 0) : void 0;\n        }, r.prototype.changeHistory = function () {\n          var t, e;\n          return this.historyChanged ? void 0 : (t = this.location.isEqualTo(this.referrer) ? \"replace\" : this.action, e = n(t), this.controller[e](this.location, this.restorationIdentifier), this.historyChanged = !0);\n        }, r.prototype.issueRequest = function () {\n          return this.shouldIssueRequest() && null == this.request ? (this.progress = 0, this.request = new e.HttpRequest(this, this.location, this.referrer), this.request.send()) : void 0;\n        }, r.prototype.getCachedSnapshot = function () {\n          var t;\n          return !(t = this.controller.getCachedSnapshotForLocation(this.location)) || null != this.location.anchor && !t.hasAnchor(this.location.anchor) || \"restore\" !== this.action && !t.isPreviewable() ? void 0 : t;\n        }, r.prototype.hasCachedSnapshot = function () {\n          return null != this.getCachedSnapshot();\n        }, r.prototype.loadCachedSnapshot = function () {\n          var t, e;\n          return (e = this.getCachedSnapshot()) ? (t = this.shouldIssueRequest(), this.render(function () {\n            var r;\n            return this.cacheSnapshot(), this.controller.render({\n              snapshot: e,\n              isPreview: t\n            }, this.performScroll), \"function\" == typeof (r = this.adapter).visitRendered && r.visitRendered(this), t ? void 0 : this.complete();\n          })) : void 0;\n        }, r.prototype.loadResponse = function () {\n          return null != this.response ? this.render(function () {\n            var t, e;\n            return this.cacheSnapshot(), this.request.failed ? (this.controller.render({\n              error: this.response\n            }, this.performScroll), \"function\" == typeof (t = this.adapter).visitRendered && t.visitRendered(this), this.fail()) : (this.controller.render({\n              snapshot: this.response\n            }, this.performScroll), \"function\" == typeof (e = this.adapter).visitRendered && e.visitRendered(this), this.complete());\n          }) : void 0;\n        }, r.prototype.followRedirect = function () {\n          return this.redirectedToLocation && !this.followedRedirect ? (this.location = this.redirectedToLocation, this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation, this.restorationIdentifier), this.followedRedirect = !0) : void 0;\n        }, r.prototype.requestStarted = function () {\n          var t;\n          return this.recordTimingMetric(\"requestStart\"), \"function\" == typeof (t = this.adapter).visitRequestStarted ? t.visitRequestStarted(this) : void 0;\n        }, r.prototype.requestProgressed = function (t) {\n          var e;\n          return this.progress = t, \"function\" == typeof (e = this.adapter).visitRequestProgressed ? e.visitRequestProgressed(this) : void 0;\n        }, r.prototype.requestCompletedWithResponse = function (t, r) {\n          return this.response = t, null != r && (this.redirectedToLocation = e.Location.wrap(r)), this.adapter.visitRequestCompleted(this);\n        }, r.prototype.requestFailedWithStatusCode = function (t, e) {\n          return this.response = e, this.adapter.visitRequestFailedWithStatusCode(this, t);\n        }, r.prototype.requestFinished = function () {\n          var t;\n          return this.recordTimingMetric(\"requestEnd\"), \"function\" == typeof (t = this.adapter).visitRequestFinished ? t.visitRequestFinished(this) : void 0;\n        }, r.prototype.performScroll = function () {\n          return this.scrolled ? void 0 : (\"restore\" === this.action ? this.scrollToRestoredPosition() || this.scrollToTop() : this.scrollToAnchor() || this.scrollToTop(), this.scrolled = !0);\n        }, r.prototype.scrollToRestoredPosition = function () {\n          var t, e;\n          return t = null != (e = this.restorationData) ? e.scrollPosition : void 0, null != t ? (this.controller.scrollToPosition(t), !0) : void 0;\n        }, r.prototype.scrollToAnchor = function () {\n          return null != this.location.anchor ? (this.controller.scrollToAnchor(this.location.anchor), !0) : void 0;\n        }, r.prototype.scrollToTop = function () {\n          return this.controller.scrollToPosition({\n            x: 0,\n            y: 0\n          });\n        }, r.prototype.recordTimingMetric = function (t) {\n          var e;\n          return null != (e = this.timingMetrics)[t] ? e[t] : e[t] = new Date().getTime();\n        }, r.prototype.getTimingMetrics = function () {\n          return e.copyObject(this.timingMetrics);\n        }, n = function (t) {\n          switch (t) {\n            case \"replace\":\n              return \"replaceHistoryWithLocationAndRestorationIdentifier\";\n\n            case \"advance\":\n            case \"restore\":\n              return \"pushHistoryWithLocationAndRestorationIdentifier\";\n          }\n        }, r.prototype.shouldIssueRequest = function () {\n          return \"restore\" === this.action ? !this.hasCachedSnapshot() : !0;\n        }, r.prototype.cacheSnapshot = function () {\n          return this.snapshotCached ? void 0 : (this.controller.cacheSnapshot(), this.snapshotCached = !0);\n        }, r.prototype.render = function (t) {\n          return this.cancelRender(), this.frame = requestAnimationFrame(function (e) {\n            return function () {\n              return e.frame = null, t.call(e);\n            };\n          }(this));\n        }, r.prototype.cancelRender = function () {\n          return this.frame ? cancelAnimationFrame(this.frame) : void 0;\n        }, r;\n      }();\n    }.call(this), function () {\n      var t = function (t, e) {\n        return function () {\n          return t.apply(e, arguments);\n        };\n      };\n\n      e.Controller = function () {\n        function r() {\n          this.clickBubbled = t(this.clickBubbled, this), this.clickCaptured = t(this.clickCaptured, this), this.pageLoaded = t(this.pageLoaded, this), this.history = new e.History(this), this.view = new e.View(this), this.scrollManager = new e.ScrollManager(this), this.restorationData = {}, this.clearCache(), this.setProgressBarDelay(500);\n        }\n\n        return r.prototype.start = function () {\n          return e.supported && !this.started ? (addEventListener(\"click\", this.clickCaptured, !0), addEventListener(\"DOMContentLoaded\", this.pageLoaded, !1), this.scrollManager.start(), this.startHistory(), this.started = !0, this.enabled = !0) : void 0;\n        }, r.prototype.disable = function () {\n          return this.enabled = !1;\n        }, r.prototype.stop = function () {\n          return this.started ? (removeEventListener(\"click\", this.clickCaptured, !0), removeEventListener(\"DOMContentLoaded\", this.pageLoaded, !1), this.scrollManager.stop(), this.stopHistory(), this.started = !1) : void 0;\n        }, r.prototype.clearCache = function () {\n          return this.cache = new e.SnapshotCache(10);\n        }, r.prototype.visit = function (t, r) {\n          var n, o;\n          return null == r && (r = {}), t = e.Location.wrap(t), this.applicationAllowsVisitingLocation(t) ? this.locationIsVisitable(t) ? (n = null != (o = r.action) ? o : \"advance\", this.adapter.visitProposedToLocationWithAction(t, n)) : window.location = t : void 0;\n        }, r.prototype.startVisitToLocationWithAction = function (t, r, n) {\n          var o;\n          return e.supported ? (o = this.getRestorationDataForIdentifier(n), this.startVisit(t, r, {\n            restorationData: o\n          })) : window.location = t;\n        }, r.prototype.setProgressBarDelay = function (t) {\n          return this.progressBarDelay = t;\n        }, r.prototype.startHistory = function () {\n          return this.location = e.Location.wrap(window.location), this.restorationIdentifier = e.uuid(), this.history.start(), this.history.replace(this.location, this.restorationIdentifier);\n        }, r.prototype.stopHistory = function () {\n          return this.history.stop();\n        }, r.prototype.pushHistoryWithLocationAndRestorationIdentifier = function (t, r) {\n          return this.restorationIdentifier = r, this.location = e.Location.wrap(t), this.history.push(this.location, this.restorationIdentifier);\n        }, r.prototype.replaceHistoryWithLocationAndRestorationIdentifier = function (t, r) {\n          return this.restorationIdentifier = r, this.location = e.Location.wrap(t), this.history.replace(this.location, this.restorationIdentifier);\n        }, r.prototype.historyPoppedToLocationWithRestorationIdentifier = function (t, r) {\n          var n;\n          return this.restorationIdentifier = r, this.enabled ? (n = this.getRestorationDataForIdentifier(this.restorationIdentifier), this.startVisit(t, \"restore\", {\n            restorationIdentifier: this.restorationIdentifier,\n            restorationData: n,\n            historyChanged: !0\n          }), this.location = e.Location.wrap(t)) : this.adapter.pageInvalidated();\n        }, r.prototype.getCachedSnapshotForLocation = function (t) {\n          var e;\n          return null != (e = this.cache.get(t)) ? e.clone() : void 0;\n        }, r.prototype.shouldCacheSnapshot = function () {\n          return this.view.getSnapshot().isCacheable();\n        }, r.prototype.cacheSnapshot = function () {\n          var t, r;\n          return this.shouldCacheSnapshot() ? (this.notifyApplicationBeforeCachingSnapshot(), r = this.view.getSnapshot(), t = this.lastRenderedLocation, e.defer(function (e) {\n            return function () {\n              return e.cache.put(t, r.clone());\n            };\n          }(this))) : void 0;\n        }, r.prototype.scrollToAnchor = function (t) {\n          var e;\n          return (e = this.view.getElementForAnchor(t)) ? this.scrollToElement(e) : this.scrollToPosition({\n            x: 0,\n            y: 0\n          });\n        }, r.prototype.scrollToElement = function (t) {\n          return this.scrollManager.scrollToElement(t);\n        }, r.prototype.scrollToPosition = function (t) {\n          return this.scrollManager.scrollToPosition(t);\n        }, r.prototype.scrollPositionChanged = function (t) {\n          var e;\n          return e = this.getCurrentRestorationData(), e.scrollPosition = t;\n        }, r.prototype.render = function (t, e) {\n          return this.view.render(t, e);\n        }, r.prototype.viewInvalidated = function () {\n          return this.adapter.pageInvalidated();\n        }, r.prototype.viewWillRender = function (t) {\n          return this.notifyApplicationBeforeRender(t);\n        }, r.prototype.viewRendered = function () {\n          return this.lastRenderedLocation = this.currentVisit.location, this.notifyApplicationAfterRender();\n        }, r.prototype.pageLoaded = function () {\n          return this.lastRenderedLocation = this.location, this.notifyApplicationAfterPageLoad();\n        }, r.prototype.clickCaptured = function () {\n          return removeEventListener(\"click\", this.clickBubbled, !1), addEventListener(\"click\", this.clickBubbled, !1);\n        }, r.prototype.clickBubbled = function (t) {\n          var e, r, n;\n          return this.enabled && this.clickEventIsSignificant(t) && (r = this.getVisitableLinkForNode(t.target)) && (n = this.getVisitableLocationForLink(r)) && this.applicationAllowsFollowingLinkToLocation(r, n) ? (t.preventDefault(), e = this.getActionForLink(r), this.visit(n, {\n            action: e\n          })) : void 0;\n        }, r.prototype.applicationAllowsFollowingLinkToLocation = function (t, e) {\n          var r;\n          return r = this.notifyApplicationAfterClickingLinkToLocation(t, e), !r.defaultPrevented;\n        }, r.prototype.applicationAllowsVisitingLocation = function (t) {\n          var e;\n          return e = this.notifyApplicationBeforeVisitingLocation(t), !e.defaultPrevented;\n        }, r.prototype.notifyApplicationAfterClickingLinkToLocation = function (t, r) {\n          return e.dispatch(\"turbolinks:click\", {\n            target: t,\n            data: {\n              url: r.absoluteURL\n            },\n            cancelable: !0\n          });\n        }, r.prototype.notifyApplicationBeforeVisitingLocation = function (t) {\n          return e.dispatch(\"turbolinks:before-visit\", {\n            data: {\n              url: t.absoluteURL\n            },\n            cancelable: !0\n          });\n        }, r.prototype.notifyApplicationAfterVisitingLocation = function (t) {\n          return e.dispatch(\"turbolinks:visit\", {\n            data: {\n              url: t.absoluteURL\n            }\n          });\n        }, r.prototype.notifyApplicationBeforeCachingSnapshot = function () {\n          return e.dispatch(\"turbolinks:before-cache\");\n        }, r.prototype.notifyApplicationBeforeRender = function (t) {\n          return e.dispatch(\"turbolinks:before-render\", {\n            data: {\n              newBody: t\n            }\n          });\n        }, r.prototype.notifyApplicationAfterRender = function () {\n          return e.dispatch(\"turbolinks:render\");\n        }, r.prototype.notifyApplicationAfterPageLoad = function (t) {\n          return null == t && (t = {}), e.dispatch(\"turbolinks:load\", {\n            data: {\n              url: this.location.absoluteURL,\n              timing: t\n            }\n          });\n        }, r.prototype.startVisit = function (t, e, r) {\n          var n;\n          return null != (n = this.currentVisit) && n.cancel(), this.currentVisit = this.createVisit(t, e, r), this.currentVisit.start(), this.notifyApplicationAfterVisitingLocation(t);\n        }, r.prototype.createVisit = function (t, r, n) {\n          var o, i, s, a, u;\n          return i = null != n ? n : {}, a = i.restorationIdentifier, s = i.restorationData, o = i.historyChanged, u = new e.Visit(this, t, r), u.restorationIdentifier = null != a ? a : e.uuid(), u.restorationData = e.copyObject(s), u.historyChanged = o, u.referrer = this.location, u;\n        }, r.prototype.visitCompleted = function (t) {\n          return this.notifyApplicationAfterPageLoad(t.getTimingMetrics());\n        }, r.prototype.clickEventIsSignificant = function (t) {\n          return !(t.defaultPrevented || t.target.isContentEditable || t.which > 1 || t.altKey || t.ctrlKey || t.metaKey || t.shiftKey);\n        }, r.prototype.getVisitableLinkForNode = function (t) {\n          return this.nodeIsVisitable(t) ? e.closest(t, \"a[href]:not([target]):not([download])\") : void 0;\n        }, r.prototype.getVisitableLocationForLink = function (t) {\n          var r;\n          return r = new e.Location(t.getAttribute(\"href\")), this.locationIsVisitable(r) ? r : void 0;\n        }, r.prototype.getActionForLink = function (t) {\n          var e;\n          return null != (e = t.getAttribute(\"data-turbolinks-action\")) ? e : \"advance\";\n        }, r.prototype.nodeIsVisitable = function (t) {\n          var r;\n          return (r = e.closest(t, \"[data-turbolinks]\")) ? \"false\" !== r.getAttribute(\"data-turbolinks\") : !0;\n        }, r.prototype.locationIsVisitable = function (t) {\n          return t.isPrefixedBy(this.view.getRootLocation()) && t.isHTML();\n        }, r.prototype.getCurrentRestorationData = function () {\n          return this.getRestorationDataForIdentifier(this.restorationIdentifier);\n        }, r.prototype.getRestorationDataForIdentifier = function (t) {\n          var e;\n          return null != (e = this.restorationData)[t] ? e[t] : e[t] = {};\n        }, r;\n      }();\n    }.call(this), function () {\n      !function () {\n        var t, e;\n        if ((t = e = document.currentScript) && !e.hasAttribute(\"data-turbolinks-suppress-warning\")) for (; t = t.parentNode;) if (t === document.body) return console.warn(\"You are loading Turbolinks from a <script> element inside the <body> element. This is probably not what you meant to do!\\n\\nLoad your application\\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\\n\\nFor more information, see: https://github.com/turbolinks/turbolinks#working-with-script-elements\\n\\n\\u2014\\u2014\\nSuppress this warning by adding a `data-turbolinks-suppress-warning` attribute to: %s\", e.outerHTML);\n      }();\n    }.call(this), function () {\n      var t, r, n;\n      e.start = function () {\n        return r() ? (null == e.controller && (e.controller = t()), e.controller.start()) : void 0;\n      }, r = function () {\n        return null == window.Turbolinks && (window.Turbolinks = e), n();\n      }, t = function () {\n        var t;\n        return t = new e.Controller(), t.adapter = new e.BrowserAdapter(t), t;\n      }, n = function () {\n        return window.Turbolinks === e;\n      }, n() && e.start();\n    }.call(this);\n  }).call(this), \"object\" == typeof module && module.exports ? module.exports = e : \"function\" == typeof define && define.amd && define(e);\n}).call(this);","(function (global, factory) {\n  typeof exports === \"object\" && typeof module !== \"undefined\" ? factory(exports) : typeof define === \"function\" && define.amd ? define([\"exports\"], factory) : factory(global.ActiveStorage = {});\n})(this, function (exports) {\n  \"use strict\";\n\n  function createCommonjsModule(fn, module) {\n    return module = {\n      exports: {}\n    }, fn(module, module.exports), module.exports;\n  }\n\n  var sparkMd5 = createCommonjsModule(function (module, exports) {\n    (function (factory) {\n      {\n        module.exports = factory();\n      }\n    })(function (undefined) {\n      var hex_chr = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\n\n      function md5cycle(x, k) {\n        var a = x[0],\n            b = x[1],\n            c = x[2],\n            d = x[3];\n        a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n        a = (a << 7 | a >>> 25) + b | 0;\n        d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n        d = (d << 12 | d >>> 20) + a | 0;\n        c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n        c = (c << 17 | c >>> 15) + d | 0;\n        b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n        b = (b << 22 | b >>> 10) + c | 0;\n        a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n        a = (a << 7 | a >>> 25) + b | 0;\n        d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n        d = (d << 12 | d >>> 20) + a | 0;\n        c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n        c = (c << 17 | c >>> 15) + d | 0;\n        b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n        b = (b << 22 | b >>> 10) + c | 0;\n        a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n        a = (a << 7 | a >>> 25) + b | 0;\n        d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n        d = (d << 12 | d >>> 20) + a | 0;\n        c += (d & a | ~d & b) + k[10] - 42063 | 0;\n        c = (c << 17 | c >>> 15) + d | 0;\n        b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n        b = (b << 22 | b >>> 10) + c | 0;\n        a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n        a = (a << 7 | a >>> 25) + b | 0;\n        d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n        d = (d << 12 | d >>> 20) + a | 0;\n        c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n        c = (c << 17 | c >>> 15) + d | 0;\n        b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n        b = (b << 22 | b >>> 10) + c | 0;\n        a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n        a = (a << 5 | a >>> 27) + b | 0;\n        d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n        d = (d << 9 | d >>> 23) + a | 0;\n        c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n        c = (c << 14 | c >>> 18) + d | 0;\n        b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n        b = (b << 20 | b >>> 12) + c | 0;\n        a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n        a = (a << 5 | a >>> 27) + b | 0;\n        d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n        d = (d << 9 | d >>> 23) + a | 0;\n        c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n        c = (c << 14 | c >>> 18) + d | 0;\n        b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n        b = (b << 20 | b >>> 12) + c | 0;\n        a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n        a = (a << 5 | a >>> 27) + b | 0;\n        d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n        d = (d << 9 | d >>> 23) + a | 0;\n        c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n        c = (c << 14 | c >>> 18) + d | 0;\n        b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n        b = (b << 20 | b >>> 12) + c | 0;\n        a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n        a = (a << 5 | a >>> 27) + b | 0;\n        d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n        d = (d << 9 | d >>> 23) + a | 0;\n        c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n        c = (c << 14 | c >>> 18) + d | 0;\n        b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n        b = (b << 20 | b >>> 12) + c | 0;\n        a += (b ^ c ^ d) + k[5] - 378558 | 0;\n        a = (a << 4 | a >>> 28) + b | 0;\n        d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n        d = (d << 11 | d >>> 21) + a | 0;\n        c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n        c = (c << 16 | c >>> 16) + d | 0;\n        b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n        b = (b << 23 | b >>> 9) + c | 0;\n        a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n        a = (a << 4 | a >>> 28) + b | 0;\n        d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n        d = (d << 11 | d >>> 21) + a | 0;\n        c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n        c = (c << 16 | c >>> 16) + d | 0;\n        b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n        b = (b << 23 | b >>> 9) + c | 0;\n        a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n        a = (a << 4 | a >>> 28) + b | 0;\n        d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n        d = (d << 11 | d >>> 21) + a | 0;\n        c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n        c = (c << 16 | c >>> 16) + d | 0;\n        b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n        b = (b << 23 | b >>> 9) + c | 0;\n        a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n        a = (a << 4 | a >>> 28) + b | 0;\n        d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n        d = (d << 11 | d >>> 21) + a | 0;\n        c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n        c = (c << 16 | c >>> 16) + d | 0;\n        b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n        b = (b << 23 | b >>> 9) + c | 0;\n        a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n        a = (a << 6 | a >>> 26) + b | 0;\n        d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n        d = (d << 10 | d >>> 22) + a | 0;\n        c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n        c = (c << 15 | c >>> 17) + d | 0;\n        b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n        b = (b << 21 | b >>> 11) + c | 0;\n        a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n        a = (a << 6 | a >>> 26) + b | 0;\n        d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n        d = (d << 10 | d >>> 22) + a | 0;\n        c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n        c = (c << 15 | c >>> 17) + d | 0;\n        b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n        b = (b << 21 | b >>> 11) + c | 0;\n        a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n        a = (a << 6 | a >>> 26) + b | 0;\n        d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n        d = (d << 10 | d >>> 22) + a | 0;\n        c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n        c = (c << 15 | c >>> 17) + d | 0;\n        b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n        b = (b << 21 | b >>> 11) + c | 0;\n        a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n        a = (a << 6 | a >>> 26) + b | 0;\n        d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n        d = (d << 10 | d >>> 22) + a | 0;\n        c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n        c = (c << 15 | c >>> 17) + d | 0;\n        b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n        b = (b << 21 | b >>> 11) + c | 0;\n        x[0] = a + x[0] | 0;\n        x[1] = b + x[1] | 0;\n        x[2] = c + x[2] | 0;\n        x[3] = d + x[3] | 0;\n      }\n\n      function md5blk(s) {\n        var md5blks = [],\n            i;\n\n        for (i = 0; i < 64; i += 4) {\n          md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n        }\n\n        return md5blks;\n      }\n\n      function md5blk_array(a) {\n        var md5blks = [],\n            i;\n\n        for (i = 0; i < 64; i += 4) {\n          md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n        }\n\n        return md5blks;\n      }\n\n      function md51(s) {\n        var n = s.length,\n            state = [1732584193, -271733879, -1732584194, 271733878],\n            i,\n            length,\n            tail,\n            tmp,\n            lo,\n            hi;\n\n        for (i = 64; i <= n; i += 64) {\n          md5cycle(state, md5blk(s.substring(i - 64, i)));\n        }\n\n        s = s.substring(i - 64);\n        length = s.length;\n        tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n\n        for (i = 0; i < length; i += 1) {\n          tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n        }\n\n        tail[i >> 2] |= 128 << (i % 4 << 3);\n\n        if (i > 55) {\n          md5cycle(state, tail);\n\n          for (i = 0; i < 16; i += 1) {\n            tail[i] = 0;\n          }\n        }\n\n        tmp = n * 8;\n        tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n        lo = parseInt(tmp[2], 16);\n        hi = parseInt(tmp[1], 16) || 0;\n        tail[14] = lo;\n        tail[15] = hi;\n        md5cycle(state, tail);\n        return state;\n      }\n\n      function md51_array(a) {\n        var n = a.length,\n            state = [1732584193, -271733879, -1732584194, 271733878],\n            i,\n            length,\n            tail,\n            tmp,\n            lo,\n            hi;\n\n        for (i = 64; i <= n; i += 64) {\n          md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n        }\n\n        a = i - 64 < n ? a.subarray(i - 64) : new Uint8Array(0);\n        length = a.length;\n        tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n\n        for (i = 0; i < length; i += 1) {\n          tail[i >> 2] |= a[i] << (i % 4 << 3);\n        }\n\n        tail[i >> 2] |= 128 << (i % 4 << 3);\n\n        if (i > 55) {\n          md5cycle(state, tail);\n\n          for (i = 0; i < 16; i += 1) {\n            tail[i] = 0;\n          }\n        }\n\n        tmp = n * 8;\n        tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n        lo = parseInt(tmp[2], 16);\n        hi = parseInt(tmp[1], 16) || 0;\n        tail[14] = lo;\n        tail[15] = hi;\n        md5cycle(state, tail);\n        return state;\n      }\n\n      function rhex(n) {\n        var s = \"\",\n            j;\n\n        for (j = 0; j < 4; j += 1) {\n          s += hex_chr[n >> j * 8 + 4 & 15] + hex_chr[n >> j * 8 & 15];\n        }\n\n        return s;\n      }\n\n      function hex(x) {\n        var i;\n\n        for (i = 0; i < x.length; i += 1) {\n          x[i] = rhex(x[i]);\n        }\n\n        return x.join(\"\");\n      }\n\n      if (hex(md51(\"hello\")) !== \"5d41402abc4b2a76b9719d911017c592\") ;\n\n      if (typeof ArrayBuffer !== \"undefined\" && !ArrayBuffer.prototype.slice) {\n        (function () {\n          function clamp(val, length) {\n            val = val | 0 || 0;\n\n            if (val < 0) {\n              return Math.max(val + length, 0);\n            }\n\n            return Math.min(val, length);\n          }\n\n          ArrayBuffer.prototype.slice = function (from, to) {\n            var length = this.byteLength,\n                begin = clamp(from, length),\n                end = length,\n                num,\n                target,\n                targetArray,\n                sourceArray;\n\n            if (to !== undefined) {\n              end = clamp(to, length);\n            }\n\n            if (begin > end) {\n              return new ArrayBuffer(0);\n            }\n\n            num = end - begin;\n            target = new ArrayBuffer(num);\n            targetArray = new Uint8Array(target);\n            sourceArray = new Uint8Array(this, begin, num);\n            targetArray.set(sourceArray);\n            return target;\n          };\n        })();\n      }\n\n      function toUtf8(str) {\n        if (/[\\u0080-\\uFFFF]/.test(str)) {\n          str = unescape(encodeURIComponent(str));\n        }\n\n        return str;\n      }\n\n      function utf8Str2ArrayBuffer(str, returnUInt8Array) {\n        var length = str.length,\n            buff = new ArrayBuffer(length),\n            arr = new Uint8Array(buff),\n            i;\n\n        for (i = 0; i < length; i += 1) {\n          arr[i] = str.charCodeAt(i);\n        }\n\n        return returnUInt8Array ? arr : buff;\n      }\n\n      function arrayBuffer2Utf8Str(buff) {\n        return String.fromCharCode.apply(null, new Uint8Array(buff));\n      }\n\n      function concatenateArrayBuffers(first, second, returnUInt8Array) {\n        var result = new Uint8Array(first.byteLength + second.byteLength);\n        result.set(new Uint8Array(first));\n        result.set(new Uint8Array(second), first.byteLength);\n        return returnUInt8Array ? result : result.buffer;\n      }\n\n      function hexToBinaryString(hex) {\n        var bytes = [],\n            length = hex.length,\n            x;\n\n        for (x = 0; x < length - 1; x += 2) {\n          bytes.push(parseInt(hex.substr(x, 2), 16));\n        }\n\n        return String.fromCharCode.apply(String, bytes);\n      }\n\n      function SparkMD5() {\n        this.reset();\n      }\n\n      SparkMD5.prototype.append = function (str) {\n        this.appendBinary(toUtf8(str));\n        return this;\n      };\n\n      SparkMD5.prototype.appendBinary = function (contents) {\n        this._buff += contents;\n        this._length += contents.length;\n        var length = this._buff.length,\n            i;\n\n        for (i = 64; i <= length; i += 64) {\n          md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));\n        }\n\n        this._buff = this._buff.substring(i - 64);\n        return this;\n      };\n\n      SparkMD5.prototype.end = function (raw) {\n        var buff = this._buff,\n            length = buff.length,\n            i,\n            tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n            ret;\n\n        for (i = 0; i < length; i += 1) {\n          tail[i >> 2] |= buff.charCodeAt(i) << (i % 4 << 3);\n        }\n\n        this._finish(tail, length);\n\n        ret = hex(this._hash);\n\n        if (raw) {\n          ret = hexToBinaryString(ret);\n        }\n\n        this.reset();\n        return ret;\n      };\n\n      SparkMD5.prototype.reset = function () {\n        this._buff = \"\";\n        this._length = 0;\n        this._hash = [1732584193, -271733879, -1732584194, 271733878];\n        return this;\n      };\n\n      SparkMD5.prototype.getState = function () {\n        return {\n          buff: this._buff,\n          length: this._length,\n          hash: this._hash\n        };\n      };\n\n      SparkMD5.prototype.setState = function (state) {\n        this._buff = state.buff;\n        this._length = state.length;\n        this._hash = state.hash;\n        return this;\n      };\n\n      SparkMD5.prototype.destroy = function () {\n        delete this._hash;\n        delete this._buff;\n        delete this._length;\n      };\n\n      SparkMD5.prototype._finish = function (tail, length) {\n        var i = length,\n            tmp,\n            lo,\n            hi;\n        tail[i >> 2] |= 128 << (i % 4 << 3);\n\n        if (i > 55) {\n          md5cycle(this._hash, tail);\n\n          for (i = 0; i < 16; i += 1) {\n            tail[i] = 0;\n          }\n        }\n\n        tmp = this._length * 8;\n        tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n        lo = parseInt(tmp[2], 16);\n        hi = parseInt(tmp[1], 16) || 0;\n        tail[14] = lo;\n        tail[15] = hi;\n        md5cycle(this._hash, tail);\n      };\n\n      SparkMD5.hash = function (str, raw) {\n        return SparkMD5.hashBinary(toUtf8(str), raw);\n      };\n\n      SparkMD5.hashBinary = function (content, raw) {\n        var hash = md51(content),\n            ret = hex(hash);\n        return raw ? hexToBinaryString(ret) : ret;\n      };\n\n      SparkMD5.ArrayBuffer = function () {\n        this.reset();\n      };\n\n      SparkMD5.ArrayBuffer.prototype.append = function (arr) {\n        var buff = concatenateArrayBuffers(this._buff.buffer, arr, true),\n            length = buff.length,\n            i;\n        this._length += arr.byteLength;\n\n        for (i = 64; i <= length; i += 64) {\n          md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));\n        }\n\n        this._buff = i - 64 < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);\n        return this;\n      };\n\n      SparkMD5.ArrayBuffer.prototype.end = function (raw) {\n        var buff = this._buff,\n            length = buff.length,\n            tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n            i,\n            ret;\n\n        for (i = 0; i < length; i += 1) {\n          tail[i >> 2] |= buff[i] << (i % 4 << 3);\n        }\n\n        this._finish(tail, length);\n\n        ret = hex(this._hash);\n\n        if (raw) {\n          ret = hexToBinaryString(ret);\n        }\n\n        this.reset();\n        return ret;\n      };\n\n      SparkMD5.ArrayBuffer.prototype.reset = function () {\n        this._buff = new Uint8Array(0);\n        this._length = 0;\n        this._hash = [1732584193, -271733879, -1732584194, 271733878];\n        return this;\n      };\n\n      SparkMD5.ArrayBuffer.prototype.getState = function () {\n        var state = SparkMD5.prototype.getState.call(this);\n        state.buff = arrayBuffer2Utf8Str(state.buff);\n        return state;\n      };\n\n      SparkMD5.ArrayBuffer.prototype.setState = function (state) {\n        state.buff = utf8Str2ArrayBuffer(state.buff, true);\n        return SparkMD5.prototype.setState.call(this, state);\n      };\n\n      SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n      SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n\n      SparkMD5.ArrayBuffer.hash = function (arr, raw) {\n        var hash = md51_array(new Uint8Array(arr)),\n            ret = hex(hash);\n        return raw ? hexToBinaryString(ret) : ret;\n      };\n\n      return SparkMD5;\n    });\n  });\n\n  var classCallCheck = function (instance, Constructor) {\n    if (!(instance instanceof Constructor)) {\n      throw new TypeError(\"Cannot call a class as a function\");\n    }\n  };\n\n  var createClass = function () {\n    function defineProperties(target, props) {\n      for (var i = 0; i < props.length; i++) {\n        var descriptor = props[i];\n        descriptor.enumerable = descriptor.enumerable || false;\n        descriptor.configurable = true;\n        if (\"value\" in descriptor) descriptor.writable = true;\n        Object.defineProperty(target, descriptor.key, descriptor);\n      }\n    }\n\n    return function (Constructor, protoProps, staticProps) {\n      if (protoProps) defineProperties(Constructor.prototype, protoProps);\n      if (staticProps) defineProperties(Constructor, staticProps);\n      return Constructor;\n    };\n  }();\n\n  var fileSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;\n\n  var FileChecksum = function () {\n    createClass(FileChecksum, null, [{\n      key: \"create\",\n      value: function create(file, callback) {\n        var instance = new FileChecksum(file);\n        instance.create(callback);\n      }\n    }]);\n\n    function FileChecksum(file) {\n      classCallCheck(this, FileChecksum);\n      this.file = file;\n      this.chunkSize = 2097152;\n      this.chunkCount = Math.ceil(this.file.size / this.chunkSize);\n      this.chunkIndex = 0;\n    }\n\n    createClass(FileChecksum, [{\n      key: \"create\",\n      value: function create(callback) {\n        var _this = this;\n\n        this.callback = callback;\n        this.md5Buffer = new sparkMd5.ArrayBuffer();\n        this.fileReader = new FileReader();\n        this.fileReader.addEventListener(\"load\", function (event) {\n          return _this.fileReaderDidLoad(event);\n        });\n        this.fileReader.addEventListener(\"error\", function (event) {\n          return _this.fileReaderDidError(event);\n        });\n        this.readNextChunk();\n      }\n    }, {\n      key: \"fileReaderDidLoad\",\n      value: function fileReaderDidLoad(event) {\n        this.md5Buffer.append(event.target.result);\n\n        if (!this.readNextChunk()) {\n          var binaryDigest = this.md5Buffer.end(true);\n          var base64digest = btoa(binaryDigest);\n          this.callback(null, base64digest);\n        }\n      }\n    }, {\n      key: \"fileReaderDidError\",\n      value: function fileReaderDidError(event) {\n        this.callback(\"Error reading \" + this.file.name);\n      }\n    }, {\n      key: \"readNextChunk\",\n      value: function readNextChunk() {\n        if (this.chunkIndex < this.chunkCount || this.chunkIndex == 0 && this.chunkCount == 0) {\n          var start = this.chunkIndex * this.chunkSize;\n          var end = Math.min(start + this.chunkSize, this.file.size);\n          var bytes = fileSlice.call(this.file, start, end);\n          this.fileReader.readAsArrayBuffer(bytes);\n          this.chunkIndex++;\n          return true;\n        } else {\n          return false;\n        }\n      }\n    }]);\n    return FileChecksum;\n  }();\n\n  function getMetaValue(name) {\n    var element = findElement(document.head, 'meta[name=\"' + name + '\"]');\n\n    if (element) {\n      return element.getAttribute(\"content\");\n    }\n  }\n\n  function findElements(root, selector) {\n    if (typeof root == \"string\") {\n      selector = root;\n      root = document;\n    }\n\n    var elements = root.querySelectorAll(selector);\n    return toArray$1(elements);\n  }\n\n  function findElement(root, selector) {\n    if (typeof root == \"string\") {\n      selector = root;\n      root = document;\n    }\n\n    return root.querySelector(selector);\n  }\n\n  function dispatchEvent(element, type) {\n    var eventInit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    var disabled = element.disabled;\n    var bubbles = eventInit.bubbles,\n        cancelable = eventInit.cancelable,\n        detail = eventInit.detail;\n    var event = document.createEvent(\"Event\");\n    event.initEvent(type, bubbles || true, cancelable || true);\n    event.detail = detail || {};\n\n    try {\n      element.disabled = false;\n      element.dispatchEvent(event);\n    } finally {\n      element.disabled = disabled;\n    }\n\n    return event;\n  }\n\n  function toArray$1(value) {\n    if (Array.isArray(value)) {\n      return value;\n    } else if (Array.from) {\n      return Array.from(value);\n    } else {\n      return [].slice.call(value);\n    }\n  }\n\n  var BlobRecord = function () {\n    function BlobRecord(file, checksum, url) {\n      var _this = this;\n\n      classCallCheck(this, BlobRecord);\n      this.file = file;\n      this.attributes = {\n        filename: file.name,\n        content_type: file.type || \"application/octet-stream\",\n        byte_size: file.size,\n        checksum: checksum\n      };\n      this.xhr = new XMLHttpRequest();\n      this.xhr.open(\"POST\", url, true);\n      this.xhr.responseType = \"json\";\n      this.xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n      this.xhr.setRequestHeader(\"Accept\", \"application/json\");\n      this.xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n      var csrfToken = getMetaValue(\"csrf-token\");\n\n      if (csrfToken != undefined) {\n        this.xhr.setRequestHeader(\"X-CSRF-Token\", csrfToken);\n      }\n\n      this.xhr.addEventListener(\"load\", function (event) {\n        return _this.requestDidLoad(event);\n      });\n      this.xhr.addEventListener(\"error\", function (event) {\n        return _this.requestDidError(event);\n      });\n    }\n\n    createClass(BlobRecord, [{\n      key: \"create\",\n      value: function create(callback) {\n        this.callback = callback;\n        this.xhr.send(JSON.stringify({\n          blob: this.attributes\n        }));\n      }\n    }, {\n      key: \"requestDidLoad\",\n      value: function requestDidLoad(event) {\n        if (this.status >= 200 && this.status < 300) {\n          var response = this.response;\n          var direct_upload = response.direct_upload;\n          delete response.direct_upload;\n          this.attributes = response;\n          this.directUploadData = direct_upload;\n          this.callback(null, this.toJSON());\n        } else {\n          this.requestDidError(event);\n        }\n      }\n    }, {\n      key: \"requestDidError\",\n      value: function requestDidError(event) {\n        this.callback('Error creating Blob for \"' + this.file.name + '\". Status: ' + this.status);\n      }\n    }, {\n      key: \"toJSON\",\n      value: function toJSON() {\n        var result = {};\n\n        for (var key in this.attributes) {\n          result[key] = this.attributes[key];\n        }\n\n        return result;\n      }\n    }, {\n      key: \"status\",\n      get: function get$$1() {\n        return this.xhr.status;\n      }\n    }, {\n      key: \"response\",\n      get: function get$$1() {\n        var _xhr = this.xhr,\n            responseType = _xhr.responseType,\n            response = _xhr.response;\n\n        if (responseType == \"json\") {\n          return response;\n        } else {\n          return JSON.parse(response);\n        }\n      }\n    }]);\n    return BlobRecord;\n  }();\n\n  var BlobUpload = function () {\n    function BlobUpload(blob) {\n      var _this = this;\n\n      classCallCheck(this, BlobUpload);\n      this.blob = blob;\n      this.file = blob.file;\n      var _blob$directUploadDat = blob.directUploadData,\n          url = _blob$directUploadDat.url,\n          headers = _blob$directUploadDat.headers;\n      this.xhr = new XMLHttpRequest();\n      this.xhr.open(\"PUT\", url, true);\n      this.xhr.responseType = \"text\";\n\n      for (var key in headers) {\n        this.xhr.setRequestHeader(key, headers[key]);\n      }\n\n      this.xhr.addEventListener(\"load\", function (event) {\n        return _this.requestDidLoad(event);\n      });\n      this.xhr.addEventListener(\"error\", function (event) {\n        return _this.requestDidError(event);\n      });\n    }\n\n    createClass(BlobUpload, [{\n      key: \"create\",\n      value: function create(callback) {\n        this.callback = callback;\n        this.xhr.send(this.file.slice());\n      }\n    }, {\n      key: \"requestDidLoad\",\n      value: function requestDidLoad(event) {\n        var _xhr = this.xhr,\n            status = _xhr.status,\n            response = _xhr.response;\n\n        if (status >= 200 && status < 300) {\n          this.callback(null, response);\n        } else {\n          this.requestDidError(event);\n        }\n      }\n    }, {\n      key: \"requestDidError\",\n      value: function requestDidError(event) {\n        this.callback('Error storing \"' + this.file.name + '\". Status: ' + this.xhr.status);\n      }\n    }]);\n    return BlobUpload;\n  }();\n\n  var id = 0;\n\n  var DirectUpload = function () {\n    function DirectUpload(file, url, delegate) {\n      classCallCheck(this, DirectUpload);\n      this.id = ++id;\n      this.file = file;\n      this.url = url;\n      this.delegate = delegate;\n    }\n\n    createClass(DirectUpload, [{\n      key: \"create\",\n      value: function create(callback) {\n        var _this = this;\n\n        FileChecksum.create(this.file, function (error, checksum) {\n          if (error) {\n            callback(error);\n            return;\n          }\n\n          var blob = new BlobRecord(_this.file, checksum, _this.url);\n          notify(_this.delegate, \"directUploadWillCreateBlobWithXHR\", blob.xhr);\n          blob.create(function (error) {\n            if (error) {\n              callback(error);\n            } else {\n              var upload = new BlobUpload(blob);\n              notify(_this.delegate, \"directUploadWillStoreFileWithXHR\", upload.xhr);\n              upload.create(function (error) {\n                if (error) {\n                  callback(error);\n                } else {\n                  callback(null, blob.toJSON());\n                }\n              });\n            }\n          });\n        });\n      }\n    }]);\n    return DirectUpload;\n  }();\n\n  function notify(object, methodName) {\n    if (object && typeof object[methodName] == \"function\") {\n      for (var _len = arguments.length, messages = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n        messages[_key - 2] = arguments[_key];\n      }\n\n      return object[methodName].apply(object, messages);\n    }\n  }\n\n  var DirectUploadController = function () {\n    function DirectUploadController(input, file) {\n      classCallCheck(this, DirectUploadController);\n      this.input = input;\n      this.file = file;\n      this.directUpload = new DirectUpload(this.file, this.url, this);\n      this.dispatch(\"initialize\");\n    }\n\n    createClass(DirectUploadController, [{\n      key: \"start\",\n      value: function start(callback) {\n        var _this = this;\n\n        var hiddenInput = document.createElement(\"input\");\n        hiddenInput.type = \"hidden\";\n        hiddenInput.name = this.input.name;\n        this.input.insertAdjacentElement(\"beforebegin\", hiddenInput);\n        this.dispatch(\"start\");\n        this.directUpload.create(function (error, attributes) {\n          if (error) {\n            hiddenInput.parentNode.removeChild(hiddenInput);\n\n            _this.dispatchError(error);\n          } else {\n            hiddenInput.value = attributes.signed_id;\n          }\n\n          _this.dispatch(\"end\");\n\n          callback(error);\n        });\n      }\n    }, {\n      key: \"uploadRequestDidProgress\",\n      value: function uploadRequestDidProgress(event) {\n        var progress = event.loaded / event.total * 100;\n\n        if (progress) {\n          this.dispatch(\"progress\", {\n            progress: progress\n          });\n        }\n      }\n    }, {\n      key: \"dispatch\",\n      value: function dispatch(name) {\n        var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        detail.file = this.file;\n        detail.id = this.directUpload.id;\n        return dispatchEvent(this.input, \"direct-upload:\" + name, {\n          detail: detail\n        });\n      }\n    }, {\n      key: \"dispatchError\",\n      value: function dispatchError(error) {\n        var event = this.dispatch(\"error\", {\n          error: error\n        });\n\n        if (!event.defaultPrevented) {\n          alert(error);\n        }\n      }\n    }, {\n      key: \"directUploadWillCreateBlobWithXHR\",\n      value: function directUploadWillCreateBlobWithXHR(xhr) {\n        this.dispatch(\"before-blob-request\", {\n          xhr: xhr\n        });\n      }\n    }, {\n      key: \"directUploadWillStoreFileWithXHR\",\n      value: function directUploadWillStoreFileWithXHR(xhr) {\n        var _this2 = this;\n\n        this.dispatch(\"before-storage-request\", {\n          xhr: xhr\n        });\n        xhr.upload.addEventListener(\"progress\", function (event) {\n          return _this2.uploadRequestDidProgress(event);\n        });\n      }\n    }, {\n      key: \"url\",\n      get: function get$$1() {\n        return this.input.getAttribute(\"data-direct-upload-url\");\n      }\n    }]);\n    return DirectUploadController;\n  }();\n\n  var inputSelector = \"input[type=file][data-direct-upload-url]:not([disabled])\";\n\n  var DirectUploadsController = function () {\n    function DirectUploadsController(form) {\n      classCallCheck(this, DirectUploadsController);\n      this.form = form;\n      this.inputs = findElements(form, inputSelector).filter(function (input) {\n        return input.files.length;\n      });\n    }\n\n    createClass(DirectUploadsController, [{\n      key: \"start\",\n      value: function start(callback) {\n        var _this = this;\n\n        var controllers = this.createDirectUploadControllers();\n\n        var startNextController = function startNextController() {\n          var controller = controllers.shift();\n\n          if (controller) {\n            controller.start(function (error) {\n              if (error) {\n                callback(error);\n\n                _this.dispatch(\"end\");\n              } else {\n                startNextController();\n              }\n            });\n          } else {\n            callback();\n\n            _this.dispatch(\"end\");\n          }\n        };\n\n        this.dispatch(\"start\");\n        startNextController();\n      }\n    }, {\n      key: \"createDirectUploadControllers\",\n      value: function createDirectUploadControllers() {\n        var controllers = [];\n        this.inputs.forEach(function (input) {\n          toArray$1(input.files).forEach(function (file) {\n            var controller = new DirectUploadController(input, file);\n            controllers.push(controller);\n          });\n        });\n        return controllers;\n      }\n    }, {\n      key: \"dispatch\",\n      value: function dispatch(name) {\n        var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n        return dispatchEvent(this.form, \"direct-uploads:\" + name, {\n          detail: detail\n        });\n      }\n    }]);\n    return DirectUploadsController;\n  }();\n\n  var processingAttribute = \"data-direct-uploads-processing\";\n  var submitButtonsByForm = new WeakMap();\n  var started = false;\n\n  function start() {\n    if (!started) {\n      started = true;\n      document.addEventListener(\"click\", didClick, true);\n      document.addEventListener(\"submit\", didSubmitForm);\n      document.addEventListener(\"ajax:before\", didSubmitRemoteElement);\n    }\n  }\n\n  function didClick(event) {\n    var target = event.target;\n\n    if ((target.tagName == \"INPUT\" || target.tagName == \"BUTTON\") && target.type == \"submit\" && target.form) {\n      submitButtonsByForm.set(target.form, target);\n    }\n  }\n\n  function didSubmitForm(event) {\n    handleFormSubmissionEvent(event);\n  }\n\n  function didSubmitRemoteElement(event) {\n    if (event.target.tagName == \"FORM\") {\n      handleFormSubmissionEvent(event);\n    }\n  }\n\n  function handleFormSubmissionEvent(event) {\n    var form = event.target;\n\n    if (form.hasAttribute(processingAttribute)) {\n      event.preventDefault();\n      return;\n    }\n\n    var controller = new DirectUploadsController(form);\n    var inputs = controller.inputs;\n\n    if (inputs.length) {\n      event.preventDefault();\n      form.setAttribute(processingAttribute, \"\");\n      inputs.forEach(disable);\n      controller.start(function (error) {\n        form.removeAttribute(processingAttribute);\n\n        if (error) {\n          inputs.forEach(enable);\n        } else {\n          submitForm(form);\n        }\n      });\n    }\n  }\n\n  function submitForm(form) {\n    var button = submitButtonsByForm.get(form) || findElement(form, \"input[type=submit], button[type=submit]\");\n\n    if (button) {\n      var _button = button,\n          disabled = _button.disabled;\n      button.disabled = false;\n      button.focus();\n      button.click();\n      button.disabled = disabled;\n    } else {\n      button = document.createElement(\"input\");\n      button.type = \"submit\";\n      button.style.display = \"none\";\n      form.appendChild(button);\n      button.click();\n      form.removeChild(button);\n    }\n\n    submitButtonsByForm.delete(form);\n  }\n\n  function disable(input) {\n    input.disabled = true;\n  }\n\n  function enable(input) {\n    input.disabled = false;\n  }\n\n  function autostart() {\n    if (window.ActiveStorage) {\n      start();\n    }\n  }\n\n  setTimeout(autostart, 1);\n  exports.start = start;\n  exports.DirectUpload = DirectUpload;\n  Object.defineProperty(exports, \"__esModule\", {\n    value: true\n  });\n});","/*!\n * Chartkick.js\n * Create beautiful charts with one line of JavaScript\n * https://github.com/ankane/chartkick.js\n * v4.2.0\n * MIT License\n */\n(function (global, factory) {\n  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Chartkick = factory());\n})(this, function () {\n  'use strict';\n\n  function isArray(variable) {\n    return Object.prototype.toString.call(variable) === \"[object Array]\";\n  }\n\n  function isFunction(variable) {\n    return variable instanceof Function;\n  }\n\n  function isPlainObject(variable) {\n    // protect against prototype pollution, defense 2\n    return Object.prototype.toString.call(variable) === \"[object Object]\" && !isFunction(variable) && variable instanceof Object;\n  } // https://github.com/madrobby/zepto/blob/master/src/zepto.js\n\n\n  function extend(target, source) {\n    var key;\n\n    for (key in source) {\n      // protect against prototype pollution, defense 1\n      if (key === \"__proto__\") {\n        continue;\n      }\n\n      if (isPlainObject(source[key]) || isArray(source[key])) {\n        if (isPlainObject(source[key]) && !isPlainObject(target[key])) {\n          target[key] = {};\n        }\n\n        if (isArray(source[key]) && !isArray(target[key])) {\n          target[key] = [];\n        }\n\n        extend(target[key], source[key]);\n      } else if (source[key] !== undefined) {\n        target[key] = source[key];\n      }\n    }\n  }\n\n  function merge(obj1, obj2) {\n    var target = {};\n    extend(target, obj1);\n    extend(target, obj2);\n    return target;\n  }\n\n  var DATE_PATTERN = /^(\\d\\d\\d\\d)(-)?(\\d\\d)(-)?(\\d\\d)$/i;\n\n  function negativeValues(series) {\n    var i, j, data;\n\n    for (i = 0; i < series.length; i++) {\n      data = series[i].data;\n\n      for (j = 0; j < data.length; j++) {\n        if (data[j][1] < 0) {\n          return true;\n        }\n      }\n    }\n\n    return false;\n  }\n\n  function toStr(n) {\n    return \"\" + n;\n  }\n\n  function toFloat(n) {\n    return parseFloat(n);\n  }\n\n  function toDate(n) {\n    var matches, year, month, day;\n\n    if (typeof n !== \"object\") {\n      if (typeof n === \"number\") {\n        n = new Date(n * 1000); // ms\n      } else {\n        n = toStr(n);\n\n        if (matches = n.match(DATE_PATTERN)) {\n          year = parseInt(matches[1], 10);\n          month = parseInt(matches[3], 10) - 1;\n          day = parseInt(matches[5], 10);\n          return new Date(year, month, day);\n        } else {\n          // try our best to get the str into iso8601\n          // TODO be smarter about this\n          var str = n.replace(/ /, \"T\").replace(\" \", \"\").replace(\"UTC\", \"Z\"); // Date.parse returns milliseconds if valid and NaN if invalid\n\n          n = new Date(Date.parse(str) || n);\n        }\n      }\n    }\n\n    return n;\n  }\n\n  function toArr(n) {\n    if (!isArray(n)) {\n      var arr = [],\n          i;\n\n      for (i in n) {\n        if (n.hasOwnProperty(i)) {\n          arr.push([i, n[i]]);\n        }\n      }\n\n      n = arr;\n    }\n\n    return n;\n  }\n\n  function jsOptionsFunc(defaultOptions, hideLegend, setTitle, setMin, setMax, setStacked, setXtitle, setYtitle) {\n    return function (chart, opts, chartOptions) {\n      var series = chart.data;\n      var options = merge({}, defaultOptions);\n      options = merge(options, chartOptions || {});\n\n      if (chart.singleSeriesFormat || \"legend\" in opts) {\n        hideLegend(options, opts.legend, chart.singleSeriesFormat);\n      }\n\n      if (opts.title) {\n        setTitle(options, opts.title);\n      } // min\n\n\n      if (\"min\" in opts) {\n        setMin(options, opts.min);\n      } else if (!negativeValues(series)) {\n        setMin(options, 0);\n      } // max\n\n\n      if (opts.max) {\n        setMax(options, opts.max);\n      }\n\n      if (\"stacked\" in opts) {\n        setStacked(options, opts.stacked);\n      }\n\n      if (opts.colors) {\n        options.colors = opts.colors;\n      }\n\n      if (opts.xtitle) {\n        setXtitle(options, opts.xtitle);\n      }\n\n      if (opts.ytitle) {\n        setYtitle(options, opts.ytitle);\n      } // merge library last\n\n\n      options = merge(options, opts.library || {});\n      return options;\n    };\n  }\n\n  function sortByTime(a, b) {\n    return a[0].getTime() - b[0].getTime();\n  }\n\n  function sortByNumberSeries(a, b) {\n    return a[0] - b[0];\n  }\n\n  function sortByNumber(a, b) {\n    return a - b;\n  }\n\n  function isMinute(d) {\n    return d.getMilliseconds() === 0 && d.getSeconds() === 0;\n  }\n\n  function isHour(d) {\n    return isMinute(d) && d.getMinutes() === 0;\n  }\n\n  function isDay(d) {\n    return isHour(d) && d.getHours() === 0;\n  }\n\n  function isWeek(d, dayOfWeek) {\n    return isDay(d) && d.getDay() === dayOfWeek;\n  }\n\n  function isMonth(d) {\n    return isDay(d) && d.getDate() === 1;\n  }\n\n  function isYear(d) {\n    return isMonth(d) && d.getMonth() === 0;\n  }\n\n  function isDate(obj) {\n    return !isNaN(toDate(obj)) && toStr(obj).length >= 6;\n  }\n\n  function isNumber(obj) {\n    return typeof obj === \"number\";\n  }\n\n  var byteSuffixes = [\"bytes\", \"KB\", \"MB\", \"GB\", \"TB\", \"PB\", \"EB\"];\n\n  function formatValue(pre, value, options, axis) {\n    pre = pre || \"\";\n\n    if (options.prefix) {\n      if (value < 0) {\n        value = value * -1;\n        pre += \"-\";\n      }\n\n      pre += options.prefix;\n    }\n\n    var suffix = options.suffix || \"\";\n    var precision = options.precision;\n    var round = options.round;\n\n    if (options.byteScale) {\n      var suffixIdx;\n      var baseValue = axis ? options.byteScale : value;\n\n      if (baseValue >= 1152921504606846976) {\n        value /= 1152921504606846976;\n        suffixIdx = 6;\n      } else if (baseValue >= 1125899906842624) {\n        value /= 1125899906842624;\n        suffixIdx = 5;\n      } else if (baseValue >= 1099511627776) {\n        value /= 1099511627776;\n        suffixIdx = 4;\n      } else if (baseValue >= 1073741824) {\n        value /= 1073741824;\n        suffixIdx = 3;\n      } else if (baseValue >= 1048576) {\n        value /= 1048576;\n        suffixIdx = 2;\n      } else if (baseValue >= 1024) {\n        value /= 1024;\n        suffixIdx = 1;\n      } else {\n        suffixIdx = 0;\n      } // TODO handle manual precision case\n\n\n      if (precision === undefined && round === undefined) {\n        if (value >= 1023.5) {\n          if (suffixIdx < byteSuffixes.length - 1) {\n            value = 1.0;\n            suffixIdx += 1;\n          }\n        }\n\n        precision = value >= 1000 ? 4 : 3;\n      }\n\n      suffix = \" \" + byteSuffixes[suffixIdx];\n    }\n\n    if (precision !== undefined && round !== undefined) {\n      throw Error(\"Use either round or precision, not both\");\n    }\n\n    if (!axis) {\n      if (precision !== undefined) {\n        value = value.toPrecision(precision);\n\n        if (!options.zeros) {\n          value = parseFloat(value);\n        }\n      }\n\n      if (round !== undefined) {\n        if (round < 0) {\n          var num = Math.pow(10, -1 * round);\n          value = parseInt((1.0 * value / num).toFixed(0)) * num;\n        } else {\n          value = value.toFixed(round);\n\n          if (!options.zeros) {\n            value = parseFloat(value);\n          }\n        }\n      }\n    }\n\n    if (options.thousands || options.decimal) {\n      value = toStr(value);\n      var parts = value.split(\".\");\n      value = parts[0];\n\n      if (options.thousands) {\n        value = value.replace(/\\B(?=(\\d{3})+(?!\\d))/g, options.thousands);\n      }\n\n      if (parts.length > 1) {\n        value += (options.decimal || \".\") + parts[1];\n      }\n    }\n\n    return pre + value + suffix;\n  }\n\n  function seriesOption(chart, series, option) {\n    if (option in series) {\n      return series[option];\n    } else if (option in chart.options) {\n      return chart.options[option];\n    }\n\n    return null;\n  }\n\n  function allZeros(data) {\n    var i, j, d;\n\n    for (i = 0; i < data.length; i++) {\n      d = data[i].data;\n\n      for (j = 0; j < d.length; j++) {\n        if (d[j][1] != 0) {\n          return false;\n        }\n      }\n    }\n\n    return true;\n  }\n\n  var baseOptions = {\n    maintainAspectRatio: false,\n    animation: false,\n    plugins: {\n      legend: {},\n      tooltip: {\n        displayColors: false,\n        callbacks: {}\n      },\n      title: {\n        font: {\n          size: 20\n        },\n        color: \"#333\"\n      }\n    },\n    interaction: {}\n  };\n  var defaultOptions$2 = {\n    scales: {\n      y: {\n        ticks: {\n          maxTicksLimit: 4\n        },\n        title: {\n          font: {\n            size: 16\n          },\n          color: \"#333\"\n        },\n        grid: {}\n      },\n      x: {\n        grid: {\n          drawOnChartArea: false\n        },\n        title: {\n          font: {\n            size: 16\n          },\n          color: \"#333\"\n        },\n        time: {},\n        ticks: {}\n      }\n    }\n  }; // http://there4.io/2012/05/02/google-chart-color-list/\n\n  var defaultColors = [\"#3366CC\", \"#DC3912\", \"#FF9900\", \"#109618\", \"#990099\", \"#3B3EAC\", \"#0099C6\", \"#DD4477\", \"#66AA00\", \"#B82E2E\", \"#316395\", \"#994499\", \"#22AA99\", \"#AAAA11\", \"#6633CC\", \"#E67300\", \"#8B0707\", \"#329262\", \"#5574A6\", \"#651067\"];\n\n  var hideLegend$2 = function (options, legend, hideLegend) {\n    if (legend !== undefined) {\n      options.plugins.legend.display = !!legend;\n\n      if (legend && legend !== true) {\n        options.plugins.legend.position = legend;\n      }\n    } else if (hideLegend) {\n      options.plugins.legend.display = false;\n    }\n  };\n\n  var setTitle$2 = function (options, title) {\n    options.plugins.title.display = true;\n    options.plugins.title.text = title;\n  };\n\n  var setMin$2 = function (options, min) {\n    if (min !== null) {\n      options.scales.y.min = toFloat(min);\n    }\n  };\n\n  var setMax$2 = function (options, max) {\n    options.scales.y.max = toFloat(max);\n  };\n\n  var setBarMin$1 = function (options, min) {\n    if (min !== null) {\n      options.scales.x.min = toFloat(min);\n    }\n  };\n\n  var setBarMax$1 = function (options, max) {\n    options.scales.x.max = toFloat(max);\n  };\n\n  var setStacked$2 = function (options, stacked) {\n    options.scales.x.stacked = !!stacked;\n    options.scales.y.stacked = !!stacked;\n  };\n\n  var setXtitle$2 = function (options, title) {\n    options.scales.x.title.display = true;\n    options.scales.x.title.text = title;\n  };\n\n  var setYtitle$2 = function (options, title) {\n    options.scales.y.title.display = true;\n    options.scales.y.title.text = title;\n  }; // https://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb\n\n\n  var addOpacity = function (hex, opacity) {\n    var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n    return result ? \"rgba(\" + parseInt(result[1], 16) + \", \" + parseInt(result[2], 16) + \", \" + parseInt(result[3], 16) + \", \" + opacity + \")\" : hex;\n  }; // check if not null or undefined\n  // https://stackoverflow.com/a/27757708/1177228\n\n\n  var notnull = function (x) {\n    return x != null;\n  };\n\n  var setLabelSize = function (chart, data, options) {\n    var maxLabelSize = Math.ceil(chart.element.offsetWidth / 4.0 / data.labels.length);\n\n    if (maxLabelSize > 25) {\n      maxLabelSize = 25;\n    } else if (maxLabelSize < 10) {\n      maxLabelSize = 10;\n    }\n\n    if (!options.scales.x.ticks.callback) {\n      options.scales.x.ticks.callback = function (value) {\n        value = toStr(this.getLabelForValue(value));\n\n        if (value.length > maxLabelSize) {\n          return value.substring(0, maxLabelSize - 2) + \"...\";\n        } else {\n          return value;\n        }\n      };\n    }\n  };\n\n  var setFormatOptions$1 = function (chart, options, chartType) {\n    var formatOptions = {\n      prefix: chart.options.prefix,\n      suffix: chart.options.suffix,\n      thousands: chart.options.thousands,\n      decimal: chart.options.decimal,\n      precision: chart.options.precision,\n      round: chart.options.round,\n      zeros: chart.options.zeros\n    };\n\n    if (chart.options.bytes) {\n      var series = chart.data;\n\n      if (chartType === \"pie\") {\n        series = [{\n          data: series\n        }];\n      } // calculate max\n\n\n      var max = 0;\n\n      for (var i = 0; i < series.length; i++) {\n        var s = series[i];\n\n        for (var j = 0; j < s.data.length; j++) {\n          if (s.data[j][1] > max) {\n            max = s.data[j][1];\n          }\n        }\n      } // calculate scale\n\n\n      var scale = 1;\n\n      while (max >= 1024) {\n        scale *= 1024;\n        max /= 1024;\n      } // set step size\n\n\n      formatOptions.byteScale = scale;\n    }\n\n    if (chartType !== \"pie\") {\n      var axis = options.scales.y;\n\n      if (chartType === \"bar\") {\n        axis = options.scales.x;\n      }\n\n      if (formatOptions.byteScale) {\n        if (!axis.ticks.stepSize) {\n          axis.ticks.stepSize = formatOptions.byteScale / 2;\n        }\n\n        if (!axis.ticks.maxTicksLimit) {\n          axis.ticks.maxTicksLimit = 4;\n        }\n      }\n\n      if (!axis.ticks.callback) {\n        axis.ticks.callback = function (value) {\n          return formatValue(\"\", value, formatOptions, true);\n        };\n      }\n    }\n\n    if (!options.plugins.tooltip.callbacks.label) {\n      if (chartType === \"scatter\") {\n        options.plugins.tooltip.callbacks.label = function (context) {\n          var label = context.dataset.label || '';\n\n          if (label) {\n            label += ': ';\n          }\n\n          return label + '(' + context.label + ', ' + context.formattedValue + ')';\n        };\n      } else if (chartType === \"bubble\") {\n        options.plugins.tooltip.callbacks.label = function (context) {\n          var label = context.dataset.label || '';\n\n          if (label) {\n            label += ': ';\n          }\n\n          var dataPoint = context.raw;\n          return label + '(' + dataPoint.x + ', ' + dataPoint.y + ', ' + dataPoint.v + ')';\n        };\n      } else if (chartType === \"pie\") {\n        // need to use separate label for pie charts\n        options.plugins.tooltip.callbacks.label = function (context) {\n          var dataLabel = context.label;\n          var value = ': ';\n\n          if (isArray(dataLabel)) {\n            // show value on first line of multiline label\n            // need to clone because we are changing the value\n            dataLabel = dataLabel.slice();\n            dataLabel[0] += value;\n          } else {\n            dataLabel += value;\n          }\n\n          return formatValue(dataLabel, context.parsed, formatOptions);\n        };\n      } else {\n        var valueLabel = chartType === \"bar\" ? \"x\" : \"y\";\n\n        options.plugins.tooltip.callbacks.label = function (context) {\n          // don't show null values for stacked charts\n          if (context.parsed[valueLabel] === null) {\n            return;\n          }\n\n          var label = context.dataset.label || '';\n\n          if (label) {\n            label += ': ';\n          }\n\n          return formatValue(label, context.parsed[valueLabel], formatOptions);\n        };\n      }\n    }\n  };\n\n  var jsOptions$2 = jsOptionsFunc(merge(baseOptions, defaultOptions$2), hideLegend$2, setTitle$2, setMin$2, setMax$2, setStacked$2, setXtitle$2, setYtitle$2);\n\n  var createDataTable = function (chart, options, chartType) {\n    var datasets = [];\n    var labels = [];\n    var colors = chart.options.colors || defaultColors;\n    var day = true;\n    var week = true;\n    var dayOfWeek;\n    var month = true;\n    var year = true;\n    var hour = true;\n    var minute = true;\n    var series = chart.data;\n    var max = 0;\n\n    if (chartType === \"bubble\") {\n      for (var i$1 = 0; i$1 < series.length; i$1++) {\n        var s$1 = series[i$1];\n\n        for (var j$1 = 0; j$1 < s$1.data.length; j$1++) {\n          if (s$1.data[j$1][2] > max) {\n            max = s$1.data[j$1][2];\n          }\n        }\n      }\n    }\n\n    var i,\n        j,\n        s,\n        d,\n        key,\n        rows = [],\n        rows2 = [];\n\n    if (chartType === \"bar\" || chartType === \"column\" || chart.xtype !== \"number\" && chart.xtype !== \"bubble\") {\n      var sortedLabels = [];\n\n      for (i = 0; i < series.length; i++) {\n        s = series[i];\n\n        for (j = 0; j < s.data.length; j++) {\n          d = s.data[j];\n          key = chart.xtype == \"datetime\" ? d[0].getTime() : d[0];\n\n          if (!rows[key]) {\n            rows[key] = new Array(series.length);\n          }\n\n          rows[key][i] = toFloat(d[1]);\n\n          if (sortedLabels.indexOf(key) === -1) {\n            sortedLabels.push(key);\n          }\n        }\n      }\n\n      if (chart.xtype === \"datetime\" || chart.xtype === \"number\") {\n        sortedLabels.sort(sortByNumber);\n      }\n\n      for (j = 0; j < series.length; j++) {\n        rows2.push([]);\n      }\n\n      var value;\n      var k;\n\n      for (k = 0; k < sortedLabels.length; k++) {\n        i = sortedLabels[k];\n\n        if (chart.xtype === \"datetime\") {\n          value = new Date(toFloat(i)); // TODO make this efficient\n\n          day = day && isDay(value);\n\n          if (!dayOfWeek) {\n            dayOfWeek = value.getDay();\n          }\n\n          week = week && isWeek(value, dayOfWeek);\n          month = month && isMonth(value);\n          year = year && isYear(value);\n          hour = hour && isHour(value);\n          minute = minute && isMinute(value);\n        } else {\n          value = i;\n        }\n\n        labels.push(value);\n\n        for (j = 0; j < series.length; j++) {\n          // Chart.js doesn't like undefined\n          rows2[j].push(rows[i][j] === undefined ? null : rows[i][j]);\n        }\n      }\n    } else {\n      for (var i$2 = 0; i$2 < series.length; i$2++) {\n        var s$2 = series[i$2];\n        var d$1 = [];\n\n        for (var j$2 = 0; j$2 < s$2.data.length; j$2++) {\n          var point = {\n            x: toFloat(s$2.data[j$2][0]),\n            y: toFloat(s$2.data[j$2][1])\n          };\n\n          if (chartType === \"bubble\") {\n            point.r = toFloat(s$2.data[j$2][2]) * 20 / max; // custom attribute, for tooltip\n\n            point.v = s$2.data[j$2][2];\n          }\n\n          d$1.push(point);\n        }\n\n        rows2.push(d$1);\n      }\n    }\n\n    var color;\n    var backgroundColor;\n\n    for (i = 0; i < series.length; i++) {\n      s = series[i]; // use colors for each bar for single series format\n\n      if (chart.options.colors && chart.singleSeriesFormat && (chartType === \"bar\" || chartType === \"column\") && !s.color && isArray(chart.options.colors) && !isArray(chart.options.colors[0])) {\n        color = colors;\n        backgroundColor = [];\n\n        for (var j$3 = 0; j$3 < colors.length; j$3++) {\n          backgroundColor[j$3] = addOpacity(color[j$3], 0.5);\n        }\n      } else {\n        color = s.color || colors[i];\n        backgroundColor = chartType !== \"line\" ? addOpacity(color, 0.5) : color;\n      }\n\n      var dataset = {\n        label: s.name || \"\",\n        data: rows2[i],\n        fill: chartType === \"area\",\n        borderColor: color,\n        backgroundColor: backgroundColor,\n        borderWidth: 2\n      };\n      var pointChart = chartType === \"line\" || chartType === \"area\" || chartType === \"scatter\" || chartType === \"bubble\";\n\n      if (pointChart) {\n        dataset.pointBackgroundColor = color;\n        dataset.pointHoverBackgroundColor = color;\n        dataset.pointHitRadius = 50;\n      }\n\n      if (chartType === \"bubble\") {\n        dataset.pointBackgroundColor = backgroundColor;\n        dataset.pointHoverBackgroundColor = backgroundColor;\n        dataset.pointHoverBorderWidth = 2;\n      }\n\n      if (s.stack) {\n        dataset.stack = s.stack;\n      }\n\n      var curve = seriesOption(chart, s, \"curve\");\n\n      if (curve === false) {\n        dataset.tension = 0;\n      } else if (pointChart) {\n        dataset.tension = 0.4;\n      }\n\n      var points = seriesOption(chart, s, \"points\");\n\n      if (points === false) {\n        dataset.pointRadius = 0;\n        dataset.pointHoverRadius = 0;\n      }\n\n      dataset = merge(dataset, chart.options.dataset || {});\n      dataset = merge(dataset, s.library || {});\n      dataset = merge(dataset, s.dataset || {});\n      datasets.push(dataset);\n    }\n\n    var xmin = chart.options.xmin;\n    var xmax = chart.options.xmax;\n\n    if (chart.xtype === \"datetime\") {\n      if (notnull(xmin)) {\n        options.scales.x.min = toDate(xmin).getTime();\n      }\n\n      if (notnull(xmax)) {\n        options.scales.x.max = toDate(xmax).getTime();\n      }\n    } else if (chart.xtype === \"number\") {\n      if (notnull(xmin)) {\n        options.scales.x.min = xmin;\n      }\n\n      if (notnull(xmax)) {\n        options.scales.x.max = xmax;\n      }\n    } // for empty datetime chart\n\n\n    if (chart.xtype === \"datetime\" && labels.length === 0) {\n      if (notnull(xmin)) {\n        labels.push(toDate(xmin));\n      }\n\n      if (notnull(xmax)) {\n        labels.push(toDate(xmax));\n      }\n\n      day = false;\n      week = false;\n      month = false;\n      year = false;\n      hour = false;\n      minute = false;\n    }\n\n    if (chart.xtype === \"datetime\" && labels.length > 0) {\n      var minTime = (notnull(xmin) ? toDate(xmin) : labels[0]).getTime();\n      var maxTime = (notnull(xmax) ? toDate(xmax) : labels[0]).getTime();\n\n      for (i = 1; i < labels.length; i++) {\n        var value$1 = labels[i].getTime();\n\n        if (value$1 < minTime) {\n          minTime = value$1;\n        }\n\n        if (value$1 > maxTime) {\n          maxTime = value$1;\n        }\n      }\n\n      var timeDiff = (maxTime - minTime) / (86400 * 1000.0);\n\n      if (!options.scales.x.time.unit) {\n        var step;\n\n        if (year || timeDiff > 365 * 10) {\n          options.scales.x.time.unit = \"year\";\n          step = 365;\n        } else if (month || timeDiff > 30 * 10) {\n          options.scales.x.time.unit = \"month\";\n          step = 30;\n        } else if (day || timeDiff > 10) {\n          options.scales.x.time.unit = \"day\";\n          step = 1;\n        } else if (hour || timeDiff > 0.5) {\n          options.scales.x.time.displayFormats = {\n            hour: \"MMM d, h a\"\n          };\n          options.scales.x.time.unit = \"hour\";\n          step = 1 / 24.0;\n        } else if (minute) {\n          options.scales.x.time.displayFormats = {\n            minute: \"h:mm a\"\n          };\n          options.scales.x.time.unit = \"minute\";\n          step = 1 / 24.0 / 60.0;\n        }\n\n        if (step && timeDiff > 0) {\n          // width not available for hidden elements\n          var width = chart.element.offsetWidth;\n\n          if (width > 0) {\n            var unitStepSize = Math.ceil(timeDiff / step / (width / 100.0));\n\n            if (week && step === 1) {\n              unitStepSize = Math.ceil(unitStepSize / 7.0) * 7;\n            }\n\n            options.scales.x.time.stepSize = unitStepSize;\n          }\n        }\n      }\n\n      if (!options.scales.x.time.tooltipFormat) {\n        if (day) {\n          options.scales.x.time.tooltipFormat = \"PP\";\n        } else if (hour) {\n          options.scales.x.time.tooltipFormat = \"MMM d, h a\";\n        } else if (minute) {\n          options.scales.x.time.tooltipFormat = \"h:mm a\";\n        }\n      }\n    }\n\n    var data = {\n      labels: labels,\n      datasets: datasets\n    };\n    return data;\n  };\n\n  var defaultExport$2 = function defaultExport(library) {\n    this.name = \"chartjs\";\n    this.library = library;\n  };\n\n  defaultExport$2.prototype.renderLineChart = function renderLineChart(chart, chartType) {\n    var chartOptions = {}; // fix for https://github.com/chartjs/Chart.js/issues/2441\n\n    if (!chart.options.max && allZeros(chart.data)) {\n      chartOptions.max = 1;\n    }\n\n    var options = jsOptions$2(chart, merge(chartOptions, chart.options));\n    setFormatOptions$1(chart, options, chartType);\n    var data = createDataTable(chart, options, chartType || \"line\");\n\n    if (chart.xtype === \"number\") {\n      options.scales.x.type = options.scales.x.type || \"linear\";\n      options.scales.x.position = options.scales.x.position || \"bottom\";\n    } else {\n      options.scales.x.type = chart.xtype === \"string\" ? \"category\" : \"time\";\n    }\n\n    this.drawChart(chart, \"line\", data, options);\n  };\n\n  defaultExport$2.prototype.renderPieChart = function renderPieChart(chart) {\n    var options = merge({}, baseOptions);\n\n    if (chart.options.donut) {\n      options.cutout = \"50%\";\n    }\n\n    if (\"legend\" in chart.options) {\n      hideLegend$2(options, chart.options.legend);\n    }\n\n    if (chart.options.title) {\n      setTitle$2(options, chart.options.title);\n    }\n\n    options = merge(options, chart.options.library || {});\n    setFormatOptions$1(chart, options, \"pie\");\n    var labels = [];\n    var values = [];\n\n    for (var i = 0; i < chart.data.length; i++) {\n      var point = chart.data[i];\n      labels.push(point[0]);\n      values.push(point[1]);\n    }\n\n    var dataset = {\n      data: values,\n      backgroundColor: chart.options.colors || defaultColors\n    };\n    dataset = merge(dataset, chart.options.dataset || {});\n    var data = {\n      labels: labels,\n      datasets: [dataset]\n    };\n    this.drawChart(chart, \"pie\", data, options);\n  };\n\n  defaultExport$2.prototype.renderColumnChart = function renderColumnChart(chart, chartType) {\n    var options;\n\n    if (chartType === \"bar\") {\n      var barOptions = merge(baseOptions, defaultOptions$2);\n      barOptions.indexAxis = \"y\"; // ensure gridlines have proper orientation\n\n      barOptions.scales.x.grid.drawOnChartArea = true;\n      barOptions.scales.y.grid.drawOnChartArea = false;\n      delete barOptions.scales.y.ticks.maxTicksLimit;\n      options = jsOptionsFunc(barOptions, hideLegend$2, setTitle$2, setBarMin$1, setBarMax$1, setStacked$2, setXtitle$2, setYtitle$2)(chart, chart.options);\n    } else {\n      options = jsOptions$2(chart, chart.options);\n    }\n\n    setFormatOptions$1(chart, options, chartType);\n    var data = createDataTable(chart, options, \"column\");\n\n    if (chartType !== \"bar\") {\n      setLabelSize(chart, data, options);\n    }\n\n    this.drawChart(chart, \"bar\", data, options);\n  };\n\n  defaultExport$2.prototype.renderAreaChart = function renderAreaChart(chart) {\n    this.renderLineChart(chart, \"area\");\n  };\n\n  defaultExport$2.prototype.renderBarChart = function renderBarChart(chart) {\n    this.renderColumnChart(chart, \"bar\");\n  };\n\n  defaultExport$2.prototype.renderScatterChart = function renderScatterChart(chart, chartType) {\n    chartType = chartType || \"scatter\";\n    var options = jsOptions$2(chart, chart.options);\n    setFormatOptions$1(chart, options, chartType);\n\n    if (!(\"showLine\" in options)) {\n      options.showLine = false;\n    }\n\n    var data = createDataTable(chart, options, chartType);\n    options.scales.x.type = options.scales.x.type || \"linear\";\n    options.scales.x.position = options.scales.x.position || \"bottom\"; // prevent grouping hover and tooltips\n\n    if (!(\"mode\" in options.interaction)) {\n      options.interaction.mode = \"nearest\";\n    }\n\n    this.drawChart(chart, chartType, data, options);\n  };\n\n  defaultExport$2.prototype.renderBubbleChart = function renderBubbleChart(chart) {\n    this.renderScatterChart(chart, \"bubble\");\n  };\n\n  defaultExport$2.prototype.destroy = function destroy(chart) {\n    if (chart.chart) {\n      chart.chart.destroy();\n    }\n  };\n\n  defaultExport$2.prototype.drawChart = function drawChart(chart, type, data, options) {\n    this.destroy(chart);\n\n    if (chart.destroyed) {\n      return;\n    }\n\n    var chartOptions = {\n      type: type,\n      data: data,\n      options: options\n    };\n\n    if (chart.options.code) {\n      window.console.log(\"new Chart(ctx, \" + JSON.stringify(chartOptions) + \");\");\n    }\n\n    chart.element.innerHTML = \"<canvas></canvas>\";\n    var ctx = chart.element.getElementsByTagName(\"CANVAS\")[0];\n    chart.chart = new this.library(ctx, chartOptions);\n  };\n\n  var defaultOptions$1 = {\n    chart: {},\n    xAxis: {\n      title: {\n        text: null\n      },\n      labels: {\n        style: {\n          fontSize: \"12px\"\n        }\n      }\n    },\n    yAxis: {\n      title: {\n        text: null\n      },\n      labels: {\n        style: {\n          fontSize: \"12px\"\n        }\n      }\n    },\n    title: {\n      text: null\n    },\n    credits: {\n      enabled: false\n    },\n    legend: {\n      borderWidth: 0\n    },\n    tooltip: {\n      style: {\n        fontSize: \"12px\"\n      }\n    },\n    plotOptions: {\n      areaspline: {},\n      area: {},\n      series: {\n        marker: {}\n      }\n    },\n    time: {\n      useUTC: false\n    }\n  };\n\n  var hideLegend$1 = function (options, legend, hideLegend) {\n    if (legend !== undefined) {\n      options.legend.enabled = !!legend;\n\n      if (legend && legend !== true) {\n        if (legend === \"top\" || legend === \"bottom\") {\n          options.legend.verticalAlign = legend;\n        } else {\n          options.legend.layout = \"vertical\";\n          options.legend.verticalAlign = \"middle\";\n          options.legend.align = legend;\n        }\n      }\n    } else if (hideLegend) {\n      options.legend.enabled = false;\n    }\n  };\n\n  var setTitle$1 = function (options, title) {\n    options.title.text = title;\n  };\n\n  var setMin$1 = function (options, min) {\n    options.yAxis.min = min;\n  };\n\n  var setMax$1 = function (options, max) {\n    options.yAxis.max = max;\n  };\n\n  var setStacked$1 = function (options, stacked) {\n    var stackedValue = stacked ? stacked === true ? \"normal\" : stacked : null;\n    options.plotOptions.series.stacking = stackedValue;\n    options.plotOptions.area.stacking = stackedValue;\n    options.plotOptions.areaspline.stacking = stackedValue;\n  };\n\n  var setXtitle$1 = function (options, title) {\n    options.xAxis.title.text = title;\n  };\n\n  var setYtitle$1 = function (options, title) {\n    options.yAxis.title.text = title;\n  };\n\n  var jsOptions$1 = jsOptionsFunc(defaultOptions$1, hideLegend$1, setTitle$1, setMin$1, setMax$1, setStacked$1, setXtitle$1, setYtitle$1);\n\n  var setFormatOptions = function (chart, options, chartType) {\n    var formatOptions = {\n      prefix: chart.options.prefix,\n      suffix: chart.options.suffix,\n      thousands: chart.options.thousands,\n      decimal: chart.options.decimal,\n      precision: chart.options.precision,\n      round: chart.options.round,\n      zeros: chart.options.zeros\n    }; // skip when axis is an array (like with min/max)\n\n    if (chartType !== \"pie\" && !isArray(options.yAxis) && !options.yAxis.labels.formatter) {\n      options.yAxis.labels.formatter = function () {\n        return formatValue(\"\", this.value, formatOptions);\n      };\n    }\n\n    if (!options.tooltip.pointFormatter && !options.tooltip.pointFormat) {\n      options.tooltip.pointFormatter = function () {\n        return '<span style=\"color:' + this.color + '\">\\u25CF</span> ' + formatValue(this.series.name + ': <b>', this.y, formatOptions) + '</b><br/>';\n      };\n    }\n  };\n\n  var defaultExport$1 = function defaultExport(library) {\n    this.name = \"highcharts\";\n    this.library = library;\n  };\n\n  defaultExport$1.prototype.renderLineChart = function renderLineChart(chart, chartType) {\n    chartType = chartType || \"spline\";\n    var chartOptions = {};\n\n    if (chartType === \"areaspline\") {\n      chartOptions = {\n        plotOptions: {\n          areaspline: {\n            stacking: \"normal\"\n          },\n          area: {\n            stacking: \"normal\"\n          },\n          series: {\n            marker: {\n              enabled: false\n            }\n          }\n        }\n      };\n    }\n\n    if (chart.options.curve === false) {\n      if (chartType === \"areaspline\") {\n        chartType = \"area\";\n      } else if (chartType === \"spline\") {\n        chartType = \"line\";\n      }\n    }\n\n    var options = jsOptions$1(chart, chart.options, chartOptions),\n        data,\n        i,\n        j;\n\n    if (chart.xtype === \"number\") {\n      options.xAxis.type = options.xAxis.type || \"linear\";\n    } else {\n      options.xAxis.type = chart.xtype === \"string\" ? \"category\" : \"datetime\";\n    }\n\n    if (!options.chart.type) {\n      options.chart.type = chartType;\n    }\n\n    setFormatOptions(chart, options, chartType);\n    var series = chart.data;\n\n    for (i = 0; i < series.length; i++) {\n      series[i].name = series[i].name || \"Value\";\n      data = series[i].data;\n\n      if (chart.xtype === \"datetime\") {\n        for (j = 0; j < data.length; j++) {\n          data[j][0] = data[j][0].getTime();\n        }\n      }\n\n      series[i].marker = {\n        symbol: \"circle\"\n      };\n\n      if (chart.options.points === false) {\n        series[i].marker.enabled = false;\n      }\n    }\n\n    this.drawChart(chart, series, options);\n  };\n\n  defaultExport$1.prototype.renderScatterChart = function renderScatterChart(chart) {\n    var options = jsOptions$1(chart, chart.options, {});\n    options.chart.type = \"scatter\";\n    this.drawChart(chart, chart.data, options);\n  };\n\n  defaultExport$1.prototype.renderPieChart = function renderPieChart(chart) {\n    var chartOptions = merge(defaultOptions$1, {});\n\n    if (chart.options.colors) {\n      chartOptions.colors = chart.options.colors;\n    }\n\n    if (chart.options.donut) {\n      chartOptions.plotOptions = {\n        pie: {\n          innerSize: \"50%\"\n        }\n      };\n    }\n\n    if (\"legend\" in chart.options) {\n      hideLegend$1(chartOptions, chart.options.legend);\n    }\n\n    if (chart.options.title) {\n      setTitle$1(chartOptions, chart.options.title);\n    }\n\n    var options = merge(chartOptions, chart.options.library || {});\n    setFormatOptions(chart, options, \"pie\");\n    var series = [{\n      type: \"pie\",\n      name: chart.options.label || \"Value\",\n      data: chart.data\n    }];\n    this.drawChart(chart, series, options);\n  };\n\n  defaultExport$1.prototype.renderColumnChart = function renderColumnChart(chart, chartType) {\n    chartType = chartType || \"column\";\n    var series = chart.data;\n    var options = jsOptions$1(chart, chart.options),\n        i,\n        j,\n        s,\n        d,\n        rows = [],\n        categories = [];\n    options.chart.type = chartType;\n    setFormatOptions(chart, options, chartType);\n\n    for (i = 0; i < series.length; i++) {\n      s = series[i];\n\n      for (j = 0; j < s.data.length; j++) {\n        d = s.data[j];\n\n        if (!rows[d[0]]) {\n          rows[d[0]] = new Array(series.length);\n          categories.push(d[0]);\n        }\n\n        rows[d[0]][i] = d[1];\n      }\n    }\n\n    if (chart.xtype === \"number\") {\n      categories.sort(sortByNumber);\n    }\n\n    options.xAxis.categories = categories;\n    var newSeries = [],\n        d2;\n\n    for (i = 0; i < series.length; i++) {\n      d = [];\n\n      for (j = 0; j < categories.length; j++) {\n        d.push(rows[categories[j]][i] || 0);\n      }\n\n      d2 = {\n        name: series[i].name || \"Value\",\n        data: d\n      };\n\n      if (series[i].stack) {\n        d2.stack = series[i].stack;\n      }\n\n      newSeries.push(d2);\n    }\n\n    this.drawChart(chart, newSeries, options);\n  };\n\n  defaultExport$1.prototype.renderBarChart = function renderBarChart(chart) {\n    this.renderColumnChart(chart, \"bar\");\n  };\n\n  defaultExport$1.prototype.renderAreaChart = function renderAreaChart(chart) {\n    this.renderLineChart(chart, \"areaspline\");\n  };\n\n  defaultExport$1.prototype.destroy = function destroy(chart) {\n    if (chart.chart) {\n      chart.chart.destroy();\n    }\n  };\n\n  defaultExport$1.prototype.drawChart = function drawChart(chart, data, options) {\n    this.destroy(chart);\n\n    if (chart.destroyed) {\n      return;\n    }\n\n    options.chart.renderTo = chart.element.id;\n    options.series = data;\n\n    if (chart.options.code) {\n      window.console.log(\"new Highcharts.Chart(\" + JSON.stringify(options) + \");\");\n    }\n\n    chart.chart = new this.library.Chart(options);\n  };\n\n  var loaded = {};\n  var callbacks = []; // Set chart options\n\n  var defaultOptions = {\n    chartArea: {},\n    fontName: \"'Lucida Grande', 'Lucida Sans Unicode', Verdana, Arial, Helvetica, sans-serif\",\n    pointSize: 6,\n    legend: {\n      textStyle: {\n        fontSize: 12,\n        color: \"#444\"\n      },\n      alignment: \"center\",\n      position: \"right\"\n    },\n    curveType: \"function\",\n    hAxis: {\n      textStyle: {\n        color: \"#666\",\n        fontSize: 12\n      },\n      titleTextStyle: {},\n      gridlines: {\n        color: \"transparent\"\n      },\n      baselineColor: \"#ccc\",\n      viewWindow: {}\n    },\n    vAxis: {\n      textStyle: {\n        color: \"#666\",\n        fontSize: 12\n      },\n      titleTextStyle: {},\n      baselineColor: \"#ccc\",\n      viewWindow: {}\n    },\n    tooltip: {\n      textStyle: {\n        color: \"#666\",\n        fontSize: 12\n      }\n    }\n  };\n\n  var hideLegend = function (options, legend, hideLegend) {\n    if (legend !== undefined) {\n      var position;\n\n      if (!legend) {\n        position = \"none\";\n      } else if (legend === true) {\n        position = \"right\";\n      } else {\n        position = legend;\n      }\n\n      options.legend.position = position;\n    } else if (hideLegend) {\n      options.legend.position = \"none\";\n    }\n  };\n\n  var setTitle = function (options, title) {\n    options.title = title;\n    options.titleTextStyle = {\n      color: \"#333\",\n      fontSize: \"20px\"\n    };\n  };\n\n  var setMin = function (options, min) {\n    options.vAxis.viewWindow.min = min;\n  };\n\n  var setMax = function (options, max) {\n    options.vAxis.viewWindow.max = max;\n  };\n\n  var setBarMin = function (options, min) {\n    options.hAxis.viewWindow.min = min;\n  };\n\n  var setBarMax = function (options, max) {\n    options.hAxis.viewWindow.max = max;\n  };\n\n  var setStacked = function (options, stacked) {\n    options.isStacked = stacked ? stacked : false;\n  };\n\n  var setXtitle = function (options, title) {\n    options.hAxis.title = title;\n    options.hAxis.titleTextStyle.italic = false;\n  };\n\n  var setYtitle = function (options, title) {\n    options.vAxis.title = title;\n    options.vAxis.titleTextStyle.italic = false;\n  };\n\n  var jsOptions = jsOptionsFunc(defaultOptions, hideLegend, setTitle, setMin, setMax, setStacked, setXtitle, setYtitle);\n\n  var resize = function (callback) {\n    if (window.attachEvent) {\n      window.attachEvent(\"onresize\", callback);\n    } else if (window.addEventListener) {\n      window.addEventListener(\"resize\", callback, true);\n    }\n\n    callback();\n  };\n\n  var defaultExport = function defaultExport(library) {\n    this.name = \"google\";\n    this.library = library;\n  };\n\n  defaultExport.prototype.renderLineChart = function renderLineChart(chart) {\n    var this$1$1 = this;\n    this.waitForLoaded(chart, function () {\n      var chartOptions = {};\n\n      if (chart.options.curve === false) {\n        chartOptions.curveType = \"none\";\n      }\n\n      if (chart.options.points === false) {\n        chartOptions.pointSize = 0;\n      }\n\n      var options = jsOptions(chart, chart.options, chartOptions);\n      var data = this$1$1.createDataTable(chart.data, chart.xtype);\n      this$1$1.drawChart(chart, \"LineChart\", data, options);\n    });\n  };\n\n  defaultExport.prototype.renderPieChart = function renderPieChart(chart) {\n    var this$1$1 = this;\n    this.waitForLoaded(chart, function () {\n      var chartOptions = {\n        chartArea: {\n          top: \"10%\",\n          height: \"80%\"\n        },\n        legend: {}\n      };\n\n      if (chart.options.colors) {\n        chartOptions.colors = chart.options.colors;\n      }\n\n      if (chart.options.donut) {\n        chartOptions.pieHole = 0.5;\n      }\n\n      if (\"legend\" in chart.options) {\n        hideLegend(chartOptions, chart.options.legend);\n      }\n\n      if (chart.options.title) {\n        setTitle(chartOptions, chart.options.title);\n      }\n\n      var options = merge(merge(defaultOptions, chartOptions), chart.options.library || {});\n      var data = new this$1$1.library.visualization.DataTable();\n      data.addColumn(\"string\", \"\");\n      data.addColumn(\"number\", \"Value\");\n      data.addRows(chart.data);\n      this$1$1.drawChart(chart, \"PieChart\", data, options);\n    });\n  };\n\n  defaultExport.prototype.renderColumnChart = function renderColumnChart(chart) {\n    var this$1$1 = this;\n    this.waitForLoaded(chart, function () {\n      var options = jsOptions(chart, chart.options);\n      var data = this$1$1.createDataTable(chart.data, chart.xtype);\n      this$1$1.drawChart(chart, \"ColumnChart\", data, options);\n    });\n  };\n\n  defaultExport.prototype.renderBarChart = function renderBarChart(chart) {\n    var this$1$1 = this;\n    this.waitForLoaded(chart, function () {\n      var chartOptions = {\n        hAxis: {\n          gridlines: {\n            color: \"#ccc\"\n          }\n        }\n      };\n      var options = jsOptionsFunc(defaultOptions, hideLegend, setTitle, setBarMin, setBarMax, setStacked, setXtitle, setYtitle)(chart, chart.options, chartOptions);\n      var data = this$1$1.createDataTable(chart.data, chart.xtype);\n      this$1$1.drawChart(chart, \"BarChart\", data, options);\n    });\n  };\n\n  defaultExport.prototype.renderAreaChart = function renderAreaChart(chart) {\n    var this$1$1 = this;\n    this.waitForLoaded(chart, function () {\n      var chartOptions = {\n        isStacked: true,\n        pointSize: 0,\n        areaOpacity: 0.5\n      };\n      var options = jsOptions(chart, chart.options, chartOptions);\n      var data = this$1$1.createDataTable(chart.data, chart.xtype);\n      this$1$1.drawChart(chart, \"AreaChart\", data, options);\n    });\n  };\n\n  defaultExport.prototype.renderGeoChart = function renderGeoChart(chart) {\n    var this$1$1 = this;\n    this.waitForLoaded(chart, \"geochart\", function () {\n      var chartOptions = {\n        legend: \"none\",\n        colorAxis: {\n          colors: chart.options.colors || [\"#f6c7b6\", \"#ce502d\"]\n        }\n      };\n      var options = merge(merge(defaultOptions, chartOptions), chart.options.library || {});\n      var data = new this$1$1.library.visualization.DataTable();\n      data.addColumn(\"string\", \"\");\n      data.addColumn(\"number\", chart.options.label || \"Value\");\n      data.addRows(chart.data);\n      this$1$1.drawChart(chart, \"GeoChart\", data, options);\n    });\n  };\n\n  defaultExport.prototype.renderScatterChart = function renderScatterChart(chart) {\n    var this$1$1 = this;\n    this.waitForLoaded(chart, function () {\n      var chartOptions = {};\n      var options = jsOptions(chart, chart.options, chartOptions);\n      var series = chart.data,\n          rows2 = [],\n          i,\n          j,\n          data,\n          d;\n\n      for (i = 0; i < series.length; i++) {\n        series[i].name = series[i].name || \"Value\";\n        d = series[i].data;\n\n        for (j = 0; j < d.length; j++) {\n          var row = new Array(series.length + 1);\n          row[0] = d[j][0];\n          row[i + 1] = d[j][1];\n          rows2.push(row);\n        }\n      }\n\n      data = new this$1$1.library.visualization.DataTable();\n      data.addColumn(\"number\", \"\");\n\n      for (i = 0; i < series.length; i++) {\n        data.addColumn(\"number\", series[i].name);\n      }\n\n      data.addRows(rows2);\n      this$1$1.drawChart(chart, \"ScatterChart\", data, options);\n    });\n  };\n\n  defaultExport.prototype.renderTimeline = function renderTimeline(chart) {\n    var this$1$1 = this;\n    this.waitForLoaded(chart, \"timeline\", function () {\n      var chartOptions = {\n        legend: \"none\"\n      };\n\n      if (chart.options.colors) {\n        chartOptions.colors = chart.options.colors;\n      }\n\n      var options = merge(merge(defaultOptions, chartOptions), chart.options.library || {});\n      var data = new this$1$1.library.visualization.DataTable();\n      data.addColumn({\n        type: \"string\",\n        id: \"Name\"\n      });\n      data.addColumn({\n        type: \"date\",\n        id: \"Start\"\n      });\n      data.addColumn({\n        type: \"date\",\n        id: \"End\"\n      });\n      data.addRows(chart.data);\n      chart.element.style.lineHeight = \"normal\";\n      this$1$1.drawChart(chart, \"Timeline\", data, options);\n    });\n  }; // TODO remove resize events\n\n\n  defaultExport.prototype.destroy = function destroy(chart) {\n    if (chart.chart) {\n      chart.chart.clearChart();\n    }\n  };\n\n  defaultExport.prototype.drawChart = function drawChart(chart, type, data, options) {\n    this.destroy(chart);\n\n    if (chart.destroyed) {\n      return;\n    }\n\n    if (chart.options.code) {\n      window.console.log(\"var data = new google.visualization.DataTable(\" + data.toJSON() + \");\\nvar chart = new google.visualization.\" + type + \"(element);\\nchart.draw(data, \" + JSON.stringify(options) + \");\");\n    }\n\n    chart.chart = new this.library.visualization[type](chart.element);\n    resize(function () {\n      chart.chart.draw(data, options);\n    });\n  };\n\n  defaultExport.prototype.waitForLoaded = function waitForLoaded(chart, pack, callback) {\n    var this$1$1 = this;\n\n    if (!callback) {\n      callback = pack;\n      pack = \"corechart\";\n    }\n\n    callbacks.push({\n      pack: pack,\n      callback: callback\n    });\n\n    if (loaded[pack]) {\n      this.runCallbacks();\n    } else {\n      loaded[pack] = true; // https://groups.google.com/forum/#!topic/google-visualization-api/fMKJcyA2yyI\n\n      var loadOptions = {\n        packages: [pack],\n        callback: function () {\n          this$1$1.runCallbacks();\n        }\n      };\n\n      var config = chart.__config();\n\n      if (config.language) {\n        loadOptions.language = config.language;\n      }\n\n      if (pack === \"geochart\" && config.mapsApiKey) {\n        loadOptions.mapsApiKey = config.mapsApiKey;\n      }\n\n      this.library.charts.load(\"current\", loadOptions);\n    }\n  };\n\n  defaultExport.prototype.runCallbacks = function runCallbacks() {\n    var cb, call;\n\n    for (var i = 0; i < callbacks.length; i++) {\n      cb = callbacks[i];\n      call = this.library.visualization && (cb.pack === \"corechart\" && this.library.visualization.LineChart || cb.pack === \"timeline\" && this.library.visualization.Timeline || cb.pack === \"geochart\" && this.library.visualization.GeoChart);\n\n      if (call) {\n        cb.callback();\n        callbacks.splice(i, 1);\n        i--;\n      }\n    }\n  }; // cant use object as key\n\n\n  defaultExport.prototype.createDataTable = function createDataTable(series, columnType) {\n    var i,\n        j,\n        s,\n        d,\n        key,\n        rows = [],\n        sortedLabels = [];\n\n    for (i = 0; i < series.length; i++) {\n      s = series[i];\n      series[i].name = series[i].name || \"Value\";\n\n      for (j = 0; j < s.data.length; j++) {\n        d = s.data[j];\n        key = columnType === \"datetime\" ? d[0].getTime() : d[0];\n\n        if (!rows[key]) {\n          rows[key] = new Array(series.length);\n          sortedLabels.push(key);\n        }\n\n        rows[key][i] = toFloat(d[1]);\n      }\n    }\n\n    var rows2 = [];\n    var day = true;\n    var value;\n\n    for (j = 0; j < sortedLabels.length; j++) {\n      i = sortedLabels[j];\n\n      if (columnType === \"datetime\") {\n        value = new Date(toFloat(i));\n        day = day && isDay(value);\n      } else if (columnType === \"number\") {\n        value = toFloat(i);\n      } else {\n        value = i;\n      }\n\n      rows2.push([value].concat(rows[i]));\n    }\n\n    if (columnType === \"datetime\") {\n      rows2.sort(sortByTime);\n    } else if (columnType === \"number\") {\n      rows2.sort(sortByNumberSeries);\n\n      for (i = 0; i < rows2.length; i++) {\n        rows2[i][0] = toStr(rows2[i][0]);\n      }\n\n      columnType = \"string\";\n    } // create datatable\n\n\n    var data = new this.library.visualization.DataTable();\n    columnType = columnType === \"datetime\" && day ? \"date\" : columnType;\n    data.addColumn(columnType, \"\");\n\n    for (i = 0; i < series.length; i++) {\n      data.addColumn(\"number\", series[i].name);\n    }\n\n    data.addRows(rows2);\n    return data;\n  };\n\n  function formatSeriesData(data, keyType) {\n    var r = [],\n        j,\n        keyFunc;\n\n    if (keyType === \"number\") {\n      keyFunc = toFloat;\n    } else if (keyType === \"datetime\") {\n      keyFunc = toDate;\n    } else {\n      keyFunc = toStr;\n    }\n\n    if (keyType === \"bubble\") {\n      for (j = 0; j < data.length; j++) {\n        r.push([toFloat(data[j][0]), toFloat(data[j][1]), toFloat(data[j][2])]);\n      }\n    } else {\n      for (j = 0; j < data.length; j++) {\n        r.push([keyFunc(data[j][0]), toFloat(data[j][1])]);\n      }\n    }\n\n    if (keyType === \"datetime\") {\n      r.sort(sortByTime);\n    } else if (keyType === \"number\") {\n      r.sort(sortByNumberSeries);\n    }\n\n    return r;\n  }\n\n  function detectXType(series, noDatetime, options) {\n    if (dataEmpty(series)) {\n      if ((options.xmin || options.xmax) && (!options.xmin || isDate(options.xmin)) && (!options.xmax || isDate(options.xmax))) {\n        return \"datetime\";\n      } else {\n        return \"number\";\n      }\n    } else if (detectXTypeWithFunction(series, isNumber)) {\n      return \"number\";\n    } else if (!noDatetime && detectXTypeWithFunction(series, isDate)) {\n      return \"datetime\";\n    } else {\n      return \"string\";\n    }\n  }\n\n  function detectXTypeWithFunction(series, func) {\n    var i, j, data;\n\n    for (i = 0; i < series.length; i++) {\n      data = toArr(series[i].data);\n\n      for (j = 0; j < data.length; j++) {\n        if (!func(data[j][0])) {\n          return false;\n        }\n      }\n    }\n\n    return true;\n  } // creates a shallow copy of each element of the array\n  // elements are expected to be objects\n\n\n  function copySeries(series) {\n    var newSeries = [],\n        i,\n        j;\n\n    for (i = 0; i < series.length; i++) {\n      var copy = {};\n\n      for (j in series[i]) {\n        if (series[i].hasOwnProperty(j)) {\n          copy[j] = series[i][j];\n        }\n      }\n\n      newSeries.push(copy);\n    }\n\n    return newSeries;\n  }\n\n  function processSeries(chart, keyType, noDatetime) {\n    var i;\n    var opts = chart.options;\n    var series = chart.rawData; // see if one series or multiple\n\n    chart.singleSeriesFormat = !isArray(series) || typeof series[0] !== \"object\" || isArray(series[0]);\n\n    if (chart.singleSeriesFormat) {\n      series = [{\n        name: opts.label,\n        data: series\n      }];\n    } // convert to array\n    // must come before dataEmpty check\n\n\n    series = copySeries(series);\n\n    for (i = 0; i < series.length; i++) {\n      series[i].data = toArr(series[i].data);\n    }\n\n    chart.xtype = keyType ? keyType : opts.discrete ? \"string\" : detectXType(series, noDatetime, opts); // right format\n\n    for (i = 0; i < series.length; i++) {\n      series[i].data = formatSeriesData(series[i].data, chart.xtype);\n    }\n\n    return series;\n  }\n\n  function processSimple(chart) {\n    var perfectData = toArr(chart.rawData),\n        i;\n\n    for (i = 0; i < perfectData.length; i++) {\n      perfectData[i] = [toStr(perfectData[i][0]), toFloat(perfectData[i][1])];\n    }\n\n    return perfectData;\n  }\n\n  function dataEmpty(data, chartType) {\n    if (chartType === \"PieChart\" || chartType === \"GeoChart\" || chartType === \"Timeline\") {\n      return data.length === 0;\n    } else {\n      for (var i = 0; i < data.length; i++) {\n        if (data[i].data.length > 0) {\n          return false;\n        }\n      }\n\n      return true;\n    }\n  }\n\n  function addDownloadButton(chart) {\n    var element = chart.element;\n    var link = document.createElement(\"a\");\n    var download = chart.options.download;\n\n    if (download === true) {\n      download = {};\n    } else if (typeof download === \"string\") {\n      download = {\n        filename: download\n      };\n    }\n\n    link.download = download.filename || \"chart.png\"; // https://caniuse.com/download\n\n    link.style.position = \"absolute\";\n    link.style.top = \"20px\";\n    link.style.right = \"20px\";\n    link.style.zIndex = 1000;\n    link.style.lineHeight = \"20px\";\n    link.target = \"_blank\"; // for safari\n\n    var image = document.createElement(\"img\");\n    image.alt = \"Download\";\n    image.style.border = \"none\"; // icon from font-awesome\n    // http://fa2png.io/\n\n    image.src = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAABCFBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMywEsqxAAAAV3RSTlMAAQIDBggJCgsMDQ4PERQaHB0eISIjJCouLzE0OTo/QUJHSUpLTU5PUllhYmltcHh5foWLjI+SlaCio6atr7S1t7m6vsHHyM7R2tze5Obo7fHz9ff5+/1hlxK2AAAA30lEQVQYGUXBhVYCQQBA0TdYWAt2d3d3YWAHyur7/z9xgD16Lw0DW+XKx+1GgX+FRzM3HWQWrHl5N/oapW5RPe0PkBu+UYeICvozTWZVK23Ao04B79oJrOsJDOoxkZoQPWgX29pHpCZEk7rEvQYiNSFq1UMqvlCjJkRBS1R8hb00Vb/TajtBL7nTHE1X1vyMQF732dQhyF2o6SAwrzP06iUQzvwsArlnzcOdrgBhJyHa1QOgO9U1GsKuvjUTjavliZYQ8nNPapG6sap/3nrIdJ6bOWzmX/fy0XVpfzZP3S8OJT3g9EEiJwAAAABJRU5ErkJggg==\";\n    link.appendChild(image);\n    element.style.position = \"relative\";\n    chart.__downloadAttached = true; // mouseenter\n\n    chart.__enterEvent = addEvent(element, \"mouseover\", function (e) {\n      var related = e.relatedTarget; // check download option again to ensure it wasn't changed\n\n      if ((!related || related !== this && !childOf(this, related)) && chart.options.download) {\n        link.href = chart.toImage(download);\n        element.appendChild(link);\n      }\n    }); // mouseleave\n\n    chart.__leaveEvent = addEvent(element, \"mouseout\", function (e) {\n      var related = e.relatedTarget;\n\n      if (!related || related !== this && !childOf(this, related)) {\n        if (link.parentNode) {\n          link.parentNode.removeChild(link);\n        }\n      }\n    });\n  } // https://stackoverflow.com/questions/10149963/adding-event-listener-cross-browser\n\n\n  function addEvent(elem, event, fn) {\n    if (elem.addEventListener) {\n      elem.addEventListener(event, fn, false);\n      return fn;\n    } else {\n      var fn2 = function () {\n        // set the this pointer same as addEventListener when fn is called\n        return fn.call(elem, window.event);\n      };\n\n      elem.attachEvent(\"on\" + event, fn2);\n      return fn2;\n    }\n  }\n\n  function removeEvent(elem, event, fn) {\n    if (elem.removeEventListener) {\n      elem.removeEventListener(event, fn, false);\n    } else {\n      elem.detachEvent(\"on\" + event, fn);\n    }\n  } // https://gist.github.com/shawnbot/4166283\n\n\n  function childOf(p, c) {\n    if (p === c) {\n      return false;\n    }\n\n    while (c && c !== p) {\n      c = c.parentNode;\n    }\n\n    return c === p;\n  }\n\n  var pendingRequests = [],\n      runningRequests = 0,\n      maxRequests = 4;\n\n  function pushRequest(url, success, error) {\n    pendingRequests.push([url, success, error]);\n    runNext();\n  }\n\n  function runNext() {\n    if (runningRequests < maxRequests) {\n      var request = pendingRequests.shift();\n\n      if (request) {\n        runningRequests++;\n        getJSON(request[0], request[1], request[2]);\n        runNext();\n      }\n    }\n  }\n\n  function requestComplete() {\n    runningRequests--;\n    runNext();\n  }\n\n  function getJSON(url, success, error) {\n    ajaxCall(url, success, function (jqXHR, textStatus, errorThrown) {\n      var message = typeof errorThrown === \"string\" ? errorThrown : errorThrown.message;\n      error(message);\n    });\n  }\n\n  function ajaxCall(url, success, error) {\n    var $ = window.jQuery || window.Zepto || window.$;\n\n    if ($ && $.ajax) {\n      $.ajax({\n        dataType: \"json\",\n        url: url,\n        success: success,\n        error: error,\n        complete: requestComplete\n      });\n    } else {\n      var xhr = new XMLHttpRequest();\n      xhr.open(\"GET\", url, true);\n      xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n\n      xhr.onload = function () {\n        requestComplete();\n\n        if (xhr.status === 200) {\n          success(JSON.parse(xhr.responseText), xhr.statusText, xhr);\n        } else {\n          error(xhr, \"error\", xhr.statusText);\n        }\n      };\n\n      xhr.send();\n    }\n  }\n\n  var config = {};\n  var adapters = []; // helpers\n\n  function setText(element, text) {\n    if (document.body.innerText) {\n      element.innerText = text;\n    } else {\n      element.textContent = text;\n    }\n  } // TODO remove prefix for all messages\n\n\n  function chartError(element, message, noPrefix) {\n    if (!noPrefix) {\n      message = \"Error Loading Chart: \" + message;\n    }\n\n    setText(element, message);\n    element.style.color = \"#ff0000\";\n  }\n\n  function errorCatcher(chart) {\n    try {\n      chart.__render();\n    } catch (err) {\n      chartError(chart.element, err.message);\n      throw err;\n    }\n  }\n\n  function fetchDataSource(chart, dataSource, showLoading) {\n    // only show loading message for urls and callbacks\n    if (showLoading && chart.options.loading && (typeof dataSource === \"string\" || typeof dataSource === \"function\")) {\n      setText(chart.element, chart.options.loading);\n    }\n\n    if (typeof dataSource === \"string\") {\n      pushRequest(dataSource, function (data) {\n        chart.rawData = data;\n        errorCatcher(chart);\n      }, function (message) {\n        chartError(chart.element, message);\n      });\n    } else if (typeof dataSource === \"function\") {\n      try {\n        dataSource(function (data) {\n          chart.rawData = data;\n          errorCatcher(chart);\n        }, function (message) {\n          chartError(chart.element, message, true);\n        });\n      } catch (err) {\n        chartError(chart.element, err, true);\n      }\n    } else {\n      chart.rawData = dataSource;\n      errorCatcher(chart);\n    }\n  }\n\n  function getAdapterType(library) {\n    if (library) {\n      if (library.product === \"Highcharts\") {\n        return defaultExport$1;\n      } else if (library.charts) {\n        return defaultExport;\n      } else if (isFunction(library)) {\n        return defaultExport$2;\n      }\n    }\n\n    throw new Error(\"Unknown adapter\");\n  }\n\n  function addAdapter(library) {\n    var adapterType = getAdapterType(library);\n    var adapter = new adapterType(library);\n\n    if (adapters.indexOf(adapter) === -1) {\n      adapters.push(adapter);\n    }\n  }\n\n  function loadAdapters() {\n    if (\"Chart\" in window) {\n      addAdapter(window.Chart);\n    }\n\n    if (\"Highcharts\" in window) {\n      addAdapter(window.Highcharts);\n    }\n\n    if (window.google && window.google.charts) {\n      addAdapter(window.google);\n    }\n  }\n\n  function renderChart(chartType, chart) {\n    if (dataEmpty(chart.data, chartType)) {\n      var message = chart.options.empty || chart.options.messages && chart.options.messages.empty || \"No data\";\n      setText(chart.element, message);\n    } else {\n      callAdapter(chartType, chart);\n\n      if (chart.options.download && !chart.__downloadAttached && chart.adapter === \"chartjs\") {\n        addDownloadButton(chart);\n      }\n    }\n  } // TODO remove chartType if cross-browser way\n  // to get the name of the chart class\n\n\n  function callAdapter(chartType, chart) {\n    var i, adapter, fnName, adapterName;\n    fnName = \"render\" + chartType;\n    adapterName = chart.options.adapter;\n    loadAdapters();\n\n    for (i = 0; i < adapters.length; i++) {\n      adapter = adapters[i];\n\n      if ((!adapterName || adapterName === adapter.name) && isFunction(adapter[fnName])) {\n        chart.adapter = adapter.name;\n        chart.__adapterObject = adapter;\n        return adapter[fnName](chart);\n      }\n    }\n\n    if (adapters.length > 0) {\n      throw new Error(\"No charting library found for \" + chartType);\n    } else {\n      throw new Error(\"No charting libraries found - be sure to include one before your charts\");\n    }\n  } // define classes\n\n\n  var Chart = function Chart(element, dataSource, options) {\n    var elementId;\n\n    if (typeof element === \"string\") {\n      elementId = element;\n      element = document.getElementById(element);\n\n      if (!element) {\n        throw new Error(\"No element with id \" + elementId);\n      }\n    }\n\n    this.element = element;\n    this.options = merge(Chartkick.options, options || {});\n    this.dataSource = dataSource;\n    Chartkick.charts[element.id] = this;\n    fetchDataSource(this, dataSource, true);\n\n    if (this.options.refresh) {\n      this.startRefresh();\n    }\n  };\n\n  Chart.prototype.getElement = function getElement() {\n    return this.element;\n  };\n\n  Chart.prototype.getDataSource = function getDataSource() {\n    return this.dataSource;\n  };\n\n  Chart.prototype.getData = function getData() {\n    return this.data;\n  };\n\n  Chart.prototype.getOptions = function getOptions() {\n    return this.options;\n  };\n\n  Chart.prototype.getChartObject = function getChartObject() {\n    return this.chart;\n  };\n\n  Chart.prototype.getAdapter = function getAdapter() {\n    return this.adapter;\n  };\n\n  Chart.prototype.updateData = function updateData(dataSource, options) {\n    this.dataSource = dataSource;\n\n    if (options) {\n      this.__updateOptions(options);\n    }\n\n    fetchDataSource(this, dataSource, true);\n  };\n\n  Chart.prototype.setOptions = function setOptions(options) {\n    this.__updateOptions(options);\n\n    this.redraw();\n  };\n\n  Chart.prototype.redraw = function redraw() {\n    fetchDataSource(this, this.rawData);\n  };\n\n  Chart.prototype.refreshData = function refreshData() {\n    if (typeof this.dataSource === \"string\") {\n      // prevent browser from caching\n      var sep = this.dataSource.indexOf(\"?\") === -1 ? \"?\" : \"&\";\n      var url = this.dataSource + sep + \"_=\" + new Date().getTime();\n      fetchDataSource(this, url);\n    } else if (typeof this.dataSource === \"function\") {\n      fetchDataSource(this, this.dataSource);\n    }\n  };\n\n  Chart.prototype.startRefresh = function startRefresh() {\n    var this$1$1 = this;\n    var refresh = this.options.refresh;\n\n    if (refresh && typeof this.dataSource !== \"string\" && typeof this.dataSource !== \"function\") {\n      throw new Error(\"Data source must be a URL or callback for refresh\");\n    }\n\n    if (!this.intervalId) {\n      if (refresh) {\n        this.intervalId = setInterval(function () {\n          this$1$1.refreshData();\n        }, refresh * 1000);\n      } else {\n        throw new Error(\"No refresh interval\");\n      }\n    }\n  };\n\n  Chart.prototype.stopRefresh = function stopRefresh() {\n    if (this.intervalId) {\n      clearInterval(this.intervalId);\n      this.intervalId = null;\n    }\n  };\n\n  Chart.prototype.toImage = function toImage(download) {\n    if (this.adapter === \"chartjs\") {\n      if (download && download.background && download.background !== \"transparent\") {\n        // https://stackoverflow.com/questions/30464750/chartjs-line-chart-set-background-color\n        var canvas = this.chart.canvas;\n        var ctx = this.chart.ctx;\n        var tmpCanvas = document.createElement(\"canvas\");\n        var tmpCtx = tmpCanvas.getContext(\"2d\");\n        tmpCanvas.width = ctx.canvas.width;\n        tmpCanvas.height = ctx.canvas.height;\n        tmpCtx.fillStyle = download.background;\n        tmpCtx.fillRect(0, 0, tmpCanvas.width, tmpCanvas.height);\n        tmpCtx.drawImage(canvas, 0, 0);\n        return tmpCanvas.toDataURL(\"image/png\");\n      } else {\n        return this.chart.toBase64Image();\n      }\n    } else {\n      throw new Error(\"Feature only available for Chart.js\");\n    }\n  };\n\n  Chart.prototype.destroy = function destroy() {\n    this.destroyed = true;\n    this.stopRefresh();\n\n    if (this.__adapterObject) {\n      this.__adapterObject.destroy(this);\n    }\n\n    if (this.__enterEvent) {\n      removeEvent(this.element, \"mouseover\", this.__enterEvent);\n    }\n\n    if (this.__leaveEvent) {\n      removeEvent(this.element, \"mouseout\", this.__leaveEvent);\n    }\n  };\n\n  Chart.prototype.__updateOptions = function __updateOptions(options) {\n    var updateRefresh = options.refresh && options.refresh !== this.options.refresh;\n    this.options = merge(Chartkick.options, options);\n\n    if (updateRefresh) {\n      this.stopRefresh();\n      this.startRefresh();\n    }\n  };\n\n  Chart.prototype.__render = function __render() {\n    this.data = this.__processData();\n    renderChart(this.__chartName(), this);\n  };\n\n  Chart.prototype.__config = function __config() {\n    return config;\n  };\n\n  var LineChart = /*@__PURE__*/function (Chart) {\n    function LineChart() {\n      Chart.apply(this, arguments);\n    }\n\n    if (Chart) LineChart.__proto__ = Chart;\n    LineChart.prototype = Object.create(Chart && Chart.prototype);\n    LineChart.prototype.constructor = LineChart;\n\n    LineChart.prototype.__processData = function __processData() {\n      return processSeries(this);\n    };\n\n    LineChart.prototype.__chartName = function __chartName() {\n      return \"LineChart\";\n    };\n\n    return LineChart;\n  }(Chart);\n\n  var PieChart = /*@__PURE__*/function (Chart) {\n    function PieChart() {\n      Chart.apply(this, arguments);\n    }\n\n    if (Chart) PieChart.__proto__ = Chart;\n    PieChart.prototype = Object.create(Chart && Chart.prototype);\n    PieChart.prototype.constructor = PieChart;\n\n    PieChart.prototype.__processData = function __processData() {\n      return processSimple(this);\n    };\n\n    PieChart.prototype.__chartName = function __chartName() {\n      return \"PieChart\";\n    };\n\n    return PieChart;\n  }(Chart);\n\n  var ColumnChart = /*@__PURE__*/function (Chart) {\n    function ColumnChart() {\n      Chart.apply(this, arguments);\n    }\n\n    if (Chart) ColumnChart.__proto__ = Chart;\n    ColumnChart.prototype = Object.create(Chart && Chart.prototype);\n    ColumnChart.prototype.constructor = ColumnChart;\n\n    ColumnChart.prototype.__processData = function __processData() {\n      return processSeries(this, null, true);\n    };\n\n    ColumnChart.prototype.__chartName = function __chartName() {\n      return \"ColumnChart\";\n    };\n\n    return ColumnChart;\n  }(Chart);\n\n  var BarChart = /*@__PURE__*/function (Chart) {\n    function BarChart() {\n      Chart.apply(this, arguments);\n    }\n\n    if (Chart) BarChart.__proto__ = Chart;\n    BarChart.prototype = Object.create(Chart && Chart.prototype);\n    BarChart.prototype.constructor = BarChart;\n\n    BarChart.prototype.__processData = function __processData() {\n      return processSeries(this, null, true);\n    };\n\n    BarChart.prototype.__chartName = function __chartName() {\n      return \"BarChart\";\n    };\n\n    return BarChart;\n  }(Chart);\n\n  var AreaChart = /*@__PURE__*/function (Chart) {\n    function AreaChart() {\n      Chart.apply(this, arguments);\n    }\n\n    if (Chart) AreaChart.__proto__ = Chart;\n    AreaChart.prototype = Object.create(Chart && Chart.prototype);\n    AreaChart.prototype.constructor = AreaChart;\n\n    AreaChart.prototype.__processData = function __processData() {\n      return processSeries(this);\n    };\n\n    AreaChart.prototype.__chartName = function __chartName() {\n      return \"AreaChart\";\n    };\n\n    return AreaChart;\n  }(Chart);\n\n  var GeoChart = /*@__PURE__*/function (Chart) {\n    function GeoChart() {\n      Chart.apply(this, arguments);\n    }\n\n    if (Chart) GeoChart.__proto__ = Chart;\n    GeoChart.prototype = Object.create(Chart && Chart.prototype);\n    GeoChart.prototype.constructor = GeoChart;\n\n    GeoChart.prototype.__processData = function __processData() {\n      return processSimple(this);\n    };\n\n    GeoChart.prototype.__chartName = function __chartName() {\n      return \"GeoChart\";\n    };\n\n    return GeoChart;\n  }(Chart);\n\n  var ScatterChart = /*@__PURE__*/function (Chart) {\n    function ScatterChart() {\n      Chart.apply(this, arguments);\n    }\n\n    if (Chart) ScatterChart.__proto__ = Chart;\n    ScatterChart.prototype = Object.create(Chart && Chart.prototype);\n    ScatterChart.prototype.constructor = ScatterChart;\n\n    ScatterChart.prototype.__processData = function __processData() {\n      return processSeries(this, \"number\");\n    };\n\n    ScatterChart.prototype.__chartName = function __chartName() {\n      return \"ScatterChart\";\n    };\n\n    return ScatterChart;\n  }(Chart);\n\n  var BubbleChart = /*@__PURE__*/function (Chart) {\n    function BubbleChart() {\n      Chart.apply(this, arguments);\n    }\n\n    if (Chart) BubbleChart.__proto__ = Chart;\n    BubbleChart.prototype = Object.create(Chart && Chart.prototype);\n    BubbleChart.prototype.constructor = BubbleChart;\n\n    BubbleChart.prototype.__processData = function __processData() {\n      return processSeries(this, \"bubble\");\n    };\n\n    BubbleChart.prototype.__chartName = function __chartName() {\n      return \"BubbleChart\";\n    };\n\n    return BubbleChart;\n  }(Chart);\n\n  var Timeline = /*@__PURE__*/function (Chart) {\n    function Timeline() {\n      Chart.apply(this, arguments);\n    }\n\n    if (Chart) Timeline.__proto__ = Chart;\n    Timeline.prototype = Object.create(Chart && Chart.prototype);\n    Timeline.prototype.constructor = Timeline;\n\n    Timeline.prototype.__processData = function __processData() {\n      var i,\n          data = this.rawData;\n\n      for (i = 0; i < data.length; i++) {\n        data[i][1] = toDate(data[i][1]);\n        data[i][2] = toDate(data[i][2]);\n      }\n\n      return data;\n    };\n\n    Timeline.prototype.__chartName = function __chartName() {\n      return \"Timeline\";\n    };\n\n    return Timeline;\n  }(Chart);\n\n  var Chartkick = {\n    LineChart: LineChart,\n    PieChart: PieChart,\n    ColumnChart: ColumnChart,\n    BarChart: BarChart,\n    AreaChart: AreaChart,\n    GeoChart: GeoChart,\n    ScatterChart: ScatterChart,\n    BubbleChart: BubbleChart,\n    Timeline: Timeline,\n    charts: {},\n    configure: function (options) {\n      for (var key in options) {\n        if (options.hasOwnProperty(key)) {\n          config[key] = options[key];\n        }\n      }\n    },\n    setDefaultOptions: function (opts) {\n      Chartkick.options = opts;\n    },\n    eachChart: function (callback) {\n      for (var chartId in Chartkick.charts) {\n        if (Chartkick.charts.hasOwnProperty(chartId)) {\n          callback(Chartkick.charts[chartId]);\n        }\n      }\n    },\n    destroyAll: function () {\n      for (var chartId in Chartkick.charts) {\n        if (Chartkick.charts.hasOwnProperty(chartId)) {\n          Chartkick.charts[chartId].destroy();\n          delete Chartkick.charts[chartId];\n        }\n      }\n    },\n    config: config,\n    options: {},\n    adapters: adapters,\n    addAdapter: addAdapter,\n    use: function (adapter) {\n      addAdapter(adapter);\n      return Chartkick;\n    }\n  }; // not ideal, but allows for simpler integration\n\n  if (typeof window !== \"undefined\" && !window.Chartkick) {\n    window.Chartkick = Chartkick; // clean up previous charts before Turbolinks loads new page\n\n    document.addEventListener(\"turbolinks:before-render\", function () {\n      if (config.autoDestroy !== false) {\n        Chartkick.destroyAll();\n      }\n    });\n    document.addEventListener(\"turbo:before-render\", function () {\n      if (config.autoDestroy !== false) {\n        Chartkick.destroyAll();\n      }\n    }); // use setTimeout so charting library can come later in same JS file\n\n    setTimeout(function () {\n      window.dispatchEvent(new Event(\"chartkick:load\"));\n    }, 0);\n  } // backwards compatibility for esm require\n\n\n  Chartkick.default = Chartkick;\n  return Chartkick;\n});","// Load all the channels within this directory and all subdirectories.\n// Channel files must be named *_channel.js.\n\nconst channels = require.context('.', true, /_channel\\.js$/)\nchannels.keys().forEach(channels)\n","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = 5;","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/*\nStimulus 3.1.0\nCopyright © 2022 Basecamp, LLC\n */\nclass EventListener {\n  constructor(eventTarget, eventName, eventOptions) {\n    this.eventTarget = eventTarget;\n    this.eventName = eventName;\n    this.eventOptions = eventOptions;\n    this.unorderedBindings = new Set();\n  }\n\n  connect() {\n    this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);\n  }\n\n  disconnect() {\n    this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);\n  }\n\n  bindingConnected(binding) {\n    this.unorderedBindings.add(binding);\n  }\n\n  bindingDisconnected(binding) {\n    this.unorderedBindings.delete(binding);\n  }\n\n  handleEvent(event) {\n    const extendedEvent = extendEvent(event);\n\n    for (const binding of this.bindings) {\n      if (extendedEvent.immediatePropagationStopped) {\n        break;\n      } else {\n        binding.handleEvent(extendedEvent);\n      }\n    }\n  }\n\n  get bindings() {\n    return Array.from(this.unorderedBindings).sort((left, right) => {\n      const leftIndex = left.index,\n            rightIndex = right.index;\n      return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n    });\n  }\n\n}\n\nfunction extendEvent(event) {\n  if (\"immediatePropagationStopped\" in event) {\n    return event;\n  } else {\n    const stopImmediatePropagation = event.stopImmediatePropagation;\n    return Object.assign(event, {\n      immediatePropagationStopped: false,\n\n      stopImmediatePropagation() {\n        this.immediatePropagationStopped = true;\n        stopImmediatePropagation.call(this);\n      }\n\n    });\n  }\n}\n\nclass Dispatcher {\n  constructor(application) {\n    this.application = application;\n    this.eventListenerMaps = new Map();\n    this.started = false;\n  }\n\n  start() {\n    if (!this.started) {\n      this.started = true;\n      this.eventListeners.forEach(eventListener => eventListener.connect());\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.started = false;\n      this.eventListeners.forEach(eventListener => eventListener.disconnect());\n    }\n  }\n\n  get eventListeners() {\n    return Array.from(this.eventListenerMaps.values()).reduce((listeners, map) => listeners.concat(Array.from(map.values())), []);\n  }\n\n  bindingConnected(binding) {\n    this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n  }\n\n  bindingDisconnected(binding) {\n    this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n  }\n\n  handleError(error, message) {\n    let detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    this.application.handleError(error, \"Error \".concat(message), detail);\n  }\n\n  fetchEventListenerForBinding(binding) {\n    const eventTarget = binding.eventTarget,\n          eventName = binding.eventName,\n          eventOptions = binding.eventOptions;\n    return this.fetchEventListener(eventTarget, eventName, eventOptions);\n  }\n\n  fetchEventListener(eventTarget, eventName, eventOptions) {\n    const eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n    const cacheKey = this.cacheKey(eventName, eventOptions);\n    let eventListener = eventListenerMap.get(cacheKey);\n\n    if (!eventListener) {\n      eventListener = this.createEventListener(eventTarget, eventName, eventOptions);\n      eventListenerMap.set(cacheKey, eventListener);\n    }\n\n    return eventListener;\n  }\n\n  createEventListener(eventTarget, eventName, eventOptions) {\n    const eventListener = new EventListener(eventTarget, eventName, eventOptions);\n\n    if (this.started) {\n      eventListener.connect();\n    }\n\n    return eventListener;\n  }\n\n  fetchEventListenerMapForEventTarget(eventTarget) {\n    let eventListenerMap = this.eventListenerMaps.get(eventTarget);\n\n    if (!eventListenerMap) {\n      eventListenerMap = new Map();\n      this.eventListenerMaps.set(eventTarget, eventListenerMap);\n    }\n\n    return eventListenerMap;\n  }\n\n  cacheKey(eventName, eventOptions) {\n    const parts = [eventName];\n    Object.keys(eventOptions).sort().forEach(key => {\n      parts.push(\"\".concat(eventOptions[key] ? \"\" : \"!\").concat(key));\n    });\n    return parts.join(\":\");\n  }\n\n}\n\nconst descriptorPattern = /^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;\n\nfunction parseActionDescriptorString(descriptorString) {\n  const source = descriptorString.trim();\n  const matches = source.match(descriptorPattern) || [];\n  return {\n    eventTarget: parseEventTarget(matches[4]),\n    eventName: matches[2],\n    eventOptions: matches[9] ? parseEventOptions(matches[9]) : {},\n    identifier: matches[5],\n    methodName: matches[7]\n  };\n}\n\nfunction parseEventTarget(eventTargetName) {\n  if (eventTargetName == \"window\") {\n    return window;\n  } else if (eventTargetName == \"document\") {\n    return document;\n  }\n}\n\nfunction parseEventOptions(eventOptions) {\n  return eventOptions.split(\":\").reduce((options, token) => Object.assign(options, {\n    [token.replace(/^!/, \"\")]: !/^!/.test(token)\n  }), {});\n}\n\nfunction stringifyEventTarget(eventTarget) {\n  if (eventTarget == window) {\n    return \"window\";\n  } else if (eventTarget == document) {\n    return \"document\";\n  }\n}\n\nfunction camelize(value) {\n  return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());\n}\n\nfunction capitalize(value) {\n  return value.charAt(0).toUpperCase() + value.slice(1);\n}\n\nfunction dasherize(value) {\n  return value.replace(/([A-Z])/g, (_, char) => \"-\".concat(char.toLowerCase()));\n}\n\nfunction tokenize(value) {\n  return value.match(/[^\\s]+/g) || [];\n}\n\nclass Action {\n  constructor(element, index, descriptor) {\n    this.element = element;\n    this.index = index;\n    this.eventTarget = descriptor.eventTarget || element;\n    this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n    this.eventOptions = descriptor.eventOptions || {};\n    this.identifier = descriptor.identifier || error(\"missing identifier\");\n    this.methodName = descriptor.methodName || error(\"missing method name\");\n  }\n\n  static forToken(token) {\n    return new this(token.element, token.index, parseActionDescriptorString(token.content));\n  }\n\n  toString() {\n    const eventNameSuffix = this.eventTargetName ? \"@\".concat(this.eventTargetName) : \"\";\n    return \"\".concat(this.eventName).concat(eventNameSuffix, \"->\").concat(this.identifier, \"#\").concat(this.methodName);\n  }\n\n  get params() {\n    const params = {};\n    const pattern = new RegExp(\"^data-\".concat(this.identifier, \"-(.+)-param$\"));\n\n    for (const _ref of Array.from(this.element.attributes)) {\n      const name = _ref.name;\n      const value = _ref.value;\n      const match = name.match(pattern);\n      const key = match && match[1];\n\n      if (key) {\n        params[camelize(key)] = typecast(value);\n      }\n    }\n\n    return params;\n  }\n\n  get eventTargetName() {\n    return stringifyEventTarget(this.eventTarget);\n  }\n\n}\n\nconst defaultEventNames = {\n  \"a\": e => \"click\",\n  \"button\": e => \"click\",\n  \"form\": e => \"submit\",\n  \"details\": e => \"toggle\",\n  \"input\": e => e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"input\",\n  \"select\": e => \"change\",\n  \"textarea\": e => \"input\"\n};\n\nfunction getDefaultEventNameForElement(element) {\n  const tagName = element.tagName.toLowerCase();\n\n  if (tagName in defaultEventNames) {\n    return defaultEventNames[tagName](element);\n  }\n}\n\nfunction error(message) {\n  throw new Error(message);\n}\n\nfunction typecast(value) {\n  try {\n    return JSON.parse(value);\n  } catch (o_O) {\n    return value;\n  }\n}\n\nclass Binding {\n  constructor(context, action) {\n    this.context = context;\n    this.action = action;\n  }\n\n  get index() {\n    return this.action.index;\n  }\n\n  get eventTarget() {\n    return this.action.eventTarget;\n  }\n\n  get eventOptions() {\n    return this.action.eventOptions;\n  }\n\n  get identifier() {\n    return this.context.identifier;\n  }\n\n  handleEvent(event) {\n    if (this.willBeInvokedByEvent(event) && this.shouldBeInvokedPerSelf(event)) {\n      this.processStopPropagation(event);\n      this.processPreventDefault(event);\n      this.invokeWithEvent(event);\n    }\n  }\n\n  get eventName() {\n    return this.action.eventName;\n  }\n\n  get method() {\n    const method = this.controller[this.methodName];\n\n    if (typeof method == \"function\") {\n      return method;\n    }\n\n    throw new Error(\"Action \\\"\".concat(this.action, \"\\\" references undefined method \\\"\").concat(this.methodName, \"\\\"\"));\n  }\n\n  processStopPropagation(event) {\n    if (this.eventOptions.stop) {\n      event.stopPropagation();\n    }\n  }\n\n  processPreventDefault(event) {\n    if (this.eventOptions.prevent) {\n      event.preventDefault();\n    }\n  }\n\n  invokeWithEvent(event) {\n    const target = event.target,\n          currentTarget = event.currentTarget;\n\n    try {\n      const params = this.action.params;\n      const actionEvent = Object.assign(event, {\n        params\n      });\n      this.method.call(this.controller, actionEvent);\n      this.context.logDebugActivity(this.methodName, {\n        event,\n        target,\n        currentTarget,\n        action: this.methodName\n      });\n    } catch (error) {\n      const identifier = this.identifier,\n            controller = this.controller,\n            element = this.element,\n            index = this.index;\n      const detail = {\n        identifier,\n        controller,\n        element,\n        index,\n        event\n      };\n      this.context.handleError(error, \"invoking action \\\"\".concat(this.action, \"\\\"\"), detail);\n    }\n  }\n\n  shouldBeInvokedPerSelf(event) {\n    if (this.action.eventOptions.self === true) {\n      return this.action.element === event.target;\n    } else {\n      return true;\n    }\n  }\n\n  willBeInvokedByEvent(event) {\n    const eventTarget = event.target;\n\n    if (this.element === eventTarget) {\n      return true;\n    } else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n      return this.scope.containsElement(eventTarget);\n    } else {\n      return this.scope.containsElement(this.action.element);\n    }\n  }\n\n  get controller() {\n    return this.context.controller;\n  }\n\n  get methodName() {\n    return this.action.methodName;\n  }\n\n  get element() {\n    return this.scope.element;\n  }\n\n  get scope() {\n    return this.context.scope;\n  }\n\n}\n\nclass ElementObserver {\n  constructor(element, delegate) {\n    this.mutationObserverInit = {\n      attributes: true,\n      childList: true,\n      subtree: true\n    };\n    this.element = element;\n    this.started = false;\n    this.delegate = delegate;\n    this.elements = new Set();\n    this.mutationObserver = new MutationObserver(mutations => this.processMutations(mutations));\n  }\n\n  start() {\n    if (!this.started) {\n      this.started = true;\n      this.mutationObserver.observe(this.element, this.mutationObserverInit);\n      this.refresh();\n    }\n  }\n\n  pause(callback) {\n    if (this.started) {\n      this.mutationObserver.disconnect();\n      this.started = false;\n    }\n\n    callback();\n\n    if (!this.started) {\n      this.mutationObserver.observe(this.element, this.mutationObserverInit);\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.mutationObserver.takeRecords();\n      this.mutationObserver.disconnect();\n      this.started = false;\n    }\n  }\n\n  refresh() {\n    if (this.started) {\n      const matches = new Set(this.matchElementsInTree());\n\n      for (const element of Array.from(this.elements)) {\n        if (!matches.has(element)) {\n          this.removeElement(element);\n        }\n      }\n\n      for (const element of Array.from(matches)) {\n        this.addElement(element);\n      }\n    }\n  }\n\n  processMutations(mutations) {\n    if (this.started) {\n      for (const mutation of mutations) {\n        this.processMutation(mutation);\n      }\n    }\n  }\n\n  processMutation(mutation) {\n    if (mutation.type == \"attributes\") {\n      this.processAttributeChange(mutation.target, mutation.attributeName);\n    } else if (mutation.type == \"childList\") {\n      this.processRemovedNodes(mutation.removedNodes);\n      this.processAddedNodes(mutation.addedNodes);\n    }\n  }\n\n  processAttributeChange(node, attributeName) {\n    const element = node;\n\n    if (this.elements.has(element)) {\n      if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n        this.delegate.elementAttributeChanged(element, attributeName);\n      } else {\n        this.removeElement(element);\n      }\n    } else if (this.matchElement(element)) {\n      this.addElement(element);\n    }\n  }\n\n  processRemovedNodes(nodes) {\n    for (const node of Array.from(nodes)) {\n      const element = this.elementFromNode(node);\n\n      if (element) {\n        this.processTree(element, this.removeElement);\n      }\n    }\n  }\n\n  processAddedNodes(nodes) {\n    for (const node of Array.from(nodes)) {\n      const element = this.elementFromNode(node);\n\n      if (element && this.elementIsActive(element)) {\n        this.processTree(element, this.addElement);\n      }\n    }\n  }\n\n  matchElement(element) {\n    return this.delegate.matchElement(element);\n  }\n\n  matchElementsInTree() {\n    let tree = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.element;\n    return this.delegate.matchElementsInTree(tree);\n  }\n\n  processTree(tree, processor) {\n    for (const element of this.matchElementsInTree(tree)) {\n      processor.call(this, element);\n    }\n  }\n\n  elementFromNode(node) {\n    if (node.nodeType == Node.ELEMENT_NODE) {\n      return node;\n    }\n  }\n\n  elementIsActive(element) {\n    if (element.isConnected != this.element.isConnected) {\n      return false;\n    } else {\n      return this.element.contains(element);\n    }\n  }\n\n  addElement(element) {\n    if (!this.elements.has(element)) {\n      if (this.elementIsActive(element)) {\n        this.elements.add(element);\n\n        if (this.delegate.elementMatched) {\n          this.delegate.elementMatched(element);\n        }\n      }\n    }\n  }\n\n  removeElement(element) {\n    if (this.elements.has(element)) {\n      this.elements.delete(element);\n\n      if (this.delegate.elementUnmatched) {\n        this.delegate.elementUnmatched(element);\n      }\n    }\n  }\n\n}\n\nclass AttributeObserver {\n  constructor(element, attributeName, delegate) {\n    this.attributeName = attributeName;\n    this.delegate = delegate;\n    this.elementObserver = new ElementObserver(element, this);\n  }\n\n  get element() {\n    return this.elementObserver.element;\n  }\n\n  get selector() {\n    return \"[\".concat(this.attributeName, \"]\");\n  }\n\n  start() {\n    this.elementObserver.start();\n  }\n\n  pause(callback) {\n    this.elementObserver.pause(callback);\n  }\n\n  stop() {\n    this.elementObserver.stop();\n  }\n\n  refresh() {\n    this.elementObserver.refresh();\n  }\n\n  get started() {\n    return this.elementObserver.started;\n  }\n\n  matchElement(element) {\n    return element.hasAttribute(this.attributeName);\n  }\n\n  matchElementsInTree(tree) {\n    const match = this.matchElement(tree) ? [tree] : [];\n    const matches = Array.from(tree.querySelectorAll(this.selector));\n    return match.concat(matches);\n  }\n\n  elementMatched(element) {\n    if (this.delegate.elementMatchedAttribute) {\n      this.delegate.elementMatchedAttribute(element, this.attributeName);\n    }\n  }\n\n  elementUnmatched(element) {\n    if (this.delegate.elementUnmatchedAttribute) {\n      this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n    }\n  }\n\n  elementAttributeChanged(element, attributeName) {\n    if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n      this.delegate.elementAttributeValueChanged(element, attributeName);\n    }\n  }\n\n}\n\nclass StringMapObserver {\n  constructor(element, delegate) {\n    this.element = element;\n    this.delegate = delegate;\n    this.started = false;\n    this.stringMap = new Map();\n    this.mutationObserver = new MutationObserver(mutations => this.processMutations(mutations));\n  }\n\n  start() {\n    if (!this.started) {\n      this.started = true;\n      this.mutationObserver.observe(this.element, {\n        attributes: true,\n        attributeOldValue: true\n      });\n      this.refresh();\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.mutationObserver.takeRecords();\n      this.mutationObserver.disconnect();\n      this.started = false;\n    }\n  }\n\n  refresh() {\n    if (this.started) {\n      for (const attributeName of this.knownAttributeNames) {\n        this.refreshAttribute(attributeName, null);\n      }\n    }\n  }\n\n  processMutations(mutations) {\n    if (this.started) {\n      for (const mutation of mutations) {\n        this.processMutation(mutation);\n      }\n    }\n  }\n\n  processMutation(mutation) {\n    const attributeName = mutation.attributeName;\n\n    if (attributeName) {\n      this.refreshAttribute(attributeName, mutation.oldValue);\n    }\n  }\n\n  refreshAttribute(attributeName, oldValue) {\n    const key = this.delegate.getStringMapKeyForAttribute(attributeName);\n\n    if (key != null) {\n      if (!this.stringMap.has(attributeName)) {\n        this.stringMapKeyAdded(key, attributeName);\n      }\n\n      const value = this.element.getAttribute(attributeName);\n\n      if (this.stringMap.get(attributeName) != value) {\n        this.stringMapValueChanged(value, key, oldValue);\n      }\n\n      if (value == null) {\n        const oldValue = this.stringMap.get(attributeName);\n        this.stringMap.delete(attributeName);\n        if (oldValue) this.stringMapKeyRemoved(key, attributeName, oldValue);\n      } else {\n        this.stringMap.set(attributeName, value);\n      }\n    }\n  }\n\n  stringMapKeyAdded(key, attributeName) {\n    if (this.delegate.stringMapKeyAdded) {\n      this.delegate.stringMapKeyAdded(key, attributeName);\n    }\n  }\n\n  stringMapValueChanged(value, key, oldValue) {\n    if (this.delegate.stringMapValueChanged) {\n      this.delegate.stringMapValueChanged(value, key, oldValue);\n    }\n  }\n\n  stringMapKeyRemoved(key, attributeName, oldValue) {\n    if (this.delegate.stringMapKeyRemoved) {\n      this.delegate.stringMapKeyRemoved(key, attributeName, oldValue);\n    }\n  }\n\n  get knownAttributeNames() {\n    return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));\n  }\n\n  get currentAttributeNames() {\n    return Array.from(this.element.attributes).map(attribute => attribute.name);\n  }\n\n  get recordedAttributeNames() {\n    return Array.from(this.stringMap.keys());\n  }\n\n}\n\nfunction add(map, key, value) {\n  fetch(map, key).add(value);\n}\n\nfunction del(map, key, value) {\n  fetch(map, key).delete(value);\n  prune(map, key);\n}\n\nfunction fetch(map, key) {\n  let values = map.get(key);\n\n  if (!values) {\n    values = new Set();\n    map.set(key, values);\n  }\n\n  return values;\n}\n\nfunction prune(map, key) {\n  const values = map.get(key);\n\n  if (values != null && values.size == 0) {\n    map.delete(key);\n  }\n}\n\nclass Multimap {\n  constructor() {\n    this.valuesByKey = new Map();\n  }\n\n  get keys() {\n    return Array.from(this.valuesByKey.keys());\n  }\n\n  get values() {\n    const sets = Array.from(this.valuesByKey.values());\n    return sets.reduce((values, set) => values.concat(Array.from(set)), []);\n  }\n\n  get size() {\n    const sets = Array.from(this.valuesByKey.values());\n    return sets.reduce((size, set) => size + set.size, 0);\n  }\n\n  add(key, value) {\n    add(this.valuesByKey, key, value);\n  }\n\n  delete(key, value) {\n    del(this.valuesByKey, key, value);\n  }\n\n  has(key, value) {\n    const values = this.valuesByKey.get(key);\n    return values != null && values.has(value);\n  }\n\n  hasKey(key) {\n    return this.valuesByKey.has(key);\n  }\n\n  hasValue(value) {\n    const sets = Array.from(this.valuesByKey.values());\n    return sets.some(set => set.has(value));\n  }\n\n  getValuesForKey(key) {\n    const values = this.valuesByKey.get(key);\n    return values ? Array.from(values) : [];\n  }\n\n  getKeysForValue(value) {\n    return Array.from(this.valuesByKey).filter(_ref2 => {\n      let _ref3 = _slicedToArray(_ref2, 2),\n          key = _ref3[0],\n          values = _ref3[1];\n\n      return values.has(value);\n    }).map(_ref4 => {\n      let _ref5 = _slicedToArray(_ref4, 2),\n          key = _ref5[0],\n          values = _ref5[1];\n\n      return key;\n    });\n  }\n\n}\n\nclass IndexedMultimap extends Multimap {\n  constructor() {\n    super();\n    this.keysByValue = new Map();\n  }\n\n  get values() {\n    return Array.from(this.keysByValue.keys());\n  }\n\n  add(key, value) {\n    super.add(key, value);\n    add(this.keysByValue, value, key);\n  }\n\n  delete(key, value) {\n    super.delete(key, value);\n    del(this.keysByValue, value, key);\n  }\n\n  hasValue(value) {\n    return this.keysByValue.has(value);\n  }\n\n  getKeysForValue(value) {\n    const set = this.keysByValue.get(value);\n    return set ? Array.from(set) : [];\n  }\n\n}\n\nclass TokenListObserver {\n  constructor(element, attributeName, delegate) {\n    this.attributeObserver = new AttributeObserver(element, attributeName, this);\n    this.delegate = delegate;\n    this.tokensByElement = new Multimap();\n  }\n\n  get started() {\n    return this.attributeObserver.started;\n  }\n\n  start() {\n    this.attributeObserver.start();\n  }\n\n  pause(callback) {\n    this.attributeObserver.pause(callback);\n  }\n\n  stop() {\n    this.attributeObserver.stop();\n  }\n\n  refresh() {\n    this.attributeObserver.refresh();\n  }\n\n  get element() {\n    return this.attributeObserver.element;\n  }\n\n  get attributeName() {\n    return this.attributeObserver.attributeName;\n  }\n\n  elementMatchedAttribute(element) {\n    this.tokensMatched(this.readTokensForElement(element));\n  }\n\n  elementAttributeValueChanged(element) {\n    const _this$refreshTokensFo = this.refreshTokensForElement(element),\n          _this$refreshTokensFo2 = _slicedToArray(_this$refreshTokensFo, 2),\n          unmatchedTokens = _this$refreshTokensFo2[0],\n          matchedTokens = _this$refreshTokensFo2[1];\n\n    this.tokensUnmatched(unmatchedTokens);\n    this.tokensMatched(matchedTokens);\n  }\n\n  elementUnmatchedAttribute(element) {\n    this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n  }\n\n  tokensMatched(tokens) {\n    tokens.forEach(token => this.tokenMatched(token));\n  }\n\n  tokensUnmatched(tokens) {\n    tokens.forEach(token => this.tokenUnmatched(token));\n  }\n\n  tokenMatched(token) {\n    this.delegate.tokenMatched(token);\n    this.tokensByElement.add(token.element, token);\n  }\n\n  tokenUnmatched(token) {\n    this.delegate.tokenUnmatched(token);\n    this.tokensByElement.delete(token.element, token);\n  }\n\n  refreshTokensForElement(element) {\n    const previousTokens = this.tokensByElement.getValuesForKey(element);\n    const currentTokens = this.readTokensForElement(element);\n    const firstDifferingIndex = zip(previousTokens, currentTokens).findIndex(_ref6 => {\n      let _ref7 = _slicedToArray(_ref6, 2),\n          previousToken = _ref7[0],\n          currentToken = _ref7[1];\n\n      return !tokensAreEqual(previousToken, currentToken);\n    });\n\n    if (firstDifferingIndex == -1) {\n      return [[], []];\n    } else {\n      return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n    }\n  }\n\n  readTokensForElement(element) {\n    const attributeName = this.attributeName;\n    const tokenString = element.getAttribute(attributeName) || \"\";\n    return parseTokenString(tokenString, element, attributeName);\n  }\n\n}\n\nfunction parseTokenString(tokenString, element, attributeName) {\n  return tokenString.trim().split(/\\s+/).filter(content => content.length).map((content, index) => ({\n    element,\n    attributeName,\n    content,\n    index\n  }));\n}\n\nfunction zip(left, right) {\n  const length = Math.max(left.length, right.length);\n  return Array.from({\n    length\n  }, (_, index) => [left[index], right[index]]);\n}\n\nfunction tokensAreEqual(left, right) {\n  return left && right && left.index == right.index && left.content == right.content;\n}\n\nclass ValueListObserver {\n  constructor(element, attributeName, delegate) {\n    this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n    this.delegate = delegate;\n    this.parseResultsByToken = new WeakMap();\n    this.valuesByTokenByElement = new WeakMap();\n  }\n\n  get started() {\n    return this.tokenListObserver.started;\n  }\n\n  start() {\n    this.tokenListObserver.start();\n  }\n\n  stop() {\n    this.tokenListObserver.stop();\n  }\n\n  refresh() {\n    this.tokenListObserver.refresh();\n  }\n\n  get element() {\n    return this.tokenListObserver.element;\n  }\n\n  get attributeName() {\n    return this.tokenListObserver.attributeName;\n  }\n\n  tokenMatched(token) {\n    const element = token.element;\n\n    const _this$fetchParseResul = this.fetchParseResultForToken(token),\n          value = _this$fetchParseResul.value;\n\n    if (value) {\n      this.fetchValuesByTokenForElement(element).set(token, value);\n      this.delegate.elementMatchedValue(element, value);\n    }\n  }\n\n  tokenUnmatched(token) {\n    const element = token.element;\n\n    const _this$fetchParseResul2 = this.fetchParseResultForToken(token),\n          value = _this$fetchParseResul2.value;\n\n    if (value) {\n      this.fetchValuesByTokenForElement(element).delete(token);\n      this.delegate.elementUnmatchedValue(element, value);\n    }\n  }\n\n  fetchParseResultForToken(token) {\n    let parseResult = this.parseResultsByToken.get(token);\n\n    if (!parseResult) {\n      parseResult = this.parseToken(token);\n      this.parseResultsByToken.set(token, parseResult);\n    }\n\n    return parseResult;\n  }\n\n  fetchValuesByTokenForElement(element) {\n    let valuesByToken = this.valuesByTokenByElement.get(element);\n\n    if (!valuesByToken) {\n      valuesByToken = new Map();\n      this.valuesByTokenByElement.set(element, valuesByToken);\n    }\n\n    return valuesByToken;\n  }\n\n  parseToken(token) {\n    try {\n      const value = this.delegate.parseValueForToken(token);\n      return {\n        value\n      };\n    } catch (error) {\n      return {\n        error\n      };\n    }\n  }\n\n}\n\nclass BindingObserver {\n  constructor(context, delegate) {\n    this.context = context;\n    this.delegate = delegate;\n    this.bindingsByAction = new Map();\n  }\n\n  start() {\n    if (!this.valueListObserver) {\n      this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n      this.valueListObserver.start();\n    }\n  }\n\n  stop() {\n    if (this.valueListObserver) {\n      this.valueListObserver.stop();\n      delete this.valueListObserver;\n      this.disconnectAllActions();\n    }\n  }\n\n  get element() {\n    return this.context.element;\n  }\n\n  get identifier() {\n    return this.context.identifier;\n  }\n\n  get actionAttribute() {\n    return this.schema.actionAttribute;\n  }\n\n  get schema() {\n    return this.context.schema;\n  }\n\n  get bindings() {\n    return Array.from(this.bindingsByAction.values());\n  }\n\n  connectAction(action) {\n    const binding = new Binding(this.context, action);\n    this.bindingsByAction.set(action, binding);\n    this.delegate.bindingConnected(binding);\n  }\n\n  disconnectAction(action) {\n    const binding = this.bindingsByAction.get(action);\n\n    if (binding) {\n      this.bindingsByAction.delete(action);\n      this.delegate.bindingDisconnected(binding);\n    }\n  }\n\n  disconnectAllActions() {\n    this.bindings.forEach(binding => this.delegate.bindingDisconnected(binding));\n    this.bindingsByAction.clear();\n  }\n\n  parseValueForToken(token) {\n    const action = Action.forToken(token);\n\n    if (action.identifier == this.identifier) {\n      return action;\n    }\n  }\n\n  elementMatchedValue(element, action) {\n    this.connectAction(action);\n  }\n\n  elementUnmatchedValue(element, action) {\n    this.disconnectAction(action);\n  }\n\n}\n\nclass ValueObserver {\n  constructor(context, receiver) {\n    this.context = context;\n    this.receiver = receiver;\n    this.stringMapObserver = new StringMapObserver(this.element, this);\n    this.valueDescriptorMap = this.controller.valueDescriptorMap;\n  }\n\n  start() {\n    this.stringMapObserver.start();\n    this.invokeChangedCallbacksForDefaultValues();\n  }\n\n  stop() {\n    this.stringMapObserver.stop();\n  }\n\n  get element() {\n    return this.context.element;\n  }\n\n  get controller() {\n    return this.context.controller;\n  }\n\n  getStringMapKeyForAttribute(attributeName) {\n    if (attributeName in this.valueDescriptorMap) {\n      return this.valueDescriptorMap[attributeName].name;\n    }\n  }\n\n  stringMapKeyAdded(key, attributeName) {\n    const descriptor = this.valueDescriptorMap[attributeName];\n\n    if (!this.hasValue(key)) {\n      this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), descriptor.writer(descriptor.defaultValue));\n    }\n  }\n\n  stringMapValueChanged(value, name, oldValue) {\n    const descriptor = this.valueDescriptorNameMap[name];\n    if (value === null) return;\n\n    if (oldValue === null) {\n      oldValue = descriptor.writer(descriptor.defaultValue);\n    }\n\n    this.invokeChangedCallback(name, value, oldValue);\n  }\n\n  stringMapKeyRemoved(key, attributeName, oldValue) {\n    const descriptor = this.valueDescriptorNameMap[key];\n\n    if (this.hasValue(key)) {\n      this.invokeChangedCallback(key, descriptor.writer(this.receiver[key]), oldValue);\n    } else {\n      this.invokeChangedCallback(key, descriptor.writer(descriptor.defaultValue), oldValue);\n    }\n  }\n\n  invokeChangedCallbacksForDefaultValues() {\n    for (const _ref8 of this.valueDescriptors) {\n      const key = _ref8.key;\n      const name = _ref8.name;\n      const defaultValue = _ref8.defaultValue;\n      const writer = _ref8.writer;\n\n      if (defaultValue != undefined && !this.controller.data.has(key)) {\n        this.invokeChangedCallback(name, writer(defaultValue), undefined);\n      }\n    }\n  }\n\n  invokeChangedCallback(name, rawValue, rawOldValue) {\n    const changedMethodName = \"\".concat(name, \"Changed\");\n    const changedMethod = this.receiver[changedMethodName];\n\n    if (typeof changedMethod == \"function\") {\n      const descriptor = this.valueDescriptorNameMap[name];\n\n      try {\n        const value = descriptor.reader(rawValue);\n        let oldValue = rawOldValue;\n\n        if (rawOldValue) {\n          oldValue = descriptor.reader(rawOldValue);\n        }\n\n        changedMethod.call(this.receiver, value, oldValue);\n      } catch (error) {\n        if (!(error instanceof TypeError)) throw error;\n        throw new TypeError(\"Stimulus Value \\\"\".concat(this.context.identifier, \".\").concat(descriptor.name, \"\\\" - \").concat(error.message));\n      }\n    }\n  }\n\n  get valueDescriptors() {\n    const valueDescriptorMap = this.valueDescriptorMap;\n    return Object.keys(valueDescriptorMap).map(key => valueDescriptorMap[key]);\n  }\n\n  get valueDescriptorNameMap() {\n    const descriptors = {};\n    Object.keys(this.valueDescriptorMap).forEach(key => {\n      const descriptor = this.valueDescriptorMap[key];\n      descriptors[descriptor.name] = descriptor;\n    });\n    return descriptors;\n  }\n\n  hasValue(attributeName) {\n    const descriptor = this.valueDescriptorNameMap[attributeName];\n    const hasMethodName = \"has\".concat(capitalize(descriptor.name));\n    return this.receiver[hasMethodName];\n  }\n\n}\n\nclass TargetObserver {\n  constructor(context, delegate) {\n    this.context = context;\n    this.delegate = delegate;\n    this.targetsByName = new Multimap();\n  }\n\n  start() {\n    if (!this.tokenListObserver) {\n      this.tokenListObserver = new TokenListObserver(this.element, this.attributeName, this);\n      this.tokenListObserver.start();\n    }\n  }\n\n  stop() {\n    if (this.tokenListObserver) {\n      this.disconnectAllTargets();\n      this.tokenListObserver.stop();\n      delete this.tokenListObserver;\n    }\n  }\n\n  tokenMatched(_ref9) {\n    let element = _ref9.element,\n        name = _ref9.content;\n\n    if (this.scope.containsElement(element)) {\n      this.connectTarget(element, name);\n    }\n  }\n\n  tokenUnmatched(_ref10) {\n    let element = _ref10.element,\n        name = _ref10.content;\n    this.disconnectTarget(element, name);\n  }\n\n  connectTarget(element, name) {\n    var _a;\n\n    if (!this.targetsByName.has(name, element)) {\n      this.targetsByName.add(name, element);\n      (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetConnected(element, name));\n    }\n  }\n\n  disconnectTarget(element, name) {\n    var _a;\n\n    if (this.targetsByName.has(name, element)) {\n      this.targetsByName.delete(name, element);\n      (_a = this.tokenListObserver) === null || _a === void 0 ? void 0 : _a.pause(() => this.delegate.targetDisconnected(element, name));\n    }\n  }\n\n  disconnectAllTargets() {\n    for (const name of this.targetsByName.keys) {\n      for (const element of this.targetsByName.getValuesForKey(name)) {\n        this.disconnectTarget(element, name);\n      }\n    }\n  }\n\n  get attributeName() {\n    return \"data-\".concat(this.context.identifier, \"-target\");\n  }\n\n  get element() {\n    return this.context.element;\n  }\n\n  get scope() {\n    return this.context.scope;\n  }\n\n}\n\nclass Context {\n  constructor(module, scope) {\n    var _this = this;\n\n    this.logDebugActivity = function (functionName) {\n      let detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n      const identifier = _this.identifier,\n            controller = _this.controller,\n            element = _this.element;\n      detail = Object.assign({\n        identifier,\n        controller,\n        element\n      }, detail);\n\n      _this.application.logDebugActivity(_this.identifier, functionName, detail);\n    };\n\n    this.module = module;\n    this.scope = scope;\n    this.controller = new module.controllerConstructor(this);\n    this.bindingObserver = new BindingObserver(this, this.dispatcher);\n    this.valueObserver = new ValueObserver(this, this.controller);\n    this.targetObserver = new TargetObserver(this, this);\n\n    try {\n      this.controller.initialize();\n      this.logDebugActivity(\"initialize\");\n    } catch (error) {\n      this.handleError(error, \"initializing controller\");\n    }\n  }\n\n  connect() {\n    this.bindingObserver.start();\n    this.valueObserver.start();\n    this.targetObserver.start();\n\n    try {\n      this.controller.connect();\n      this.logDebugActivity(\"connect\");\n    } catch (error) {\n      this.handleError(error, \"connecting controller\");\n    }\n  }\n\n  disconnect() {\n    try {\n      this.controller.disconnect();\n      this.logDebugActivity(\"disconnect\");\n    } catch (error) {\n      this.handleError(error, \"disconnecting controller\");\n    }\n\n    this.targetObserver.stop();\n    this.valueObserver.stop();\n    this.bindingObserver.stop();\n  }\n\n  get application() {\n    return this.module.application;\n  }\n\n  get identifier() {\n    return this.module.identifier;\n  }\n\n  get schema() {\n    return this.application.schema;\n  }\n\n  get dispatcher() {\n    return this.application.dispatcher;\n  }\n\n  get element() {\n    return this.scope.element;\n  }\n\n  get parentElement() {\n    return this.element.parentElement;\n  }\n\n  handleError(error, message) {\n    let detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    const identifier = this.identifier,\n          controller = this.controller,\n          element = this.element;\n    detail = Object.assign({\n      identifier,\n      controller,\n      element\n    }, detail);\n    this.application.handleError(error, \"Error \".concat(message), detail);\n  }\n\n  targetConnected(element, name) {\n    this.invokeControllerMethod(\"\".concat(name, \"TargetConnected\"), element);\n  }\n\n  targetDisconnected(element, name) {\n    this.invokeControllerMethod(\"\".concat(name, \"TargetDisconnected\"), element);\n  }\n\n  invokeControllerMethod(methodName) {\n    const controller = this.controller;\n\n    if (typeof controller[methodName] == \"function\") {\n      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n\n      controller[methodName](...args);\n    }\n  }\n\n}\n\nfunction readInheritableStaticArrayValues(constructor, propertyName) {\n  const ancestors = getAncestorsForConstructor(constructor);\n  return Array.from(ancestors.reduce((values, constructor) => {\n    getOwnStaticArrayValues(constructor, propertyName).forEach(name => values.add(name));\n    return values;\n  }, new Set()));\n}\n\nfunction readInheritableStaticObjectPairs(constructor, propertyName) {\n  const ancestors = getAncestorsForConstructor(constructor);\n  return ancestors.reduce((pairs, constructor) => {\n    pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));\n    return pairs;\n  }, []);\n}\n\nfunction getAncestorsForConstructor(constructor) {\n  const ancestors = [];\n\n  while (constructor) {\n    ancestors.push(constructor);\n    constructor = Object.getPrototypeOf(constructor);\n  }\n\n  return ancestors.reverse();\n}\n\nfunction getOwnStaticArrayValues(constructor, propertyName) {\n  const definition = constructor[propertyName];\n  return Array.isArray(definition) ? definition : [];\n}\n\nfunction getOwnStaticObjectPairs(constructor, propertyName) {\n  const definition = constructor[propertyName];\n  return definition ? Object.keys(definition).map(key => [key, definition[key]]) : [];\n}\n\nfunction bless(constructor) {\n  return shadow(constructor, getBlessedProperties(constructor));\n}\n\nfunction shadow(constructor, properties) {\n  const shadowConstructor = extend(constructor);\n  const shadowProperties = getShadowProperties(constructor.prototype, properties);\n  Object.defineProperties(shadowConstructor.prototype, shadowProperties);\n  return shadowConstructor;\n}\n\nfunction getBlessedProperties(constructor) {\n  const blessings = readInheritableStaticArrayValues(constructor, \"blessings\");\n  return blessings.reduce((blessedProperties, blessing) => {\n    const properties = blessing(constructor);\n\n    for (const key in properties) {\n      const descriptor = blessedProperties[key] || {};\n      blessedProperties[key] = Object.assign(descriptor, properties[key]);\n    }\n\n    return blessedProperties;\n  }, {});\n}\n\nfunction getShadowProperties(prototype, properties) {\n  return getOwnKeys(properties).reduce((shadowProperties, key) => {\n    const descriptor = getShadowedDescriptor(prototype, properties, key);\n\n    if (descriptor) {\n      Object.assign(shadowProperties, {\n        [key]: descriptor\n      });\n    }\n\n    return shadowProperties;\n  }, {});\n}\n\nfunction getShadowedDescriptor(prototype, properties, key) {\n  const shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);\n  const shadowedByValue = shadowingDescriptor && \"value\" in shadowingDescriptor;\n\n  if (!shadowedByValue) {\n    const descriptor = Object.getOwnPropertyDescriptor(properties, key).value;\n\n    if (shadowingDescriptor) {\n      descriptor.get = shadowingDescriptor.get || descriptor.get;\n      descriptor.set = shadowingDescriptor.set || descriptor.set;\n    }\n\n    return descriptor;\n  }\n}\n\nconst getOwnKeys = (() => {\n  if (typeof Object.getOwnPropertySymbols == \"function\") {\n    return object => [...Object.getOwnPropertyNames(object), ...Object.getOwnPropertySymbols(object)];\n  } else {\n    return Object.getOwnPropertyNames;\n  }\n})();\n\nconst extend = (() => {\n  function extendWithReflect(constructor) {\n    function extended() {\n      return Reflect.construct(constructor, arguments, new.target);\n    }\n\n    extended.prototype = Object.create(constructor.prototype, {\n      constructor: {\n        value: extended\n      }\n    });\n    Reflect.setPrototypeOf(extended, constructor);\n    return extended;\n  }\n\n  function testReflectExtension() {\n    const a = function () {\n      this.a.call(this);\n    };\n\n    const b = extendWithReflect(a);\n\n    b.prototype.a = function () {};\n\n    return new b();\n  }\n\n  try {\n    testReflectExtension();\n    return extendWithReflect;\n  } catch (error) {\n    return constructor => class extended extends constructor {};\n  }\n})();\n\nfunction blessDefinition(definition) {\n  return {\n    identifier: definition.identifier,\n    controllerConstructor: bless(definition.controllerConstructor)\n  };\n}\n\nclass Module {\n  constructor(application, definition) {\n    this.application = application;\n    this.definition = blessDefinition(definition);\n    this.contextsByScope = new WeakMap();\n    this.connectedContexts = new Set();\n  }\n\n  get identifier() {\n    return this.definition.identifier;\n  }\n\n  get controllerConstructor() {\n    return this.definition.controllerConstructor;\n  }\n\n  get contexts() {\n    return Array.from(this.connectedContexts);\n  }\n\n  connectContextForScope(scope) {\n    const context = this.fetchContextForScope(scope);\n    this.connectedContexts.add(context);\n    context.connect();\n  }\n\n  disconnectContextForScope(scope) {\n    const context = this.contextsByScope.get(scope);\n\n    if (context) {\n      this.connectedContexts.delete(context);\n      context.disconnect();\n    }\n  }\n\n  fetchContextForScope(scope) {\n    let context = this.contextsByScope.get(scope);\n\n    if (!context) {\n      context = new Context(this, scope);\n      this.contextsByScope.set(scope, context);\n    }\n\n    return context;\n  }\n\n}\n\nclass ClassMap {\n  constructor(scope) {\n    this.scope = scope;\n  }\n\n  has(name) {\n    return this.data.has(this.getDataKey(name));\n  }\n\n  get(name) {\n    return this.getAll(name)[0];\n  }\n\n  getAll(name) {\n    const tokenString = this.data.get(this.getDataKey(name)) || \"\";\n    return tokenize(tokenString);\n  }\n\n  getAttributeName(name) {\n    return this.data.getAttributeNameForKey(this.getDataKey(name));\n  }\n\n  getDataKey(name) {\n    return \"\".concat(name, \"-class\");\n  }\n\n  get data() {\n    return this.scope.data;\n  }\n\n}\n\nclass DataMap {\n  constructor(scope) {\n    this.scope = scope;\n  }\n\n  get element() {\n    return this.scope.element;\n  }\n\n  get identifier() {\n    return this.scope.identifier;\n  }\n\n  get(key) {\n    const name = this.getAttributeNameForKey(key);\n    return this.element.getAttribute(name);\n  }\n\n  set(key, value) {\n    const name = this.getAttributeNameForKey(key);\n    this.element.setAttribute(name, value);\n    return this.get(key);\n  }\n\n  has(key) {\n    const name = this.getAttributeNameForKey(key);\n    return this.element.hasAttribute(name);\n  }\n\n  delete(key) {\n    if (this.has(key)) {\n      const name = this.getAttributeNameForKey(key);\n      this.element.removeAttribute(name);\n      return true;\n    } else {\n      return false;\n    }\n  }\n\n  getAttributeNameForKey(key) {\n    return \"data-\".concat(this.identifier, \"-\").concat(dasherize(key));\n  }\n\n}\n\nclass Guide {\n  constructor(logger) {\n    this.warnedKeysByObject = new WeakMap();\n    this.logger = logger;\n  }\n\n  warn(object, key, message) {\n    let warnedKeys = this.warnedKeysByObject.get(object);\n\n    if (!warnedKeys) {\n      warnedKeys = new Set();\n      this.warnedKeysByObject.set(object, warnedKeys);\n    }\n\n    if (!warnedKeys.has(key)) {\n      warnedKeys.add(key);\n      this.logger.warn(message, object);\n    }\n  }\n\n}\n\nfunction attributeValueContainsToken(attributeName, token) {\n  return \"[\".concat(attributeName, \"~=\\\"\").concat(token, \"\\\"]\");\n}\n\nclass TargetSet {\n  constructor(scope) {\n    this.scope = scope;\n  }\n\n  get element() {\n    return this.scope.element;\n  }\n\n  get identifier() {\n    return this.scope.identifier;\n  }\n\n  get schema() {\n    return this.scope.schema;\n  }\n\n  has(targetName) {\n    return this.find(targetName) != null;\n  }\n\n  find() {\n    for (var _len2 = arguments.length, targetNames = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      targetNames[_key2] = arguments[_key2];\n    }\n\n    return targetNames.reduce((target, targetName) => target || this.findTarget(targetName) || this.findLegacyTarget(targetName), undefined);\n  }\n\n  findAll() {\n    for (var _len3 = arguments.length, targetNames = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n      targetNames[_key3] = arguments[_key3];\n    }\n\n    return targetNames.reduce((targets, targetName) => [...targets, ...this.findAllTargets(targetName), ...this.findAllLegacyTargets(targetName)], []);\n  }\n\n  findTarget(targetName) {\n    const selector = this.getSelectorForTargetName(targetName);\n    return this.scope.findElement(selector);\n  }\n\n  findAllTargets(targetName) {\n    const selector = this.getSelectorForTargetName(targetName);\n    return this.scope.findAllElements(selector);\n  }\n\n  getSelectorForTargetName(targetName) {\n    const attributeName = this.schema.targetAttributeForScope(this.identifier);\n    return attributeValueContainsToken(attributeName, targetName);\n  }\n\n  findLegacyTarget(targetName) {\n    const selector = this.getLegacySelectorForTargetName(targetName);\n    return this.deprecate(this.scope.findElement(selector), targetName);\n  }\n\n  findAllLegacyTargets(targetName) {\n    const selector = this.getLegacySelectorForTargetName(targetName);\n    return this.scope.findAllElements(selector).map(element => this.deprecate(element, targetName));\n  }\n\n  getLegacySelectorForTargetName(targetName) {\n    const targetDescriptor = \"\".concat(this.identifier, \".\").concat(targetName);\n    return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n  }\n\n  deprecate(element, targetName) {\n    if (element) {\n      const identifier = this.identifier;\n      const attributeName = this.schema.targetAttribute;\n      const revisedAttributeName = this.schema.targetAttributeForScope(identifier);\n      this.guide.warn(element, \"target:\".concat(targetName), \"Please replace \".concat(attributeName, \"=\\\"\").concat(identifier, \".\").concat(targetName, \"\\\" with \").concat(revisedAttributeName, \"=\\\"\").concat(targetName, \"\\\". \") + \"The \".concat(attributeName, \" attribute is deprecated and will be removed in a future version of Stimulus.\"));\n    }\n\n    return element;\n  }\n\n  get guide() {\n    return this.scope.guide;\n  }\n\n}\n\nclass Scope {\n  constructor(schema, element, identifier, logger) {\n    this.targets = new TargetSet(this);\n    this.classes = new ClassMap(this);\n    this.data = new DataMap(this);\n\n    this.containsElement = element => {\n      return element.closest(this.controllerSelector) === this.element;\n    };\n\n    this.schema = schema;\n    this.element = element;\n    this.identifier = identifier;\n    this.guide = new Guide(logger);\n  }\n\n  findElement(selector) {\n    return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);\n  }\n\n  findAllElements(selector) {\n    return [...(this.element.matches(selector) ? [this.element] : []), ...this.queryElements(selector).filter(this.containsElement)];\n  }\n\n  queryElements(selector) {\n    return Array.from(this.element.querySelectorAll(selector));\n  }\n\n  get controllerSelector() {\n    return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n  }\n\n}\n\nclass ScopeObserver {\n  constructor(element, schema, delegate) {\n    this.element = element;\n    this.schema = schema;\n    this.delegate = delegate;\n    this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n    this.scopesByIdentifierByElement = new WeakMap();\n    this.scopeReferenceCounts = new WeakMap();\n  }\n\n  start() {\n    this.valueListObserver.start();\n  }\n\n  stop() {\n    this.valueListObserver.stop();\n  }\n\n  get controllerAttribute() {\n    return this.schema.controllerAttribute;\n  }\n\n  parseValueForToken(token) {\n    const element = token.element,\n          identifier = token.content;\n    const scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n    let scope = scopesByIdentifier.get(identifier);\n\n    if (!scope) {\n      scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);\n      scopesByIdentifier.set(identifier, scope);\n    }\n\n    return scope;\n  }\n\n  elementMatchedValue(element, value) {\n    const referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n    this.scopeReferenceCounts.set(value, referenceCount);\n\n    if (referenceCount == 1) {\n      this.delegate.scopeConnected(value);\n    }\n  }\n\n  elementUnmatchedValue(element, value) {\n    const referenceCount = this.scopeReferenceCounts.get(value);\n\n    if (referenceCount) {\n      this.scopeReferenceCounts.set(value, referenceCount - 1);\n\n      if (referenceCount == 1) {\n        this.delegate.scopeDisconnected(value);\n      }\n    }\n  }\n\n  fetchScopesByIdentifierForElement(element) {\n    let scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n\n    if (!scopesByIdentifier) {\n      scopesByIdentifier = new Map();\n      this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n    }\n\n    return scopesByIdentifier;\n  }\n\n}\n\nclass Router {\n  constructor(application) {\n    this.application = application;\n    this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n    this.scopesByIdentifier = new Multimap();\n    this.modulesByIdentifier = new Map();\n  }\n\n  get element() {\n    return this.application.element;\n  }\n\n  get schema() {\n    return this.application.schema;\n  }\n\n  get logger() {\n    return this.application.logger;\n  }\n\n  get controllerAttribute() {\n    return this.schema.controllerAttribute;\n  }\n\n  get modules() {\n    return Array.from(this.modulesByIdentifier.values());\n  }\n\n  get contexts() {\n    return this.modules.reduce((contexts, module) => contexts.concat(module.contexts), []);\n  }\n\n  start() {\n    this.scopeObserver.start();\n  }\n\n  stop() {\n    this.scopeObserver.stop();\n  }\n\n  loadDefinition(definition) {\n    this.unloadIdentifier(definition.identifier);\n    const module = new Module(this.application, definition);\n    this.connectModule(module);\n  }\n\n  unloadIdentifier(identifier) {\n    const module = this.modulesByIdentifier.get(identifier);\n\n    if (module) {\n      this.disconnectModule(module);\n    }\n  }\n\n  getContextForElementAndIdentifier(element, identifier) {\n    const module = this.modulesByIdentifier.get(identifier);\n\n    if (module) {\n      return module.contexts.find(context => context.element == element);\n    }\n  }\n\n  handleError(error, message, detail) {\n    this.application.handleError(error, message, detail);\n  }\n\n  createScopeForElementAndIdentifier(element, identifier) {\n    return new Scope(this.schema, element, identifier, this.logger);\n  }\n\n  scopeConnected(scope) {\n    this.scopesByIdentifier.add(scope.identifier, scope);\n    const module = this.modulesByIdentifier.get(scope.identifier);\n\n    if (module) {\n      module.connectContextForScope(scope);\n    }\n  }\n\n  scopeDisconnected(scope) {\n    this.scopesByIdentifier.delete(scope.identifier, scope);\n    const module = this.modulesByIdentifier.get(scope.identifier);\n\n    if (module) {\n      module.disconnectContextForScope(scope);\n    }\n  }\n\n  connectModule(module) {\n    this.modulesByIdentifier.set(module.identifier, module);\n    const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n    scopes.forEach(scope => module.connectContextForScope(scope));\n  }\n\n  disconnectModule(module) {\n    this.modulesByIdentifier.delete(module.identifier);\n    const scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n    scopes.forEach(scope => module.disconnectContextForScope(scope));\n  }\n\n}\n\nconst defaultSchema = {\n  controllerAttribute: \"data-controller\",\n  actionAttribute: \"data-action\",\n  targetAttribute: \"data-target\",\n  targetAttributeForScope: identifier => \"data-\".concat(identifier, \"-target\")\n};\n\nclass Application {\n  constructor() {\n    var _this2 = this;\n\n    let element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document.documentElement;\n    let schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultSchema;\n    this.logger = console;\n    this.debug = false;\n\n    this.logDebugActivity = function (identifier, functionName) {\n      let detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n      if (_this2.debug) {\n        _this2.logFormattedMessage(identifier, functionName, detail);\n      }\n    };\n\n    this.element = element;\n    this.schema = schema;\n    this.dispatcher = new Dispatcher(this);\n    this.router = new Router(this);\n  }\n\n  static start(element, schema) {\n    const application = new Application(element, schema);\n    application.start();\n    return application;\n  }\n\n  async start() {\n    await domReady();\n    this.logDebugActivity(\"application\", \"starting\");\n    this.dispatcher.start();\n    this.router.start();\n    this.logDebugActivity(\"application\", \"start\");\n  }\n\n  stop() {\n    this.logDebugActivity(\"application\", \"stopping\");\n    this.dispatcher.stop();\n    this.router.stop();\n    this.logDebugActivity(\"application\", \"stop\");\n  }\n\n  register(identifier, controllerConstructor) {\n    this.load({\n      identifier,\n      controllerConstructor\n    });\n  }\n\n  load(head) {\n    for (var _len4 = arguments.length, rest = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n      rest[_key4 - 1] = arguments[_key4];\n    }\n\n    const definitions = Array.isArray(head) ? head : [head, ...rest];\n    definitions.forEach(definition => {\n      if (definition.controllerConstructor.shouldLoad) {\n        this.router.loadDefinition(definition);\n      }\n    });\n  }\n\n  unload(head) {\n    for (var _len5 = arguments.length, rest = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n      rest[_key5 - 1] = arguments[_key5];\n    }\n\n    const identifiers = Array.isArray(head) ? head : [head, ...rest];\n    identifiers.forEach(identifier => this.router.unloadIdentifier(identifier));\n  }\n\n  get controllers() {\n    return this.router.contexts.map(context => context.controller);\n  }\n\n  getControllerForElementAndIdentifier(element, identifier) {\n    const context = this.router.getContextForElementAndIdentifier(element, identifier);\n    return context ? context.controller : null;\n  }\n\n  handleError(error, message, detail) {\n    var _a;\n\n    this.logger.error(\"%s\\n\\n%o\\n\\n%o\", message, error, detail);\n    (_a = window.onerror) === null || _a === void 0 ? void 0 : _a.call(window, message, \"\", 0, 0, error);\n  }\n\n  logFormattedMessage(identifier, functionName) {\n    let detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    detail = Object.assign({\n      application: this\n    }, detail);\n    this.logger.groupCollapsed(\"\".concat(identifier, \" #\").concat(functionName));\n    this.logger.log(\"details:\", Object.assign({}, detail));\n    this.logger.groupEnd();\n  }\n\n}\n\nfunction domReady() {\n  return new Promise(resolve => {\n    if (document.readyState == \"loading\") {\n      document.addEventListener(\"DOMContentLoaded\", () => resolve());\n    } else {\n      resolve();\n    }\n  });\n}\n\nfunction ClassPropertiesBlessing(constructor) {\n  const classes = readInheritableStaticArrayValues(constructor, \"classes\");\n  return classes.reduce((properties, classDefinition) => {\n    return Object.assign(properties, propertiesForClassDefinition(classDefinition));\n  }, {});\n}\n\nfunction propertiesForClassDefinition(key) {\n  return {\n    [\"\".concat(key, \"Class\")]: {\n      get() {\n        const classes = this.classes;\n\n        if (classes.has(key)) {\n          return classes.get(key);\n        } else {\n          const attribute = classes.getAttributeName(key);\n          throw new Error(\"Missing attribute \\\"\".concat(attribute, \"\\\"\"));\n        }\n      }\n\n    },\n    [\"\".concat(key, \"Classes\")]: {\n      get() {\n        return this.classes.getAll(key);\n      }\n\n    },\n    [\"has\".concat(capitalize(key), \"Class\")]: {\n      get() {\n        return this.classes.has(key);\n      }\n\n    }\n  };\n}\n\nfunction TargetPropertiesBlessing(constructor) {\n  const targets = readInheritableStaticArrayValues(constructor, \"targets\");\n  return targets.reduce((properties, targetDefinition) => {\n    return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));\n  }, {});\n}\n\nfunction propertiesForTargetDefinition(name) {\n  return {\n    [\"\".concat(name, \"Target\")]: {\n      get() {\n        const target = this.targets.find(name);\n\n        if (target) {\n          return target;\n        } else {\n          throw new Error(\"Missing target element \\\"\".concat(name, \"\\\" for \\\"\").concat(this.identifier, \"\\\" controller\"));\n        }\n      }\n\n    },\n    [\"\".concat(name, \"Targets\")]: {\n      get() {\n        return this.targets.findAll(name);\n      }\n\n    },\n    [\"has\".concat(capitalize(name), \"Target\")]: {\n      get() {\n        return this.targets.has(name);\n      }\n\n    }\n  };\n}\n\nfunction ValuePropertiesBlessing(constructor) {\n  const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, \"values\");\n  const propertyDescriptorMap = {\n    valueDescriptorMap: {\n      get() {\n        return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {\n          const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair, this.identifier);\n          const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);\n          return Object.assign(result, {\n            [attributeName]: valueDescriptor\n          });\n        }, {});\n      }\n\n    }\n  };\n  return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {\n    return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));\n  }, propertyDescriptorMap);\n}\n\nfunction propertiesForValueDefinitionPair(valueDefinitionPair, controller) {\n  const definition = parseValueDefinitionPair(valueDefinitionPair, controller);\n  const key = definition.key,\n        name = definition.name,\n        read = definition.reader,\n        write = definition.writer;\n  return {\n    [name]: {\n      get() {\n        const value = this.data.get(key);\n\n        if (value !== null) {\n          return read(value);\n        } else {\n          return definition.defaultValue;\n        }\n      },\n\n      set(value) {\n        if (value === undefined) {\n          this.data.delete(key);\n        } else {\n          this.data.set(key, write(value));\n        }\n      }\n\n    },\n    [\"has\".concat(capitalize(name))]: {\n      get() {\n        return this.data.has(key) || definition.hasCustomDefaultValue;\n      }\n\n    }\n  };\n}\n\nfunction parseValueDefinitionPair(_ref11, controller) {\n  let _ref12 = _slicedToArray(_ref11, 2),\n      token = _ref12[0],\n      typeDefinition = _ref12[1];\n\n  return valueDescriptorForTokenAndTypeDefinition({\n    controller,\n    token,\n    typeDefinition\n  });\n}\n\nfunction parseValueTypeConstant(constant) {\n  switch (constant) {\n    case Array:\n      return \"array\";\n\n    case Boolean:\n      return \"boolean\";\n\n    case Number:\n      return \"number\";\n\n    case Object:\n      return \"object\";\n\n    case String:\n      return \"string\";\n  }\n}\n\nfunction parseValueTypeDefault(defaultValue) {\n  switch (typeof defaultValue) {\n    case \"boolean\":\n      return \"boolean\";\n\n    case \"number\":\n      return \"number\";\n\n    case \"string\":\n      return \"string\";\n  }\n\n  if (Array.isArray(defaultValue)) return \"array\";\n  if (Object.prototype.toString.call(defaultValue) === \"[object Object]\") return \"object\";\n}\n\nfunction parseValueTypeObject(payload) {\n  const typeFromObject = parseValueTypeConstant(payload.typeObject.type);\n  if (!typeFromObject) return;\n  const defaultValueType = parseValueTypeDefault(payload.typeObject.default);\n\n  if (typeFromObject !== defaultValueType) {\n    const propertyPath = payload.controller ? \"\".concat(payload.controller, \".\").concat(payload.token) : payload.token;\n    throw new Error(\"The specified default value for the Stimulus Value \\\"\".concat(propertyPath, \"\\\" must match the defined type \\\"\").concat(typeFromObject, \"\\\". The provided default value of \\\"\").concat(payload.typeObject.default, \"\\\" is of type \\\"\").concat(defaultValueType, \"\\\".\"));\n  }\n\n  return typeFromObject;\n}\n\nfunction parseValueTypeDefinition(payload) {\n  const typeFromObject = parseValueTypeObject({\n    controller: payload.controller,\n    token: payload.token,\n    typeObject: payload.typeDefinition\n  });\n  const typeFromDefaultValue = parseValueTypeDefault(payload.typeDefinition);\n  const typeFromConstant = parseValueTypeConstant(payload.typeDefinition);\n  const type = typeFromObject || typeFromDefaultValue || typeFromConstant;\n  if (type) return type;\n  const propertyPath = payload.controller ? \"\".concat(payload.controller, \".\").concat(payload.typeDefinition) : payload.token;\n  throw new Error(\"Unknown value type \\\"\".concat(propertyPath, \"\\\" for \\\"\").concat(payload.token, \"\\\" value\"));\n}\n\nfunction defaultValueForDefinition(typeDefinition) {\n  const constant = parseValueTypeConstant(typeDefinition);\n  if (constant) return defaultValuesByType[constant];\n  const defaultValue = typeDefinition.default;\n  if (defaultValue !== undefined) return defaultValue;\n  return typeDefinition;\n}\n\nfunction valueDescriptorForTokenAndTypeDefinition(payload) {\n  const key = \"\".concat(dasherize(payload.token), \"-value\");\n  const type = parseValueTypeDefinition(payload);\n  return {\n    type,\n    key,\n    name: camelize(key),\n\n    get defaultValue() {\n      return defaultValueForDefinition(payload.typeDefinition);\n    },\n\n    get hasCustomDefaultValue() {\n      return parseValueTypeDefault(payload.typeDefinition) !== undefined;\n    },\n\n    reader: readers[type],\n    writer: writers[type] || writers.default\n  };\n}\n\nconst defaultValuesByType = {\n  get array() {\n    return [];\n  },\n\n  boolean: false,\n  number: 0,\n\n  get object() {\n    return {};\n  },\n\n  string: \"\"\n};\nconst readers = {\n  array(value) {\n    const array = JSON.parse(value);\n\n    if (!Array.isArray(array)) {\n      throw new TypeError(\"expected value of type \\\"array\\\" but instead got value \\\"\".concat(value, \"\\\" of type \\\"\").concat(parseValueTypeDefault(array), \"\\\"\"));\n    }\n\n    return array;\n  },\n\n  boolean(value) {\n    return !(value == \"0\" || String(value).toLowerCase() == \"false\");\n  },\n\n  number(value) {\n    return Number(value);\n  },\n\n  object(value) {\n    const object = JSON.parse(value);\n\n    if (object === null || typeof object != \"object\" || Array.isArray(object)) {\n      throw new TypeError(\"expected value of type \\\"object\\\" but instead got value \\\"\".concat(value, \"\\\" of type \\\"\").concat(parseValueTypeDefault(object), \"\\\"\"));\n    }\n\n    return object;\n  },\n\n  string(value) {\n    return value;\n  }\n\n};\nconst writers = {\n  default: writeString,\n  array: writeJSON,\n  object: writeJSON\n};\n\nfunction writeJSON(value) {\n  return JSON.stringify(value);\n}\n\nfunction writeString(value) {\n  return \"\".concat(value);\n}\n\nclass Controller {\n  constructor(context) {\n    this.context = context;\n  }\n\n  static get shouldLoad() {\n    return true;\n  }\n\n  get application() {\n    return this.context.application;\n  }\n\n  get scope() {\n    return this.context.scope;\n  }\n\n  get element() {\n    return this.scope.element;\n  }\n\n  get identifier() {\n    return this.scope.identifier;\n  }\n\n  get targets() {\n    return this.scope.targets;\n  }\n\n  get classes() {\n    return this.scope.classes;\n  }\n\n  get data() {\n    return this.scope.data;\n  }\n\n  initialize() {}\n\n  connect() {}\n\n  disconnect() {}\n\n  dispatch(eventName) {\n    let _ref13 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n        _ref13$target = _ref13.target,\n        target = _ref13$target === void 0 ? this.element : _ref13$target,\n        _ref13$detail = _ref13.detail,\n        detail = _ref13$detail === void 0 ? {} : _ref13$detail,\n        _ref13$prefix = _ref13.prefix,\n        prefix = _ref13$prefix === void 0 ? this.identifier : _ref13$prefix,\n        _ref13$bubbles = _ref13.bubbles,\n        bubbles = _ref13$bubbles === void 0 ? true : _ref13$bubbles,\n        _ref13$cancelable = _ref13.cancelable,\n        cancelable = _ref13$cancelable === void 0 ? true : _ref13$cancelable;\n\n    const type = prefix ? \"\".concat(prefix, \":\").concat(eventName) : eventName;\n    const event = new CustomEvent(type, {\n      detail,\n      bubbles,\n      cancelable\n    });\n    target.dispatchEvent(event);\n    return event;\n  }\n\n}\n\nController.blessings = [ClassPropertiesBlessing, TargetPropertiesBlessing, ValuePropertiesBlessing];\nController.targets = [];\nController.values = {};\nexport { Application, AttributeObserver, Context, Controller, ElementObserver, IndexedMultimap, Multimap, StringMapObserver, TokenListObserver, ValueListObserver, add, defaultSchema, del, fetch, prune };","import { Application } from \"@hotwired/stimulus\"\n\nconst application = Application.start()\n\n// Configure Stimulus development experience\napplication.debug = false\nwindow.Stimulus   = application\n\nexport { application }\n","import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"filter\"\nexport default class extends Controller {\n  connect() {\n\n\n    var filter_btn = document.getElementById(\"filter_btn\");\n    if(filter_btn){filter_btn.addEventListener(\"click\", updateAllFilters)}; \n\n    function updateAllFilters() {\n      let checkboxes2 = document.querySelectorAll('.filter_cb');\n     /*  console.log(checkboxes2); */\n      var checkedValues = [];\n\n\n      for(let i = 0; i < checkboxes2.length; i++){\n        if(i > 0) {\n          if (checkboxes2[i].name != checkboxes2[i-1].name) {\n            checkedValues = [];\n          }\n        }\n\n        if(checkboxes2[i].checked == true) {\n            checkedValues.push(checkboxes2[i].value);\n            \n            checkboxes2[i].parentNode.parentNode.parentNode.getElementsByClassName(\"selected-items\")[0].innerHTML = checkedValues;\n            checkboxes2[i].parentNode.parentNode.parentNode.parentNode.getElementsByClassName(\"badge\")[0].title = checkedValues;\n            checkboxes2[i].parentNode.parentNode.parentNode.getElementsByClassName(\"selected-items\")[0].title = checkedValues; \n            if(checkedValues.length == 0){\n              checkboxes2[i].parentNode.parentNode.parentNode.parentNode.getElementsByClassName(\"badge\")[0].innerHTML = \"\";\n            } else {\n              checkboxes2[i].parentNode.parentNode.parentNode.parentNode.getElementsByClassName(\"badge\")[0].innerHTML = checkedValues.length;\n            }\n        }\n        \n        \n      }\n      \n      \n    }\n    \n    var dropdownArr = document.getElementsByClassName(\"dropdown-check-list\");\n    for(let i = 0; i < dropdownArr.length; i++) {\n      dropdownArr[i].getElementsByClassName(\"anchor\")[0].addEventListener(\"click\", toggleDropdown);\n    }\n\n\n    function toggleDropdown() {\n      if (this.parentNode.classList.contains('visible'))\n          this.parentNode.classList.remove('visible');\n      else\n          this.parentNode.classList.add('visible');\n    }\n\n\n\n    // Multiple values dropdown starts here\n    var checkboxes = document.querySelectorAll('input[type=\"checkbox\"]');\n    for(let i = 0; i < checkboxes.length; i++){\n      if(checkboxes[i].parentNode.parentNode.parentNode.getElementsByClassName(\"selected-items\")[0]) {\n        checkboxes[i].addEventListener('click', updateDropdown);\n      }\n    }\n\n\n\n    function updateDropdown() {\n      let checkedValues = [];\n      let allCheckboxes = document.getElementsByName(this.name);\n      for (var i = 0; i < allCheckboxes.length; i++) {\n        if(allCheckboxes[i].checked == true) {\n          checkedValues.push(allCheckboxes[i].value);\n        }\n      }\n     \n      this.parentNode.parentNode.parentNode.getElementsByClassName(\"selected-items\")[0].innerHTML = checkedValues;\n      this.parentNode.parentNode.parentNode.parentNode.getElementsByClassName(\"badge\")[0].title = checkedValues;\n      this.parentNode.parentNode.parentNode.getElementsByClassName(\"selected-items\")[0].title = checkedValues;\n      if(checkedValues.length == 0){\n        this.parentNode.parentNode.parentNode.parentNode.getElementsByClassName(\"badge\")[0].innerHTML = \"\";\n      } else {\n        this.parentNode.parentNode.parentNode.parentNode.getElementsByClassName(\"badge\")[0].innerHTML = checkedValues.length;\n      }\n      \n      \n      \n    }\n\n\n    \n    //To close all dropdowns when window is clicked.\n    window.addEventListener(\"click\", function(e) {\n      if(e.target.classList.contains('anchor')){\n        let parent_id = e.target.parentNode.id;\n        \n        for(let i = 0; i < dropdownArr.length; i++) {\n          if(dropdownArr[i].id != parent_id){\n            if (dropdownArr[i].classList.contains('visible')) {\n              dropdownArr[i].classList.remove('visible');\n            }\n          } \n        }\n      } else {\n        if(e.target.closest(\".dropdown-check-list\")) {\n          let dropdownCheckList_id = e.target.closest(\".dropdown-check-list\").id;\n          for(let i = 0; i < dropdownArr.length; i++) {\n            if(dropdownArr[i].id != dropdownCheckList_id){\n              if (dropdownArr[i].classList.contains('visible')) {\n                dropdownArr[i].classList.remove('visible');\n              }\n            }\n          }\n        } else {\n          for(let i = 0; i < dropdownArr.length; i++) {\n            if (dropdownArr[i].classList.contains('visible')) {\n              dropdownArr[i].classList.remove('visible');\n            }\n          }\n        }\n      }\n    });\n      \n\n  }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"flash\"\nexport default class extends Controller {\n  connect() {\n    setTimeout(() => {\n      this.dismiss()\n    }, 3000)\n  }\n\n  dismiss() {\n    this.element.remove()\n  }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"form-element\"\nexport default class extends Controller {\n  static targets = [\"submitbtn\"]\n  connect() {\n    this.submitbtnTarget.hidden = true\n  }\n\n  remotesubmit(){\n    this.submitbtnTarget.click()\n  }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n  connect() {\n    this.element.textContent = \"Hello World!\"\n  }\n}\n","import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"sign-up\"\nexport default class extends Controller {\n  connect() {\n    const inputs = document.querySelectorAll(\".sign-up-input-field\");\n\n    inputs.forEach((inp) => {\n        inp.addEventListener(\"focus\", () => {\n          inp.classList.add(\"active\");\n        });\n        inp.addEventListener(\"blur\", () => {\n          if (inp.value != \"\") return;\n          inp.classList.remove(\"active\");\n        });\n      });  \n\n  }\n}\n","import { Controller } from '@hotwired/stimulus'\n\n// Connects to data-controller=\"ticket\"\nexport default class extends Controller {\n  connect() {\n    this.handleInputFocus()\n    this.handleRadioChange()\n  }\n\n  handleInputFocus() {\n    const inputs = document.querySelectorAll('.input-field-inq')\n\n    inputs.forEach(inp => {\n      inp.addEventListener('focus', () => {\n        inp.classList.add('active')\n      })\n\n      inp.addEventListener('blur', () => {\n        if (inp.value != '') return\n        inp.classList.remove('active')\n      })\n    })\n  }\n\n  handleRadioChange() {\n    const radios = document.querySelectorAll(\n      \"input[type='radio'][name='ticket[inquiry_type_id]']\"\n    )\n\n    radios.forEach(radio => {\n      radio.addEventListener('change', () => {\n        const lastName = document.querySelector('#ticket_last_name')\n        const lastNameLabel = document.querySelector(\n          'div.col-11.col-md-6:has(#ticket_last_name) label'\n        )\n\n        if (radio.nextElementSibling.textContent.trim() == 'After Sales') {\n          lastNameLabel.innerHTML = \"Last Name: <span class='asterisk'>*</span>\"\n        } else {\n          lastNameLabel.innerHTML = 'Last Name: '\n        }\n      })\n    })\n  }\n}\n","var _templateObject, _templateObject2;\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/*\nTurbo 7.1.0\nCopyright © 2021 Basecamp, LLC\n */\n(function () {\n  if (window.Reflect === undefined || window.customElements === undefined || window.customElements.polyfillWrapFlushCallback) {\n    return;\n  }\n\n  const BuiltInHTMLElement = HTMLElement;\n  const wrapperForTheName = {\n    'HTMLElement': function HTMLElement() {\n      return Reflect.construct(BuiltInHTMLElement, [], this.constructor);\n    }\n  };\n  window.HTMLElement = wrapperForTheName['HTMLElement'];\n  HTMLElement.prototype = BuiltInHTMLElement.prototype;\n  HTMLElement.prototype.constructor = HTMLElement;\n  Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement);\n})();\n/**\n * The MIT License (MIT)\n * \n * Copyright (c) 2019 Javan Makhmali\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n\n(function (prototype) {\n  if (typeof prototype.requestSubmit == \"function\") return;\n\n  prototype.requestSubmit = function (submitter) {\n    if (submitter) {\n      validateSubmitter(submitter, this);\n      submitter.click();\n    } else {\n      submitter = document.createElement(\"input\");\n      submitter.type = \"submit\";\n      submitter.hidden = true;\n      this.appendChild(submitter);\n      submitter.click();\n      this.removeChild(submitter);\n    }\n  };\n\n  function validateSubmitter(submitter, form) {\n    submitter instanceof HTMLElement || raise(TypeError, \"parameter 1 is not of type 'HTMLElement'\");\n    submitter.type == \"submit\" || raise(TypeError, \"The specified element is not a submit button\");\n    submitter.form == form || raise(DOMException, \"The specified element is not owned by this form element\", \"NotFoundError\");\n  }\n\n  function raise(errorConstructor, message, name) {\n    throw new errorConstructor(\"Failed to execute 'requestSubmit' on 'HTMLFormElement': \" + message + \".\", name);\n  }\n})(HTMLFormElement.prototype);\n\nconst submittersByForm = new WeakMap();\n\nfunction findSubmitterFromClickTarget(target) {\n  const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n  const candidate = element ? element.closest(\"input, button\") : null;\n  return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == \"submit\" ? candidate : null;\n}\n\nfunction clickCaptured(event) {\n  const submitter = findSubmitterFromClickTarget(event.target);\n\n  if (submitter && submitter.form) {\n    submittersByForm.set(submitter.form, submitter);\n  }\n}\n\n(function () {\n  if (\"submitter\" in Event.prototype) return;\n  let prototype;\n\n  if (\"SubmitEvent\" in window && /Apple Computer/.test(navigator.vendor)) {\n    prototype = window.SubmitEvent.prototype;\n  } else if (\"SubmitEvent\" in window) {\n    return;\n  } else {\n    prototype = window.Event.prototype;\n  }\n\n  addEventListener(\"click\", clickCaptured, true);\n  Object.defineProperty(prototype, \"submitter\", {\n    get() {\n      if (this.type == \"submit\" && this.target instanceof HTMLFormElement) {\n        return submittersByForm.get(this.target);\n      }\n    }\n\n  });\n})();\n\nvar FrameLoadingStyle;\n\n(function (FrameLoadingStyle) {\n  FrameLoadingStyle[\"eager\"] = \"eager\";\n  FrameLoadingStyle[\"lazy\"] = \"lazy\";\n})(FrameLoadingStyle || (FrameLoadingStyle = {}));\n\nclass FrameElement extends HTMLElement {\n  constructor() {\n    super();\n    this.loaded = Promise.resolve();\n    this.delegate = new FrameElement.delegateConstructor(this);\n  }\n\n  static get observedAttributes() {\n    return [\"disabled\", \"loading\", \"src\"];\n  }\n\n  connectedCallback() {\n    this.delegate.connect();\n  }\n\n  disconnectedCallback() {\n    this.delegate.disconnect();\n  }\n\n  reload() {\n    const src = this.src;\n    this.src = null;\n    this.src = src;\n  }\n\n  attributeChangedCallback(name) {\n    if (name == \"loading\") {\n      this.delegate.loadingStyleChanged();\n    } else if (name == \"src\") {\n      this.delegate.sourceURLChanged();\n    } else {\n      this.delegate.disabledChanged();\n    }\n  }\n\n  get src() {\n    return this.getAttribute(\"src\");\n  }\n\n  set src(value) {\n    if (value) {\n      this.setAttribute(\"src\", value);\n    } else {\n      this.removeAttribute(\"src\");\n    }\n  }\n\n  get loading() {\n    return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\");\n  }\n\n  set loading(value) {\n    if (value) {\n      this.setAttribute(\"loading\", value);\n    } else {\n      this.removeAttribute(\"loading\");\n    }\n  }\n\n  get disabled() {\n    return this.hasAttribute(\"disabled\");\n  }\n\n  set disabled(value) {\n    if (value) {\n      this.setAttribute(\"disabled\", \"\");\n    } else {\n      this.removeAttribute(\"disabled\");\n    }\n  }\n\n  get autoscroll() {\n    return this.hasAttribute(\"autoscroll\");\n  }\n\n  set autoscroll(value) {\n    if (value) {\n      this.setAttribute(\"autoscroll\", \"\");\n    } else {\n      this.removeAttribute(\"autoscroll\");\n    }\n  }\n\n  get complete() {\n    return !this.delegate.isLoading;\n  }\n\n  get isActive() {\n    return this.ownerDocument === document && !this.isPreview;\n  }\n\n  get isPreview() {\n    var _a, _b;\n\n    return (_b = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.hasAttribute(\"data-turbo-preview\");\n  }\n\n}\n\nfunction frameLoadingStyleFromString(style) {\n  switch (style.toLowerCase()) {\n    case \"lazy\":\n      return FrameLoadingStyle.lazy;\n\n    default:\n      return FrameLoadingStyle.eager;\n  }\n}\n\nfunction expandURL(locatable) {\n  return new URL(locatable.toString(), document.baseURI);\n}\n\nfunction getAnchor(url) {\n  let anchorMatch;\n\n  if (url.hash) {\n    return url.hash.slice(1);\n  } else if (anchorMatch = url.href.match(/#(.*)$/)) {\n    return anchorMatch[1];\n  }\n}\n\nfunction getAction(form, submitter) {\n  const action = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formaction\")) || form.getAttribute(\"action\") || form.action;\n  return expandURL(action);\n}\n\nfunction getExtension(url) {\n  return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\";\n}\n\nfunction isHTML(url) {\n  return !!getExtension(url).match(/^(?:|\\.(?:htm|html|xhtml))$/);\n}\n\nfunction isPrefixedBy(baseURL, url) {\n  const prefix = getPrefix(url);\n  return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);\n}\n\nfunction locationIsVisitable(location, rootLocation) {\n  return isPrefixedBy(location, rootLocation) && isHTML(location);\n}\n\nfunction getRequestURL(url) {\n  const anchor = getAnchor(url);\n  return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;\n}\n\nfunction toCacheKey(url) {\n  return getRequestURL(url);\n}\n\nfunction urlsAreEqual(left, right) {\n  return expandURL(left).href == expandURL(right).href;\n}\n\nfunction getPathComponents(url) {\n  return url.pathname.split(\"/\").slice(1);\n}\n\nfunction getLastPathComponent(url) {\n  return getPathComponents(url).slice(-1)[0];\n}\n\nfunction getPrefix(url) {\n  return addTrailingSlash(url.origin + url.pathname);\n}\n\nfunction addTrailingSlash(value) {\n  return value.endsWith(\"/\") ? value : value + \"/\";\n}\n\nclass FetchResponse {\n  constructor(response) {\n    this.response = response;\n  }\n\n  get succeeded() {\n    return this.response.ok;\n  }\n\n  get failed() {\n    return !this.succeeded;\n  }\n\n  get clientError() {\n    return this.statusCode >= 400 && this.statusCode <= 499;\n  }\n\n  get serverError() {\n    return this.statusCode >= 500 && this.statusCode <= 599;\n  }\n\n  get redirected() {\n    return this.response.redirected;\n  }\n\n  get location() {\n    return expandURL(this.response.url);\n  }\n\n  get isHTML() {\n    return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/);\n  }\n\n  get statusCode() {\n    return this.response.status;\n  }\n\n  get contentType() {\n    return this.header(\"Content-Type\");\n  }\n\n  get responseText() {\n    return this.response.clone().text();\n  }\n\n  get responseHTML() {\n    if (this.isHTML) {\n      return this.response.clone().text();\n    } else {\n      return Promise.resolve(undefined);\n    }\n  }\n\n  header(name) {\n    return this.response.headers.get(name);\n  }\n\n}\n\nfunction dispatch(eventName) {\n  let _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n      target = _ref.target,\n      cancelable = _ref.cancelable,\n      detail = _ref.detail;\n\n  const event = new CustomEvent(eventName, {\n    cancelable,\n    bubbles: true,\n    detail\n  });\n\n  if (target && target.isConnected) {\n    target.dispatchEvent(event);\n  } else {\n    document.documentElement.dispatchEvent(event);\n  }\n\n  return event;\n}\n\nfunction nextAnimationFrame() {\n  return new Promise(resolve => requestAnimationFrame(() => resolve()));\n}\n\nfunction nextEventLoopTick() {\n  return new Promise(resolve => setTimeout(() => resolve(), 0));\n}\n\nfunction nextMicrotask() {\n  return Promise.resolve();\n}\n\nfunction parseHTMLDocument() {\n  let html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n  return new DOMParser().parseFromString(html, \"text/html\");\n}\n\nfunction unindent(strings) {\n  for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n    values[_key - 1] = arguments[_key];\n  }\n\n  const lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n  const match = lines[0].match(/^\\s+/);\n  const indent = match ? match[0].length : 0;\n  return lines.map(line => line.slice(indent)).join(\"\\n\");\n}\n\nfunction interpolate(strings, values) {\n  return strings.reduce((result, string, i) => {\n    const value = values[i] == undefined ? \"\" : values[i];\n    return result + string + value;\n  }, \"\");\n}\n\nfunction uuid() {\n  return Array.apply(null, {\n    length: 36\n  }).map((_, i) => {\n    if (i == 8 || i == 13 || i == 18 || i == 23) {\n      return \"-\";\n    } else if (i == 14) {\n      return \"4\";\n    } else if (i == 19) {\n      return (Math.floor(Math.random() * 4) + 8).toString(16);\n    } else {\n      return Math.floor(Math.random() * 15).toString(16);\n    }\n  }).join(\"\");\n}\n\nfunction getAttribute(attributeName) {\n  for (var _len2 = arguments.length, elements = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n    elements[_key2 - 1] = arguments[_key2];\n  }\n\n  for (const value of elements.map(element => element === null || element === void 0 ? void 0 : element.getAttribute(attributeName))) {\n    if (typeof value == \"string\") return value;\n  }\n\n  return null;\n}\n\nfunction markAsBusy() {\n  for (var _len3 = arguments.length, elements = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n    elements[_key3] = arguments[_key3];\n  }\n\n  for (const element of elements) {\n    if (element.localName == \"turbo-frame\") {\n      element.setAttribute(\"busy\", \"\");\n    }\n\n    element.setAttribute(\"aria-busy\", \"true\");\n  }\n}\n\nfunction clearBusyState() {\n  for (var _len4 = arguments.length, elements = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n    elements[_key4] = arguments[_key4];\n  }\n\n  for (const element of elements) {\n    if (element.localName == \"turbo-frame\") {\n      element.removeAttribute(\"busy\");\n    }\n\n    element.removeAttribute(\"aria-busy\");\n  }\n}\n\nvar FetchMethod;\n\n(function (FetchMethod) {\n  FetchMethod[FetchMethod[\"get\"] = 0] = \"get\";\n  FetchMethod[FetchMethod[\"post\"] = 1] = \"post\";\n  FetchMethod[FetchMethod[\"put\"] = 2] = \"put\";\n  FetchMethod[FetchMethod[\"patch\"] = 3] = \"patch\";\n  FetchMethod[FetchMethod[\"delete\"] = 4] = \"delete\";\n})(FetchMethod || (FetchMethod = {}));\n\nfunction fetchMethodFromString(method) {\n  switch (method.toLowerCase()) {\n    case \"get\":\n      return FetchMethod.get;\n\n    case \"post\":\n      return FetchMethod.post;\n\n    case \"put\":\n      return FetchMethod.put;\n\n    case \"patch\":\n      return FetchMethod.patch;\n\n    case \"delete\":\n      return FetchMethod.delete;\n  }\n}\n\nclass FetchRequest {\n  constructor(delegate, method, location) {\n    let body = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new URLSearchParams();\n    let target = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n    this.abortController = new AbortController();\n\n    this.resolveRequestPromise = value => {};\n\n    this.delegate = delegate;\n    this.method = method;\n    this.headers = this.defaultHeaders;\n    this.body = body;\n    this.url = location;\n    this.target = target;\n  }\n\n  get location() {\n    return this.url;\n  }\n\n  get params() {\n    return this.url.searchParams;\n  }\n\n  get entries() {\n    return this.body ? Array.from(this.body.entries()) : [];\n  }\n\n  cancel() {\n    this.abortController.abort();\n  }\n\n  async perform() {\n    var _a, _b;\n\n    const fetchOptions = this.fetchOptions;\n    (_b = (_a = this.delegate).prepareHeadersForRequest) === null || _b === void 0 ? void 0 : _b.call(_a, this.headers, this);\n    await this.allowRequestToBeIntercepted(fetchOptions);\n\n    try {\n      this.delegate.requestStarted(this);\n      const response = await fetch(this.url.href, fetchOptions);\n      return await this.receive(response);\n    } catch (error) {\n      if (error.name !== 'AbortError') {\n        this.delegate.requestErrored(this, error);\n        throw error;\n      }\n    } finally {\n      this.delegate.requestFinished(this);\n    }\n  }\n\n  async receive(response) {\n    const fetchResponse = new FetchResponse(response);\n    const event = dispatch(\"turbo:before-fetch-response\", {\n      cancelable: true,\n      detail: {\n        fetchResponse\n      },\n      target: this.target\n    });\n\n    if (event.defaultPrevented) {\n      this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n    } else if (fetchResponse.succeeded) {\n      this.delegate.requestSucceededWithResponse(this, fetchResponse);\n    } else {\n      this.delegate.requestFailedWithResponse(this, fetchResponse);\n    }\n\n    return fetchResponse;\n  }\n\n  get fetchOptions() {\n    var _a;\n\n    return {\n      method: FetchMethod[this.method].toUpperCase(),\n      credentials: \"same-origin\",\n      headers: this.headers,\n      redirect: \"follow\",\n      body: this.isIdempotent ? null : this.body,\n      signal: this.abortSignal,\n      referrer: (_a = this.delegate.referrer) === null || _a === void 0 ? void 0 : _a.href\n    };\n  }\n\n  get defaultHeaders() {\n    return {\n      \"Accept\": \"text/html, application/xhtml+xml\"\n    };\n  }\n\n  get isIdempotent() {\n    return this.method == FetchMethod.get;\n  }\n\n  get abortSignal() {\n    return this.abortController.signal;\n  }\n\n  async allowRequestToBeIntercepted(fetchOptions) {\n    const requestInterception = new Promise(resolve => this.resolveRequestPromise = resolve);\n    const event = dispatch(\"turbo:before-fetch-request\", {\n      cancelable: true,\n      detail: {\n        fetchOptions,\n        url: this.url,\n        resume: this.resolveRequestPromise\n      },\n      target: this.target\n    });\n    if (event.defaultPrevented) await requestInterception;\n  }\n\n}\n\nclass AppearanceObserver {\n  constructor(delegate, element) {\n    this.started = false;\n\n    this.intersect = entries => {\n      const lastEntry = entries.slice(-1)[0];\n\n      if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) {\n        this.delegate.elementAppearedInViewport(this.element);\n      }\n    };\n\n    this.delegate = delegate;\n    this.element = element;\n    this.intersectionObserver = new IntersectionObserver(this.intersect);\n  }\n\n  start() {\n    if (!this.started) {\n      this.started = true;\n      this.intersectionObserver.observe(this.element);\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.started = false;\n      this.intersectionObserver.unobserve(this.element);\n    }\n  }\n\n}\n\nclass StreamMessage {\n  constructor(html) {\n    this.templateElement = document.createElement(\"template\");\n    this.templateElement.innerHTML = html;\n  }\n\n  static wrap(message) {\n    if (typeof message == \"string\") {\n      return new this(message);\n    } else {\n      return message;\n    }\n  }\n\n  get fragment() {\n    const fragment = document.createDocumentFragment();\n\n    for (const element of this.foreignElements) {\n      fragment.appendChild(document.importNode(element, true));\n    }\n\n    return fragment;\n  }\n\n  get foreignElements() {\n    return this.templateChildren.reduce((streamElements, child) => {\n      if (child.tagName.toLowerCase() == \"turbo-stream\") {\n        return [...streamElements, child];\n      } else {\n        return streamElements;\n      }\n    }, []);\n  }\n\n  get templateChildren() {\n    return Array.from(this.templateElement.content.children);\n  }\n\n}\n\nStreamMessage.contentType = \"text/vnd.turbo-stream.html\";\nvar FormSubmissionState;\n\n(function (FormSubmissionState) {\n  FormSubmissionState[FormSubmissionState[\"initialized\"] = 0] = \"initialized\";\n  FormSubmissionState[FormSubmissionState[\"requesting\"] = 1] = \"requesting\";\n  FormSubmissionState[FormSubmissionState[\"waiting\"] = 2] = \"waiting\";\n  FormSubmissionState[FormSubmissionState[\"receiving\"] = 3] = \"receiving\";\n  FormSubmissionState[FormSubmissionState[\"stopping\"] = 4] = \"stopping\";\n  FormSubmissionState[FormSubmissionState[\"stopped\"] = 5] = \"stopped\";\n})(FormSubmissionState || (FormSubmissionState = {}));\n\nvar FormEnctype;\n\n(function (FormEnctype) {\n  FormEnctype[\"urlEncoded\"] = \"application/x-www-form-urlencoded\";\n  FormEnctype[\"multipart\"] = \"multipart/form-data\";\n  FormEnctype[\"plain\"] = \"text/plain\";\n})(FormEnctype || (FormEnctype = {}));\n\nfunction formEnctypeFromString(encoding) {\n  switch (encoding.toLowerCase()) {\n    case FormEnctype.multipart:\n      return FormEnctype.multipart;\n\n    case FormEnctype.plain:\n      return FormEnctype.plain;\n\n    default:\n      return FormEnctype.urlEncoded;\n  }\n}\n\nclass FormSubmission {\n  constructor(delegate, formElement, submitter) {\n    let mustRedirect = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n    this.state = FormSubmissionState.initialized;\n    this.delegate = delegate;\n    this.formElement = formElement;\n    this.submitter = submitter;\n    this.formData = buildFormData(formElement, submitter);\n    this.location = expandURL(this.action);\n\n    if (this.method == FetchMethod.get) {\n      mergeFormDataEntries(this.location, [...this.body.entries()]);\n    }\n\n    this.fetchRequest = new FetchRequest(this, this.method, this.location, this.body, this.formElement);\n    this.mustRedirect = mustRedirect;\n  }\n\n  static confirmMethod(message, element) {\n    return confirm(message);\n  }\n\n  get method() {\n    var _a;\n\n    const method = ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formmethod\")) || this.formElement.getAttribute(\"method\") || \"\";\n    return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get;\n  }\n\n  get action() {\n    var _a;\n\n    const formElementAction = typeof this.formElement.action === 'string' ? this.formElement.action : null;\n    return ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formaction\")) || this.formElement.getAttribute(\"action\") || formElementAction || \"\";\n  }\n\n  get body() {\n    if (this.enctype == FormEnctype.urlEncoded || this.method == FetchMethod.get) {\n      return new URLSearchParams(this.stringFormData);\n    } else {\n      return this.formData;\n    }\n  }\n\n  get enctype() {\n    var _a;\n\n    return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formenctype\")) || this.formElement.enctype);\n  }\n\n  get isIdempotent() {\n    return this.fetchRequest.isIdempotent;\n  }\n\n  get stringFormData() {\n    return [...this.formData].reduce((entries, _ref2) => {\n      let _ref3 = _slicedToArray(_ref2, 2),\n          name = _ref3[0],\n          value = _ref3[1];\n\n      return entries.concat(typeof value == \"string\" ? [[name, value]] : []);\n    }, []);\n  }\n\n  get confirmationMessage() {\n    return this.formElement.getAttribute(\"data-turbo-confirm\");\n  }\n\n  get needsConfirmation() {\n    return this.confirmationMessage !== null;\n  }\n\n  async start() {\n    const _FormSubmissionState = FormSubmissionState,\n          initialized = _FormSubmissionState.initialized,\n          requesting = _FormSubmissionState.requesting;\n\n    if (this.needsConfirmation) {\n      const answer = FormSubmission.confirmMethod(this.confirmationMessage, this.formElement);\n\n      if (!answer) {\n        return;\n      }\n    }\n\n    if (this.state == initialized) {\n      this.state = requesting;\n      return this.fetchRequest.perform();\n    }\n  }\n\n  stop() {\n    const _FormSubmissionState2 = FormSubmissionState,\n          stopping = _FormSubmissionState2.stopping,\n          stopped = _FormSubmissionState2.stopped;\n\n    if (this.state != stopping && this.state != stopped) {\n      this.state = stopping;\n      this.fetchRequest.cancel();\n      return true;\n    }\n  }\n\n  prepareHeadersForRequest(headers, request) {\n    if (!request.isIdempotent) {\n      const token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n\n      if (token) {\n        headers[\"X-CSRF-Token\"] = token;\n      }\n\n      headers[\"Accept\"] = [StreamMessage.contentType, headers[\"Accept\"]].join(\", \");\n    }\n  }\n\n  requestStarted(request) {\n    var _a;\n\n    this.state = FormSubmissionState.waiting;\n    (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.setAttribute(\"disabled\", \"\");\n    dispatch(\"turbo:submit-start\", {\n      target: this.formElement,\n      detail: {\n        formSubmission: this\n      }\n    });\n    this.delegate.formSubmissionStarted(this);\n  }\n\n  requestPreventedHandlingResponse(request, response) {\n    this.result = {\n      success: response.succeeded,\n      fetchResponse: response\n    };\n  }\n\n  requestSucceededWithResponse(request, response) {\n    if (response.clientError || response.serverError) {\n      this.delegate.formSubmissionFailedWithResponse(this, response);\n    } else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n      const error = new Error(\"Form responses must redirect to another location\");\n      this.delegate.formSubmissionErrored(this, error);\n    } else {\n      this.state = FormSubmissionState.receiving;\n      this.result = {\n        success: true,\n        fetchResponse: response\n      };\n      this.delegate.formSubmissionSucceededWithResponse(this, response);\n    }\n  }\n\n  requestFailedWithResponse(request, response) {\n    this.result = {\n      success: false,\n      fetchResponse: response\n    };\n    this.delegate.formSubmissionFailedWithResponse(this, response);\n  }\n\n  requestErrored(request, error) {\n    this.result = {\n      success: false,\n      error\n    };\n    this.delegate.formSubmissionErrored(this, error);\n  }\n\n  requestFinished(request) {\n    var _a;\n\n    this.state = FormSubmissionState.stopped;\n    (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.removeAttribute(\"disabled\");\n    dispatch(\"turbo:submit-end\", {\n      target: this.formElement,\n      detail: Object.assign({\n        formSubmission: this\n      }, this.result)\n    });\n    this.delegate.formSubmissionFinished(this);\n  }\n\n  requestMustRedirect(request) {\n    return !request.isIdempotent && this.mustRedirect;\n  }\n\n}\n\nfunction buildFormData(formElement, submitter) {\n  const formData = new FormData(formElement);\n  const name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"name\");\n  const value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"value\");\n\n  if (name && value != null && formData.get(name) != value) {\n    formData.append(name, value);\n  }\n\n  return formData;\n}\n\nfunction getCookieValue(cookieName) {\n  if (cookieName != null) {\n    const cookies = document.cookie ? document.cookie.split(\"; \") : [];\n    const cookie = cookies.find(cookie => cookie.startsWith(cookieName));\n\n    if (cookie) {\n      const value = cookie.split(\"=\").slice(1).join(\"=\");\n      return value ? decodeURIComponent(value) : undefined;\n    }\n  }\n}\n\nfunction getMetaContent(name) {\n  const element = document.querySelector(\"meta[name=\\\"\".concat(name, \"\\\"]\"));\n  return element && element.content;\n}\n\nfunction responseSucceededWithoutRedirect(response) {\n  return response.statusCode == 200 && !response.redirected;\n}\n\nfunction mergeFormDataEntries(url, entries) {\n  const searchParams = new URLSearchParams();\n\n  for (const _ref4 of entries) {\n    var _ref5 = _slicedToArray(_ref4, 2);\n\n    const name = _ref5[0];\n    const value = _ref5[1];\n    if (value instanceof File) continue;\n    searchParams.append(name, value);\n  }\n\n  url.search = searchParams.toString();\n  return url;\n}\n\nclass Snapshot {\n  constructor(element) {\n    this.element = element;\n  }\n\n  get children() {\n    return [...this.element.children];\n  }\n\n  hasAnchor(anchor) {\n    return this.getElementForAnchor(anchor) != null;\n  }\n\n  getElementForAnchor(anchor) {\n    return anchor ? this.element.querySelector(\"[id='\".concat(anchor, \"'], a[name='\").concat(anchor, \"']\")) : null;\n  }\n\n  get isConnected() {\n    return this.element.isConnected;\n  }\n\n  get firstAutofocusableElement() {\n    return this.element.querySelector(\"[autofocus]\");\n  }\n\n  get permanentElements() {\n    return [...this.element.querySelectorAll(\"[id][data-turbo-permanent]\")];\n  }\n\n  getPermanentElementById(id) {\n    return this.element.querySelector(\"#\".concat(id, \"[data-turbo-permanent]\"));\n  }\n\n  getPermanentElementMapForSnapshot(snapshot) {\n    const permanentElementMap = {};\n\n    for (const currentPermanentElement of this.permanentElements) {\n      const id = currentPermanentElement.id;\n      const newPermanentElement = snapshot.getPermanentElementById(id);\n\n      if (newPermanentElement) {\n        permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n      }\n    }\n\n    return permanentElementMap;\n  }\n\n}\n\nclass FormInterceptor {\n  constructor(delegate, element) {\n    this.submitBubbled = event => {\n      const form = event.target;\n\n      if (!event.defaultPrevented && form instanceof HTMLFormElement && form.closest(\"turbo-frame, html\") == this.element) {\n        const submitter = event.submitter || undefined;\n        const method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formmethod\")) || form.method;\n\n        if (method != \"dialog\" && this.delegate.shouldInterceptFormSubmission(form, submitter)) {\n          event.preventDefault();\n          event.stopImmediatePropagation();\n          this.delegate.formSubmissionIntercepted(form, submitter);\n        }\n      }\n    };\n\n    this.delegate = delegate;\n    this.element = element;\n  }\n\n  start() {\n    this.element.addEventListener(\"submit\", this.submitBubbled);\n  }\n\n  stop() {\n    this.element.removeEventListener(\"submit\", this.submitBubbled);\n  }\n\n}\n\nclass View {\n  constructor(delegate, element) {\n    this.resolveRenderPromise = value => {};\n\n    this.resolveInterceptionPromise = value => {};\n\n    this.delegate = delegate;\n    this.element = element;\n  }\n\n  scrollToAnchor(anchor) {\n    const element = this.snapshot.getElementForAnchor(anchor);\n\n    if (element) {\n      this.scrollToElement(element);\n      this.focusElement(element);\n    } else {\n      this.scrollToPosition({\n        x: 0,\n        y: 0\n      });\n    }\n  }\n\n  scrollToAnchorFromLocation(location) {\n    this.scrollToAnchor(getAnchor(location));\n  }\n\n  scrollToElement(element) {\n    element.scrollIntoView();\n  }\n\n  focusElement(element) {\n    if (element instanceof HTMLElement) {\n      if (element.hasAttribute(\"tabindex\")) {\n        element.focus();\n      } else {\n        element.setAttribute(\"tabindex\", \"-1\");\n        element.focus();\n        element.removeAttribute(\"tabindex\");\n      }\n    }\n  }\n\n  scrollToPosition(_ref6) {\n    let x = _ref6.x,\n        y = _ref6.y;\n    this.scrollRoot.scrollTo(x, y);\n  }\n\n  scrollToTop() {\n    this.scrollToPosition({\n      x: 0,\n      y: 0\n    });\n  }\n\n  get scrollRoot() {\n    return window;\n  }\n\n  async render(renderer) {\n    const isPreview = renderer.isPreview,\n          shouldRender = renderer.shouldRender,\n          snapshot = renderer.newSnapshot;\n\n    if (shouldRender) {\n      try {\n        this.renderPromise = new Promise(resolve => this.resolveRenderPromise = resolve);\n        this.renderer = renderer;\n        this.prepareToRenderSnapshot(renderer);\n        const renderInterception = new Promise(resolve => this.resolveInterceptionPromise = resolve);\n        const immediateRender = this.delegate.allowsImmediateRender(snapshot, this.resolveInterceptionPromise);\n        if (!immediateRender) await renderInterception;\n        await this.renderSnapshot(renderer);\n        this.delegate.viewRenderedSnapshot(snapshot, isPreview);\n        this.finishRenderingSnapshot(renderer);\n      } finally {\n        delete this.renderer;\n        this.resolveRenderPromise(undefined);\n        delete this.renderPromise;\n      }\n    } else {\n      this.invalidate();\n    }\n  }\n\n  invalidate() {\n    this.delegate.viewInvalidated();\n  }\n\n  prepareToRenderSnapshot(renderer) {\n    this.markAsPreview(renderer.isPreview);\n    renderer.prepareToRender();\n  }\n\n  markAsPreview(isPreview) {\n    if (isPreview) {\n      this.element.setAttribute(\"data-turbo-preview\", \"\");\n    } else {\n      this.element.removeAttribute(\"data-turbo-preview\");\n    }\n  }\n\n  async renderSnapshot(renderer) {\n    await renderer.render();\n  }\n\n  finishRenderingSnapshot(renderer) {\n    renderer.finishRendering();\n  }\n\n}\n\nclass FrameView extends View {\n  invalidate() {\n    this.element.innerHTML = \"\";\n  }\n\n  get snapshot() {\n    return new Snapshot(this.element);\n  }\n\n}\n\nclass LinkInterceptor {\n  constructor(delegate, element) {\n    this.clickBubbled = event => {\n      if (this.respondsToEventTarget(event.target)) {\n        this.clickEvent = event;\n      } else {\n        delete this.clickEvent;\n      }\n    };\n\n    this.linkClicked = event => {\n      if (this.clickEvent && this.respondsToEventTarget(event.target) && event.target instanceof Element) {\n        if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url)) {\n          this.clickEvent.preventDefault();\n          event.preventDefault();\n          this.delegate.linkClickIntercepted(event.target, event.detail.url);\n        }\n      }\n\n      delete this.clickEvent;\n    };\n\n    this.willVisit = () => {\n      delete this.clickEvent;\n    };\n\n    this.delegate = delegate;\n    this.element = element;\n  }\n\n  start() {\n    this.element.addEventListener(\"click\", this.clickBubbled);\n    document.addEventListener(\"turbo:click\", this.linkClicked);\n    document.addEventListener(\"turbo:before-visit\", this.willVisit);\n  }\n\n  stop() {\n    this.element.removeEventListener(\"click\", this.clickBubbled);\n    document.removeEventListener(\"turbo:click\", this.linkClicked);\n    document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n  }\n\n  respondsToEventTarget(target) {\n    const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n    return element && element.closest(\"turbo-frame, html\") == this.element;\n  }\n\n}\n\nclass Bardo {\n  constructor(permanentElementMap) {\n    this.permanentElementMap = permanentElementMap;\n  }\n\n  static preservingPermanentElements(permanentElementMap, callback) {\n    const bardo = new this(permanentElementMap);\n    bardo.enter();\n    callback();\n    bardo.leave();\n  }\n\n  enter() {\n    for (const id in this.permanentElementMap) {\n      const _this$permanentElemen = _slicedToArray(this.permanentElementMap[id], 2),\n            newPermanentElement = _this$permanentElemen[1];\n\n      this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n    }\n  }\n\n  leave() {\n    for (const id in this.permanentElementMap) {\n      const _this$permanentElemen2 = _slicedToArray(this.permanentElementMap[id], 1),\n            currentPermanentElement = _this$permanentElemen2[0];\n\n      this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n      this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n    }\n  }\n\n  replaceNewPermanentElementWithPlaceholder(permanentElement) {\n    const placeholder = createPlaceholderForPermanentElement(permanentElement);\n    permanentElement.replaceWith(placeholder);\n  }\n\n  replaceCurrentPermanentElementWithClone(permanentElement) {\n    const clone = permanentElement.cloneNode(true);\n    permanentElement.replaceWith(clone);\n  }\n\n  replacePlaceholderWithPermanentElement(permanentElement) {\n    const placeholder = this.getPlaceholderById(permanentElement.id);\n    placeholder === null || placeholder === void 0 ? void 0 : placeholder.replaceWith(permanentElement);\n  }\n\n  getPlaceholderById(id) {\n    return this.placeholders.find(element => element.content == id);\n  }\n\n  get placeholders() {\n    return [...document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\")];\n  }\n\n}\n\nfunction createPlaceholderForPermanentElement(permanentElement) {\n  const element = document.createElement(\"meta\");\n  element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n  element.setAttribute(\"content\", permanentElement.id);\n  return element;\n}\n\nclass Renderer {\n  constructor(currentSnapshot, newSnapshot, isPreview) {\n    let willRender = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n    this.currentSnapshot = currentSnapshot;\n    this.newSnapshot = newSnapshot;\n    this.isPreview = isPreview;\n    this.willRender = willRender;\n    this.promise = new Promise((resolve, reject) => this.resolvingFunctions = {\n      resolve,\n      reject\n    });\n  }\n\n  get shouldRender() {\n    return true;\n  }\n\n  prepareToRender() {\n    return;\n  }\n\n  finishRendering() {\n    if (this.resolvingFunctions) {\n      this.resolvingFunctions.resolve();\n      delete this.resolvingFunctions;\n    }\n  }\n\n  createScriptElement(element) {\n    if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n      return element;\n    } else {\n      const createdScriptElement = document.createElement(\"script\");\n\n      if (this.cspNonce) {\n        createdScriptElement.nonce = this.cspNonce;\n      }\n\n      createdScriptElement.textContent = element.textContent;\n      createdScriptElement.async = false;\n      copyElementAttributes(createdScriptElement, element);\n      return createdScriptElement;\n    }\n  }\n\n  preservingPermanentElements(callback) {\n    Bardo.preservingPermanentElements(this.permanentElementMap, callback);\n  }\n\n  focusFirstAutofocusableElement() {\n    const element = this.connectedSnapshot.firstAutofocusableElement;\n\n    if (elementIsFocusable(element)) {\n      element.focus();\n    }\n  }\n\n  get connectedSnapshot() {\n    return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;\n  }\n\n  get currentElement() {\n    return this.currentSnapshot.element;\n  }\n\n  get newElement() {\n    return this.newSnapshot.element;\n  }\n\n  get permanentElementMap() {\n    return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);\n  }\n\n  get cspNonce() {\n    var _a;\n\n    return (_a = document.head.querySelector('meta[name=\"csp-nonce\"]')) === null || _a === void 0 ? void 0 : _a.getAttribute(\"content\");\n  }\n\n}\n\nfunction copyElementAttributes(destinationElement, sourceElement) {\n  for (const _ref7 of [...sourceElement.attributes]) {\n    const name = _ref7.name;\n    const value = _ref7.value;\n    destinationElement.setAttribute(name, value);\n  }\n}\n\nfunction elementIsFocusable(element) {\n  return element && typeof element.focus == \"function\";\n}\n\nclass FrameRenderer extends Renderer {\n  get shouldRender() {\n    return true;\n  }\n\n  async render() {\n    await nextAnimationFrame();\n    this.preservingPermanentElements(() => {\n      this.loadFrameElement();\n    });\n    this.scrollFrameIntoView();\n    await nextAnimationFrame();\n    this.focusFirstAutofocusableElement();\n    await nextAnimationFrame();\n    this.activateScriptElements();\n  }\n\n  loadFrameElement() {\n    var _a;\n\n    const destinationRange = document.createRange();\n    destinationRange.selectNodeContents(this.currentElement);\n    destinationRange.deleteContents();\n    const frameElement = this.newElement;\n    const sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange();\n\n    if (sourceRange) {\n      sourceRange.selectNodeContents(frameElement);\n      this.currentElement.appendChild(sourceRange.extractContents());\n    }\n  }\n\n  scrollFrameIntoView() {\n    if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n      const element = this.currentElement.firstElementChild;\n      const block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n\n      if (element) {\n        element.scrollIntoView({\n          block\n        });\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  activateScriptElements() {\n    for (const inertScriptElement of this.newScriptElements) {\n      const activatedScriptElement = this.createScriptElement(inertScriptElement);\n      inertScriptElement.replaceWith(activatedScriptElement);\n    }\n  }\n\n  get newScriptElements() {\n    return this.currentElement.querySelectorAll(\"script\");\n  }\n\n}\n\nfunction readScrollLogicalPosition(value, defaultValue) {\n  if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n    return value;\n  } else {\n    return defaultValue;\n  }\n}\n\nclass ProgressBar {\n  constructor() {\n    this.hiding = false;\n    this.value = 0;\n    this.visible = false;\n\n    this.trickle = () => {\n      this.setValue(this.value + Math.random() / 100);\n    };\n\n    this.stylesheetElement = this.createStylesheetElement();\n    this.progressElement = this.createProgressElement();\n    this.installStylesheetElement();\n    this.setValue(0);\n  }\n\n  static get defaultCSS() {\n    return unindent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\n      .turbo-progress-bar {\\n        position: fixed;\\n        display: block;\\n        top: 0;\\n        left: 0;\\n        height: 3px;\\n        background: #0076ff;\\n        z-index: 9999;\\n        transition:\\n          width \", \"ms ease-out,\\n          opacity \", \"ms \", \"ms ease-in;\\n        transform: translate3d(0, 0, 0);\\n      }\\n    \"])), ProgressBar.animationDuration, ProgressBar.animationDuration / 2, ProgressBar.animationDuration / 2);\n  }\n\n  show() {\n    if (!this.visible) {\n      this.visible = true;\n      this.installProgressElement();\n      this.startTrickling();\n    }\n  }\n\n  hide() {\n    if (this.visible && !this.hiding) {\n      this.hiding = true;\n      this.fadeProgressElement(() => {\n        this.uninstallProgressElement();\n        this.stopTrickling();\n        this.visible = false;\n        this.hiding = false;\n      });\n    }\n  }\n\n  setValue(value) {\n    this.value = value;\n    this.refresh();\n  }\n\n  installStylesheetElement() {\n    document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n  }\n\n  installProgressElement() {\n    this.progressElement.style.width = \"0\";\n    this.progressElement.style.opacity = \"1\";\n    document.documentElement.insertBefore(this.progressElement, document.body);\n    this.refresh();\n  }\n\n  fadeProgressElement(callback) {\n    this.progressElement.style.opacity = \"0\";\n    setTimeout(callback, ProgressBar.animationDuration * 1.5);\n  }\n\n  uninstallProgressElement() {\n    if (this.progressElement.parentNode) {\n      document.documentElement.removeChild(this.progressElement);\n    }\n  }\n\n  startTrickling() {\n    if (!this.trickleInterval) {\n      this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n    }\n  }\n\n  stopTrickling() {\n    window.clearInterval(this.trickleInterval);\n    delete this.trickleInterval;\n  }\n\n  refresh() {\n    requestAnimationFrame(() => {\n      this.progressElement.style.width = \"\".concat(10 + this.value * 90, \"%\");\n    });\n  }\n\n  createStylesheetElement() {\n    const element = document.createElement(\"style\");\n    element.type = \"text/css\";\n    element.textContent = ProgressBar.defaultCSS;\n    return element;\n  }\n\n  createProgressElement() {\n    const element = document.createElement(\"div\");\n    element.className = \"turbo-progress-bar\";\n    return element;\n  }\n\n}\n\nProgressBar.animationDuration = 300;\n\nclass HeadSnapshot extends Snapshot {\n  constructor() {\n    super(...arguments);\n    this.detailsByOuterHTML = this.children.filter(element => !elementIsNoscript(element)).map(element => elementWithoutNonce(element)).reduce((result, element) => {\n      const outerHTML = element.outerHTML;\n      const details = outerHTML in result ? result[outerHTML] : {\n        type: elementType(element),\n        tracked: elementIsTracked(element),\n        elements: []\n      };\n      return Object.assign(Object.assign({}, result), {\n        [outerHTML]: Object.assign(Object.assign({}, details), {\n          elements: [...details.elements, element]\n        })\n      });\n    }, {});\n  }\n\n  get trackedElementSignature() {\n    return Object.keys(this.detailsByOuterHTML).filter(outerHTML => this.detailsByOuterHTML[outerHTML].tracked).join(\"\");\n  }\n\n  getScriptElementsNotInSnapshot(snapshot) {\n    return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot);\n  }\n\n  getStylesheetElementsNotInSnapshot(snapshot) {\n    return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot);\n  }\n\n  getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n    return Object.keys(this.detailsByOuterHTML).filter(outerHTML => !(outerHTML in snapshot.detailsByOuterHTML)).map(outerHTML => this.detailsByOuterHTML[outerHTML]).filter(_ref8 => {\n      let type = _ref8.type;\n      return type == matchedType;\n    }).map(_ref9 => {\n      let _ref9$elements = _slicedToArray(_ref9.elements, 1),\n          element = _ref9$elements[0];\n\n      return element;\n    });\n  }\n\n  get provisionalElements() {\n    return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n      const _this$detailsByOuterH = this.detailsByOuterHTML[outerHTML],\n            type = _this$detailsByOuterH.type,\n            tracked = _this$detailsByOuterH.tracked,\n            elements = _this$detailsByOuterH.elements;\n\n      if (type == null && !tracked) {\n        return [...result, ...elements];\n      } else if (elements.length > 1) {\n        return [...result, ...elements.slice(1)];\n      } else {\n        return result;\n      }\n    }, []);\n  }\n\n  getMetaValue(name) {\n    const element = this.findMetaElementByName(name);\n    return element ? element.getAttribute(\"content\") : null;\n  }\n\n  findMetaElementByName(name) {\n    return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n      const _this$detailsByOuterH2 = _slicedToArray(this.detailsByOuterHTML[outerHTML].elements, 1),\n            element = _this$detailsByOuterH2[0];\n\n      return elementIsMetaElementWithName(element, name) ? element : result;\n    }, undefined);\n  }\n\n}\n\nfunction elementType(element) {\n  if (elementIsScript(element)) {\n    return \"script\";\n  } else if (elementIsStylesheet(element)) {\n    return \"stylesheet\";\n  }\n}\n\nfunction elementIsTracked(element) {\n  return element.getAttribute(\"data-turbo-track\") == \"reload\";\n}\n\nfunction elementIsScript(element) {\n  const tagName = element.tagName.toLowerCase();\n  return tagName == \"script\";\n}\n\nfunction elementIsNoscript(element) {\n  const tagName = element.tagName.toLowerCase();\n  return tagName == \"noscript\";\n}\n\nfunction elementIsStylesheet(element) {\n  const tagName = element.tagName.toLowerCase();\n  return tagName == \"style\" || tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\";\n}\n\nfunction elementIsMetaElementWithName(element, name) {\n  const tagName = element.tagName.toLowerCase();\n  return tagName == \"meta\" && element.getAttribute(\"name\") == name;\n}\n\nfunction elementWithoutNonce(element) {\n  if (element.hasAttribute(\"nonce\")) {\n    element.setAttribute(\"nonce\", \"\");\n  }\n\n  return element;\n}\n\nclass PageSnapshot extends Snapshot {\n  constructor(element, headSnapshot) {\n    super(element);\n    this.headSnapshot = headSnapshot;\n  }\n\n  static fromHTMLString() {\n    let html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n    return this.fromDocument(parseHTMLDocument(html));\n  }\n\n  static fromElement(element) {\n    return this.fromDocument(element.ownerDocument);\n  }\n\n  static fromDocument(_ref10) {\n    let head = _ref10.head,\n        body = _ref10.body;\n    return new this(body, new HeadSnapshot(head));\n  }\n\n  clone() {\n    return new PageSnapshot(this.element.cloneNode(true), this.headSnapshot);\n  }\n\n  get headElement() {\n    return this.headSnapshot.element;\n  }\n\n  get rootLocation() {\n    var _a;\n\n    const root = (_a = this.getSetting(\"root\")) !== null && _a !== void 0 ? _a : \"/\";\n    return expandURL(root);\n  }\n\n  get cacheControlValue() {\n    return this.getSetting(\"cache-control\");\n  }\n\n  get isPreviewable() {\n    return this.cacheControlValue != \"no-preview\";\n  }\n\n  get isCacheable() {\n    return this.cacheControlValue != \"no-cache\";\n  }\n\n  get isVisitable() {\n    return this.getSetting(\"visit-control\") != \"reload\";\n  }\n\n  getSetting(name) {\n    return this.headSnapshot.getMetaValue(\"turbo-\".concat(name));\n  }\n\n}\n\nvar TimingMetric;\n\n(function (TimingMetric) {\n  TimingMetric[\"visitStart\"] = \"visitStart\";\n  TimingMetric[\"requestStart\"] = \"requestStart\";\n  TimingMetric[\"requestEnd\"] = \"requestEnd\";\n  TimingMetric[\"visitEnd\"] = \"visitEnd\";\n})(TimingMetric || (TimingMetric = {}));\n\nvar VisitState;\n\n(function (VisitState) {\n  VisitState[\"initialized\"] = \"initialized\";\n  VisitState[\"started\"] = \"started\";\n  VisitState[\"canceled\"] = \"canceled\";\n  VisitState[\"failed\"] = \"failed\";\n  VisitState[\"completed\"] = \"completed\";\n})(VisitState || (VisitState = {}));\n\nconst defaultOptions = {\n  action: \"advance\",\n  historyChanged: false,\n  visitCachedSnapshot: () => {},\n  willRender: true\n};\nvar SystemStatusCode;\n\n(function (SystemStatusCode) {\n  SystemStatusCode[SystemStatusCode[\"networkFailure\"] = 0] = \"networkFailure\";\n  SystemStatusCode[SystemStatusCode[\"timeoutFailure\"] = -1] = \"timeoutFailure\";\n  SystemStatusCode[SystemStatusCode[\"contentTypeMismatch\"] = -2] = \"contentTypeMismatch\";\n})(SystemStatusCode || (SystemStatusCode = {}));\n\nclass Visit {\n  constructor(delegate, location, restorationIdentifier) {\n    let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n    this.identifier = uuid();\n    this.timingMetrics = {};\n    this.followedRedirect = false;\n    this.historyChanged = false;\n    this.scrolled = false;\n    this.snapshotCached = false;\n    this.state = VisitState.initialized;\n    this.delegate = delegate;\n    this.location = location;\n    this.restorationIdentifier = restorationIdentifier || uuid();\n\n    const _Object$assign = Object.assign(Object.assign({}, defaultOptions), options),\n          action = _Object$assign.action,\n          historyChanged = _Object$assign.historyChanged,\n          referrer = _Object$assign.referrer,\n          snapshotHTML = _Object$assign.snapshotHTML,\n          response = _Object$assign.response,\n          visitCachedSnapshot = _Object$assign.visitCachedSnapshot,\n          willRender = _Object$assign.willRender;\n\n    this.action = action;\n    this.historyChanged = historyChanged;\n    this.referrer = referrer;\n    this.snapshotHTML = snapshotHTML;\n    this.response = response;\n    this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action);\n    this.visitCachedSnapshot = visitCachedSnapshot;\n    this.willRender = willRender;\n    this.scrolled = !willRender;\n  }\n\n  get adapter() {\n    return this.delegate.adapter;\n  }\n\n  get view() {\n    return this.delegate.view;\n  }\n\n  get history() {\n    return this.delegate.history;\n  }\n\n  get restorationData() {\n    return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);\n  }\n\n  get silent() {\n    return this.isSamePage;\n  }\n\n  start() {\n    if (this.state == VisitState.initialized) {\n      this.recordTimingMetric(TimingMetric.visitStart);\n      this.state = VisitState.started;\n      this.adapter.visitStarted(this);\n      this.delegate.visitStarted(this);\n    }\n  }\n\n  cancel() {\n    if (this.state == VisitState.started) {\n      if (this.request) {\n        this.request.cancel();\n      }\n\n      this.cancelRender();\n      this.state = VisitState.canceled;\n    }\n  }\n\n  complete() {\n    if (this.state == VisitState.started) {\n      this.recordTimingMetric(TimingMetric.visitEnd);\n      this.state = VisitState.completed;\n      this.adapter.visitCompleted(this);\n      this.delegate.visitCompleted(this);\n      this.followRedirect();\n    }\n  }\n\n  fail() {\n    if (this.state == VisitState.started) {\n      this.state = VisitState.failed;\n      this.adapter.visitFailed(this);\n    }\n  }\n\n  changeHistory() {\n    var _a;\n\n    if (!this.historyChanged) {\n      const actionForHistory = this.location.href === ((_a = this.referrer) === null || _a === void 0 ? void 0 : _a.href) ? \"replace\" : this.action;\n      const method = this.getHistoryMethodForAction(actionForHistory);\n      this.history.update(method, this.location, this.restorationIdentifier);\n      this.historyChanged = true;\n    }\n  }\n\n  issueRequest() {\n    if (this.hasPreloadedResponse()) {\n      this.simulateRequest();\n    } else if (this.shouldIssueRequest() && !this.request) {\n      this.request = new FetchRequest(this, FetchMethod.get, this.location);\n      this.request.perform();\n    }\n  }\n\n  simulateRequest() {\n    if (this.response) {\n      this.startRequest();\n      this.recordResponse();\n      this.finishRequest();\n    }\n  }\n\n  startRequest() {\n    this.recordTimingMetric(TimingMetric.requestStart);\n    this.adapter.visitRequestStarted(this);\n  }\n\n  recordResponse() {\n    let response = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.response;\n    this.response = response;\n\n    if (response) {\n      const statusCode = response.statusCode;\n\n      if (isSuccessful(statusCode)) {\n        this.adapter.visitRequestCompleted(this);\n      } else {\n        this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n      }\n    }\n  }\n\n  finishRequest() {\n    this.recordTimingMetric(TimingMetric.requestEnd);\n    this.adapter.visitRequestFinished(this);\n  }\n\n  loadResponse() {\n    if (this.response) {\n      const _this$response = this.response,\n            statusCode = _this$response.statusCode,\n            responseHTML = _this$response.responseHTML;\n      this.render(async () => {\n        this.cacheSnapshot();\n        if (this.view.renderPromise) await this.view.renderPromise;\n\n        if (isSuccessful(statusCode) && responseHTML != null) {\n          await this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML), false, this.willRender);\n          this.adapter.visitRendered(this);\n          this.complete();\n        } else {\n          await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML));\n          this.adapter.visitRendered(this);\n          this.fail();\n        }\n      });\n    }\n  }\n\n  getCachedSnapshot() {\n    const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n\n    if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n      if (this.action == \"restore\" || snapshot.isPreviewable) {\n        return snapshot;\n      }\n    }\n  }\n\n  getPreloadedSnapshot() {\n    if (this.snapshotHTML) {\n      return PageSnapshot.fromHTMLString(this.snapshotHTML);\n    }\n  }\n\n  hasCachedSnapshot() {\n    return this.getCachedSnapshot() != null;\n  }\n\n  loadCachedSnapshot() {\n    const snapshot = this.getCachedSnapshot();\n\n    if (snapshot) {\n      const isPreview = this.shouldIssueRequest();\n      this.render(async () => {\n        this.cacheSnapshot();\n\n        if (this.isSamePage) {\n          this.adapter.visitRendered(this);\n        } else {\n          if (this.view.renderPromise) await this.view.renderPromise;\n          await this.view.renderPage(snapshot, isPreview, this.willRender);\n          this.adapter.visitRendered(this);\n\n          if (!isPreview) {\n            this.complete();\n          }\n        }\n      });\n    }\n  }\n\n  followRedirect() {\n    var _a;\n\n    if (this.redirectedToLocation && !this.followedRedirect && ((_a = this.response) === null || _a === void 0 ? void 0 : _a.redirected)) {\n      this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n        action: 'replace',\n        response: this.response\n      });\n      this.followedRedirect = true;\n    }\n  }\n\n  goToSamePageAnchor() {\n    if (this.isSamePage) {\n      this.render(async () => {\n        this.cacheSnapshot();\n        this.adapter.visitRendered(this);\n      });\n    }\n  }\n\n  requestStarted() {\n    this.startRequest();\n  }\n\n  requestPreventedHandlingResponse(request, response) {}\n\n  async requestSucceededWithResponse(request, response) {\n    const responseHTML = await response.responseHTML;\n    const redirected = response.redirected,\n          statusCode = response.statusCode;\n\n    if (responseHTML == undefined) {\n      this.recordResponse({\n        statusCode: SystemStatusCode.contentTypeMismatch,\n        redirected\n      });\n    } else {\n      this.redirectedToLocation = response.redirected ? response.location : undefined;\n      this.recordResponse({\n        statusCode: statusCode,\n        responseHTML,\n        redirected\n      });\n    }\n  }\n\n  async requestFailedWithResponse(request, response) {\n    const responseHTML = await response.responseHTML;\n    const redirected = response.redirected,\n          statusCode = response.statusCode;\n\n    if (responseHTML == undefined) {\n      this.recordResponse({\n        statusCode: SystemStatusCode.contentTypeMismatch,\n        redirected\n      });\n    } else {\n      this.recordResponse({\n        statusCode: statusCode,\n        responseHTML,\n        redirected\n      });\n    }\n  }\n\n  requestErrored(request, error) {\n    this.recordResponse({\n      statusCode: SystemStatusCode.networkFailure,\n      redirected: false\n    });\n  }\n\n  requestFinished() {\n    this.finishRequest();\n  }\n\n  performScroll() {\n    if (!this.scrolled) {\n      if (this.action == \"restore\") {\n        this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n      } else {\n        this.scrollToAnchor() || this.view.scrollToTop();\n      }\n\n      if (this.isSamePage) {\n        this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);\n      }\n\n      this.scrolled = true;\n    }\n  }\n\n  scrollToRestoredPosition() {\n    const scrollPosition = this.restorationData.scrollPosition;\n\n    if (scrollPosition) {\n      this.view.scrollToPosition(scrollPosition);\n      return true;\n    }\n  }\n\n  scrollToAnchor() {\n    const anchor = getAnchor(this.location);\n\n    if (anchor != null) {\n      this.view.scrollToAnchor(anchor);\n      return true;\n    }\n  }\n\n  recordTimingMetric(metric) {\n    this.timingMetrics[metric] = new Date().getTime();\n  }\n\n  getTimingMetrics() {\n    return Object.assign({}, this.timingMetrics);\n  }\n\n  getHistoryMethodForAction(action) {\n    switch (action) {\n      case \"replace\":\n        return history.replaceState;\n\n      case \"advance\":\n      case \"restore\":\n        return history.pushState;\n    }\n  }\n\n  hasPreloadedResponse() {\n    return typeof this.response == \"object\";\n  }\n\n  shouldIssueRequest() {\n    if (this.isSamePage) {\n      return false;\n    } else if (this.action == \"restore\") {\n      return !this.hasCachedSnapshot();\n    } else {\n      return this.willRender;\n    }\n  }\n\n  cacheSnapshot() {\n    if (!this.snapshotCached) {\n      this.view.cacheSnapshot().then(snapshot => snapshot && this.visitCachedSnapshot(snapshot));\n      this.snapshotCached = true;\n    }\n  }\n\n  async render(callback) {\n    this.cancelRender();\n    await new Promise(resolve => {\n      this.frame = requestAnimationFrame(() => resolve());\n    });\n    await callback();\n    delete this.frame;\n    this.performScroll();\n  }\n\n  cancelRender() {\n    if (this.frame) {\n      cancelAnimationFrame(this.frame);\n      delete this.frame;\n    }\n  }\n\n}\n\nfunction isSuccessful(statusCode) {\n  return statusCode >= 200 && statusCode < 300;\n}\n\nclass BrowserAdapter {\n  constructor(session) {\n    this.progressBar = new ProgressBar();\n\n    this.showProgressBar = () => {\n      this.progressBar.show();\n    };\n\n    this.session = session;\n  }\n\n  visitProposedToLocation(location, options) {\n    this.navigator.startVisit(location, uuid(), options);\n  }\n\n  visitStarted(visit) {\n    visit.loadCachedSnapshot();\n    visit.issueRequest();\n    visit.changeHistory();\n    visit.goToSamePageAnchor();\n  }\n\n  visitRequestStarted(visit) {\n    this.progressBar.setValue(0);\n\n    if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n      this.showVisitProgressBarAfterDelay();\n    } else {\n      this.showProgressBar();\n    }\n  }\n\n  visitRequestCompleted(visit) {\n    visit.loadResponse();\n  }\n\n  visitRequestFailedWithStatusCode(visit, statusCode) {\n    switch (statusCode) {\n      case SystemStatusCode.networkFailure:\n      case SystemStatusCode.timeoutFailure:\n      case SystemStatusCode.contentTypeMismatch:\n        return this.reload();\n\n      default:\n        return visit.loadResponse();\n    }\n  }\n\n  visitRequestFinished(visit) {\n    this.progressBar.setValue(1);\n    this.hideVisitProgressBar();\n  }\n\n  visitCompleted(visit) {}\n\n  pageInvalidated() {\n    this.reload();\n  }\n\n  visitFailed(visit) {}\n\n  visitRendered(visit) {}\n\n  formSubmissionStarted(formSubmission) {\n    this.progressBar.setValue(0);\n    this.showFormProgressBarAfterDelay();\n  }\n\n  formSubmissionFinished(formSubmission) {\n    this.progressBar.setValue(1);\n    this.hideFormProgressBar();\n  }\n\n  showVisitProgressBarAfterDelay() {\n    this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n  }\n\n  hideVisitProgressBar() {\n    this.progressBar.hide();\n\n    if (this.visitProgressBarTimeout != null) {\n      window.clearTimeout(this.visitProgressBarTimeout);\n      delete this.visitProgressBarTimeout;\n    }\n  }\n\n  showFormProgressBarAfterDelay() {\n    if (this.formProgressBarTimeout == null) {\n      this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n    }\n  }\n\n  hideFormProgressBar() {\n    this.progressBar.hide();\n\n    if (this.formProgressBarTimeout != null) {\n      window.clearTimeout(this.formProgressBarTimeout);\n      delete this.formProgressBarTimeout;\n    }\n  }\n\n  reload() {\n    window.location.reload();\n  }\n\n  get navigator() {\n    return this.session.navigator;\n  }\n\n}\n\nclass CacheObserver {\n  constructor() {\n    this.started = false;\n  }\n\n  start() {\n    if (!this.started) {\n      this.started = true;\n      addEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.started = false;\n      removeEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n    }\n  }\n\n  removeStaleElements() {\n    const staleElements = [...document.querySelectorAll('[data-turbo-cache=\"false\"]')];\n\n    for (const element of staleElements) {\n      element.remove();\n    }\n  }\n\n}\n\nclass FormSubmitObserver {\n  constructor(delegate) {\n    this.started = false;\n\n    this.submitCaptured = () => {\n      removeEventListener(\"submit\", this.submitBubbled, false);\n      addEventListener(\"submit\", this.submitBubbled, false);\n    };\n\n    this.submitBubbled = event => {\n      if (!event.defaultPrevented) {\n        const form = event.target instanceof HTMLFormElement ? event.target : undefined;\n        const submitter = event.submitter || undefined;\n\n        if (form) {\n          const method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formmethod\")) || form.getAttribute(\"method\");\n\n          if (method != \"dialog\" && this.delegate.willSubmitForm(form, submitter)) {\n            event.preventDefault();\n            this.delegate.formSubmitted(form, submitter);\n          }\n        }\n      }\n    };\n\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      addEventListener(\"submit\", this.submitCaptured, true);\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      removeEventListener(\"submit\", this.submitCaptured, true);\n      this.started = false;\n    }\n  }\n\n}\n\nclass FrameRedirector {\n  constructor(element) {\n    this.element = element;\n    this.linkInterceptor = new LinkInterceptor(this, element);\n    this.formInterceptor = new FormInterceptor(this, element);\n  }\n\n  start() {\n    this.linkInterceptor.start();\n    this.formInterceptor.start();\n  }\n\n  stop() {\n    this.linkInterceptor.stop();\n    this.formInterceptor.stop();\n  }\n\n  shouldInterceptLinkClick(element, url) {\n    return this.shouldRedirect(element);\n  }\n\n  linkClickIntercepted(element, url) {\n    const frame = this.findFrameElement(element);\n\n    if (frame) {\n      frame.delegate.linkClickIntercepted(element, url);\n    }\n  }\n\n  shouldInterceptFormSubmission(element, submitter) {\n    return this.shouldSubmit(element, submitter);\n  }\n\n  formSubmissionIntercepted(element, submitter) {\n    const frame = this.findFrameElement(element, submitter);\n\n    if (frame) {\n      frame.removeAttribute(\"reloadable\");\n      frame.delegate.formSubmissionIntercepted(element, submitter);\n    }\n  }\n\n  shouldSubmit(form, submitter) {\n    var _a;\n\n    const action = getAction(form, submitter);\n    const meta = this.element.ownerDocument.querySelector(\"meta[name=\\\"turbo-root\\\"]\");\n    const rootLocation = expandURL((_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\");\n    return this.shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation);\n  }\n\n  shouldRedirect(element, submitter) {\n    const frame = this.findFrameElement(element, submitter);\n    return frame ? frame != element.closest(\"turbo-frame\") : false;\n  }\n\n  findFrameElement(element, submitter) {\n    const id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\");\n\n    if (id && id != \"_top\") {\n      const frame = this.element.querySelector(\"#\".concat(id, \":not([disabled])\"));\n\n      if (frame instanceof FrameElement) {\n        return frame;\n      }\n    }\n  }\n\n}\n\nclass History {\n  constructor(delegate) {\n    this.restorationIdentifier = uuid();\n    this.restorationData = {};\n    this.started = false;\n    this.pageLoaded = false;\n\n    this.onPopState = event => {\n      if (this.shouldHandlePopState()) {\n        const _ref11 = event.state || {},\n              turbo = _ref11.turbo;\n\n        if (turbo) {\n          this.location = new URL(window.location.href);\n          const restorationIdentifier = turbo.restorationIdentifier;\n          this.restorationIdentifier = restorationIdentifier;\n          this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location, restorationIdentifier);\n        }\n      }\n    };\n\n    this.onPageLoad = async event => {\n      await nextMicrotask();\n      this.pageLoaded = true;\n    };\n\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      addEventListener(\"popstate\", this.onPopState, false);\n      addEventListener(\"load\", this.onPageLoad, false);\n      this.started = true;\n      this.replace(new URL(window.location.href));\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      removeEventListener(\"popstate\", this.onPopState, false);\n      removeEventListener(\"load\", this.onPageLoad, false);\n      this.started = false;\n    }\n  }\n\n  push(location, restorationIdentifier) {\n    this.update(history.pushState, location, restorationIdentifier);\n  }\n\n  replace(location, restorationIdentifier) {\n    this.update(history.replaceState, location, restorationIdentifier);\n  }\n\n  update(method, location) {\n    let restorationIdentifier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : uuid();\n    const state = {\n      turbo: {\n        restorationIdentifier\n      }\n    };\n    method.call(history, state, \"\", location.href);\n    this.location = location;\n    this.restorationIdentifier = restorationIdentifier;\n  }\n\n  getRestorationDataForIdentifier(restorationIdentifier) {\n    return this.restorationData[restorationIdentifier] || {};\n  }\n\n  updateRestorationData(additionalData) {\n    const restorationIdentifier = this.restorationIdentifier;\n    const restorationData = this.restorationData[restorationIdentifier];\n    this.restorationData[restorationIdentifier] = Object.assign(Object.assign({}, restorationData), additionalData);\n  }\n\n  assumeControlOfScrollRestoration() {\n    var _a;\n\n    if (!this.previousScrollRestoration) {\n      this.previousScrollRestoration = (_a = history.scrollRestoration) !== null && _a !== void 0 ? _a : \"auto\";\n      history.scrollRestoration = \"manual\";\n    }\n  }\n\n  relinquishControlOfScrollRestoration() {\n    if (this.previousScrollRestoration) {\n      history.scrollRestoration = this.previousScrollRestoration;\n      delete this.previousScrollRestoration;\n    }\n  }\n\n  shouldHandlePopState() {\n    return this.pageIsLoaded();\n  }\n\n  pageIsLoaded() {\n    return this.pageLoaded || document.readyState == \"complete\";\n  }\n\n}\n\nclass LinkClickObserver {\n  constructor(delegate) {\n    this.started = false;\n\n    this.clickCaptured = () => {\n      removeEventListener(\"click\", this.clickBubbled, false);\n      addEventListener(\"click\", this.clickBubbled, false);\n    };\n\n    this.clickBubbled = event => {\n      if (this.clickEventIsSignificant(event)) {\n        const target = event.composedPath && event.composedPath()[0] || event.target;\n        const link = this.findLinkFromClickTarget(target);\n\n        if (link) {\n          const location = this.getLocationForLink(link);\n\n          if (this.delegate.willFollowLinkToLocation(link, location)) {\n            event.preventDefault();\n            this.delegate.followedLinkToLocation(link, location);\n          }\n        }\n      }\n    };\n\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      addEventListener(\"click\", this.clickCaptured, true);\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      removeEventListener(\"click\", this.clickCaptured, true);\n      this.started = false;\n    }\n  }\n\n  clickEventIsSignificant(event) {\n    return !(event.target && event.target.isContentEditable || event.defaultPrevented || event.which > 1 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);\n  }\n\n  findLinkFromClickTarget(target) {\n    if (target instanceof Element) {\n      return target.closest(\"a[href]:not([target^=_]):not([download])\");\n    }\n  }\n\n  getLocationForLink(link) {\n    return expandURL(link.getAttribute(\"href\") || \"\");\n  }\n\n}\n\nfunction isAction(action) {\n  return action == \"advance\" || action == \"replace\" || action == \"restore\";\n}\n\nclass Navigator {\n  constructor(delegate) {\n    this.delegate = delegate;\n  }\n\n  proposeVisit(location) {\n    let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n    if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n      if (locationIsVisitable(location, this.view.snapshot.rootLocation)) {\n        this.delegate.visitProposedToLocation(location, options);\n      } else {\n        window.location.href = location.toString();\n      }\n    }\n  }\n\n  startVisit(locatable, restorationIdentifier) {\n    let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n    this.stop();\n    this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({\n      referrer: this.location\n    }, options));\n    this.currentVisit.start();\n  }\n\n  submitForm(form, submitter) {\n    this.stop();\n    this.formSubmission = new FormSubmission(this, form, submitter, true);\n    this.formSubmission.start();\n  }\n\n  stop() {\n    if (this.formSubmission) {\n      this.formSubmission.stop();\n      delete this.formSubmission;\n    }\n\n    if (this.currentVisit) {\n      this.currentVisit.cancel();\n      delete this.currentVisit;\n    }\n  }\n\n  get adapter() {\n    return this.delegate.adapter;\n  }\n\n  get view() {\n    return this.delegate.view;\n  }\n\n  get history() {\n    return this.delegate.history;\n  }\n\n  formSubmissionStarted(formSubmission) {\n    if (typeof this.adapter.formSubmissionStarted === 'function') {\n      this.adapter.formSubmissionStarted(formSubmission);\n    }\n  }\n\n  async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {\n    if (formSubmission == this.formSubmission) {\n      const responseHTML = await fetchResponse.responseHTML;\n\n      if (responseHTML) {\n        if (formSubmission.method != FetchMethod.get) {\n          this.view.clearSnapshotCache();\n        }\n\n        const statusCode = fetchResponse.statusCode,\n              redirected = fetchResponse.redirected;\n        const action = this.getActionForFormSubmission(formSubmission);\n        const visitOptions = {\n          action,\n          response: {\n            statusCode,\n            responseHTML,\n            redirected\n          }\n        };\n        this.proposeVisit(fetchResponse.location, visitOptions);\n      }\n    }\n  }\n\n  async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n    const responseHTML = await fetchResponse.responseHTML;\n\n    if (responseHTML) {\n      const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n\n      if (fetchResponse.serverError) {\n        await this.view.renderError(snapshot);\n      } else {\n        await this.view.renderPage(snapshot);\n      }\n\n      this.view.scrollToTop();\n      this.view.clearSnapshotCache();\n    }\n  }\n\n  formSubmissionErrored(formSubmission, error) {\n    console.error(error);\n  }\n\n  formSubmissionFinished(formSubmission) {\n    if (typeof this.adapter.formSubmissionFinished === 'function') {\n      this.adapter.formSubmissionFinished(formSubmission);\n    }\n  }\n\n  visitStarted(visit) {\n    this.delegate.visitStarted(visit);\n  }\n\n  visitCompleted(visit) {\n    this.delegate.visitCompleted(visit);\n  }\n\n  locationWithActionIsSamePage(location, action) {\n    const anchor = getAnchor(location);\n    const currentAnchor = getAnchor(this.view.lastRenderedLocation);\n    const isRestorationToTop = action === 'restore' && typeof anchor === 'undefined';\n    return action !== \"replace\" && getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) && (isRestorationToTop || anchor != null && anchor !== currentAnchor);\n  }\n\n  visitScrolledToSamePageLocation(oldURL, newURL) {\n    this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);\n  }\n\n  get location() {\n    return this.history.location;\n  }\n\n  get restorationIdentifier() {\n    return this.history.restorationIdentifier;\n  }\n\n  getActionForFormSubmission(formSubmission) {\n    const formElement = formSubmission.formElement,\n          submitter = formSubmission.submitter;\n    const action = getAttribute(\"data-turbo-action\", submitter, formElement);\n    return isAction(action) ? action : \"advance\";\n  }\n\n}\n\nvar PageStage;\n\n(function (PageStage) {\n  PageStage[PageStage[\"initial\"] = 0] = \"initial\";\n  PageStage[PageStage[\"loading\"] = 1] = \"loading\";\n  PageStage[PageStage[\"interactive\"] = 2] = \"interactive\";\n  PageStage[PageStage[\"complete\"] = 3] = \"complete\";\n})(PageStage || (PageStage = {}));\n\nclass PageObserver {\n  constructor(delegate) {\n    this.stage = PageStage.initial;\n    this.started = false;\n\n    this.interpretReadyState = () => {\n      const readyState = this.readyState;\n\n      if (readyState == \"interactive\") {\n        this.pageIsInteractive();\n      } else if (readyState == \"complete\") {\n        this.pageIsComplete();\n      }\n    };\n\n    this.pageWillUnload = () => {\n      this.delegate.pageWillUnload();\n    };\n\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      if (this.stage == PageStage.initial) {\n        this.stage = PageStage.loading;\n      }\n\n      document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n      addEventListener(\"pagehide\", this.pageWillUnload, false);\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n      removeEventListener(\"pagehide\", this.pageWillUnload, false);\n      this.started = false;\n    }\n  }\n\n  pageIsInteractive() {\n    if (this.stage == PageStage.loading) {\n      this.stage = PageStage.interactive;\n      this.delegate.pageBecameInteractive();\n    }\n  }\n\n  pageIsComplete() {\n    this.pageIsInteractive();\n\n    if (this.stage == PageStage.interactive) {\n      this.stage = PageStage.complete;\n      this.delegate.pageLoaded();\n    }\n  }\n\n  get readyState() {\n    return document.readyState;\n  }\n\n}\n\nclass ScrollObserver {\n  constructor(delegate) {\n    this.started = false;\n\n    this.onScroll = () => {\n      this.updatePosition({\n        x: window.pageXOffset,\n        y: window.pageYOffset\n      });\n    };\n\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      addEventListener(\"scroll\", this.onScroll, false);\n      this.onScroll();\n      this.started = true;\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      removeEventListener(\"scroll\", this.onScroll, false);\n      this.started = false;\n    }\n  }\n\n  updatePosition(position) {\n    this.delegate.scrollPositionChanged(position);\n  }\n\n}\n\nclass StreamObserver {\n  constructor(delegate) {\n    this.sources = new Set();\n    this.started = false;\n\n    this.inspectFetchResponse = event => {\n      const response = fetchResponseFromEvent(event);\n\n      if (response && fetchResponseIsStream(response)) {\n        event.preventDefault();\n        this.receiveMessageResponse(response);\n      }\n    };\n\n    this.receiveMessageEvent = event => {\n      if (this.started && typeof event.data == \"string\") {\n        this.receiveMessageHTML(event.data);\n      }\n    };\n\n    this.delegate = delegate;\n  }\n\n  start() {\n    if (!this.started) {\n      this.started = true;\n      addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n    }\n  }\n\n  stop() {\n    if (this.started) {\n      this.started = false;\n      removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n    }\n  }\n\n  connectStreamSource(source) {\n    if (!this.streamSourceIsConnected(source)) {\n      this.sources.add(source);\n      source.addEventListener(\"message\", this.receiveMessageEvent, false);\n    }\n  }\n\n  disconnectStreamSource(source) {\n    if (this.streamSourceIsConnected(source)) {\n      this.sources.delete(source);\n      source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n    }\n  }\n\n  streamSourceIsConnected(source) {\n    return this.sources.has(source);\n  }\n\n  async receiveMessageResponse(response) {\n    const html = await response.responseHTML;\n\n    if (html) {\n      this.receiveMessageHTML(html);\n    }\n  }\n\n  receiveMessageHTML(html) {\n    this.delegate.receivedMessageFromStream(new StreamMessage(html));\n  }\n\n}\n\nfunction fetchResponseFromEvent(event) {\n  var _a;\n\n  const fetchResponse = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.fetchResponse;\n\n  if (fetchResponse instanceof FetchResponse) {\n    return fetchResponse;\n  }\n}\n\nfunction fetchResponseIsStream(response) {\n  var _a;\n\n  const contentType = (_a = response.contentType) !== null && _a !== void 0 ? _a : \"\";\n  return contentType.startsWith(StreamMessage.contentType);\n}\n\nclass ErrorRenderer extends Renderer {\n  async render() {\n    this.replaceHeadAndBody();\n    this.activateScriptElements();\n  }\n\n  replaceHeadAndBody() {\n    const _document = document,\n          documentElement = _document.documentElement,\n          head = _document.head,\n          body = _document.body;\n    documentElement.replaceChild(this.newHead, head);\n    documentElement.replaceChild(this.newElement, body);\n  }\n\n  activateScriptElements() {\n    for (const replaceableElement of this.scriptElements) {\n      const parentNode = replaceableElement.parentNode;\n\n      if (parentNode) {\n        const element = this.createScriptElement(replaceableElement);\n        parentNode.replaceChild(element, replaceableElement);\n      }\n    }\n  }\n\n  get newHead() {\n    return this.newSnapshot.headSnapshot.element;\n  }\n\n  get scriptElements() {\n    return [...document.documentElement.querySelectorAll(\"script\")];\n  }\n\n}\n\nclass PageRenderer extends Renderer {\n  get shouldRender() {\n    return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;\n  }\n\n  prepareToRender() {\n    this.mergeHead();\n  }\n\n  async render() {\n    if (this.willRender) {\n      this.replaceBody();\n    }\n  }\n\n  finishRendering() {\n    super.finishRendering();\n\n    if (!this.isPreview) {\n      this.focusFirstAutofocusableElement();\n    }\n  }\n\n  get currentHeadSnapshot() {\n    return this.currentSnapshot.headSnapshot;\n  }\n\n  get newHeadSnapshot() {\n    return this.newSnapshot.headSnapshot;\n  }\n\n  get newElement() {\n    return this.newSnapshot.element;\n  }\n\n  mergeHead() {\n    this.copyNewHeadStylesheetElements();\n    this.copyNewHeadScriptElements();\n    this.removeCurrentHeadProvisionalElements();\n    this.copyNewHeadProvisionalElements();\n  }\n\n  replaceBody() {\n    this.preservingPermanentElements(() => {\n      this.activateNewBody();\n      this.assignNewBody();\n    });\n  }\n\n  get trackedElementsAreIdentical() {\n    return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;\n  }\n\n  copyNewHeadStylesheetElements() {\n    for (const element of this.newHeadStylesheetElements) {\n      document.head.appendChild(element);\n    }\n  }\n\n  copyNewHeadScriptElements() {\n    for (const element of this.newHeadScriptElements) {\n      document.head.appendChild(this.createScriptElement(element));\n    }\n  }\n\n  removeCurrentHeadProvisionalElements() {\n    for (const element of this.currentHeadProvisionalElements) {\n      document.head.removeChild(element);\n    }\n  }\n\n  copyNewHeadProvisionalElements() {\n    for (const element of this.newHeadProvisionalElements) {\n      document.head.appendChild(element);\n    }\n  }\n\n  activateNewBody() {\n    document.adoptNode(this.newElement);\n    this.activateNewBodyScriptElements();\n  }\n\n  activateNewBodyScriptElements() {\n    for (const inertScriptElement of this.newBodyScriptElements) {\n      const activatedScriptElement = this.createScriptElement(inertScriptElement);\n      inertScriptElement.replaceWith(activatedScriptElement);\n    }\n  }\n\n  assignNewBody() {\n    if (document.body && this.newElement instanceof HTMLBodyElement) {\n      document.body.replaceWith(this.newElement);\n    } else {\n      document.documentElement.appendChild(this.newElement);\n    }\n  }\n\n  get newHeadStylesheetElements() {\n    return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);\n  }\n\n  get newHeadScriptElements() {\n    return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);\n  }\n\n  get currentHeadProvisionalElements() {\n    return this.currentHeadSnapshot.provisionalElements;\n  }\n\n  get newHeadProvisionalElements() {\n    return this.newHeadSnapshot.provisionalElements;\n  }\n\n  get newBodyScriptElements() {\n    return this.newElement.querySelectorAll(\"script\");\n  }\n\n}\n\nclass SnapshotCache {\n  constructor(size) {\n    this.keys = [];\n    this.snapshots = {};\n    this.size = size;\n  }\n\n  has(location) {\n    return toCacheKey(location) in this.snapshots;\n  }\n\n  get(location) {\n    if (this.has(location)) {\n      const snapshot = this.read(location);\n      this.touch(location);\n      return snapshot;\n    }\n  }\n\n  put(location, snapshot) {\n    this.write(location, snapshot);\n    this.touch(location);\n    return snapshot;\n  }\n\n  clear() {\n    this.snapshots = {};\n  }\n\n  read(location) {\n    return this.snapshots[toCacheKey(location)];\n  }\n\n  write(location, snapshot) {\n    this.snapshots[toCacheKey(location)] = snapshot;\n  }\n\n  touch(location) {\n    const key = toCacheKey(location);\n    const index = this.keys.indexOf(key);\n    if (index > -1) this.keys.splice(index, 1);\n    this.keys.unshift(key);\n    this.trim();\n  }\n\n  trim() {\n    for (const key of this.keys.splice(this.size)) {\n      delete this.snapshots[key];\n    }\n  }\n\n}\n\nclass PageView extends View {\n  constructor() {\n    super(...arguments);\n    this.snapshotCache = new SnapshotCache(10);\n    this.lastRenderedLocation = new URL(location.href);\n  }\n\n  renderPage(snapshot) {\n    let isPreview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n    let willRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n    const renderer = new PageRenderer(this.snapshot, snapshot, isPreview, willRender);\n    return this.render(renderer);\n  }\n\n  renderError(snapshot) {\n    const renderer = new ErrorRenderer(this.snapshot, snapshot, false);\n    return this.render(renderer);\n  }\n\n  clearSnapshotCache() {\n    this.snapshotCache.clear();\n  }\n\n  async cacheSnapshot() {\n    if (this.shouldCacheSnapshot) {\n      this.delegate.viewWillCacheSnapshot();\n      const snapshot = this.snapshot,\n            location = this.lastRenderedLocation;\n      await nextEventLoopTick();\n      const cachedSnapshot = snapshot.clone();\n      this.snapshotCache.put(location, cachedSnapshot);\n      return cachedSnapshot;\n    }\n  }\n\n  getCachedSnapshotForLocation(location) {\n    return this.snapshotCache.get(location);\n  }\n\n  get snapshot() {\n    return PageSnapshot.fromElement(this.element);\n  }\n\n  get shouldCacheSnapshot() {\n    return this.snapshot.isCacheable;\n  }\n\n}\n\nclass Session {\n  constructor() {\n    this.navigator = new Navigator(this);\n    this.history = new History(this);\n    this.view = new PageView(this, document.documentElement);\n    this.adapter = new BrowserAdapter(this);\n    this.pageObserver = new PageObserver(this);\n    this.cacheObserver = new CacheObserver();\n    this.linkClickObserver = new LinkClickObserver(this);\n    this.formSubmitObserver = new FormSubmitObserver(this);\n    this.scrollObserver = new ScrollObserver(this);\n    this.streamObserver = new StreamObserver(this);\n    this.frameRedirector = new FrameRedirector(document.documentElement);\n    this.drive = true;\n    this.enabled = true;\n    this.progressBarDelay = 500;\n    this.started = false;\n  }\n\n  start() {\n    if (!this.started) {\n      this.pageObserver.start();\n      this.cacheObserver.start();\n      this.linkClickObserver.start();\n      this.formSubmitObserver.start();\n      this.scrollObserver.start();\n      this.streamObserver.start();\n      this.frameRedirector.start();\n      this.history.start();\n      this.started = true;\n      this.enabled = true;\n    }\n  }\n\n  disable() {\n    this.enabled = false;\n  }\n\n  stop() {\n    if (this.started) {\n      this.pageObserver.stop();\n      this.cacheObserver.stop();\n      this.linkClickObserver.stop();\n      this.formSubmitObserver.stop();\n      this.scrollObserver.stop();\n      this.streamObserver.stop();\n      this.frameRedirector.stop();\n      this.history.stop();\n      this.started = false;\n    }\n  }\n\n  registerAdapter(adapter) {\n    this.adapter = adapter;\n  }\n\n  visit(location) {\n    let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    this.navigator.proposeVisit(expandURL(location), options);\n  }\n\n  connectStreamSource(source) {\n    this.streamObserver.connectStreamSource(source);\n  }\n\n  disconnectStreamSource(source) {\n    this.streamObserver.disconnectStreamSource(source);\n  }\n\n  renderStreamMessage(message) {\n    document.documentElement.appendChild(StreamMessage.wrap(message).fragment);\n  }\n\n  clearCache() {\n    this.view.clearSnapshotCache();\n  }\n\n  setProgressBarDelay(delay) {\n    this.progressBarDelay = delay;\n  }\n\n  get location() {\n    return this.history.location;\n  }\n\n  get restorationIdentifier() {\n    return this.history.restorationIdentifier;\n  }\n\n  historyPoppedToLocationWithRestorationIdentifier(location, restorationIdentifier) {\n    if (this.enabled) {\n      this.navigator.startVisit(location, restorationIdentifier, {\n        action: \"restore\",\n        historyChanged: true\n      });\n    } else {\n      this.adapter.pageInvalidated();\n    }\n  }\n\n  scrollPositionChanged(position) {\n    this.history.updateRestorationData({\n      scrollPosition: position\n    });\n  }\n\n  willFollowLinkToLocation(link, location) {\n    return this.elementDriveEnabled(link) && locationIsVisitable(location, this.snapshot.rootLocation) && this.applicationAllowsFollowingLinkToLocation(link, location);\n  }\n\n  followedLinkToLocation(link, location) {\n    const action = this.getActionForLink(link);\n    this.convertLinkWithMethodClickToFormSubmission(link) || this.visit(location.href, {\n      action\n    });\n  }\n\n  convertLinkWithMethodClickToFormSubmission(link) {\n    const linkMethod = link.getAttribute(\"data-turbo-method\");\n\n    if (linkMethod) {\n      const form = document.createElement(\"form\");\n      form.method = linkMethod;\n      form.action = link.getAttribute(\"href\") || \"undefined\";\n      form.hidden = true;\n\n      if (link.hasAttribute(\"data-turbo-confirm\")) {\n        form.setAttribute(\"data-turbo-confirm\", link.getAttribute(\"data-turbo-confirm\"));\n      }\n\n      const frame = this.getTargetFrameForLink(link);\n\n      if (frame) {\n        form.setAttribute(\"data-turbo-frame\", frame);\n        form.addEventListener(\"turbo:submit-start\", () => form.remove());\n      } else {\n        form.addEventListener(\"submit\", () => form.remove());\n      }\n\n      document.body.appendChild(form);\n      return dispatch(\"submit\", {\n        cancelable: true,\n        target: form\n      });\n    } else {\n      return false;\n    }\n  }\n\n  allowsVisitingLocationWithAction(location, action) {\n    return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);\n  }\n\n  visitProposedToLocation(location, options) {\n    extendURLWithDeprecatedProperties(location);\n    this.adapter.visitProposedToLocation(location, options);\n  }\n\n  visitStarted(visit) {\n    extendURLWithDeprecatedProperties(visit.location);\n\n    if (!visit.silent) {\n      this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n    }\n  }\n\n  visitCompleted(visit) {\n    this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n  }\n\n  locationWithActionIsSamePage(location, action) {\n    return this.navigator.locationWithActionIsSamePage(location, action);\n  }\n\n  visitScrolledToSamePageLocation(oldURL, newURL) {\n    this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);\n  }\n\n  willSubmitForm(form, submitter) {\n    const action = getAction(form, submitter);\n    return this.elementDriveEnabled(form) && (!submitter || this.elementDriveEnabled(submitter)) && locationIsVisitable(expandURL(action), this.snapshot.rootLocation);\n  }\n\n  formSubmitted(form, submitter) {\n    this.navigator.submitForm(form, submitter);\n  }\n\n  pageBecameInteractive() {\n    this.view.lastRenderedLocation = this.location;\n    this.notifyApplicationAfterPageLoad();\n  }\n\n  pageLoaded() {\n    this.history.assumeControlOfScrollRestoration();\n  }\n\n  pageWillUnload() {\n    this.history.relinquishControlOfScrollRestoration();\n  }\n\n  receivedMessageFromStream(message) {\n    this.renderStreamMessage(message);\n  }\n\n  viewWillCacheSnapshot() {\n    var _a;\n\n    if (!((_a = this.navigator.currentVisit) === null || _a === void 0 ? void 0 : _a.silent)) {\n      this.notifyApplicationBeforeCachingSnapshot();\n    }\n  }\n\n  allowsImmediateRender(_ref12, resume) {\n    let element = _ref12.element;\n    const event = this.notifyApplicationBeforeRender(element, resume);\n    return !event.defaultPrevented;\n  }\n\n  viewRenderedSnapshot(snapshot, isPreview) {\n    this.view.lastRenderedLocation = this.history.location;\n    this.notifyApplicationAfterRender();\n  }\n\n  viewInvalidated() {\n    this.adapter.pageInvalidated();\n  }\n\n  frameLoaded(frame) {\n    this.notifyApplicationAfterFrameLoad(frame);\n  }\n\n  frameRendered(fetchResponse, frame) {\n    this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n  }\n\n  applicationAllowsFollowingLinkToLocation(link, location) {\n    const event = this.notifyApplicationAfterClickingLinkToLocation(link, location);\n    return !event.defaultPrevented;\n  }\n\n  applicationAllowsVisitingLocation(location) {\n    const event = this.notifyApplicationBeforeVisitingLocation(location);\n    return !event.defaultPrevented;\n  }\n\n  notifyApplicationAfterClickingLinkToLocation(link, location) {\n    return dispatch(\"turbo:click\", {\n      target: link,\n      detail: {\n        url: location.href\n      },\n      cancelable: true\n    });\n  }\n\n  notifyApplicationBeforeVisitingLocation(location) {\n    return dispatch(\"turbo:before-visit\", {\n      detail: {\n        url: location.href\n      },\n      cancelable: true\n    });\n  }\n\n  notifyApplicationAfterVisitingLocation(location, action) {\n    markAsBusy(document.documentElement);\n    return dispatch(\"turbo:visit\", {\n      detail: {\n        url: location.href,\n        action\n      }\n    });\n  }\n\n  notifyApplicationBeforeCachingSnapshot() {\n    return dispatch(\"turbo:before-cache\");\n  }\n\n  notifyApplicationBeforeRender(newBody, resume) {\n    return dispatch(\"turbo:before-render\", {\n      detail: {\n        newBody,\n        resume\n      },\n      cancelable: true\n    });\n  }\n\n  notifyApplicationAfterRender() {\n    return dispatch(\"turbo:render\");\n  }\n\n  notifyApplicationAfterPageLoad() {\n    let timing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    clearBusyState(document.documentElement);\n    return dispatch(\"turbo:load\", {\n      detail: {\n        url: this.location.href,\n        timing\n      }\n    });\n  }\n\n  notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {\n    dispatchEvent(new HashChangeEvent(\"hashchange\", {\n      oldURL: oldURL.toString(),\n      newURL: newURL.toString()\n    }));\n  }\n\n  notifyApplicationAfterFrameLoad(frame) {\n    return dispatch(\"turbo:frame-load\", {\n      target: frame\n    });\n  }\n\n  notifyApplicationAfterFrameRender(fetchResponse, frame) {\n    return dispatch(\"turbo:frame-render\", {\n      detail: {\n        fetchResponse\n      },\n      target: frame,\n      cancelable: true\n    });\n  }\n\n  elementDriveEnabled(element) {\n    const container = element === null || element === void 0 ? void 0 : element.closest(\"[data-turbo]\");\n\n    if (this.drive) {\n      if (container) {\n        return container.getAttribute(\"data-turbo\") != \"false\";\n      } else {\n        return true;\n      }\n    } else {\n      if (container) {\n        return container.getAttribute(\"data-turbo\") == \"true\";\n      } else {\n        return false;\n      }\n    }\n  }\n\n  getActionForLink(link) {\n    const action = link.getAttribute(\"data-turbo-action\");\n    return isAction(action) ? action : \"advance\";\n  }\n\n  getTargetFrameForLink(link) {\n    const frame = link.getAttribute(\"data-turbo-frame\");\n\n    if (frame) {\n      return frame;\n    } else {\n      const container = link.closest(\"turbo-frame\");\n\n      if (container) {\n        return container.id;\n      }\n    }\n  }\n\n  get snapshot() {\n    return this.view.snapshot;\n  }\n\n}\n\nfunction extendURLWithDeprecatedProperties(url) {\n  Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\n\nconst deprecatedLocationPropertyDescriptors = {\n  absoluteURL: {\n    get() {\n      return this.toString();\n    }\n\n  }\n};\nconst session = new Session();\nconst navigator$1 = session.navigator;\n\nfunction start() {\n  session.start();\n}\n\nfunction registerAdapter(adapter) {\n  session.registerAdapter(adapter);\n}\n\nfunction visit(location, options) {\n  session.visit(location, options);\n}\n\nfunction connectStreamSource(source) {\n  session.connectStreamSource(source);\n}\n\nfunction disconnectStreamSource(source) {\n  session.disconnectStreamSource(source);\n}\n\nfunction renderStreamMessage(message) {\n  session.renderStreamMessage(message);\n}\n\nfunction clearCache() {\n  session.clearCache();\n}\n\nfunction setProgressBarDelay(delay) {\n  session.setProgressBarDelay(delay);\n}\n\nfunction setConfirmMethod(confirmMethod) {\n  FormSubmission.confirmMethod = confirmMethod;\n}\n\nvar Turbo = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  navigator: navigator$1,\n  session: session,\n  PageRenderer: PageRenderer,\n  PageSnapshot: PageSnapshot,\n  start: start,\n  registerAdapter: registerAdapter,\n  visit: visit,\n  connectStreamSource: connectStreamSource,\n  disconnectStreamSource: disconnectStreamSource,\n  renderStreamMessage: renderStreamMessage,\n  clearCache: clearCache,\n  setProgressBarDelay: setProgressBarDelay,\n  setConfirmMethod: setConfirmMethod\n});\n\nclass FrameController {\n  constructor(element) {\n    this.fetchResponseLoaded = fetchResponse => {};\n\n    this.currentFetchRequest = null;\n\n    this.resolveVisitPromise = () => {};\n\n    this.connected = false;\n    this.hasBeenLoaded = false;\n    this.settingSourceURL = false;\n    this.element = element;\n    this.view = new FrameView(this, this.element);\n    this.appearanceObserver = new AppearanceObserver(this, this.element);\n    this.linkInterceptor = new LinkInterceptor(this, this.element);\n    this.formInterceptor = new FormInterceptor(this, this.element);\n  }\n\n  connect() {\n    if (!this.connected) {\n      this.connected = true;\n      this.reloadable = false;\n\n      if (this.loadingStyle == FrameLoadingStyle.lazy) {\n        this.appearanceObserver.start();\n      }\n\n      this.linkInterceptor.start();\n      this.formInterceptor.start();\n      this.sourceURLChanged();\n    }\n  }\n\n  disconnect() {\n    if (this.connected) {\n      this.connected = false;\n      this.appearanceObserver.stop();\n      this.linkInterceptor.stop();\n      this.formInterceptor.stop();\n    }\n  }\n\n  disabledChanged() {\n    if (this.loadingStyle == FrameLoadingStyle.eager) {\n      this.loadSourceURL();\n    }\n  }\n\n  sourceURLChanged() {\n    if (this.loadingStyle == FrameLoadingStyle.eager || this.hasBeenLoaded) {\n      this.loadSourceURL();\n    }\n  }\n\n  loadingStyleChanged() {\n    if (this.loadingStyle == FrameLoadingStyle.lazy) {\n      this.appearanceObserver.start();\n    } else {\n      this.appearanceObserver.stop();\n      this.loadSourceURL();\n    }\n  }\n\n  async loadSourceURL() {\n    if (!this.settingSourceURL && this.enabled && this.isActive && (this.reloadable || this.sourceURL != this.currentURL)) {\n      const previousURL = this.currentURL;\n      this.currentURL = this.sourceURL;\n\n      if (this.sourceURL) {\n        try {\n          this.element.loaded = this.visit(expandURL(this.sourceURL));\n          this.appearanceObserver.stop();\n          await this.element.loaded;\n          this.hasBeenLoaded = true;\n        } catch (error) {\n          this.currentURL = previousURL;\n          throw error;\n        }\n      }\n    }\n  }\n\n  async loadResponse(fetchResponse) {\n    if (fetchResponse.redirected || fetchResponse.succeeded && fetchResponse.isHTML) {\n      this.sourceURL = fetchResponse.response.url;\n    }\n\n    try {\n      const html = await fetchResponse.responseHTML;\n\n      if (html) {\n        const _parseHTMLDocument = parseHTMLDocument(html),\n              body = _parseHTMLDocument.body;\n\n        const snapshot = new Snapshot(await this.extractForeignFrameElement(body));\n        const renderer = new FrameRenderer(this.view.snapshot, snapshot, false, false);\n        if (this.view.renderPromise) await this.view.renderPromise;\n        await this.view.render(renderer);\n        session.frameRendered(fetchResponse, this.element);\n        session.frameLoaded(this.element);\n        this.fetchResponseLoaded(fetchResponse);\n      }\n    } catch (error) {\n      console.error(error);\n      this.view.invalidate();\n    } finally {\n      this.fetchResponseLoaded = () => {};\n    }\n  }\n\n  elementAppearedInViewport(element) {\n    this.loadSourceURL();\n  }\n\n  shouldInterceptLinkClick(element, url) {\n    if (element.hasAttribute(\"data-turbo-method\")) {\n      return false;\n    } else {\n      return this.shouldInterceptNavigation(element);\n    }\n  }\n\n  linkClickIntercepted(element, url) {\n    this.reloadable = true;\n    this.navigateFrame(element, url);\n  }\n\n  shouldInterceptFormSubmission(element, submitter) {\n    return this.shouldInterceptNavigation(element, submitter);\n  }\n\n  formSubmissionIntercepted(element, submitter) {\n    if (this.formSubmission) {\n      this.formSubmission.stop();\n    }\n\n    this.reloadable = false;\n    this.formSubmission = new FormSubmission(this, element, submitter);\n    const fetchRequest = this.formSubmission.fetchRequest;\n    this.prepareHeadersForRequest(fetchRequest.headers, fetchRequest);\n    this.formSubmission.start();\n  }\n\n  prepareHeadersForRequest(headers, request) {\n    headers[\"Turbo-Frame\"] = this.id;\n  }\n\n  requestStarted(request) {\n    markAsBusy(this.element);\n  }\n\n  requestPreventedHandlingResponse(request, response) {\n    this.resolveVisitPromise();\n  }\n\n  async requestSucceededWithResponse(request, response) {\n    await this.loadResponse(response);\n    this.resolveVisitPromise();\n  }\n\n  requestFailedWithResponse(request, response) {\n    console.error(response);\n    this.resolveVisitPromise();\n  }\n\n  requestErrored(request, error) {\n    console.error(error);\n    this.resolveVisitPromise();\n  }\n\n  requestFinished(request) {\n    clearBusyState(this.element);\n  }\n\n  formSubmissionStarted(_ref13) {\n    let formElement = _ref13.formElement;\n    markAsBusy(formElement, this.findFrameElement(formElement));\n  }\n\n  formSubmissionSucceededWithResponse(formSubmission, response) {\n    const frame = this.findFrameElement(formSubmission.formElement, formSubmission.submitter);\n    this.proposeVisitIfNavigatedWithAction(frame, formSubmission.formElement, formSubmission.submitter);\n    frame.delegate.loadResponse(response);\n  }\n\n  formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n    this.element.delegate.loadResponse(fetchResponse);\n  }\n\n  formSubmissionErrored(formSubmission, error) {\n    console.error(error);\n  }\n\n  formSubmissionFinished(_ref14) {\n    let formElement = _ref14.formElement;\n    clearBusyState(formElement, this.findFrameElement(formElement));\n  }\n\n  allowsImmediateRender(snapshot, resume) {\n    return true;\n  }\n\n  viewRenderedSnapshot(snapshot, isPreview) {}\n\n  viewInvalidated() {}\n\n  async visit(url) {\n    var _a;\n\n    const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);\n    (_a = this.currentFetchRequest) === null || _a === void 0 ? void 0 : _a.cancel();\n    this.currentFetchRequest = request;\n    return new Promise(resolve => {\n      this.resolveVisitPromise = () => {\n        this.resolveVisitPromise = () => {};\n\n        this.currentFetchRequest = null;\n        resolve();\n      };\n\n      request.perform();\n    });\n  }\n\n  navigateFrame(element, url, submitter) {\n    const frame = this.findFrameElement(element, submitter);\n    this.proposeVisitIfNavigatedWithAction(frame, element, submitter);\n    frame.setAttribute(\"reloadable\", \"\");\n    frame.src = url;\n  }\n\n  proposeVisitIfNavigatedWithAction(frame, element, submitter) {\n    const action = getAttribute(\"data-turbo-action\", submitter, element, frame);\n\n    if (isAction(action)) {\n      const _SnapshotSubstitution = new SnapshotSubstitution(frame),\n            visitCachedSnapshot = _SnapshotSubstitution.visitCachedSnapshot;\n\n      frame.delegate.fetchResponseLoaded = fetchResponse => {\n        if (frame.src) {\n          const statusCode = fetchResponse.statusCode,\n                redirected = fetchResponse.redirected;\n          const responseHTML = frame.ownerDocument.documentElement.outerHTML;\n          const response = {\n            statusCode,\n            redirected,\n            responseHTML\n          };\n          session.visit(frame.src, {\n            action,\n            response,\n            visitCachedSnapshot,\n            willRender: false\n          });\n        }\n      };\n    }\n  }\n\n  findFrameElement(element, submitter) {\n    var _a;\n\n    const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n    return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element;\n  }\n\n  async extractForeignFrameElement(container) {\n    let element;\n    const id = CSS.escape(this.id);\n\n    try {\n      if (element = activateElement(container.querySelector(\"turbo-frame#\".concat(id)), this.currentURL)) {\n        return element;\n      }\n\n      if (element = activateElement(container.querySelector(\"turbo-frame[src][recurse~=\".concat(id, \"]\")), this.currentURL)) {\n        await element.loaded;\n        return await this.extractForeignFrameElement(element);\n      }\n\n      console.error(\"Response has no matching <turbo-frame id=\\\"\".concat(id, \"\\\"> element\"));\n    } catch (error) {\n      console.error(error);\n    }\n\n    return new FrameElement();\n  }\n\n  formActionIsVisitable(form, submitter) {\n    const action = getAction(form, submitter);\n    return locationIsVisitable(expandURL(action), this.rootLocation);\n  }\n\n  shouldInterceptNavigation(element, submitter) {\n    const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n\n    if (element instanceof HTMLFormElement && !this.formActionIsVisitable(element, submitter)) {\n      return false;\n    }\n\n    if (!this.enabled || id == \"_top\") {\n      return false;\n    }\n\n    if (id) {\n      const frameElement = getFrameElementById(id);\n\n      if (frameElement) {\n        return !frameElement.disabled;\n      }\n    }\n\n    if (!session.elementDriveEnabled(element)) {\n      return false;\n    }\n\n    if (submitter && !session.elementDriveEnabled(submitter)) {\n      return false;\n    }\n\n    return true;\n  }\n\n  get id() {\n    return this.element.id;\n  }\n\n  get enabled() {\n    return !this.element.disabled;\n  }\n\n  get sourceURL() {\n    if (this.element.src) {\n      return this.element.src;\n    }\n  }\n\n  get reloadable() {\n    const frame = this.findFrameElement(this.element);\n    return frame.hasAttribute(\"reloadable\");\n  }\n\n  set reloadable(value) {\n    const frame = this.findFrameElement(this.element);\n\n    if (value) {\n      frame.setAttribute(\"reloadable\", \"\");\n    } else {\n      frame.removeAttribute(\"reloadable\");\n    }\n  }\n\n  set sourceURL(sourceURL) {\n    this.settingSourceURL = true;\n    this.element.src = sourceURL !== null && sourceURL !== void 0 ? sourceURL : null;\n    this.currentURL = this.element.src;\n    this.settingSourceURL = false;\n  }\n\n  get loadingStyle() {\n    return this.element.loading;\n  }\n\n  get isLoading() {\n    return this.formSubmission !== undefined || this.resolveVisitPromise() !== undefined;\n  }\n\n  get isActive() {\n    return this.element.isActive && this.connected;\n  }\n\n  get rootLocation() {\n    var _a;\n\n    const meta = this.element.ownerDocument.querySelector(\"meta[name=\\\"turbo-root\\\"]\");\n    const root = (_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\";\n    return expandURL(root);\n  }\n\n}\n\nclass SnapshotSubstitution {\n  constructor(element) {\n    this.visitCachedSnapshot = _ref15 => {\n      let element = _ref15.element;\n\n      var _a;\n\n      const id = this.id,\n            clone = this.clone;\n      (_a = element.querySelector(\"#\" + id)) === null || _a === void 0 ? void 0 : _a.replaceWith(clone);\n    };\n\n    this.clone = element.cloneNode(true);\n    this.id = element.id;\n  }\n\n}\n\nfunction getFrameElementById(id) {\n  if (id != null) {\n    const element = document.getElementById(id);\n\n    if (element instanceof FrameElement) {\n      return element;\n    }\n  }\n}\n\nfunction activateElement(element, currentURL) {\n  if (element) {\n    const src = element.getAttribute(\"src\");\n\n    if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n      throw new Error(\"Matching <turbo-frame id=\\\"\".concat(element.id, \"\\\"> element has a source URL which references itself\"));\n    }\n\n    if (element.ownerDocument !== document) {\n      element = document.importNode(element, true);\n    }\n\n    if (element instanceof FrameElement) {\n      element.connectedCallback();\n      element.disconnectedCallback();\n      return element;\n    }\n  }\n}\n\nconst StreamActions = {\n  after() {\n    this.targetElements.forEach(e => {\n      var _a;\n\n      return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e.nextSibling);\n    });\n  },\n\n  append() {\n    this.removeDuplicateTargetChildren();\n    this.targetElements.forEach(e => e.append(this.templateContent));\n  },\n\n  before() {\n    this.targetElements.forEach(e => {\n      var _a;\n\n      return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e);\n    });\n  },\n\n  prepend() {\n    this.removeDuplicateTargetChildren();\n    this.targetElements.forEach(e => e.prepend(this.templateContent));\n  },\n\n  remove() {\n    this.targetElements.forEach(e => e.remove());\n  },\n\n  replace() {\n    this.targetElements.forEach(e => e.replaceWith(this.templateContent));\n  },\n\n  update() {\n    this.targetElements.forEach(e => {\n      e.innerHTML = \"\";\n      e.append(this.templateContent);\n    });\n  }\n\n};\n\nclass StreamElement extends HTMLElement {\n  async connectedCallback() {\n    try {\n      await this.render();\n    } catch (error) {\n      console.error(error);\n    } finally {\n      this.disconnect();\n    }\n  }\n\n  async render() {\n    var _a;\n\n    return (_a = this.renderPromise) !== null && _a !== void 0 ? _a : this.renderPromise = (async () => {\n      if (this.dispatchEvent(this.beforeRenderEvent)) {\n        await nextAnimationFrame();\n        this.performAction();\n      }\n    })();\n  }\n\n  disconnect() {\n    try {\n      this.remove();\n    } catch (_a) {}\n  }\n\n  removeDuplicateTargetChildren() {\n    this.duplicateChildren.forEach(c => c.remove());\n  }\n\n  get duplicateChildren() {\n    var _a;\n\n    const existingChildren = this.targetElements.flatMap(e => [...e.children]).filter(c => !!c.id);\n    const newChildrenIds = [...((_a = this.templateContent) === null || _a === void 0 ? void 0 : _a.children)].filter(c => !!c.id).map(c => c.id);\n    return existingChildren.filter(c => newChildrenIds.includes(c.id));\n  }\n\n  get performAction() {\n    if (this.action) {\n      const actionFunction = StreamActions[this.action];\n\n      if (actionFunction) {\n        return actionFunction;\n      }\n\n      this.raise(\"unknown action\");\n    }\n\n    this.raise(\"action attribute is missing\");\n  }\n\n  get targetElements() {\n    if (this.target) {\n      return this.targetElementsById;\n    } else if (this.targets) {\n      return this.targetElementsByQuery;\n    } else {\n      this.raise(\"target or targets attribute is missing\");\n    }\n  }\n\n  get templateContent() {\n    return this.templateElement.content.cloneNode(true);\n  }\n\n  get templateElement() {\n    if (this.firstElementChild instanceof HTMLTemplateElement) {\n      return this.firstElementChild;\n    }\n\n    this.raise(\"first child element must be a <template> element\");\n  }\n\n  get action() {\n    return this.getAttribute(\"action\");\n  }\n\n  get target() {\n    return this.getAttribute(\"target\");\n  }\n\n  get targets() {\n    return this.getAttribute(\"targets\");\n  }\n\n  raise(message) {\n    throw new Error(\"\".concat(this.description, \": \").concat(message));\n  }\n\n  get description() {\n    var _a, _b;\n\n    return (_b = ((_a = this.outerHTML.match(/<[^>]+>/)) !== null && _a !== void 0 ? _a : [])[0]) !== null && _b !== void 0 ? _b : \"<turbo-stream>\";\n  }\n\n  get beforeRenderEvent() {\n    return new CustomEvent(\"turbo:before-stream-render\", {\n      bubbles: true,\n      cancelable: true\n    });\n  }\n\n  get targetElementsById() {\n    var _a;\n\n    const element = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.getElementById(this.target);\n\n    if (element !== null) {\n      return [element];\n    } else {\n      return [];\n    }\n  }\n\n  get targetElementsByQuery() {\n    var _a;\n\n    const elements = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.targets);\n\n    if (elements.length !== 0) {\n      return Array.prototype.slice.call(elements);\n    } else {\n      return [];\n    }\n  }\n\n}\n\nFrameElement.delegateConstructor = FrameController;\ncustomElements.define(\"turbo-frame\", FrameElement);\ncustomElements.define(\"turbo-stream\", StreamElement);\n\n(() => {\n  let element = document.currentScript;\n  if (!element) return;\n  if (element.hasAttribute(\"data-turbo-suppress-warning\")) return;\n\n  while (element = element.parentElement) {\n    if (element == document.body) {\n      return console.warn(unindent(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([\"\\n        You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do!\\n\\n        Load your application\\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.\\n\\n        For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements\\n\\n        \\u2014\\u2014\\n        Suppress this warning by adding a \\\"data-turbo-suppress-warning\\\" attribute to: %s\\n      \"]))), element.outerHTML);\n    }\n  }\n})();\n\nwindow.Turbo = Turbo;\nstart();\nexport { PageRenderer, PageSnapshot, clearCache, connectStreamSource, disconnectStreamSource, navigator$1 as navigator, registerAdapter, renderStreamMessage, session, setConfirmMethod, setProgressBarDelay, start, visit };","import { Controller } from \"@hotwired/stimulus\"\n\n// Connects to data-controller=\"toggle-filter\"\nexport default class extends Controller {\n  connect() {\n    $(document).ready(function(){\n      $(\"#filterBtn\").click(function(){\n        $(\"#tableFilter\").collapse('toggle');\n      });\n    });\n  }\n}\n","// This file is auto-generated by ./bin/rails stimulus:manifest:update\n// Run that command whenever you add a new controller or create them with\n// ./bin/rails generate stimulus controllerName\n\nimport { application } from './application'\n\nimport FilterController from './filter_controller'\napplication.register('filter', FilterController)\n\nimport FlashController from './flash_controller'\napplication.register('flash', FlashController)\n\nimport FormElementController from './form_element_controller'\napplication.register('form-element', FormElementController)\n\nimport HelloController from './hello_controller'\napplication.register('hello', HelloController)\n\nimport SignUpController from './sign_up_controller'\napplication.register('sign-up', SignUpController)\n\nimport TicketController from './tickets_controller'\napplication.register('ticket', TicketController)\n\nimport ToggleFilterController from './toggle_filter_controller'\napplication.register('toggle-filter', ToggleFilterController)\n","let consumer;\nexport async function getConsumer() {\n  return consumer || setConsumer(createConsumer().then(setConsumer));\n}\nexport function setConsumer(newConsumer) {\n  return consumer = newConsumer;\n}\nexport async function createConsumer() {\n  const _await$import = await import(\n  /* webpackChunkName: \"actioncable\" */\n  \"@rails/actioncable/src\"),\n        createConsumer = _await$import.createConsumer;\n\n  return createConsumer();\n}\nexport async function subscribeTo(channel, mixin) {\n  const _await$getConsumer = await getConsumer(),\n        subscriptions = _await$getConsumer.subscriptions;\n\n  return subscriptions.create(channel, mixin);\n}","// Based on https://github.com/nathan7/snakeize\n//\n// This software is released under the MIT license:\n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\nexport default function walk(obj) {\n  if (!obj || typeof obj !== 'object') return obj;\n  if (obj instanceof Date || obj instanceof RegExp) return obj;\n  if (Array.isArray(obj)) return obj.map(walk);\n  return Object.keys(obj).reduce(function (acc, key) {\n    var camel = key[0].toLowerCase() + key.slice(1).replace(/([A-Z]+)/g, function (m, x) {\n      return '_' + x.toLowerCase();\n    });\n    acc[camel] = walk(obj[key]);\n    return acc;\n  }, {});\n}\n;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { connectStreamSource, disconnectStreamSource } from \"@hotwired/turbo\";\nimport { subscribeTo } from \"./cable\";\nimport snakeize from \"./snakeize\";\n\nclass TurboCableStreamSourceElement extends HTMLElement {\n  async connectedCallback() {\n    connectStreamSource(this);\n    this.subscription = await subscribeTo(this.channel, {\n      received: this.dispatchMessageEvent.bind(this)\n    });\n  }\n\n  disconnectedCallback() {\n    disconnectStreamSource(this);\n    if (this.subscription) this.subscription.unsubscribe();\n  }\n\n  dispatchMessageEvent(data) {\n    const event = new MessageEvent(\"message\", {\n      data\n    });\n    return this.dispatchEvent(event);\n  }\n\n  get channel() {\n    const channel = this.getAttribute(\"channel\");\n    const signed_stream_name = this.getAttribute(\"signed-stream-name\");\n    return _objectSpread({\n      channel,\n      signed_stream_name\n    }, snakeize(_objectSpread({}, this.dataset)));\n  }\n\n}\n\ncustomElements.define(\"turbo-cable-stream-source\", TurboCableStreamSourceElement);","import \"./cable_stream_source_element\";\nimport { overrideMethodWithFormmethod } from \"./form_submissions\";\nimport * as Turbo from \"@hotwired/turbo\";\nexport { Turbo };\nimport * as cable from \"./cable\";\nexport { cable };\naddEventListener(\"turbo:submit-start\", overrideMethodWithFormmethod);","export function overrideMethodWithFormmethod(_ref) {\n  let _ref$detail$formSubmi = _ref.detail.formSubmission,\n      fetchRequest = _ref$detail$formSubmi.fetchRequest,\n      submitter = _ref$detail$formSubmi.submitter;\n\n  if (submitter && submitter.formMethod && fetchRequest.body.has(\"_method\")) {\n    fetchRequest.body.set(\"_method\", submitter.formMethod);\n  }\n}","/*!\n * Chart.js v3.9.1\n * https://www.chartjs.org\n * (c) 2022 Chart.js Contributors\n * Released under the MIT License\n */\nfunction noop() {}\n\nconst uid = function () {\n  let id = 0;\n  return function () {\n    return id++;\n  };\n}();\n\nfunction isNullOrUndef(value) {\n  return value === null || typeof value === 'undefined';\n}\n\nfunction isArray(value) {\n  if (Array.isArray && Array.isArray(value)) {\n    return true;\n  }\n\n  const type = Object.prototype.toString.call(value);\n\n  if (type.slice(0, 7) === '[object' && type.slice(-6) === 'Array]') {\n    return true;\n  }\n\n  return false;\n}\n\nfunction isObject(value) {\n  return value !== null && Object.prototype.toString.call(value) === '[object Object]';\n}\n\nconst isNumberFinite = value => (typeof value === 'number' || value instanceof Number) && isFinite(+value);\n\nfunction finiteOrDefault(value, defaultValue) {\n  return isNumberFinite(value) ? value : defaultValue;\n}\n\nfunction valueOrDefault(value, defaultValue) {\n  return typeof value === 'undefined' ? defaultValue : value;\n}\n\nconst toPercentage = (value, dimension) => typeof value === 'string' && value.endsWith('%') ? parseFloat(value) / 100 : value / dimension;\n\nconst toDimension = (value, dimension) => typeof value === 'string' && value.endsWith('%') ? parseFloat(value) / 100 * dimension : +value;\n\nfunction callback(fn, args, thisArg) {\n  if (fn && typeof fn.call === 'function') {\n    return fn.apply(thisArg, args);\n  }\n}\n\nfunction each(loopable, fn, thisArg, reverse) {\n  let i, len, keys;\n\n  if (isArray(loopable)) {\n    len = loopable.length;\n\n    if (reverse) {\n      for (i = len - 1; i >= 0; i--) {\n        fn.call(thisArg, loopable[i], i);\n      }\n    } else {\n      for (i = 0; i < len; i++) {\n        fn.call(thisArg, loopable[i], i);\n      }\n    }\n  } else if (isObject(loopable)) {\n    keys = Object.keys(loopable);\n    len = keys.length;\n\n    for (i = 0; i < len; i++) {\n      fn.call(thisArg, loopable[keys[i]], keys[i]);\n    }\n  }\n}\n\nfunction _elementsEqual(a0, a1) {\n  let i, ilen, v0, v1;\n\n  if (!a0 || !a1 || a0.length !== a1.length) {\n    return false;\n  }\n\n  for (i = 0, ilen = a0.length; i < ilen; ++i) {\n    v0 = a0[i];\n    v1 = a1[i];\n\n    if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction clone$1(source) {\n  if (isArray(source)) {\n    return source.map(clone$1);\n  }\n\n  if (isObject(source)) {\n    const target = Object.create(null);\n    const keys = Object.keys(source);\n    const klen = keys.length;\n    let k = 0;\n\n    for (; k < klen; ++k) {\n      target[keys[k]] = clone$1(source[keys[k]]);\n    }\n\n    return target;\n  }\n\n  return source;\n}\n\nfunction isValidKey(key) {\n  return ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;\n}\n\nfunction _merger(key, target, source, options) {\n  if (!isValidKey(key)) {\n    return;\n  }\n\n  const tval = target[key];\n  const sval = source[key];\n\n  if (isObject(tval) && isObject(sval)) {\n    merge(tval, sval, options);\n  } else {\n    target[key] = clone$1(sval);\n  }\n}\n\nfunction merge(target, source, options) {\n  const sources = isArray(source) ? source : [source];\n  const ilen = sources.length;\n\n  if (!isObject(target)) {\n    return target;\n  }\n\n  options = options || {};\n  const merger = options.merger || _merger;\n\n  for (let i = 0; i < ilen; ++i) {\n    source = sources[i];\n\n    if (!isObject(source)) {\n      continue;\n    }\n\n    const keys = Object.keys(source);\n\n    for (let k = 0, klen = keys.length; k < klen; ++k) {\n      merger(keys[k], target, source, options);\n    }\n  }\n\n  return target;\n}\n\nfunction mergeIf(target, source) {\n  return merge(target, source, {\n    merger: _mergerIf\n  });\n}\n\nfunction _mergerIf(key, target, source) {\n  if (!isValidKey(key)) {\n    return;\n  }\n\n  const tval = target[key];\n  const sval = source[key];\n\n  if (isObject(tval) && isObject(sval)) {\n    mergeIf(tval, sval);\n  } else if (!Object.prototype.hasOwnProperty.call(target, key)) {\n    target[key] = clone$1(sval);\n  }\n}\n\nfunction _deprecated(scope, value, previous, current) {\n  if (value !== undefined) {\n    console.warn(scope + ': \"' + previous + '\" is deprecated. Please use \"' + current + '\" instead');\n  }\n}\n\nconst keyResolvers = {\n  '': v => v,\n  x: o => o.x,\n  y: o => o.y\n};\n\nfunction resolveObjectKey(obj, key) {\n  const resolver = keyResolvers[key] || (keyResolvers[key] = _getKeyResolver(key));\n\n  return resolver(obj);\n}\n\nfunction _getKeyResolver(key) {\n  const keys = _splitKey(key);\n\n  return obj => {\n    for (const k of keys) {\n      if (k === '') {\n        break;\n      }\n\n      obj = obj && obj[k];\n    }\n\n    return obj;\n  };\n}\n\nfunction _splitKey(key) {\n  const parts = key.split('.');\n  const keys = [];\n  let tmp = '';\n\n  for (const part of parts) {\n    tmp += part;\n\n    if (tmp.endsWith('\\\\')) {\n      tmp = tmp.slice(0, -1) + '.';\n    } else {\n      keys.push(tmp);\n      tmp = '';\n    }\n  }\n\n  return keys;\n}\n\nfunction _capitalize(str) {\n  return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\nconst defined = value => typeof value !== 'undefined';\n\nconst isFunction = value => typeof value === 'function';\n\nconst setsEqual = (a, b) => {\n  if (a.size !== b.size) {\n    return false;\n  }\n\n  for (const item of a) {\n    if (!b.has(item)) {\n      return false;\n    }\n  }\n\n  return true;\n};\n\nfunction _isClickEvent(e) {\n  return e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu';\n}\n\nconst PI = Math.PI;\nconst TAU = 2 * PI;\nconst PITAU = TAU + PI;\nconst INFINITY = Number.POSITIVE_INFINITY;\nconst RAD_PER_DEG = PI / 180;\nconst HALF_PI = PI / 2;\nconst QUARTER_PI = PI / 4;\nconst TWO_THIRDS_PI = PI * 2 / 3;\nconst log10 = Math.log10;\nconst sign = Math.sign;\n\nfunction niceNum(range) {\n  const roundedRange = Math.round(range);\n  range = almostEquals(range, roundedRange, range / 1000) ? roundedRange : range;\n  const niceRange = Math.pow(10, Math.floor(log10(range)));\n  const fraction = range / niceRange;\n  const niceFraction = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10;\n  return niceFraction * niceRange;\n}\n\nfunction _factorize(value) {\n  const result = [];\n  const sqrt = Math.sqrt(value);\n  let i;\n\n  for (i = 1; i < sqrt; i++) {\n    if (value % i === 0) {\n      result.push(i);\n      result.push(value / i);\n    }\n  }\n\n  if (sqrt === (sqrt | 0)) {\n    result.push(sqrt);\n  }\n\n  result.sort((a, b) => a - b).pop();\n  return result;\n}\n\nfunction isNumber(n) {\n  return !isNaN(parseFloat(n)) && isFinite(n);\n}\n\nfunction almostEquals(x, y, epsilon) {\n  return Math.abs(x - y) < epsilon;\n}\n\nfunction almostWhole(x, epsilon) {\n  const rounded = Math.round(x);\n  return rounded - epsilon <= x && rounded + epsilon >= x;\n}\n\nfunction _setMinAndMaxByKey(array, target, property) {\n  let i, ilen, value;\n\n  for (i = 0, ilen = array.length; i < ilen; i++) {\n    value = array[i][property];\n\n    if (!isNaN(value)) {\n      target.min = Math.min(target.min, value);\n      target.max = Math.max(target.max, value);\n    }\n  }\n}\n\nfunction toRadians(degrees) {\n  return degrees * (PI / 180);\n}\n\nfunction toDegrees(radians) {\n  return radians * (180 / PI);\n}\n\nfunction _decimalPlaces(x) {\n  if (!isNumberFinite(x)) {\n    return;\n  }\n\n  let e = 1;\n  let p = 0;\n\n  while (Math.round(x * e) / e !== x) {\n    e *= 10;\n    p++;\n  }\n\n  return p;\n}\n\nfunction getAngleFromPoint(centrePoint, anglePoint) {\n  const distanceFromXCenter = anglePoint.x - centrePoint.x;\n  const distanceFromYCenter = anglePoint.y - centrePoint.y;\n  const radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\n  let angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);\n\n  if (angle < -0.5 * PI) {\n    angle += TAU;\n  }\n\n  return {\n    angle,\n    distance: radialDistanceFromCenter\n  };\n}\n\nfunction distanceBetweenPoints(pt1, pt2) {\n  return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));\n}\n\nfunction _angleDiff(a, b) {\n  return (a - b + PITAU) % TAU - PI;\n}\n\nfunction _normalizeAngle(a) {\n  return (a % TAU + TAU) % TAU;\n}\n\nfunction _angleBetween(angle, start, end, sameAngleIsFullCircle) {\n  const a = _normalizeAngle(angle);\n\n  const s = _normalizeAngle(start);\n\n  const e = _normalizeAngle(end);\n\n  const angleToStart = _normalizeAngle(s - a);\n\n  const angleToEnd = _normalizeAngle(e - a);\n\n  const startToAngle = _normalizeAngle(a - s);\n\n  const endToAngle = _normalizeAngle(a - e);\n\n  return a === s || a === e || sameAngleIsFullCircle && s === e || angleToStart > angleToEnd && startToAngle < endToAngle;\n}\n\nfunction _limitValue(value, min, max) {\n  return Math.max(min, Math.min(max, value));\n}\n\nfunction _int16Range(value) {\n  return _limitValue(value, -32768, 32767);\n}\n\nfunction _isBetween(value, start, end) {\n  let epsilon = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1e-6;\n  return value >= Math.min(start, end) - epsilon && value <= Math.max(start, end) + epsilon;\n}\n\nfunction _lookup(table, value, cmp) {\n  cmp = cmp || (index => table[index] < value);\n\n  let hi = table.length - 1;\n  let lo = 0;\n  let mid;\n\n  while (hi - lo > 1) {\n    mid = lo + hi >> 1;\n\n    if (cmp(mid)) {\n      lo = mid;\n    } else {\n      hi = mid;\n    }\n  }\n\n  return {\n    lo,\n    hi\n  };\n}\n\nconst _lookupByKey = (table, key, value, last) => _lookup(table, value, last ? index => table[index][key] <= value : index => table[index][key] < value);\n\nconst _rlookupByKey = (table, key, value) => _lookup(table, value, index => table[index][key] >= value);\n\nfunction _filterBetween(values, min, max) {\n  let start = 0;\n  let end = values.length;\n\n  while (start < end && values[start] < min) {\n    start++;\n  }\n\n  while (end > start && values[end - 1] > max) {\n    end--;\n  }\n\n  return start > 0 || end < values.length ? values.slice(start, end) : values;\n}\n\nconst arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];\n\nfunction listenArrayEvents(array, listener) {\n  if (array._chartjs) {\n    array._chartjs.listeners.push(listener);\n\n    return;\n  }\n\n  Object.defineProperty(array, '_chartjs', {\n    configurable: true,\n    enumerable: false,\n    value: {\n      listeners: [listener]\n    }\n  });\n  arrayEvents.forEach(key => {\n    const method = '_onData' + _capitalize(key);\n\n    const base = array[key];\n    Object.defineProperty(array, key, {\n      configurable: true,\n      enumerable: false,\n\n      value() {\n        for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n          args[_key] = arguments[_key];\n        }\n\n        const res = base.apply(this, args);\n\n        array._chartjs.listeners.forEach(object => {\n          if (typeof object[method] === 'function') {\n            object[method](...args);\n          }\n        });\n\n        return res;\n      }\n\n    });\n  });\n}\n\nfunction unlistenArrayEvents(array, listener) {\n  const stub = array._chartjs;\n\n  if (!stub) {\n    return;\n  }\n\n  const listeners = stub.listeners;\n  const index = listeners.indexOf(listener);\n\n  if (index !== -1) {\n    listeners.splice(index, 1);\n  }\n\n  if (listeners.length > 0) {\n    return;\n  }\n\n  arrayEvents.forEach(key => {\n    delete array[key];\n  });\n  delete array._chartjs;\n}\n\nfunction _arrayUnique(items) {\n  const set = new Set();\n  let i, ilen;\n\n  for (i = 0, ilen = items.length; i < ilen; ++i) {\n    set.add(items[i]);\n  }\n\n  if (set.size === ilen) {\n    return items;\n  }\n\n  return Array.from(set);\n}\n\nfunction fontString(pixelSize, fontStyle, fontFamily) {\n  return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;\n}\n\nconst requestAnimFrame = function () {\n  if (typeof window === 'undefined') {\n    return function (callback) {\n      return callback();\n    };\n  }\n\n  return window.requestAnimationFrame;\n}();\n\nfunction throttled(fn, thisArg, updateFn) {\n  const updateArgs = updateFn || (args => Array.prototype.slice.call(args));\n\n  let ticking = false;\n  let args = [];\n  return function () {\n    for (var _len2 = arguments.length, rest = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      rest[_key2] = arguments[_key2];\n    }\n\n    args = updateArgs(rest);\n\n    if (!ticking) {\n      ticking = true;\n      requestAnimFrame.call(window, () => {\n        ticking = false;\n        fn.apply(thisArg, args);\n      });\n    }\n  };\n}\n\nfunction debounce(fn, delay) {\n  let timeout;\n  return function () {\n    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n      args[_key3] = arguments[_key3];\n    }\n\n    if (delay) {\n      clearTimeout(timeout);\n      timeout = setTimeout(fn, delay, args);\n    } else {\n      fn.apply(this, args);\n    }\n\n    return delay;\n  };\n}\n\nconst _toLeftRightCenter = align => align === 'start' ? 'left' : align === 'end' ? 'right' : 'center';\n\nconst _alignStartEnd = (align, start, end) => align === 'start' ? start : align === 'end' ? end : (start + end) / 2;\n\nconst _textX = (align, left, right, rtl) => {\n  const check = rtl ? 'left' : 'right';\n  return align === check ? right : align === 'center' ? (left + right) / 2 : left;\n};\n\nfunction _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled) {\n  const pointCount = points.length;\n  let start = 0;\n  let count = pointCount;\n\n  if (meta._sorted) {\n    const iScale = meta.iScale,\n          _parsed = meta._parsed;\n    const axis = iScale.axis;\n\n    const _iScale$getUserBounds = iScale.getUserBounds(),\n          min = _iScale$getUserBounds.min,\n          max = _iScale$getUserBounds.max,\n          minDefined = _iScale$getUserBounds.minDefined,\n          maxDefined = _iScale$getUserBounds.maxDefined;\n\n    if (minDefined) {\n      start = _limitValue(Math.min(_lookupByKey(_parsed, iScale.axis, min).lo, animationsDisabled ? pointCount : _lookupByKey(points, axis, iScale.getPixelForValue(min)).lo), 0, pointCount - 1);\n    }\n\n    if (maxDefined) {\n      count = _limitValue(Math.max(_lookupByKey(_parsed, iScale.axis, max, true).hi + 1, animationsDisabled ? 0 : _lookupByKey(points, axis, iScale.getPixelForValue(max), true).hi + 1), start, pointCount) - start;\n    } else {\n      count = pointCount - start;\n    }\n  }\n\n  return {\n    start,\n    count\n  };\n}\n\nfunction _scaleRangesChanged(meta) {\n  const xScale = meta.xScale,\n        yScale = meta.yScale,\n        _scaleRanges = meta._scaleRanges;\n  const newRanges = {\n    xmin: xScale.min,\n    xmax: xScale.max,\n    ymin: yScale.min,\n    ymax: yScale.max\n  };\n\n  if (!_scaleRanges) {\n    meta._scaleRanges = newRanges;\n    return true;\n  }\n\n  const changed = _scaleRanges.xmin !== xScale.min || _scaleRanges.xmax !== xScale.max || _scaleRanges.ymin !== yScale.min || _scaleRanges.ymax !== yScale.max;\n  Object.assign(_scaleRanges, newRanges);\n  return changed;\n}\n\nconst atEdge = t => t === 0 || t === 1;\n\nconst elasticIn = (t, s, p) => -(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * TAU / p));\n\nconst elasticOut = (t, s, p) => Math.pow(2, -10 * t) * Math.sin((t - s) * TAU / p) + 1;\n\nconst effects = {\n  linear: t => t,\n  easeInQuad: t => t * t,\n  easeOutQuad: t => -t * (t - 2),\n  easeInOutQuad: t => (t /= 0.5) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1),\n  easeInCubic: t => t * t * t,\n  easeOutCubic: t => (t -= 1) * t * t + 1,\n  easeInOutCubic: t => (t /= 0.5) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2),\n  easeInQuart: t => t * t * t * t,\n  easeOutQuart: t => -((t -= 1) * t * t * t - 1),\n  easeInOutQuart: t => (t /= 0.5) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2),\n  easeInQuint: t => t * t * t * t * t,\n  easeOutQuint: t => (t -= 1) * t * t * t * t + 1,\n  easeInOutQuint: t => (t /= 0.5) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2),\n  easeInSine: t => -Math.cos(t * HALF_PI) + 1,\n  easeOutSine: t => Math.sin(t * HALF_PI),\n  easeInOutSine: t => -0.5 * (Math.cos(PI * t) - 1),\n  easeInExpo: t => t === 0 ? 0 : Math.pow(2, 10 * (t - 1)),\n  easeOutExpo: t => t === 1 ? 1 : -Math.pow(2, -10 * t) + 1,\n  easeInOutExpo: t => atEdge(t) ? t : t < 0.5 ? 0.5 * Math.pow(2, 10 * (t * 2 - 1)) : 0.5 * (-Math.pow(2, -10 * (t * 2 - 1)) + 2),\n  easeInCirc: t => t >= 1 ? t : -(Math.sqrt(1 - t * t) - 1),\n  easeOutCirc: t => Math.sqrt(1 - (t -= 1) * t),\n  easeInOutCirc: t => (t /= 0.5) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1),\n  easeInElastic: t => atEdge(t) ? t : elasticIn(t, 0.075, 0.3),\n  easeOutElastic: t => atEdge(t) ? t : elasticOut(t, 0.075, 0.3),\n\n  easeInOutElastic(t) {\n    const s = 0.1125;\n    const p = 0.45;\n    return atEdge(t) ? t : t < 0.5 ? 0.5 * elasticIn(t * 2, s, p) : 0.5 + 0.5 * elasticOut(t * 2 - 1, s, p);\n  },\n\n  easeInBack(t) {\n    const s = 1.70158;\n    return t * t * ((s + 1) * t - s);\n  },\n\n  easeOutBack(t) {\n    const s = 1.70158;\n    return (t -= 1) * t * ((s + 1) * t + s) + 1;\n  },\n\n  easeInOutBack(t) {\n    let s = 1.70158;\n\n    if ((t /= 0.5) < 1) {\n      return 0.5 * (t * t * (((s *= 1.525) + 1) * t - s));\n    }\n\n    return 0.5 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2);\n  },\n\n  easeInBounce: t => 1 - effects.easeOutBounce(1 - t),\n\n  easeOutBounce(t) {\n    const m = 7.5625;\n    const d = 2.75;\n\n    if (t < 1 / d) {\n      return m * t * t;\n    }\n\n    if (t < 2 / d) {\n      return m * (t -= 1.5 / d) * t + 0.75;\n    }\n\n    if (t < 2.5 / d) {\n      return m * (t -= 2.25 / d) * t + 0.9375;\n    }\n\n    return m * (t -= 2.625 / d) * t + 0.984375;\n  },\n\n  easeInOutBounce: t => t < 0.5 ? effects.easeInBounce(t * 2) * 0.5 : effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5\n};\n/*!\n * @kurkle/color v0.2.1\n * https://github.com/kurkle/color#readme\n * (c) 2022 Jukka Kurkela\n * Released under the MIT License\n */\n\nfunction round(v) {\n  return v + 0.5 | 0;\n}\n\nconst lim = (v, l, h) => Math.max(Math.min(v, h), l);\n\nfunction p2b(v) {\n  return lim(round(v * 2.55), 0, 255);\n}\n\nfunction n2b(v) {\n  return lim(round(v * 255), 0, 255);\n}\n\nfunction b2n(v) {\n  return lim(round(v / 2.55) / 100, 0, 1);\n}\n\nfunction n2p(v) {\n  return lim(round(v * 100), 0, 100);\n}\n\nconst map$1 = {\n  0: 0,\n  1: 1,\n  2: 2,\n  3: 3,\n  4: 4,\n  5: 5,\n  6: 6,\n  7: 7,\n  8: 8,\n  9: 9,\n  A: 10,\n  B: 11,\n  C: 12,\n  D: 13,\n  E: 14,\n  F: 15,\n  a: 10,\n  b: 11,\n  c: 12,\n  d: 13,\n  e: 14,\n  f: 15\n};\nconst hex = [...'0123456789ABCDEF'];\n\nconst h1 = b => hex[b & 0xF];\n\nconst h2 = b => hex[(b & 0xF0) >> 4] + hex[b & 0xF];\n\nconst eq = b => (b & 0xF0) >> 4 === (b & 0xF);\n\nconst isShort = v => eq(v.r) && eq(v.g) && eq(v.b) && eq(v.a);\n\nfunction hexParse(str) {\n  var len = str.length;\n  var ret;\n\n  if (str[0] === '#') {\n    if (len === 4 || len === 5) {\n      ret = {\n        r: 255 & map$1[str[1]] * 17,\n        g: 255 & map$1[str[2]] * 17,\n        b: 255 & map$1[str[3]] * 17,\n        a: len === 5 ? map$1[str[4]] * 17 : 255\n      };\n    } else if (len === 7 || len === 9) {\n      ret = {\n        r: map$1[str[1]] << 4 | map$1[str[2]],\n        g: map$1[str[3]] << 4 | map$1[str[4]],\n        b: map$1[str[5]] << 4 | map$1[str[6]],\n        a: len === 9 ? map$1[str[7]] << 4 | map$1[str[8]] : 255\n      };\n    }\n  }\n\n  return ret;\n}\n\nconst alpha = (a, f) => a < 255 ? f(a) : '';\n\nfunction hexString(v) {\n  var f = isShort(v) ? h1 : h2;\n  return v ? '#' + f(v.r) + f(v.g) + f(v.b) + alpha(v.a, f) : undefined;\n}\n\nconst HUE_RE = /^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\n\nfunction hsl2rgbn(h, s, l) {\n  const a = s * Math.min(l, 1 - l);\n\n  const f = function (n) {\n    let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;\n    return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n  };\n\n  return [f(0), f(8), f(4)];\n}\n\nfunction hsv2rgbn(h, s, v) {\n  const f = function (n) {\n    let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 60) % 6;\n    return v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);\n  };\n\n  return [f(5), f(3), f(1)];\n}\n\nfunction hwb2rgbn(h, w, b) {\n  const rgb = hsl2rgbn(h, 1, 0.5);\n  let i;\n\n  if (w + b > 1) {\n    i = 1 / (w + b);\n    w *= i;\n    b *= i;\n  }\n\n  for (i = 0; i < 3; i++) {\n    rgb[i] *= 1 - w - b;\n    rgb[i] += w;\n  }\n\n  return rgb;\n}\n\nfunction hueValue(r, g, b, d, max) {\n  if (r === max) {\n    return (g - b) / d + (g < b ? 6 : 0);\n  }\n\n  if (g === max) {\n    return (b - r) / d + 2;\n  }\n\n  return (r - g) / d + 4;\n}\n\nfunction rgb2hsl(v) {\n  const range = 255;\n  const r = v.r / range;\n  const g = v.g / range;\n  const b = v.b / range;\n  const max = Math.max(r, g, b);\n  const min = Math.min(r, g, b);\n  const l = (max + min) / 2;\n  let h, s, d;\n\n  if (max !== min) {\n    d = max - min;\n    s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n    h = hueValue(r, g, b, d, max);\n    h = h * 60 + 0.5;\n  }\n\n  return [h | 0, s || 0, l];\n}\n\nfunction calln(f, a, b, c) {\n  return (Array.isArray(a) ? f(a[0], a[1], a[2]) : f(a, b, c)).map(n2b);\n}\n\nfunction hsl2rgb(h, s, l) {\n  return calln(hsl2rgbn, h, s, l);\n}\n\nfunction hwb2rgb(h, w, b) {\n  return calln(hwb2rgbn, h, w, b);\n}\n\nfunction hsv2rgb(h, s, v) {\n  return calln(hsv2rgbn, h, s, v);\n}\n\nfunction hue(h) {\n  return (h % 360 + 360) % 360;\n}\n\nfunction hueParse(str) {\n  const m = HUE_RE.exec(str);\n  let a = 255;\n  let v;\n\n  if (!m) {\n    return;\n  }\n\n  if (m[5] !== v) {\n    a = m[6] ? p2b(+m[5]) : n2b(+m[5]);\n  }\n\n  const h = hue(+m[2]);\n  const p1 = +m[3] / 100;\n  const p2 = +m[4] / 100;\n\n  if (m[1] === 'hwb') {\n    v = hwb2rgb(h, p1, p2);\n  } else if (m[1] === 'hsv') {\n    v = hsv2rgb(h, p1, p2);\n  } else {\n    v = hsl2rgb(h, p1, p2);\n  }\n\n  return {\n    r: v[0],\n    g: v[1],\n    b: v[2],\n    a: a\n  };\n}\n\nfunction rotate(v, deg) {\n  var h = rgb2hsl(v);\n  h[0] = hue(h[0] + deg);\n  h = hsl2rgb(h);\n  v.r = h[0];\n  v.g = h[1];\n  v.b = h[2];\n}\n\nfunction hslString(v) {\n  if (!v) {\n    return;\n  }\n\n  const a = rgb2hsl(v);\n  const h = a[0];\n  const s = n2p(a[1]);\n  const l = n2p(a[2]);\n  return v.a < 255 ? \"hsla(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%, \").concat(b2n(v.a), \")\") : \"hsl(\".concat(h, \", \").concat(s, \"%, \").concat(l, \"%)\");\n}\n\nconst map = {\n  x: 'dark',\n  Z: 'light',\n  Y: 're',\n  X: 'blu',\n  W: 'gr',\n  V: 'medium',\n  U: 'slate',\n  A: 'ee',\n  T: 'ol',\n  S: 'or',\n  B: 'ra',\n  C: 'lateg',\n  D: 'ights',\n  R: 'in',\n  Q: 'turquois',\n  E: 'hi',\n  P: 'ro',\n  O: 'al',\n  N: 'le',\n  M: 'de',\n  L: 'yello',\n  F: 'en',\n  K: 'ch',\n  G: 'arks',\n  H: 'ea',\n  I: 'ightg',\n  J: 'wh'\n};\nconst names$1 = {\n  OiceXe: 'f0f8ff',\n  antiquewEte: 'faebd7',\n  aqua: 'ffff',\n  aquamarRe: '7fffd4',\n  azuY: 'f0ffff',\n  beige: 'f5f5dc',\n  bisque: 'ffe4c4',\n  black: '0',\n  blanKedOmond: 'ffebcd',\n  Xe: 'ff',\n  XeviTet: '8a2be2',\n  bPwn: 'a52a2a',\n  burlywood: 'deb887',\n  caMtXe: '5f9ea0',\n  KartYuse: '7fff00',\n  KocTate: 'd2691e',\n  cSO: 'ff7f50',\n  cSnflowerXe: '6495ed',\n  cSnsilk: 'fff8dc',\n  crimson: 'dc143c',\n  cyan: 'ffff',\n  xXe: '8b',\n  xcyan: '8b8b',\n  xgTMnPd: 'b8860b',\n  xWay: 'a9a9a9',\n  xgYF: '6400',\n  xgYy: 'a9a9a9',\n  xkhaki: 'bdb76b',\n  xmagFta: '8b008b',\n  xTivegYF: '556b2f',\n  xSange: 'ff8c00',\n  xScEd: '9932cc',\n  xYd: '8b0000',\n  xsOmon: 'e9967a',\n  xsHgYF: '8fbc8f',\n  xUXe: '483d8b',\n  xUWay: '2f4f4f',\n  xUgYy: '2f4f4f',\n  xQe: 'ced1',\n  xviTet: '9400d3',\n  dAppRk: 'ff1493',\n  dApskyXe: 'bfff',\n  dimWay: '696969',\n  dimgYy: '696969',\n  dodgerXe: '1e90ff',\n  fiYbrick: 'b22222',\n  flSOwEte: 'fffaf0',\n  foYstWAn: '228b22',\n  fuKsia: 'ff00ff',\n  gaRsbSo: 'dcdcdc',\n  ghostwEte: 'f8f8ff',\n  gTd: 'ffd700',\n  gTMnPd: 'daa520',\n  Way: '808080',\n  gYF: '8000',\n  gYFLw: 'adff2f',\n  gYy: '808080',\n  honeyMw: 'f0fff0',\n  hotpRk: 'ff69b4',\n  RdianYd: 'cd5c5c',\n  Rdigo: '4b0082',\n  ivSy: 'fffff0',\n  khaki: 'f0e68c',\n  lavFMr: 'e6e6fa',\n  lavFMrXsh: 'fff0f5',\n  lawngYF: '7cfc00',\n  NmoncEffon: 'fffacd',\n  ZXe: 'add8e6',\n  ZcSO: 'f08080',\n  Zcyan: 'e0ffff',\n  ZgTMnPdLw: 'fafad2',\n  ZWay: 'd3d3d3',\n  ZgYF: '90ee90',\n  ZgYy: 'd3d3d3',\n  ZpRk: 'ffb6c1',\n  ZsOmon: 'ffa07a',\n  ZsHgYF: '20b2aa',\n  ZskyXe: '87cefa',\n  ZUWay: '778899',\n  ZUgYy: '778899',\n  ZstAlXe: 'b0c4de',\n  ZLw: 'ffffe0',\n  lime: 'ff00',\n  limegYF: '32cd32',\n  lRF: 'faf0e6',\n  magFta: 'ff00ff',\n  maPon: '800000',\n  VaquamarRe: '66cdaa',\n  VXe: 'cd',\n  VScEd: 'ba55d3',\n  VpurpN: '9370db',\n  VsHgYF: '3cb371',\n  VUXe: '7b68ee',\n  VsprRggYF: 'fa9a',\n  VQe: '48d1cc',\n  VviTetYd: 'c71585',\n  midnightXe: '191970',\n  mRtcYam: 'f5fffa',\n  mistyPse: 'ffe4e1',\n  moccasR: 'ffe4b5',\n  navajowEte: 'ffdead',\n  navy: '80',\n  Tdlace: 'fdf5e6',\n  Tive: '808000',\n  TivedBb: '6b8e23',\n  Sange: 'ffa500',\n  SangeYd: 'ff4500',\n  ScEd: 'da70d6',\n  pOegTMnPd: 'eee8aa',\n  pOegYF: '98fb98',\n  pOeQe: 'afeeee',\n  pOeviTetYd: 'db7093',\n  papayawEp: 'ffefd5',\n  pHKpuff: 'ffdab9',\n  peru: 'cd853f',\n  pRk: 'ffc0cb',\n  plum: 'dda0dd',\n  powMrXe: 'b0e0e6',\n  purpN: '800080',\n  YbeccapurpN: '663399',\n  Yd: 'ff0000',\n  Psybrown: 'bc8f8f',\n  PyOXe: '4169e1',\n  saddNbPwn: '8b4513',\n  sOmon: 'fa8072',\n  sandybPwn: 'f4a460',\n  sHgYF: '2e8b57',\n  sHshell: 'fff5ee',\n  siFna: 'a0522d',\n  silver: 'c0c0c0',\n  skyXe: '87ceeb',\n  UXe: '6a5acd',\n  UWay: '708090',\n  UgYy: '708090',\n  snow: 'fffafa',\n  sprRggYF: 'ff7f',\n  stAlXe: '4682b4',\n  tan: 'd2b48c',\n  teO: '8080',\n  tEstN: 'd8bfd8',\n  tomato: 'ff6347',\n  Qe: '40e0d0',\n  viTet: 'ee82ee',\n  JHt: 'f5deb3',\n  wEte: 'ffffff',\n  wEtesmoke: 'f5f5f5',\n  Lw: 'ffff00',\n  LwgYF: '9acd32'\n};\n\nfunction unpack() {\n  const unpacked = {};\n  const keys = Object.keys(names$1);\n  const tkeys = Object.keys(map);\n  let i, j, k, ok, nk;\n\n  for (i = 0; i < keys.length; i++) {\n    ok = nk = keys[i];\n\n    for (j = 0; j < tkeys.length; j++) {\n      k = tkeys[j];\n      nk = nk.replace(k, map[k]);\n    }\n\n    k = parseInt(names$1[ok], 16);\n    unpacked[nk] = [k >> 16 & 0xFF, k >> 8 & 0xFF, k & 0xFF];\n  }\n\n  return unpacked;\n}\n\nlet names;\n\nfunction nameParse(str) {\n  if (!names) {\n    names = unpack();\n    names.transparent = [0, 0, 0, 0];\n  }\n\n  const a = names[str.toLowerCase()];\n  return a && {\n    r: a[0],\n    g: a[1],\n    b: a[2],\n    a: a.length === 4 ? a[3] : 255\n  };\n}\n\nconst RGB_RE = /^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\n\nfunction rgbParse(str) {\n  const m = RGB_RE.exec(str);\n  let a = 255;\n  let r, g, b;\n\n  if (!m) {\n    return;\n  }\n\n  if (m[7] !== r) {\n    const v = +m[7];\n    a = m[8] ? p2b(v) : lim(v * 255, 0, 255);\n  }\n\n  r = +m[1];\n  g = +m[3];\n  b = +m[5];\n  r = 255 & (m[2] ? p2b(r) : lim(r, 0, 255));\n  g = 255 & (m[4] ? p2b(g) : lim(g, 0, 255));\n  b = 255 & (m[6] ? p2b(b) : lim(b, 0, 255));\n  return {\n    r: r,\n    g: g,\n    b: b,\n    a: a\n  };\n}\n\nfunction rgbString(v) {\n  return v && (v.a < 255 ? \"rgba(\".concat(v.r, \", \").concat(v.g, \", \").concat(v.b, \", \").concat(b2n(v.a), \")\") : \"rgb(\".concat(v.r, \", \").concat(v.g, \", \").concat(v.b, \")\"));\n}\n\nconst to = v => v <= 0.0031308 ? v * 12.92 : Math.pow(v, 1.0 / 2.4) * 1.055 - 0.055;\n\nconst from = v => v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\n\nfunction interpolate(rgb1, rgb2, t) {\n  const r = from(b2n(rgb1.r));\n  const g = from(b2n(rgb1.g));\n  const b = from(b2n(rgb1.b));\n  return {\n    r: n2b(to(r + t * (from(b2n(rgb2.r)) - r))),\n    g: n2b(to(g + t * (from(b2n(rgb2.g)) - g))),\n    b: n2b(to(b + t * (from(b2n(rgb2.b)) - b))),\n    a: rgb1.a + t * (rgb2.a - rgb1.a)\n  };\n}\n\nfunction modHSL(v, i, ratio) {\n  if (v) {\n    let tmp = rgb2hsl(v);\n    tmp[i] = Math.max(0, Math.min(tmp[i] + tmp[i] * ratio, i === 0 ? 360 : 1));\n    tmp = hsl2rgb(tmp);\n    v.r = tmp[0];\n    v.g = tmp[1];\n    v.b = tmp[2];\n  }\n}\n\nfunction clone(v, proto) {\n  return v ? Object.assign(proto || {}, v) : v;\n}\n\nfunction fromObject(input) {\n  var v = {\n    r: 0,\n    g: 0,\n    b: 0,\n    a: 255\n  };\n\n  if (Array.isArray(input)) {\n    if (input.length >= 3) {\n      v = {\n        r: input[0],\n        g: input[1],\n        b: input[2],\n        a: 255\n      };\n\n      if (input.length > 3) {\n        v.a = n2b(input[3]);\n      }\n    }\n  } else {\n    v = clone(input, {\n      r: 0,\n      g: 0,\n      b: 0,\n      a: 1\n    });\n    v.a = n2b(v.a);\n  }\n\n  return v;\n}\n\nfunction functionParse(str) {\n  if (str.charAt(0) === 'r') {\n    return rgbParse(str);\n  }\n\n  return hueParse(str);\n}\n\nclass Color {\n  constructor(input) {\n    if (input instanceof Color) {\n      return input;\n    }\n\n    const type = typeof input;\n    let v;\n\n    if (type === 'object') {\n      v = fromObject(input);\n    } else if (type === 'string') {\n      v = hexParse(input) || nameParse(input) || functionParse(input);\n    }\n\n    this._rgb = v;\n    this._valid = !!v;\n  }\n\n  get valid() {\n    return this._valid;\n  }\n\n  get rgb() {\n    var v = clone(this._rgb);\n\n    if (v) {\n      v.a = b2n(v.a);\n    }\n\n    return v;\n  }\n\n  set rgb(obj) {\n    this._rgb = fromObject(obj);\n  }\n\n  rgbString() {\n    return this._valid ? rgbString(this._rgb) : undefined;\n  }\n\n  hexString() {\n    return this._valid ? hexString(this._rgb) : undefined;\n  }\n\n  hslString() {\n    return this._valid ? hslString(this._rgb) : undefined;\n  }\n\n  mix(color, weight) {\n    if (color) {\n      const c1 = this.rgb;\n      const c2 = color.rgb;\n      let w2;\n      const p = weight === w2 ? 0.5 : weight;\n      const w = 2 * p - 1;\n      const a = c1.a - c2.a;\n      const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n      w2 = 1 - w1;\n      c1.r = 0xFF & w1 * c1.r + w2 * c2.r + 0.5;\n      c1.g = 0xFF & w1 * c1.g + w2 * c2.g + 0.5;\n      c1.b = 0xFF & w1 * c1.b + w2 * c2.b + 0.5;\n      c1.a = p * c1.a + (1 - p) * c2.a;\n      this.rgb = c1;\n    }\n\n    return this;\n  }\n\n  interpolate(color, t) {\n    if (color) {\n      this._rgb = interpolate(this._rgb, color._rgb, t);\n    }\n\n    return this;\n  }\n\n  clone() {\n    return new Color(this.rgb);\n  }\n\n  alpha(a) {\n    this._rgb.a = n2b(a);\n    return this;\n  }\n\n  clearer(ratio) {\n    const rgb = this._rgb;\n    rgb.a *= 1 - ratio;\n    return this;\n  }\n\n  greyscale() {\n    const rgb = this._rgb;\n    const val = round(rgb.r * 0.3 + rgb.g * 0.59 + rgb.b * 0.11);\n    rgb.r = rgb.g = rgb.b = val;\n    return this;\n  }\n\n  opaquer(ratio) {\n    const rgb = this._rgb;\n    rgb.a *= 1 + ratio;\n    return this;\n  }\n\n  negate() {\n    const v = this._rgb;\n    v.r = 255 - v.r;\n    v.g = 255 - v.g;\n    v.b = 255 - v.b;\n    return this;\n  }\n\n  lighten(ratio) {\n    modHSL(this._rgb, 2, ratio);\n    return this;\n  }\n\n  darken(ratio) {\n    modHSL(this._rgb, 2, -ratio);\n    return this;\n  }\n\n  saturate(ratio) {\n    modHSL(this._rgb, 1, ratio);\n    return this;\n  }\n\n  desaturate(ratio) {\n    modHSL(this._rgb, 1, -ratio);\n    return this;\n  }\n\n  rotate(deg) {\n    rotate(this._rgb, deg);\n    return this;\n  }\n\n}\n\nfunction index_esm(input) {\n  return new Color(input);\n}\n\nfunction isPatternOrGradient(value) {\n  if (value && typeof value === 'object') {\n    const type = value.toString();\n    return type === '[object CanvasPattern]' || type === '[object CanvasGradient]';\n  }\n\n  return false;\n}\n\nfunction color(value) {\n  return isPatternOrGradient(value) ? value : index_esm(value);\n}\n\nfunction getHoverColor(value) {\n  return isPatternOrGradient(value) ? value : index_esm(value).saturate(0.5).darken(0.1).hexString();\n}\n\nconst overrides = Object.create(null);\nconst descriptors = Object.create(null);\n\nfunction getScope$1(node, key) {\n  if (!key) {\n    return node;\n  }\n\n  const keys = key.split('.');\n\n  for (let i = 0, n = keys.length; i < n; ++i) {\n    const k = keys[i];\n    node = node[k] || (node[k] = Object.create(null));\n  }\n\n  return node;\n}\n\nfunction set(root, scope, values) {\n  if (typeof scope === 'string') {\n    return merge(getScope$1(root, scope), values);\n  }\n\n  return merge(getScope$1(root, ''), scope);\n}\n\nclass Defaults {\n  constructor(_descriptors) {\n    this.animation = undefined;\n    this.backgroundColor = 'rgba(0,0,0,0.1)';\n    this.borderColor = 'rgba(0,0,0,0.1)';\n    this.color = '#666';\n    this.datasets = {};\n\n    this.devicePixelRatio = context => context.chart.platform.getDevicePixelRatio();\n\n    this.elements = {};\n    this.events = ['mousemove', 'mouseout', 'click', 'touchstart', 'touchmove'];\n    this.font = {\n      family: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n      size: 12,\n      style: 'normal',\n      lineHeight: 1.2,\n      weight: null\n    };\n    this.hover = {};\n\n    this.hoverBackgroundColor = (ctx, options) => getHoverColor(options.backgroundColor);\n\n    this.hoverBorderColor = (ctx, options) => getHoverColor(options.borderColor);\n\n    this.hoverColor = (ctx, options) => getHoverColor(options.color);\n\n    this.indexAxis = 'x';\n    this.interaction = {\n      mode: 'nearest',\n      intersect: true,\n      includeInvisible: false\n    };\n    this.maintainAspectRatio = true;\n    this.onHover = null;\n    this.onClick = null;\n    this.parsing = true;\n    this.plugins = {};\n    this.responsive = true;\n    this.scale = undefined;\n    this.scales = {};\n    this.showLine = true;\n    this.drawActiveElementsOnTop = true;\n    this.describe(_descriptors);\n  }\n\n  set(scope, values) {\n    return set(this, scope, values);\n  }\n\n  get(scope) {\n    return getScope$1(this, scope);\n  }\n\n  describe(scope, values) {\n    return set(descriptors, scope, values);\n  }\n\n  override(scope, values) {\n    return set(overrides, scope, values);\n  }\n\n  route(scope, name, targetScope, targetName) {\n    const scopeObject = getScope$1(this, scope);\n    const targetScopeObject = getScope$1(this, targetScope);\n    const privateName = '_' + name;\n    Object.defineProperties(scopeObject, {\n      [privateName]: {\n        value: scopeObject[name],\n        writable: true\n      },\n      [name]: {\n        enumerable: true,\n\n        get() {\n          const local = this[privateName];\n          const target = targetScopeObject[targetName];\n\n          if (isObject(local)) {\n            return Object.assign({}, target, local);\n          }\n\n          return valueOrDefault(local, target);\n        },\n\n        set(value) {\n          this[privateName] = value;\n        }\n\n      }\n    });\n  }\n\n}\n\nvar defaults = new Defaults({\n  _scriptable: name => !name.startsWith('on'),\n  _indexable: name => name !== 'events',\n  hover: {\n    _fallback: 'interaction'\n  },\n  interaction: {\n    _scriptable: false,\n    _indexable: false\n  }\n});\n\nfunction toFontString(font) {\n  if (!font || isNullOrUndef(font.size) || isNullOrUndef(font.family)) {\n    return null;\n  }\n\n  return (font.style ? font.style + ' ' : '') + (font.weight ? font.weight + ' ' : '') + font.size + 'px ' + font.family;\n}\n\nfunction _measureText(ctx, data, gc, longest, string) {\n  let textWidth = data[string];\n\n  if (!textWidth) {\n    textWidth = data[string] = ctx.measureText(string).width;\n    gc.push(string);\n  }\n\n  if (textWidth > longest) {\n    longest = textWidth;\n  }\n\n  return longest;\n}\n\nfunction _longestText(ctx, font, arrayOfThings, cache) {\n  cache = cache || {};\n  let data = cache.data = cache.data || {};\n  let gc = cache.garbageCollect = cache.garbageCollect || [];\n\n  if (cache.font !== font) {\n    data = cache.data = {};\n    gc = cache.garbageCollect = [];\n    cache.font = font;\n  }\n\n  ctx.save();\n  ctx.font = font;\n  let longest = 0;\n  const ilen = arrayOfThings.length;\n  let i, j, jlen, thing, nestedThing;\n\n  for (i = 0; i < ilen; i++) {\n    thing = arrayOfThings[i];\n\n    if (thing !== undefined && thing !== null && isArray(thing) !== true) {\n      longest = _measureText(ctx, data, gc, longest, thing);\n    } else if (isArray(thing)) {\n      for (j = 0, jlen = thing.length; j < jlen; j++) {\n        nestedThing = thing[j];\n\n        if (nestedThing !== undefined && nestedThing !== null && !isArray(nestedThing)) {\n          longest = _measureText(ctx, data, gc, longest, nestedThing);\n        }\n      }\n    }\n  }\n\n  ctx.restore();\n  const gcLen = gc.length / 2;\n\n  if (gcLen > arrayOfThings.length) {\n    for (i = 0; i < gcLen; i++) {\n      delete data[gc[i]];\n    }\n\n    gc.splice(0, gcLen);\n  }\n\n  return longest;\n}\n\nfunction _alignPixel(chart, pixel, width) {\n  const devicePixelRatio = chart.currentDevicePixelRatio;\n  const halfWidth = width !== 0 ? Math.max(width / 2, 0.5) : 0;\n  return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;\n}\n\nfunction clearCanvas(canvas, ctx) {\n  ctx = ctx || canvas.getContext('2d');\n  ctx.save();\n  ctx.resetTransform();\n  ctx.clearRect(0, 0, canvas.width, canvas.height);\n  ctx.restore();\n}\n\nfunction drawPoint(ctx, options, x, y) {\n  drawPointLegend(ctx, options, x, y, null);\n}\n\nfunction drawPointLegend(ctx, options, x, y, w) {\n  let type, xOffset, yOffset, size, cornerRadius, width;\n  const style = options.pointStyle;\n  const rotation = options.rotation;\n  const radius = options.radius;\n  let rad = (rotation || 0) * RAD_PER_DEG;\n\n  if (style && typeof style === 'object') {\n    type = style.toString();\n\n    if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\n      ctx.save();\n      ctx.translate(x, y);\n      ctx.rotate(rad);\n      ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\n      ctx.restore();\n      return;\n    }\n  }\n\n  if (isNaN(radius) || radius <= 0) {\n    return;\n  }\n\n  ctx.beginPath();\n\n  switch (style) {\n    default:\n      if (w) {\n        ctx.ellipse(x, y, w / 2, radius, 0, 0, TAU);\n      } else {\n        ctx.arc(x, y, radius, 0, TAU);\n      }\n\n      ctx.closePath();\n      break;\n\n    case 'triangle':\n      ctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n      rad += TWO_THIRDS_PI;\n      ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n      rad += TWO_THIRDS_PI;\n      ctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\n      ctx.closePath();\n      break;\n\n    case 'rectRounded':\n      cornerRadius = radius * 0.516;\n      size = radius - cornerRadius;\n      xOffset = Math.cos(rad + QUARTER_PI) * size;\n      yOffset = Math.sin(rad + QUARTER_PI) * size;\n      ctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\n      ctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);\n      ctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);\n      ctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\n      ctx.closePath();\n      break;\n\n    case 'rect':\n      if (!rotation) {\n        size = Math.SQRT1_2 * radius;\n        width = w ? w / 2 : size;\n        ctx.rect(x - width, y - size, 2 * width, 2 * size);\n        break;\n      }\n\n      rad += QUARTER_PI;\n\n    case 'rectRot':\n      xOffset = Math.cos(rad) * radius;\n      yOffset = Math.sin(rad) * radius;\n      ctx.moveTo(x - xOffset, y - yOffset);\n      ctx.lineTo(x + yOffset, y - xOffset);\n      ctx.lineTo(x + xOffset, y + yOffset);\n      ctx.lineTo(x - yOffset, y + xOffset);\n      ctx.closePath();\n      break;\n\n    case 'crossRot':\n      rad += QUARTER_PI;\n\n    case 'cross':\n      xOffset = Math.cos(rad) * radius;\n      yOffset = Math.sin(rad) * radius;\n      ctx.moveTo(x - xOffset, y - yOffset);\n      ctx.lineTo(x + xOffset, y + yOffset);\n      ctx.moveTo(x + yOffset, y - xOffset);\n      ctx.lineTo(x - yOffset, y + xOffset);\n      break;\n\n    case 'star':\n      xOffset = Math.cos(rad) * radius;\n      yOffset = Math.sin(rad) * radius;\n      ctx.moveTo(x - xOffset, y - yOffset);\n      ctx.lineTo(x + xOffset, y + yOffset);\n      ctx.moveTo(x + yOffset, y - xOffset);\n      ctx.lineTo(x - yOffset, y + xOffset);\n      rad += QUARTER_PI;\n      xOffset = Math.cos(rad) * radius;\n      yOffset = Math.sin(rad) * radius;\n      ctx.moveTo(x - xOffset, y - yOffset);\n      ctx.lineTo(x + xOffset, y + yOffset);\n      ctx.moveTo(x + yOffset, y - xOffset);\n      ctx.lineTo(x - yOffset, y + xOffset);\n      break;\n\n    case 'line':\n      xOffset = w ? w / 2 : Math.cos(rad) * radius;\n      yOffset = Math.sin(rad) * radius;\n      ctx.moveTo(x - xOffset, y - yOffset);\n      ctx.lineTo(x + xOffset, y + yOffset);\n      break;\n\n    case 'dash':\n      ctx.moveTo(x, y);\n      ctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);\n      break;\n  }\n\n  ctx.fill();\n\n  if (options.borderWidth > 0) {\n    ctx.stroke();\n  }\n}\n\nfunction _isPointInArea(point, area, margin) {\n  margin = margin || 0.5;\n  return !area || point && point.x > area.left - margin && point.x < area.right + margin && point.y > area.top - margin && point.y < area.bottom + margin;\n}\n\nfunction clipArea(ctx, area) {\n  ctx.save();\n  ctx.beginPath();\n  ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\n  ctx.clip();\n}\n\nfunction unclipArea(ctx) {\n  ctx.restore();\n}\n\nfunction _steppedLineTo(ctx, previous, target, flip, mode) {\n  if (!previous) {\n    return ctx.lineTo(target.x, target.y);\n  }\n\n  if (mode === 'middle') {\n    const midpoint = (previous.x + target.x) / 2.0;\n    ctx.lineTo(midpoint, previous.y);\n    ctx.lineTo(midpoint, target.y);\n  } else if (mode === 'after' !== !!flip) {\n    ctx.lineTo(previous.x, target.y);\n  } else {\n    ctx.lineTo(target.x, previous.y);\n  }\n\n  ctx.lineTo(target.x, target.y);\n}\n\nfunction _bezierCurveTo(ctx, previous, target, flip) {\n  if (!previous) {\n    return ctx.lineTo(target.x, target.y);\n  }\n\n  ctx.bezierCurveTo(flip ? previous.cp1x : previous.cp2x, flip ? previous.cp1y : previous.cp2y, flip ? target.cp2x : target.cp1x, flip ? target.cp2y : target.cp1y, target.x, target.y);\n}\n\nfunction renderText(ctx, text, x, y, font) {\n  let opts = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n  const lines = isArray(text) ? text : [text];\n  const stroke = opts.strokeWidth > 0 && opts.strokeColor !== '';\n  let i, line;\n  ctx.save();\n  ctx.font = font.string;\n  setRenderOpts(ctx, opts);\n\n  for (i = 0; i < lines.length; ++i) {\n    line = lines[i];\n\n    if (stroke) {\n      if (opts.strokeColor) {\n        ctx.strokeStyle = opts.strokeColor;\n      }\n\n      if (!isNullOrUndef(opts.strokeWidth)) {\n        ctx.lineWidth = opts.strokeWidth;\n      }\n\n      ctx.strokeText(line, x, y, opts.maxWidth);\n    }\n\n    ctx.fillText(line, x, y, opts.maxWidth);\n    decorateText(ctx, x, y, line, opts);\n    y += font.lineHeight;\n  }\n\n  ctx.restore();\n}\n\nfunction setRenderOpts(ctx, opts) {\n  if (opts.translation) {\n    ctx.translate(opts.translation[0], opts.translation[1]);\n  }\n\n  if (!isNullOrUndef(opts.rotation)) {\n    ctx.rotate(opts.rotation);\n  }\n\n  if (opts.color) {\n    ctx.fillStyle = opts.color;\n  }\n\n  if (opts.textAlign) {\n    ctx.textAlign = opts.textAlign;\n  }\n\n  if (opts.textBaseline) {\n    ctx.textBaseline = opts.textBaseline;\n  }\n}\n\nfunction decorateText(ctx, x, y, line, opts) {\n  if (opts.strikethrough || opts.underline) {\n    const metrics = ctx.measureText(line);\n    const left = x - metrics.actualBoundingBoxLeft;\n    const right = x + metrics.actualBoundingBoxRight;\n    const top = y - metrics.actualBoundingBoxAscent;\n    const bottom = y + metrics.actualBoundingBoxDescent;\n    const yDecoration = opts.strikethrough ? (top + bottom) / 2 : bottom;\n    ctx.strokeStyle = ctx.fillStyle;\n    ctx.beginPath();\n    ctx.lineWidth = opts.decorationWidth || 2;\n    ctx.moveTo(left, yDecoration);\n    ctx.lineTo(right, yDecoration);\n    ctx.stroke();\n  }\n}\n\nfunction addRoundedRectPath(ctx, rect) {\n  const x = rect.x,\n        y = rect.y,\n        w = rect.w,\n        h = rect.h,\n        radius = rect.radius;\n  ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, -HALF_PI, PI, true);\n  ctx.lineTo(x, y + h - radius.bottomLeft);\n  ctx.arc(x + radius.bottomLeft, y + h - radius.bottomLeft, radius.bottomLeft, PI, HALF_PI, true);\n  ctx.lineTo(x + w - radius.bottomRight, y + h);\n  ctx.arc(x + w - radius.bottomRight, y + h - radius.bottomRight, radius.bottomRight, HALF_PI, 0, true);\n  ctx.lineTo(x + w, y + radius.topRight);\n  ctx.arc(x + w - radius.topRight, y + radius.topRight, radius.topRight, 0, -HALF_PI, true);\n  ctx.lineTo(x + radius.topLeft, y);\n}\n\nconst LINE_HEIGHT = new RegExp(/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/);\nconst FONT_STYLE = new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);\n\nfunction toLineHeight(value, size) {\n  const matches = ('' + value).match(LINE_HEIGHT);\n\n  if (!matches || matches[1] === 'normal') {\n    return size * 1.2;\n  }\n\n  value = +matches[2];\n\n  switch (matches[3]) {\n    case 'px':\n      return value;\n\n    case '%':\n      value /= 100;\n      break;\n  }\n\n  return size * value;\n}\n\nconst numberOrZero = v => +v || 0;\n\nfunction _readValueToProps(value, props) {\n  const ret = {};\n  const objProps = isObject(props);\n  const keys = objProps ? Object.keys(props) : props;\n  const read = isObject(value) ? objProps ? prop => valueOrDefault(value[prop], value[props[prop]]) : prop => value[prop] : () => value;\n\n  for (const prop of keys) {\n    ret[prop] = numberOrZero(read(prop));\n  }\n\n  return ret;\n}\n\nfunction toTRBL(value) {\n  return _readValueToProps(value, {\n    top: 'y',\n    right: 'x',\n    bottom: 'y',\n    left: 'x'\n  });\n}\n\nfunction toTRBLCorners(value) {\n  return _readValueToProps(value, ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']);\n}\n\nfunction toPadding(value) {\n  const obj = toTRBL(value);\n  obj.width = obj.left + obj.right;\n  obj.height = obj.top + obj.bottom;\n  return obj;\n}\n\nfunction toFont(options, fallback) {\n  options = options || {};\n  fallback = fallback || defaults.font;\n  let size = valueOrDefault(options.size, fallback.size);\n\n  if (typeof size === 'string') {\n    size = parseInt(size, 10);\n  }\n\n  let style = valueOrDefault(options.style, fallback.style);\n\n  if (style && !('' + style).match(FONT_STYLE)) {\n    console.warn('Invalid font style specified: \"' + style + '\"');\n    style = '';\n  }\n\n  const font = {\n    family: valueOrDefault(options.family, fallback.family),\n    lineHeight: toLineHeight(valueOrDefault(options.lineHeight, fallback.lineHeight), size),\n    size,\n    style,\n    weight: valueOrDefault(options.weight, fallback.weight),\n    string: ''\n  };\n  font.string = toFontString(font);\n  return font;\n}\n\nfunction resolve(inputs, context, index, info) {\n  let cacheable = true;\n  let i, ilen, value;\n\n  for (i = 0, ilen = inputs.length; i < ilen; ++i) {\n    value = inputs[i];\n\n    if (value === undefined) {\n      continue;\n    }\n\n    if (context !== undefined && typeof value === 'function') {\n      value = value(context);\n      cacheable = false;\n    }\n\n    if (index !== undefined && isArray(value)) {\n      value = value[index % value.length];\n      cacheable = false;\n    }\n\n    if (value !== undefined) {\n      if (info && !cacheable) {\n        info.cacheable = false;\n      }\n\n      return value;\n    }\n  }\n}\n\nfunction _addGrace(minmax, grace, beginAtZero) {\n  const min = minmax.min,\n        max = minmax.max;\n  const change = toDimension(grace, (max - min) / 2);\n\n  const keepZero = (value, add) => beginAtZero && value === 0 ? 0 : value + add;\n\n  return {\n    min: keepZero(min, -Math.abs(change)),\n    max: keepZero(max, change)\n  };\n}\n\nfunction createContext(parentContext, context) {\n  return Object.assign(Object.create(parentContext), context);\n}\n\nfunction _createResolver(scopes) {\n  let prefixes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [''];\n  let rootScopes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : scopes;\n  let fallback = arguments.length > 3 ? arguments[3] : undefined;\n  let getTarget = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : () => scopes[0];\n\n  if (!defined(fallback)) {\n    fallback = _resolve('_fallback', scopes);\n  }\n\n  const cache = {\n    [Symbol.toStringTag]: 'Object',\n    _cacheable: true,\n    _scopes: scopes,\n    _rootScopes: rootScopes,\n    _fallback: fallback,\n    _getTarget: getTarget,\n    override: scope => _createResolver([scope, ...scopes], prefixes, rootScopes, fallback)\n  };\n  return new Proxy(cache, {\n    deleteProperty(target, prop) {\n      delete target[prop];\n      delete target._keys;\n      delete scopes[0][prop];\n      return true;\n    },\n\n    get(target, prop) {\n      return _cached(target, prop, () => _resolveWithPrefixes(prop, prefixes, scopes, target));\n    },\n\n    getOwnPropertyDescriptor(target, prop) {\n      return Reflect.getOwnPropertyDescriptor(target._scopes[0], prop);\n    },\n\n    getPrototypeOf() {\n      return Reflect.getPrototypeOf(scopes[0]);\n    },\n\n    has(target, prop) {\n      return getKeysFromAllScopes(target).includes(prop);\n    },\n\n    ownKeys(target) {\n      return getKeysFromAllScopes(target);\n    },\n\n    set(target, prop, value) {\n      const storage = target._storage || (target._storage = getTarget());\n      target[prop] = storage[prop] = value;\n      delete target._keys;\n      return true;\n    }\n\n  });\n}\n\nfunction _attachContext(proxy, context, subProxy, descriptorDefaults) {\n  const cache = {\n    _cacheable: false,\n    _proxy: proxy,\n    _context: context,\n    _subProxy: subProxy,\n    _stack: new Set(),\n    _descriptors: _descriptors(proxy, descriptorDefaults),\n    setContext: ctx => _attachContext(proxy, ctx, subProxy, descriptorDefaults),\n    override: scope => _attachContext(proxy.override(scope), context, subProxy, descriptorDefaults)\n  };\n  return new Proxy(cache, {\n    deleteProperty(target, prop) {\n      delete target[prop];\n      delete proxy[prop];\n      return true;\n    },\n\n    get(target, prop, receiver) {\n      return _cached(target, prop, () => _resolveWithContext(target, prop, receiver));\n    },\n\n    getOwnPropertyDescriptor(target, prop) {\n      return target._descriptors.allKeys ? Reflect.has(proxy, prop) ? {\n        enumerable: true,\n        configurable: true\n      } : undefined : Reflect.getOwnPropertyDescriptor(proxy, prop);\n    },\n\n    getPrototypeOf() {\n      return Reflect.getPrototypeOf(proxy);\n    },\n\n    has(target, prop) {\n      return Reflect.has(proxy, prop);\n    },\n\n    ownKeys() {\n      return Reflect.ownKeys(proxy);\n    },\n\n    set(target, prop, value) {\n      proxy[prop] = value;\n      delete target[prop];\n      return true;\n    }\n\n  });\n}\n\nfunction _descriptors(proxy) {\n  let defaults = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n    scriptable: true,\n    indexable: true\n  };\n\n  const _proxy$_scriptable = proxy._scriptable,\n        _scriptable = _proxy$_scriptable === void 0 ? defaults.scriptable : _proxy$_scriptable,\n        _proxy$_indexable = proxy._indexable,\n        _indexable = _proxy$_indexable === void 0 ? defaults.indexable : _proxy$_indexable,\n        _proxy$_allKeys = proxy._allKeys,\n        _allKeys = _proxy$_allKeys === void 0 ? defaults.allKeys : _proxy$_allKeys;\n\n  return {\n    allKeys: _allKeys,\n    scriptable: _scriptable,\n    indexable: _indexable,\n    isScriptable: isFunction(_scriptable) ? _scriptable : () => _scriptable,\n    isIndexable: isFunction(_indexable) ? _indexable : () => _indexable\n  };\n}\n\nconst readKey = (prefix, name) => prefix ? prefix + _capitalize(name) : name;\n\nconst needsSubResolver = (prop, value) => isObject(value) && prop !== 'adapters' && (Object.getPrototypeOf(value) === null || value.constructor === Object);\n\nfunction _cached(target, prop, resolve) {\n  if (Object.prototype.hasOwnProperty.call(target, prop)) {\n    return target[prop];\n  }\n\n  const value = resolve();\n  target[prop] = value;\n  return value;\n}\n\nfunction _resolveWithContext(target, prop, receiver) {\n  const _proxy = target._proxy,\n        _context = target._context,\n        _subProxy = target._subProxy,\n        descriptors = target._descriptors;\n  let value = _proxy[prop];\n\n  if (isFunction(value) && descriptors.isScriptable(prop)) {\n    value = _resolveScriptable(prop, value, target, receiver);\n  }\n\n  if (isArray(value) && value.length) {\n    value = _resolveArray(prop, value, target, descriptors.isIndexable);\n  }\n\n  if (needsSubResolver(prop, value)) {\n    value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors);\n  }\n\n  return value;\n}\n\nfunction _resolveScriptable(prop, value, target, receiver) {\n  const _proxy = target._proxy,\n        _context = target._context,\n        _subProxy = target._subProxy,\n        _stack = target._stack;\n\n  if (_stack.has(prop)) {\n    throw new Error('Recursion detected: ' + Array.from(_stack).join('->') + '->' + prop);\n  }\n\n  _stack.add(prop);\n\n  value = value(_context, _subProxy || receiver);\n\n  _stack.delete(prop);\n\n  if (needsSubResolver(prop, value)) {\n    value = createSubResolver(_proxy._scopes, _proxy, prop, value);\n  }\n\n  return value;\n}\n\nfunction _resolveArray(prop, value, target, isIndexable) {\n  const _proxy = target._proxy,\n        _context = target._context,\n        _subProxy = target._subProxy,\n        descriptors = target._descriptors;\n\n  if (defined(_context.index) && isIndexable(prop)) {\n    value = value[_context.index % value.length];\n  } else if (isObject(value[0])) {\n    const arr = value;\n\n    const scopes = _proxy._scopes.filter(s => s !== arr);\n\n    value = [];\n\n    for (const item of arr) {\n      const resolver = createSubResolver(scopes, _proxy, prop, item);\n      value.push(_attachContext(resolver, _context, _subProxy && _subProxy[prop], descriptors));\n    }\n  }\n\n  return value;\n}\n\nfunction resolveFallback(fallback, prop, value) {\n  return isFunction(fallback) ? fallback(prop, value) : fallback;\n}\n\nconst getScope = (key, parent) => key === true ? parent : typeof key === 'string' ? resolveObjectKey(parent, key) : undefined;\n\nfunction addScopes(set, parentScopes, key, parentFallback, value) {\n  for (const parent of parentScopes) {\n    const scope = getScope(key, parent);\n\n    if (scope) {\n      set.add(scope);\n      const fallback = resolveFallback(scope._fallback, key, value);\n\n      if (defined(fallback) && fallback !== key && fallback !== parentFallback) {\n        return fallback;\n      }\n    } else if (scope === false && defined(parentFallback) && key !== parentFallback) {\n      return null;\n    }\n  }\n\n  return false;\n}\n\nfunction createSubResolver(parentScopes, resolver, prop, value) {\n  const rootScopes = resolver._rootScopes;\n  const fallback = resolveFallback(resolver._fallback, prop, value);\n  const allScopes = [...parentScopes, ...rootScopes];\n  const set = new Set();\n  set.add(value);\n  let key = addScopesFromKey(set, allScopes, prop, fallback || prop, value);\n\n  if (key === null) {\n    return false;\n  }\n\n  if (defined(fallback) && fallback !== prop) {\n    key = addScopesFromKey(set, allScopes, fallback, key, value);\n\n    if (key === null) {\n      return false;\n    }\n  }\n\n  return _createResolver(Array.from(set), [''], rootScopes, fallback, () => subGetTarget(resolver, prop, value));\n}\n\nfunction addScopesFromKey(set, allScopes, key, fallback, item) {\n  while (key) {\n    key = addScopes(set, allScopes, key, fallback, item);\n  }\n\n  return key;\n}\n\nfunction subGetTarget(resolver, prop, value) {\n  const parent = resolver._getTarget();\n\n  if (!(prop in parent)) {\n    parent[prop] = {};\n  }\n\n  const target = parent[prop];\n\n  if (isArray(target) && isObject(value)) {\n    return value;\n  }\n\n  return target;\n}\n\nfunction _resolveWithPrefixes(prop, prefixes, scopes, proxy) {\n  let value;\n\n  for (const prefix of prefixes) {\n    value = _resolve(readKey(prefix, prop), scopes);\n\n    if (defined(value)) {\n      return needsSubResolver(prop, value) ? createSubResolver(scopes, proxy, prop, value) : value;\n    }\n  }\n}\n\nfunction _resolve(key, scopes) {\n  for (const scope of scopes) {\n    if (!scope) {\n      continue;\n    }\n\n    const value = scope[key];\n\n    if (defined(value)) {\n      return value;\n    }\n  }\n}\n\nfunction getKeysFromAllScopes(target) {\n  let keys = target._keys;\n\n  if (!keys) {\n    keys = target._keys = resolveKeysFromAllScopes(target._scopes);\n  }\n\n  return keys;\n}\n\nfunction resolveKeysFromAllScopes(scopes) {\n  const set = new Set();\n\n  for (const scope of scopes) {\n    for (const key of Object.keys(scope).filter(k => !k.startsWith('_'))) {\n      set.add(key);\n    }\n  }\n\n  return Array.from(set);\n}\n\nfunction _parseObjectDataRadialScale(meta, data, start, count) {\n  const iScale = meta.iScale;\n  const _this$_parsing$key = this._parsing.key,\n        key = _this$_parsing$key === void 0 ? 'r' : _this$_parsing$key;\n  const parsed = new Array(count);\n  let i, ilen, index, item;\n\n  for (i = 0, ilen = count; i < ilen; ++i) {\n    index = i + start;\n    item = data[index];\n    parsed[i] = {\n      r: iScale.parse(resolveObjectKey(item, key), index)\n    };\n  }\n\n  return parsed;\n}\n\nconst EPSILON = Number.EPSILON || 1e-14;\n\nconst getPoint = (points, i) => i < points.length && !points[i].skip && points[i];\n\nconst getValueAxis = indexAxis => indexAxis === 'x' ? 'y' : 'x';\n\nfunction splineCurve(firstPoint, middlePoint, afterPoint, t) {\n  const previous = firstPoint.skip ? middlePoint : firstPoint;\n  const current = middlePoint;\n  const next = afterPoint.skip ? middlePoint : afterPoint;\n  const d01 = distanceBetweenPoints(current, previous);\n  const d12 = distanceBetweenPoints(next, current);\n  let s01 = d01 / (d01 + d12);\n  let s12 = d12 / (d01 + d12);\n  s01 = isNaN(s01) ? 0 : s01;\n  s12 = isNaN(s12) ? 0 : s12;\n  const fa = t * s01;\n  const fb = t * s12;\n  return {\n    previous: {\n      x: current.x - fa * (next.x - previous.x),\n      y: current.y - fa * (next.y - previous.y)\n    },\n    next: {\n      x: current.x + fb * (next.x - previous.x),\n      y: current.y + fb * (next.y - previous.y)\n    }\n  };\n}\n\nfunction monotoneAdjust(points, deltaK, mK) {\n  const pointsLen = points.length;\n  let alphaK, betaK, tauK, squaredMagnitude, pointCurrent;\n  let pointAfter = getPoint(points, 0);\n\n  for (let i = 0; i < pointsLen - 1; ++i) {\n    pointCurrent = pointAfter;\n    pointAfter = getPoint(points, i + 1);\n\n    if (!pointCurrent || !pointAfter) {\n      continue;\n    }\n\n    if (almostEquals(deltaK[i], 0, EPSILON)) {\n      mK[i] = mK[i + 1] = 0;\n      continue;\n    }\n\n    alphaK = mK[i] / deltaK[i];\n    betaK = mK[i + 1] / deltaK[i];\n    squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);\n\n    if (squaredMagnitude <= 9) {\n      continue;\n    }\n\n    tauK = 3 / Math.sqrt(squaredMagnitude);\n    mK[i] = alphaK * tauK * deltaK[i];\n    mK[i + 1] = betaK * tauK * deltaK[i];\n  }\n}\n\nfunction monotoneCompute(points, mK) {\n  let indexAxis = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'x';\n  const valueAxis = getValueAxis(indexAxis);\n  const pointsLen = points.length;\n  let delta, pointBefore, pointCurrent;\n  let pointAfter = getPoint(points, 0);\n\n  for (let i = 0; i < pointsLen; ++i) {\n    pointBefore = pointCurrent;\n    pointCurrent = pointAfter;\n    pointAfter = getPoint(points, i + 1);\n\n    if (!pointCurrent) {\n      continue;\n    }\n\n    const iPixel = pointCurrent[indexAxis];\n    const vPixel = pointCurrent[valueAxis];\n\n    if (pointBefore) {\n      delta = (iPixel - pointBefore[indexAxis]) / 3;\n      pointCurrent[\"cp1\".concat(indexAxis)] = iPixel - delta;\n      pointCurrent[\"cp1\".concat(valueAxis)] = vPixel - delta * mK[i];\n    }\n\n    if (pointAfter) {\n      delta = (pointAfter[indexAxis] - iPixel) / 3;\n      pointCurrent[\"cp2\".concat(indexAxis)] = iPixel + delta;\n      pointCurrent[\"cp2\".concat(valueAxis)] = vPixel + delta * mK[i];\n    }\n  }\n}\n\nfunction splineCurveMonotone(points) {\n  let indexAxis = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'x';\n  const valueAxis = getValueAxis(indexAxis);\n  const pointsLen = points.length;\n  const deltaK = Array(pointsLen).fill(0);\n  const mK = Array(pointsLen);\n  let i, pointBefore, pointCurrent;\n  let pointAfter = getPoint(points, 0);\n\n  for (i = 0; i < pointsLen; ++i) {\n    pointBefore = pointCurrent;\n    pointCurrent = pointAfter;\n    pointAfter = getPoint(points, i + 1);\n\n    if (!pointCurrent) {\n      continue;\n    }\n\n    if (pointAfter) {\n      const slopeDelta = pointAfter[indexAxis] - pointCurrent[indexAxis];\n      deltaK[i] = slopeDelta !== 0 ? (pointAfter[valueAxis] - pointCurrent[valueAxis]) / slopeDelta : 0;\n    }\n\n    mK[i] = !pointBefore ? deltaK[i] : !pointAfter ? deltaK[i - 1] : sign(deltaK[i - 1]) !== sign(deltaK[i]) ? 0 : (deltaK[i - 1] + deltaK[i]) / 2;\n  }\n\n  monotoneAdjust(points, deltaK, mK);\n  monotoneCompute(points, mK, indexAxis);\n}\n\nfunction capControlPoint(pt, min, max) {\n  return Math.max(Math.min(pt, max), min);\n}\n\nfunction capBezierPoints(points, area) {\n  let i, ilen, point, inArea, inAreaPrev;\n\n  let inAreaNext = _isPointInArea(points[0], area);\n\n  for (i = 0, ilen = points.length; i < ilen; ++i) {\n    inAreaPrev = inArea;\n    inArea = inAreaNext;\n    inAreaNext = i < ilen - 1 && _isPointInArea(points[i + 1], area);\n\n    if (!inArea) {\n      continue;\n    }\n\n    point = points[i];\n\n    if (inAreaPrev) {\n      point.cp1x = capControlPoint(point.cp1x, area.left, area.right);\n      point.cp1y = capControlPoint(point.cp1y, area.top, area.bottom);\n    }\n\n    if (inAreaNext) {\n      point.cp2x = capControlPoint(point.cp2x, area.left, area.right);\n      point.cp2y = capControlPoint(point.cp2y, area.top, area.bottom);\n    }\n  }\n}\n\nfunction _updateBezierControlPoints(points, options, area, loop, indexAxis) {\n  let i, ilen, point, controlPoints;\n\n  if (options.spanGaps) {\n    points = points.filter(pt => !pt.skip);\n  }\n\n  if (options.cubicInterpolationMode === 'monotone') {\n    splineCurveMonotone(points, indexAxis);\n  } else {\n    let prev = loop ? points[points.length - 1] : points[0];\n\n    for (i = 0, ilen = points.length; i < ilen; ++i) {\n      point = points[i];\n      controlPoints = splineCurve(prev, point, points[Math.min(i + 1, ilen - (loop ? 0 : 1)) % ilen], options.tension);\n      point.cp1x = controlPoints.previous.x;\n      point.cp1y = controlPoints.previous.y;\n      point.cp2x = controlPoints.next.x;\n      point.cp2y = controlPoints.next.y;\n      prev = point;\n    }\n  }\n\n  if (options.capBezierPoints) {\n    capBezierPoints(points, area);\n  }\n}\n\nfunction _isDomSupported() {\n  return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n\nfunction _getParentNode(domNode) {\n  let parent = domNode.parentNode;\n\n  if (parent && parent.toString() === '[object ShadowRoot]') {\n    parent = parent.host;\n  }\n\n  return parent;\n}\n\nfunction parseMaxStyle(styleValue, node, parentProperty) {\n  let valueInPixels;\n\n  if (typeof styleValue === 'string') {\n    valueInPixels = parseInt(styleValue, 10);\n\n    if (styleValue.indexOf('%') !== -1) {\n      valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n    }\n  } else {\n    valueInPixels = styleValue;\n  }\n\n  return valueInPixels;\n}\n\nconst getComputedStyle = element => window.getComputedStyle(element, null);\n\nfunction getStyle(el, property) {\n  return getComputedStyle(el).getPropertyValue(property);\n}\n\nconst positions = ['top', 'right', 'bottom', 'left'];\n\nfunction getPositionedStyle(styles, style, suffix) {\n  const result = {};\n  suffix = suffix ? '-' + suffix : '';\n\n  for (let i = 0; i < 4; i++) {\n    const pos = positions[i];\n    result[pos] = parseFloat(styles[style + '-' + pos + suffix]) || 0;\n  }\n\n  result.width = result.left + result.right;\n  result.height = result.top + result.bottom;\n  return result;\n}\n\nconst useOffsetPos = (x, y, target) => (x > 0 || y > 0) && (!target || !target.shadowRoot);\n\nfunction getCanvasPosition(e, canvas) {\n  const touches = e.touches;\n  const source = touches && touches.length ? touches[0] : e;\n  const offsetX = source.offsetX,\n        offsetY = source.offsetY;\n  let box = false;\n  let x, y;\n\n  if (useOffsetPos(offsetX, offsetY, e.target)) {\n    x = offsetX;\n    y = offsetY;\n  } else {\n    const rect = canvas.getBoundingClientRect();\n    x = source.clientX - rect.left;\n    y = source.clientY - rect.top;\n    box = true;\n  }\n\n  return {\n    x,\n    y,\n    box\n  };\n}\n\nfunction getRelativePosition(evt, chart) {\n  if ('native' in evt) {\n    return evt;\n  }\n\n  const canvas = chart.canvas,\n        currentDevicePixelRatio = chart.currentDevicePixelRatio;\n  const style = getComputedStyle(canvas);\n  const borderBox = style.boxSizing === 'border-box';\n  const paddings = getPositionedStyle(style, 'padding');\n  const borders = getPositionedStyle(style, 'border', 'width');\n\n  const _getCanvasPosition = getCanvasPosition(evt, canvas),\n        x = _getCanvasPosition.x,\n        y = _getCanvasPosition.y,\n        box = _getCanvasPosition.box;\n\n  const xOffset = paddings.left + (box && borders.left);\n  const yOffset = paddings.top + (box && borders.top);\n  let width = chart.width,\n      height = chart.height;\n\n  if (borderBox) {\n    width -= paddings.width + borders.width;\n    height -= paddings.height + borders.height;\n  }\n\n  return {\n    x: Math.round((x - xOffset) / width * canvas.width / currentDevicePixelRatio),\n    y: Math.round((y - yOffset) / height * canvas.height / currentDevicePixelRatio)\n  };\n}\n\nfunction getContainerSize(canvas, width, height) {\n  let maxWidth, maxHeight;\n\n  if (width === undefined || height === undefined) {\n    const container = _getParentNode(canvas);\n\n    if (!container) {\n      width = canvas.clientWidth;\n      height = canvas.clientHeight;\n    } else {\n      const rect = container.getBoundingClientRect();\n      const containerStyle = getComputedStyle(container);\n      const containerBorder = getPositionedStyle(containerStyle, 'border', 'width');\n      const containerPadding = getPositionedStyle(containerStyle, 'padding');\n      width = rect.width - containerPadding.width - containerBorder.width;\n      height = rect.height - containerPadding.height - containerBorder.height;\n      maxWidth = parseMaxStyle(containerStyle.maxWidth, container, 'clientWidth');\n      maxHeight = parseMaxStyle(containerStyle.maxHeight, container, 'clientHeight');\n    }\n  }\n\n  return {\n    width,\n    height,\n    maxWidth: maxWidth || INFINITY,\n    maxHeight: maxHeight || INFINITY\n  };\n}\n\nconst round1 = v => Math.round(v * 10) / 10;\n\nfunction getMaximumSize(canvas, bbWidth, bbHeight, aspectRatio) {\n  const style = getComputedStyle(canvas);\n  const margins = getPositionedStyle(style, 'margin');\n  const maxWidth = parseMaxStyle(style.maxWidth, canvas, 'clientWidth') || INFINITY;\n  const maxHeight = parseMaxStyle(style.maxHeight, canvas, 'clientHeight') || INFINITY;\n  const containerSize = getContainerSize(canvas, bbWidth, bbHeight);\n  let width = containerSize.width,\n      height = containerSize.height;\n\n  if (style.boxSizing === 'content-box') {\n    const borders = getPositionedStyle(style, 'border', 'width');\n    const paddings = getPositionedStyle(style, 'padding');\n    width -= paddings.width + borders.width;\n    height -= paddings.height + borders.height;\n  }\n\n  width = Math.max(0, width - margins.width);\n  height = Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height - margins.height);\n  width = round1(Math.min(width, maxWidth, containerSize.maxWidth));\n  height = round1(Math.min(height, maxHeight, containerSize.maxHeight));\n\n  if (width && !height) {\n    height = round1(width / 2);\n  }\n\n  return {\n    width,\n    height\n  };\n}\n\nfunction retinaScale(chart, forceRatio, forceStyle) {\n  const pixelRatio = forceRatio || 1;\n  const deviceHeight = Math.floor(chart.height * pixelRatio);\n  const deviceWidth = Math.floor(chart.width * pixelRatio);\n  chart.height = deviceHeight / pixelRatio;\n  chart.width = deviceWidth / pixelRatio;\n  const canvas = chart.canvas;\n\n  if (canvas.style && (forceStyle || !canvas.style.height && !canvas.style.width)) {\n    canvas.style.height = \"\".concat(chart.height, \"px\");\n    canvas.style.width = \"\".concat(chart.width, \"px\");\n  }\n\n  if (chart.currentDevicePixelRatio !== pixelRatio || canvas.height !== deviceHeight || canvas.width !== deviceWidth) {\n    chart.currentDevicePixelRatio = pixelRatio;\n    canvas.height = deviceHeight;\n    canvas.width = deviceWidth;\n    chart.ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n    return true;\n  }\n\n  return false;\n}\n\nconst supportsEventListenerOptions = function () {\n  let passiveSupported = false;\n\n  try {\n    const options = {\n      get passive() {\n        passiveSupported = true;\n        return false;\n      }\n\n    };\n    window.addEventListener('test', null, options);\n    window.removeEventListener('test', null, options);\n  } catch (e) {}\n\n  return passiveSupported;\n}();\n\nfunction readUsedSize(element, property) {\n  const value = getStyle(element, property);\n  const matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\n  return matches ? +matches[1] : undefined;\n}\n\nfunction _pointInLine(p1, p2, t, mode) {\n  return {\n    x: p1.x + t * (p2.x - p1.x),\n    y: p1.y + t * (p2.y - p1.y)\n  };\n}\n\nfunction _steppedInterpolation(p1, p2, t, mode) {\n  return {\n    x: p1.x + t * (p2.x - p1.x),\n    y: mode === 'middle' ? t < 0.5 ? p1.y : p2.y : mode === 'after' ? t < 1 ? p1.y : p2.y : t > 0 ? p2.y : p1.y\n  };\n}\n\nfunction _bezierInterpolation(p1, p2, t, mode) {\n  const cp1 = {\n    x: p1.cp2x,\n    y: p1.cp2y\n  };\n  const cp2 = {\n    x: p2.cp1x,\n    y: p2.cp1y\n  };\n\n  const a = _pointInLine(p1, cp1, t);\n\n  const b = _pointInLine(cp1, cp2, t);\n\n  const c = _pointInLine(cp2, p2, t);\n\n  const d = _pointInLine(a, b, t);\n\n  const e = _pointInLine(b, c, t);\n\n  return _pointInLine(d, e, t);\n}\n\nconst intlCache = new Map();\n\nfunction getNumberFormat(locale, options) {\n  options = options || {};\n  const cacheKey = locale + JSON.stringify(options);\n  let formatter = intlCache.get(cacheKey);\n\n  if (!formatter) {\n    formatter = new Intl.NumberFormat(locale, options);\n    intlCache.set(cacheKey, formatter);\n  }\n\n  return formatter;\n}\n\nfunction formatNumber(num, locale, options) {\n  return getNumberFormat(locale, options).format(num);\n}\n\nconst getRightToLeftAdapter = function (rectX, width) {\n  return {\n    x(x) {\n      return rectX + rectX + width - x;\n    },\n\n    setWidth(w) {\n      width = w;\n    },\n\n    textAlign(align) {\n      if (align === 'center') {\n        return align;\n      }\n\n      return align === 'right' ? 'left' : 'right';\n    },\n\n    xPlus(x, value) {\n      return x - value;\n    },\n\n    leftForLtr(x, itemWidth) {\n      return x - itemWidth;\n    }\n\n  };\n};\n\nconst getLeftToRightAdapter = function () {\n  return {\n    x(x) {\n      return x;\n    },\n\n    setWidth(w) {},\n\n    textAlign(align) {\n      return align;\n    },\n\n    xPlus(x, value) {\n      return x + value;\n    },\n\n    leftForLtr(x, _itemWidth) {\n      return x;\n    }\n\n  };\n};\n\nfunction getRtlAdapter(rtl, rectX, width) {\n  return rtl ? getRightToLeftAdapter(rectX, width) : getLeftToRightAdapter();\n}\n\nfunction overrideTextDirection(ctx, direction) {\n  let style, original;\n\n  if (direction === 'ltr' || direction === 'rtl') {\n    style = ctx.canvas.style;\n    original = [style.getPropertyValue('direction'), style.getPropertyPriority('direction')];\n    style.setProperty('direction', direction, 'important');\n    ctx.prevTextDirection = original;\n  }\n}\n\nfunction restoreTextDirection(ctx, original) {\n  if (original !== undefined) {\n    delete ctx.prevTextDirection;\n    ctx.canvas.style.setProperty('direction', original[0], original[1]);\n  }\n}\n\nfunction propertyFn(property) {\n  if (property === 'angle') {\n    return {\n      between: _angleBetween,\n      compare: _angleDiff,\n      normalize: _normalizeAngle\n    };\n  }\n\n  return {\n    between: _isBetween,\n    compare: (a, b) => a - b,\n    normalize: x => x\n  };\n}\n\nfunction normalizeSegment(_ref) {\n  let start = _ref.start,\n      end = _ref.end,\n      count = _ref.count,\n      loop = _ref.loop,\n      style = _ref.style;\n  return {\n    start: start % count,\n    end: end % count,\n    loop: loop && (end - start + 1) % count === 0,\n    style\n  };\n}\n\nfunction getSegment(segment, points, bounds) {\n  const property = bounds.property,\n        startBound = bounds.start,\n        endBound = bounds.end;\n\n  const _propertyFn = propertyFn(property),\n        between = _propertyFn.between,\n        normalize = _propertyFn.normalize;\n\n  const count = points.length;\n  let start = segment.start,\n      end = segment.end,\n      loop = segment.loop;\n  let i, ilen;\n\n  if (loop) {\n    start += count;\n    end += count;\n\n    for (i = 0, ilen = count; i < ilen; ++i) {\n      if (!between(normalize(points[start % count][property]), startBound, endBound)) {\n        break;\n      }\n\n      start--;\n      end--;\n    }\n\n    start %= count;\n    end %= count;\n  }\n\n  if (end < start) {\n    end += count;\n  }\n\n  return {\n    start,\n    end,\n    loop,\n    style: segment.style\n  };\n}\n\nfunction _boundSegment(segment, points, bounds) {\n  if (!bounds) {\n    return [segment];\n  }\n\n  const property = bounds.property,\n        startBound = bounds.start,\n        endBound = bounds.end;\n  const count = points.length;\n\n  const _propertyFn2 = propertyFn(property),\n        compare = _propertyFn2.compare,\n        between = _propertyFn2.between,\n        normalize = _propertyFn2.normalize;\n\n  const _getSegment = getSegment(segment, points, bounds),\n        start = _getSegment.start,\n        end = _getSegment.end,\n        loop = _getSegment.loop,\n        style = _getSegment.style;\n\n  const result = [];\n  let inside = false;\n  let subStart = null;\n  let value, point, prevValue;\n\n  const startIsBefore = () => between(startBound, prevValue, value) && compare(startBound, prevValue) !== 0;\n\n  const endIsBefore = () => compare(endBound, value) === 0 || between(endBound, prevValue, value);\n\n  const shouldStart = () => inside || startIsBefore();\n\n  const shouldStop = () => !inside || endIsBefore();\n\n  for (let i = start, prev = start; i <= end; ++i) {\n    point = points[i % count];\n\n    if (point.skip) {\n      continue;\n    }\n\n    value = normalize(point[property]);\n\n    if (value === prevValue) {\n      continue;\n    }\n\n    inside = between(value, startBound, endBound);\n\n    if (subStart === null && shouldStart()) {\n      subStart = compare(value, startBound) === 0 ? i : prev;\n    }\n\n    if (subStart !== null && shouldStop()) {\n      result.push(normalizeSegment({\n        start: subStart,\n        end: i,\n        loop,\n        count,\n        style\n      }));\n      subStart = null;\n    }\n\n    prev = i;\n    prevValue = value;\n  }\n\n  if (subStart !== null) {\n    result.push(normalizeSegment({\n      start: subStart,\n      end,\n      loop,\n      count,\n      style\n    }));\n  }\n\n  return result;\n}\n\nfunction _boundSegments(line, bounds) {\n  const result = [];\n  const segments = line.segments;\n\n  for (let i = 0; i < segments.length; i++) {\n    const sub = _boundSegment(segments[i], line.points, bounds);\n\n    if (sub.length) {\n      result.push(...sub);\n    }\n  }\n\n  return result;\n}\n\nfunction findStartAndEnd(points, count, loop, spanGaps) {\n  let start = 0;\n  let end = count - 1;\n\n  if (loop && !spanGaps) {\n    while (start < count && !points[start].skip) {\n      start++;\n    }\n  }\n\n  while (start < count && points[start].skip) {\n    start++;\n  }\n\n  start %= count;\n\n  if (loop) {\n    end += start;\n  }\n\n  while (end > start && points[end % count].skip) {\n    end--;\n  }\n\n  end %= count;\n  return {\n    start,\n    end\n  };\n}\n\nfunction solidSegments(points, start, max, loop) {\n  const count = points.length;\n  const result = [];\n  let last = start;\n  let prev = points[start];\n  let end;\n\n  for (end = start + 1; end <= max; ++end) {\n    const cur = points[end % count];\n\n    if (cur.skip || cur.stop) {\n      if (!prev.skip) {\n        loop = false;\n        result.push({\n          start: start % count,\n          end: (end - 1) % count,\n          loop\n        });\n        start = last = cur.stop ? end : null;\n      }\n    } else {\n      last = end;\n\n      if (prev.skip) {\n        start = end;\n      }\n    }\n\n    prev = cur;\n  }\n\n  if (last !== null) {\n    result.push({\n      start: start % count,\n      end: last % count,\n      loop\n    });\n  }\n\n  return result;\n}\n\nfunction _computeSegments(line, segmentOptions) {\n  const points = line.points;\n  const spanGaps = line.options.spanGaps;\n  const count = points.length;\n\n  if (!count) {\n    return [];\n  }\n\n  const loop = !!line._loop;\n\n  const _findStartAndEnd = findStartAndEnd(points, count, loop, spanGaps),\n        start = _findStartAndEnd.start,\n        end = _findStartAndEnd.end;\n\n  if (spanGaps === true) {\n    return splitByStyles(line, [{\n      start,\n      end,\n      loop\n    }], points, segmentOptions);\n  }\n\n  const max = end < start ? end + count : end;\n  const completeLoop = !!line._fullLoop && start === 0 && end === count - 1;\n  return splitByStyles(line, solidSegments(points, start, max, completeLoop), points, segmentOptions);\n}\n\nfunction splitByStyles(line, segments, points, segmentOptions) {\n  if (!segmentOptions || !segmentOptions.setContext || !points) {\n    return segments;\n  }\n\n  return doSplitByStyles(line, segments, points, segmentOptions);\n}\n\nfunction doSplitByStyles(line, segments, points, segmentOptions) {\n  const chartContext = line._chart.getContext();\n\n  const baseStyle = readStyle(line.options);\n  const datasetIndex = line._datasetIndex,\n        spanGaps = line.options.spanGaps;\n  const count = points.length;\n  const result = [];\n  let prevStyle = baseStyle;\n  let start = segments[0].start;\n  let i = start;\n\n  function addStyle(s, e, l, st) {\n    const dir = spanGaps ? -1 : 1;\n\n    if (s === e) {\n      return;\n    }\n\n    s += count;\n\n    while (points[s % count].skip) {\n      s -= dir;\n    }\n\n    while (points[e % count].skip) {\n      e += dir;\n    }\n\n    if (s % count !== e % count) {\n      result.push({\n        start: s % count,\n        end: e % count,\n        loop: l,\n        style: st\n      });\n      prevStyle = st;\n      start = e % count;\n    }\n  }\n\n  for (const segment of segments) {\n    start = spanGaps ? start : segment.start;\n    let prev = points[start % count];\n    let style;\n\n    for (i = start + 1; i <= segment.end; i++) {\n      const pt = points[i % count];\n      style = readStyle(segmentOptions.setContext(createContext(chartContext, {\n        type: 'segment',\n        p0: prev,\n        p1: pt,\n        p0DataIndex: (i - 1) % count,\n        p1DataIndex: i % count,\n        datasetIndex\n      })));\n\n      if (styleChanged(style, prevStyle)) {\n        addStyle(start, i - 1, segment.loop, prevStyle);\n      }\n\n      prev = pt;\n      prevStyle = style;\n    }\n\n    if (start < i - 1) {\n      addStyle(start, i - 1, segment.loop, prevStyle);\n    }\n  }\n\n  return result;\n}\n\nfunction readStyle(options) {\n  return {\n    backgroundColor: options.backgroundColor,\n    borderCapStyle: options.borderCapStyle,\n    borderDash: options.borderDash,\n    borderDashOffset: options.borderDashOffset,\n    borderJoinStyle: options.borderJoinStyle,\n    borderWidth: options.borderWidth,\n    borderColor: options.borderColor\n  };\n}\n\nfunction styleChanged(style, prevStyle) {\n  return prevStyle && JSON.stringify(style) !== JSON.stringify(prevStyle);\n}\n\nexport { _isPointInArea as $, _factorize as A, finiteOrDefault as B, callback as C, _addGrace as D, _limitValue as E, toDegrees as F, _measureText as G, HALF_PI as H, _int16Range as I, _alignPixel as J, toPadding as K, clipArea as L, renderText as M, unclipArea as N, toFont as O, PI as P, each as Q, _toLeftRightCenter as R, _alignStartEnd as S, TAU as T, overrides as U, merge as V, _capitalize as W, getRelativePosition as X, _rlookupByKey as Y, _lookupByKey as Z, _arrayUnique as _, resolve as a, toLineHeight as a$, getAngleFromPoint as a0, getMaximumSize as a1, _getParentNode as a2, readUsedSize as a3, throttled as a4, supportsEventListenerOptions as a5, _isDomSupported as a6, descriptors as a7, isFunction as a8, _attachContext as a9, getRtlAdapter as aA, overrideTextDirection as aB, _textX as aC, restoreTextDirection as aD, drawPointLegend as aE, noop as aF, distanceBetweenPoints as aG, _setMinAndMaxByKey as aH, niceNum as aI, almostWhole as aJ, almostEquals as aK, _decimalPlaces as aL, _longestText as aM, _filterBetween as aN, _lookup as aO, isPatternOrGradient as aP, getHoverColor as aQ, clone$1 as aR, _merger as aS, _mergerIf as aT, _deprecated as aU, _splitKey as aV, toFontString as aW, splineCurve as aX, splineCurveMonotone as aY, getStyle as aZ, fontString as a_, _createResolver as aa, _descriptors as ab, mergeIf as ac, uid as ad, debounce as ae, retinaScale as af, clearCanvas as ag, setsEqual as ah, _elementsEqual as ai, _isClickEvent as aj, _isBetween as ak, _readValueToProps as al, _updateBezierControlPoints as am, _computeSegments as an, _boundSegments as ao, _steppedInterpolation as ap, _bezierInterpolation as aq, _pointInLine as ar, _steppedLineTo as as, _bezierCurveTo as at, drawPoint as au, addRoundedRectPath as av, toTRBL as aw, toTRBLCorners as ax, _boundSegment as ay, _normalizeAngle as az, isArray as b, PITAU as b0, INFINITY as b1, RAD_PER_DEG as b2, QUARTER_PI as b3, TWO_THIRDS_PI as b4, _angleDiff as b5, color as c, defaults as d, effects as e, resolveObjectKey as f, isNumberFinite as g, createContext as h, isObject as i, defined as j, isNullOrUndef as k, listenArrayEvents as l, toPercentage as m, toDimension as n, formatNumber as o, _angleBetween as p, _getStartAndCountOfVisiblePoints as q, requestAnimFrame as r, sign as s, toRadians as t, unlistenArrayEvents as u, valueOrDefault as v, _scaleRangesChanged as w, isNumber as x, _parseObjectDataRadialScale as y, log10 as z };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\n/*!\n * Chart.js v3.9.1\n * https://www.chartjs.org\n * (c) 2022 Chart.js Contributors\n * Released under the MIT License\n */\nimport { r as requestAnimFrame, a as resolve, e as effects, c as color, d as defaults, i as isObject, b as isArray, v as valueOrDefault, u as unlistenArrayEvents, l as listenArrayEvents, f as resolveObjectKey, g as isNumberFinite, h as createContext, j as defined, s as sign, k as isNullOrUndef, _ as _arrayUnique, t as toRadians, m as toPercentage, n as toDimension, T as TAU, o as formatNumber, p as _angleBetween, H as HALF_PI, P as PI, q as _getStartAndCountOfVisiblePoints, w as _scaleRangesChanged, x as isNumber, y as _parseObjectDataRadialScale, z as log10, A as _factorize, B as finiteOrDefault, C as callback, D as _addGrace, E as _limitValue, F as toDegrees, G as _measureText, I as _int16Range, J as _alignPixel, K as toPadding, L as clipArea, M as renderText, N as unclipArea, O as toFont, Q as each, R as _toLeftRightCenter, S as _alignStartEnd, U as overrides, V as merge, W as _capitalize, X as getRelativePosition, Y as _rlookupByKey, Z as _lookupByKey, $ as _isPointInArea, a0 as getAngleFromPoint, a1 as getMaximumSize, a2 as _getParentNode, a3 as readUsedSize, a4 as throttled, a5 as supportsEventListenerOptions, a6 as _isDomSupported, a7 as descriptors, a8 as isFunction, a9 as _attachContext, aa as _createResolver, ab as _descriptors, ac as mergeIf, ad as uid, ae as debounce, af as retinaScale, ag as clearCanvas, ah as setsEqual, ai as _elementsEqual, aj as _isClickEvent, ak as _isBetween, al as _readValueToProps, am as _updateBezierControlPoints, an as _computeSegments, ao as _boundSegments, ap as _steppedInterpolation, aq as _bezierInterpolation, ar as _pointInLine, as as _steppedLineTo, at as _bezierCurveTo, au as drawPoint, av as addRoundedRectPath, aw as toTRBL, ax as toTRBLCorners, ay as _boundSegment, az as _normalizeAngle, aA as getRtlAdapter, aB as overrideTextDirection, aC as _textX, aD as restoreTextDirection, aE as drawPointLegend, aF as noop, aG as distanceBetweenPoints, aH as _setMinAndMaxByKey, aI as niceNum, aJ as almostWhole, aK as almostEquals, aL as _decimalPlaces, aM as _longestText, aN as _filterBetween, aO as _lookup } from './chunks/helpers.segment.mjs';\nexport { d as defaults } from './chunks/helpers.segment.mjs';\n\nclass Animator {\n  constructor() {\n    this._request = null;\n    this._charts = new Map();\n    this._running = false;\n    this._lastDate = undefined;\n  }\n\n  _notify(chart, anims, date, type) {\n    const callbacks = anims.listeners[type];\n    const numSteps = anims.duration;\n    callbacks.forEach(fn => fn({\n      chart,\n      initial: anims.initial,\n      numSteps,\n      currentStep: Math.min(date - anims.start, numSteps)\n    }));\n  }\n\n  _refresh() {\n    if (this._request) {\n      return;\n    }\n\n    this._running = true;\n    this._request = requestAnimFrame.call(window, () => {\n      this._update();\n\n      this._request = null;\n\n      if (this._running) {\n        this._refresh();\n      }\n    });\n  }\n\n  _update() {\n    let date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Date.now();\n    let remaining = 0;\n\n    this._charts.forEach((anims, chart) => {\n      if (!anims.running || !anims.items.length) {\n        return;\n      }\n\n      const items = anims.items;\n      let i = items.length - 1;\n      let draw = false;\n      let item;\n\n      for (; i >= 0; --i) {\n        item = items[i];\n\n        if (item._active) {\n          if (item._total > anims.duration) {\n            anims.duration = item._total;\n          }\n\n          item.tick(date);\n          draw = true;\n        } else {\n          items[i] = items[items.length - 1];\n          items.pop();\n        }\n      }\n\n      if (draw) {\n        chart.draw();\n\n        this._notify(chart, anims, date, 'progress');\n      }\n\n      if (!items.length) {\n        anims.running = false;\n\n        this._notify(chart, anims, date, 'complete');\n\n        anims.initial = false;\n      }\n\n      remaining += items.length;\n    });\n\n    this._lastDate = date;\n\n    if (remaining === 0) {\n      this._running = false;\n    }\n  }\n\n  _getAnims(chart) {\n    const charts = this._charts;\n    let anims = charts.get(chart);\n\n    if (!anims) {\n      anims = {\n        running: false,\n        initial: true,\n        items: [],\n        listeners: {\n          complete: [],\n          progress: []\n        }\n      };\n      charts.set(chart, anims);\n    }\n\n    return anims;\n  }\n\n  listen(chart, event, cb) {\n    this._getAnims(chart).listeners[event].push(cb);\n  }\n\n  add(chart, items) {\n    if (!items || !items.length) {\n      return;\n    }\n\n    this._getAnims(chart).items.push(...items);\n  }\n\n  has(chart) {\n    return this._getAnims(chart).items.length > 0;\n  }\n\n  start(chart) {\n    const anims = this._charts.get(chart);\n\n    if (!anims) {\n      return;\n    }\n\n    anims.running = true;\n    anims.start = Date.now();\n    anims.duration = anims.items.reduce((acc, cur) => Math.max(acc, cur._duration), 0);\n\n    this._refresh();\n  }\n\n  running(chart) {\n    if (!this._running) {\n      return false;\n    }\n\n    const anims = this._charts.get(chart);\n\n    if (!anims || !anims.running || !anims.items.length) {\n      return false;\n    }\n\n    return true;\n  }\n\n  stop(chart) {\n    const anims = this._charts.get(chart);\n\n    if (!anims || !anims.items.length) {\n      return;\n    }\n\n    const items = anims.items;\n    let i = items.length - 1;\n\n    for (; i >= 0; --i) {\n      items[i].cancel();\n    }\n\n    anims.items = [];\n\n    this._notify(chart, anims, Date.now(), 'complete');\n  }\n\n  remove(chart) {\n    return this._charts.delete(chart);\n  }\n\n}\n\nvar animator = new Animator();\nconst transparent = 'transparent';\nconst interpolators = {\n  boolean(from, to, factor) {\n    return factor > 0.5 ? to : from;\n  },\n\n  color(from, to, factor) {\n    const c0 = color(from || transparent);\n    const c1 = c0.valid && color(to || transparent);\n    return c1 && c1.valid ? c1.mix(c0, factor).hexString() : to;\n  },\n\n  number(from, to, factor) {\n    return from + (to - from) * factor;\n  }\n\n};\n\nclass Animation {\n  constructor(cfg, target, prop, to) {\n    const currentValue = target[prop];\n    to = resolve([cfg.to, to, currentValue, cfg.from]);\n    const from = resolve([cfg.from, currentValue, to]);\n    this._active = true;\n    this._fn = cfg.fn || interpolators[cfg.type || typeof from];\n    this._easing = effects[cfg.easing] || effects.linear;\n    this._start = Math.floor(Date.now() + (cfg.delay || 0));\n    this._duration = this._total = Math.floor(cfg.duration);\n    this._loop = !!cfg.loop;\n    this._target = target;\n    this._prop = prop;\n    this._from = from;\n    this._to = to;\n    this._promises = undefined;\n  }\n\n  active() {\n    return this._active;\n  }\n\n  update(cfg, to, date) {\n    if (this._active) {\n      this._notify(false);\n\n      const currentValue = this._target[this._prop];\n      const elapsed = date - this._start;\n      const remain = this._duration - elapsed;\n      this._start = date;\n      this._duration = Math.floor(Math.max(remain, cfg.duration));\n      this._total += elapsed;\n      this._loop = !!cfg.loop;\n      this._to = resolve([cfg.to, to, currentValue, cfg.from]);\n      this._from = resolve([cfg.from, currentValue, to]);\n    }\n  }\n\n  cancel() {\n    if (this._active) {\n      this.tick(Date.now());\n      this._active = false;\n\n      this._notify(false);\n    }\n  }\n\n  tick(date) {\n    const elapsed = date - this._start;\n    const duration = this._duration;\n    const prop = this._prop;\n    const from = this._from;\n    const loop = this._loop;\n    const to = this._to;\n    let factor;\n    this._active = from !== to && (loop || elapsed < duration);\n\n    if (!this._active) {\n      this._target[prop] = to;\n\n      this._notify(true);\n\n      return;\n    }\n\n    if (elapsed < 0) {\n      this._target[prop] = from;\n      return;\n    }\n\n    factor = elapsed / duration % 2;\n    factor = loop && factor > 1 ? 2 - factor : factor;\n    factor = this._easing(Math.min(1, Math.max(0, factor)));\n    this._target[prop] = this._fn(from, to, factor);\n  }\n\n  wait() {\n    const promises = this._promises || (this._promises = []);\n    return new Promise((res, rej) => {\n      promises.push({\n        res,\n        rej\n      });\n    });\n  }\n\n  _notify(resolved) {\n    const method = resolved ? 'res' : 'rej';\n    const promises = this._promises || [];\n\n    for (let i = 0; i < promises.length; i++) {\n      promises[i][method]();\n    }\n  }\n\n}\n\nconst numbers = ['x', 'y', 'borderWidth', 'radius', 'tension'];\nconst colors = ['color', 'borderColor', 'backgroundColor'];\ndefaults.set('animation', {\n  delay: undefined,\n  duration: 1000,\n  easing: 'easeOutQuart',\n  fn: undefined,\n  from: undefined,\n  loop: undefined,\n  to: undefined,\n  type: undefined\n});\nconst animationOptions = Object.keys(defaults.animation);\ndefaults.describe('animation', {\n  _fallback: false,\n  _indexable: false,\n  _scriptable: name => name !== 'onProgress' && name !== 'onComplete' && name !== 'fn'\n});\ndefaults.set('animations', {\n  colors: {\n    type: 'color',\n    properties: colors\n  },\n  numbers: {\n    type: 'number',\n    properties: numbers\n  }\n});\ndefaults.describe('animations', {\n  _fallback: 'animation'\n});\ndefaults.set('transitions', {\n  active: {\n    animation: {\n      duration: 400\n    }\n  },\n  resize: {\n    animation: {\n      duration: 0\n    }\n  },\n  show: {\n    animations: {\n      colors: {\n        from: 'transparent'\n      },\n      visible: {\n        type: 'boolean',\n        duration: 0\n      }\n    }\n  },\n  hide: {\n    animations: {\n      colors: {\n        to: 'transparent'\n      },\n      visible: {\n        type: 'boolean',\n        easing: 'linear',\n        fn: v => v | 0\n      }\n    }\n  }\n});\n\nclass Animations {\n  constructor(chart, config) {\n    this._chart = chart;\n    this._properties = new Map();\n    this.configure(config);\n  }\n\n  configure(config) {\n    if (!isObject(config)) {\n      return;\n    }\n\n    const animatedProps = this._properties;\n    Object.getOwnPropertyNames(config).forEach(key => {\n      const cfg = config[key];\n\n      if (!isObject(cfg)) {\n        return;\n      }\n\n      const resolved = {};\n\n      for (const option of animationOptions) {\n        resolved[option] = cfg[option];\n      }\n\n      (isArray(cfg.properties) && cfg.properties || [key]).forEach(prop => {\n        if (prop === key || !animatedProps.has(prop)) {\n          animatedProps.set(prop, resolved);\n        }\n      });\n    });\n  }\n\n  _animateOptions(target, values) {\n    const newOptions = values.options;\n    const options = resolveTargetOptions(target, newOptions);\n\n    if (!options) {\n      return [];\n    }\n\n    const animations = this._createAnimations(options, newOptions);\n\n    if (newOptions.$shared) {\n      awaitAll(target.options.$animations, newOptions).then(() => {\n        target.options = newOptions;\n      }, () => {});\n    }\n\n    return animations;\n  }\n\n  _createAnimations(target, values) {\n    const animatedProps = this._properties;\n    const animations = [];\n    const running = target.$animations || (target.$animations = {});\n    const props = Object.keys(values);\n    const date = Date.now();\n    let i;\n\n    for (i = props.length - 1; i >= 0; --i) {\n      const prop = props[i];\n\n      if (prop.charAt(0) === '$') {\n        continue;\n      }\n\n      if (prop === 'options') {\n        animations.push(...this._animateOptions(target, values));\n        continue;\n      }\n\n      const value = values[prop];\n      let animation = running[prop];\n      const cfg = animatedProps.get(prop);\n\n      if (animation) {\n        if (cfg && animation.active()) {\n          animation.update(cfg, value, date);\n          continue;\n        } else {\n          animation.cancel();\n        }\n      }\n\n      if (!cfg || !cfg.duration) {\n        target[prop] = value;\n        continue;\n      }\n\n      running[prop] = animation = new Animation(cfg, target, prop, value);\n      animations.push(animation);\n    }\n\n    return animations;\n  }\n\n  update(target, values) {\n    if (this._properties.size === 0) {\n      Object.assign(target, values);\n      return;\n    }\n\n    const animations = this._createAnimations(target, values);\n\n    if (animations.length) {\n      animator.add(this._chart, animations);\n      return true;\n    }\n  }\n\n}\n\nfunction awaitAll(animations, properties) {\n  const running = [];\n  const keys = Object.keys(properties);\n\n  for (let i = 0; i < keys.length; i++) {\n    const anim = animations[keys[i]];\n\n    if (anim && anim.active()) {\n      running.push(anim.wait());\n    }\n  }\n\n  return Promise.all(running);\n}\n\nfunction resolveTargetOptions(target, newOptions) {\n  if (!newOptions) {\n    return;\n  }\n\n  let options = target.options;\n\n  if (!options) {\n    target.options = newOptions;\n    return;\n  }\n\n  if (options.$shared) {\n    target.options = options = Object.assign({}, options, {\n      $shared: false,\n      $animations: {}\n    });\n  }\n\n  return options;\n}\n\nfunction scaleClip(scale, allowedOverflow) {\n  const opts = scale && scale.options || {};\n  const reverse = opts.reverse;\n  const min = opts.min === undefined ? allowedOverflow : 0;\n  const max = opts.max === undefined ? allowedOverflow : 0;\n  return {\n    start: reverse ? max : min,\n    end: reverse ? min : max\n  };\n}\n\nfunction defaultClip(xScale, yScale, allowedOverflow) {\n  if (allowedOverflow === false) {\n    return false;\n  }\n\n  const x = scaleClip(xScale, allowedOverflow);\n  const y = scaleClip(yScale, allowedOverflow);\n  return {\n    top: y.end,\n    right: x.end,\n    bottom: y.start,\n    left: x.start\n  };\n}\n\nfunction toClip(value) {\n  let t, r, b, l;\n\n  if (isObject(value)) {\n    t = value.top;\n    r = value.right;\n    b = value.bottom;\n    l = value.left;\n  } else {\n    t = r = b = l = value;\n  }\n\n  return {\n    top: t,\n    right: r,\n    bottom: b,\n    left: l,\n    disabled: value === false\n  };\n}\n\nfunction getSortedDatasetIndices(chart, filterVisible) {\n  const keys = [];\n\n  const metasets = chart._getSortedDatasetMetas(filterVisible);\n\n  let i, ilen;\n\n  for (i = 0, ilen = metasets.length; i < ilen; ++i) {\n    keys.push(metasets[i].index);\n  }\n\n  return keys;\n}\n\nfunction applyStack(stack, value, dsIndex) {\n  let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n  const keys = stack.keys;\n  const singleMode = options.mode === 'single';\n  let i, ilen, datasetIndex, otherValue;\n\n  if (value === null) {\n    return;\n  }\n\n  for (i = 0, ilen = keys.length; i < ilen; ++i) {\n    datasetIndex = +keys[i];\n\n    if (datasetIndex === dsIndex) {\n      if (options.all) {\n        continue;\n      }\n\n      break;\n    }\n\n    otherValue = stack.values[datasetIndex];\n\n    if (isNumberFinite(otherValue) && (singleMode || value === 0 || sign(value) === sign(otherValue))) {\n      value += otherValue;\n    }\n  }\n\n  return value;\n}\n\nfunction convertObjectDataToArray(data) {\n  const keys = Object.keys(data);\n  const adata = new Array(keys.length);\n  let i, ilen, key;\n\n  for (i = 0, ilen = keys.length; i < ilen; ++i) {\n    key = keys[i];\n    adata[i] = {\n      x: key,\n      y: data[key]\n    };\n  }\n\n  return adata;\n}\n\nfunction isStacked(scale, meta) {\n  const stacked = scale && scale.options.stacked;\n  return stacked || stacked === undefined && meta.stack !== undefined;\n}\n\nfunction getStackKey(indexScale, valueScale, meta) {\n  return \"\".concat(indexScale.id, \".\").concat(valueScale.id, \".\").concat(meta.stack || meta.type);\n}\n\nfunction getUserBounds(scale) {\n  const _scale$getUserBounds = scale.getUserBounds(),\n        min = _scale$getUserBounds.min,\n        max = _scale$getUserBounds.max,\n        minDefined = _scale$getUserBounds.minDefined,\n        maxDefined = _scale$getUserBounds.maxDefined;\n\n  return {\n    min: minDefined ? min : Number.NEGATIVE_INFINITY,\n    max: maxDefined ? max : Number.POSITIVE_INFINITY\n  };\n}\n\nfunction getOrCreateStack(stacks, stackKey, indexValue) {\n  const subStack = stacks[stackKey] || (stacks[stackKey] = {});\n  return subStack[indexValue] || (subStack[indexValue] = {});\n}\n\nfunction getLastIndexInStack(stack, vScale, positive, type) {\n  for (const meta of vScale.getMatchingVisibleMetas(type).reverse()) {\n    const value = stack[meta.index];\n\n    if (positive && value > 0 || !positive && value < 0) {\n      return meta.index;\n    }\n  }\n\n  return null;\n}\n\nfunction updateStacks(controller, parsed) {\n  const chart = controller.chart,\n        meta = controller._cachedMeta;\n  const stacks = chart._stacks || (chart._stacks = {});\n  const iScale = meta.iScale,\n        vScale = meta.vScale,\n        datasetIndex = meta.index;\n  const iAxis = iScale.axis;\n  const vAxis = vScale.axis;\n  const key = getStackKey(iScale, vScale, meta);\n  const ilen = parsed.length;\n  let stack;\n\n  for (let i = 0; i < ilen; ++i) {\n    const item = parsed[i];\n    const index = item[iAxis],\n          value = item[vAxis];\n    const itemStacks = item._stacks || (item._stacks = {});\n    stack = itemStacks[vAxis] = getOrCreateStack(stacks, key, index);\n    stack[datasetIndex] = value;\n    stack._top = getLastIndexInStack(stack, vScale, true, meta.type);\n    stack._bottom = getLastIndexInStack(stack, vScale, false, meta.type);\n  }\n}\n\nfunction getFirstScaleId(chart, axis) {\n  const scales = chart.scales;\n  return Object.keys(scales).filter(key => scales[key].axis === axis).shift();\n}\n\nfunction createDatasetContext(parent, index) {\n  return createContext(parent, {\n    active: false,\n    dataset: undefined,\n    datasetIndex: index,\n    index,\n    mode: 'default',\n    type: 'dataset'\n  });\n}\n\nfunction createDataContext(parent, index, element) {\n  return createContext(parent, {\n    active: false,\n    dataIndex: index,\n    parsed: undefined,\n    raw: undefined,\n    element,\n    index,\n    mode: 'default',\n    type: 'data'\n  });\n}\n\nfunction clearStacks(meta, items) {\n  const datasetIndex = meta.controller.index;\n  const axis = meta.vScale && meta.vScale.axis;\n\n  if (!axis) {\n    return;\n  }\n\n  items = items || meta._parsed;\n\n  for (const parsed of items) {\n    const stacks = parsed._stacks;\n\n    if (!stacks || stacks[axis] === undefined || stacks[axis][datasetIndex] === undefined) {\n      return;\n    }\n\n    delete stacks[axis][datasetIndex];\n  }\n}\n\nconst isDirectUpdateMode = mode => mode === 'reset' || mode === 'none';\n\nconst cloneIfNotShared = (cached, shared) => shared ? cached : Object.assign({}, cached);\n\nconst createStack = (canStack, meta, chart) => canStack && !meta.hidden && meta._stacked && {\n  keys: getSortedDatasetIndices(chart, true),\n  values: null\n};\n\nclass DatasetController {\n  constructor(chart, datasetIndex) {\n    this.chart = chart;\n    this._ctx = chart.ctx;\n    this.index = datasetIndex;\n    this._cachedDataOpts = {};\n    this._cachedMeta = this.getMeta();\n    this._type = this._cachedMeta.type;\n    this.options = undefined;\n    this._parsing = false;\n    this._data = undefined;\n    this._objectData = undefined;\n    this._sharedOptions = undefined;\n    this._drawStart = undefined;\n    this._drawCount = undefined;\n    this.enableOptionSharing = false;\n    this.supportsDecimation = false;\n    this.$context = undefined;\n    this._syncList = [];\n    this.initialize();\n  }\n\n  initialize() {\n    const meta = this._cachedMeta;\n    this.configure();\n    this.linkScales();\n    meta._stacked = isStacked(meta.vScale, meta);\n    this.addElements();\n  }\n\n  updateIndex(datasetIndex) {\n    if (this.index !== datasetIndex) {\n      clearStacks(this._cachedMeta);\n    }\n\n    this.index = datasetIndex;\n  }\n\n  linkScales() {\n    const chart = this.chart;\n    const meta = this._cachedMeta;\n    const dataset = this.getDataset();\n\n    const chooseId = (axis, x, y, r) => axis === 'x' ? x : axis === 'r' ? r : y;\n\n    const xid = meta.xAxisID = valueOrDefault(dataset.xAxisID, getFirstScaleId(chart, 'x'));\n    const yid = meta.yAxisID = valueOrDefault(dataset.yAxisID, getFirstScaleId(chart, 'y'));\n    const rid = meta.rAxisID = valueOrDefault(dataset.rAxisID, getFirstScaleId(chart, 'r'));\n    const indexAxis = meta.indexAxis;\n    const iid = meta.iAxisID = chooseId(indexAxis, xid, yid, rid);\n    const vid = meta.vAxisID = chooseId(indexAxis, yid, xid, rid);\n    meta.xScale = this.getScaleForId(xid);\n    meta.yScale = this.getScaleForId(yid);\n    meta.rScale = this.getScaleForId(rid);\n    meta.iScale = this.getScaleForId(iid);\n    meta.vScale = this.getScaleForId(vid);\n  }\n\n  getDataset() {\n    return this.chart.data.datasets[this.index];\n  }\n\n  getMeta() {\n    return this.chart.getDatasetMeta(this.index);\n  }\n\n  getScaleForId(scaleID) {\n    return this.chart.scales[scaleID];\n  }\n\n  _getOtherScale(scale) {\n    const meta = this._cachedMeta;\n    return scale === meta.iScale ? meta.vScale : meta.iScale;\n  }\n\n  reset() {\n    this._update('reset');\n  }\n\n  _destroy() {\n    const meta = this._cachedMeta;\n\n    if (this._data) {\n      unlistenArrayEvents(this._data, this);\n    }\n\n    if (meta._stacked) {\n      clearStacks(meta);\n    }\n  }\n\n  _dataCheck() {\n    const dataset = this.getDataset();\n    const data = dataset.data || (dataset.data = []);\n    const _data = this._data;\n\n    if (isObject(data)) {\n      this._data = convertObjectDataToArray(data);\n    } else if (_data !== data) {\n      if (_data) {\n        unlistenArrayEvents(_data, this);\n        const meta = this._cachedMeta;\n        clearStacks(meta);\n        meta._parsed = [];\n      }\n\n      if (data && Object.isExtensible(data)) {\n        listenArrayEvents(data, this);\n      }\n\n      this._syncList = [];\n      this._data = data;\n    }\n  }\n\n  addElements() {\n    const meta = this._cachedMeta;\n\n    this._dataCheck();\n\n    if (this.datasetElementType) {\n      meta.dataset = new this.datasetElementType();\n    }\n  }\n\n  buildOrUpdateElements(resetNewElements) {\n    const meta = this._cachedMeta;\n    const dataset = this.getDataset();\n    let stackChanged = false;\n\n    this._dataCheck();\n\n    const oldStacked = meta._stacked;\n    meta._stacked = isStacked(meta.vScale, meta);\n\n    if (meta.stack !== dataset.stack) {\n      stackChanged = true;\n      clearStacks(meta);\n      meta.stack = dataset.stack;\n    }\n\n    this._resyncElements(resetNewElements);\n\n    if (stackChanged || oldStacked !== meta._stacked) {\n      updateStacks(this, meta._parsed);\n    }\n  }\n\n  configure() {\n    const config = this.chart.config;\n    const scopeKeys = config.datasetScopeKeys(this._type);\n    const scopes = config.getOptionScopes(this.getDataset(), scopeKeys, true);\n    this.options = config.createResolver(scopes, this.getContext());\n    this._parsing = this.options.parsing;\n    this._cachedDataOpts = {};\n  }\n\n  parse(start, count) {\n    const meta = this._cachedMeta,\n          data = this._data;\n    const iScale = meta.iScale,\n          _stacked = meta._stacked;\n    const iAxis = iScale.axis;\n    let sorted = start === 0 && count === data.length ? true : meta._sorted;\n    let prev = start > 0 && meta._parsed[start - 1];\n    let i, cur, parsed;\n\n    if (this._parsing === false) {\n      meta._parsed = data;\n      meta._sorted = true;\n      parsed = data;\n    } else {\n      if (isArray(data[start])) {\n        parsed = this.parseArrayData(meta, data, start, count);\n      } else if (isObject(data[start])) {\n        parsed = this.parseObjectData(meta, data, start, count);\n      } else {\n        parsed = this.parsePrimitiveData(meta, data, start, count);\n      }\n\n      const isNotInOrderComparedToPrev = () => cur[iAxis] === null || prev && cur[iAxis] < prev[iAxis];\n\n      for (i = 0; i < count; ++i) {\n        meta._parsed[i + start] = cur = parsed[i];\n\n        if (sorted) {\n          if (isNotInOrderComparedToPrev()) {\n            sorted = false;\n          }\n\n          prev = cur;\n        }\n      }\n\n      meta._sorted = sorted;\n    }\n\n    if (_stacked) {\n      updateStacks(this, parsed);\n    }\n  }\n\n  parsePrimitiveData(meta, data, start, count) {\n    const iScale = meta.iScale,\n          vScale = meta.vScale;\n    const iAxis = iScale.axis;\n    const vAxis = vScale.axis;\n    const labels = iScale.getLabels();\n    const singleScale = iScale === vScale;\n    const parsed = new Array(count);\n    let i, ilen, index;\n\n    for (i = 0, ilen = count; i < ilen; ++i) {\n      index = i + start;\n      parsed[i] = {\n        [iAxis]: singleScale || iScale.parse(labels[index], index),\n        [vAxis]: vScale.parse(data[index], index)\n      };\n    }\n\n    return parsed;\n  }\n\n  parseArrayData(meta, data, start, count) {\n    const xScale = meta.xScale,\n          yScale = meta.yScale;\n    const parsed = new Array(count);\n    let i, ilen, index, item;\n\n    for (i = 0, ilen = count; i < ilen; ++i) {\n      index = i + start;\n      item = data[index];\n      parsed[i] = {\n        x: xScale.parse(item[0], index),\n        y: yScale.parse(item[1], index)\n      };\n    }\n\n    return parsed;\n  }\n\n  parseObjectData(meta, data, start, count) {\n    const xScale = meta.xScale,\n          yScale = meta.yScale;\n    const _this$_parsing = this._parsing,\n          _this$_parsing$xAxisK = _this$_parsing.xAxisKey,\n          xAxisKey = _this$_parsing$xAxisK === void 0 ? 'x' : _this$_parsing$xAxisK,\n          _this$_parsing$yAxisK = _this$_parsing.yAxisKey,\n          yAxisKey = _this$_parsing$yAxisK === void 0 ? 'y' : _this$_parsing$yAxisK;\n    const parsed = new Array(count);\n    let i, ilen, index, item;\n\n    for (i = 0, ilen = count; i < ilen; ++i) {\n      index = i + start;\n      item = data[index];\n      parsed[i] = {\n        x: xScale.parse(resolveObjectKey(item, xAxisKey), index),\n        y: yScale.parse(resolveObjectKey(item, yAxisKey), index)\n      };\n    }\n\n    return parsed;\n  }\n\n  getParsed(index) {\n    return this._cachedMeta._parsed[index];\n  }\n\n  getDataElement(index) {\n    return this._cachedMeta.data[index];\n  }\n\n  applyStack(scale, parsed, mode) {\n    const chart = this.chart;\n    const meta = this._cachedMeta;\n    const value = parsed[scale.axis];\n    const stack = {\n      keys: getSortedDatasetIndices(chart, true),\n      values: parsed._stacks[scale.axis]\n    };\n    return applyStack(stack, value, meta.index, {\n      mode\n    });\n  }\n\n  updateRangeFromParsed(range, scale, parsed, stack) {\n    const parsedValue = parsed[scale.axis];\n    let value = parsedValue === null ? NaN : parsedValue;\n    const values = stack && parsed._stacks[scale.axis];\n\n    if (stack && values) {\n      stack.values = values;\n      value = applyStack(stack, parsedValue, this._cachedMeta.index);\n    }\n\n    range.min = Math.min(range.min, value);\n    range.max = Math.max(range.max, value);\n  }\n\n  getMinMax(scale, canStack) {\n    const meta = this._cachedMeta;\n    const _parsed = meta._parsed;\n    const sorted = meta._sorted && scale === meta.iScale;\n    const ilen = _parsed.length;\n\n    const otherScale = this._getOtherScale(scale);\n\n    const stack = createStack(canStack, meta, this.chart);\n    const range = {\n      min: Number.POSITIVE_INFINITY,\n      max: Number.NEGATIVE_INFINITY\n    };\n\n    const _getUserBounds = getUserBounds(otherScale),\n          otherMin = _getUserBounds.min,\n          otherMax = _getUserBounds.max;\n\n    let i, parsed;\n\n    function _skip() {\n      parsed = _parsed[i];\n      const otherValue = parsed[otherScale.axis];\n      return !isNumberFinite(parsed[scale.axis]) || otherMin > otherValue || otherMax < otherValue;\n    }\n\n    for (i = 0; i < ilen; ++i) {\n      if (_skip()) {\n        continue;\n      }\n\n      this.updateRangeFromParsed(range, scale, parsed, stack);\n\n      if (sorted) {\n        break;\n      }\n    }\n\n    if (sorted) {\n      for (i = ilen - 1; i >= 0; --i) {\n        if (_skip()) {\n          continue;\n        }\n\n        this.updateRangeFromParsed(range, scale, parsed, stack);\n        break;\n      }\n    }\n\n    return range;\n  }\n\n  getAllParsedValues(scale) {\n    const parsed = this._cachedMeta._parsed;\n    const values = [];\n    let i, ilen, value;\n\n    for (i = 0, ilen = parsed.length; i < ilen; ++i) {\n      value = parsed[i][scale.axis];\n\n      if (isNumberFinite(value)) {\n        values.push(value);\n      }\n    }\n\n    return values;\n  }\n\n  getMaxOverflow() {\n    return false;\n  }\n\n  getLabelAndValue(index) {\n    const meta = this._cachedMeta;\n    const iScale = meta.iScale;\n    const vScale = meta.vScale;\n    const parsed = this.getParsed(index);\n    return {\n      label: iScale ? '' + iScale.getLabelForValue(parsed[iScale.axis]) : '',\n      value: vScale ? '' + vScale.getLabelForValue(parsed[vScale.axis]) : ''\n    };\n  }\n\n  _update(mode) {\n    const meta = this._cachedMeta;\n    this.update(mode || 'default');\n    meta._clip = toClip(valueOrDefault(this.options.clip, defaultClip(meta.xScale, meta.yScale, this.getMaxOverflow())));\n  }\n\n  update(mode) {}\n\n  draw() {\n    const ctx = this._ctx;\n    const chart = this.chart;\n    const meta = this._cachedMeta;\n    const elements = meta.data || [];\n    const area = chart.chartArea;\n    const active = [];\n    const start = this._drawStart || 0;\n    const count = this._drawCount || elements.length - start;\n    const drawActiveElementsOnTop = this.options.drawActiveElementsOnTop;\n    let i;\n\n    if (meta.dataset) {\n      meta.dataset.draw(ctx, area, start, count);\n    }\n\n    for (i = start; i < start + count; ++i) {\n      const element = elements[i];\n\n      if (element.hidden) {\n        continue;\n      }\n\n      if (element.active && drawActiveElementsOnTop) {\n        active.push(element);\n      } else {\n        element.draw(ctx, area);\n      }\n    }\n\n    for (i = 0; i < active.length; ++i) {\n      active[i].draw(ctx, area);\n    }\n  }\n\n  getStyle(index, active) {\n    const mode = active ? 'active' : 'default';\n    return index === undefined && this._cachedMeta.dataset ? this.resolveDatasetElementOptions(mode) : this.resolveDataElementOptions(index || 0, mode);\n  }\n\n  getContext(index, active, mode) {\n    const dataset = this.getDataset();\n    let context;\n\n    if (index >= 0 && index < this._cachedMeta.data.length) {\n      const element = this._cachedMeta.data[index];\n      context = element.$context || (element.$context = createDataContext(this.getContext(), index, element));\n      context.parsed = this.getParsed(index);\n      context.raw = dataset.data[index];\n      context.index = context.dataIndex = index;\n    } else {\n      context = this.$context || (this.$context = createDatasetContext(this.chart.getContext(), this.index));\n      context.dataset = dataset;\n      context.index = context.datasetIndex = this.index;\n    }\n\n    context.active = !!active;\n    context.mode = mode;\n    return context;\n  }\n\n  resolveDatasetElementOptions(mode) {\n    return this._resolveElementOptions(this.datasetElementType.id, mode);\n  }\n\n  resolveDataElementOptions(index, mode) {\n    return this._resolveElementOptions(this.dataElementType.id, mode, index);\n  }\n\n  _resolveElementOptions(elementType) {\n    let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';\n    let index = arguments.length > 2 ? arguments[2] : undefined;\n    const active = mode === 'active';\n    const cache = this._cachedDataOpts;\n    const cacheKey = elementType + '-' + mode;\n    const cached = cache[cacheKey];\n    const sharing = this.enableOptionSharing && defined(index);\n\n    if (cached) {\n      return cloneIfNotShared(cached, sharing);\n    }\n\n    const config = this.chart.config;\n    const scopeKeys = config.datasetElementScopeKeys(this._type, elementType);\n    const prefixes = active ? [\"\".concat(elementType, \"Hover\"), 'hover', elementType, ''] : [elementType, ''];\n    const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n    const names = Object.keys(defaults.elements[elementType]);\n\n    const context = () => this.getContext(index, active);\n\n    const values = config.resolveNamedOptions(scopes, names, context, prefixes);\n\n    if (values.$shared) {\n      values.$shared = sharing;\n      cache[cacheKey] = Object.freeze(cloneIfNotShared(values, sharing));\n    }\n\n    return values;\n  }\n\n  _resolveAnimations(index, transition, active) {\n    const chart = this.chart;\n    const cache = this._cachedDataOpts;\n    const cacheKey = \"animation-\".concat(transition);\n    const cached = cache[cacheKey];\n\n    if (cached) {\n      return cached;\n    }\n\n    let options;\n\n    if (chart.options.animation !== false) {\n      const config = this.chart.config;\n      const scopeKeys = config.datasetAnimationScopeKeys(this._type, transition);\n      const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n      options = config.createResolver(scopes, this.getContext(index, active, transition));\n    }\n\n    const animations = new Animations(chart, options && options.animations);\n\n    if (options && options._cacheable) {\n      cache[cacheKey] = Object.freeze(animations);\n    }\n\n    return animations;\n  }\n\n  getSharedOptions(options) {\n    if (!options.$shared) {\n      return;\n    }\n\n    return this._sharedOptions || (this._sharedOptions = Object.assign({}, options));\n  }\n\n  includeOptions(mode, sharedOptions) {\n    return !sharedOptions || isDirectUpdateMode(mode) || this.chart._animationsDisabled;\n  }\n\n  _getSharedOptions(start, mode) {\n    const firstOpts = this.resolveDataElementOptions(start, mode);\n    const previouslySharedOptions = this._sharedOptions;\n    const sharedOptions = this.getSharedOptions(firstOpts);\n    const includeOptions = this.includeOptions(mode, sharedOptions) || sharedOptions !== previouslySharedOptions;\n    this.updateSharedOptions(sharedOptions, mode, firstOpts);\n    return {\n      sharedOptions,\n      includeOptions\n    };\n  }\n\n  updateElement(element, index, properties, mode) {\n    if (isDirectUpdateMode(mode)) {\n      Object.assign(element, properties);\n    } else {\n      this._resolveAnimations(index, mode).update(element, properties);\n    }\n  }\n\n  updateSharedOptions(sharedOptions, mode, newOptions) {\n    if (sharedOptions && !isDirectUpdateMode(mode)) {\n      this._resolveAnimations(undefined, mode).update(sharedOptions, newOptions);\n    }\n  }\n\n  _setStyle(element, index, mode, active) {\n    element.active = active;\n    const options = this.getStyle(index, active);\n\n    this._resolveAnimations(index, mode, active).update(element, {\n      options: !active && this.getSharedOptions(options) || options\n    });\n  }\n\n  removeHoverStyle(element, datasetIndex, index) {\n    this._setStyle(element, index, 'active', false);\n  }\n\n  setHoverStyle(element, datasetIndex, index) {\n    this._setStyle(element, index, 'active', true);\n  }\n\n  _removeDatasetHoverStyle() {\n    const element = this._cachedMeta.dataset;\n\n    if (element) {\n      this._setStyle(element, undefined, 'active', false);\n    }\n  }\n\n  _setDatasetHoverStyle() {\n    const element = this._cachedMeta.dataset;\n\n    if (element) {\n      this._setStyle(element, undefined, 'active', true);\n    }\n  }\n\n  _resyncElements(resetNewElements) {\n    const data = this._data;\n    const elements = this._cachedMeta.data;\n\n    for (const _ref of this._syncList) {\n      var _ref2 = _slicedToArray(_ref, 3);\n\n      const method = _ref2[0];\n      const arg1 = _ref2[1];\n      const arg2 = _ref2[2];\n      this[method](arg1, arg2);\n    }\n\n    this._syncList = [];\n    const numMeta = elements.length;\n    const numData = data.length;\n    const count = Math.min(numData, numMeta);\n\n    if (count) {\n      this.parse(0, count);\n    }\n\n    if (numData > numMeta) {\n      this._insertElements(numMeta, numData - numMeta, resetNewElements);\n    } else if (numData < numMeta) {\n      this._removeElements(numData, numMeta - numData);\n    }\n  }\n\n  _insertElements(start, count) {\n    let resetNewElements = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n    const meta = this._cachedMeta;\n    const data = meta.data;\n    const end = start + count;\n    let i;\n\n    const move = arr => {\n      arr.length += count;\n\n      for (i = arr.length - 1; i >= end; i--) {\n        arr[i] = arr[i - count];\n      }\n    };\n\n    move(data);\n\n    for (i = start; i < end; ++i) {\n      data[i] = new this.dataElementType();\n    }\n\n    if (this._parsing) {\n      move(meta._parsed);\n    }\n\n    this.parse(start, count);\n\n    if (resetNewElements) {\n      this.updateElements(data, start, count, 'reset');\n    }\n  }\n\n  updateElements(element, start, count, mode) {}\n\n  _removeElements(start, count) {\n    const meta = this._cachedMeta;\n\n    if (this._parsing) {\n      const removed = meta._parsed.splice(start, count);\n\n      if (meta._stacked) {\n        clearStacks(meta, removed);\n      }\n    }\n\n    meta.data.splice(start, count);\n  }\n\n  _sync(args) {\n    if (this._parsing) {\n      this._syncList.push(args);\n    } else {\n      const _args2 = _slicedToArray(args, 3),\n            method = _args2[0],\n            arg1 = _args2[1],\n            arg2 = _args2[2];\n\n      this[method](arg1, arg2);\n    }\n\n    this.chart._dataChanges.push([this.index, ...args]);\n  }\n\n  _onDataPush() {\n    const count = arguments.length;\n\n    this._sync(['_insertElements', this.getDataset().data.length - count, count]);\n  }\n\n  _onDataPop() {\n    this._sync(['_removeElements', this._cachedMeta.data.length - 1, 1]);\n  }\n\n  _onDataShift() {\n    this._sync(['_removeElements', 0, 1]);\n  }\n\n  _onDataSplice(start, count) {\n    if (count) {\n      this._sync(['_removeElements', start, count]);\n    }\n\n    const newCount = arguments.length - 2;\n\n    if (newCount) {\n      this._sync(['_insertElements', start, newCount]);\n    }\n  }\n\n  _onDataUnshift() {\n    this._sync(['_insertElements', 0, arguments.length]);\n  }\n\n}\n\nDatasetController.defaults = {};\nDatasetController.prototype.datasetElementType = null;\nDatasetController.prototype.dataElementType = null;\n\nfunction getAllScaleValues(scale, type) {\n  if (!scale._cache.$bar) {\n    const visibleMetas = scale.getMatchingVisibleMetas(type);\n    let values = [];\n\n    for (let i = 0, ilen = visibleMetas.length; i < ilen; i++) {\n      values = values.concat(visibleMetas[i].controller.getAllParsedValues(scale));\n    }\n\n    scale._cache.$bar = _arrayUnique(values.sort((a, b) => a - b));\n  }\n\n  return scale._cache.$bar;\n}\n\nfunction computeMinSampleSize(meta) {\n  const scale = meta.iScale;\n  const values = getAllScaleValues(scale, meta.type);\n  let min = scale._length;\n  let i, ilen, curr, prev;\n\n  const updateMinAndPrev = () => {\n    if (curr === 32767 || curr === -32768) {\n      return;\n    }\n\n    if (defined(prev)) {\n      min = Math.min(min, Math.abs(curr - prev) || min);\n    }\n\n    prev = curr;\n  };\n\n  for (i = 0, ilen = values.length; i < ilen; ++i) {\n    curr = scale.getPixelForValue(values[i]);\n    updateMinAndPrev();\n  }\n\n  prev = undefined;\n\n  for (i = 0, ilen = scale.ticks.length; i < ilen; ++i) {\n    curr = scale.getPixelForTick(i);\n    updateMinAndPrev();\n  }\n\n  return min;\n}\n\nfunction computeFitCategoryTraits(index, ruler, options, stackCount) {\n  const thickness = options.barThickness;\n  let size, ratio;\n\n  if (isNullOrUndef(thickness)) {\n    size = ruler.min * options.categoryPercentage;\n    ratio = options.barPercentage;\n  } else {\n    size = thickness * stackCount;\n    ratio = 1;\n  }\n\n  return {\n    chunk: size / stackCount,\n    ratio,\n    start: ruler.pixels[index] - size / 2\n  };\n}\n\nfunction computeFlexCategoryTraits(index, ruler, options, stackCount) {\n  const pixels = ruler.pixels;\n  const curr = pixels[index];\n  let prev = index > 0 ? pixels[index - 1] : null;\n  let next = index < pixels.length - 1 ? pixels[index + 1] : null;\n  const percent = options.categoryPercentage;\n\n  if (prev === null) {\n    prev = curr - (next === null ? ruler.end - ruler.start : next - curr);\n  }\n\n  if (next === null) {\n    next = curr + curr - prev;\n  }\n\n  const start = curr - (curr - Math.min(prev, next)) / 2 * percent;\n  const size = Math.abs(next - prev) / 2 * percent;\n  return {\n    chunk: size / stackCount,\n    ratio: options.barPercentage,\n    start\n  };\n}\n\nfunction parseFloatBar(entry, item, vScale, i) {\n  const startValue = vScale.parse(entry[0], i);\n  const endValue = vScale.parse(entry[1], i);\n  const min = Math.min(startValue, endValue);\n  const max = Math.max(startValue, endValue);\n  let barStart = min;\n  let barEnd = max;\n\n  if (Math.abs(min) > Math.abs(max)) {\n    barStart = max;\n    barEnd = min;\n  }\n\n  item[vScale.axis] = barEnd;\n  item._custom = {\n    barStart,\n    barEnd,\n    start: startValue,\n    end: endValue,\n    min,\n    max\n  };\n}\n\nfunction parseValue(entry, item, vScale, i) {\n  if (isArray(entry)) {\n    parseFloatBar(entry, item, vScale, i);\n  } else {\n    item[vScale.axis] = vScale.parse(entry, i);\n  }\n\n  return item;\n}\n\nfunction parseArrayOrPrimitive(meta, data, start, count) {\n  const iScale = meta.iScale;\n  const vScale = meta.vScale;\n  const labels = iScale.getLabels();\n  const singleScale = iScale === vScale;\n  const parsed = [];\n  let i, ilen, item, entry;\n\n  for (i = start, ilen = start + count; i < ilen; ++i) {\n    entry = data[i];\n    item = {};\n    item[iScale.axis] = singleScale || iScale.parse(labels[i], i);\n    parsed.push(parseValue(entry, item, vScale, i));\n  }\n\n  return parsed;\n}\n\nfunction isFloatBar(custom) {\n  return custom && custom.barStart !== undefined && custom.barEnd !== undefined;\n}\n\nfunction barSign(size, vScale, actualBase) {\n  if (size !== 0) {\n    return sign(size);\n  }\n\n  return (vScale.isHorizontal() ? 1 : -1) * (vScale.min >= actualBase ? 1 : -1);\n}\n\nfunction borderProps(properties) {\n  let reverse, start, end, top, bottom;\n\n  if (properties.horizontal) {\n    reverse = properties.base > properties.x;\n    start = 'left';\n    end = 'right';\n  } else {\n    reverse = properties.base < properties.y;\n    start = 'bottom';\n    end = 'top';\n  }\n\n  if (reverse) {\n    top = 'end';\n    bottom = 'start';\n  } else {\n    top = 'start';\n    bottom = 'end';\n  }\n\n  return {\n    start,\n    end,\n    reverse,\n    top,\n    bottom\n  };\n}\n\nfunction setBorderSkipped(properties, options, stack, index) {\n  let edge = options.borderSkipped;\n  const res = {};\n\n  if (!edge) {\n    properties.borderSkipped = res;\n    return;\n  }\n\n  if (edge === true) {\n    properties.borderSkipped = {\n      top: true,\n      right: true,\n      bottom: true,\n      left: true\n    };\n    return;\n  }\n\n  const _borderProps = borderProps(properties),\n        start = _borderProps.start,\n        end = _borderProps.end,\n        reverse = _borderProps.reverse,\n        top = _borderProps.top,\n        bottom = _borderProps.bottom;\n\n  if (edge === 'middle' && stack) {\n    properties.enableBorderRadius = true;\n\n    if ((stack._top || 0) === index) {\n      edge = top;\n    } else if ((stack._bottom || 0) === index) {\n      edge = bottom;\n    } else {\n      res[parseEdge(bottom, start, end, reverse)] = true;\n      edge = top;\n    }\n  }\n\n  res[parseEdge(edge, start, end, reverse)] = true;\n  properties.borderSkipped = res;\n}\n\nfunction parseEdge(edge, a, b, reverse) {\n  if (reverse) {\n    edge = swap(edge, a, b);\n    edge = startEnd(edge, b, a);\n  } else {\n    edge = startEnd(edge, a, b);\n  }\n\n  return edge;\n}\n\nfunction swap(orig, v1, v2) {\n  return orig === v1 ? v2 : orig === v2 ? v1 : orig;\n}\n\nfunction startEnd(v, start, end) {\n  return v === 'start' ? start : v === 'end' ? end : v;\n}\n\nfunction setInflateAmount(properties, _ref3, ratio) {\n  let inflateAmount = _ref3.inflateAmount;\n  properties.inflateAmount = inflateAmount === 'auto' ? ratio === 1 ? 0.33 : 0 : inflateAmount;\n}\n\nclass BarController extends DatasetController {\n  parsePrimitiveData(meta, data, start, count) {\n    return parseArrayOrPrimitive(meta, data, start, count);\n  }\n\n  parseArrayData(meta, data, start, count) {\n    return parseArrayOrPrimitive(meta, data, start, count);\n  }\n\n  parseObjectData(meta, data, start, count) {\n    const iScale = meta.iScale,\n          vScale = meta.vScale;\n    const _this$_parsing2 = this._parsing,\n          _this$_parsing2$xAxis = _this$_parsing2.xAxisKey,\n          xAxisKey = _this$_parsing2$xAxis === void 0 ? 'x' : _this$_parsing2$xAxis,\n          _this$_parsing2$yAxis = _this$_parsing2.yAxisKey,\n          yAxisKey = _this$_parsing2$yAxis === void 0 ? 'y' : _this$_parsing2$yAxis;\n    const iAxisKey = iScale.axis === 'x' ? xAxisKey : yAxisKey;\n    const vAxisKey = vScale.axis === 'x' ? xAxisKey : yAxisKey;\n    const parsed = [];\n    let i, ilen, item, obj;\n\n    for (i = start, ilen = start + count; i < ilen; ++i) {\n      obj = data[i];\n      item = {};\n      item[iScale.axis] = iScale.parse(resolveObjectKey(obj, iAxisKey), i);\n      parsed.push(parseValue(resolveObjectKey(obj, vAxisKey), item, vScale, i));\n    }\n\n    return parsed;\n  }\n\n  updateRangeFromParsed(range, scale, parsed, stack) {\n    super.updateRangeFromParsed(range, scale, parsed, stack);\n    const custom = parsed._custom;\n\n    if (custom && scale === this._cachedMeta.vScale) {\n      range.min = Math.min(range.min, custom.min);\n      range.max = Math.max(range.max, custom.max);\n    }\n  }\n\n  getMaxOverflow() {\n    return 0;\n  }\n\n  getLabelAndValue(index) {\n    const meta = this._cachedMeta;\n    const iScale = meta.iScale,\n          vScale = meta.vScale;\n    const parsed = this.getParsed(index);\n    const custom = parsed._custom;\n    const value = isFloatBar(custom) ? '[' + custom.start + ', ' + custom.end + ']' : '' + vScale.getLabelForValue(parsed[vScale.axis]);\n    return {\n      label: '' + iScale.getLabelForValue(parsed[iScale.axis]),\n      value\n    };\n  }\n\n  initialize() {\n    this.enableOptionSharing = true;\n    super.initialize();\n    const meta = this._cachedMeta;\n    meta.stack = this.getDataset().stack;\n  }\n\n  update(mode) {\n    const meta = this._cachedMeta;\n    this.updateElements(meta.data, 0, meta.data.length, mode);\n  }\n\n  updateElements(bars, start, count, mode) {\n    const reset = mode === 'reset';\n    const index = this.index,\n          vScale = this._cachedMeta.vScale;\n    const base = vScale.getBasePixel();\n    const horizontal = vScale.isHorizontal();\n\n    const ruler = this._getRuler();\n\n    const _this$_getSharedOptio = this._getSharedOptions(start, mode),\n          sharedOptions = _this$_getSharedOptio.sharedOptions,\n          includeOptions = _this$_getSharedOptio.includeOptions;\n\n    for (let i = start; i < start + count; i++) {\n      const parsed = this.getParsed(i);\n      const vpixels = reset || isNullOrUndef(parsed[vScale.axis]) ? {\n        base,\n        head: base\n      } : this._calculateBarValuePixels(i);\n\n      const ipixels = this._calculateBarIndexPixels(i, ruler);\n\n      const stack = (parsed._stacks || {})[vScale.axis];\n      const properties = {\n        horizontal,\n        base: vpixels.base,\n        enableBorderRadius: !stack || isFloatBar(parsed._custom) || index === stack._top || index === stack._bottom,\n        x: horizontal ? vpixels.head : ipixels.center,\n        y: horizontal ? ipixels.center : vpixels.head,\n        height: horizontal ? ipixels.size : Math.abs(vpixels.size),\n        width: horizontal ? Math.abs(vpixels.size) : ipixels.size\n      };\n\n      if (includeOptions) {\n        properties.options = sharedOptions || this.resolveDataElementOptions(i, bars[i].active ? 'active' : mode);\n      }\n\n      const options = properties.options || bars[i].options;\n      setBorderSkipped(properties, options, stack, index);\n      setInflateAmount(properties, options, ruler.ratio);\n      this.updateElement(bars[i], i, properties, mode);\n    }\n  }\n\n  _getStacks(last, dataIndex) {\n    const iScale = this._cachedMeta.iScale;\n    const metasets = iScale.getMatchingVisibleMetas(this._type).filter(meta => meta.controller.options.grouped);\n    const stacked = iScale.options.stacked;\n    const stacks = [];\n\n    const skipNull = meta => {\n      const parsed = meta.controller.getParsed(dataIndex);\n      const val = parsed && parsed[meta.vScale.axis];\n\n      if (isNullOrUndef(val) || isNaN(val)) {\n        return true;\n      }\n    };\n\n    for (const meta of metasets) {\n      if (dataIndex !== undefined && skipNull(meta)) {\n        continue;\n      }\n\n      if (stacked === false || stacks.indexOf(meta.stack) === -1 || stacked === undefined && meta.stack === undefined) {\n        stacks.push(meta.stack);\n      }\n\n      if (meta.index === last) {\n        break;\n      }\n    }\n\n    if (!stacks.length) {\n      stacks.push(undefined);\n    }\n\n    return stacks;\n  }\n\n  _getStackCount(index) {\n    return this._getStacks(undefined, index).length;\n  }\n\n  _getStackIndex(datasetIndex, name, dataIndex) {\n    const stacks = this._getStacks(datasetIndex, dataIndex);\n\n    const index = name !== undefined ? stacks.indexOf(name) : -1;\n    return index === -1 ? stacks.length - 1 : index;\n  }\n\n  _getRuler() {\n    const opts = this.options;\n    const meta = this._cachedMeta;\n    const iScale = meta.iScale;\n    const pixels = [];\n    let i, ilen;\n\n    for (i = 0, ilen = meta.data.length; i < ilen; ++i) {\n      pixels.push(iScale.getPixelForValue(this.getParsed(i)[iScale.axis], i));\n    }\n\n    const barThickness = opts.barThickness;\n    const min = barThickness || computeMinSampleSize(meta);\n    return {\n      min,\n      pixels,\n      start: iScale._startPixel,\n      end: iScale._endPixel,\n      stackCount: this._getStackCount(),\n      scale: iScale,\n      grouped: opts.grouped,\n      ratio: barThickness ? 1 : opts.categoryPercentage * opts.barPercentage\n    };\n  }\n\n  _calculateBarValuePixels(index) {\n    const _this$_cachedMeta = this._cachedMeta,\n          vScale = _this$_cachedMeta.vScale,\n          _stacked = _this$_cachedMeta._stacked,\n          _this$options = this.options,\n          baseValue = _this$options.base,\n          minBarLength = _this$options.minBarLength;\n    const actualBase = baseValue || 0;\n    const parsed = this.getParsed(index);\n    const custom = parsed._custom;\n    const floating = isFloatBar(custom);\n    let value = parsed[vScale.axis];\n    let start = 0;\n    let length = _stacked ? this.applyStack(vScale, parsed, _stacked) : value;\n    let head, size;\n\n    if (length !== value) {\n      start = length - value;\n      length = value;\n    }\n\n    if (floating) {\n      value = custom.barStart;\n      length = custom.barEnd - custom.barStart;\n\n      if (value !== 0 && sign(value) !== sign(custom.barEnd)) {\n        start = 0;\n      }\n\n      start += value;\n    }\n\n    const startValue = !isNullOrUndef(baseValue) && !floating ? baseValue : start;\n    let base = vScale.getPixelForValue(startValue);\n\n    if (this.chart.getDataVisibility(index)) {\n      head = vScale.getPixelForValue(start + length);\n    } else {\n      head = base;\n    }\n\n    size = head - base;\n\n    if (Math.abs(size) < minBarLength) {\n      size = barSign(size, vScale, actualBase) * minBarLength;\n\n      if (value === actualBase) {\n        base -= size / 2;\n      }\n\n      const startPixel = vScale.getPixelForDecimal(0);\n      const endPixel = vScale.getPixelForDecimal(1);\n      const min = Math.min(startPixel, endPixel);\n      const max = Math.max(startPixel, endPixel);\n      base = Math.max(Math.min(base, max), min);\n      head = base + size;\n    }\n\n    if (base === vScale.getPixelForValue(actualBase)) {\n      const halfGrid = sign(size) * vScale.getLineWidthForValue(actualBase) / 2;\n      base += halfGrid;\n      size -= halfGrid;\n    }\n\n    return {\n      size,\n      base,\n      head,\n      center: head + size / 2\n    };\n  }\n\n  _calculateBarIndexPixels(index, ruler) {\n    const scale = ruler.scale;\n    const options = this.options;\n    const skipNull = options.skipNull;\n    const maxBarThickness = valueOrDefault(options.maxBarThickness, Infinity);\n    let center, size;\n\n    if (ruler.grouped) {\n      const stackCount = skipNull ? this._getStackCount(index) : ruler.stackCount;\n      const range = options.barThickness === 'flex' ? computeFlexCategoryTraits(index, ruler, options, stackCount) : computeFitCategoryTraits(index, ruler, options, stackCount);\n\n      const stackIndex = this._getStackIndex(this.index, this._cachedMeta.stack, skipNull ? index : undefined);\n\n      center = range.start + range.chunk * stackIndex + range.chunk / 2;\n      size = Math.min(maxBarThickness, range.chunk * range.ratio);\n    } else {\n      center = scale.getPixelForValue(this.getParsed(index)[scale.axis], index);\n      size = Math.min(maxBarThickness, ruler.min * ruler.ratio);\n    }\n\n    return {\n      base: center - size / 2,\n      head: center + size / 2,\n      center,\n      size\n    };\n  }\n\n  draw() {\n    const meta = this._cachedMeta;\n    const vScale = meta.vScale;\n    const rects = meta.data;\n    const ilen = rects.length;\n    let i = 0;\n\n    for (; i < ilen; ++i) {\n      if (this.getParsed(i)[vScale.axis] !== null) {\n        rects[i].draw(this._ctx);\n      }\n    }\n  }\n\n}\n\nBarController.id = 'bar';\nBarController.defaults = {\n  datasetElementType: false,\n  dataElementType: 'bar',\n  categoryPercentage: 0.8,\n  barPercentage: 0.9,\n  grouped: true,\n  animations: {\n    numbers: {\n      type: 'number',\n      properties: ['x', 'y', 'base', 'width', 'height']\n    }\n  }\n};\nBarController.overrides = {\n  scales: {\n    _index_: {\n      type: 'category',\n      offset: true,\n      grid: {\n        offset: true\n      }\n    },\n    _value_: {\n      type: 'linear',\n      beginAtZero: true\n    }\n  }\n};\n\nclass BubbleController extends DatasetController {\n  initialize() {\n    this.enableOptionSharing = true;\n    super.initialize();\n  }\n\n  parsePrimitiveData(meta, data, start, count) {\n    const parsed = super.parsePrimitiveData(meta, data, start, count);\n\n    for (let i = 0; i < parsed.length; i++) {\n      parsed[i]._custom = this.resolveDataElementOptions(i + start).radius;\n    }\n\n    return parsed;\n  }\n\n  parseArrayData(meta, data, start, count) {\n    const parsed = super.parseArrayData(meta, data, start, count);\n\n    for (let i = 0; i < parsed.length; i++) {\n      const item = data[start + i];\n      parsed[i]._custom = valueOrDefault(item[2], this.resolveDataElementOptions(i + start).radius);\n    }\n\n    return parsed;\n  }\n\n  parseObjectData(meta, data, start, count) {\n    const parsed = super.parseObjectData(meta, data, start, count);\n\n    for (let i = 0; i < parsed.length; i++) {\n      const item = data[start + i];\n      parsed[i]._custom = valueOrDefault(item && item.r && +item.r, this.resolveDataElementOptions(i + start).radius);\n    }\n\n    return parsed;\n  }\n\n  getMaxOverflow() {\n    const data = this._cachedMeta.data;\n    let max = 0;\n\n    for (let i = data.length - 1; i >= 0; --i) {\n      max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n    }\n\n    return max > 0 && max;\n  }\n\n  getLabelAndValue(index) {\n    const meta = this._cachedMeta;\n    const xScale = meta.xScale,\n          yScale = meta.yScale;\n    const parsed = this.getParsed(index);\n    const x = xScale.getLabelForValue(parsed.x);\n    const y = yScale.getLabelForValue(parsed.y);\n    const r = parsed._custom;\n    return {\n      label: meta.label,\n      value: '(' + x + ', ' + y + (r ? ', ' + r : '') + ')'\n    };\n  }\n\n  update(mode) {\n    const points = this._cachedMeta.data;\n    this.updateElements(points, 0, points.length, mode);\n  }\n\n  updateElements(points, start, count, mode) {\n    const reset = mode === 'reset';\n    const _this$_cachedMeta2 = this._cachedMeta,\n          iScale = _this$_cachedMeta2.iScale,\n          vScale = _this$_cachedMeta2.vScale;\n\n    const _this$_getSharedOptio2 = this._getSharedOptions(start, mode),\n          sharedOptions = _this$_getSharedOptio2.sharedOptions,\n          includeOptions = _this$_getSharedOptio2.includeOptions;\n\n    const iAxis = iScale.axis;\n    const vAxis = vScale.axis;\n\n    for (let i = start; i < start + count; i++) {\n      const point = points[i];\n      const parsed = !reset && this.getParsed(i);\n      const properties = {};\n      const iPixel = properties[iAxis] = reset ? iScale.getPixelForDecimal(0.5) : iScale.getPixelForValue(parsed[iAxis]);\n      const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(parsed[vAxis]);\n      properties.skip = isNaN(iPixel) || isNaN(vPixel);\n\n      if (includeOptions) {\n        properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n\n        if (reset) {\n          properties.options.radius = 0;\n        }\n      }\n\n      this.updateElement(point, i, properties, mode);\n    }\n  }\n\n  resolveDataElementOptions(index, mode) {\n    const parsed = this.getParsed(index);\n    let values = super.resolveDataElementOptions(index, mode);\n\n    if (values.$shared) {\n      values = Object.assign({}, values, {\n        $shared: false\n      });\n    }\n\n    const radius = values.radius;\n\n    if (mode !== 'active') {\n      values.radius = 0;\n    }\n\n    values.radius += valueOrDefault(parsed && parsed._custom, radius);\n    return values;\n  }\n\n}\n\nBubbleController.id = 'bubble';\nBubbleController.defaults = {\n  datasetElementType: false,\n  dataElementType: 'point',\n  animations: {\n    numbers: {\n      type: 'number',\n      properties: ['x', 'y', 'borderWidth', 'radius']\n    }\n  }\n};\nBubbleController.overrides = {\n  scales: {\n    x: {\n      type: 'linear'\n    },\n    y: {\n      type: 'linear'\n    }\n  },\n  plugins: {\n    tooltip: {\n      callbacks: {\n        title() {\n          return '';\n        }\n\n      }\n    }\n  }\n};\n\nfunction getRatioAndOffset(rotation, circumference, cutout) {\n  let ratioX = 1;\n  let ratioY = 1;\n  let offsetX = 0;\n  let offsetY = 0;\n\n  if (circumference < TAU) {\n    const startAngle = rotation;\n    const endAngle = startAngle + circumference;\n    const startX = Math.cos(startAngle);\n    const startY = Math.sin(startAngle);\n    const endX = Math.cos(endAngle);\n    const endY = Math.sin(endAngle);\n\n    const calcMax = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? 1 : Math.max(a, a * cutout, b, b * cutout);\n\n    const calcMin = (angle, a, b) => _angleBetween(angle, startAngle, endAngle, true) ? -1 : Math.min(a, a * cutout, b, b * cutout);\n\n    const maxX = calcMax(0, startX, endX);\n    const maxY = calcMax(HALF_PI, startY, endY);\n    const minX = calcMin(PI, startX, endX);\n    const minY = calcMin(PI + HALF_PI, startY, endY);\n    ratioX = (maxX - minX) / 2;\n    ratioY = (maxY - minY) / 2;\n    offsetX = -(maxX + minX) / 2;\n    offsetY = -(maxY + minY) / 2;\n  }\n\n  return {\n    ratioX,\n    ratioY,\n    offsetX,\n    offsetY\n  };\n}\n\nclass DoughnutController extends DatasetController {\n  constructor(chart, datasetIndex) {\n    super(chart, datasetIndex);\n    this.enableOptionSharing = true;\n    this.innerRadius = undefined;\n    this.outerRadius = undefined;\n    this.offsetX = undefined;\n    this.offsetY = undefined;\n  }\n\n  linkScales() {}\n\n  parse(start, count) {\n    const data = this.getDataset().data;\n    const meta = this._cachedMeta;\n\n    if (this._parsing === false) {\n      meta._parsed = data;\n    } else {\n      let getter = i => +data[i];\n\n      if (isObject(data[start])) {\n        const _this$_parsing$key = this._parsing.key,\n              key = _this$_parsing$key === void 0 ? 'value' : _this$_parsing$key;\n\n        getter = i => +resolveObjectKey(data[i], key);\n      }\n\n      let i, ilen;\n\n      for (i = start, ilen = start + count; i < ilen; ++i) {\n        meta._parsed[i] = getter(i);\n      }\n    }\n  }\n\n  _getRotation() {\n    return toRadians(this.options.rotation - 90);\n  }\n\n  _getCircumference() {\n    return toRadians(this.options.circumference);\n  }\n\n  _getRotationExtents() {\n    let min = TAU;\n    let max = -TAU;\n\n    for (let i = 0; i < this.chart.data.datasets.length; ++i) {\n      if (this.chart.isDatasetVisible(i)) {\n        const controller = this.chart.getDatasetMeta(i).controller;\n\n        const rotation = controller._getRotation();\n\n        const circumference = controller._getCircumference();\n\n        min = Math.min(min, rotation);\n        max = Math.max(max, rotation + circumference);\n      }\n    }\n\n    return {\n      rotation: min,\n      circumference: max - min\n    };\n  }\n\n  update(mode) {\n    const chart = this.chart;\n    const chartArea = chart.chartArea;\n    const meta = this._cachedMeta;\n    const arcs = meta.data;\n    const spacing = this.getMaxBorderWidth() + this.getMaxOffset(arcs) + this.options.spacing;\n    const maxSize = Math.max((Math.min(chartArea.width, chartArea.height) - spacing) / 2, 0);\n    const cutout = Math.min(toPercentage(this.options.cutout, maxSize), 1);\n\n    const chartWeight = this._getRingWeight(this.index);\n\n    const _this$_getRotationExt = this._getRotationExtents(),\n          circumference = _this$_getRotationExt.circumference,\n          rotation = _this$_getRotationExt.rotation;\n\n    const _getRatioAndOffset = getRatioAndOffset(rotation, circumference, cutout),\n          ratioX = _getRatioAndOffset.ratioX,\n          ratioY = _getRatioAndOffset.ratioY,\n          offsetX = _getRatioAndOffset.offsetX,\n          offsetY = _getRatioAndOffset.offsetY;\n\n    const maxWidth = (chartArea.width - spacing) / ratioX;\n    const maxHeight = (chartArea.height - spacing) / ratioY;\n    const maxRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\n    const outerRadius = toDimension(this.options.radius, maxRadius);\n    const innerRadius = Math.max(outerRadius * cutout, 0);\n\n    const radiusLength = (outerRadius - innerRadius) / this._getVisibleDatasetWeightTotal();\n\n    this.offsetX = offsetX * outerRadius;\n    this.offsetY = offsetY * outerRadius;\n    meta.total = this.calculateTotal();\n    this.outerRadius = outerRadius - radiusLength * this._getRingWeightOffset(this.index);\n    this.innerRadius = Math.max(this.outerRadius - radiusLength * chartWeight, 0);\n    this.updateElements(arcs, 0, arcs.length, mode);\n  }\n\n  _circumference(i, reset) {\n    const opts = this.options;\n    const meta = this._cachedMeta;\n\n    const circumference = this._getCircumference();\n\n    if (reset && opts.animation.animateRotate || !this.chart.getDataVisibility(i) || meta._parsed[i] === null || meta.data[i].hidden) {\n      return 0;\n    }\n\n    return this.calculateCircumference(meta._parsed[i] * circumference / TAU);\n  }\n\n  updateElements(arcs, start, count, mode) {\n    const reset = mode === 'reset';\n    const chart = this.chart;\n    const chartArea = chart.chartArea;\n    const opts = chart.options;\n    const animationOpts = opts.animation;\n    const centerX = (chartArea.left + chartArea.right) / 2;\n    const centerY = (chartArea.top + chartArea.bottom) / 2;\n    const animateScale = reset && animationOpts.animateScale;\n    const innerRadius = animateScale ? 0 : this.innerRadius;\n    const outerRadius = animateScale ? 0 : this.outerRadius;\n\n    const _this$_getSharedOptio3 = this._getSharedOptions(start, mode),\n          sharedOptions = _this$_getSharedOptio3.sharedOptions,\n          includeOptions = _this$_getSharedOptio3.includeOptions;\n\n    let startAngle = this._getRotation();\n\n    let i;\n\n    for (i = 0; i < start; ++i) {\n      startAngle += this._circumference(i, reset);\n    }\n\n    for (i = start; i < start + count; ++i) {\n      const circumference = this._circumference(i, reset);\n\n      const arc = arcs[i];\n      const properties = {\n        x: centerX + this.offsetX,\n        y: centerY + this.offsetY,\n        startAngle,\n        endAngle: startAngle + circumference,\n        circumference,\n        outerRadius,\n        innerRadius\n      };\n\n      if (includeOptions) {\n        properties.options = sharedOptions || this.resolveDataElementOptions(i, arc.active ? 'active' : mode);\n      }\n\n      startAngle += circumference;\n      this.updateElement(arc, i, properties, mode);\n    }\n  }\n\n  calculateTotal() {\n    const meta = this._cachedMeta;\n    const metaData = meta.data;\n    let total = 0;\n    let i;\n\n    for (i = 0; i < metaData.length; i++) {\n      const value = meta._parsed[i];\n\n      if (value !== null && !isNaN(value) && this.chart.getDataVisibility(i) && !metaData[i].hidden) {\n        total += Math.abs(value);\n      }\n    }\n\n    return total;\n  }\n\n  calculateCircumference(value) {\n    const total = this._cachedMeta.total;\n\n    if (total > 0 && !isNaN(value)) {\n      return TAU * (Math.abs(value) / total);\n    }\n\n    return 0;\n  }\n\n  getLabelAndValue(index) {\n    const meta = this._cachedMeta;\n    const chart = this.chart;\n    const labels = chart.data.labels || [];\n    const value = formatNumber(meta._parsed[index], chart.options.locale);\n    return {\n      label: labels[index] || '',\n      value\n    };\n  }\n\n  getMaxBorderWidth(arcs) {\n    let max = 0;\n    const chart = this.chart;\n    let i, ilen, meta, controller, options;\n\n    if (!arcs) {\n      for (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\n        if (chart.isDatasetVisible(i)) {\n          meta = chart.getDatasetMeta(i);\n          arcs = meta.data;\n          controller = meta.controller;\n          break;\n        }\n      }\n    }\n\n    if (!arcs) {\n      return 0;\n    }\n\n    for (i = 0, ilen = arcs.length; i < ilen; ++i) {\n      options = controller.resolveDataElementOptions(i);\n\n      if (options.borderAlign !== 'inner') {\n        max = Math.max(max, options.borderWidth || 0, options.hoverBorderWidth || 0);\n      }\n    }\n\n    return max;\n  }\n\n  getMaxOffset(arcs) {\n    let max = 0;\n\n    for (let i = 0, ilen = arcs.length; i < ilen; ++i) {\n      const options = this.resolveDataElementOptions(i);\n      max = Math.max(max, options.offset || 0, options.hoverOffset || 0);\n    }\n\n    return max;\n  }\n\n  _getRingWeightOffset(datasetIndex) {\n    let ringWeightOffset = 0;\n\n    for (let i = 0; i < datasetIndex; ++i) {\n      if (this.chart.isDatasetVisible(i)) {\n        ringWeightOffset += this._getRingWeight(i);\n      }\n    }\n\n    return ringWeightOffset;\n  }\n\n  _getRingWeight(datasetIndex) {\n    return Math.max(valueOrDefault(this.chart.data.datasets[datasetIndex].weight, 1), 0);\n  }\n\n  _getVisibleDatasetWeightTotal() {\n    return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;\n  }\n\n}\n\nDoughnutController.id = 'doughnut';\nDoughnutController.defaults = {\n  datasetElementType: false,\n  dataElementType: 'arc',\n  animation: {\n    animateRotate: true,\n    animateScale: false\n  },\n  animations: {\n    numbers: {\n      type: 'number',\n      properties: ['circumference', 'endAngle', 'innerRadius', 'outerRadius', 'startAngle', 'x', 'y', 'offset', 'borderWidth', 'spacing']\n    }\n  },\n  cutout: '50%',\n  rotation: 0,\n  circumference: 360,\n  radius: '100%',\n  spacing: 0,\n  indexAxis: 'r'\n};\nDoughnutController.descriptors = {\n  _scriptable: name => name !== 'spacing',\n  _indexable: name => name !== 'spacing'\n};\nDoughnutController.overrides = {\n  aspectRatio: 1,\n  plugins: {\n    legend: {\n      labels: {\n        generateLabels(chart) {\n          const data = chart.data;\n\n          if (data.labels.length && data.datasets.length) {\n            const pointStyle = chart.legend.options.labels.pointStyle;\n            return data.labels.map((label, i) => {\n              const meta = chart.getDatasetMeta(0);\n              const style = meta.controller.getStyle(i);\n              return {\n                text: label,\n                fillStyle: style.backgroundColor,\n                strokeStyle: style.borderColor,\n                lineWidth: style.borderWidth,\n                pointStyle: pointStyle,\n                hidden: !chart.getDataVisibility(i),\n                index: i\n              };\n            });\n          }\n\n          return [];\n        }\n\n      },\n\n      onClick(e, legendItem, legend) {\n        legend.chart.toggleDataVisibility(legendItem.index);\n        legend.chart.update();\n      }\n\n    },\n    tooltip: {\n      callbacks: {\n        title() {\n          return '';\n        },\n\n        label(tooltipItem) {\n          let dataLabel = tooltipItem.label;\n          const value = ': ' + tooltipItem.formattedValue;\n\n          if (isArray(dataLabel)) {\n            dataLabel = dataLabel.slice();\n            dataLabel[0] += value;\n          } else {\n            dataLabel += value;\n          }\n\n          return dataLabel;\n        }\n\n      }\n    }\n  }\n};\n\nclass LineController extends DatasetController {\n  initialize() {\n    this.enableOptionSharing = true;\n    this.supportsDecimation = true;\n    super.initialize();\n  }\n\n  update(mode) {\n    const meta = this._cachedMeta;\n    const line = meta.dataset,\n          _meta$data = meta.data,\n          points = _meta$data === void 0 ? [] : _meta$data,\n          _dataset = meta._dataset;\n    const animationsDisabled = this.chart._animationsDisabled;\n\n    let _getStartAndCountOfVi = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled),\n        start = _getStartAndCountOfVi.start,\n        count = _getStartAndCountOfVi.count;\n\n    this._drawStart = start;\n    this._drawCount = count;\n\n    if (_scaleRangesChanged(meta)) {\n      start = 0;\n      count = points.length;\n    }\n\n    line._chart = this.chart;\n    line._datasetIndex = this.index;\n    line._decimated = !!_dataset._decimated;\n    line.points = points;\n    const options = this.resolveDatasetElementOptions(mode);\n\n    if (!this.options.showLine) {\n      options.borderWidth = 0;\n    }\n\n    options.segment = this.options.segment;\n    this.updateElement(line, undefined, {\n      animated: !animationsDisabled,\n      options\n    }, mode);\n    this.updateElements(points, start, count, mode);\n  }\n\n  updateElements(points, start, count, mode) {\n    const reset = mode === 'reset';\n    const _this$_cachedMeta3 = this._cachedMeta,\n          iScale = _this$_cachedMeta3.iScale,\n          vScale = _this$_cachedMeta3.vScale,\n          _stacked = _this$_cachedMeta3._stacked,\n          _dataset = _this$_cachedMeta3._dataset;\n\n    const _this$_getSharedOptio4 = this._getSharedOptions(start, mode),\n          sharedOptions = _this$_getSharedOptio4.sharedOptions,\n          includeOptions = _this$_getSharedOptio4.includeOptions;\n\n    const iAxis = iScale.axis;\n    const vAxis = vScale.axis;\n    const _this$options2 = this.options,\n          spanGaps = _this$options2.spanGaps,\n          segment = _this$options2.segment;\n    const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n    const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n    let prevParsed = start > 0 && this.getParsed(start - 1);\n\n    for (let i = start; i < start + count; ++i) {\n      const point = points[i];\n      const parsed = this.getParsed(i);\n      const properties = directUpdate ? point : {};\n      const nullData = isNullOrUndef(parsed[vAxis]);\n      const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n      const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n      properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n      properties.stop = i > 0 && Math.abs(parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;\n\n      if (segment) {\n        properties.parsed = parsed;\n        properties.raw = _dataset.data[i];\n      }\n\n      if (includeOptions) {\n        properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n      }\n\n      if (!directUpdate) {\n        this.updateElement(point, i, properties, mode);\n      }\n\n      prevParsed = parsed;\n    }\n  }\n\n  getMaxOverflow() {\n    const meta = this._cachedMeta;\n    const dataset = meta.dataset;\n    const border = dataset.options && dataset.options.borderWidth || 0;\n    const data = meta.data || [];\n\n    if (!data.length) {\n      return border;\n    }\n\n    const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n    const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n    return Math.max(border, firstPoint, lastPoint) / 2;\n  }\n\n  draw() {\n    const meta = this._cachedMeta;\n    meta.dataset.updateControlPoints(this.chart.chartArea, meta.iScale.axis);\n    super.draw();\n  }\n\n}\n\nLineController.id = 'line';\nLineController.defaults = {\n  datasetElementType: 'line',\n  dataElementType: 'point',\n  showLine: true,\n  spanGaps: false\n};\nLineController.overrides = {\n  scales: {\n    _index_: {\n      type: 'category'\n    },\n    _value_: {\n      type: 'linear'\n    }\n  }\n};\n\nclass PolarAreaController extends DatasetController {\n  constructor(chart, datasetIndex) {\n    super(chart, datasetIndex);\n    this.innerRadius = undefined;\n    this.outerRadius = undefined;\n  }\n\n  getLabelAndValue(index) {\n    const meta = this._cachedMeta;\n    const chart = this.chart;\n    const labels = chart.data.labels || [];\n    const value = formatNumber(meta._parsed[index].r, chart.options.locale);\n    return {\n      label: labels[index] || '',\n      value\n    };\n  }\n\n  parseObjectData(meta, data, start, count) {\n    return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n  }\n\n  update(mode) {\n    const arcs = this._cachedMeta.data;\n\n    this._updateRadius();\n\n    this.updateElements(arcs, 0, arcs.length, mode);\n  }\n\n  getMinMax() {\n    const meta = this._cachedMeta;\n    const range = {\n      min: Number.POSITIVE_INFINITY,\n      max: Number.NEGATIVE_INFINITY\n    };\n    meta.data.forEach((element, index) => {\n      const parsed = this.getParsed(index).r;\n\n      if (!isNaN(parsed) && this.chart.getDataVisibility(index)) {\n        if (parsed < range.min) {\n          range.min = parsed;\n        }\n\n        if (parsed > range.max) {\n          range.max = parsed;\n        }\n      }\n    });\n    return range;\n  }\n\n  _updateRadius() {\n    const chart = this.chart;\n    const chartArea = chart.chartArea;\n    const opts = chart.options;\n    const minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\n    const outerRadius = Math.max(minSize / 2, 0);\n    const innerRadius = Math.max(opts.cutoutPercentage ? outerRadius / 100 * opts.cutoutPercentage : 1, 0);\n    const radiusLength = (outerRadius - innerRadius) / chart.getVisibleDatasetCount();\n    this.outerRadius = outerRadius - radiusLength * this.index;\n    this.innerRadius = this.outerRadius - radiusLength;\n  }\n\n  updateElements(arcs, start, count, mode) {\n    const reset = mode === 'reset';\n    const chart = this.chart;\n    const opts = chart.options;\n    const animationOpts = opts.animation;\n    const scale = this._cachedMeta.rScale;\n    const centerX = scale.xCenter;\n    const centerY = scale.yCenter;\n    const datasetStartAngle = scale.getIndexAngle(0) - 0.5 * PI;\n    let angle = datasetStartAngle;\n    let i;\n    const defaultAngle = 360 / this.countVisibleElements();\n\n    for (i = 0; i < start; ++i) {\n      angle += this._computeAngle(i, mode, defaultAngle);\n    }\n\n    for (i = start; i < start + count; i++) {\n      const arc = arcs[i];\n      let startAngle = angle;\n\n      let endAngle = angle + this._computeAngle(i, mode, defaultAngle);\n\n      let outerRadius = chart.getDataVisibility(i) ? scale.getDistanceFromCenterForValue(this.getParsed(i).r) : 0;\n      angle = endAngle;\n\n      if (reset) {\n        if (animationOpts.animateScale) {\n          outerRadius = 0;\n        }\n\n        if (animationOpts.animateRotate) {\n          startAngle = endAngle = datasetStartAngle;\n        }\n      }\n\n      const properties = {\n        x: centerX,\n        y: centerY,\n        innerRadius: 0,\n        outerRadius,\n        startAngle,\n        endAngle,\n        options: this.resolveDataElementOptions(i, arc.active ? 'active' : mode)\n      };\n      this.updateElement(arc, i, properties, mode);\n    }\n  }\n\n  countVisibleElements() {\n    const meta = this._cachedMeta;\n    let count = 0;\n    meta.data.forEach((element, index) => {\n      if (!isNaN(this.getParsed(index).r) && this.chart.getDataVisibility(index)) {\n        count++;\n      }\n    });\n    return count;\n  }\n\n  _computeAngle(index, mode, defaultAngle) {\n    return this.chart.getDataVisibility(index) ? toRadians(this.resolveDataElementOptions(index, mode).angle || defaultAngle) : 0;\n  }\n\n}\n\nPolarAreaController.id = 'polarArea';\nPolarAreaController.defaults = {\n  dataElementType: 'arc',\n  animation: {\n    animateRotate: true,\n    animateScale: true\n  },\n  animations: {\n    numbers: {\n      type: 'number',\n      properties: ['x', 'y', 'startAngle', 'endAngle', 'innerRadius', 'outerRadius']\n    }\n  },\n  indexAxis: 'r',\n  startAngle: 0\n};\nPolarAreaController.overrides = {\n  aspectRatio: 1,\n  plugins: {\n    legend: {\n      labels: {\n        generateLabels(chart) {\n          const data = chart.data;\n\n          if (data.labels.length && data.datasets.length) {\n            const pointStyle = chart.legend.options.labels.pointStyle;\n            return data.labels.map((label, i) => {\n              const meta = chart.getDatasetMeta(0);\n              const style = meta.controller.getStyle(i);\n              return {\n                text: label,\n                fillStyle: style.backgroundColor,\n                strokeStyle: style.borderColor,\n                lineWidth: style.borderWidth,\n                pointStyle: pointStyle,\n                hidden: !chart.getDataVisibility(i),\n                index: i\n              };\n            });\n          }\n\n          return [];\n        }\n\n      },\n\n      onClick(e, legendItem, legend) {\n        legend.chart.toggleDataVisibility(legendItem.index);\n        legend.chart.update();\n      }\n\n    },\n    tooltip: {\n      callbacks: {\n        title() {\n          return '';\n        },\n\n        label(context) {\n          return context.chart.data.labels[context.dataIndex] + ': ' + context.formattedValue;\n        }\n\n      }\n    }\n  },\n  scales: {\n    r: {\n      type: 'radialLinear',\n      angleLines: {\n        display: false\n      },\n      beginAtZero: true,\n      grid: {\n        circular: true\n      },\n      pointLabels: {\n        display: false\n      },\n      startAngle: 0\n    }\n  }\n};\n\nclass PieController extends DoughnutController {}\n\nPieController.id = 'pie';\nPieController.defaults = {\n  cutout: 0,\n  rotation: 0,\n  circumference: 360,\n  radius: '100%'\n};\n\nclass RadarController extends DatasetController {\n  getLabelAndValue(index) {\n    const vScale = this._cachedMeta.vScale;\n    const parsed = this.getParsed(index);\n    return {\n      label: vScale.getLabels()[index],\n      value: '' + vScale.getLabelForValue(parsed[vScale.axis])\n    };\n  }\n\n  parseObjectData(meta, data, start, count) {\n    return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n  }\n\n  update(mode) {\n    const meta = this._cachedMeta;\n    const line = meta.dataset;\n    const points = meta.data || [];\n    const labels = meta.iScale.getLabels();\n    line.points = points;\n\n    if (mode !== 'resize') {\n      const options = this.resolveDatasetElementOptions(mode);\n\n      if (!this.options.showLine) {\n        options.borderWidth = 0;\n      }\n\n      const properties = {\n        _loop: true,\n        _fullLoop: labels.length === points.length,\n        options\n      };\n      this.updateElement(line, undefined, properties, mode);\n    }\n\n    this.updateElements(points, 0, points.length, mode);\n  }\n\n  updateElements(points, start, count, mode) {\n    const scale = this._cachedMeta.rScale;\n    const reset = mode === 'reset';\n\n    for (let i = start; i < start + count; i++) {\n      const point = points[i];\n      const options = this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n      const pointPosition = scale.getPointPositionForValue(i, this.getParsed(i).r);\n      const x = reset ? scale.xCenter : pointPosition.x;\n      const y = reset ? scale.yCenter : pointPosition.y;\n      const properties = {\n        x,\n        y,\n        angle: pointPosition.angle,\n        skip: isNaN(x) || isNaN(y),\n        options\n      };\n      this.updateElement(point, i, properties, mode);\n    }\n  }\n\n}\n\nRadarController.id = 'radar';\nRadarController.defaults = {\n  datasetElementType: 'line',\n  dataElementType: 'point',\n  indexAxis: 'r',\n  showLine: true,\n  elements: {\n    line: {\n      fill: 'start'\n    }\n  }\n};\nRadarController.overrides = {\n  aspectRatio: 1,\n  scales: {\n    r: {\n      type: 'radialLinear'\n    }\n  }\n};\n\nclass Element {\n  constructor() {\n    this.x = undefined;\n    this.y = undefined;\n    this.active = false;\n    this.options = undefined;\n    this.$animations = undefined;\n  }\n\n  tooltipPosition(useFinalPosition) {\n    const _this$getProps = this.getProps(['x', 'y'], useFinalPosition),\n          x = _this$getProps.x,\n          y = _this$getProps.y;\n\n    return {\n      x,\n      y\n    };\n  }\n\n  hasValue() {\n    return isNumber(this.x) && isNumber(this.y);\n  }\n\n  getProps(props, final) {\n    const anims = this.$animations;\n\n    if (!final || !anims) {\n      return this;\n    }\n\n    const ret = {};\n    props.forEach(prop => {\n      ret[prop] = anims[prop] && anims[prop].active() ? anims[prop]._to : this[prop];\n    });\n    return ret;\n  }\n\n}\n\nElement.defaults = {};\nElement.defaultRoutes = undefined;\nconst formatters = {\n  values(value) {\n    return isArray(value) ? value : '' + value;\n  },\n\n  numeric(tickValue, index, ticks) {\n    if (tickValue === 0) {\n      return '0';\n    }\n\n    const locale = this.chart.options.locale;\n    let notation;\n    let delta = tickValue;\n\n    if (ticks.length > 1) {\n      const maxTick = Math.max(Math.abs(ticks[0].value), Math.abs(ticks[ticks.length - 1].value));\n\n      if (maxTick < 1e-4 || maxTick > 1e+15) {\n        notation = 'scientific';\n      }\n\n      delta = calculateDelta(tickValue, ticks);\n    }\n\n    const logDelta = log10(Math.abs(delta));\n    const numDecimal = Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);\n    const options = {\n      notation,\n      minimumFractionDigits: numDecimal,\n      maximumFractionDigits: numDecimal\n    };\n    Object.assign(options, this.options.ticks.format);\n    return formatNumber(tickValue, locale, options);\n  },\n\n  logarithmic(tickValue, index, ticks) {\n    if (tickValue === 0) {\n      return '0';\n    }\n\n    const remain = tickValue / Math.pow(10, Math.floor(log10(tickValue)));\n\n    if (remain === 1 || remain === 2 || remain === 5) {\n      return formatters.numeric.call(this, tickValue, index, ticks);\n    }\n\n    return '';\n  }\n\n};\n\nfunction calculateDelta(tickValue, ticks) {\n  let delta = ticks.length > 3 ? ticks[2].value - ticks[1].value : ticks[1].value - ticks[0].value;\n\n  if (Math.abs(delta) >= 1 && tickValue !== Math.floor(tickValue)) {\n    delta = tickValue - Math.floor(tickValue);\n  }\n\n  return delta;\n}\n\nvar Ticks = {\n  formatters\n};\ndefaults.set('scale', {\n  display: true,\n  offset: false,\n  reverse: false,\n  beginAtZero: false,\n  bounds: 'ticks',\n  grace: 0,\n  grid: {\n    display: true,\n    lineWidth: 1,\n    drawBorder: true,\n    drawOnChartArea: true,\n    drawTicks: true,\n    tickLength: 8,\n    tickWidth: (_ctx, options) => options.lineWidth,\n    tickColor: (_ctx, options) => options.color,\n    offset: false,\n    borderDash: [],\n    borderDashOffset: 0.0,\n    borderWidth: 1\n  },\n  title: {\n    display: false,\n    text: '',\n    padding: {\n      top: 4,\n      bottom: 4\n    }\n  },\n  ticks: {\n    minRotation: 0,\n    maxRotation: 50,\n    mirror: false,\n    textStrokeWidth: 0,\n    textStrokeColor: '',\n    padding: 3,\n    display: true,\n    autoSkip: true,\n    autoSkipPadding: 3,\n    labelOffset: 0,\n    callback: Ticks.formatters.values,\n    minor: {},\n    major: {},\n    align: 'center',\n    crossAlign: 'near',\n    showLabelBackdrop: false,\n    backdropColor: 'rgba(255, 255, 255, 0.75)',\n    backdropPadding: 2\n  }\n});\ndefaults.route('scale.ticks', 'color', '', 'color');\ndefaults.route('scale.grid', 'color', '', 'borderColor');\ndefaults.route('scale.grid', 'borderColor', '', 'borderColor');\ndefaults.route('scale.title', 'color', '', 'color');\ndefaults.describe('scale', {\n  _fallback: false,\n  _scriptable: name => !name.startsWith('before') && !name.startsWith('after') && name !== 'callback' && name !== 'parser',\n  _indexable: name => name !== 'borderDash' && name !== 'tickBorderDash'\n});\ndefaults.describe('scales', {\n  _fallback: 'scale'\n});\ndefaults.describe('scale.ticks', {\n  _scriptable: name => name !== 'backdropPadding' && name !== 'callback',\n  _indexable: name => name !== 'backdropPadding'\n});\n\nfunction autoSkip(scale, ticks) {\n  const tickOpts = scale.options.ticks;\n  const ticksLimit = tickOpts.maxTicksLimit || determineMaxTicks(scale);\n  const majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];\n  const numMajorIndices = majorIndices.length;\n  const first = majorIndices[0];\n  const last = majorIndices[numMajorIndices - 1];\n  const newTicks = [];\n\n  if (numMajorIndices > ticksLimit) {\n    skipMajors(ticks, newTicks, majorIndices, numMajorIndices / ticksLimit);\n    return newTicks;\n  }\n\n  const spacing = calculateSpacing(majorIndices, ticks, ticksLimit);\n\n  if (numMajorIndices > 0) {\n    let i, ilen;\n    const avgMajorSpacing = numMajorIndices > 1 ? Math.round((last - first) / (numMajorIndices - 1)) : null;\n    skip(ticks, newTicks, spacing, isNullOrUndef(avgMajorSpacing) ? 0 : first - avgMajorSpacing, first);\n\n    for (i = 0, ilen = numMajorIndices - 1; i < ilen; i++) {\n      skip(ticks, newTicks, spacing, majorIndices[i], majorIndices[i + 1]);\n    }\n\n    skip(ticks, newTicks, spacing, last, isNullOrUndef(avgMajorSpacing) ? ticks.length : last + avgMajorSpacing);\n    return newTicks;\n  }\n\n  skip(ticks, newTicks, spacing);\n  return newTicks;\n}\n\nfunction determineMaxTicks(scale) {\n  const offset = scale.options.offset;\n\n  const tickLength = scale._tickSize();\n\n  const maxScale = scale._length / tickLength + (offset ? 0 : 1);\n  const maxChart = scale._maxLength / tickLength;\n  return Math.floor(Math.min(maxScale, maxChart));\n}\n\nfunction calculateSpacing(majorIndices, ticks, ticksLimit) {\n  const evenMajorSpacing = getEvenSpacing(majorIndices);\n  const spacing = ticks.length / ticksLimit;\n\n  if (!evenMajorSpacing) {\n    return Math.max(spacing, 1);\n  }\n\n  const factors = _factorize(evenMajorSpacing);\n\n  for (let i = 0, ilen = factors.length - 1; i < ilen; i++) {\n    const factor = factors[i];\n\n    if (factor > spacing) {\n      return factor;\n    }\n  }\n\n  return Math.max(spacing, 1);\n}\n\nfunction getMajorIndices(ticks) {\n  const result = [];\n  let i, ilen;\n\n  for (i = 0, ilen = ticks.length; i < ilen; i++) {\n    if (ticks[i].major) {\n      result.push(i);\n    }\n  }\n\n  return result;\n}\n\nfunction skipMajors(ticks, newTicks, majorIndices, spacing) {\n  let count = 0;\n  let next = majorIndices[0];\n  let i;\n  spacing = Math.ceil(spacing);\n\n  for (i = 0; i < ticks.length; i++) {\n    if (i === next) {\n      newTicks.push(ticks[i]);\n      count++;\n      next = majorIndices[count * spacing];\n    }\n  }\n}\n\nfunction skip(ticks, newTicks, spacing, majorStart, majorEnd) {\n  const start = valueOrDefault(majorStart, 0);\n  const end = Math.min(valueOrDefault(majorEnd, ticks.length), ticks.length);\n  let count = 0;\n  let length, i, next;\n  spacing = Math.ceil(spacing);\n\n  if (majorEnd) {\n    length = majorEnd - majorStart;\n    spacing = length / Math.floor(length / spacing);\n  }\n\n  next = start;\n\n  while (next < 0) {\n    count++;\n    next = Math.round(start + count * spacing);\n  }\n\n  for (i = Math.max(start, 0); i < end; i++) {\n    if (i === next) {\n      newTicks.push(ticks[i]);\n      count++;\n      next = Math.round(start + count * spacing);\n    }\n  }\n}\n\nfunction getEvenSpacing(arr) {\n  const len = arr.length;\n  let i, diff;\n\n  if (len < 2) {\n    return false;\n  }\n\n  for (diff = arr[0], i = 1; i < len; ++i) {\n    if (arr[i] - arr[i - 1] !== diff) {\n      return false;\n    }\n  }\n\n  return diff;\n}\n\nconst reverseAlign = align => align === 'left' ? 'right' : align === 'right' ? 'left' : align;\n\nconst offsetFromEdge = (scale, edge, offset) => edge === 'top' || edge === 'left' ? scale[edge] + offset : scale[edge] - offset;\n\nfunction sample(arr, numItems) {\n  const result = [];\n  const increment = arr.length / numItems;\n  const len = arr.length;\n  let i = 0;\n\n  for (; i < len; i += increment) {\n    result.push(arr[Math.floor(i)]);\n  }\n\n  return result;\n}\n\nfunction getPixelForGridLine(scale, index, offsetGridLines) {\n  const length = scale.ticks.length;\n  const validIndex = Math.min(index, length - 1);\n  const start = scale._startPixel;\n  const end = scale._endPixel;\n  const epsilon = 1e-6;\n  let lineValue = scale.getPixelForTick(validIndex);\n  let offset;\n\n  if (offsetGridLines) {\n    if (length === 1) {\n      offset = Math.max(lineValue - start, end - lineValue);\n    } else if (index === 0) {\n      offset = (scale.getPixelForTick(1) - lineValue) / 2;\n    } else {\n      offset = (lineValue - scale.getPixelForTick(validIndex - 1)) / 2;\n    }\n\n    lineValue += validIndex < index ? offset : -offset;\n\n    if (lineValue < start - epsilon || lineValue > end + epsilon) {\n      return;\n    }\n  }\n\n  return lineValue;\n}\n\nfunction garbageCollect(caches, length) {\n  each(caches, cache => {\n    const gc = cache.gc;\n    const gcLen = gc.length / 2;\n    let i;\n\n    if (gcLen > length) {\n      for (i = 0; i < gcLen; ++i) {\n        delete cache.data[gc[i]];\n      }\n\n      gc.splice(0, gcLen);\n    }\n  });\n}\n\nfunction getTickMarkLength(options) {\n  return options.drawTicks ? options.tickLength : 0;\n}\n\nfunction getTitleHeight(options, fallback) {\n  if (!options.display) {\n    return 0;\n  }\n\n  const font = toFont(options.font, fallback);\n  const padding = toPadding(options.padding);\n  const lines = isArray(options.text) ? options.text.length : 1;\n  return lines * font.lineHeight + padding.height;\n}\n\nfunction createScaleContext(parent, scale) {\n  return createContext(parent, {\n    scale,\n    type: 'scale'\n  });\n}\n\nfunction createTickContext(parent, index, tick) {\n  return createContext(parent, {\n    tick,\n    index,\n    type: 'tick'\n  });\n}\n\nfunction titleAlign(align, position, reverse) {\n  let ret = _toLeftRightCenter(align);\n\n  if (reverse && position !== 'right' || !reverse && position === 'right') {\n    ret = reverseAlign(ret);\n  }\n\n  return ret;\n}\n\nfunction titleArgs(scale, offset, position, align) {\n  const top = scale.top,\n        left = scale.left,\n        bottom = scale.bottom,\n        right = scale.right,\n        chart = scale.chart;\n  const chartArea = chart.chartArea,\n        scales = chart.scales;\n  let rotation = 0;\n  let maxWidth, titleX, titleY;\n  const height = bottom - top;\n  const width = right - left;\n\n  if (scale.isHorizontal()) {\n    titleX = _alignStartEnd(align, left, right);\n\n    if (isObject(position)) {\n      const positionAxisID = Object.keys(position)[0];\n      const value = position[positionAxisID];\n      titleY = scales[positionAxisID].getPixelForValue(value) + height - offset;\n    } else if (position === 'center') {\n      titleY = (chartArea.bottom + chartArea.top) / 2 + height - offset;\n    } else {\n      titleY = offsetFromEdge(scale, position, offset);\n    }\n\n    maxWidth = right - left;\n  } else {\n    if (isObject(position)) {\n      const positionAxisID = Object.keys(position)[0];\n      const value = position[positionAxisID];\n      titleX = scales[positionAxisID].getPixelForValue(value) - width + offset;\n    } else if (position === 'center') {\n      titleX = (chartArea.left + chartArea.right) / 2 - width + offset;\n    } else {\n      titleX = offsetFromEdge(scale, position, offset);\n    }\n\n    titleY = _alignStartEnd(align, bottom, top);\n    rotation = position === 'left' ? -HALF_PI : HALF_PI;\n  }\n\n  return {\n    titleX,\n    titleY,\n    maxWidth,\n    rotation\n  };\n}\n\nclass Scale extends Element {\n  constructor(cfg) {\n    super();\n    this.id = cfg.id;\n    this.type = cfg.type;\n    this.options = undefined;\n    this.ctx = cfg.ctx;\n    this.chart = cfg.chart;\n    this.top = undefined;\n    this.bottom = undefined;\n    this.left = undefined;\n    this.right = undefined;\n    this.width = undefined;\n    this.height = undefined;\n    this._margins = {\n      left: 0,\n      right: 0,\n      top: 0,\n      bottom: 0\n    };\n    this.maxWidth = undefined;\n    this.maxHeight = undefined;\n    this.paddingTop = undefined;\n    this.paddingBottom = undefined;\n    this.paddingLeft = undefined;\n    this.paddingRight = undefined;\n    this.axis = undefined;\n    this.labelRotation = undefined;\n    this.min = undefined;\n    this.max = undefined;\n    this._range = undefined;\n    this.ticks = [];\n    this._gridLineItems = null;\n    this._labelItems = null;\n    this._labelSizes = null;\n    this._length = 0;\n    this._maxLength = 0;\n    this._longestTextCache = {};\n    this._startPixel = undefined;\n    this._endPixel = undefined;\n    this._reversePixels = false;\n    this._userMax = undefined;\n    this._userMin = undefined;\n    this._suggestedMax = undefined;\n    this._suggestedMin = undefined;\n    this._ticksLength = 0;\n    this._borderValue = 0;\n    this._cache = {};\n    this._dataLimitsCached = false;\n    this.$context = undefined;\n  }\n\n  init(options) {\n    this.options = options.setContext(this.getContext());\n    this.axis = options.axis;\n    this._userMin = this.parse(options.min);\n    this._userMax = this.parse(options.max);\n    this._suggestedMin = this.parse(options.suggestedMin);\n    this._suggestedMax = this.parse(options.suggestedMax);\n  }\n\n  parse(raw, index) {\n    return raw;\n  }\n\n  getUserBounds() {\n    let _userMin = this._userMin,\n        _userMax = this._userMax,\n        _suggestedMin = this._suggestedMin,\n        _suggestedMax = this._suggestedMax;\n    _userMin = finiteOrDefault(_userMin, Number.POSITIVE_INFINITY);\n    _userMax = finiteOrDefault(_userMax, Number.NEGATIVE_INFINITY);\n    _suggestedMin = finiteOrDefault(_suggestedMin, Number.POSITIVE_INFINITY);\n    _suggestedMax = finiteOrDefault(_suggestedMax, Number.NEGATIVE_INFINITY);\n    return {\n      min: finiteOrDefault(_userMin, _suggestedMin),\n      max: finiteOrDefault(_userMax, _suggestedMax),\n      minDefined: isNumberFinite(_userMin),\n      maxDefined: isNumberFinite(_userMax)\n    };\n  }\n\n  getMinMax(canStack) {\n    let _this$getUserBounds = this.getUserBounds(),\n        min = _this$getUserBounds.min,\n        max = _this$getUserBounds.max,\n        minDefined = _this$getUserBounds.minDefined,\n        maxDefined = _this$getUserBounds.maxDefined;\n\n    let range;\n\n    if (minDefined && maxDefined) {\n      return {\n        min,\n        max\n      };\n    }\n\n    const metas = this.getMatchingVisibleMetas();\n\n    for (let i = 0, ilen = metas.length; i < ilen; ++i) {\n      range = metas[i].controller.getMinMax(this, canStack);\n\n      if (!minDefined) {\n        min = Math.min(min, range.min);\n      }\n\n      if (!maxDefined) {\n        max = Math.max(max, range.max);\n      }\n    }\n\n    min = maxDefined && min > max ? max : min;\n    max = minDefined && min > max ? min : max;\n    return {\n      min: finiteOrDefault(min, finiteOrDefault(max, min)),\n      max: finiteOrDefault(max, finiteOrDefault(min, max))\n    };\n  }\n\n  getPadding() {\n    return {\n      left: this.paddingLeft || 0,\n      top: this.paddingTop || 0,\n      right: this.paddingRight || 0,\n      bottom: this.paddingBottom || 0\n    };\n  }\n\n  getTicks() {\n    return this.ticks;\n  }\n\n  getLabels() {\n    const data = this.chart.data;\n    return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];\n  }\n\n  beforeLayout() {\n    this._cache = {};\n    this._dataLimitsCached = false;\n  }\n\n  beforeUpdate() {\n    callback(this.options.beforeUpdate, [this]);\n  }\n\n  update(maxWidth, maxHeight, margins) {\n    const _this$options3 = this.options,\n          beginAtZero = _this$options3.beginAtZero,\n          grace = _this$options3.grace,\n          tickOpts = _this$options3.ticks;\n    const sampleSize = tickOpts.sampleSize;\n    this.beforeUpdate();\n    this.maxWidth = maxWidth;\n    this.maxHeight = maxHeight;\n    this._margins = margins = Object.assign({\n      left: 0,\n      right: 0,\n      top: 0,\n      bottom: 0\n    }, margins);\n    this.ticks = null;\n    this._labelSizes = null;\n    this._gridLineItems = null;\n    this._labelItems = null;\n    this.beforeSetDimensions();\n    this.setDimensions();\n    this.afterSetDimensions();\n    this._maxLength = this.isHorizontal() ? this.width + margins.left + margins.right : this.height + margins.top + margins.bottom;\n\n    if (!this._dataLimitsCached) {\n      this.beforeDataLimits();\n      this.determineDataLimits();\n      this.afterDataLimits();\n      this._range = _addGrace(this, grace, beginAtZero);\n      this._dataLimitsCached = true;\n    }\n\n    this.beforeBuildTicks();\n    this.ticks = this.buildTicks() || [];\n    this.afterBuildTicks();\n    const samplingEnabled = sampleSize < this.ticks.length;\n\n    this._convertTicksToLabels(samplingEnabled ? sample(this.ticks, sampleSize) : this.ticks);\n\n    this.configure();\n    this.beforeCalculateLabelRotation();\n    this.calculateLabelRotation();\n    this.afterCalculateLabelRotation();\n\n    if (tickOpts.display && (tickOpts.autoSkip || tickOpts.source === 'auto')) {\n      this.ticks = autoSkip(this, this.ticks);\n      this._labelSizes = null;\n      this.afterAutoSkip();\n    }\n\n    if (samplingEnabled) {\n      this._convertTicksToLabels(this.ticks);\n    }\n\n    this.beforeFit();\n    this.fit();\n    this.afterFit();\n    this.afterUpdate();\n  }\n\n  configure() {\n    let reversePixels = this.options.reverse;\n    let startPixel, endPixel;\n\n    if (this.isHorizontal()) {\n      startPixel = this.left;\n      endPixel = this.right;\n    } else {\n      startPixel = this.top;\n      endPixel = this.bottom;\n      reversePixels = !reversePixels;\n    }\n\n    this._startPixel = startPixel;\n    this._endPixel = endPixel;\n    this._reversePixels = reversePixels;\n    this._length = endPixel - startPixel;\n    this._alignToPixels = this.options.alignToPixels;\n  }\n\n  afterUpdate() {\n    callback(this.options.afterUpdate, [this]);\n  }\n\n  beforeSetDimensions() {\n    callback(this.options.beforeSetDimensions, [this]);\n  }\n\n  setDimensions() {\n    if (this.isHorizontal()) {\n      this.width = this.maxWidth;\n      this.left = 0;\n      this.right = this.width;\n    } else {\n      this.height = this.maxHeight;\n      this.top = 0;\n      this.bottom = this.height;\n    }\n\n    this.paddingLeft = 0;\n    this.paddingTop = 0;\n    this.paddingRight = 0;\n    this.paddingBottom = 0;\n  }\n\n  afterSetDimensions() {\n    callback(this.options.afterSetDimensions, [this]);\n  }\n\n  _callHooks(name) {\n    this.chart.notifyPlugins(name, this.getContext());\n    callback(this.options[name], [this]);\n  }\n\n  beforeDataLimits() {\n    this._callHooks('beforeDataLimits');\n  }\n\n  determineDataLimits() {}\n\n  afterDataLimits() {\n    this._callHooks('afterDataLimits');\n  }\n\n  beforeBuildTicks() {\n    this._callHooks('beforeBuildTicks');\n  }\n\n  buildTicks() {\n    return [];\n  }\n\n  afterBuildTicks() {\n    this._callHooks('afterBuildTicks');\n  }\n\n  beforeTickToLabelConversion() {\n    callback(this.options.beforeTickToLabelConversion, [this]);\n  }\n\n  generateTickLabels(ticks) {\n    const tickOpts = this.options.ticks;\n    let i, ilen, tick;\n\n    for (i = 0, ilen = ticks.length; i < ilen; i++) {\n      tick = ticks[i];\n      tick.label = callback(tickOpts.callback, [tick.value, i, ticks], this);\n    }\n  }\n\n  afterTickToLabelConversion() {\n    callback(this.options.afterTickToLabelConversion, [this]);\n  }\n\n  beforeCalculateLabelRotation() {\n    callback(this.options.beforeCalculateLabelRotation, [this]);\n  }\n\n  calculateLabelRotation() {\n    const options = this.options;\n    const tickOpts = options.ticks;\n    const numTicks = this.ticks.length;\n    const minRotation = tickOpts.minRotation || 0;\n    const maxRotation = tickOpts.maxRotation;\n    let labelRotation = minRotation;\n    let tickWidth, maxHeight, maxLabelDiagonal;\n\n    if (!this._isVisible() || !tickOpts.display || minRotation >= maxRotation || numTicks <= 1 || !this.isHorizontal()) {\n      this.labelRotation = minRotation;\n      return;\n    }\n\n    const labelSizes = this._getLabelSizes();\n\n    const maxLabelWidth = labelSizes.widest.width;\n    const maxLabelHeight = labelSizes.highest.height;\n\n    const maxWidth = _limitValue(this.chart.width - maxLabelWidth, 0, this.maxWidth);\n\n    tickWidth = options.offset ? this.maxWidth / numTicks : maxWidth / (numTicks - 1);\n\n    if (maxLabelWidth + 6 > tickWidth) {\n      tickWidth = maxWidth / (numTicks - (options.offset ? 0.5 : 1));\n      maxHeight = this.maxHeight - getTickMarkLength(options.grid) - tickOpts.padding - getTitleHeight(options.title, this.chart.options.font);\n      maxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);\n      labelRotation = toDegrees(Math.min(Math.asin(_limitValue((labelSizes.highest.height + 6) / tickWidth, -1, 1)), Math.asin(_limitValue(maxHeight / maxLabelDiagonal, -1, 1)) - Math.asin(_limitValue(maxLabelHeight / maxLabelDiagonal, -1, 1))));\n      labelRotation = Math.max(minRotation, Math.min(maxRotation, labelRotation));\n    }\n\n    this.labelRotation = labelRotation;\n  }\n\n  afterCalculateLabelRotation() {\n    callback(this.options.afterCalculateLabelRotation, [this]);\n  }\n\n  afterAutoSkip() {}\n\n  beforeFit() {\n    callback(this.options.beforeFit, [this]);\n  }\n\n  fit() {\n    const minSize = {\n      width: 0,\n      height: 0\n    };\n    const chart = this.chart,\n          _this$options4 = this.options,\n          tickOpts = _this$options4.ticks,\n          titleOpts = _this$options4.title,\n          gridOpts = _this$options4.grid;\n\n    const display = this._isVisible();\n\n    const isHorizontal = this.isHorizontal();\n\n    if (display) {\n      const titleHeight = getTitleHeight(titleOpts, chart.options.font);\n\n      if (isHorizontal) {\n        minSize.width = this.maxWidth;\n        minSize.height = getTickMarkLength(gridOpts) + titleHeight;\n      } else {\n        minSize.height = this.maxHeight;\n        minSize.width = getTickMarkLength(gridOpts) + titleHeight;\n      }\n\n      if (tickOpts.display && this.ticks.length) {\n        const _this$_getLabelSizes = this._getLabelSizes(),\n              first = _this$_getLabelSizes.first,\n              last = _this$_getLabelSizes.last,\n              widest = _this$_getLabelSizes.widest,\n              highest = _this$_getLabelSizes.highest;\n\n        const tickPadding = tickOpts.padding * 2;\n        const angleRadians = toRadians(this.labelRotation);\n        const cos = Math.cos(angleRadians);\n        const sin = Math.sin(angleRadians);\n\n        if (isHorizontal) {\n          const labelHeight = tickOpts.mirror ? 0 : sin * widest.width + cos * highest.height;\n          minSize.height = Math.min(this.maxHeight, minSize.height + labelHeight + tickPadding);\n        } else {\n          const labelWidth = tickOpts.mirror ? 0 : cos * widest.width + sin * highest.height;\n          minSize.width = Math.min(this.maxWidth, minSize.width + labelWidth + tickPadding);\n        }\n\n        this._calculatePadding(first, last, sin, cos);\n      }\n    }\n\n    this._handleMargins();\n\n    if (isHorizontal) {\n      this.width = this._length = chart.width - this._margins.left - this._margins.right;\n      this.height = minSize.height;\n    } else {\n      this.width = minSize.width;\n      this.height = this._length = chart.height - this._margins.top - this._margins.bottom;\n    }\n  }\n\n  _calculatePadding(first, last, sin, cos) {\n    const _this$options5 = this.options,\n          _this$options5$ticks = _this$options5.ticks,\n          align = _this$options5$ticks.align,\n          padding = _this$options5$ticks.padding,\n          position = _this$options5.position;\n    const isRotated = this.labelRotation !== 0;\n    const labelsBelowTicks = position !== 'top' && this.axis === 'x';\n\n    if (this.isHorizontal()) {\n      const offsetLeft = this.getPixelForTick(0) - this.left;\n      const offsetRight = this.right - this.getPixelForTick(this.ticks.length - 1);\n      let paddingLeft = 0;\n      let paddingRight = 0;\n\n      if (isRotated) {\n        if (labelsBelowTicks) {\n          paddingLeft = cos * first.width;\n          paddingRight = sin * last.height;\n        } else {\n          paddingLeft = sin * first.height;\n          paddingRight = cos * last.width;\n        }\n      } else if (align === 'start') {\n        paddingRight = last.width;\n      } else if (align === 'end') {\n        paddingLeft = first.width;\n      } else if (align !== 'inner') {\n        paddingLeft = first.width / 2;\n        paddingRight = last.width / 2;\n      }\n\n      this.paddingLeft = Math.max((paddingLeft - offsetLeft + padding) * this.width / (this.width - offsetLeft), 0);\n      this.paddingRight = Math.max((paddingRight - offsetRight + padding) * this.width / (this.width - offsetRight), 0);\n    } else {\n      let paddingTop = last.height / 2;\n      let paddingBottom = first.height / 2;\n\n      if (align === 'start') {\n        paddingTop = 0;\n        paddingBottom = first.height;\n      } else if (align === 'end') {\n        paddingTop = last.height;\n        paddingBottom = 0;\n      }\n\n      this.paddingTop = paddingTop + padding;\n      this.paddingBottom = paddingBottom + padding;\n    }\n  }\n\n  _handleMargins() {\n    if (this._margins) {\n      this._margins.left = Math.max(this.paddingLeft, this._margins.left);\n      this._margins.top = Math.max(this.paddingTop, this._margins.top);\n      this._margins.right = Math.max(this.paddingRight, this._margins.right);\n      this._margins.bottom = Math.max(this.paddingBottom, this._margins.bottom);\n    }\n  }\n\n  afterFit() {\n    callback(this.options.afterFit, [this]);\n  }\n\n  isHorizontal() {\n    const _this$options6 = this.options,\n          axis = _this$options6.axis,\n          position = _this$options6.position;\n    return position === 'top' || position === 'bottom' || axis === 'x';\n  }\n\n  isFullSize() {\n    return this.options.fullSize;\n  }\n\n  _convertTicksToLabels(ticks) {\n    this.beforeTickToLabelConversion();\n    this.generateTickLabels(ticks);\n    let i, ilen;\n\n    for (i = 0, ilen = ticks.length; i < ilen; i++) {\n      if (isNullOrUndef(ticks[i].label)) {\n        ticks.splice(i, 1);\n        ilen--;\n        i--;\n      }\n    }\n\n    this.afterTickToLabelConversion();\n  }\n\n  _getLabelSizes() {\n    let labelSizes = this._labelSizes;\n\n    if (!labelSizes) {\n      const sampleSize = this.options.ticks.sampleSize;\n      let ticks = this.ticks;\n\n      if (sampleSize < ticks.length) {\n        ticks = sample(ticks, sampleSize);\n      }\n\n      this._labelSizes = labelSizes = this._computeLabelSizes(ticks, ticks.length);\n    }\n\n    return labelSizes;\n  }\n\n  _computeLabelSizes(ticks, length) {\n    const ctx = this.ctx,\n          caches = this._longestTextCache;\n    const widths = [];\n    const heights = [];\n    let widestLabelSize = 0;\n    let highestLabelSize = 0;\n    let i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel;\n\n    for (i = 0; i < length; ++i) {\n      label = ticks[i].label;\n      tickFont = this._resolveTickFontOptions(i);\n      ctx.font = fontString = tickFont.string;\n      cache = caches[fontString] = caches[fontString] || {\n        data: {},\n        gc: []\n      };\n      lineHeight = tickFont.lineHeight;\n      width = height = 0;\n\n      if (!isNullOrUndef(label) && !isArray(label)) {\n        width = _measureText(ctx, cache.data, cache.gc, width, label);\n        height = lineHeight;\n      } else if (isArray(label)) {\n        for (j = 0, jlen = label.length; j < jlen; ++j) {\n          nestedLabel = label[j];\n\n          if (!isNullOrUndef(nestedLabel) && !isArray(nestedLabel)) {\n            width = _measureText(ctx, cache.data, cache.gc, width, nestedLabel);\n            height += lineHeight;\n          }\n        }\n      }\n\n      widths.push(width);\n      heights.push(height);\n      widestLabelSize = Math.max(width, widestLabelSize);\n      highestLabelSize = Math.max(height, highestLabelSize);\n    }\n\n    garbageCollect(caches, length);\n    const widest = widths.indexOf(widestLabelSize);\n    const highest = heights.indexOf(highestLabelSize);\n\n    const valueAt = idx => ({\n      width: widths[idx] || 0,\n      height: heights[idx] || 0\n    });\n\n    return {\n      first: valueAt(0),\n      last: valueAt(length - 1),\n      widest: valueAt(widest),\n      highest: valueAt(highest),\n      widths,\n      heights\n    };\n  }\n\n  getLabelForValue(value) {\n    return value;\n  }\n\n  getPixelForValue(value, index) {\n    return NaN;\n  }\n\n  getValueForPixel(pixel) {}\n\n  getPixelForTick(index) {\n    const ticks = this.ticks;\n\n    if (index < 0 || index > ticks.length - 1) {\n      return null;\n    }\n\n    return this.getPixelForValue(ticks[index].value);\n  }\n\n  getPixelForDecimal(decimal) {\n    if (this._reversePixels) {\n      decimal = 1 - decimal;\n    }\n\n    const pixel = this._startPixel + decimal * this._length;\n    return _int16Range(this._alignToPixels ? _alignPixel(this.chart, pixel, 0) : pixel);\n  }\n\n  getDecimalForPixel(pixel) {\n    const decimal = (pixel - this._startPixel) / this._length;\n    return this._reversePixels ? 1 - decimal : decimal;\n  }\n\n  getBasePixel() {\n    return this.getPixelForValue(this.getBaseValue());\n  }\n\n  getBaseValue() {\n    const min = this.min,\n          max = this.max;\n    return min < 0 && max < 0 ? max : min > 0 && max > 0 ? min : 0;\n  }\n\n  getContext(index) {\n    const ticks = this.ticks || [];\n\n    if (index >= 0 && index < ticks.length) {\n      const tick = ticks[index];\n      return tick.$context || (tick.$context = createTickContext(this.getContext(), index, tick));\n    }\n\n    return this.$context || (this.$context = createScaleContext(this.chart.getContext(), this));\n  }\n\n  _tickSize() {\n    const optionTicks = this.options.ticks;\n    const rot = toRadians(this.labelRotation);\n    const cos = Math.abs(Math.cos(rot));\n    const sin = Math.abs(Math.sin(rot));\n\n    const labelSizes = this._getLabelSizes();\n\n    const padding = optionTicks.autoSkipPadding || 0;\n    const w = labelSizes ? labelSizes.widest.width + padding : 0;\n    const h = labelSizes ? labelSizes.highest.height + padding : 0;\n    return this.isHorizontal() ? h * cos > w * sin ? w / cos : h / sin : h * sin < w * cos ? h / cos : w / sin;\n  }\n\n  _isVisible() {\n    const display = this.options.display;\n\n    if (display !== 'auto') {\n      return !!display;\n    }\n\n    return this.getMatchingVisibleMetas().length > 0;\n  }\n\n  _computeGridLineItems(chartArea) {\n    const axis = this.axis;\n    const chart = this.chart;\n    const options = this.options;\n    const grid = options.grid,\n          position = options.position;\n    const offset = grid.offset;\n    const isHorizontal = this.isHorizontal();\n    const ticks = this.ticks;\n    const ticksLength = ticks.length + (offset ? 1 : 0);\n    const tl = getTickMarkLength(grid);\n    const items = [];\n    const borderOpts = grid.setContext(this.getContext());\n    const axisWidth = borderOpts.drawBorder ? borderOpts.borderWidth : 0;\n    const axisHalfWidth = axisWidth / 2;\n\n    const alignBorderValue = function (pixel) {\n      return _alignPixel(chart, pixel, axisWidth);\n    };\n\n    let borderValue, i, lineValue, alignedLineValue;\n    let tx1, ty1, tx2, ty2, x1, y1, x2, y2;\n\n    if (position === 'top') {\n      borderValue = alignBorderValue(this.bottom);\n      ty1 = this.bottom - tl;\n      ty2 = borderValue - axisHalfWidth;\n      y1 = alignBorderValue(chartArea.top) + axisHalfWidth;\n      y2 = chartArea.bottom;\n    } else if (position === 'bottom') {\n      borderValue = alignBorderValue(this.top);\n      y1 = chartArea.top;\n      y2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;\n      ty1 = borderValue + axisHalfWidth;\n      ty2 = this.top + tl;\n    } else if (position === 'left') {\n      borderValue = alignBorderValue(this.right);\n      tx1 = this.right - tl;\n      tx2 = borderValue - axisHalfWidth;\n      x1 = alignBorderValue(chartArea.left) + axisHalfWidth;\n      x2 = chartArea.right;\n    } else if (position === 'right') {\n      borderValue = alignBorderValue(this.left);\n      x1 = chartArea.left;\n      x2 = alignBorderValue(chartArea.right) - axisHalfWidth;\n      tx1 = borderValue + axisHalfWidth;\n      tx2 = this.left + tl;\n    } else if (axis === 'x') {\n      if (position === 'center') {\n        borderValue = alignBorderValue((chartArea.top + chartArea.bottom) / 2 + 0.5);\n      } else if (isObject(position)) {\n        const positionAxisID = Object.keys(position)[0];\n        const value = position[positionAxisID];\n        borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n      }\n\n      y1 = chartArea.top;\n      y2 = chartArea.bottom;\n      ty1 = borderValue + axisHalfWidth;\n      ty2 = ty1 + tl;\n    } else if (axis === 'y') {\n      if (position === 'center') {\n        borderValue = alignBorderValue((chartArea.left + chartArea.right) / 2);\n      } else if (isObject(position)) {\n        const positionAxisID = Object.keys(position)[0];\n        const value = position[positionAxisID];\n        borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n      }\n\n      tx1 = borderValue - axisHalfWidth;\n      tx2 = tx1 - tl;\n      x1 = chartArea.left;\n      x2 = chartArea.right;\n    }\n\n    const limit = valueOrDefault(options.ticks.maxTicksLimit, ticksLength);\n    const step = Math.max(1, Math.ceil(ticksLength / limit));\n\n    for (i = 0; i < ticksLength; i += step) {\n      const optsAtIndex = grid.setContext(this.getContext(i));\n      const lineWidth = optsAtIndex.lineWidth;\n      const lineColor = optsAtIndex.color;\n      const borderDash = optsAtIndex.borderDash || [];\n      const borderDashOffset = optsAtIndex.borderDashOffset;\n      const tickWidth = optsAtIndex.tickWidth;\n      const tickColor = optsAtIndex.tickColor;\n      const tickBorderDash = optsAtIndex.tickBorderDash || [];\n      const tickBorderDashOffset = optsAtIndex.tickBorderDashOffset;\n      lineValue = getPixelForGridLine(this, i, offset);\n\n      if (lineValue === undefined) {\n        continue;\n      }\n\n      alignedLineValue = _alignPixel(chart, lineValue, lineWidth);\n\n      if (isHorizontal) {\n        tx1 = tx2 = x1 = x2 = alignedLineValue;\n      } else {\n        ty1 = ty2 = y1 = y2 = alignedLineValue;\n      }\n\n      items.push({\n        tx1,\n        ty1,\n        tx2,\n        ty2,\n        x1,\n        y1,\n        x2,\n        y2,\n        width: lineWidth,\n        color: lineColor,\n        borderDash,\n        borderDashOffset,\n        tickWidth,\n        tickColor,\n        tickBorderDash,\n        tickBorderDashOffset\n      });\n    }\n\n    this._ticksLength = ticksLength;\n    this._borderValue = borderValue;\n    return items;\n  }\n\n  _computeLabelItems(chartArea) {\n    const axis = this.axis;\n    const options = this.options;\n    const position = options.position,\n          optionTicks = options.ticks;\n    const isHorizontal = this.isHorizontal();\n    const ticks = this.ticks;\n    const align = optionTicks.align,\n          crossAlign = optionTicks.crossAlign,\n          padding = optionTicks.padding,\n          mirror = optionTicks.mirror;\n    const tl = getTickMarkLength(options.grid);\n    const tickAndPadding = tl + padding;\n    const hTickAndPadding = mirror ? -padding : tickAndPadding;\n    const rotation = -toRadians(this.labelRotation);\n    const items = [];\n    let i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;\n    let textBaseline = 'middle';\n\n    if (position === 'top') {\n      y = this.bottom - hTickAndPadding;\n      textAlign = this._getXAxisLabelAlignment();\n    } else if (position === 'bottom') {\n      y = this.top + hTickAndPadding;\n      textAlign = this._getXAxisLabelAlignment();\n    } else if (position === 'left') {\n      const ret = this._getYAxisLabelAlignment(tl);\n\n      textAlign = ret.textAlign;\n      x = ret.x;\n    } else if (position === 'right') {\n      const ret = this._getYAxisLabelAlignment(tl);\n\n      textAlign = ret.textAlign;\n      x = ret.x;\n    } else if (axis === 'x') {\n      if (position === 'center') {\n        y = (chartArea.top + chartArea.bottom) / 2 + tickAndPadding;\n      } else if (isObject(position)) {\n        const positionAxisID = Object.keys(position)[0];\n        const value = position[positionAxisID];\n        y = this.chart.scales[positionAxisID].getPixelForValue(value) + tickAndPadding;\n      }\n\n      textAlign = this._getXAxisLabelAlignment();\n    } else if (axis === 'y') {\n      if (position === 'center') {\n        x = (chartArea.left + chartArea.right) / 2 - tickAndPadding;\n      } else if (isObject(position)) {\n        const positionAxisID = Object.keys(position)[0];\n        const value = position[positionAxisID];\n        x = this.chart.scales[positionAxisID].getPixelForValue(value);\n      }\n\n      textAlign = this._getYAxisLabelAlignment(tl).textAlign;\n    }\n\n    if (axis === 'y') {\n      if (align === 'start') {\n        textBaseline = 'top';\n      } else if (align === 'end') {\n        textBaseline = 'bottom';\n      }\n    }\n\n    const labelSizes = this._getLabelSizes();\n\n    for (i = 0, ilen = ticks.length; i < ilen; ++i) {\n      tick = ticks[i];\n      label = tick.label;\n      const optsAtIndex = optionTicks.setContext(this.getContext(i));\n      pixel = this.getPixelForTick(i) + optionTicks.labelOffset;\n      font = this._resolveTickFontOptions(i);\n      lineHeight = font.lineHeight;\n      lineCount = isArray(label) ? label.length : 1;\n      const halfCount = lineCount / 2;\n      const color = optsAtIndex.color;\n      const strokeColor = optsAtIndex.textStrokeColor;\n      const strokeWidth = optsAtIndex.textStrokeWidth;\n      let tickTextAlign = textAlign;\n\n      if (isHorizontal) {\n        x = pixel;\n\n        if (textAlign === 'inner') {\n          if (i === ilen - 1) {\n            tickTextAlign = !this.options.reverse ? 'right' : 'left';\n          } else if (i === 0) {\n            tickTextAlign = !this.options.reverse ? 'left' : 'right';\n          } else {\n            tickTextAlign = 'center';\n          }\n        }\n\n        if (position === 'top') {\n          if (crossAlign === 'near' || rotation !== 0) {\n            textOffset = -lineCount * lineHeight + lineHeight / 2;\n          } else if (crossAlign === 'center') {\n            textOffset = -labelSizes.highest.height / 2 - halfCount * lineHeight + lineHeight;\n          } else {\n            textOffset = -labelSizes.highest.height + lineHeight / 2;\n          }\n        } else {\n          if (crossAlign === 'near' || rotation !== 0) {\n            textOffset = lineHeight / 2;\n          } else if (crossAlign === 'center') {\n            textOffset = labelSizes.highest.height / 2 - halfCount * lineHeight;\n          } else {\n            textOffset = labelSizes.highest.height - lineCount * lineHeight;\n          }\n        }\n\n        if (mirror) {\n          textOffset *= -1;\n        }\n      } else {\n        y = pixel;\n        textOffset = (1 - lineCount) * lineHeight / 2;\n      }\n\n      let backdrop;\n\n      if (optsAtIndex.showLabelBackdrop) {\n        const labelPadding = toPadding(optsAtIndex.backdropPadding);\n        const height = labelSizes.heights[i];\n        const width = labelSizes.widths[i];\n        let top = y + textOffset - labelPadding.top;\n        let left = x - labelPadding.left;\n\n        switch (textBaseline) {\n          case 'middle':\n            top -= height / 2;\n            break;\n\n          case 'bottom':\n            top -= height;\n            break;\n        }\n\n        switch (textAlign) {\n          case 'center':\n            left -= width / 2;\n            break;\n\n          case 'right':\n            left -= width;\n            break;\n        }\n\n        backdrop = {\n          left,\n          top,\n          width: width + labelPadding.width,\n          height: height + labelPadding.height,\n          color: optsAtIndex.backdropColor\n        };\n      }\n\n      items.push({\n        rotation,\n        label,\n        font,\n        color,\n        strokeColor,\n        strokeWidth,\n        textOffset,\n        textAlign: tickTextAlign,\n        textBaseline,\n        translation: [x, y],\n        backdrop\n      });\n    }\n\n    return items;\n  }\n\n  _getXAxisLabelAlignment() {\n    const _this$options7 = this.options,\n          position = _this$options7.position,\n          ticks = _this$options7.ticks;\n    const rotation = -toRadians(this.labelRotation);\n\n    if (rotation) {\n      return position === 'top' ? 'left' : 'right';\n    }\n\n    let align = 'center';\n\n    if (ticks.align === 'start') {\n      align = 'left';\n    } else if (ticks.align === 'end') {\n      align = 'right';\n    } else if (ticks.align === 'inner') {\n      align = 'inner';\n    }\n\n    return align;\n  }\n\n  _getYAxisLabelAlignment(tl) {\n    const _this$options8 = this.options,\n          position = _this$options8.position,\n          _this$options8$ticks = _this$options8.ticks,\n          crossAlign = _this$options8$ticks.crossAlign,\n          mirror = _this$options8$ticks.mirror,\n          padding = _this$options8$ticks.padding;\n\n    const labelSizes = this._getLabelSizes();\n\n    const tickAndPadding = tl + padding;\n    const widest = labelSizes.widest.width;\n    let textAlign;\n    let x;\n\n    if (position === 'left') {\n      if (mirror) {\n        x = this.right + padding;\n\n        if (crossAlign === 'near') {\n          textAlign = 'left';\n        } else if (crossAlign === 'center') {\n          textAlign = 'center';\n          x += widest / 2;\n        } else {\n          textAlign = 'right';\n          x += widest;\n        }\n      } else {\n        x = this.right - tickAndPadding;\n\n        if (crossAlign === 'near') {\n          textAlign = 'right';\n        } else if (crossAlign === 'center') {\n          textAlign = 'center';\n          x -= widest / 2;\n        } else {\n          textAlign = 'left';\n          x = this.left;\n        }\n      }\n    } else if (position === 'right') {\n      if (mirror) {\n        x = this.left + padding;\n\n        if (crossAlign === 'near') {\n          textAlign = 'right';\n        } else if (crossAlign === 'center') {\n          textAlign = 'center';\n          x -= widest / 2;\n        } else {\n          textAlign = 'left';\n          x -= widest;\n        }\n      } else {\n        x = this.left + tickAndPadding;\n\n        if (crossAlign === 'near') {\n          textAlign = 'left';\n        } else if (crossAlign === 'center') {\n          textAlign = 'center';\n          x += widest / 2;\n        } else {\n          textAlign = 'right';\n          x = this.right;\n        }\n      }\n    } else {\n      textAlign = 'right';\n    }\n\n    return {\n      textAlign,\n      x\n    };\n  }\n\n  _computeLabelArea() {\n    if (this.options.ticks.mirror) {\n      return;\n    }\n\n    const chart = this.chart;\n    const position = this.options.position;\n\n    if (position === 'left' || position === 'right') {\n      return {\n        top: 0,\n        left: this.left,\n        bottom: chart.height,\n        right: this.right\n      };\n    }\n\n    if (position === 'top' || position === 'bottom') {\n      return {\n        top: this.top,\n        left: 0,\n        bottom: this.bottom,\n        right: chart.width\n      };\n    }\n  }\n\n  drawBackground() {\n    const ctx = this.ctx,\n          backgroundColor = this.options.backgroundColor,\n          left = this.left,\n          top = this.top,\n          width = this.width,\n          height = this.height;\n\n    if (backgroundColor) {\n      ctx.save();\n      ctx.fillStyle = backgroundColor;\n      ctx.fillRect(left, top, width, height);\n      ctx.restore();\n    }\n  }\n\n  getLineWidthForValue(value) {\n    const grid = this.options.grid;\n\n    if (!this._isVisible() || !grid.display) {\n      return 0;\n    }\n\n    const ticks = this.ticks;\n    const index = ticks.findIndex(t => t.value === value);\n\n    if (index >= 0) {\n      const opts = grid.setContext(this.getContext(index));\n      return opts.lineWidth;\n    }\n\n    return 0;\n  }\n\n  drawGrid(chartArea) {\n    const grid = this.options.grid;\n    const ctx = this.ctx;\n\n    const items = this._gridLineItems || (this._gridLineItems = this._computeGridLineItems(chartArea));\n\n    let i, ilen;\n\n    const drawLine = (p1, p2, style) => {\n      if (!style.width || !style.color) {\n        return;\n      }\n\n      ctx.save();\n      ctx.lineWidth = style.width;\n      ctx.strokeStyle = style.color;\n      ctx.setLineDash(style.borderDash || []);\n      ctx.lineDashOffset = style.borderDashOffset;\n      ctx.beginPath();\n      ctx.moveTo(p1.x, p1.y);\n      ctx.lineTo(p2.x, p2.y);\n      ctx.stroke();\n      ctx.restore();\n    };\n\n    if (grid.display) {\n      for (i = 0, ilen = items.length; i < ilen; ++i) {\n        const item = items[i];\n\n        if (grid.drawOnChartArea) {\n          drawLine({\n            x: item.x1,\n            y: item.y1\n          }, {\n            x: item.x2,\n            y: item.y2\n          }, item);\n        }\n\n        if (grid.drawTicks) {\n          drawLine({\n            x: item.tx1,\n            y: item.ty1\n          }, {\n            x: item.tx2,\n            y: item.ty2\n          }, {\n            color: item.tickColor,\n            width: item.tickWidth,\n            borderDash: item.tickBorderDash,\n            borderDashOffset: item.tickBorderDashOffset\n          });\n        }\n      }\n    }\n  }\n\n  drawBorder() {\n    const chart = this.chart,\n          ctx = this.ctx,\n          grid = this.options.grid;\n    const borderOpts = grid.setContext(this.getContext());\n    const axisWidth = grid.drawBorder ? borderOpts.borderWidth : 0;\n\n    if (!axisWidth) {\n      return;\n    }\n\n    const lastLineWidth = grid.setContext(this.getContext(0)).lineWidth;\n    const borderValue = this._borderValue;\n    let x1, x2, y1, y2;\n\n    if (this.isHorizontal()) {\n      x1 = _alignPixel(chart, this.left, axisWidth) - axisWidth / 2;\n      x2 = _alignPixel(chart, this.right, lastLineWidth) + lastLineWidth / 2;\n      y1 = y2 = borderValue;\n    } else {\n      y1 = _alignPixel(chart, this.top, axisWidth) - axisWidth / 2;\n      y2 = _alignPixel(chart, this.bottom, lastLineWidth) + lastLineWidth / 2;\n      x1 = x2 = borderValue;\n    }\n\n    ctx.save();\n    ctx.lineWidth = borderOpts.borderWidth;\n    ctx.strokeStyle = borderOpts.borderColor;\n    ctx.beginPath();\n    ctx.moveTo(x1, y1);\n    ctx.lineTo(x2, y2);\n    ctx.stroke();\n    ctx.restore();\n  }\n\n  drawLabels(chartArea) {\n    const optionTicks = this.options.ticks;\n\n    if (!optionTicks.display) {\n      return;\n    }\n\n    const ctx = this.ctx;\n\n    const area = this._computeLabelArea();\n\n    if (area) {\n      clipArea(ctx, area);\n    }\n\n    const items = this._labelItems || (this._labelItems = this._computeLabelItems(chartArea));\n\n    let i, ilen;\n\n    for (i = 0, ilen = items.length; i < ilen; ++i) {\n      const item = items[i];\n      const tickFont = item.font;\n      const label = item.label;\n\n      if (item.backdrop) {\n        ctx.fillStyle = item.backdrop.color;\n        ctx.fillRect(item.backdrop.left, item.backdrop.top, item.backdrop.width, item.backdrop.height);\n      }\n\n      let y = item.textOffset;\n      renderText(ctx, label, 0, y, tickFont, item);\n    }\n\n    if (area) {\n      unclipArea(ctx);\n    }\n  }\n\n  drawTitle() {\n    const ctx = this.ctx,\n          _this$options9 = this.options,\n          position = _this$options9.position,\n          title = _this$options9.title,\n          reverse = _this$options9.reverse;\n\n    if (!title.display) {\n      return;\n    }\n\n    const font = toFont(title.font);\n    const padding = toPadding(title.padding);\n    const align = title.align;\n    let offset = font.lineHeight / 2;\n\n    if (position === 'bottom' || position === 'center' || isObject(position)) {\n      offset += padding.bottom;\n\n      if (isArray(title.text)) {\n        offset += font.lineHeight * (title.text.length - 1);\n      }\n    } else {\n      offset += padding.top;\n    }\n\n    const _titleArgs = titleArgs(this, offset, position, align),\n          titleX = _titleArgs.titleX,\n          titleY = _titleArgs.titleY,\n          maxWidth = _titleArgs.maxWidth,\n          rotation = _titleArgs.rotation;\n\n    renderText(ctx, title.text, 0, 0, font, {\n      color: title.color,\n      maxWidth,\n      rotation,\n      textAlign: titleAlign(align, position, reverse),\n      textBaseline: 'middle',\n      translation: [titleX, titleY]\n    });\n  }\n\n  draw(chartArea) {\n    if (!this._isVisible()) {\n      return;\n    }\n\n    this.drawBackground();\n    this.drawGrid(chartArea);\n    this.drawBorder();\n    this.drawTitle();\n    this.drawLabels(chartArea);\n  }\n\n  _layers() {\n    const opts = this.options;\n    const tz = opts.ticks && opts.ticks.z || 0;\n    const gz = valueOrDefault(opts.grid && opts.grid.z, -1);\n\n    if (!this._isVisible() || this.draw !== Scale.prototype.draw) {\n      return [{\n        z: tz,\n        draw: chartArea => {\n          this.draw(chartArea);\n        }\n      }];\n    }\n\n    return [{\n      z: gz,\n      draw: chartArea => {\n        this.drawBackground();\n        this.drawGrid(chartArea);\n        this.drawTitle();\n      }\n    }, {\n      z: gz + 1,\n      draw: () => {\n        this.drawBorder();\n      }\n    }, {\n      z: tz,\n      draw: chartArea => {\n        this.drawLabels(chartArea);\n      }\n    }];\n  }\n\n  getMatchingVisibleMetas(type) {\n    const metas = this.chart.getSortedVisibleDatasetMetas();\n    const axisID = this.axis + 'AxisID';\n    const result = [];\n    let i, ilen;\n\n    for (i = 0, ilen = metas.length; i < ilen; ++i) {\n      const meta = metas[i];\n\n      if (meta[axisID] === this.id && (!type || meta.type === type)) {\n        result.push(meta);\n      }\n    }\n\n    return result;\n  }\n\n  _resolveTickFontOptions(index) {\n    const opts = this.options.ticks.setContext(this.getContext(index));\n    return toFont(opts.font);\n  }\n\n  _maxDigits() {\n    const fontSize = this._resolveTickFontOptions(0).lineHeight;\n\n    return (this.isHorizontal() ? this.width : this.height) / fontSize;\n  }\n\n}\n\nclass TypedRegistry {\n  constructor(type, scope, override) {\n    this.type = type;\n    this.scope = scope;\n    this.override = override;\n    this.items = Object.create(null);\n  }\n\n  isForType(type) {\n    return Object.prototype.isPrototypeOf.call(this.type.prototype, type.prototype);\n  }\n\n  register(item) {\n    const proto = Object.getPrototypeOf(item);\n    let parentScope;\n\n    if (isIChartComponent(proto)) {\n      parentScope = this.register(proto);\n    }\n\n    const items = this.items;\n    const id = item.id;\n    const scope = this.scope + '.' + id;\n\n    if (!id) {\n      throw new Error('class does not have id: ' + item);\n    }\n\n    if (id in items) {\n      return scope;\n    }\n\n    items[id] = item;\n    registerDefaults(item, scope, parentScope);\n\n    if (this.override) {\n      defaults.override(item.id, item.overrides);\n    }\n\n    return scope;\n  }\n\n  get(id) {\n    return this.items[id];\n  }\n\n  unregister(item) {\n    const items = this.items;\n    const id = item.id;\n    const scope = this.scope;\n\n    if (id in items) {\n      delete items[id];\n    }\n\n    if (scope && id in defaults[scope]) {\n      delete defaults[scope][id];\n\n      if (this.override) {\n        delete overrides[id];\n      }\n    }\n  }\n\n}\n\nfunction registerDefaults(item, scope, parentScope) {\n  const itemDefaults = merge(Object.create(null), [parentScope ? defaults.get(parentScope) : {}, defaults.get(scope), item.defaults]);\n  defaults.set(scope, itemDefaults);\n\n  if (item.defaultRoutes) {\n    routeDefaults(scope, item.defaultRoutes);\n  }\n\n  if (item.descriptors) {\n    defaults.describe(scope, item.descriptors);\n  }\n}\n\nfunction routeDefaults(scope, routes) {\n  Object.keys(routes).forEach(property => {\n    const propertyParts = property.split('.');\n    const sourceName = propertyParts.pop();\n    const sourceScope = [scope].concat(propertyParts).join('.');\n    const parts = routes[property].split('.');\n    const targetName = parts.pop();\n    const targetScope = parts.join('.');\n    defaults.route(sourceScope, sourceName, targetScope, targetName);\n  });\n}\n\nfunction isIChartComponent(proto) {\n  return 'id' in proto && 'defaults' in proto;\n}\n\nclass Registry {\n  constructor() {\n    this.controllers = new TypedRegistry(DatasetController, 'datasets', true);\n    this.elements = new TypedRegistry(Element, 'elements');\n    this.plugins = new TypedRegistry(Object, 'plugins');\n    this.scales = new TypedRegistry(Scale, 'scales');\n    this._typedRegistries = [this.controllers, this.scales, this.elements];\n  }\n\n  add() {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    this._each('register', args);\n  }\n\n  remove() {\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    this._each('unregister', args);\n  }\n\n  addControllers() {\n    for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n      args[_key3] = arguments[_key3];\n    }\n\n    this._each('register', args, this.controllers);\n  }\n\n  addElements() {\n    for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n      args[_key4] = arguments[_key4];\n    }\n\n    this._each('register', args, this.elements);\n  }\n\n  addPlugins() {\n    for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n      args[_key5] = arguments[_key5];\n    }\n\n    this._each('register', args, this.plugins);\n  }\n\n  addScales() {\n    for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n      args[_key6] = arguments[_key6];\n    }\n\n    this._each('register', args, this.scales);\n  }\n\n  getController(id) {\n    return this._get(id, this.controllers, 'controller');\n  }\n\n  getElement(id) {\n    return this._get(id, this.elements, 'element');\n  }\n\n  getPlugin(id) {\n    return this._get(id, this.plugins, 'plugin');\n  }\n\n  getScale(id) {\n    return this._get(id, this.scales, 'scale');\n  }\n\n  removeControllers() {\n    for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n      args[_key7] = arguments[_key7];\n    }\n\n    this._each('unregister', args, this.controllers);\n  }\n\n  removeElements() {\n    for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n      args[_key8] = arguments[_key8];\n    }\n\n    this._each('unregister', args, this.elements);\n  }\n\n  removePlugins() {\n    for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {\n      args[_key9] = arguments[_key9];\n    }\n\n    this._each('unregister', args, this.plugins);\n  }\n\n  removeScales() {\n    for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {\n      args[_key10] = arguments[_key10];\n    }\n\n    this._each('unregister', args, this.scales);\n  }\n\n  _each(method, args, typedRegistry) {\n    [...args].forEach(arg => {\n      const reg = typedRegistry || this._getRegistryForType(arg);\n\n      if (typedRegistry || reg.isForType(arg) || reg === this.plugins && arg.id) {\n        this._exec(method, reg, arg);\n      } else {\n        each(arg, item => {\n          const itemReg = typedRegistry || this._getRegistryForType(item);\n\n          this._exec(method, itemReg, item);\n        });\n      }\n    });\n  }\n\n  _exec(method, registry, component) {\n    const camelMethod = _capitalize(method);\n\n    callback(component['before' + camelMethod], [], component);\n    registry[method](component);\n    callback(component['after' + camelMethod], [], component);\n  }\n\n  _getRegistryForType(type) {\n    for (let i = 0; i < this._typedRegistries.length; i++) {\n      const reg = this._typedRegistries[i];\n\n      if (reg.isForType(type)) {\n        return reg;\n      }\n    }\n\n    return this.plugins;\n  }\n\n  _get(id, typedRegistry, type) {\n    const item = typedRegistry.get(id);\n\n    if (item === undefined) {\n      throw new Error('\"' + id + '\" is not a registered ' + type + '.');\n    }\n\n    return item;\n  }\n\n}\n\nvar registry = new Registry();\n\nclass ScatterController extends DatasetController {\n  update(mode) {\n    const meta = this._cachedMeta;\n    const _meta$data2 = meta.data,\n          points = _meta$data2 === void 0 ? [] : _meta$data2;\n    const animationsDisabled = this.chart._animationsDisabled;\n\n    let _getStartAndCountOfVi2 = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled),\n        start = _getStartAndCountOfVi2.start,\n        count = _getStartAndCountOfVi2.count;\n\n    this._drawStart = start;\n    this._drawCount = count;\n\n    if (_scaleRangesChanged(meta)) {\n      start = 0;\n      count = points.length;\n    }\n\n    if (this.options.showLine) {\n      const line = meta.dataset,\n            _dataset = meta._dataset;\n      line._chart = this.chart;\n      line._datasetIndex = this.index;\n      line._decimated = !!_dataset._decimated;\n      line.points = points;\n      const options = this.resolveDatasetElementOptions(mode);\n      options.segment = this.options.segment;\n      this.updateElement(line, undefined, {\n        animated: !animationsDisabled,\n        options\n      }, mode);\n    }\n\n    this.updateElements(points, start, count, mode);\n  }\n\n  addElements() {\n    const showLine = this.options.showLine;\n\n    if (!this.datasetElementType && showLine) {\n      this.datasetElementType = registry.getElement('line');\n    }\n\n    super.addElements();\n  }\n\n  updateElements(points, start, count, mode) {\n    const reset = mode === 'reset';\n    const _this$_cachedMeta4 = this._cachedMeta,\n          iScale = _this$_cachedMeta4.iScale,\n          vScale = _this$_cachedMeta4.vScale,\n          _stacked = _this$_cachedMeta4._stacked,\n          _dataset = _this$_cachedMeta4._dataset;\n    const firstOpts = this.resolveDataElementOptions(start, mode);\n    const sharedOptions = this.getSharedOptions(firstOpts);\n    const includeOptions = this.includeOptions(mode, sharedOptions);\n    const iAxis = iScale.axis;\n    const vAxis = vScale.axis;\n    const _this$options10 = this.options,\n          spanGaps = _this$options10.spanGaps,\n          segment = _this$options10.segment;\n    const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n    const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n    let prevParsed = start > 0 && this.getParsed(start - 1);\n\n    for (let i = start; i < start + count; ++i) {\n      const point = points[i];\n      const parsed = this.getParsed(i);\n      const properties = directUpdate ? point : {};\n      const nullData = isNullOrUndef(parsed[vAxis]);\n      const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n      const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n      properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n      properties.stop = i > 0 && Math.abs(parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;\n\n      if (segment) {\n        properties.parsed = parsed;\n        properties.raw = _dataset.data[i];\n      }\n\n      if (includeOptions) {\n        properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n      }\n\n      if (!directUpdate) {\n        this.updateElement(point, i, properties, mode);\n      }\n\n      prevParsed = parsed;\n    }\n\n    this.updateSharedOptions(sharedOptions, mode, firstOpts);\n  }\n\n  getMaxOverflow() {\n    const meta = this._cachedMeta;\n    const data = meta.data || [];\n\n    if (!this.options.showLine) {\n      let max = 0;\n\n      for (let i = data.length - 1; i >= 0; --i) {\n        max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n      }\n\n      return max > 0 && max;\n    }\n\n    const dataset = meta.dataset;\n    const border = dataset.options && dataset.options.borderWidth || 0;\n\n    if (!data.length) {\n      return border;\n    }\n\n    const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n    const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n    return Math.max(border, firstPoint, lastPoint) / 2;\n  }\n\n}\n\nScatterController.id = 'scatter';\nScatterController.defaults = {\n  datasetElementType: false,\n  dataElementType: 'point',\n  showLine: false,\n  fill: false\n};\nScatterController.overrides = {\n  interaction: {\n    mode: 'point'\n  },\n  plugins: {\n    tooltip: {\n      callbacks: {\n        title() {\n          return '';\n        },\n\n        label(item) {\n          return '(' + item.label + ', ' + item.formattedValue + ')';\n        }\n\n      }\n    }\n  },\n  scales: {\n    x: {\n      type: 'linear'\n    },\n    y: {\n      type: 'linear'\n    }\n  }\n};\nvar controllers = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  BarController: BarController,\n  BubbleController: BubbleController,\n  DoughnutController: DoughnutController,\n  LineController: LineController,\n  PolarAreaController: PolarAreaController,\n  PieController: PieController,\n  RadarController: RadarController,\n  ScatterController: ScatterController\n});\n\nfunction abstract() {\n  throw new Error('This method is not implemented: Check that a complete date adapter is provided.');\n}\n\nclass DateAdapter {\n  constructor(options) {\n    this.options = options || {};\n  }\n\n  init(chartOptions) {}\n\n  formats() {\n    return abstract();\n  }\n\n  parse(value, format) {\n    return abstract();\n  }\n\n  format(timestamp, format) {\n    return abstract();\n  }\n\n  add(timestamp, amount, unit) {\n    return abstract();\n  }\n\n  diff(a, b, unit) {\n    return abstract();\n  }\n\n  startOf(timestamp, unit, weekday) {\n    return abstract();\n  }\n\n  endOf(timestamp, unit) {\n    return abstract();\n  }\n\n}\n\nDateAdapter.override = function (members) {\n  Object.assign(DateAdapter.prototype, members);\n};\n\nvar adapters = {\n  _date: DateAdapter\n};\n\nfunction binarySearch(metaset, axis, value, intersect) {\n  const controller = metaset.controller,\n        data = metaset.data,\n        _sorted = metaset._sorted;\n  const iScale = controller._cachedMeta.iScale;\n\n  if (iScale && axis === iScale.axis && axis !== 'r' && _sorted && data.length) {\n    const lookupMethod = iScale._reversePixels ? _rlookupByKey : _lookupByKey;\n\n    if (!intersect) {\n      return lookupMethod(data, axis, value);\n    } else if (controller._sharedOptions) {\n      const el = data[0];\n      const range = typeof el.getRange === 'function' && el.getRange(axis);\n\n      if (range) {\n        const start = lookupMethod(data, axis, value - range);\n        const end = lookupMethod(data, axis, value + range);\n        return {\n          lo: start.lo,\n          hi: end.hi\n        };\n      }\n    }\n  }\n\n  return {\n    lo: 0,\n    hi: data.length - 1\n  };\n}\n\nfunction evaluateInteractionItems(chart, axis, position, handler, intersect) {\n  const metasets = chart.getSortedVisibleDatasetMetas();\n  const value = position[axis];\n\n  for (let i = 0, ilen = metasets.length; i < ilen; ++i) {\n    const _metasets$i = metasets[i],\n          index = _metasets$i.index,\n          data = _metasets$i.data;\n\n    const _binarySearch = binarySearch(metasets[i], axis, value, intersect),\n          lo = _binarySearch.lo,\n          hi = _binarySearch.hi;\n\n    for (let j = lo; j <= hi; ++j) {\n      const element = data[j];\n\n      if (!element.skip) {\n        handler(element, index, j);\n      }\n    }\n  }\n}\n\nfunction getDistanceMetricForAxis(axis) {\n  const useX = axis.indexOf('x') !== -1;\n  const useY = axis.indexOf('y') !== -1;\n  return function (pt1, pt2) {\n    const deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\n    const deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\n    return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\n  };\n}\n\nfunction getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) {\n  const items = [];\n\n  if (!includeInvisible && !chart.isPointInArea(position)) {\n    return items;\n  }\n\n  const evaluationFunc = function (element, datasetIndex, index) {\n    if (!includeInvisible && !_isPointInArea(element, chart.chartArea, 0)) {\n      return;\n    }\n\n    if (element.inRange(position.x, position.y, useFinalPosition)) {\n      items.push({\n        element,\n        datasetIndex,\n        index\n      });\n    }\n  };\n\n  evaluateInteractionItems(chart, axis, position, evaluationFunc, true);\n  return items;\n}\n\nfunction getNearestRadialItems(chart, position, axis, useFinalPosition) {\n  let items = [];\n\n  function evaluationFunc(element, datasetIndex, index) {\n    const _element$getProps = element.getProps(['startAngle', 'endAngle'], useFinalPosition),\n          startAngle = _element$getProps.startAngle,\n          endAngle = _element$getProps.endAngle;\n\n    const _getAngleFromPoint = getAngleFromPoint(element, {\n      x: position.x,\n      y: position.y\n    }),\n          angle = _getAngleFromPoint.angle;\n\n    if (_angleBetween(angle, startAngle, endAngle)) {\n      items.push({\n        element,\n        datasetIndex,\n        index\n      });\n    }\n  }\n\n  evaluateInteractionItems(chart, axis, position, evaluationFunc);\n  return items;\n}\n\nfunction getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n  let items = [];\n  const distanceMetric = getDistanceMetricForAxis(axis);\n  let minDistance = Number.POSITIVE_INFINITY;\n\n  function evaluationFunc(element, datasetIndex, index) {\n    const inRange = element.inRange(position.x, position.y, useFinalPosition);\n\n    if (intersect && !inRange) {\n      return;\n    }\n\n    const center = element.getCenterPoint(useFinalPosition);\n    const pointInArea = !!includeInvisible || chart.isPointInArea(center);\n\n    if (!pointInArea && !inRange) {\n      return;\n    }\n\n    const distance = distanceMetric(position, center);\n\n    if (distance < minDistance) {\n      items = [{\n        element,\n        datasetIndex,\n        index\n      }];\n      minDistance = distance;\n    } else if (distance === minDistance) {\n      items.push({\n        element,\n        datasetIndex,\n        index\n      });\n    }\n  }\n\n  evaluateInteractionItems(chart, axis, position, evaluationFunc);\n  return items;\n}\n\nfunction getNearestItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n  if (!includeInvisible && !chart.isPointInArea(position)) {\n    return [];\n  }\n\n  return axis === 'r' && !intersect ? getNearestRadialItems(chart, position, axis, useFinalPosition) : getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible);\n}\n\nfunction getAxisItems(chart, position, axis, intersect, useFinalPosition) {\n  const items = [];\n  const rangeMethod = axis === 'x' ? 'inXRange' : 'inYRange';\n  let intersectsItem = false;\n  evaluateInteractionItems(chart, axis, position, (element, datasetIndex, index) => {\n    if (element[rangeMethod](position[axis], useFinalPosition)) {\n      items.push({\n        element,\n        datasetIndex,\n        index\n      });\n      intersectsItem = intersectsItem || element.inRange(position.x, position.y, useFinalPosition);\n    }\n  });\n\n  if (intersect && !intersectsItem) {\n    return [];\n  }\n\n  return items;\n}\n\nvar Interaction = {\n  evaluateInteractionItems,\n  modes: {\n    index(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      const axis = options.axis || 'x';\n      const includeInvisible = options.includeInvisible || false;\n      const items = options.intersect ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) : getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n      const elements = [];\n\n      if (!items.length) {\n        return [];\n      }\n\n      chart.getSortedVisibleDatasetMetas().forEach(meta => {\n        const index = items[0].index;\n        const element = meta.data[index];\n\n        if (element && !element.skip) {\n          elements.push({\n            element,\n            datasetIndex: meta.index,\n            index\n          });\n        }\n      });\n      return elements;\n    },\n\n    dataset(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      const axis = options.axis || 'xy';\n      const includeInvisible = options.includeInvisible || false;\n      let items = options.intersect ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) : getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n\n      if (items.length > 0) {\n        const datasetIndex = items[0].datasetIndex;\n        const data = chart.getDatasetMeta(datasetIndex).data;\n        items = [];\n\n        for (let i = 0; i < data.length; ++i) {\n          items.push({\n            element: data[i],\n            datasetIndex,\n            index: i\n          });\n        }\n      }\n\n      return items;\n    },\n\n    point(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      const axis = options.axis || 'xy';\n      const includeInvisible = options.includeInvisible || false;\n      return getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible);\n    },\n\n    nearest(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      const axis = options.axis || 'xy';\n      const includeInvisible = options.includeInvisible || false;\n      return getNearestItems(chart, position, axis, options.intersect, useFinalPosition, includeInvisible);\n    },\n\n    x(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      return getAxisItems(chart, position, 'x', options.intersect, useFinalPosition);\n    },\n\n    y(chart, e, options, useFinalPosition) {\n      const position = getRelativePosition(e, chart);\n      return getAxisItems(chart, position, 'y', options.intersect, useFinalPosition);\n    }\n\n  }\n};\nconst STATIC_POSITIONS = ['left', 'top', 'right', 'bottom'];\n\nfunction filterByPosition(array, position) {\n  return array.filter(v => v.pos === position);\n}\n\nfunction filterDynamicPositionByAxis(array, axis) {\n  return array.filter(v => STATIC_POSITIONS.indexOf(v.pos) === -1 && v.box.axis === axis);\n}\n\nfunction sortByWeight(array, reverse) {\n  return array.sort((a, b) => {\n    const v0 = reverse ? b : a;\n    const v1 = reverse ? a : b;\n    return v0.weight === v1.weight ? v0.index - v1.index : v0.weight - v1.weight;\n  });\n}\n\nfunction wrapBoxes(boxes) {\n  const layoutBoxes = [];\n  let i, ilen, box, pos, stack, stackWeight;\n\n  for (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {\n    box = boxes[i];\n    var _box = box;\n    pos = _box.position;\n    var _box$options = _box.options;\n    stack = _box$options.stack;\n    var _box$options$stackWei = _box$options.stackWeight;\n    stackWeight = _box$options$stackWei === void 0 ? 1 : _box$options$stackWei;\n    layoutBoxes.push({\n      index: i,\n      box,\n      pos,\n      horizontal: box.isHorizontal(),\n      weight: box.weight,\n      stack: stack && pos + stack,\n      stackWeight\n    });\n  }\n\n  return layoutBoxes;\n}\n\nfunction buildStacks(layouts) {\n  const stacks = {};\n\n  for (const wrap of layouts) {\n    const stack = wrap.stack,\n          pos = wrap.pos,\n          stackWeight = wrap.stackWeight;\n\n    if (!stack || !STATIC_POSITIONS.includes(pos)) {\n      continue;\n    }\n\n    const _stack = stacks[stack] || (stacks[stack] = {\n      count: 0,\n      placed: 0,\n      weight: 0,\n      size: 0\n    });\n\n    _stack.count++;\n    _stack.weight += stackWeight;\n  }\n\n  return stacks;\n}\n\nfunction setLayoutDims(layouts, params) {\n  const stacks = buildStacks(layouts);\n  const vBoxMaxWidth = params.vBoxMaxWidth,\n        hBoxMaxHeight = params.hBoxMaxHeight;\n  let i, ilen, layout;\n\n  for (i = 0, ilen = layouts.length; i < ilen; ++i) {\n    layout = layouts[i];\n    const fullSize = layout.box.fullSize;\n    const stack = stacks[layout.stack];\n    const factor = stack && layout.stackWeight / stack.weight;\n\n    if (layout.horizontal) {\n      layout.width = factor ? factor * vBoxMaxWidth : fullSize && params.availableWidth;\n      layout.height = hBoxMaxHeight;\n    } else {\n      layout.width = vBoxMaxWidth;\n      layout.height = factor ? factor * hBoxMaxHeight : fullSize && params.availableHeight;\n    }\n  }\n\n  return stacks;\n}\n\nfunction buildLayoutBoxes(boxes) {\n  const layoutBoxes = wrapBoxes(boxes);\n  const fullSize = sortByWeight(layoutBoxes.filter(wrap => wrap.box.fullSize), true);\n  const left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\n  const right = sortByWeight(filterByPosition(layoutBoxes, 'right'));\n  const top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\n  const bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\n  const centerHorizontal = filterDynamicPositionByAxis(layoutBoxes, 'x');\n  const centerVertical = filterDynamicPositionByAxis(layoutBoxes, 'y');\n  return {\n    fullSize,\n    leftAndTop: left.concat(top),\n    rightAndBottom: right.concat(centerVertical).concat(bottom).concat(centerHorizontal),\n    chartArea: filterByPosition(layoutBoxes, 'chartArea'),\n    vertical: left.concat(right).concat(centerVertical),\n    horizontal: top.concat(bottom).concat(centerHorizontal)\n  };\n}\n\nfunction getCombinedMax(maxPadding, chartArea, a, b) {\n  return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\n}\n\nfunction updateMaxPadding(maxPadding, boxPadding) {\n  maxPadding.top = Math.max(maxPadding.top, boxPadding.top);\n  maxPadding.left = Math.max(maxPadding.left, boxPadding.left);\n  maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);\n  maxPadding.right = Math.max(maxPadding.right, boxPadding.right);\n}\n\nfunction updateDims(chartArea, params, layout, stacks) {\n  const pos = layout.pos,\n        box = layout.box;\n  const maxPadding = chartArea.maxPadding;\n\n  if (!isObject(pos)) {\n    if (layout.size) {\n      chartArea[pos] -= layout.size;\n    }\n\n    const stack = stacks[layout.stack] || {\n      size: 0,\n      count: 1\n    };\n    stack.size = Math.max(stack.size, layout.horizontal ? box.height : box.width);\n    layout.size = stack.size / stack.count;\n    chartArea[pos] += layout.size;\n  }\n\n  if (box.getPadding) {\n    updateMaxPadding(maxPadding, box.getPadding());\n  }\n\n  const newWidth = Math.max(0, params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right'));\n  const newHeight = Math.max(0, params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom'));\n  const widthChanged = newWidth !== chartArea.w;\n  const heightChanged = newHeight !== chartArea.h;\n  chartArea.w = newWidth;\n  chartArea.h = newHeight;\n  return layout.horizontal ? {\n    same: widthChanged,\n    other: heightChanged\n  } : {\n    same: heightChanged,\n    other: widthChanged\n  };\n}\n\nfunction handleMaxPadding(chartArea) {\n  const maxPadding = chartArea.maxPadding;\n\n  function updatePos(pos) {\n    const change = Math.max(maxPadding[pos] - chartArea[pos], 0);\n    chartArea[pos] += change;\n    return change;\n  }\n\n  chartArea.y += updatePos('top');\n  chartArea.x += updatePos('left');\n  updatePos('right');\n  updatePos('bottom');\n}\n\nfunction getMargins(horizontal, chartArea) {\n  const maxPadding = chartArea.maxPadding;\n\n  function marginForPositions(positions) {\n    const margin = {\n      left: 0,\n      top: 0,\n      right: 0,\n      bottom: 0\n    };\n    positions.forEach(pos => {\n      margin[pos] = Math.max(chartArea[pos], maxPadding[pos]);\n    });\n    return margin;\n  }\n\n  return horizontal ? marginForPositions(['left', 'right']) : marginForPositions(['top', 'bottom']);\n}\n\nfunction fitBoxes(boxes, chartArea, params, stacks) {\n  const refitBoxes = [];\n  let i, ilen, layout, box, refit, changed;\n\n  for (i = 0, ilen = boxes.length, refit = 0; i < ilen; ++i) {\n    layout = boxes[i];\n    box = layout.box;\n    box.update(layout.width || chartArea.w, layout.height || chartArea.h, getMargins(layout.horizontal, chartArea));\n\n    const _updateDims = updateDims(chartArea, params, layout, stacks),\n          same = _updateDims.same,\n          other = _updateDims.other;\n\n    refit |= same && refitBoxes.length;\n    changed = changed || other;\n\n    if (!box.fullSize) {\n      refitBoxes.push(layout);\n    }\n  }\n\n  return refit && fitBoxes(refitBoxes, chartArea, params, stacks) || changed;\n}\n\nfunction setBoxDims(box, left, top, width, height) {\n  box.top = top;\n  box.left = left;\n  box.right = left + width;\n  box.bottom = top + height;\n  box.width = width;\n  box.height = height;\n}\n\nfunction placeBoxes(boxes, chartArea, params, stacks) {\n  const userPadding = params.padding;\n  let x = chartArea.x,\n      y = chartArea.y;\n\n  for (const layout of boxes) {\n    const box = layout.box;\n    const stack = stacks[layout.stack] || {\n      count: 1,\n      placed: 0,\n      weight: 1\n    };\n    const weight = layout.stackWeight / stack.weight || 1;\n\n    if (layout.horizontal) {\n      const width = chartArea.w * weight;\n      const height = stack.size || box.height;\n\n      if (defined(stack.start)) {\n        y = stack.start;\n      }\n\n      if (box.fullSize) {\n        setBoxDims(box, userPadding.left, y, params.outerWidth - userPadding.right - userPadding.left, height);\n      } else {\n        setBoxDims(box, chartArea.left + stack.placed, y, width, height);\n      }\n\n      stack.start = y;\n      stack.placed += width;\n      y = box.bottom;\n    } else {\n      const height = chartArea.h * weight;\n      const width = stack.size || box.width;\n\n      if (defined(stack.start)) {\n        x = stack.start;\n      }\n\n      if (box.fullSize) {\n        setBoxDims(box, x, userPadding.top, width, params.outerHeight - userPadding.bottom - userPadding.top);\n      } else {\n        setBoxDims(box, x, chartArea.top + stack.placed, width, height);\n      }\n\n      stack.start = x;\n      stack.placed += height;\n      x = box.right;\n    }\n  }\n\n  chartArea.x = x;\n  chartArea.y = y;\n}\n\ndefaults.set('layout', {\n  autoPadding: true,\n  padding: {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n  }\n});\nvar layouts = {\n  addBox(chart, item) {\n    if (!chart.boxes) {\n      chart.boxes = [];\n    }\n\n    item.fullSize = item.fullSize || false;\n    item.position = item.position || 'top';\n    item.weight = item.weight || 0;\n\n    item._layers = item._layers || function () {\n      return [{\n        z: 0,\n\n        draw(chartArea) {\n          item.draw(chartArea);\n        }\n\n      }];\n    };\n\n    chart.boxes.push(item);\n  },\n\n  removeBox(chart, layoutItem) {\n    const index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\n\n    if (index !== -1) {\n      chart.boxes.splice(index, 1);\n    }\n  },\n\n  configure(chart, item, options) {\n    item.fullSize = options.fullSize;\n    item.position = options.position;\n    item.weight = options.weight;\n  },\n\n  update(chart, width, height, minPadding) {\n    if (!chart) {\n      return;\n    }\n\n    const padding = toPadding(chart.options.layout.padding);\n    const availableWidth = Math.max(width - padding.width, 0);\n    const availableHeight = Math.max(height - padding.height, 0);\n    const boxes = buildLayoutBoxes(chart.boxes);\n    const verticalBoxes = boxes.vertical;\n    const horizontalBoxes = boxes.horizontal;\n    each(chart.boxes, box => {\n      if (typeof box.beforeLayout === 'function') {\n        box.beforeLayout();\n      }\n    });\n    const visibleVerticalBoxCount = verticalBoxes.reduce((total, wrap) => wrap.box.options && wrap.box.options.display === false ? total : total + 1, 0) || 1;\n    const params = Object.freeze({\n      outerWidth: width,\n      outerHeight: height,\n      padding,\n      availableWidth,\n      availableHeight,\n      vBoxMaxWidth: availableWidth / 2 / visibleVerticalBoxCount,\n      hBoxMaxHeight: availableHeight / 2\n    });\n    const maxPadding = Object.assign({}, padding);\n    updateMaxPadding(maxPadding, toPadding(minPadding));\n    const chartArea = Object.assign({\n      maxPadding,\n      w: availableWidth,\n      h: availableHeight,\n      x: padding.left,\n      y: padding.top\n    }, padding);\n    const stacks = setLayoutDims(verticalBoxes.concat(horizontalBoxes), params);\n    fitBoxes(boxes.fullSize, chartArea, params, stacks);\n    fitBoxes(verticalBoxes, chartArea, params, stacks);\n\n    if (fitBoxes(horizontalBoxes, chartArea, params, stacks)) {\n      fitBoxes(verticalBoxes, chartArea, params, stacks);\n    }\n\n    handleMaxPadding(chartArea);\n    placeBoxes(boxes.leftAndTop, chartArea, params, stacks);\n    chartArea.x += chartArea.w;\n    chartArea.y += chartArea.h;\n    placeBoxes(boxes.rightAndBottom, chartArea, params, stacks);\n    chart.chartArea = {\n      left: chartArea.left,\n      top: chartArea.top,\n      right: chartArea.left + chartArea.w,\n      bottom: chartArea.top + chartArea.h,\n      height: chartArea.h,\n      width: chartArea.w\n    };\n    each(boxes.chartArea, layout => {\n      const box = layout.box;\n      Object.assign(box, chart.chartArea);\n      box.update(chartArea.w, chartArea.h, {\n        left: 0,\n        top: 0,\n        right: 0,\n        bottom: 0\n      });\n    });\n  }\n\n};\n\nclass BasePlatform {\n  acquireContext(canvas, aspectRatio) {}\n\n  releaseContext(context) {\n    return false;\n  }\n\n  addEventListener(chart, type, listener) {}\n\n  removeEventListener(chart, type, listener) {}\n\n  getDevicePixelRatio() {\n    return 1;\n  }\n\n  getMaximumSize(element, width, height, aspectRatio) {\n    width = Math.max(0, width || element.width);\n    height = height || element.height;\n    return {\n      width,\n      height: Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height)\n    };\n  }\n\n  isAttached(canvas) {\n    return true;\n  }\n\n  updateConfig(config) {}\n\n}\n\nclass BasicPlatform extends BasePlatform {\n  acquireContext(item) {\n    return item && item.getContext && item.getContext('2d') || null;\n  }\n\n  updateConfig(config) {\n    config.options.animation = false;\n  }\n\n}\n\nconst EXPANDO_KEY = '$chartjs';\nconst EVENT_TYPES = {\n  touchstart: 'mousedown',\n  touchmove: 'mousemove',\n  touchend: 'mouseup',\n  pointerenter: 'mouseenter',\n  pointerdown: 'mousedown',\n  pointermove: 'mousemove',\n  pointerup: 'mouseup',\n  pointerleave: 'mouseout',\n  pointerout: 'mouseout'\n};\n\nconst isNullOrEmpty = value => value === null || value === '';\n\nfunction initCanvas(canvas, aspectRatio) {\n  const style = canvas.style;\n  const renderHeight = canvas.getAttribute('height');\n  const renderWidth = canvas.getAttribute('width');\n  canvas[EXPANDO_KEY] = {\n    initial: {\n      height: renderHeight,\n      width: renderWidth,\n      style: {\n        display: style.display,\n        height: style.height,\n        width: style.width\n      }\n    }\n  };\n  style.display = style.display || 'block';\n  style.boxSizing = style.boxSizing || 'border-box';\n\n  if (isNullOrEmpty(renderWidth)) {\n    const displayWidth = readUsedSize(canvas, 'width');\n\n    if (displayWidth !== undefined) {\n      canvas.width = displayWidth;\n    }\n  }\n\n  if (isNullOrEmpty(renderHeight)) {\n    if (canvas.style.height === '') {\n      canvas.height = canvas.width / (aspectRatio || 2);\n    } else {\n      const displayHeight = readUsedSize(canvas, 'height');\n\n      if (displayHeight !== undefined) {\n        canvas.height = displayHeight;\n      }\n    }\n  }\n\n  return canvas;\n}\n\nconst eventListenerOptions = supportsEventListenerOptions ? {\n  passive: true\n} : false;\n\nfunction addListener(node, type, listener) {\n  node.addEventListener(type, listener, eventListenerOptions);\n}\n\nfunction removeListener(chart, type, listener) {\n  chart.canvas.removeEventListener(type, listener, eventListenerOptions);\n}\n\nfunction fromNativeEvent(event, chart) {\n  const type = EVENT_TYPES[event.type] || event.type;\n\n  const _getRelativePosition = getRelativePosition(event, chart),\n        x = _getRelativePosition.x,\n        y = _getRelativePosition.y;\n\n  return {\n    type,\n    chart,\n    native: event,\n    x: x !== undefined ? x : null,\n    y: y !== undefined ? y : null\n  };\n}\n\nfunction nodeListContains(nodeList, canvas) {\n  for (const node of nodeList) {\n    if (node === canvas || node.contains(canvas)) {\n      return true;\n    }\n  }\n}\n\nfunction createAttachObserver(chart, type, listener) {\n  const canvas = chart.canvas;\n  const observer = new MutationObserver(entries => {\n    let trigger = false;\n\n    for (const entry of entries) {\n      trigger = trigger || nodeListContains(entry.addedNodes, canvas);\n      trigger = trigger && !nodeListContains(entry.removedNodes, canvas);\n    }\n\n    if (trigger) {\n      listener();\n    }\n  });\n  observer.observe(document, {\n    childList: true,\n    subtree: true\n  });\n  return observer;\n}\n\nfunction createDetachObserver(chart, type, listener) {\n  const canvas = chart.canvas;\n  const observer = new MutationObserver(entries => {\n    let trigger = false;\n\n    for (const entry of entries) {\n      trigger = trigger || nodeListContains(entry.removedNodes, canvas);\n      trigger = trigger && !nodeListContains(entry.addedNodes, canvas);\n    }\n\n    if (trigger) {\n      listener();\n    }\n  });\n  observer.observe(document, {\n    childList: true,\n    subtree: true\n  });\n  return observer;\n}\n\nconst drpListeningCharts = new Map();\nlet oldDevicePixelRatio = 0;\n\nfunction onWindowResize() {\n  const dpr = window.devicePixelRatio;\n\n  if (dpr === oldDevicePixelRatio) {\n    return;\n  }\n\n  oldDevicePixelRatio = dpr;\n  drpListeningCharts.forEach((resize, chart) => {\n    if (chart.currentDevicePixelRatio !== dpr) {\n      resize();\n    }\n  });\n}\n\nfunction listenDevicePixelRatioChanges(chart, resize) {\n  if (!drpListeningCharts.size) {\n    window.addEventListener('resize', onWindowResize);\n  }\n\n  drpListeningCharts.set(chart, resize);\n}\n\nfunction unlistenDevicePixelRatioChanges(chart) {\n  drpListeningCharts.delete(chart);\n\n  if (!drpListeningCharts.size) {\n    window.removeEventListener('resize', onWindowResize);\n  }\n}\n\nfunction createResizeObserver(chart, type, listener) {\n  const canvas = chart.canvas;\n\n  const container = canvas && _getParentNode(canvas);\n\n  if (!container) {\n    return;\n  }\n\n  const resize = throttled((width, height) => {\n    const w = container.clientWidth;\n    listener(width, height);\n\n    if (w < container.clientWidth) {\n      listener();\n    }\n  }, window);\n  const observer = new ResizeObserver(entries => {\n    const entry = entries[0];\n    const width = entry.contentRect.width;\n    const height = entry.contentRect.height;\n\n    if (width === 0 && height === 0) {\n      return;\n    }\n\n    resize(width, height);\n  });\n  observer.observe(container);\n  listenDevicePixelRatioChanges(chart, resize);\n  return observer;\n}\n\nfunction releaseObserver(chart, type, observer) {\n  if (observer) {\n    observer.disconnect();\n  }\n\n  if (type === 'resize') {\n    unlistenDevicePixelRatioChanges(chart);\n  }\n}\n\nfunction createProxyAndListen(chart, type, listener) {\n  const canvas = chart.canvas;\n  const proxy = throttled(event => {\n    if (chart.ctx !== null) {\n      listener(fromNativeEvent(event, chart));\n    }\n  }, chart, args => {\n    const event = args[0];\n    return [event, event.offsetX, event.offsetY];\n  });\n  addListener(canvas, type, proxy);\n  return proxy;\n}\n\nclass DomPlatform extends BasePlatform {\n  acquireContext(canvas, aspectRatio) {\n    const context = canvas && canvas.getContext && canvas.getContext('2d');\n\n    if (context && context.canvas === canvas) {\n      initCanvas(canvas, aspectRatio);\n      return context;\n    }\n\n    return null;\n  }\n\n  releaseContext(context) {\n    const canvas = context.canvas;\n\n    if (!canvas[EXPANDO_KEY]) {\n      return false;\n    }\n\n    const initial = canvas[EXPANDO_KEY].initial;\n    ['height', 'width'].forEach(prop => {\n      const value = initial[prop];\n\n      if (isNullOrUndef(value)) {\n        canvas.removeAttribute(prop);\n      } else {\n        canvas.setAttribute(prop, value);\n      }\n    });\n    const style = initial.style || {};\n    Object.keys(style).forEach(key => {\n      canvas.style[key] = style[key];\n    });\n    canvas.width = canvas.width;\n    delete canvas[EXPANDO_KEY];\n    return true;\n  }\n\n  addEventListener(chart, type, listener) {\n    this.removeEventListener(chart, type);\n    const proxies = chart.$proxies || (chart.$proxies = {});\n    const handlers = {\n      attach: createAttachObserver,\n      detach: createDetachObserver,\n      resize: createResizeObserver\n    };\n    const handler = handlers[type] || createProxyAndListen;\n    proxies[type] = handler(chart, type, listener);\n  }\n\n  removeEventListener(chart, type) {\n    const proxies = chart.$proxies || (chart.$proxies = {});\n    const proxy = proxies[type];\n\n    if (!proxy) {\n      return;\n    }\n\n    const handlers = {\n      attach: releaseObserver,\n      detach: releaseObserver,\n      resize: releaseObserver\n    };\n    const handler = handlers[type] || removeListener;\n    handler(chart, type, proxy);\n    proxies[type] = undefined;\n  }\n\n  getDevicePixelRatio() {\n    return window.devicePixelRatio;\n  }\n\n  getMaximumSize(canvas, width, height, aspectRatio) {\n    return getMaximumSize(canvas, width, height, aspectRatio);\n  }\n\n  isAttached(canvas) {\n    const container = _getParentNode(canvas);\n\n    return !!(container && container.isConnected);\n  }\n\n}\n\nfunction _detectPlatform(canvas) {\n  if (!_isDomSupported() || typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas) {\n    return BasicPlatform;\n  }\n\n  return DomPlatform;\n}\n\nclass PluginService {\n  constructor() {\n    this._init = [];\n  }\n\n  notify(chart, hook, args, filter) {\n    if (hook === 'beforeInit') {\n      this._init = this._createDescriptors(chart, true);\n\n      this._notify(this._init, chart, 'install');\n    }\n\n    const descriptors = filter ? this._descriptors(chart).filter(filter) : this._descriptors(chart);\n\n    const result = this._notify(descriptors, chart, hook, args);\n\n    if (hook === 'afterDestroy') {\n      this._notify(descriptors, chart, 'stop');\n\n      this._notify(this._init, chart, 'uninstall');\n    }\n\n    return result;\n  }\n\n  _notify(descriptors, chart, hook, args) {\n    args = args || {};\n\n    for (const descriptor of descriptors) {\n      const plugin = descriptor.plugin;\n      const method = plugin[hook];\n      const params = [chart, args, descriptor.options];\n\n      if (callback(method, params, plugin) === false && args.cancelable) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  invalidate() {\n    if (!isNullOrUndef(this._cache)) {\n      this._oldCache = this._cache;\n      this._cache = undefined;\n    }\n  }\n\n  _descriptors(chart) {\n    if (this._cache) {\n      return this._cache;\n    }\n\n    const descriptors = this._cache = this._createDescriptors(chart);\n\n    this._notifyStateChanges(chart);\n\n    return descriptors;\n  }\n\n  _createDescriptors(chart, all) {\n    const config = chart && chart.config;\n    const options = valueOrDefault(config.options && config.options.plugins, {});\n    const plugins = allPlugins(config);\n    return options === false && !all ? [] : createDescriptors(chart, plugins, options, all);\n  }\n\n  _notifyStateChanges(chart) {\n    const previousDescriptors = this._oldCache || [];\n    const descriptors = this._cache;\n\n    const diff = (a, b) => a.filter(x => !b.some(y => x.plugin.id === y.plugin.id));\n\n    this._notify(diff(previousDescriptors, descriptors), chart, 'stop');\n\n    this._notify(diff(descriptors, previousDescriptors), chart, 'start');\n  }\n\n}\n\nfunction allPlugins(config) {\n  const localIds = {};\n  const plugins = [];\n  const keys = Object.keys(registry.plugins.items);\n\n  for (let i = 0; i < keys.length; i++) {\n    plugins.push(registry.getPlugin(keys[i]));\n  }\n\n  const local = config.plugins || [];\n\n  for (let i = 0; i < local.length; i++) {\n    const plugin = local[i];\n\n    if (plugins.indexOf(plugin) === -1) {\n      plugins.push(plugin);\n      localIds[plugin.id] = true;\n    }\n  }\n\n  return {\n    plugins,\n    localIds\n  };\n}\n\nfunction getOpts(options, all) {\n  if (!all && options === false) {\n    return null;\n  }\n\n  if (options === true) {\n    return {};\n  }\n\n  return options;\n}\n\nfunction createDescriptors(chart, _ref4, options, all) {\n  let plugins = _ref4.plugins,\n      localIds = _ref4.localIds;\n  const result = [];\n  const context = chart.getContext();\n\n  for (const plugin of plugins) {\n    const id = plugin.id;\n    const opts = getOpts(options[id], all);\n\n    if (opts === null) {\n      continue;\n    }\n\n    result.push({\n      plugin,\n      options: pluginOpts(chart.config, {\n        plugin,\n        local: localIds[id]\n      }, opts, context)\n    });\n  }\n\n  return result;\n}\n\nfunction pluginOpts(config, _ref5, opts, context) {\n  let plugin = _ref5.plugin,\n      local = _ref5.local;\n  const keys = config.pluginScopeKeys(plugin);\n  const scopes = config.getOptionScopes(opts, keys);\n\n  if (local && plugin.defaults) {\n    scopes.push(plugin.defaults);\n  }\n\n  return config.createResolver(scopes, context, [''], {\n    scriptable: false,\n    indexable: false,\n    allKeys: true\n  });\n}\n\nfunction getIndexAxis(type, options) {\n  const datasetDefaults = defaults.datasets[type] || {};\n  const datasetOptions = (options.datasets || {})[type] || {};\n  return datasetOptions.indexAxis || options.indexAxis || datasetDefaults.indexAxis || 'x';\n}\n\nfunction getAxisFromDefaultScaleID(id, indexAxis) {\n  let axis = id;\n\n  if (id === '_index_') {\n    axis = indexAxis;\n  } else if (id === '_value_') {\n    axis = indexAxis === 'x' ? 'y' : 'x';\n  }\n\n  return axis;\n}\n\nfunction getDefaultScaleIDFromAxis(axis, indexAxis) {\n  return axis === indexAxis ? '_index_' : '_value_';\n}\n\nfunction axisFromPosition(position) {\n  if (position === 'top' || position === 'bottom') {\n    return 'x';\n  }\n\n  if (position === 'left' || position === 'right') {\n    return 'y';\n  }\n}\n\nfunction determineAxis(id, scaleOptions) {\n  if (id === 'x' || id === 'y') {\n    return id;\n  }\n\n  return scaleOptions.axis || axisFromPosition(scaleOptions.position) || id.charAt(0).toLowerCase();\n}\n\nfunction mergeScaleConfig(config, options) {\n  const chartDefaults = overrides[config.type] || {\n    scales: {}\n  };\n  const configScales = options.scales || {};\n  const chartIndexAxis = getIndexAxis(config.type, options);\n  const firstIDs = Object.create(null);\n  const scales = Object.create(null);\n  Object.keys(configScales).forEach(id => {\n    const scaleConf = configScales[id];\n\n    if (!isObject(scaleConf)) {\n      return console.error(\"Invalid scale configuration for scale: \".concat(id));\n    }\n\n    if (scaleConf._proxy) {\n      return console.warn(\"Ignoring resolver passed as options for scale: \".concat(id));\n    }\n\n    const axis = determineAxis(id, scaleConf);\n    const defaultId = getDefaultScaleIDFromAxis(axis, chartIndexAxis);\n    const defaultScaleOptions = chartDefaults.scales || {};\n    firstIDs[axis] = firstIDs[axis] || id;\n    scales[id] = mergeIf(Object.create(null), [{\n      axis\n    }, scaleConf, defaultScaleOptions[axis], defaultScaleOptions[defaultId]]);\n  });\n  config.data.datasets.forEach(dataset => {\n    const type = dataset.type || config.type;\n    const indexAxis = dataset.indexAxis || getIndexAxis(type, options);\n    const datasetDefaults = overrides[type] || {};\n    const defaultScaleOptions = datasetDefaults.scales || {};\n    Object.keys(defaultScaleOptions).forEach(defaultID => {\n      const axis = getAxisFromDefaultScaleID(defaultID, indexAxis);\n      const id = dataset[axis + 'AxisID'] || firstIDs[axis] || axis;\n      scales[id] = scales[id] || Object.create(null);\n      mergeIf(scales[id], [{\n        axis\n      }, configScales[id], defaultScaleOptions[defaultID]]);\n    });\n  });\n  Object.keys(scales).forEach(key => {\n    const scale = scales[key];\n    mergeIf(scale, [defaults.scales[scale.type], defaults.scale]);\n  });\n  return scales;\n}\n\nfunction initOptions(config) {\n  const options = config.options || (config.options = {});\n  options.plugins = valueOrDefault(options.plugins, {});\n  options.scales = mergeScaleConfig(config, options);\n}\n\nfunction initData(data) {\n  data = data || {};\n  data.datasets = data.datasets || [];\n  data.labels = data.labels || [];\n  return data;\n}\n\nfunction initConfig(config) {\n  config = config || {};\n  config.data = initData(config.data);\n  initOptions(config);\n  return config;\n}\n\nconst keyCache = new Map();\nconst keysCached = new Set();\n\nfunction cachedKeys(cacheKey, generate) {\n  let keys = keyCache.get(cacheKey);\n\n  if (!keys) {\n    keys = generate();\n    keyCache.set(cacheKey, keys);\n    keysCached.add(keys);\n  }\n\n  return keys;\n}\n\nconst addIfFound = (set, obj, key) => {\n  const opts = resolveObjectKey(obj, key);\n\n  if (opts !== undefined) {\n    set.add(opts);\n  }\n};\n\nclass Config {\n  constructor(config) {\n    this._config = initConfig(config);\n    this._scopeCache = new Map();\n    this._resolverCache = new Map();\n  }\n\n  get platform() {\n    return this._config.platform;\n  }\n\n  get type() {\n    return this._config.type;\n  }\n\n  set type(type) {\n    this._config.type = type;\n  }\n\n  get data() {\n    return this._config.data;\n  }\n\n  set data(data) {\n    this._config.data = initData(data);\n  }\n\n  get options() {\n    return this._config.options;\n  }\n\n  set options(options) {\n    this._config.options = options;\n  }\n\n  get plugins() {\n    return this._config.plugins;\n  }\n\n  update() {\n    const config = this._config;\n    this.clearCache();\n    initOptions(config);\n  }\n\n  clearCache() {\n    this._scopeCache.clear();\n\n    this._resolverCache.clear();\n  }\n\n  datasetScopeKeys(datasetType) {\n    return cachedKeys(datasetType, () => [[\"datasets.\".concat(datasetType), '']]);\n  }\n\n  datasetAnimationScopeKeys(datasetType, transition) {\n    return cachedKeys(\"\".concat(datasetType, \".transition.\").concat(transition), () => [[\"datasets.\".concat(datasetType, \".transitions.\").concat(transition), \"transitions.\".concat(transition)], [\"datasets.\".concat(datasetType), '']]);\n  }\n\n  datasetElementScopeKeys(datasetType, elementType) {\n    return cachedKeys(\"\".concat(datasetType, \"-\").concat(elementType), () => [[\"datasets.\".concat(datasetType, \".elements.\").concat(elementType), \"datasets.\".concat(datasetType), \"elements.\".concat(elementType), '']]);\n  }\n\n  pluginScopeKeys(plugin) {\n    const id = plugin.id;\n    const type = this.type;\n    return cachedKeys(\"\".concat(type, \"-plugin-\").concat(id), () => [[\"plugins.\".concat(id), ...(plugin.additionalOptionScopes || [])]]);\n  }\n\n  _cachedScopes(mainScope, resetCache) {\n    const _scopeCache = this._scopeCache;\n\n    let cache = _scopeCache.get(mainScope);\n\n    if (!cache || resetCache) {\n      cache = new Map();\n\n      _scopeCache.set(mainScope, cache);\n    }\n\n    return cache;\n  }\n\n  getOptionScopes(mainScope, keyLists, resetCache) {\n    const options = this.options,\n          type = this.type;\n\n    const cache = this._cachedScopes(mainScope, resetCache);\n\n    const cached = cache.get(keyLists);\n\n    if (cached) {\n      return cached;\n    }\n\n    const scopes = new Set();\n    keyLists.forEach(keys => {\n      if (mainScope) {\n        scopes.add(mainScope);\n        keys.forEach(key => addIfFound(scopes, mainScope, key));\n      }\n\n      keys.forEach(key => addIfFound(scopes, options, key));\n      keys.forEach(key => addIfFound(scopes, overrides[type] || {}, key));\n      keys.forEach(key => addIfFound(scopes, defaults, key));\n      keys.forEach(key => addIfFound(scopes, descriptors, key));\n    });\n    const array = Array.from(scopes);\n\n    if (array.length === 0) {\n      array.push(Object.create(null));\n    }\n\n    if (keysCached.has(keyLists)) {\n      cache.set(keyLists, array);\n    }\n\n    return array;\n  }\n\n  chartOptionScopes() {\n    const options = this.options,\n          type = this.type;\n    return [options, overrides[type] || {}, defaults.datasets[type] || {}, {\n      type\n    }, defaults, descriptors];\n  }\n\n  resolveNamedOptions(scopes, names, context) {\n    let prefixes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [''];\n    const result = {\n      $shared: true\n    };\n\n    const _getResolver = getResolver(this._resolverCache, scopes, prefixes),\n          resolver = _getResolver.resolver,\n          subPrefixes = _getResolver.subPrefixes;\n\n    let options = resolver;\n\n    if (needContext(resolver, names)) {\n      result.$shared = false;\n      context = isFunction(context) ? context() : context;\n      const subResolver = this.createResolver(scopes, context, subPrefixes);\n      options = _attachContext(resolver, context, subResolver);\n    }\n\n    for (const prop of names) {\n      result[prop] = options[prop];\n    }\n\n    return result;\n  }\n\n  createResolver(scopes, context) {\n    let prefixes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [''];\n    let descriptorDefaults = arguments.length > 3 ? arguments[3] : undefined;\n\n    const _getResolver2 = getResolver(this._resolverCache, scopes, prefixes),\n          resolver = _getResolver2.resolver;\n\n    return isObject(context) ? _attachContext(resolver, context, undefined, descriptorDefaults) : resolver;\n  }\n\n}\n\nfunction getResolver(resolverCache, scopes, prefixes) {\n  let cache = resolverCache.get(scopes);\n\n  if (!cache) {\n    cache = new Map();\n    resolverCache.set(scopes, cache);\n  }\n\n  const cacheKey = prefixes.join();\n  let cached = cache.get(cacheKey);\n\n  if (!cached) {\n    const resolver = _createResolver(scopes, prefixes);\n\n    cached = {\n      resolver,\n      subPrefixes: prefixes.filter(p => !p.toLowerCase().includes('hover'))\n    };\n    cache.set(cacheKey, cached);\n  }\n\n  return cached;\n}\n\nconst hasFunction = value => isObject(value) && Object.getOwnPropertyNames(value).reduce((acc, key) => acc || isFunction(value[key]), false);\n\nfunction needContext(proxy, names) {\n  const _descriptors2 = _descriptors(proxy),\n        isScriptable = _descriptors2.isScriptable,\n        isIndexable = _descriptors2.isIndexable;\n\n  for (const prop of names) {\n    const scriptable = isScriptable(prop);\n    const indexable = isIndexable(prop);\n    const value = (indexable || scriptable) && proxy[prop];\n\n    if (scriptable && (isFunction(value) || hasFunction(value)) || indexable && isArray(value)) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nvar version = \"3.9.1\";\nconst KNOWN_POSITIONS = ['top', 'bottom', 'left', 'right', 'chartArea'];\n\nfunction positionIsHorizontal(position, axis) {\n  return position === 'top' || position === 'bottom' || KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x';\n}\n\nfunction compare2Level(l1, l2) {\n  return function (a, b) {\n    return a[l1] === b[l1] ? a[l2] - b[l2] : a[l1] - b[l1];\n  };\n}\n\nfunction onAnimationsComplete(context) {\n  const chart = context.chart;\n  const animationOptions = chart.options.animation;\n  chart.notifyPlugins('afterRender');\n  callback(animationOptions && animationOptions.onComplete, [context], chart);\n}\n\nfunction onAnimationProgress(context) {\n  const chart = context.chart;\n  const animationOptions = chart.options.animation;\n  callback(animationOptions && animationOptions.onProgress, [context], chart);\n}\n\nfunction getCanvas(item) {\n  if (_isDomSupported() && typeof item === 'string') {\n    item = document.getElementById(item);\n  } else if (item && item.length) {\n    item = item[0];\n  }\n\n  if (item && item.canvas) {\n    item = item.canvas;\n  }\n\n  return item;\n}\n\nconst instances = {};\n\nconst getChart = key => {\n  const canvas = getCanvas(key);\n  return Object.values(instances).filter(c => c.canvas === canvas).pop();\n};\n\nfunction moveNumericKeys(obj, start, move) {\n  const keys = Object.keys(obj);\n\n  for (const key of keys) {\n    const intKey = +key;\n\n    if (intKey >= start) {\n      const value = obj[key];\n      delete obj[key];\n\n      if (move > 0 || intKey > start) {\n        obj[intKey + move] = value;\n      }\n    }\n  }\n}\n\nfunction determineLastEvent(e, lastEvent, inChartArea, isClick) {\n  if (!inChartArea || e.type === 'mouseout') {\n    return null;\n  }\n\n  if (isClick) {\n    return lastEvent;\n  }\n\n  return e;\n}\n\nclass Chart {\n  constructor(item, userConfig) {\n    const config = this.config = new Config(userConfig);\n    const initialCanvas = getCanvas(item);\n    const existingChart = getChart(initialCanvas);\n\n    if (existingChart) {\n      throw new Error('Canvas is already in use. Chart with ID \\'' + existingChart.id + '\\'' + ' must be destroyed before the canvas with ID \\'' + existingChart.canvas.id + '\\' can be reused.');\n    }\n\n    const options = config.createResolver(config.chartOptionScopes(), this.getContext());\n    this.platform = new (config.platform || _detectPlatform(initialCanvas))();\n    this.platform.updateConfig(config);\n    const context = this.platform.acquireContext(initialCanvas, options.aspectRatio);\n    const canvas = context && context.canvas;\n    const height = canvas && canvas.height;\n    const width = canvas && canvas.width;\n    this.id = uid();\n    this.ctx = context;\n    this.canvas = canvas;\n    this.width = width;\n    this.height = height;\n    this._options = options;\n    this._aspectRatio = this.aspectRatio;\n    this._layers = [];\n    this._metasets = [];\n    this._stacks = undefined;\n    this.boxes = [];\n    this.currentDevicePixelRatio = undefined;\n    this.chartArea = undefined;\n    this._active = [];\n    this._lastEvent = undefined;\n    this._listeners = {};\n    this._responsiveListeners = undefined;\n    this._sortedMetasets = [];\n    this.scales = {};\n    this._plugins = new PluginService();\n    this.$proxies = {};\n    this._hiddenIndices = {};\n    this.attached = false;\n    this._animationsDisabled = undefined;\n    this.$context = undefined;\n    this._doResize = debounce(mode => this.update(mode), options.resizeDelay || 0);\n    this._dataChanges = [];\n    instances[this.id] = this;\n\n    if (!context || !canvas) {\n      console.error(\"Failed to create chart: can't acquire context from the given item\");\n      return;\n    }\n\n    animator.listen(this, 'complete', onAnimationsComplete);\n    animator.listen(this, 'progress', onAnimationProgress);\n\n    this._initialize();\n\n    if (this.attached) {\n      this.update();\n    }\n  }\n\n  get aspectRatio() {\n    const _this$options11 = this.options,\n          aspectRatio = _this$options11.aspectRatio,\n          maintainAspectRatio = _this$options11.maintainAspectRatio,\n          width = this.width,\n          height = this.height,\n          _aspectRatio = this._aspectRatio;\n\n    if (!isNullOrUndef(aspectRatio)) {\n      return aspectRatio;\n    }\n\n    if (maintainAspectRatio && _aspectRatio) {\n      return _aspectRatio;\n    }\n\n    return height ? width / height : null;\n  }\n\n  get data() {\n    return this.config.data;\n  }\n\n  set data(data) {\n    this.config.data = data;\n  }\n\n  get options() {\n    return this._options;\n  }\n\n  set options(options) {\n    this.config.options = options;\n  }\n\n  _initialize() {\n    this.notifyPlugins('beforeInit');\n\n    if (this.options.responsive) {\n      this.resize();\n    } else {\n      retinaScale(this, this.options.devicePixelRatio);\n    }\n\n    this.bindEvents();\n    this.notifyPlugins('afterInit');\n    return this;\n  }\n\n  clear() {\n    clearCanvas(this.canvas, this.ctx);\n    return this;\n  }\n\n  stop() {\n    animator.stop(this);\n    return this;\n  }\n\n  resize(width, height) {\n    if (!animator.running(this)) {\n      this._resize(width, height);\n    } else {\n      this._resizeBeforeDraw = {\n        width,\n        height\n      };\n    }\n  }\n\n  _resize(width, height) {\n    const options = this.options;\n    const canvas = this.canvas;\n    const aspectRatio = options.maintainAspectRatio && this.aspectRatio;\n    const newSize = this.platform.getMaximumSize(canvas, width, height, aspectRatio);\n    const newRatio = options.devicePixelRatio || this.platform.getDevicePixelRatio();\n    const mode = this.width ? 'resize' : 'attach';\n    this.width = newSize.width;\n    this.height = newSize.height;\n    this._aspectRatio = this.aspectRatio;\n\n    if (!retinaScale(this, newRatio, true)) {\n      return;\n    }\n\n    this.notifyPlugins('resize', {\n      size: newSize\n    });\n    callback(options.onResize, [this, newSize], this);\n\n    if (this.attached) {\n      if (this._doResize(mode)) {\n        this.render();\n      }\n    }\n  }\n\n  ensureScalesHaveIDs() {\n    const options = this.options;\n    const scalesOptions = options.scales || {};\n    each(scalesOptions, (axisOptions, axisID) => {\n      axisOptions.id = axisID;\n    });\n  }\n\n  buildOrUpdateScales() {\n    const options = this.options;\n    const scaleOpts = options.scales;\n    const scales = this.scales;\n    const updated = Object.keys(scales).reduce((obj, id) => {\n      obj[id] = false;\n      return obj;\n    }, {});\n    let items = [];\n\n    if (scaleOpts) {\n      items = items.concat(Object.keys(scaleOpts).map(id => {\n        const scaleOptions = scaleOpts[id];\n        const axis = determineAxis(id, scaleOptions);\n        const isRadial = axis === 'r';\n        const isHorizontal = axis === 'x';\n        return {\n          options: scaleOptions,\n          dposition: isRadial ? 'chartArea' : isHorizontal ? 'bottom' : 'left',\n          dtype: isRadial ? 'radialLinear' : isHorizontal ? 'category' : 'linear'\n        };\n      }));\n    }\n\n    each(items, item => {\n      const scaleOptions = item.options;\n      const id = scaleOptions.id;\n      const axis = determineAxis(id, scaleOptions);\n      const scaleType = valueOrDefault(scaleOptions.type, item.dtype);\n\n      if (scaleOptions.position === undefined || positionIsHorizontal(scaleOptions.position, axis) !== positionIsHorizontal(item.dposition)) {\n        scaleOptions.position = item.dposition;\n      }\n\n      updated[id] = true;\n      let scale = null;\n\n      if (id in scales && scales[id].type === scaleType) {\n        scale = scales[id];\n      } else {\n        const scaleClass = registry.getScale(scaleType);\n        scale = new scaleClass({\n          id,\n          type: scaleType,\n          ctx: this.ctx,\n          chart: this\n        });\n        scales[scale.id] = scale;\n      }\n\n      scale.init(scaleOptions, options);\n    });\n    each(updated, (hasUpdated, id) => {\n      if (!hasUpdated) {\n        delete scales[id];\n      }\n    });\n    each(scales, scale => {\n      layouts.configure(this, scale, scale.options);\n      layouts.addBox(this, scale);\n    });\n  }\n\n  _updateMetasets() {\n    const metasets = this._metasets;\n    const numData = this.data.datasets.length;\n    const numMeta = metasets.length;\n    metasets.sort((a, b) => a.index - b.index);\n\n    if (numMeta > numData) {\n      for (let i = numData; i < numMeta; ++i) {\n        this._destroyDatasetMeta(i);\n      }\n\n      metasets.splice(numData, numMeta - numData);\n    }\n\n    this._sortedMetasets = metasets.slice(0).sort(compare2Level('order', 'index'));\n  }\n\n  _removeUnreferencedMetasets() {\n    const metasets = this._metasets,\n          datasets = this.data.datasets;\n\n    if (metasets.length > datasets.length) {\n      delete this._stacks;\n    }\n\n    metasets.forEach((meta, index) => {\n      if (datasets.filter(x => x === meta._dataset).length === 0) {\n        this._destroyDatasetMeta(index);\n      }\n    });\n  }\n\n  buildOrUpdateControllers() {\n    const newControllers = [];\n    const datasets = this.data.datasets;\n    let i, ilen;\n\n    this._removeUnreferencedMetasets();\n\n    for (i = 0, ilen = datasets.length; i < ilen; i++) {\n      const dataset = datasets[i];\n      let meta = this.getDatasetMeta(i);\n      const type = dataset.type || this.config.type;\n\n      if (meta.type && meta.type !== type) {\n        this._destroyDatasetMeta(i);\n\n        meta = this.getDatasetMeta(i);\n      }\n\n      meta.type = type;\n      meta.indexAxis = dataset.indexAxis || getIndexAxis(type, this.options);\n      meta.order = dataset.order || 0;\n      meta.index = i;\n      meta.label = '' + dataset.label;\n      meta.visible = this.isDatasetVisible(i);\n\n      if (meta.controller) {\n        meta.controller.updateIndex(i);\n        meta.controller.linkScales();\n      } else {\n        const ControllerClass = registry.getController(type);\n        const _defaults$datasets$ty = defaults.datasets[type],\n              datasetElementType = _defaults$datasets$ty.datasetElementType,\n              dataElementType = _defaults$datasets$ty.dataElementType;\n        Object.assign(ControllerClass.prototype, {\n          dataElementType: registry.getElement(dataElementType),\n          datasetElementType: datasetElementType && registry.getElement(datasetElementType)\n        });\n        meta.controller = new ControllerClass(this, i);\n        newControllers.push(meta.controller);\n      }\n    }\n\n    this._updateMetasets();\n\n    return newControllers;\n  }\n\n  _resetElements() {\n    each(this.data.datasets, (dataset, datasetIndex) => {\n      this.getDatasetMeta(datasetIndex).controller.reset();\n    }, this);\n  }\n\n  reset() {\n    this._resetElements();\n\n    this.notifyPlugins('reset');\n  }\n\n  update(mode) {\n    const config = this.config;\n    config.update();\n    const options = this._options = config.createResolver(config.chartOptionScopes(), this.getContext());\n    const animsDisabled = this._animationsDisabled = !options.animation;\n\n    this._updateScales();\n\n    this._checkEventBindings();\n\n    this._updateHiddenIndices();\n\n    this._plugins.invalidate();\n\n    if (this.notifyPlugins('beforeUpdate', {\n      mode,\n      cancelable: true\n    }) === false) {\n      return;\n    }\n\n    const newControllers = this.buildOrUpdateControllers();\n    this.notifyPlugins('beforeElementsUpdate');\n    let minPadding = 0;\n\n    for (let i = 0, ilen = this.data.datasets.length; i < ilen; i++) {\n      const _this$getDatasetMeta = this.getDatasetMeta(i),\n            controller = _this$getDatasetMeta.controller;\n\n      const reset = !animsDisabled && newControllers.indexOf(controller) === -1;\n      controller.buildOrUpdateElements(reset);\n      minPadding = Math.max(+controller.getMaxOverflow(), minPadding);\n    }\n\n    minPadding = this._minPadding = options.layout.autoPadding ? minPadding : 0;\n\n    this._updateLayout(minPadding);\n\n    if (!animsDisabled) {\n      each(newControllers, controller => {\n        controller.reset();\n      });\n    }\n\n    this._updateDatasets(mode);\n\n    this.notifyPlugins('afterUpdate', {\n      mode\n    });\n\n    this._layers.sort(compare2Level('z', '_idx'));\n\n    const _active = this._active,\n          _lastEvent = this._lastEvent;\n\n    if (_lastEvent) {\n      this._eventHandler(_lastEvent, true);\n    } else if (_active.length) {\n      this._updateHoverStyles(_active, _active, true);\n    }\n\n    this.render();\n  }\n\n  _updateScales() {\n    each(this.scales, scale => {\n      layouts.removeBox(this, scale);\n    });\n    this.ensureScalesHaveIDs();\n    this.buildOrUpdateScales();\n  }\n\n  _checkEventBindings() {\n    const options = this.options;\n    const existingEvents = new Set(Object.keys(this._listeners));\n    const newEvents = new Set(options.events);\n\n    if (!setsEqual(existingEvents, newEvents) || !!this._responsiveListeners !== options.responsive) {\n      this.unbindEvents();\n      this.bindEvents();\n    }\n  }\n\n  _updateHiddenIndices() {\n    const _hiddenIndices = this._hiddenIndices;\n    const changes = this._getUniformDataChanges() || [];\n\n    for (const _ref6 of changes) {\n      const method = _ref6.method;\n      const start = _ref6.start;\n      const count = _ref6.count;\n      const move = method === '_removeElements' ? -count : count;\n      moveNumericKeys(_hiddenIndices, start, move);\n    }\n  }\n\n  _getUniformDataChanges() {\n    const _dataChanges = this._dataChanges;\n\n    if (!_dataChanges || !_dataChanges.length) {\n      return;\n    }\n\n    this._dataChanges = [];\n    const datasetCount = this.data.datasets.length;\n\n    const makeSet = idx => new Set(_dataChanges.filter(c => c[0] === idx).map((c, i) => i + ',' + c.splice(1).join(',')));\n\n    const changeSet = makeSet(0);\n\n    for (let i = 1; i < datasetCount; i++) {\n      if (!setsEqual(changeSet, makeSet(i))) {\n        return;\n      }\n    }\n\n    return Array.from(changeSet).map(c => c.split(',')).map(a => ({\n      method: a[1],\n      start: +a[2],\n      count: +a[3]\n    }));\n  }\n\n  _updateLayout(minPadding) {\n    if (this.notifyPlugins('beforeLayout', {\n      cancelable: true\n    }) === false) {\n      return;\n    }\n\n    layouts.update(this, this.width, this.height, minPadding);\n    const area = this.chartArea;\n    const noArea = area.width <= 0 || area.height <= 0;\n    this._layers = [];\n    each(this.boxes, box => {\n      if (noArea && box.position === 'chartArea') {\n        return;\n      }\n\n      if (box.configure) {\n        box.configure();\n      }\n\n      this._layers.push(...box._layers());\n    }, this);\n\n    this._layers.forEach((item, index) => {\n      item._idx = index;\n    });\n\n    this.notifyPlugins('afterLayout');\n  }\n\n  _updateDatasets(mode) {\n    if (this.notifyPlugins('beforeDatasetsUpdate', {\n      mode,\n      cancelable: true\n    }) === false) {\n      return;\n    }\n\n    for (let i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\n      this.getDatasetMeta(i).controller.configure();\n    }\n\n    for (let i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\n      this._updateDataset(i, isFunction(mode) ? mode({\n        datasetIndex: i\n      }) : mode);\n    }\n\n    this.notifyPlugins('afterDatasetsUpdate', {\n      mode\n    });\n  }\n\n  _updateDataset(index, mode) {\n    const meta = this.getDatasetMeta(index);\n    const args = {\n      meta,\n      index,\n      mode,\n      cancelable: true\n    };\n\n    if (this.notifyPlugins('beforeDatasetUpdate', args) === false) {\n      return;\n    }\n\n    meta.controller._update(mode);\n\n    args.cancelable = false;\n    this.notifyPlugins('afterDatasetUpdate', args);\n  }\n\n  render() {\n    if (this.notifyPlugins('beforeRender', {\n      cancelable: true\n    }) === false) {\n      return;\n    }\n\n    if (animator.has(this)) {\n      if (this.attached && !animator.running(this)) {\n        animator.start(this);\n      }\n    } else {\n      this.draw();\n      onAnimationsComplete({\n        chart: this\n      });\n    }\n  }\n\n  draw() {\n    let i;\n\n    if (this._resizeBeforeDraw) {\n      const _this$_resizeBeforeDr = this._resizeBeforeDraw,\n            width = _this$_resizeBeforeDr.width,\n            height = _this$_resizeBeforeDr.height;\n\n      this._resize(width, height);\n\n      this._resizeBeforeDraw = null;\n    }\n\n    this.clear();\n\n    if (this.width <= 0 || this.height <= 0) {\n      return;\n    }\n\n    if (this.notifyPlugins('beforeDraw', {\n      cancelable: true\n    }) === false) {\n      return;\n    }\n\n    const layers = this._layers;\n\n    for (i = 0; i < layers.length && layers[i].z <= 0; ++i) {\n      layers[i].draw(this.chartArea);\n    }\n\n    this._drawDatasets();\n\n    for (; i < layers.length; ++i) {\n      layers[i].draw(this.chartArea);\n    }\n\n    this.notifyPlugins('afterDraw');\n  }\n\n  _getSortedDatasetMetas(filterVisible) {\n    const metasets = this._sortedMetasets;\n    const result = [];\n    let i, ilen;\n\n    for (i = 0, ilen = metasets.length; i < ilen; ++i) {\n      const meta = metasets[i];\n\n      if (!filterVisible || meta.visible) {\n        result.push(meta);\n      }\n    }\n\n    return result;\n  }\n\n  getSortedVisibleDatasetMetas() {\n    return this._getSortedDatasetMetas(true);\n  }\n\n  _drawDatasets() {\n    if (this.notifyPlugins('beforeDatasetsDraw', {\n      cancelable: true\n    }) === false) {\n      return;\n    }\n\n    const metasets = this.getSortedVisibleDatasetMetas();\n\n    for (let i = metasets.length - 1; i >= 0; --i) {\n      this._drawDataset(metasets[i]);\n    }\n\n    this.notifyPlugins('afterDatasetsDraw');\n  }\n\n  _drawDataset(meta) {\n    const ctx = this.ctx;\n    const clip = meta._clip;\n    const useClip = !clip.disabled;\n    const area = this.chartArea;\n    const args = {\n      meta,\n      index: meta.index,\n      cancelable: true\n    };\n\n    if (this.notifyPlugins('beforeDatasetDraw', args) === false) {\n      return;\n    }\n\n    if (useClip) {\n      clipArea(ctx, {\n        left: clip.left === false ? 0 : area.left - clip.left,\n        right: clip.right === false ? this.width : area.right + clip.right,\n        top: clip.top === false ? 0 : area.top - clip.top,\n        bottom: clip.bottom === false ? this.height : area.bottom + clip.bottom\n      });\n    }\n\n    meta.controller.draw();\n\n    if (useClip) {\n      unclipArea(ctx);\n    }\n\n    args.cancelable = false;\n    this.notifyPlugins('afterDatasetDraw', args);\n  }\n\n  isPointInArea(point) {\n    return _isPointInArea(point, this.chartArea, this._minPadding);\n  }\n\n  getElementsAtEventForMode(e, mode, options, useFinalPosition) {\n    const method = Interaction.modes[mode];\n\n    if (typeof method === 'function') {\n      return method(this, e, options, useFinalPosition);\n    }\n\n    return [];\n  }\n\n  getDatasetMeta(datasetIndex) {\n    const dataset = this.data.datasets[datasetIndex];\n    const metasets = this._metasets;\n    let meta = metasets.filter(x => x && x._dataset === dataset).pop();\n\n    if (!meta) {\n      meta = {\n        type: null,\n        data: [],\n        dataset: null,\n        controller: null,\n        hidden: null,\n        xAxisID: null,\n        yAxisID: null,\n        order: dataset && dataset.order || 0,\n        index: datasetIndex,\n        _dataset: dataset,\n        _parsed: [],\n        _sorted: false\n      };\n      metasets.push(meta);\n    }\n\n    return meta;\n  }\n\n  getContext() {\n    return this.$context || (this.$context = createContext(null, {\n      chart: this,\n      type: 'chart'\n    }));\n  }\n\n  getVisibleDatasetCount() {\n    return this.getSortedVisibleDatasetMetas().length;\n  }\n\n  isDatasetVisible(datasetIndex) {\n    const dataset = this.data.datasets[datasetIndex];\n\n    if (!dataset) {\n      return false;\n    }\n\n    const meta = this.getDatasetMeta(datasetIndex);\n    return typeof meta.hidden === 'boolean' ? !meta.hidden : !dataset.hidden;\n  }\n\n  setDatasetVisibility(datasetIndex, visible) {\n    const meta = this.getDatasetMeta(datasetIndex);\n    meta.hidden = !visible;\n  }\n\n  toggleDataVisibility(index) {\n    this._hiddenIndices[index] = !this._hiddenIndices[index];\n  }\n\n  getDataVisibility(index) {\n    return !this._hiddenIndices[index];\n  }\n\n  _updateVisibility(datasetIndex, dataIndex, visible) {\n    const mode = visible ? 'show' : 'hide';\n    const meta = this.getDatasetMeta(datasetIndex);\n\n    const anims = meta.controller._resolveAnimations(undefined, mode);\n\n    if (defined(dataIndex)) {\n      meta.data[dataIndex].hidden = !visible;\n      this.update();\n    } else {\n      this.setDatasetVisibility(datasetIndex, visible);\n      anims.update(meta, {\n        visible\n      });\n      this.update(ctx => ctx.datasetIndex === datasetIndex ? mode : undefined);\n    }\n  }\n\n  hide(datasetIndex, dataIndex) {\n    this._updateVisibility(datasetIndex, dataIndex, false);\n  }\n\n  show(datasetIndex, dataIndex) {\n    this._updateVisibility(datasetIndex, dataIndex, true);\n  }\n\n  _destroyDatasetMeta(datasetIndex) {\n    const meta = this._metasets[datasetIndex];\n\n    if (meta && meta.controller) {\n      meta.controller._destroy();\n    }\n\n    delete this._metasets[datasetIndex];\n  }\n\n  _stop() {\n    let i, ilen;\n    this.stop();\n    animator.remove(this);\n\n    for (i = 0, ilen = this.data.datasets.length; i < ilen; ++i) {\n      this._destroyDatasetMeta(i);\n    }\n  }\n\n  destroy() {\n    this.notifyPlugins('beforeDestroy');\n    const canvas = this.canvas,\n          ctx = this.ctx;\n\n    this._stop();\n\n    this.config.clearCache();\n\n    if (canvas) {\n      this.unbindEvents();\n      clearCanvas(canvas, ctx);\n      this.platform.releaseContext(ctx);\n      this.canvas = null;\n      this.ctx = null;\n    }\n\n    this.notifyPlugins('destroy');\n    delete instances[this.id];\n    this.notifyPlugins('afterDestroy');\n  }\n\n  toBase64Image() {\n    return this.canvas.toDataURL(...arguments);\n  }\n\n  bindEvents() {\n    this.bindUserEvents();\n\n    if (this.options.responsive) {\n      this.bindResponsiveEvents();\n    } else {\n      this.attached = true;\n    }\n  }\n\n  bindUserEvents() {\n    const listeners = this._listeners;\n    const platform = this.platform;\n\n    const _add = (type, listener) => {\n      platform.addEventListener(this, type, listener);\n      listeners[type] = listener;\n    };\n\n    const listener = (e, x, y) => {\n      e.offsetX = x;\n      e.offsetY = y;\n\n      this._eventHandler(e);\n    };\n\n    each(this.options.events, type => _add(type, listener));\n  }\n\n  bindResponsiveEvents() {\n    if (!this._responsiveListeners) {\n      this._responsiveListeners = {};\n    }\n\n    const listeners = this._responsiveListeners;\n    const platform = this.platform;\n\n    const _add = (type, listener) => {\n      platform.addEventListener(this, type, listener);\n      listeners[type] = listener;\n    };\n\n    const _remove = (type, listener) => {\n      if (listeners[type]) {\n        platform.removeEventListener(this, type, listener);\n        delete listeners[type];\n      }\n    };\n\n    const listener = (width, height) => {\n      if (this.canvas) {\n        this.resize(width, height);\n      }\n    };\n\n    let detached;\n\n    const attached = () => {\n      _remove('attach', attached);\n\n      this.attached = true;\n      this.resize();\n\n      _add('resize', listener);\n\n      _add('detach', detached);\n    };\n\n    detached = () => {\n      this.attached = false;\n\n      _remove('resize', listener);\n\n      this._stop();\n\n      this._resize(0, 0);\n\n      _add('attach', attached);\n    };\n\n    if (platform.isAttached(this.canvas)) {\n      attached();\n    } else {\n      detached();\n    }\n  }\n\n  unbindEvents() {\n    each(this._listeners, (listener, type) => {\n      this.platform.removeEventListener(this, type, listener);\n    });\n    this._listeners = {};\n    each(this._responsiveListeners, (listener, type) => {\n      this.platform.removeEventListener(this, type, listener);\n    });\n    this._responsiveListeners = undefined;\n  }\n\n  updateHoverStyle(items, mode, enabled) {\n    const prefix = enabled ? 'set' : 'remove';\n    let meta, item, i, ilen;\n\n    if (mode === 'dataset') {\n      meta = this.getDatasetMeta(items[0].datasetIndex);\n      meta.controller['_' + prefix + 'DatasetHoverStyle']();\n    }\n\n    for (i = 0, ilen = items.length; i < ilen; ++i) {\n      item = items[i];\n      const controller = item && this.getDatasetMeta(item.datasetIndex).controller;\n\n      if (controller) {\n        controller[prefix + 'HoverStyle'](item.element, item.datasetIndex, item.index);\n      }\n    }\n  }\n\n  getActiveElements() {\n    return this._active || [];\n  }\n\n  setActiveElements(activeElements) {\n    const lastActive = this._active || [];\n    const active = activeElements.map(_ref7 => {\n      let datasetIndex = _ref7.datasetIndex,\n          index = _ref7.index;\n      const meta = this.getDatasetMeta(datasetIndex);\n\n      if (!meta) {\n        throw new Error('No dataset found at index ' + datasetIndex);\n      }\n\n      return {\n        datasetIndex,\n        element: meta.data[index],\n        index\n      };\n    });\n    const changed = !_elementsEqual(active, lastActive);\n\n    if (changed) {\n      this._active = active;\n      this._lastEvent = null;\n\n      this._updateHoverStyles(active, lastActive);\n    }\n  }\n\n  notifyPlugins(hook, args, filter) {\n    return this._plugins.notify(this, hook, args, filter);\n  }\n\n  _updateHoverStyles(active, lastActive, replay) {\n    const hoverOptions = this.options.hover;\n\n    const diff = (a, b) => a.filter(x => !b.some(y => x.datasetIndex === y.datasetIndex && x.index === y.index));\n\n    const deactivated = diff(lastActive, active);\n    const activated = replay ? active : diff(active, lastActive);\n\n    if (deactivated.length) {\n      this.updateHoverStyle(deactivated, hoverOptions.mode, false);\n    }\n\n    if (activated.length && hoverOptions.mode) {\n      this.updateHoverStyle(activated, hoverOptions.mode, true);\n    }\n  }\n\n  _eventHandler(e, replay) {\n    const args = {\n      event: e,\n      replay,\n      cancelable: true,\n      inChartArea: this.isPointInArea(e)\n    };\n\n    const eventFilter = plugin => (plugin.options.events || this.options.events).includes(e.native.type);\n\n    if (this.notifyPlugins('beforeEvent', args, eventFilter) === false) {\n      return;\n    }\n\n    const changed = this._handleEvent(e, replay, args.inChartArea);\n\n    args.cancelable = false;\n    this.notifyPlugins('afterEvent', args, eventFilter);\n\n    if (changed || args.changed) {\n      this.render();\n    }\n\n    return this;\n  }\n\n  _handleEvent(e, replay, inChartArea) {\n    const _this$_active = this._active,\n          lastActive = _this$_active === void 0 ? [] : _this$_active,\n          options = this.options;\n    const useFinalPosition = replay;\n\n    const active = this._getActiveElements(e, lastActive, inChartArea, useFinalPosition);\n\n    const isClick = _isClickEvent(e);\n\n    const lastEvent = determineLastEvent(e, this._lastEvent, inChartArea, isClick);\n\n    if (inChartArea) {\n      this._lastEvent = null;\n      callback(options.onHover, [e, active, this], this);\n\n      if (isClick) {\n        callback(options.onClick, [e, active, this], this);\n      }\n    }\n\n    const changed = !_elementsEqual(active, lastActive);\n\n    if (changed || replay) {\n      this._active = active;\n\n      this._updateHoverStyles(active, lastActive, replay);\n    }\n\n    this._lastEvent = lastEvent;\n    return changed;\n  }\n\n  _getActiveElements(e, lastActive, inChartArea, useFinalPosition) {\n    if (e.type === 'mouseout') {\n      return [];\n    }\n\n    if (!inChartArea) {\n      return lastActive;\n    }\n\n    const hoverOptions = this.options.hover;\n    return this.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions, useFinalPosition);\n  }\n\n}\n\nconst invalidatePlugins = () => each(Chart.instances, chart => chart._plugins.invalidate());\n\nconst enumerable = true;\nObject.defineProperties(Chart, {\n  defaults: {\n    enumerable,\n    value: defaults\n  },\n  instances: {\n    enumerable,\n    value: instances\n  },\n  overrides: {\n    enumerable,\n    value: overrides\n  },\n  registry: {\n    enumerable,\n    value: registry\n  },\n  version: {\n    enumerable,\n    value: version\n  },\n  getChart: {\n    enumerable,\n    value: getChart\n  },\n  register: {\n    enumerable,\n    value: function () {\n      registry.add(...arguments);\n      invalidatePlugins();\n    }\n  },\n  unregister: {\n    enumerable,\n    value: function () {\n      registry.remove(...arguments);\n      invalidatePlugins();\n    }\n  }\n});\n\nfunction clipArc(ctx, element, endAngle) {\n  const startAngle = element.startAngle,\n        pixelMargin = element.pixelMargin,\n        x = element.x,\n        y = element.y,\n        outerRadius = element.outerRadius,\n        innerRadius = element.innerRadius;\n  let angleMargin = pixelMargin / outerRadius;\n  ctx.beginPath();\n  ctx.arc(x, y, outerRadius, startAngle - angleMargin, endAngle + angleMargin);\n\n  if (innerRadius > pixelMargin) {\n    angleMargin = pixelMargin / innerRadius;\n    ctx.arc(x, y, innerRadius, endAngle + angleMargin, startAngle - angleMargin, true);\n  } else {\n    ctx.arc(x, y, pixelMargin, endAngle + HALF_PI, startAngle - HALF_PI);\n  }\n\n  ctx.closePath();\n  ctx.clip();\n}\n\nfunction toRadiusCorners(value) {\n  return _readValueToProps(value, ['outerStart', 'outerEnd', 'innerStart', 'innerEnd']);\n}\n\nfunction parseBorderRadius$1(arc, innerRadius, outerRadius, angleDelta) {\n  const o = toRadiusCorners(arc.options.borderRadius);\n  const halfThickness = (outerRadius - innerRadius) / 2;\n  const innerLimit = Math.min(halfThickness, angleDelta * innerRadius / 2);\n\n  const computeOuterLimit = val => {\n    const outerArcLimit = (outerRadius - Math.min(halfThickness, val)) * angleDelta / 2;\n    return _limitValue(val, 0, Math.min(halfThickness, outerArcLimit));\n  };\n\n  return {\n    outerStart: computeOuterLimit(o.outerStart),\n    outerEnd: computeOuterLimit(o.outerEnd),\n    innerStart: _limitValue(o.innerStart, 0, innerLimit),\n    innerEnd: _limitValue(o.innerEnd, 0, innerLimit)\n  };\n}\n\nfunction rThetaToXY(r, theta, x, y) {\n  return {\n    x: x + r * Math.cos(theta),\n    y: y + r * Math.sin(theta)\n  };\n}\n\nfunction pathArc(ctx, element, offset, spacing, end, circular) {\n  const x = element.x,\n        y = element.y,\n        start = element.startAngle,\n        pixelMargin = element.pixelMargin,\n        innerR = element.innerRadius;\n  const outerRadius = Math.max(element.outerRadius + spacing + offset - pixelMargin, 0);\n  const innerRadius = innerR > 0 ? innerR + spacing + offset + pixelMargin : 0;\n  let spacingOffset = 0;\n  const alpha = end - start;\n\n  if (spacing) {\n    const noSpacingInnerRadius = innerR > 0 ? innerR - spacing : 0;\n    const noSpacingOuterRadius = outerRadius > 0 ? outerRadius - spacing : 0;\n    const avNogSpacingRadius = (noSpacingInnerRadius + noSpacingOuterRadius) / 2;\n    const adjustedAngle = avNogSpacingRadius !== 0 ? alpha * avNogSpacingRadius / (avNogSpacingRadius + spacing) : alpha;\n    spacingOffset = (alpha - adjustedAngle) / 2;\n  }\n\n  const beta = Math.max(0.001, alpha * outerRadius - offset / PI) / outerRadius;\n  const angleOffset = (alpha - beta) / 2;\n  const startAngle = start + angleOffset + spacingOffset;\n  const endAngle = end - angleOffset - spacingOffset;\n\n  const _parseBorderRadius$ = parseBorderRadius$1(element, innerRadius, outerRadius, endAngle - startAngle),\n        outerStart = _parseBorderRadius$.outerStart,\n        outerEnd = _parseBorderRadius$.outerEnd,\n        innerStart = _parseBorderRadius$.innerStart,\n        innerEnd = _parseBorderRadius$.innerEnd;\n\n  const outerStartAdjustedRadius = outerRadius - outerStart;\n  const outerEndAdjustedRadius = outerRadius - outerEnd;\n  const outerStartAdjustedAngle = startAngle + outerStart / outerStartAdjustedRadius;\n  const outerEndAdjustedAngle = endAngle - outerEnd / outerEndAdjustedRadius;\n  const innerStartAdjustedRadius = innerRadius + innerStart;\n  const innerEndAdjustedRadius = innerRadius + innerEnd;\n  const innerStartAdjustedAngle = startAngle + innerStart / innerStartAdjustedRadius;\n  const innerEndAdjustedAngle = endAngle - innerEnd / innerEndAdjustedRadius;\n  ctx.beginPath();\n\n  if (circular) {\n    ctx.arc(x, y, outerRadius, outerStartAdjustedAngle, outerEndAdjustedAngle);\n\n    if (outerEnd > 0) {\n      const pCenter = rThetaToXY(outerEndAdjustedRadius, outerEndAdjustedAngle, x, y);\n      ctx.arc(pCenter.x, pCenter.y, outerEnd, outerEndAdjustedAngle, endAngle + HALF_PI);\n    }\n\n    const p4 = rThetaToXY(innerEndAdjustedRadius, endAngle, x, y);\n    ctx.lineTo(p4.x, p4.y);\n\n    if (innerEnd > 0) {\n      const pCenter = rThetaToXY(innerEndAdjustedRadius, innerEndAdjustedAngle, x, y);\n      ctx.arc(pCenter.x, pCenter.y, innerEnd, endAngle + HALF_PI, innerEndAdjustedAngle + Math.PI);\n    }\n\n    ctx.arc(x, y, innerRadius, endAngle - innerEnd / innerRadius, startAngle + innerStart / innerRadius, true);\n\n    if (innerStart > 0) {\n      const pCenter = rThetaToXY(innerStartAdjustedRadius, innerStartAdjustedAngle, x, y);\n      ctx.arc(pCenter.x, pCenter.y, innerStart, innerStartAdjustedAngle + Math.PI, startAngle - HALF_PI);\n    }\n\n    const p8 = rThetaToXY(outerStartAdjustedRadius, startAngle, x, y);\n    ctx.lineTo(p8.x, p8.y);\n\n    if (outerStart > 0) {\n      const pCenter = rThetaToXY(outerStartAdjustedRadius, outerStartAdjustedAngle, x, y);\n      ctx.arc(pCenter.x, pCenter.y, outerStart, startAngle - HALF_PI, outerStartAdjustedAngle);\n    }\n  } else {\n    ctx.moveTo(x, y);\n    const outerStartX = Math.cos(outerStartAdjustedAngle) * outerRadius + x;\n    const outerStartY = Math.sin(outerStartAdjustedAngle) * outerRadius + y;\n    ctx.lineTo(outerStartX, outerStartY);\n    const outerEndX = Math.cos(outerEndAdjustedAngle) * outerRadius + x;\n    const outerEndY = Math.sin(outerEndAdjustedAngle) * outerRadius + y;\n    ctx.lineTo(outerEndX, outerEndY);\n  }\n\n  ctx.closePath();\n}\n\nfunction drawArc(ctx, element, offset, spacing, circular) {\n  const fullCircles = element.fullCircles,\n        startAngle = element.startAngle,\n        circumference = element.circumference;\n  let endAngle = element.endAngle;\n\n  if (fullCircles) {\n    pathArc(ctx, element, offset, spacing, startAngle + TAU, circular);\n\n    for (let i = 0; i < fullCircles; ++i) {\n      ctx.fill();\n    }\n\n    if (!isNaN(circumference)) {\n      endAngle = startAngle + circumference % TAU;\n\n      if (circumference % TAU === 0) {\n        endAngle += TAU;\n      }\n    }\n  }\n\n  pathArc(ctx, element, offset, spacing, endAngle, circular);\n  ctx.fill();\n  return endAngle;\n}\n\nfunction drawFullCircleBorders(ctx, element, inner) {\n  const x = element.x,\n        y = element.y,\n        startAngle = element.startAngle,\n        pixelMargin = element.pixelMargin,\n        fullCircles = element.fullCircles;\n  const outerRadius = Math.max(element.outerRadius - pixelMargin, 0);\n  const innerRadius = element.innerRadius + pixelMargin;\n  let i;\n\n  if (inner) {\n    clipArc(ctx, element, startAngle + TAU);\n  }\n\n  ctx.beginPath();\n  ctx.arc(x, y, innerRadius, startAngle + TAU, startAngle, true);\n\n  for (i = 0; i < fullCircles; ++i) {\n    ctx.stroke();\n  }\n\n  ctx.beginPath();\n  ctx.arc(x, y, outerRadius, startAngle, startAngle + TAU);\n\n  for (i = 0; i < fullCircles; ++i) {\n    ctx.stroke();\n  }\n}\n\nfunction drawBorder(ctx, element, offset, spacing, endAngle, circular) {\n  const options = element.options;\n  const borderWidth = options.borderWidth,\n        borderJoinStyle = options.borderJoinStyle;\n  const inner = options.borderAlign === 'inner';\n\n  if (!borderWidth) {\n    return;\n  }\n\n  if (inner) {\n    ctx.lineWidth = borderWidth * 2;\n    ctx.lineJoin = borderJoinStyle || 'round';\n  } else {\n    ctx.lineWidth = borderWidth;\n    ctx.lineJoin = borderJoinStyle || 'bevel';\n  }\n\n  if (element.fullCircles) {\n    drawFullCircleBorders(ctx, element, inner);\n  }\n\n  if (inner) {\n    clipArc(ctx, element, endAngle);\n  }\n\n  pathArc(ctx, element, offset, spacing, endAngle, circular);\n  ctx.stroke();\n}\n\nclass ArcElement extends Element {\n  constructor(cfg) {\n    super();\n    this.options = undefined;\n    this.circumference = undefined;\n    this.startAngle = undefined;\n    this.endAngle = undefined;\n    this.innerRadius = undefined;\n    this.outerRadius = undefined;\n    this.pixelMargin = 0;\n    this.fullCircles = 0;\n\n    if (cfg) {\n      Object.assign(this, cfg);\n    }\n  }\n\n  inRange(chartX, chartY, useFinalPosition) {\n    const point = this.getProps(['x', 'y'], useFinalPosition);\n\n    const _getAngleFromPoint2 = getAngleFromPoint(point, {\n      x: chartX,\n      y: chartY\n    }),\n          angle = _getAngleFromPoint2.angle,\n          distance = _getAngleFromPoint2.distance;\n\n    const _this$getProps2 = this.getProps(['startAngle', 'endAngle', 'innerRadius', 'outerRadius', 'circumference'], useFinalPosition),\n          startAngle = _this$getProps2.startAngle,\n          endAngle = _this$getProps2.endAngle,\n          innerRadius = _this$getProps2.innerRadius,\n          outerRadius = _this$getProps2.outerRadius,\n          circumference = _this$getProps2.circumference;\n\n    const rAdjust = this.options.spacing / 2;\n\n    const _circumference = valueOrDefault(circumference, endAngle - startAngle);\n\n    const betweenAngles = _circumference >= TAU || _angleBetween(angle, startAngle, endAngle);\n\n    const withinRadius = _isBetween(distance, innerRadius + rAdjust, outerRadius + rAdjust);\n\n    return betweenAngles && withinRadius;\n  }\n\n  getCenterPoint(useFinalPosition) {\n    const _this$getProps3 = this.getProps(['x', 'y', 'startAngle', 'endAngle', 'innerRadius', 'outerRadius', 'circumference'], useFinalPosition),\n          x = _this$getProps3.x,\n          y = _this$getProps3.y,\n          startAngle = _this$getProps3.startAngle,\n          endAngle = _this$getProps3.endAngle,\n          innerRadius = _this$getProps3.innerRadius,\n          outerRadius = _this$getProps3.outerRadius;\n\n    const _this$options12 = this.options,\n          offset = _this$options12.offset,\n          spacing = _this$options12.spacing;\n    const halfAngle = (startAngle + endAngle) / 2;\n    const halfRadius = (innerRadius + outerRadius + spacing + offset) / 2;\n    return {\n      x: x + Math.cos(halfAngle) * halfRadius,\n      y: y + Math.sin(halfAngle) * halfRadius\n    };\n  }\n\n  tooltipPosition(useFinalPosition) {\n    return this.getCenterPoint(useFinalPosition);\n  }\n\n  draw(ctx) {\n    const options = this.options,\n          circumference = this.circumference;\n    const offset = (options.offset || 0) / 2;\n    const spacing = (options.spacing || 0) / 2;\n    const circular = options.circular;\n    this.pixelMargin = options.borderAlign === 'inner' ? 0.33 : 0;\n    this.fullCircles = circumference > TAU ? Math.floor(circumference / TAU) : 0;\n\n    if (circumference === 0 || this.innerRadius < 0 || this.outerRadius < 0) {\n      return;\n    }\n\n    ctx.save();\n    let radiusOffset = 0;\n\n    if (offset) {\n      radiusOffset = offset / 2;\n      const halfAngle = (this.startAngle + this.endAngle) / 2;\n      ctx.translate(Math.cos(halfAngle) * radiusOffset, Math.sin(halfAngle) * radiusOffset);\n\n      if (this.circumference >= PI) {\n        radiusOffset = offset;\n      }\n    }\n\n    ctx.fillStyle = options.backgroundColor;\n    ctx.strokeStyle = options.borderColor;\n    const endAngle = drawArc(ctx, this, radiusOffset, spacing, circular);\n    drawBorder(ctx, this, radiusOffset, spacing, endAngle, circular);\n    ctx.restore();\n  }\n\n}\n\nArcElement.id = 'arc';\nArcElement.defaults = {\n  borderAlign: 'center',\n  borderColor: '#fff',\n  borderJoinStyle: undefined,\n  borderRadius: 0,\n  borderWidth: 2,\n  offset: 0,\n  spacing: 0,\n  angle: undefined,\n  circular: true\n};\nArcElement.defaultRoutes = {\n  backgroundColor: 'backgroundColor'\n};\n\nfunction setStyle(ctx, options) {\n  let style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : options;\n  ctx.lineCap = valueOrDefault(style.borderCapStyle, options.borderCapStyle);\n  ctx.setLineDash(valueOrDefault(style.borderDash, options.borderDash));\n  ctx.lineDashOffset = valueOrDefault(style.borderDashOffset, options.borderDashOffset);\n  ctx.lineJoin = valueOrDefault(style.borderJoinStyle, options.borderJoinStyle);\n  ctx.lineWidth = valueOrDefault(style.borderWidth, options.borderWidth);\n  ctx.strokeStyle = valueOrDefault(style.borderColor, options.borderColor);\n}\n\nfunction lineTo(ctx, previous, target) {\n  ctx.lineTo(target.x, target.y);\n}\n\nfunction getLineMethod(options) {\n  if (options.stepped) {\n    return _steppedLineTo;\n  }\n\n  if (options.tension || options.cubicInterpolationMode === 'monotone') {\n    return _bezierCurveTo;\n  }\n\n  return lineTo;\n}\n\nfunction pathVars(points, segment) {\n  let params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  const count = points.length;\n  const _params$start = params.start,\n        paramsStart = _params$start === void 0 ? 0 : _params$start,\n        _params$end = params.end,\n        paramsEnd = _params$end === void 0 ? count - 1 : _params$end;\n  const segmentStart = segment.start,\n        segmentEnd = segment.end;\n  const start = Math.max(paramsStart, segmentStart);\n  const end = Math.min(paramsEnd, segmentEnd);\n  const outside = paramsStart < segmentStart && paramsEnd < segmentStart || paramsStart > segmentEnd && paramsEnd > segmentEnd;\n  return {\n    count,\n    start,\n    loop: segment.loop,\n    ilen: end < start && !outside ? count + end - start : end - start\n  };\n}\n\nfunction pathSegment(ctx, line, segment, params) {\n  const points = line.points,\n        options = line.options;\n\n  const _pathVars = pathVars(points, segment, params),\n        count = _pathVars.count,\n        start = _pathVars.start,\n        loop = _pathVars.loop,\n        ilen = _pathVars.ilen;\n\n  const lineMethod = getLineMethod(options);\n\n  let _ref8 = params || {},\n      _ref8$move = _ref8.move,\n      move = _ref8$move === void 0 ? true : _ref8$move,\n      reverse = _ref8.reverse;\n\n  let i, point, prev;\n\n  for (i = 0; i <= ilen; ++i) {\n    point = points[(start + (reverse ? ilen - i : i)) % count];\n\n    if (point.skip) {\n      continue;\n    } else if (move) {\n      ctx.moveTo(point.x, point.y);\n      move = false;\n    } else {\n      lineMethod(ctx, prev, point, reverse, options.stepped);\n    }\n\n    prev = point;\n  }\n\n  if (loop) {\n    point = points[(start + (reverse ? ilen : 0)) % count];\n    lineMethod(ctx, prev, point, reverse, options.stepped);\n  }\n\n  return !!loop;\n}\n\nfunction fastPathSegment(ctx, line, segment, params) {\n  const points = line.points;\n\n  const _pathVars2 = pathVars(points, segment, params),\n        count = _pathVars2.count,\n        start = _pathVars2.start,\n        ilen = _pathVars2.ilen;\n\n  const _ref9 = params || {},\n        _ref9$move = _ref9.move,\n        move = _ref9$move === void 0 ? true : _ref9$move,\n        reverse = _ref9.reverse;\n\n  let avgX = 0;\n  let countX = 0;\n  let i, point, prevX, minY, maxY, lastY;\n\n  const pointIndex = index => (start + (reverse ? ilen - index : index)) % count;\n\n  const drawX = () => {\n    if (minY !== maxY) {\n      ctx.lineTo(avgX, maxY);\n      ctx.lineTo(avgX, minY);\n      ctx.lineTo(avgX, lastY);\n    }\n  };\n\n  if (move) {\n    point = points[pointIndex(0)];\n    ctx.moveTo(point.x, point.y);\n  }\n\n  for (i = 0; i <= ilen; ++i) {\n    point = points[pointIndex(i)];\n\n    if (point.skip) {\n      continue;\n    }\n\n    const x = point.x;\n    const y = point.y;\n    const truncX = x | 0;\n\n    if (truncX === prevX) {\n      if (y < minY) {\n        minY = y;\n      } else if (y > maxY) {\n        maxY = y;\n      }\n\n      avgX = (countX * avgX + x) / ++countX;\n    } else {\n      drawX();\n      ctx.lineTo(x, y);\n      prevX = truncX;\n      countX = 0;\n      minY = maxY = y;\n    }\n\n    lastY = y;\n  }\n\n  drawX();\n}\n\nfunction _getSegmentMethod(line) {\n  const opts = line.options;\n  const borderDash = opts.borderDash && opts.borderDash.length;\n  const useFastPath = !line._decimated && !line._loop && !opts.tension && opts.cubicInterpolationMode !== 'monotone' && !opts.stepped && !borderDash;\n  return useFastPath ? fastPathSegment : pathSegment;\n}\n\nfunction _getInterpolationMethod(options) {\n  if (options.stepped) {\n    return _steppedInterpolation;\n  }\n\n  if (options.tension || options.cubicInterpolationMode === 'monotone') {\n    return _bezierInterpolation;\n  }\n\n  return _pointInLine;\n}\n\nfunction strokePathWithCache(ctx, line, start, count) {\n  let path = line._path;\n\n  if (!path) {\n    path = line._path = new Path2D();\n\n    if (line.path(path, start, count)) {\n      path.closePath();\n    }\n  }\n\n  setStyle(ctx, line.options);\n  ctx.stroke(path);\n}\n\nfunction strokePathDirect(ctx, line, start, count) {\n  const segments = line.segments,\n        options = line.options;\n\n  const segmentMethod = _getSegmentMethod(line);\n\n  for (const segment of segments) {\n    setStyle(ctx, options, segment.style);\n    ctx.beginPath();\n\n    if (segmentMethod(ctx, line, segment, {\n      start,\n      end: start + count - 1\n    })) {\n      ctx.closePath();\n    }\n\n    ctx.stroke();\n  }\n}\n\nconst usePath2D = typeof Path2D === 'function';\n\nfunction draw(ctx, line, start, count) {\n  if (usePath2D && !line.options.segment) {\n    strokePathWithCache(ctx, line, start, count);\n  } else {\n    strokePathDirect(ctx, line, start, count);\n  }\n}\n\nclass LineElement extends Element {\n  constructor(cfg) {\n    super();\n    this.animated = true;\n    this.options = undefined;\n    this._chart = undefined;\n    this._loop = undefined;\n    this._fullLoop = undefined;\n    this._path = undefined;\n    this._points = undefined;\n    this._segments = undefined;\n    this._decimated = false;\n    this._pointsUpdated = false;\n    this._datasetIndex = undefined;\n\n    if (cfg) {\n      Object.assign(this, cfg);\n    }\n  }\n\n  updateControlPoints(chartArea, indexAxis) {\n    const options = this.options;\n\n    if ((options.tension || options.cubicInterpolationMode === 'monotone') && !options.stepped && !this._pointsUpdated) {\n      const loop = options.spanGaps ? this._loop : this._fullLoop;\n\n      _updateBezierControlPoints(this._points, options, chartArea, loop, indexAxis);\n\n      this._pointsUpdated = true;\n    }\n  }\n\n  set points(points) {\n    this._points = points;\n    delete this._segments;\n    delete this._path;\n    this._pointsUpdated = false;\n  }\n\n  get points() {\n    return this._points;\n  }\n\n  get segments() {\n    return this._segments || (this._segments = _computeSegments(this, this.options.segment));\n  }\n\n  first() {\n    const segments = this.segments;\n    const points = this.points;\n    return segments.length && points[segments[0].start];\n  }\n\n  last() {\n    const segments = this.segments;\n    const points = this.points;\n    const count = segments.length;\n    return count && points[segments[count - 1].end];\n  }\n\n  interpolate(point, property) {\n    const options = this.options;\n    const value = point[property];\n    const points = this.points;\n\n    const segments = _boundSegments(this, {\n      property,\n      start: value,\n      end: value\n    });\n\n    if (!segments.length) {\n      return;\n    }\n\n    const result = [];\n\n    const _interpolate = _getInterpolationMethod(options);\n\n    let i, ilen;\n\n    for (i = 0, ilen = segments.length; i < ilen; ++i) {\n      const _segments$i = segments[i],\n            start = _segments$i.start,\n            end = _segments$i.end;\n      const p1 = points[start];\n      const p2 = points[end];\n\n      if (p1 === p2) {\n        result.push(p1);\n        continue;\n      }\n\n      const t = Math.abs((value - p1[property]) / (p2[property] - p1[property]));\n\n      const interpolated = _interpolate(p1, p2, t, options.stepped);\n\n      interpolated[property] = point[property];\n      result.push(interpolated);\n    }\n\n    return result.length === 1 ? result[0] : result;\n  }\n\n  pathSegment(ctx, segment, params) {\n    const segmentMethod = _getSegmentMethod(this);\n\n    return segmentMethod(ctx, this, segment, params);\n  }\n\n  path(ctx, start, count) {\n    const segments = this.segments;\n\n    const segmentMethod = _getSegmentMethod(this);\n\n    let loop = this._loop;\n    start = start || 0;\n    count = count || this.points.length - start;\n\n    for (const segment of segments) {\n      loop &= segmentMethod(ctx, this, segment, {\n        start,\n        end: start + count - 1\n      });\n    }\n\n    return !!loop;\n  }\n\n  draw(ctx, chartArea, start, count) {\n    const options = this.options || {};\n    const points = this.points || [];\n\n    if (points.length && options.borderWidth) {\n      ctx.save();\n      draw(ctx, this, start, count);\n      ctx.restore();\n    }\n\n    if (this.animated) {\n      this._pointsUpdated = false;\n      this._path = undefined;\n    }\n  }\n\n}\n\nLineElement.id = 'line';\nLineElement.defaults = {\n  borderCapStyle: 'butt',\n  borderDash: [],\n  borderDashOffset: 0,\n  borderJoinStyle: 'miter',\n  borderWidth: 3,\n  capBezierPoints: true,\n  cubicInterpolationMode: 'default',\n  fill: false,\n  spanGaps: false,\n  stepped: false,\n  tension: 0\n};\nLineElement.defaultRoutes = {\n  backgroundColor: 'backgroundColor',\n  borderColor: 'borderColor'\n};\nLineElement.descriptors = {\n  _scriptable: true,\n  _indexable: name => name !== 'borderDash' && name !== 'fill'\n};\n\nfunction inRange$1(el, pos, axis, useFinalPosition) {\n  const options = el.options;\n\n  const _el$getProps = el.getProps([axis], useFinalPosition),\n        value = _el$getProps[axis];\n\n  return Math.abs(pos - value) < options.radius + options.hitRadius;\n}\n\nclass PointElement extends Element {\n  constructor(cfg) {\n    super();\n    this.options = undefined;\n    this.parsed = undefined;\n    this.skip = undefined;\n    this.stop = undefined;\n\n    if (cfg) {\n      Object.assign(this, cfg);\n    }\n  }\n\n  inRange(mouseX, mouseY, useFinalPosition) {\n    const options = this.options;\n\n    const _this$getProps4 = this.getProps(['x', 'y'], useFinalPosition),\n          x = _this$getProps4.x,\n          y = _this$getProps4.y;\n\n    return Math.pow(mouseX - x, 2) + Math.pow(mouseY - y, 2) < Math.pow(options.hitRadius + options.radius, 2);\n  }\n\n  inXRange(mouseX, useFinalPosition) {\n    return inRange$1(this, mouseX, 'x', useFinalPosition);\n  }\n\n  inYRange(mouseY, useFinalPosition) {\n    return inRange$1(this, mouseY, 'y', useFinalPosition);\n  }\n\n  getCenterPoint(useFinalPosition) {\n    const _this$getProps5 = this.getProps(['x', 'y'], useFinalPosition),\n          x = _this$getProps5.x,\n          y = _this$getProps5.y;\n\n    return {\n      x,\n      y\n    };\n  }\n\n  size(options) {\n    options = options || this.options || {};\n    let radius = options.radius || 0;\n    radius = Math.max(radius, radius && options.hoverRadius || 0);\n    const borderWidth = radius && options.borderWidth || 0;\n    return (radius + borderWidth) * 2;\n  }\n\n  draw(ctx, area) {\n    const options = this.options;\n\n    if (this.skip || options.radius < 0.1 || !_isPointInArea(this, area, this.size(options) / 2)) {\n      return;\n    }\n\n    ctx.strokeStyle = options.borderColor;\n    ctx.lineWidth = options.borderWidth;\n    ctx.fillStyle = options.backgroundColor;\n    drawPoint(ctx, options, this.x, this.y);\n  }\n\n  getRange() {\n    const options = this.options || {};\n    return options.radius + options.hitRadius;\n  }\n\n}\n\nPointElement.id = 'point';\nPointElement.defaults = {\n  borderWidth: 1,\n  hitRadius: 1,\n  hoverBorderWidth: 1,\n  hoverRadius: 4,\n  pointStyle: 'circle',\n  radius: 3,\n  rotation: 0\n};\nPointElement.defaultRoutes = {\n  backgroundColor: 'backgroundColor',\n  borderColor: 'borderColor'\n};\n\nfunction getBarBounds(bar, useFinalPosition) {\n  const _bar$getProps = bar.getProps(['x', 'y', 'base', 'width', 'height'], useFinalPosition),\n        x = _bar$getProps.x,\n        y = _bar$getProps.y,\n        base = _bar$getProps.base,\n        width = _bar$getProps.width,\n        height = _bar$getProps.height;\n\n  let left, right, top, bottom, half;\n\n  if (bar.horizontal) {\n    half = height / 2;\n    left = Math.min(x, base);\n    right = Math.max(x, base);\n    top = y - half;\n    bottom = y + half;\n  } else {\n    half = width / 2;\n    left = x - half;\n    right = x + half;\n    top = Math.min(y, base);\n    bottom = Math.max(y, base);\n  }\n\n  return {\n    left,\n    top,\n    right,\n    bottom\n  };\n}\n\nfunction skipOrLimit(skip, value, min, max) {\n  return skip ? 0 : _limitValue(value, min, max);\n}\n\nfunction parseBorderWidth(bar, maxW, maxH) {\n  const value = bar.options.borderWidth;\n  const skip = bar.borderSkipped;\n  const o = toTRBL(value);\n  return {\n    t: skipOrLimit(skip.top, o.top, 0, maxH),\n    r: skipOrLimit(skip.right, o.right, 0, maxW),\n    b: skipOrLimit(skip.bottom, o.bottom, 0, maxH),\n    l: skipOrLimit(skip.left, o.left, 0, maxW)\n  };\n}\n\nfunction parseBorderRadius(bar, maxW, maxH) {\n  const _bar$getProps2 = bar.getProps(['enableBorderRadius']),\n        enableBorderRadius = _bar$getProps2.enableBorderRadius;\n\n  const value = bar.options.borderRadius;\n  const o = toTRBLCorners(value);\n  const maxR = Math.min(maxW, maxH);\n  const skip = bar.borderSkipped;\n  const enableBorder = enableBorderRadius || isObject(value);\n  return {\n    topLeft: skipOrLimit(!enableBorder || skip.top || skip.left, o.topLeft, 0, maxR),\n    topRight: skipOrLimit(!enableBorder || skip.top || skip.right, o.topRight, 0, maxR),\n    bottomLeft: skipOrLimit(!enableBorder || skip.bottom || skip.left, o.bottomLeft, 0, maxR),\n    bottomRight: skipOrLimit(!enableBorder || skip.bottom || skip.right, o.bottomRight, 0, maxR)\n  };\n}\n\nfunction boundingRects(bar) {\n  const bounds = getBarBounds(bar);\n  const width = bounds.right - bounds.left;\n  const height = bounds.bottom - bounds.top;\n  const border = parseBorderWidth(bar, width / 2, height / 2);\n  const radius = parseBorderRadius(bar, width / 2, height / 2);\n  return {\n    outer: {\n      x: bounds.left,\n      y: bounds.top,\n      w: width,\n      h: height,\n      radius\n    },\n    inner: {\n      x: bounds.left + border.l,\n      y: bounds.top + border.t,\n      w: width - border.l - border.r,\n      h: height - border.t - border.b,\n      radius: {\n        topLeft: Math.max(0, radius.topLeft - Math.max(border.t, border.l)),\n        topRight: Math.max(0, radius.topRight - Math.max(border.t, border.r)),\n        bottomLeft: Math.max(0, radius.bottomLeft - Math.max(border.b, border.l)),\n        bottomRight: Math.max(0, radius.bottomRight - Math.max(border.b, border.r))\n      }\n    }\n  };\n}\n\nfunction inRange(bar, x, y, useFinalPosition) {\n  const skipX = x === null;\n  const skipY = y === null;\n  const skipBoth = skipX && skipY;\n  const bounds = bar && !skipBoth && getBarBounds(bar, useFinalPosition);\n  return bounds && (skipX || _isBetween(x, bounds.left, bounds.right)) && (skipY || _isBetween(y, bounds.top, bounds.bottom));\n}\n\nfunction hasRadius(radius) {\n  return radius.topLeft || radius.topRight || radius.bottomLeft || radius.bottomRight;\n}\n\nfunction addNormalRectPath(ctx, rect) {\n  ctx.rect(rect.x, rect.y, rect.w, rect.h);\n}\n\nfunction inflateRect(rect, amount) {\n  let refRect = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n  const x = rect.x !== refRect.x ? -amount : 0;\n  const y = rect.y !== refRect.y ? -amount : 0;\n  const w = (rect.x + rect.w !== refRect.x + refRect.w ? amount : 0) - x;\n  const h = (rect.y + rect.h !== refRect.y + refRect.h ? amount : 0) - y;\n  return {\n    x: rect.x + x,\n    y: rect.y + y,\n    w: rect.w + w,\n    h: rect.h + h,\n    radius: rect.radius\n  };\n}\n\nclass BarElement extends Element {\n  constructor(cfg) {\n    super();\n    this.options = undefined;\n    this.horizontal = undefined;\n    this.base = undefined;\n    this.width = undefined;\n    this.height = undefined;\n    this.inflateAmount = undefined;\n\n    if (cfg) {\n      Object.assign(this, cfg);\n    }\n  }\n\n  draw(ctx) {\n    const inflateAmount = this.inflateAmount,\n          _this$options13 = this.options,\n          borderColor = _this$options13.borderColor,\n          backgroundColor = _this$options13.backgroundColor;\n\n    const _boundingRects = boundingRects(this),\n          inner = _boundingRects.inner,\n          outer = _boundingRects.outer;\n\n    const addRectPath = hasRadius(outer.radius) ? addRoundedRectPath : addNormalRectPath;\n    ctx.save();\n\n    if (outer.w !== inner.w || outer.h !== inner.h) {\n      ctx.beginPath();\n      addRectPath(ctx, inflateRect(outer, inflateAmount, inner));\n      ctx.clip();\n      addRectPath(ctx, inflateRect(inner, -inflateAmount, outer));\n      ctx.fillStyle = borderColor;\n      ctx.fill('evenodd');\n    }\n\n    ctx.beginPath();\n    addRectPath(ctx, inflateRect(inner, inflateAmount));\n    ctx.fillStyle = backgroundColor;\n    ctx.fill();\n    ctx.restore();\n  }\n\n  inRange(mouseX, mouseY, useFinalPosition) {\n    return inRange(this, mouseX, mouseY, useFinalPosition);\n  }\n\n  inXRange(mouseX, useFinalPosition) {\n    return inRange(this, mouseX, null, useFinalPosition);\n  }\n\n  inYRange(mouseY, useFinalPosition) {\n    return inRange(this, null, mouseY, useFinalPosition);\n  }\n\n  getCenterPoint(useFinalPosition) {\n    const _this$getProps6 = this.getProps(['x', 'y', 'base', 'horizontal'], useFinalPosition),\n          x = _this$getProps6.x,\n          y = _this$getProps6.y,\n          base = _this$getProps6.base,\n          horizontal = _this$getProps6.horizontal;\n\n    return {\n      x: horizontal ? (x + base) / 2 : x,\n      y: horizontal ? y : (y + base) / 2\n    };\n  }\n\n  getRange(axis) {\n    return axis === 'x' ? this.width / 2 : this.height / 2;\n  }\n\n}\n\nBarElement.id = 'bar';\nBarElement.defaults = {\n  borderSkipped: 'start',\n  borderWidth: 0,\n  borderRadius: 0,\n  inflateAmount: 'auto',\n  pointStyle: undefined\n};\nBarElement.defaultRoutes = {\n  backgroundColor: 'backgroundColor',\n  borderColor: 'borderColor'\n};\nvar elements = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  ArcElement: ArcElement,\n  LineElement: LineElement,\n  PointElement: PointElement,\n  BarElement: BarElement\n});\n\nfunction lttbDecimation(data, start, count, availableWidth, options) {\n  const samples = options.samples || availableWidth;\n\n  if (samples >= count) {\n    return data.slice(start, start + count);\n  }\n\n  const decimated = [];\n  const bucketWidth = (count - 2) / (samples - 2);\n  let sampledIndex = 0;\n  const endIndex = start + count - 1;\n  let a = start;\n  let i, maxAreaPoint, maxArea, area, nextA;\n  decimated[sampledIndex++] = data[a];\n\n  for (i = 0; i < samples - 2; i++) {\n    let avgX = 0;\n    let avgY = 0;\n    let j;\n    const avgRangeStart = Math.floor((i + 1) * bucketWidth) + 1 + start;\n    const avgRangeEnd = Math.min(Math.floor((i + 2) * bucketWidth) + 1, count) + start;\n    const avgRangeLength = avgRangeEnd - avgRangeStart;\n\n    for (j = avgRangeStart; j < avgRangeEnd; j++) {\n      avgX += data[j].x;\n      avgY += data[j].y;\n    }\n\n    avgX /= avgRangeLength;\n    avgY /= avgRangeLength;\n    const rangeOffs = Math.floor(i * bucketWidth) + 1 + start;\n    const rangeTo = Math.min(Math.floor((i + 1) * bucketWidth) + 1, count) + start;\n    const _data$a = data[a],\n          pointAx = _data$a.x,\n          pointAy = _data$a.y;\n    maxArea = area = -1;\n\n    for (j = rangeOffs; j < rangeTo; j++) {\n      area = 0.5 * Math.abs((pointAx - avgX) * (data[j].y - pointAy) - (pointAx - data[j].x) * (avgY - pointAy));\n\n      if (area > maxArea) {\n        maxArea = area;\n        maxAreaPoint = data[j];\n        nextA = j;\n      }\n    }\n\n    decimated[sampledIndex++] = maxAreaPoint;\n    a = nextA;\n  }\n\n  decimated[sampledIndex++] = data[endIndex];\n  return decimated;\n}\n\nfunction minMaxDecimation(data, start, count, availableWidth) {\n  let avgX = 0;\n  let countX = 0;\n  let i, point, x, y, prevX, minIndex, maxIndex, startIndex, minY, maxY;\n  const decimated = [];\n  const endIndex = start + count - 1;\n  const xMin = data[start].x;\n  const xMax = data[endIndex].x;\n  const dx = xMax - xMin;\n\n  for (i = start; i < start + count; ++i) {\n    point = data[i];\n    x = (point.x - xMin) / dx * availableWidth;\n    y = point.y;\n    const truncX = x | 0;\n\n    if (truncX === prevX) {\n      if (y < minY) {\n        minY = y;\n        minIndex = i;\n      } else if (y > maxY) {\n        maxY = y;\n        maxIndex = i;\n      }\n\n      avgX = (countX * avgX + point.x) / ++countX;\n    } else {\n      const lastIndex = i - 1;\n\n      if (!isNullOrUndef(minIndex) && !isNullOrUndef(maxIndex)) {\n        const intermediateIndex1 = Math.min(minIndex, maxIndex);\n        const intermediateIndex2 = Math.max(minIndex, maxIndex);\n\n        if (intermediateIndex1 !== startIndex && intermediateIndex1 !== lastIndex) {\n          decimated.push(_objectSpread(_objectSpread({}, data[intermediateIndex1]), {}, {\n            x: avgX\n          }));\n        }\n\n        if (intermediateIndex2 !== startIndex && intermediateIndex2 !== lastIndex) {\n          decimated.push(_objectSpread(_objectSpread({}, data[intermediateIndex2]), {}, {\n            x: avgX\n          }));\n        }\n      }\n\n      if (i > 0 && lastIndex !== startIndex) {\n        decimated.push(data[lastIndex]);\n      }\n\n      decimated.push(point);\n      prevX = truncX;\n      countX = 0;\n      minY = maxY = y;\n      minIndex = maxIndex = startIndex = i;\n    }\n  }\n\n  return decimated;\n}\n\nfunction cleanDecimatedDataset(dataset) {\n  if (dataset._decimated) {\n    const data = dataset._data;\n    delete dataset._decimated;\n    delete dataset._data;\n    Object.defineProperty(dataset, 'data', {\n      value: data\n    });\n  }\n}\n\nfunction cleanDecimatedData(chart) {\n  chart.data.datasets.forEach(dataset => {\n    cleanDecimatedDataset(dataset);\n  });\n}\n\nfunction getStartAndCountOfVisiblePointsSimplified(meta, points) {\n  const pointCount = points.length;\n  let start = 0;\n  let count;\n  const iScale = meta.iScale;\n\n  const _iScale$getUserBounds = iScale.getUserBounds(),\n        min = _iScale$getUserBounds.min,\n        max = _iScale$getUserBounds.max,\n        minDefined = _iScale$getUserBounds.minDefined,\n        maxDefined = _iScale$getUserBounds.maxDefined;\n\n  if (minDefined) {\n    start = _limitValue(_lookupByKey(points, iScale.axis, min).lo, 0, pointCount - 1);\n  }\n\n  if (maxDefined) {\n    count = _limitValue(_lookupByKey(points, iScale.axis, max).hi + 1, start, pointCount) - start;\n  } else {\n    count = pointCount - start;\n  }\n\n  return {\n    start,\n    count\n  };\n}\n\nvar plugin_decimation = {\n  id: 'decimation',\n  defaults: {\n    algorithm: 'min-max',\n    enabled: false\n  },\n  beforeElementsUpdate: (chart, args, options) => {\n    if (!options.enabled) {\n      cleanDecimatedData(chart);\n      return;\n    }\n\n    const availableWidth = chart.width;\n    chart.data.datasets.forEach((dataset, datasetIndex) => {\n      const _data = dataset._data,\n            indexAxis = dataset.indexAxis;\n      const meta = chart.getDatasetMeta(datasetIndex);\n      const data = _data || dataset.data;\n\n      if (resolve([indexAxis, chart.options.indexAxis]) === 'y') {\n        return;\n      }\n\n      if (!meta.controller.supportsDecimation) {\n        return;\n      }\n\n      const xAxis = chart.scales[meta.xAxisID];\n\n      if (xAxis.type !== 'linear' && xAxis.type !== 'time') {\n        return;\n      }\n\n      if (chart.options.parsing) {\n        return;\n      }\n\n      let _getStartAndCountOfVi3 = getStartAndCountOfVisiblePointsSimplified(meta, data),\n          start = _getStartAndCountOfVi3.start,\n          count = _getStartAndCountOfVi3.count;\n\n      const threshold = options.threshold || 4 * availableWidth;\n\n      if (count <= threshold) {\n        cleanDecimatedDataset(dataset);\n        return;\n      }\n\n      if (isNullOrUndef(_data)) {\n        dataset._data = data;\n        delete dataset.data;\n        Object.defineProperty(dataset, 'data', {\n          configurable: true,\n          enumerable: true,\n          get: function () {\n            return this._decimated;\n          },\n          set: function (d) {\n            this._data = d;\n          }\n        });\n      }\n\n      let decimated;\n\n      switch (options.algorithm) {\n        case 'lttb':\n          decimated = lttbDecimation(data, start, count, availableWidth, options);\n          break;\n\n        case 'min-max':\n          decimated = minMaxDecimation(data, start, count, availableWidth);\n          break;\n\n        default:\n          throw new Error(\"Unsupported decimation algorithm '\".concat(options.algorithm, \"'\"));\n      }\n\n      dataset._decimated = decimated;\n    });\n  },\n\n  destroy(chart) {\n    cleanDecimatedData(chart);\n  }\n\n};\n\nfunction _segments(line, target, property) {\n  const segments = line.segments;\n  const points = line.points;\n  const tpoints = target.points;\n  const parts = [];\n\n  for (const segment of segments) {\n    let start = segment.start,\n        end = segment.end;\n    end = _findSegmentEnd(start, end, points);\n\n    const bounds = _getBounds(property, points[start], points[end], segment.loop);\n\n    if (!target.segments) {\n      parts.push({\n        source: segment,\n        target: bounds,\n        start: points[start],\n        end: points[end]\n      });\n      continue;\n    }\n\n    const targetSegments = _boundSegments(target, bounds);\n\n    for (const tgt of targetSegments) {\n      const subBounds = _getBounds(property, tpoints[tgt.start], tpoints[tgt.end], tgt.loop);\n\n      const fillSources = _boundSegment(segment, points, subBounds);\n\n      for (const fillSource of fillSources) {\n        parts.push({\n          source: fillSource,\n          target: tgt,\n          start: {\n            [property]: _getEdge(bounds, subBounds, 'start', Math.max)\n          },\n          end: {\n            [property]: _getEdge(bounds, subBounds, 'end', Math.min)\n          }\n        });\n      }\n    }\n  }\n\n  return parts;\n}\n\nfunction _getBounds(property, first, last, loop) {\n  if (loop) {\n    return;\n  }\n\n  let start = first[property];\n  let end = last[property];\n\n  if (property === 'angle') {\n    start = _normalizeAngle(start);\n    end = _normalizeAngle(end);\n  }\n\n  return {\n    property,\n    start,\n    end\n  };\n}\n\nfunction _pointsFromSegments(boundary, line) {\n  const _ref10 = boundary || {},\n        _ref10$x = _ref10.x,\n        x = _ref10$x === void 0 ? null : _ref10$x,\n        _ref10$y = _ref10.y,\n        y = _ref10$y === void 0 ? null : _ref10$y;\n\n  const linePoints = line.points;\n  const points = [];\n  line.segments.forEach(_ref11 => {\n    let start = _ref11.start,\n        end = _ref11.end;\n    end = _findSegmentEnd(start, end, linePoints);\n    const first = linePoints[start];\n    const last = linePoints[end];\n\n    if (y !== null) {\n      points.push({\n        x: first.x,\n        y\n      });\n      points.push({\n        x: last.x,\n        y\n      });\n    } else if (x !== null) {\n      points.push({\n        x,\n        y: first.y\n      });\n      points.push({\n        x,\n        y: last.y\n      });\n    }\n  });\n  return points;\n}\n\nfunction _findSegmentEnd(start, end, points) {\n  for (; end > start; end--) {\n    const point = points[end];\n\n    if (!isNaN(point.x) && !isNaN(point.y)) {\n      break;\n    }\n  }\n\n  return end;\n}\n\nfunction _getEdge(a, b, prop, fn) {\n  if (a && b) {\n    return fn(a[prop], b[prop]);\n  }\n\n  return a ? a[prop] : b ? b[prop] : 0;\n}\n\nfunction _createBoundaryLine(boundary, line) {\n  let points = [];\n  let _loop = false;\n\n  if (isArray(boundary)) {\n    _loop = true;\n    points = boundary;\n  } else {\n    points = _pointsFromSegments(boundary, line);\n  }\n\n  return points.length ? new LineElement({\n    points,\n    options: {\n      tension: 0\n    },\n    _loop,\n    _fullLoop: _loop\n  }) : null;\n}\n\nfunction _shouldApplyFill(source) {\n  return source && source.fill !== false;\n}\n\nfunction _resolveTarget(sources, index, propagate) {\n  const source = sources[index];\n  let fill = source.fill;\n  const visited = [index];\n  let target;\n\n  if (!propagate) {\n    return fill;\n  }\n\n  while (fill !== false && visited.indexOf(fill) === -1) {\n    if (!isNumberFinite(fill)) {\n      return fill;\n    }\n\n    target = sources[fill];\n\n    if (!target) {\n      return false;\n    }\n\n    if (target.visible) {\n      return fill;\n    }\n\n    visited.push(fill);\n    fill = target.fill;\n  }\n\n  return false;\n}\n\nfunction _decodeFill(line, index, count) {\n  const fill = parseFillOption(line);\n\n  if (isObject(fill)) {\n    return isNaN(fill.value) ? false : fill;\n  }\n\n  let target = parseFloat(fill);\n\n  if (isNumberFinite(target) && Math.floor(target) === target) {\n    return decodeTargetIndex(fill[0], index, target, count);\n  }\n\n  return ['origin', 'start', 'end', 'stack', 'shape'].indexOf(fill) >= 0 && fill;\n}\n\nfunction decodeTargetIndex(firstCh, index, target, count) {\n  if (firstCh === '-' || firstCh === '+') {\n    target = index + target;\n  }\n\n  if (target === index || target < 0 || target >= count) {\n    return false;\n  }\n\n  return target;\n}\n\nfunction _getTargetPixel(fill, scale) {\n  let pixel = null;\n\n  if (fill === 'start') {\n    pixel = scale.bottom;\n  } else if (fill === 'end') {\n    pixel = scale.top;\n  } else if (isObject(fill)) {\n    pixel = scale.getPixelForValue(fill.value);\n  } else if (scale.getBasePixel) {\n    pixel = scale.getBasePixel();\n  }\n\n  return pixel;\n}\n\nfunction _getTargetValue(fill, scale, startValue) {\n  let value;\n\n  if (fill === 'start') {\n    value = startValue;\n  } else if (fill === 'end') {\n    value = scale.options.reverse ? scale.min : scale.max;\n  } else if (isObject(fill)) {\n    value = fill.value;\n  } else {\n    value = scale.getBaseValue();\n  }\n\n  return value;\n}\n\nfunction parseFillOption(line) {\n  const options = line.options;\n  const fillOption = options.fill;\n  let fill = valueOrDefault(fillOption && fillOption.target, fillOption);\n\n  if (fill === undefined) {\n    fill = !!options.backgroundColor;\n  }\n\n  if (fill === false || fill === null) {\n    return false;\n  }\n\n  if (fill === true) {\n    return 'origin';\n  }\n\n  return fill;\n}\n\nfunction _buildStackLine(source) {\n  const scale = source.scale,\n        index = source.index,\n        line = source.line;\n  const points = [];\n  const segments = line.segments;\n  const sourcePoints = line.points;\n  const linesBelow = getLinesBelow(scale, index);\n  linesBelow.push(_createBoundaryLine({\n    x: null,\n    y: scale.bottom\n  }, line));\n\n  for (let i = 0; i < segments.length; i++) {\n    const segment = segments[i];\n\n    for (let j = segment.start; j <= segment.end; j++) {\n      addPointsBelow(points, sourcePoints[j], linesBelow);\n    }\n  }\n\n  return new LineElement({\n    points,\n    options: {}\n  });\n}\n\nfunction getLinesBelow(scale, index) {\n  const below = [];\n  const metas = scale.getMatchingVisibleMetas('line');\n\n  for (let i = 0; i < metas.length; i++) {\n    const meta = metas[i];\n\n    if (meta.index === index) {\n      break;\n    }\n\n    if (!meta.hidden) {\n      below.unshift(meta.dataset);\n    }\n  }\n\n  return below;\n}\n\nfunction addPointsBelow(points, sourcePoint, linesBelow) {\n  const postponed = [];\n\n  for (let j = 0; j < linesBelow.length; j++) {\n    const line = linesBelow[j];\n\n    const _findPoint = findPoint(line, sourcePoint, 'x'),\n          first = _findPoint.first,\n          last = _findPoint.last,\n          point = _findPoint.point;\n\n    if (!point || first && last) {\n      continue;\n    }\n\n    if (first) {\n      postponed.unshift(point);\n    } else {\n      points.push(point);\n\n      if (!last) {\n        break;\n      }\n    }\n  }\n\n  points.push(...postponed);\n}\n\nfunction findPoint(line, sourcePoint, property) {\n  const point = line.interpolate(sourcePoint, property);\n\n  if (!point) {\n    return {};\n  }\n\n  const pointValue = point[property];\n  const segments = line.segments;\n  const linePoints = line.points;\n  let first = false;\n  let last = false;\n\n  for (let i = 0; i < segments.length; i++) {\n    const segment = segments[i];\n    const firstValue = linePoints[segment.start][property];\n    const lastValue = linePoints[segment.end][property];\n\n    if (_isBetween(pointValue, firstValue, lastValue)) {\n      first = pointValue === firstValue;\n      last = pointValue === lastValue;\n      break;\n    }\n  }\n\n  return {\n    first,\n    last,\n    point\n  };\n}\n\nclass simpleArc {\n  constructor(opts) {\n    this.x = opts.x;\n    this.y = opts.y;\n    this.radius = opts.radius;\n  }\n\n  pathSegment(ctx, bounds, opts) {\n    const x = this.x,\n          y = this.y,\n          radius = this.radius;\n    bounds = bounds || {\n      start: 0,\n      end: TAU\n    };\n    ctx.arc(x, y, radius, bounds.end, bounds.start, true);\n    return !opts.bounds;\n  }\n\n  interpolate(point) {\n    const x = this.x,\n          y = this.y,\n          radius = this.radius;\n    const angle = point.angle;\n    return {\n      x: x + Math.cos(angle) * radius,\n      y: y + Math.sin(angle) * radius,\n      angle\n    };\n  }\n\n}\n\nfunction _getTarget(source) {\n  const chart = source.chart,\n        fill = source.fill,\n        line = source.line;\n\n  if (isNumberFinite(fill)) {\n    return getLineByIndex(chart, fill);\n  }\n\n  if (fill === 'stack') {\n    return _buildStackLine(source);\n  }\n\n  if (fill === 'shape') {\n    return true;\n  }\n\n  const boundary = computeBoundary(source);\n\n  if (boundary instanceof simpleArc) {\n    return boundary;\n  }\n\n  return _createBoundaryLine(boundary, line);\n}\n\nfunction getLineByIndex(chart, index) {\n  const meta = chart.getDatasetMeta(index);\n  const visible = meta && chart.isDatasetVisible(index);\n  return visible ? meta.dataset : null;\n}\n\nfunction computeBoundary(source) {\n  const scale = source.scale || {};\n\n  if (scale.getPointPositionForValue) {\n    return computeCircularBoundary(source);\n  }\n\n  return computeLinearBoundary(source);\n}\n\nfunction computeLinearBoundary(source) {\n  const _source$scale = source.scale,\n        scale = _source$scale === void 0 ? {} : _source$scale,\n        fill = source.fill;\n\n  const pixel = _getTargetPixel(fill, scale);\n\n  if (isNumberFinite(pixel)) {\n    const horizontal = scale.isHorizontal();\n    return {\n      x: horizontal ? pixel : null,\n      y: horizontal ? null : pixel\n    };\n  }\n\n  return null;\n}\n\nfunction computeCircularBoundary(source) {\n  const scale = source.scale,\n        fill = source.fill;\n  const options = scale.options;\n  const length = scale.getLabels().length;\n  const start = options.reverse ? scale.max : scale.min;\n\n  const value = _getTargetValue(fill, scale, start);\n\n  const target = [];\n\n  if (options.grid.circular) {\n    const center = scale.getPointPositionForValue(0, start);\n    return new simpleArc({\n      x: center.x,\n      y: center.y,\n      radius: scale.getDistanceFromCenterForValue(value)\n    });\n  }\n\n  for (let i = 0; i < length; ++i) {\n    target.push(scale.getPointPositionForValue(i, value));\n  }\n\n  return target;\n}\n\nfunction _drawfill(ctx, source, area) {\n  const target = _getTarget(source);\n\n  const line = source.line,\n        scale = source.scale,\n        axis = source.axis;\n  const lineOpts = line.options;\n  const fillOption = lineOpts.fill;\n  const color = lineOpts.backgroundColor;\n\n  const _ref12 = fillOption || {},\n        _ref12$above = _ref12.above,\n        above = _ref12$above === void 0 ? color : _ref12$above,\n        _ref12$below = _ref12.below,\n        below = _ref12$below === void 0 ? color : _ref12$below;\n\n  if (target && line.points.length) {\n    clipArea(ctx, area);\n    doFill(ctx, {\n      line,\n      target,\n      above,\n      below,\n      area,\n      scale,\n      axis\n    });\n    unclipArea(ctx);\n  }\n}\n\nfunction doFill(ctx, cfg) {\n  const line = cfg.line,\n        target = cfg.target,\n        above = cfg.above,\n        below = cfg.below,\n        area = cfg.area,\n        scale = cfg.scale;\n  const property = line._loop ? 'angle' : cfg.axis;\n  ctx.save();\n\n  if (property === 'x' && below !== above) {\n    clipVertical(ctx, target, area.top);\n    fill(ctx, {\n      line,\n      target,\n      color: above,\n      scale,\n      property\n    });\n    ctx.restore();\n    ctx.save();\n    clipVertical(ctx, target, area.bottom);\n  }\n\n  fill(ctx, {\n    line,\n    target,\n    color: below,\n    scale,\n    property\n  });\n  ctx.restore();\n}\n\nfunction clipVertical(ctx, target, clipY) {\n  const segments = target.segments,\n        points = target.points;\n  let first = true;\n  let lineLoop = false;\n  ctx.beginPath();\n\n  for (const segment of segments) {\n    const start = segment.start,\n          end = segment.end;\n    const firstPoint = points[start];\n\n    const lastPoint = points[_findSegmentEnd(start, end, points)];\n\n    if (first) {\n      ctx.moveTo(firstPoint.x, firstPoint.y);\n      first = false;\n    } else {\n      ctx.lineTo(firstPoint.x, clipY);\n      ctx.lineTo(firstPoint.x, firstPoint.y);\n    }\n\n    lineLoop = !!target.pathSegment(ctx, segment, {\n      move: lineLoop\n    });\n\n    if (lineLoop) {\n      ctx.closePath();\n    } else {\n      ctx.lineTo(lastPoint.x, clipY);\n    }\n  }\n\n  ctx.lineTo(target.first().x, clipY);\n  ctx.closePath();\n  ctx.clip();\n}\n\nfunction fill(ctx, cfg) {\n  const line = cfg.line,\n        target = cfg.target,\n        property = cfg.property,\n        color = cfg.color,\n        scale = cfg.scale;\n\n  const segments = _segments(line, target, property);\n\n  for (const _ref13 of segments) {\n    const src = _ref13.source;\n    const tgt = _ref13.target;\n    const start = _ref13.start;\n    const end = _ref13.end;\n\n    const _src$style = src.style,\n          _src$style2 = _src$style === void 0 ? {} : _src$style,\n          _src$style2$backgroun = _src$style2.backgroundColor,\n          backgroundColor = _src$style2$backgroun === void 0 ? color : _src$style2$backgroun;\n\n    const notShape = target !== true;\n    ctx.save();\n    ctx.fillStyle = backgroundColor;\n    clipBounds(ctx, scale, notShape && _getBounds(property, start, end));\n    ctx.beginPath();\n    const lineLoop = !!line.pathSegment(ctx, src);\n    let loop;\n\n    if (notShape) {\n      if (lineLoop) {\n        ctx.closePath();\n      } else {\n        interpolatedLineTo(ctx, target, end, property);\n      }\n\n      const targetLoop = !!target.pathSegment(ctx, tgt, {\n        move: lineLoop,\n        reverse: true\n      });\n      loop = lineLoop && targetLoop;\n\n      if (!loop) {\n        interpolatedLineTo(ctx, target, start, property);\n      }\n    }\n\n    ctx.closePath();\n    ctx.fill(loop ? 'evenodd' : 'nonzero');\n    ctx.restore();\n  }\n}\n\nfunction clipBounds(ctx, scale, bounds) {\n  const _scale$chart$chartAre = scale.chart.chartArea,\n        top = _scale$chart$chartAre.top,\n        bottom = _scale$chart$chartAre.bottom;\n\n  const _ref14 = bounds || {},\n        property = _ref14.property,\n        start = _ref14.start,\n        end = _ref14.end;\n\n  if (property === 'x') {\n    ctx.beginPath();\n    ctx.rect(start, top, end - start, bottom - top);\n    ctx.clip();\n  }\n}\n\nfunction interpolatedLineTo(ctx, target, point, property) {\n  const interpolatedPoint = target.interpolate(point, property);\n\n  if (interpolatedPoint) {\n    ctx.lineTo(interpolatedPoint.x, interpolatedPoint.y);\n  }\n}\n\nvar index = {\n  id: 'filler',\n\n  afterDatasetsUpdate(chart, _args, options) {\n    const count = (chart.data.datasets || []).length;\n    const sources = [];\n    let meta, i, line, source;\n\n    for (i = 0; i < count; ++i) {\n      meta = chart.getDatasetMeta(i);\n      line = meta.dataset;\n      source = null;\n\n      if (line && line.options && line instanceof LineElement) {\n        source = {\n          visible: chart.isDatasetVisible(i),\n          index: i,\n          fill: _decodeFill(line, i, count),\n          chart,\n          axis: meta.controller.options.indexAxis,\n          scale: meta.vScale,\n          line\n        };\n      }\n\n      meta.$filler = source;\n      sources.push(source);\n    }\n\n    for (i = 0; i < count; ++i) {\n      source = sources[i];\n\n      if (!source || source.fill === false) {\n        continue;\n      }\n\n      source.fill = _resolveTarget(sources, i, options.propagate);\n    }\n  },\n\n  beforeDraw(chart, _args, options) {\n    const draw = options.drawTime === 'beforeDraw';\n    const metasets = chart.getSortedVisibleDatasetMetas();\n    const area = chart.chartArea;\n\n    for (let i = metasets.length - 1; i >= 0; --i) {\n      const source = metasets[i].$filler;\n\n      if (!source) {\n        continue;\n      }\n\n      source.line.updateControlPoints(area, source.axis);\n\n      if (draw && source.fill) {\n        _drawfill(chart.ctx, source, area);\n      }\n    }\n  },\n\n  beforeDatasetsDraw(chart, _args, options) {\n    if (options.drawTime !== 'beforeDatasetsDraw') {\n      return;\n    }\n\n    const metasets = chart.getSortedVisibleDatasetMetas();\n\n    for (let i = metasets.length - 1; i >= 0; --i) {\n      const source = metasets[i].$filler;\n\n      if (_shouldApplyFill(source)) {\n        _drawfill(chart.ctx, source, chart.chartArea);\n      }\n    }\n  },\n\n  beforeDatasetDraw(chart, args, options) {\n    const source = args.meta.$filler;\n\n    if (!_shouldApplyFill(source) || options.drawTime !== 'beforeDatasetDraw') {\n      return;\n    }\n\n    _drawfill(chart.ctx, source, chart.chartArea);\n  },\n\n  defaults: {\n    propagate: true,\n    drawTime: 'beforeDatasetDraw'\n  }\n};\n\nconst getBoxSize = (labelOpts, fontSize) => {\n  let _labelOpts$boxHeight = labelOpts.boxHeight,\n      boxHeight = _labelOpts$boxHeight === void 0 ? fontSize : _labelOpts$boxHeight,\n      _labelOpts$boxWidth = labelOpts.boxWidth,\n      boxWidth = _labelOpts$boxWidth === void 0 ? fontSize : _labelOpts$boxWidth;\n\n  if (labelOpts.usePointStyle) {\n    boxHeight = Math.min(boxHeight, fontSize);\n    boxWidth = labelOpts.pointStyleWidth || Math.min(boxWidth, fontSize);\n  }\n\n  return {\n    boxWidth,\n    boxHeight,\n    itemHeight: Math.max(fontSize, boxHeight)\n  };\n};\n\nconst itemsEqual = (a, b) => a !== null && b !== null && a.datasetIndex === b.datasetIndex && a.index === b.index;\n\nclass Legend extends Element {\n  constructor(config) {\n    super();\n    this._added = false;\n    this.legendHitBoxes = [];\n    this._hoveredItem = null;\n    this.doughnutMode = false;\n    this.chart = config.chart;\n    this.options = config.options;\n    this.ctx = config.ctx;\n    this.legendItems = undefined;\n    this.columnSizes = undefined;\n    this.lineWidths = undefined;\n    this.maxHeight = undefined;\n    this.maxWidth = undefined;\n    this.top = undefined;\n    this.bottom = undefined;\n    this.left = undefined;\n    this.right = undefined;\n    this.height = undefined;\n    this.width = undefined;\n    this._margins = undefined;\n    this.position = undefined;\n    this.weight = undefined;\n    this.fullSize = undefined;\n  }\n\n  update(maxWidth, maxHeight, margins) {\n    this.maxWidth = maxWidth;\n    this.maxHeight = maxHeight;\n    this._margins = margins;\n    this.setDimensions();\n    this.buildLabels();\n    this.fit();\n  }\n\n  setDimensions() {\n    if (this.isHorizontal()) {\n      this.width = this.maxWidth;\n      this.left = this._margins.left;\n      this.right = this.width;\n    } else {\n      this.height = this.maxHeight;\n      this.top = this._margins.top;\n      this.bottom = this.height;\n    }\n  }\n\n  buildLabels() {\n    const labelOpts = this.options.labels || {};\n    let legendItems = callback(labelOpts.generateLabels, [this.chart], this) || [];\n\n    if (labelOpts.filter) {\n      legendItems = legendItems.filter(item => labelOpts.filter(item, this.chart.data));\n    }\n\n    if (labelOpts.sort) {\n      legendItems = legendItems.sort((a, b) => labelOpts.sort(a, b, this.chart.data));\n    }\n\n    if (this.options.reverse) {\n      legendItems.reverse();\n    }\n\n    this.legendItems = legendItems;\n  }\n\n  fit() {\n    const options = this.options,\n          ctx = this.ctx;\n\n    if (!options.display) {\n      this.width = this.height = 0;\n      return;\n    }\n\n    const labelOpts = options.labels;\n    const labelFont = toFont(labelOpts.font);\n    const fontSize = labelFont.size;\n\n    const titleHeight = this._computeTitleHeight();\n\n    const _getBoxSize = getBoxSize(labelOpts, fontSize),\n          boxWidth = _getBoxSize.boxWidth,\n          itemHeight = _getBoxSize.itemHeight;\n\n    let width, height;\n    ctx.font = labelFont.string;\n\n    if (this.isHorizontal()) {\n      width = this.maxWidth;\n      height = this._fitRows(titleHeight, fontSize, boxWidth, itemHeight) + 10;\n    } else {\n      height = this.maxHeight;\n      width = this._fitCols(titleHeight, fontSize, boxWidth, itemHeight) + 10;\n    }\n\n    this.width = Math.min(width, options.maxWidth || this.maxWidth);\n    this.height = Math.min(height, options.maxHeight || this.maxHeight);\n  }\n\n  _fitRows(titleHeight, fontSize, boxWidth, itemHeight) {\n    const ctx = this.ctx,\n          maxWidth = this.maxWidth,\n          padding = this.options.labels.padding;\n    const hitboxes = this.legendHitBoxes = [];\n    const lineWidths = this.lineWidths = [0];\n    const lineHeight = itemHeight + padding;\n    let totalHeight = titleHeight;\n    ctx.textAlign = 'left';\n    ctx.textBaseline = 'middle';\n    let row = -1;\n    let top = -lineHeight;\n    this.legendItems.forEach((legendItem, i) => {\n      const itemWidth = boxWidth + fontSize / 2 + ctx.measureText(legendItem.text).width;\n\n      if (i === 0 || lineWidths[lineWidths.length - 1] + itemWidth + 2 * padding > maxWidth) {\n        totalHeight += lineHeight;\n        lineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = 0;\n        top += lineHeight;\n        row++;\n      }\n\n      hitboxes[i] = {\n        left: 0,\n        top,\n        row,\n        width: itemWidth,\n        height: itemHeight\n      };\n      lineWidths[lineWidths.length - 1] += itemWidth + padding;\n    });\n    return totalHeight;\n  }\n\n  _fitCols(titleHeight, fontSize, boxWidth, itemHeight) {\n    const ctx = this.ctx,\n          maxHeight = this.maxHeight,\n          padding = this.options.labels.padding;\n    const hitboxes = this.legendHitBoxes = [];\n    const columnSizes = this.columnSizes = [];\n    const heightLimit = maxHeight - titleHeight;\n    let totalWidth = padding;\n    let currentColWidth = 0;\n    let currentColHeight = 0;\n    let left = 0;\n    let col = 0;\n    this.legendItems.forEach((legendItem, i) => {\n      const itemWidth = boxWidth + fontSize / 2 + ctx.measureText(legendItem.text).width;\n\n      if (i > 0 && currentColHeight + itemHeight + 2 * padding > heightLimit) {\n        totalWidth += currentColWidth + padding;\n        columnSizes.push({\n          width: currentColWidth,\n          height: currentColHeight\n        });\n        left += currentColWidth + padding;\n        col++;\n        currentColWidth = currentColHeight = 0;\n      }\n\n      hitboxes[i] = {\n        left,\n        top: currentColHeight,\n        col,\n        width: itemWidth,\n        height: itemHeight\n      };\n      currentColWidth = Math.max(currentColWidth, itemWidth);\n      currentColHeight += itemHeight + padding;\n    });\n    totalWidth += currentColWidth;\n    columnSizes.push({\n      width: currentColWidth,\n      height: currentColHeight\n    });\n    return totalWidth;\n  }\n\n  adjustHitBoxes() {\n    if (!this.options.display) {\n      return;\n    }\n\n    const titleHeight = this._computeTitleHeight();\n\n    const hitboxes = this.legendHitBoxes,\n          _this$options14 = this.options,\n          align = _this$options14.align,\n          padding = _this$options14.labels.padding,\n          rtl = _this$options14.rtl;\n    const rtlHelper = getRtlAdapter(rtl, this.left, this.width);\n\n    if (this.isHorizontal()) {\n      let row = 0;\n\n      let left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n\n      for (const hitbox of hitboxes) {\n        if (row !== hitbox.row) {\n          row = hitbox.row;\n          left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n        }\n\n        hitbox.top += this.top + titleHeight + padding;\n        hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(left), hitbox.width);\n        left += hitbox.width + padding;\n      }\n    } else {\n      let col = 0;\n\n      let top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n\n      for (const hitbox of hitboxes) {\n        if (hitbox.col !== col) {\n          col = hitbox.col;\n          top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n        }\n\n        hitbox.top = top;\n        hitbox.left += this.left + padding;\n        hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(hitbox.left), hitbox.width);\n        top += hitbox.height + padding;\n      }\n    }\n  }\n\n  isHorizontal() {\n    return this.options.position === 'top' || this.options.position === 'bottom';\n  }\n\n  draw() {\n    if (this.options.display) {\n      const ctx = this.ctx;\n      clipArea(ctx, this);\n\n      this._draw();\n\n      unclipArea(ctx);\n    }\n  }\n\n  _draw() {\n    const opts = this.options,\n          columnSizes = this.columnSizes,\n          lineWidths = this.lineWidths,\n          ctx = this.ctx;\n    const align = opts.align,\n          labelOpts = opts.labels;\n    const defaultColor = defaults.color;\n    const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n    const labelFont = toFont(labelOpts.font);\n    const fontColor = labelOpts.color,\n          padding = labelOpts.padding;\n    const fontSize = labelFont.size;\n    const halfFontSize = fontSize / 2;\n    let cursor;\n    this.drawTitle();\n    ctx.textAlign = rtlHelper.textAlign('left');\n    ctx.textBaseline = 'middle';\n    ctx.lineWidth = 0.5;\n    ctx.font = labelFont.string;\n\n    const _getBoxSize2 = getBoxSize(labelOpts, fontSize),\n          boxWidth = _getBoxSize2.boxWidth,\n          boxHeight = _getBoxSize2.boxHeight,\n          itemHeight = _getBoxSize2.itemHeight;\n\n    const drawLegendBox = function (x, y, legendItem) {\n      if (isNaN(boxWidth) || boxWidth <= 0 || isNaN(boxHeight) || boxHeight < 0) {\n        return;\n      }\n\n      ctx.save();\n      const lineWidth = valueOrDefault(legendItem.lineWidth, 1);\n      ctx.fillStyle = valueOrDefault(legendItem.fillStyle, defaultColor);\n      ctx.lineCap = valueOrDefault(legendItem.lineCap, 'butt');\n      ctx.lineDashOffset = valueOrDefault(legendItem.lineDashOffset, 0);\n      ctx.lineJoin = valueOrDefault(legendItem.lineJoin, 'miter');\n      ctx.lineWidth = lineWidth;\n      ctx.strokeStyle = valueOrDefault(legendItem.strokeStyle, defaultColor);\n      ctx.setLineDash(valueOrDefault(legendItem.lineDash, []));\n\n      if (labelOpts.usePointStyle) {\n        const drawOptions = {\n          radius: boxHeight * Math.SQRT2 / 2,\n          pointStyle: legendItem.pointStyle,\n          rotation: legendItem.rotation,\n          borderWidth: lineWidth\n        };\n        const centerX = rtlHelper.xPlus(x, boxWidth / 2);\n        const centerY = y + halfFontSize;\n        drawPointLegend(ctx, drawOptions, centerX, centerY, labelOpts.pointStyleWidth && boxWidth);\n      } else {\n        const yBoxTop = y + Math.max((fontSize - boxHeight) / 2, 0);\n        const xBoxLeft = rtlHelper.leftForLtr(x, boxWidth);\n        const borderRadius = toTRBLCorners(legendItem.borderRadius);\n        ctx.beginPath();\n\n        if (Object.values(borderRadius).some(v => v !== 0)) {\n          addRoundedRectPath(ctx, {\n            x: xBoxLeft,\n            y: yBoxTop,\n            w: boxWidth,\n            h: boxHeight,\n            radius: borderRadius\n          });\n        } else {\n          ctx.rect(xBoxLeft, yBoxTop, boxWidth, boxHeight);\n        }\n\n        ctx.fill();\n\n        if (lineWidth !== 0) {\n          ctx.stroke();\n        }\n      }\n\n      ctx.restore();\n    };\n\n    const fillText = function (x, y, legendItem) {\n      renderText(ctx, legendItem.text, x, y + itemHeight / 2, labelFont, {\n        strikethrough: legendItem.hidden,\n        textAlign: rtlHelper.textAlign(legendItem.textAlign)\n      });\n    };\n\n    const isHorizontal = this.isHorizontal();\n\n    const titleHeight = this._computeTitleHeight();\n\n    if (isHorizontal) {\n      cursor = {\n        x: _alignStartEnd(align, this.left + padding, this.right - lineWidths[0]),\n        y: this.top + padding + titleHeight,\n        line: 0\n      };\n    } else {\n      cursor = {\n        x: this.left + padding,\n        y: _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[0].height),\n        line: 0\n      };\n    }\n\n    overrideTextDirection(this.ctx, opts.textDirection);\n    const lineHeight = itemHeight + padding;\n    this.legendItems.forEach((legendItem, i) => {\n      ctx.strokeStyle = legendItem.fontColor || fontColor;\n      ctx.fillStyle = legendItem.fontColor || fontColor;\n      const textWidth = ctx.measureText(legendItem.text).width;\n      const textAlign = rtlHelper.textAlign(legendItem.textAlign || (legendItem.textAlign = labelOpts.textAlign));\n      const width = boxWidth + halfFontSize + textWidth;\n      let x = cursor.x;\n      let y = cursor.y;\n      rtlHelper.setWidth(this.width);\n\n      if (isHorizontal) {\n        if (i > 0 && x + width + padding > this.right) {\n          y = cursor.y += lineHeight;\n          cursor.line++;\n          x = cursor.x = _alignStartEnd(align, this.left + padding, this.right - lineWidths[cursor.line]);\n        }\n      } else if (i > 0 && y + lineHeight > this.bottom) {\n        x = cursor.x = x + columnSizes[cursor.line].width + padding;\n        cursor.line++;\n        y = cursor.y = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[cursor.line].height);\n      }\n\n      const realX = rtlHelper.x(x);\n      drawLegendBox(realX, y, legendItem);\n      x = _textX(textAlign, x + boxWidth + halfFontSize, isHorizontal ? x + width : this.right, opts.rtl);\n      fillText(rtlHelper.x(x), y, legendItem);\n\n      if (isHorizontal) {\n        cursor.x += width + padding;\n      } else {\n        cursor.y += lineHeight;\n      }\n    });\n    restoreTextDirection(this.ctx, opts.textDirection);\n  }\n\n  drawTitle() {\n    const opts = this.options;\n    const titleOpts = opts.title;\n    const titleFont = toFont(titleOpts.font);\n    const titlePadding = toPadding(titleOpts.padding);\n\n    if (!titleOpts.display) {\n      return;\n    }\n\n    const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n    const ctx = this.ctx;\n    const position = titleOpts.position;\n    const halfFontSize = titleFont.size / 2;\n    const topPaddingPlusHalfFontSize = titlePadding.top + halfFontSize;\n    let y;\n    let left = this.left;\n    let maxWidth = this.width;\n\n    if (this.isHorizontal()) {\n      maxWidth = Math.max(...this.lineWidths);\n      y = this.top + topPaddingPlusHalfFontSize;\n      left = _alignStartEnd(opts.align, left, this.right - maxWidth);\n    } else {\n      const maxHeight = this.columnSizes.reduce((acc, size) => Math.max(acc, size.height), 0);\n      y = topPaddingPlusHalfFontSize + _alignStartEnd(opts.align, this.top, this.bottom - maxHeight - opts.labels.padding - this._computeTitleHeight());\n    }\n\n    const x = _alignStartEnd(position, left, left + maxWidth);\n\n    ctx.textAlign = rtlHelper.textAlign(_toLeftRightCenter(position));\n    ctx.textBaseline = 'middle';\n    ctx.strokeStyle = titleOpts.color;\n    ctx.fillStyle = titleOpts.color;\n    ctx.font = titleFont.string;\n    renderText(ctx, titleOpts.text, x, y, titleFont);\n  }\n\n  _computeTitleHeight() {\n    const titleOpts = this.options.title;\n    const titleFont = toFont(titleOpts.font);\n    const titlePadding = toPadding(titleOpts.padding);\n    return titleOpts.display ? titleFont.lineHeight + titlePadding.height : 0;\n  }\n\n  _getLegendItemAt(x, y) {\n    let i, hitBox, lh;\n\n    if (_isBetween(x, this.left, this.right) && _isBetween(y, this.top, this.bottom)) {\n      lh = this.legendHitBoxes;\n\n      for (i = 0; i < lh.length; ++i) {\n        hitBox = lh[i];\n\n        if (_isBetween(x, hitBox.left, hitBox.left + hitBox.width) && _isBetween(y, hitBox.top, hitBox.top + hitBox.height)) {\n          return this.legendItems[i];\n        }\n      }\n    }\n\n    return null;\n  }\n\n  handleEvent(e) {\n    const opts = this.options;\n\n    if (!isListened(e.type, opts)) {\n      return;\n    }\n\n    const hoveredItem = this._getLegendItemAt(e.x, e.y);\n\n    if (e.type === 'mousemove' || e.type === 'mouseout') {\n      const previous = this._hoveredItem;\n      const sameItem = itemsEqual(previous, hoveredItem);\n\n      if (previous && !sameItem) {\n        callback(opts.onLeave, [e, previous, this], this);\n      }\n\n      this._hoveredItem = hoveredItem;\n\n      if (hoveredItem && !sameItem) {\n        callback(opts.onHover, [e, hoveredItem, this], this);\n      }\n    } else if (hoveredItem) {\n      callback(opts.onClick, [e, hoveredItem, this], this);\n    }\n  }\n\n}\n\nfunction isListened(type, opts) {\n  if ((type === 'mousemove' || type === 'mouseout') && (opts.onHover || opts.onLeave)) {\n    return true;\n  }\n\n  if (opts.onClick && (type === 'click' || type === 'mouseup')) {\n    return true;\n  }\n\n  return false;\n}\n\nvar plugin_legend = {\n  id: 'legend',\n  _element: Legend,\n\n  start(chart, _args, options) {\n    const legend = chart.legend = new Legend({\n      ctx: chart.ctx,\n      options,\n      chart\n    });\n    layouts.configure(chart, legend, options);\n    layouts.addBox(chart, legend);\n  },\n\n  stop(chart) {\n    layouts.removeBox(chart, chart.legend);\n    delete chart.legend;\n  },\n\n  beforeUpdate(chart, _args, options) {\n    const legend = chart.legend;\n    layouts.configure(chart, legend, options);\n    legend.options = options;\n  },\n\n  afterUpdate(chart) {\n    const legend = chart.legend;\n    legend.buildLabels();\n    legend.adjustHitBoxes();\n  },\n\n  afterEvent(chart, args) {\n    if (!args.replay) {\n      chart.legend.handleEvent(args.event);\n    }\n  },\n\n  defaults: {\n    display: true,\n    position: 'top',\n    align: 'center',\n    fullSize: true,\n    reverse: false,\n    weight: 1000,\n\n    onClick(e, legendItem, legend) {\n      const index = legendItem.datasetIndex;\n      const ci = legend.chart;\n\n      if (ci.isDatasetVisible(index)) {\n        ci.hide(index);\n        legendItem.hidden = true;\n      } else {\n        ci.show(index);\n        legendItem.hidden = false;\n      }\n    },\n\n    onHover: null,\n    onLeave: null,\n    labels: {\n      color: ctx => ctx.chart.options.color,\n      boxWidth: 40,\n      padding: 10,\n\n      generateLabels(chart) {\n        const datasets = chart.data.datasets;\n        const _chart$legend$options = chart.legend.options.labels,\n              usePointStyle = _chart$legend$options.usePointStyle,\n              pointStyle = _chart$legend$options.pointStyle,\n              textAlign = _chart$legend$options.textAlign,\n              color = _chart$legend$options.color;\n        return chart._getSortedDatasetMetas().map(meta => {\n          const style = meta.controller.getStyle(usePointStyle ? 0 : undefined);\n          const borderWidth = toPadding(style.borderWidth);\n          return {\n            text: datasets[meta.index].label,\n            fillStyle: style.backgroundColor,\n            fontColor: color,\n            hidden: !meta.visible,\n            lineCap: style.borderCapStyle,\n            lineDash: style.borderDash,\n            lineDashOffset: style.borderDashOffset,\n            lineJoin: style.borderJoinStyle,\n            lineWidth: (borderWidth.width + borderWidth.height) / 4,\n            strokeStyle: style.borderColor,\n            pointStyle: pointStyle || style.pointStyle,\n            rotation: style.rotation,\n            textAlign: textAlign || style.textAlign,\n            borderRadius: 0,\n            datasetIndex: meta.index\n          };\n        }, this);\n      }\n\n    },\n    title: {\n      color: ctx => ctx.chart.options.color,\n      display: false,\n      position: 'center',\n      text: ''\n    }\n  },\n  descriptors: {\n    _scriptable: name => !name.startsWith('on'),\n    labels: {\n      _scriptable: name => !['generateLabels', 'filter', 'sort'].includes(name)\n    }\n  }\n};\n\nclass Title extends Element {\n  constructor(config) {\n    super();\n    this.chart = config.chart;\n    this.options = config.options;\n    this.ctx = config.ctx;\n    this._padding = undefined;\n    this.top = undefined;\n    this.bottom = undefined;\n    this.left = undefined;\n    this.right = undefined;\n    this.width = undefined;\n    this.height = undefined;\n    this.position = undefined;\n    this.weight = undefined;\n    this.fullSize = undefined;\n  }\n\n  update(maxWidth, maxHeight) {\n    const opts = this.options;\n    this.left = 0;\n    this.top = 0;\n\n    if (!opts.display) {\n      this.width = this.height = this.right = this.bottom = 0;\n      return;\n    }\n\n    this.width = this.right = maxWidth;\n    this.height = this.bottom = maxHeight;\n    const lineCount = isArray(opts.text) ? opts.text.length : 1;\n    this._padding = toPadding(opts.padding);\n\n    const textSize = lineCount * toFont(opts.font).lineHeight + this._padding.height;\n\n    if (this.isHorizontal()) {\n      this.height = textSize;\n    } else {\n      this.width = textSize;\n    }\n  }\n\n  isHorizontal() {\n    const pos = this.options.position;\n    return pos === 'top' || pos === 'bottom';\n  }\n\n  _drawArgs(offset) {\n    const top = this.top,\n          left = this.left,\n          bottom = this.bottom,\n          right = this.right,\n          options = this.options;\n    const align = options.align;\n    let rotation = 0;\n    let maxWidth, titleX, titleY;\n\n    if (this.isHorizontal()) {\n      titleX = _alignStartEnd(align, left, right);\n      titleY = top + offset;\n      maxWidth = right - left;\n    } else {\n      if (options.position === 'left') {\n        titleX = left + offset;\n        titleY = _alignStartEnd(align, bottom, top);\n        rotation = PI * -0.5;\n      } else {\n        titleX = right - offset;\n        titleY = _alignStartEnd(align, top, bottom);\n        rotation = PI * 0.5;\n      }\n\n      maxWidth = bottom - top;\n    }\n\n    return {\n      titleX,\n      titleY,\n      maxWidth,\n      rotation\n    };\n  }\n\n  draw() {\n    const ctx = this.ctx;\n    const opts = this.options;\n\n    if (!opts.display) {\n      return;\n    }\n\n    const fontOpts = toFont(opts.font);\n    const lineHeight = fontOpts.lineHeight;\n    const offset = lineHeight / 2 + this._padding.top;\n\n    const _this$_drawArgs = this._drawArgs(offset),\n          titleX = _this$_drawArgs.titleX,\n          titleY = _this$_drawArgs.titleY,\n          maxWidth = _this$_drawArgs.maxWidth,\n          rotation = _this$_drawArgs.rotation;\n\n    renderText(ctx, opts.text, 0, 0, fontOpts, {\n      color: opts.color,\n      maxWidth,\n      rotation,\n      textAlign: _toLeftRightCenter(opts.align),\n      textBaseline: 'middle',\n      translation: [titleX, titleY]\n    });\n  }\n\n}\n\nfunction createTitle(chart, titleOpts) {\n  const title = new Title({\n    ctx: chart.ctx,\n    options: titleOpts,\n    chart\n  });\n  layouts.configure(chart, title, titleOpts);\n  layouts.addBox(chart, title);\n  chart.titleBlock = title;\n}\n\nvar plugin_title = {\n  id: 'title',\n  _element: Title,\n\n  start(chart, _args, options) {\n    createTitle(chart, options);\n  },\n\n  stop(chart) {\n    const titleBlock = chart.titleBlock;\n    layouts.removeBox(chart, titleBlock);\n    delete chart.titleBlock;\n  },\n\n  beforeUpdate(chart, _args, options) {\n    const title = chart.titleBlock;\n    layouts.configure(chart, title, options);\n    title.options = options;\n  },\n\n  defaults: {\n    align: 'center',\n    display: false,\n    font: {\n      weight: 'bold'\n    },\n    fullSize: true,\n    padding: 10,\n    position: 'top',\n    text: '',\n    weight: 2000\n  },\n  defaultRoutes: {\n    color: 'color'\n  },\n  descriptors: {\n    _scriptable: true,\n    _indexable: false\n  }\n};\nconst map = new WeakMap();\nvar plugin_subtitle = {\n  id: 'subtitle',\n\n  start(chart, _args, options) {\n    const title = new Title({\n      ctx: chart.ctx,\n      options,\n      chart\n    });\n    layouts.configure(chart, title, options);\n    layouts.addBox(chart, title);\n    map.set(chart, title);\n  },\n\n  stop(chart) {\n    layouts.removeBox(chart, map.get(chart));\n    map.delete(chart);\n  },\n\n  beforeUpdate(chart, _args, options) {\n    const title = map.get(chart);\n    layouts.configure(chart, title, options);\n    title.options = options;\n  },\n\n  defaults: {\n    align: 'center',\n    display: false,\n    font: {\n      weight: 'normal'\n    },\n    fullSize: true,\n    padding: 0,\n    position: 'top',\n    text: '',\n    weight: 1500\n  },\n  defaultRoutes: {\n    color: 'color'\n  },\n  descriptors: {\n    _scriptable: true,\n    _indexable: false\n  }\n};\nconst positioners = {\n  average(items) {\n    if (!items.length) {\n      return false;\n    }\n\n    let i, len;\n    let x = 0;\n    let y = 0;\n    let count = 0;\n\n    for (i = 0, len = items.length; i < len; ++i) {\n      const el = items[i].element;\n\n      if (el && el.hasValue()) {\n        const pos = el.tooltipPosition();\n        x += pos.x;\n        y += pos.y;\n        ++count;\n      }\n    }\n\n    return {\n      x: x / count,\n      y: y / count\n    };\n  },\n\n  nearest(items, eventPosition) {\n    if (!items.length) {\n      return false;\n    }\n\n    let x = eventPosition.x;\n    let y = eventPosition.y;\n    let minDistance = Number.POSITIVE_INFINITY;\n    let i, len, nearestElement;\n\n    for (i = 0, len = items.length; i < len; ++i) {\n      const el = items[i].element;\n\n      if (el && el.hasValue()) {\n        const center = el.getCenterPoint();\n        const d = distanceBetweenPoints(eventPosition, center);\n\n        if (d < minDistance) {\n          minDistance = d;\n          nearestElement = el;\n        }\n      }\n    }\n\n    if (nearestElement) {\n      const tp = nearestElement.tooltipPosition();\n      x = tp.x;\n      y = tp.y;\n    }\n\n    return {\n      x,\n      y\n    };\n  }\n\n};\n\nfunction pushOrConcat(base, toPush) {\n  if (toPush) {\n    if (isArray(toPush)) {\n      Array.prototype.push.apply(base, toPush);\n    } else {\n      base.push(toPush);\n    }\n  }\n\n  return base;\n}\n\nfunction splitNewlines(str) {\n  if ((typeof str === 'string' || str instanceof String) && str.indexOf('\\n') > -1) {\n    return str.split('\\n');\n  }\n\n  return str;\n}\n\nfunction createTooltipItem(chart, item) {\n  const element = item.element,\n        datasetIndex = item.datasetIndex,\n        index = item.index;\n  const controller = chart.getDatasetMeta(datasetIndex).controller;\n\n  const _controller$getLabelA = controller.getLabelAndValue(index),\n        label = _controller$getLabelA.label,\n        value = _controller$getLabelA.value;\n\n  return {\n    chart,\n    label,\n    parsed: controller.getParsed(index),\n    raw: chart.data.datasets[datasetIndex].data[index],\n    formattedValue: value,\n    dataset: controller.getDataset(),\n    dataIndex: index,\n    datasetIndex,\n    element\n  };\n}\n\nfunction getTooltipSize(tooltip, options) {\n  const ctx = tooltip.chart.ctx;\n  const body = tooltip.body,\n        footer = tooltip.footer,\n        title = tooltip.title;\n  const boxWidth = options.boxWidth,\n        boxHeight = options.boxHeight;\n  const bodyFont = toFont(options.bodyFont);\n  const titleFont = toFont(options.titleFont);\n  const footerFont = toFont(options.footerFont);\n  const titleLineCount = title.length;\n  const footerLineCount = footer.length;\n  const bodyLineItemCount = body.length;\n  const padding = toPadding(options.padding);\n  let height = padding.height;\n  let width = 0;\n  let combinedBodyLength = body.reduce((count, bodyItem) => count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length, 0);\n  combinedBodyLength += tooltip.beforeBody.length + tooltip.afterBody.length;\n\n  if (titleLineCount) {\n    height += titleLineCount * titleFont.lineHeight + (titleLineCount - 1) * options.titleSpacing + options.titleMarginBottom;\n  }\n\n  if (combinedBodyLength) {\n    const bodyLineHeight = options.displayColors ? Math.max(boxHeight, bodyFont.lineHeight) : bodyFont.lineHeight;\n    height += bodyLineItemCount * bodyLineHeight + (combinedBodyLength - bodyLineItemCount) * bodyFont.lineHeight + (combinedBodyLength - 1) * options.bodySpacing;\n  }\n\n  if (footerLineCount) {\n    height += options.footerMarginTop + footerLineCount * footerFont.lineHeight + (footerLineCount - 1) * options.footerSpacing;\n  }\n\n  let widthPadding = 0;\n\n  const maxLineWidth = function (line) {\n    width = Math.max(width, ctx.measureText(line).width + widthPadding);\n  };\n\n  ctx.save();\n  ctx.font = titleFont.string;\n  each(tooltip.title, maxLineWidth);\n  ctx.font = bodyFont.string;\n  each(tooltip.beforeBody.concat(tooltip.afterBody), maxLineWidth);\n  widthPadding = options.displayColors ? boxWidth + 2 + options.boxPadding : 0;\n  each(body, bodyItem => {\n    each(bodyItem.before, maxLineWidth);\n    each(bodyItem.lines, maxLineWidth);\n    each(bodyItem.after, maxLineWidth);\n  });\n  widthPadding = 0;\n  ctx.font = footerFont.string;\n  each(tooltip.footer, maxLineWidth);\n  ctx.restore();\n  width += padding.width;\n  return {\n    width,\n    height\n  };\n}\n\nfunction determineYAlign(chart, size) {\n  const y = size.y,\n        height = size.height;\n\n  if (y < height / 2) {\n    return 'top';\n  } else if (y > chart.height - height / 2) {\n    return 'bottom';\n  }\n\n  return 'center';\n}\n\nfunction doesNotFitWithAlign(xAlign, chart, options, size) {\n  const x = size.x,\n        width = size.width;\n  const caret = options.caretSize + options.caretPadding;\n\n  if (xAlign === 'left' && x + width + caret > chart.width) {\n    return true;\n  }\n\n  if (xAlign === 'right' && x - width - caret < 0) {\n    return true;\n  }\n}\n\nfunction determineXAlign(chart, options, size, yAlign) {\n  const x = size.x,\n        width = size.width;\n  const chartWidth = chart.width,\n        _chart$chartArea = chart.chartArea,\n        left = _chart$chartArea.left,\n        right = _chart$chartArea.right;\n  let xAlign = 'center';\n\n  if (yAlign === 'center') {\n    xAlign = x <= (left + right) / 2 ? 'left' : 'right';\n  } else if (x <= width / 2) {\n    xAlign = 'left';\n  } else if (x >= chartWidth - width / 2) {\n    xAlign = 'right';\n  }\n\n  if (doesNotFitWithAlign(xAlign, chart, options, size)) {\n    xAlign = 'center';\n  }\n\n  return xAlign;\n}\n\nfunction determineAlignment(chart, options, size) {\n  const yAlign = size.yAlign || options.yAlign || determineYAlign(chart, size);\n  return {\n    xAlign: size.xAlign || options.xAlign || determineXAlign(chart, options, size, yAlign),\n    yAlign\n  };\n}\n\nfunction alignX(size, xAlign) {\n  let x = size.x,\n      width = size.width;\n\n  if (xAlign === 'right') {\n    x -= width;\n  } else if (xAlign === 'center') {\n    x -= width / 2;\n  }\n\n  return x;\n}\n\nfunction alignY(size, yAlign, paddingAndSize) {\n  let y = size.y,\n      height = size.height;\n\n  if (yAlign === 'top') {\n    y += paddingAndSize;\n  } else if (yAlign === 'bottom') {\n    y -= height + paddingAndSize;\n  } else {\n    y -= height / 2;\n  }\n\n  return y;\n}\n\nfunction getBackgroundPoint(options, size, alignment, chart) {\n  const caretSize = options.caretSize,\n        caretPadding = options.caretPadding,\n        cornerRadius = options.cornerRadius;\n  const xAlign = alignment.xAlign,\n        yAlign = alignment.yAlign;\n  const paddingAndSize = caretSize + caretPadding;\n\n  const _toTRBLCorners = toTRBLCorners(cornerRadius),\n        topLeft = _toTRBLCorners.topLeft,\n        topRight = _toTRBLCorners.topRight,\n        bottomLeft = _toTRBLCorners.bottomLeft,\n        bottomRight = _toTRBLCorners.bottomRight;\n\n  let x = alignX(size, xAlign);\n  const y = alignY(size, yAlign, paddingAndSize);\n\n  if (yAlign === 'center') {\n    if (xAlign === 'left') {\n      x += paddingAndSize;\n    } else if (xAlign === 'right') {\n      x -= paddingAndSize;\n    }\n  } else if (xAlign === 'left') {\n    x -= Math.max(topLeft, bottomLeft) + caretSize;\n  } else if (xAlign === 'right') {\n    x += Math.max(topRight, bottomRight) + caretSize;\n  }\n\n  return {\n    x: _limitValue(x, 0, chart.width - size.width),\n    y: _limitValue(y, 0, chart.height - size.height)\n  };\n}\n\nfunction getAlignedX(tooltip, align, options) {\n  const padding = toPadding(options.padding);\n  return align === 'center' ? tooltip.x + tooltip.width / 2 : align === 'right' ? tooltip.x + tooltip.width - padding.right : tooltip.x + padding.left;\n}\n\nfunction getBeforeAfterBodyLines(callback) {\n  return pushOrConcat([], splitNewlines(callback));\n}\n\nfunction createTooltipContext(parent, tooltip, tooltipItems) {\n  return createContext(parent, {\n    tooltip,\n    tooltipItems,\n    type: 'tooltip'\n  });\n}\n\nfunction overrideCallbacks(callbacks, context) {\n  const override = context && context.dataset && context.dataset.tooltip && context.dataset.tooltip.callbacks;\n  return override ? callbacks.override(override) : callbacks;\n}\n\nclass Tooltip extends Element {\n  constructor(config) {\n    super();\n    this.opacity = 0;\n    this._active = [];\n    this._eventPosition = undefined;\n    this._size = undefined;\n    this._cachedAnimations = undefined;\n    this._tooltipItems = [];\n    this.$animations = undefined;\n    this.$context = undefined;\n    this.chart = config.chart || config._chart;\n    this._chart = this.chart;\n    this.options = config.options;\n    this.dataPoints = undefined;\n    this.title = undefined;\n    this.beforeBody = undefined;\n    this.body = undefined;\n    this.afterBody = undefined;\n    this.footer = undefined;\n    this.xAlign = undefined;\n    this.yAlign = undefined;\n    this.x = undefined;\n    this.y = undefined;\n    this.height = undefined;\n    this.width = undefined;\n    this.caretX = undefined;\n    this.caretY = undefined;\n    this.labelColors = undefined;\n    this.labelPointStyles = undefined;\n    this.labelTextColors = undefined;\n  }\n\n  initialize(options) {\n    this.options = options;\n    this._cachedAnimations = undefined;\n    this.$context = undefined;\n  }\n\n  _resolveAnimations() {\n    const cached = this._cachedAnimations;\n\n    if (cached) {\n      return cached;\n    }\n\n    const chart = this.chart;\n    const options = this.options.setContext(this.getContext());\n    const opts = options.enabled && chart.options.animation && options.animations;\n    const animations = new Animations(this.chart, opts);\n\n    if (opts._cacheable) {\n      this._cachedAnimations = Object.freeze(animations);\n    }\n\n    return animations;\n  }\n\n  getContext() {\n    return this.$context || (this.$context = createTooltipContext(this.chart.getContext(), this, this._tooltipItems));\n  }\n\n  getTitle(context, options) {\n    const callbacks = options.callbacks;\n    const beforeTitle = callbacks.beforeTitle.apply(this, [context]);\n    const title = callbacks.title.apply(this, [context]);\n    const afterTitle = callbacks.afterTitle.apply(this, [context]);\n    let lines = [];\n    lines = pushOrConcat(lines, splitNewlines(beforeTitle));\n    lines = pushOrConcat(lines, splitNewlines(title));\n    lines = pushOrConcat(lines, splitNewlines(afterTitle));\n    return lines;\n  }\n\n  getBeforeBody(tooltipItems, options) {\n    return getBeforeAfterBodyLines(options.callbacks.beforeBody.apply(this, [tooltipItems]));\n  }\n\n  getBody(tooltipItems, options) {\n    const callbacks = options.callbacks;\n    const bodyItems = [];\n    each(tooltipItems, context => {\n      const bodyItem = {\n        before: [],\n        lines: [],\n        after: []\n      };\n      const scoped = overrideCallbacks(callbacks, context);\n      pushOrConcat(bodyItem.before, splitNewlines(scoped.beforeLabel.call(this, context)));\n      pushOrConcat(bodyItem.lines, scoped.label.call(this, context));\n      pushOrConcat(bodyItem.after, splitNewlines(scoped.afterLabel.call(this, context)));\n      bodyItems.push(bodyItem);\n    });\n    return bodyItems;\n  }\n\n  getAfterBody(tooltipItems, options) {\n    return getBeforeAfterBodyLines(options.callbacks.afterBody.apply(this, [tooltipItems]));\n  }\n\n  getFooter(tooltipItems, options) {\n    const callbacks = options.callbacks;\n    const beforeFooter = callbacks.beforeFooter.apply(this, [tooltipItems]);\n    const footer = callbacks.footer.apply(this, [tooltipItems]);\n    const afterFooter = callbacks.afterFooter.apply(this, [tooltipItems]);\n    let lines = [];\n    lines = pushOrConcat(lines, splitNewlines(beforeFooter));\n    lines = pushOrConcat(lines, splitNewlines(footer));\n    lines = pushOrConcat(lines, splitNewlines(afterFooter));\n    return lines;\n  }\n\n  _createItems(options) {\n    const active = this._active;\n    const data = this.chart.data;\n    const labelColors = [];\n    const labelPointStyles = [];\n    const labelTextColors = [];\n    let tooltipItems = [];\n    let i, len;\n\n    for (i = 0, len = active.length; i < len; ++i) {\n      tooltipItems.push(createTooltipItem(this.chart, active[i]));\n    }\n\n    if (options.filter) {\n      tooltipItems = tooltipItems.filter((element, index, array) => options.filter(element, index, array, data));\n    }\n\n    if (options.itemSort) {\n      tooltipItems = tooltipItems.sort((a, b) => options.itemSort(a, b, data));\n    }\n\n    each(tooltipItems, context => {\n      const scoped = overrideCallbacks(options.callbacks, context);\n      labelColors.push(scoped.labelColor.call(this, context));\n      labelPointStyles.push(scoped.labelPointStyle.call(this, context));\n      labelTextColors.push(scoped.labelTextColor.call(this, context));\n    });\n    this.labelColors = labelColors;\n    this.labelPointStyles = labelPointStyles;\n    this.labelTextColors = labelTextColors;\n    this.dataPoints = tooltipItems;\n    return tooltipItems;\n  }\n\n  update(changed, replay) {\n    const options = this.options.setContext(this.getContext());\n    const active = this._active;\n    let properties;\n    let tooltipItems = [];\n\n    if (!active.length) {\n      if (this.opacity !== 0) {\n        properties = {\n          opacity: 0\n        };\n      }\n    } else {\n      const position = positioners[options.position].call(this, active, this._eventPosition);\n      tooltipItems = this._createItems(options);\n      this.title = this.getTitle(tooltipItems, options);\n      this.beforeBody = this.getBeforeBody(tooltipItems, options);\n      this.body = this.getBody(tooltipItems, options);\n      this.afterBody = this.getAfterBody(tooltipItems, options);\n      this.footer = this.getFooter(tooltipItems, options);\n      const size = this._size = getTooltipSize(this, options);\n      const positionAndSize = Object.assign({}, position, size);\n      const alignment = determineAlignment(this.chart, options, positionAndSize);\n      const backgroundPoint = getBackgroundPoint(options, positionAndSize, alignment, this.chart);\n      this.xAlign = alignment.xAlign;\n      this.yAlign = alignment.yAlign;\n      properties = {\n        opacity: 1,\n        x: backgroundPoint.x,\n        y: backgroundPoint.y,\n        width: size.width,\n        height: size.height,\n        caretX: position.x,\n        caretY: position.y\n      };\n    }\n\n    this._tooltipItems = tooltipItems;\n    this.$context = undefined;\n\n    if (properties) {\n      this._resolveAnimations().update(this, properties);\n    }\n\n    if (changed && options.external) {\n      options.external.call(this, {\n        chart: this.chart,\n        tooltip: this,\n        replay\n      });\n    }\n  }\n\n  drawCaret(tooltipPoint, ctx, size, options) {\n    const caretPosition = this.getCaretPosition(tooltipPoint, size, options);\n    ctx.lineTo(caretPosition.x1, caretPosition.y1);\n    ctx.lineTo(caretPosition.x2, caretPosition.y2);\n    ctx.lineTo(caretPosition.x3, caretPosition.y3);\n  }\n\n  getCaretPosition(tooltipPoint, size, options) {\n    const xAlign = this.xAlign,\n          yAlign = this.yAlign;\n    const caretSize = options.caretSize,\n          cornerRadius = options.cornerRadius;\n\n    const _toTRBLCorners2 = toTRBLCorners(cornerRadius),\n          topLeft = _toTRBLCorners2.topLeft,\n          topRight = _toTRBLCorners2.topRight,\n          bottomLeft = _toTRBLCorners2.bottomLeft,\n          bottomRight = _toTRBLCorners2.bottomRight;\n\n    const ptX = tooltipPoint.x,\n          ptY = tooltipPoint.y;\n    const width = size.width,\n          height = size.height;\n    let x1, x2, x3, y1, y2, y3;\n\n    if (yAlign === 'center') {\n      y2 = ptY + height / 2;\n\n      if (xAlign === 'left') {\n        x1 = ptX;\n        x2 = x1 - caretSize;\n        y1 = y2 + caretSize;\n        y3 = y2 - caretSize;\n      } else {\n        x1 = ptX + width;\n        x2 = x1 + caretSize;\n        y1 = y2 - caretSize;\n        y3 = y2 + caretSize;\n      }\n\n      x3 = x1;\n    } else {\n      if (xAlign === 'left') {\n        x2 = ptX + Math.max(topLeft, bottomLeft) + caretSize;\n      } else if (xAlign === 'right') {\n        x2 = ptX + width - Math.max(topRight, bottomRight) - caretSize;\n      } else {\n        x2 = this.caretX;\n      }\n\n      if (yAlign === 'top') {\n        y1 = ptY;\n        y2 = y1 - caretSize;\n        x1 = x2 - caretSize;\n        x3 = x2 + caretSize;\n      } else {\n        y1 = ptY + height;\n        y2 = y1 + caretSize;\n        x1 = x2 + caretSize;\n        x3 = x2 - caretSize;\n      }\n\n      y3 = y1;\n    }\n\n    return {\n      x1,\n      x2,\n      x3,\n      y1,\n      y2,\n      y3\n    };\n  }\n\n  drawTitle(pt, ctx, options) {\n    const title = this.title;\n    const length = title.length;\n    let titleFont, titleSpacing, i;\n\n    if (length) {\n      const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n      pt.x = getAlignedX(this, options.titleAlign, options);\n      ctx.textAlign = rtlHelper.textAlign(options.titleAlign);\n      ctx.textBaseline = 'middle';\n      titleFont = toFont(options.titleFont);\n      titleSpacing = options.titleSpacing;\n      ctx.fillStyle = options.titleColor;\n      ctx.font = titleFont.string;\n\n      for (i = 0; i < length; ++i) {\n        ctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFont.lineHeight / 2);\n        pt.y += titleFont.lineHeight + titleSpacing;\n\n        if (i + 1 === length) {\n          pt.y += options.titleMarginBottom - titleSpacing;\n        }\n      }\n    }\n  }\n\n  _drawColorBox(ctx, pt, i, rtlHelper, options) {\n    const labelColors = this.labelColors[i];\n    const labelPointStyle = this.labelPointStyles[i];\n    const boxHeight = options.boxHeight,\n          boxWidth = options.boxWidth,\n          boxPadding = options.boxPadding;\n    const bodyFont = toFont(options.bodyFont);\n    const colorX = getAlignedX(this, 'left', options);\n    const rtlColorX = rtlHelper.x(colorX);\n    const yOffSet = boxHeight < bodyFont.lineHeight ? (bodyFont.lineHeight - boxHeight) / 2 : 0;\n    const colorY = pt.y + yOffSet;\n\n    if (options.usePointStyle) {\n      const drawOptions = {\n        radius: Math.min(boxWidth, boxHeight) / 2,\n        pointStyle: labelPointStyle.pointStyle,\n        rotation: labelPointStyle.rotation,\n        borderWidth: 1\n      };\n      const centerX = rtlHelper.leftForLtr(rtlColorX, boxWidth) + boxWidth / 2;\n      const centerY = colorY + boxHeight / 2;\n      ctx.strokeStyle = options.multiKeyBackground;\n      ctx.fillStyle = options.multiKeyBackground;\n      drawPoint(ctx, drawOptions, centerX, centerY);\n      ctx.strokeStyle = labelColors.borderColor;\n      ctx.fillStyle = labelColors.backgroundColor;\n      drawPoint(ctx, drawOptions, centerX, centerY);\n    } else {\n      ctx.lineWidth = isObject(labelColors.borderWidth) ? Math.max(...Object.values(labelColors.borderWidth)) : labelColors.borderWidth || 1;\n      ctx.strokeStyle = labelColors.borderColor;\n      ctx.setLineDash(labelColors.borderDash || []);\n      ctx.lineDashOffset = labelColors.borderDashOffset || 0;\n      const outerX = rtlHelper.leftForLtr(rtlColorX, boxWidth - boxPadding);\n      const innerX = rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), boxWidth - boxPadding - 2);\n      const borderRadius = toTRBLCorners(labelColors.borderRadius);\n\n      if (Object.values(borderRadius).some(v => v !== 0)) {\n        ctx.beginPath();\n        ctx.fillStyle = options.multiKeyBackground;\n        addRoundedRectPath(ctx, {\n          x: outerX,\n          y: colorY,\n          w: boxWidth,\n          h: boxHeight,\n          radius: borderRadius\n        });\n        ctx.fill();\n        ctx.stroke();\n        ctx.fillStyle = labelColors.backgroundColor;\n        ctx.beginPath();\n        addRoundedRectPath(ctx, {\n          x: innerX,\n          y: colorY + 1,\n          w: boxWidth - 2,\n          h: boxHeight - 2,\n          radius: borderRadius\n        });\n        ctx.fill();\n      } else {\n        ctx.fillStyle = options.multiKeyBackground;\n        ctx.fillRect(outerX, colorY, boxWidth, boxHeight);\n        ctx.strokeRect(outerX, colorY, boxWidth, boxHeight);\n        ctx.fillStyle = labelColors.backgroundColor;\n        ctx.fillRect(innerX, colorY + 1, boxWidth - 2, boxHeight - 2);\n      }\n    }\n\n    ctx.fillStyle = this.labelTextColors[i];\n  }\n\n  drawBody(pt, ctx, options) {\n    const body = this.body;\n    const bodySpacing = options.bodySpacing,\n          bodyAlign = options.bodyAlign,\n          displayColors = options.displayColors,\n          boxHeight = options.boxHeight,\n          boxWidth = options.boxWidth,\n          boxPadding = options.boxPadding;\n    const bodyFont = toFont(options.bodyFont);\n    let bodyLineHeight = bodyFont.lineHeight;\n    let xLinePadding = 0;\n    const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n\n    const fillLineOfText = function (line) {\n      ctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyLineHeight / 2);\n      pt.y += bodyLineHeight + bodySpacing;\n    };\n\n    const bodyAlignForCalculation = rtlHelper.textAlign(bodyAlign);\n    let bodyItem, textColor, lines, i, j, ilen, jlen;\n    ctx.textAlign = bodyAlign;\n    ctx.textBaseline = 'middle';\n    ctx.font = bodyFont.string;\n    pt.x = getAlignedX(this, bodyAlignForCalculation, options);\n    ctx.fillStyle = options.bodyColor;\n    each(this.beforeBody, fillLineOfText);\n    xLinePadding = displayColors && bodyAlignForCalculation !== 'right' ? bodyAlign === 'center' ? boxWidth / 2 + boxPadding : boxWidth + 2 + boxPadding : 0;\n\n    for (i = 0, ilen = body.length; i < ilen; ++i) {\n      bodyItem = body[i];\n      textColor = this.labelTextColors[i];\n      ctx.fillStyle = textColor;\n      each(bodyItem.before, fillLineOfText);\n      lines = bodyItem.lines;\n\n      if (displayColors && lines.length) {\n        this._drawColorBox(ctx, pt, i, rtlHelper, options);\n\n        bodyLineHeight = Math.max(bodyFont.lineHeight, boxHeight);\n      }\n\n      for (j = 0, jlen = lines.length; j < jlen; ++j) {\n        fillLineOfText(lines[j]);\n        bodyLineHeight = bodyFont.lineHeight;\n      }\n\n      each(bodyItem.after, fillLineOfText);\n    }\n\n    xLinePadding = 0;\n    bodyLineHeight = bodyFont.lineHeight;\n    each(this.afterBody, fillLineOfText);\n    pt.y -= bodySpacing;\n  }\n\n  drawFooter(pt, ctx, options) {\n    const footer = this.footer;\n    const length = footer.length;\n    let footerFont, i;\n\n    if (length) {\n      const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n      pt.x = getAlignedX(this, options.footerAlign, options);\n      pt.y += options.footerMarginTop;\n      ctx.textAlign = rtlHelper.textAlign(options.footerAlign);\n      ctx.textBaseline = 'middle';\n      footerFont = toFont(options.footerFont);\n      ctx.fillStyle = options.footerColor;\n      ctx.font = footerFont.string;\n\n      for (i = 0; i < length; ++i) {\n        ctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFont.lineHeight / 2);\n        pt.y += footerFont.lineHeight + options.footerSpacing;\n      }\n    }\n  }\n\n  drawBackground(pt, ctx, tooltipSize, options) {\n    const xAlign = this.xAlign,\n          yAlign = this.yAlign;\n    const x = pt.x,\n          y = pt.y;\n    const width = tooltipSize.width,\n          height = tooltipSize.height;\n\n    const _toTRBLCorners3 = toTRBLCorners(options.cornerRadius),\n          topLeft = _toTRBLCorners3.topLeft,\n          topRight = _toTRBLCorners3.topRight,\n          bottomLeft = _toTRBLCorners3.bottomLeft,\n          bottomRight = _toTRBLCorners3.bottomRight;\n\n    ctx.fillStyle = options.backgroundColor;\n    ctx.strokeStyle = options.borderColor;\n    ctx.lineWidth = options.borderWidth;\n    ctx.beginPath();\n    ctx.moveTo(x + topLeft, y);\n\n    if (yAlign === 'top') {\n      this.drawCaret(pt, ctx, tooltipSize, options);\n    }\n\n    ctx.lineTo(x + width - topRight, y);\n    ctx.quadraticCurveTo(x + width, y, x + width, y + topRight);\n\n    if (yAlign === 'center' && xAlign === 'right') {\n      this.drawCaret(pt, ctx, tooltipSize, options);\n    }\n\n    ctx.lineTo(x + width, y + height - bottomRight);\n    ctx.quadraticCurveTo(x + width, y + height, x + width - bottomRight, y + height);\n\n    if (yAlign === 'bottom') {\n      this.drawCaret(pt, ctx, tooltipSize, options);\n    }\n\n    ctx.lineTo(x + bottomLeft, y + height);\n    ctx.quadraticCurveTo(x, y + height, x, y + height - bottomLeft);\n\n    if (yAlign === 'center' && xAlign === 'left') {\n      this.drawCaret(pt, ctx, tooltipSize, options);\n    }\n\n    ctx.lineTo(x, y + topLeft);\n    ctx.quadraticCurveTo(x, y, x + topLeft, y);\n    ctx.closePath();\n    ctx.fill();\n\n    if (options.borderWidth > 0) {\n      ctx.stroke();\n    }\n  }\n\n  _updateAnimationTarget(options) {\n    const chart = this.chart;\n    const anims = this.$animations;\n    const animX = anims && anims.x;\n    const animY = anims && anims.y;\n\n    if (animX || animY) {\n      const position = positioners[options.position].call(this, this._active, this._eventPosition);\n\n      if (!position) {\n        return;\n      }\n\n      const size = this._size = getTooltipSize(this, options);\n      const positionAndSize = Object.assign({}, position, this._size);\n      const alignment = determineAlignment(chart, options, positionAndSize);\n      const point = getBackgroundPoint(options, positionAndSize, alignment, chart);\n\n      if (animX._to !== point.x || animY._to !== point.y) {\n        this.xAlign = alignment.xAlign;\n        this.yAlign = alignment.yAlign;\n        this.width = size.width;\n        this.height = size.height;\n        this.caretX = position.x;\n        this.caretY = position.y;\n\n        this._resolveAnimations().update(this, point);\n      }\n    }\n  }\n\n  _willRender() {\n    return !!this.opacity;\n  }\n\n  draw(ctx) {\n    const options = this.options.setContext(this.getContext());\n    let opacity = this.opacity;\n\n    if (!opacity) {\n      return;\n    }\n\n    this._updateAnimationTarget(options);\n\n    const tooltipSize = {\n      width: this.width,\n      height: this.height\n    };\n    const pt = {\n      x: this.x,\n      y: this.y\n    };\n    opacity = Math.abs(opacity) < 1e-3 ? 0 : opacity;\n    const padding = toPadding(options.padding);\n    const hasTooltipContent = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;\n\n    if (options.enabled && hasTooltipContent) {\n      ctx.save();\n      ctx.globalAlpha = opacity;\n      this.drawBackground(pt, ctx, tooltipSize, options);\n      overrideTextDirection(ctx, options.textDirection);\n      pt.y += padding.top;\n      this.drawTitle(pt, ctx, options);\n      this.drawBody(pt, ctx, options);\n      this.drawFooter(pt, ctx, options);\n      restoreTextDirection(ctx, options.textDirection);\n      ctx.restore();\n    }\n  }\n\n  getActiveElements() {\n    return this._active || [];\n  }\n\n  setActiveElements(activeElements, eventPosition) {\n    const lastActive = this._active;\n    const active = activeElements.map(_ref15 => {\n      let datasetIndex = _ref15.datasetIndex,\n          index = _ref15.index;\n      const meta = this.chart.getDatasetMeta(datasetIndex);\n\n      if (!meta) {\n        throw new Error('Cannot find a dataset at index ' + datasetIndex);\n      }\n\n      return {\n        datasetIndex,\n        element: meta.data[index],\n        index\n      };\n    });\n    const changed = !_elementsEqual(lastActive, active);\n\n    const positionChanged = this._positionChanged(active, eventPosition);\n\n    if (changed || positionChanged) {\n      this._active = active;\n      this._eventPosition = eventPosition;\n      this._ignoreReplayEvents = true;\n      this.update(true);\n    }\n  }\n\n  handleEvent(e, replay) {\n    let inChartArea = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n    if (replay && this._ignoreReplayEvents) {\n      return false;\n    }\n\n    this._ignoreReplayEvents = false;\n    const options = this.options;\n    const lastActive = this._active || [];\n\n    const active = this._getActiveElements(e, lastActive, replay, inChartArea);\n\n    const positionChanged = this._positionChanged(active, e);\n\n    const changed = replay || !_elementsEqual(active, lastActive) || positionChanged;\n\n    if (changed) {\n      this._active = active;\n\n      if (options.enabled || options.external) {\n        this._eventPosition = {\n          x: e.x,\n          y: e.y\n        };\n        this.update(true, replay);\n      }\n    }\n\n    return changed;\n  }\n\n  _getActiveElements(e, lastActive, replay, inChartArea) {\n    const options = this.options;\n\n    if (e.type === 'mouseout') {\n      return [];\n    }\n\n    if (!inChartArea) {\n      return lastActive;\n    }\n\n    const active = this.chart.getElementsAtEventForMode(e, options.mode, options, replay);\n\n    if (options.reverse) {\n      active.reverse();\n    }\n\n    return active;\n  }\n\n  _positionChanged(active, e) {\n    const caretX = this.caretX,\n          caretY = this.caretY,\n          options = this.options;\n    const position = positioners[options.position].call(this, active, e);\n    return position !== false && (caretX !== position.x || caretY !== position.y);\n  }\n\n}\n\nTooltip.positioners = positioners;\nvar plugin_tooltip = {\n  id: 'tooltip',\n  _element: Tooltip,\n  positioners,\n\n  afterInit(chart, _args, options) {\n    if (options) {\n      chart.tooltip = new Tooltip({\n        chart,\n        options\n      });\n    }\n  },\n\n  beforeUpdate(chart, _args, options) {\n    if (chart.tooltip) {\n      chart.tooltip.initialize(options);\n    }\n  },\n\n  reset(chart, _args, options) {\n    if (chart.tooltip) {\n      chart.tooltip.initialize(options);\n    }\n  },\n\n  afterDraw(chart) {\n    const tooltip = chart.tooltip;\n\n    if (tooltip && tooltip._willRender()) {\n      const args = {\n        tooltip\n      };\n\n      if (chart.notifyPlugins('beforeTooltipDraw', args) === false) {\n        return;\n      }\n\n      tooltip.draw(chart.ctx);\n      chart.notifyPlugins('afterTooltipDraw', args);\n    }\n  },\n\n  afterEvent(chart, args) {\n    if (chart.tooltip) {\n      const useFinalPosition = args.replay;\n\n      if (chart.tooltip.handleEvent(args.event, useFinalPosition, args.inChartArea)) {\n        args.changed = true;\n      }\n    }\n  },\n\n  defaults: {\n    enabled: true,\n    external: null,\n    position: 'average',\n    backgroundColor: 'rgba(0,0,0,0.8)',\n    titleColor: '#fff',\n    titleFont: {\n      weight: 'bold'\n    },\n    titleSpacing: 2,\n    titleMarginBottom: 6,\n    titleAlign: 'left',\n    bodyColor: '#fff',\n    bodySpacing: 2,\n    bodyFont: {},\n    bodyAlign: 'left',\n    footerColor: '#fff',\n    footerSpacing: 2,\n    footerMarginTop: 6,\n    footerFont: {\n      weight: 'bold'\n    },\n    footerAlign: 'left',\n    padding: 6,\n    caretPadding: 2,\n    caretSize: 5,\n    cornerRadius: 6,\n    boxHeight: (ctx, opts) => opts.bodyFont.size,\n    boxWidth: (ctx, opts) => opts.bodyFont.size,\n    multiKeyBackground: '#fff',\n    displayColors: true,\n    boxPadding: 0,\n    borderColor: 'rgba(0,0,0,0)',\n    borderWidth: 0,\n    animation: {\n      duration: 400,\n      easing: 'easeOutQuart'\n    },\n    animations: {\n      numbers: {\n        type: 'number',\n        properties: ['x', 'y', 'width', 'height', 'caretX', 'caretY']\n      },\n      opacity: {\n        easing: 'linear',\n        duration: 200\n      }\n    },\n    callbacks: {\n      beforeTitle: noop,\n\n      title(tooltipItems) {\n        if (tooltipItems.length > 0) {\n          const item = tooltipItems[0];\n          const labels = item.chart.data.labels;\n          const labelCount = labels ? labels.length : 0;\n\n          if (this && this.options && this.options.mode === 'dataset') {\n            return item.dataset.label || '';\n          } else if (item.label) {\n            return item.label;\n          } else if (labelCount > 0 && item.dataIndex < labelCount) {\n            return labels[item.dataIndex];\n          }\n        }\n\n        return '';\n      },\n\n      afterTitle: noop,\n      beforeBody: noop,\n      beforeLabel: noop,\n\n      label(tooltipItem) {\n        if (this && this.options && this.options.mode === 'dataset') {\n          return tooltipItem.label + ': ' + tooltipItem.formattedValue || tooltipItem.formattedValue;\n        }\n\n        let label = tooltipItem.dataset.label || '';\n\n        if (label) {\n          label += ': ';\n        }\n\n        const value = tooltipItem.formattedValue;\n\n        if (!isNullOrUndef(value)) {\n          label += value;\n        }\n\n        return label;\n      },\n\n      labelColor(tooltipItem) {\n        const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n        const options = meta.controller.getStyle(tooltipItem.dataIndex);\n        return {\n          borderColor: options.borderColor,\n          backgroundColor: options.backgroundColor,\n          borderWidth: options.borderWidth,\n          borderDash: options.borderDash,\n          borderDashOffset: options.borderDashOffset,\n          borderRadius: 0\n        };\n      },\n\n      labelTextColor() {\n        return this.options.bodyColor;\n      },\n\n      labelPointStyle(tooltipItem) {\n        const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n        const options = meta.controller.getStyle(tooltipItem.dataIndex);\n        return {\n          pointStyle: options.pointStyle,\n          rotation: options.rotation\n        };\n      },\n\n      afterLabel: noop,\n      afterBody: noop,\n      beforeFooter: noop,\n      footer: noop,\n      afterFooter: noop\n    }\n  },\n  defaultRoutes: {\n    bodyFont: 'font',\n    footerFont: 'font',\n    titleFont: 'font'\n  },\n  descriptors: {\n    _scriptable: name => name !== 'filter' && name !== 'itemSort' && name !== 'external',\n    _indexable: false,\n    callbacks: {\n      _scriptable: false,\n      _indexable: false\n    },\n    animation: {\n      _fallback: false\n    },\n    animations: {\n      _fallback: 'animation'\n    }\n  },\n  additionalOptionScopes: ['interaction']\n};\nvar plugins = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  Decimation: plugin_decimation,\n  Filler: index,\n  Legend: plugin_legend,\n  SubTitle: plugin_subtitle,\n  Title: plugin_title,\n  Tooltip: plugin_tooltip\n});\n\nconst addIfString = (labels, raw, index, addedLabels) => {\n  if (typeof raw === 'string') {\n    index = labels.push(raw) - 1;\n    addedLabels.unshift({\n      index,\n      label: raw\n    });\n  } else if (isNaN(raw)) {\n    index = null;\n  }\n\n  return index;\n};\n\nfunction findOrAddLabel(labels, raw, index, addedLabels) {\n  const first = labels.indexOf(raw);\n\n  if (first === -1) {\n    return addIfString(labels, raw, index, addedLabels);\n  }\n\n  const last = labels.lastIndexOf(raw);\n  return first !== last ? index : first;\n}\n\nconst validIndex = (index, max) => index === null ? null : _limitValue(Math.round(index), 0, max);\n\nclass CategoryScale extends Scale {\n  constructor(cfg) {\n    super(cfg);\n    this._startValue = undefined;\n    this._valueRange = 0;\n    this._addedLabels = [];\n  }\n\n  init(scaleOptions) {\n    const added = this._addedLabels;\n\n    if (added.length) {\n      const labels = this.getLabels();\n\n      for (const _ref16 of added) {\n        const index = _ref16.index;\n        const label = _ref16.label;\n\n        if (labels[index] === label) {\n          labels.splice(index, 1);\n        }\n      }\n\n      this._addedLabels = [];\n    }\n\n    super.init(scaleOptions);\n  }\n\n  parse(raw, index) {\n    if (isNullOrUndef(raw)) {\n      return null;\n    }\n\n    const labels = this.getLabels();\n    index = isFinite(index) && labels[index] === raw ? index : findOrAddLabel(labels, raw, valueOrDefault(index, raw), this._addedLabels);\n    return validIndex(index, labels.length - 1);\n  }\n\n  determineDataLimits() {\n    const _this$getUserBounds2 = this.getUserBounds(),\n          minDefined = _this$getUserBounds2.minDefined,\n          maxDefined = _this$getUserBounds2.maxDefined;\n\n    let _this$getMinMax = this.getMinMax(true),\n        min = _this$getMinMax.min,\n        max = _this$getMinMax.max;\n\n    if (this.options.bounds === 'ticks') {\n      if (!minDefined) {\n        min = 0;\n      }\n\n      if (!maxDefined) {\n        max = this.getLabels().length - 1;\n      }\n    }\n\n    this.min = min;\n    this.max = max;\n  }\n\n  buildTicks() {\n    const min = this.min;\n    const max = this.max;\n    const offset = this.options.offset;\n    const ticks = [];\n    let labels = this.getLabels();\n    labels = min === 0 && max === labels.length - 1 ? labels : labels.slice(min, max + 1);\n    this._valueRange = Math.max(labels.length - (offset ? 0 : 1), 1);\n    this._startValue = this.min - (offset ? 0.5 : 0);\n\n    for (let value = min; value <= max; value++) {\n      ticks.push({\n        value\n      });\n    }\n\n    return ticks;\n  }\n\n  getLabelForValue(value) {\n    const labels = this.getLabels();\n\n    if (value >= 0 && value < labels.length) {\n      return labels[value];\n    }\n\n    return value;\n  }\n\n  configure() {\n    super.configure();\n\n    if (!this.isHorizontal()) {\n      this._reversePixels = !this._reversePixels;\n    }\n  }\n\n  getPixelForValue(value) {\n    if (typeof value !== 'number') {\n      value = this.parse(value);\n    }\n\n    return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n  }\n\n  getPixelForTick(index) {\n    const ticks = this.ticks;\n\n    if (index < 0 || index > ticks.length - 1) {\n      return null;\n    }\n\n    return this.getPixelForValue(ticks[index].value);\n  }\n\n  getValueForPixel(pixel) {\n    return Math.round(this._startValue + this.getDecimalForPixel(pixel) * this._valueRange);\n  }\n\n  getBasePixel() {\n    return this.bottom;\n  }\n\n}\n\nCategoryScale.id = 'category';\nCategoryScale.defaults = {\n  ticks: {\n    callback: CategoryScale.prototype.getLabelForValue\n  }\n};\n\nfunction generateTicks$1(generationOptions, dataRange) {\n  const ticks = [];\n  const MIN_SPACING = 1e-14;\n  const bounds = generationOptions.bounds,\n        step = generationOptions.step,\n        min = generationOptions.min,\n        max = generationOptions.max,\n        precision = generationOptions.precision,\n        count = generationOptions.count,\n        maxTicks = generationOptions.maxTicks,\n        maxDigits = generationOptions.maxDigits,\n        includeBounds = generationOptions.includeBounds;\n  const unit = step || 1;\n  const maxSpaces = maxTicks - 1;\n  const rmin = dataRange.min,\n        rmax = dataRange.max;\n  const minDefined = !isNullOrUndef(min);\n  const maxDefined = !isNullOrUndef(max);\n  const countDefined = !isNullOrUndef(count);\n  const minSpacing = (rmax - rmin) / (maxDigits + 1);\n  let spacing = niceNum((rmax - rmin) / maxSpaces / unit) * unit;\n  let factor, niceMin, niceMax, numSpaces;\n\n  if (spacing < MIN_SPACING && !minDefined && !maxDefined) {\n    return [{\n      value: rmin\n    }, {\n      value: rmax\n    }];\n  }\n\n  numSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);\n\n  if (numSpaces > maxSpaces) {\n    spacing = niceNum(numSpaces * spacing / maxSpaces / unit) * unit;\n  }\n\n  if (!isNullOrUndef(precision)) {\n    factor = Math.pow(10, precision);\n    spacing = Math.ceil(spacing * factor) / factor;\n  }\n\n  if (bounds === 'ticks') {\n    niceMin = Math.floor(rmin / spacing) * spacing;\n    niceMax = Math.ceil(rmax / spacing) * spacing;\n  } else {\n    niceMin = rmin;\n    niceMax = rmax;\n  }\n\n  if (minDefined && maxDefined && step && almostWhole((max - min) / step, spacing / 1000)) {\n    numSpaces = Math.round(Math.min((max - min) / spacing, maxTicks));\n    spacing = (max - min) / numSpaces;\n    niceMin = min;\n    niceMax = max;\n  } else if (countDefined) {\n    niceMin = minDefined ? min : niceMin;\n    niceMax = maxDefined ? max : niceMax;\n    numSpaces = count - 1;\n    spacing = (niceMax - niceMin) / numSpaces;\n  } else {\n    numSpaces = (niceMax - niceMin) / spacing;\n\n    if (almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {\n      numSpaces = Math.round(numSpaces);\n    } else {\n      numSpaces = Math.ceil(numSpaces);\n    }\n  }\n\n  const decimalPlaces = Math.max(_decimalPlaces(spacing), _decimalPlaces(niceMin));\n  factor = Math.pow(10, isNullOrUndef(precision) ? decimalPlaces : precision);\n  niceMin = Math.round(niceMin * factor) / factor;\n  niceMax = Math.round(niceMax * factor) / factor;\n  let j = 0;\n\n  if (minDefined) {\n    if (includeBounds && niceMin !== min) {\n      ticks.push({\n        value: min\n      });\n\n      if (niceMin < min) {\n        j++;\n      }\n\n      if (almostEquals(Math.round((niceMin + j * spacing) * factor) / factor, min, relativeLabelSize(min, minSpacing, generationOptions))) {\n        j++;\n      }\n    } else if (niceMin < min) {\n      j++;\n    }\n  }\n\n  for (; j < numSpaces; ++j) {\n    ticks.push({\n      value: Math.round((niceMin + j * spacing) * factor) / factor\n    });\n  }\n\n  if (maxDefined && includeBounds && niceMax !== max) {\n    if (ticks.length && almostEquals(ticks[ticks.length - 1].value, max, relativeLabelSize(max, minSpacing, generationOptions))) {\n      ticks[ticks.length - 1].value = max;\n    } else {\n      ticks.push({\n        value: max\n      });\n    }\n  } else if (!maxDefined || niceMax === max) {\n    ticks.push({\n      value: niceMax\n    });\n  }\n\n  return ticks;\n}\n\nfunction relativeLabelSize(value, minSpacing, _ref17) {\n  let horizontal = _ref17.horizontal,\n      minRotation = _ref17.minRotation;\n  const rad = toRadians(minRotation);\n  const ratio = (horizontal ? Math.sin(rad) : Math.cos(rad)) || 0.001;\n  const length = 0.75 * minSpacing * ('' + value).length;\n  return Math.min(minSpacing / ratio, length);\n}\n\nclass LinearScaleBase extends Scale {\n  constructor(cfg) {\n    super(cfg);\n    this.start = undefined;\n    this.end = undefined;\n    this._startValue = undefined;\n    this._endValue = undefined;\n    this._valueRange = 0;\n  }\n\n  parse(raw, index) {\n    if (isNullOrUndef(raw)) {\n      return null;\n    }\n\n    if ((typeof raw === 'number' || raw instanceof Number) && !isFinite(+raw)) {\n      return null;\n    }\n\n    return +raw;\n  }\n\n  handleTickRangeOptions() {\n    const beginAtZero = this.options.beginAtZero;\n\n    const _this$getUserBounds3 = this.getUserBounds(),\n          minDefined = _this$getUserBounds3.minDefined,\n          maxDefined = _this$getUserBounds3.maxDefined;\n\n    let min = this.min,\n        max = this.max;\n\n    const setMin = v => min = minDefined ? min : v;\n\n    const setMax = v => max = maxDefined ? max : v;\n\n    if (beginAtZero) {\n      const minSign = sign(min);\n      const maxSign = sign(max);\n\n      if (minSign < 0 && maxSign < 0) {\n        setMax(0);\n      } else if (minSign > 0 && maxSign > 0) {\n        setMin(0);\n      }\n    }\n\n    if (min === max) {\n      let offset = 1;\n\n      if (max >= Number.MAX_SAFE_INTEGER || min <= Number.MIN_SAFE_INTEGER) {\n        offset = Math.abs(max * 0.05);\n      }\n\n      setMax(max + offset);\n\n      if (!beginAtZero) {\n        setMin(min - offset);\n      }\n    }\n\n    this.min = min;\n    this.max = max;\n  }\n\n  getTickLimit() {\n    const tickOpts = this.options.ticks;\n    let maxTicksLimit = tickOpts.maxTicksLimit,\n        stepSize = tickOpts.stepSize;\n    let maxTicks;\n\n    if (stepSize) {\n      maxTicks = Math.ceil(this.max / stepSize) - Math.floor(this.min / stepSize) + 1;\n\n      if (maxTicks > 1000) {\n        console.warn(\"scales.\".concat(this.id, \".ticks.stepSize: \").concat(stepSize, \" would result generating up to \").concat(maxTicks, \" ticks. Limiting to 1000.\"));\n        maxTicks = 1000;\n      }\n    } else {\n      maxTicks = this.computeTickLimit();\n      maxTicksLimit = maxTicksLimit || 11;\n    }\n\n    if (maxTicksLimit) {\n      maxTicks = Math.min(maxTicksLimit, maxTicks);\n    }\n\n    return maxTicks;\n  }\n\n  computeTickLimit() {\n    return Number.POSITIVE_INFINITY;\n  }\n\n  buildTicks() {\n    const opts = this.options;\n    const tickOpts = opts.ticks;\n    let maxTicks = this.getTickLimit();\n    maxTicks = Math.max(2, maxTicks);\n    const numericGeneratorOptions = {\n      maxTicks,\n      bounds: opts.bounds,\n      min: opts.min,\n      max: opts.max,\n      precision: tickOpts.precision,\n      step: tickOpts.stepSize,\n      count: tickOpts.count,\n      maxDigits: this._maxDigits(),\n      horizontal: this.isHorizontal(),\n      minRotation: tickOpts.minRotation || 0,\n      includeBounds: tickOpts.includeBounds !== false\n    };\n    const dataRange = this._range || this;\n    const ticks = generateTicks$1(numericGeneratorOptions, dataRange);\n\n    if (opts.bounds === 'ticks') {\n      _setMinAndMaxByKey(ticks, this, 'value');\n    }\n\n    if (opts.reverse) {\n      ticks.reverse();\n      this.start = this.max;\n      this.end = this.min;\n    } else {\n      this.start = this.min;\n      this.end = this.max;\n    }\n\n    return ticks;\n  }\n\n  configure() {\n    const ticks = this.ticks;\n    let start = this.min;\n    let end = this.max;\n    super.configure();\n\n    if (this.options.offset && ticks.length) {\n      const offset = (end - start) / Math.max(ticks.length - 1, 1) / 2;\n      start -= offset;\n      end += offset;\n    }\n\n    this._startValue = start;\n    this._endValue = end;\n    this._valueRange = end - start;\n  }\n\n  getLabelForValue(value) {\n    return formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n  }\n\n}\n\nclass LinearScale extends LinearScaleBase {\n  determineDataLimits() {\n    const _this$getMinMax2 = this.getMinMax(true),\n          min = _this$getMinMax2.min,\n          max = _this$getMinMax2.max;\n\n    this.min = isNumberFinite(min) ? min : 0;\n    this.max = isNumberFinite(max) ? max : 1;\n    this.handleTickRangeOptions();\n  }\n\n  computeTickLimit() {\n    const horizontal = this.isHorizontal();\n    const length = horizontal ? this.width : this.height;\n    const minRotation = toRadians(this.options.ticks.minRotation);\n    const ratio = (horizontal ? Math.sin(minRotation) : Math.cos(minRotation)) || 0.001;\n\n    const tickFont = this._resolveTickFontOptions(0);\n\n    return Math.ceil(length / Math.min(40, tickFont.lineHeight / ratio));\n  }\n\n  getPixelForValue(value) {\n    return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n  }\n\n  getValueForPixel(pixel) {\n    return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;\n  }\n\n}\n\nLinearScale.id = 'linear';\nLinearScale.defaults = {\n  ticks: {\n    callback: Ticks.formatters.numeric\n  }\n};\n\nfunction isMajor(tickVal) {\n  const remain = tickVal / Math.pow(10, Math.floor(log10(tickVal)));\n  return remain === 1;\n}\n\nfunction generateTicks(generationOptions, dataRange) {\n  const endExp = Math.floor(log10(dataRange.max));\n  const endSignificand = Math.ceil(dataRange.max / Math.pow(10, endExp));\n  const ticks = [];\n  let tickVal = finiteOrDefault(generationOptions.min, Math.pow(10, Math.floor(log10(dataRange.min))));\n  let exp = Math.floor(log10(tickVal));\n  let significand = Math.floor(tickVal / Math.pow(10, exp));\n  let precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;\n\n  do {\n    ticks.push({\n      value: tickVal,\n      major: isMajor(tickVal)\n    });\n    ++significand;\n\n    if (significand === 10) {\n      significand = 1;\n      ++exp;\n      precision = exp >= 0 ? 1 : precision;\n    }\n\n    tickVal = Math.round(significand * Math.pow(10, exp) * precision) / precision;\n  } while (exp < endExp || exp === endExp && significand < endSignificand);\n\n  const lastTick = finiteOrDefault(generationOptions.max, tickVal);\n  ticks.push({\n    value: lastTick,\n    major: isMajor(tickVal)\n  });\n  return ticks;\n}\n\nclass LogarithmicScale extends Scale {\n  constructor(cfg) {\n    super(cfg);\n    this.start = undefined;\n    this.end = undefined;\n    this._startValue = undefined;\n    this._valueRange = 0;\n  }\n\n  parse(raw, index) {\n    const value = LinearScaleBase.prototype.parse.apply(this, [raw, index]);\n\n    if (value === 0) {\n      this._zero = true;\n      return undefined;\n    }\n\n    return isNumberFinite(value) && value > 0 ? value : null;\n  }\n\n  determineDataLimits() {\n    const _this$getMinMax3 = this.getMinMax(true),\n          min = _this$getMinMax3.min,\n          max = _this$getMinMax3.max;\n\n    this.min = isNumberFinite(min) ? Math.max(0, min) : null;\n    this.max = isNumberFinite(max) ? Math.max(0, max) : null;\n\n    if (this.options.beginAtZero) {\n      this._zero = true;\n    }\n\n    this.handleTickRangeOptions();\n  }\n\n  handleTickRangeOptions() {\n    const _this$getUserBounds4 = this.getUserBounds(),\n          minDefined = _this$getUserBounds4.minDefined,\n          maxDefined = _this$getUserBounds4.maxDefined;\n\n    let min = this.min;\n    let max = this.max;\n\n    const setMin = v => min = minDefined ? min : v;\n\n    const setMax = v => max = maxDefined ? max : v;\n\n    const exp = (v, m) => Math.pow(10, Math.floor(log10(v)) + m);\n\n    if (min === max) {\n      if (min <= 0) {\n        setMin(1);\n        setMax(10);\n      } else {\n        setMin(exp(min, -1));\n        setMax(exp(max, +1));\n      }\n    }\n\n    if (min <= 0) {\n      setMin(exp(max, -1));\n    }\n\n    if (max <= 0) {\n      setMax(exp(min, +1));\n    }\n\n    if (this._zero && this.min !== this._suggestedMin && min === exp(this.min, 0)) {\n      setMin(exp(min, -1));\n    }\n\n    this.min = min;\n    this.max = max;\n  }\n\n  buildTicks() {\n    const opts = this.options;\n    const generationOptions = {\n      min: this._userMin,\n      max: this._userMax\n    };\n    const ticks = generateTicks(generationOptions, this);\n\n    if (opts.bounds === 'ticks') {\n      _setMinAndMaxByKey(ticks, this, 'value');\n    }\n\n    if (opts.reverse) {\n      ticks.reverse();\n      this.start = this.max;\n      this.end = this.min;\n    } else {\n      this.start = this.min;\n      this.end = this.max;\n    }\n\n    return ticks;\n  }\n\n  getLabelForValue(value) {\n    return value === undefined ? '0' : formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n  }\n\n  configure() {\n    const start = this.min;\n    super.configure();\n    this._startValue = log10(start);\n    this._valueRange = log10(this.max) - log10(start);\n  }\n\n  getPixelForValue(value) {\n    if (value === undefined || value === 0) {\n      value = this.min;\n    }\n\n    if (value === null || isNaN(value)) {\n      return NaN;\n    }\n\n    return this.getPixelForDecimal(value === this.min ? 0 : (log10(value) - this._startValue) / this._valueRange);\n  }\n\n  getValueForPixel(pixel) {\n    const decimal = this.getDecimalForPixel(pixel);\n    return Math.pow(10, this._startValue + decimal * this._valueRange);\n  }\n\n}\n\nLogarithmicScale.id = 'logarithmic';\nLogarithmicScale.defaults = {\n  ticks: {\n    callback: Ticks.formatters.logarithmic,\n    major: {\n      enabled: true\n    }\n  }\n};\n\nfunction getTickBackdropHeight(opts) {\n  const tickOpts = opts.ticks;\n\n  if (tickOpts.display && opts.display) {\n    const padding = toPadding(tickOpts.backdropPadding);\n    return valueOrDefault(tickOpts.font && tickOpts.font.size, defaults.font.size) + padding.height;\n  }\n\n  return 0;\n}\n\nfunction measureLabelSize(ctx, font, label) {\n  label = isArray(label) ? label : [label];\n  return {\n    w: _longestText(ctx, font.string, label),\n    h: label.length * font.lineHeight\n  };\n}\n\nfunction determineLimits(angle, pos, size, min, max) {\n  if (angle === min || angle === max) {\n    return {\n      start: pos - size / 2,\n      end: pos + size / 2\n    };\n  } else if (angle < min || angle > max) {\n    return {\n      start: pos - size,\n      end: pos\n    };\n  }\n\n  return {\n    start: pos,\n    end: pos + size\n  };\n}\n\nfunction fitWithPointLabels(scale) {\n  const orig = {\n    l: scale.left + scale._padding.left,\n    r: scale.right - scale._padding.right,\n    t: scale.top + scale._padding.top,\n    b: scale.bottom - scale._padding.bottom\n  };\n  const limits = Object.assign({}, orig);\n  const labelSizes = [];\n  const padding = [];\n  const valueCount = scale._pointLabels.length;\n  const pointLabelOpts = scale.options.pointLabels;\n  const additionalAngle = pointLabelOpts.centerPointLabels ? PI / valueCount : 0;\n\n  for (let i = 0; i < valueCount; i++) {\n    const opts = pointLabelOpts.setContext(scale.getPointLabelContext(i));\n    padding[i] = opts.padding;\n    const pointPosition = scale.getPointPosition(i, scale.drawingArea + padding[i], additionalAngle);\n    const plFont = toFont(opts.font);\n    const textSize = measureLabelSize(scale.ctx, plFont, scale._pointLabels[i]);\n    labelSizes[i] = textSize;\n\n    const angleRadians = _normalizeAngle(scale.getIndexAngle(i) + additionalAngle);\n\n    const angle = Math.round(toDegrees(angleRadians));\n    const hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);\n    const vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);\n    updateLimits(limits, orig, angleRadians, hLimits, vLimits);\n  }\n\n  scale.setCenterPoint(orig.l - limits.l, limits.r - orig.r, orig.t - limits.t, limits.b - orig.b);\n  scale._pointLabelItems = buildPointLabelItems(scale, labelSizes, padding);\n}\n\nfunction updateLimits(limits, orig, angle, hLimits, vLimits) {\n  const sin = Math.abs(Math.sin(angle));\n  const cos = Math.abs(Math.cos(angle));\n  let x = 0;\n  let y = 0;\n\n  if (hLimits.start < orig.l) {\n    x = (orig.l - hLimits.start) / sin;\n    limits.l = Math.min(limits.l, orig.l - x);\n  } else if (hLimits.end > orig.r) {\n    x = (hLimits.end - orig.r) / sin;\n    limits.r = Math.max(limits.r, orig.r + x);\n  }\n\n  if (vLimits.start < orig.t) {\n    y = (orig.t - vLimits.start) / cos;\n    limits.t = Math.min(limits.t, orig.t - y);\n  } else if (vLimits.end > orig.b) {\n    y = (vLimits.end - orig.b) / cos;\n    limits.b = Math.max(limits.b, orig.b + y);\n  }\n}\n\nfunction buildPointLabelItems(scale, labelSizes, padding) {\n  const items = [];\n  const valueCount = scale._pointLabels.length;\n  const opts = scale.options;\n  const extra = getTickBackdropHeight(opts) / 2;\n  const outerDistance = scale.drawingArea;\n  const additionalAngle = opts.pointLabels.centerPointLabels ? PI / valueCount : 0;\n\n  for (let i = 0; i < valueCount; i++) {\n    const pointLabelPosition = scale.getPointPosition(i, outerDistance + extra + padding[i], additionalAngle);\n    const angle = Math.round(toDegrees(_normalizeAngle(pointLabelPosition.angle + HALF_PI)));\n    const size = labelSizes[i];\n    const y = yForAngle(pointLabelPosition.y, size.h, angle);\n    const textAlign = getTextAlignForAngle(angle);\n    const left = leftForTextAlign(pointLabelPosition.x, size.w, textAlign);\n    items.push({\n      x: pointLabelPosition.x,\n      y,\n      textAlign,\n      left,\n      top: y,\n      right: left + size.w,\n      bottom: y + size.h\n    });\n  }\n\n  return items;\n}\n\nfunction getTextAlignForAngle(angle) {\n  if (angle === 0 || angle === 180) {\n    return 'center';\n  } else if (angle < 180) {\n    return 'left';\n  }\n\n  return 'right';\n}\n\nfunction leftForTextAlign(x, w, align) {\n  if (align === 'right') {\n    x -= w;\n  } else if (align === 'center') {\n    x -= w / 2;\n  }\n\n  return x;\n}\n\nfunction yForAngle(y, h, angle) {\n  if (angle === 90 || angle === 270) {\n    y -= h / 2;\n  } else if (angle > 270 || angle < 90) {\n    y -= h;\n  }\n\n  return y;\n}\n\nfunction drawPointLabels(scale, labelCount) {\n  const ctx = scale.ctx,\n        pointLabels = scale.options.pointLabels;\n\n  for (let i = labelCount - 1; i >= 0; i--) {\n    const optsAtIndex = pointLabels.setContext(scale.getPointLabelContext(i));\n    const plFont = toFont(optsAtIndex.font);\n    const _scale$_pointLabelIte = scale._pointLabelItems[i],\n          x = _scale$_pointLabelIte.x,\n          y = _scale$_pointLabelIte.y,\n          textAlign = _scale$_pointLabelIte.textAlign,\n          left = _scale$_pointLabelIte.left,\n          top = _scale$_pointLabelIte.top,\n          right = _scale$_pointLabelIte.right,\n          bottom = _scale$_pointLabelIte.bottom;\n    const backdropColor = optsAtIndex.backdropColor;\n\n    if (!isNullOrUndef(backdropColor)) {\n      const borderRadius = toTRBLCorners(optsAtIndex.borderRadius);\n      const padding = toPadding(optsAtIndex.backdropPadding);\n      ctx.fillStyle = backdropColor;\n      const backdropLeft = left - padding.left;\n      const backdropTop = top - padding.top;\n      const backdropWidth = right - left + padding.width;\n      const backdropHeight = bottom - top + padding.height;\n\n      if (Object.values(borderRadius).some(v => v !== 0)) {\n        ctx.beginPath();\n        addRoundedRectPath(ctx, {\n          x: backdropLeft,\n          y: backdropTop,\n          w: backdropWidth,\n          h: backdropHeight,\n          radius: borderRadius\n        });\n        ctx.fill();\n      } else {\n        ctx.fillRect(backdropLeft, backdropTop, backdropWidth, backdropHeight);\n      }\n    }\n\n    renderText(ctx, scale._pointLabels[i], x, y + plFont.lineHeight / 2, plFont, {\n      color: optsAtIndex.color,\n      textAlign: textAlign,\n      textBaseline: 'middle'\n    });\n  }\n}\n\nfunction pathRadiusLine(scale, radius, circular, labelCount) {\n  const ctx = scale.ctx;\n\n  if (circular) {\n    ctx.arc(scale.xCenter, scale.yCenter, radius, 0, TAU);\n  } else {\n    let pointPosition = scale.getPointPosition(0, radius);\n    ctx.moveTo(pointPosition.x, pointPosition.y);\n\n    for (let i = 1; i < labelCount; i++) {\n      pointPosition = scale.getPointPosition(i, radius);\n      ctx.lineTo(pointPosition.x, pointPosition.y);\n    }\n  }\n}\n\nfunction drawRadiusLine(scale, gridLineOpts, radius, labelCount) {\n  const ctx = scale.ctx;\n  const circular = gridLineOpts.circular;\n  const color = gridLineOpts.color,\n        lineWidth = gridLineOpts.lineWidth;\n\n  if (!circular && !labelCount || !color || !lineWidth || radius < 0) {\n    return;\n  }\n\n  ctx.save();\n  ctx.strokeStyle = color;\n  ctx.lineWidth = lineWidth;\n  ctx.setLineDash(gridLineOpts.borderDash);\n  ctx.lineDashOffset = gridLineOpts.borderDashOffset;\n  ctx.beginPath();\n  pathRadiusLine(scale, radius, circular, labelCount);\n  ctx.closePath();\n  ctx.stroke();\n  ctx.restore();\n}\n\nfunction createPointLabelContext(parent, index, label) {\n  return createContext(parent, {\n    label,\n    index,\n    type: 'pointLabel'\n  });\n}\n\nclass RadialLinearScale extends LinearScaleBase {\n  constructor(cfg) {\n    super(cfg);\n    this.xCenter = undefined;\n    this.yCenter = undefined;\n    this.drawingArea = undefined;\n    this._pointLabels = [];\n    this._pointLabelItems = [];\n  }\n\n  setDimensions() {\n    const padding = this._padding = toPadding(getTickBackdropHeight(this.options) / 2);\n    const w = this.width = this.maxWidth - padding.width;\n    const h = this.height = this.maxHeight - padding.height;\n    this.xCenter = Math.floor(this.left + w / 2 + padding.left);\n    this.yCenter = Math.floor(this.top + h / 2 + padding.top);\n    this.drawingArea = Math.floor(Math.min(w, h) / 2);\n  }\n\n  determineDataLimits() {\n    const _this$getMinMax4 = this.getMinMax(false),\n          min = _this$getMinMax4.min,\n          max = _this$getMinMax4.max;\n\n    this.min = isNumberFinite(min) && !isNaN(min) ? min : 0;\n    this.max = isNumberFinite(max) && !isNaN(max) ? max : 0;\n    this.handleTickRangeOptions();\n  }\n\n  computeTickLimit() {\n    return Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));\n  }\n\n  generateTickLabels(ticks) {\n    LinearScaleBase.prototype.generateTickLabels.call(this, ticks);\n    this._pointLabels = this.getLabels().map((value, index) => {\n      const label = callback(this.options.pointLabels.callback, [value, index], this);\n      return label || label === 0 ? label : '';\n    }).filter((v, i) => this.chart.getDataVisibility(i));\n  }\n\n  fit() {\n    const opts = this.options;\n\n    if (opts.display && opts.pointLabels.display) {\n      fitWithPointLabels(this);\n    } else {\n      this.setCenterPoint(0, 0, 0, 0);\n    }\n  }\n\n  setCenterPoint(leftMovement, rightMovement, topMovement, bottomMovement) {\n    this.xCenter += Math.floor((leftMovement - rightMovement) / 2);\n    this.yCenter += Math.floor((topMovement - bottomMovement) / 2);\n    this.drawingArea -= Math.min(this.drawingArea / 2, Math.max(leftMovement, rightMovement, topMovement, bottomMovement));\n  }\n\n  getIndexAngle(index) {\n    const angleMultiplier = TAU / (this._pointLabels.length || 1);\n    const startAngle = this.options.startAngle || 0;\n    return _normalizeAngle(index * angleMultiplier + toRadians(startAngle));\n  }\n\n  getDistanceFromCenterForValue(value) {\n    if (isNullOrUndef(value)) {\n      return NaN;\n    }\n\n    const scalingFactor = this.drawingArea / (this.max - this.min);\n\n    if (this.options.reverse) {\n      return (this.max - value) * scalingFactor;\n    }\n\n    return (value - this.min) * scalingFactor;\n  }\n\n  getValueForDistanceFromCenter(distance) {\n    if (isNullOrUndef(distance)) {\n      return NaN;\n    }\n\n    const scaledDistance = distance / (this.drawingArea / (this.max - this.min));\n    return this.options.reverse ? this.max - scaledDistance : this.min + scaledDistance;\n  }\n\n  getPointLabelContext(index) {\n    const pointLabels = this._pointLabels || [];\n\n    if (index >= 0 && index < pointLabels.length) {\n      const pointLabel = pointLabels[index];\n      return createPointLabelContext(this.getContext(), index, pointLabel);\n    }\n  }\n\n  getPointPosition(index, distanceFromCenter) {\n    let additionalAngle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n    const angle = this.getIndexAngle(index) - HALF_PI + additionalAngle;\n    return {\n      x: Math.cos(angle) * distanceFromCenter + this.xCenter,\n      y: Math.sin(angle) * distanceFromCenter + this.yCenter,\n      angle\n    };\n  }\n\n  getPointPositionForValue(index, value) {\n    return this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\n  }\n\n  getBasePosition(index) {\n    return this.getPointPositionForValue(index || 0, this.getBaseValue());\n  }\n\n  getPointLabelPosition(index) {\n    const _this$_pointLabelItem = this._pointLabelItems[index],\n          left = _this$_pointLabelItem.left,\n          top = _this$_pointLabelItem.top,\n          right = _this$_pointLabelItem.right,\n          bottom = _this$_pointLabelItem.bottom;\n    return {\n      left,\n      top,\n      right,\n      bottom\n    };\n  }\n\n  drawBackground() {\n    const _this$options15 = this.options,\n          backgroundColor = _this$options15.backgroundColor,\n          circular = _this$options15.grid.circular;\n\n    if (backgroundColor) {\n      const ctx = this.ctx;\n      ctx.save();\n      ctx.beginPath();\n      pathRadiusLine(this, this.getDistanceFromCenterForValue(this._endValue), circular, this._pointLabels.length);\n      ctx.closePath();\n      ctx.fillStyle = backgroundColor;\n      ctx.fill();\n      ctx.restore();\n    }\n  }\n\n  drawGrid() {\n    const ctx = this.ctx;\n    const opts = this.options;\n    const angleLines = opts.angleLines,\n          grid = opts.grid;\n    const labelCount = this._pointLabels.length;\n    let i, offset, position;\n\n    if (opts.pointLabels.display) {\n      drawPointLabels(this, labelCount);\n    }\n\n    if (grid.display) {\n      this.ticks.forEach((tick, index) => {\n        if (index !== 0) {\n          offset = this.getDistanceFromCenterForValue(tick.value);\n          const optsAtIndex = grid.setContext(this.getContext(index - 1));\n          drawRadiusLine(this, optsAtIndex, offset, labelCount);\n        }\n      });\n    }\n\n    if (angleLines.display) {\n      ctx.save();\n\n      for (i = labelCount - 1; i >= 0; i--) {\n        const optsAtIndex = angleLines.setContext(this.getPointLabelContext(i));\n        const color = optsAtIndex.color,\n              lineWidth = optsAtIndex.lineWidth;\n\n        if (!lineWidth || !color) {\n          continue;\n        }\n\n        ctx.lineWidth = lineWidth;\n        ctx.strokeStyle = color;\n        ctx.setLineDash(optsAtIndex.borderDash);\n        ctx.lineDashOffset = optsAtIndex.borderDashOffset;\n        offset = this.getDistanceFromCenterForValue(opts.ticks.reverse ? this.min : this.max);\n        position = this.getPointPosition(i, offset);\n        ctx.beginPath();\n        ctx.moveTo(this.xCenter, this.yCenter);\n        ctx.lineTo(position.x, position.y);\n        ctx.stroke();\n      }\n\n      ctx.restore();\n    }\n  }\n\n  drawBorder() {}\n\n  drawLabels() {\n    const ctx = this.ctx;\n    const opts = this.options;\n    const tickOpts = opts.ticks;\n\n    if (!tickOpts.display) {\n      return;\n    }\n\n    const startAngle = this.getIndexAngle(0);\n    let offset, width;\n    ctx.save();\n    ctx.translate(this.xCenter, this.yCenter);\n    ctx.rotate(startAngle);\n    ctx.textAlign = 'center';\n    ctx.textBaseline = 'middle';\n    this.ticks.forEach((tick, index) => {\n      if (index === 0 && !opts.reverse) {\n        return;\n      }\n\n      const optsAtIndex = tickOpts.setContext(this.getContext(index));\n      const tickFont = toFont(optsAtIndex.font);\n      offset = this.getDistanceFromCenterForValue(this.ticks[index].value);\n\n      if (optsAtIndex.showLabelBackdrop) {\n        ctx.font = tickFont.string;\n        width = ctx.measureText(tick.label).width;\n        ctx.fillStyle = optsAtIndex.backdropColor;\n        const padding = toPadding(optsAtIndex.backdropPadding);\n        ctx.fillRect(-width / 2 - padding.left, -offset - tickFont.size / 2 - padding.top, width + padding.width, tickFont.size + padding.height);\n      }\n\n      renderText(ctx, tick.label, 0, -offset, tickFont, {\n        color: optsAtIndex.color\n      });\n    });\n    ctx.restore();\n  }\n\n  drawTitle() {}\n\n}\n\nRadialLinearScale.id = 'radialLinear';\nRadialLinearScale.defaults = {\n  display: true,\n  animate: true,\n  position: 'chartArea',\n  angleLines: {\n    display: true,\n    lineWidth: 1,\n    borderDash: [],\n    borderDashOffset: 0.0\n  },\n  grid: {\n    circular: false\n  },\n  startAngle: 0,\n  ticks: {\n    showLabelBackdrop: true,\n    callback: Ticks.formatters.numeric\n  },\n  pointLabels: {\n    backdropColor: undefined,\n    backdropPadding: 2,\n    display: true,\n    font: {\n      size: 10\n    },\n\n    callback(label) {\n      return label;\n    },\n\n    padding: 5,\n    centerPointLabels: false\n  }\n};\nRadialLinearScale.defaultRoutes = {\n  'angleLines.color': 'borderColor',\n  'pointLabels.color': 'color',\n  'ticks.color': 'color'\n};\nRadialLinearScale.descriptors = {\n  angleLines: {\n    _fallback: 'grid'\n  }\n};\nconst INTERVALS = {\n  millisecond: {\n    common: true,\n    size: 1,\n    steps: 1000\n  },\n  second: {\n    common: true,\n    size: 1000,\n    steps: 60\n  },\n  minute: {\n    common: true,\n    size: 60000,\n    steps: 60\n  },\n  hour: {\n    common: true,\n    size: 3600000,\n    steps: 24\n  },\n  day: {\n    common: true,\n    size: 86400000,\n    steps: 30\n  },\n  week: {\n    common: false,\n    size: 604800000,\n    steps: 4\n  },\n  month: {\n    common: true,\n    size: 2.628e9,\n    steps: 12\n  },\n  quarter: {\n    common: false,\n    size: 7.884e9,\n    steps: 4\n  },\n  year: {\n    common: true,\n    size: 3.154e10\n  }\n};\nconst UNITS = Object.keys(INTERVALS);\n\nfunction sorter(a, b) {\n  return a - b;\n}\n\nfunction parse(scale, input) {\n  if (isNullOrUndef(input)) {\n    return null;\n  }\n\n  const adapter = scale._adapter;\n  const _scale$_parseOpts = scale._parseOpts,\n        parser = _scale$_parseOpts.parser,\n        round = _scale$_parseOpts.round,\n        isoWeekday = _scale$_parseOpts.isoWeekday;\n  let value = input;\n\n  if (typeof parser === 'function') {\n    value = parser(value);\n  }\n\n  if (!isNumberFinite(value)) {\n    value = typeof parser === 'string' ? adapter.parse(value, parser) : adapter.parse(value);\n  }\n\n  if (value === null) {\n    return null;\n  }\n\n  if (round) {\n    value = round === 'week' && (isNumber(isoWeekday) || isoWeekday === true) ? adapter.startOf(value, 'isoWeek', isoWeekday) : adapter.startOf(value, round);\n  }\n\n  return +value;\n}\n\nfunction determineUnitForAutoTicks(minUnit, min, max, capacity) {\n  const ilen = UNITS.length;\n\n  for (let i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) {\n    const interval = INTERVALS[UNITS[i]];\n    const factor = interval.steps ? interval.steps : Number.MAX_SAFE_INTEGER;\n\n    if (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {\n      return UNITS[i];\n    }\n  }\n\n  return UNITS[ilen - 1];\n}\n\nfunction determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n  for (let i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--) {\n    const unit = UNITS[i];\n\n    if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n      return unit;\n    }\n  }\n\n  return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}\n\nfunction determineMajorUnit(unit) {\n  for (let i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) {\n    if (INTERVALS[UNITS[i]].common) {\n      return UNITS[i];\n    }\n  }\n}\n\nfunction addTick(ticks, time, timestamps) {\n  if (!timestamps) {\n    ticks[time] = true;\n  } else if (timestamps.length) {\n    const _lookup2 = _lookup(timestamps, time),\n          lo = _lookup2.lo,\n          hi = _lookup2.hi;\n\n    const timestamp = timestamps[lo] >= time ? timestamps[lo] : timestamps[hi];\n    ticks[timestamp] = true;\n  }\n}\n\nfunction setMajorTicks(scale, ticks, map, majorUnit) {\n  const adapter = scale._adapter;\n  const first = +adapter.startOf(ticks[0].value, majorUnit);\n  const last = ticks[ticks.length - 1].value;\n  let major, index;\n\n  for (major = first; major <= last; major = +adapter.add(major, 1, majorUnit)) {\n    index = map[major];\n\n    if (index >= 0) {\n      ticks[index].major = true;\n    }\n  }\n\n  return ticks;\n}\n\nfunction ticksFromTimestamps(scale, values, majorUnit) {\n  const ticks = [];\n  const map = {};\n  const ilen = values.length;\n  let i, value;\n\n  for (i = 0; i < ilen; ++i) {\n    value = values[i];\n    map[value] = i;\n    ticks.push({\n      value,\n      major: false\n    });\n  }\n\n  return ilen === 0 || !majorUnit ? ticks : setMajorTicks(scale, ticks, map, majorUnit);\n}\n\nclass TimeScale extends Scale {\n  constructor(props) {\n    super(props);\n    this._cache = {\n      data: [],\n      labels: [],\n      all: []\n    };\n    this._unit = 'day';\n    this._majorUnit = undefined;\n    this._offsets = {};\n    this._normalized = false;\n    this._parseOpts = undefined;\n  }\n\n  init(scaleOpts, opts) {\n    const time = scaleOpts.time || (scaleOpts.time = {});\n    const adapter = this._adapter = new adapters._date(scaleOpts.adapters.date);\n    adapter.init(opts);\n    mergeIf(time.displayFormats, adapter.formats());\n    this._parseOpts = {\n      parser: time.parser,\n      round: time.round,\n      isoWeekday: time.isoWeekday\n    };\n    super.init(scaleOpts);\n    this._normalized = opts.normalized;\n  }\n\n  parse(raw, index) {\n    if (raw === undefined) {\n      return null;\n    }\n\n    return parse(this, raw);\n  }\n\n  beforeLayout() {\n    super.beforeLayout();\n    this._cache = {\n      data: [],\n      labels: [],\n      all: []\n    };\n  }\n\n  determineDataLimits() {\n    const options = this.options;\n    const adapter = this._adapter;\n    const unit = options.time.unit || 'day';\n\n    let _this$getUserBounds5 = this.getUserBounds(),\n        min = _this$getUserBounds5.min,\n        max = _this$getUserBounds5.max,\n        minDefined = _this$getUserBounds5.minDefined,\n        maxDefined = _this$getUserBounds5.maxDefined;\n\n    function _applyBounds(bounds) {\n      if (!minDefined && !isNaN(bounds.min)) {\n        min = Math.min(min, bounds.min);\n      }\n\n      if (!maxDefined && !isNaN(bounds.max)) {\n        max = Math.max(max, bounds.max);\n      }\n    }\n\n    if (!minDefined || !maxDefined) {\n      _applyBounds(this._getLabelBounds());\n\n      if (options.bounds !== 'ticks' || options.ticks.source !== 'labels') {\n        _applyBounds(this.getMinMax(false));\n      }\n    }\n\n    min = isNumberFinite(min) && !isNaN(min) ? min : +adapter.startOf(Date.now(), unit);\n    max = isNumberFinite(max) && !isNaN(max) ? max : +adapter.endOf(Date.now(), unit) + 1;\n    this.min = Math.min(min, max - 1);\n    this.max = Math.max(min + 1, max);\n  }\n\n  _getLabelBounds() {\n    const arr = this.getLabelTimestamps();\n    let min = Number.POSITIVE_INFINITY;\n    let max = Number.NEGATIVE_INFINITY;\n\n    if (arr.length) {\n      min = arr[0];\n      max = arr[arr.length - 1];\n    }\n\n    return {\n      min,\n      max\n    };\n  }\n\n  buildTicks() {\n    const options = this.options;\n    const timeOpts = options.time;\n    const tickOpts = options.ticks;\n    const timestamps = tickOpts.source === 'labels' ? this.getLabelTimestamps() : this._generate();\n\n    if (options.bounds === 'ticks' && timestamps.length) {\n      this.min = this._userMin || timestamps[0];\n      this.max = this._userMax || timestamps[timestamps.length - 1];\n    }\n\n    const min = this.min;\n    const max = this.max;\n\n    const ticks = _filterBetween(timestamps, min, max);\n\n    this._unit = timeOpts.unit || (tickOpts.autoSkip ? determineUnitForAutoTicks(timeOpts.minUnit, this.min, this.max, this._getLabelCapacity(min)) : determineUnitForFormatting(this, ticks.length, timeOpts.minUnit, this.min, this.max));\n    this._majorUnit = !tickOpts.major.enabled || this._unit === 'year' ? undefined : determineMajorUnit(this._unit);\n    this.initOffsets(timestamps);\n\n    if (options.reverse) {\n      ticks.reverse();\n    }\n\n    return ticksFromTimestamps(this, ticks, this._majorUnit);\n  }\n\n  afterAutoSkip() {\n    if (this.options.offsetAfterAutoskip) {\n      this.initOffsets(this.ticks.map(tick => +tick.value));\n    }\n  }\n\n  initOffsets(timestamps) {\n    let start = 0;\n    let end = 0;\n    let first, last;\n\n    if (this.options.offset && timestamps.length) {\n      first = this.getDecimalForValue(timestamps[0]);\n\n      if (timestamps.length === 1) {\n        start = 1 - first;\n      } else {\n        start = (this.getDecimalForValue(timestamps[1]) - first) / 2;\n      }\n\n      last = this.getDecimalForValue(timestamps[timestamps.length - 1]);\n\n      if (timestamps.length === 1) {\n        end = last;\n      } else {\n        end = (last - this.getDecimalForValue(timestamps[timestamps.length - 2])) / 2;\n      }\n    }\n\n    const limit = timestamps.length < 3 ? 0.5 : 0.25;\n    start = _limitValue(start, 0, limit);\n    end = _limitValue(end, 0, limit);\n    this._offsets = {\n      start,\n      end,\n      factor: 1 / (start + 1 + end)\n    };\n  }\n\n  _generate() {\n    const adapter = this._adapter;\n    const min = this.min;\n    const max = this.max;\n    const options = this.options;\n    const timeOpts = options.time;\n    const minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, this._getLabelCapacity(min));\n    const stepSize = valueOrDefault(timeOpts.stepSize, 1);\n    const weekday = minor === 'week' ? timeOpts.isoWeekday : false;\n    const hasWeekday = isNumber(weekday) || weekday === true;\n    const ticks = {};\n    let first = min;\n    let time, count;\n\n    if (hasWeekday) {\n      first = +adapter.startOf(first, 'isoWeek', weekday);\n    }\n\n    first = +adapter.startOf(first, hasWeekday ? 'day' : minor);\n\n    if (adapter.diff(max, min, minor) > 100000 * stepSize) {\n      throw new Error(min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor);\n    }\n\n    const timestamps = options.ticks.source === 'data' && this.getDataTimestamps();\n\n    for (time = first, count = 0; time < max; time = +adapter.add(time, stepSize, minor), count++) {\n      addTick(ticks, time, timestamps);\n    }\n\n    if (time === max || options.bounds === 'ticks' || count === 1) {\n      addTick(ticks, time, timestamps);\n    }\n\n    return Object.keys(ticks).sort((a, b) => a - b).map(x => +x);\n  }\n\n  getLabelForValue(value) {\n    const adapter = this._adapter;\n    const timeOpts = this.options.time;\n\n    if (timeOpts.tooltipFormat) {\n      return adapter.format(value, timeOpts.tooltipFormat);\n    }\n\n    return adapter.format(value, timeOpts.displayFormats.datetime);\n  }\n\n  _tickFormatFunction(time, index, ticks, format) {\n    const options = this.options;\n    const formats = options.time.displayFormats;\n    const unit = this._unit;\n    const majorUnit = this._majorUnit;\n    const minorFormat = unit && formats[unit];\n    const majorFormat = majorUnit && formats[majorUnit];\n    const tick = ticks[index];\n    const major = majorUnit && majorFormat && tick && tick.major;\n\n    const label = this._adapter.format(time, format || (major ? majorFormat : minorFormat));\n\n    const formatter = options.ticks.callback;\n    return formatter ? callback(formatter, [label, index, ticks], this) : label;\n  }\n\n  generateTickLabels(ticks) {\n    let i, ilen, tick;\n\n    for (i = 0, ilen = ticks.length; i < ilen; ++i) {\n      tick = ticks[i];\n      tick.label = this._tickFormatFunction(tick.value, i, ticks);\n    }\n  }\n\n  getDecimalForValue(value) {\n    return value === null ? NaN : (value - this.min) / (this.max - this.min);\n  }\n\n  getPixelForValue(value) {\n    const offsets = this._offsets;\n    const pos = this.getDecimalForValue(value);\n    return this.getPixelForDecimal((offsets.start + pos) * offsets.factor);\n  }\n\n  getValueForPixel(pixel) {\n    const offsets = this._offsets;\n    const pos = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n    return this.min + pos * (this.max - this.min);\n  }\n\n  _getLabelSize(label) {\n    const ticksOpts = this.options.ticks;\n    const tickLabelWidth = this.ctx.measureText(label).width;\n    const angle = toRadians(this.isHorizontal() ? ticksOpts.maxRotation : ticksOpts.minRotation);\n    const cosRotation = Math.cos(angle);\n    const sinRotation = Math.sin(angle);\n\n    const tickFontSize = this._resolveTickFontOptions(0).size;\n\n    return {\n      w: tickLabelWidth * cosRotation + tickFontSize * sinRotation,\n      h: tickLabelWidth * sinRotation + tickFontSize * cosRotation\n    };\n  }\n\n  _getLabelCapacity(exampleTime) {\n    const timeOpts = this.options.time;\n    const displayFormats = timeOpts.displayFormats;\n    const format = displayFormats[timeOpts.unit] || displayFormats.millisecond;\n\n    const exampleLabel = this._tickFormatFunction(exampleTime, 0, ticksFromTimestamps(this, [exampleTime], this._majorUnit), format);\n\n    const size = this._getLabelSize(exampleLabel);\n\n    const capacity = Math.floor(this.isHorizontal() ? this.width / size.w : this.height / size.h) - 1;\n    return capacity > 0 ? capacity : 1;\n  }\n\n  getDataTimestamps() {\n    let timestamps = this._cache.data || [];\n    let i, ilen;\n\n    if (timestamps.length) {\n      return timestamps;\n    }\n\n    const metas = this.getMatchingVisibleMetas();\n\n    if (this._normalized && metas.length) {\n      return this._cache.data = metas[0].controller.getAllParsedValues(this);\n    }\n\n    for (i = 0, ilen = metas.length; i < ilen; ++i) {\n      timestamps = timestamps.concat(metas[i].controller.getAllParsedValues(this));\n    }\n\n    return this._cache.data = this.normalize(timestamps);\n  }\n\n  getLabelTimestamps() {\n    const timestamps = this._cache.labels || [];\n    let i, ilen;\n\n    if (timestamps.length) {\n      return timestamps;\n    }\n\n    const labels = this.getLabels();\n\n    for (i = 0, ilen = labels.length; i < ilen; ++i) {\n      timestamps.push(parse(this, labels[i]));\n    }\n\n    return this._cache.labels = this._normalized ? timestamps : this.normalize(timestamps);\n  }\n\n  normalize(values) {\n    return _arrayUnique(values.sort(sorter));\n  }\n\n}\n\nTimeScale.id = 'time';\nTimeScale.defaults = {\n  bounds: 'data',\n  adapters: {},\n  time: {\n    parser: false,\n    unit: false,\n    round: false,\n    isoWeekday: false,\n    minUnit: 'millisecond',\n    displayFormats: {}\n  },\n  ticks: {\n    source: 'auto',\n    major: {\n      enabled: false\n    }\n  }\n};\n\nfunction interpolate(table, val, reverse) {\n  let lo = 0;\n  let hi = table.length - 1;\n  let prevSource, nextSource, prevTarget, nextTarget;\n\n  if (reverse) {\n    if (val >= table[lo].pos && val <= table[hi].pos) {\n      var _lookupByKey2 = _lookupByKey(table, 'pos', val);\n\n      lo = _lookupByKey2.lo;\n      hi = _lookupByKey2.hi;\n    }\n\n    var _table$lo = table[lo];\n    prevSource = _table$lo.pos;\n    prevTarget = _table$lo.time;\n    var _table$hi = table[hi];\n    nextSource = _table$hi.pos;\n    nextTarget = _table$hi.time;\n  } else {\n    if (val >= table[lo].time && val <= table[hi].time) {\n      var _lookupByKey3 = _lookupByKey(table, 'time', val);\n\n      lo = _lookupByKey3.lo;\n      hi = _lookupByKey3.hi;\n    }\n\n    var _table$lo2 = table[lo];\n    prevSource = _table$lo2.time;\n    prevTarget = _table$lo2.pos;\n    var _table$hi2 = table[hi];\n    nextSource = _table$hi2.time;\n    nextTarget = _table$hi2.pos;\n  }\n\n  const span = nextSource - prevSource;\n  return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span : prevTarget;\n}\n\nclass TimeSeriesScale extends TimeScale {\n  constructor(props) {\n    super(props);\n    this._table = [];\n    this._minPos = undefined;\n    this._tableRange = undefined;\n  }\n\n  initOffsets() {\n    const timestamps = this._getTimestampsForTable();\n\n    const table = this._table = this.buildLookupTable(timestamps);\n    this._minPos = interpolate(table, this.min);\n    this._tableRange = interpolate(table, this.max) - this._minPos;\n    super.initOffsets(timestamps);\n  }\n\n  buildLookupTable(timestamps) {\n    const min = this.min,\n          max = this.max;\n    const items = [];\n    const table = [];\n    let i, ilen, prev, curr, next;\n\n    for (i = 0, ilen = timestamps.length; i < ilen; ++i) {\n      curr = timestamps[i];\n\n      if (curr >= min && curr <= max) {\n        items.push(curr);\n      }\n    }\n\n    if (items.length < 2) {\n      return [{\n        time: min,\n        pos: 0\n      }, {\n        time: max,\n        pos: 1\n      }];\n    }\n\n    for (i = 0, ilen = items.length; i < ilen; ++i) {\n      next = items[i + 1];\n      prev = items[i - 1];\n      curr = items[i];\n\n      if (Math.round((next + prev) / 2) !== curr) {\n        table.push({\n          time: curr,\n          pos: i / (ilen - 1)\n        });\n      }\n    }\n\n    return table;\n  }\n\n  _getTimestampsForTable() {\n    let timestamps = this._cache.all || [];\n\n    if (timestamps.length) {\n      return timestamps;\n    }\n\n    const data = this.getDataTimestamps();\n    const label = this.getLabelTimestamps();\n\n    if (data.length && label.length) {\n      timestamps = this.normalize(data.concat(label));\n    } else {\n      timestamps = data.length ? data : label;\n    }\n\n    timestamps = this._cache.all = timestamps;\n    return timestamps;\n  }\n\n  getDecimalForValue(value) {\n    return (interpolate(this._table, value) - this._minPos) / this._tableRange;\n  }\n\n  getValueForPixel(pixel) {\n    const offsets = this._offsets;\n    const decimal = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n    return interpolate(this._table, decimal * this._tableRange + this._minPos, true);\n  }\n\n}\n\nTimeSeriesScale.id = 'timeseries';\nTimeSeriesScale.defaults = TimeScale.defaults;\nvar scales = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  CategoryScale: CategoryScale,\n  LinearScale: LinearScale,\n  LogarithmicScale: LogarithmicScale,\n  RadialLinearScale: RadialLinearScale,\n  TimeScale: TimeScale,\n  TimeSeriesScale: TimeSeriesScale\n});\nconst registerables = [controllers, elements, plugins, scales];\nexport { Animation, Animations, ArcElement, BarController, BarElement, BasePlatform, BasicPlatform, BubbleController, CategoryScale, Chart, DatasetController, plugin_decimation as Decimation, DomPlatform, DoughnutController, Element, index as Filler, Interaction, plugin_legend as Legend, LineController, LineElement, LinearScale, LogarithmicScale, PieController, PointElement, PolarAreaController, RadarController, RadialLinearScale, Scale, ScatterController, plugin_subtitle as SubTitle, Ticks, TimeScale, TimeSeriesScale, plugin_title as Title, plugin_tooltip as Tooltip, adapters as _adapters, _detectPlatform, animator, controllers, elements, layouts, plugins, registerables, registry, scales };","import { Chart, registerables } from '../dist/chart.mjs';\nChart.register(...registerables);\nexport default Chart;","export default function requiredArgs(required, args) {\n  if (args.length < required) {\n    throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n  }\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\n\nexport default function toDate(argument) {\n  requiredArgs(1, arguments);\n  var argStr = Object.prototype.toString.call(argument); // Clone the date\n\n  if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {\n    // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n    return new Date(argument.getTime());\n  } else if (typeof argument === 'number' || argStr === '[object Number]') {\n    return new Date(argument);\n  } else {\n    if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n      // eslint-disable-next-line no-console\n      console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments\"); // eslint-disable-next-line no-console\n\n      console.warn(new Error().stack);\n    }\n\n    return new Date(NaN);\n  }\n}","var formatDistanceLocale = {\n  lessThanXSeconds: {\n    one: 'less than a second',\n    other: 'less than {{count}} seconds'\n  },\n  xSeconds: {\n    one: '1 second',\n    other: '{{count}} seconds'\n  },\n  halfAMinute: 'half a minute',\n  lessThanXMinutes: {\n    one: 'less than a minute',\n    other: 'less than {{count}} minutes'\n  },\n  xMinutes: {\n    one: '1 minute',\n    other: '{{count}} minutes'\n  },\n  aboutXHours: {\n    one: 'about 1 hour',\n    other: 'about {{count}} hours'\n  },\n  xHours: {\n    one: '1 hour',\n    other: '{{count}} hours'\n  },\n  xDays: {\n    one: '1 day',\n    other: '{{count}} days'\n  },\n  aboutXWeeks: {\n    one: 'about 1 week',\n    other: 'about {{count}} weeks'\n  },\n  xWeeks: {\n    one: '1 week',\n    other: '{{count}} weeks'\n  },\n  aboutXMonths: {\n    one: 'about 1 month',\n    other: 'about {{count}} months'\n  },\n  xMonths: {\n    one: '1 month',\n    other: '{{count}} months'\n  },\n  aboutXYears: {\n    one: 'about 1 year',\n    other: 'about {{count}} years'\n  },\n  xYears: {\n    one: '1 year',\n    other: '{{count}} years'\n  },\n  overXYears: {\n    one: 'over 1 year',\n    other: 'over {{count}} years'\n  },\n  almostXYears: {\n    one: 'almost 1 year',\n    other: 'almost {{count}} years'\n  }\n};\n\nvar formatDistance = function (token, count, options) {\n  var result;\n  var tokenValue = formatDistanceLocale[token];\n\n  if (typeof tokenValue === 'string') {\n    result = tokenValue;\n  } else if (count === 1) {\n    result = tokenValue.one;\n  } else {\n    result = tokenValue.other.replace('{{count}}', count.toString());\n  }\n\n  if (options !== null && options !== void 0 && options.addSuffix) {\n    if (options.comparison && options.comparison > 0) {\n      return 'in ' + result;\n    } else {\n      return result + ' ago';\n    }\n  }\n\n  return result;\n};\n\nexport default formatDistance;","export default function buildFormatLongFn(args) {\n  return function () {\n    var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; // TODO: Remove String()\n\n    var width = options.width ? String(options.width) : args.defaultWidth;\n    var format = args.formats[width] || args.formats[args.defaultWidth];\n    return format;\n  };\n}","import buildFormatLongFn from \"../../../_lib/buildFormatLongFn/index.js\";\nvar dateFormats = {\n  full: 'EEEE, MMMM do, y',\n  long: 'MMMM do, y',\n  medium: 'MMM d, y',\n  short: 'MM/dd/yyyy'\n};\nvar timeFormats = {\n  full: 'h:mm:ss a zzzz',\n  long: 'h:mm:ss a z',\n  medium: 'h:mm:ss a',\n  short: 'h:mm a'\n};\nvar dateTimeFormats = {\n  full: \"{{date}} 'at' {{time}}\",\n  long: \"{{date}} 'at' {{time}}\",\n  medium: '{{date}}, {{time}}',\n  short: '{{date}}, {{time}}'\n};\nvar formatLong = {\n  date: buildFormatLongFn({\n    formats: dateFormats,\n    defaultWidth: 'full'\n  }),\n  time: buildFormatLongFn({\n    formats: timeFormats,\n    defaultWidth: 'full'\n  }),\n  dateTime: buildFormatLongFn({\n    formats: dateTimeFormats,\n    defaultWidth: 'full'\n  })\n};\nexport default formatLong;","var formatRelativeLocale = {\n  lastWeek: \"'last' eeee 'at' p\",\n  yesterday: \"'yesterday at' p\",\n  today: \"'today at' p\",\n  tomorrow: \"'tomorrow at' p\",\n  nextWeek: \"eeee 'at' p\",\n  other: 'P'\n};\n\nvar formatRelative = function (token, _date, _baseDate, _options) {\n  return formatRelativeLocale[token];\n};\n\nexport default formatRelative;","export default function buildLocalizeFn(args) {\n  return function (dirtyIndex, options) {\n    var context = options !== null && options !== void 0 && options.context ? String(options.context) : 'standalone';\n    var valuesArray;\n\n    if (context === 'formatting' && args.formattingValues) {\n      var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n      var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;\n      valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];\n    } else {\n      var _defaultWidth = args.defaultWidth;\n\n      var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;\n\n      valuesArray = args.values[_width] || args.values[_defaultWidth];\n    }\n\n    var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; // @ts-ignore: For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n\n    return valuesArray[index];\n  };\n}","import buildLocalizeFn from \"../../../_lib/buildLocalizeFn/index.js\";\nvar eraValues = {\n  narrow: ['B', 'A'],\n  abbreviated: ['BC', 'AD'],\n  wide: ['Before Christ', 'Anno Domini']\n};\nvar quarterValues = {\n  narrow: ['1', '2', '3', '4'],\n  abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'],\n  wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter']\n}; // Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\n\nvar monthValues = {\n  narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],\n  abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],\n  wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n};\nvar dayValues = {\n  narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],\n  short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\n  abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n  wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']\n};\nvar dayPeriodValues = {\n  narrow: {\n    am: 'a',\n    pm: 'p',\n    midnight: 'mi',\n    noon: 'n',\n    morning: 'morning',\n    afternoon: 'afternoon',\n    evening: 'evening',\n    night: 'night'\n  },\n  abbreviated: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'morning',\n    afternoon: 'afternoon',\n    evening: 'evening',\n    night: 'night'\n  },\n  wide: {\n    am: 'a.m.',\n    pm: 'p.m.',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'morning',\n    afternoon: 'afternoon',\n    evening: 'evening',\n    night: 'night'\n  }\n};\nvar formattingDayPeriodValues = {\n  narrow: {\n    am: 'a',\n    pm: 'p',\n    midnight: 'mi',\n    noon: 'n',\n    morning: 'in the morning',\n    afternoon: 'in the afternoon',\n    evening: 'in the evening',\n    night: 'at night'\n  },\n  abbreviated: {\n    am: 'AM',\n    pm: 'PM',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'in the morning',\n    afternoon: 'in the afternoon',\n    evening: 'in the evening',\n    night: 'at night'\n  },\n  wide: {\n    am: 'a.m.',\n    pm: 'p.m.',\n    midnight: 'midnight',\n    noon: 'noon',\n    morning: 'in the morning',\n    afternoon: 'in the afternoon',\n    evening: 'in the evening',\n    night: 'at night'\n  }\n};\n\nvar ordinalNumber = function (dirtyNumber, _options) {\n  var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example,\n  // if they are different for different grammatical genders,\n  // use `options.unit`.\n  //\n  // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n  // 'day', 'hour', 'minute', 'second'.\n\n  var rem100 = number % 100;\n\n  if (rem100 > 20 || rem100 < 10) {\n    switch (rem100 % 10) {\n      case 1:\n        return number + 'st';\n\n      case 2:\n        return number + 'nd';\n\n      case 3:\n        return number + 'rd';\n    }\n  }\n\n  return number + 'th';\n};\n\nvar localize = {\n  ordinalNumber: ordinalNumber,\n  era: buildLocalizeFn({\n    values: eraValues,\n    defaultWidth: 'wide'\n  }),\n  quarter: buildLocalizeFn({\n    values: quarterValues,\n    defaultWidth: 'wide',\n    argumentCallback: function (quarter) {\n      return quarter - 1;\n    }\n  }),\n  month: buildLocalizeFn({\n    values: monthValues,\n    defaultWidth: 'wide'\n  }),\n  day: buildLocalizeFn({\n    values: dayValues,\n    defaultWidth: 'wide'\n  }),\n  dayPeriod: buildLocalizeFn({\n    values: dayPeriodValues,\n    defaultWidth: 'wide',\n    formattingValues: formattingDayPeriodValues,\n    defaultFormattingWidth: 'wide'\n  })\n};\nexport default localize;","export default function buildMatchFn(args) {\n  return function (string) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var width = options.width;\n    var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];\n    var matchResult = string.match(matchPattern);\n\n    if (!matchResult) {\n      return null;\n    }\n\n    var matchedString = matchResult[0];\n    var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];\n    var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {\n      return pattern.test(matchedString);\n    }) : findKey(parsePatterns, function (pattern) {\n      return pattern.test(matchedString);\n    });\n    var value;\n    value = args.valueCallback ? args.valueCallback(key) : key;\n    value = options.valueCallback ? options.valueCallback(value) : value;\n    var rest = string.slice(matchedString.length);\n    return {\n      value: value,\n      rest: rest\n    };\n  };\n}\n\nfunction findKey(object, predicate) {\n  for (var key in object) {\n    if (object.hasOwnProperty(key) && predicate(object[key])) {\n      return key;\n    }\n  }\n\n  return undefined;\n}\n\nfunction findIndex(array, predicate) {\n  for (var key = 0; key < array.length; key++) {\n    if (predicate(array[key])) {\n      return key;\n    }\n  }\n\n  return undefined;\n}","import buildMatchFn from \"../../../_lib/buildMatchFn/index.js\";\nimport buildMatchPatternFn from \"../../../_lib/buildMatchPatternFn/index.js\";\nvar matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nvar parseOrdinalNumberPattern = /\\d+/i;\nvar matchEraPatterns = {\n  narrow: /^(b|a)/i,\n  abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n  wide: /^(before christ|before common era|anno domini|common era)/i\n};\nvar parseEraPatterns = {\n  any: [/^b/i, /^(a|c)/i]\n};\nvar matchQuarterPatterns = {\n  narrow: /^[1234]/i,\n  abbreviated: /^q[1234]/i,\n  wide: /^[1234](th|st|nd|rd)? quarter/i\n};\nvar parseQuarterPatterns = {\n  any: [/1/i, /2/i, /3/i, /4/i]\n};\nvar matchMonthPatterns = {\n  narrow: /^[jfmasond]/i,\n  abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n  wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i\n};\nvar parseMonthPatterns = {\n  narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],\n  any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i]\n};\nvar matchDayPatterns = {\n  narrow: /^[smtwf]/i,\n  short: /^(su|mo|tu|we|th|fr|sa)/i,\n  abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n  wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i\n};\nvar parseDayPatterns = {\n  narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n  any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]\n};\nvar matchDayPeriodPatterns = {\n  narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n  any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i\n};\nvar parseDayPeriodPatterns = {\n  any: {\n    am: /^a/i,\n    pm: /^p/i,\n    midnight: /^mi/i,\n    noon: /^no/i,\n    morning: /morning/i,\n    afternoon: /afternoon/i,\n    evening: /evening/i,\n    night: /night/i\n  }\n};\nvar match = {\n  ordinalNumber: buildMatchPatternFn({\n    matchPattern: matchOrdinalNumberPattern,\n    parsePattern: parseOrdinalNumberPattern,\n    valueCallback: function (value) {\n      return parseInt(value, 10);\n    }\n  }),\n  era: buildMatchFn({\n    matchPatterns: matchEraPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseEraPatterns,\n    defaultParseWidth: 'any'\n  }),\n  quarter: buildMatchFn({\n    matchPatterns: matchQuarterPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseQuarterPatterns,\n    defaultParseWidth: 'any',\n    valueCallback: function (index) {\n      return index + 1;\n    }\n  }),\n  month: buildMatchFn({\n    matchPatterns: matchMonthPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseMonthPatterns,\n    defaultParseWidth: 'any'\n  }),\n  day: buildMatchFn({\n    matchPatterns: matchDayPatterns,\n    defaultMatchWidth: 'wide',\n    parsePatterns: parseDayPatterns,\n    defaultParseWidth: 'any'\n  }),\n  dayPeriod: buildMatchFn({\n    matchPatterns: matchDayPeriodPatterns,\n    defaultMatchWidth: 'any',\n    parsePatterns: parseDayPeriodPatterns,\n    defaultParseWidth: 'any'\n  })\n};\nexport default match;","export default function buildMatchPatternFn(args) {\n  return function (string) {\n    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n    var matchResult = string.match(args.matchPattern);\n    if (!matchResult) return null;\n    var matchedString = matchResult[0];\n    var parseResult = string.match(args.parsePattern);\n    if (!parseResult) return null;\n    var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];\n    value = options.valueCallback ? options.valueCallback(value) : value;\n    var rest = string.slice(matchedString.length);\n    return {\n      value: value,\n      rest: rest\n    };\n  };\n}","import defaultLocale from \"../../locale/en-US/index.js\";\nexport default defaultLocale;","import formatDistance from \"./_lib/formatDistance/index.js\";\nimport formatLong from \"./_lib/formatLong/index.js\";\nimport formatRelative from \"./_lib/formatRelative/index.js\";\nimport localize from \"./_lib/localize/index.js\";\nimport match from \"./_lib/match/index.js\";\n/**\n * @type {Locale}\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp}\n * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss}\n */\n\nvar locale = {\n  code: 'en-US',\n  formatDistance: formatDistance,\n  formatLong: formatLong,\n  formatRelative: formatRelative,\n  localize: localize,\n  match: match,\n  options: {\n    weekStartsOn: 0\n    /* Sunday */\n    ,\n    firstWeekContainsDate: 1\n  }\n};\nexport default locale;","export default function toInteger(dirtyNumber) {\n  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {\n    return NaN;\n  }\n\n  var number = Number(dirtyNumber);\n\n  if (isNaN(number)) {\n    return number;\n  }\n\n  return number < 0 ? Math.ceil(number) : Math.floor(number);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMilliseconds\n * @category Millisecond Helpers\n * @summary Add the specified number of milliseconds to the given date.\n *\n * @description\n * Add the specified number of milliseconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 750 milliseconds to 10 July 2014 12:45:30.000:\n * const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:30.750\n */\n\nexport default function addMilliseconds(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var timestamp = toDate(dirtyDate).getTime();\n  var amount = toInteger(dirtyAmount);\n  return new Date(timestamp + amount);\n}","import addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name subMilliseconds\n * @category Millisecond Helpers\n * @summary Subtract the specified number of milliseconds from the given date.\n *\n * @description\n * Subtract the specified number of milliseconds from the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of milliseconds to be subtracted. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the milliseconds subtracted\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000:\n * const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)\n * //=> Thu Jul 10 2014 12:45:29.250\n */\n\nexport default function subMilliseconds(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addMilliseconds(dirtyDate, -amount);\n}","export default function assign(target, object) {\n  if (target == null) {\n    throw new TypeError('assign requires that input parameter not be null or undefined');\n  }\n\n  for (var property in object) {\n    if (Object.prototype.hasOwnProperty.call(object, property)) {\n      ;\n      target[property] = object[property];\n    }\n  }\n\n  return target;\n}","var dateLongFormatter = function (pattern, formatLong) {\n  switch (pattern) {\n    case 'P':\n      return formatLong.date({\n        width: 'short'\n      });\n\n    case 'PP':\n      return formatLong.date({\n        width: 'medium'\n      });\n\n    case 'PPP':\n      return formatLong.date({\n        width: 'long'\n      });\n\n    case 'PPPP':\n    default:\n      return formatLong.date({\n        width: 'full'\n      });\n  }\n};\n\nvar timeLongFormatter = function (pattern, formatLong) {\n  switch (pattern) {\n    case 'p':\n      return formatLong.time({\n        width: 'short'\n      });\n\n    case 'pp':\n      return formatLong.time({\n        width: 'medium'\n      });\n\n    case 'ppp':\n      return formatLong.time({\n        width: 'long'\n      });\n\n    case 'pppp':\n    default:\n      return formatLong.time({\n        width: 'full'\n      });\n  }\n};\n\nvar dateTimeLongFormatter = function (pattern, formatLong) {\n  var matchResult = pattern.match(/(P+)(p+)?/) || [];\n  var datePattern = matchResult[1];\n  var timePattern = matchResult[2];\n\n  if (!timePattern) {\n    return dateLongFormatter(pattern, formatLong);\n  }\n\n  var dateTimeFormat;\n\n  switch (datePattern) {\n    case 'P':\n      dateTimeFormat = formatLong.dateTime({\n        width: 'short'\n      });\n      break;\n\n    case 'PP':\n      dateTimeFormat = formatLong.dateTime({\n        width: 'medium'\n      });\n      break;\n\n    case 'PPP':\n      dateTimeFormat = formatLong.dateTime({\n        width: 'long'\n      });\n      break;\n\n    case 'PPPP':\n    default:\n      dateTimeFormat = formatLong.dateTime({\n        width: 'full'\n      });\n      break;\n  }\n\n  return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));\n};\n\nvar longFormatters = {\n  p: timeLongFormatter,\n  P: dateTimeLongFormatter\n};\nexport default longFormatters;","/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport default function getTimezoneOffsetInMilliseconds(date) {\n  var utcDate = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));\n  utcDate.setUTCFullYear(date.getFullYear());\n  return date.getTime() - utcDate.getTime();\n}","var protectedDayOfYearTokens = ['D', 'DD'];\nvar protectedWeekYearTokens = ['YY', 'YYYY'];\nexport function isProtectedDayOfYearToken(token) {\n  return protectedDayOfYearTokens.indexOf(token) !== -1;\n}\nexport function isProtectedWeekYearToken(token) {\n  return protectedWeekYearTokens.indexOf(token) !== -1;\n}\nexport function throwProtectedError(token, format, input) {\n  if (token === 'YYYY') {\n    throw new RangeError(\"Use `yyyy` instead of `YYYY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  } else if (token === 'YY') {\n    throw new RangeError(\"Use `yy` instead of `YY` (in `\".concat(format, \"`) for formatting years to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  } else if (token === 'D') {\n    throw new RangeError(\"Use `d` instead of `D` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  } else if (token === 'DD') {\n    throw new RangeError(\"Use `dd` instead of `DD` (in `\".concat(format, \"`) for formatting days of the month to the input `\").concat(input, \"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\"));\n  }\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nvar TIMEZONE_UNIT_PRIORITY = 10;\nexport class Setter {\n  constructor() {\n    _defineProperty(this, \"priority\", void 0);\n\n    _defineProperty(this, \"subPriority\", 0);\n  }\n\n  validate(_utcDate, _options) {\n    return true;\n  }\n\n}\nexport class ValueSetter extends Setter {\n  constructor(value, validateValue, setValue, priority, subPriority) {\n    super();\n    this.value = value;\n    this.validateValue = validateValue;\n    this.setValue = setValue;\n    this.priority = priority;\n\n    if (subPriority) {\n      this.subPriority = subPriority;\n    }\n  }\n\n  validate(utcDate, options) {\n    return this.validateValue(utcDate, this.value, options);\n  }\n\n  set(utcDate, flags, options) {\n    return this.setValue(utcDate, flags, this.value, options);\n  }\n\n}\nexport class DateToSystemTimezoneSetter extends Setter {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", TIMEZONE_UNIT_PRIORITY);\n\n    _defineProperty(this, \"subPriority\", -1);\n  }\n\n  set(date, flags) {\n    if (flags.timestampIsSet) {\n      return date;\n    }\n\n    var convertedDate = new Date(0);\n    convertedDate.setFullYear(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n    convertedDate.setHours(date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());\n    return convertedDate;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { ValueSetter } from \"./Setter.js\";\nexport class Parser {\n  constructor() {\n    _defineProperty(this, \"incompatibleTokens\", void 0);\n\n    _defineProperty(this, \"priority\", void 0);\n\n    _defineProperty(this, \"subPriority\", void 0);\n  }\n\n  run(dateString, token, match, options) {\n    var result = this.parse(dateString, token, match, options);\n\n    if (!result) {\n      return null;\n    }\n\n    return {\n      setter: new ValueSetter(result.value, this.validate, this.set, this.priority, this.subPriority),\n      rest: result.rest\n    };\n  }\n\n  validate(_utcDate, _value, _options) {\n    return true;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nexport class EraParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 140);\n\n    _defineProperty(this, \"incompatibleTokens\", ['R', 'u', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      // AD, BC\n      case 'G':\n      case 'GG':\n      case 'GGG':\n        return match.era(dateString, {\n          width: 'abbreviated'\n        }) || match.era(dateString, {\n          width: 'narrow'\n        });\n      // A, B\n\n      case 'GGGGG':\n        return match.era(dateString, {\n          width: 'narrow'\n        });\n      // Anno Domini, Before Christ\n\n      case 'GGGG':\n      default:\n        return match.era(dateString, {\n          width: 'wide'\n        }) || match.era(dateString, {\n          width: 'abbreviated'\n        }) || match.era(dateString, {\n          width: 'narrow'\n        });\n    }\n  }\n\n  set(date, flags, value) {\n    flags.era = value;\n    date.setUTCFullYear(value, 0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","/**\n * Days in 1 week.\n *\n * @name daysInWeek\n * @constant\n * @type {number}\n * @default\n */\nexport var daysInWeek = 7;\n/**\n * Days in 1 year\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n *\n * @name daysInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var daysInYear = 365.2425;\n/**\n * Maximum allowed time.\n *\n * @name maxTime\n * @constant\n * @type {number}\n * @default\n */\n\nexport var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n/**\n * Milliseconds in 1 minute\n *\n * @name millisecondsInMinute\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInMinute = 60000;\n/**\n * Milliseconds in 1 hour\n *\n * @name millisecondsInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInHour = 3600000;\n/**\n * Milliseconds in 1 second\n *\n * @name millisecondsInSecond\n * @constant\n * @type {number}\n * @default\n */\n\nexport var millisecondsInSecond = 1000;\n/**\n * Minimum allowed time.\n *\n * @name minTime\n * @constant\n * @type {number}\n * @default\n */\n\nexport var minTime = -maxTime;\n/**\n * Minutes in 1 hour\n *\n * @name minutesInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var minutesInHour = 60;\n/**\n * Months in 1 quarter\n *\n * @name monthsInQuarter\n * @constant\n * @type {number}\n * @default\n */\n\nexport var monthsInQuarter = 3;\n/**\n * Months in 1 year\n *\n * @name monthsInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var monthsInYear = 12;\n/**\n * Quarters in 1 year\n *\n * @name quartersInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var quartersInYear = 4;\n/**\n * Seconds in 1 hour\n *\n * @name secondsInHour\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInHour = 3600;\n/**\n * Seconds in 1 minute\n *\n * @name secondsInMinute\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInMinute = 60;\n/**\n * Seconds in 1 day\n *\n * @name secondsInDay\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInDay = secondsInHour * 24;\n/**\n * Seconds in 1 week\n *\n * @name secondsInWeek\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInWeek = secondsInDay * 7;\n/**\n * Seconds in 1 year\n *\n * @name secondsInYear\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInYear = secondsInDay * daysInYear;\n/**\n * Seconds in 1 month\n *\n * @name secondsInMonth\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInMonth = secondsInYear / 12;\n/**\n * Seconds in 1 quarter\n *\n * @name secondsInQuarter\n * @constant\n * @type {number}\n * @default\n */\n\nexport var secondsInQuarter = secondsInMonth * 3;","export var numericPatterns = {\n  month: /^(1[0-2]|0?\\d)/,\n  // 0 to 12\n  date: /^(3[0-1]|[0-2]?\\d)/,\n  // 0 to 31\n  dayOfYear: /^(36[0-6]|3[0-5]\\d|[0-2]?\\d?\\d)/,\n  // 0 to 366\n  week: /^(5[0-3]|[0-4]?\\d)/,\n  // 0 to 53\n  hour23h: /^(2[0-3]|[0-1]?\\d)/,\n  // 0 to 23\n  hour24h: /^(2[0-4]|[0-1]?\\d)/,\n  // 0 to 24\n  hour11h: /^(1[0-1]|0?\\d)/,\n  // 0 to 11\n  hour12h: /^(1[0-2]|0?\\d)/,\n  // 0 to 12\n  minute: /^[0-5]?\\d/,\n  // 0 to 59\n  second: /^[0-5]?\\d/,\n  // 0 to 59\n  singleDigit: /^\\d/,\n  // 0 to 9\n  twoDigits: /^\\d{1,2}/,\n  // 0 to 99\n  threeDigits: /^\\d{1,3}/,\n  // 0 to 999\n  fourDigits: /^\\d{1,4}/,\n  // 0 to 9999\n  anyDigitsSigned: /^-?\\d+/,\n  singleDigitSigned: /^-?\\d/,\n  // 0 to 9, -0 to -9\n  twoDigitsSigned: /^-?\\d{1,2}/,\n  // 0 to 99, -0 to -99\n  threeDigitsSigned: /^-?\\d{1,3}/,\n  // 0 to 999, -0 to -999\n  fourDigitsSigned: /^-?\\d{1,4}/ // 0 to 9999, -0 to -9999\n\n};\nexport var timezonePatterns = {\n  basicOptionalMinutes: /^([+-])(\\d{2})(\\d{2})?|Z/,\n  basic: /^([+-])(\\d{2})(\\d{2})|Z/,\n  basicOptionalSeconds: /^([+-])(\\d{2})(\\d{2})((\\d{2}))?|Z/,\n  extended: /^([+-])(\\d{2}):(\\d{2})|Z/,\n  extendedOptionalSeconds: /^([+-])(\\d{2}):(\\d{2})(:(\\d{2}))?|Z/\n};","import { millisecondsInHour, millisecondsInMinute, millisecondsInSecond } from \"../../constants/index.js\";\nimport { numericPatterns } from \"./constants.js\";\nexport function mapValue(parseFnResult, mapFn) {\n  if (!parseFnResult) {\n    return parseFnResult;\n  }\n\n  return {\n    value: mapFn(parseFnResult.value),\n    rest: parseFnResult.rest\n  };\n}\nexport function parseNumericPattern(pattern, dateString) {\n  var matchResult = dateString.match(pattern);\n\n  if (!matchResult) {\n    return null;\n  }\n\n  return {\n    value: parseInt(matchResult[0], 10),\n    rest: dateString.slice(matchResult[0].length)\n  };\n}\nexport function parseTimezonePattern(pattern, dateString) {\n  var matchResult = dateString.match(pattern);\n\n  if (!matchResult) {\n    return null;\n  } // Input is 'Z'\n\n\n  if (matchResult[0] === 'Z') {\n    return {\n      value: 0,\n      rest: dateString.slice(1)\n    };\n  }\n\n  var sign = matchResult[1] === '+' ? 1 : -1;\n  var hours = matchResult[2] ? parseInt(matchResult[2], 10) : 0;\n  var minutes = matchResult[3] ? parseInt(matchResult[3], 10) : 0;\n  var seconds = matchResult[5] ? parseInt(matchResult[5], 10) : 0;\n  return {\n    value: sign * (hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * millisecondsInSecond),\n    rest: dateString.slice(matchResult[0].length)\n  };\n}\nexport function parseAnyDigitsSigned(dateString) {\n  return parseNumericPattern(numericPatterns.anyDigitsSigned, dateString);\n}\nexport function parseNDigits(n, dateString) {\n  switch (n) {\n    case 1:\n      return parseNumericPattern(numericPatterns.singleDigit, dateString);\n\n    case 2:\n      return parseNumericPattern(numericPatterns.twoDigits, dateString);\n\n    case 3:\n      return parseNumericPattern(numericPatterns.threeDigits, dateString);\n\n    case 4:\n      return parseNumericPattern(numericPatterns.fourDigits, dateString);\n\n    default:\n      return parseNumericPattern(new RegExp('^\\\\d{1,' + n + '}'), dateString);\n  }\n}\nexport function parseNDigitsSigned(n, dateString) {\n  switch (n) {\n    case 1:\n      return parseNumericPattern(numericPatterns.singleDigitSigned, dateString);\n\n    case 2:\n      return parseNumericPattern(numericPatterns.twoDigitsSigned, dateString);\n\n    case 3:\n      return parseNumericPattern(numericPatterns.threeDigitsSigned, dateString);\n\n    case 4:\n      return parseNumericPattern(numericPatterns.fourDigitsSigned, dateString);\n\n    default:\n      return parseNumericPattern(new RegExp('^-?\\\\d{1,' + n + '}'), dateString);\n  }\n}\nexport function dayPeriodEnumToHours(dayPeriod) {\n  switch (dayPeriod) {\n    case 'morning':\n      return 4;\n\n    case 'evening':\n      return 17;\n\n    case 'pm':\n    case 'noon':\n    case 'afternoon':\n      return 12;\n\n    case 'am':\n    case 'midnight':\n    case 'night':\n    default:\n      return 0;\n  }\n}\nexport function normalizeTwoDigitYear(twoDigitYear, currentYear) {\n  var isCommonEra = currentYear > 0; // Absolute number of the current year:\n  // 1 -> 1 AC\n  // 0 -> 1 BC\n  // -1 -> 2 BC\n\n  var absCurrentYear = isCommonEra ? currentYear : 1 - currentYear;\n  var result;\n\n  if (absCurrentYear <= 50) {\n    result = twoDigitYear || 100;\n  } else {\n    var rangeEnd = absCurrentYear + 50;\n    var rangeEndCentury = Math.floor(rangeEnd / 100) * 100;\n    var isPreviousCentury = twoDigitYear >= rangeEnd % 100;\n    result = twoDigitYear + rangeEndCentury - (isPreviousCentury ? 100 : 0);\n  }\n\n  return isCommonEra ? result : 1 - result;\n}\nexport function isLeapYearIndex(year) {\n  return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, normalizeTwoDigitYear, parseNDigits } from \"../utils.js\"; // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns\n// | Year     |     y | yy |   yyy |  yyyy | yyyyy |\n// |----------|-------|----|-------|-------|-------|\n// | AD 1     |     1 | 01 |   001 |  0001 | 00001 |\n// | AD 12    |    12 | 12 |   012 |  0012 | 00012 |\n// | AD 123   |   123 | 23 |   123 |  0123 | 00123 |\n// | AD 1234  |  1234 | 34 |  1234 |  1234 | 01234 |\n// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\nexport class YearParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 130);\n\n    _defineProperty(this, \"incompatibleTokens\", ['Y', 'R', 'u', 'w', 'I', 'i', 'e', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    var valueCallback = function (year) {\n      return {\n        year: year,\n        isTwoDigitYear: token === 'yy'\n      };\n    };\n\n    switch (token) {\n      case 'y':\n        return mapValue(parseNDigits(4, dateString), valueCallback);\n\n      case 'yo':\n        return mapValue(match.ordinalNumber(dateString, {\n          unit: 'year'\n        }), valueCallback);\n\n      default:\n        return mapValue(parseNDigits(token.length, dateString), valueCallback);\n    }\n  }\n\n  validate(_date, value) {\n    return value.isTwoDigitYear || value.year > 0;\n  }\n\n  set(date, flags, value) {\n    var currentYear = date.getUTCFullYear();\n\n    if (value.isTwoDigitYear) {\n      var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n      date.setUTCFullYear(normalizedTwoDigitYear, 0, 1);\n      date.setUTCHours(0, 0, 0, 0);\n      return date;\n    }\n\n    var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n    date.setUTCFullYear(year, 0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","var defaultOptions = {};\nexport function getDefaultOptions() {\n  return defaultOptions;\n}\nexport function setDefaultOptions(newOptions) {\n  defaultOptions = newOptions;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeek(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n  requiredArgs(1, arguments);\n  var defaultOptions = getDefaultOptions();\n  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  var date = toDate(dirtyDate);\n  var day = date.getUTCDay();\n  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n  date.setUTCDate(date.getUTCDate() - diff);\n  date.setUTCHours(0, 0, 0, 0);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function getUTCWeekYear(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var year = date.getUTCFullYear();\n  var defaultOptions = getDefaultOptions();\n  var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n    throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n  }\n\n  var firstWeekOfNextYear = new Date(0);\n  firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);\n  firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);\n  var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, options);\n  var firstWeekOfThisYear = new Date(0);\n  firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);\n  firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);\n  var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);\n\n  if (date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1;\n  } else if (date.getTime() >= startOfThisYear.getTime()) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits, normalizeTwoDigitYear, mapValue } from \"../utils.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\"; // Local week-numbering year\n\nexport class LocalWeekYearParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 130);\n\n    _defineProperty(this, \"incompatibleTokens\", ['y', 'R', 'u', 'Q', 'q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    var valueCallback = function (year) {\n      return {\n        year: year,\n        isTwoDigitYear: token === 'YY'\n      };\n    };\n\n    switch (token) {\n      case 'Y':\n        return mapValue(parseNDigits(4, dateString), valueCallback);\n\n      case 'Yo':\n        return mapValue(match.ordinalNumber(dateString, {\n          unit: 'year'\n        }), valueCallback);\n\n      default:\n        return mapValue(parseNDigits(token.length, dateString), valueCallback);\n    }\n  }\n\n  validate(_date, value) {\n    return value.isTwoDigitYear || value.year > 0;\n  }\n\n  set(date, flags, value, options) {\n    var currentYear = getUTCWeekYear(date, options);\n\n    if (value.isTwoDigitYear) {\n      var normalizedTwoDigitYear = normalizeTwoDigitYear(value.year, currentYear);\n      date.setUTCFullYear(normalizedTwoDigitYear, 0, options.firstWeekContainsDate);\n      date.setUTCHours(0, 0, 0, 0);\n      return startOfUTCWeek(date, options);\n    }\n\n    var year = !('era' in flags) || flags.era === 1 ? value.year : 1 - value.year;\n    date.setUTCFullYear(year, 0, options.firstWeekContainsDate);\n    date.setUTCHours(0, 0, 0, 0);\n    return startOfUTCWeek(date, options);\n  }\n\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeek(dirtyDate) {\n  requiredArgs(1, arguments);\n  var weekStartsOn = 1;\n  var date = toDate(dirtyDate);\n  var day = date.getUTCDay();\n  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n  date.setUTCDate(date.getUTCDate() - diff);\n  date.setUTCHours(0, 0, 0, 0);\n  return date;\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigitsSigned } from \"../utils.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\"; // ISO week-numbering year\n\nexport class ISOWeekYearParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 130);\n\n    _defineProperty(this, \"incompatibleTokens\", ['G', 'y', 'Y', 'u', 'Q', 'q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token) {\n    if (token === 'R') {\n      return parseNDigitsSigned(4, dateString);\n    }\n\n    return parseNDigitsSigned(token.length, dateString);\n  }\n\n  set(_date, _flags, value) {\n    var firstWeekOfYear = new Date(0);\n    firstWeekOfYear.setUTCFullYear(value, 0, 4);\n    firstWeekOfYear.setUTCHours(0, 0, 0, 0);\n    return startOfUTCISOWeek(firstWeekOfYear);\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigitsSigned } from \"../utils.js\";\nexport class ExtendedYearParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 130);\n\n    _defineProperty(this, \"incompatibleTokens\", ['G', 'y', 'Y', 'R', 'w', 'I', 'i', 'e', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token) {\n    if (token === 'u') {\n      return parseNDigitsSigned(4, dateString);\n    }\n\n    return parseNDigitsSigned(token.length, dateString);\n  }\n\n  set(date, _flags, value) {\n    date.setUTCFullYear(value, 0, 1);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits } from \"../utils.js\";\nexport class QuarterParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 120);\n\n    _defineProperty(this, \"incompatibleTokens\", ['Y', 'R', 'q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      // 1, 2, 3, 4\n      case 'Q':\n      case 'QQ':\n        // 01, 02, 03, 04\n        return parseNDigits(token.length, dateString);\n      // 1st, 2nd, 3rd, 4th\n\n      case 'Qo':\n        return match.ordinalNumber(dateString, {\n          unit: 'quarter'\n        });\n      // Q1, Q2, Q3, Q4\n\n      case 'QQQ':\n        return match.quarter(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.quarter(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n      case 'QQQQQ':\n        return match.quarter(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // 1st quarter, 2nd quarter, ...\n\n      case 'QQQQ':\n      default:\n        return match.quarter(dateString, {\n          width: 'wide',\n          context: 'formatting'\n        }) || match.quarter(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.quarter(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 4;\n  }\n\n  set(date, _flags, value) {\n    date.setUTCMonth((value - 1) * 3, 1);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { parseNDigits } from \"../utils.js\";\nexport class StandAloneQuarterParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 120);\n\n    _defineProperty(this, \"incompatibleTokens\", ['Y', 'R', 'Q', 'M', 'L', 'w', 'I', 'd', 'D', 'i', 'e', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      // 1, 2, 3, 4\n      case 'q':\n      case 'qq':\n        // 01, 02, 03, 04\n        return parseNDigits(token.length, dateString);\n      // 1st, 2nd, 3rd, 4th\n\n      case 'qo':\n        return match.ordinalNumber(dateString, {\n          unit: 'quarter'\n        });\n      // Q1, Q2, Q3, Q4\n\n      case 'qqq':\n        return match.quarter(dateString, {\n          width: 'abbreviated',\n          context: 'standalone'\n        }) || match.quarter(dateString, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n      case 'qqqqq':\n        return match.quarter(dateString, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // 1st quarter, 2nd quarter, ...\n\n      case 'qqqq':\n      default:\n        return match.quarter(dateString, {\n          width: 'wide',\n          context: 'standalone'\n        }) || match.quarter(dateString, {\n          width: 'abbreviated',\n          context: 'standalone'\n        }) || match.quarter(dateString, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 4;\n  }\n\n  set(date, _flags, value) {\n    date.setUTCMonth((value - 1) * 3, 1);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { mapValue, parseNDigits, parseNumericPattern } from \"../utils.js\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nexport class MonthParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'L', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n\n    _defineProperty(this, \"priority\", 110);\n  }\n\n  parse(dateString, token, match) {\n    var valueCallback = function (value) {\n      return value - 1;\n    };\n\n    switch (token) {\n      // 1, 2, ..., 12\n      case 'M':\n        return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);\n      // 01, 02, ..., 12\n\n      case 'MM':\n        return mapValue(parseNDigits(2, dateString), valueCallback);\n      // 1st, 2nd, ..., 12th\n\n      case 'Mo':\n        return mapValue(match.ordinalNumber(dateString, {\n          unit: 'month'\n        }), valueCallback);\n      // Jan, Feb, ..., Dec\n\n      case 'MMM':\n        return match.month(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.month(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // J, F, ..., D\n\n      case 'MMMMM':\n        return match.month(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // January, February, ..., December\n\n      case 'MMMM':\n      default:\n        return match.month(dateString, {\n          width: 'wide',\n          context: 'formatting'\n        }) || match.month(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.month(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 11;\n  }\n\n  set(date, _flags, value) {\n    date.setUTCMonth(value, 1);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits, mapValue } from \"../utils.js\";\nexport class StandAloneMonthParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 110);\n\n    _defineProperty(this, \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'M', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    var valueCallback = function (value) {\n      return value - 1;\n    };\n\n    switch (token) {\n      // 1, 2, ..., 12\n      case 'L':\n        return mapValue(parseNumericPattern(numericPatterns.month, dateString), valueCallback);\n      // 01, 02, ..., 12\n\n      case 'LL':\n        return mapValue(parseNDigits(2, dateString), valueCallback);\n      // 1st, 2nd, ..., 12th\n\n      case 'Lo':\n        return mapValue(match.ordinalNumber(dateString, {\n          unit: 'month'\n        }), valueCallback);\n      // Jan, Feb, ..., Dec\n\n      case 'LLL':\n        return match.month(dateString, {\n          width: 'abbreviated',\n          context: 'standalone'\n        }) || match.month(dateString, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // J, F, ..., D\n\n      case 'LLLLL':\n        return match.month(dateString, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // January, February, ..., December\n\n      case 'LLLL':\n      default:\n        return match.month(dateString, {\n          width: 'wide',\n          context: 'standalone'\n        }) || match.month(dateString, {\n          width: 'abbreviated',\n          context: 'standalone'\n        }) || match.month(dateString, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 11;\n  }\n\n  set(date, _flags, value) {\n    date.setUTCMonth(value, 1);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","import getUTCWeekYear from \"../getUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function startOfUTCWeekYear(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n  requiredArgs(1, arguments);\n  var defaultOptions = getDefaultOptions();\n  var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);\n  var year = getUTCWeekYear(dirtyDate, options);\n  var firstWeek = new Date(0);\n  firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate);\n  firstWeek.setUTCHours(0, 0, 0, 0);\n  var date = startOfUTCWeek(firstWeek, options);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCWeek from \"../startOfUTCWeek/index.js\";\nimport startOfUTCWeekYear from \"../startOfUTCWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCWeek(dirtyDate, options) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer\n  // because the number of milliseconds in a week is not constant\n  // (e.g. it's different in the week of the daylight saving time clock shift)\n\n  return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nimport setUTCWeek from \"../../../_lib/setUTCWeek/index.js\";\nimport startOfUTCWeek from \"../../../_lib/startOfUTCWeek/index.js\"; // Local week of year\n\nexport class LocalWeekParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 100);\n\n    _defineProperty(this, \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'i', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'w':\n        return parseNumericPattern(numericPatterns.week, dateString);\n\n      case 'wo':\n        return match.ordinalNumber(dateString, {\n          unit: 'week'\n        });\n\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 53;\n  }\n\n  set(date, _flags, value, options) {\n    return startOfUTCWeek(setUTCWeek(date, value, options), options);\n  }\n\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nexport default function getUTCISOWeekYear(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var year = date.getUTCFullYear();\n  var fourthOfJanuaryOfNextYear = new Date(0);\n  fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4);\n  fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0);\n  var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear);\n  var fourthOfJanuaryOfThisYear = new Date(0);\n  fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);\n  fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);\n  var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);\n\n  if (date.getTime() >= startOfNextYear.getTime()) {\n    return year + 1;\n  } else if (date.getTime() >= startOfThisYear.getTime()) {\n    return year;\n  } else {\n    return year - 1;\n  }\n}","import getUTCISOWeekYear from \"../getUTCISOWeekYear/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function startOfUTCISOWeekYear(dirtyDate) {\n  requiredArgs(1, arguments);\n  var year = getUTCISOWeekYear(dirtyDate);\n  var fourthOfJanuary = new Date(0);\n  fourthOfJanuary.setUTCFullYear(year, 0, 4);\n  fourthOfJanuary.setUTCHours(0, 0, 0, 0);\n  var date = startOfUTCISOWeek(fourthOfJanuary);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport startOfUTCISOWeek from \"../startOfUTCISOWeek/index.js\";\nimport startOfUTCISOWeekYear from \"../startOfUTCISOWeekYear/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_WEEK = 604800000;\nexport default function getUTCISOWeek(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer\n  // because the number of milliseconds in a week is not constant\n  // (e.g. it's different in the week of the daylight saving time clock shift)\n\n  return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nimport setUTCISOWeek from \"../../../_lib/setUTCISOWeek/index.js\";\nimport startOfUTCISOWeek from \"../../../_lib/startOfUTCISOWeek/index.js\"; // ISO week of year\n\nexport class ISOWeekParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 100);\n\n    _defineProperty(this, \"incompatibleTokens\", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'e', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'I':\n        return parseNumericPattern(numericPatterns.week, dateString);\n\n      case 'Io':\n        return match.ordinalNumber(dateString, {\n          unit: 'week'\n        });\n\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 53;\n  }\n\n  set(date, _flags, value) {\n    return startOfUTCISOWeek(setUTCISOWeek(date, value));\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { isLeapYearIndex, parseNDigits, parseNumericPattern } from \"../utils.js\";\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; // Day of the month\n\nexport class DateParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 90);\n\n    _defineProperty(this, \"subPriority\", 1);\n\n    _defineProperty(this, \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'w', 'I', 'D', 'i', 'e', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'd':\n        return parseNumericPattern(numericPatterns.date, dateString);\n\n      case 'do':\n        return match.ordinalNumber(dateString, {\n          unit: 'date'\n        });\n\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(date, value) {\n    var year = date.getUTCFullYear();\n    var isLeapYear = isLeapYearIndex(year);\n    var month = date.getUTCMonth();\n\n    if (isLeapYear) {\n      return value >= 1 && value <= DAYS_IN_MONTH_LEAP_YEAR[month];\n    } else {\n      return value >= 1 && value <= DAYS_IN_MONTH[month];\n    }\n  }\n\n  set(date, _flags, value) {\n    date.setUTCDate(value);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits, isLeapYearIndex } from \"../utils.js\";\nexport class DayOfYearParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 90);\n\n    _defineProperty(this, \"subpriority\", 1);\n\n    _defineProperty(this, \"incompatibleTokens\", ['Y', 'R', 'q', 'Q', 'M', 'L', 'w', 'I', 'd', 'E', 'i', 'e', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'D':\n      case 'DD':\n        return parseNumericPattern(numericPatterns.dayOfYear, dateString);\n\n      case 'Do':\n        return match.ordinalNumber(dateString, {\n          unit: 'date'\n        });\n\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(date, value) {\n    var year = date.getUTCFullYear();\n    var isLeapYear = isLeapYearIndex(year);\n\n    if (isLeapYear) {\n      return value >= 1 && value <= 366;\n    } else {\n      return value >= 1 && value <= 365;\n    }\n  }\n\n  set(date, _flags, value) {\n    date.setUTCMonth(0, value);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nimport { getDefaultOptions } from \"../defaultOptions/index.js\";\nexport default function setUTCDay(dirtyDate, dirtyDay, options) {\n  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n  requiredArgs(2, arguments);\n  var defaultOptions = getDefaultOptions();\n  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  var date = toDate(dirtyDate);\n  var day = toInteger(dirtyDay);\n  var currentDay = date.getUTCDay();\n  var remainder = day % 7;\n  var dayIndex = (remainder + 7) % 7;\n  var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n  date.setUTCDate(date.getUTCDate() + diff);\n  return date;\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Day of week\n\nexport class DayParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 90);\n\n    _defineProperty(this, \"incompatibleTokens\", ['D', 'i', 'e', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      // Tue\n      case 'E':\n      case 'EE':\n      case 'EEE':\n        return match.day(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'short',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // T\n\n      case 'EEEEE':\n        return match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tu\n\n      case 'EEEEEE':\n        return match.day(dateString, {\n          width: 'short',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tuesday\n\n      case 'EEEE':\n      default:\n        return match.day(dateString, {\n          width: 'wide',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'short',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 6;\n  }\n\n  set(date, _flags, value, options) {\n    date = setUTCDay(date, value, options);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Local day of week\n\nexport class LocalDayParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 90);\n\n    _defineProperty(this, \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token, match, options) {\n    var valueCallback = function (value) {\n      var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n      return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n    };\n\n    switch (token) {\n      // 3\n      case 'e':\n      case 'ee':\n        // 03\n        return mapValue(parseNDigits(token.length, dateString), valueCallback);\n      // 3rd\n\n      case 'eo':\n        return mapValue(match.ordinalNumber(dateString, {\n          unit: 'day'\n        }), valueCallback);\n      // Tue\n\n      case 'eee':\n        return match.day(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'short',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // T\n\n      case 'eeeee':\n        return match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tu\n\n      case 'eeeeee':\n        return match.day(dateString, {\n          width: 'short',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tuesday\n\n      case 'eeee':\n      default:\n        return match.day(dateString, {\n          width: 'wide',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'short',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 6;\n  }\n\n  set(date, _flags, value, options) {\n    date = setUTCDay(date, value, options);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCDay from \"../../../_lib/setUTCDay/index.js\"; // Stand-alone local day of week\n\nexport class StandAloneLocalDayParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 90);\n\n    _defineProperty(this, \"incompatibleTokens\", ['y', 'R', 'u', 'q', 'Q', 'M', 'L', 'I', 'd', 'D', 'E', 'i', 'e', 't', 'T']);\n  }\n\n  parse(dateString, token, match, options) {\n    var valueCallback = function (value) {\n      var wholeWeekDays = Math.floor((value - 1) / 7) * 7;\n      return (value + options.weekStartsOn + 6) % 7 + wholeWeekDays;\n    };\n\n    switch (token) {\n      // 3\n      case 'c':\n      case 'cc':\n        // 03\n        return mapValue(parseNDigits(token.length, dateString), valueCallback);\n      // 3rd\n\n      case 'co':\n        return mapValue(match.ordinalNumber(dateString, {\n          unit: 'day'\n        }), valueCallback);\n      // Tue\n\n      case 'ccc':\n        return match.day(dateString, {\n          width: 'abbreviated',\n          context: 'standalone'\n        }) || match.day(dateString, {\n          width: 'short',\n          context: 'standalone'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // T\n\n      case 'ccccc':\n        return match.day(dateString, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // Tu\n\n      case 'cccccc':\n        return match.day(dateString, {\n          width: 'short',\n          context: 'standalone'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // Tuesday\n\n      case 'cccc':\n      default:\n        return match.day(dateString, {\n          width: 'wide',\n          context: 'standalone'\n        }) || match.day(dateString, {\n          width: 'abbreviated',\n          context: 'standalone'\n        }) || match.day(dateString, {\n          width: 'short',\n          context: 'standalone'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 6;\n  }\n\n  set(date, _flags, value, options) {\n    date = setUTCDay(date, value, options);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nimport setUTCISODay from \"../../../_lib/setUTCISODay/index.js\"; // ISO day of week\n\nexport class ISODayParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 90);\n\n    _defineProperty(this, \"incompatibleTokens\", ['y', 'Y', 'u', 'q', 'Q', 'M', 'L', 'w', 'd', 'D', 'E', 'e', 'c', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    var valueCallback = function (value) {\n      if (value === 0) {\n        return 7;\n      }\n\n      return value;\n    };\n\n    switch (token) {\n      // 2\n      case 'i':\n      case 'ii':\n        // 02\n        return parseNDigits(token.length, dateString);\n      // 2nd\n\n      case 'io':\n        return match.ordinalNumber(dateString, {\n          unit: 'day'\n        });\n      // Tue\n\n      case 'iii':\n        return mapValue(match.day(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'short',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        }), valueCallback);\n      // T\n\n      case 'iiiii':\n        return mapValue(match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        }), valueCallback);\n      // Tu\n\n      case 'iiiiii':\n        return mapValue(match.day(dateString, {\n          width: 'short',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        }), valueCallback);\n      // Tuesday\n\n      case 'iiii':\n      default:\n        return mapValue(match.day(dateString, {\n          width: 'wide',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'short',\n          context: 'formatting'\n        }) || match.day(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        }), valueCallback);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 7;\n  }\n\n  set(date, _flags, value) {\n    date = setUTCISODay(date, value);\n    date.setUTCHours(0, 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\";\nexport class AMPMParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 80);\n\n    _defineProperty(this, \"incompatibleTokens\", ['b', 'B', 'H', 'k', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'a':\n      case 'aa':\n      case 'aaa':\n        return match.dayPeriod(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.dayPeriod(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'aaaaa':\n        return match.dayPeriod(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'aaaa':\n      default:\n        return match.dayPeriod(dateString, {\n          width: 'wide',\n          context: 'formatting'\n        }) || match.dayPeriod(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.dayPeriod(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n    }\n  }\n\n  set(date, _flags, value) {\n    date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\";\nexport class AMPMMidnightParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 80);\n\n    _defineProperty(this, \"incompatibleTokens\", ['a', 'B', 'H', 'k', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'b':\n      case 'bb':\n      case 'bbb':\n        return match.dayPeriod(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.dayPeriod(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'bbbbb':\n        return match.dayPeriod(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'bbbb':\n      default:\n        return match.dayPeriod(dateString, {\n          width: 'wide',\n          context: 'formatting'\n        }) || match.dayPeriod(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.dayPeriod(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n    }\n  }\n\n  set(date, _flags, value) {\n    date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { dayPeriodEnumToHours } from \"../utils.js\"; // in the morning, in the afternoon, in the evening, at night\n\nexport class DayPeriodParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 80);\n\n    _defineProperty(this, \"incompatibleTokens\", ['a', 'b', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'B':\n      case 'BB':\n      case 'BBB':\n        return match.dayPeriod(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.dayPeriod(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'BBBBB':\n        return match.dayPeriod(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'BBBB':\n      default:\n        return match.dayPeriod(dateString, {\n          width: 'wide',\n          context: 'formatting'\n        }) || match.dayPeriod(dateString, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }) || match.dayPeriod(dateString, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n    }\n  }\n\n  set(date, _flags, value) {\n    date.setUTCHours(dayPeriodEnumToHours(value), 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport class Hour1to12Parser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 70);\n\n    _defineProperty(this, \"incompatibleTokens\", ['H', 'K', 'k', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'h':\n        return parseNumericPattern(numericPatterns.hour12h, dateString);\n\n      case 'ho':\n        return match.ordinalNumber(dateString, {\n          unit: 'hour'\n        });\n\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 12;\n  }\n\n  set(date, _flags, value) {\n    var isPM = date.getUTCHours() >= 12;\n\n    if (isPM && value < 12) {\n      date.setUTCHours(value + 12, 0, 0, 0);\n    } else if (!isPM && value === 12) {\n      date.setUTCHours(0, 0, 0, 0);\n    } else {\n      date.setUTCHours(value, 0, 0, 0);\n    }\n\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport class Hour0to23Parser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 70);\n\n    _defineProperty(this, \"incompatibleTokens\", ['a', 'b', 'h', 'K', 'k', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'H':\n        return parseNumericPattern(numericPatterns.hour23h, dateString);\n\n      case 'Ho':\n        return match.ordinalNumber(dateString, {\n          unit: 'hour'\n        });\n\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 23;\n  }\n\n  set(date, _flags, value) {\n    date.setUTCHours(value, 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport class Hour0To11Parser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 70);\n\n    _defineProperty(this, \"incompatibleTokens\", ['h', 'H', 'k', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'K':\n        return parseNumericPattern(numericPatterns.hour11h, dateString);\n\n      case 'Ko':\n        return match.ordinalNumber(dateString, {\n          unit: 'hour'\n        });\n\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 11;\n  }\n\n  set(date, _flags, value) {\n    var isPM = date.getUTCHours() >= 12;\n\n    if (isPM && value < 12) {\n      date.setUTCHours(value + 12, 0, 0, 0);\n    } else {\n      date.setUTCHours(value, 0, 0, 0);\n    }\n\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport class Hour1To24Parser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 70);\n\n    _defineProperty(this, \"incompatibleTokens\", ['a', 'b', 'h', 'H', 'K', 't', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'k':\n        return parseNumericPattern(numericPatterns.hour24h, dateString);\n\n      case 'ko':\n        return match.ordinalNumber(dateString, {\n          unit: 'hour'\n        });\n\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 1 && value <= 24;\n  }\n\n  set(date, _flags, value) {\n    var hours = value <= 24 ? value % 24 : value;\n    date.setUTCHours(hours, 0, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport class MinuteParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 60);\n\n    _defineProperty(this, \"incompatibleTokens\", ['t', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 'm':\n        return parseNumericPattern(numericPatterns.minute, dateString);\n\n      case 'mo':\n        return match.ordinalNumber(dateString, {\n          unit: 'minute'\n        });\n\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 59;\n  }\n\n  set(date, _flags, value) {\n    date.setUTCMinutes(value, 0, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { numericPatterns } from \"../constants.js\";\nimport { parseNumericPattern, parseNDigits } from \"../utils.js\";\nexport class SecondParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 50);\n\n    _defineProperty(this, \"incompatibleTokens\", ['t', 'T']);\n  }\n\n  parse(dateString, token, match) {\n    switch (token) {\n      case 's':\n        return parseNumericPattern(numericPatterns.second, dateString);\n\n      case 'so':\n        return match.ordinalNumber(dateString, {\n          unit: 'second'\n        });\n\n      default:\n        return parseNDigits(token.length, dateString);\n    }\n  }\n\n  validate(_date, value) {\n    return value >= 0 && value <= 59;\n  }\n\n  set(date, _flags, value) {\n    date.setUTCSeconds(value, 0);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { mapValue, parseNDigits } from \"../utils.js\";\nexport class FractionOfSecondParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 30);\n\n    _defineProperty(this, \"incompatibleTokens\", ['t', 'T']);\n  }\n\n  parse(dateString, token) {\n    var valueCallback = function (value) {\n      return Math.floor(value * Math.pow(10, -token.length + 3));\n    };\n\n    return mapValue(parseNDigits(token.length, dateString), valueCallback);\n  }\n\n  set(date, _flags, value) {\n    date.setUTCMilliseconds(value);\n    return date;\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { parseTimezonePattern } from \"../utils.js\"; // Timezone (ISO-8601. +00:00 is `'Z'`)\n\nexport class ISOTimezoneWithZParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 10);\n\n    _defineProperty(this, \"incompatibleTokens\", ['t', 'T', 'x']);\n  }\n\n  parse(dateString, token) {\n    switch (token) {\n      case 'X':\n        return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);\n\n      case 'XX':\n        return parseTimezonePattern(timezonePatterns.basic, dateString);\n\n      case 'XXXX':\n        return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);\n\n      case 'XXXXX':\n        return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);\n\n      case 'XXX':\n      default:\n        return parseTimezonePattern(timezonePatterns.extended, dateString);\n    }\n  }\n\n  set(date, flags, value) {\n    if (flags.timestampIsSet) {\n      return date;\n    }\n\n    return new Date(date.getTime() - value);\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { timezonePatterns } from \"../constants.js\";\nimport { parseTimezonePattern } from \"../utils.js\"; // Timezone (ISO-8601)\n\nexport class ISOTimezoneParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 10);\n\n    _defineProperty(this, \"incompatibleTokens\", ['t', 'T', 'X']);\n  }\n\n  parse(dateString, token) {\n    switch (token) {\n      case 'x':\n        return parseTimezonePattern(timezonePatterns.basicOptionalMinutes, dateString);\n\n      case 'xx':\n        return parseTimezonePattern(timezonePatterns.basic, dateString);\n\n      case 'xxxx':\n        return parseTimezonePattern(timezonePatterns.basicOptionalSeconds, dateString);\n\n      case 'xxxxx':\n        return parseTimezonePattern(timezonePatterns.extendedOptionalSeconds, dateString);\n\n      case 'xxx':\n      default:\n        return parseTimezonePattern(timezonePatterns.extended, dateString);\n    }\n  }\n\n  set(date, flags, value) {\n    if (flags.timestampIsSet) {\n      return date;\n    }\n\n    return new Date(date.getTime() - value);\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { parseAnyDigitsSigned } from \"../utils.js\";\nexport class TimestampSecondsParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 40);\n\n    _defineProperty(this, \"incompatibleTokens\", '*');\n  }\n\n  parse(dateString) {\n    return parseAnyDigitsSigned(dateString);\n  }\n\n  set(_date, _flags, value) {\n    return [new Date(value * 1000), {\n      timestampIsSet: true\n    }];\n  }\n\n}","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nimport { Parser } from \"../Parser.js\";\nimport { parseAnyDigitsSigned } from \"../utils.js\";\nexport class TimestampMillisecondsParser extends Parser {\n  constructor() {\n    super(...arguments);\n\n    _defineProperty(this, \"priority\", 20);\n\n    _defineProperty(this, \"incompatibleTokens\", '*');\n  }\n\n  parse(dateString) {\n    return parseAnyDigitsSigned(dateString);\n  }\n\n  set(_date, _flags, value) {\n    return [new Date(value), {\n      timestampIsSet: true\n    }];\n  }\n\n}","import { EraParser } from \"./EraParser.js\";\nimport { YearParser } from \"./YearParser.js\";\nimport { LocalWeekYearParser } from \"./LocalWeekYearParser.js\";\nimport { ISOWeekYearParser } from \"./ISOWeekYearParser.js\";\nimport { ExtendedYearParser } from \"./ExtendedYearParser.js\";\nimport { QuarterParser } from \"./QuarterParser.js\";\nimport { StandAloneQuarterParser } from \"./StandAloneQuarterParser.js\";\nimport { MonthParser } from \"./MonthParser.js\";\nimport { StandAloneMonthParser } from \"./StandAloneMonthParser.js\";\nimport { LocalWeekParser } from \"./LocalWeekParser.js\";\nimport { ISOWeekParser } from \"./ISOWeekParser.js\";\nimport { DateParser } from \"./DateParser.js\";\nimport { DayOfYearParser } from \"./DayOfYearParser.js\";\nimport { DayParser } from \"./DayParser.js\";\nimport { LocalDayParser } from \"./LocalDayParser.js\";\nimport { StandAloneLocalDayParser } from \"./StandAloneLocalDayParser.js\";\nimport { ISODayParser } from \"./ISODayParser.js\";\nimport { AMPMParser } from \"./AMPMParser.js\";\nimport { AMPMMidnightParser } from \"./AMPMMidnightParser.js\";\nimport { DayPeriodParser } from \"./DayPeriodParser.js\";\nimport { Hour1to12Parser } from \"./Hour1to12Parser.js\";\nimport { Hour0to23Parser } from \"./Hour0to23Parser.js\";\nimport { Hour0To11Parser } from \"./Hour0To11Parser.js\";\nimport { Hour1To24Parser } from \"./Hour1To24Parser.js\";\nimport { MinuteParser } from \"./MinuteParser.js\";\nimport { SecondParser } from \"./SecondParser.js\";\nimport { FractionOfSecondParser } from \"./FractionOfSecondParser.js\";\nimport { ISOTimezoneWithZParser } from \"./ISOTimezoneWithZParser.js\";\nimport { ISOTimezoneParser } from \"./ISOTimezoneParser.js\";\nimport { TimestampSecondsParser } from \"./TimestampSecondsParser.js\";\nimport { TimestampMillisecondsParser } from \"./TimestampMillisecondsParser.js\";\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* | Milliseconds in day            |\n * |  b  | AM, PM, noon, midnight         |  B  | Flexible day period            |\n * |  c  | Stand-alone local day of week  |  C* | Localized hour w/ day period   |\n * |  d  | Day of month                   |  D  | Day of year                    |\n * |  e  | Local day of week              |  E  | Day of week                    |\n * |  f  |                                |  F* | Day of week in month           |\n * |  g* | Modified Julian day            |  G  | Era                            |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  i! | ISO day of week                |  I! | ISO week of year               |\n * |  j* | Localized hour w/ day period   |  J* | Localized hour w/o day period  |\n * |  k  | Hour [1-24]                    |  K  | Hour [0-11]                    |\n * |  l* | (deprecated)                   |  L  | Stand-alone month              |\n * |  m  | Minute                         |  M  | Month                          |\n * |  n  |                                |  N  |                                |\n * |  o! | Ordinal number modifier        |  O* | Timezone (GMT)                 |\n * |  p  |                                |  P  |                                |\n * |  q  | Stand-alone quarter            |  Q  | Quarter                        |\n * |  r* | Related Gregorian year         |  R! | ISO week-numbering year        |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  t! | Seconds timestamp              |  T! | Milliseconds timestamp         |\n * |  u  | Extended year                  |  U* | Cyclic year                    |\n * |  v* | Timezone (generic non-locat.)  |  V* | Timezone (location)            |\n * |  w  | Local week of year             |  W* | Week of month                  |\n * |  x  | Timezone (ISO-8601 w/o Z)      |  X  | Timezone (ISO-8601)            |\n * |  y  | Year (abs)                     |  Y  | Local week-numbering year      |\n * |  z* | Timezone (specific non-locat.) |  Z* | Timezone (aliases)             |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `parse` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n *   i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n *   `R` is supposed to be used in conjunction with `I` and `i`\n *   for universal ISO week-numbering date, whereas\n *   `Y` is supposed to be used in conjunction with `w` and `e`\n *   for week-numbering date specific to the locale.\n */\n\nexport var parsers = {\n  G: new EraParser(),\n  y: new YearParser(),\n  Y: new LocalWeekYearParser(),\n  R: new ISOWeekYearParser(),\n  u: new ExtendedYearParser(),\n  Q: new QuarterParser(),\n  q: new StandAloneQuarterParser(),\n  M: new MonthParser(),\n  L: new StandAloneMonthParser(),\n  w: new LocalWeekParser(),\n  I: new ISOWeekParser(),\n  d: new DateParser(),\n  D: new DayOfYearParser(),\n  E: new DayParser(),\n  e: new LocalDayParser(),\n  c: new StandAloneLocalDayParser(),\n  i: new ISODayParser(),\n  a: new AMPMParser(),\n  b: new AMPMMidnightParser(),\n  B: new DayPeriodParser(),\n  h: new Hour1to12Parser(),\n  H: new Hour0to23Parser(),\n  K: new Hour0To11Parser(),\n  k: new Hour1To24Parser(),\n  m: new MinuteParser(),\n  s: new SecondParser(),\n  S: new FractionOfSecondParser(),\n  X: new ISOTimezoneWithZParser(),\n  x: new ISOTimezoneParser(),\n  t: new TimestampSecondsParser(),\n  T: new TimestampMillisecondsParser()\n};","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCWeek from \"../getUTCWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function setUTCWeek(dirtyDate, dirtyWeek, options) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var week = toInteger(dirtyWeek);\n  var diff = getUTCWeek(date, options) - week;\n  date.setUTCDate(date.getUTCDate() - diff * 7);\n  return date;\n}","import toInteger from \"../toInteger/index.js\";\nimport toDate from \"../../toDate/index.js\";\nimport getUTCISOWeek from \"../getUTCISOWeek/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nexport default function setUTCISOWeek(dirtyDate, dirtyISOWeek) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var isoWeek = toInteger(dirtyISOWeek);\n  var diff = getUTCISOWeek(date) - isoWeek;\n  date.setUTCDate(date.getUTCDate() - diff * 7);\n  return date;\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nimport toInteger from \"../toInteger/index.js\";\nexport default function setUTCISODay(dirtyDate, dirtyDay) {\n  requiredArgs(2, arguments);\n  var day = toInteger(dirtyDay);\n\n  if (day % 7 === 0) {\n    day = day - 7;\n  }\n\n  var weekStartsOn = 1;\n  var date = toDate(dirtyDate);\n  var currentDay = date.getUTCDay();\n  var remainder = day % 7;\n  var dayIndex = (remainder + 7) % 7;\n  var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;\n  date.setUTCDate(date.getUTCDate() + diff);\n  return date;\n}","import defaultLocale from \"../_lib/defaultLocale/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport assign from \"../_lib/assign/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { DateToSystemTimezoneSetter } from \"./_lib/Setter.js\";\nimport { parsers } from \"./_lib/parsers/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n//   (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n//   except a single quote symbol, which ends the sequence.\n//   Two quote characters do not end the sequence.\n//   If there is no matching single quote\n//   then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar notWhitespaceRegExp = /\\S/;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name parse\n * @category Common Helpers\n * @summary Parse the date.\n *\n * @description\n * Return the date parsed from string using the given format string.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters in the format string wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n *\n * Format of the format string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 5 below the table).\n *\n * Not all tokens are compatible. Combinations that don't make sense or could lead to bugs are prohibited\n * and will throw `RangeError`. For example usage of 24-hour format token with AM/PM token will throw an exception:\n *\n * ```javascript\n * parse('23 AM', 'HH a', new Date())\n * //=> RangeError: The format string mustn't contain `HH` and `a` at the same time\n * ```\n *\n * See the compatibility table: https://docs.google.com/spreadsheets/d/e/2PACX-1vQOPU3xUhplll6dyoMmVUXHKl_8CRDs6_ueLmex3SoqwhuolkuN3O05l4rqx5h1dKX8eb46Ul-CCSrq/pubhtml?gid=0&single=true\n *\n * Accepted format string patterns:\n * | Unit                            |Prior| Pattern | Result examples                   | Notes |\n * |---------------------------------|-----|---------|-----------------------------------|-------|\n * | Era                             | 140 | G..GGG  | AD, BC                            |       |\n * |                                 |     | GGGG    | Anno Domini, Before Christ        | 2     |\n * |                                 |     | GGGGG   | A, B                              |       |\n * | Calendar year                   | 130 | y       | 44, 1, 1900, 2017, 9999           | 4     |\n * |                                 |     | yo      | 44th, 1st, 1900th, 9999999th      | 4,5   |\n * |                                 |     | yy      | 44, 01, 00, 17                    | 4     |\n * |                                 |     | yyy     | 044, 001, 123, 999                | 4     |\n * |                                 |     | yyyy    | 0044, 0001, 1900, 2017            | 4     |\n * |                                 |     | yyyyy   | ...                               | 2,4   |\n * | Local week-numbering year       | 130 | Y       | 44, 1, 1900, 2017, 9000           | 4     |\n * |                                 |     | Yo      | 44th, 1st, 1900th, 9999999th      | 4,5   |\n * |                                 |     | YY      | 44, 01, 00, 17                    | 4,6   |\n * |                                 |     | YYY     | 044, 001, 123, 999                | 4     |\n * |                                 |     | YYYY    | 0044, 0001, 1900, 2017            | 4,6   |\n * |                                 |     | YYYYY   | ...                               | 2,4   |\n * | ISO week-numbering year         | 130 | R       | -43, 1, 1900, 2017, 9999, -9999   | 4,5   |\n * |                                 |     | RR      | -43, 01, 00, 17                   | 4,5   |\n * |                                 |     | RRR     | -043, 001, 123, 999, -999         | 4,5   |\n * |                                 |     | RRRR    | -0043, 0001, 2017, 9999, -9999    | 4,5   |\n * |                                 |     | RRRRR   | ...                               | 2,4,5 |\n * | Extended year                   | 130 | u       | -43, 1, 1900, 2017, 9999, -999    | 4     |\n * |                                 |     | uu      | -43, 01, 99, -99                  | 4     |\n * |                                 |     | uuu     | -043, 001, 123, 999, -999         | 4     |\n * |                                 |     | uuuu    | -0043, 0001, 2017, 9999, -9999    | 4     |\n * |                                 |     | uuuuu   | ...                               | 2,4   |\n * | Quarter (formatting)            | 120 | Q       | 1, 2, 3, 4                        |       |\n * |                                 |     | Qo      | 1st, 2nd, 3rd, 4th                | 5     |\n * |                                 |     | QQ      | 01, 02, 03, 04                    |       |\n * |                                 |     | QQQ     | Q1, Q2, Q3, Q4                    |       |\n * |                                 |     | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 |     | QQQQQ   | 1, 2, 3, 4                        | 4     |\n * | Quarter (stand-alone)           | 120 | q       | 1, 2, 3, 4                        |       |\n * |                                 |     | qo      | 1st, 2nd, 3rd, 4th                | 5     |\n * |                                 |     | qq      | 01, 02, 03, 04                    |       |\n * |                                 |     | qqq     | Q1, Q2, Q3, Q4                    |       |\n * |                                 |     | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 |     | qqqqq   | 1, 2, 3, 4                        | 3     |\n * | Month (formatting)              | 110 | M       | 1, 2, ..., 12                     |       |\n * |                                 |     | Mo      | 1st, 2nd, ..., 12th               | 5     |\n * |                                 |     | MM      | 01, 02, ..., 12                   |       |\n * |                                 |     | MMM     | Jan, Feb, ..., Dec                |       |\n * |                                 |     | MMMM    | January, February, ..., December  | 2     |\n * |                                 |     | MMMMM   | J, F, ..., D                      |       |\n * | Month (stand-alone)             | 110 | L       | 1, 2, ..., 12                     |       |\n * |                                 |     | Lo      | 1st, 2nd, ..., 12th               | 5     |\n * |                                 |     | LL      | 01, 02, ..., 12                   |       |\n * |                                 |     | LLL     | Jan, Feb, ..., Dec                |       |\n * |                                 |     | LLLL    | January, February, ..., December  | 2     |\n * |                                 |     | LLLLL   | J, F, ..., D                      |       |\n * | Local week of year              | 100 | w       | 1, 2, ..., 53                     |       |\n * |                                 |     | wo      | 1st, 2nd, ..., 53th               | 5     |\n * |                                 |     | ww      | 01, 02, ..., 53                   |       |\n * | ISO week of year                | 100 | I       | 1, 2, ..., 53                     | 5     |\n * |                                 |     | Io      | 1st, 2nd, ..., 53th               | 5     |\n * |                                 |     | II      | 01, 02, ..., 53                   | 5     |\n * | Day of month                    |  90 | d       | 1, 2, ..., 31                     |       |\n * |                                 |     | do      | 1st, 2nd, ..., 31st               | 5     |\n * |                                 |     | dd      | 01, 02, ..., 31                   |       |\n * | Day of year                     |  90 | D       | 1, 2, ..., 365, 366               | 7     |\n * |                                 |     | Do      | 1st, 2nd, ..., 365th, 366th       | 5     |\n * |                                 |     | DD      | 01, 02, ..., 365, 366             | 7     |\n * |                                 |     | DDD     | 001, 002, ..., 365, 366           |       |\n * |                                 |     | DDDD    | ...                               | 2     |\n * | Day of week (formatting)        |  90 | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 |     | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 |     | EEEEE   | M, T, W, T, F, S, S               |       |\n * |                                 |     | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | ISO day of week (formatting)    |  90 | i       | 1, 2, 3, ..., 7                   | 5     |\n * |                                 |     | io      | 1st, 2nd, ..., 7th                | 5     |\n * |                                 |     | ii      | 01, 02, ..., 07                   | 5     |\n * |                                 |     | iii     | Mon, Tue, Wed, ..., Sun           | 5     |\n * |                                 |     | iiii    | Monday, Tuesday, ..., Sunday      | 2,5   |\n * |                                 |     | iiiii   | M, T, W, T, F, S, S               | 5     |\n * |                                 |     | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 5     |\n * | Local day of week (formatting)  |  90 | e       | 2, 3, 4, ..., 1                   |       |\n * |                                 |     | eo      | 2nd, 3rd, ..., 1st                | 5     |\n * |                                 |     | ee      | 02, 03, ..., 01                   |       |\n * |                                 |     | eee     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 |     | eeee    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 |     | eeeee   | M, T, W, T, F, S, S               |       |\n * |                                 |     | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | Local day of week (stand-alone) |  90 | c       | 2, 3, 4, ..., 1                   |       |\n * |                                 |     | co      | 2nd, 3rd, ..., 1st                | 5     |\n * |                                 |     | cc      | 02, 03, ..., 01                   |       |\n * |                                 |     | ccc     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 |     | cccc    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 |     | ccccc   | M, T, W, T, F, S, S               |       |\n * |                                 |     | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | AM, PM                          |  80 | a..aaa  | AM, PM                            |       |\n * |                                 |     | aaaa    | a.m., p.m.                        | 2     |\n * |                                 |     | aaaaa   | a, p                              |       |\n * | AM, PM, noon, midnight          |  80 | b..bbb  | AM, PM, noon, midnight            |       |\n * |                                 |     | bbbb    | a.m., p.m., noon, midnight        | 2     |\n * |                                 |     | bbbbb   | a, p, n, mi                       |       |\n * | Flexible day period             |  80 | B..BBB  | at night, in the morning, ...     |       |\n * |                                 |     | BBBB    | at night, in the morning, ...     | 2     |\n * |                                 |     | BBBBB   | at night, in the morning, ...     |       |\n * | Hour [1-12]                     |  70 | h       | 1, 2, ..., 11, 12                 |       |\n * |                                 |     | ho      | 1st, 2nd, ..., 11th, 12th         | 5     |\n * |                                 |     | hh      | 01, 02, ..., 11, 12               |       |\n * | Hour [0-23]                     |  70 | H       | 0, 1, 2, ..., 23                  |       |\n * |                                 |     | Ho      | 0th, 1st, 2nd, ..., 23rd          | 5     |\n * |                                 |     | HH      | 00, 01, 02, ..., 23               |       |\n * | Hour [0-11]                     |  70 | K       | 1, 2, ..., 11, 0                  |       |\n * |                                 |     | Ko      | 1st, 2nd, ..., 11th, 0th          | 5     |\n * |                                 |     | KK      | 01, 02, ..., 11, 00               |       |\n * | Hour [1-24]                     |  70 | k       | 24, 1, 2, ..., 23                 |       |\n * |                                 |     | ko      | 24th, 1st, 2nd, ..., 23rd         | 5     |\n * |                                 |     | kk      | 24, 01, 02, ..., 23               |       |\n * | Minute                          |  60 | m       | 0, 1, ..., 59                     |       |\n * |                                 |     | mo      | 0th, 1st, ..., 59th               | 5     |\n * |                                 |     | mm      | 00, 01, ..., 59                   |       |\n * | Second                          |  50 | s       | 0, 1, ..., 59                     |       |\n * |                                 |     | so      | 0th, 1st, ..., 59th               | 5     |\n * |                                 |     | ss      | 00, 01, ..., 59                   |       |\n * | Seconds timestamp               |  40 | t       | 512969520                         |       |\n * |                                 |     | tt      | ...                               | 2     |\n * | Fraction of second              |  30 | S       | 0, 1, ..., 9                      |       |\n * |                                 |     | SS      | 00, 01, ..., 99                   |       |\n * |                                 |     | SSS     | 000, 001, ..., 999                |       |\n * |                                 |     | SSSS    | ...                               | 2     |\n * | Milliseconds timestamp          |  20 | T       | 512969520900                      |       |\n * |                                 |     | TT      | ...                               | 2     |\n * | Timezone (ISO-8601 w/ Z)        |  10 | X       | -08, +0530, Z                     |       |\n * |                                 |     | XX      | -0800, +0530, Z                   |       |\n * |                                 |     | XXX     | -08:00, +05:30, Z                 |       |\n * |                                 |     | XXXX    | -0800, +0530, Z, +123456          | 2     |\n * |                                 |     | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |\n * | Timezone (ISO-8601 w/o Z)       |  10 | x       | -08, +0530, +00                   |       |\n * |                                 |     | xx      | -0800, +0530, +0000               |       |\n * |                                 |     | xxx     | -08:00, +05:30, +00:00            | 2     |\n * |                                 |     | xxxx    | -0800, +0530, +0000, +123456      |       |\n * |                                 |     | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |\n * | Long localized date             |  NA | P       | 05/29/1453                        | 5,8   |\n * |                                 |     | PP      | May 29, 1453                      |       |\n * |                                 |     | PPP     | May 29th, 1453                    |       |\n * |                                 |     | PPPP    | Sunday, May 29th, 1453            | 2,5,8 |\n * | Long localized time             |  NA | p       | 12:00 AM                          | 5,8   |\n * |                                 |     | pp      | 12:00:00 AM                       |       |\n * | Combination of date and time    |  NA | Pp      | 05/29/1453, 12:00 AM              |       |\n * |                                 |     | PPpp    | May 29, 1453, 12:00:00 AM         |       |\n * |                                 |     | PPPpp   | May 29th, 1453 at ...             |       |\n * |                                 |     | PPPPpp  | Sunday, May 29th, 1453 at ...     | 2,5,8 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n *    are the same as \"stand-alone\" units, but are different in some languages.\n *    \"Formatting\" units are declined according to the rules of the language\n *    in the context of a date. \"Stand-alone\" units are always nominative singular.\n *    In `format` function, they will produce different result:\n *\n *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n *    `parse` will try to match both formatting and stand-alone units interchangably.\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n *    the single quote characters (see below).\n *    If the sequence is longer than listed in table:\n *    - for numerical units (`yyyyyyyy`) `parse` will try to match a number\n *      as wide as the sequence\n *    - for text units (`MMMMMMMM`) `parse` will try to match the widest variation of the unit.\n *      These variations are marked with \"2\" in the last column of the table.\n *\n * 3. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n *    These tokens represent the shortest form of the quarter.\n *\n * 4. The main difference between `y` and `u` patterns are B.C. years:\n *\n *    | Year | `y` | `u` |\n *    |------|-----|-----|\n *    | AC 1 |   1 |   1 |\n *    | BC 1 |   1 |   0 |\n *    | BC 2 |   2 |  -1 |\n *\n *    Also `yy` will try to guess the century of two digit year by proximity with `referenceDate`:\n *\n *    `parse('50', 'yy', new Date(2018, 0, 1)) //=> Sat Jan 01 2050 00:00:00`\n *\n *    `parse('75', 'yy', new Date(2018, 0, 1)) //=> Wed Jan 01 1975 00:00:00`\n *\n *    while `uu` will just assign the year as is:\n *\n *    `parse('50', 'uu', new Date(2018, 0, 1)) //=> Sat Jan 01 0050 00:00:00`\n *\n *    `parse('75', 'uu', new Date(2018, 0, 1)) //=> Tue Jan 01 0075 00:00:00`\n *\n *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n *    except local week-numbering years are dependent on `options.weekStartsOn`\n *    and `options.firstWeekContainsDate` (compare [setISOWeekYear]{@link https://date-fns.org/docs/setISOWeekYear}\n *    and [setWeekYear]{@link https://date-fns.org/docs/setWeekYear}).\n *\n * 5. These patterns are not in the Unicode Technical Standard #35:\n *    - `i`: ISO day of week\n *    - `I`: ISO week of year\n *    - `R`: ISO week-numbering year\n *    - `o`: ordinal number modifier\n *    - `P`: long localized date\n *    - `p`: long localized time\n *\n * 6. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n *    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 7. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month.\n *    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 8. `P+` tokens do not have a defined priority since they are merely aliases to other tokens based\n *    on the given locale.\n *\n *    using `en-US` locale: `P` => `MM/dd/yyyy`\n *    using `en-US` locale: `p` => `hh:mm a`\n *    using `pt-BR` locale: `P` => `dd/MM/yyyy`\n *    using `pt-BR` locale: `p` => `HH:mm`\n *\n * Values will be assigned to the date in the descending order of its unit's priority.\n * Units of an equal priority overwrite each other in the order of appearance.\n *\n * If no values of higher priority are parsed (e.g. when parsing string 'January 1st' without a year),\n * the values will be taken from 3rd argument `referenceDate` which works as a context of parsing.\n *\n * `referenceDate` must be passed for correct work of the function.\n * If you're not sure which `referenceDate` to supply, create a new instance of Date:\n * `parse('02/11/2014', 'MM/dd/yyyy', new Date())`\n * In this case parsing will be done in the context of the current date.\n * If `referenceDate` is `Invalid Date` or a value not convertible to valid `Date`,\n * then `Invalid Date` will be returned.\n *\n * The result may vary by locale.\n *\n * If `formatString` matches with `dateString` but does not provides tokens, `referenceDate` will be returned.\n *\n * If parsing failed, `Invalid Date` will be returned.\n * Invalid Date is a Date, whose time value is NaN.\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {String} dateString - the string to parse\n * @param {String} formatString - the string of tokens\n * @param {Date|Number} referenceDate - defines values missing from the parsed dateString\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {1|2|3|4|5|6|7} [options.firstWeekContainsDate=1] - the day of January, which is always in the first week of the year\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {Date} the parsed date\n * @throws {TypeError} 3 arguments required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} `options.locale` must contain `match` property\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Parse 11 February 2014 from middle-endian format:\n * var result = parse('02/11/2014', 'MM/dd/yyyy', new Date())\n * //=> Tue Feb 11 2014 00:00:00\n *\n * @example\n * // Parse 28th of February in Esperanto locale in the context of 2010 year:\n * import eo from 'date-fns/locale/eo'\n * var result = parse('28-a de februaro', \"do 'de' MMMM\", new Date(2010, 0, 1), {\n *   locale: eo\n * })\n * //=> Sun Feb 28 2010 00:00:00\n */\n\nexport default function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, options) {\n  var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n\n  requiredArgs(3, arguments);\n  var dateString = String(dirtyDateString);\n  var formatString = String(dirtyFormatString);\n  var defaultOptions = getDefaultOptions();\n  var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n\n  if (!locale.match) {\n    throw new RangeError('locale must contain match property');\n  }\n\n  var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n    throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n  }\n\n  var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  if (formatString === '') {\n    if (dateString === '') {\n      return toDate(dirtyReferenceDate);\n    } else {\n      return new Date(NaN);\n    }\n  }\n\n  var subFnOptions = {\n    firstWeekContainsDate: firstWeekContainsDate,\n    weekStartsOn: weekStartsOn,\n    locale: locale\n  }; // If timezone isn't specified, it will be set to the system timezone\n\n  var setters = [new DateToSystemTimezoneSetter()];\n  var tokens = formatString.match(longFormattingTokensRegExp).map(function (substring) {\n    var firstCharacter = substring[0];\n\n    if (firstCharacter in longFormatters) {\n      var longFormatter = longFormatters[firstCharacter];\n      return longFormatter(substring, locale.formatLong);\n    }\n\n    return substring;\n  }).join('').match(formattingTokensRegExp);\n  var usedTokens = [];\n\n  var _loop = function (_token) {\n    if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(_token)) {\n      throwProtectedError(_token, formatString, dirtyDateString);\n    }\n\n    if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(_token)) {\n      throwProtectedError(_token, formatString, dirtyDateString);\n    }\n\n    var firstCharacter = _token[0];\n    var parser = parsers[firstCharacter];\n\n    if (parser) {\n      var incompatibleTokens = parser.incompatibleTokens;\n\n      if (Array.isArray(incompatibleTokens)) {\n        var incompatibleToken = usedTokens.find(function (usedToken) {\n          return incompatibleTokens.includes(usedToken.token) || usedToken.token === firstCharacter;\n        });\n\n        if (incompatibleToken) {\n          throw new RangeError(\"The format string mustn't contain `\".concat(incompatibleToken.fullToken, \"` and `\").concat(_token, \"` at the same time\"));\n        }\n      } else if (parser.incompatibleTokens === '*' && usedTokens.length > 0) {\n        throw new RangeError(\"The format string mustn't contain `\".concat(_token, \"` and any other token at the same time\"));\n      }\n\n      usedTokens.push({\n        token: firstCharacter,\n        fullToken: _token\n      });\n      var parseResult = parser.run(dateString, _token, locale.match, subFnOptions);\n\n      if (!parseResult) {\n        token = _token;\n        return {\n          v: new Date(NaN)\n        };\n      }\n\n      setters.push(parseResult.setter);\n      dateString = parseResult.rest;\n    } else {\n      if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n        throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n      } // Replace two single quote characters with one single quote character\n\n\n      if (_token === \"''\") {\n        _token = \"'\";\n      } else if (firstCharacter === \"'\") {\n        _token = cleanEscapedString(_token);\n      } // Cut token from string, or, if string doesn't match the token, return Invalid Date\n\n\n      if (dateString.indexOf(_token) === 0) {\n        dateString = dateString.slice(_token.length);\n      } else {\n        token = _token;\n        return {\n          v: new Date(NaN)\n        };\n      }\n    }\n\n    token = _token;\n  };\n\n  for (var token of tokens) {\n    var _ret = _loop(token);\n\n    if (typeof _ret === \"object\") return _ret.v;\n  } // Check if the remaining input contains something other than whitespace\n\n\n  if (dateString.length > 0 && notWhitespaceRegExp.test(dateString)) {\n    return new Date(NaN);\n  }\n\n  var uniquePrioritySetters = setters.map(function (setter) {\n    return setter.priority;\n  }).sort(function (a, b) {\n    return b - a;\n  }).filter(function (priority, index, array) {\n    return array.indexOf(priority) === index;\n  }).map(function (priority) {\n    return setters.filter(function (setter) {\n      return setter.priority === priority;\n    }).sort(function (a, b) {\n      return b.subPriority - a.subPriority;\n    });\n  }).map(function (setterArray) {\n    return setterArray[0];\n  });\n  var date = toDate(dirtyReferenceDate);\n\n  if (isNaN(date.getTime())) {\n    return new Date(NaN);\n  } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n\n\n  var utcDate = subMilliseconds(date, getTimezoneOffsetInMilliseconds(date));\n  var flags = {};\n\n  for (var setter of uniquePrioritySetters) {\n    if (!setter.validate(utcDate, subFnOptions)) {\n      return new Date(NaN);\n    }\n\n    var result = setter.set(utcDate, flags, subFnOptions); // Result is tuple (date, flags)\n\n    if (Array.isArray(result)) {\n      utcDate = result[0];\n      assign(flags, result[1]); // Result is date\n    } else {\n      utcDate = result;\n    }\n  }\n\n  return utcDate;\n}\n\nfunction cleanEscapedString(input) {\n  return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, \"'\");\n}","import { millisecondsInHour, millisecondsInMinute } from \"../constants/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n/**\n * @name parseISO\n * @category Common Helpers\n * @summary Parse ISO string\n *\n * @description\n * Parse the given string in ISO 8601 format and return an instance of Date.\n *\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If the argument isn't a string, the function cannot parse the string or\n * the values are invalid, it returns Invalid Date.\n *\n * @param {String} argument - the value to convert\n * @param {Object} [options] - an object with options.\n * @param {0|1|2} [options.additionalDigits=2] - the additional number of digits in the extended year format\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = parseISO('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = parseISO('+02014101', { additionalDigits: 1 })\n * //=> Fri Apr 11 2014 00:00:00\n */\n\nexport default function parseISO(argument, options) {\n  var _options$additionalDi;\n\n  requiredArgs(1, arguments);\n  var additionalDigits = toInteger((_options$additionalDi = options === null || options === void 0 ? void 0 : options.additionalDigits) !== null && _options$additionalDi !== void 0 ? _options$additionalDi : 2);\n\n  if (additionalDigits !== 2 && additionalDigits !== 1 && additionalDigits !== 0) {\n    throw new RangeError('additionalDigits must be 0, 1 or 2');\n  }\n\n  if (!(typeof argument === 'string' || Object.prototype.toString.call(argument) === '[object String]')) {\n    return new Date(NaN);\n  }\n\n  var dateStrings = splitDateString(argument);\n  var date;\n\n  if (dateStrings.date) {\n    var parseYearResult = parseYear(dateStrings.date, additionalDigits);\n    date = parseDate(parseYearResult.restDateString, parseYearResult.year);\n  }\n\n  if (!date || isNaN(date.getTime())) {\n    return new Date(NaN);\n  }\n\n  var timestamp = date.getTime();\n  var time = 0;\n  var offset;\n\n  if (dateStrings.time) {\n    time = parseTime(dateStrings.time);\n\n    if (isNaN(time)) {\n      return new Date(NaN);\n    }\n  }\n\n  if (dateStrings.timezone) {\n    offset = parseTimezone(dateStrings.timezone);\n\n    if (isNaN(offset)) {\n      return new Date(NaN);\n    }\n  } else {\n    var dirtyDate = new Date(timestamp + time); // js parsed string assuming it's in UTC timezone\n    // but we need it to be parsed in our timezone\n    // so we use utc values to build date in our timezone.\n    // Year values from 0 to 99 map to the years 1900 to 1999\n    // so set year explicitly with setFullYear.\n\n    var result = new Date(0);\n    result.setFullYear(dirtyDate.getUTCFullYear(), dirtyDate.getUTCMonth(), dirtyDate.getUTCDate());\n    result.setHours(dirtyDate.getUTCHours(), dirtyDate.getUTCMinutes(), dirtyDate.getUTCSeconds(), dirtyDate.getUTCMilliseconds());\n    return result;\n  }\n\n  return new Date(timestamp + time + offset);\n}\nvar patterns = {\n  dateTimeDelimiter: /[T ]/,\n  timeZoneDelimiter: /[Z ]/i,\n  timezone: /([Z+-].*)$/\n};\nvar dateRegex = /^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/;\nvar timeRegex = /^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/;\nvar timezoneRegex = /^([+-])(\\d{2})(?::?(\\d{2}))?$/;\n\nfunction splitDateString(dateString) {\n  var dateStrings = {};\n  var array = dateString.split(patterns.dateTimeDelimiter);\n  var timeString; // The regex match should only return at maximum two array elements.\n  // [date], [time], or [date, time].\n\n  if (array.length > 2) {\n    return dateStrings;\n  }\n\n  if (/:/.test(array[0])) {\n    timeString = array[0];\n  } else {\n    dateStrings.date = array[0];\n    timeString = array[1];\n\n    if (patterns.timeZoneDelimiter.test(dateStrings.date)) {\n      dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];\n      timeString = dateString.substr(dateStrings.date.length, dateString.length);\n    }\n  }\n\n  if (timeString) {\n    var token = patterns.timezone.exec(timeString);\n\n    if (token) {\n      dateStrings.time = timeString.replace(token[1], '');\n      dateStrings.timezone = token[1];\n    } else {\n      dateStrings.time = timeString;\n    }\n  }\n\n  return dateStrings;\n}\n\nfunction parseYear(dateString, additionalDigits) {\n  var regex = new RegExp('^(?:(\\\\d{4}|[+-]\\\\d{' + (4 + additionalDigits) + '})|(\\\\d{2}|[+-]\\\\d{' + (2 + additionalDigits) + '})$)');\n  var captures = dateString.match(regex); // Invalid ISO-formatted year\n\n  if (!captures) return {\n    year: NaN,\n    restDateString: ''\n  };\n  var year = captures[1] ? parseInt(captures[1]) : null;\n  var century = captures[2] ? parseInt(captures[2]) : null; // either year or century is null, not both\n\n  return {\n    year: century === null ? year : century * 100,\n    restDateString: dateString.slice((captures[1] || captures[2]).length)\n  };\n}\n\nfunction parseDate(dateString, year) {\n  // Invalid ISO-formatted year\n  if (year === null) return new Date(NaN);\n  var captures = dateString.match(dateRegex); // Invalid ISO-formatted string\n\n  if (!captures) return new Date(NaN);\n  var isWeekDate = !!captures[4];\n  var dayOfYear = parseDateUnit(captures[1]);\n  var month = parseDateUnit(captures[2]) - 1;\n  var day = parseDateUnit(captures[3]);\n  var week = parseDateUnit(captures[4]);\n  var dayOfWeek = parseDateUnit(captures[5]) - 1;\n\n  if (isWeekDate) {\n    if (!validateWeekDate(year, week, dayOfWeek)) {\n      return new Date(NaN);\n    }\n\n    return dayOfISOWeekYear(year, week, dayOfWeek);\n  } else {\n    var date = new Date(0);\n\n    if (!validateDate(year, month, day) || !validateDayOfYearDate(year, dayOfYear)) {\n      return new Date(NaN);\n    }\n\n    date.setUTCFullYear(year, month, Math.max(dayOfYear, day));\n    return date;\n  }\n}\n\nfunction parseDateUnit(value) {\n  return value ? parseInt(value) : 1;\n}\n\nfunction parseTime(timeString) {\n  var captures = timeString.match(timeRegex);\n  if (!captures) return NaN; // Invalid ISO-formatted time\n\n  var hours = parseTimeUnit(captures[1]);\n  var minutes = parseTimeUnit(captures[2]);\n  var seconds = parseTimeUnit(captures[3]);\n\n  if (!validateTime(hours, minutes, seconds)) {\n    return NaN;\n  }\n\n  return hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1000;\n}\n\nfunction parseTimeUnit(value) {\n  return value && parseFloat(value.replace(',', '.')) || 0;\n}\n\nfunction parseTimezone(timezoneString) {\n  if (timezoneString === 'Z') return 0;\n  var captures = timezoneString.match(timezoneRegex);\n  if (!captures) return 0;\n  var sign = captures[1] === '+' ? -1 : 1;\n  var hours = parseInt(captures[2]);\n  var minutes = captures[3] && parseInt(captures[3]) || 0;\n\n  if (!validateTimezone(hours, minutes)) {\n    return NaN;\n  }\n\n  return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);\n}\n\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n  var date = new Date(0);\n  date.setUTCFullYear(isoWeekYear, 0, 4);\n  var fourthOfJanuaryDay = date.getUTCDay() || 7;\n  var diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;\n  date.setUTCDate(date.getUTCDate() + diff);\n  return date;\n} // Validation functions\n// February is null to handle the leap year (using ||)\n\n\nvar daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nfunction isLeapYearIndex(year) {\n  return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0;\n}\n\nfunction validateDate(year, month, date) {\n  return month >= 0 && month <= 11 && date >= 1 && date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28));\n}\n\nfunction validateDayOfYearDate(year, dayOfYear) {\n  return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);\n}\n\nfunction validateWeekDate(_year, week, day) {\n  return week >= 1 && week <= 53 && day >= 0 && day <= 6;\n}\n\nfunction validateTime(hours, minutes, seconds) {\n  if (hours === 24) {\n    return minutes === 0 && seconds === 0;\n  }\n\n  return seconds >= 0 && seconds < 60 && minutes >= 0 && minutes < 60 && hours >= 0 && hours < 25;\n}\n\nfunction validateTimezone(_hours, minutes) {\n  return minutes >= 0 && minutes <= 59;\n}","import requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param {*} value - the value to check\n * @returns {boolean} true if the given value is a date\n * @throws {TypeError} 1 arguments required\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\n\nexport default function isDate(value) {\n  requiredArgs(1, arguments);\n  return value instanceof Date || typeof value === 'object' && Object.prototype.toString.call(value) === '[object Date]';\n}","import isDate from \"../isDate/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate}\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param {*} date - the date to check\n * @returns {Boolean} the date is valid\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertable into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\n\nexport default function isValid(dirtyDate) {\n  requiredArgs(1, arguments);\n\n  if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {\n    return false;\n  }\n\n  var date = toDate(dirtyDate);\n  return !isNaN(Number(date));\n}","import toDate from \"../../toDate/index.js\";\nimport requiredArgs from \"../requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\nexport default function getUTCDayOfYear(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var timestamp = date.getTime();\n  date.setUTCMonth(0, 1);\n  date.setUTCHours(0, 0, 0, 0);\n  var startOfYearTimestamp = date.getTime();\n  var difference = timestamp - startOfYearTimestamp;\n  return Math.floor(difference / MILLISECONDS_IN_DAY) + 1;\n}","export default function addLeadingZeros(number, targetLength) {\n  var sign = number < 0 ? '-' : '';\n  var output = Math.abs(number).toString();\n\n  while (output.length < targetLength) {\n    output = '0' + output;\n  }\n\n  return sign + output;\n}","import addLeadingZeros from \"../../addLeadingZeros/index.js\";\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* |                                |\n * |  d  | Day of month                   |  D  |                                |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  m  | Minute                         |  M  | Month                          |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  y  | Year (abs)                     |  Y  |                                |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nvar formatters = {\n  // Year\n  y: function (date, token) {\n    // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n    // | Year     |     y | yy |   yyy |  yyyy | yyyyy |\n    // |----------|-------|----|-------|-------|-------|\n    // | AD 1     |     1 | 01 |   001 |  0001 | 00001 |\n    // | AD 12    |    12 | 12 |   012 |  0012 | 00012 |\n    // | AD 123   |   123 | 23 |   123 |  0123 | 00123 |\n    // | AD 1234  |  1234 | 34 |  1234 |  1234 | 01234 |\n    // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n    var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n    var year = signedYear > 0 ? signedYear : 1 - signedYear;\n    return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);\n  },\n  // Month\n  M: function (date, token) {\n    var month = date.getUTCMonth();\n    return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2);\n  },\n  // Day of the month\n  d: function (date, token) {\n    return addLeadingZeros(date.getUTCDate(), token.length);\n  },\n  // AM or PM\n  a: function (date, token) {\n    var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';\n\n    switch (token) {\n      case 'a':\n      case 'aa':\n        return dayPeriodEnumValue.toUpperCase();\n\n      case 'aaa':\n        return dayPeriodEnumValue;\n\n      case 'aaaaa':\n        return dayPeriodEnumValue[0];\n\n      case 'aaaa':\n      default:\n        return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';\n    }\n  },\n  // Hour [1-12]\n  h: function (date, token) {\n    return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length);\n  },\n  // Hour [0-23]\n  H: function (date, token) {\n    return addLeadingZeros(date.getUTCHours(), token.length);\n  },\n  // Minute\n  m: function (date, token) {\n    return addLeadingZeros(date.getUTCMinutes(), token.length);\n  },\n  // Second\n  s: function (date, token) {\n    return addLeadingZeros(date.getUTCSeconds(), token.length);\n  },\n  // Fraction of second\n  S: function (date, token) {\n    var numberOfDigits = token.length;\n    var milliseconds = date.getUTCMilliseconds();\n    var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3));\n    return addLeadingZeros(fractionalSeconds, token.length);\n  }\n};\nexport default formatters;","import getUTCDayOfYear from \"../../../_lib/getUTCDayOfYear/index.js\";\nimport getUTCISOWeek from \"../../../_lib/getUTCISOWeek/index.js\";\nimport getUTCISOWeekYear from \"../../../_lib/getUTCISOWeekYear/index.js\";\nimport getUTCWeek from \"../../../_lib/getUTCWeek/index.js\";\nimport getUTCWeekYear from \"../../../_lib/getUTCWeekYear/index.js\";\nimport addLeadingZeros from \"../../addLeadingZeros/index.js\";\nimport lightFormatters from \"../lightFormatters/index.js\";\nvar dayPeriodEnum = {\n  am: 'am',\n  pm: 'pm',\n  midnight: 'midnight',\n  noon: 'noon',\n  morning: 'morning',\n  afternoon: 'afternoon',\n  evening: 'evening',\n  night: 'night'\n};\n/*\n * |     | Unit                           |     | Unit                           |\n * |-----|--------------------------------|-----|--------------------------------|\n * |  a  | AM, PM                         |  A* | Milliseconds in day            |\n * |  b  | AM, PM, noon, midnight         |  B  | Flexible day period            |\n * |  c  | Stand-alone local day of week  |  C* | Localized hour w/ day period   |\n * |  d  | Day of month                   |  D  | Day of year                    |\n * |  e  | Local day of week              |  E  | Day of week                    |\n * |  f  |                                |  F* | Day of week in month           |\n * |  g* | Modified Julian day            |  G  | Era                            |\n * |  h  | Hour [1-12]                    |  H  | Hour [0-23]                    |\n * |  i! | ISO day of week                |  I! | ISO week of year               |\n * |  j* | Localized hour w/ day period   |  J* | Localized hour w/o day period  |\n * |  k  | Hour [1-24]                    |  K  | Hour [0-11]                    |\n * |  l* | (deprecated)                   |  L  | Stand-alone month              |\n * |  m  | Minute                         |  M  | Month                          |\n * |  n  |                                |  N  |                                |\n * |  o! | Ordinal number modifier        |  O  | Timezone (GMT)                 |\n * |  p! | Long localized time            |  P! | Long localized date            |\n * |  q  | Stand-alone quarter            |  Q  | Quarter                        |\n * |  r* | Related Gregorian year         |  R! | ISO week-numbering year        |\n * |  s  | Second                         |  S  | Fraction of second             |\n * |  t! | Seconds timestamp              |  T! | Milliseconds timestamp         |\n * |  u  | Extended year                  |  U* | Cyclic year                    |\n * |  v* | Timezone (generic non-locat.)  |  V* | Timezone (location)            |\n * |  w  | Local week of year             |  W* | Week of month                  |\n * |  x  | Timezone (ISO-8601 w/o Z)      |  X  | Timezone (ISO-8601)            |\n * |  y  | Year (abs)                     |  Y  | Local week-numbering year      |\n * |  z  | Timezone (specific non-locat.) |  Z* | Timezone (aliases)             |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n *   i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n *   `R` is supposed to be used in conjunction with `I` and `i`\n *   for universal ISO week-numbering date, whereas\n *   `Y` is supposed to be used in conjunction with `w` and `e`\n *   for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nvar formatters = {\n  // Era\n  G: function (date, token, localize) {\n    var era = date.getUTCFullYear() > 0 ? 1 : 0;\n\n    switch (token) {\n      // AD, BC\n      case 'G':\n      case 'GG':\n      case 'GGG':\n        return localize.era(era, {\n          width: 'abbreviated'\n        });\n      // A, B\n\n      case 'GGGGG':\n        return localize.era(era, {\n          width: 'narrow'\n        });\n      // Anno Domini, Before Christ\n\n      case 'GGGG':\n      default:\n        return localize.era(era, {\n          width: 'wide'\n        });\n    }\n  },\n  // Year\n  y: function (date, token, localize) {\n    // Ordinal number\n    if (token === 'yo') {\n      var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n      var year = signedYear > 0 ? signedYear : 1 - signedYear;\n      return localize.ordinalNumber(year, {\n        unit: 'year'\n      });\n    }\n\n    return lightFormatters.y(date, token);\n  },\n  // Local week-numbering year\n  Y: function (date, token, localize, options) {\n    var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)\n\n    var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year\n\n    if (token === 'YY') {\n      var twoDigitYear = weekYear % 100;\n      return addLeadingZeros(twoDigitYear, 2);\n    } // Ordinal number\n\n\n    if (token === 'Yo') {\n      return localize.ordinalNumber(weekYear, {\n        unit: 'year'\n      });\n    } // Padding\n\n\n    return addLeadingZeros(weekYear, token.length);\n  },\n  // ISO week-numbering year\n  R: function (date, token) {\n    var isoWeekYear = getUTCISOWeekYear(date); // Padding\n\n    return addLeadingZeros(isoWeekYear, token.length);\n  },\n  // Extended year. This is a single number designating the year of this calendar system.\n  // The main difference between `y` and `u` localizers are B.C. years:\n  // | Year | `y` | `u` |\n  // |------|-----|-----|\n  // | AC 1 |   1 |   1 |\n  // | BC 1 |   1 |   0 |\n  // | BC 2 |   2 |  -1 |\n  // Also `yy` always returns the last two digits of a year,\n  // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n  u: function (date, token) {\n    var year = date.getUTCFullYear();\n    return addLeadingZeros(year, token.length);\n  },\n  // Quarter\n  Q: function (date, token, localize) {\n    var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n    switch (token) {\n      // 1, 2, 3, 4\n      case 'Q':\n        return String(quarter);\n      // 01, 02, 03, 04\n\n      case 'QQ':\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n\n      case 'Qo':\n        return localize.ordinalNumber(quarter, {\n          unit: 'quarter'\n        });\n      // Q1, Q2, Q3, Q4\n\n      case 'QQQ':\n        return localize.quarter(quarter, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n      case 'QQQQQ':\n        return localize.quarter(quarter, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // 1st quarter, 2nd quarter, ...\n\n      case 'QQQQ':\n      default:\n        return localize.quarter(quarter, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Stand-alone quarter\n  q: function (date, token, localize) {\n    var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);\n\n    switch (token) {\n      // 1, 2, 3, 4\n      case 'q':\n        return String(quarter);\n      // 01, 02, 03, 04\n\n      case 'qq':\n        return addLeadingZeros(quarter, 2);\n      // 1st, 2nd, 3rd, 4th\n\n      case 'qo':\n        return localize.ordinalNumber(quarter, {\n          unit: 'quarter'\n        });\n      // Q1, Q2, Q3, Q4\n\n      case 'qqq':\n        return localize.quarter(quarter, {\n          width: 'abbreviated',\n          context: 'standalone'\n        });\n      // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n\n      case 'qqqqq':\n        return localize.quarter(quarter, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // 1st quarter, 2nd quarter, ...\n\n      case 'qqqq':\n      default:\n        return localize.quarter(quarter, {\n          width: 'wide',\n          context: 'standalone'\n        });\n    }\n  },\n  // Month\n  M: function (date, token, localize) {\n    var month = date.getUTCMonth();\n\n    switch (token) {\n      case 'M':\n      case 'MM':\n        return lightFormatters.M(date, token);\n      // 1st, 2nd, ..., 12th\n\n      case 'Mo':\n        return localize.ordinalNumber(month + 1, {\n          unit: 'month'\n        });\n      // Jan, Feb, ..., Dec\n\n      case 'MMM':\n        return localize.month(month, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // J, F, ..., D\n\n      case 'MMMMM':\n        return localize.month(month, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // January, February, ..., December\n\n      case 'MMMM':\n      default:\n        return localize.month(month, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Stand-alone month\n  L: function (date, token, localize) {\n    var month = date.getUTCMonth();\n\n    switch (token) {\n      // 1, 2, ..., 12\n      case 'L':\n        return String(month + 1);\n      // 01, 02, ..., 12\n\n      case 'LL':\n        return addLeadingZeros(month + 1, 2);\n      // 1st, 2nd, ..., 12th\n\n      case 'Lo':\n        return localize.ordinalNumber(month + 1, {\n          unit: 'month'\n        });\n      // Jan, Feb, ..., Dec\n\n      case 'LLL':\n        return localize.month(month, {\n          width: 'abbreviated',\n          context: 'standalone'\n        });\n      // J, F, ..., D\n\n      case 'LLLLL':\n        return localize.month(month, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // January, February, ..., December\n\n      case 'LLLL':\n      default:\n        return localize.month(month, {\n          width: 'wide',\n          context: 'standalone'\n        });\n    }\n  },\n  // Local week of year\n  w: function (date, token, localize, options) {\n    var week = getUTCWeek(date, options);\n\n    if (token === 'wo') {\n      return localize.ordinalNumber(week, {\n        unit: 'week'\n      });\n    }\n\n    return addLeadingZeros(week, token.length);\n  },\n  // ISO week of year\n  I: function (date, token, localize) {\n    var isoWeek = getUTCISOWeek(date);\n\n    if (token === 'Io') {\n      return localize.ordinalNumber(isoWeek, {\n        unit: 'week'\n      });\n    }\n\n    return addLeadingZeros(isoWeek, token.length);\n  },\n  // Day of the month\n  d: function (date, token, localize) {\n    if (token === 'do') {\n      return localize.ordinalNumber(date.getUTCDate(), {\n        unit: 'date'\n      });\n    }\n\n    return lightFormatters.d(date, token);\n  },\n  // Day of year\n  D: function (date, token, localize) {\n    var dayOfYear = getUTCDayOfYear(date);\n\n    if (token === 'Do') {\n      return localize.ordinalNumber(dayOfYear, {\n        unit: 'dayOfYear'\n      });\n    }\n\n    return addLeadingZeros(dayOfYear, token.length);\n  },\n  // Day of week\n  E: function (date, token, localize) {\n    var dayOfWeek = date.getUTCDay();\n\n    switch (token) {\n      // Tue\n      case 'E':\n      case 'EE':\n      case 'EEE':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // T\n\n      case 'EEEEE':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tu\n\n      case 'EEEEEE':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'formatting'\n        });\n      // Tuesday\n\n      case 'EEEE':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Local day of week\n  e: function (date, token, localize, options) {\n    var dayOfWeek = date.getUTCDay();\n    var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n    switch (token) {\n      // Numerical value (Nth day of week with current locale or weekStartsOn)\n      case 'e':\n        return String(localDayOfWeek);\n      // Padded numerical value\n\n      case 'ee':\n        return addLeadingZeros(localDayOfWeek, 2);\n      // 1st, 2nd, ..., 7th\n\n      case 'eo':\n        return localize.ordinalNumber(localDayOfWeek, {\n          unit: 'day'\n        });\n\n      case 'eee':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // T\n\n      case 'eeeee':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tu\n\n      case 'eeeeee':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'formatting'\n        });\n      // Tuesday\n\n      case 'eeee':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Stand-alone local day of week\n  c: function (date, token, localize, options) {\n    var dayOfWeek = date.getUTCDay();\n    var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n\n    switch (token) {\n      // Numerical value (same as in `e`)\n      case 'c':\n        return String(localDayOfWeek);\n      // Padded numerical value\n\n      case 'cc':\n        return addLeadingZeros(localDayOfWeek, token.length);\n      // 1st, 2nd, ..., 7th\n\n      case 'co':\n        return localize.ordinalNumber(localDayOfWeek, {\n          unit: 'day'\n        });\n\n      case 'ccc':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'standalone'\n        });\n      // T\n\n      case 'ccccc':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'standalone'\n        });\n      // Tu\n\n      case 'cccccc':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'standalone'\n        });\n      // Tuesday\n\n      case 'cccc':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'standalone'\n        });\n    }\n  },\n  // ISO day of week\n  i: function (date, token, localize) {\n    var dayOfWeek = date.getUTCDay();\n    var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n\n    switch (token) {\n      // 2\n      case 'i':\n        return String(isoDayOfWeek);\n      // 02\n\n      case 'ii':\n        return addLeadingZeros(isoDayOfWeek, token.length);\n      // 2nd\n\n      case 'io':\n        return localize.ordinalNumber(isoDayOfWeek, {\n          unit: 'day'\n        });\n      // Tue\n\n      case 'iii':\n        return localize.day(dayOfWeek, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n      // T\n\n      case 'iiiii':\n        return localize.day(dayOfWeek, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n      // Tu\n\n      case 'iiiiii':\n        return localize.day(dayOfWeek, {\n          width: 'short',\n          context: 'formatting'\n        });\n      // Tuesday\n\n      case 'iiii':\n      default:\n        return localize.day(dayOfWeek, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // AM or PM\n  a: function (date, token, localize) {\n    var hours = date.getUTCHours();\n    var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n\n    switch (token) {\n      case 'a':\n      case 'aa':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n\n      case 'aaa':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }).toLowerCase();\n\n      case 'aaaaa':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'aaaa':\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // AM, PM, midnight, noon\n  b: function (date, token, localize) {\n    var hours = date.getUTCHours();\n    var dayPeriodEnumValue;\n\n    if (hours === 12) {\n      dayPeriodEnumValue = dayPeriodEnum.noon;\n    } else if (hours === 0) {\n      dayPeriodEnumValue = dayPeriodEnum.midnight;\n    } else {\n      dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';\n    }\n\n    switch (token) {\n      case 'b':\n      case 'bb':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n\n      case 'bbb':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        }).toLowerCase();\n\n      case 'bbbbb':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'bbbb':\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // in the morning, in the afternoon, in the evening, at night\n  B: function (date, token, localize) {\n    var hours = date.getUTCHours();\n    var dayPeriodEnumValue;\n\n    if (hours >= 17) {\n      dayPeriodEnumValue = dayPeriodEnum.evening;\n    } else if (hours >= 12) {\n      dayPeriodEnumValue = dayPeriodEnum.afternoon;\n    } else if (hours >= 4) {\n      dayPeriodEnumValue = dayPeriodEnum.morning;\n    } else {\n      dayPeriodEnumValue = dayPeriodEnum.night;\n    }\n\n    switch (token) {\n      case 'B':\n      case 'BB':\n      case 'BBB':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'abbreviated',\n          context: 'formatting'\n        });\n\n      case 'BBBBB':\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'narrow',\n          context: 'formatting'\n        });\n\n      case 'BBBB':\n      default:\n        return localize.dayPeriod(dayPeriodEnumValue, {\n          width: 'wide',\n          context: 'formatting'\n        });\n    }\n  },\n  // Hour [1-12]\n  h: function (date, token, localize) {\n    if (token === 'ho') {\n      var hours = date.getUTCHours() % 12;\n      if (hours === 0) hours = 12;\n      return localize.ordinalNumber(hours, {\n        unit: 'hour'\n      });\n    }\n\n    return lightFormatters.h(date, token);\n  },\n  // Hour [0-23]\n  H: function (date, token, localize) {\n    if (token === 'Ho') {\n      return localize.ordinalNumber(date.getUTCHours(), {\n        unit: 'hour'\n      });\n    }\n\n    return lightFormatters.H(date, token);\n  },\n  // Hour [0-11]\n  K: function (date, token, localize) {\n    var hours = date.getUTCHours() % 12;\n\n    if (token === 'Ko') {\n      return localize.ordinalNumber(hours, {\n        unit: 'hour'\n      });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n  // Hour [1-24]\n  k: function (date, token, localize) {\n    var hours = date.getUTCHours();\n    if (hours === 0) hours = 24;\n\n    if (token === 'ko') {\n      return localize.ordinalNumber(hours, {\n        unit: 'hour'\n      });\n    }\n\n    return addLeadingZeros(hours, token.length);\n  },\n  // Minute\n  m: function (date, token, localize) {\n    if (token === 'mo') {\n      return localize.ordinalNumber(date.getUTCMinutes(), {\n        unit: 'minute'\n      });\n    }\n\n    return lightFormatters.m(date, token);\n  },\n  // Second\n  s: function (date, token, localize) {\n    if (token === 'so') {\n      return localize.ordinalNumber(date.getUTCSeconds(), {\n        unit: 'second'\n      });\n    }\n\n    return lightFormatters.s(date, token);\n  },\n  // Fraction of second\n  S: function (date, token) {\n    return lightFormatters.S(date, token);\n  },\n  // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n  X: function (date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n\n    if (timezoneOffset === 0) {\n      return 'Z';\n    }\n\n    switch (token) {\n      // Hours and optional minutes\n      case 'X':\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XX`\n\n      case 'XXXX':\n      case 'XX':\n        // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `XXX`\n\n      case 'XXXXX':\n      case 'XXX': // Hours and minutes with `:` delimiter\n\n      default:\n        return formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n  x: function (date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n\n    switch (token) {\n      // Hours and optional minutes\n      case 'x':\n        return formatTimezoneWithOptionalMinutes(timezoneOffset);\n      // Hours, minutes and optional seconds without `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xx`\n\n      case 'xxxx':\n      case 'xx':\n        // Hours and minutes without `:` delimiter\n        return formatTimezone(timezoneOffset);\n      // Hours, minutes and optional seconds with `:` delimiter\n      // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n      // so this token always has the same output as `xxx`\n\n      case 'xxxxx':\n      case 'xxx': // Hours and minutes with `:` delimiter\n\n      default:\n        return formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Timezone (GMT)\n  O: function (date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case 'O':\n      case 'OO':\n      case 'OOO':\n        return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n      // Long\n\n      case 'OOOO':\n      default:\n        return 'GMT' + formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Timezone (specific non-location)\n  z: function (date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timezoneOffset = originalDate.getTimezoneOffset();\n\n    switch (token) {\n      // Short\n      case 'z':\n      case 'zz':\n      case 'zzz':\n        return 'GMT' + formatTimezoneShort(timezoneOffset, ':');\n      // Long\n\n      case 'zzzz':\n      default:\n        return 'GMT' + formatTimezone(timezoneOffset, ':');\n    }\n  },\n  // Seconds timestamp\n  t: function (date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timestamp = Math.floor(originalDate.getTime() / 1000);\n    return addLeadingZeros(timestamp, token.length);\n  },\n  // Milliseconds timestamp\n  T: function (date, token, _localize, options) {\n    var originalDate = options._originalDate || date;\n    var timestamp = originalDate.getTime();\n    return addLeadingZeros(timestamp, token.length);\n  }\n};\n\nfunction formatTimezoneShort(offset, dirtyDelimiter) {\n  var sign = offset > 0 ? '-' : '+';\n  var absOffset = Math.abs(offset);\n  var hours = Math.floor(absOffset / 60);\n  var minutes = absOffset % 60;\n\n  if (minutes === 0) {\n    return sign + String(hours);\n  }\n\n  var delimiter = dirtyDelimiter || '';\n  return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {\n  if (offset % 60 === 0) {\n    var sign = offset > 0 ? '-' : '+';\n    return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n  }\n\n  return formatTimezone(offset, dirtyDelimiter);\n}\n\nfunction formatTimezone(offset, dirtyDelimiter) {\n  var delimiter = dirtyDelimiter || '';\n  var sign = offset > 0 ? '-' : '+';\n  var absOffset = Math.abs(offset);\n  var hours = addLeadingZeros(Math.floor(absOffset / 60), 2);\n  var minutes = addLeadingZeros(absOffset % 60, 2);\n  return sign + hours + delimiter + minutes;\n}\n\nexport default formatters;","import isValid from \"../isValid/index.js\";\nimport subMilliseconds from \"../subMilliseconds/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport formatters from \"../_lib/format/formatters/index.js\";\nimport longFormatters from \"../_lib/format/longFormatters/index.js\";\nimport getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport { isProtectedDayOfYearToken, isProtectedWeekYearToken, throwProtectedError } from \"../_lib/protectedTokens/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport defaultLocale from \"../_lib/defaultLocale/index.js\"; // This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n//   (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n//   except a single quote symbol, which ends the sequence.\n//   Two quote characters do not end the sequence.\n//   If there is no matching single quote\n//   then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\n\nvar formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\n\nvar longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\nvar escapedStringRegExp = /^'([^]*?)'?$/;\nvar doubleQuoteRegExp = /''/g;\nvar unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n/**\n * @name format\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit                            | Pattern | Result examples                   | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era                             | G..GGG  | AD, BC                            |       |\n * |                                 | GGGG    | Anno Domini, Before Christ        | 2     |\n * |                                 | GGGGG   | A, B                              |       |\n * | Calendar year                   | y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | yo      | 44th, 1st, 0th, 17th              | 5,7   |\n * |                                 | yy      | 44, 01, 00, 17                    | 5     |\n * |                                 | yyy     | 044, 001, 1900, 2017              | 5     |\n * |                                 | yyyy    | 0044, 0001, 1900, 2017            | 5     |\n * |                                 | yyyyy   | ...                               | 3,5   |\n * | Local week-numbering year       | Y       | 44, 1, 1900, 2017                 | 5     |\n * |                                 | Yo      | 44th, 1st, 1900th, 2017th         | 5,7   |\n * |                                 | YY      | 44, 01, 00, 17                    | 5,8   |\n * |                                 | YYY     | 044, 001, 1900, 2017              | 5     |\n * |                                 | YYYY    | 0044, 0001, 1900, 2017            | 5,8   |\n * |                                 | YYYYY   | ...                               | 3,5   |\n * | ISO week-numbering year         | R       | -43, 0, 1, 1900, 2017             | 5,7   |\n * |                                 | RR      | -43, 00, 01, 1900, 2017           | 5,7   |\n * |                                 | RRR     | -043, 000, 001, 1900, 2017        | 5,7   |\n * |                                 | RRRR    | -0043, 0000, 0001, 1900, 2017     | 5,7   |\n * |                                 | RRRRR   | ...                               | 3,5,7 |\n * | Extended year                   | u       | -43, 0, 1, 1900, 2017             | 5     |\n * |                                 | uu      | -43, 01, 1900, 2017               | 5     |\n * |                                 | uuu     | -043, 001, 1900, 2017             | 5     |\n * |                                 | uuuu    | -0043, 0001, 1900, 2017           | 5     |\n * |                                 | uuuuu   | ...                               | 3,5   |\n * | Quarter (formatting)            | Q       | 1, 2, 3, 4                        |       |\n * |                                 | Qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | QQ      | 01, 02, 03, 04                    |       |\n * |                                 | QQQ     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | QQQQ    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | QQQQQ   | 1, 2, 3, 4                        | 4     |\n * | Quarter (stand-alone)           | q       | 1, 2, 3, 4                        |       |\n * |                                 | qo      | 1st, 2nd, 3rd, 4th                | 7     |\n * |                                 | qq      | 01, 02, 03, 04                    |       |\n * |                                 | qqq     | Q1, Q2, Q3, Q4                    |       |\n * |                                 | qqqq    | 1st quarter, 2nd quarter, ...     | 2     |\n * |                                 | qqqqq   | 1, 2, 3, 4                        | 4     |\n * | Month (formatting)              | M       | 1, 2, ..., 12                     |       |\n * |                                 | Mo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | MM      | 01, 02, ..., 12                   |       |\n * |                                 | MMM     | Jan, Feb, ..., Dec                |       |\n * |                                 | MMMM    | January, February, ..., December  | 2     |\n * |                                 | MMMMM   | J, F, ..., D                      |       |\n * | Month (stand-alone)             | L       | 1, 2, ..., 12                     |       |\n * |                                 | Lo      | 1st, 2nd, ..., 12th               | 7     |\n * |                                 | LL      | 01, 02, ..., 12                   |       |\n * |                                 | LLL     | Jan, Feb, ..., Dec                |       |\n * |                                 | LLLL    | January, February, ..., December  | 2     |\n * |                                 | LLLLL   | J, F, ..., D                      |       |\n * | Local week of year              | w       | 1, 2, ..., 53                     |       |\n * |                                 | wo      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | ww      | 01, 02, ..., 53                   |       |\n * | ISO week of year                | I       | 1, 2, ..., 53                     | 7     |\n * |                                 | Io      | 1st, 2nd, ..., 53th               | 7     |\n * |                                 | II      | 01, 02, ..., 53                   | 7     |\n * | Day of month                    | d       | 1, 2, ..., 31                     |       |\n * |                                 | do      | 1st, 2nd, ..., 31st               | 7     |\n * |                                 | dd      | 01, 02, ..., 31                   |       |\n * | Day of year                     | D       | 1, 2, ..., 365, 366               | 9     |\n * |                                 | Do      | 1st, 2nd, ..., 365th, 366th       | 7     |\n * |                                 | DD      | 01, 02, ..., 365, 366             | 9     |\n * |                                 | DDD     | 001, 002, ..., 365, 366           |       |\n * |                                 | DDDD    | ...                               | 3     |\n * | Day of week (formatting)        | E..EEE  | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | EEEE    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | EEEEE   | M, T, W, T, F, S, S               |       |\n * |                                 | EEEEEE  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | ISO day of week (formatting)    | i       | 1, 2, 3, ..., 7                   | 7     |\n * |                                 | io      | 1st, 2nd, ..., 7th                | 7     |\n * |                                 | ii      | 01, 02, ..., 07                   | 7     |\n * |                                 | iii     | Mon, Tue, Wed, ..., Sun           | 7     |\n * |                                 | iiii    | Monday, Tuesday, ..., Sunday      | 2,7   |\n * |                                 | iiiii   | M, T, W, T, F, S, S               | 7     |\n * |                                 | iiiiii  | Mo, Tu, We, Th, Fr, Sa, Su        | 7     |\n * | Local day of week (formatting)  | e       | 2, 3, 4, ..., 1                   |       |\n * |                                 | eo      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | ee      | 02, 03, ..., 01                   |       |\n * |                                 | eee     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | eeee    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | eeeee   | M, T, W, T, F, S, S               |       |\n * |                                 | eeeeee  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | Local day of week (stand-alone) | c       | 2, 3, 4, ..., 1                   |       |\n * |                                 | co      | 2nd, 3rd, ..., 1st                | 7     |\n * |                                 | cc      | 02, 03, ..., 01                   |       |\n * |                                 | ccc     | Mon, Tue, Wed, ..., Sun           |       |\n * |                                 | cccc    | Monday, Tuesday, ..., Sunday      | 2     |\n * |                                 | ccccc   | M, T, W, T, F, S, S               |       |\n * |                                 | cccccc  | Mo, Tu, We, Th, Fr, Sa, Su        |       |\n * | AM, PM                          | a..aa   | AM, PM                            |       |\n * |                                 | aaa     | am, pm                            |       |\n * |                                 | aaaa    | a.m., p.m.                        | 2     |\n * |                                 | aaaaa   | a, p                              |       |\n * | AM, PM, noon, midnight          | b..bb   | AM, PM, noon, midnight            |       |\n * |                                 | bbb     | am, pm, noon, midnight            |       |\n * |                                 | bbbb    | a.m., p.m., noon, midnight        | 2     |\n * |                                 | bbbbb   | a, p, n, mi                       |       |\n * | Flexible day period             | B..BBB  | at night, in the morning, ...     |       |\n * |                                 | BBBB    | at night, in the morning, ...     | 2     |\n * |                                 | BBBBB   | at night, in the morning, ...     |       |\n * | Hour [1-12]                     | h       | 1, 2, ..., 11, 12                 |       |\n * |                                 | ho      | 1st, 2nd, ..., 11th, 12th         | 7     |\n * |                                 | hh      | 01, 02, ..., 11, 12               |       |\n * | Hour [0-23]                     | H       | 0, 1, 2, ..., 23                  |       |\n * |                                 | Ho      | 0th, 1st, 2nd, ..., 23rd          | 7     |\n * |                                 | HH      | 00, 01, 02, ..., 23               |       |\n * | Hour [0-11]                     | K       | 1, 2, ..., 11, 0                  |       |\n * |                                 | Ko      | 1st, 2nd, ..., 11th, 0th          | 7     |\n * |                                 | KK      | 01, 02, ..., 11, 00               |       |\n * | Hour [1-24]                     | k       | 24, 1, 2, ..., 23                 |       |\n * |                                 | ko      | 24th, 1st, 2nd, ..., 23rd         | 7     |\n * |                                 | kk      | 24, 01, 02, ..., 23               |       |\n * | Minute                          | m       | 0, 1, ..., 59                     |       |\n * |                                 | mo      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | mm      | 00, 01, ..., 59                   |       |\n * | Second                          | s       | 0, 1, ..., 59                     |       |\n * |                                 | so      | 0th, 1st, ..., 59th               | 7     |\n * |                                 | ss      | 00, 01, ..., 59                   |       |\n * | Fraction of second              | S       | 0, 1, ..., 9                      |       |\n * |                                 | SS      | 00, 01, ..., 99                   |       |\n * |                                 | SSS     | 000, 001, ..., 999                |       |\n * |                                 | SSSS    | ...                               | 3     |\n * | Timezone (ISO-8601 w/ Z)        | X       | -08, +0530, Z                     |       |\n * |                                 | XX      | -0800, +0530, Z                   |       |\n * |                                 | XXX     | -08:00, +05:30, Z                 |       |\n * |                                 | XXXX    | -0800, +0530, Z, +123456          | 2     |\n * |                                 | XXXXX   | -08:00, +05:30, Z, +12:34:56      |       |\n * | Timezone (ISO-8601 w/o Z)       | x       | -08, +0530, +00                   |       |\n * |                                 | xx      | -0800, +0530, +0000               |       |\n * |                                 | xxx     | -08:00, +05:30, +00:00            | 2     |\n * |                                 | xxxx    | -0800, +0530, +0000, +123456      |       |\n * |                                 | xxxxx   | -08:00, +05:30, +00:00, +12:34:56 |       |\n * | Timezone (GMT)                  | O...OOO | GMT-8, GMT+5:30, GMT+0            |       |\n * |                                 | OOOO    | GMT-08:00, GMT+05:30, GMT+00:00   | 2     |\n * | Timezone (specific non-locat.)  | z...zzz | GMT-8, GMT+5:30, GMT+0            | 6     |\n * |                                 | zzzz    | GMT-08:00, GMT+05:30, GMT+00:00   | 2,6   |\n * | Seconds timestamp               | t       | 512969520                         | 7     |\n * |                                 | tt      | ...                               | 3,7   |\n * | Milliseconds timestamp          | T       | 512969520900                      | 7     |\n * |                                 | TT      | ...                               | 3,7   |\n * | Long localized date             | P       | 04/29/1453                        | 7     |\n * |                                 | PP      | Apr 29, 1453                      | 7     |\n * |                                 | PPP     | April 29th, 1453                  | 7     |\n * |                                 | PPPP    | Friday, April 29th, 1453          | 2,7   |\n * | Long localized time             | p       | 12:00 AM                          | 7     |\n * |                                 | pp      | 12:00:00 AM                       | 7     |\n * |                                 | ppp     | 12:00:00 AM GMT+2                 | 7     |\n * |                                 | pppp    | 12:00:00 AM GMT+02:00             | 2,7   |\n * | Combination of date and time    | Pp      | 04/29/1453, 12:00 AM              | 7     |\n * |                                 | PPpp    | Apr 29, 1453, 12:00:00 AM         | 7     |\n * |                                 | PPPppp  | April 29th, 1453 at ...           | 7     |\n * |                                 | PPPPpppp| Friday, April 29th, 1453 at ...   | 2,7   |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n *    are the same as \"stand-alone\" units, but are different in some languages.\n *    \"Formatting\" units are declined according to the rules of the language\n *    in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n *    `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n *    `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n *    the single quote characters (see below).\n *    If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n *    the output will be the same as default pattern for this unit, usually\n *    the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n *    are marked with \"2\" in the last column of the table.\n *\n *    `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n *    `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n *    The output will be padded with zeros to match the length of the pattern.\n *\n *    `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n *    These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n *    | Year | `y` | `u` |\n *    |------|-----|-----|\n *    | AC 1 |   1 |   1 |\n *    | BC 1 |   1 |   0 |\n *    | BC 2 |   2 |  -1 |\n *\n *    Also `yy` always returns the last two digits of a year,\n *    while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n *    | Year | `yy` | `uu` |\n *    |------|------|------|\n *    | 1    |   01 |   01 |\n *    | 14   |   14 |   14 |\n *    | 376  |   76 |  376 |\n *    | 1453 |   53 | 1453 |\n *\n *    The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n *    except local week-numbering years are dependent on `options.weekStartsOn`\n *    and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear}\n *    and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n *    so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n *    - `i`: ISO day of week\n *    - `I`: ISO week of year\n *    - `R`: ISO week-numbering year\n *    - `t`: seconds timestamp\n *    - `T`: milliseconds timestamp\n *    - `o`: ordinal number modifier\n *    - `P`: long localized date\n *    - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n *    You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n *    You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param {Date|Number} date - the original date\n * @param {String} format - the string of tokens\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is\n * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`;\n *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`;\n *   see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @returns {String} the formatted date string\n * @throws {TypeError} 2 arguments required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.locale` must contain `localize` property\n * @throws {RangeError} `options.locale` must contain `formatLong` property\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7\n * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws {RangeError} format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n *   locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\n\nexport default function format(dirtyDate, dirtyFormatStr, options) {\n  var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;\n\n  requiredArgs(2, arguments);\n  var formatStr = String(dirtyFormatStr);\n  var defaultOptions = getDefaultOptions();\n  var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;\n  var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN\n\n  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {\n    throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');\n  }\n\n  var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  if (!locale.localize) {\n    throw new RangeError('locale must contain localize property');\n  }\n\n  if (!locale.formatLong) {\n    throw new RangeError('locale must contain formatLong property');\n  }\n\n  var originalDate = toDate(dirtyDate);\n\n  if (!isValid(originalDate)) {\n    throw new RangeError('Invalid time value');\n  } // Convert the date in system timezone to the same date in UTC+00:00 timezone.\n  // This ensures that when UTC functions will be implemented, locales will be compatible with them.\n  // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376\n\n\n  var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);\n  var utcDate = subMilliseconds(originalDate, timezoneOffset);\n  var formatterOptions = {\n    firstWeekContainsDate: firstWeekContainsDate,\n    weekStartsOn: weekStartsOn,\n    locale: locale,\n    _originalDate: originalDate\n  };\n  var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {\n    var firstCharacter = substring[0];\n\n    if (firstCharacter === 'p' || firstCharacter === 'P') {\n      var longFormatter = longFormatters[firstCharacter];\n      return longFormatter(substring, locale.formatLong);\n    }\n\n    return substring;\n  }).join('').match(formattingTokensRegExp).map(function (substring) {\n    // Replace two single quote characters with one single quote character\n    if (substring === \"''\") {\n      return \"'\";\n    }\n\n    var firstCharacter = substring[0];\n\n    if (firstCharacter === \"'\") {\n      return cleanEscapedString(substring);\n    }\n\n    var formatter = formatters[firstCharacter];\n\n    if (formatter) {\n      if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {\n        throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n      }\n\n      if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {\n        throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));\n      }\n\n      return formatter(utcDate, substring, locale.localize, formatterOptions);\n    }\n\n    if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n      throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');\n    }\n\n    return substring;\n  }).join('');\n  return result;\n}\n\nfunction cleanEscapedString(input) {\n  var matched = input.match(escapedStringRegExp);\n\n  if (!matched) {\n    return input;\n  }\n\n  return matched[1].replace(doubleQuoteRegExp, \"'\");\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_HOUR = 3600000;\n/**\n * @name addHours\n * @category Hour Helpers\n * @summary Add the specified number of hours to the given date.\n *\n * @description\n * Add the specified number of hours to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of hours to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the hours added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 2 hours to 10 July 2014 23:00:00:\n * const result = addHours(new Date(2014, 6, 10, 23, 0), 2)\n * //=> Fri Jul 11 2014 01:00:00\n */\n\nexport default function addHours(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_HOUR);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var amount = toInteger(dirtyAmount);\n\n  if (isNaN(amount)) {\n    return new Date(NaN);\n  }\n\n  if (!amount) {\n    // If 0 days, no-op to avoid changing times in the hour before end of DST\n    return date;\n  }\n\n  date.setDate(date.getDate() + amount);\n  return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var date = toDate(dirtyDate);\n  var amount = toInteger(dirtyAmount);\n\n  if (isNaN(amount)) {\n    return new Date(NaN);\n  }\n\n  if (!amount) {\n    // If 0 months, no-op to avoid changing times in the hour before end of DST\n    return date;\n  }\n\n  var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n  // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n  // new Date(2020, 13, 1) returns 1 Feb 2021.  This is *almost* the behavior we\n  // want except that dates will wrap around the end of a month, meaning that\n  // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n  // we'll default to the end of the desired month by adding 1 to the desired\n  // month and using a date of 0 to back up one day to the end of the desired\n  // month.\n\n  var endOfDesiredMonth = new Date(date.getTime());\n  endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n  var daysInMonth = endOfDesiredMonth.getDate();\n\n  if (dayOfMonth >= daysInMonth) {\n    // If we're already at the end of the month, then this is the correct date\n    // and we're done.\n    return endOfDesiredMonth;\n  } else {\n    // Otherwise, we now know that setting the original day-of-month value won't\n    // cause an overflow, so set the desired day-of-month. Note that we can't\n    // just set the date of `endOfDesiredMonth` because that object may have had\n    // its time changed in the unusual case where where a DST transition was on\n    // the last day of the month and its local time was in the hour skipped or\n    // repeated next to a DST transition.  So we use `date` instead which is\n    // guaranteed to still have the original time.\n    date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n    return date;\n  }\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of milliseconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n *   new Date(2014, 6, 2, 12, 30, 21, 700),\n *   new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\n\nexport default function differenceInMilliseconds(dateLeft, dateRight) {\n  requiredArgs(2, arguments);\n  return toDate(dateLeft).getTime() - toDate(dateRight).getTime();\n}","var roundingMap = {\n  ceil: Math.ceil,\n  round: Math.round,\n  floor: Math.floor,\n  trunc: function (value) {\n    return value < 0 ? Math.ceil(value) : Math.floor(value);\n  } // Math.trunc is not supported by IE\n\n};\nvar defaultRoundingMethod = 'trunc';\nexport function getRoundingMethod(method) {\n  return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\n\nexport default function startOfDay(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setHours(0, 0, 0, 0);\n  return date;\n}","import getTimezoneOffsetInMilliseconds from \"../_lib/getTimezoneOffsetInMilliseconds/index.js\";\nimport startOfDay from \"../startOfDay/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_DAY = 86400000;\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar days\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n *   new Date(2012, 6, 2, 0, 0),\n *   new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n *   new Date(2011, 6, 3, 0, 1),\n *   new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\n\nexport default function differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) {\n  requiredArgs(2, arguments);\n  var startOfDayLeft = startOfDay(dirtyDateLeft);\n  var startOfDayRight = startOfDay(dirtyDateRight);\n  var timestampLeft = startOfDayLeft.getTime() - getTimezoneOffsetInMilliseconds(startOfDayLeft);\n  var timestampRight = startOfDayRight.getTime() - getTimezoneOffsetInMilliseconds(startOfDayRight); // Round the number of days to the nearest integer\n  // because the number of milliseconds in a day is not constant\n  // (e.g. it's different in the day of the daylight saving time clock shift)\n\n  return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY);\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarDays from \"../differenceInCalendarDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\"; // Like `compareAsc` but uses local time not UTC, which is needed\n// for accurate equality comparisons of UTC timestamps that end up\n// having the same representation in local time, e.g. one hour before\n// DST ends vs. the instant that DST ends.\n\nfunction compareLocalAsc(dateLeft, dateRight) {\n  var diff = dateLeft.getFullYear() - dateRight.getFullYear() || dateLeft.getMonth() - dateRight.getMonth() || dateLeft.getDate() - dateRight.getDate() || dateLeft.getHours() - dateRight.getHours() || dateLeft.getMinutes() - dateRight.getMinutes() || dateLeft.getSeconds() - dateRight.getSeconds() || dateLeft.getMilliseconds() - dateRight.getMilliseconds();\n\n  if (diff < 0) {\n    return -1;\n  } else if (diff > 0) {\n    return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n  } else {\n    return diff;\n  }\n}\n/**\n * @name differenceInDays\n * @category Day Helpers\n * @summary Get the number of full days between the given dates.\n *\n * @description\n * Get the number of full day periods between two dates. Fractional days are\n * truncated towards zero.\n *\n * One \"full day\" is the distance between a local time in one day to the same\n * local time on the next or previous day. A full day can sometimes be less than\n * or more than 24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 24-hour periods, use this instead:\n * `Math.floor(differenceInHours(dateLeft, dateRight)/24)|0`.\n *\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full days according to the local timezone\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInDays(\n *   new Date(2012, 6, 2, 0, 0),\n *   new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 365\n * // How many full days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInDays(\n *   new Date(2011, 6, 3, 0, 1),\n *   new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 0\n * // How many full days are between\n * // 1 March 2020 0:00 and 1 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 92 days, even in\n * // time zones where DST starts and the\n * // period has only 92*24-1 hours.\n * const result = differenceInDays(\n *   new Date(2020, 5, 1),\n *   new Date(2020, 2, 1)\n * )\n//=> 92\n */\n\n\nexport default function differenceInDays(dirtyDateLeft, dirtyDateRight) {\n  requiredArgs(2, arguments);\n  var dateLeft = toDate(dirtyDateLeft);\n  var dateRight = toDate(dirtyDateRight);\n  var sign = compareLocalAsc(dateLeft, dateRight);\n  var difference = Math.abs(differenceInCalendarDays(dateLeft, dateRight));\n  dateLeft.setDate(dateLeft.getDate() - sign * difference); // Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full\n  // If so, result must be decreased by 1 in absolute value\n\n  var isLastDayNotFull = Number(compareLocalAsc(dateLeft, dateRight) === -sign);\n  var result = sign * (difference - isLastDayNotFull); // Prevent negative zero\n\n  return result === 0 ? 0 : result;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n *   new Date(2014, 8, 1),\n *   new Date(2014, 0, 31)\n * )\n * //=> 8\n */\n\nexport default function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {\n  requiredArgs(2, arguments);\n  var dateLeft = toDate(dirtyDateLeft);\n  var dateRight = toDate(dirtyDateRight);\n  var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();\n  var monthDiff = dateLeft.getMonth() - dateRight.getMonth();\n  return yearDiff * 12 + monthDiff;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Number} the result of the comparison\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n *   new Date(1995, 6, 2),\n *   new Date(1987, 1, 11),\n *   new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * //   Wed Feb 11 1987 00:00:00,\n * //   Mon Jul 10 1989 00:00:00,\n * //   Sun Jul 02 1995 00:00:00\n * // ]\n */\n\nexport default function compareAsc(dirtyDateLeft, dirtyDateRight) {\n  requiredArgs(2, arguments);\n  var dateLeft = toDate(dirtyDateLeft);\n  var dateRight = toDate(dirtyDateRight);\n  var diff = dateLeft.getTime() - dateRight.getTime();\n\n  if (diff < 0) {\n    return -1;\n  } else if (diff > 0) {\n    return 1; // Return 0 if diff is 0; return NaN if diff is NaN\n  } else {\n    return diff;\n  }\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a day\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\n\nexport default function endOfDay(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setHours(23, 59, 59, 999);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfMonth(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var month = date.getMonth();\n  date.setFullYear(date.getFullYear(), month + 1, 0);\n  date.setHours(23, 59, 59, 999);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport endOfDay from \"../endOfDay/index.js\";\nimport endOfMonth from \"../endOfMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @param {Date|Number} date - the date to check\n * @returns {Boolean} the date is the last day of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\n\nexport default function isLastDayOfMonth(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  return endOfDay(date).getTime() === endOfMonth(date).getTime();\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarMonths from \"../differenceInCalendarMonths/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport isLastDayOfMonth from \"../isLastDayOfMonth/index.js\";\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full months\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\n\nexport default function differenceInMonths(dirtyDateLeft, dirtyDateRight) {\n  requiredArgs(2, arguments);\n  var dateLeft = toDate(dirtyDateLeft);\n  var dateRight = toDate(dirtyDateRight);\n  var sign = compareAsc(dateLeft, dateRight);\n  var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));\n  var result; // Check for the difference of less than month\n\n  if (difference < 1) {\n    result = 0;\n  } else {\n    if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {\n      // This will check if the date is end of Feb and assign a higher end of month date\n      // to compare it with Jan\n      dateLeft.setDate(30);\n    }\n\n    dateLeft.setMonth(dateLeft.getMonth() - sign * difference); // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n    // If so, result must be decreased by 1 in absolute value\n\n    var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign; // Check for cases of one full calendar month\n\n    if (isLastDayOfMonth(toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {\n      isLastMonthNotFull = false;\n    }\n\n    result = sign * (difference - Number(isLastMonthNotFull));\n  } // Prevent negative zero\n\n\n  return result === 0 ? 0 : result;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInCalendarYears\n * @category Year Helpers\n * @summary Get the number of calendar years between the given dates.\n *\n * @description\n * Get the number of calendar years between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of calendar years\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many calendar years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInCalendarYears(\n *   new Date(2015, 1, 11),\n *   new Date(2013, 11, 31)\n * )\n * //=> 2\n */\n\nexport default function differenceInCalendarYears(dirtyDateLeft, dirtyDateRight) {\n  requiredArgs(2, arguments);\n  var dateLeft = toDate(dirtyDateLeft);\n  var dateRight = toDate(dirtyDateRight);\n  return dateLeft.getFullYear() - dateRight.getFullYear();\n}","import toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the start of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfWeek(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n  requiredArgs(1, arguments);\n  var defaultOptions = getDefaultOptions();\n  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  var date = toDate(dirtyDate);\n  var day = date.getDay();\n  var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n  date.setDate(date.getDate() - diff);\n  date.setHours(0, 0, 0, 0);\n  return date;\n}","/*!\n * chartjs-adapter-date-fns v2.0.0\n * https://www.chartjs.org\n * (c) 2021 chartjs-adapter-date-fns Contributors\n * Released under the MIT license\n */\nimport { _adapters } from 'chart.js';\nimport { toDate, parse, parseISO, isValid, format, addYears, addQuarters, addMonths, addWeeks, addDays, addHours, addMinutes, addSeconds, addMilliseconds, differenceInYears, differenceInQuarters, differenceInMonths, differenceInWeeks, differenceInDays, differenceInHours, differenceInMinutes, differenceInSeconds, differenceInMilliseconds, startOfYear, startOfQuarter, startOfMonth, startOfWeek, startOfDay, startOfHour, startOfMinute, startOfSecond, endOfYear, endOfQuarter, endOfMonth, endOfWeek, endOfDay, endOfHour, endOfMinute, endOfSecond } from 'date-fns';\nconst FORMATS = {\n  datetime: 'MMM d, yyyy, h:mm:ss aaaa',\n  millisecond: 'h:mm:ss.SSS aaaa',\n  second: 'h:mm:ss aaaa',\n  minute: 'h:mm aaaa',\n  hour: 'ha',\n  day: 'MMM d',\n  week: 'PP',\n  month: 'MMM yyyy',\n  quarter: 'qqq - yyyy',\n  year: 'yyyy'\n};\n\n_adapters._date.override({\n  _id: 'date-fns',\n  // DEBUG\n  formats: function () {\n    return FORMATS;\n  },\n  parse: function (value, fmt) {\n    if (value === null || typeof value === 'undefined') {\n      return null;\n    }\n\n    const type = typeof value;\n\n    if (type === 'number' || value instanceof Date) {\n      value = toDate(value);\n    } else if (type === 'string') {\n      if (typeof fmt === 'string') {\n        value = parse(value, fmt, new Date(), this.options);\n      } else {\n        value = parseISO(value, this.options);\n      }\n    }\n\n    return isValid(value) ? value.getTime() : null;\n  },\n  format: function (time, fmt) {\n    return format(time, fmt, this.options);\n  },\n  add: function (time, amount, unit) {\n    switch (unit) {\n      case 'millisecond':\n        return addMilliseconds(time, amount);\n\n      case 'second':\n        return addSeconds(time, amount);\n\n      case 'minute':\n        return addMinutes(time, amount);\n\n      case 'hour':\n        return addHours(time, amount);\n\n      case 'day':\n        return addDays(time, amount);\n\n      case 'week':\n        return addWeeks(time, amount);\n\n      case 'month':\n        return addMonths(time, amount);\n\n      case 'quarter':\n        return addQuarters(time, amount);\n\n      case 'year':\n        return addYears(time, amount);\n\n      default:\n        return time;\n    }\n  },\n  diff: function (max, min, unit) {\n    switch (unit) {\n      case 'millisecond':\n        return differenceInMilliseconds(max, min);\n\n      case 'second':\n        return differenceInSeconds(max, min);\n\n      case 'minute':\n        return differenceInMinutes(max, min);\n\n      case 'hour':\n        return differenceInHours(max, min);\n\n      case 'day':\n        return differenceInDays(max, min);\n\n      case 'week':\n        return differenceInWeeks(max, min);\n\n      case 'month':\n        return differenceInMonths(max, min);\n\n      case 'quarter':\n        return differenceInQuarters(max, min);\n\n      case 'year':\n        return differenceInYears(max, min);\n\n      default:\n        return 0;\n    }\n  },\n  startOf: function (time, unit, weekday) {\n    switch (unit) {\n      case 'second':\n        return startOfSecond(time);\n\n      case 'minute':\n        return startOfMinute(time);\n\n      case 'hour':\n        return startOfHour(time);\n\n      case 'day':\n        return startOfDay(time);\n\n      case 'week':\n        return startOfWeek(time);\n\n      case 'isoWeek':\n        return startOfWeek(time, {\n          weekStartsOn: +weekday\n        });\n\n      case 'month':\n        return startOfMonth(time);\n\n      case 'quarter':\n        return startOfQuarter(time);\n\n      case 'year':\n        return startOfYear(time);\n\n      default:\n        return time;\n    }\n  },\n  endOf: function (time, unit) {\n    switch (unit) {\n      case 'second':\n        return endOfSecond(time);\n\n      case 'minute':\n        return endOfMinute(time);\n\n      case 'hour':\n        return endOfHour(time);\n\n      case 'day':\n        return endOfDay(time);\n\n      case 'week':\n        return endOfWeek(time);\n\n      case 'month':\n        return endOfMonth(time);\n\n      case 'quarter':\n        return endOfQuarter(time);\n\n      case 'year':\n        return endOfYear(time);\n\n      default:\n        return time;\n    }\n  }\n});","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addSeconds\n * @category Second Helpers\n * @summary Add the specified number of seconds to the given date.\n *\n * @description\n * Add the specified number of seconds to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of seconds to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the seconds added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 30 seconds to 10 July 2014 12:45:00:\n * const result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)\n * //=> Thu Jul 10 2014 12:45:30\n */\n\nexport default function addSeconds(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addMilliseconds(dirtyDate, amount * 1000);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMilliseconds from \"../addMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nvar MILLISECONDS_IN_MINUTE = 60000;\n/**\n * @name addMinutes\n * @category Minute Helpers\n * @summary Add the specified number of minutes to the given date.\n *\n * @description\n * Add the specified number of minutes to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of minutes to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the minutes added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 30 minutes to 10 July 2014 12:00:00:\n * const result = addMinutes(new Date(2014, 6, 10, 12, 0), 30)\n * //=> Thu Jul 10 2014 12:30:00\n */\n\nexport default function addMinutes(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addMilliseconds(dirtyDate, amount * MILLISECONDS_IN_MINUTE);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addDays from \"../addDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addWeeks\n * @category Week Helpers\n * @summary Add the specified number of weeks to the given date.\n *\n * @description\n * Add the specified number of week to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of weeks to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the weeks added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 4 weeks to 1 September 2014:\n * const result = addWeeks(new Date(2014, 8, 1), 4)\n * //=> Mon Sep 29 2014 00:00:00\n */\n\nexport default function addWeeks(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  var days = amount * 7;\n  return addDays(dirtyDate, days);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addQuarters\n * @category Quarter Helpers\n * @summary Add the specified number of year quarters to the given date.\n *\n * @description\n * Add the specified number of year quarters to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of quarters to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the quarters added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 1 quarter to 1 September 2014:\n * const result = addQuarters(new Date(2014, 8, 1), 1)\n * //=> Mon Dec 01 2014 00:00:00\n */\n\nexport default function addQuarters(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  var months = amount * 3;\n  return addMonths(dirtyDate, months);\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\n\nexport default function addYears(dirtyDate, dirtyAmount) {\n  requiredArgs(2, arguments);\n  var amount = toInteger(dirtyAmount);\n  return addMonths(dirtyDate, amount * 12);\n}","import differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of seconds\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n *   new Date(2014, 6, 2, 12, 30, 20, 0),\n *   new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\n\nexport default function differenceInSeconds(dateLeft, dateRight, options) {\n  requiredArgs(2, arguments);\n  var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n  return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import { millisecondsInMinute } from \"../constants/index.js\";\nimport differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInMinutes\n * @category Minute Helpers\n * @summary Get the number of minutes between the given dates.\n *\n * @description\n * Get the signed number of full (rounded towards 0) minutes between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of minutes\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?\n * const result = differenceInMinutes(\n *   new Date(2014, 6, 2, 12, 20, 0),\n *   new Date(2014, 6, 2, 12, 7, 59)\n * )\n * //=> 12\n *\n * @example\n * // How many minutes are between 10:01:59 and 10:00:00\n * const result = differenceInMinutes(\n *   new Date(2000, 0, 1, 10, 0, 0),\n *   new Date(2000, 0, 1, 10, 1, 59)\n * )\n * //=> -1\n */\n\nexport default function differenceInMinutes(dateLeft, dateRight, options) {\n  requiredArgs(2, arguments);\n  var diff = differenceInMilliseconds(dateLeft, dateRight) / millisecondsInMinute;\n  return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import { millisecondsInHour } from \"../constants/index.js\";\nimport differenceInMilliseconds from \"../differenceInMilliseconds/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInHours\n * @category Hour Helpers\n * @summary Get the number of hours between the given dates.\n *\n * @description\n * Get the number of hours between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of hours\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many hours are between 2 July 2014 06:50:00 and 2 July 2014 19:00:00?\n * const result = differenceInHours(\n *   new Date(2014, 6, 2, 19, 0),\n *   new Date(2014, 6, 2, 6, 50)\n * )\n * //=> 12\n */\n\nexport default function differenceInHours(dateLeft, dateRight, options) {\n  requiredArgs(2, arguments);\n  var diff = differenceInMilliseconds(dateLeft, dateRight) / millisecondsInHour;\n  return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import differenceInDays from \"../differenceInDays/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInWeeks\n * @category Week Helpers\n * @summary Get the number of full weeks between the given dates.\n *\n * @description\n * Get the number of full weeks between two dates. Fractional weeks are\n * truncated towards zero by default.\n *\n * One \"full week\" is the distance between a local time in one day to the same\n * local time 7 days earlier or later. A full week can sometimes be less than\n * or more than 7*24 hours if a daylight savings change happens between two dates.\n *\n * To ignore DST and only measure exact 7*24-hour periods, use this instead:\n * `Math.floor(differenceInHours(dateLeft, dateRight)/(7*24))|0`.\n *\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of full weeks\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full weeks are between 5 July 2014 and 20 July 2014?\n * const result = differenceInWeeks(new Date(2014, 6, 20), new Date(2014, 6, 5))\n * //=> 2\n *\n * // How many full weeks are between\n * // 1 March 2020 0:00 and 6 June 2020 0:00 ?\n * // Note: because local time is used, the\n * // result will always be 8 weeks (54 days),\n * // even if DST starts and the period has\n * // only 54*24-1 hours.\n * const result = differenceInWeeks(\n *   new Date(2020, 5, 1),\n *   new Date(2020, 2, 6)\n * )\n * //=> 8\n */\n\nexport default function differenceInWeeks(dateLeft, dateRight, options) {\n  requiredArgs(2, arguments);\n  var diff = differenceInDays(dateLeft, dateRight) / 7;\n  return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import differenceInMonths from \"../differenceInMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\nimport { getRoundingMethod } from \"../_lib/roundingMethods/index.js\";\n/**\n * @name differenceInQuarters\n * @category Quarter Helpers\n * @summary Get the number of quarters between the given dates.\n *\n * @description\n * Get the number of quarters between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @param {Object} [options] - an object with options.\n * @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)\n * @returns {Number} the number of full quarters\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full quarters are between 31 December 2013 and 2 July 2014?\n * const result = differenceInQuarters(new Date(2014, 6, 2), new Date(2013, 11, 31))\n * //=> 2\n */\n\nexport default function differenceInQuarters(dateLeft, dateRight, options) {\n  requiredArgs(2, arguments);\n  var diff = differenceInMonths(dateLeft, dateRight) / 3;\n  return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);\n}","import toDate from \"../toDate/index.js\";\nimport differenceInCalendarYears from \"../differenceInCalendarYears/index.js\";\nimport compareAsc from \"../compareAsc/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name differenceInYears\n * @category Year Helpers\n * @summary Get the number of full years between the given dates.\n *\n * @description\n * Get the number of full years between the given dates.\n *\n * @param {Date|Number} dateLeft - the later date\n * @param {Date|Number} dateRight - the earlier date\n * @returns {Number} the number of full years\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // How many full years are between 31 December 2013 and 11 February 2015?\n * const result = differenceInYears(new Date(2015, 1, 11), new Date(2013, 11, 31))\n * //=> 1\n */\n\nexport default function differenceInYears(dirtyDateLeft, dirtyDateRight) {\n  requiredArgs(2, arguments);\n  var dateLeft = toDate(dirtyDateLeft);\n  var dateRight = toDate(dirtyDateRight);\n  var sign = compareAsc(dateLeft, dateRight);\n  var difference = Math.abs(differenceInCalendarYears(dateLeft, dateRight)); // Set both dates to a valid leap year for accurate comparison when dealing\n  // with leap days\n\n  dateLeft.setFullYear(1584);\n  dateRight.setFullYear(1584); // Math.abs(diff in full years - diff in calendar years) === 1 if last calendar year is not full\n  // If so, result must be decreased by 1 in absolute value\n\n  var isLastYearNotFull = compareAsc(dateLeft, dateRight) === -sign;\n  var result = sign * (difference - Number(isLastYearNotFull)); // Prevent negative zero\n\n  return result === 0 ? 0 : result;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfSecond\n * @category Second Helpers\n * @summary Return the start of a second for the given date.\n *\n * @description\n * Return the start of a second for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a second\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a second for 1 December 2014 22:15:45.400:\n * const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:45.000\n */\n\nexport default function startOfSecond(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setMilliseconds(0);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMinute\n * @category Minute Helpers\n * @summary Return the start of a minute for the given date.\n *\n * @description\n * Return the start of a minute for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a minute\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a minute for 1 December 2014 22:15:45.400:\n * const result = startOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:00\n */\n\nexport default function startOfMinute(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setSeconds(0, 0);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfHour\n * @category Hour Helpers\n * @summary Return the start of an hour for the given date.\n *\n * @description\n * Return the start of an hour for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of an hour\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of an hour for 2 September 2014 11:55:00:\n * const result = startOfHour(new Date(2014, 8, 2, 11, 55))\n * //=> Tue Sep 02 2014 11:00:00\n */\n\nexport default function startOfHour(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setMinutes(0, 0, 0);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfMonth(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setDate(1);\n  date.setHours(0, 0, 0, 0);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfQuarter\n * @category Quarter Helpers\n * @summary Return the start of a year quarter for the given date.\n *\n * @description\n * Return the start of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a quarter\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a quarter for 2 September 2014 11:55:00:\n * const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Jul 01 2014 00:00:00\n */\n\nexport default function startOfQuarter(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var currentMonth = date.getMonth();\n  var month = currentMonth - currentMonth % 3;\n  date.setMonth(month, 1);\n  date.setHours(0, 0, 0, 0);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\n\nexport default function startOfYear(dirtyDate) {\n  requiredArgs(1, arguments);\n  var cleanDate = toDate(dirtyDate);\n  var date = new Date(0);\n  date.setFullYear(cleanDate.getFullYear(), 0, 1);\n  date.setHours(0, 0, 0, 0);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfSecond\n * @category Second Helpers\n * @summary Return the end of a second for the given date.\n *\n * @description\n * Return the end of a second for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a second\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a second for 1 December 2014 22:15:45.400:\n * const result = endOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:45.999\n */\n\nexport default function endOfSecond(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setMilliseconds(999);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMinute\n * @category Minute Helpers\n * @summary Return the end of a minute for the given date.\n *\n * @description\n * Return the end of a minute for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a minute\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a minute for 1 December 2014 22:15:45.400:\n * const result = endOfMinute(new Date(2014, 11, 1, 22, 15, 45, 400))\n * //=> Mon Dec 01 2014 22:15:59.999\n */\n\nexport default function endOfMinute(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setSeconds(59, 999);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfHour\n * @category Hour Helpers\n * @summary Return the end of an hour for the given date.\n *\n * @description\n * Return the end of an hour for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of an hour\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of an hour for 2 September 2014 11:55:00:\n * const result = endOfHour(new Date(2014, 8, 2, 11, 55))\n * //=> Tue Sep 02 2014 11:59:59.999\n */\n\nexport default function endOfHour(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  date.setMinutes(59, 59, 999);\n  return date;\n}","import { getDefaultOptions } from \"../_lib/defaultOptions/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfWeek\n * @category Week Helpers\n * @summary Return the end of a week for the given date.\n *\n * @description\n * Return the end of a week for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}\n * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)\n * @returns {Date} the end of a week\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6\n *\n * @example\n * // The end of a week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sat Sep 06 2014 23:59:59.999\n *\n * @example\n * // If the week starts on Monday, the end of the week for 2 September 2014 11:55:00:\n * const result = endOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Sun Sep 07 2014 23:59:59.999\n */\n\nexport default function endOfWeek(dirtyDate, options) {\n  var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;\n\n  requiredArgs(1, arguments);\n  var defaultOptions = getDefaultOptions();\n  var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n    throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n  }\n\n  var date = toDate(dirtyDate);\n  var day = date.getDay();\n  var diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);\n  date.setDate(date.getDate() + diff);\n  date.setHours(23, 59, 59, 999);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfQuarter\n * @category Quarter Helpers\n * @summary Return the end of a year quarter for the given date.\n *\n * @description\n * Return the end of a year quarter for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a quarter\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a quarter for 2 September 2014 11:55:00:\n * const result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfQuarter(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var currentMonth = date.getMonth();\n  var month = currentMonth - currentMonth % 3 + 3;\n  date.setMonth(month, 0);\n  date.setHours(23, 59, 59, 999);\n  return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfYear\n * @category Year Helpers\n * @summary Return the end of a year for the given date.\n *\n * @description\n * Return the end of a year for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a year for 2 September 2014 11:55:00:\n * const result = endOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Dec 31 2014 23:59:59.999\n */\n\nexport default function endOfYear(dirtyDate) {\n  requiredArgs(1, arguments);\n  var date = toDate(dirtyDate);\n  var year = date.getFullYear();\n  date.setFullYear(year + 1, 0, 0);\n  date.setHours(23, 59, 59, 999);\n  return date;\n}","import Chartkick from \"chartkick\";\nimport Chart from \"chart.js/auto\";\nimport \"chartjs-adapter-date-fns\";\nChartkick.use(Chart);","// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n\nimport Rails from \"@rails/ujs\"\nimport Turbolinks from \"turbolinks\"\nimport * as ActiveStorage from \"@rails/activestorage\"\nimport \"channels\"\nimport \"../controllers\"\nimport \"@hotwired/turbo-rails\"\nimport \"chartkick/chart.js\"\n\nRails.start()\nTurbolinks.start()\nActiveStorage.start()\n\n"],"sourceRoot":""}