@internetarchive/histogram-date-range 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +29 -29
- package/.eslintrc.js +14 -14
- package/.github/workflows/ci.yml +30 -26
- package/LICENSE +661 -661
- package/README.md +113 -113
- package/demo/index.css +22 -22
- package/demo/index.html +159 -159
- package/dist/demo/app-root.d.ts +19 -0
- package/dist/demo/app-root.js +58 -0
- package/dist/demo/app-root.js.map +1 -0
- package/dist/demo/js/app-root.d.ts +19 -19
- package/dist/demo/js/app-root.js +46 -46
- package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.d.ts +1 -0
- package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.js +2 -0
- package/dist/docs/_snowpack/pkg/@internetarchive/ia-activity-indicator/ia-activity-indicator.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/histogram-date-range.d.ts +159 -159
- package/dist/src/histogram-date-range.js +846 -853
- package/dist/src/histogram-date-range.js.map +1 -1
- package/dist/test/histogram-date-range.test.d.ts +1 -1
- package/dist/test/histogram-date-range.test.js +488 -488
- package/dist/test/histogram-date-range.test.js.map +1 -1
- package/docs/_snowpack/pkg/@internetarchive/{ia-activity-indicator/ia-activity-indicator.js → ia-activity-indicator.js} +193 -168
- package/docs/_snowpack/pkg/common/lit-element-4616b61d.js +22 -0
- package/docs/_snowpack/pkg/common/lit-html-a4f3a51c.js +8 -0
- package/docs/_snowpack/pkg/common/query-assigned-elements-61aefe32.js +21 -0
- package/docs/_snowpack/pkg/dayjs/esm/plugin/customParseFormat.js +355 -0
- package/docs/_snowpack/pkg/dayjs/esm.js +631 -0
- package/docs/_snowpack/pkg/import-map.json +3 -1
- package/docs/_snowpack/pkg/lit/decorators.js +4 -21
- package/docs/_snowpack/pkg/lit/directives/live.js +3 -3
- package/docs/_snowpack/pkg/lit.js +2 -2
- package/docs/demo/index.css +22 -22
- package/docs/demo/index.html +159 -159
- package/docs/dist/src/histogram-date-range.js +5 -5
- package/index.ts +1 -1
- package/package.json +85 -84
- package/snowpack.config.js +10 -10
- package/src/histogram-date-range.ts +914 -922
- package/test/histogram-date-range.test.ts +684 -684
- package/tsconfig.json +21 -21
- package/web-dev-server.config.mjs +28 -28
- package/web-test-runner.config.mjs +29 -29
- package/docs/_snowpack/pkg/common/lit-element-2ebaea62.js +0 -22
- package/docs/_snowpack/pkg/common/lit-html-ab4365d1.js +0 -8
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { D, T } from './lit-html-a4f3a51c.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright 2019 Google LLC
|
|
6
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
+
*/
|
|
8
|
+
const t=window,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,n){if(this._$cssResult$=!0,n!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=n.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(s,t));}return t}toString(){return this.cssText}}const r=t=>new o("string"==typeof t?t:t+"",void 0,s),i=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,s,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[n+1]),t[0]);return new o(n,t,s)},S=(s,n)=>{e?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement("style"),o=t.litNonce;void 0!==o&&n.setAttribute("nonce",o),n.textContent=e.cssText,s.appendChild(n);}));},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @license
|
|
12
|
+
* Copyright 2017 Google LLC
|
|
13
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
|
+
*/var s$1;const e$1=window,r$1=e$1.trustedTypes,h=r$1?r$1.emptyScript:"",o$1=e$1.reactiveElementPolyfillSupport,n$1={toAttribute(t,i){switch(i){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t);}catch(t){s=null;}}return s}},a=(t,i)=>i!==t&&(i==i||t==t),l={attribute:!0,type:String,converter:n$1,reflect:!1,hasChanged:a},d="finalized";class u extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu();}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t);}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e));})),t}static createProperty(t,i=l){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s="symbol"==typeof t?Symbol():"__"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e);}}static getPropertyDescriptor(t,i,s){return {get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l}static finalize(){if(this.hasOwnProperty(d))return !1;this[d]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s]);}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(c(i));}else void 0!==i&&s.push(c(i));return s}static _$Ep(t,i){const s=i.attribute;return !1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)));}addController(t){var i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t));}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1);}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i]);}));}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return S(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}));}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}));}attributeChangedCallback(t,i,s){this._$AK(t,s);}_$EO(t,i,s=l){var e;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const h=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:n$1).toAttribute(i,s.type);this._$El=t,null==h?this.removeAttribute(r):this.setAttribute(r,h),this._$El=null;}}_$AK(t,i){var s;const e=this.constructor,r=e._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=e.getPropertyOptions(r),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:n$1;this._$El=r,this[r]=h.fromAttribute(i,t.type),this._$El=null;}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||a)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$E_=this._$Ej());}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek();}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s);}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return !0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek();}updated(t){}firstUpdated(t){}}u[d]=!0,u.elementProperties=new Map,u.elementStyles=[],u.shadowRootOptions={mode:"open"},null==o$1||o$1({ReactiveElement:u}),(null!==(s$1=e$1.reactiveElementVersions)&&void 0!==s$1?s$1:e$1.reactiveElementVersions=[]).push("1.6.3");
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @license
|
|
18
|
+
* Copyright 2017 Google LLC
|
|
19
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
|
+
*/var l$1,o$2;class s$2 extends u{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=D(i,this.renderRoot,this.renderOptions);}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0);}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1);}render(){return T}}s$2.finalized=!0,s$2._$litElement$=!0,null===(l$1=globalThis.litElementHydrateSupport)||void 0===l$1||l$1.call(globalThis,{LitElement:s$2});const n$2=globalThis.litElementPolyfillSupport;null==n$2||n$2({LitElement:s$2});(null!==(o$2=globalThis.litElementVersions)&&void 0!==o$2?o$2:globalThis.litElementVersions=[]).push("3.3.3");
|
|
21
|
+
|
|
22
|
+
export { i, s$2 as s };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
var t;const i=window,s=i.trustedTypes,e=s?s.createPolicy("lit-html",{createHTML:t=>t}):void 0,o="$lit$",n=`lit$${(Math.random()+"").slice(9)}$`,l="?"+n,h=`<${l}>`,r=document,u=()=>r.createComment(""),d=t=>null===t||"object"!=typeof t&&"function"!=typeof t,c=Array.isArray,v=t=>c(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),a="[ \t\n\f\r]",f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,$=/"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),b=w(2),T=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1);function P(t,i){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==e?e.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,e=[];let l,r=2===i?"<svg>":"",u=f;for(let i=0;i<s;i++){const s=t[i];let d,c,v=-1,a=0;for(;a<s.length&&(u.lastIndex=a,c=u.exec(s),null!==c);)a=u.lastIndex,u===f?"!--"===c[1]?u=_:void 0!==c[1]?u=m:void 0!==c[2]?(y.test(c[2])&&(l=RegExp("</"+c[2],"g")),u=p):void 0!==c[3]&&(u=p):u===p?">"===c[0]?(u=null!=l?l:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,d=c[1],u=void 0===c[3]?p:'"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,l=void 0);const w=u===p&&t[i+1].startsWith("/>")?" ":"";r+=u===f?s+h:v>=0?(e.push(d),s.slice(0,v)+o+s.slice(v)+n+w):s+n+(-2===v?(e.push(void 0),i):w);}return [P(t,r+(t[s]||"<?>")+(2===i?"</svg>":"")),e]};class N{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,d=0;const c=t.length-1,v=this.parts,[a,f]=V(t,i);if(this.el=N.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes);}for(;null!==(h=C.nextNode())&&v.length<c;){if(1===h.nodeType){if(h.hasAttributes()){const t=[];for(const i of h.getAttributeNames())if(i.endsWith(o)||i.startsWith(n)){const s=f[d++];if(t.push(i),void 0!==s){const t=h.getAttribute(s.toLowerCase()+o).split(n),i=/([.?@])?(.*)/.exec(s);v.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?H:"?"===i[1]?L:"@"===i[1]?z:k});}else v.push({type:6,index:r});}for(const i of t)h.removeAttribute(i);}if(y.test(h.tagName)){const t=h.textContent.split(n),i=t.length-1;if(i>0){h.textContent=s?s.emptyScript:"";for(let s=0;s<i;s++)h.append(t[s],u()),C.nextNode(),v.push({type:2,index:++r});h.append(t[i],u());}}}else if(8===h.nodeType)if(h.data===l)v.push({type:2,index:r});else {let t=-1;for(;-1!==(t=h.data.indexOf(n,t+1));)v.push({type:7,index:r}),t+=n.length-1;}r++;}}static createElement(t,i){const s=r.createElement("template");return s.innerHTML=t,s}}function S(t,i,s=t,e){var o,n,l,h;if(i===T)return i;let r=void 0!==e?null===(o=s._$Co)||void 0===o?void 0:o[e]:s._$Cl;const u=d(i)?void 0:i._$litDirective$;return (null==r?void 0:r.constructor)!==u&&(null===(n=null==r?void 0:r._$AO)||void 0===n||n.call(r,!1),void 0===u?r=void 0:(r=new u(t),r._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Co)&&void 0!==l?l:h._$Co=[])[e]=r:s._$Cl=r),void 0!==r&&(i=S(t,r._$AS(t,i.values),r,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:r).importNode(s,!0);C.currentNode=o;let n=C.nextNode(),l=0,h=0,u=e[0];for(;void 0!==u;){if(l===u.index){let i;2===u.type?i=new R(n,n.nextSibling,this,t):1===u.type?i=new u.ctor(n,u.name,u.strings,this,t):6===u.type&&(i=new Z(n,this,t)),this._$AV.push(i),u=e[++h];}l!==(null==u?void 0:u.index)&&(n=C.nextNode(),l++);}return C.currentNode=r,o}v(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}}class R{constructor(t,i,s,e){var o;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=null===(o=null==e?void 0:e.isConnected)||void 0===o||o;}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),d(t)?t===A||null==t||""===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):v(t)?this.T(t):this._(t);}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t));}_(t){this._$AH!==A&&d(this._$AH)?this._$AA.nextSibling.data=t:this.$(r.createTextNode(t)),this._$AH=t;}g(t){var i;const{values:s,_$litType$:e}=t,o="number"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=N.createElement(P(e.h,e.h[0]),this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.v(s);else {const t=new M(o,this),i=t.u(this.options);t.v(s),this.$(i),this._$AH=t;}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new N(t)),i}T(t){c(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new R(this.k(u()),this.k(u()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t));}}class k{constructor(t,i,s,e,o){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A;}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=S(this,t,i,0),n=!d(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else {const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=S(this,e[s+l],i,l),h===T&&(h=this._$AH[l]),n||(n=!d(h)||h!==this._$AH[l]),h===A?t=A:t!==A&&(t+=(null!=h?h:"")+o[l+1]),this._$AH[l]=h;}n&&!e&&this.j(t);}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"");}}class H extends k{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===A?void 0:t;}}const I=s?s.emptyScript:"";class L extends k{constructor(){super(...arguments),this.type=4;}j(t){t&&t!==A?this.element.setAttribute(this.name,I):this.element.removeAttribute(this.name);}}class z extends k{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5;}_$AI(t,i=this){var s;if((t=null!==(s=S(this,t,i,0))&&void 0!==s?s:A)===T)return;const e=this._$AH,o=t===A&&e!==A||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==A&&(e===A||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){var i,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t);}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t);}}const B=i.litHtmlPolyfillSupport;null==B||B(N,R),(null!==(t=i.litHtmlVersions)&&void 0!==t?t:i.litHtmlVersions=[]).push("2.8.0");const D=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new R(i.insertBefore(u(),t),t,void 0,null!=s?s:{});}return l._$AI(t),l};
|
|
7
|
+
|
|
8
|
+
export { A, D, T, b, x };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const e=e=>n=>"function"==typeof n?((e,n)=>(customElements.define(e,n),n))(e,n):((e,n)=>{const{kind:t,elements:s}=n;return {kind:t,elements:s,finisher(n){customElements.define(e,n);}}})(e,n);
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright 2017 Google LLC
|
|
11
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
+
*/
|
|
13
|
+
const i=(i,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,i);}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this));},finisher(n){n.createProperty(e.key,i);}},e$1=(i,e,n)=>{e.constructor.createProperty(n,i);};function n(n){return (t,o)=>void 0!==o?e$1(n,t,o):i(n,t)}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2021 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/var n$1;const e$2=null!=(null===(n$1=window.HTMLSlotElement)||void 0===n$1?void 0:n$1.prototype.assignedElements)?(o,n)=>o.assignedElements(n):(o,n)=>o.assignedNodes(n).filter((o=>o.nodeType===Node.ELEMENT_NODE));
|
|
20
|
+
|
|
21
|
+
export { e, n };
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
// eslint-disable-next-line import/prefer-default-export
|
|
2
|
+
var t = function t(format) {
|
|
3
|
+
return format.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function (_, a, b) {
|
|
4
|
+
return a || b.slice(1);
|
|
5
|
+
});
|
|
6
|
+
};
|
|
7
|
+
var englishFormats = {
|
|
8
|
+
LTS: 'h:mm:ss A',
|
|
9
|
+
LT: 'h:mm A',
|
|
10
|
+
L: 'MM/DD/YYYY',
|
|
11
|
+
LL: 'MMMM D, YYYY',
|
|
12
|
+
LLL: 'MMMM D, YYYY h:mm A',
|
|
13
|
+
LLLL: 'dddd, MMMM D, YYYY h:mm A'
|
|
14
|
+
};
|
|
15
|
+
var u = function u(formatStr, formats) {
|
|
16
|
+
return formatStr.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function (_, a, b) {
|
|
17
|
+
var B = b && b.toUpperCase();
|
|
18
|
+
return a || formats[b] || englishFormats[b] || t(formats[B]);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var formattingTokens = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g;
|
|
23
|
+
var match1 = /\d/; // 0 - 9
|
|
24
|
+
|
|
25
|
+
var match2 = /\d\d/; // 00 - 99
|
|
26
|
+
|
|
27
|
+
var match3 = /\d{3}/; // 000 - 999
|
|
28
|
+
|
|
29
|
+
var match4 = /\d{4}/; // 0000 - 9999
|
|
30
|
+
|
|
31
|
+
var match1to2 = /\d\d?/; // 0 - 99
|
|
32
|
+
|
|
33
|
+
var matchSigned = /[+-]?\d+/; // -inf - inf
|
|
34
|
+
|
|
35
|
+
var matchOffset = /[+-]\d\d:?(\d\d)?|Z/; // +00:00 -00:00 +0000 or -0000 +00 or Z
|
|
36
|
+
|
|
37
|
+
var matchWord = /\d*[^-_:/,()\s\d]+/; // Word
|
|
38
|
+
|
|
39
|
+
var locale = {};
|
|
40
|
+
|
|
41
|
+
var parseTwoDigitYear = function parseTwoDigitYear(input) {
|
|
42
|
+
input = +input;
|
|
43
|
+
return input + (input > 68 ? 1900 : 2000);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
function offsetFromString(string) {
|
|
47
|
+
if (!string) return 0;
|
|
48
|
+
if (string === 'Z') return 0;
|
|
49
|
+
var parts = string.match(/([+-]|\d\d)/g);
|
|
50
|
+
var minutes = +(parts[1] * 60) + (+parts[2] || 0);
|
|
51
|
+
return minutes === 0 ? 0 : parts[0] === '+' ? -minutes : minutes; // eslint-disable-line no-nested-ternary
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var addInput = function addInput(property) {
|
|
55
|
+
return function (input) {
|
|
56
|
+
this[property] = +input;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
var zoneExpressions = [matchOffset, function (input) {
|
|
61
|
+
var zone = this.zone || (this.zone = {});
|
|
62
|
+
zone.offset = offsetFromString(input);
|
|
63
|
+
}];
|
|
64
|
+
|
|
65
|
+
var getLocalePart = function getLocalePart(name) {
|
|
66
|
+
var part = locale[name];
|
|
67
|
+
return part && (part.indexOf ? part : part.s.concat(part.f));
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
var meridiemMatch = function meridiemMatch(input, isLowerCase) {
|
|
71
|
+
var isAfternoon;
|
|
72
|
+
var _locale = locale,
|
|
73
|
+
meridiem = _locale.meridiem;
|
|
74
|
+
|
|
75
|
+
if (!meridiem) {
|
|
76
|
+
isAfternoon = input === (isLowerCase ? 'pm' : 'PM');
|
|
77
|
+
} else {
|
|
78
|
+
for (var i = 1; i <= 24; i += 1) {
|
|
79
|
+
// todo: fix input === meridiem(i, 0, isLowerCase)
|
|
80
|
+
if (input.indexOf(meridiem(i, 0, isLowerCase)) > -1) {
|
|
81
|
+
isAfternoon = i > 12;
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return isAfternoon;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
var expressions = {
|
|
91
|
+
A: [matchWord, function (input) {
|
|
92
|
+
this.afternoon = meridiemMatch(input, false);
|
|
93
|
+
}],
|
|
94
|
+
a: [matchWord, function (input) {
|
|
95
|
+
this.afternoon = meridiemMatch(input, true);
|
|
96
|
+
}],
|
|
97
|
+
Q: [match1, function (input) {
|
|
98
|
+
this.month = (input - 1) * 3 + 1;
|
|
99
|
+
}],
|
|
100
|
+
S: [match1, function (input) {
|
|
101
|
+
this.milliseconds = +input * 100;
|
|
102
|
+
}],
|
|
103
|
+
SS: [match2, function (input) {
|
|
104
|
+
this.milliseconds = +input * 10;
|
|
105
|
+
}],
|
|
106
|
+
SSS: [match3, function (input) {
|
|
107
|
+
this.milliseconds = +input;
|
|
108
|
+
}],
|
|
109
|
+
s: [match1to2, addInput('seconds')],
|
|
110
|
+
ss: [match1to2, addInput('seconds')],
|
|
111
|
+
m: [match1to2, addInput('minutes')],
|
|
112
|
+
mm: [match1to2, addInput('minutes')],
|
|
113
|
+
H: [match1to2, addInput('hours')],
|
|
114
|
+
h: [match1to2, addInput('hours')],
|
|
115
|
+
HH: [match1to2, addInput('hours')],
|
|
116
|
+
hh: [match1to2, addInput('hours')],
|
|
117
|
+
D: [match1to2, addInput('day')],
|
|
118
|
+
DD: [match2, addInput('day')],
|
|
119
|
+
Do: [matchWord, function (input) {
|
|
120
|
+
var _locale2 = locale,
|
|
121
|
+
ordinal = _locale2.ordinal;
|
|
122
|
+
|
|
123
|
+
var _input$match = input.match(/\d+/);
|
|
124
|
+
|
|
125
|
+
this.day = _input$match[0];
|
|
126
|
+
if (!ordinal) return;
|
|
127
|
+
|
|
128
|
+
for (var i = 1; i <= 31; i += 1) {
|
|
129
|
+
if (ordinal(i).replace(/\[|\]/g, '') === input) {
|
|
130
|
+
this.day = i;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}],
|
|
134
|
+
w: [match1to2, addInput('week')],
|
|
135
|
+
ww: [match2, addInput('week')],
|
|
136
|
+
M: [match1to2, addInput('month')],
|
|
137
|
+
MM: [match2, addInput('month')],
|
|
138
|
+
MMM: [matchWord, function (input) {
|
|
139
|
+
var months = getLocalePart('months');
|
|
140
|
+
var monthsShort = getLocalePart('monthsShort');
|
|
141
|
+
var matchIndex = (monthsShort || months.map(function (_) {
|
|
142
|
+
return _.slice(0, 3);
|
|
143
|
+
})).indexOf(input) + 1;
|
|
144
|
+
|
|
145
|
+
if (matchIndex < 1) {
|
|
146
|
+
throw new Error();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
this.month = matchIndex % 12 || matchIndex;
|
|
150
|
+
}],
|
|
151
|
+
MMMM: [matchWord, function (input) {
|
|
152
|
+
var months = getLocalePart('months');
|
|
153
|
+
var matchIndex = months.indexOf(input) + 1;
|
|
154
|
+
|
|
155
|
+
if (matchIndex < 1) {
|
|
156
|
+
throw new Error();
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
this.month = matchIndex % 12 || matchIndex;
|
|
160
|
+
}],
|
|
161
|
+
Y: [matchSigned, addInput('year')],
|
|
162
|
+
YY: [match2, function (input) {
|
|
163
|
+
this.year = parseTwoDigitYear(input);
|
|
164
|
+
}],
|
|
165
|
+
YYYY: [match4, addInput('year')],
|
|
166
|
+
Z: zoneExpressions,
|
|
167
|
+
ZZ: zoneExpressions
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
function correctHours(time) {
|
|
171
|
+
var afternoon = time.afternoon;
|
|
172
|
+
|
|
173
|
+
if (afternoon !== undefined) {
|
|
174
|
+
var hours = time.hours;
|
|
175
|
+
|
|
176
|
+
if (afternoon) {
|
|
177
|
+
if (hours < 12) {
|
|
178
|
+
time.hours += 12;
|
|
179
|
+
}
|
|
180
|
+
} else if (hours === 12) {
|
|
181
|
+
time.hours = 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
delete time.afternoon;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function makeParser(format) {
|
|
189
|
+
format = u(format, locale && locale.formats);
|
|
190
|
+
var array = format.match(formattingTokens);
|
|
191
|
+
var length = array.length;
|
|
192
|
+
|
|
193
|
+
for (var i = 0; i < length; i += 1) {
|
|
194
|
+
var token = array[i];
|
|
195
|
+
var parseTo = expressions[token];
|
|
196
|
+
var regex = parseTo && parseTo[0];
|
|
197
|
+
var parser = parseTo && parseTo[1];
|
|
198
|
+
|
|
199
|
+
if (parser) {
|
|
200
|
+
array[i] = {
|
|
201
|
+
regex: regex,
|
|
202
|
+
parser: parser
|
|
203
|
+
};
|
|
204
|
+
} else {
|
|
205
|
+
array[i] = token.replace(/^\[|\]$/g, '');
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return function (input) {
|
|
210
|
+
var time = {};
|
|
211
|
+
|
|
212
|
+
for (var _i = 0, start = 0; _i < length; _i += 1) {
|
|
213
|
+
var _token = array[_i];
|
|
214
|
+
|
|
215
|
+
if (typeof _token === 'string') {
|
|
216
|
+
start += _token.length;
|
|
217
|
+
} else {
|
|
218
|
+
var _regex = _token.regex,
|
|
219
|
+
_parser = _token.parser;
|
|
220
|
+
var part = input.slice(start);
|
|
221
|
+
|
|
222
|
+
var match = _regex.exec(part);
|
|
223
|
+
|
|
224
|
+
var value = match[0];
|
|
225
|
+
|
|
226
|
+
_parser.call(time, value);
|
|
227
|
+
|
|
228
|
+
input = input.replace(value, '');
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
correctHours(time);
|
|
233
|
+
return time;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
var parseFormattedInput = function parseFormattedInput(input, format, utc, dayjs) {
|
|
238
|
+
try {
|
|
239
|
+
if (['x', 'X'].indexOf(format) > -1) return new Date((format === 'X' ? 1000 : 1) * input);
|
|
240
|
+
var parser = makeParser(format);
|
|
241
|
+
|
|
242
|
+
var _parser2 = parser(input),
|
|
243
|
+
year = _parser2.year,
|
|
244
|
+
month = _parser2.month,
|
|
245
|
+
day = _parser2.day,
|
|
246
|
+
hours = _parser2.hours,
|
|
247
|
+
minutes = _parser2.minutes,
|
|
248
|
+
seconds = _parser2.seconds,
|
|
249
|
+
milliseconds = _parser2.milliseconds,
|
|
250
|
+
zone = _parser2.zone,
|
|
251
|
+
week = _parser2.week;
|
|
252
|
+
|
|
253
|
+
var now = new Date();
|
|
254
|
+
var d = day || (!year && !month ? now.getDate() : 1);
|
|
255
|
+
var y = year || now.getFullYear();
|
|
256
|
+
var M = 0;
|
|
257
|
+
|
|
258
|
+
if (!(year && !month)) {
|
|
259
|
+
M = month > 0 ? month - 1 : now.getMonth();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
var h = hours || 0;
|
|
263
|
+
var m = minutes || 0;
|
|
264
|
+
var s = seconds || 0;
|
|
265
|
+
var ms = milliseconds || 0;
|
|
266
|
+
|
|
267
|
+
if (zone) {
|
|
268
|
+
return new Date(Date.UTC(y, M, d, h, m, s, ms + zone.offset * 60 * 1000));
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if (utc) {
|
|
272
|
+
return new Date(Date.UTC(y, M, d, h, m, s, ms));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
var newDate;
|
|
276
|
+
newDate = new Date(y, M, d, h, m, s, ms);
|
|
277
|
+
|
|
278
|
+
if (week) {
|
|
279
|
+
newDate = dayjs(newDate).week(week).toDate();
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
return newDate;
|
|
283
|
+
} catch (e) {
|
|
284
|
+
return new Date(''); // Invalid Date
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
var __pika_web_default_export_for_treeshaking__ = (function (o, C, d) {
|
|
289
|
+
d.p.customParseFormat = true;
|
|
290
|
+
|
|
291
|
+
if (o && o.parseTwoDigitYear) {
|
|
292
|
+
parseTwoDigitYear = o.parseTwoDigitYear;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
var proto = C.prototype;
|
|
296
|
+
var oldParse = proto.parse;
|
|
297
|
+
|
|
298
|
+
proto.parse = function (cfg) {
|
|
299
|
+
var date = cfg.date,
|
|
300
|
+
utc = cfg.utc,
|
|
301
|
+
args = cfg.args;
|
|
302
|
+
this.$u = utc;
|
|
303
|
+
var format = args[1];
|
|
304
|
+
|
|
305
|
+
if (typeof format === 'string') {
|
|
306
|
+
var isStrictWithoutLocale = args[2] === true;
|
|
307
|
+
var isStrictWithLocale = args[3] === true;
|
|
308
|
+
var isStrict = isStrictWithoutLocale || isStrictWithLocale;
|
|
309
|
+
var pl = args[2];
|
|
310
|
+
|
|
311
|
+
if (isStrictWithLocale) {
|
|
312
|
+
pl = args[2];
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
locale = this.$locale();
|
|
316
|
+
|
|
317
|
+
if (!isStrictWithoutLocale && pl) {
|
|
318
|
+
locale = d.Ls[pl];
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
this.$d = parseFormattedInput(date, format, utc, d);
|
|
322
|
+
this.init();
|
|
323
|
+
if (pl && pl !== true) this.$L = this.locale(pl).$L; // use != to treat
|
|
324
|
+
// input number 1410715640579 and format string '1410715640579' equal
|
|
325
|
+
// eslint-disable-next-line eqeqeq
|
|
326
|
+
|
|
327
|
+
if (isStrict && date != this.format(format)) {
|
|
328
|
+
this.$d = new Date('');
|
|
329
|
+
} // reset global locale to make parallel unit test
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
locale = {};
|
|
333
|
+
} else if (format instanceof Array) {
|
|
334
|
+
var len = format.length;
|
|
335
|
+
|
|
336
|
+
for (var i = 1; i <= len; i += 1) {
|
|
337
|
+
args[1] = format[i - 1];
|
|
338
|
+
var result = d.apply(this, args);
|
|
339
|
+
|
|
340
|
+
if (result.isValid()) {
|
|
341
|
+
this.$d = result.$d;
|
|
342
|
+
this.$L = result.$L;
|
|
343
|
+
this.init();
|
|
344
|
+
break;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if (i === len) this.$d = new Date('');
|
|
348
|
+
}
|
|
349
|
+
} else {
|
|
350
|
+
oldParse.call(this, cfg);
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
export default __pika_web_default_export_for_treeshaking__;
|