"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[43098],{54497:function(e,n,s){s.d(n,{u:function(){return c}});var r=s(95497),t=s(61051),l=s(57567),i=s(25979),u=s(12463),a=s(16472),f=(s(16280),s(23792),s(36033),s(45367),s(92731),s(26099),s(47764),s(62953),s(5343)),o=s(47777),v=s(27201),h=function(e,n,s){for(var r=new Map,t=n;t<=s;t++)r.set(e[t],t);return r},y=function(e){function n(e){var s;if((0,l.A)(this,n),s=(0,a.A)(this,n,[e]),e.type!==o.OA.CHILD)throw new Error("repeat() can only be used in text expressions");return s}return(0,u.A)(n,e),(0,i.A)(n,[{key:"_getValuesAndKeys",value:function(e,n,s){var r;void 0===s?s=n:void 0!==n&&(r=n);var l,i=[],u=[],a=0,f=(0,t.A)(e);try{for(f.s();!(l=f.n()).done;){var o=l.value;i[a]=r?r(o,a):a,u[a]=s(o,a),a++}}catch(v){f.e(v)}finally{f.f()}return{values:u,keys:i}}},{key:"render",value:function(e,n,s){return this._getValuesAndKeys(e,n,s).values}},{key:"update",value:function(e,n){var s,t=(0,r.A)(n,3),l=t[0],i=t[1],u=t[2],a=(0,v.cN)(e),o=this._getValuesAndKeys(l,i,u),y=o.values,c=o.keys;if(!Array.isArray(a))return this._itemKeys=c,y;for(var d,x,A=null!==(s=this._itemKeys)&&void 0!==s?s:this._itemKeys=[],_=[],K=0,k=a.length-1,p=0,m=y.length-1;K<=k&&p<=m;)if(null===a[K])K++;else if(null===a[k])k--;else if(A[K]===c[p])_[p]=(0,v.lx)(a[K],y[p]),K++,p++;else if(A[k]===c[m])_[m]=(0,v.lx)(a[k],y[m]),k--,m--;else if(A[K]===c[m])_[m]=(0,v.lx)(a[K],y[m]),(0,v.Dx)(e,_[m+1],a[K]),K++,m--;else if(A[k]===c[p])_[p]=(0,v.lx)(a[k],y[p]),(0,v.Dx)(e,a[K],a[k]),k--,p++;else if(void 0===d&&(d=h(c,p,m),x=h(A,K,k)),d.has(A[K]))if(d.has(A[k])){var g=x.get(c[p]),D=void 0!==g?a[g]:null;if(null===D){var O=(0,v.Dx)(e,a[K]);(0,v.lx)(O,y[p]),_[p]=O}else _[p]=(0,v.lx)(D,y[p]),(0,v.Dx)(e,a[K],D),a[g]=null;p++}else(0,v.KO)(a[k]),k--;else(0,v.KO)(a[K]),K++;for(;p<=m;){var w=(0,v.Dx)(e,_[m+1]);(0,v.lx)(w,y[p]),_[p++]=w}for(;K<=k;){var C=a[K++];null!==C&&(0,v.KO)(C)}return this._itemKeys=c,(0,v.mY)(e,_),f.c0}}])}(o.WL),c=(0,o.u$)(y)}}]);
//# sourceMappingURL=43098.ec3a4bd8052a2184.js.map