-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathhoneycomb-menu.js
257 lines (241 loc) · 67.1 KB
/
honeycomb-menu.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=179)}([function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var o=n(41),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();t.exports=i},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var o=n(10),r=n(75),i=n(76),s=o?o.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?r(t):i(t)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var o=n(34),r=n(28);t.exports=function(t,e,n,i){var s=!n;n||(n={});for(var a=-1,c=e.length;++a<c;){var u=e[a],l=i?i(n[u],t[u],u,n,t):void 0;void 0===l&&(l=t[u]),s?r(n,u,l):o(n,u,l)}return n}},function(t,e,n){var o=n(88),r=n(91);t.exports=function(t,e){var n=r(t,e);return o(n)?n:void 0}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var o=n(27),r=n(53);t.exports=function(t){return null!=t&&r(t.length)&&!o(t)}},function(t,e,n){var o=n(55),r=n(115),i=n(8);t.exports=function(t){return i(t)?o(t,!0):r(t)}},function(t,e,n){var o=n(1).Symbol;t.exports=o},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var o=n(55),r=n(61),i=n(8);t.exports=function(t){return i(t)?o(t):r(t)}},function(t,e,n){var o=n(78),r=n(79),i=n(80),s=n(81),a=n(82);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,t.exports=c},function(t,e,n){var o=n(7);t.exports=function(t,e){for(var n=t.length;n--;)if(o(t[n][0],e))return n;return-1}},function(t,e,n){var o=n(6)(Object,"create");t.exports=o},function(t,e,n){var o=n(100);t.exports=function(t,e){var n=t.__data__;return o(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var o=n(109),r=n(0),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,c=o(function(){return arguments}())?o:function(t){return r(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},function(t,e,n){(function(t){var o=n(1),r=n(111),i=e&&!e.nodeType&&e,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i?o.Buffer:void 0,c=(a?a.isBuffer:void 0)||r;t.exports=c}).call(this,n(29)(t))},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var o=n(41),r=e&&!e.nodeType&&e,i=r&&"object"==typeof t&&t&&!t.nodeType&&t,s=i&&i.exports===r&&o.process,a=function(){try{var t=i&&i.require&&i.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a}).call(this,n(29)(t))},function(t,e,n){var o=n(7),r=n(8),i=n(56),s=n(4);t.exports=function(t,e,n){if(!s(n))return!1;var a=typeof e;return!!("number"==a?r(n)&&i(e,n.length):"string"==a&&e in n)&&o(n[e],t)}},function(t,e,n){var o=n(122),r=n(26),i=n(123),s=n(124),a=n(125),c=n(3),u=n(44),l=u(o),h=u(r),p=u(i),f=u(s),d=u(a),v=c;(o&&"[object DataView]"!=v(new o(new ArrayBuffer(1)))||r&&"[object Map]"!=v(new r)||i&&"[object Promise]"!=v(i.resolve())||s&&"[object Set]"!=v(new s)||a&&"[object WeakMap]"!=v(new a))&&(v=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,o=n?u(n):"";if(o)switch(o){case l:return"[object DataView]";case h:return"[object Map]";case p:return"[object Promise]";case f:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=v},function(t,e,n){var o=n(3),r=n(0);t.exports=function(t){return"symbol"==typeof t||r(t)&&"[object Symbol]"==o(t)}},function(t,e,n){var o=n(68);t.exports=function(t){return null==t?"":o(t)}},function(t,e,n){var o=n(3),r=n(2),i=n(0);t.exports=function(t){return"string"==typeof t||!r(t)&&i(t)&&"[object String]"==o(t)}},function(t,e,n){var o=n(6)(n(1),"Map");t.exports=o},function(t,e,n){var o=n(3),r=n(4);t.exports=function(t){if(!r(t))return!1;var e=o(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var o=n(47);t.exports=function(t,e,n){"__proto__"==e&&o?o(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var o=n(107);t.exports=function(t){var e=new t.constructor(t.byteLength);return new o(e).set(new o(t)),e}},function(t,e,n){var o=n(52)(Object.getPrototypeOf,Object);t.exports=o},function(t,e,n){var o=n(3),r=n(31),i=n(0),s=Function.prototype,a=Object.prototype,c=s.toString,u=a.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=o(t))return!1;var e=r(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},function(t,e,n){var o=n(112),r=n(19),i=n(20),s=i&&i.isTypedArray,a=s?r(s):o;t.exports=a},function(t,e,n){var o=n(28),r=n(7),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];i.call(t,e)&&r(s,n)&&(void 0!==n||e in t)||o(t,e,n)}},function(t,e,n){var o=n(36),r=n(21);t.exports=function(t){return o((function(e,n){var o=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(i--,s):void 0,a&&r(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++o<i;){var c=n[o];c&&t(e,c,o,s)}return e}))}},function(t,e,n){var o=n(57),r=n(58),i=n(60);t.exports=function(t,e){return i(r(t,e,o),t+"")}},function(t,e){t.exports=function(t,e){for(var n=-1,o=null==t?0:t.length,r=Array(o);++n<o;)r[n]=e(t[n],n,t);return r}},function(t,e,n){var o=n(134),r=n(64),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),o(s(t),(function(e){return i.call(t,e)})))}:r;t.exports=a},function(t,e){t.exports=function(t,e){for(var n=-1,o=e.length,r=t.length;++n<o;)t[r+n]=e[n];return t}},function(t,e,n){var o=n(2),r=n(147),i=n(148),s=n(24);t.exports=function(t,e){return o(t)?t:r(t,e)?[t]:i(s(t))}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(74))},function(t,e,n){var o=n(77),r=n(35)((function(t,e,n){o(t,e,n)}));t.exports=r},function(t,e,n){var o=n(13),r=n(83),i=n(84),s=n(85),a=n(86),c=n(87);function u(t){var e=this.__data__=new o(t);this.size=e.size}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=s,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var o=n(92),r=n(99),i=n(101),s=n(102),a=n(103);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,t.exports=c},function(t,e,n){var o=n(28),r=n(7);t.exports=function(t,e,n){(void 0!==n&&!r(t[e],n)||void 0===n&&!(e in t))&&o(t,e,n)}},function(t,e,n){var o=n(6),r=function(){try{var t=o(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=r},function(t,e,n){(function(t){var o=n(1),r=e&&!e.nodeType&&e,i=r&&"object"==typeof t&&t&&!t.nodeType&&t,s=i&&i.exports===r?o.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,o=a?a(n):new t.constructor(n);return t.copy(o),o}}).call(this,n(29)(t))},function(t,e,n){var o=n(30);t.exports=function(t,e){var n=e?o(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e){t.exports=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e}},function(t,e,n){var o=n(108),r=n(31),i=n(11);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:o(r(t))}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e,n){var o=n(114),r=n(17),i=n(2),s=n(18),a=n(56),c=n(33),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),l=!n&&r(t),h=!n&&!l&&s(t),p=!n&&!l&&!h&&c(t),f=n||l||h||p,d=f?o(t.length,String):[],v=d.length;for(var y in t)!e&&!u.call(t,y)||f&&("length"==y||h&&("offset"==y||"parent"==y)||p&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||a(y,v))||d.push(y);return d}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var o=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==o||"symbol"!=o&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var o=n(59),r=Math.max;t.exports=function(t,e,n){return e=r(void 0===e?t.length-1:e,0),function(){for(var i=arguments,s=-1,a=r(i.length-e,0),c=Array(a);++s<a;)c[s]=i[e+s];s=-1;for(var u=Array(e+1);++s<e;)u[s]=i[s];return u[e]=n(c),o(t,this,u)}}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var o=n(117),r=n(119)(o);t.exports=r},function(t,e,n){var o=n(11),r=n(121),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!o(t))return r(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var o=n(61),r=n(22),i=n(17),s=n(2),a=n(8),c=n(18),u=n(11),l=n(33),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(a(t)&&(s(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||i(t)))return!t.length;var e=r(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(u(t))return!o(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},function(t,e,n){var o=n(126),r=n(127);t.exports=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=r(n))==n?n:0),void 0!==e&&(e=(e=r(e))==e?e:0),o(r(t),e,n)}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var o=n(39),r=n(31),i=n(38),s=n(64),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)o(e,i(t)),t=r(t);return e}:s;t.exports=a},function(t,e,n){var o=n(39),r=n(2);t.exports=function(t,e,n){var i=e(t);return r(t)?i:o(i,n(t))}},function(t,e,n){var o=n(66),r=n(65),i=n(9);t.exports=function(t){return o(t,i,r)}},function(t,e,n){var o=n(10),r=n(37),i=n(2),s=n(23),a=o?o.prototype:void 0,c=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return r(e,t)+"";if(s(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e,n){var o=n(23);t.exports=function(t){if("string"==typeof t||o(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e){t.exports=function(t,e,n){var o=-1,r=t.length;e<0&&(e=-e>r?0:r+e),(n=n>r?r:n)<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(r);++o<r;)i[o]=t[o+e];return i}},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e,n){var o=n(3),r=n(0),i=n(32);t.exports=function(t){if(!r(t))return!1;var e=o(t);return"[object Error]"==e||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!i(t)}},function(t,e){t.exports=/<%=([\s\S]+?)%>/g},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var o=n(10),r=Object.prototype,i=r.hasOwnProperty,s=r.toString,a=o?o.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),n=t[a];try{t[a]=void 0;var o=!0}catch(t){}var r=s.call(t);return o&&(e?t[a]=n:delete t[a]),r}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var o=n(43),r=n(46),i=n(104),s=n(106),a=n(4),c=n(9),u=n(54);t.exports=function t(e,n,l,h,p){e!==n&&i(n,(function(i,c){if(p||(p=new o),a(i))s(e,n,c,l,t,h,p);else{var f=h?h(u(e,c),i,c+"",e,n,p):void 0;void 0===f&&(f=i),r(e,c,f)}}),c)}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var o=n(14),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=o(e,t);return!(n<0)&&(n==e.length-1?e.pop():r.call(e,n,1),--this.size,!0)}},function(t,e,n){var o=n(14);t.exports=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var o=n(14);t.exports=function(t){return o(this.__data__,t)>-1}},function(t,e,n){var o=n(14);t.exports=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}},function(t,e,n){var o=n(13);t.exports=function(){this.__data__=new o,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var o=n(13),r=n(26),i=n(45);t.exports=function(t,e){var n=this.__data__;if(n instanceof o){var s=n.__data__;if(!r||s.length<199)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var o=n(27),r=n(89),i=n(4),s=n(44),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,p=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||r(t))&&(o(t)?p:a).test(s(t))}},function(t,e,n){var o,r=n(90),i=(o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var o=n(1)["__core-js_shared__"];t.exports=o},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var o=n(93),r=n(13),i=n(26);t.exports=function(){this.size=0,this.__data__={hash:new o,map:new(i||r),string:new o}}},function(t,e,n){var o=n(94),r=n(95),i=n(96),s=n(97),a=n(98);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,t.exports=c},function(t,e,n){var o=n(15);t.exports=function(){this.__data__=o?o(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var o=n(15),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(o){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(e,t)?e[t]:void 0}},function(t,e,n){var o=n(15),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return o?void 0!==e[t]:r.call(e,t)}},function(t,e,n){var o=n(15);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=o&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var o=n(16);t.exports=function(t){var e=o(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var o=n(16);t.exports=function(t){return o(this,t).get(t)}},function(t,e,n){var o=n(16);t.exports=function(t){return o(this,t).has(t)}},function(t,e,n){var o=n(16);t.exports=function(t,e){var n=o(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}},function(t,e,n){var o=n(105)();t.exports=o},function(t,e){t.exports=function(t){return function(e,n,o){for(var r=-1,i=Object(e),s=o(e),a=s.length;a--;){var c=s[t?a:++r];if(!1===n(i[c],c,i))break}return e}}},function(t,e,n){var o=n(46),r=n(48),i=n(49),s=n(50),a=n(51),c=n(17),u=n(2),l=n(110),h=n(18),p=n(27),f=n(4),d=n(32),v=n(33),y=n(54),m=n(113);t.exports=function(t,e,n,b,_,g,x){var $=y(t,n),w=y(e,n),j=x.get(w);if(j)o(t,n,j);else{var A=g?g($,w,n+"",t,e,x):void 0,S=void 0===A;if(S){var E=u(w),O=!E&&h(w),P=!E&&!O&&v(w);A=w,E||O||P?u($)?A=$:l($)?A=s($):O?(S=!1,A=r(w,!0)):P?(S=!1,A=i(w,!0)):A=[]:d(w)||c(w)?(A=$,c($)?A=m($):f($)&&!p($)||(A=a(w))):S=!1}S&&(x.set(w,A),_(A,w,b,g,x),x.delete(w)),o(t,n,A)}}},function(t,e,n){var o=n(1).Uint8Array;t.exports=o},function(t,e,n){var o=n(4),r=Object.create,i=function(){function t(){}return function(e){if(!o(e))return{};if(r)return r(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},function(t,e,n){var o=n(3),r=n(0);t.exports=function(t){return r(t)&&"[object Arguments]"==o(t)}},function(t,e,n){var o=n(8),r=n(0);t.exports=function(t){return r(t)&&o(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var o=n(3),r=n(53),i=n(0),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&r(t.length)&&!!s[o(t)]}},function(t,e,n){var o=n(5),r=n(9);t.exports=function(t){return o(t,r(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o}},function(t,e,n){var o=n(4),r=n(11),i=n(116),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!o(t))return i(t);var e=r(t),n=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&n.push(a);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var o=n(118),r=n(47),i=n(57),s=r?function(t,e){return r(t,"toString",{configurable:!0,enumerable:!1,value:o(e),writable:!0})}:i;t.exports=s},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var n=Date.now;t.exports=function(t){var e=0,o=0;return function(){var r=n(),i=16-(r-o);if(o=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var o=n(34),r=n(5),i=n(35),s=n(8),a=n(11),c=n(12),u=Object.prototype.hasOwnProperty,l=i((function(t,e){if(a(e)||s(e))r(e,c(e),t);else for(var n in e)u.call(e,n)&&o(t,n,e[n])}));t.exports=l},function(t,e,n){var o=n(52)(Object.keys,Object);t.exports=o},function(t,e,n){var o=n(6)(n(1),"DataView");t.exports=o},function(t,e,n){var o=n(6)(n(1),"Promise");t.exports=o},function(t,e,n){var o=n(6)(n(1),"Set");t.exports=o},function(t,e,n){var o=n(6)(n(1),"WeakMap");t.exports=o},function(t,e){t.exports=function(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}},function(t,e,n){var o=n(4),r=n(23),i=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var n=a.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):s.test(t)?NaN:+t}},function(t,e,n){var o=n(37),r=n(129),i=n(146),s=n(40),a=n(5),c=n(154),u=n(155),l=n(67),h=u((function(t,e){var n={};if(null==t)return n;var u=!1;e=o(e,(function(e){return e=s(e,t),u||(u=e.length>1),e})),a(t,l(t),n),u&&(n=r(n,7,c));for(var h=e.length;h--;)i(n,e[h]);return n}));t.exports=h},function(t,e,n){var o=n(43),r=n(130),i=n(34),s=n(131),a=n(132),c=n(48),u=n(50),l=n(133),h=n(135),p=n(136),f=n(67),d=n(22),v=n(137),y=n(138),m=n(51),b=n(2),_=n(18),g=n(142),x=n(4),$=n(144),w=n(12),j={};j["[object Arguments]"]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object DataView]"]=j["[object Boolean]"]=j["[object Date]"]=j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Map]"]=j["[object Number]"]=j["[object Object]"]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object Symbol]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Error]"]=j["[object Function]"]=j["[object WeakMap]"]=!1,t.exports=function t(e,n,A,S,E,O){var P,C=1&n,k=2&n,z=4&n;if(A&&(P=E?A(e,S,E,O):A(e)),void 0!==P)return P;if(!x(e))return e;var U=b(e);if(U){if(P=v(e),!C)return u(e,P)}else{var R=d(e),T="[object Function]"==R||"[object GeneratorFunction]"==R;if(_(e))return c(e,C);if("[object Object]"==R||"[object Arguments]"==R||T&&!E){if(P=k||T?{}:m(e),!C)return k?h(e,a(P,e)):l(e,s(P,e))}else{if(!j[R])return E?e:{};P=y(e,R,C)}}O||(O=new o);var N=O.get(e);if(N)return N;O.set(e,P),$(e)?e.forEach((function(o){P.add(t(o,n,A,o,e,O))})):g(e)&&e.forEach((function(o,r){P.set(r,t(o,n,A,r,e,O))}));var I=z?k?f:p:k?keysIn:w,M=U?void 0:I(e);return r(M||e,(function(o,r){M&&(o=e[r=o]),i(P,r,t(o,n,A,r,e,O))})),P}},function(t,e){t.exports=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o&&!1!==e(t[n],n,t););return t}},function(t,e,n){var o=n(5),r=n(12);t.exports=function(t,e){return t&&o(e,r(e),t)}},function(t,e,n){var o=n(5),r=n(9);t.exports=function(t,e){return t&&o(e,r(e),t)}},function(t,e,n){var o=n(5),r=n(38);t.exports=function(t,e){return o(t,r(t),e)}},function(t,e){t.exports=function(t,e){for(var n=-1,o=null==t?0:t.length,r=0,i=[];++n<o;){var s=t[n];e(s,n,t)&&(i[r++]=s)}return i}},function(t,e,n){var o=n(5),r=n(65);t.exports=function(t,e){return o(t,r(t),e)}},function(t,e,n){var o=n(66),r=n(38),i=n(12);t.exports=function(t){return o(t,i,r)}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,o=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(o.index=t.index,o.input=t.input),o}},function(t,e,n){var o=n(30),r=n(139),i=n(140),s=n(141),a=n(49);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return o(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return r(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(t,n);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return i(t);case"[object Set]":return new c;case"[object Symbol]":return s(t)}}},function(t,e,n){var o=n(30);t.exports=function(t,e){var n=e?o(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var o=n(10),r=o?o.prototype:void 0,i=r?r.valueOf:void 0;t.exports=function(t){return i?Object(i.call(t)):{}}},function(t,e,n){var o=n(143),r=n(19),i=n(20),s=i&&i.isMap,a=s?r(s):o;t.exports=a},function(t,e,n){var o=n(22),r=n(0);t.exports=function(t){return r(t)&&"[object Map]"==o(t)}},function(t,e,n){var o=n(145),r=n(19),i=n(20),s=i&&i.isSet,a=s?r(s):o;t.exports=a},function(t,e,n){var o=n(22),r=n(0);t.exports=function(t){return r(t)&&"[object Set]"==o(t)}},function(t,e,n){var o=n(40),r=n(151),i=n(152),s=n(69);t.exports=function(t,e){return e=o(e,t),null==(t=i(t,e))||delete t[s(r(e))]}},function(t,e,n){var o=n(2),r=n(23),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,e){if(o(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!r(t))||(s.test(t)||!i.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var o=n(149),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=o((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,(function(t,n,o,r){e.push(o?r.replace(i,"$1"):n||t)})),e}));t.exports=s},function(t,e,n){var o=n(150);t.exports=function(t){var e=o(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var o=n(45);function r(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var o=arguments,r=e?e.apply(this,o):o[0],i=n.cache;if(i.has(r))return i.get(r);var s=t.apply(this,o);return n.cache=i.set(r,s)||i,s};return n.cache=new(r.Cache||o),n}r.Cache=o,t.exports=r},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var o=n(153),r=n(70);t.exports=function(t,e){return e.length<2?t:o(t,r(e,0,-1))}},function(t,e,n){var o=n(40),r=n(69);t.exports=function(t,e){for(var n=0,i=(e=o(e,t)).length;null!=t&&n<i;)t=t[r(e[n++])];return n&&n==i?t:void 0}},function(t,e,n){var o=n(32);t.exports=function(t){return o(t)?void 0:t}},function(t,e,n){var o=n(156),r=n(58),i=n(60);t.exports=function(t){return i(r(t,void 0,o),t+"")}},function(t,e,n){var o=n(157);t.exports=function(t){return(null==t?0:t.length)?o(t,1):[]}},function(t,e,n){var o=n(39),r=n(158);t.exports=function t(e,n,i,s,a){var c=-1,u=e.length;for(i||(i=r),a||(a=[]);++c<u;){var l=e[c];n>0&&i(l)?n>1?t(l,n-1,i,s,a):o(a,l):s||(a[a.length]=l)}return a}},function(t,e,n){var o=n(10),r=n(17),i=n(2),s=o?o.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||r(t)||!!(s&&t&&t[s])}},function(t,e,n){var o=n(68),r=n(160),i=n(71),s=n(21),a=n(161),c=n(163),u=n(24);t.exports=function(t,e,n){return n&&"number"!=typeof n&&s(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=u(t))&&("string"==typeof e||null!=e&&!a(e))&&!(e=o(e))&&i(t)?r(c(t),0,n):t.split(e,n):[]}},function(t,e,n){var o=n(70);t.exports=function(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:o(t,e,n)}},function(t,e,n){var o=n(162),r=n(19),i=n(20),s=i&&i.isRegExp,a=s?r(s):o;t.exports=a},function(t,e,n){var o=n(3),r=n(0);t.exports=function(t){return r(t)&&"[object RegExp]"==o(t)}},function(t,e,n){var o=n(164),r=n(71),i=n(165);t.exports=function(t){return r(t)?i(t):o(t)}},function(t,e){t.exports=function(t){return t.split("")}},function(t,e){var n="[\\ud800-\\udfff]",o="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+o+"|"+r+")"+"?",u="[\\ufe0e\\ufe0f]?"+c+("(?:\\u200d(?:"+[i,s,a].join("|")+")[\\ufe0e\\ufe0f]?"+c+")*"),l="(?:"+[i+o+"?",o,s,a,n].join("|")+")",h=RegExp(r+"(?="+r+")|"+l+u,"g");t.exports=function(t){return t.match(h)||[]}},function(t,e,n){var o=n(167),r=n(168),i=n(169),s=n(170),a=n(171),c=n(72),u=n(21),l=n(12),h=n(73),p=n(172),f=n(24),d=/\b__p \+= '';/g,v=/\b(__p \+=) '' \+/g,y=/(__e\(.*?\)|\b__t\)) \+\n'';/g,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,b=/($^)/,_=/['\n\r\u2028\u2029\\]/g,g=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var x=p.imports._.templateSettings||p;n&&u(t,e,n)&&(e=void 0),t=f(t),e=o({},e,x,s);var $,w,j=o({},e.imports,x.imports,s),A=l(j),S=i(j,A),E=0,O=e.interpolate||b,P="__p += '",C=RegExp((e.escape||b).source+"|"+O.source+"|"+(O===h?m:b).source+"|"+(e.evaluate||b).source+"|$","g"),k=g.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";t.replace(C,(function(e,n,o,r,i,s){return o||(o=r),P+=t.slice(E,s).replace(_,a),n&&($=!0,P+="' +\n__e("+n+") +\n'"),i&&(w=!0,P+="';\n"+i+";\n__p += '"),o&&(P+="' +\n((__t = ("+o+")) == null ? '' : __t) +\n'"),E=s+e.length,e})),P+="';\n";var z=g.call(e,"variable")&&e.variable;z||(P="with (obj) {\n"+P+"\n}\n"),P=(w?P.replace(d,""):P).replace(v,"$1").replace(y,"$1;"),P="function("+(z||"obj")+") {\n"+(z?"":"obj || (obj = {});\n")+"var __t, __p = ''"+($?", __e = _.escape":"")+(w?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+P+"return __p\n}";var U=r((function(){return Function(A,k+"return "+P).apply(void 0,S)}));if(U.source=P,c(U))throw U;return U}},function(t,e,n){var o=n(5),r=n(35),i=n(9),s=r((function(t,e,n,r){o(e,i(e),t,r)}));t.exports=s},function(t,e,n){var o=n(59),r=n(36),i=n(72),s=r((function(t,e){try{return o(t,void 0,e)}catch(t){return i(t)?t:new Error(t)}}));t.exports=s},function(t,e,n){var o=n(37);t.exports=function(t,e){return o(e,(function(e){return t[e]}))}},function(t,e,n){var o=n(7),r=Object.prototype,i=r.hasOwnProperty;t.exports=function(t,e,n,s){return void 0===t||o(t,r[n])&&!i.call(s,n)?e:t}},function(t,e){var n={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};t.exports=function(t){return"\\"+n[t]}},function(t,e,n){var o=n(173),r={escape:n(176),evaluate:n(177),interpolate:n(73),variable:"",imports:{_:{escape:o}}};t.exports=r},function(t,e,n){var o=n(174),r=n(24),i=/[&<>"']/g,s=RegExp(i.source);t.exports=function(t){return(t=r(t))&&s.test(t)?t.replace(i,o):t}},function(t,e,n){var o=n(175)({"&":"&","<":"<",">":">",'"':""","'":"'"});t.exports=o},function(t,e){t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},function(t,e){t.exports=/<%-([\s\S]+?)%>/g},function(t,e){t.exports=/<%([\s\S]+?)%>/g},function(t,e,n){var o=n(36),r=n(7),i=n(21),s=n(9),a=Object.prototype,c=a.hasOwnProperty,u=o((function(t,e){t=Object(t);var n=-1,o=e.length,u=o>2?e[2]:void 0;for(u&&i(e[0],e[1],u)&&(o=1);++n<o;)for(var l=e[n],h=s(l),p=-1,f=h.length;++p<f;){var d=h[p],v=t[d];(void 0===v||r(v,a[d])&&!c.call(t,d))&&(t[d]=l[d])}return t}));t.exports=u},function(t,e,n){"use strict";n.r(e);
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const o=window,r=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,i=Symbol(),s=new WeakMap;class a{constructor(t,e,n){if(this._$cssResult$=!0,n!==i)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(r&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(e,t))}return t}toString(){return this.cssText}}const c=(t,...e)=>{const n=1===t.length?t[0]:e.reduce((e,n,o)=>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.")})(n)+t[o+1],t[0]);return new a(n,t,i)},u=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,i))(e)})(t):t
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/;var l;const h=window,p=h.trustedTypes,f=p?p.emptyScript:"",d=h.reactiveElementPolyfillSupport,v={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},y=(t,e)=>e!==t&&(e==e||t==t),m={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:y};class b extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,n)=>{const o=this._$Ep(n,e);void 0!==o&&(this._$Ev.set(o,n),t.push(o))}),t}static createProperty(t,e=m){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,n,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||m}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!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,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of e)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(u(t))}else void 0!==t&&e.push(u(t));return e}static _$Ep(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}u(){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 e,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{r?t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(e=>{const n=document.createElement("style"),r=o.litNonce;void 0!==r&&n.setAttribute("nonce",r),n.textContent=e.cssText,t.appendChild(n)})})(e,this.constructor.elementStyles),e}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 e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)})}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach(t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)})}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EO(t,e,n=m){var o;const r=this.constructor._$Ep(t,n);if(void 0!==r&&!0===n.reflect){const i=(void 0!==(null===(o=n.converter)||void 0===o?void 0:o.toAttribute)?n.converter:v).toAttribute(e,n.type);this._$El=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$El=null}}_$AK(t,e){var n;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(n=t.converter)||void 0===n?void 0:n.fromAttribute)?t.converter:v;this._$El=r,this[r]=i.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,n){let o=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||y)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):o=!1),!this.isUpdatePending&&o&&(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,e)=>this[e]=t),this._$Ei=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),null===(t=this._$ES)||void 0===t||t.forEach(t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)}),this.update(n)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach(t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.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,e)=>this._$EO(e,this[e],t)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var _;b.finalized=!0,b.elementProperties=new Map,b.elementStyles=[],b.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:b}),(null!==(l=h.reactiveElementVersions)&&void 0!==l?l:h.reactiveElementVersions=[]).push("1.6.1");const g=window,x=g.trustedTypes,$=x?x.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,j="?"+w,A=`<${j}>`,S=document,E=()=>S.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,P=Array.isArray,C=t=>P(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,z=/-->/g,U=/>/g,R=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),T=/'/g,N=/"/g,I=/^(?:script|style|textarea|title)$/i,M=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),H=M(1),D=(M(2),Symbol.for("lit-noChange")),L=Symbol.for("lit-nothing"),B=new WeakMap,Y=S.createTreeWalker(S,129,null,!1),q=(t,e)=>{const n=t.length-1,o=[];let r,i=2===e?"<svg>":"",s=k;for(let e=0;e<n;e++){const n=t[e];let a,c,u=-1,l=0;for(;l<n.length&&(s.lastIndex=l,c=s.exec(n),null!==c);)l=s.lastIndex,s===k?"!--"===c[1]?s=z:void 0!==c[1]?s=U:void 0!==c[2]?(I.test(c[2])&&(r=RegExp("</"+c[2],"g")),s=R):void 0!==c[3]&&(s=R):s===R?">"===c[0]?(s=null!=r?r:k,u=-1):void 0===c[1]?u=-2:(u=s.lastIndex-c[2].length,a=c[1],s=void 0===c[3]?R:'"'===c[3]?N:T):s===N||s===T?s=R:s===z||s===U?s=k:(s=R,r=void 0);const h=s===R&&t[e+1].startsWith("/>")?" ":"";i+=s===k?n+A:u>=0?(o.push(a),n.slice(0,u)+"$lit$"+n.slice(u)+w+h):n+w+(-2===u?(o.push(void 0),e):h)}const a=i+(t[n]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==$?$.createHTML(a):a,o]};class V{constructor({strings:t,_$litType$:e},n){let o;this.parts=[];let r=0,i=0;const s=t.length-1,a=this.parts,[c,u]=q(t,e);if(this.el=V.createElement(c,n),Y.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=Y.nextNode())&&a.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(w)){const n=u[i++];if(t.push(e),void 0!==n){const t=o.getAttribute(n.toLowerCase()+"$lit$").split(w),e=/([.?@])?(.*)/.exec(n);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?G:"?"===e[1]?Z:"@"===e[1]?Q:J})}else a.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(I.test(o.tagName)){const t=o.textContent.split(w),e=t.length-1;if(e>0){o.textContent=x?x.emptyScript:"";for(let n=0;n<e;n++)o.append(t[n],E()),Y.nextNode(),a.push({type:2,index:++r});o.append(t[e],E())}}}else if(8===o.nodeType)if(o.data===j)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(w,t+1));)a.push({type:7,index:r}),t+=w.length-1}r++}}static createElement(t,e){const n=S.createElement("template");return n.innerHTML=t,n}}function X(t,e,n=t,o){var r,i,s,a;if(e===D)return e;let c=void 0!==o?null===(r=n._$Co)||void 0===r?void 0:r[o]:n._$Cl;const u=O(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==u&&(null===(i=null==c?void 0:c._$AO)||void 0===i||i.call(c,!1),void 0===u?c=void 0:(c=new u(t),c._$AT(t,n,o)),void 0!==o?(null!==(s=(a=n)._$Co)&&void 0!==s?s:a._$Co=[])[o]=c:n._$Cl=c),void 0!==c&&(e=X(t,c._$AS(t,e.values),c,o)),e}class F{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:n},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:S).importNode(n,!0);Y.currentNode=r;let i=Y.nextNode(),s=0,a=0,c=o[0];for(;void 0!==c;){if(s===c.index){let e;2===c.type?e=new W(i,i.nextSibling,this,t):1===c.type?e=new c.ctor(i,c.name,c.strings,this,t):6===c.type&&(e=new tt(i,this,t)),this._$AV.push(e),c=o[++a]}s!==(null==c?void 0:c.index)&&(i=Y.nextNode(),s++)}return r}v(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class W{constructor(t,e,n,o){var r;this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=X(this,t,e),O(t)?t===L||null==t||""===t?(this._$AH!==L&&this._$AR(),this._$AH=L):t!==this._$AH&&t!==D&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):C(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!==L&&O(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){var e;const{values:n,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=V.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(n);else{const t=new F(r,this),e=t.u(this.options);t.v(n),this.$(e),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new V(t)),e}T(t){P(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,o=0;for(const r of t)o===e.length?e.push(n=new W(this.k(E()),this.k(E()),this,this.options)):n=e[o],n._$AI(r),o++;o<e.length&&(this._$AR(n&&n._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class J{constructor(t,e,n,o,r){this.type=1,this._$AH=L,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=L}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,o){const r=this.strings;let i=!1;if(void 0===r)t=X(this,t,e,0),i=!O(t)||t!==this._$AH&&t!==D,i&&(this._$AH=t);else{const o=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=X(this,o[n+s],e,s),a===D&&(a=this._$AH[s]),i||(i=!O(a)||a!==this._$AH[s]),a===L?t=L:t!==L&&(t+=(null!=a?a:"")+r[s+1]),this._$AH[s]=a}i&&!o&&this.j(t)}j(t){t===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class G extends J{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===L?void 0:t}}const K=x?x.emptyScript:"";class Z extends J{constructor(){super(...arguments),this.type=4}j(t){t&&t!==L?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}class Q extends J{constructor(t,e,n,o,r){super(t,e,n,o,r),this.type=5}_$AI(t,e=this){var n;if((t=null!==(n=X(this,t,e,0))&&void 0!==n?n:L)===D)return;const o=this._$AH,r=t===L&&o!==L||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,i=t!==L&&(o===L||r);r&&this.element.removeEventListener(this.name,this,o),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class tt{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){X(this,t)}}const et=g.litHtmlPolyfillSupport;null==et||et(V,W),(null!==(_=g.litHtmlVersions)&&void 0!==_?_:g.litHtmlVersions=[]).push("2.7.2");
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
var nt,ot;class rt extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,n)=>{var o,r;const i=null!==(o=null==n?void 0:n.renderBefore)&&void 0!==o?o:e;let s=i._$litPart$;if(void 0===s){const t=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:null;i._$litPart$=s=new W(e.insertBefore(E(),t),t,void 0,null!=n?n:{})}return s._$AI(t),s})(e,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 D}}rt.finalized=!0,rt._$litElement$=!0,null===(nt=globalThis.litElementHydrateSupport)||void 0===nt||nt.call(globalThis,{LitElement:rt});const it=globalThis.litElementPolyfillSupport;null==it||it({LitElement:rt});(null!==(ot=globalThis.litElementVersions)&&void 0!==ot?ot:globalThis.litElementVersions=[]).push("3.3.1");
/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/
const st=n(25);function at(t,e,n={},o={}){const r=new Event(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0},o));return r.detail=n,t.dispatchEvent(r),r}function ct(t,e,n,o,r=!1){r&&(o=`return \`${o}\`;`);try{return new Function("states","entity","variables","user","hass","'use strict'; "+o).call(this,t.states,e,n,t.user,t)}catch(t){const e=o.length<=100?o.trim():o.trim().substring(0,98)+"...";throw t.message=`${t.name}: ${t.message} in '${e}'`,t.name="HoneyCombJSTemplateError",t}}function ut(t,e,n,o,r){return lt(t,e,n,Object.assign({},o),r)}function lt(t,e,n,o,r){if(["number","boolean"].includes(typeof o))return o;if(!o)return o;if(["object"].includes(typeof o))return Object.keys(o).forEach(i=>{o[i]=lt(t,e,n,o[i],r)}),o;r&&(o=r(o));const i=o.trim();return"[[["===i.substring(0,3)&&"]]]"===i.slice(-3)?ct(t,e,n,i.slice(3,-3)):"HCJS:"===i.substring(0,5)?ct(t,e,n,i.slice(5)):ct(t,e,n,i,!0)}function ht(t){return st(t)?!(!(t=t.trim())||["undefined","false","0"].includes(t)):t}function pt(t){if(document.querySelector("home-assistant"))return document.querySelector("home-assistant").provideHass(t)}function ft(){if(window.honeycomb_menu_templates)return window.honeycomb_menu_templates;let t=function(){let t=document.querySelector("home-assistant");return t=t&&t.shadowRoot,t=t&&t.querySelector("home-assistant-main"),t=t&&t.shadowRoot,t=t&&t.querySelector("app-drawer-layout partial-panel-resolver")||t.querySelector("ha-drawer partial-panel-resolver"),t=t&&t.shadowRoot||t,t=t&&t.querySelector("ha-panel-lovelace"),t=t&&t.shadowRoot,t=t&&t.querySelector("hui-root"),t&&t.lovelace.config||null}();return t?(window.honeycomb_menu_templates=t.honeycomb_menu_templates||{},t.honeycomb_menu_templates?t.honeycomb_menu_templates:null):null}function dt(t,e){const n={type:"error",error:t,origConfig:e},o=document.createElement("hui-error-card");return customElements.whenDefined("hui-error-card").then(()=>{const t=document.createElement("hui-error-card");t.setConfig(n),o.parentElement&&o.parentElement.replaceChild(t,o)}),o}function vt(t){if(!t||"object"!=typeof t||!t.type)return dt("No card type configured",t);let e=t.type;if(e=e.startsWith("custom:")?e.substr("custom:".length):`hui-${e}-card`,customElements.get(e))return function(t,e){let n=document.createElement(t);try{n.setConfig(JSON.parse(JSON.stringify(e)))}catch(t){n=dt(t,e)}return n}(e,t);const n=dt(`Custom element doesn't exist: ${e}.`,t);n.style.display="None";const o=setTimeout(()=>{n.style.display=""},2e3);return customElements.whenDefined(e).then(()=>{clearTimeout(o),at("ll-rebuild",{},n)}),n}const yt=n(42),mt=n(120),bt=n(62),_t=n(25);class gt extends rt{static get is(){return"honeycomb-menu-item"}static get properties(){return{hass:{type:Object},config:{type:Object},variables:{type:Object},size:{type:Number},color:{type:String},icon:{type:String},action:{type:Object},disabled:{type:Boolean,reflect:!0,attribute:!0},audio:{type:Boolean},autoclose:{type:Boolean},active:{type:Boolean,reflect:!0,attribute:!0}}}set hass(t){this._hass=t,this._computeIsActive()}get hass(){return this._hass}set config(t){"break"==t.type||bt(t)||t.disabled?this.disabled=!0:(this._config=mt({autoclose:!0,audio:!1,active:!1,variables:{}},t),_t(this._config.tap_action)&&(this._config.tap_action={action:this._config.tap_action}),_t(this._config.hold_action)&&(this._config.hold_action={action:this._config.hold_action}),_t(this._config.double_tap_action)&&(this._config.double_tap_action={action:this._config.double_tap_action}),this._config.active||this.style.setProperty("--paper-item-icon-active-color","var(--paper-item-icon-color)"),this._parseTemplates(),this._computeIsActive())}get config(){return this._config}static get styles(){return c`
:host {
}
:host([active]) {
--ha-card-background: var(--ha-card-active-background);
--paper-item-icon-color: var(--paper-item-icon-active-color);
}
.honey {
list-style-type: none;
position: relative;
display: inline-block;
width: 100%;
padding: 0 0 var(--temp, 114.76%) 0;
-o-transform: rotate(-60deg) skewY(30deg);
-moz-transform: rotate(-60deg) skewY(30deg);
-webkit-transform: rotate(-60deg) skewY(30deg);
-ms-transform: rotate(-60deg) skewY(30deg);
transform: rotate(-60deg) skewY(30deg);
overflow: hidden;
visibility: hidden;
z-index:100;
}
.comb {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
-o-transform: skewY(-30deg) rotate(60deg);
-moz-transform: skewY(-30deg) rotate(60deg);
-webkit-transform: skewY(-30deg) rotate(60deg);
-ms-transform: skewY(-30deg) rotate(60deg);
transform: skewY(-30deg) rotate(60deg);
overflow: hidden;
background: #000;
}
.comb * {
visibility: visible;
}
#item {
pointer-events: all;
height: 100%;
}
#item > * {
height: 100%;
}
:host([disabled]) #item {
background: var(--honeycomb-menu-disabled, #9a9a9a6e);
}
`}render(){return H`
<div class="honeycomb">
<div class="honey">
<div class="comb">
<div id="item"></div>
</div>
</div>
</div>`}_computeIsActive(){this.config&&("boolean"==typeof this.config.active&&(this.active=this.config.active&&this.hass.states[this.config.entity]&&"on"==this.hass.states[this.config.entity].state),"string"==typeof this.config.active&&(this.active=ht(lt(this.hass,this.hass.states[this.config.entity],this.config.variables,this.config.active))))}firstUpdated(){this.disabled||this.shadowRoot.querySelector("#item").append(this._createLovelaceCard())}_parseTemplates(){this.config.entity=lt(this.hass,null,this.config.variables,this.config.entity);for(let t in this.config)if(["tap_action","hold_action","double_tap_action"].indexOf(t)>-1){if("honeycomb_menu"in this.config[t]){this.config.variables&&(this.config[t].honeycomb_menu.variables={...this.config.variables,...this.config[t].honeycomb_menu.variables});continue}this.config[t]=ut(this.hass,this.hass.states[this.config.entity],this.config.variables,this.config[t])}}_createLovelaceCard(){this.config.type&&"custom:button-card"!=this.config.type||(this.config.styles||(this.config.styles={}),Array.isArray(this.config.styles.card)||(this.config.styles.card=[]),this.config.styles.card.push({height:"100%",position:"fixed",padding:"0"}));var t=vt(yt({},{type:"custom:button-card",size:"30px",show_name:!1},this.config));return pt(t),t.addEventListener("action",t=>{t.detail.item=this,t.detail.autoclose=this.config.autoclose,t.detail.audio=this.config.audio}),t}}customElements.define(gt.is,gt);const xt=n(63);class $t extends rt{static get is(){return"xy-pad"}static get properties(){return{hass:{type:Object},config:{type:Object},size:{type:Number},clampX:{type:Number},clampY:{type:Number},active:{type:Boolean,reflect:!0,attribute:!0},_current:{type:Object}}}static get styles(){return c`
:host {
position: absolute;
width: 100%;
height: 100%;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
touch-action: none;
}
#joystick {
position: absolute;
pointer-events: all;
background: #cecece7d;
border-radius: 50%;
}
#joystick:hover {
cursor: pointer;
background: #b3b3b3a3;
}
#joystick:active, :host([active]) #joystick {
box-shadow: 0px 0px 2px 5px #fbfbfb;
background: #c5c5c5;
}`}render(){return H`<div id="joystick"></div>`}get joystick(){return this.shadowRoot.querySelector("#joystick")}firstUpdated(){this.config.x||(this.clampX=0),this.config.y||(this.clampY=0),this._setInitCssPositions(),this._bindListeners(),this._reset()}_setInitCssPositions(){const t=this.joystick;t.style.width=this.size+"px",t.style.height=this.size+"px",t.style.left=`calc( 50% - (${this.size}px / 2) )`,t.style.top=`calc( 50% - (${this.size}px / 2) )`}_bindListeners(){this.addEventListener("touchstart",this._handleOnDragStart,!1),this.addEventListener("touchmove",this._handleOnDrag,!1),document.addEventListener("touchend",this._handleOnDragEnd.bind(this),!1),this.addEventListener("mousedown",this._handleOnDragStart,!1),this.addEventListener("mousemove",this._handleOnDrag,!1),document.addEventListener("mouseup",this._handleOnDragEnd.bind(this),!1)}_reset(){this.active=!1,this.style.zIndex=0,this.joystick.style.transform="translate3d(0, 0, 0)",this._current={x:0,y:0},this._interval&&(clearInterval(this._interval),this._interval=null)}_handleOnDragStart(t){this.active=!0,this.style.zIndex=100,this.dispatchEvent(this.__constructEvent("drag-start")),this.config.repeat&&(this._interval=setInterval(t=>{this.dispatchEvent(this.__constructEvent("drag-interval"))},this.config.repeat))}_setPosition(t,e){t=t-this.joystick.offsetLeft-this.size/2,e=e-this.joystick.offsetTop-this.size/2,this._current.x=xt(t,-this.clampX,this.clampX),this._current.y=xt(e,-this.clampY,this.clampY),this.joystick.style.transform=`translate3d(${this._current.x}px, ${this._current.y}px, 0)`,this.dispatchEvent(this.__constructEvent("drag"))}_handleOnDrag(t){if(this.active){if(t.cancelBubble=!0,"touchmove"===t.type){var e=t.target.getBoundingClientRect();t.offsetX=t.targetTouches[0].pageX-e.left,t.offsetY=t.targetTouches[0].pageY-e.top}this._setPosition(t.offsetX,t.offsetY)}}_handleOnDragEnd(t){this.dispatchEvent(this.__constructEvent("drag-end")),this._reset()}__constructEvent(t){return new CustomEvent(t,this.__constructEventData())}__constructEventData(){let t=this.config.x&&this.config.x.invert?-this._current.x:this._current.x,e=this.config.y&&this.config.y.invert?-this._current.y:this._current.y;return{detail:{x:t,y:e,x_percentage:t/this.clampX*100,y_percentage:e/this.clampY*100}}}}customElements.define($t.is,$t);const wt=document.querySelector("home-assistant").hass,jt=n(42),At=n(128),St=n(159),Et=n(63),Ot=n(166),Pt=n(62),Ct=n(25),kt=n(178),zt=new function(){this.honeycomb=null,this.position={x:0,y:0},this.handleXYPosition=function(t){this.position.x="touchstart"===t.type?t.touches[0].clientX:t.clientX,this.position.y="touchstart"===t.type?t.touches[0].clientY:t.clientY}.bind(this)};window.honeycomb_menu=t=>{var e=function t(e,n){if(!n){n=new Array(6);for(let t=0;t<6;t++)n[t]=new Array}function o(t){return t.buttons&&t.buttons.forEach((t,e)=>{t.position?n[t.position].unshift(t):n[e].unshift(t)}),{buttons:n}}e=jt({},e);const r=ft();if(!e.template||!r||!r[e.template])return Object.assign({},e,o(e));let i=t(r[e.template],n);return delete e.template,Object.assign({},i,e,o(e))}(t);e.entity_id&&!e.entity&&(e.entity=e.entity_id),function(t){zt.honeycomb&&zt.honeycomb.close();zt.honeycomb=document.createElement("honeycomb-menu"),zt.honeycomb.setConfig(t),zt.honeycomb.display(function(){let t=document.querySelector("home-assistant");return t=t&&t.shadowRoot,t=t&&t.querySelector("home-assistant-main"),t=t&&t.shadowRoot,t=t&&t.querySelector("app-drawer-layout partial-panel-resolver")||t.querySelector("ha-drawer partial-panel-resolver"),t=t&&t.shadowRoot||t,t=t&&t.querySelector("ha-panel-lovelace"),t=t&&t.shadowRoot,t=t&&t.querySelector("hui-root"),t=t&&t.shadowRoot,t=t&&t.querySelector("ha-app-layout")||t,t=t&&t.querySelector("#view"),t=t&&t.querySelector("hui-view"),t}(),zt.position.x,zt.position.y),zt.honeycomb.addEventListener("closing",t=>{zt.honeycomb=null})}(e)},document.addEventListener("touchstart",zt.handleXYPosition,!1),document.addEventListener("mousedown",zt.handleXYPosition,!1),document.body.addEventListener("ll-custom",t=>{t.detail.honeycomb_menu&&window.honeycomb_menu(t.detail.honeycomb_menu)}),wt._callService=wt.callService,wt.callService=function(t,e,n,o){if("honeycomb"!=t)return wt._callService(t,e,n,o);window.honeycomb_menu(n)};class Ut extends rt{static get is(){return"honeycomb-menu"}static get properties(){return{hass:{type:Object},config:{type:Object},sizes:{type:Object,readonly:!0},variables:{type:Object},closing:{type:Boolean,attribute:!0,reflect:!0},view:{},buttons:{type:Array},_service:{type:Object}}}constructor(){super(),this.closing=!1,this.buttons=[],this._service={x:!1,y:!1}}static get styles(){return c`
@keyframes fadeIn { from {opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes zoomIn {
from {
opacity: 0;
transform: scale3d(0.3, 0.3, 0.3);
}
50% {
opacity: 1;
}
}
@keyframes zoomOut {
from {
opacity: 1;
}
50% {
opacity: 0;
transform: scale3d(0.3, 0.3, 0.3);
}
to {
opacity: 0;
}
}
@keyframes bounceOut {
20% {
-webkit-transform: scale3d(0.9, 0.9, 0.9);
transform: scale3d(0.9, 0.9, 0.9);
}
50%,
55% {
opacity: 1;
-webkit-transform: scale3d(1.1, 1.1, 1.1);
transform: scale3d(1.1, 1.1, 1.1);
}
to {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
}
:host {
position: absolute;
z-index: 8; /*200;*/
}
:host([closing]), :host([closing]) * {
pointer-events: none !important;
}
.shade {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.47);
animation-duration: 1s;
animation-fill-mode: both;
animation-name: fadeIn;
}
:host([closing]) .shade {
animation-name: fadeOut;
animation-duration: 500ms;
}
.honeycombs {
--filter-color: rgba(0, 0, 0, 0.76);
filter: drop-shadow(2px 4px 3px var(--filter-color) );
width: var(--container-width);
height: var(--container-height);
pointer-events: none;
}
honeycomb-menu-item {
position: absolute;
pointer-events: all;
box-sizing: border-box;
width: var(--item-size);
padding: var(--spacing);
}
honeycomb-menu-item, xy-pad {
animation-duration: 0.5s;
animation-fill-mode: both;
animation-name: zoomIn;
}
:host([closing]) honeycomb-menu-item, :host([closing]) xy-pad {
animation-name: zoomOut;
}
:host([closing]) honeycomb-menu-item[selected] {
animation-duration: 0.75s;
animation-name: bounceOut;
}
honeycomb-menu-item:nth-of-type(1), honeycomb-menu-item:nth-of-type(5) {
left: calc( var(--item-size) * 0.5 );
}
honeycomb-menu-item:nth-of-type(2), honeycomb-menu-item:nth-of-type(4) {
left: calc( var(--item-size) * 1.5);
}
honeycomb-menu-item:nth-of-type(3), honeycomb-menu-item:nth-of-type(6) {
top: calc( var(--item-size) * 0.865);
}
honeycomb-menu-item:nth-of-type(4), honeycomb-menu-item:nth-of-type(5) {
top: calc( var(--item-size) * 1.725);
}
honeycomb-menu-item:nth-of-type(3) {
left: calc( var(--item-size) * 2);
}
xy-pad {
width: var(--container-width);
height: var(--container-height);
}`}render(){return H`
<div id="shade" class="shade" @click=${this._handleShadeClick}></div>
${this.config.xy_pad?H`
<xy-pad
style="animation-delay: ${this._computeAnimateDelay(1)};"
.hass=${this.hass}
.config=${this.config.xy_pad}
.size=${this._computeXYPadSize()}
.clampX=${this._computeXYPadClamp()}
.clampY=${this._computeXYPadClamp()}
@drag=${this._handleXYPad}
@drag-interval=${this._handleXYPad}
@drag-end=${this._handleXYPad}>
</xy-pad>`:""}
<div id="honeycombs" class="honeycombs">
${this.buttons.map((t,e)=>H`
<honeycomb-menu-item
style="animation-delay: ${this._computeAnimateDelay(e)};"
.hass=${this.hass}
.config=${this._computeItemConfig(t)}
@action=${this._handleItemAction}>
</honeycomb-menu-item>`)}
</div>`}setConfig(t){pt(this),kt(t,{action:"hold",entity:null,active:!1,autoclose:!0,audio:!1,variables:{},size:225,spacing:2,animation_speed:100}),this.config=t;let e=this.config.size/3.586;this.sizes={item:e,containerWidth:3*e,containerHeight:2.9*e},this.config.xy_pad&&(this.config.xy_pad.x&&(this.config.xy_pad.x.data=this.config.xy_pad.x.data||this.config.xy_pad.x.service_data),this.config.xy_pad.y&&(this.config.xy_pad.y.data=this.config.xy_pad.y.data||this.config.xy_pad.y.service_data)),this._assignButtons()}display(t,e,n){this.view=t,this.view.style.position="relative",this.view.append(this),this._setPosition(e,n)}firstUpdated(){this._setCssVars()}close(t=null){if(this.closing)return;this.closing=!0;let e=t||this.shadowRoot.querySelectorAll("honeycomb-menu-item")[5];t&&(t.setAttribute("selected",""),t.setAttribute("style",`animation-delay: ${this._computeAnimateDelay(3)};`)),at(this,"closing",{item:t}),this.shadowRoot.querySelector("#shade").addEventListener("animationend",(function(t){this.remove()})),e.addEventListener("animationend",e=>{this.remove(),at(this,"closed",{item:t})})}_assignButtons(){this.buttons=[];for(let t=0;t<6;t++){let e={};for(let n of this.config.buttons[t])if(void 0!==n.show?n.show=ht(lt(this.hass,this.hass.states[this.config.entity],this.config.variables,n.show)):"break"!=n&&"skip"!=n&&(n.show=!0),"break"==n||n.show&&"skip"!=n){e=n;break}"break"==e&&(e={}),this.buttons[t]=jt({},e)}}_setPosition(t,e){let n=this.sizes.containerWidth/2,o=this.sizes.containerHeight/2,r={min:{x:parseFloat(window.getComputedStyle(this.view,null).getPropertyValue("padding-left"))+n,y:parseFloat(window.getComputedStyle(this.view,null).getPropertyValue("padding-top"))+o},max:{x:this.view.clientWidth-n,y:this.view.clientHeight-o}},i=this.view.getBoundingClientRect();t=Et(t-i.left,r.min.x,r.max.x-5),e=Et(e-i.top,r.min.y,r.max.y-5),this.style.left=t-n+"px",this.style.top=e-o+"px"}_setCssVarProperty(t,e){this.shadowRoot.querySelector("#honeycombs").style.setProperty(t,`var(${e}, ${this.view.style.getPropertyValue(t)})`,"important")}_setCssVars(){this.style.setProperty("--item-size",this.sizes.item+"px"),this.style.setProperty("--container-width",this.sizes.containerWidth+"px"),this.style.setProperty("--container-height",this.sizes.containerHeight+"px"),this.style.setProperty("--spacing",this.config.spacing+"px"),this._setCssVarProperty("--paper-item-icon-color","--honeycomb-menu-icon-color"),this._setCssVarProperty("--paper-item-icon-active-color","--honeycomb-menu-icon-active-color"),this._setCssVarProperty("--ha-card-background","--honeycomb-menu-background-color"),this._setCssVarProperty("--ha-card-active-background","--honeycomb-menu-active-background-color")}_handleShadeClick(t){t.stopPropagation(),this.close()}_handleItemAction(t){t.detail.item&&(this._playButtonSound(t.detail.item),t.detail.autoclose&&this.close(t.detail.item))}_playButtonSound(t){if(!Ct(t.config.audio))return;let e=document.querySelector("#honeycomb-audio");e||(e=document.createElement("audio"),e.id="honeycomb-audio",document.querySelector("home-assistant").append(e)),e.src=t.config.audio,e.play()}_handleXYPad(t){this.config.xy_pad.on_release&&"drag-end"!=t.type||this.config.xy_pad.repeat&&"drag-interval"!=t.type||["x","y"].forEach(e=>{let n=this.config.xy_pad[e];if(0==t.detail[e]||!n||!n.service||this._service[e])return;this._service[e]=!0;let o=St(n.service,".",2);this.hass.callService(o[0],o[1],this.__renderServiceData(t.detail,n.data)).then(t=>this._service[e]=!1)})}__renderServiceData(t,e){return e?ut(this.hass,this.hass.states[this.config.entity],{...this.config.variables,...t},e,e=>"entity"==e?this.config.entity:Ot(e,{interpolate:/{{([\s\S]+?)}}/g})(t)):new Object}_computeXYPadSize(){return this.config.size/6}_computeXYPadClamp(){return this.config.size/3}_computeItemSize(){return this.config.size/3}_computeItemConfig(t){return Pt(t)?t:At(jt({},this.config,t),["buttons","size","action","xy_pad","spacing"])}_computeAnimateDelay(t){return this.config.animation_speed*t+"ms"}}customElements.define(Ut.is,Ut)}]);