1window.JSBUILD='2026-10-01 12:00';Promise.withResolvers??=function(){let a,b;return{promise:new Promise((x,y)=>{a=x,b=y}),resolve:a,reject:b}}; 2import{a as c}from"../chunk-KCTW6FPD.js";function r(l,e,m){let s=l.fig,t=e.cellNumber;if(!s||t===void 0||m.game.board.figs[t]===s)return;let i=s.cellNumber;m.game.board.movefig(i,t,null,!1),m.game.send("modpos",i+"-"+t)}c(r,"onDropBoard");function u(l){let e=l.figList;l.nextFig=e[(e.indexOf(l.nextFig)+1)%e.length]}c(u,"movenextfig");function n(l,e){let m=l.target,s=m.classList.contains("fig")&&m,t=m.classList.contains("cell")&&m;if(s){let i=s.fig.cellNumber;if(i<0){if(log("Permutation. Fantom fig on click"),LOCALTEST)debugger;s.fig.hide(),l.stopPropagation();return}i===e.lastCell?e.nextFig===e.firstFig?(e.game.board.movefig(i,-1),e.game.send("modpos",i+"-"),e.lastFig=e.nextFig,log("Permutation: cycle remove fig at "+e.lastCell)):(log(`Permutation: nextfig ${e.nextFig} at ${e.lastCell}`),s.fig.setSrc(e.nextFig),e.game.send("modpos",i+"-"+s.fig.str),e.lastFig=e.nextFig,u(e)):(e.lastCell=i,e.lastFig=e.nextFig=e.firstFig=s.fig.symbol,e.game.board.movefig(i,-1),e.game.send("modpos",i+"-"),log("Permutation: remove fig at "+e.lastCell)),l.stopPropagation()}else if(t){e.lastFig||=e.figList[0],t.cellNumber!==e.lastCell&&(e.firstFig=e.lastFig);let i=e.game.board.setfigat(t.cellNumber,e.lastFig);if(i)e.lastCell=t.cellNumber,e.makeDraggable(i.holder),log("Permutation: add fig at "+t.cellNumber),e.game.send("modpos",t.cellNumber+"-"+i.str),e.nextFig=e.lastFig,u(e);else{let g=`permutation: no fig ${e.lastFig} at ${t.cellNumber}`;log(g),bugReport(g)}l.stopPropagation()}}c(n,"onClickBoard");async function p(l,e,m){let s=await import("./dragmaster_old.js");l.dragSetpos||=new s.Draginfo(l.game);let t=l.dragSetpos;t.nomarks=!0,t.figList=m;let i=[];if(e==="2n"){let g=Math.sqrt(l.cells.length);for(let o=0;o<g;o++)for(let a=o%2;a<g;a+=2)i.push(l.cells[o*g+a])}else for(let g of l.cells)i.push(g);t.allDropHolders=i,t.onDrop=r,t.onClick=n;for(let g in l.figs){let o=l.figs[g];o&&t.makeDraggable(o.holder)}t.startMove({permutation:!0})}c(p,"figures");export{p as figures};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.