Skip to content

Instantly share code, notes, and snippets.

@Mariusthvdb
Last active July 29, 2025 10:59
Show Gist options
  • Select an option

  • Save Mariusthvdb/4901b8b4b502b2634dadba431bbfc004 to your computer and use it in GitHub Desktop.

Select an option

Save Mariusthvdb/4901b8b4b502b2634dadba431bbfc004 to your computer and use it in GitHub Desktop.
Edited fold-entity-row
var t,e,n,i,r,o,a,s,u;function l(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function f(t,e,n){return(e=N(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e,n,i){var r=v(O(1&i?t.prototype:t),e,n);return 2&i&&"function"==typeof r?function(t){return r.apply(n,t)}:r}function v(){return v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=O(t)););return t}(t,e);if(i){var r=Object.getOwnPropertyDescriptor(i,e);return r.get?r.get.call(arguments.length<3?t:n):r.value}},v.apply(null,arguments)}function p(t){return function(t){if(Array.isArray(t))return j(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||P(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(i=o.call(n)).done)&&(s.push(i.value),s.length!==e);u=!0);}catch(t){l=!0,r=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(t,e)||P(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(){var t,e,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function o(n,i,r,o){var u=i&&i.prototype instanceof s?i:s,l=Object.create(u.prototype);return g(l,"_invoke",function(n,i,r){var o,s,u,l=0,c=r||[],h=!1,f={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,s=0,u=t,f.n=n,a}};function d(n,i){for(s=n,u=i,e=0;!h&&l&&!r&&e<c.length;e++){var r,o=c[e],d=f.p,v=o[2];n>3?(r=v===i)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=d&&((r=n<2&&d<o[1])?(s=0,f.v=i,f.n=o[1]):d<v&&(r=n<3||o[0]>i||i>v)&&(o[4]=n,o[5]=i,f.n=v,s=0))}if(r||n>1)return a;throw h=!0,i}return function(r,c,v){if(l>1)throw TypeError("Generator is already running");for(h&&1===c&&d(c,v),s=c,u=v;(e=s<2?t:u)||!h;){o||(s?s<3?(s>1&&(f.n=-1),d(s,u)):f.n=u:f.v=u);try{if(l=2,o){if(s||(r="next"),e=o[r]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=t}else if((e=(h=f.n<0)?u:n.call(i,f))!==a)break}catch(e){o=t,s=1,u=e}finally{l=1}}return{value:e,done:h}}}(n,r,o),!0),l}var a={};function s(){}function u(){}function l(){}e=Object.getPrototypeOf;var c=[][i]?e(e([][i]())):(g(e={},i,(function(){return this})),e),h=l.prototype=s.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,g(t,r,"GeneratorFunction")),t.prototype=Object.create(h),t}return u.prototype=l,g(h,"constructor",l),g(l,"constructor",u),u.displayName="GeneratorFunction",g(l,r,"GeneratorFunction"),g(h),g(h,r,"Generator"),g(h,i,(function(){return this})),g(h,"toString",(function(){return"[object Generator]"})),(_=function(){return{w:o,m:f}})()}function g(t,e,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}g=function(t,e,n,i){if(e)r?r(t,e,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[e]=n;else{var o=function(e,n){g(t,e,(function(t){return this._invoke(e,n,t)}))};o("next",0),o("throw",1),o("return",2)}},g(t,e,n,i)}function b(t,e,n,i,r,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(i,r)}function m(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var o=t.apply(e,n);function a(t){b(o,i,r,a,s,"next",t)}function s(t){b(o,i,r,a,s,"throw",t)}a(void 0)}))}}function $(t,e,n){return e=O(e),function(t,e){if(e&&("object"==U(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return w(t)}(t,E()?Reflect.construct(e,n||[],O(t).constructor):e.apply(t,n))}function w(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}function k(t){var e="function"==typeof Map?new Map:void 0;return k=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(E())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,e);var r=new(t.bind.apply(t,i));return n&&S(r,n.prototype),r}(t,arguments,O(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),S(n,t)},k(t)}function E(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(E=function(){return!!t})()}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},O(t)}function C(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=P(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function P(t,e){if(t){if("string"==typeof t)return j(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(t,e):void 0}}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function T(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,N(i.key),i)}}function R(t,e,n){return e&&x(t.prototype,e),n&&x(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function N(t){var e=function(t,e){if("object"!=U(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=U(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==U(e)?e:e+""}function U(t){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(t)}function M(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===("undefined"==typeof Reflect?"undefined":U(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}"function"==typeof SuppressedError&&SuppressedError;var H=globalThis,D=H.ShadowRoot&&(void 0===H.ShadyCSS||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,I=Symbol(),L=new WeakMap,z=function(){return R((function t(e,n,i){if(T(this,t),this._$cssResult$=!0,i!==I)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}),[{key:"styleSheet",get:function(){var t=this.o,e=this.t;if(D&&void 0===t){var n=void 0!==e&&1===e.length;n&&(t=L.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&L.set(e,t))}return t}},{key:"toString",value:function(){return this.cssText}}])}(),B=D?function(t){return t}:function(t){return t instanceof CSSStyleSheet?function(t){var e,n="",i=C(t.cssRules);try{for(i.s();!(e=i.n()).done;){n+=e.value.cssText}}catch(t){i.e(t)}finally{i.f()}return function(t){return new z("string"==typeof t?t:t+"",void 0,I)}(n)}(t):t},q=Object.is,V=Object.defineProperty,W=Object.getOwnPropertyDescriptor,G=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,Y=Object.getPrototypeOf,K=globalThis,Z=K.trustedTypes,X=Z?Z.emptyScript:"",J=K.reactiveElementPolyfillSupport,Q=function(t,e){return t},tt={toAttribute:function(t,e){switch(e){case Boolean:t=t?X:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute:function(t,e){var 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}},et=function(t,e){return!q(t,e)},nt={attribute:!0,type:String,converter:tt,reflect:!1,useDefault:!1,hasChanged:et};null!==(t=Symbol.metadata)&&void 0!==t||(Symbol.metadata=Symbol("metadata")),null!==(e=K.litPropertyMetadata)&&void 0!==e||(K.litPropertyMetadata=new WeakMap);var it=function(){function t(){var e;return T(this,t),(e=$(this,t))._$Ep=void 0,e.isUpdatePending=!1,e.hasUpdated=!1,e._$Em=null,e._$Ev(),e}return A(t,k(HTMLElement)),R(t,[{key:"_$Ev",value:function(){var t,e=this;this._$ES=new Promise((function(t){return e.enableUpdating=t})),this._$AL=new Map,this._$E_(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((function(t){return t(e)}))}},{key:"addController",value:function(t){var e,n;(null!==(e=this._$EO)&&void 0!==e?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}},{key:"removeController",value:function(t){var e;null===(e=this._$EO)||void 0===e||e.delete(t)}},{key:"_$E_",value:function(){var t,e=new Map,n=C(this.constructor.elementProperties.keys());try{for(n.s();!(t=n.n()).done;){var i=t.value;this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i])}}catch(t){n.e(t)}finally{n.f()}e.size>0&&(this._$Ep=e)}},{key:"createRenderRoot",value:function(){var t,e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return function(t,e){if(D)t.adoptedStyleSheets=e.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet}));else{var n,i=C(e);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=document.createElement("style"),a=H.litNonce;void 0!==a&&o.setAttribute("nonce",a),o.textContent=r.cssText,t.appendChild(o)}}catch(t){i.e(t)}finally{i.f()}}}(e,this.constructor.elementStyles),e}},{key:"connectedCallback",value:function(){var t,e;null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(e=this._$EO)||void 0===e||e.forEach((function(t){var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}},{key:"enableUpdating",value:function(t){}},{key:"disconnectedCallback",value:function(){var t;null===(t=this._$EO)||void 0===t||t.forEach((function(t){var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}},{key:"attributeChangedCallback",value:function(t,e,n){this._$AK(t,n)}},{key:"_$ET",value:function(t,e){var n=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,n);if(void 0!==i&&!0===n.reflect){var r,o=(void 0!==(null===(r=n.converter)||void 0===r?void 0:r.toAttribute)?n.converter:tt).toAttribute(e,n.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}},{key:"_$AK",value:function(t,e){var n=this.constructor,i=n._$Eh.get(t);if(void 0!==i&&this._$Em!==i){var r,o,a,s,u=n.getPropertyOptions(i),l="function"==typeof u.converter?{fromAttribute:u.converter}:void 0!==(null===(r=u.converter)||void 0===r?void 0:r.fromAttribute)?u.converter:tt;this._$Em=i,this[i]=null!==(o=null!==(a=l.fromAttribute(e,u.type))&&void 0!==a?a:null===(s=this._$Ej)||void 0===s?void 0:s.get(i))&&void 0!==o?o:null,this._$Em=null}}},{key:"requestUpdate",value:function(t,e,n){if(void 0!==t){var i,r,o=this.constructor,a=this[t];if(null!=n||(n=o.getPropertyOptions(t)),!((null!==(i=n.hasChanged)&&void 0!==i?i:et)(a,e)||n.useDefault&&n.reflect&&a===(null===(r=this._$Ej)||void 0===r?void 0:r.get(t))&&!this.hasAttribute(o._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}},{key:"C",value:function(t,e,n,i){var r,o,a,s=n.useDefault,u=n.reflect,l=n.wrapped;s&&!(null!==(r=this._$Ej)&&void 0!==r?r:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,null!==(o=null!=i?i:e)&&void 0!==o?o:this[t]),!0!==l||void 0!==i)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===u&&this._$Em!==t&&(null!==(a=this._$Eq)&&void 0!==a?a:this._$Eq=new Set).add(t))}},{key:"_$EP",value:(e=m(_().m((function t(){var e,n;return _().w((function(t){for(;;)switch(t.n){case 0:return this.isUpdatePending=!0,t.p=1,t.n=2,this._$ES;case 2:t.n=4;break;case 3:t.p=3,n=t.v,Promise.reject(n);case 4:if(null==(e=this.scheduleUpdate())){t.n=5;break}return t.n=5,e;case 5:return t.a(2,!this.isUpdatePending)}}),t,this,[[1,3]])}))),function(){return e.apply(this,arguments)})},{key:"scheduleUpdate",value:function(){return this.performUpdate()}},{key:"performUpdate",value:function(){if(this.isUpdatePending){if(!this.hasUpdated){var t;if(null!==(t=this.renderRoot)&&void 0!==t||(this.renderRoot=this.createRenderRoot()),this._$Ep){var e,n=C(this._$Ep);try{for(n.s();!(e=n.n()).done;){var i=y(e.value,2),r=i[0],o=i[1];this[r]=o}}catch(t){n.e(t)}finally{n.f()}this._$Ep=void 0}var a=this.constructor.elementProperties;if(a.size>0){var s,u=C(a);try{for(u.s();!(s=u.n()).done;){var l=y(s.value,2),c=l[0],h=l[1],f=h.wrapped,d=this[c];!0!==f||this._$AL.has(c)||void 0===d||this.C(c,void 0,h,d)}}catch(t){u.e(t)}finally{u.f()}}}var v=!1,p=this._$AL;try{var _;(v=this.shouldUpdate(p))?(this.willUpdate(p),null!==(_=this._$EO)&&void 0!==_&&_.forEach((function(t){var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(p)):this._$EM()}catch(p){throw v=!1,this._$EM(),p}v&&this._$AE(p)}}},{key:"willUpdate",value:function(t){}},{key:"_$AE",value:function(t){var e;null!==(e=this._$EO)&&void 0!==e&&e.forEach((function(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)}},{key:"_$EM",value:function(){this._$AL=new Map,this.isUpdatePending=!1}},{key:"updateComplete",get:function(){return this.getUpdateComplete()}},{key:"getUpdateComplete",value:function(){return this._$ES}},{key:"shouldUpdate",value:function(t){return!0}},{key:"update",value:function(t){var e=this;this._$Eq&&(this._$Eq=this._$Eq.forEach((function(t){return e._$ET(t,e[t])}))),this._$EM()}},{key:"updated",value:function(t){}},{key:"firstUpdated",value:function(t){}}],[{key:"addInitializer",value:function(t){var e;this._$Ei(),(null!==(e=this.l)&&void 0!==e?e:this.l=[]).push(t)}},{key:"observedAttributes",get:function(){return this.finalize(),this._$Eh&&p(this._$Eh.keys())}},{key:"createProperty",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nt;if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){var n=Symbol(),i=this.getPropertyDescriptor(t,n,e);void 0!==i&&V(this.prototype,t,i)}}},{key:"getPropertyDescriptor",value:function(t,e,n){var i,r=null!==(i=W(this.prototype,t))&&void 0!==i?i:{get:function(){return this[e]},set:function(t){this[e]=t}},o=r.get,a=r.set;return{get:o,set:function(e){var i=null==o?void 0:o.call(this);null!=a&&a.call(this,e),this.requestUpdate(t,i,n)},configurable:!0,enumerable:!0}}},{key:"getPropertyOptions",value:function(t){var e;return null!==(e=this.elementProperties.get(t))&&void 0!==e?e:nt}},{key:"_$Ei",value:function(){if(!this.hasOwnProperty(Q("elementProperties"))){var t=Y(this);t.finalize(),void 0!==t.l&&(this.l=p(t.l)),this.elementProperties=new Map(t.elementProperties)}}},{key:"finalize",value:function(){if(!this.hasOwnProperty(Q("finalized"))){if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Q("properties"))){var t,e=this.properties,n=C([].concat(p(G(e)),p(F(e))));try{for(n.s();!(t=n.n()).done;){var i=t.value;this.createProperty(i,e[i])}}catch(t){n.e(t)}finally{n.f()}}var r=this[Symbol.metadata];if(null!==r){var o=litPropertyMetadata.get(r);if(void 0!==o){var a,s=C(o);try{for(s.s();!(a=s.n()).done;){var u=y(a.value,2),l=u[0],c=u[1];this.elementProperties.set(l,c)}}catch(t){s.e(t)}finally{s.f()}}}this._$Eh=new Map;var h,f=C(this.elementProperties);try{for(f.s();!(h=f.n()).done;){var d=y(h.value,2),v=d[0],_=d[1],g=this._$Eu(v,_);void 0!==g&&this._$Eh.set(g,v)}}catch(t){f.e(t)}finally{f.f()}this.elementStyles=this.finalizeStyles(this.styles)}}},{key:"finalizeStyles",value:function(t){var e=[];if(Array.isArray(t)){var n,i=C(new Set(t.flat(1/0).reverse()));try{for(i.s();!(n=i.n()).done;){var r=n.value;e.unshift(B(r))}}catch(t){i.e(t)}finally{i.f()}}else void 0!==t&&e.push(B(t));return e}},{key:"_$Eu",value:function(t,e){var n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}}]);var e}();it.elementStyles=[],it.shadowRootOptions={mode:"open"},it[Q("elementProperties")]=new Map,it[Q("finalized")]=new Map,null!=J&&J({ReactiveElement:it}),(null!==(n=K.reactiveElementVersions)&&void 0!==n?n:K.reactiveElementVersions=[]).push("2.1.0");var rt=globalThis,ot=rt.trustedTypes,at=ot?ot.createPolicy("lit-html",{createHTML:function(t){return t}}):void 0,st="$lit$",ut="lit$".concat(Math.random().toFixed(9).slice(2),"$"),lt="?"+ut,ct="<".concat(lt,">"),ht=document,ft=function(){return ht.createComment("")},dt=function(t){return null===t||"object"!=U(t)&&"function"!=typeof t},vt=Array.isArray,pt="[ \t\n\f\r]",yt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_t=/-->/g,gt=/>/g,bt=RegExp(">|".concat(pt,"(?:([^\\s\"'>=/]+)(").concat(pt,"*=").concat(pt,"*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)"),"g"),mt=/'/g,$t=/"/g,wt=/^(?:script|style|textarea|title)$/i,At=function(t){return function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return{_$litType$:t,strings:e,values:i}}}(1),kt=Symbol.for("lit-noChange"),Et=Symbol.for("lit-nothing"),St=new WeakMap,Ot=ht.createTreeWalker(ht,129);function Ct(t,e){if(!vt(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==at?at.createHTML(e):e}var Pt=function(t,e){for(var n,i=t.length-1,r=[],o=2===e?"<svg>":3===e?"<math>":"",a=yt,s=0;s<i;s++){for(var u=t[s],l=void 0,c=void 0,h=-1,f=0;f<u.length&&(a.lastIndex=f,null!==(c=a.exec(u)));)f=a.lastIndex,a===yt?"!--"===c[1]?a=_t:void 0!==c[1]?a=gt:void 0!==c[2]?(wt.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=bt):void 0!==c[3]&&(a=bt):a===bt?">"===c[0]?(a=null!=n?n:yt,h=-1):void 0===c[1]?h=-2:(h=a.lastIndex-c[2].length,l=c[1],a=void 0===c[3]?bt:'"'===c[3]?$t:mt):a===$t||a===mt?a=bt:a===_t||a===gt?a=yt:(a=bt,n=void 0);var d=a===bt&&t[s+1].startsWith("/>")?" ":"";o+=a===yt?u+ct:h>=0?(r.push(l),u.slice(0,h)+st+u.slice(h)+ut+d):u+ut+(-2===h?s:d)}return[Ct(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]},jt=function(){return R((function t(e,n){var i,r=e.strings,o=e._$litType$;T(this,t),this.parts=[];var a=0,s=0,u=r.length-1,l=this.parts,c=y(Pt(r,o),2),h=c[0],f=c[1];if(this.el=t.createElement(h,n),Ot.currentNode=this.el.content,2===o||3===o){var d=this.el.content.firstChild;d.replaceWith.apply(d,p(d.childNodes))}for(;null!==(i=Ot.nextNode())&&l.length<u;){if(1===i.nodeType){if(i.hasAttributes()){var v,_=C(i.getAttributeNames());try{for(_.s();!(v=_.n()).done;){var g=v.value;if(g.endsWith(st)){var b=f[s++],m=i.getAttribute(g).split(ut),$=/([.?@])?(.*)/.exec(b);l.push({type:1,index:a,name:$[2],strings:m,ctor:"."===$[1]?Ut:"?"===$[1]?Mt:"@"===$[1]?Ht:Nt}),i.removeAttribute(g)}else g.startsWith(ut)&&(l.push({type:6,index:a}),i.removeAttribute(g))}}catch(t){_.e(t)}finally{_.f()}}if(wt.test(i.tagName)){var w=i.textContent.split(ut),A=w.length-1;if(A>0){i.textContent=ot?ot.emptyScript:"";for(var k=0;k<A;k++)i.append(w[k],ft()),Ot.nextNode(),l.push({type:2,index:++a});i.append(w[A],ft())}}}else if(8===i.nodeType)if(i.data===lt)l.push({type:2,index:a});else for(var E=-1;-1!==(E=i.data.indexOf(ut,E+1));)l.push({type:7,index:a}),E+=ut.length-1;a++}}),null,[{key:"createElement",value:function(t,e){var n=ht.createElement("template");return n.innerHTML=t,n}}])}();function Tt(t,e){var n,i,r,o,a,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,u=arguments.length>3?arguments[3]:void 0;if(e===kt)return e;var l=void 0!==u?null===(n=s._$Co)||void 0===n?void 0:n[u]:s._$Cl,c=dt(e)?void 0:e._$litDirective$;return(null===(i=l)||void 0===i?void 0:i.constructor)!==c&&(null!==(r=l)&&void 0!==r&&null!==(o=r._$AO)&&void 0!==o&&o.call(r,!1),void 0===c?l=void 0:(l=new c(t))._$AT(t,s,u),void 0!==u?(null!==(a=s._$Co)&&void 0!==a?a:s._$Co=[])[u]=l:s._$Cl=l),void 0!==l&&(e=Tt(t,l._$AS(t,e.values),l,u)),e}var xt=function(){return R((function t(e,n){T(this,t),this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}),[{key:"parentNode",get:function(){return this._$AM.parentNode}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"u",value:function(t){var e,n=this._$AD,i=n.el.content,r=n.parts,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:ht).importNode(i,!0);Ot.currentNode=o;for(var a=Ot.nextNode(),s=0,u=0,l=r[0];void 0!==l;){var c;if(s===l.index){var h=void 0;2===l.type?h=new Rt(a,a.nextSibling,this,t):1===l.type?h=new l.ctor(a,l.name,l.strings,this,t):6===l.type&&(h=new Dt(a,this,t)),this._$AV.push(h),l=r[++u]}s!==(null===(c=l)||void 0===c?void 0:c.index)&&(a=Ot.nextNode(),s++)}return Ot.currentNode=ht,o}},{key:"p",value:function(t){var e,n=0,i=C(this._$AV);try{for(i.s();!(e=i.n()).done;){var r=e.value;void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,n),n+=r.strings.length-2):r._$AI(t[n])),n++}}catch(t){i.e(t)}finally{i.f()}}}])}(),Rt=function(){function t(e,n,i,r){var o;T(this,t),this.type=2,this._$AH=Et,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=r,this._$Cv=null===(o=null==r?void 0:r.isConnected)||void 0===o||o}return R(t,[{key:"_$AU",get:function(){var t,e;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cv}},{key:"parentNode",get:function(){var t,e=this._$AA.parentNode,n=this._$AM;return void 0!==n&&11===(null===(t=e)||void 0===t?void 0:t.nodeType)&&(e=n.parentNode),e}},{key:"startNode",get:function(){return this._$AA}},{key:"endNode",get:function(){return this._$AB}},{key:"_$AI",value:function(t){t=Tt(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),dt(t)?t===Et||null==t||""===t?(this._$AH!==Et&&this._$AR(),this._$AH=Et):t!==this._$AH&&t!==kt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):function(t){return vt(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator])}(t)?this.k(t):this._(t)}},{key:"O",value:function(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}},{key:"T",value:function(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}},{key:"_",value:function(t){this._$AH!==Et&&dt(this._$AH)?this._$AA.nextSibling.data=t:this.T(ht.createTextNode(t)),this._$AH=t}},{key:"$",value:function(t){var e,n=t.values,i=t._$litType$,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=jt.createElement(Ct(i.h,i.h[0]),this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.p(n);else{var o=new xt(r,this),a=o.u(this.options);o.p(n),this.T(a),this._$AH=o}}},{key:"_$AC",value:function(t){var e=St.get(t.strings);return void 0===e&&St.set(t.strings,e=new jt(t)),e}},{key:"k",value:function(e){vt(this._$AH)||(this._$AH=[],this._$AR());var n,i,r=this._$AH,o=0,a=C(e);try{for(a.s();!(i=a.n()).done;){var s=i.value;o===r.length?r.push(n=new t(this.O(ft()),this.O(ft()),this,this.options)):n=r[o],n._$AI(s),o++}}catch(t){a.e(t)}finally{a.f()}o<r.length&&(this._$AR(n&&n._$AB.nextSibling,o),r.length=o)}},{key:"_$AR",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,e=arguments.length>1?arguments[1]:void 0;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){var n,i=t.nextSibling;t.remove(),t=i}}},{key:"setConnected",value:function(t){var e;void 0===this._$AM&&(this._$Cv=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}])}(),Nt=function(){return R((function t(e,n,i,r,o){T(this,t),this.type=1,this._$AH=Et,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Et}),[{key:"tagName",get:function(){return this.element.tagName}},{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=this.strings,o=!1;if(void 0===r)t=Tt(this,t,e,0),(o=!dt(t)||t!==this._$AH&&t!==kt)&&(this._$AH=t);else{var a,s,u=t;for(t=r[0],a=0;a<r.length-1;a++)(s=Tt(this,u[n+a],e,a))===kt&&(s=this._$AH[a]),o||(o=!dt(s)||s!==this._$AH[a]),s===Et?t=Et:t!==Et&&(t+=(null!=s?s:"")+r[a+1]),this._$AH[a]=s}o&&!i&&this.j(t)}},{key:"j",value:function(t){t===Et?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}])}(),Ut=function(){function t(){var e;return T(this,t),(e=$(this,t,arguments)).type=3,e}return A(t,Nt),R(t,[{key:"j",value:function(t){this.element[this.name]=t===Et?void 0:t}}])}(),Mt=function(){function t(){var e;return T(this,t),(e=$(this,t,arguments)).type=4,e}return A(t,Nt),R(t,[{key:"j",value:function(t){this.element.toggleAttribute(this.name,!!t&&t!==Et)}}])}(),Ht=function(){function t(e,n,i,r,o){var a;return T(this,t),(a=$(this,t,[e,n,i,r,o])).type=5,a}return A(t,Nt),R(t,[{key:"_$AI",value:function(t){var e;if((t=null!==(e=Tt(this,t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0))&&void 0!==e?e:Et)!==kt){var n=this._$AH,i=t===Et&&n!==Et||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==Et&&(n===Et||i);i&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}}},{key:"handleEvent",value:function(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(n=this.options)||void 0===n?void 0:n.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}])}(),Dt=function(){return R((function t(e,n,i){T(this,t),this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}),[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AI",value:function(t){Tt(this,t)}}])}(),It=rt.litHtmlPolyfillSupport;null!=It&&It(jt,Rt),(null!==(i=rt.litHtmlVersions)&&void 0!==i?i:rt.litHtmlVersions=[]).push("3.3.0");var Lt=globalThis,zt=function(){function t(){var e;return T(this,t),(e=$(this,t,arguments)).renderOptions={host:w(e)},e._$Do=void 0,e}return A(t,it),R(t,[{key:"createRenderRoot",value:function(){var e,n,i=d(t,"createRenderRoot",this,3)([]);return null!==(n=(e=this.renderOptions).renderBefore)&&void 0!==n||(e.renderBefore=i.firstChild),i}},{key:"update",value:function(e){var n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),d(t,"update",this,3)([e]),this._$Do=function(t,e,n){var i,r=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:e,o=r._$litPart$;if(void 0===o){var a,s=null!==(a=null==n?void 0:n.renderBefore)&&void 0!==a?a:null;r._$litPart$=o=new Rt(e.insertBefore(ft(),s),s,void 0,null!=n?n:{})}return o._$AI(t),o}(n,this.renderRoot,this.renderOptions)}},{key:"connectedCallback",value:function(){var e;d(t,"connectedCallback",this,3)([]),null===(e=this._$Do)||void 0===e||e.setConnected(!0)}},{key:"disconnectedCallback",value:function(){var e;d(t,"disconnectedCallback",this,3)([]),null===(e=this._$Do)||void 0===e||e.setConnected(!1)}},{key:"render",value:function(){return kt}}])}();zt._$litElement$=!0,zt.finalized=!0,null===(r=Lt.litElementHydrateSupport)||void 0===r||r.call(Lt,{LitElement:zt});var Bt=Lt.litElementPolyfillSupport;null==Bt||Bt({LitElement:zt}),(null!==(o=Lt.litElementVersions)&&void 0!==o?o:Lt.litElementVersions=[]).push("4.2.0");var qt={attribute:!0,type:String,converter:tt,reflect:!1,hasChanged:et};function Vt(t){return function(e,n){return"object"==U(n)?function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qt,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=n.kind,r=n.metadata,o=globalThis.litPropertyMetadata.get(r);if(void 0===o&&globalThis.litPropertyMetadata.set(r,o=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),o.set(n.name,t),"accessor"===i){var a=n.name;return{set:function(n){var i=e.get.call(this);e.set.call(this,n),this.requestUpdate(a,i,t)},init:function(e){return void 0!==e&&this.C(a,void 0,t,e),e}}}if("setter"===i){var s=n.name;return function(n){var i=this[s];e.call(this,n),this.requestUpdate(s,i,t)}}throw Error("Unsupported decorator location: "+i)}(t,e,n):function(t,e,n){var i=e.hasOwnProperty(n);return e.constructor.createProperty(n,t),i?Object.getOwnPropertyDescriptor(e,n):void 0}(t,e,n)}}var Wt=2,Gt=function(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return{_$litDirective$:t,values:n}}},Ft=function(){return R((function t(e){T(this,t)}),[{key:"_$AU",get:function(){return this._$AM._$AU}},{key:"_$AT",value:function(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}},{key:"_$AS",value:function(t,e){return this.update(t,e)}},{key:"update",value:function(t,e){return this.render.apply(this,p(e))}}])}(),Yt=function(t,e){var n=t._$AN;if(void 0===n)return!1;var i,r=C(n);try{for(r.s();!(i=r.n()).done;){var o,a=i.value;null!==(o=a._$AO)&&void 0!==o&&o.call(a,e,!1),Yt(a,e)}}catch(t){r.e(t)}finally{r.f()}return!0},Kt=function(t){var e,n;do{var i;if(void 0===(e=t._$AM))break;(n=e._$AN).delete(t),t=e}while(0===(null===(i=n)||void 0===i?void 0:i.size))},Zt=function(t){for(var e;e=t._$AM;t=e){var n=e._$AN;if(void 0===n)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),Qt(e)}};function Xt(t){void 0!==this._$AN?(Kt(this),this._$AM=t,Zt(this)):this._$AM=t}function Jt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(i))for(var o=n;o<i.length;o++)Yt(i[o],!1),Kt(i[o]);else null!=i&&(Yt(i,!1),Kt(i));else Yt(this,t)}var Qt=function(t){var e,n;t.type==Wt&&(null!==(e=t._$AP)&&void 0!==e||(t._$AP=Jt),null!==(n=t._$AQ)&&void 0!==n||(t._$AQ=Xt))},te=function(){function t(){var e;return T(this,t),(e=$(this,t,arguments))._$AN=void 0,e}return A(t,Ft),R(t,[{key:"_$AT",value:function(e,n,i){d(t,"_$AT",this,3)([e,n,i]),Zt(this),this.isConnected=e._$AU}},{key:"_$AO",value:function(t){var e,n,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t!==this.isConnected&&(this.isConnected=t,t?null===(e=this.reconnected)||void 0===e||e.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),i&&(Yt(this,t),Kt(this))}},{key:"setValue",value:function(t){if(function(t){return void 0===t.strings}(this._$Ct))this._$Ct._$AI(t,this);else{var e=p(this._$Ct._$AH);e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}},{key:"disconnected",value:function(){}},{key:"reconnected",value:function(){}}])}(),ee=function(){return R((function t(e){T(this,t),this.G=e}),[{key:"disconnect",value:function(){this.G=void 0}},{key:"reconnect",value:function(t){this.G=t}},{key:"deref",value:function(){return this.G}}])}(),ne=function(){return R((function t(){T(this,t),this.Y=void 0,this.Z=void 0}),[{key:"get",value:function(){return this.Y}},{key:"pause",value:function(){var t,e=this;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((function(t){return e.Z=t})))}},{key:"resume",value:function(){var t;null!==(t=this.Z)&&void 0!==t&&t.call(this),this.Y=this.Z=void 0}}])}(),ie=function(t){return!function(t){return null===t||"object"!=U(t)&&"function"!=typeof t}(t)&&"function"==typeof t.then},re=1073741823,oe=function(){function t(){var e;return T(this,t),(e=$(this,t,arguments))._$Cwt=re,e._$Cbt=[],e._$CK=new ee(w(e)),e._$CX=new ne,e}return A(t,te),R(t,[{key:"render",value:function(){for(var t,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return null!==(t=n.find((function(t){return!ie(t)})))&&void 0!==t?t:kt}},{key:"update",value:function(t,e){var n=this,i=this._$Cbt,r=i.length;this._$Cbt=e;var o=this._$CK,a=this._$CX;this.isConnected||this.disconnected();for(var s,u=function(){var t=e[l];if(!ie(t))return{v:(n._$Cwt=l,t)};l<r&&t===i[l]||(n._$Cwt=re,r=0,Promise.resolve(t).then(function(){var e=m(_().m((function e(n){var i,r;return _().w((function(e){for(;;)switch(e.n){case 0:if(!a.get()){e.n=2;break}return e.n=1,a.get();case 1:e.n=0;break;case 2:void 0!==(i=o.deref())&&(r=i._$Cbt.indexOf(t))>-1&&r<i._$Cwt&&(i._$Cwt=r,i.setValue(n));case 3:return e.a(2)}}),e)})));return function(t){return e.apply(this,arguments)}}()))},l=0;l<e.length&&!(l>this._$Cwt);l++)if(s=u())return s.v;return kt}},{key:"disconnected",value:function(){this._$CK.disconnect(),this._$CX.pause()}},{key:"reconnected",value:function(){this._$CK.reconnect(this),this._$CX.resume()}}])}(),ae=Gt(oe),se="2.3.2 Edited",ue="SELECTTREE-TIMEOUT";function le(t){return ce.apply(this,arguments)}function ce(){return ce=m(_().m((function t(e){var n,i,r,o=arguments;return _().w((function(t){for(;;)switch(t.n){case 0:if(n=o.length>1&&void 0!==o[1]&&o[1],!(null===(i=e.localName)||void 0===i?void 0:i.includes("-"))){t.n=1;break}return t.n=1,customElements.whenDefined(e.localName);case 1:if(!e.updateComplete){t.n=2;break}return t.n=2,e.updateComplete;case 2:if(!n){t.n=6;break}if(!e.pageRendered){t.n=3;break}return t.n=3,e.pageRendered;case 3:if(!e._panelState){t.n=6;break}r=0;case 4:if(!("loaded"!==e._panelState&&r++<5)){t.n=6;break}return t.n=5,new Promise((function(t){return setTimeout(t,100)}));case 5:t.n=4;break;case 6:return t.a(2)}}),t)}))),ce.apply(this,arguments)}function he(t,e){return fe.apply(this,arguments)}function fe(){return fe=m(_().m((function t(e,n){var i,r,o,a,s,u,l,c,h=arguments;return _().w((function(t){for(;;)switch(t.n){case 0:for(i=h.length>2&&void 0!==h[2]&&h[2],r=[e],"string"==typeof n&&(n=n.split(/(\$| )/));""===n[n.length-1];)n.pop();o=C(n.entries()),t.p=1,o.s();case 2:if((a=o.n()).done){t.n=9;break}if(s=y(a.value,2),s[0],"$"!==(u=s[1])){t.n=4;break}return t.n=3,Promise.all(p(r).map((function(t){return le(t)})));case 3:return r=p(r).map((function(t){return t.shadowRoot})),t.a(3,8);case 4:if(l=r[0]){t.n=5;break}return t.a(2,null);case 5:if(u.trim().length){t.n=6;break}return t.a(3,8);case 6:return t.n=7,le(l);case 7:r=l.querySelectorAll(u);case 8:t.n=2;break;case 9:t.n=11;break;case 10:t.p=10,c=t.v,o.e(c);case 11:return t.p=11,o.f(),t.f(11);case 12:return t.a(2,i?r:r[0])}}),t,null,[[1,10,11,12]])}))),fe.apply(this,arguments)}function de(t,e){return ve.apply(this,arguments)}function ve(){return ve=m(_().m((function t(e,n){var i,r,o=arguments;return _().w((function(t){for(;;)if(0===t.n)return i=o.length>2&&void 0!==o[2]&&o[2],r=o.length>3&&void 0!==o[3]?o[3]:1e4,t.a(2,Promise.race([he(e,n,i),new Promise((function(t,e){return setTimeout((function(){return e(new Error(ue))}),r)}))]).catch((function(t){if(!t.message||t.message!==ue)throw t;return null})))}),t)}))),ve.apply(this,arguments)}function pe(t){return ye.apply(this,arguments)}function ye(){return ye=m(_().m((function t(e){var n,i=arguments;return _().w((function(t){for(;;)switch(t.n){case 0:if(100!=(n=i.length>1&&void 0!==i[1]?i[1]:0)){t.n=1;break}return t.a(2,!1);case 1:if(e){t.n=2;break}return t.a(2,!1);case 2:if("hui-entities-card"!==e.localName){t.n=3;break}return t.a(2,e);case 3:if("hui-picture-elements-card"!==e.localName){t.n=4;break}return t.a(2,e);case 4:if(!e.updateComplete){t.n=5;break}return t.n=5,e.updateComplete;case 5:if(!e.parentElement){t.n=6;break}return t.a(2,pe(e.parentElement,n+1));case 6:if(!e.parentNode){t.n=7;break}return t.a(2,pe(e.parentNode,n+1));case 7:if(!e.host){t.n=8;break}return t.a(2,pe(e.host,n+1));case 8:return t.a(2,!1)}}),t)}))),ye.apply(this,arguments)}var _e=function(t,e){var n=document.body.querySelector("action-handler");n&&n.bind(t,e)},ge=Gt(function(){function t(){return T(this,t),$(this,t,arguments)}return A(t,Ft),R(t,[{key:"update",value:function(t,e){var n=y(e,1)[0];return _e(t.element,n),kt}},{key:"render",value:function(t){}}])}()),be={open:!1,padding:0,group_config:{},tap_unfold:void 0};function me(t){if(void 0!==t)return"string"==typeof t?{entity:t}:t}var $e=function(){function t(){var e;return T(this,t),(e=$(this,t,arguments)).entitiesWarning=!1,e}return A(t,zt),R(t,[{key:"setConfig",value:function(t){var e,n;this._config=t=Object.assign({},be,t),this.open=null!==(n=null!==(e=this.open)&&void 0!==e?e:this._config.open)&&void 0!==n&&n,this._showContent=this.open,this._load_head(),this.rows=[],this._config.open&&this._load_rows()}},{key:"_load_head",value:(c=m(_().m((function t(){var e,n=this;return _().w((function(t){for(;;)switch(t.n){case 0:if(e=me(this._config.entity||this._config.head)){t.n=1;break}throw new Error("No fold head specified");case 1:void 0===this._config.clickable&&void 0===e.entity&&void 0===e.tap_action&&(this._config.clickable=!0),this.head=this._createRow(e,!0),this._config.clickable&&this.head.then(function(){var t=m(_().m((function t(e){var i;return _().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,de(e,"$hui-generic-entity-row$div");case 1:if(!(null==(i=t.v)?void 0:i.actionHandler)){t.n=3;break}return t.n=2,de(e,"$hui-generic-entity-row");case 2:t.v.config.tap_action={action:"fire-dom-event",fold_row:!0},t.n=4;break;case 3:_e(e,{fold_entity_row:!0}),e.addEventListener("action",(function(t){return n.toggle(t)}));case 4:e.tabIndex=0,e.setAttribute("role","switch"),e.ariaLabel=n.open?"Toggle fold closed":"Toggle fold open",e.ariaChecked=n.open?"true":"false";case 5:return t.a(2)}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:return t.a(2)}}),t,this)}))),function(){return c.apply(this,arguments)})},{key:"_load_rows",value:(o=m(_().m((function t(){var e,n,i,r,o=this;return _().w((function(t){for(;;)switch(t.n){case 0:if(!this.rows.length){t.n=1;break}return t.a(2,this.rows);case 1:if(i=me(this._config.entity||this._config.head),r=this._config.entities||this._config.items,!i.entity||void 0!==r){t.n=3;break}if(void 0!==this.hass){t.n=2;break}return t.n=2,new Promise((function(t){return o._hassResolve=t}));case 2:this._hassResolve=void 0,r=null===(n=null===(e=this.hass.states[i.entity])||void 0===e?void 0:e.attributes)||void 0===n?void 0:n.entity_id;case 3:if(void 0!==r){t.n=4;break}throw new Error("No entities specified.");case 4:if(r&&Array.isArray(r)){t.n=5;break}throw new Error("Entities must be a list.");case 5:return t.n=6,Promise.all(r.map(function(){var t=m(_().m((function t(e){return _().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,o._createRow(me(e));case 1:return t.a(2,t.v)}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 6:this.rows=t.v;case 7:return t.a(2)}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"_createRow",value:(r=m(_().m((function t(e){var n,i,r,o,a,s,u,l,c,h=arguments;return _().w((function(t){for(;;)switch(t.n){case 0:return n=h.length>1&&void 0!==h[1]&&h[1],t.n=1,window.loadCardHelpers();case 1:return s=t.v,t.n=2,pe(this);case 2:return u=t.v,l=null!==(o=null!==(i=this._config.state_color)&&void 0!==i?i:null===(r=null==u?void 0:u._config)||void 0===r?void 0:r.state_color)&&void 0!==o?o:null===(a=null==u?void 0:u.config)||void 0===a?void 0:a.state_color,e=Object.assign(Object.assign({state_color:l},n?{}:this._config.group_config),e),c=s.createRowElement(e),this.applyStyle(c,e,n),this.hass&&(c.hass=this.hass),t.a(2,c)}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"applyStyle",value:(i=m(_().m((function t(e,n){var i,r=arguments;return _().w((function(t){for(;;)switch(t.n){case 0:if(!(r.length>2&&void 0!==r[2]&&r[2])){t.n=3;break}if("hui-section-row"!==e.localName){t.n=2;break}return this.classList.add("section-head"),e.style.minHeight="53px",t.n=1,de(e,"$.divider");case 1:(i=t.v)&&(i.style.marginRight="-48px"),t.n=3;break;case 2:this.classList.remove("section-head");case 3:return t.n=4,customElements.whenDefined("card-mod");case 4:customElements.get("card-mod").applyToElement(e,"row",n.card_mod?{style:n.card_mod.style}:n.style?{style:n.style}:{style: "{}"},{config:n});case 5:return t.a(2)}}),t,this)}))),function(t,e){return i.apply(this,arguments)})},{key:"toggle",value:(n=m(_().m((function t(e){var n,i,r,o=this;return _().w((function(t){for(;;)switch(t.n){case 0:if(e&&e.stopPropagation(),n=!this.open,this._container.style.overflow="hidden",!n){t.n=2;break}return this._showContent=!0,t.n=1,this._load_rows();case 1:return t.n=2,new Promise((function(t){return setTimeout(t,0)}));case 2:if(i=this._container.scrollHeight,this._container.style.height=i?"".concat(i,"px"):"auto",n||setTimeout((function(){o._container.style.height="0px"}),0),this.open=n,!this._config.clickable){t.n=4;break}return t.n=3,this.head;case 3:(r=t.v).ariaLabel=this.open?"Toggle fold closed":"Toggle fold open",r.ariaChecked=this.open?"true":"false";case 4:return t.a(2)}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"updated",value:(e=m(_().m((function e(n){var i,r=this;return _().w((function(e){for(;;)switch(e.n){case 0:d(t,"updated",this,3)([n]),n.has("open")&&this._cardMod&&this._cardMod.forEach((function(t){return t.refresh()})),n.has("hass")&&(null===(i=this.rows)||void 0===i||i.forEach((function(t){return t.hass=r.hass})),this.head&&this.head.then((function(t){return t.hass=r.hass})),this._hassResolve&&this._hassResolve());case 1:return e.a(2)}}),e,this)}))),function(t){return e.apply(this,arguments)})},{key:"connectedCallback",value:function(){var e=this;d(t,"connectedCallback",this,3)([]),window.setTimeout((function(){e.isConnected&&!e.entitiesWarning&&pe(e).then((function(t){t||!0===e._config.mute||(e.entitiesWarning=!0,console.group("%cYou are doing it wrong!","color: red; font-weight: bold"),console.info("Fold-entity-row should only EVER be used INSIDE an ENTITIES CARD."),console.info("See https://github.com/thomasloven/lovelace-fold-entity-row/issues/146"),console.info(e),console.groupEnd())}))}),1e3)}},{key:"_customEvent",value:function(t){t.detail.fold_row&&this.toggle(t)}},{key:"_transitionEnd",value:function(t){this._container.style.removeProperty("height"),this._container.style.overflow=this.open?"initial":"hidden",this._showContent=this.open}},{key:"render",value:function(){var t;return At(a||(a=l(['\n <div\n id="head"\n @ll-custom=','\n aria-expanded="','"\n >\n ','\n <ha-icon\n icon="mdi:chevron-down"\n @action=',"\n .actionHandler=",'\n role="','"\n tabindex="','"\n aria-checked=','\n aria-label="','"\n class="','"\n ></ha-icon>\n </div>\n\n <div\n role="region"\n aria-hidden="','"\n style=','\n class="container ','"\n tabindex="-1"\n @transitionend=',"\n >\n ","\n </div>\n "])),this._customEvent,String(this.open),ae(this.head,""),this.toggle,ge({}),this._config.clickable?"":"switch",this._config.clickable?"-1":"0",this.open?"true":"false",this._config.clickable?"":this.open?"Toggle fold closed":"Toggle fold open",this.open?"open":"",!this.open,"padding-left: ".concat(this._config.padding,"px;"),this.open?"expanded":"",this._transitionEnd,null===(t=this.rows)||void 0===t?void 0:t.map((function(t){return At(s||(s=l(["<div>","</div>"])),t)})))}}],[{key:"styles",get:function(){return function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var r=1===t.length?t[0]:n.reduce((function(e,n,i){return e+function(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[i+1]}),t[0]);return new z(r,t,I)}(u||(u=l(["\n #head {\n display: flex;\n align-items: center;\n --toggle-icon-width: 24px;\n }\n #head :not(ha-icon) {\n flex-grow: 1;\n max-width: calc(100% - var(--toggle-icon-width) - 8px);\n }\n #head :not(ha-icon):focus-visible {\n outline: none;\n background: var(--divider-color);\n border-radius: 24px;\n background-size: cover;\n }\n #head :not(ha-icon):focus {\n outline: none;\n }\n\n ha-icon {\n width: var(--toggle-icon-width);\n cursor: pointer;\n border-radius: 50%;\n background-size: cover;\n --mdc-icon-size: var(--toggle-icon-width);\n transition: transform 1ms cubic-bezier(0.4, 0, 0.2, 1);\n color: var(--primary-color);\n }\n ha-icon:focus {\n outline: none;\n background: var(--divider-color);\n }\n ha-icon.open {\n transform: rotate(180deg);\n }\n\n :host(.section-head) ha-icon {\n margin-top: 16px;\n }\n\n .container {\n overflow: hidden;\n transition: height 1ms cubic-bezier(0.4, 0, 0.2, 1);\n height: 0px;\n }\n\n .container.expanded {\n height: auto;\n }\n "])))}}]);var e,n,i,r,o,c}();M([Vt()],$e.prototype,"open",void 0),M([Vt()],$e.prototype,"head",void 0),M([Vt()],$e.prototype,"rows",void 0),M([Vt()],$e.prototype,"entitiesWarning",void 0),M([Vt()],$e.prototype,"hass",void 0),M([function(t){return Vt(h(h({},t),{},{state:!0,attribute:!1}))}()],$e.prototype,"_showContent",void 0),M([function(t){return function(e,n,i){return function(t,e,n){return n.configurable=!0,n.enumerable=!0,Reflect.decorate&&"object"!=U(e)&&Object.defineProperty(t,e,n),n}(e,n,{get:function(){return function(e){var n,i;return null!==(n=null===(i=e.renderRoot)||void 0===i?void 0:i.querySelector(t))&&void 0!==n?n:null}(this)}})}}(".container")],$e.prototype,"_container",void 0),customElements.get("fold-entity-row")||(customElements.define("fold-entity-row",$e),console.info("%cFOLD-ENTITY-ROW ".concat(se," IS INSTALLED"),"color: green; font-weight: bold",""));
@Mariusthvdb
Copy link
Author

Mariusthvdb commented Jul 12, 2025

this is my edited version of the release by Thomas Loven at https://github.com/thomasloven/lovelace-fold-entity-row/releases/tag/v.2.3.2

changed options for:
padding:0
--toggle-icon-width: 24px
color: var(--primary-color)
max-width: calc(100% - var(--toggle-icon-width) - 8px) # to account for the smaller icon, and prevent the divider from overflowing
transition: # set to use 1ms, I dont like the visual lag the release 300/150ms causes, but setting transition to none causes havoc when nesting folds

and finally a mod by @dcapslock to take out the warning when using card-mod.

change:
.applyToElement(e,"row",n.card_mod?n.card_mod.style:n.style,{config:n});
to

.applyToElement(e,"row",n.card_mod?{style:n.card_mod.style}:n.style?{style:n.style}:{style: "{}"},{config:n});


still looking for the correct element to set the label margin to 0 and until then card_modding that with

      card_mod: # !include /config/dashboard/card_mods/label.yaml
        style: |
          .label {
             margin-left: 0px !important;
          }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment