Files
DeviceManager/apps/manager/build/_app/immutable/chunks/each.94f093eb.js

2 lines
875 B
JavaScript

import{t as j,a as q}from "./index.c2fc59c9.js";import{z as B}from "./scheduler.f5cfe514.js";function E(n){return n?.length!==void 0?n:Array.from(n)}function F(n, d){j(n,1,1,()=>{d.delete(n.key)})}function G(n, d, M, v, S, y, c, x, m, z, h, A){let i=n.length,o=y.length,a=i;const w={};for(; a--;)w[n[a].key]=a;const f=[],r=new Map,u=new Map,g=[];for(a=o; a--;){const e=A(S,y,a),t=M(e);let s=c.get(t);s?v&&g.push(()=>s.p(e,d)):(s=z(t,e),s.c()),r.set(t,f[a]=s),t in w&&u.set(t,Math.abs(a-w[t]))}const p=new Set,k=new Set;function _(e){q(e,1),e.m(x,h),c.set(e.key,e),h=e.first,o--}for(; i&&o;){const e=f[o-1],t=n[i-1],s=e.key,l=t.key;e===t?(h=e.first,i--,o--):r.has(l)?!c.has(s)||p.has(s)?_(e):k.has(l)?i--:u.get(s)>u.get(l)?(k.add(s),_(e)):(p.add(l),i--):(m(t,c),i--)}for(; i--;){const e=n[i];r.has(e.key)||m(e,c)}for(; o;)_(f[o-1]);return B(g),f}export{E as e,F as o,G as u};