PageSourceSearch

https://tangogrid.com/assets/tango-unlimited-guide-BAFnkGIu.js

js tangogrid.com collected 2026-10-04 13:33:23 UTC 10,438 bytes, 1 lines download raw bytes

1import{X as e,c as t,i as n,q as r}from"./useStore-Bnp9X9K7.js";import{c as i,r as a}from"./utils-DYbAmjaV.js";import{d as ee,f as te,h as ne,l as re,r as ie,u as ae}from"./progress-keys-YrK03vzt.js";import{$d as o,A_ as oe,Af as s,Bd as c,Bf as l,Cf as u,Df as d,Dm as se,Ef as f,Fd as p,Ff as m,Gd as h,Gf as g,Hd as _,Hf as v,Id as y,If as b,Jd as x,Kd as S,Kf as C,Ld as w,Lf as T,Lm as E,Mf as D,Mn as ce,Nf as O,Of as k,Om as le,Pf as A,Qd as j,Rd as M,Rf as N,Sf as P,Tf as ue,Ud as de,Uf as fe,Vd as pe,Vf as F,Wd as I,Wf as L,Xd as R,Yd as z,Zd as B,Zp as me,_f as he,af as ge,an as _e,bf as ve,cf as ye,cp as be,df as xe,ef as Se,ff as Ce,fm as we,gf as Te,hf as Ee,if as De,in as Oe,ip as V,jf as ke,jn as Ae,kf as je,lf as Me,lp as H,mf as Ne,nf as U,od as Pe,of as Fe,on as Ie,op as W,pf as Le,qd as Re,qf as ze,rf as Be,sf as Ve,sp as He,tf as Ue,uf as We,vf as Ge,wf as Ke,xf as qe,yf as Je,zd as Ye,zf as Xe}from"./button-BEP8s8km.js";import{D as Ze,I as Qe,L as $e,O as G,R as K,Z as q,_ as et,g as tt,m as nt,p as J,v as Y,z as rt}from"./index-paIisdzt.js";import{a as it,i as X,n as Z,o as at,r as ot,s as st,t as ct}from"./timed-DC_ReCqZ.js";var lt=q(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),ut=q(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Q=e(r(),1),$=t();function dt({puzzle:e,onNewPuzzle:t,newPuzzleState:r=`idle`,fixedLevel:a=!1,playMode:o=`unlimited`}){let s=n(),c=o===`timed`,l=c?90:0,[u,d]=(0,Q.useState)(!1),[f,p]=(0,Q.useState)(()=>X(e)),[m,h]=(0,Q.useState)(!1),[g,_]=(0,Q.useState)(null),[v,y]=(0,Q.useState)(`loading`),b=J(e,f.game.board),x=g===e.id,S=c&&x&&Z(l,f.seconds,b),C=ot(l,f.seconds),w=Y(e.id),T=w?et(w.levelId,1):null,E=c?ie(e.id):st(e.id),D=u||r===`loading`;(0,Q.useEffect)(()=>{try{let t=it(e,localStorage.getItem(E));p(t),c&&Z(l,t.seconds,J(e,t.game.board))&&_(e.id)}catch{y(`unavailable`)}h(!0)},[e,E,c,l]),(0,Q.useEffect)(()=>{if(m)try{localStorage.setItem(E,at(f)),y(`saved`)}catch{y(`unavailable`)}},[f,m,E]),(0,Q.useEffect)(()=>{if(!m||!x||b||S)return;let e=performance.now(),t=()=>{e=performance.now()},n=window.setInterval(()=>{let t=performance.now(),n=(t-e)/1e3;e=t,!document.hidden&&n<=5&&p(e=>({...e,seconds:c?Math.min(l,e.seconds+Math.min(5,n)):e.seconds+Math.min(5,n)}))},1e3);return document.addEventListener(`visibilitychange`,t),()=>{window.clearInterval(n),document.removeEventListener(`visibilitychange`,t)}},[e.id,m,x,b,S,c,l]);async function O(){if(!D){if(t){t();return}if(!(c||!w)){d(!0);try{let t=await Ze({data:{size:w.slug,exclude:[e.id]}}),n=t&&Y(t.puzzle.id);if(!n)throw Error(`missing puzzle`);await s.navigate({to:`/unlimited/$size/$levelId`,params:{size:n.slug,levelId:String(n.levelId)}})}catch{G.error(V())}finally{d(!1)}}}}async function k(){if(w)try{let e=i(new URL(`/unlimited/${w.slug}/${w.levelId}`,window.location.origin));await navigator.clipboard.writeText(e.href),G.success(_e())}catch{G.error(Oe())}}function A(){p({...X(e),started:!0}),_(e.id)}function j(t){!m||!x||b||S||p(n=>{let r=nt(e,n.game,t);if(r===n.game)return n;let i=r.board!==n.game.board;return{...n,started:!0,game:{...r,past:r.past.slice(-200)},moves:n.moves+ +!!i,hints:n.hints+(i&&t.type===`hint`?1:0)}})}let M=c?Pe():le(),N=c?C:f.seconds,P=c&&!b&&C>0&&C<=10;return(0,$.jsxs)(`section`,{className:`tango-play mx-auto flex w-full max-w-lg flex-col items-center`,"aria-label":oe(),id:`play`,"data-puzzle-id":e.id,"data-size":e.size,"data-play-mode":o,children:[(0,$.jsx)(`div`,{className:`w-[min(calc(100%_-_1rem),450px)]`,children:(0,$.jsx)(ee,{size:e.size})}),(0,$.jsxs)(`div`,{className:`mb-3 flex w-[min(calc(100%_-_1rem),450px)] flex-wrap items-center justify-between gap-x-2 gap-y-2`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(te,{size:e.size}),w&&(0,$.jsxs)(Qe,{children:[(0,$.jsxs)(rt,{className:`group inline-flex h-8 items-center gap-1 rounded-[6px] px-1 text-sm font-semibold text-violet-950 hover:bg-violet-100`,"aria-label":be({id:w.levelId}
1),children:[`#`,w.levelId,(0,$.jsx)(ne,{size:14,className:`group-data-popup-open:rotate-180`,"aria-hidden":`true`})]}),(0,$.jsxs)($e,{align:`start`,className:`w-max min-w-0 rounded-[8px] border-violet-200 bg-[#FFFCF7] p-1 text-violet-950`,children:[(0,$.jsxs)(K,{disabled:D,onClick:()=>{O()},className:`min-h-10 gap-2 rounded-[6px]`,children:[(0,$.jsx)(ut,{"aria-hidden":`true`}),W()]}),!c&&(0,$.jsxs)(K,{onClick:()=>{k()},className:`min-h-10 gap-2 rounded-[6px]`,children:[(0,$.jsx)(lt,{"aria-hidden":`true`}),Ie()]})]})]})]}),(0,$.jsx)(ae,{compact:!0,className:`ml-auto shrink-0 ${P?`border-rose-400 text-rose-800 dark:border-rose-400 dark:text-rose-100`:``}`,solveTimeLabel:M,movesLabel:se(),moves:f.moves,time:ct(N)})]}),(0,$.jsx)(re,{home:!0,started:m&&x,onStart:()=>{m&&(_(e.id),p(e=>({...e,started:!0})))},ready:m,expired:S,onRetry:c?A:void 0,newPuzzlePending:D,victoryTitle:c?void 0:ce({size:e.size}),victoryDescription:c?void 0:Ae(),victoryAction:b&&t?{label:W(),onClick:t}:b&&!c&&a&&w&&T?{label:He(),onClick:()=>{s.navigate({to:`/unlimited/$size/$levelId`,params:{size:w.slug,levelId:String(T)}})}}:S&&t?{label:W(),onClick:t}:void 0,seconds:f.seconds,moves:f.moves,puzzle:e,game:f.game,locked:!m||b||S,onAction:j},e.id),v===`unavailable`&&(0,$.jsx)(`p`,{className:`tango-session-note`,role:`status`,children:we()}),r===`error`&&(0,$.jsx)(`p`,{className:`tango-session-note`,role:`status`,children:V()})]})}function ft(){let e=[[s(),je()],[k(),d()],[f(),ue()],[Ke(),u()]],t=[{slug:`4x4`,label:`4×4`,body:he()},{slug:`6x6`,label:`6×6`,body:Te()},{slug:`8x8`,label:`8×8`,body:Ee()},{slug:`10x10`,label:`10×10`,body:Ne()},{slug:`12x12`,label:`12×12`,body:Le()}],n=[{q:_(),a:pe()},{q:c(),a:Ye()},{q:M(),a:w()},{q:y(),a:p()}];return(0,$.jsxs)(`article`,{className:`tango-guide tango-home-article`,children:[(0,$.jsx)(`h1`,{children:ze()}),(0,$.jsx)(`p`,{children:C()}),(0,$.jsxs)(`section`,{"aria-labelledby":`unlimited-about-title`,children:[(0,$.jsx)(`h2`,{id:`unlimited-about-title`,children:N()}),(0,$.jsx)(`p`,{children:T()}),(0,$.jsx)(`p`,{children:b()})]}),(0,$.jsxs)(`section`,{"aria-labelledby":`unlimited-daily-title`,children:[(0,$.jsx)(`h2`,{id:`unlimited-daily-title`,children:m()}),(0,$.jsxs)(`p`,{children:[A(),` `,(0,$.jsx)(a,{href:`/`,children:D()}),` `,O()]}),(0,$.jsxs)(`table`,{className:`mt-5 w-full table-fixed text-left text-base leading-relaxed sm:text-lg`,"aria-labelledby":`unlimited-daily-title`,children:[(0,$.jsx)(`thead`,{children:(0,$.jsxs)(`tr`,{className:`bg-violet-100/60`,children:[(0,$.jsx)(`th`,{scope:`col`,className:`p-3 align-top wrap-break-word`,children:D()}),(0,$.jsx)(`th`,{scope:`col`,className:`p-3 align-top wrap-break-word`,children:ke()})]})}),(0,$.jsx)(`tbody`,{children:e.map(([e,t])=>(0,$.jsxs)(`tr`,{className:`border-b border-violet-200/60`,children:[(0,$.jsx)(`td`,{className:`p-3 align-top wrap-break-word`,children:e}),(0,$.jsx)(`td`,{className:`p-3 align-top wrap-break-word`,children:t})]},e))})]}),(0,$.jsxs)(`p`,{children:[P(),` `,(0,$.jsx)(a,{href:`/archive`,children:qe()}),` `,ve()]})]}),(0,$.jsxs)(`section`,{"aria-labelledby":`unlimited-sizes-title`,children:[(0,$.jsx)(`h2`,{id:`unlimited-sizes-title`,children:Je()}),(0,$.jsx)(`p`,{children:Ge()}),(0,$.jsx)(`ul`,{className:`mt-5 list-disc space-y-3 pl-6 text-lg leading-relaxed`,children:t.map(({slug:e,label:t,body:n})=>(0,$.jsxs)(`li`,{children:[(0,$.jsx)(a,{href:`/unlimited/${e}`,children:t}),` — `,n]},e))}),(0,$.jsx)(`p`,{children:(0,$.jsx)(a,{href:`/board-sizes`,children:Ce()})})]}),(0,$.jsxs)(`section`,{"aria-labelledby":`unlimited-work-title`,children:[(0,$.jsx)(`h2`,{id:`unlimited-work-title`,children:xe()}),(0,$.jsxs)(`div`,{className:`space-y-7`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h3`,{children:We()}),(0,$.jsx)(`p`,{children:Me()})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h3`,{children:ye()}),(0,$.jsx)(`p`,{children:Ve()})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h3`,{children:Fe()}),(0,$.jsx)(`p`,{children:ge()}),(0,$.jsx)(`p`,{children:De()})]})]}),(0,$.jsxs)(`p`,{children:[Be(),` `,(0,$.jsx)(a,{href:`/how-puzzles-are-made`,children:U()}),`.`]})]}),(0,$.jsxs)(`section`,{"aria-labelledby":`unlimited-learn-title`,children:[(0,$.jsx)(`h2`,{id:`unlimited-learn-title`,children:Ue()}),(0,$.jsx)(`p`,{children:Se()}),(0,$.jsxs)(`p`,{children:[o(),` `,(0,$.jsx)(a,{href:`/how-to-play`,children:j()}),`, `,B(),` `,(0,$.jsx)(a,{href:`/rules`,children:R()}),` `,z(),` `,(0,$.jsx)(a,{href:`/beginners-guide`,children:x()}),`.`]}),(0,$.jsxs)(`p`,{children:[Re(),` `,(0,$.jsx)(a,{href:`/strategy`,children:S()}),` `,h(),` `,(0,$.jsx)(a,{href:`/clue-patterns`,children:I()}),`.`]})]}),(0,$.jsxs)(`section`,{className:`tango-faq-section`,"aria-labelledby":`unlimited-faq-title`,children:[(0,$.jsx)(`h2`,{id:`unlimited-faq-title`,children:de()}),(0,$.jsx)(`div`,{className:`tango-faq-list`,children:n.map(({q:e,a:t})=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h3`,{children:e}),(0,$.jsx)(`p`,{children:t})]},e))})]})]})}function pt({title:e,intro:t}){return(0,$.jsxs)(`article`,{className:`tango-guide tango-home-article`,children:[(0,$.jsx)(`h1`,{children:e}),(0,$.jsx)(`p`,{children:t}),(0,$.jsxs)(`section`,{"aria-labelledby":`unlimited-about-title`,children:[(0,$.jsx)(`h2`,{id:`unlimited-about-title`,children:g()}),(0,$.jsx)(`p`,{children:L()}),(0,$.jsx)(`p`,{children:fe()})]}),(0,$.jsxs)(`section`,{"aria-labelledby":`unlimited-choose-title`,children:[(0,$.jsx)(`h2`,{id:`unlimited-choose-title`,children:v()}),(0,$.jsx)(`p`,{children:F()})]}),(0,$.jsxs)(`section`,{"aria-labelledby":`unlimited-share-title`,children:[(0,$.jsx)(`h2`,{id:`unlimited-share-title`,children:l()}),(0,$.jsx)(`p`,{children:Xe()})]}),(0,$.jsxs)(`section`,{"aria-labelledby":`unlimited-sizes-title`,children:[(0,$.jsx)(`h2`,{id:`unlimited-sizes-title`,children:H()}),(0,$.jsx)(`nav`,{className:`flex flex-wrap gap-x-6 gap-y-3`,"aria-label":H(),children:tt.map(e=>(0,$.jsx)(a,{href:`/unlimited/${e}`,children:e},e))})]}),(0,$.jsx)(`div`,{className:`tango-guide-return`,children:(0,$.jsx)(a,{href:`/`,children:me()})}),(0,$.jsx)(`p`,{className:`tango-independence`,children:E()})]})}export{ft as n,dt as r,pt as t};

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.