homeassistant/custom_components/hacs/hacs_frontend_experimental/frontend_es5/4093.6h50EXyvG0E.js

3 lines
16 KiB
JavaScript
Raw Normal View History

2025-01-10 21:08:35 -08:00
/*! For license information please see 4093.6h50EXyvG0E.js.LICENSE.txt */
"use strict";(self.webpackChunkhacs_frontend=self.webpackChunkhacs_frontend||[]).push([[4093],{64093:function(i,t,e){e.r(t),e.d(t,{FlowLayout:function(){return z},flow:function(){return f}});var s=e(93359),h=e(68308),n=e(34541),a=e(47838),r=e(69205),o=e(40039),l=e(71650),_=e(33368),c=e(46097),u=(e(85717),e(37313),e(51358),e(96043),e(46798),e(5239),e(98490),e(78399),e(56086),e(47884),e(81912),e(64584),e(41483),e(12367),e(9454),e(9849),e(50289),e(94167),e(65974),e(76843),function(){function i(t){(0,l.Z)(this,i),this._map=new Map,this._roundAverageSize=!1,this.totalSize=0,!0===(null==t?void 0:t.roundAverageSize)&&(this._roundAverageSize=!0)}return(0,_.Z)(i,[{key:"set",value:function(i,t){var e=this._map.get(i)||0;this._map.set(i,t),this.totalSize+=t-e}},{key:"averageSize",get:function(){if(this._map.size>0){var i=this.totalSize/this._map.size;return this._roundAverageSize?Math.round(i):i}return 0}},{key:"getSize",value:function(i){return this._map.get(i)}},{key:"clear",value:function(){this._map.clear(),this.totalSize=0}}]),i}()),g=e(15723),f=function(i){return Object.assign({type:z},i)};function v(i){return"horizontal"===i?"marginLeft":"marginTop"}function m(i){return"horizontal"===i?"marginRight":"marginBottom"}function d(i,t){var e=[i,t].sort();return e[1]<=0?Math.min.apply(Math,(0,c.Z)(e)):e[0]>=0?Math.max.apply(Math,(0,c.Z)(e)):e[0]+e[1]}var y=function(){function i(){(0,l.Z)(this,i),this._childSizeCache=new u,this._marginSizeCache=new u,this._metricsCache=new Map}return(0,_.Z)(i,[{key:"update",value:function(i,t){var e=this,s=new Set;Object.keys(i).forEach((function(h){var n=Number(h);e._metricsCache.set(n,i[n]),e._childSizeCache.set(n,i[n][(0,g.qF)(t)]),s.add(n),s.add(n+1)}));var h,n=(0,o.Z)(s);try{for(n.s();!(h=n.n()).done;){var a,r,l=h.value,_=(null===(a=this._metricsCache.get(l))||void 0===a?void 0:a[v(t)])||0,c=(null===(r=this._metricsCache.get(l-1))||void 0===r?void 0:r[m(t)])||0;this._marginSizeCache.set(l,d(_,c))}}catch(u){n.e(u)}finally{n.f()}}},{key:"averageChildSize",get:function(){return this._childSizeCache.averageSize}},{key:"totalChildSize",get:function(){return this._childSizeCache.totalSize}},{key:"averageMarginSize",get:function(){return this._marginSizeCache.averageSize}},{key:"totalMarginSize",get:function(){return this._marginSizeCache.totalSize}},{key:"getLeadingMarginValue",value:function(i,t){var e;return(null===(e=this._metricsCache.get(i))||void 0===e?void 0:e[v(t)])||0}},{key:"getChildSize",value:function(i){return this._childSizeCache.getSize(i)}},{key:"getMarginSize",value:function(i){return this._marginSizeCache.getSize(i)}},{key:"clear",value:function(){this._childSizeCache.clear(),this._marginSizeCache.clear(),this._metricsCache.clear()}}]),i}(),z=function(i){function t(){var i;return(0,l.Z)(this,t),(i=(0,h.Z)(this,t,arguments))._itemSize={width:100,height:100},i._physicalItems=new Map,i._newPhysicalItems=new Map,i._metricsCache=new y,i._anchorIdx=null,i._anchorPos=null,i._stable=!0,i._measureChildren=!0,i._estimate=!0,i}return(0,r.Z)(t,i),(0,_.Z)(t,[{key:"measureChildren",get:function(){return this._measureChildren}},{key:"updateItemSizes",value:function(i){this._metricsCache.update(i,this.direction),this._scheduleReflow()}},{key:"_getPhysicalItem",value:function(i){var t;return null!==(t=this._newPhysicalItems.get(i))&&void 0!==t?t:this._physicalItems.get(i)}},{key:"_getSize",value:function(i){return this._getPhysicalItem(i)&&this._metricsCache.getChildSize(i)}},{key:"_getAverageSize",value:function(){return this._metricsCache.averageChildSize||this._itemSize[this._sizeDim]}},{key:"_estimatePosition",value:function(i){var t=this._metricsCache;if(-1===this._first||-1===this._last)return t.averageMarginSize+i*(t.averageMarginSize+this._getAverageSize());if(i<this._first){var e=this._first-i;return this._getPhysicalItem(this._first).pos-(t.getMarginSize(this._first-1)||t.averageMarginSize)-(e*t.averageChildSize+(e-1)*t.averageMarginSize)}var s=i-this._last;return this._getPhysicalItem(this._last).pos+(t.getChildSize(this._last)||t.averageChildSize)+(t.getMarginSize(this._last)||t.average
//# sourceMappingURL=4093.6h50EXyvG0E.js.map