@openremote/or-timeline 1.0.3 → 1.2.0-snapshot.20240512154942
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/package.json +13 -13
- package/.project +0 -17
- package/.settings/org.eclipse.buildship.core.prefs +0 -2
- package/LICENSE.txt +0 -2359
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -287
- package/dist/umd/index.bundle.js +0 -614
- package/dist/umd/index.js +0 -348
- package/dist/umd/index.orbundle.js +0 -614
package/dist/umd/index.js
DELETED
|
@@ -1,348 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("moment")):"function"==typeof define&&define.amd?define(["moment"],t):"object"==typeof exports?exports.ORTimeline=t(require("moment")):e.ORTimeline=t(e.moment)}(window,(function(e){return function(e){var t={};function i(s){if(t[s])return t[s].exports;var r=t[s]={i:s,l:!1,exports:{}};return e[s].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,s){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(s,r,function(t){return e[t]}.bind(null,r));return s},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}([function(t,i){t.exports=e},function(e,t,i){"use strict";i.r(t);
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
5
|
-
* This code may only be used under the BSD style license found at
|
|
6
|
-
* http://polymer.github.io/LICENSE.txt
|
|
7
|
-
* The complete set of authors may be found at
|
|
8
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
9
|
-
* The complete set of contributors may be found at
|
|
10
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
11
|
-
* Code distributed by Google as part of the polymer project is also
|
|
12
|
-
* subject to an additional IP rights grant found at
|
|
13
|
-
* http://polymer.github.io/PATENTS.txt
|
|
14
|
-
*/
|
|
15
|
-
const s="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,r=(e,t,i=null)=>{for(;t!==i;){const i=t.nextSibling;e.removeChild(t),t=i}},n=`{{lit-${String(Math.random()).slice(2)}}}`,o=`\x3c!--${n}--\x3e`,a=new RegExp(`${n}|${o}`);class l{constructor(e,t){this.parts=[],this.element=t;const i=[],s=[],r=document.createTreeWalker(t.content,133,null,!1);let o=0,l=-1,c=0;const{strings:u,values:{length:m}}=e;for(;c<m;){const e=r.nextNode();if(null!==e){if(l++,1===e.nodeType){if(e.hasAttributes()){const t=e.attributes,{length:i}=t;let s=0;for(let e=0;e<i;e++)d(t[e].name,"$lit$")&&s++;for(;s-- >0;){const t=u[c],i=h.exec(t)[2],s=i.toLowerCase()+"$lit$",r=e.getAttribute(s);e.removeAttribute(s);const n=r.split(a);this.parts.push({type:"attribute",index:l,name:i,strings:n}),c+=n.length-1}}"TEMPLATE"===e.tagName&&(s.push(e),r.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(n)>=0){const s=e.parentNode,r=t.split(a),n=r.length-1;for(let t=0;t<n;t++){let i,n=r[t];if(""===n)i=p();else{const e=h.exec(n);null!==e&&d(e[2],"$lit$")&&(n=n.slice(0,e.index)+e[1]+e[2].slice(0,-"$lit$".length)+e[3]),i=document.createTextNode(n)}s.insertBefore(i,e),this.parts.push({type:"node",index:++l})}""===r[n]?(s.insertBefore(p(),e),i.push(e)):e.data=r[n],c+=n}}else if(8===e.nodeType)if(e.data===n){const t=e.parentNode;null!==e.previousSibling&&l!==o||(l++,t.insertBefore(p(),e)),o=l,this.parts.push({type:"node",index:l}),null===e.nextSibling?e.data="":(i.push(e),l--),c++}else{let t=-1;for(;-1!==(t=e.data.indexOf(n,t+1));)this.parts.push({type:"node",index:-1}),c++}}else r.currentNode=s.pop()}for(const e of i)e.parentNode.removeChild(e)}}const d=(e,t)=>{const i=e.length-t.length;return i>=0&&e.slice(i)===t},c=e=>-1!==e.index,p=()=>document.createComment(""),h=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function u(e,t){const{element:{content:i},parts:s}=e,r=document.createTreeWalker(i,133,null,!1);let n=f(s),o=s[n],a=-1,l=0;const d=[];let c=null;for(;r.nextNode();){a++;const e=r.currentNode;for(e.previousSibling===c&&(c=null),t.has(e)&&(d.push(e),null===c&&(c=e)),null!==c&&l++;void 0!==o&&o.index===a;)o.index=null!==c?-1:o.index-l,n=f(s,n),o=s[n]}d.forEach(e=>e.parentNode.removeChild(e))}const m=e=>{let t=11===e.nodeType?0:1;const i=document.createTreeWalker(e,133,null,!1);for(;i.nextNode();)t++;return t},f=(e,t=-1)=>{for(let i=t+1;i<e.length;i++){const t=e[i];if(c(t))return i}return-1};
|
|
16
|
-
/**
|
|
17
|
-
* @license
|
|
18
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
19
|
-
* This code may only be used under the BSD style license found at
|
|
20
|
-
* http://polymer.github.io/LICENSE.txt
|
|
21
|
-
* The complete set of authors may be found at
|
|
22
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
23
|
-
* The complete set of contributors may be found at
|
|
24
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
25
|
-
* Code distributed by Google as part of the polymer project is also
|
|
26
|
-
* subject to an additional IP rights grant found at
|
|
27
|
-
* http://polymer.github.io/PATENTS.txt
|
|
28
|
-
*/
|
|
29
|
-
const g=new WeakMap,y=e=>"function"==typeof e&&g.has(e),_={},b={};
|
|
30
|
-
/**
|
|
31
|
-
* @license
|
|
32
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
33
|
-
* This code may only be used under the BSD style license found at
|
|
34
|
-
* http://polymer.github.io/LICENSE.txt
|
|
35
|
-
* The complete set of authors may be found at
|
|
36
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
37
|
-
* The complete set of contributors may be found at
|
|
38
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
39
|
-
* Code distributed by Google as part of the polymer project is also
|
|
40
|
-
* subject to an additional IP rights grant found at
|
|
41
|
-
* http://polymer.github.io/PATENTS.txt
|
|
42
|
-
*/
|
|
43
|
-
class v{constructor(e,t,i){this.__parts=[],this.template=e,this.processor=t,this.options=i}update(e){let t=0;for(const i of this.__parts)void 0!==i&&i.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],i=this.template.parts,r=document.createTreeWalker(e,133,null,!1);let n,o=0,a=0,l=r.nextNode();for(;o<i.length;)if(n=i[o],c(n)){for(;a<n.index;)a++,"TEMPLATE"===l.nodeName&&(t.push(l),r.currentNode=l.content),null===(l=r.nextNode())&&(r.currentNode=t.pop(),l=r.nextNode());if("node"===n.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(l.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,n.name,n.strings,this.options));o++}else this.__parts.push(void 0),o++;return s&&(document.adoptNode(e),customElements.upgrade(e)),e}}
|
|
44
|
-
/**
|
|
45
|
-
* @license
|
|
46
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
47
|
-
* This code may only be used under the BSD style license found at
|
|
48
|
-
* http://polymer.github.io/LICENSE.txt
|
|
49
|
-
* The complete set of authors may be found at
|
|
50
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
51
|
-
* The complete set of contributors may be found at
|
|
52
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
53
|
-
* Code distributed by Google as part of the polymer project is also
|
|
54
|
-
* subject to an additional IP rights grant found at
|
|
55
|
-
* http://polymer.github.io/PATENTS.txt
|
|
56
|
-
*/const x=` ${n} `;class S{constructor(e,t,i,s){this.strings=e,this.values=t,this.type=i,this.processor=s}getHTML(){const e=this.strings.length-1;let t="",i=!1;for(let s=0;s<e;s++){const e=this.strings[s],r=e.lastIndexOf("\x3c!--");i=(r>-1||i)&&-1===e.indexOf("--\x3e",r+1);const a=h.exec(e);t+=null===a?e+(i?x:o):e.substr(0,a.index)+a[1]+a[2]+"$lit$"+a[3]+n}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}
|
|
57
|
-
/**
|
|
58
|
-
* @license
|
|
59
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
60
|
-
* This code may only be used under the BSD style license found at
|
|
61
|
-
* http://polymer.github.io/LICENSE.txt
|
|
62
|
-
* The complete set of authors may be found at
|
|
63
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
64
|
-
* The complete set of contributors may be found at
|
|
65
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
66
|
-
* Code distributed by Google as part of the polymer project is also
|
|
67
|
-
* subject to an additional IP rights grant found at
|
|
68
|
-
* http://polymer.github.io/PATENTS.txt
|
|
69
|
-
*/
|
|
70
|
-
const w=e=>null===e||!("object"==typeof e||"function"==typeof e),P=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class N{constructor(e,t,i){this.dirty=!0,this.element=e,this.name=t,this.strings=i,this.parts=[];for(let e=0;e<i.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new k(this)}_getValue(){const e=this.strings,t=e.length-1;let i="";for(let s=0;s<t;s++){i+=e[s];const t=this.parts[s];if(void 0!==t){const e=t.value;if(w(e)||!P(e))i+="string"==typeof e?e:String(e);else for(const t of e)i+="string"==typeof t?t:String(t)}}return i+=e[t],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class k{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===_||w(e)&&e===this.value||(this.value=e,y(e)||(this.committer.dirty=!0))}commit(){for(;y(this.value);){const e=this.value;this.value=_,e(this)}this.value!==_&&this.committer.commit()}}class C{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(p()),this.endNode=e.appendChild(p())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=p()),e.__insert(this.endNode=p())}insertAfterPart(e){e.__insert(this.startNode=p()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(null===this.startNode.parentNode)return;for(;y(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=_,e(this)}const e=this.__pendingValue;e!==_&&(w(e)?e!==this.value&&this.__commitText(e):e instanceof S?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):P(e)?this.__commitIterable(e):e===b?(this.value=b,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,i="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=i:this.__commitNode(document.createTextNode(i)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof v&&this.value.template===t)this.value.update(e.values);else{const i=new v(t,e.processor,this.options),s=i._clone();i.update(e.values),this.__commitNode(s),this.value=i}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let i,s=0;for(const r of e)i=t[s],void 0===i&&(i=new C(this.options),t.push(i),0===s?i.appendIntoPart(this):i.insertAfterPart(t[s-1])),i.setValue(r),i.commit(),s++;s<t.length&&(t.length=s,this.clear(i&&i.endNode))}clear(e=this.startNode){r(this.startNode.parentNode,e.nextSibling,this.endNode)}}class T{constructor(e,t,i){if(this.value=void 0,this.__pendingValue=void 0,2!==i.length||""!==i[0]||""!==i[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=i}setValue(e){this.__pendingValue=e}commit(){for(;y(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=_,e(this)}if(this.__pendingValue===_)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=_}}class E extends N{constructor(e,t,i){super(e,t,i),this.single=2===i.length&&""===i[0]&&""===i[1]}_createPart(){return new A(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class A extends k{}let O=!1;(()=>{try{const e={get capture(){return O=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class R{constructor(e,t,i){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=i,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;y(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=_,e(this)}if(this.__pendingValue===_)return;const e=this.__pendingValue,t=this.value,i=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),s=null!=e&&(null==t||i);i&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),s&&(this.__options=V(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=_}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const V=e=>e&&(O?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)
|
|
71
|
-
/**
|
|
72
|
-
* @license
|
|
73
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
74
|
-
* This code may only be used under the BSD style license found at
|
|
75
|
-
* http://polymer.github.io/LICENSE.txt
|
|
76
|
-
* The complete set of authors may be found at
|
|
77
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
78
|
-
* The complete set of contributors may be found at
|
|
79
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
80
|
-
* Code distributed by Google as part of the polymer project is also
|
|
81
|
-
* subject to an additional IP rights grant found at
|
|
82
|
-
* http://polymer.github.io/PATENTS.txt
|
|
83
|
-
*/;function M(e){let t=U.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},U.set(e.type,t));let i=t.stringsArray.get(e.strings);if(void 0!==i)return i;const s=e.strings.join(n);return i=t.keyString.get(s),void 0===i&&(i=new l(e,e.getTemplateElement()),t.keyString.set(s,i)),t.stringsArray.set(e.strings,i),i}const U=new Map,j=new WeakMap;
|
|
84
|
-
/**
|
|
85
|
-
* @license
|
|
86
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
87
|
-
* This code may only be used under the BSD style license found at
|
|
88
|
-
* http://polymer.github.io/LICENSE.txt
|
|
89
|
-
* The complete set of authors may be found at
|
|
90
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
91
|
-
* The complete set of contributors may be found at
|
|
92
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
93
|
-
* Code distributed by Google as part of the polymer project is also
|
|
94
|
-
* subject to an additional IP rights grant found at
|
|
95
|
-
* http://polymer.github.io/PATENTS.txt
|
|
96
|
-
*/const z=new
|
|
97
|
-
/**
|
|
98
|
-
* @license
|
|
99
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
100
|
-
* This code may only be used under the BSD style license found at
|
|
101
|
-
* http://polymer.github.io/LICENSE.txt
|
|
102
|
-
* The complete set of authors may be found at
|
|
103
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
104
|
-
* The complete set of contributors may be found at
|
|
105
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
106
|
-
* Code distributed by Google as part of the polymer project is also
|
|
107
|
-
* subject to an additional IP rights grant found at
|
|
108
|
-
* http://polymer.github.io/PATENTS.txt
|
|
109
|
-
*/
|
|
110
|
-
class{handleAttributeExpressions(e,t,i,s){const r=t[0];if("."===r){return new E(e,t.slice(1),i).parts}if("@"===r)return[new R(e,t.slice(1),s.eventContext)];if("?"===r)return[new T(e,t.slice(1),i)];return new N(e,t,i).parts}handleTextExpression(e){return new C(e)}};
|
|
111
|
-
/**
|
|
112
|
-
* @license
|
|
113
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
114
|
-
* This code may only be used under the BSD style license found at
|
|
115
|
-
* http://polymer.github.io/LICENSE.txt
|
|
116
|
-
* The complete set of authors may be found at
|
|
117
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
118
|
-
* The complete set of contributors may be found at
|
|
119
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
120
|
-
* Code distributed by Google as part of the polymer project is also
|
|
121
|
-
* subject to an additional IP rights grant found at
|
|
122
|
-
* http://polymer.github.io/PATENTS.txt
|
|
123
|
-
*/"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const $=(e,...t)=>new S(e,t,"html",z),H=(e,t)=>`${e}--${t}`;let I=!0;void 0===window.ShadyCSS?I=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),I=!1);const F=e=>t=>{const i=H(t.type,e);let s=U.get(i);void 0===s&&(s={stringsArray:new WeakMap,keyString:new Map},U.set(i,s));let r=s.stringsArray.get(t.strings);if(void 0!==r)return r;const o=t.strings.join(n);if(r=s.keyString.get(o),void 0===r){const i=t.getTemplateElement();I&&window.ShadyCSS.prepareTemplateDom(i,e),r=new l(t,i),s.keyString.set(o,r)}return s.stringsArray.set(t.strings,r),r},q=["html","svg"],B=new Set,L=(e,t,i)=>{B.add(e);const s=i?i.element:document.createElement("template"),r=t.querySelectorAll("style"),{length:n}=r;if(0===n)return void window.ShadyCSS.prepareTemplateStyles(s,e);const o=document.createElement("style");for(let e=0;e<n;e++){const t=r[e];t.parentNode.removeChild(t),o.textContent+=t.textContent}(e=>{q.forEach(t=>{const i=U.get(H(t,e));void 0!==i&&i.keyString.forEach(e=>{const{element:{content:t}}=e,i=new Set;Array.from(t.querySelectorAll("style")).forEach(e=>{i.add(e)}),u(e,i)})})})(e);const a=s.content;i?function(e,t,i=null){const{element:{content:s},parts:r}=e;if(null==i)return void s.appendChild(t);const n=document.createTreeWalker(s,133,null,!1);let o=f(r),a=0,l=-1;for(;n.nextNode();){l++;for(n.currentNode===i&&(a=m(t),i.parentNode.insertBefore(t,i));-1!==o&&r[o].index===l;){if(a>0){for(;-1!==o;)r[o].index+=a,o=f(r,o);return}o=f(r,o)}}}(i,o,a.firstChild):a.insertBefore(o,a.firstChild),window.ShadyCSS.prepareTemplateStyles(s,e);const l=a.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)t.insertBefore(l.cloneNode(!0),t.firstChild);else if(i){a.insertBefore(o,a.firstChild);const e=new Set;e.add(o),u(i,e)}};window.JSCompiler_renameProperty=(e,t)=>e;const D={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},W=(e,t)=>t!==e&&(t==t||e==e),J={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:W};class G extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach((t,i)=>{const s=this._attributeNameForProperty(i,t);void 0!==s&&(this._attributeToPropertyMap.set(s,i),e.push(s))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((e,t)=>this._classProperties.set(t,e))}}static createProperty(e,t=J){if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const i="symbol"==typeof e?Symbol():"__"+e,s=this.getPropertyDescriptor(e,i,t);void 0!==s&&Object.defineProperty(this.prototype,e,s)}static getPropertyDescriptor(e,t,i){return{get(){return this[t]},set(s){const r=this[e];this[t]=s,this.requestUpdateInternal(e,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||J}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty("finalized")||e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const i of t)this.createProperty(i,e[i])}}static _attributeNameForProperty(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t,i=W){return i(e,t)}static _propertyValueFromAttribute(e,t){const i=t.type,s=t.converter||D,r="function"==typeof s?s:s.fromAttribute;return r?r(e,i):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const i=t.type,s=t.converter;return(s&&s.toAttribute||D.toAttribute)(e,i)}initialize(){this._updateState=0,this._updatePromise=new Promise(e=>this._enableUpdatingResolver=e),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,t)=>this[t]=e),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,i){t!==i&&this._attributeToProperty(e,i)}_propertyToAttribute(e,t,i=J){const s=this.constructor,r=s._attributeNameForProperty(e,i);if(void 0!==r){const e=s._propertyValueToAttribute(t,i);if(void 0===e)return;this._updateState=8|this._updateState,null==e?this.removeAttribute(r):this.setAttribute(r,e),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(8&this._updateState)return;const i=this.constructor,s=i._attributeToPropertyMap.get(e);if(void 0!==s){const e=i.getPropertyOptions(s);this._updateState=16|this._updateState,this[s]=i._propertyValueFromAttribute(t,e),this._updateState=-17&this._updateState}}requestUpdateInternal(e,t,i){let s=!0;if(void 0!==e){const r=this.constructor;i=i||r.getPropertyOptions(e),r._valueHasChanged(this[e],t,i.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==i.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,i))):s=!1}!this._hasRequestedUpdate&&s&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this.requestUpdateInternal(e,t),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(e){}const e=this.performUpdate();return null!=e&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{e=this.shouldUpdate(t),e?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((e,t)=>this._propertyToAttribute(t,this[t],e)),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}}G.finalized=!0;
|
|
124
|
-
/**
|
|
125
|
-
* @license
|
|
126
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
127
|
-
* This code may only be used under the BSD style license found at
|
|
128
|
-
* http://polymer.github.io/LICENSE.txt
|
|
129
|
-
* The complete set of authors may be found at
|
|
130
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
131
|
-
* The complete set of contributors may be found at
|
|
132
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
133
|
-
* Code distributed by Google as part of the polymer project is also
|
|
134
|
-
* subject to an additional IP rights grant found at
|
|
135
|
-
* http://polymer.github.io/PATENTS.txt
|
|
136
|
-
*/
|
|
137
|
-
const K=(e,t)=>"method"===t.kind&&t.descriptor&&!("value"in t.descriptor)?Object.assign(Object.assign({},t),{finisher(i){i.createProperty(t.key,e)}}):{kind:"field",key:Symbol(),placement:"own",descriptor:{},initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(i){i.createProperty(t.key,e)}};function Q(e){return(t,i)=>void 0!==i?((e,t,i)=>{t.constructor.createProperty(i,e)})(e,t,i):K(e,t)}const X=Element.prototype;X.msMatchesSelector||X.webkitMatchesSelector;
|
|
138
|
-
/**
|
|
139
|
-
@license
|
|
140
|
-
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
|
|
141
|
-
This code may only be used under the BSD style license found at
|
|
142
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
143
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
144
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
145
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
146
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
147
|
-
*/
|
|
148
|
-
const Y=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Z=Symbol();class ee{constructor(e,t){if(t!==Z)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(Y?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}
|
|
149
|
-
/**
|
|
150
|
-
* @license
|
|
151
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
152
|
-
* This code may only be used under the BSD style license found at
|
|
153
|
-
* http://polymer.github.io/LICENSE.txt
|
|
154
|
-
* The complete set of authors may be found at
|
|
155
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
156
|
-
* The complete set of contributors may be found at
|
|
157
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
158
|
-
* Code distributed by Google as part of the polymer project is also
|
|
159
|
-
* subject to an additional IP rights grant found at
|
|
160
|
-
* http://polymer.github.io/PATENTS.txt
|
|
161
|
-
*/
|
|
162
|
-
(window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");const te={};class ie extends G{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,i)=>e.reduceRight((e,i)=>Array.isArray(i)?t(i,e):(e.add(i),e),i),i=t(e,new Set),s=[];i.forEach(e=>s.unshift(e)),this._styles=s}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map(e=>{if(e instanceof CSSStyleSheet&&!Y){const t=Array.prototype.slice.call(e.cssRules).reduce((e,t)=>e+t.cssText,"");return new ee(String(t),Z)}return e})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Y?this.renderRoot.adoptedStyleSheets=e.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==te&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){return te}}ie.finalized=!0,ie.render=(e,t,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const s=i.scopeName,n=j.has(t),o=I&&11===t.nodeType&&!!t.host,a=o&&!B.has(s),l=a?document.createDocumentFragment():t;if(((e,t,i)=>{let s=j.get(t);void 0===s&&(r(t,t.firstChild),j.set(t,s=new C(Object.assign({templateFactory:M},i))),s.appendInto(t)),s.setValue(e),s.commit()})(e,l,Object.assign({templateFactory:F(s)},i)),a){const e=j.get(l);j.delete(l);const i=e.value instanceof v?e.value.template:void 0;L(s,l,i),r(t,t.firstChild),t.appendChild(l),j.set(t,e)}!n&&o&&window.ShadyCSS.styleElement(t.host)};var se=i(0),re=i.n(se),ne=function(e,t,i,s){var r,n=arguments.length,o=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(n<3?r(o):n>3?r(t,i,o):r(t,i))||o);return n>3&&o&&Object.defineProperty(t,i,o),o};let oe=class extends ie{constructor(){super(),this.current=0,this.value=0,this.maxRange=360,this.minRange=0,this.step=5}moveBubble(e=null,t=null){let i;if(e?i=e.target:this.shadowRoot&&(i=this.shadowRoot.getElementById("or-timeline-slider")),i){this.current=t?parseInt(t):parseInt(i.value);const e=i.offsetWidth,s=this.current/this.maxRange,r=15;let n;if(s<0?n=0:s>1?n=e-r:(n=(e-r)*s,n<0&&(n=0)),this.shadowRoot){const e=this.shadowRoot.getElementById("range-value");e&&(e.style.left=n+"px")}}}valueChange(e){this.moveBubble(e),this.onChange()}render(){return $`
|
|
163
|
-
<style>
|
|
164
|
-
:host {
|
|
165
|
-
position: relative;
|
|
166
|
-
}
|
|
167
|
-
.timeline-container {
|
|
168
|
-
display: block;
|
|
169
|
-
height: 52px;
|
|
170
|
-
background-color: var(--app-white, #FFFFFF);
|
|
171
|
-
|
|
172
|
-
-webkit-box-shadow: 1px 1px 2px 0px rgba(0,0,0,0.28);
|
|
173
|
-
-moz-box-shadow: 1px 1px 2px 0px rgba(0,0,0,0.28);
|
|
174
|
-
box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.28);
|
|
175
|
-
|
|
176
|
-
padding-top: 20px;
|
|
177
|
-
}
|
|
178
|
-
.slidecontainer {
|
|
179
|
-
position: relative;
|
|
180
|
-
margin: -5px 44px 0 19px;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/* The slider itself */
|
|
184
|
-
.slider {
|
|
185
|
-
color: var(--timeline-accent, #1D5632);
|
|
186
|
-
box-sizing: border-box;
|
|
187
|
-
-webkit-appearance: none;
|
|
188
|
-
outline: none;
|
|
189
|
-
width: 100%;
|
|
190
|
-
}
|
|
191
|
-
.slider::-webkit-slider-runnable-track {
|
|
192
|
-
cursor: pointer;
|
|
193
|
-
border: transparent;
|
|
194
|
-
background: #bdbdbd;
|
|
195
|
-
border-radius: 6px;
|
|
196
|
-
height: 12px;
|
|
197
|
-
}
|
|
198
|
-
.slider::-webkit-slider-thumb {
|
|
199
|
-
height: 18px;
|
|
200
|
-
width: 18px;
|
|
201
|
-
border-radius: 50%;
|
|
202
|
-
cursor: pointer;
|
|
203
|
-
-webkit-appearance: none;
|
|
204
|
-
background-color: var(--timeline-accent, #1D5632); /* Green background */
|
|
205
|
-
pointer-events: all;
|
|
206
|
-
margin-top: -2px;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.slider::-moz-range-track {
|
|
210
|
-
cursor: pointer;
|
|
211
|
-
border: transparent;
|
|
212
|
-
background: #bdbdbd;
|
|
213
|
-
border-radius: 6px;
|
|
214
|
-
height: 12px;
|
|
215
|
-
}
|
|
216
|
-
.slider::-moz-range-thumb {
|
|
217
|
-
border: 0 none;
|
|
218
|
-
height: 18px;
|
|
219
|
-
width: 18px;
|
|
220
|
-
border-radius: 50%;
|
|
221
|
-
cursor: pointer;
|
|
222
|
-
-webkit-appearance: none;
|
|
223
|
-
background-color: var(--timeline-accent, #1D5632); /* Green background */
|
|
224
|
-
pointer-events: all;
|
|
225
|
-
margin-top: -2px;
|
|
226
|
-
}
|
|
227
|
-
.slider::-moz-range-progress {
|
|
228
|
-
background-color: var(--timeline-accent, #1D5632);
|
|
229
|
-
height: 12px;
|
|
230
|
-
border-radius: 6px;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.slider::-ms-track {
|
|
234
|
-
cursor: pointer;
|
|
235
|
-
border: transparent;
|
|
236
|
-
background: #bdbdbd;
|
|
237
|
-
border-radius: 6px;
|
|
238
|
-
height: 12px;
|
|
239
|
-
}
|
|
240
|
-
.slider::-ms-thumb {
|
|
241
|
-
border: 0 none;
|
|
242
|
-
height: 18px;
|
|
243
|
-
width: 18px;
|
|
244
|
-
border-radius: 50%;
|
|
245
|
-
cursor: pointer;
|
|
246
|
-
-webkit-appearance: none;
|
|
247
|
-
background-color: var(--timeline-accent, currentColor); /* Bug in Edge set colour on slider itself */
|
|
248
|
-
pointer-events: all;
|
|
249
|
-
margin-top: -2px;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.slider::-ms-fill-lower {
|
|
253
|
-
background-color: var(--timeline-accent, currentColor);
|
|
254
|
-
border: 0 none;
|
|
255
|
-
border-radius: 6px;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.slider::-ms-fill-upper {
|
|
259
|
-
background: transparent;
|
|
260
|
-
border: 0 none;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
#timelineHourMarkers {
|
|
264
|
-
position: relative;
|
|
265
|
-
display: -webkit-box;
|
|
266
|
-
display: -moz-box;
|
|
267
|
-
display: -ms-flexbox;
|
|
268
|
-
display: -webkit-flex;
|
|
269
|
-
display: flex;
|
|
270
|
-
-webkit-box-orient: horizontal;
|
|
271
|
-
-moz-box-orient: horizontal;
|
|
272
|
-
-webkit-box-direction: normal;
|
|
273
|
-
-moz-box-direction: normal;
|
|
274
|
-
-webkit-flex-direction: row;
|
|
275
|
-
-ms-flex-direction: row;
|
|
276
|
-
flex-direction: row;
|
|
277
|
-
|
|
278
|
-
margin: 0 50px 0 30px;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
#timelineHourMarkers > .timelineHourMark{
|
|
282
|
-
display: flex;
|
|
283
|
-
flex: 1 100%;
|
|
284
|
-
flex-grow: 1;
|
|
285
|
-
flex-shrink: 1;
|
|
286
|
-
flex-basis: 100%;
|
|
287
|
-
|
|
288
|
-
overflow: visible;
|
|
289
|
-
color: var(--timeline-grey, darkgrey);
|
|
290
|
-
border-left: 1px solid var(--timeline-grey, darkgrey);
|
|
291
|
-
font-size: 12px;
|
|
292
|
-
-webkit-user-select: none;
|
|
293
|
-
-moz-user-select: none;
|
|
294
|
-
-ms-user-select: none;
|
|
295
|
-
user-select: none;
|
|
296
|
-
padding-left: 4px;
|
|
297
|
-
padding-bottom: 4px;
|
|
298
|
-
}
|
|
299
|
-
#timelineHourMarkers .timelineHourMark:last-child {
|
|
300
|
-
position: absolute;
|
|
301
|
-
right: -25px;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
#range-value {
|
|
305
|
-
position: absolute;
|
|
306
|
-
background-color: var(--timeline-accent, #1D5632);
|
|
307
|
-
height: 30px;
|
|
308
|
-
width: 60px;
|
|
309
|
-
margin-left: -30px;
|
|
310
|
-
text-align: center;
|
|
311
|
-
color: white;
|
|
312
|
-
display: inline-block;
|
|
313
|
-
left: 0;
|
|
314
|
-
font-size: 12px;
|
|
315
|
-
font-weight: bold;
|
|
316
|
-
line-height: 30px;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.time-value-container {
|
|
320
|
-
width: calc(100% - 80px);
|
|
321
|
-
display: block;
|
|
322
|
-
position: relative;
|
|
323
|
-
height: 30px;
|
|
324
|
-
margin: 0 50px 0 30px;
|
|
325
|
-
}
|
|
326
|
-
</style>
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
<div class="time-value-container">
|
|
330
|
-
<div id="range-value">${0===this.current?"LIVE":re()().add(this.current,"minutes").format("HH:mm")}</div>
|
|
331
|
-
</div>
|
|
332
|
-
<div class="timeline-container">
|
|
333
|
-
<div id="timelineHourMarkers" class="layout horizontal justified style-scope controller-timeline">
|
|
334
|
-
${new Array(this.maxRange/60+1).fill(0).map((e,t)=>$`
|
|
335
|
-
${0===t?$`
|
|
336
|
-
<div class="timelineHourMark style-scope controller-timeline">Nu</div>
|
|
337
|
-
`:$`
|
|
338
|
-
<div class="timelineHourMark style-scope controller-timeline">+${t}u</div>
|
|
339
|
-
`}
|
|
340
|
-
`)}
|
|
341
|
-
</div>
|
|
342
|
-
|
|
343
|
-
<div class="slidecontainer">
|
|
344
|
-
<input id="or-timeline-slider" class="slider" type="range" @input="${this.moveBubble}" @change="${this.valueChange}" value="${this.current}" min="${this.minRange}" max="${this.maxRange}" step="${this.step}">
|
|
345
|
-
</div>
|
|
346
|
-
</div>
|
|
347
|
-
|
|
348
|
-
`}};var ae;ne([Q({type:Number})],oe.prototype,"current",void 0),ne([Q({type:Function})],oe.prototype,"onChange",void 0),ne([Q({type:Number})],oe.prototype,"value",void 0),ne([Q({type:Number})],oe.prototype,"maxRange",void 0),ne([Q({type:Number})],oe.prototype,"minRange",void 0),ne([Q({type:Number})],oe.prototype,"step",void 0),oe=ne([(ae="or-timeline",e=>"function"==typeof e?((e,t)=>(window.customElements.define(e,t),t))(ae,e):((e,t)=>{const{kind:i,elements:s}=t;return{kind:i,elements:s,finisher(t){window.customElements.define(e,t)}}})(ae,e))],oe)}])}));
|