diff --git a/package/luci-app-dawnline/Makefile b/package/luci-app-dawnline/Makefile index 477d359..7049dcb 100644 --- a/package/luci-app-dawnline/Makefile +++ b/package/luci-app-dawnline/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-dawnline -PKG_VERSION:=0.12.0 +PKG_VERSION:=0.12.1 PKG_RELEASE:=1 PKG_LICENSE:=MIT # po//dawnline.po becomes luci-i18n-dawnline- (luci.mk), released diff --git a/package/luci-app-dawnline/root/usr/share/dawnline/portal/assets/portal.css b/package/luci-app-dawnline/root/usr/share/dawnline/portal/assets/portal.css index 14b1b18..7190c1b 100644 --- a/package/luci-app-dawnline/root/usr/share/dawnline/portal/assets/portal.css +++ b/package/luci-app-dawnline/root/usr/share/dawnline/portal/assets/portal.css @@ -1 +1 @@ -@font-face{font-family:Geist;src:url(geist-latin-wght-normal.woff2) format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2190-21FF,U+2212,U+2215}@font-face{font-family:Geist;src:url(geist-cyrillic-wght-normal.woff2) format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Geist Mono;src:url(geist-mono-latin-wght-normal.woff2) format("woff2");font-weight:100 900;font-display:swap}:root{color-scheme:dark;--bg: #080808;--raised: #121212;--field: #161616;--knob: #232323;--seg: rgba(237, 237, 237, .05);--seg-shadow: none;--line: rgba(255, 255, 255, .06);--text: #ededed;--text-2: #8c8c8a;--text-3: #4f4f4e;--accent: #4eafff;--accent-ink: #ffffff;--accent-soft: rgba(78, 175, 255, .13);--ok: #57d64b;--ok-soft: rgba(87, 214, 75, .14);--warn: #ff8a3d;--bad: #ff5c5c;--bad-soft: rgba(255, 92, 92, .13);--sel-bg: rgba(131, 209, 255, .25);--sel-fg: #64c6ff;--scrim: rgba(8, 8, 8, .8);--line-glass: rgba(255, 255, 255, .07);--pop-shadow: 0 18px 48px -14px rgba(0, 0, 0, .75);--sheet-shadow: 0 24px 64px -16px rgba(0, 0, 0, .6);--bar: rgba(237, 237, 237, .13);--toast: #232323;--toast-fg: #ededed;--qr-bg: #0a0a0a;--gi-a: rgba(255, 255, 255, .58);--gi-b: rgba(255, 255, 255, .14);--gi-rim: rgba(255, 255, 255, .5);--gi-edge: rgba(0, 0, 0, 0);--gi-detail: #ffffff;--t-grey-a: #cfcfcd;--t-grey-b: #5a5a59;--t-blue-a: #a6d9ff;--t-blue-b: #1d84e6;--t-green-a: #a8f29c;--t-green-b: #3aa32c;--t-red-a: #ffadad;--t-red-b: #dc3a3a;--t-orange-a: #ffc08f;--t-orange-b: #ec6a12;--font: Geist, -apple-system, system-ui, "Segoe UI", sans-serif;--mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;--r-sheet: 36px;--r-card: 28px;--r-row: 20px;--r-field: 16px;--r-tile: 12px;--ease-out: cubic-bezier(.23, 1, .32, 1);--gutter-l: max(16px, env(safe-area-inset-left, 0px));--gutter-r: max(16px, env(safe-area-inset-right, 0px))}@media(prefers-color-scheme:light){:root{color-scheme:light;--bg: #f2f2f1;--raised: #ffffff;--field: #f3f3f2;--knob: #e8e8e7;--seg: #ffffff;--seg-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 .5px rgba(0, 0, 0, .05);--line: rgba(0, 0, 0, .07);--text: #0b0b0b;--text-2: #6d6d6b;--text-3: #a6a6a4;--accent: #2b9dff;--accent-soft: rgba(43, 157, 255, .12);--ok: #33a328;--ok-soft: rgba(51, 163, 40, .12);--warn: #ee6a12;--bad: #e5484d;--bad-soft: rgba(229, 72, 77, .1);--sel-bg: rgba(78, 175, 255, .22);--sel-fg: #0a76cf;--scrim: rgba(236, 236, 235, .62);--line-glass: rgba(0, 0, 0, .07);--pop-shadow: 0 18px 44px -14px rgba(0, 0, 0, .2);--sheet-shadow: 0 24px 64px -18px rgba(0, 0, 0, .22);--bar: rgba(11, 11, 11, .11);--toast: #0b0b0b;--toast-fg: #f2f2f1;--qr-bg: #ffffff;--gi-a: rgba(250, 250, 249, .72);--gi-b: rgba(206, 206, 204, .5);--gi-rim: rgba(255, 255, 255, .9);--gi-edge: rgba(0, 0, 0, .11);--gi-detail: rgba(28, 28, 28, .72);--t-grey-a: #a9a9a7;--t-grey-b: #3d3d3c;--t-blue-a: #7cc4ff;--t-blue-b: #0a6fd6;--t-green-a: #82e070;--t-green-b: #2e8a22;--t-red-a: #ff9090;--t-red-b: #c92a2a}}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;scrollbar-gutter:stable}body{margin:0;background:var(--bg);color:var(--text);font:400 15px/22px var(--font);letter-spacing:-.011em;-webkit-font-smoothing:antialiased;min-height:100vh;min-height:100dvh;cursor:default}body.locked{overflow:hidden}input,textarea,.linkrow .mono,.conf{cursor:text}::selection{background:var(--sel-bg);color:var(--sel-fg)}button{font:inherit;color:inherit;letter-spacing:inherit;background:none;border:0;padding:0;margin:0;cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default}a{color:inherit;text-decoration:none}:focus{outline:none}:focus-visible{outline:2px solid color-mix(in srgb,var(--accent) 65%,transparent);outline-offset:2px}[hidden]{display:none!important}.offscreen{position:fixed;left:-9999px;top:0;opacity:0}.mono{font-family:var(--mono);letter-spacing:0}.num{font-variant-numeric:tabular-nums}.ok-t{color:var(--ok)}.warn-t{color:var(--warn)}.bad-t{color:var(--bad)}.here-t{color:var(--accent)}.i{width:18px;height:18px;flex:none}.gi{width:24px;height:24px;flex:none;overflow:visible;--ta: var(--t-grey-a);--tb: var(--t-grey-b)}.gi.t-blue{--ta: var(--t-blue-a);--tb: var(--t-blue-b)}.gi.t-green{--ta: var(--t-green-a);--tb: var(--t-green-b)}.gi.t-red{--ta: var(--t-red-a);--tb: var(--t-red-b)}.gi.t-orange{--ta: var(--t-orange-a);--tb: var(--t-orange-b)}.gi .ta{stop-color:var(--ta)}.gi .tb{stop-color:var(--tb)}.gi .fa{stop-color:var(--gi-a)}.gi .fb{stop-color:var(--gi-b)}.gi .fc{stop-color:var(--ta);stop-opacity:.28}.gi .ge{stroke:var(--gi-edge)}.gi .gr{stroke:var(--gi-rim)}.gi .gd{stroke:var(--gi-detail)}.gi .gdf{color:var(--gi-detail)}.knob{width:32px;height:32px;border-radius:50%;background:var(--knob);color:var(--text);display:grid;place-items:center;flex:none;transition:transform .15s var(--ease-out),background-color .15s}.knob:hover{background:color-mix(in srgb,var(--knob),var(--text) 6%)}.knob:active{transform:scale(.8)}.knob .i{width:16px;height:16px}.knob.back .i{transform:rotate(180deg)}.knob[aria-expanded=true]{background:color-mix(in srgb,var(--knob),var(--text) 10%)}.btn{height:48px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 20px;font-size:16px;font-weight:500;letter-spacing:-.015em;user-select:none;-webkit-user-select:none;transition:transform .2s var(--ease-out),background-color .2s var(--ease-out),color .2s var(--ease-out)}.btn:active{transform:scale(.95)}.btn.block{width:100%}.btn.sm{height:40px;font-size:15px;padding:0 16px}.btn.accent{background:var(--accent);color:var(--accent-ink);font-weight:600}.btn.accent:hover{background:color-mix(in srgb,var(--accent) 82%,transparent)}.btn.tint{background:var(--accent-soft);color:var(--accent);font-weight:600}.btn.tint:hover{background:color-mix(in srgb,var(--accent) 20%,transparent)}.btn.tint:active{background:color-mix(in srgb,var(--accent) 24%,transparent)}.btn.soft{background:var(--knob);color:var(--text)}.btn.soft:hover{background:color-mix(in srgb,var(--knob),var(--text) 6%)}.btn.red{background:var(--bad);color:#fff;font-weight:600}.busy{position:relative}.orb{position:absolute;inset:0;margin:auto;width:28px;height:28px;overflow:hidden;contain:strict;pointer-events:none}.orb i{position:absolute;left:50%;top:50%;width:7px;height:7px;margin:-3.5px 0 0 -3.5px;border-radius:50%;background:currentColor;animation:orb-converge 1.8s linear infinite both}.orb i:nth-child(2){animation:orb-breathe 1.8s ease-in-out infinite both}@keyframes orb-converge{0%{transform:translateY(-5px) scale(1);filter:blur(0);animation-timing-function:linear}10%{transform:translateY(-5px) scale(1);filter:blur(0);animation-timing-function:cubic-bezier(.55,0,1,.45)}22%{transform:translate(2.15px,-1.25px) scale(.72);filter:blur(.8px);animation-timing-function:cubic-bezier(.33,1,.68,1)}33%{transform:translate(4.3px,2.5px) scale(1);filter:blur(0);animation-timing-function:linear}43%{transform:translate(4.3px,2.5px) scale(1);filter:blur(0);animation-timing-function:cubic-bezier(.55,0,1,.45)}55%{transform:translateY(2.5px) scale(.72);filter:blur(.8px);animation-timing-function:cubic-bezier(.33,1,.68,1)}66%{transform:translate(-4.3px,2.5px) scale(1);filter:blur(0);animation-timing-function:linear}77%{transform:translate(-4.3px,2.5px) scale(1);filter:blur(0);animation-timing-function:cubic-bezier(.55,0,1,.45)}88%{transform:translate(-2.15px,-1.25px) scale(.72);filter:blur(.8px);animation-timing-function:cubic-bezier(.33,1,.68,1)}to{transform:translateY(-5px) scale(1);filter:blur(0)}}@keyframes orb-breathe{0%,to{opacity:.16;filter:blur(2.4px);transform:scale(1.2)}50%{opacity:.32;filter:blur(1.6px);transform:scale(.98)}}.field{height:48px;border-radius:var(--r-field);background:var(--field);display:flex;align-items:center;gap:12px;padding:0 4px 0 16px;overflow:hidden;transition:box-shadow .2s var(--ease-out)}.field:focus-within{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--text) 16%,transparent)}.field input{flex:1;min-width:0;border:0;outline:0;background:transparent;padding:0;font:500 16px/24px var(--font);color:var(--text);letter-spacing:-.012em}.field input::placeholder{color:var(--text-3)}.go{width:48px;height:40px;border-radius:12px;background:var(--knob);color:var(--text-3);display:grid;place-items:center;flex:none;transition:background-color .2s var(--ease-out),color .2s var(--ease-out),transform .2s var(--ease-out)}.go .i{width:20px;height:20px}.go.ready{background:var(--accent);color:var(--accent-ink)}.go.ready:active{transform:scale(.9)}.go:not(.ready){cursor:not-allowed}.seg{position:relative;display:flex;align-items:center;height:48px;padding:0 4px;border-radius:var(--r-field);background:var(--field)}.seg-pill{position:absolute;left:0;top:4px;height:40px;border-radius:12px;background:var(--seg);box-shadow:var(--seg-shadow);pointer-events:none}.seg-b{position:relative;z-index:1;height:40px;font-size:16px;font-weight:500;color:var(--text-3);white-space:nowrap;transition:color .2s var(--ease-out)}.seg-b.on{color:var(--text)}.seg-b:not(.on):hover{color:var(--text-2)}.appseg .seg-b{flex:0 0 56px;display:flex;align-items:center;justify-content:center;justify-content:safe center;gap:8px;padding:0 18px;overflow:hidden}.appseg .seg-b.on{flex:1 1 56px}.appseg .seg-b .i{width:20px;height:20px}.appseg .seg-l{max-width:0;opacity:0;margin-left:-8px;overflow:hidden;white-space:nowrap}.appseg .seg-b.on .seg-l{max-width:180px;opacity:1;margin-left:0}.appseg{container-type:inline-size}@container (max-width: 300px){.appseg .seg-b{flex-basis:44px;padding:0 12px}}.kinds{display:grid;grid-template-columns:repeat(var(--n, 4),minmax(0,1fr));gap:8px;position:relative;container-type:inline-size}.kind{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;color:var(--text-3);font-size:12px;line-height:16px;font-weight:500;transition:color .2s var(--ease-out)}.kind-tile{width:100%;height:56px;border-radius:14px;background:var(--field);display:grid;place-items:center;transition:background-color .2s var(--ease-out),transform .2s var(--ease-out),box-shadow .22s var(--ease-out)}.kind.on .kind-tile{box-shadow:inset 0 0 0 1.5px var(--accent)}.kind-lbl{white-space:nowrap}.kind:hover .kind-tile,.kind:focus-visible .kind-tile{background:var(--knob)}.kind:active .kind-tile{transform:scale(.94)}.kind:focus-visible{outline:none}.kind:focus-visible .kind-lbl,.kind.on{color:var(--text)}.kind .gi{width:26px;height:26px;filter:grayscale(1);opacity:.55;transition:filter .26s var(--ease-out),opacity .26s var(--ease-out)}.kind.on .gi{filter:none;opacity:1}@container (max-width: 330px){.kind-tile{height:50px}.kind{font-size:11.5px}}.or{display:flex;align-items:center;gap:12px;margin:22px 0;color:var(--text-3);font-size:12px;font-weight:500;letter-spacing:.06em}.or:before,.or:after{content:"";flex:1;height:1px;background:var(--line)}.badge{width:100%;text-align:left;display:flex;align-items:center;gap:12px;height:60px;padding:0 14px 0 12px;border-radius:18px;background:var(--field);transition:background-color .2s,transform .2s var(--ease-out)}.badge:hover{background:var(--knob)}.badge:active{transform:scale(.98)}.badge .b-ic{width:36px;height:36px;border-radius:10px;background:var(--text);color:var(--raised);display:grid;place-items:center;flex:none}.badge .b-ic .i{width:20px;height:20px}.badge .b-t{flex:1;min-width:0;display:flex;flex-direction:column}.badge .b-top{font-size:12px;line-height:16px;color:var(--text-2)}.badge .b-main{font-size:15px;line-height:20px;font-weight:500}.badge>.i{color:var(--text-3);width:16px;height:16px}.badge.primary .b-ic{background:var(--accent-soft);color:var(--accent)}.badges2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.badges2 .badge{padding:0 10px;gap:10px}.badges2 .badge>.i{display:none}.badges2 .b-ic{width:32px;height:32px}.hint{margin:0;font-size:13px;line-height:18px;color:var(--text-2)}.hint a,.hint button{color:var(--accent);font-weight:500}.howto{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px;color:var(--text-2)}.howto li{display:inline-flex;align-items:center;gap:6px}.howto li+li:before{content:"\203a";color:var(--text-3)}.howto b{color:var(--text);font-weight:500}.linkrow{display:flex;align-items:center;gap:8px;height:44px;padding:0 4px 0 14px;border-radius:14px;background:color-mix(in srgb,var(--knob) 72%,var(--field))}.view>.linkrow{background:var(--field)}.linkrow .mono{flex:1;min-width:0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;user-select:all}.linkrow .knob{width:36px;height:36px;border-radius:10px;background:transparent}.linkrow .knob:hover{background:var(--knob)}.qrbox{position:relative;width:148px;height:148px;flex:none;border-radius:18px;overflow:hidden;background:var(--qr-bg)}.qrbox.light{box-shadow:inset 0 0 0 1px var(--line)}.qrbox.big{width:208px;height:208px;border-radius:24px;align-self:center}.qrbox.big+.linkrow{margin-top:16px}.qrbox.dense{width:100%;max-width:none;height:auto;aspect-ratio:1;align-self:stretch;border-radius:22px}.qrbox svg{display:block;width:100%;height:100%}.qrbox>svg.old{position:absolute;inset:0}.coderow{display:flex;gap:14px;align-items:flex-start}.coderow.stacked{flex-direction:column;align-items:stretch}.coderow .side{position:relative;display:flex;flex-direction:column;gap:8px;min-width:0;font-size:14px;line-height:20px;color:var(--text-2)}.coderow .side b{color:var(--text);font-weight:500}.side .words{display:flex;flex-direction:column;gap:8px}.side .words.old{position:absolute;left:0;right:0;top:0;pointer-events:none}.side .arr{color:var(--text-2);font-weight:400;margin:0 6px}@media(max-width:380px){.coderow{flex-direction:column}}@media(prefers-reduced-motion:reduce){.orb i{animation:none;opacity:.3;filter:blur(1.4px)}.orb i:first-child{opacity:1;filter:none}}.mt{position:relative}.mt-ib{display:inline-block;white-space:nowrap}.mt-new{white-space:nowrap}.mt-old{position:absolute;white-space:nowrap;pointer-events:none}.mt-new.w,.mt-old.w{white-space:inherit}.mt-new i,.mt-old i{font-style:normal;display:inline-block;white-space:pre}.bars{--gap: 3px;position:relative;display:flex;flex:none;margin-inline:calc(var(--gap) / -2)}.bars-week{--gap: 4px}.bars .col{display:flex;flex-direction:column;padding-inline:calc(var(--gap) / 2)}.bars-month .col{flex:1;min-width:0}.bars .half{display:flex;flex-direction:column}.bars .half.top{justify-content:flex-end;margin-bottom:3px}.bars i{display:block;border-radius:2.5px;transition:background-color .12s}.bars-week i{width:6px;border-radius:3px;transition-duration:.15s}.bars .dn{background:color-mix(in srgb,var(--text) 24%,transparent)}.bars .up{background:color-mix(in srgb,var(--text) 11%,transparent)}.bars .today .dn{background:var(--accent)}.bars .today .up{background:color-mix(in srgb,var(--accent) 45%,transparent)}.bars .col:not(.future):hover .dn{background:var(--text-2)}.bars .col:not(.future):hover .up{background:color-mix(in srgb,var(--text-2) 50%,transparent)}.bars .today:hover .dn{background:color-mix(in srgb,var(--accent) 75%,var(--text))}.bars .future i{height:3px;background:color-mix(in srgb,var(--bar) 45%,transparent)}.bars .axis{position:absolute;left:calc(var(--gap) / 2);right:calc(var(--gap) / 2);height:1px;background:var(--line);pointer-events:none}.ud{display:inline-flex;align-items:center;gap:10px;white-space:nowrap}.ud>span{display:inline-flex;align-items:center;gap:2px}.ud .i{width:.8em;height:.8em;stroke-width:2.2;color:var(--text-2)}.ud-dn .i{transform:rotate(90deg)}.ud-up{color:var(--text-2)}.ud-up .i{transform:rotate(-90deg);color:var(--text-3)}.acc{display:flex;flex-direction:column}.acc-row{background:var(--raised);overflow:hidden;border-radius:0;padding:0 8px;transition:background-color .15s}.acc-row.rt{border-top-left-radius:var(--r-row);border-top-right-radius:var(--r-row)}.acc-row.rb{border-bottom-left-radius:var(--r-row);border-bottom-right-radius:var(--r-row)}.acc-row.open{margin-block:10px}.acc-row.open:first-child{margin-top:0}.acc-row.open:last-child{margin-bottom:0}.acc-row:not(.open):not(.still):hover{background:color-mix(in srgb,var(--raised),var(--knob) 40%)}.acc-head{width:100%;display:flex;align-items:center;gap:10px;height:52px;padding:0 6px 0 8px;text-align:left}.acc-row.still .acc-head{cursor:default;padding-right:10px}.acc-head .gi{width:22px;height:22px}.acc-title{flex:1;min-width:0;font-size:15px;font-weight:500;letter-spacing:-.02em;display:flex;align-items:center;gap:8px}.acc-title .t{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.acc-val{display:flex;align-items:center;gap:8px;color:var(--text-2);font-size:14px;white-space:nowrap;transition:opacity .2s var(--ease-out),filter .2s var(--ease-out),transform .26s var(--ease-out)}.acc-val>span{display:inline-flex;align-items:center;gap:8px}.acc-row.open .acc-val.hide-open{opacity:0;filter:blur(4px);transform:translate(8px);pointer-events:none}.acc-chev{width:16px;height:16px;color:var(--text-2);transform:rotate(90deg);transition:transform var(--spring-soft-dur, .47s) var(--spring-soft, ease)}.acc-row.open .acc-chev{transform:rotate(-90deg)}.acc-body{display:none;padding:0 8px 16px 40px}.acc-row.open .acc-body,.acc-row.closing .acc-body{display:flex;flex-direction:column;gap:12px}.acc .desc{margin:0;font-size:14px;line-height:20px;opacity:.6}.acc.inset .acc-row{background:var(--field)}.acc.inset .acc-row:not(.open):not(.still):hover{background:color-mix(in srgb,var(--field),var(--knob) 50%)}.acc.inset .acc-body{padding-left:8px}.acc.inset .seg{background:color-mix(in srgb,var(--knob) 65%,var(--field))}@media(prefers-reduced-motion:reduce){.acc-chev{transition:none}}.edge-fade{position:fixed;left:0;right:0;z-index:30;pointer-events:none}.edge-fade.top{top:0;height:calc(80px + env(safe-area-inset-top,0px));opacity:0;transition:opacity .2s;background:linear-gradient(var(--bg) 0%,color-mix(in srgb,var(--bg) 75%,transparent) 50%,transparent 100%);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);-webkit-mask-image:linear-gradient(#000 0%,rgba(0,0,0,.88) 44%,transparent 100%);mask-image:linear-gradient(#000 0%,rgba(0,0,0,.88) 44%,transparent 100%)}body.scrolled .edge-fade.top{opacity:1}.edge-fade.bot{bottom:0;height:calc(96px + env(safe-area-inset-bottom,0px));background:linear-gradient(to top in oklab,var(--bg) 0%,transparent 100%)}.crumbs{display:flex;align-items:center;gap:10px;height:32px;margin:0 0 32px}.cr-mark{width:32px;height:32px;display:grid;place-items:center;flex:none}.logo{width:24px;height:24px;flex:none;overflow:hidden}.logo .sun,.logo .bar{fill:var(--text)}.cr-path{flex:1;min-width:0;display:flex;align-items:center;gap:6px;font-size:15px;line-height:22px;letter-spacing:-.15px;color:var(--text-2)}.cr-path span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cr-path .cur{color:var(--text);font-weight:500}.cr-path .i{width:14px;height:14px}.cr-lang{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 8px 0 12px;border-radius:999px;background:var(--knob);color:var(--text);font-size:14px;font-weight:500;letter-spacing:-.01em;flex:none;transition:transform .15s var(--ease-out),background-color .15s}.cr-lang:hover{background:color-mix(in srgb,var(--knob),var(--text) 6%)}.cr-lang:active{transform:scale(.94)}.cr-lang[aria-expanded=true]{background:color-mix(in srgb,var(--knob),var(--text) 10%)}.cr-down{width:14px;height:14px;color:var(--text-2);transform:rotate(90deg);transition:transform .2s var(--ease-out)}.cr-lang[aria-expanded=true] .cr-down{transform:rotate(-90deg)}.page{max-width:1072px;margin:0 auto;padding-left:var(--gutter-l);padding-right:var(--gutter-r);padding-block:calc(40px + env(safe-area-inset-top,0px)) 112px}.cols{display:grid;gap:40px}.cols>.access{order:-1}@media(min-width:960px){.cols{grid-template-columns:minmax(0,1fr) 384px;gap:36px;align-items:start}.cols>.access{order:0;position:sticky;top:calc(84px + env(safe-area-inset-top,0px))}}.sec-head{display:flex;align-items:baseline;gap:8px;padding:0 4px 12px}.sec-head h2{margin:0;font-size:20px;line-height:28px;font-weight:500;letter-spacing:-.025em}.sec-head .aside{color:var(--text-3);font-size:14px;font-weight:500}.sec-head .aside.warn-t{color:var(--warn)}.note-s{margin:12px 4px 0;color:var(--text-3);font-size:13px;line-height:18px}.notice{display:flex;align-items:center;gap:14px;padding:14px 18px 14px 14px;border-radius:24px;background:var(--raised);margin:0 0 22px}.notice .gi{width:36px;height:36px}.notice .t{display:flex;flex-direction:column;min-width:0}.notice b{font-weight:500;font-size:15px;line-height:22px;letter-spacing:-.02em}.notice span{color:var(--text-2);font-size:14px;line-height:20px}.notice.warn{background:color-mix(in srgb,var(--warn) 10%,var(--raised));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--warn) 22%,transparent)}.notice.bad{background:color-mix(in srgb,var(--bad) 10%,var(--raised));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bad) 22%,transparent)}.page.single{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding-block:calc(24px + env(safe-area-inset-top,0px)) calc(24px + env(safe-area-inset-bottom,0px))}.page.single .crumbs{position:relative;left:12px;max-width:calc(100% - 84px);margin:0 0 16px}.page.single .cr-mark{position:absolute;right:calc(100% + 10px);top:0}.page.single .page-body{width:100%;max-width:400px}.page.single .gone{margin:0}.gone{max-width:400px;margin:12vh auto 0;padding:32px 24px 28px;border-radius:var(--r-sheet);background:var(--raised);text-align:center;display:flex;flex-direction:column;align-items:center}.gone .gi{width:56px;height:56px;margin-bottom:16px}.gone h1{margin:0;font-size:22px;line-height:28px;font-weight:500;letter-spacing:-.03em}.gone p{margin:6px 0 0;color:var(--text-2);text-wrap:balance}.dgrid{display:grid;gap:10px;grid-template-columns:minmax(0,1fr)}@media(min-width:560px){.dgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}.dev{background:var(--raised);border-radius:var(--r-card);padding:8px;display:flex;flex-direction:column;gap:8px;min-width:0}.dev.is-here{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 32%,transparent)}.dev.off{opacity:.5}.dev-top{display:flex;align-items:center;gap:12px;padding:8px 6px 6px 10px}.dev-top .gi{width:32px;height:32px}.dev-id{flex:1;min-width:0;display:flex;flex-direction:column}.dev-name{font-size:16px;line-height:22px;font-weight:500;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dev-stat{font-size:13px;line-height:18px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dev-stat.ok-t{color:var(--ok)}.dev-stat.warn-t{color:var(--warn)}.dev-stat.here-t{color:var(--accent)}.dev-use{margin-top:auto;background:var(--field);border-radius:var(--r-row);padding:12px 14px 12px 16px;display:flex;align-items:flex-end;justify-content:space-between;gap:12px;min-height:66px}.use-txt{display:flex;flex-direction:column;min-width:0}.use-lbl{font-size:13px;line-height:18px;color:var(--text-2);white-space:nowrap}.use-val{font-size:17px;line-height:24px;font-weight:500;letter-spacing:-.02em}.dev .setup-btn{margin-top:auto}.upd-pill{display:inline-flex;align-items:center;align-self:center;gap:6px;height:32px;padding:0 12px 0 10px;border-radius:999px;flex:none;background:color-mix(in srgb,var(--warn) 14%,transparent);color:var(--warn);font-size:13px;font-weight:600;transition:background-color .15s,transform .15s var(--ease-out)}.upd-pill:hover{background:color-mix(in srgb,var(--warn) 22%,transparent)}.upd-pill:active{transform:scale(.94)}.upd-pill .i{width:14px;height:14px}.dev.add{align-items:center;justify-content:center;min-height:144px;gap:10px;color:var(--text-2);font-weight:500;transition:background-color .2s var(--ease-out),transform .2s var(--ease-out)}.dev.add:hover{background:color-mix(in srgb,var(--raised),var(--knob) 45%)}.dev.add:active{transform:scale(.98)}.dev.add .gi{width:36px;height:36px}.dev.first{grid-column:1 / -1;align-items:center;text-align:center;padding:28px 24px 24px;gap:6px}.dev.first .gi{width:44px;height:44px;margin-bottom:8px}.dev.first b{font-size:18px;line-height:24px;font-weight:500;letter-spacing:-.02em}.dev.first p{margin:0 0 14px;color:var(--text-2);font-size:14px;line-height:20px;max-width:34ch;text-wrap:balance}.dev.first .btn{max-width:320px}.reach2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.reach-tile{position:relative;display:flex;flex-direction:column;gap:1px;padding:12px 12px 12px 14px;border-radius:16px;background:var(--field);min-width:0}.reach-tile .rt-ic{width:28px;height:28px;margin-bottom:10px}.reach-tile b{font-size:14px;line-height:20px;font-weight:500;letter-spacing:-.015em}.reach-tile .rt-sub{font-size:12px;line-height:16px;color:var(--text-2)}.reach-tile .rt-mark{position:absolute;top:12px;right:12px;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:var(--ok-soft);color:var(--ok)}.reach-tile .rt-mark .i{width:12px;height:12px;stroke-width:2.4}.reach-tile.off b{color:var(--text-2)}.reach-tile.off .rt-sub{color:var(--text-3)}.reach-tile.off .rt-ic{opacity:.45}.reach-tile.off .rt-mark{background:var(--knob);color:var(--text-3)}.lbl-s{font-size:12px;font-weight:500;color:var(--text-2)}.names{display:flex;flex-wrap:wrap;gap:6px}.namechip{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 10px 0 12px;border-radius:10px;background:var(--field);font-family:var(--mono);font-size:13px;letter-spacing:0;transition:background-color .15s,transform .15s var(--ease-out)}.namechip:hover{background:var(--knob)}.namechip:active{transform:scale(.96)}.namechip .faint{color:var(--text-3)}.namechip .i{width:14px;height:14px;color:var(--text-2)}.ring{width:16px;height:16px;transform:rotate(-90deg)}.ring .trk{stroke:var(--bar)}.ring .arc{stroke:var(--accent)}.ring .arc.warn{stroke:var(--warn)}.ring .arc.bad{stroke:var(--bad)}.month{display:flex;flex-direction:column;gap:8px}.month-axis{position:relative;display:flex;justify-content:space-between;font-size:11px;color:var(--text-3);font-weight:500}.month-axis .td{position:absolute;transform:translate(-50%);color:var(--accent)}.month-axis .hide{visibility:hidden}.month-read{display:flex;justify-content:space-between;align-items:baseline;margin-top:10px;font-size:13px;color:var(--text-2)}.month-read>*{white-space:nowrap}.month-read .ud{color:var(--text);font-weight:500;font-size:15px;letter-spacing:-.02em}.meter{height:6px;border-radius:3px;background:var(--bar);overflow:hidden}.meter>i{display:block;height:100%;border-radius:3px;background:var(--accent)}.meter>i.warn{background:var(--warn)}.meter>i.bad{background:var(--bad)}.until{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-radius:16px;background:var(--field)}.until-num{display:flex;flex-direction:column;min-width:0}.until-num b{font-size:36px;line-height:40px;font-weight:600;letter-spacing:-.045em}.until-num span{font-size:13px;line-height:18px;color:var(--text-2)}.until-num .until-sub{margin-top:8px;font-size:12px;color:var(--text-3)}.until.soon .until-num b{color:var(--warn)}.cal{display:flex;flex-direction:column;gap:6px;flex:none}.cal-h,.cal-g{display:grid;grid-template-columns:repeat(7,10px);gap:5px}.cal-h span{font-size:9px;line-height:10px;font-weight:600;color:var(--text-3);text-align:center}.cal-g i{width:10px;height:10px;border-radius:3px;background:color-mix(in srgb,var(--text) 16%,transparent)}.cal-g i.past{background:color-mix(in srgb,var(--text) 5%,transparent)}.cal-g i.today{background:var(--accent)}.cal-g i.end{background:transparent;box-shadow:inset 0 0 0 1.5px var(--accent)}.cal-g i.after{background:transparent}.until.soon .cal-g i.today{background:var(--warn)}.until.soon .cal-g i.end{box-shadow:inset 0 0 0 1.5px var(--warn)}.acc-row.opened .cal-g i{animation:cal-in .36s var(--ease-out) backwards;animation-delay:calc(var(--i) * 7ms)}@keyframes cal-in{0%{opacity:0;transform:scale(.4)}}.hours{display:flex;flex-direction:column;gap:8px;padding:14px 16px;border-radius:16px;background:var(--field)}.hours-top{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;color:var(--text-2)}.hours-top b{color:var(--text);font-weight:500;font-size:15px;letter-spacing:-.02em}.hours-bar{position:relative;height:8px;border-radius:4px;background:color-mix(in srgb,var(--text) 8%,transparent)}.hours-bar i{position:absolute;top:0;bottom:0;border-radius:4px;background:color-mix(in srgb,var(--ok) 70%,transparent)}.hours-now{position:absolute;top:-4px;width:2px;height:16px;margin-left:-1px;border-radius:1px;background:var(--text);box-shadow:0 0 0 2px var(--field)}.hours-now.out{background:var(--warn)}.hours-axis{display:flex;justify-content:space-between;font-size:10px;color:var(--text-3);font-weight:500}@media(prefers-reduced-motion:reduce){.acc-row.opened .cal-g i{animation:none}}.sheet-root{position:fixed;inset:0;z-index:50;display:none}.sheet-root.open{display:block}.scrim{position:absolute;inset:0;background:var(--scrim);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.sheet{position:absolute;left:var(--gutter-l);right:var(--gutter-r);bottom:calc(16px + env(safe-area-inset-bottom,0px));margin:0 auto;max-width:400px;max-height:calc(100% - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));background:var(--raised);border-radius:var(--r-sheet);box-shadow:var(--sheet-shadow);overflow:hidden;display:flex;flex-direction:column}@media(min-width:760px){.sheet-root.open{display:flex;align-items:center;justify-content:center}.sheet{position:relative;left:auto;right:auto;bottom:auto;margin:0;width:calc(100% - var(--gutter-l) - var(--gutter-r))}}.sheet .x{position:absolute;z-index:3;right:22px;top:22px}.vp{position:relative;overflow:hidden;flex:none}.sheet-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}.view{padding:0 24px 24px;display:flex;flex-direction:column}.vhead{display:flex;align-items:center;gap:12px;height:76px;padding-right:44px;flex:none;cursor:grab;touch-action:none}.vhead h2{flex:1;margin:0;font-size:20px;line-height:28px;font-weight:500;letter-spacing:-.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vhead.center h2{text-align:center}.vhead.with-acts{padding-right:126px}.vsub{margin:-16px 0 18px;color:var(--text-2);font-size:14px;line-height:20px}.vhead.center+.vsub{text-align:center;margin:-6px auto 24px;max-width:32ch;text-wrap:balance}.kinds-note{margin:14px 2px 16px}.view>.hint.bad-t{margin-top:8px}.secure-note{margin-top:12px;text-align:center}.sheet-acts{position:absolute;z-index:3;top:22px;right:58px}.hpill{position:relative;display:flex;gap:2px}.hp-b{display:grid;place-items:center;width:38px;height:32px;background:var(--knob);color:var(--text);transition:background-color .15s,transform .15s var(--ease-out)}.hp-b:first-of-type{border-radius:16px 6px 6px 16px}.hp-b:last-of-type{border-radius:6px 16px 16px 6px}.hp-b .i{width:16px;height:16px}.hp-b:hover{background:color-mix(in srgb,var(--knob),var(--text) 6%)}.hp-b:active{transform:scale(.94)}.hp-b.done{color:var(--ok)}.hp-tip{position:absolute;z-index:4;left:0;top:calc(100% + 8px);height:26px;padding:0 10px;display:flex;align-items:center;border-radius:999px;background:var(--toast);color:var(--toast-fg);font:500 12px/1 var(--font);letter-spacing:-.1px;white-space:nowrap;box-shadow:0 0 0 1px var(--line-glass),var(--pop-shadow);opacity:0;pointer-events:none;overflow:hidden;transform-origin:50% 0}.hp-tip.on{opacity:1}.hp-tip .tt{position:relative;display:inline-flex;justify-content:center;white-space:nowrap}.hp-tip .tt-m{position:absolute;left:0;top:0;visibility:hidden;white-space:nowrap}.sheet .x,.sheet-acts{transition:transform .15s var(--ease-out),background-color .15s,opacity .24s var(--ease-out),filter .24s var(--ease-out),scale .24s var(--ease-out)}.sheet.arrived .x,.sheet.arrived .sheet-acts,.sheet.asks .x{opacity:0;filter:blur(3px);scale:.9;pointer-events:none}.center-col,.ask{display:flex;flex-direction:column}.center-col{align-items:center;text-align:center}.ask{align-items:flex-start;text-align:left;padding-top:24px}.center-col.secure{padding-top:4px}:is(.center-col,.ask) .gi.xl{width:64px;height:64px;margin:8px 0 16px}.ask .gi.xl{margin:0 0 18px}:is(.center-col,.ask) h3{margin:0;font-size:20px;line-height:28px;font-weight:500;letter-spacing:-.5px}:is(.center-col,.ask) p{margin:6px 0 22px;color:var(--text-2);font-size:15px;line-height:21px}.center-col p{max-width:30ch;text-wrap:balance}.ask p{text-wrap:pretty}.center-col.secure p{margin-top:0}.btnrow{display:flex;gap:8px;width:100%}.btnrow .btn{flex:1}.btnrow2{display:grid;gap:8px}.btnrow2 .btn{width:100%}.setup{display:flex;flex-direction:column}.setup .notice{margin:0 0 16px}.steps-gap{height:22px}.step{display:flex;gap:12px}.step+.step{margin-top:20px}.step-n{width:24px;height:24px;border-radius:50%;background:var(--knob);font-size:13px;font-weight:600;display:grid;place-items:center;flex:none}.step-b{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px}.step-t{font-size:16px;line-height:24px;font-weight:500;letter-spacing:-.02em}.step-box{display:flex;flex-direction:column;gap:10px}.way{display:flex;flex-direction:column;padding:12px 14px;border-radius:20px;background:var(--field);margin-bottom:18px}.way-row{display:flex;align-items:center;gap:10px}.way-end{width:34px;height:34px;border-radius:11px;background:var(--knob);display:grid;place-items:center;flex:none;color:var(--text-2);transition:background-color .4s var(--ease-out),color .4s var(--ease-out)}.way-end .i{width:17px;height:17px}.way-end.home{color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,transparent)}.way-track{position:relative;flex:1;height:8px}.way-track:before,.way-glow,.way-fill{content:"";position:absolute;inset:0;-webkit-mask:radial-gradient(circle,#000 1.4px,transparent 1.9px) 0 50% / 9px 8px repeat-x;mask:radial-gradient(circle,#000 1.4px,transparent 1.9px) 0 50% / 9px 8px repeat-x}.way-track:before{background:var(--text-3);opacity:.8}.way-glow{overflow:hidden;transition:opacity .2s var(--ease-out)}.way-glow i{position:absolute;inset:0;background:linear-gradient(90deg,transparent 32%,var(--accent) 50%,transparent 68%);transform:translate(-70%);animation:way-run 2s cubic-bezier(.45,0,.55,1) infinite}@keyframes way-run{0%{transform:translate(-70%)}72%,to{transform:translate(70%)}}.way-fill{background:var(--ok);clip-path:inset(0 100% 0 0);transition:clip-path .7s var(--ease-out) 80ms}.way.done .way-fill{clip-path:inset(0)}.way.done .way-glow,.way.stopped .way-glow{opacity:0}.way.done .way-end{color:var(--ok);background:var(--ok-soft)}.way.done .way-end.home{transition-delay:.6s}.way.done .way-end.home .i{animation:way-pop .42s var(--spring-bouncy, ease) .6s backwards}@keyframes way-pop{0%{transform:scale(.6)}to{transform:none}}.way-text{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:30px;margin-top:10px;text-align:center}.way-text .t{display:flex;flex-direction:column;align-items:center;min-width:0}.way-text b{position:relative;display:inline-flex;justify-content:center;white-space:nowrap;font-weight:500;font-size:14px;line-height:20px;transition:color .3s var(--ease-out)}.way-text .ws{color:var(--text-2);font-size:13px;line-height:18px}.way.done .way-text b{color:var(--ok)}.filecard{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:18px;background:var(--field)}.fc-row{display:flex;align-items:center;gap:12px;min-width:0}.filecard-ic{width:38px;height:46px;border-radius:9px;background:var(--knob);font:600 10px/1 var(--mono);display:grid;place-items:center;color:var(--text-2);flex:none}.filecard .t{flex:1;min-width:0;display:flex;flex-direction:column}.filecard .t .mono{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filecard .t span:last-child{font-size:12px;color:var(--text-2);line-height:16px}.confbar{display:flex;gap:8px}.conf{margin:0;padding:12px 14px;border-radius:14px;background:var(--field);font:12px/18px var(--mono);max-height:16rem;overflow:auto;white-space:pre;color:var(--text-2)}.conf .k{color:var(--text)}.conf .sec{color:var(--accent)}.conf .mask{color:var(--text-3);letter-spacing:1px}.osm{white-space:normal}.osm-ic{display:inline-grid;width:1.05em;height:1.05em;margin-right:.25em;vertical-align:-.16em}.osm-ic>svg{grid-area:1 / 1;width:100%;height:100%}.osm-ic .eye{fill:var(--field)}.osm-p{display:inline-block;white-space:pre}.scanline{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:.3em}.scanline .osm{white-space:nowrap}@media(max-width:440px){.scanline{flex-direction:column;align-items:flex-start}}.way-text b .mt-old{color:var(--text-2)}@media(prefers-reduced-motion:reduce){.way-glow{display:none}.way-fill{transition:none}.way.done .way-end.home .i{animation:none}}.menu{position:fixed;z-index:60;min-width:224px;padding:6px;border-radius:20px;background:var(--field);box-shadow:var(--pop-shadow),inset 0 0 0 1px var(--line)}.menu-hl{position:absolute;left:6px;right:6px;top:6px;height:40px;border-radius:14px;background:var(--knob);opacity:0;transition:opacity .15s var(--ease-out);pointer-events:none}.menu-hl.moving{transition:opacity .15s var(--ease-out),transform var(--spring-quick-dur, .3s) var(--spring-quick, ease-out),background-color .15s}.menu-hl.bad{background:var(--bad-soft)}.menu-hl.warn{background:color-mix(in srgb,var(--warn) 13%,transparent)}.mi{position:relative;z-index:1;display:flex;align-items:center;gap:12px;width:100%;height:40px;padding:0 12px;border-radius:14px;font-size:14px;font-weight:500;text-align:left}.mi .i{width:16px;height:16px;color:var(--text-2)}.mi .i.off{visibility:hidden}.mi.warn,.mi.warn .i{color:var(--warn)}.mi.bad,.mi.bad .i{color:var(--bad)}.menu-sep{height:1px;margin:6px 12px;background:var(--line)}.toasts{position:fixed;left:0;right:0;height:42px;bottom:calc(24px + env(safe-area-inset-bottom,0px));z-index:70;display:flex;justify-content:center;align-items:flex-end;pointer-events:none;padding-left:var(--gutter-l);padding-right:var(--gutter-r)}.toast{position:absolute;display:flex;align-items:center;gap:8px;height:42px;padding:0 18px 0 13px;border-radius:999px;background:var(--toast);color:var(--toast-fg);font-size:14px;font-weight:500;box-shadow:var(--pop-shadow);white-space:nowrap}.toast .i{width:18px;height:18px;color:var(--ok)}.toast.bad .i{color:var(--bad)} +@font-face{font-family:Geist;src:url(geist-latin-wght-normal.woff2) format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2190-21FF,U+2212,U+2215}@font-face{font-family:Geist;src:url(geist-cyrillic-wght-normal.woff2) format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Geist Mono;src:url(geist-mono-latin-wght-normal.woff2) format("woff2");font-weight:100 900;font-display:swap}:root{color-scheme:dark;--bg: #080808;--raised: #121212;--field: #161616;--knob: #232323;--seg: rgba(237, 237, 237, .05);--seg-shadow: none;--line: rgba(255, 255, 255, .06);--text: #ededed;--text-2: #8c8c8a;--text-3: #4f4f4e;--accent: #4eafff;--accent-ink: #ffffff;--accent-soft: rgba(78, 175, 255, .13);--ok: #57d64b;--ok-soft: rgba(87, 214, 75, .14);--warn: #ff8a3d;--bad: #ff5c5c;--bad-soft: rgba(255, 92, 92, .13);--sel-bg: rgba(131, 209, 255, .25);--sel-fg: #64c6ff;--scrim: rgba(8, 8, 8, .8);--line-glass: rgba(255, 255, 255, .07);--pop-shadow: 0 18px 48px -14px rgba(0, 0, 0, .75);--sheet-shadow: 0 24px 64px -16px rgba(0, 0, 0, .6);--bar: rgba(237, 237, 237, .13);--toast: #232323;--toast-fg: #ededed;--qr-bg: #0a0a0a;--gi-a: rgba(255, 255, 255, .58);--gi-b: rgba(255, 255, 255, .14);--gi-rim: rgba(255, 255, 255, .5);--gi-edge: rgba(0, 0, 0, 0);--gi-detail: #ffffff;--t-grey-a: #cfcfcd;--t-grey-b: #5a5a59;--t-blue-a: #a6d9ff;--t-blue-b: #1d84e6;--t-green-a: #a8f29c;--t-green-b: #3aa32c;--t-red-a: #ffadad;--t-red-b: #dc3a3a;--t-orange-a: #ffc08f;--t-orange-b: #ec6a12;--font: Geist, -apple-system, system-ui, "Segoe UI", sans-serif;--mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;--r-sheet: 36px;--r-card: 28px;--r-row: 20px;--r-field: 16px;--r-tile: 12px;--ease-out: cubic-bezier(.23, 1, .32, 1);--gutter-l: max(16px, env(safe-area-inset-left, 0px));--gutter-r: max(16px, env(safe-area-inset-right, 0px))}@media(prefers-color-scheme:light){:root{color-scheme:light;--bg: #f2f2f1;--raised: #ffffff;--field: #f3f3f2;--knob: #e8e8e7;--seg: #ffffff;--seg-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 .5px rgba(0, 0, 0, .05);--line: rgba(0, 0, 0, .07);--text: #0b0b0b;--text-2: #6d6d6b;--text-3: #a6a6a4;--accent: #2b9dff;--accent-soft: rgba(43, 157, 255, .12);--ok: #33a328;--ok-soft: rgba(51, 163, 40, .12);--warn: #ee6a12;--bad: #e5484d;--bad-soft: rgba(229, 72, 77, .1);--sel-bg: rgba(78, 175, 255, .22);--sel-fg: #0a76cf;--scrim: rgba(236, 236, 235, .62);--line-glass: rgba(0, 0, 0, .07);--pop-shadow: 0 18px 44px -14px rgba(0, 0, 0, .2);--sheet-shadow: 0 24px 64px -18px rgba(0, 0, 0, .22);--bar: rgba(11, 11, 11, .11);--toast: #0b0b0b;--toast-fg: #f2f2f1;--qr-bg: #ffffff;--gi-a: rgba(250, 250, 249, .72);--gi-b: rgba(206, 206, 204, .5);--gi-rim: rgba(255, 255, 255, .9);--gi-edge: rgba(0, 0, 0, .11);--gi-detail: rgba(28, 28, 28, .72);--t-grey-a: #a9a9a7;--t-grey-b: #3d3d3c;--t-blue-a: #7cc4ff;--t-blue-b: #0a6fd6;--t-green-a: #82e070;--t-green-b: #2e8a22;--t-red-a: #ff9090;--t-red-b: #c92a2a}}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;scrollbar-gutter:stable}body{margin:0;background:var(--bg);color:var(--text);font:400 15px/22px var(--font);letter-spacing:-.011em;-webkit-font-smoothing:antialiased;min-height:100vh;min-height:100dvh;cursor:default}body.locked{overflow:hidden}input,textarea,.linkrow .mono,.conf{cursor:text}::selection{background:var(--sel-bg);color:var(--sel-fg)}button{font:inherit;color:inherit;letter-spacing:inherit;background:none;border:0;padding:0;margin:0;cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default}a{color:inherit;text-decoration:none}:focus{outline:none}:focus-visible{outline:2px solid color-mix(in srgb,var(--accent) 65%,transparent);outline-offset:2px}[hidden]{display:none!important}.offscreen{position:fixed;left:-9999px;top:0;opacity:0}.mono{font-family:var(--mono);letter-spacing:0}.num{font-variant-numeric:tabular-nums}.ok-t{color:var(--ok)}.warn-t{color:var(--warn)}.bad-t{color:var(--bad)}.here-t{color:var(--accent)}.i{width:18px;height:18px;flex:none}.gi{width:24px;height:24px;flex:none;overflow:visible;--ta: var(--t-grey-a);--tb: var(--t-grey-b)}.gi.t-blue{--ta: var(--t-blue-a);--tb: var(--t-blue-b)}.gi.t-green{--ta: var(--t-green-a);--tb: var(--t-green-b)}.gi.t-red{--ta: var(--t-red-a);--tb: var(--t-red-b)}.gi.t-orange{--ta: var(--t-orange-a);--tb: var(--t-orange-b)}.gi .ta{stop-color:var(--ta)}.gi .tb{stop-color:var(--tb)}.gi .fa{stop-color:var(--gi-a)}.gi .fb{stop-color:var(--gi-b)}.gi .fc{stop-color:var(--ta);stop-opacity:.28}.gi .ge{stroke:var(--gi-edge)}.gi .gr{stroke:var(--gi-rim)}.gi .gd{stroke:var(--gi-detail)}.gi .gdf{color:var(--gi-detail)}.knob{width:32px;height:32px;border-radius:50%;background:var(--knob);color:var(--text);display:grid;place-items:center;flex:none;transition:transform .15s var(--ease-out),background-color .15s}.knob:hover{background:color-mix(in srgb,var(--knob),var(--text) 6%)}.knob:active{transform:scale(.8)}.knob .i{width:16px;height:16px}.knob.back .i{transform:rotate(180deg)}.knob[aria-expanded=true]{background:color-mix(in srgb,var(--knob),var(--text) 10%)}.btn{height:48px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 20px;font-size:16px;font-weight:500;letter-spacing:-.015em;user-select:none;-webkit-user-select:none;transition:transform .2s var(--ease-out),background-color .2s var(--ease-out),color .2s var(--ease-out)}.btn:active{transform:scale(.95)}.btn.block{width:100%}.btn.sm{height:40px;font-size:15px;padding:0 16px}.btn.accent{background:var(--accent);color:var(--accent-ink);font-weight:600}.btn.accent:hover{background:color-mix(in srgb,var(--accent) 82%,transparent)}.btn.tint{background:var(--accent-soft);color:var(--accent);font-weight:600}.btn.tint:hover{background:color-mix(in srgb,var(--accent) 20%,transparent)}.btn.tint:active{background:color-mix(in srgb,var(--accent) 24%,transparent)}.btn.soft{background:var(--knob);color:var(--text)}.btn.soft:hover{background:color-mix(in srgb,var(--knob),var(--text) 6%)}.btn.red{background:var(--bad);color:#fff;font-weight:600}.busy{position:relative}.orb{position:absolute;inset:0;margin:auto;width:28px;height:28px;overflow:hidden;contain:strict;pointer-events:none}.orb i{position:absolute;left:50%;top:50%;width:7px;height:7px;margin:-3.5px 0 0 -3.5px;border-radius:50%;background:currentColor;animation:orb-converge 1.8s linear infinite both}.orb i:nth-child(2){animation:orb-breathe 1.8s ease-in-out infinite both}@keyframes orb-converge{0%{transform:translateY(-5px) scale(1);filter:blur(0);animation-timing-function:linear}10%{transform:translateY(-5px) scale(1);filter:blur(0);animation-timing-function:cubic-bezier(.55,0,1,.45)}22%{transform:translate(2.15px,-1.25px) scale(.72);filter:blur(.8px);animation-timing-function:cubic-bezier(.33,1,.68,1)}33%{transform:translate(4.3px,2.5px) scale(1);filter:blur(0);animation-timing-function:linear}43%{transform:translate(4.3px,2.5px) scale(1);filter:blur(0);animation-timing-function:cubic-bezier(.55,0,1,.45)}55%{transform:translateY(2.5px) scale(.72);filter:blur(.8px);animation-timing-function:cubic-bezier(.33,1,.68,1)}66%{transform:translate(-4.3px,2.5px) scale(1);filter:blur(0);animation-timing-function:linear}77%{transform:translate(-4.3px,2.5px) scale(1);filter:blur(0);animation-timing-function:cubic-bezier(.55,0,1,.45)}88%{transform:translate(-2.15px,-1.25px) scale(.72);filter:blur(.8px);animation-timing-function:cubic-bezier(.33,1,.68,1)}to{transform:translateY(-5px) scale(1);filter:blur(0)}}@keyframes orb-breathe{0%,to{opacity:.16;filter:blur(2.4px);transform:scale(1.2)}50%{opacity:.32;filter:blur(1.6px);transform:scale(.98)}}.field{height:48px;border-radius:var(--r-field);background:var(--field);display:flex;align-items:center;gap:12px;padding:0 4px 0 16px;overflow:hidden;transition:box-shadow .2s var(--ease-out)}.field:focus-within{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--text) 16%,transparent)}.field input{flex:1;min-width:0;border:0;outline:0;background:transparent;padding:0;font:500 16px/24px var(--font);color:var(--text);letter-spacing:-.012em}.field input::placeholder{color:var(--text-3)}.go{width:48px;height:40px;border-radius:12px;background:var(--knob);color:var(--text-3);display:grid;place-items:center;flex:none;transition:background-color .2s var(--ease-out),color .2s var(--ease-out),transform .2s var(--ease-out)}.go .i{width:20px;height:20px}.go.ready{background:var(--accent);color:var(--accent-ink)}.go.ready:active{transform:scale(.9)}.go:not(.ready){cursor:not-allowed}.seg{position:relative;display:flex;align-items:center;height:48px;padding:0 4px;border-radius:var(--r-field);background:var(--field)}.seg-pill{position:absolute;left:0;top:4px;height:40px;border-radius:12px;background:var(--seg);box-shadow:var(--seg-shadow);pointer-events:none}.seg-b{position:relative;z-index:1;height:40px;font-size:16px;font-weight:500;color:var(--text-3);white-space:nowrap;transition:color .2s var(--ease-out)}.seg-b.on{color:var(--text)}.seg-b:not(.on):hover{color:var(--text-2)}.appseg .seg-b{flex:0 0 56px;display:flex;align-items:center;justify-content:center;justify-content:safe center;gap:8px;padding:0 18px;overflow:hidden}.appseg .seg-b.on{flex:1 1 56px}.appseg .seg-b .i{width:20px;height:20px}.appseg .seg-l{max-width:0;opacity:0;margin-left:-8px;overflow:hidden;white-space:nowrap}.appseg .seg-b.on .seg-l{max-width:180px;opacity:1;margin-left:0}.appseg{container-type:inline-size}@container (max-width: 300px){.appseg .seg-b{flex-basis:44px;padding:0 12px}}.kinds{display:grid;grid-template-columns:repeat(var(--n, 4),minmax(0,1fr));gap:8px;position:relative;container-type:inline-size}.kind{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;color:var(--text-3);font-size:12px;line-height:16px;font-weight:500;transition:color .2s var(--ease-out)}.kind-tile{width:100%;height:56px;border-radius:14px;background:var(--field);display:grid;place-items:center;transition:background-color .2s var(--ease-out),transform .2s var(--ease-out),box-shadow .22s var(--ease-out)}.kind.on .kind-tile{box-shadow:inset 0 0 0 1.5px var(--accent)}.kind-lbl{white-space:nowrap}.kind:hover .kind-tile,.kind:focus-visible .kind-tile{background:var(--knob)}.kind:active .kind-tile{transform:scale(.94)}.kind:focus-visible{outline:none}.kind:focus-visible .kind-lbl,.kind.on{color:var(--text)}.kind .gi{width:26px;height:26px;filter:grayscale(1);opacity:.55;transition:filter .26s var(--ease-out),opacity .26s var(--ease-out)}.kind.on .gi{filter:none;opacity:1}@container (max-width: 330px){.kind-tile{height:50px}.kind{font-size:11.5px}}.or{display:flex;align-items:center;gap:12px;margin:22px 0;color:var(--text-3);font-size:12px;font-weight:500;letter-spacing:.06em}.or:before,.or:after{content:"";flex:1;height:1px;background:var(--line)}.badge{width:100%;text-align:left;display:flex;align-items:center;gap:12px;height:60px;padding:0 14px 0 12px;border-radius:18px;background:var(--field);transition:background-color .2s,transform .2s var(--ease-out)}.badge:hover{background:var(--knob)}.badge:active{transform:scale(.98)}.badge .b-ic{width:36px;height:36px;border-radius:10px;background:var(--text);color:var(--raised);display:grid;place-items:center;flex:none}.badge .b-ic .i{width:20px;height:20px}.badge .b-t{flex:1;min-width:0;display:flex;flex-direction:column}.badge .b-top{font-size:12px;line-height:16px;color:var(--text-2)}.badge .b-main{font-size:15px;line-height:20px;font-weight:500}.badge>.i{color:var(--text-3);width:16px;height:16px}.badge.primary .b-ic{background:var(--accent-soft);color:var(--accent)}.badges2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.badges2 .badge{padding:0 10px;gap:10px}.badges2 .badge>.i{display:none}.badges2 .b-ic{width:32px;height:32px}.hint{margin:0;font-size:13px;line-height:18px;color:var(--text-2)}.hint a,.hint button{color:var(--accent);font-weight:500}.howto{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px;color:var(--text-2)}.howto li{display:inline-flex;align-items:center;gap:6px}.howto li+li:before{content:"\203a";color:var(--text-3)}.howto b{color:var(--text);font-weight:500}.linkrow{display:flex;align-items:center;gap:8px;height:44px;padding:0 4px 0 14px;border-radius:14px;background:color-mix(in srgb,var(--knob) 72%,var(--field))}.view>.linkrow{background:var(--field)}.linkrow .mono{flex:1;min-width:0;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;user-select:all}.linkrow .knob{width:36px;height:36px;border-radius:10px;background:transparent}.linkrow .knob:hover{background:var(--knob)}.qrbox{position:relative;width:148px;height:148px;flex:none;border-radius:18px;overflow:hidden;background:var(--qr-bg)}.qrbox.light{box-shadow:inset 0 0 0 1px var(--line)}.qrbox.big{width:208px;height:208px;border-radius:24px;align-self:center}.qrbox.big+.linkrow{margin-top:16px}.qrbox.dense{width:100%;max-width:none;height:auto;aspect-ratio:1;align-self:stretch;border-radius:22px}.qrbox svg{display:block;width:100%;height:100%}.qrbox>svg.old{position:absolute;inset:0}.coderow{display:flex;gap:14px;align-items:flex-start}.coderow.stacked{flex-direction:column;align-items:stretch}.coderow .side{position:relative;display:flex;flex-direction:column;gap:8px;min-width:0;font-size:14px;line-height:20px;color:var(--text-2)}.coderow .side b{color:var(--text);font-weight:500}.side .words{display:flex;flex-direction:column;gap:8px}.side .words.old{position:absolute;left:0;right:0;top:0;pointer-events:none}.side .arr{color:var(--text-2);font-weight:400;margin:0 6px}@media(max-width:380px){.coderow{flex-direction:column}}@media(prefers-reduced-motion:reduce){.orb i{animation:none;opacity:.3;filter:blur(1.4px)}.orb i:first-child{opacity:1;filter:none}}.mt{position:relative}.mt-ib{display:inline-block;white-space:nowrap}.mt-new{white-space:nowrap}.mt-old{position:absolute;white-space:nowrap;pointer-events:none}.mt-new.w,.mt-old.w{white-space:inherit}.mt-new i,.mt-old i{font-style:normal;display:inline-block;white-space:pre}.bars{--gap: 3px;position:relative;display:flex;flex:none;margin-inline:calc(var(--gap) / -2)}.bars-week{--gap: 4px;transition:margin var(--fit)}.bars .col{display:flex;flex-direction:column;padding-inline:calc(var(--gap) / 2)}.bars-month .col{flex:1;min-width:0}.bars .half{display:flex;flex-direction:column}.bars .half.top{justify-content:flex-end;margin-bottom:3px}.bars i{display:block;border-radius:2.5px;transition:background-color .12s}.bars-week i{width:6px;border-radius:3px;transition:background-color .15s,width var(--fit),border-radius var(--fit)}.bars-week .col{transition:padding var(--fit)}.bars-week .axis{transition:left var(--fit),right var(--fit)}.bars .dn{background:color-mix(in srgb,var(--text) 24%,transparent)}.bars .up{background:color-mix(in srgb,var(--text) 11%,transparent)}.bars .today .dn{background:var(--accent)}.bars .today .up{background:color-mix(in srgb,var(--accent) 45%,transparent)}.bars .col:not(.future):hover .dn{background:var(--text-2)}.bars .col:not(.future):hover .up{background:color-mix(in srgb,var(--text-2) 50%,transparent)}.bars .today:hover .dn{background:color-mix(in srgb,var(--accent) 75%,var(--text))}.bars .future i{height:3px;background:color-mix(in srgb,var(--bar) 45%,transparent)}.bars .axis{position:absolute;left:calc(var(--gap) / 2);right:calc(var(--gap) / 2);height:1px;background:var(--line);pointer-events:none}.ud{display:inline-flex;flex-wrap:wrap;align-items:center;column-gap:10px;transition:column-gap var(--fit)}.ud>span{display:inline-flex;align-items:center;gap:2px;white-space:nowrap}.ud .i{width:.8em;height:.8em;stroke-width:2.2;color:var(--text-2)}.ud-dn .i{transform:rotate(90deg)}.ud-up{color:var(--text-2)}.ud-up .i{transform:rotate(-90deg);color:var(--text-3)}@media(prefers-reduced-motion:reduce){.bars-week,.bars-week .col,.bars-week .axis,.ud{transition:none}.bars-week i{transition:background-color .15s}}.acc{display:flex;flex-direction:column}.acc-row{background:var(--raised);overflow:hidden;border-radius:0;padding:0 8px;transition:background-color .15s}.acc-row.rt{border-top-left-radius:var(--r-row);border-top-right-radius:var(--r-row)}.acc-row.rb{border-bottom-left-radius:var(--r-row);border-bottom-right-radius:var(--r-row)}.acc-row.open{margin-block:10px}.acc-row.open:first-child{margin-top:0}.acc-row.open:last-child{margin-bottom:0}.acc-row:not(.open):not(.still):hover{background:color-mix(in srgb,var(--raised),var(--knob) 40%)}.acc-head{width:100%;display:flex;align-items:center;gap:10px;height:52px;padding:0 6px 0 8px;text-align:left}.acc-row.still .acc-head{cursor:default;padding-right:10px}.acc-head .gi{width:22px;height:22px}.acc-title{flex:1;min-width:0;font-size:15px;font-weight:500;letter-spacing:-.02em;display:flex;align-items:center;gap:8px}.acc-title .t{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.acc-val{display:flex;align-items:center;gap:8px;color:var(--text-2);font-size:14px;white-space:nowrap;transition:opacity .2s var(--ease-out),filter .2s var(--ease-out),transform .26s var(--ease-out)}.acc-val>span{display:inline-flex;align-items:center;gap:8px}.acc-row.open .acc-val.hide-open{opacity:0;filter:blur(4px);transform:translate(8px);pointer-events:none}.acc-chev{width:16px;height:16px;color:var(--text-2);transform:rotate(90deg);transition:transform var(--spring-soft-dur, .47s) var(--spring-soft, ease)}.acc-row.open .acc-chev{transform:rotate(-90deg)}.acc-body{display:none;padding:0 8px 16px 40px}.acc-row.open .acc-body,.acc-row.closing .acc-body{display:flex;flex-direction:column;gap:12px}.acc .desc{margin:0;font-size:14px;line-height:20px;opacity:.6}.acc.inset .acc-row{background:var(--field)}.acc.inset .acc-row:not(.open):not(.still):hover{background:color-mix(in srgb,var(--field),var(--knob) 50%)}.acc.inset .acc-body{padding-left:8px}.acc.inset .seg{background:color-mix(in srgb,var(--knob) 65%,var(--field))}@media(prefers-reduced-motion:reduce){.acc-chev{transition:none}}.edge-fade{position:fixed;left:0;right:0;z-index:30;pointer-events:none}.edge-fade.top{top:0;height:calc(80px + env(safe-area-inset-top,0px));opacity:0;transition:opacity .2s;background:linear-gradient(var(--bg) 0%,color-mix(in srgb,var(--bg) 75%,transparent) 50%,transparent 100%);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);-webkit-mask-image:linear-gradient(#000 0%,rgba(0,0,0,.88) 44%,transparent 100%);mask-image:linear-gradient(#000 0%,rgba(0,0,0,.88) 44%,transparent 100%)}body.scrolled .edge-fade.top{opacity:1}.edge-fade.bot{bottom:0;height:calc(96px + env(safe-area-inset-bottom,0px));background:linear-gradient(to top in oklab,var(--bg) 0%,transparent 100%)}.crumbs{display:flex;align-items:center;gap:10px;height:32px;margin:0 0 32px}.cr-mark{width:32px;height:32px;display:grid;place-items:center;flex:none}.logo{width:24px;height:24px;flex:none;overflow:hidden}.logo .sun,.logo .bar{fill:var(--text)}.cr-path{flex:1;min-width:0;display:flex;align-items:center;gap:6px;font-size:15px;line-height:22px;letter-spacing:-.15px;color:var(--text-2)}.cr-path span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cr-path .cur{color:var(--text);font-weight:500}.cr-path .i{width:14px;height:14px}.cr-lang{display:inline-flex;align-items:center;gap:4px;height:32px;padding:0 8px 0 12px;border-radius:999px;background:var(--knob);color:var(--text);font-size:14px;font-weight:500;letter-spacing:-.01em;flex:none;transition:transform .15s var(--ease-out),background-color .15s}.cr-lang:hover{background:color-mix(in srgb,var(--knob),var(--text) 6%)}.cr-lang:active{transform:scale(.94)}.cr-lang[aria-expanded=true]{background:color-mix(in srgb,var(--knob),var(--text) 10%)}.cr-down{width:14px;height:14px;color:var(--text-2);transform:rotate(90deg);transition:transform .2s var(--ease-out)}.cr-lang[aria-expanded=true] .cr-down{transform:rotate(-90deg)}.page{max-width:1072px;margin:0 auto;padding-left:var(--gutter-l);padding-right:var(--gutter-r);padding-block:calc(40px + env(safe-area-inset-top,0px)) 112px}.cols{display:grid;gap:40px}.cols>.access{order:-1}@media(min-width:960px){.cols{grid-template-columns:minmax(0,1fr) 384px;gap:36px;align-items:start}.cols>.access{order:0;position:sticky;top:calc(84px + env(safe-area-inset-top,0px))}}.sec-head{display:flex;align-items:baseline;gap:8px;padding:0 4px 12px}.sec-head h2{margin:0;font-size:20px;line-height:28px;font-weight:500;letter-spacing:-.025em}.sec-head .aside{color:var(--text-3);font-size:14px;font-weight:500}.sec-head .aside.warn-t{color:var(--warn)}.note-s{margin:12px 4px 0;color:var(--text-3);font-size:13px;line-height:18px}.notice{display:flex;align-items:center;gap:14px;padding:14px 18px 14px 14px;border-radius:24px;background:var(--raised);margin:0 0 22px}.notice .gi{width:36px;height:36px}.notice .t{display:flex;flex-direction:column;min-width:0}.notice b{font-weight:500;font-size:15px;line-height:22px;letter-spacing:-.02em}.notice span{color:var(--text-2);font-size:14px;line-height:20px}.notice.warn{background:color-mix(in srgb,var(--warn) 10%,var(--raised));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--warn) 22%,transparent)}.notice.bad{background:color-mix(in srgb,var(--bad) 10%,var(--raised));box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--bad) 22%,transparent)}.page.single{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding-block:calc(24px + env(safe-area-inset-top,0px)) calc(24px + env(safe-area-inset-bottom,0px))}.page.single .crumbs{position:relative;left:12px;max-width:calc(100% - 84px);margin:0 0 16px}.page.single .cr-mark{position:absolute;right:calc(100% + 10px);top:0}.page.single .page-body{width:100%;max-width:400px}.page.single .gone{margin:0}.gone{max-width:400px;margin:12vh auto 0;padding:32px 24px 28px;border-radius:var(--r-sheet);background:var(--raised);text-align:center;display:flex;flex-direction:column;align-items:center}.gone .gi{width:56px;height:56px;margin-bottom:16px}.gone h1{margin:0;font-size:22px;line-height:28px;font-weight:500;letter-spacing:-.03em}.gone p{margin:6px 0 0;color:var(--text-2);text-wrap:balance}.dgrid{display:grid;gap:10px;grid-template-columns:minmax(0,1fr)}@media(min-width:560px){.dgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}.dev{background:var(--raised);border-radius:var(--r-card);padding:8px;display:flex;flex-direction:column;gap:8px;min-width:0;container:card / inline-size;--fit: var(--spring-smooth-dur, 524ms) var(--spring-smooth, ease)}.dev.is-here{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 32%,transparent)}.dev.off{opacity:.5}.dev-top{display:flex;align-items:center;gap:12px;padding:8px 6px 6px 10px}.dev-top .gi{width:32px;height:32px}.dev-id{flex:1;min-width:0;display:flex;flex-direction:column}.dev-name{font-size:16px;line-height:22px;font-weight:500;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dev-stat{font-size:13px;line-height:18px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dev-stat.ok-t{color:var(--ok)}.dev-stat.warn-t{color:var(--warn)}.dev-stat.here-t{color:var(--accent)}.dev-use{margin-top:auto;background:var(--field);border-radius:var(--r-row);padding:12px 14px 12px 16px;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:66px}.use-txt{display:flex;flex-direction:column;flex:1;min-width:0}.use-lbl{font-size:13px;line-height:18px;color:var(--text-2);white-space:nowrap}.use-val{font-size:17px;line-height:24px;font-weight:500;letter-spacing:-.02em;transition:font-size var(--fit),line-height var(--fit)}.dev .setup-btn{margin-top:auto}@container card (max-width: 313px){.use-val{font-size:15px;line-height:22px}.bars-week{--gap: 3px}.bars-week i{width:4px;border-radius:2px}}@container card (max-width: 253px){.use-val{font-size:14px;line-height:22px}.use-val .ud{column-gap:8px}}.dev.add{align-items:center;justify-content:center;min-height:144px;gap:10px;color:var(--text-2);font-weight:500;transition:background-color .2s var(--ease-out),transform .2s var(--ease-out)}.dev.add:hover{background:color-mix(in srgb,var(--raised),var(--knob) 45%)}.dev.add:active{transform:scale(.98)}.dev.add .gi{width:36px;height:36px}.dev.first{grid-column:1 / -1;align-items:center;text-align:center;padding:28px 24px 24px;gap:6px}.dev.first .gi{width:44px;height:44px;margin-bottom:8px}.dev.first b{font-size:18px;line-height:24px;font-weight:500;letter-spacing:-.02em}.dev.first p{margin:0 0 14px;color:var(--text-2);font-size:14px;line-height:20px;max-width:34ch;text-wrap:balance}.dev.first .btn{max-width:320px}.dgrid.snap .dev *{transition:none}@media(prefers-reduced-motion:reduce){.use-val{transition:none}}.reach2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.reach-tile{position:relative;display:flex;flex-direction:column;gap:1px;padding:12px 12px 12px 14px;border-radius:16px;background:var(--field);min-width:0}.reach-tile .rt-ic{width:28px;height:28px;margin-bottom:10px}.reach-tile b{font-size:14px;line-height:20px;font-weight:500;letter-spacing:-.015em}.reach-tile .rt-sub{font-size:12px;line-height:16px;color:var(--text-2)}.reach-tile .rt-mark{position:absolute;top:12px;right:12px;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:var(--ok-soft);color:var(--ok)}.reach-tile .rt-mark .i{width:12px;height:12px;stroke-width:2.4}.reach-tile.off b{color:var(--text-2)}.reach-tile.off .rt-sub{color:var(--text-3)}.reach-tile.off .rt-ic{opacity:.45}.reach-tile.off .rt-mark{background:var(--knob);color:var(--text-3)}.lbl-s{font-size:12px;font-weight:500;color:var(--text-2)}.names{display:flex;flex-wrap:wrap;gap:6px}.namechip{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 10px 0 12px;border-radius:10px;background:var(--field);font-family:var(--mono);font-size:13px;letter-spacing:0;transition:background-color .15s,transform .15s var(--ease-out)}.namechip:hover{background:var(--knob)}.namechip:active{transform:scale(.96)}.namechip .faint{color:var(--text-3)}.namechip .i{width:14px;height:14px;color:var(--text-2)}.ring{width:16px;height:16px;transform:rotate(-90deg)}.ring .trk{stroke:var(--bar)}.ring .arc{stroke:var(--accent)}.ring .arc.warn{stroke:var(--warn)}.ring .arc.bad{stroke:var(--bad)}.month{display:flex;flex-direction:column;gap:8px}.month-axis{position:relative;display:flex;justify-content:space-between;font-size:11px;color:var(--text-3);font-weight:500}.month-axis .td{position:absolute;transform:translate(-50%);color:var(--accent)}.month-axis .hide{visibility:hidden}.month-read{display:flex;justify-content:space-between;align-items:baseline;margin-top:10px;font-size:13px;color:var(--text-2)}.month-read>*{white-space:nowrap}.month-read .ud{color:var(--text);font-weight:500;font-size:15px;letter-spacing:-.02em}.meter{height:6px;border-radius:3px;background:var(--bar);overflow:hidden}.meter>i{display:block;height:100%;border-radius:3px;background:var(--accent)}.meter>i.warn{background:var(--warn)}.meter>i.bad{background:var(--bad)}.until{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-radius:16px;background:var(--field)}.until-num{display:flex;flex-direction:column;min-width:0}.until-num b{font-size:36px;line-height:40px;font-weight:600;letter-spacing:-.045em}.until-num span{font-size:13px;line-height:18px;color:var(--text-2)}.until-num .until-sub{margin-top:8px;font-size:12px;color:var(--text-3)}.until.soon .until-num b{color:var(--warn)}.cal{display:flex;flex-direction:column;gap:6px;flex:none}.cal-h,.cal-g{display:grid;grid-template-columns:repeat(7,10px);gap:5px}.cal-h span{font-size:9px;line-height:10px;font-weight:600;color:var(--text-3);text-align:center}.cal-g i{width:10px;height:10px;border-radius:3px;background:color-mix(in srgb,var(--text) 16%,transparent)}.cal-g i.past{background:color-mix(in srgb,var(--text) 5%,transparent)}.cal-g i.today{background:var(--accent)}.cal-g i.end{background:transparent;box-shadow:inset 0 0 0 1.5px var(--accent)}.cal-g i.after{background:transparent}.until.soon .cal-g i.today{background:var(--warn)}.until.soon .cal-g i.end{box-shadow:inset 0 0 0 1.5px var(--warn)}.acc-row.opened .cal-g i{animation:cal-in .36s var(--ease-out) backwards;animation-delay:calc(var(--i) * 7ms)}@keyframes cal-in{0%{opacity:0;transform:scale(.4)}}.hours{display:flex;flex-direction:column;gap:8px;padding:14px 16px;border-radius:16px;background:var(--field)}.hours-top{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;color:var(--text-2)}.hours-top b{color:var(--text);font-weight:500;font-size:15px;letter-spacing:-.02em}.hours-bar{position:relative;height:8px;border-radius:4px;background:color-mix(in srgb,var(--text) 8%,transparent)}.hours-bar i{position:absolute;top:0;bottom:0;border-radius:4px;background:color-mix(in srgb,var(--ok) 70%,transparent)}.hours-now{position:absolute;top:-4px;width:2px;height:16px;margin-left:-1px;border-radius:1px;background:var(--text);box-shadow:0 0 0 2px var(--field)}.hours-now.out{background:var(--warn)}.hours-axis{display:flex;justify-content:space-between;font-size:10px;color:var(--text-3);font-weight:500}@media(prefers-reduced-motion:reduce){.acc-row.opened .cal-g i{animation:none}}.sheet-root{position:fixed;inset:0;z-index:50;display:none}.sheet-root.open{display:block}.scrim{position:absolute;inset:0;background:var(--scrim);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.sheet{position:absolute;left:var(--gutter-l);right:var(--gutter-r);bottom:calc(16px + env(safe-area-inset-bottom,0px));margin:0 auto;max-width:400px;max-height:calc(100% - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));background:var(--raised);border-radius:var(--r-sheet);box-shadow:var(--sheet-shadow);overflow:hidden;display:flex;flex-direction:column}@media(min-width:760px){.sheet-root.open{display:flex;align-items:center;justify-content:center}.sheet{position:relative;left:auto;right:auto;bottom:auto;margin:0;width:calc(100% - var(--gutter-l) - var(--gutter-r))}}.sheet .x{position:absolute;z-index:3;right:22px;top:22px}.vp{position:relative;overflow:hidden;flex:none}.sheet-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}.view{padding:0 24px 24px;display:flex;flex-direction:column}.vhead{display:flex;align-items:center;gap:12px;height:76px;padding-right:44px;flex:none;cursor:grab;touch-action:none}.vhead h2{flex:1;margin:0;font-size:20px;line-height:28px;font-weight:500;letter-spacing:-.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.vhead.center h2{text-align:center}.vhead.with-acts{padding-right:126px}.vsub{margin:-16px 0 18px;color:var(--text-2);font-size:14px;line-height:20px}.vhead.center+.vsub{text-align:center;margin:-6px auto 24px;max-width:32ch;text-wrap:balance}.kinds-note{margin:14px 2px 16px}.view>.hint.bad-t{margin-top:8px}.secure-note{margin-top:12px;text-align:center}.sheet-acts{position:absolute;z-index:3;top:22px;right:58px}.hpill{position:relative;display:flex;gap:2px}.hp-b{display:grid;place-items:center;width:38px;height:32px;background:var(--knob);color:var(--text);transition:background-color .15s,transform .15s var(--ease-out)}.hp-b:first-of-type{border-radius:16px 6px 6px 16px}.hp-b:last-of-type{border-radius:6px 16px 16px 6px}.hp-b .i{width:16px;height:16px}.hp-b:hover{background:color-mix(in srgb,var(--knob),var(--text) 6%)}.hp-b:active{transform:scale(.94)}.hp-b.done{color:var(--ok)}.hp-tip{position:absolute;z-index:4;left:0;top:calc(100% + 8px);height:26px;padding:0 10px;display:flex;align-items:center;border-radius:999px;background:var(--toast);color:var(--toast-fg);font:500 12px/1 var(--font);letter-spacing:-.1px;white-space:nowrap;box-shadow:0 0 0 1px var(--line-glass),var(--pop-shadow);opacity:0;pointer-events:none;overflow:hidden;transform-origin:50% 0}.hp-tip.on{opacity:1}.hp-tip .tt{position:relative;display:inline-flex;justify-content:center;white-space:nowrap}.hp-tip .tt-m{position:absolute;left:0;top:0;visibility:hidden;white-space:nowrap}.sheet .x,.sheet-acts{transition:transform .15s var(--ease-out),background-color .15s,opacity .24s var(--ease-out),filter .24s var(--ease-out),scale .24s var(--ease-out)}.sheet.arrived .x,.sheet.arrived .sheet-acts,.sheet.asks .x{opacity:0;filter:blur(3px);scale:.9;pointer-events:none}.center-col,.ask{display:flex;flex-direction:column}.center-col{align-items:center;text-align:center}.ask{align-items:flex-start;text-align:left;padding-top:24px}.center-col.secure{padding-top:4px}:is(.center-col,.ask) .gi.xl{width:64px;height:64px;margin:8px 0 16px}.ask .gi.xl{margin:0 0 18px}:is(.center-col,.ask) h3{margin:0;font-size:20px;line-height:28px;font-weight:500;letter-spacing:-.5px}:is(.center-col,.ask) p{margin:6px 0 22px;color:var(--text-2);font-size:15px;line-height:21px}.center-col p{max-width:30ch;text-wrap:balance}.ask p{text-wrap:pretty}.center-col.secure p{margin-top:0}.btnrow{display:flex;gap:8px;width:100%}.btnrow .btn{flex:1}.btnrow2{display:grid;gap:8px}.btnrow2 .btn{width:100%}.setup{display:flex;flex-direction:column}.setup .notice{margin:0 0 16px}.steps-gap{height:22px}.step{display:flex;gap:12px}.step+.step{margin-top:20px}.step-n{width:24px;height:24px;border-radius:50%;background:var(--knob);font-size:13px;font-weight:600;display:grid;place-items:center;flex:none}.step-b{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px}.step-t{font-size:16px;line-height:24px;font-weight:500;letter-spacing:-.02em}.step-box{display:flex;flex-direction:column;gap:10px}.way{display:flex;flex-direction:column;padding:12px 14px;border-radius:20px;background:var(--field);margin-bottom:18px}.way-row{display:flex;align-items:center;gap:10px}.way-end{width:34px;height:34px;border-radius:11px;background:var(--knob);display:grid;place-items:center;flex:none;color:var(--text-2);transition:background-color .4s var(--ease-out),color .4s var(--ease-out)}.way-end .i{width:17px;height:17px}.way-end.home{color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,transparent)}.way-track{position:relative;flex:1;height:8px}.way-track:before,.way-glow,.way-fill{content:"";position:absolute;inset:0;-webkit-mask:radial-gradient(circle,#000 1.4px,transparent 1.9px) 0 50% / 9px 8px repeat-x;mask:radial-gradient(circle,#000 1.4px,transparent 1.9px) 0 50% / 9px 8px repeat-x}.way-track:before{background:var(--text-3);opacity:.8}.way-glow{overflow:hidden;transition:opacity .2s var(--ease-out)}.way-glow i{position:absolute;inset:0;background:linear-gradient(90deg,transparent 32%,var(--accent) 50%,transparent 68%);transform:translate(-70%);animation:way-run 2s cubic-bezier(.45,0,.55,1) infinite}@keyframes way-run{0%{transform:translate(-70%)}72%,to{transform:translate(70%)}}.way-fill{background:var(--ok);clip-path:inset(0 100% 0 0);transition:clip-path .7s var(--ease-out) 80ms}.way.done .way-fill{clip-path:inset(0)}.way.done .way-glow,.way.stopped .way-glow{opacity:0}.way.done .way-end{color:var(--ok);background:var(--ok-soft)}.way.done .way-end.home{transition-delay:.6s}.way.done .way-end.home .i{animation:way-pop .42s var(--spring-bouncy, ease) .6s backwards}@keyframes way-pop{0%{transform:scale(.6)}to{transform:none}}.way-text{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:30px;margin-top:10px;text-align:center}.way-text .t{display:flex;flex-direction:column;align-items:center;min-width:0}.way-text b{position:relative;display:inline-flex;justify-content:center;white-space:nowrap;font-weight:500;font-size:14px;line-height:20px;transition:color .3s var(--ease-out)}.way-text .ws{color:var(--text-2);font-size:13px;line-height:18px}.way.done .way-text b{color:var(--ok)}.filecard{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:18px;background:var(--field)}.fc-row{display:flex;align-items:center;gap:12px;min-width:0}.filecard-ic{width:38px;height:46px;border-radius:9px;background:var(--knob);font:600 10px/1 var(--mono);display:grid;place-items:center;color:var(--text-2);flex:none}.filecard .t{flex:1;min-width:0;display:flex;flex-direction:column}.filecard .t .mono{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filecard .t span:last-child{font-size:12px;color:var(--text-2);line-height:16px}.confbar{display:flex;gap:8px}.conf{margin:0;padding:12px 14px;border-radius:14px;background:var(--field);font:12px/18px var(--mono);max-height:16rem;overflow:auto;white-space:pre;color:var(--text-2)}.conf .k{color:var(--text)}.conf .sec{color:var(--accent)}.conf .mask{color:var(--text-3);letter-spacing:1px}.osm{white-space:normal}.osm-ic{display:inline-grid;width:1.05em;height:1.05em;margin-right:.25em;vertical-align:-.16em}.osm-ic>svg{grid-area:1 / 1;width:100%;height:100%}.osm-ic .eye{fill:var(--field)}.osm-p{display:inline-block;white-space:pre}.scanline{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:.3em}.scanline .osm{white-space:nowrap}@media(max-width:440px){.scanline{flex-direction:column;align-items:flex-start}}.way-text b .mt-old{color:var(--text-2)}@media(prefers-reduced-motion:reduce){.way-glow{display:none}.way-fill{transition:none}.way.done .way-end.home .i{animation:none}}.menu{position:fixed;z-index:60;min-width:224px;padding:6px;border-radius:20px;background:var(--field);box-shadow:var(--pop-shadow),inset 0 0 0 1px var(--line)}.menu-hl{position:absolute;left:6px;right:6px;top:6px;height:40px;border-radius:14px;background:var(--knob);opacity:0;transition:opacity .15s var(--ease-out);pointer-events:none}.menu-hl.moving{transition:opacity .15s var(--ease-out),transform var(--spring-quick-dur, .3s) var(--spring-quick, ease-out),background-color .15s}.menu-hl.bad{background:var(--bad-soft)}.menu-hl.warn{background:color-mix(in srgb,var(--warn) 13%,transparent)}.mi{position:relative;z-index:1;display:flex;align-items:center;gap:12px;width:100%;height:40px;padding:0 12px;border-radius:14px;font-size:14px;font-weight:500;text-align:left}.mi .i{width:16px;height:16px;color:var(--text-2)}.mi .i.off{visibility:hidden}.mi.warn,.mi.warn .i{color:var(--warn)}.mi.bad,.mi.bad .i{color:var(--bad)}.menu-sep{height:1px;margin:6px 12px;background:var(--line)}.toasts{position:fixed;left:0;right:0;height:42px;bottom:calc(24px + env(safe-area-inset-bottom,0px));z-index:70;display:flex;justify-content:center;align-items:flex-end;pointer-events:none;padding-left:var(--gutter-l);padding-right:var(--gutter-r)}.toast{position:absolute;display:flex;align-items:center;gap:8px;height:42px;padding:0 18px 0 13px;border-radius:999px;background:var(--toast);color:var(--toast-fg);font-size:14px;font-weight:500;box-shadow:var(--pop-shadow);white-space:nowrap}.toast .i{width:18px;height:18px;color:var(--ok)}.toast.bad .i{color:var(--bad)} diff --git a/package/luci-app-dawnline/root/usr/share/dawnline/portal/assets/portal.js b/package/luci-app-dawnline/root/usr/share/dawnline/portal/assets/portal.js index 5b48163..c404498 100644 --- a/package/luci-app-dawnline/root/usr/share/dawnline/portal/assets/portal.js +++ b/package/luci-app-dawnline/root/usr/share/dawnline/portal/assets/portal.js @@ -1,6 +1,6 @@ -"use strict";(()=>{var fs=Object.create;var or=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var ms=Object.getOwnPropertyNames;var gs=Object.getPrototypeOf,vs=Object.prototype.hasOwnProperty;var ys=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var bs=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ms(t))!vs.call(e,o)&&o!==n&&or(e,o,{get:()=>t[o],enumerable:!(r=hs(t,o))||r.enumerable});return e};var xs=(e,t,n)=>(n=e!=null?fs(gs(e)):{},bs(t||!e||!e.__esModule?or(n,"default",{value:e,enumerable:!0}):n,e));var Vr=ys((qr,Fr)=>{"use strict";var Kr=(function(){var e=function(d,v){var a=236,h=17,p=d,A=n[v],u=null,c=0,T=null,w=[],C={},I=function(M,k){c=p*4+17,u=(function(y){for(var L=new Array(y),S=0;S=7&&le(M),T==null&&(T=se(p,A,w)),Y(T,k)},G=function(M,k){for(var y=-1;y<=7;y+=1)if(!(M+y<=-1||c<=M+y))for(var L=-1;L<=7;L+=1)k+L<=-1||c<=k+L||(0<=y&&y<=6&&(L==0||L==6)||0<=L&&L<=6&&(y==0||y==6)||2<=y&&y<=4&&2<=L&&L<=4?u[M+y][k+L]=!0:u[M+y][k+L]=!1)},V=function(){for(var M=0,k=0,y=0;y<8;y+=1){I(!0,y);var L=o.getLostPoint(C);(y==0||M>L)&&(M=L,k=y)}return k},J=function(){for(var M=8;M>y&1)==1;u[Math.floor(y/3)][y%3+c-8-3]=L}for(var y=0;y<18;y+=1){var L=!M&&(k>>y&1)==1;u[y%3+c-8-3][Math.floor(y/3)]=L}},ue=function(M,k){for(var y=A<<3|k,L=o.getBCHTypeInfo(y),S=0;S<15;S+=1){var B=!M&&(L>>S&1)==1;S<6?u[S][8]=B:S<8?u[S+1][8]=B:u[c-15+S][8]=B}for(var S=0;S<15;S+=1){var B=!M&&(L>>S&1)==1;S<8?u[8][c-S-1]=B:S<9?u[8][15-S-1+1]=B:u[8][15-S-1]=B}u[c-8][8]=!M},Y=function(M,k){for(var y=-1,L=c-1,S=7,B=0,U=o.getMaskFunction(k),z=c-1;z>0;z-=2)for(z==6&&(z-=1);;){for(var X=0;X<2;X+=1)if(u[L][z-X]==null){var ie=!1;B>>S&1)==1);var K=U(L,z-X);K&&(ie=!ie),u[L][z-X]=ie,S-=1,S==-1&&(B+=1,S=7)}if(L+=y,L<0||c<=L){L-=y,y=-y;break}}},te=function(M,k){for(var y=0,L=0,S=0,B=new Array(k.length),U=new Array(k.length),z=0;z=0?tr.getAt(nr):0}}for(var rr=0,K=0;Kz*8)throw"code length overflow. ("+S.getLengthInBits()+">"+z*8+")";for(S.getLengthInBits()+4<=z*8&&S.put(0,4);S.getLengthInBits()%8!=0;)S.putBit(!1);for(;!(S.getLengthInBits()>=z*8||(S.put(a,8),S.getLengthInBits()>=z*8));)S.put(h,8);return te(S,L)};C.addData=function(M,k){k=k||"Byte";var y=null;switch(k){case"Numeric":y=f(M);break;case"Alphanumeric":y=E(M);break;case"Byte":y=x(M);break;case"Kanji":y=b(M);break;default:throw"mode:"+k}w.push(y),T=null},C.isDark=function(M,k){if(M<0||c<=M||k<0||c<=k)throw M+","+k;return u[M][k]},C.getModuleCount=function(){return c},C.make=function(){if(p<1){for(var M=1;M<40;M++){for(var k=m.getRSBlocks(M,A),y=g(),L=0;L";for(var S=0;S';y+=""}return y+="",y+="",y},C.createSvgTag=function(M,k,y,L){var S={};typeof arguments[0]=="object"&&(S=arguments[0],M=S.cellSize,k=S.margin,y=S.alt,L=S.title),M=M||2,k=typeof k=="undefined"?M*4:k,y=typeof y=="string"?{text:y}:y||{},y.text=y.text||null,y.id=y.text?y.id||"qrcode-description":null,L=typeof L=="string"?{text:L}:L||{},L.text=L.text||null,L.id=L.text?L.id||"qrcode-title":null;var B=C.getModuleCount()*M+k*2,U,z,X,ie,K="",ye;for(ye="l"+M+",0 0,"+M+" -"+M+",0 0,-"+M+"z ",K+=''+ne(L.text)+"":"",K+=y.text?''+ne(y.text)+"":"",K+='',K+='":k+=">";break;case"&":k+="&";break;case'"':k+=""";break;default:k+=L;break}}return k},Rt=function(M){var k=1;M=typeof M=="undefined"?k*2:M;var y=C.getModuleCount()*k+M*2,L=M,S=y-M,B,U,z,X,ie,K={"██":"█","█ ":"▀"," █":"▄"," ":" "},ye={"██":"▀","█ ":"▀"," █":" "," ":" "},be="";for(B=0;B=S?ye[ie]:K[ie];be+=` -`}return y%2&&M>0?be.substring(0,be.length-y-1)+Array(y+1).join("▀"):be.substring(0,be.length-1)};return C.createASCII=function(M,k){if(M=M||1,M<2)return Rt(k);M-=1,k=typeof k=="undefined"?M*2:k;var y=C.getModuleCount()*M+k*2,L=k,S=y-k,B,U,z,X,ie=Array(M+1).join("██"),K=Array(M+1).join(" "),ye="",be="";for(B=0;B>>8),A.push(T&255)):A.push(h)}}return A}};var t={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},n={L:1,M:0,Q:3,H:2},r={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},o=(function(){var d=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],v=1335,a=7973,h=21522,p={},A=function(u){for(var c=0;u!=0;)c+=1,u>>>=1;return c};return p.getBCHTypeInfo=function(u){for(var c=u<<10;A(c)-A(v)>=0;)c^=v<=0;)c^=a<5&&(T+=3+I-5)}for(var w=0;w=256;)p-=255;return d[p]},h})();function l(d,v){if(typeof d.length=="undefined")throw d.length+"/"+v;var a=(function(){for(var p=0;p>>7-h%8&1)==1},a.put=function(h,p){for(var A=0;A>>p-A-1&1)==1)},a.getLengthInBits=function(){return v},a.putBit=function(h){var p=Math.floor(v/8);d.length<=p&&d.push(0),h&&(d[p]|=128>>>v%8),v+=1},a},f=function(d){var v=t.MODE_NUMBER,a=d,h={};h.getMode=function(){return v},h.getLength=function(u){return a.length},h.write=function(u){for(var c=a,T=0;T+2>>8&255)*192+(w&255),u.put(w,13),T+=2}if(T>>8)},v.writeBytes=function(a,h,p){h=h||0,p=p||a.length;for(var A=0;A0&&(a+=","),a+=d[h];return a+="]",a},v},H=function(){var d=0,v=0,a=0,h="",p={},A=function(c){h+=String.fromCharCode(u(c&63))},u=function(c){if(!(c<0)){if(c<26)return 65+c;if(c<52)return 97+(c-26);if(c<62)return 48+(c-52);if(c==62)return 43;if(c==63)return 47}throw"n:"+c};return p.writeByte=function(c){for(d=d<<8|c&255,v+=8,a+=1;v>=6;)A(d>>>v-6),v-=6},p.flush=function(){if(v>0&&(A(d<<6-v),d=0,v=0),a%3!=0)for(var c=3-a%3,T=0;T=v.length){if(p==0)return-1;throw"unexpected end of file./"+p}var c=v.charAt(a);if(a+=1,c=="=")return p=0,-1;if(c.match(/^\s$/))continue;h=h<<6|u(c.charCodeAt(0)),p+=6}var T=h>>>p-8&255;return p-=8,T};var u=function(c){if(65<=c&&c<=90)return c-65;if(97<=c&&c<=122)return c-97+26;if(48<=c&&c<=57)return c-48+52;if(c==43)return 62;if(c==47)return 63;throw"c:"+c};return A},R=function(d,v){var a=d,h=v,p=new Array(d*v),A={};A.setPixel=function(w,C,I){p[C*a+w]=I},A.write=function(w){w.writeString("GIF87a"),w.writeShort(a),w.writeShort(h),w.writeByte(128),w.writeByte(0),w.writeByte(0),w.writeByte(0),w.writeByte(0),w.writeByte(0),w.writeByte(255),w.writeByte(255),w.writeByte(255),w.writeString(","),w.writeShort(0),w.writeShort(0),w.writeShort(a),w.writeShort(h),w.writeByte(0);var C=2,I=c(C);w.writeByte(C);for(var G=0;I.length-G>255;)w.writeByte(255),w.writeBytes(I,G,255),G+=255;w.writeByte(I.length-G),w.writeBytes(I,G,I.length-G),w.writeByte(0),w.writeString(";")};var u=function(w){var C=w,I=0,G=0,V={};return V.write=function(J,re){if(J>>>re)throw"length over";for(;I+re>=8;)C.writeByte(255&(J<>>=8-I,G=0,I=0;G=J<0&&C.writeByte(G)},V},c=function(w){for(var C=1<>6,128|i&63):i<55296||i>=57344?r.push(224|i>>12,128|i>>6&63,128|i&63):(o++,i=65536+((i&1023)<<10|n.charCodeAt(o)&1023),r.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|i&63))}return r}return t(e)}})();(function(e){typeof define=="function"&&define.amd?define([],e):typeof qr=="object"&&(Fr.exports=e())})(function(){return Kr})});var sr={s:{'"%s" already exists.':"Устройство «%s» уже есть.",'"%s" is already taken.':"Идентификатор «%s» уже занят.","%s (Android: %s)":"%s (на Android: %s)","%s (router time)":"%s (по времени роутера)","%s can't use the network interface %s: it exists and isn't Dawnline's.":"Сервер %s не может использовать сетевой интерфейс %s: он уже существует и создан не Dawnline.","%s connected":"Подключено: %s","%s d ago":"%s дн. назад","%s h ago":"%s ч назад",'%s has an invalid interface name "%s".':"У сервера %s недопустимое имя интерфейса «%s».","%s has no room for every device on %s.":"В подсети %s не хватит адресов для всех устройств сервера %s.","%s in total":"%s всего","%s is kept down.":"Сервер %s остановлен.","%s is kept down: its disguise needs AmneziaWG %s (installed: %s).":"Сервер %s остановлен: для его маскировки нужен AmneziaWG %s (установлен %s).","%s is kept down: its disguise needs AmneziaWG %s (installed: none).":"Сервер %s остановлен: для его маскировки нужен AmneziaWG %s (не установлен).","%s left":"осталось %s","%s min ago":"%s мин назад","%s must be a number or range":"%s: нужно число или диапазон","%s of %s":"%s из %s","%s of %s GB":"%s из %s ГБ","%s of %s GB this month":"%s из %s ГБ в этом месяце","%s of %s in total.":"Всего %s из %s.","%s options":"Действия с устройством %s","%s this month":"%s в этом месяце","%s your time":"%s по вашему времени","%sd %sh":"%s д %s ч","%sh %sm":"%s ч %s мин","%sm":"%s мин","A total for your whole access, it does not reset.":"Считается за весь срок доступа и не обнуляется.","APK file on":"APK-файл на","Access %s":"Доступ %s","Access ended":"Доступ закончился","Access must be lan, internet or both.":"Доступ должен быть lan, internet или both.","Access paused":"Доступ на паузе","Access until":"Доступ до",Active:"Активен","WireGuard appAdd Tunnel":"Добавить туннель","Add a device":"Добавить устройство","Add device":"Добавить устройство","Add it from the device":"Добавить с самого устройства","Add the connection":"Добавьте подключение","Add this device":"Добавить это устройство","Add this phone":"Добавить этот телефон","Add your first device":"Добавьте первое устройство","Adding devices isn't available right now: the VPN server isn't ready. Ask whoever sent you this link.":"Сейчас добавить устройство нельзя: VPN-сервер не готов. Обратитесь к тому, кто прислал вам эту ссылку.","Address copied":"Адрес скопирован","Already has the app":"Приложение уже установлено","AmneziaWG is not installed (%s): install it in Dawnline → Components.":"AmneziaWG не установлен (%s): установите его в Dawnline → Компоненты.","AmneziaWG is not installed: install it in Dawnline → Components.":"AmneziaWG не установлен: установите его в Dawnline → Компоненты.","Android phone":"Телефон Android","Android tablet":"Планшет Android","Ask for a new one.":"Попросите новую.",B:"Б",Back:"Назад",Breadcrumb:"Навигационная цепочка",Cancel:"Отмена","Circle %s: server %s does not exist.":"Круг %s: сервера %s нет.",Close:"Закрыть","Close this and open it again to keep checking.":"Закройте окно и откройте его снова, чтобы проверить ещё раз.",Configuration:"Конфигурация","Configuration copied":"Конфигурация скопирована","Confirm the import and connect":"Подтвердите импорт и подключитесь",Connect:"Подключить",Connected:"Подключено","Connected, no data left":"Подключено, трафик закончился","Connected, outside your hours":"Подключено, вне часов доступа","Connection settings only travel encrypted":"Настройки подключения передаются только в зашифрованном виде","AmneziaVPN appContinue":"Продолжить",Copied:"Скопировано",Copy:"Скопировать","Copy %s":"Скопировать %s","Copy %s config":"Скопировать конфигурацию %s","Copy IP address":"Скопировать IP-адрес","Copy local address":"Скопировать локальный адрес","Copy or save the connection":"Скопировать или сохранить подключение","Copy the configuration":"Скопировать конфигурацию","Copy the key":"Скопировать ключ","in a sentenceCopy the key":"Скопируйте ключ","Copy the link":"Скопировать ссылку","Copying is blocked here. Select the text and copy it by hand.":"Копирование здесь заблокировано. Выделите текст и скопируйте его вручную.","Create connection":"Создать подключение","WireGuard appCreate from QR code":"Создать из QR-кода","WireGuard appCreate from file or archive":"Создать из файла или архива","Cross-site request refused.":"Запрос с другого сайта отклонён.","Data limit must be a positive number of GB.":"Лимит трафика должен быть положительным числом ГБ.","Data limit reached":"Лимит трафика исчерпан","Data this month":"Трафик за месяц","Data used":"Трафик всего","Device %s of %s: address %s is also used by device %s of %s.":"Устройство %s (%s): адрес %s уже занят устройством %s (%s).","Device %s of %s: address %s is not a plain IPv4 address.":"Устройство %s (%s): адрес %s не является обычным IPv4-адресом.","Device %s of %s: address %s is outside %s's tunnel %s.":"Устройство %s (%s): адрес %s вне туннеля сервера %s (%s).","Device %s of %s: address %s is the router's own address on %s.":"Устройство %s (%s): адрес %s принадлежит самому роутеру на сервере %s.","Device %s of %s: address (none) is not a plain IPv4 address.":"Устройство %s (%s): нет IPv4-адреса.","Device %s of %s: the preshared key is not a key.":"Устройство %s (%s): общий ключ (PSK) некорректен.","Device %s of %s: the private key is not a key.":"Устройство %s (%s): приватный ключ некорректен.","Device %s of %s: the public key is not a key.":"Устройство %s (%s): публичный ключ некорректен.","Device %s: person %s does not exist.":"Устройство %s: человека %s нет.","Device limit must be between 1 and 32.":"Лимит устройств: от 1 до 32.","Device limit reached (%d).":"Достигнут лимит устройств (%d).","Device name":"Имя устройства","Device not found.":"Устройство не найдено.","Device removed":"Устройство удалено","Devices at home":"Устройства дома","Devices at home and on this VPN reach yours as %s":"Устройства дома и в этом VPN обращаются к вашим по адресу %s",Disabled:"Отключено",Download:"Скачать","Download %s config":"Скачать конфигурацию %s","Download for Linux":"Скачать для Linux","Download for Mac":"Скачать для Mac","Download for Windows":"Скачать для Windows","Download from":"Скачать с сайта","Download on the":"Загрузите в","Download the file":"Скачать файл","Download the key":"Скачать ключ",Downloaded:"Получено","End date must be YYYY-MM-DD.":"Дата окончания должна быть в формате ГГГГ-ММ-ДД.","Endpoint must be a hostname or IP address.":"Адрес сервера должен быть именем хоста или IP-адресом.","Ends %s":"Закончится %s","Enter a device name (up to 48 characters).":"Введите название устройства (до 48 символов).",Expired:"Срок истёк","Extra data must be a positive number of GB.":"Дополнительный трафик должен быть положительным числом ГБ.","For computers and routers":"Для компьютеров и роутеров",GB:"ГБ","Gbit/s":"Гбит/с","Get %s":"Установите %s","Get %s on the %s and come back here.":"Установите %s на %s и вернитесь сюда.","Get %s on the router":"Установите %s на роутер","Get it on":"Доступно в","Hide key":"Скрыть ключ","Home network":"Домашняя сеть","Home network + Internet":"Домашняя сеть и интернет","Hours must look like 07:00-23:00.":"Часы доступа указываются так: 07:00-23:00.","Hours, router time":"Часы доступа, время роутера","Hours, your time":"Часы доступа, ваше время","IP address copied":"IP-адрес скопирован","WireGuard appImport Tunnel(s) from File…":"Импорт туннелей из файла…","WireGuard appImport from file or archive":"Импорт из файла или архива","Import the configuration":"Импортируйте конфигурацию","WireGuard appImport tunnel(s) from file…":"Импорт туннелей из файла…","In %s:":"В %s:",Included:"Есть доступ","AmneziaVPN appInsert":"Вставить","Install from":"Установить с сайта","Interface name: 1-12 lowercase letters, digits or _.":"Имя интерфейса: 1–12 строчных латинских букв, цифр или _.",Internet:"Интернет","Invalid JSON.":"Некорректный JSON.","Invalid public key.":"Недопустимый публичный ключ.","It ended on %s.":"Доступ закончился %s.","It gets new keys and its current settings stop working. Set it up again with the new ones that open next.":"Устройство получит новые ключи, а текущие настройки перестанут работать. Настройте его заново с новыми - они откроются следом.","It gets new keys. This device is connected through its current settings: it disconnects a few seconds after you confirm. Add the new ones that open next.":"Устройство получит новые ключи. Сейчас вы подключены через его текущие настройки: через несколько секунд после подтверждения связь прервётся. Добавьте новые - они откроются следом.","Its connection stops working at once. You can add it again later.":"Подключение сразу перестанет работать. Устройство можно будет добавить снова.","Its settings changed: update the connection":"Настройки изменились: обновите подключение",KB:"КБ","Key copied":"Ключ скопирован","Key generation failed (is amneziawg-tools installed?).":"Не удалось создать ключ (установлен ли amneziawg-tools?).","Key generation failed (no random data).":"Не удалось создать ключ (нет случайных данных).","Key generation failed.":"Не удалось создать ключ.",Language:"Язык","Last 7 days":"За 7 дней","Last connected %s":"В сети %s","Link copied":"Ссылка скопирована","Linux PC":"Компьютер с Linux",MB:"МБ","Mbit/s":"Мбит/с","Method not allowed.":"Метод не поддерживается.",Mobile:"Мобильный","Monthly data must be a positive number of GB.":"Месячный лимит трафика должен быть положительным числом ГБ.",Name:"Имя","No connection yet":"Подключения пока нет","No data limit. The count starts again on the 1st.":"Лимита трафика нет. Счёт начинается заново 1-го числа.","No end date":"Бессрочно","No free address left on %s.":"На сервере %s не осталось свободных адресов.","No free addresses left in the server subnet.":"В подсети сервера не осталось свободных адресов.","No limit":"Без лимита","No server":"Нет сервера","No server yet":"Сервера пока нет","Not found.":"Не найден.","Not included":"Нет доступа","Not on the %s right now?":"Открыли на другом %s?","Not set up yet":"Ещё не настроено","Nothing gets through until it resets.":"Ничего не проходит, пока лимит не обнулится.","Nothing opened? %s and add it in the app.":"Ничего не открылось? %s и добавьте его в приложении.","Now, %s":"Сейчас %s",OR:"ИЛИ","Official release on GitHub":"Официальная версия на GitHub","On %s.":"Дата окончания - %s.","On GitHub":"На GitHub","Only the admin can turn devices off.":"Отключать устройства может только администратор.","stepOpen %s":"Откройте %s","Open %s.":"Доступ открыт %s.","Open a terminal in the folder with the file":"Откройте терминал в папке с файлом","Open in AmneziaVPN":"Открыть в AmneziaVPN","Open on another device":"Открыть на другом устройстве","Open on the device":"Открыть на устройстве","Open securely":"Открыть по HTTPS","Open the link securely":"Откройте защищённую ссылку","Open this link on the %s to set it up there.":"Откройте эту ссылку на %s, чтобы настроить его там.","Open this link over HTTPS to get the connection settings.":"Чтобы получить настройки подключения, откройте эту ссылку по HTTPS.","Open this page in Safari or Chrome: the store opens from here, but the app handoff does not.":"Откройте эту страницу в Safari или Chrome: магазин отсюда откроется, а передача в приложение - нет.","Open your link on the %s":"Откройте свою ссылку на %s","OpenWrt packages":"Пакеты OpenWrt","OpenWrt packages + kmod":"Пакеты OpenWrt + kmod",Other:"Другое","Other devices at home reach yours as %s":"Другие устройства дома обращаются к вашим по адресу %s","Out of data":"Трафик закончился","Outside allowed hours":"Вне часов доступа","Outside your hours":"Вне часов доступа",PC:"Компьютер",Paused:"На паузе","Person %s: circle %s does not exist.":"Человек %s: круга %s нет.","Person %s: has the same personal link as %s.":"Человек %s: личная ссылка совпадает со ссылкой человека %s.","Person %s: home service %s does not exist.":"Человек %s: домашнего сервиса %s нет.","Person %s: server %s does not exist.":"Человек %s: сервера %s нет.",Phone:"Телефон","Phones and tablets get a smaller packet size that suits mobile networks.":"У телефонов и планшетов пакеты меньше - так лучше для мобильных сетей.","Pick AmneziaVPN in the share sheet. Not there? %s and add it in the app.":"Выберите AmneziaVPN в меню «Поделиться». Его там нет? %s и добавьте его в приложении.","Pick the file and connect":"Выберите файл и подключитесь","Point its camera at the code: the link opens there.":"Наведите камеру устройства на код - ссылка откроется на нём.","Point its camera at the code: this page opens there.":"Наведите камеру устройства на код - там откроется эта страница.","Point its camera at the code: your page opens there with this device ready to add.":"Наведите камеру устройства на код - там откроется ваша страница, и его можно будет сразу добавить.","Port must be 1-65535.":"Порт: от 1 до 65535.","QR code":"QR-код","AmneziaVPN appQR code":"QR-код",Reconnect:"Переподключить","Reconnect %s?":"Переподключить «%s»?",Remove:"Удалить","Remove %s?":"Удалить «%s»?",Rename:"Переименовать","Rename %s":"Переименовать «%s»",Renamed:"Переименовано","Request failed (%s)":"Не удалось выполнить запрос (%s)","Request too large.":"Слишком большой запрос.","Resets on the 1st.":"Обнуляется 1-го числа.",Router:"Роутер",Run:"Выполните",Save:"Сохранить","WireGuard appScan from QR code":"Сканировать QR-код","Send it to the %s":"Отправить на %s","Send it to the %s in a message or a note, then in AmneziaVPN: %s.":"Отправьте его на %s в сообщении или заметке, затем в AmneziaVPN: %s.","Send it to the %s, then import %s in %s.":"Отправьте его на %s, затем импортируйте %s в %s.","Send to AmneziaVPN":"Отправить в AmneziaVPN","Server is disabled":"Сервер выключен","Server is turned off":"Сервер выключен","Set up %s":"Настроить %s","Set up a server first.":"Сначала настройте сервер.","Settings changed":"Настройки изменились","Settings changed, update needed":"Настройки изменились, нужно обновить","Share as a file":"Поделиться файлом","Share file":"Поделиться файлом","Share the file":"Поделиться файлом","Share the link":"Поделиться ссылкой","Show key":"Показать ключ","Straight into %s":"Сразу в %s","Subnet must look like 10.77.0.0/24.":"Подсеть указывается так: 10.77.0.0/24.","Subnet overlaps %s.":"Подсеть пересекается с %s.",TB:"ТБ",Tablet:"Планшет","Tap “%s” and connect":"Нажмите «%s» и подключитесь","The APK is for phones without Google Play, or where the store hides the app.":"APK - для телефонов без Google Play или если магазин скрывает приложение.","The admin has turned this device off.":"Администратор отключил это устройство.","The app goes on the %s.":"Приложение ставится на %s.","The browser may warn that the certificate is not trusted: it is this router’s own. Choose to continue (“Advanced” → “Proceed”).":"Браузер может предупредить, что сертификату нельзя доверять: это собственный сертификат роутера. Продолжите переход («Дополнительные» → «Перейти на сайт»).","The connection":"Подключение","The connection as one key":"Подключение одним ключом","The id may use lowercase letters, digits and underscores.":"В идентификаторе можно использовать строчные латинские буквы, цифры и подчёркивания.","The packages and the file for OpenWrt":"Пакеты и файл для OpenWrt","The page could not load":"Не удалось загрузить страницу","The person has no server.":"У человека нет сервера.","Then come back here and tap":"Затем вернитесь сюда и нажмите","Then import it in the app":"Затем импортируйте его в приложении","This device":"Это устройство","This key is already in use.":"Этот ключ уже используется.","This link no longer works":"Эта ссылка больше не работает","This page is open without encryption. To add or set up a device, open the same link over HTTPS:":"Эта страница открыта без шифрования. Чтобы добавить или настроить устройство, откройте ту же ссылку по HTTPS:","Through the router":"Через роутер",Today:"Сегодня","Too many changes in a short time. Try again in a few minutes.":"Слишком много изменений за короткое время. Попробуйте ещё раз через несколько минут.","Two steps, about a minute":"Два шага, около минуты","Two steps, about a minute: get the app, then add the connection.":"Два шага, около минуты: установите приложение, затем добавьте подключение.","Unknown DNS choice.":"Неизвестный вариант DNS.","Unknown action.":"Неизвестное действие.","Unknown circle.":"Неизвестный круг.","Unknown device.":"Неизвестное устройство.","Unknown end action.":"Неизвестное действие по окончании доступа.","Unknown person.":"Неизвестный человек.","Unknown server.":"Неизвестный сервер.","Unknown service %s.":"Неизвестный сервис %s.",Update:"Обновить","Update the connection":"Обновить подключение",Uploaded:"Отправлено","Waiting for the connection":"Ждём подключения","Warning must be 0-60 days.":"Предупреждать можно за 0–60 дней.","What is it?":"Что это за устройство?","Windows PC":"Компьютер с Windows",Yesterday:"Вчера","You already have a device with this name.":"У вас уже есть устройство с таким именем.","You haven’t been added to one.":"Вас ещё не добавили ни на один сервер.","Your access":"Ваш доступ","Your access has ended.":"Ваш доступ закончился.","Your access is paused.":"Ваш доступ на паузе.","Your devices":"Ваши устройства","Your devices can’t connect until it’s enabled again.":"Ваши устройства не подключатся, пока его снова не включат.","Your devices can’t connect until it’s extended.":"Ваши устройства не подключатся, пока доступ не продлят.","Your devices can’t connect until it’s resumed.":"Ваши устройства не подключатся, пока доступ не возобновят.","bit/s":"бит/с",computer:"компьютер","on thecomputer":"компьютере",device:"устройство","on thedevice":"устройстве",ended:"закончился","ends today":"закончится сегодня","ends tomorrow":"закончится завтра","h1-h4 must be distinct":"h1-h4 должны быть разными","just now":"только что","kbit/s":"кбит/с",name:"имя",never:"никогда","no limit":"без лимита",phone:"телефон","on thephone":"телефоне",router:"роутер","on therouter":"роутере",tablet:"планшет","on thetablet":"планшете","this device":"это устройство"},p:{"%s already has %d device. Remove one first to lower the limit to %d.":["%s: уже %d устройство. Чтобы снизить лимит до %d, сначала удалите одно из них.","%s: уже %d устройства. Чтобы снизить лимит до %d, сначала удалите одно из них.","%s: уже %d устройств. Чтобы снизить лимит до %d, сначала удалите одно из них."],"%s day":["%s день","%s дня","%s дней"],"%s of %s slot free":["Свободно %s из %s места","Свободно %s из %s мест","Свободно %s из %s мест"],"You have reached your limit of %s device":["Достигнут лимит - %s устройство","Достигнут лимит - %s устройства","Достигнут лимит - %s устройств"],"You have reached your limit of %s device. Remove one to add another.":["Достигнут лимит - %s устройство. Удалите одно, чтобы добавить новое.","Достигнут лимит - %s устройства. Удалите одно, чтобы добавить новое.","Достигнут лимит - %s устройств. Удалите одно, чтобы добавить новое."],"day left":["день остался","дня осталось","дней осталось"],"ends in %s day":["закончится через %s день","закончится через %s дня","закончится через %s дней"]}};var It=[{code:"en",name:"English"},{code:"ru",name:"Русский"}],Ms={ru:[sr]},ir={en:e=>e!==1?1:0,ru:e=>e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},lr="dl.lang";function ks(e,t){var r,o;let n=i=>i&&It.some(l=>l.code===i)?i:null;return(o=(r=n(e))!=null?r:t.map(i=>n(i.toLowerCase().split(/[-_]/)[0])).find(Boolean))!=null?o:"en"}var rt="en",Mn=[],cr=[],dr=(e,t)=>t?`${t}${e}`:e;function ur(e,t){let n=dr(e,t);for(let r of Mn)if(n in r.s)return r.s[n];return e}function Cs(e,t,n,r){var l,m,g;let o=dr(t,r),i=(l=Mn.find(f=>o in f.p))==null?void 0:l.p[o];return(g=i==null?void 0:i[((m=ir[rt])!=null?m:ir.en)(e)])!=null?g:e===1?t:n}var Qe=()=>rt,pr=e=>ur(e);function kn(e,t=!0){var n;if(rt=It.some(r=>r.code===e)?e:"en",Mn=(n=Ms[rt])!=null?n:[],document.documentElement.lang=rt,t)try{localStorage.setItem(lr,rt)}catch{}cr.forEach(r=>r())}function fr(e){cr.push(e)}function _s(){try{return localStorage.getItem(lr)}catch{return null}}Object.assign(globalThis,{_:ur,N_:Cs});var ar;kn(ks(_s(),(ar=navigator.languages)!=null&&ar.length?navigator.languages:[navigator.language]),!1);var hr={phone:'',computer:'',tablet:'',router:'',server:'',other:'',ethernet:'',bridge:'',wifi:'',tunnel:'',plus:'',chart:'',reset:'',package:'',code:'',plug:'',sunrise:'',refresh:'',archive:'',qr:'',copy:'',download:'',link:'',amnezia:'',amneziawg:'',wireguard:'',appstore:'',googleplay:'',github:'',openwrt:'',apple:'',windows:'',linux:'',eye:'',share:'',arrow:'',trash:'',edit:'',pause:'',play:'',key:'',out:'',admin:'',shield:'',shieldplus:'',lock:'',zap:'',check:'',alert:'',x:'',globe:'',home:'',open:'',file:'',network:'',moon:'',chevron:'',clock:'',calendar:'',minus:'',more:'',pin:'',activity:''};function Gt(e,t="dl-icon"){var r;let n=(r=hr[e])!=null?r:hr.phone;return``}function mr(e,t){let n=r=>{r==null||r===!1||(Array.isArray(r)?r.forEach(n):e.appendChild(typeof r=="string"?document.createTextNode(r):r))};t.forEach(n)}function s(e,t={},...n){let r=document.createElement(e);for(let[o,i]of Object.entries(t))i==null||i===!1||(o.startsWith("on")&&typeof i=="function"?r.addEventListener(o.slice(2),i):o==="class"?r.className=String(i):i===!0?r.setAttribute(o,""):r.setAttribute(o,String(i)));return mr(r,n),r}function We(e,...t){e.replaceChildren(),mr(e,t)}function Be(e){let t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstElementChild}var W=(e,t="i")=>Be(Gt(e,t));var Ae=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function ot(e,t,n=1){let r=Math.sqrt(e/n),o=t/(2*Math.sqrt(e*n)),i=f=>{if(o<.999){let O=r*Math.sqrt(1-o*o);return 1-Math.exp(-o*r*f)*(Math.cos(O*f)+o*r/O*Math.sin(O*f))}if(o<=1.001)return 1-Math.exp(-r*f)*(1+r*f);let E=Math.sqrt(o*o-1),x=-r*(o-E),b=-r*(o+E);return 1-(b*Math.exp(x*f)-x*Math.exp(b*f))/(b-x)},l=0;for(let f=0;f<3;f+=.004)Math.abs(1-i(f))>.0015&&(l=f);l+=.004;let m=[];for(let f=0;f<=64;f++)m.push(+i(l*f/64).toFixed(4));m[64]=1;let g=Math.round(l*1e3);return{duration:g,easing:`linear(${m.join(", ")})`,at:f=>f>=g?1:i(f/1e3)}}var Te=ot(300,20),q=ot(300,35),xe=ot(520,24),vr=ot(520,46),Le=ot(380,28),gr=ot(900,60),j="cubic-bezier(0.23, 1, 0.32, 1)",Z="cubic-bezier(0.55, 0, 1, 0.45)",Cn="cubic-bezier(0.32, 0.72, 0, 1)";function yr(e){e.style.setProperty("--spring-bouncy",Te.easing),e.style.setProperty("--spring-bouncy-dur",`${Te.duration}ms`),e.style.setProperty("--spring-smooth",q.easing),e.style.setProperty("--spring-smooth-dur",`${q.duration}ms`),e.style.setProperty("--spring-soft",Le.easing),e.style.setProperty("--spring-soft-dur",`${Le.duration}ms`),e.style.setProperty("--spring-quick",gr.easing),e.style.setProperty("--spring-quick-dur",`${gr.duration}ms`)}function $(e,t,n){var r;return Ae()?t.some(o=>"opacity"in o)?e.animate(t.map(o=>"opacity"in o?{opacity:o.opacity}:{}),{duration:Math.min(Number((r=n.duration)!=null?r:200),160),easing:"ease-out",fill:n.fill}):e.animate(t,{...n,duration:0,delay:0}):e.animate(t,n)}function br(e,t){return e<=0||t<=0?0:(1-1/(e*.55/t+1))*t}function xr(e,t,n){return e<=0||t<-.1?!1:t>.4||e>n/3}function Es(){return(typeof document=="undefined"?"":document.documentElement.lang)||"en"}function Ce(){let e=Es();return e==="en"?"en-GB":e}function N(e,...t){let n=0;return e.replace(/%([%sd])/g,(r,o)=>{var i;return o==="%"?"%":String((i=t[n++])!=null?i:"")})}function we(e,t){return e.toLocaleString(Ce(),t===void 0?void 0:{minimumFractionDigits:t,maximumFractionDigits:t})}function ze(e,t,n){return N(N_(e,t,n),we(e))}function st(e,...t){let n=0;return e.split(/(%[%sd])/).filter(Boolean).map(r=>r==="%%"?"%":r==="%s"||r==="%d"?t[n++]:r)}function Ts(e,t,n){let r=0;for(;e>=n&&r=100||r===0?we(Math.round(e)):we(e,1)} ${t[r]}`}function Re(e){return Ts(!e||e<0?0:e,[_("B"),_("KB"),_("MB"),_("GB"),_("TB")],1024)}function wr(e,t=Date.now()/1e3){if(!e)return _("never");let n=Math.max(0,Math.round(t-e));return n<60?_("just now"):n<3600?N(_("%s min ago"),Math.floor(n/60)):n<86400?N(_("%s h ago"),Math.floor(n/3600)):n<86400*30?N(_("%s d ago"),Math.floor(n/86400)):new Date(e*1e3).toLocaleDateString(Ce(),{day:"numeric",month:"short",year:"numeric"})}function Wt(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Se(e){let[t,n,r]=e.split("-").map(Number);return new Date(t,(n||1)-1,r||1,12)}function Ls(e){return(typeof e=="string"?/^\d{4}-\d{2}-\d{2}$/.test(e)?Se(e):new Date(e):e).toLocaleDateString(Ce(),{day:"numeric",month:"short",year:"numeric"})}function zt(e){return e?Ls(e):""}function As(e,t){let n=r=>{let[o,i,l]=r.split("-").map(Number);return Date.UTC(o,i-1,l)};return Math.round((n(e)-n(t))/864e5)}function it(e,t){let n=Se(e);return n.setDate(n.getDate()+t),Wt(n)}function Ut(e,t=Date.now()){if(!e)return null;let n=typeof t=="number"?Wt(new Date(t)):t,r=As(e,n);return r>=0?r+1:r}function wt(e,t){return t!=null&&t>0&&e.expire_warn>0&&t<=e.expire_warn}function Mr(e){return e<=1?_("ends today"):e===2?_("ends tomorrow"):ze(e,"ends in %s day","ends in %s days")}function kr(e){return{lan:_("Home network"),internet:_("Internet"),both:_("Home network + Internet")}[e]}function Kt(e){return{computer:_("PC"),phone:_("Phone"),tablet:_("Tablet"),router:_("Router"),other:_("Other")}[e]}function qt(e){let t=n=>n.disabled?3:n.online?0:n.handshake?1:2;return e.map((n,r)=>[n,r]).sort((n,r)=>t(n[0])-t(r[0])||n[1]-r[1]).map(([n])=>n)}var ce={vpn:"AmneziaVPN",awg:"AmneziaWG",wg:"WireGuard"};function _r(e,t=0){return/iPhone|iPad|iPod/.test(e)||/Macintosh/.test(e)&&t>1?"ios":/Android/.test(e)?"android":/Windows/.test(e)?"windows":/Mac OS X|Macintosh/.test(e)?"mac":/CrOS/.test(e)?"unknown":/Linux|X11/.test(e)?"linux":"unknown"}var Er=e=>/Telegram|FBAN|FBAV|Instagram|VKClient|Line\//i.test(e);function Tr(e,t){return e==="router"||t==="unknown"?!1:e==="phone"||e==="tablet"?t==="ios"||t==="android":e==="computer"?t==="windows"||t==="mac"||t==="linux":!0}function Lr(e){let t=[{id:"vpn",name:ce.vpn},{id:"awg",name:ce.awg}];return e==="off"&&t.push({id:"wg",name:ce.wg}),t}var Ft="https://github.com/amnezia-vpn/amnezia-client/releases/latest",Cr=e=>({href:e,top:_("APK file on"),main:"GitHub",mark:"github",why:_("The APK is for phones without Google Play, or where the store hides the app.")});function Ar(e,t){var l;let n=_("Download on the"),r=_("Get it on"),o=_("Official release on GitHub");return(l={vpn:{ios:{href:"https://apps.apple.com/app/amneziavpn/id1600529900",top:n,main:"App Store",mark:"appstore"},android:{href:"https://play.google.com/store/apps/details?id=org.amnezia.vpn",top:r,main:"Google Play",mark:"googleplay",alt:Cr(Ft)},windows:{href:Ft,top:o,main:_("Download for Windows"),mark:"windows"},mac:{href:Ft,top:o,main:_("Download for Mac"),mark:"apple"},linux:{href:Ft,top:o,main:_("Download for Linux"),mark:"linux"}},awg:{ios:{href:"https://apps.apple.com/us/app/amneziawg/id6478942365",top:n,main:"App Store",mark:"appstore"},android:{href:"https://play.google.com/store/apps/details?id=org.amnezia.awg",top:r,main:"Google Play",mark:"googleplay",alt:Cr("https://github.com/amnezia-vpn/amneziawg-android/releases")},windows:{href:"https://github.com/amnezia-vpn/amneziawg-windows-client/releases",top:o,main:_("Download for Windows"),mark:"windows"},mac:{href:"https://apps.apple.com/us/app/amneziawg/id6478942365",top:n,main:"Mac App Store",mark:"appstore"},linux:{href:"https://github.com/amnezia-vpn/amneziawg-tools",top:_("On GitHub"),main:"amneziawg-tools",mark:"linux"}},wg:{ios:{href:"https://apps.apple.com/app/wireguard/id1441195209",top:n,main:"App Store",mark:"appstore"},android:{href:"https://play.google.com/store/apps/details?id=com.wireguard.android",top:r,main:"Google Play",mark:"googleplay"},windows:{href:"https://www.wireguard.com/install/",top:_("Download from"),main:"wireguard.com",mark:"windows"},mac:{href:"https://apps.apple.com/app/wireguard/id1451685025",top:n,main:"Mac App Store",mark:"appstore"},linux:{href:"https://www.wireguard.com/install/",top:_("Install from"),main:"wireguard.com",mark:"linux"}}}[e][t])!=null?l:null}var Sr=e=>e==="wg"?{href:"https://openwrt.org/docs/guide-user/services/vpn/wireguard/start",top:_("OpenWrt packages"),main:"wireguard-tools",mark:"openwrt"}:{href:"https://openwrt.org/packages/start",top:_("OpenWrt packages + kmod"),main:"amneziawg-tools",mark:"openwrt"},_n=e=>e==="android",kt=e=>`${e.replace(/\.conf$/i,"")}.vpn`,Ue=(...e)=>e.join(" → ");function Mt(e){return{ios:{file:Ue("+",_("Create from file or archive","WireGuard app")),qr:Ue("+",_("Create from QR code","WireGuard app"))},android:{file:Ue("+",_("Import from file or archive","WireGuard app")),qr:Ue("+",_("Scan from QR code","WireGuard app"))},mac:{file:Ue("+",_("Import Tunnel(s) from File…","WireGuard app"))},windows:{file:Ue(_("Add Tunnel","WireGuard app"),_("Import tunnel(s) from file…","WireGuard app"))}}[e]}function Ct(e,t="unknown"){var r;if(e==="vpn")return Ue("+",_("QR code","AmneziaVPN app"));let n=(r=Mt(t))==null?void 0:r.qr;return n!=null?n:N(_("%s (Android: %s)"),Mt("ios").qr,Mt("android").qr.replace(/^.* → /,""))}function Vt(e,t="unknown"){var n;return e==="vpn"?Ue("+",_("Insert","AmneziaVPN app")):((n=Mt(t))!=null?n:Mt("android")).file}var Pr=()=>N(_("Tap “%s” and connect"),_("Continue","AmneziaVPN app"));function Dr(e,t,n,r){if(t==="linux")return[[_("Open a terminal in the folder with the file"),""],[`${_("Run")} `,`sudo ${e==="wg"?"wg-quick":"awg-quick"} up ./${n}`]];let o=Vt(e,t);return[[N(_("Open %s","step"),ce[e]),""],[o.replace(/ → [^→]*$/," → "),o.replace(/^.* → /,"")],[r?_("Confirm the import and connect"):_("Pick the file and connect"),""]]}function $r(e){return{ios:"iPhone / iPad",android:"Android",windows:"Windows",mac:"Mac",linux:"Linux",unknown:_("this device")}[e]}var Hr=(e,t)=>`${e}#setup=${t}`;function Or(e){var t,n;return(n=(t=/^#setup=(d_[0-9a-f]{8})$/.exec(e))==null?void 0:t[1])!=null?n:null}var Br=e=>`${e}#add`,Rr=e=>e==="#add",En=(e,t=!1)=>(t?{phone:_("phone","on the"),tablet:_("tablet","on the"),computer:_("computer","on the"),router:_("router","on the"),other:_("device","on the")}:{phone:_("phone"),tablet:_("tablet"),computer:_("computer"),router:_("router"),other:_("device")})[e];var oe=null,pe=()=>oe;function Me(e){oe=e}var Ss=document.getElementById("app"),Nr,at=(Nr=Ss.dataset.base)!=null?Nr:"",Ir=/^\/[a-z]{6}-[a-z]{6}-[a-z]{6}$/.test(at)?at.slice(1):"",lt=()=>location.origin+location.pathname,Ne=()=>{var e;return(e=oe==null?void 0:oe.today)!=null?e:Wt(new Date)},ct=()=>{var e;return(e=oe==null?void 0:oe.now)!=null?e:Date.now()/1e3},Yt=()=>_r(navigator.userAgent,navigator.maxTouchPoints),Ps=()=>(oe==null?void 0:oe.server.awg_disguise)===!1,Gr=()=>{var e;return(e=oe==null?void 0:oe.server.preset)!=null?e:Ps()?"off":"max"},Wr=()=>(oe==null?void 0:oe.https_url)||null,Je=()=>(oe==null?void 0:oe.server.name)||"Dawnline",zr=()=>{};function Ur(e){zr=e}var _e=(e={})=>zr(e);var Ke=class extends Error{constructor(n,r,o){super(r);this.status=n;this.httpsUrl=o}};async function fe(e,t){let n=await fetch(`${at}/api/${e}`,{method:t===void 0?"GET":"POST",credentials:"omit",headers:t===void 0?{"Accept-Language":Qe()}:{"Content-Type":"application/json","Accept-Language":Qe()},body:t===void 0?void 0:JSON.stringify(t),cache:"no-store"}),r=null;try{r=await n.json()}catch{}if(!n.ok)throw new Ke(n.status,r!=null&&r.error?pr(r.error):N(_("Request failed (%s)"),n.status),(r==null?void 0:r.https_url)||void 0);return r}var jt=e=>e instanceof Ke&&(e.status===404||e.status===401);var jr=xs(Vr(),1),Ds=e=>``,Yr="#0a0a0a",$s="#f2f2f2",Hs={night:[Yr,$s],day:["#ffffff",Yr]},Ln=e=>e.length>300,dt=e=>+e.toFixed(2);function Tn(e,t,n,r,o){return`M${dt(e+o)} ${dt(t)}h${dt(n-2*o)}a${o} ${o} 0 0 1 ${o} ${o}v${dt(r-2*o)}a${o} ${o} 0 0 1 -${o} ${o}h-${dt(n-2*o)}a${o} ${o} 0 0 1 -${o} -${o}v-${dt(r-2*o)}a${o} ${o} 0 0 1 ${o} -${o}z`}function Qr(e,t=3,n=!0,r="plain"){let o=Ln(e),i=r!=="plain",[l,m]=i?Hs[r]:["#fff","#000"],g=(0,jr.default)(0,o?"L":"H");g.addData(e,"Byte"),g.make();let f=g.getModuleCount(),E=f+t*2,x=n&&!o?Math.round(f*.22):0;x&&(f-x)%2&&x++;let b=(f-x)/2,O=b+x,H=(a,h)=>x>0&&a>=b&&a=b&&hi&&(h<7&&a<7||h<7&&a>=f-7||h>=f-7&&a<7),R="";if(i){let a=o?.48:.42;for(let h=0;h${Ds(i?l:"#fff")}`}let v=``;return i?`${v}${d}`:`${v}${d}`}var Jr={opacity:1,filter:"blur(0px)",transform:"none"},Os={opacity:0,filter:"blur(5px)",transform:"scale(.86)"},Xr={opacity:0,filter:"blur(5px)",transform:"scale(.6)"},Zr={duration:180,easing:Z,fill:"forwards"},Qt={duration:340,delay:70,easing:j,fill:"backwards"},eo=Qt.delay+Qt.duration,Jt=new WeakMap;function An(e){let t=getComputedStyle(e);return{opacity:t.opacity,filter:t.filter==="none"?"blur(0px)":t.filter,transform:t.transform}}function to(e){var t;for(let n of[...e.childNodes])n.nodeType===Node.TEXT_NODE&&((t=n.textContent)!=null&&t.trim())&&n.replaceWith(s("span",{},n.textContent));return[...e.children].filter(n=>!n.classList.contains("orb"))}function no(e,t){var r;let n=(r=Jt.get(e))!=null?r:[];Jt.set(e,t),n.forEach(o=>o.cancel())}function ro(e){var o;(o=e.querySelector(":scope > .orb"))==null||o.remove();let t=to(e),n=t.map(An),r=s("span",{class:"orb","aria-hidden":"true"},s("i"),s("i"));e.append(r),e.classList.add("busy"),e.setAttribute("aria-busy","true"),no(e,[...t.map((i,l)=>$(i,[n[l],Os],Zr)),$(r,[Xr,Jr],Qt)])}function oo(e){let t=e.querySelector(":scope > .orb"),n=to(e),r=[...t?[$(t,[An(t),Xr],Zr)]:[],...n.map(o=>$(o,[An(o),Jr],Qt))];no(e,r),e.removeAttribute("aria-busy"),Promise.all(r.map(o=>o.finished)).then(()=>{Jt.get(e)===r&&(Jt.delete(e),r.forEach(o=>o.cancel()),t==null||t.remove(),e.classList.remove("busy"))},()=>{})}var so=e=>[...e].map(t=>s("i",{},t)),ut=new WeakMap,_t=e=>{var t,n,r;return(r=(n=(t=ut.get(e))==null?void 0:t.text)!=null?n:e.textContent)!=null?r:""};function Dn(e){let t=document.createRange();return t.selectNodeContents(e),t.getBoundingClientRect()}function io(e){var i;let t=e.firstChild;if(!t||t.nodeType!==Node.TEXT_NODE)return[];let n=document.createRange(),r=[],o=0;for(let l of(i=t.textContent)!=null?i:"")n.setStart(t,o),n.setEnd(t,o+l.length),r.push(n.getBoundingClientRect().left),o+=l.length;return r.map(l=>l-r[0])}function ao(e,t){let n=[...e.children];if(!n.length)return;let r=n[0].getBoundingClientRect().left;n.forEach((o,i)=>{if(!i||t[i]===void 0)return;let l=r+t[i]-o.getBoundingClientRect().left;Math.abs(l)>.01&&(o.style.marginLeft=`${l}px`)})}function Bs(e,t){let n=0;for(;nnew Array(i.length+1).fill(0));for(let g=o.length-1;g>=0;g--)for(let f=i.length-1;f>=0;f--)l[g][f]=o[g]===i[f]?l[g+1][f+1]+1:Math.max(l[g+1][f],l[g][f+1]);let m=[];for(let g=0;g=l[g][f+1]?g++:f++;for(let g=r;g>0;g--)m.push([e.length-g,t.length-g]);return m}function Xt(e){let t=ut.get(e);t&&(clearTimeout(t.timer),ut.delete(e),e.getAnimations().forEach(n=>n.cancel()),e.classList.remove("mt","mt-ib"),e.textContent=t.text)}function Pe(e,t){Xt(e),e.textContent=t}function ee(e,t,n=_t(e),r={}){var le,ue;let{whole:o=!1,at:i}=r,l=((le=r.glide)!=null?le:!0)&&!i,m=ut.has(e)?e.getBoundingClientRect().width:null;if(Xt(e),n===t||Ae()||!e.getClientRects().length){e.textContent=t;return}let g=getComputedStyle(e),f=o&&g.display==="inline";g.display==="inline"&&!o&&e.classList.add("mt-ib"),g.position==="static"&&e.classList.add("mt");let E=null,x=i!=null?i:null,b=[];x||(e.textContent=n,E=e.getBoundingClientRect(),x=Dn(e),b=io(e)),e.textContent=t;let O=e.getBoundingClientRect(),H=io(e),P=(ue=m!=null?m:E==null?void 0:E.width)!=null?ue:O.width,R=l&&!f&&!!E&&Math.abs(O.width-P)>.5,D=!R||!E||Math.abs(O.left-E.left)<.5?"start":Math.abs(O.right-E.right)<.5?"end":"middle",d=s("span",{class:o?"mt-new w":"mt-new"},o?t:so(t)),v=s("span",{class:o?"mt-old w":"mt-old","aria-hidden":"true"},o?n:so(n));o&&(v.style.width=`${x.width+1}px`),e.replaceChildren(d,v),R&&$(e,[{width:`${P}px`},{width:`${O.width}px`}],{duration:q.duration,easing:q.easing,fill:"forwards"});let a=e.getBoundingClientRect(),h=(Y,te)=>{v.style.top=`${te}px`,D==="end"?v.style.right=`${-Y}px`:D==="middle"?(v.style.left="50%",v.style.translate=`calc(-50% + ${Y}px) 0`):v.style.left=`${Y}px`},p=D==="end"?x.right-a.right:D==="middle"?(x.left+x.right-a.left-a.right)/2:x.left-a.left;h(p,x.top-a.top);let A=Dn(v);if(h(p+x.left-A.left,x.top-a.top+x.top-A.top),o){$(v,[{opacity:1,filter:"blur(0px)"},{opacity:0,filter:"blur(4px)"}],{duration:180,easing:Z,fill:"forwards"}),$(d,[{opacity:0,filter:"blur(4px)"},{opacity:1,filter:"blur(0px)"}],{duration:280,delay:60,easing:j,fill:"backwards"});let Y=Math.max(340,R?q.duration:0)+40;ut.set(e,{text:t,timer:window.setTimeout(()=>Xt(e),Y)});return}ao(d,H),ao(v,b);let u=[...v.children],c=[...d.children],T=Bs([...n],[...t]),w=new Set(T.map(([Y])=>Y)),C=new Set(T.map(([,Y])=>Y));T.forEach(([Y,te])=>{let se=u[Y].getBoundingClientRect(),ne=c[te].getBoundingClientRect();u[Y].style.visibility="hidden",(Math.abs(se.left-ne.left)>.5||Math.abs(se.top-ne.top)>.5)&&$(c[te],[{transform:`translate(${se.left-ne.left}px, ${se.top-ne.top}px)`},{transform:"none"}],{duration:q.duration,easing:q.easing})});let I=u.filter((Y,te)=>!w.has(te)),G=c.filter((Y,te)=>!C.has(te)),V=Math.min(12,160/Math.max(1,I.length)),J=Math.min(22,260/Math.max(1,G.length));I.forEach((Y,te)=>$(Y,[{opacity:1,filter:"blur(0px)",transform:"none"},{opacity:0,filter:"blur(4px)",transform:"translateY(-0.45em)"}],{duration:220,delay:te*V,easing:Z,fill:"forwards"})),G.forEach((Y,te)=>$(Y,[{opacity:0,filter:"blur(4px)",transform:"translateY(0.45em)"},{opacity:1,filter:"blur(0px)",transform:"none"}],{duration:380,delay:120+te*J,easing:j,fill:"backwards"}));let re=Math.max(220+I.length*V,G.length?120+G.length*J+380:0,R||T.length?q.duration:0)+40;ut.set(e,{text:t,timer:window.setTimeout(()=>Xt(e),re)})}function Zt(e){return new Map([...e.querySelectorAll("[data-t]")].map(t=>[t.dataset.t,_t(t)]))}function en(e,t){e.querySelectorAll("[data-t]").forEach(n=>{var i;let r=t.get(n.dataset.t),o=(i=n.textContent)!=null?i:"";r!==void 0&&r!==o&&ee(n,o,r)})}var lo=e=>`${e.tagName}.${[...e.classList].filter(t=>t!=="mt"&&t!=="mt-ib").join(" ")}`,co=e=>e.outerHTML.replace(/\bgl\d+/g,"gl");function Rs(e){let t=new Map,n=(r,o)=>r.childNodes.forEach((i,l)=>{var E,x;let m=`${o}/${l}`;if(i.nodeType===Node.TEXT_NODE){if((E=i.textContent)!=null&&E.trim()){let b=document.createRange();b.selectNodeContents(i);let O=b.getBoundingClientRect();t.set(m,{kind:"#text",text:i.textContent,svg:"",at:O,words:O,node:i})}return}if(!(i instanceof Element))return;let g=i instanceof SVGElement?co(i):"",f=i instanceof HTMLElement&&!g?Dn((x=i.querySelector(":scope > .mt-new"))!=null?x:i):null;t.set(m,{kind:lo(i),text:i instanceof HTMLElement?_t(i):"",svg:g,at:i.getBoundingClientRect(),words:f,node:i}),g||n(i,m)});return n(e,""),t}var Sn=e=>$(e,[{opacity:0,filter:"blur(4px)"},{opacity:1,filter:"blur(0px)"}],{duration:280,delay:60,easing:j,fill:"backwards"});function tn(e,t){var O;let n=Rs(e),r=e.getBoundingClientRect();if(We(e,t),!n.size||Ae())return;let o=e.getBoundingClientRect(),i=H=>H&&new DOMRect(H.left-r.left+o.left,H.top-r.top+o.top,H.width,H.height),l=[],m=[],g=new Set,f=(H,P,R)=>{var v;let D=H.parentElement,d=R?(v=n.get(R))==null?void 0:v.at:r;P!=null&&P.at&&P.node instanceof Element&&m.push(D&&d?[P.node,P.at,D,d]:[P.node,P.at,e,r]),l.push(()=>Sn(H))},E=(H,P,R)=>{let D=H.getBoundingClientRect(),d=P.left-r.left-(D.left-o.left),v=P.top-r.top-(D.top-o.top),a=d-R[0],h=v-R[1];return(Math.abs(a)>.5||Math.abs(h)>.5)&&$(H,[{transform:`translate(${a}px, ${h}px)`},{transform:"none"}],{duration:q.duration,easing:q.easing}),[d,v]},x=(H,P,R)=>[...H.childNodes].forEach((D,d)=>{var A,u;let v=`${P}/${d}`;g.add(v);let a=n.get(v);if(D.nodeType===Node.TEXT_NODE){let c=(A=D.textContent)!=null?A:"";if(!c.trim()||(a==null?void 0:a.kind)==="#text"&&a.text===c)return;let T=s("span",{},c);D.replaceWith(T),a!=null&&a.at&&E(T,a.at,R),l.push(()=>{var w;return(a==null?void 0:a.kind)==="#text"&&c.length<=40&&a.text.length<=40?ee(T,c,a.text,{whole:!0,at:(w=i(a.words))!=null?w:void 0}):Sn(T)});return}if(!(D instanceof Element))return;let h=D.getBoundingClientRect();if(!a||a.kind!==lo(D)||a.at&&Math.abs(a.at.height-h.height)>1&&!(D instanceof SVGElement))return f(D,a,P);let p=a.at?E(D,a.at,R):R;if(D instanceof SVGElement){a.svg!==co(D)&&l.push(()=>Sn(D));return}if(!D.children.length&&D instanceof HTMLElement){let c=(u=D.textContent)!=null?u:"";c!==a.text&&l.push(()=>{var T;return c.length<=40&&a.text.length<=40?ee(D,c,a.text,{whole:!0,at:(T=i(a.words))!=null?T:void 0}):f(D,a,P)});return}x(D,v,p)});x(e,"",[0,0]);for(let[H,P]of n)!g.has(H)&&H.lastIndexOf("/")===0&&P.at&&P.node instanceof Element&&m.push([P.node,P.at,e,r]);l.forEach(H=>H());let b=new Map;for(let[,,H]of m)!b.has(H)&&getComputedStyle(H).position==="static"&&H.classList.add("mt"),b.set(H,((O=b.get(H))!=null?O:0)+1);for(let[H,P,R,D]of m){let d=H;d.style.position="absolute",d.style.margin="0",d.style.left=`${P.left-D.left-R.clientLeft}px`,d.style.top=`${P.top-D.top-R.clientTop}px`,d.style.width=`${P.width}px`,d.style.pointerEvents="none",d.setAttribute("aria-hidden","true"),R.appendChild(d),$(d,[{opacity:1,filter:"blur(0px)"},{opacity:0,filter:"blur(4px)"}],{duration:180,easing:Z,fill:"forwards"}).onfinish=()=>{d.remove();let v=b.get(R)-1;b.set(R,v),v||R.classList.remove("mt")}}}var Ns='',Pn=()=>[W("apple"),Be(Ns)];function Is(e,t){if(e===t)return["",e,e,""];let n=e.split(" "),r=t.split(" "),o=0;for(;og?d[2]:d[1],E=d=>s("span",{class:"osm-p"},d),x=()=>{l=o.findIndex(d=>d[1]!==d[2]),l<0&&(g=0),i=o.map(d=>({pre:E(d[0]),word:E(f(d)),suf:E(d[3])})),m=l>=0?s("span",{class:"osm-ic"},Pn()[g]):null,n.replaceChildren(...i.flatMap((d,v)=>[v?s("span",{class:"arr"},"›"):null,d.pre,v===l?m:null,d.word,d.suf]).filter(d=>!!d))},b={width:"1.05em",marginRight:"0.25em"},O=d=>$(d,[{opacity:1,filter:"blur(0px)",...b},{opacity:0,filter:"blur(3px)",width:"0px",marginRight:"0px"}],{duration:220,easing:Z,fill:"forwards"}).onfinish=()=>d.remove(),H=d=>$(d,[{opacity:0,filter:"blur(3px)",width:"0px",marginRight:"0px"},{opacity:1,filter:"blur(0px)",...b}],{duration:q.duration,easing:q.easing}),P=(d,v)=>{r.setAttribute("aria-label",(d===v?d:N(_("%s (Android: %s)"),d,v.split(" → ").pop())).replace(/ → /g," › "));let a=d.split(" → "),h=v.split(" → "),p=a.map((u,c)=>{var T;return Is(u,(T=h[c])!=null?T:u)});if(!i.length||p.length!==o.length)return o=p,x();let A=l;o=p,l=o.findIndex(u=>u[1]!==u[2]),l<0&&(g=0),o.forEach((u,c)=>{ee(i[c].pre,u[0],void 0,{whole:!0}),ee(i[c].word,f(u),void 0,{whole:!0}),ee(i[c].suf,u[3],void 0,{whole:!0})}),l!==A&&(m&&O(m),m=l>=0?s("span",{class:"osm-ic"},Pn()[g]):null,m&&(i[l].word.before(m),H(m)))};P(e,t);let R=()=>{if(!r.isConnected)return clearInterval(D);if(l<0||!m||!r.offsetParent)return;g=1-g,ee(i[l].word,f(o[l]));let d=m.firstElementChild,v=Pn()[g];if(Ae()){d.replaceWith(v);return}m.appendChild(v),$(d,[{opacity:1,filter:"blur(0px)",transform:"none"},{opacity:0,filter:"blur(3px)",transform:"scale(.5) rotate(-40deg)"}],{duration:200,easing:Z,fill:"forwards"}).onfinish=()=>d.remove(),$(v,[{opacity:0,filter:"blur(3px)",transform:"scale(.5) rotate(40deg)"},{opacity:1,filter:"blur(0px)",transform:"none"}],{duration:xe.duration,delay:80,easing:xe.easing,fill:"backwards"})},D=window.setInterval(R,3e3);return{el:r,set:P}}var nn=null,Et=null,po=0,fo=(e,t,n)=>$(e,t,{duration:n,easing:Z,fill:"forwards"}).onfinish=()=>e.remove();function ke(e,t=!1){nn!=null||(nn=document.body.appendChild(s("div",{class:"toasts"}))),Et&&fo(Et,[{opacity:1},{opacity:0,transform:"scale(.96)",filter:"blur(4px)"}],140);let n=s("div",{class:`toast${t?" bad":""}`,role:"status"},W(t?"alert":"check"),s("span",{},e));nn.appendChild(n),Et=n,$(n,[{opacity:0,transform:"translateY(18px) scale(.9)",filter:"blur(6px)"},{opacity:1,transform:"none",filter:"none"}],{duration:Te.duration,easing:Te.easing}),clearTimeout(po),po=window.setTimeout(()=>{Et===n&&(Et=null,fo(n,[{opacity:1},{opacity:0,transform:"translateY(6px) scale(.96)",filter:"blur(4px)"}],180))},2400)}function $n(e,t){var r;let n=W(t,(r=e.getAttribute("class"))!=null?r:"i");return e.replaceWith(n),$(n,[{opacity:0,transform:"scale(.6)",filter:"blur(3px)"},{opacity:1,transform:"none",filter:"none"}],{duration:xe.duration,easing:xe.easing}),n}function Gs(e){if(e.classList.contains("copied"))return;let t=e.querySelector("svg.i"),n=e.querySelector(".lbl, .b-main"),r=n?_t(n):"";e.classList.add("copied");let o=t?$n(t,"check"):null;n&&ee(n,_("Copied")),setTimeout(()=>{o&&t&&o.replaceWith(t),n&&ee(n,r),e.classList.remove("copied")},1600)}async function he(e,t=_("Copied"),n){try{await navigator.clipboard.writeText(e)}catch{let r=s("textarea",{class:"offscreen"},e);document.body.appendChild(r),r.select();let o=document.execCommand("copy");if(r.remove(),!o)return ke(_("Copying is blocked here. Select the text and copy it by hand."),!0)}n instanceof Element&&Gs(n),ke(t)}function Xe(e,t){var o;let n=navigator;if(Yt()!=="ios"||typeof n.share!="function"||typeof File=="undefined")return null;let r=new File([t],e,{type:"application/octet-stream"});return(o=n.canShare)!=null&&o.call(n,{files:[r]})?async()=>{try{await n.share({files:[r]})}catch(i){(i==null?void 0:i.name)!=="AbortError"&&rn(e,t)}}:null}function rn(e,t){let n=URL.createObjectURL(new Blob([t],{type:"application/octet-stream"})),r=s("a",{href:n,download:e,class:"offscreen"});document.body.appendChild(r),r.click(),setTimeout(()=>{URL.revokeObjectURL(n),r.remove()},1e3)}function Tt(e,t){let n=Xe(e,t);n?n():rn(e,t)}async function Ze(e,t){if(e.disabled)return;e.disabled=!0,ro(e);let n=performance.now();try{await t()}finally{let r=Ae()?0:eo-(performance.now()-n);r>0&&await new Promise(o=>setTimeout(o,r)),oo(e),e.disabled=!1}}var Hn=matchMedia("(prefers-color-scheme: light)"),Ws=()=>Hn.matches?"day":"night";function On(e,t){var n,r;e.dataset.qr=t,e.classList.toggle("dense",Ln(t)),e.classList.toggle("light",Hn.matches),e.innerHTML=Qr(t,3,!0,Ws()),e.dataset.mods=String((r=(n=e.firstElementChild)==null?void 0:n.viewBox.baseVal.width)!=null?r:0)}function Lt(e,t=!1){let n=s("div",{class:`qrbox${t?" big":""}`});return On(n,e),n}Hn.addEventListener("change",()=>document.querySelectorAll(".qrbox[data-qr]").forEach(e=>{var t;(t=e.querySelector("svg.old"))==null||t.remove(),On(e,e.dataset.qr)}));function Bn(e,t){let n=Lt(e),r=s("div",{class:"words"},t),o=s("div",{class:"side"},r),i=s("div",{class:`coderow${n.classList.contains("dense")?" stacked":""}`},n,o);return{el:i,swap(l,m){let g=n.dataset.qr===l?null:n.querySelector("svg");if(g){On(n,l),i.classList.toggle("stacked",n.classList.contains("dense"));let E=n.querySelector("svg");g.classList.add("old"),n.appendChild(g),$(E,[{opacity:0},{opacity:1}],{duration:200,easing:j}),$(g,[{opacity:1},{opacity:0}],{duration:220,delay:110,easing:Z,fill:"forwards"}).onfinish=()=>g.remove()}if(!m)return;let f=r;r=s("div",{class:"words"},m),o.appendChild(r),f.classList.add("old"),$(r,[{opacity:0,filter:"blur(3px)"},{opacity:1,filter:"blur(0px)"}],{duration:220,easing:j}),$(f,[{opacity:1,filter:"blur(0px)"},{opacity:0,filter:"blur(3px)"}],{duration:200,delay:90,easing:Z,fill:"forwards"}).onfinish=()=>f.remove()}}}function pt(e){let t=typeof navigator.share=="function";return s("div",{class:"linkrow"},s("span",{class:"mono"},e.replace(/^https?:\/\//,"")),s("button",{type:"button",class:"knob","aria-label":_("Copy the link"),onclick:n=>he(e,_("Link copied"),n.currentTarget)},W("copy")),t?s("button",{type:"button",class:"knob","aria-label":_("Share the link"),onclick:()=>navigator.share({url:e,title:Je()}).catch(()=>{})},W("share")):null)}var et=null,Ie=null,At=()=>!!et;function De(e=!1){let t=et;if(t){if(et=null,Ie==null||Ie.setAttribute("aria-expanded","false"),Ie=null,e){t.remove();return}$(t,[{opacity:1},{opacity:0,transform:"scale(.96)",filter:"blur(3px)"}],{duration:120,easing:Z,fill:"forwards"}).onfinish=()=>t.remove()}}function on(e,t){var f,E;if(Ie===e&&et)return De();De(!0);let n=t.filter((x,b)=>x||b>0&&t[b-1]&&t.slice(b+1).some(Boolean)),r=s("span",{class:"menu-hl"}),o=s("div",{class:"menu",role:"menu"},r);for(let x of n){if(!x){o.appendChild(s("div",{class:"menu-sep"}));continue}let b=s("button",{type:"button",role:x.checked===void 0?"menuitem":"menuitemradio","aria-checked":x.checked===void 0?null:String(x.checked),class:`mi ${(f=x.tone)!=null?f:""}`,onclick:()=>{De(),x.run()}},x.checked===void 0?W((E=x.icon)!=null?E:""):W("check",x.checked?"i":"i off"),s("span",{},x.label));b.addEventListener("pointerenter",()=>{var O;r.className=`menu-hl${r.style.opacity==="1"?" moving":""} ${(O=x.tone)!=null?O:""}`,r.style.transform=`translateY(${b.offsetTop-6}px)`,r.style.opacity="1"}),o.appendChild(b)}o.addEventListener("pointerleave",()=>r.style.opacity="0"),document.body.appendChild(o);let i=e.getBoundingClientRect(),l=o.offsetWidth,m=o.offsetHeight,g=i.bottom+8+m{let t=e.target;et&&!et.contains(t)&&!(Ie!=null&&Ie.contains(t))&&De()});addEventListener("scroll",()=>De(),{passive:!0});var de,$e,F,Rn,mt,Fe,ae,qe=[],sn=null,Nn=null,St=!1,ft=null,He=()=>!!(de!=null&&de.classList.contains("open")),gt=400,ho=80,zs=3.2,vt=()=>matchMedia("(min-width: 760px)").matches,ht=gt,In=null;function yt(){var o;if(!de||!He())return null;if(!vt())return F.style.maxWidth&&(F.style.maxWidth=""),ht=gt,null;let e=[...ae.querySelectorAll(".qrbox.dense")].find(i=>{let l=i.closest(".acc-row");return i.offsetWidth&&(!l||l.classList.contains("open"))&&!i.closest(".leaving")}),t=gt;if(e){let i=Math.min(innerWidth-32-ho,innerHeight-120);t=Math.max(gt,Math.round(Math.min(+((o=e.dataset.mods)!=null?o:0)*zs,i)+ho))}let n=e&&e!==In?e:null;if(In=e!=null?e:null,Math.abs(t-ht)<8)return n?{from:t,want:t,reveal:n}:null;let r=parseFloat(getComputedStyle(F).maxWidth)||ht;return ht=t,F.getAnimations().filter(i=>{var l;return(l=i.effect)==null?void 0:l.getKeyframes().some(m=>"maxWidth"in m)}).forEach(i=>i.cancel()),F.style.maxWidth=`${t}px`,{from:r,want:t,reveal:n}}function bt(e){if(!e)return;Math.abs(e.from-e.want)>1&&$(F,[{maxWidth:`${e.from}px`},{maxWidth:`${e.want}px`}],{duration:q.duration,easing:q.easing});let t=e.reveal;t&&setTimeout(()=>{if(!t.isConnected)return;let n=Fe.getBoundingClientRect(),r=t.getBoundingClientRect(),o=r.bottom>n.bottom-16?r.bottom-n.bottom+16:r.topme()},W("x")),mt=s("div",{class:"sheet-acts"}),ae=s("div",{class:"vp"}),Fe=s("div",{class:"sheet-scroll"},ae),F=s("div",{class:"sheet",role:"dialog","aria-modal":"true"},Rn,mt,Fe),$e=s("div",{class:"scrim",onclick:()=>me()}),de=s("div",{class:"sheet-root","aria-hidden":"true"},$e,F),document.body.appendChild(de),new ResizeObserver(()=>bt(yt())).observe(ae),qs()}function mo(e){F.setAttribute("aria-label",e.label),Rn.setAttribute("aria-label",_("Close")),F.setAttribute("role",e.asks?"alertdialog":"dialog"),F.classList.toggle("asks",!!e.asks)}function an(){let e=Nn;Nn=null,e==null||e()}function go(e){Nn=e}function tt(e){sn=e}function ge(e){if(de||Us(),De(!0),an(),He()){qe=[e],Gn(e());return}ft=document.activeElement instanceof HTMLElement?document.activeElement:null,qe=[e],sn=null,ht=gt,In=null,F.style.maxWidth="",F.classList.remove("arrived");let t=e();ae.replaceChildren(t.el),vo(t,!1),mo(t),de.classList.add("open"),de.setAttribute("aria-hidden","false"),document.body.classList.add("locked");let n=yt();if(n&&bt({...n,from:n.want}),F.getAnimations().forEach(r=>r.cancel()),$e.getAnimations().forEach(r=>r.cancel()),F.style.transform="",vt()?$(F,[{opacity:0,transform:"scale(.9)",filter:"blur(4px)"},{opacity:1,transform:"none",filter:"none"}],{duration:Le.duration,easing:Le.easing}):$(F,[{transform:"translateY(calc(100% + 40px))"},{transform:"none"}],{duration:500,easing:Cn}),$($e,[{opacity:0},{opacity:1}],vt()?{duration:Le.duration,easing:Le.easing}:{duration:420,easing:"ease-out"}),!St)try{history.pushState({sheet:!0},""),St=!0}catch{}}function me(e=!1){if(!He()||de.dataset.closing)return;an(),St&&(St=!1,history.back()),document.body.classList.remove("locked");let t=()=>{de.classList.remove("open"),de.setAttribute("aria-hidden","true"),delete de.dataset.closing,F.style.transform="",$e.style.opacity="",F.getAnimations().forEach(i=>i.cancel()),$e.getAnimations().forEach(i=>i.cancel()),ae.getAnimations().forEach(i=>i.cancel()),ae.replaceChildren(),mt.replaceChildren(),F.classList.remove("arrived"),F.style.maxWidth="",ht=gt,qe=[],ft!=null&&ft.isConnected&&ft.focus({preventScroll:!0}),ft=null;let o=sn;sn=null,o==null||o()};if(e)return t();de.dataset.closing="1";let n=getComputedStyle(F).transform;F.getAnimations().forEach(o=>o.cancel()),$($e,[{opacity:getComputedStyle($e).opacity},{opacity:0}],vt()?{duration:120,easing:Z,fill:"forwards"}:{duration:320,easing:"ease-out",fill:"forwards"});let r=n==="none"?"none":n;$(F,vt()?[{opacity:1,transform:r,filter:"blur(0px)"},{opacity:0,transform:`${r==="none"?"":r} scale(.96)`.trim(),filter:"blur(3px)"}]:[{transform:r},{transform:"translateY(calc(100% + 40px))"}],vt()?{duration:120,easing:Z,fill:"forwards"}:{duration:420,easing:Cn,fill:"forwards"}).onfinish=t}addEventListener("popstate",()=>{He()&&(St=!1,me())});function vo(e,t=!0){var o;let n=(o=e.acts)!=null?o:null,r=mt.firstElementChild;if(n!==r){if(!t||r&&n&&r.dataset.key===n.dataset.key)return mt.replaceChildren(...n?[n]:[]);r&&(Object.assign(r.style,{position:"absolute",right:"0",top:"0",pointerEvents:"none"}),$(r,[{opacity:1,transform:"none",filter:"none"},{opacity:0,transform:"scale(.9)",filter:"blur(3px)"}],{duration:180,easing:"cubic-bezier(.2,0,0,1)",fill:"forwards"}).onfinish=()=>r.remove()),n&&(mt.appendChild(n),$(n,[{opacity:0,transform:"scale(.9)",filter:"blur(3px)"},{opacity:1,transform:"none",filter:"none"}],{duration:260,delay:110,easing:"cubic-bezier(.2,0,0,1)",fill:"backwards"}))}}function Gn(e){mo(e),vo(e),F.classList.remove("arrived");let t=[...ae.children],n=ae.getBoundingClientRect().height;ae.getAnimations().forEach(i=>i.cancel()),t.forEach(i=>{i.classList.add("leaving"),Object.assign(i.style,{position:"absolute",left:"0",right:"0",top:"0",pointerEvents:"none"}),i.inert=!0}),ae.appendChild(e.el),e.el.style.pointerEvents="none",setTimeout(()=>e.el.style.pointerEvents="",320),Fe.scrollTop=0;let r=yt(),o=e.el.getBoundingClientRect().height;$(ae,[{height:`${n}px`},{height:`${o}px`}],{duration:360,easing:"cubic-bezier(.25,1,.5,1)"}),bt(r),t.forEach(i=>$(i,[{opacity:1,transform:"none",filter:"none"},{opacity:0,transform:"scale(.96)",filter:"blur(2px)"}],{duration:200,easing:"cubic-bezier(.2,0,0,1)",fill:"forwards"}).onfinish=()=>i.remove()),$(e.el,[{opacity:0,transform:"scale(.96)",filter:"blur(4px)"},{opacity:1,transform:"none",filter:"none"}],{duration:280,delay:110,easing:"cubic-bezier(.2,0,0,1)",fill:"backwards"})}function ln(e){if(!He())return ge(e);an(),qe.push(e),Gn(e())}function Ks(){qe.length<2||(an(),qe.pop(),Gn(qe[qe.length-1]()))}function yo(e,t=[]){if(!He())return e();let n=ae.getBoundingClientRect().height;ae.getAnimations().forEach(g=>g.cancel());let r=ae.lastElementChild,o=new Map;r==null||r.querySelectorAll("*").forEach(g=>{(!(g instanceof SVGElement)||g instanceof SVGSVGElement)&&o.set(g,g.getBoundingClientRect())}),e();let i=yt(),l=ae.getBoundingClientRect().height;Math.abs(l-n)>1&&$(ae,[{height:`${n}px`},{height:`${l}px`}],{duration:q.duration,easing:q.easing}),bt(i);let m=new Set;for(let[g,f]of o){if(!g.isConnected||!f.width||!f.height)continue;let E=g.getBoundingClientRect();if(!E.width||!E.height)continue;let x=f.left-E.left,b=f.top-E.top;if(Math.abs(x)<.5&&Math.abs(b)<.5)continue;m.add(g);let O=g.parentElement;for(;O&&O!==r&&!m.has(O);)O=O.parentElement;O&&O!==r||$(g,[{transform:`translate(${x}px, ${b}px)`},{transform:"none"}],{duration:q.duration,easing:q.easing})}for(let g of t)g&&$(g,[{opacity:0,filter:"blur(4px)"},{opacity:1,filter:"none"}],{duration:280,easing:j})}function bo(){F==null||F.classList.add("arrived")}var xo=()=>Fe==null?void 0:Fe.scrollTo({top:0,behavior:"smooth"}),Wn=e=>He()&&ae.contains(e)&&!e.closest(".leaving");function qs(){let e=null;F.addEventListener("pointerdown",n=>{let r=n.target;!r.closest(".vhead")||r.closest("button, a, input")||(e={y:n.clientY,t:performance.now(),dy:0,v:0},F.setPointerCapture(n.pointerId))}),F.addEventListener("pointermove",n=>{if(!e)return;let r=n.clientY-e.y,o=performance.now(),i=r>0?r:-br(-r,F.offsetHeight);e.v=(i-e.dy)/Math.max(1,o-e.t),e.dy=i,e.t=o,F.style.transform=`translateY(${i}px)`,$e.style.opacity=String(Math.max(0,1-Math.max(0,i)/420))});let t=()=>{if(!e)return;let{dy:n,v:r}=e;if(e=null,xr(n,r,F.offsetHeight))return me();let o=F.style.transform;F.style.transform="",$e.style.opacity="",n!==0&&$(F,[{transform:o},{transform:"none"}],{duration:q.duration,easing:q.easing})};F.addEventListener("pointerup",t),F.addEventListener("pointercancel",t)}function Ee(e,t={}){return s("div",{class:`vhead${t.back?" center":""}${t.acts?" with-acts":""}`},t.back?s("button",{type:"button",class:"knob back","aria-label":_("Back"),onclick:Ks},W("chevron")):null,s("h2",{},e))}var Ge=e=>s("p",{class:"vsub"},e),Ve=(...e)=>s("p",{class:"hint"},...e);function wo(){ge(()=>{let e=lt();return{el:s("div",{class:"view"},Ee(_("Open on another device")),Ge(_("Point its camera at the code: this page opens there.")),Lt(e,!0),pt(e)),label:_("Open on another device")}})}var Fs='',dn=null,Pt=null,cn=null;function zn(e){if(Pt)return Pt;dn=s("header",{class:"crumbs"}),Pt=s("div",{class:"page-body"}),e.replaceChildren(s("div",{class:"edge-fade top","aria-hidden":"true"}),s("div",{class:"edge-fade bot","aria-hidden":"true"}),cn=s("main",{class:"page"},dn,Pt));let t=()=>document.body.classList.toggle("scrolled",scrollY>2);return addEventListener("scroll",t,{passive:!0}),t(),Pt}function Un(e){cn==null||cn.classList.toggle("single",e)}function Vs(){let e=s("button",{type:"button",class:"cr-lang","aria-label":_("Language"),"aria-haspopup":"menu","aria-expanded":"false"},s("span",{},Qe().toUpperCase()),W("chevron","i cr-down"));return e.addEventListener("click",()=>on(e,It.map(t=>({label:t.name,checked:t.code===Qe(),run:()=>t.code!==Qe()&&kn(t.code)})))),e}function Kn(e=!1,t=!1){var o;if(!dn)return;let n=e?null:(o=pe())==null?void 0:o.person,r=s("span",{class:n?"":"cur","aria-current":n?null:"page"},Je());dn.replaceChildren(s("span",{class:"cr-mark"},Be(Fs)),s("nav",{class:"cr-path","aria-label":_("Breadcrumb")},r,n?[W("chevron"),s("span",{class:"cur","aria-current":"page"},n.name)]:null),...t?[]:[Vs()],...n&&!t?[s("button",{type:"button",class:"knob cr-qr","aria-label":_("Open on another device"),onclick:wo},W("qr"))]:[])}function ko(e,t,n=10){let r=m=>(Se(m).getDay()+6)%7,o=it(e,-r(e)),i=it(t,6-r(t)),l=[];for(let m=o;m<=i;m=it(m,1))if(l.push({day:m,kind:mn*7)return null;return l}var Ys=/^([01]?\d|2[0-3]):([0-5]\d)$/;function Mo(e){let t=Ys.exec(e.trim());return t?+t[1]*60+ +t[2]:null}var Dt=e=>(e%1440+1440)%1440,nt=e=>`${String(Math.floor(Dt(e)/60)).padStart(2,"0")}:${String(Dt(e)%60).padStart(2,"0")}`;function un(e,t,n){let[r,o]=e.split("-"),i=Mo(r!=null?r:""),l=Mo(o!=null?o:"");if(i==null||l==null)return null;let m=t==null?0:n-t;return{from:Dt(i+m),to:Dt(l+m),yours:t!=null}}var Co=e=>e.fromDt(Math.floor(e/60)+t);function Eo(e){let t=Se(e);return{days:new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),day:t.getDate()}}var To={phone:{b:'',f:'',d:''},mobile:{b:'',f:'',d:''},tablet:{b:'',f:'',d:''},computer:{b:'',f:'',d:''},router:{b:'',f:'',d:''},other:{b:'',f:'',d:""},plus:{b:'',f:'',d:''},globe:{b:'',f:'',d:''},home:{b:'',f:'',d:''},shield:{b:'',f:'',d:''},chart:{b:'',f:'',d:''},calendar:{b:'',f:'',d:''},clock:{b:'',f:'',d:''},pause:{b:'',f:'',d:''},server:{b:'',f:'',d:''},link:{b:'',f:'',d:''},key:{b:'',f:'',d:''},lock:{b:'',f:'',d:''},check:{b:'',f:'',d:''},trash:{b:'',f:'',d:''},refresh:{b:'',f:'',d:''},app:{b:'',f:'',d:null},file:{b:'',f:'',d:''}},js=()=>Gt("amnezia","").replace(/^]*>/,"").replace(/<\/svg>$/,""),Qs=0;function Js(e,t="grey",n="gi"){var l;let r=(l=To[e])!=null?l:To.other,o=`gl${++Qs}`,i=r.d===null?`${js()}`:`${r.d}`;return``}var Q=(e,t="grey",n="gi")=>Be(Js(e,t,n));function pn(e,t,n,r){return s("div",{class:`notice ${e}`},Q(t,e==="bad"?"red":"orange"),s("div",{class:"t"},n?s("b",{},n):null,s("span",{},r)))}function Xs(e){var r;let t=un(e,(r=pe())==null?void 0:r.tz_offset,-new Date().getTimezoneOffset());if(!t)return N(_("%s (router time)"),e.replace("-","–"));let n=`${nt(t.from)}–${nt(t.to)}`;return N(t.yours?_("%s your time"):_("%s (router time)"),n)}function qn(e){switch(e.state){case"server_off":return["server",_("Server is disabled"),_("Your devices can’t connect until it’s enabled again.")];case"no_server":return["server",_("No server yet"),_("You haven’t been added to one.")];case"quota":return["chart",_("Out of data"),_("Nothing gets through until it resets.")];case"expired":return["calendar",_("Access ended"),_("Your devices can’t connect until it’s extended.")];case"hours":return["clock",_("Outside your hours"),N(_("Open %s."),Xs(e.hours))];default:return["pause",_("Access paused"),_("Your devices can’t connect until it’s resumed.")]}}function Lo(e){if(e.state!=="active")return pn(e.state==="quota"||e.state==="expired"?"bad":"warn",...qn(e));let t=Ut(e.expires,Ne());return wt(e,t)?pn("warn","calendar",N(_("Access %s"),Mr(t)),N(_("On %s."),zt(e.expires))):null}var Ao=3,So=e=>e.reduce((t,[n,r])=>[t[0]+n,t[1]+r],[0,0]);function Zs(e,t){let n=Math.max(1,...e.map(l=>l[1])),r=Math.max(1,...e.map(l=>l[0])),o=Math.round((t-Ao)*Math.min(.8,Math.max(.55,n/(n+r)))),i=t-Ao-o;return{top:o,bottom:i,scale:Math.min(o/n,i/r)}}function fn(e,t,n,r=0){let{top:o,bottom:i,scale:l}=Zs(e,n),m=(E,x,b,O)=>{let H=s("i",{class:O});H.style.height=`${Math.max(2,Math.round(b*l))}px`;let P=s("div",{class:`half ${E}`},H);return P.style.height=`${x}px`,P},g=s("div",{class:`bars ${t}`,"aria-hidden":"true"});g.style.height=`${n}px`;let f=e.map(([E,x],b)=>g.appendChild(s("div",{class:`col${b===e.length-1?" today":""}`},m("top",o,x,"dn"),m("bottom",i,E,"up"))));for(let E=0;Es("span",{class:o,title:i},W("arrow"),s("span",{class:"offscreen"},i),l),n=s("span",{class:"num","data-t":`${e}:dn`}),r=s("span",{class:"num","data-t":`${e}:up`});return{el:s("span",{class:"ud"},t("ud-dn",_("Downloaded"),n),t("ud-up",_("Uploaded"),r)),set([o,i]){Pe(n,Re(i)),Pe(r,Re(o))}}}function ei(e){let t=s("div",{class:"view"},Ee(_("Open the link securely")),Ge(_("Connection settings only travel encrypted")),s("div",{class:"center-col secure"},Q("lock","blue","gi xl"),s("p",{},_("This page is open without encryption. To add or set up a device, open the same link over HTTPS:"))),s("a",{class:"btn accent block",href:e},W("lock"),s("span",{},_("Open securely"))),Ve(_("The browser may warn that the certificate is not trusted: it is this router’s own. Choose to continue (“Advanced” → “Proceed”).")));return t.lastElementChild.classList.add("secure-note"),{el:t,label:_("Open the link securely")}}var $t=e=>ge(()=>ei(e));function xt(){let e=Wr();return e?($t(e),!0):!1}var ti={jc:"0",jmin:"0",jmax:"0",s1:"0",s2:"0",s3:"0",s4:"0",h1:"1",h2:"2",h3:"3",h4:"4",i1:"",i2:"",i3:"",i4:"",i5:""},ni={header_protection_key:"HeaderProtectionKey",content_padding_addition:"ContentPaddingAddition",rekey_after_time:"RekeyAfterTime",rekey_timeout:"RekeyTimeout",reject_after_time:"RejectAfterTime",keepalive_timeout:"KeepaliveTimeout",max_handshake_attempts:"MaxHandshakeAttempts",random_trailers:"RandomTrailers",disable_cookies:"DisableCookies"};function ri(e){let t={};for(let[n,r]of Object.entries(ni))e[n]!=null&&e[n]!==""&&(t[r]=String(e[n]));return t}function oi(e,t){var g;let n=e.amnezia,r=(g=n.obfuscation)!=null?g:{},o=f=>r[f]!=null&&r[f]!==""?String(r[f]):ti[f],i=n.host.replace(/^\[(.*)\]$/,"$1"),l={H1:o("h1"),H2:o("h2"),H3:o("h3"),H4:o("h4"),I1:o("i1"),I2:o("i2"),I3:o("i3"),I4:o("i4"),I5:o("i5"),Jc:o("jc"),Jmin:o("jmin"),Jmax:o("jmax"),S1:o("s1"),S2:o("s2"),S3:o("s3"),S4:o("s4"),...ri(r),allowed_ips:n.allowed_ips,client_ip:n.client_ip,client_priv_key:n.client_priv_key,client_pub_key:n.client_pub_key,config:e.conf.replace(/\r?\n/g,`\r -`),hostName:i,mtu:n.mtu,persistent_keep_alive:n.persistent_keep_alive,port:Number(n.port),psk_key:n.psk_key,server_pub_key:n.server_pub_key},m={containers:[{container:"amnezia-awg",awg:{isThirdPartyConfig:!0,last_config:JSON.stringify(l),port:String(n.port),protocol_version:r.header_protection_key?"3.1":"2",transport_proto:"udp"}}],defaultContainer:"amnezia-awg",description:t,hostName:i};return n.dns[0]&&(m.dns1=n.dns[0]),n.dns[1]&&(m.dns2=n.dns[1]),m}function si(e){let t="";for(let n=0;ne.replace(/^vpn:\/\//,"");var Do=["height","marginTop","marginBottom","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"];function Ye(e,t={}){let n=s("div",{class:`acc${t.inset?" inset":""}`}),r=e.map((f,E)=>{var D;let x=f.body.filter(d=>!!d),b=!x.length,O=[f.icon,s("span",{class:"acc-title"},s("span",{class:"t"},f.title),(D=f.tag)!=null?D:null),f.val?s("span",{class:`acc-val${f.valHide?" hide-open":""}`},f.val):null],H=E===t.open&&!b,P=b?s("div",{class:"acc-head"},...O):s("button",{type:"button",class:"acc-head","aria-expanded":String(H),onclick:()=>g(R)},...O,W("chevron","i acc-chev")),R=s("div",{class:`acc-row${b?" still":""}${H?" open":""}`},P,s("div",{class:"acc-body"},...x));return n.appendChild(R),R}),o=f=>f.querySelector(".acc-body"),i=()=>r.forEach((f,E)=>{let x=f.classList.contains("open");f.classList.toggle("rt",E===0||x||r[E-1].classList.contains("open")),f.classList.toggle("rb",E===r.length-1||x||r[E+1].classList.contains("open"))}),l=f=>{let E=getComputedStyle(f),x={};for(let b of Do)x[b]=b==="height"?`${f.getBoundingClientRect().height}px`:E[b];return x},m=()=>r.forEach(f=>{var E;return(E=f.querySelector("button.acc-head"))==null?void 0:E.setAttribute("aria-expanded",String(f.classList.contains("open")))});function g(f){var H;let E=r.map(l);r.forEach(P=>P.getAnimations().forEach(R=>R.cancel())),r.forEach(P=>o(P).getAnimations().forEach(R=>R.cancel()));let x=!f.classList.contains("open"),b=r.filter(P=>P.classList.contains("open")&&(P===f||x));r.forEach(P=>{P.classList.remove("closing"),P!==f&&P.classList.remove("open","opened")}),f.classList.toggle("open",x),f.classList.toggle("opened",x),i();let O=yt();r.forEach((P,R)=>{let D=l(P);Do.some(d=>E[R][d]!==D[d])&&(b.includes(P)&&P.classList.add("closing"),$(P,[E[R],D],{duration:Le.duration,easing:Le.easing}).onfinish=()=>P.classList.remove("closing"))}),b.forEach(P=>$(o(P),[{opacity:1},{opacity:0,filter:"blur(2px)"}],{duration:160,easing:Z,fill:"forwards"})),x&&$(o(f),[{opacity:0,filter:"blur(2px)"},{opacity:1,filter:"blur(0px)"}],{duration:300,easing:"cubic-bezier(0,0,.58,1)"}),bt(O),m(),(H=t.onToggle)==null||H.call(t,r.indexOf(f),x,!1)}return i(),{el:n,openIndex:()=>r.findIndex(f=>f.classList.contains("open")),setOpen(f){r.forEach((E,x)=>E.classList.toggle("open",x===f&&!E.classList.contains("still"))),i(),m(),r.forEach((E,x)=>{var b;return(b=t.onToggle)==null?void 0:b.call(t,x,E.classList.contains("open"),!0)})}}}function $o(e,t,n){let r=s("span",{class:"seg-pill"}),o=s("div",{class:"seg appseg",role:"tablist"},r),i=e.map(b=>{let O=s("button",{type:"button",class:"seg-b",role:"tab","aria-label":b.label,title:b.label,onclick:()=>x(b.value)},W(b.icon),s("span",{class:"seg-l"},b.label));return O.dataset.v=b.value,o.appendChild(O),O}),l=b=>b.querySelector(".seg-l"),m=()=>i.forEach(b=>{let O=b.dataset.v===t;b.classList.toggle("on",O),b.setAttribute("aria-selected",String(O))}),g=()=>{let b=i.find(O=>O.dataset.v===t);return b&&b.offsetWidth?[b.offsetLeft,o.clientWidth-b.offsetLeft-b.offsetWidth]:null},f=()=>{let b=g();b&&(r.style.left=`${b[0]}px`,r.style.right=`${b[1]}px`)},E=0;function x(b){if(b===t)return;let O=i.findIndex(C=>C.dataset.v===t),H=i.findIndex(C=>C.dataset.v===b),P=getComputedStyle(r),R=parseFloat(P.left)||0,D=parseFloat(P.right)||0,d=i.map(C=>parseFloat(getComputedStyle(C).flexGrow)||0),v=l(i[O]),a=v.getBoundingClientRect().width;[...i,...i.map(l)].forEach(C=>C.getAnimations().forEach(I=>I.cancel())),t=b,m(),i.forEach((C,I)=>{let G=I===H?1:0;d[I]!==G&&$(C,[{flexGrow:d[I]},{flexGrow:G}],{duration:q.duration,easing:q.easing})}),$(v,[{opacity:1,maxWidth:`${a}px`,marginLeft:"0px"},{opacity:0,maxWidth:"0px",marginLeft:"-8px"}],{duration:220,easing:"ease-out"}),$(l(i[H]),[{opacity:0,filter:"blur(4px)"},{opacity:1,filter:"none"}],{duration:280,delay:70,easing:j,fill:"backwards"});let h=H>O,p=Ae()?q:vr,A=performance.now(),u=Math.max(q.duration,p.duration),c=h?q:p,T=h?p:q;cancelAnimationFrame(E);let w=()=>{let C=Ae()?u:performance.now()-A,I=g();if(!I){E=0;return}r.style.left=`${R+(I[0]-R)*c.at(C)}px`,r.style.right=`${D+(I[1]-D)*T.at(C)}px`,E=C{E||f()}).observe(o),{el:o,sync(b){b!==t&&(t=b,m(),f())}}}var Bo={vpn:"amnezia",awg:"amneziawg",wg:"wireguard"},Ro=e=>`dl.app.${e.id}`;function No(e){try{let t=localStorage.getItem(Ro(e));return t==="vpn"||t==="awg"||t==="wg"?t:null}catch{return null}}function Io(e,t){try{localStorage.setItem(Ro(e),t)}catch{}}function je(e,t=!1){var i,l;let n=[s("span",{class:"b-ic"},W(e.mark)),s("span",{class:"b-t"},s("span",{class:"b-top"},e.top),s("span",{class:"b-main"},e.main)),W(e.onclick||(i=e.href)!=null&&i.startsWith("vpn:")?"chevron":"open")],r=`badge${t?" primary":""}`;if(e.onclick)return s("button",{type:"button",class:r,onclick:e.onclick},n);let o=(l=e.href)==null?void 0:l.startsWith("vpn:");return s("a",{class:r,href:e.href,target:o?null:"_blank",rel:"noopener noreferrer"},n)}function Go(e,t,n){let r=n?Sr(e):Ar(e,t);return r?r.alt?[s("div",{class:"badges2"},je(r),je(r.alt)),Ve(r.alt.why)]:[je(r)]:[Ve(N(_("Get %s on the %s and come back here."),ce[e],$r(t)))]}var Ho=e=>s("ol",{class:"howto"},e.map(([t,n])=>s("li",{},t.replace(/ → $/," ›"),n?[" ",s("b",{},n)]:null))),ai=(e,t)=>s("button",{type:"button",onclick:t},e);function Wo(e){let t=e.app(),n=ce[t],r=e.pf==="ios"||e.pf==="android",o=e.same()&&r,i=g=>he(e.key,_("Key copied"),g.currentTarget),l=t==="vpn"&&o&&!_n(e.pf)?Xe(kt(e.cfg.filename),e.key):null;if(t==="vpn"&&o&&(_n(e.pf)||l))return[je(l?{top:_("Then come back here and tap"),main:_("Send to AmneziaVPN"),mark:"amnezia",onclick:()=>void l()}:{href:e.key,top:_("Then come back here and tap"),main:_("Open in AmneziaVPN"),mark:"amnezia"},!0),Ve(...st(l?_("Pick AmneziaVPN in the share sheet. Not there? %s and add it in the app."):_("Nothing opened? %s and add it in the app."),ai(_("Copy the key","in a sentence"),i)))];if(t==="vpn"){let g=Vt("vpn");return[je({top:_("The connection as one key"),main:_("Copy the key"),mark:"copy",onclick:i},!0),Ho([[N(_("Open %s","step"),n),""],[g.replace(/ → [^→]*$/," → "),g.replace(/^.* → /,"")],[Pr(),""]])]}let m=r?Xe(e.cfg.filename,e.cfg.conf):null;return[je(m?{top:e.same()?N(_("Straight into %s"),n):N(_("Send it to the %s"),e.there),main:_("Share the file"),mark:"share",onclick:()=>void m()}:{top:_("Then import it in the app"),main:_("Download the file"),mark:"download",onclick:()=>rn(e.cfg.filename,e.cfg.conf)},!0),Ho(Dr(t,e.pf,e.cfg.filename,!!m&&e.same()))]}function zo(e){let t=e.app(),n=(o,i,l)=>s("button",{type:"button",class:"btn soft sm",onclick:l},W(o),s("span",{class:"lbl"},i));if(t==="vpn"){let o=kt(e.cfg.filename),i=!!Xe(o,e.key);return[s("p",{class:"desc"},N(_("Send it to the %s in a message or a note, then in AmneziaVPN: %s."),e.there,Vt("vpn").replace(/ → /g," › "))),s("div",{class:"btnrow2"},n("copy",_("Copy the key"),l=>he(e.key,_("Key copied"),l.currentTarget)),n(i?"share":"download",i?_("Share as a file"):_("Download the key"),()=>Tt(o,e.key)))]}let r=!!Xe(e.cfg.filename,e.cfg.conf);return[s("p",{class:"desc"},...st(_("Send it to the %s, then import %s in %s."),e.there,s("b",{},e.cfg.filename),ce[t])),s("div",{class:"btnrow2"},n(r?"share":"download",r?_("Share the file"):_("Download the file"),()=>Tt(e.cfg.filename,e.cfg.conf)),n("copy",_("Copy the configuration"),o=>he(e.cfg.conf,_("Configuration copied"),o.currentTarget)))]}function Oo(e,t){if(/^\s*\[.+\]\s*$/.test(e))return s("span",{class:"sec"},e);let n=/^(\s*[A-Za-z0-9]+\s*=)\s*(.*)$/.exec(e);if(!n)return document.createTextNode(e);let o=/^(\s*)(PrivateKey|PresharedKey)\b/.test(e)?t?s("span",{class:"secret"},n[2]):s("span",{class:"mask"},"••••••••••••••••"):n[2];return s("span",{},s("span",{class:"k"},n[1])," ",o)}function Uo(e){let t=!1,n=s("pre",{class:"conf"}),r=()=>n.replaceChildren(...e.conf.split(` +"use strict";(()=>{var fs=Object.create;var or=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var ms=Object.getOwnPropertyNames;var gs=Object.getPrototypeOf,vs=Object.prototype.hasOwnProperty;var ys=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var bs=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ms(t))!vs.call(e,o)&&o!==n&&or(e,o,{get:()=>t[o],enumerable:!(r=hs(t,o))||r.enumerable});return e};var xs=(e,t,n)=>(n=e!=null?fs(gs(e)):{},bs(t||!e||!e.__esModule?or(n,"default",{value:e,enumerable:!0}):n,e));var Vr=ys((Ur,Fr)=>{"use strict";var Kr=(function(){var e=function(d,v){var a=236,h=17,p=d,A=n[v],u=null,c=0,T=null,w=[],C={},I=function(M,k){c=p*4+17,u=(function(y){for(var L=new Array(y),S=0;S=7&&le(M),T==null&&(T=se(p,A,w)),Y(T,k)},G=function(M,k){for(var y=-1;y<=7;y+=1)if(!(M+y<=-1||c<=M+y))for(var L=-1;L<=7;L+=1)k+L<=-1||c<=k+L||(0<=y&&y<=6&&(L==0||L==6)||0<=L&&L<=6&&(y==0||y==6)||2<=y&&y<=4&&2<=L&&L<=4?u[M+y][k+L]=!0:u[M+y][k+L]=!1)},V=function(){for(var M=0,k=0,y=0;y<8;y+=1){I(!0,y);var L=o.getLostPoint(C);(y==0||M>L)&&(M=L,k=y)}return k},J=function(){for(var M=8;M>y&1)==1;u[Math.floor(y/3)][y%3+c-8-3]=L}for(var y=0;y<18;y+=1){var L=!M&&(k>>y&1)==1;u[y%3+c-8-3][Math.floor(y/3)]=L}},ue=function(M,k){for(var y=A<<3|k,L=o.getBCHTypeInfo(y),S=0;S<15;S+=1){var R=!M&&(L>>S&1)==1;S<6?u[S][8]=R:S<8?u[S+1][8]=R:u[c-15+S][8]=R}for(var S=0;S<15;S+=1){var R=!M&&(L>>S&1)==1;S<8?u[8][c-S-1]=R:S<9?u[8][15-S-1+1]=R:u[8][15-S-1]=R}u[c-8][8]=!M},Y=function(M,k){for(var y=-1,L=c-1,S=7,R=0,q=o.getMaskFunction(k),z=c-1;z>0;z-=2)for(z==6&&(z-=1);;){for(var X=0;X<2;X+=1)if(u[L][z-X]==null){var ie=!1;R>>S&1)==1);var K=q(L,z-X);K&&(ie=!ie),u[L][z-X]=ie,S-=1,S==-1&&(R+=1,S=7)}if(L+=y,L<0||c<=L){L-=y,y=-y;break}}},te=function(M,k){for(var y=0,L=0,S=0,R=new Array(k.length),q=new Array(k.length),z=0;z=0?tr.getAt(nr):0}}for(var rr=0,K=0;Kz*8)throw"code length overflow. ("+S.getLengthInBits()+">"+z*8+")";for(S.getLengthInBits()+4<=z*8&&S.put(0,4);S.getLengthInBits()%8!=0;)S.putBit(!1);for(;!(S.getLengthInBits()>=z*8||(S.put(a,8),S.getLengthInBits()>=z*8));)S.put(h,8);return te(S,L)};C.addData=function(M,k){k=k||"Byte";var y=null;switch(k){case"Numeric":y=f(M);break;case"Alphanumeric":y=E(M);break;case"Byte":y=x(M);break;case"Kanji":y=b(M);break;default:throw"mode:"+k}w.push(y),T=null},C.isDark=function(M,k){if(M<0||c<=M||k<0||c<=k)throw M+","+k;return u[M][k]},C.getModuleCount=function(){return c},C.make=function(){if(p<1){for(var M=1;M<40;M++){for(var k=m.getRSBlocks(M,A),y=g(),L=0;L";for(var S=0;S';y+=""}return y+="",y+="",y},C.createSvgTag=function(M,k,y,L){var S={};typeof arguments[0]=="object"&&(S=arguments[0],M=S.cellSize,k=S.margin,y=S.alt,L=S.title),M=M||2,k=typeof k=="undefined"?M*4:k,y=typeof y=="string"?{text:y}:y||{},y.text=y.text||null,y.id=y.text?y.id||"qrcode-description":null,L=typeof L=="string"?{text:L}:L||{},L.text=L.text||null,L.id=L.text?L.id||"qrcode-title":null;var R=C.getModuleCount()*M+k*2,q,z,X,ie,K="",ye;for(ye="l"+M+",0 0,"+M+" -"+M+",0 0,-"+M+"z ",K+=''+ne(L.text)+"":"",K+=y.text?''+ne(y.text)+"":"",K+='',K+='":k+=">";break;case"&":k+="&";break;case'"':k+=""";break;default:k+=L;break}}return k},Bt=function(M){var k=1;M=typeof M=="undefined"?k*2:M;var y=C.getModuleCount()*k+M*2,L=M,S=y-M,R,q,z,X,ie,K={"██":"█","█ ":"▀"," █":"▄"," ":" "},ye={"██":"▀","█ ":"▀"," █":" "," ":" "},be="";for(R=0;R=S?ye[ie]:K[ie];be+=` +`}return y%2&&M>0?be.substring(0,be.length-y-1)+Array(y+1).join("▀"):be.substring(0,be.length-1)};return C.createASCII=function(M,k){if(M=M||1,M<2)return Bt(k);M-=1,k=typeof k=="undefined"?M*2:k;var y=C.getModuleCount()*M+k*2,L=k,S=y-k,R,q,z,X,ie=Array(M+1).join("██"),K=Array(M+1).join(" "),ye="",be="";for(R=0;R>>8),A.push(T&255)):A.push(h)}}return A}};var t={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},n={L:1,M:0,Q:3,H:2},r={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},o=(function(){var d=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],v=1335,a=7973,h=21522,p={},A=function(u){for(var c=0;u!=0;)c+=1,u>>>=1;return c};return p.getBCHTypeInfo=function(u){for(var c=u<<10;A(c)-A(v)>=0;)c^=v<=0;)c^=a<5&&(T+=3+I-5)}for(var w=0;w=256;)p-=255;return d[p]},h})();function l(d,v){if(typeof d.length=="undefined")throw d.length+"/"+v;var a=(function(){for(var p=0;p>>7-h%8&1)==1},a.put=function(h,p){for(var A=0;A>>p-A-1&1)==1)},a.getLengthInBits=function(){return v},a.putBit=function(h){var p=Math.floor(v/8);d.length<=p&&d.push(0),h&&(d[p]|=128>>>v%8),v+=1},a},f=function(d){var v=t.MODE_NUMBER,a=d,h={};h.getMode=function(){return v},h.getLength=function(u){return a.length},h.write=function(u){for(var c=a,T=0;T+2>>8&255)*192+(w&255),u.put(w,13),T+=2}if(T>>8)},v.writeBytes=function(a,h,p){h=h||0,p=p||a.length;for(var A=0;A0&&(a+=","),a+=d[h];return a+="]",a},v},H=function(){var d=0,v=0,a=0,h="",p={},A=function(c){h+=String.fromCharCode(u(c&63))},u=function(c){if(!(c<0)){if(c<26)return 65+c;if(c<52)return 97+(c-26);if(c<62)return 48+(c-52);if(c==62)return 43;if(c==63)return 47}throw"n:"+c};return p.writeByte=function(c){for(d=d<<8|c&255,v+=8,a+=1;v>=6;)A(d>>>v-6),v-=6},p.flush=function(){if(v>0&&(A(d<<6-v),d=0,v=0),a%3!=0)for(var c=3-a%3,T=0;T=v.length){if(p==0)return-1;throw"unexpected end of file./"+p}var c=v.charAt(a);if(a+=1,c=="=")return p=0,-1;if(c.match(/^\s$/))continue;h=h<<6|u(c.charCodeAt(0)),p+=6}var T=h>>>p-8&255;return p-=8,T};var u=function(c){if(65<=c&&c<=90)return c-65;if(97<=c&&c<=122)return c-97+26;if(48<=c&&c<=57)return c-48+52;if(c==43)return 62;if(c==47)return 63;throw"c:"+c};return A},B=function(d,v){var a=d,h=v,p=new Array(d*v),A={};A.setPixel=function(w,C,I){p[C*a+w]=I},A.write=function(w){w.writeString("GIF87a"),w.writeShort(a),w.writeShort(h),w.writeByte(128),w.writeByte(0),w.writeByte(0),w.writeByte(0),w.writeByte(0),w.writeByte(0),w.writeByte(255),w.writeByte(255),w.writeByte(255),w.writeString(","),w.writeShort(0),w.writeShort(0),w.writeShort(a),w.writeShort(h),w.writeByte(0);var C=2,I=c(C);w.writeByte(C);for(var G=0;I.length-G>255;)w.writeByte(255),w.writeBytes(I,G,255),G+=255;w.writeByte(I.length-G),w.writeBytes(I,G,I.length-G),w.writeByte(0),w.writeString(";")};var u=function(w){var C=w,I=0,G=0,V={};return V.write=function(J,re){if(J>>>re)throw"length over";for(;I+re>=8;)C.writeByte(255&(J<>>=8-I,G=0,I=0;G=J<0&&C.writeByte(G)},V},c=function(w){for(var C=1<>6,128|i&63):i<55296||i>=57344?r.push(224|i>>12,128|i>>6&63,128|i&63):(o++,i=65536+((i&1023)<<10|n.charCodeAt(o)&1023),r.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|i&63))}return r}return t(e)}})();(function(e){typeof define=="function"&&define.amd?define([],e):typeof Ur=="object"&&(Fr.exports=e())})(function(){return Kr})});var sr={s:{'"%s" already exists.':"Устройство «%s» уже есть.",'"%s" is already taken.':"Идентификатор «%s» уже занят.","%s (Android: %s)":"%s (на Android: %s)","%s (router time)":"%s (по времени роутера)","%s can't use the network interface %s: it exists and isn't Dawnline's.":"Сервер %s не может использовать сетевой интерфейс %s: он уже существует и создан не Dawnline.","%s connected":"Подключено: %s","%s d ago":"%s дн. назад","%s h ago":"%s ч назад",'%s has an invalid interface name "%s".':"У сервера %s недопустимое имя интерфейса «%s».","%s has no room for every device on %s.":"В подсети %s не хватит адресов для всех устройств сервера %s.","%s in total":"%s всего","%s is kept down.":"Сервер %s остановлен.","%s is kept down: its disguise needs AmneziaWG %s (installed: %s).":"Сервер %s остановлен: для его маскировки нужен AmneziaWG %s (установлен %s).","%s is kept down: its disguise needs AmneziaWG %s (installed: none).":"Сервер %s остановлен: для его маскировки нужен AmneziaWG %s (не установлен).","%s left":"осталось %s","%s min ago":"%s мин назад","%s must be a number or range":"%s: нужно число или диапазон","%s of %s":"%s из %s","%s of %s GB":"%s из %s ГБ","%s of %s GB this month":"%s из %s ГБ в этом месяце","%s of %s in total.":"Всего %s из %s.","%s options":"Действия с устройством %s","%s this month":"%s в этом месяце","%s your time":"%s по вашему времени","%sd %sh":"%s д %s ч","%sh %sm":"%s ч %s мин","%sm":"%s мин","A total for your whole access, it does not reset.":"Считается за весь срок доступа и не обнуляется.","APK file on":"APK-файл на","Access %s":"Доступ %s","Access ended":"Доступ закончился","Access must be lan, internet or both.":"Доступ должен быть lan, internet или both.","Access paused":"Доступ на паузе","Access until":"Доступ до",Active:"Активен","WireGuard appAdd Tunnel":"Добавить туннель","Add a device":"Добавить устройство","Add device":"Добавить устройство","Add it from the device":"Добавить с самого устройства","Add the connection":"Добавьте подключение","Add this device":"Добавить это устройство","Add this phone":"Добавить этот телефон","Add your first device":"Добавьте первое устройство","Adding devices isn't available right now: the VPN server isn't ready. Ask whoever sent you this link.":"Сейчас добавить устройство нельзя: VPN-сервер не готов. Обратитесь к тому, кто прислал вам эту ссылку.","Address copied":"Адрес скопирован","Already has the app":"Приложение уже установлено","AmneziaWG is not installed (%s): install it in Dawnline → Components.":"AmneziaWG не установлен (%s): установите его в Dawnline → Компоненты.","AmneziaWG is not installed: install it in Dawnline → Components.":"AmneziaWG не установлен: установите его в Dawnline → Компоненты.","Android phone":"Телефон Android","Android tablet":"Планшет Android","Ask for a new one.":"Попросите новую.",B:"Б",Back:"Назад",Breadcrumb:"Навигационная цепочка",Cancel:"Отмена","Circle %s: server %s does not exist.":"Круг %s: сервера %s нет.",Close:"Закрыть","Close this and open it again to keep checking.":"Закройте окно и откройте его снова, чтобы проверить ещё раз.",Configuration:"Конфигурация","Configuration copied":"Конфигурация скопирована","Confirm the import and connect":"Подтвердите импорт и подключитесь",Connect:"Подключить",Connected:"Подключено","Connected, no data left":"Подключено, трафик закончился","Connected, outside your hours":"Подключено, вне часов доступа","Connection settings only travel encrypted":"Настройки подключения передаются только в зашифрованном виде","AmneziaVPN appContinue":"Продолжить",Copied:"Скопировано",Copy:"Скопировать","Copy %s":"Скопировать %s","Copy %s config":"Скопировать конфигурацию %s","Copy IP address":"Скопировать IP-адрес","Copy local address":"Скопировать локальный адрес","Copy or save the connection":"Скопировать или сохранить подключение","Copy the configuration":"Скопировать конфигурацию","Copy the key":"Скопировать ключ","in a sentenceCopy the key":"Скопируйте ключ","Copy the link":"Скопировать ссылку","Copying is blocked here. Select the text and copy it by hand.":"Копирование здесь заблокировано. Выделите текст и скопируйте его вручную.","Create connection":"Создать подключение","WireGuard appCreate from QR code":"Создать из QR-кода","WireGuard appCreate from file or archive":"Создать из файла или архива","Cross-site request refused.":"Запрос с другого сайта отклонён.","Data limit must be a positive number of GB.":"Лимит трафика должен быть положительным числом ГБ.","Data limit reached":"Лимит трафика исчерпан","Data this month":"Трафик за месяц","Data used":"Трафик всего","Device %s of %s: address %s is also used by device %s of %s.":"Устройство %s (%s): адрес %s уже занят устройством %s (%s).","Device %s of %s: address %s is not a plain IPv4 address.":"Устройство %s (%s): адрес %s не является обычным IPv4-адресом.","Device %s of %s: address %s is outside %s's tunnel %s.":"Устройство %s (%s): адрес %s вне туннеля сервера %s (%s).","Device %s of %s: address %s is the router's own address on %s.":"Устройство %s (%s): адрес %s принадлежит самому роутеру на сервере %s.","Device %s of %s: address (none) is not a plain IPv4 address.":"Устройство %s (%s): нет IPv4-адреса.","Device %s of %s: the preshared key is not a key.":"Устройство %s (%s): общий ключ (PSK) некорректен.","Device %s of %s: the private key is not a key.":"Устройство %s (%s): приватный ключ некорректен.","Device %s of %s: the public key is not a key.":"Устройство %s (%s): публичный ключ некорректен.","Device %s: person %s does not exist.":"Устройство %s: человека %s нет.","Device limit must be between 1 and 32.":"Лимит устройств: от 1 до 32.","Device limit reached (%d).":"Достигнут лимит устройств (%d).","Device name":"Имя устройства","Device not found.":"Устройство не найдено.","Device removed":"Устройство удалено","Devices at home":"Устройства дома","Devices at home and on this VPN reach yours as %s":"Устройства дома и в этом VPN обращаются к вашим по адресу %s",Disabled:"Отключено",Download:"Скачать","Download %s config":"Скачать конфигурацию %s","Download for Linux":"Скачать для Linux","Download for Mac":"Скачать для Mac","Download for Windows":"Скачать для Windows","Download from":"Скачать с сайта","Download on the":"Загрузите в","Download the file":"Скачать файл","Download the key":"Скачать ключ",Downloaded:"Получено","End date must be YYYY-MM-DD.":"Дата окончания должна быть в формате ГГГГ-ММ-ДД.","Endpoint must be a hostname or IP address.":"Адрес сервера должен быть именем хоста или IP-адресом.","Ends %s":"Закончится %s","Enter a device name (up to 48 characters).":"Введите название устройства (до 48 символов).",Expired:"Срок истёк","Extra data must be a positive number of GB.":"Дополнительный трафик должен быть положительным числом ГБ.","For computers and routers":"Для компьютеров и роутеров",GB:"ГБ","Gbit/s":"Гбит/с","Get %s":"Установите %s","Get %s on the %s and come back here.":"Установите %s на %s и вернитесь сюда.","Get %s on the router":"Установите %s на роутер","Get it on":"Доступно в","Hide key":"Скрыть ключ","Home network":"Домашняя сеть","Home network + Internet":"Домашняя сеть и интернет","Hours must look like 07:00-23:00.":"Часы доступа указываются так: 07:00-23:00.","Hours, router time":"Часы доступа, время роутера","Hours, your time":"Часы доступа, ваше время","IP address copied":"IP-адрес скопирован","WireGuard appImport Tunnel(s) from File…":"Импорт туннелей из файла…","WireGuard appImport from file or archive":"Импорт из файла или архива","Import the configuration":"Импортируйте конфигурацию","WireGuard appImport tunnel(s) from file…":"Импорт туннелей из файла…","In %s:":"В %s:",Included:"Есть доступ","AmneziaVPN appInsert":"Вставить","Install from":"Установить с сайта","Interface name: 1-12 lowercase letters, digits or _.":"Имя интерфейса: 1–12 строчных латинских букв, цифр или _.",Internet:"Интернет","Invalid JSON.":"Некорректный JSON.","Invalid public key.":"Недопустимый публичный ключ.","It ended on %s.":"Доступ закончился %s.","It gets new keys and its current settings stop working. Set it up again with the new ones that open next.":"Устройство получит новые ключи, а текущие настройки перестанут работать. Настройте его заново с новыми - они откроются следом.","It gets new keys. This device is connected through its current settings: it disconnects a few seconds after you confirm. Add the new ones that open next.":"Устройство получит новые ключи. Сейчас вы подключены через его текущие настройки: через несколько секунд после подтверждения связь прервётся. Добавьте новые - они откроются следом.","Its connection stops working at once. You can add it again later.":"Подключение сразу перестанет работать. Устройство можно будет добавить снова.",KB:"КБ","Key copied":"Ключ скопирован","Key generation failed (is amneziawg-tools installed?).":"Не удалось создать ключ (установлен ли amneziawg-tools?).","Key generation failed (no random data).":"Не удалось создать ключ (нет случайных данных).","Key generation failed.":"Не удалось создать ключ.",Language:"Язык","Last 7 days":"За 7 дней","Last connected %s":"В сети %s","Link copied":"Ссылка скопирована","Linux PC":"Компьютер с Linux",MB:"МБ","Mbit/s":"Мбит/с","Method not allowed.":"Метод не поддерживается.",Mobile:"Мобильный","Monthly data must be a positive number of GB.":"Месячный лимит трафика должен быть положительным числом ГБ.",Name:"Имя","No connection yet":"Подключения пока нет","No data limit. The count starts again on the 1st.":"Лимита трафика нет. Счёт начинается заново 1-го числа.","No end date":"Бессрочно","No free address left on %s.":"На сервере %s не осталось свободных адресов.","No free addresses left in the server subnet.":"В подсети сервера не осталось свободных адресов.","No limit":"Без лимита","No server":"Нет сервера","No server yet":"Сервера пока нет","Not found.":"Не найден.","Not included":"Нет доступа","Not on the %s right now?":"Открыли на другом %s?","Not set up yet":"Ещё не настроено","Nothing gets through until it resets.":"Ничего не проходит, пока лимит не обнулится.","Nothing opened? %s and add it in the app.":"Ничего не открылось? %s и добавьте его в приложении.","Now, %s":"Сейчас %s",OR:"ИЛИ","Official release on GitHub":"Официальная версия на GitHub","On %s.":"Дата окончания - %s.","On GitHub":"На GitHub","Only the admin can turn devices off.":"Отключать устройства может только администратор.","stepOpen %s":"Откройте %s","Open %s.":"Доступ открыт %s.","Open a terminal in the folder with the file":"Откройте терминал в папке с файлом","Open in AmneziaVPN":"Открыть в AmneziaVPN","Open on another device":"Открыть на другом устройстве","Open on the device":"Открыть на устройстве","Open securely":"Открыть по HTTPS","Open the link securely":"Откройте защищённую ссылку","Open this link on the %s to set it up there.":"Откройте эту ссылку на %s, чтобы настроить его там.","Open this link over HTTPS to get the connection settings.":"Чтобы получить настройки подключения, откройте эту ссылку по HTTPS.","Open this page in Safari or Chrome: the store opens from here, but the app handoff does not.":"Откройте эту страницу в Safari или Chrome: магазин отсюда откроется, а передача в приложение - нет.","Open your link on the %s":"Откройте свою ссылку на %s","OpenWrt packages":"Пакеты OpenWrt","OpenWrt packages + kmod":"Пакеты OpenWrt + kmod",Other:"Другое","Other devices at home reach yours as %s":"Другие устройства дома обращаются к вашим по адресу %s","Out of data":"Трафик закончился","Outside allowed hours":"Вне часов доступа","Outside your hours":"Вне часов доступа",PC:"Компьютер",Paused:"На паузе","Person %s: circle %s does not exist.":"Человек %s: круга %s нет.","Person %s: has the same personal link as %s.":"Человек %s: личная ссылка совпадает со ссылкой человека %s.","Person %s: home service %s does not exist.":"Человек %s: домашнего сервиса %s нет.","Person %s: server %s does not exist.":"Человек %s: сервера %s нет.",Phone:"Телефон","Phones and tablets get a smaller packet size that suits mobile networks.":"У телефонов и планшетов пакеты меньше - так лучше для мобильных сетей.","Pick AmneziaVPN in the share sheet. Not there? %s and add it in the app.":"Выберите AmneziaVPN в меню «Поделиться». Его там нет? %s и добавьте его в приложении.","Pick the file and connect":"Выберите файл и подключитесь","Point its camera at the code: the link opens there.":"Наведите камеру устройства на код - ссылка откроется на нём.","Point its camera at the code: this page opens there.":"Наведите камеру устройства на код - там откроется эта страница.","Point its camera at the code: your page opens there with this device ready to add.":"Наведите камеру устройства на код - там откроется ваша страница, и его можно будет сразу добавить.","Port must be 1-65535.":"Порт: от 1 до 65535.","QR code":"QR-код","AmneziaVPN appQR code":"QR-код",Reconnect:"Переподключить","Reconnect %s":"Переподключить %s","Reconnect %s?":"Переподключить «%s»?",Remove:"Удалить","Remove %s?":"Удалить «%s»?",Rename:"Переименовать","Rename %s":"Переименовать «%s»",Renamed:"Переименовано","Request failed (%s)":"Не удалось выполнить запрос (%s)","Request too large.":"Слишком большой запрос.","Resets on the 1st.":"Обнуляется 1-го числа.",Router:"Роутер",Run:"Выполните",Save:"Сохранить","WireGuard appScan from QR code":"Сканировать QR-код","Send it to the %s":"Отправить на %s","Send it to the %s in a message or a note, then in AmneziaVPN: %s.":"Отправьте его на %s в сообщении или заметке, затем в AmneziaVPN: %s.","Send it to the %s, then import %s in %s.":"Отправьте его на %s, затем импортируйте %s в %s.","Send to AmneziaVPN":"Отправить в AmneziaVPN","Server is disabled":"Сервер выключен","Server is turned off":"Сервер выключен","Set up %s":"Настроить %s","Set up a server first.":"Сначала настройте сервер.","Settings changed":"Настройки изменились","Settings changed, update needed":"Настройки изменились, нужно обновить","Share as a file":"Поделиться файлом","Share file":"Поделиться файлом","Share the file":"Поделиться файлом","Share the link":"Поделиться ссылкой","Show key":"Показать ключ","Straight into %s":"Сразу в %s","Subnet must look like 10.77.0.0/24.":"Подсеть указывается так: 10.77.0.0/24.","Subnet overlaps %s.":"Подсеть пересекается с %s.",TB:"ТБ",Tablet:"Планшет","Tap “%s” and connect":"Нажмите «%s» и подключитесь","The APK is for phones without Google Play, or where the store hides the app.":"APK - для телефонов без Google Play или если магазин скрывает приложение.","The admin has turned this device off.":"Администратор отключил это устройство.","The app goes on the %s.":"Приложение ставится на %s.","The browser may warn that the certificate is not trusted: it is this router’s own. Choose to continue (“Advanced” → “Proceed”).":"Браузер может предупредить, что сертификату нельзя доверять: это собственный сертификат роутера. Продолжите переход («Дополнительные» → «Перейти на сайт»).","The connection":"Подключение","The connection as one key":"Подключение одним ключом","The id may use lowercase letters, digits and underscores.":"В идентификаторе можно использовать строчные латинские буквы, цифры и подчёркивания.","The packages and the file for OpenWrt":"Пакеты и файл для OpenWrt","The page could not load":"Не удалось загрузить страницу","The person has no server.":"У человека нет сервера.","Then come back here and tap":"Затем вернитесь сюда и нажмите","Then import it in the app":"Затем импортируйте его в приложении","This device":"Это устройство","This key is already in use.":"Этот ключ уже используется.","This link no longer works":"Эта ссылка больше не работает","This page is open without encryption. To add or set up a device, open the same link over HTTPS:":"Эта страница открыта без шифрования. Чтобы добавить или настроить устройство, откройте ту же ссылку по HTTPS:","Through the router":"Через роутер",Today:"Сегодня","Too many changes in a short time. Try again in a few minutes.":"Слишком много изменений за короткое время. Попробуйте ещё раз через несколько минут.","Two steps, about a minute":"Два шага, около минуты","Two steps, about a minute: get the app, then add the connection.":"Два шага, около минуты: установите приложение, затем добавьте подключение.","Unknown DNS choice.":"Неизвестный вариант DNS.","Unknown action.":"Неизвестное действие.","Unknown circle.":"Неизвестный круг.","Unknown device.":"Неизвестное устройство.","Unknown end action.":"Неизвестное действие по окончании доступа.","Unknown person.":"Неизвестный человек.","Unknown server.":"Неизвестный сервер.","Unknown service %s.":"Неизвестный сервис %s.",Uploaded:"Отправлено","Waiting for the connection":"Ждём подключения","Warning must be 0-60 days.":"Предупреждать можно за 0–60 дней.","What is it?":"Что это за устройство?","Windows PC":"Компьютер с Windows",Yesterday:"Вчера","You already have a device with this name.":"У вас уже есть устройство с таким именем.","You haven’t been added to one.":"Вас ещё не добавили ни на один сервер.","Your access":"Ваш доступ","Your access has ended.":"Ваш доступ закончился.","Your access is paused.":"Ваш доступ на паузе.","Your devices":"Ваши устройства","Your devices can’t connect until it’s enabled again.":"Ваши устройства не подключатся, пока его снова не включат.","Your devices can’t connect until it’s extended.":"Ваши устройства не подключатся, пока доступ не продлят.","Your devices can’t connect until it’s resumed.":"Ваши устройства не подключатся, пока доступ не возобновят.","bit/s":"бит/с",computer:"компьютер","on thecomputer":"компьютере",device:"устройство","on thedevice":"устройстве",ended:"закончился","ends today":"закончится сегодня","ends tomorrow":"закончится завтра","h1-h4 must be distinct":"h1-h4 должны быть разными","just now":"только что","kbit/s":"кбит/с",name:"имя",never:"никогда","no limit":"без лимита",phone:"телефон","on thephone":"телефоне",router:"роутер","on therouter":"роутере",tablet:"планшет","on thetablet":"планшете","this device":"это устройство"},p:{"%s already has %d device. Remove one first to lower the limit to %d.":["%s: уже %d устройство. Чтобы снизить лимит до %d, сначала удалите одно из них.","%s: уже %d устройства. Чтобы снизить лимит до %d, сначала удалите одно из них.","%s: уже %d устройств. Чтобы снизить лимит до %d, сначала удалите одно из них."],"%s day":["%s день","%s дня","%s дней"],"%s of %s slot free":["Свободно %s из %s места","Свободно %s из %s мест","Свободно %s из %s мест"],"You have reached your limit of %s device":["Достигнут лимит - %s устройство","Достигнут лимит - %s устройства","Достигнут лимит - %s устройств"],"You have reached your limit of %s device. Remove one to add another.":["Достигнут лимит - %s устройство. Удалите одно, чтобы добавить новое.","Достигнут лимит - %s устройства. Удалите одно, чтобы добавить новое.","Достигнут лимит - %s устройств. Удалите одно, чтобы добавить новое."],"day left":["день остался","дня осталось","дней осталось"],"ends in %s day":["закончится через %s день","закончится через %s дня","закончится через %s дней"]}};var It=[{code:"en",name:"English"},{code:"ru",name:"Русский"}],Ms={ru:[sr]},ir={en:e=>e!==1?1:0,ru:e=>e%10===1&&e%100!==11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},lr="dl.lang";function ks(e,t){var r,o;let n=i=>i&&It.some(l=>l.code===i)?i:null;return(o=(r=n(e))!=null?r:t.map(i=>n(i.toLowerCase().split(/[-_]/)[0])).find(Boolean))!=null?o:"en"}var rt="en",Mn=[],cr=[],dr=(e,t)=>t?`${t}${e}`:e;function ur(e,t){let n=dr(e,t);for(let r of Mn)if(n in r.s)return r.s[n];return e}function Cs(e,t,n,r){var l,m,g;let o=dr(t,r),i=(l=Mn.find(f=>o in f.p))==null?void 0:l.p[o];return(g=i==null?void 0:i[((m=ir[rt])!=null?m:ir.en)(e)])!=null?g:e===1?t:n}var Qe=()=>rt,pr=e=>ur(e);function kn(e,t=!0){var n;if(rt=It.some(r=>r.code===e)?e:"en",Mn=(n=Ms[rt])!=null?n:[],document.documentElement.lang=rt,t)try{localStorage.setItem(lr,rt)}catch{}cr.forEach(r=>r())}function fr(e){cr.push(e)}function _s(){try{return localStorage.getItem(lr)}catch{return null}}Object.assign(globalThis,{_:ur,N_:Cs});var ar;kn(ks(_s(),(ar=navigator.languages)!=null&&ar.length?navigator.languages:[navigator.language]),!1);var hr={phone:'',computer:'',tablet:'',router:'',server:'',other:'',ethernet:'',bridge:'',wifi:'',tunnel:'',plus:'',chart:'',reset:'',package:'',code:'',plug:'',sunrise:'',refresh:'',archive:'',qr:'',copy:'',download:'',link:'',amnezia:'',amneziawg:'',wireguard:'',appstore:'',googleplay:'',github:'',openwrt:'',apple:'',windows:'',linux:'',eye:'',share:'',arrow:'',trash:'',edit:'',pause:'',play:'',key:'',out:'',admin:'',shield:'',shieldplus:'',lock:'',zap:'',check:'',alert:'',x:'',globe:'',home:'',open:'',file:'',network:'',moon:'',chevron:'',clock:'',calendar:'',minus:'',more:'',pin:'',activity:''};function Gt(e,t="dl-icon"){var r;let n=(r=hr[e])!=null?r:hr.phone;return``}function mr(e,t){let n=r=>{r==null||r===!1||(Array.isArray(r)?r.forEach(n):e.appendChild(typeof r=="string"?document.createTextNode(r):r))};t.forEach(n)}function s(e,t={},...n){let r=document.createElement(e);for(let[o,i]of Object.entries(t))i==null||i===!1||(o.startsWith("on")&&typeof i=="function"?r.addEventListener(o.slice(2),i):o==="class"?r.className=String(i):i===!0?r.setAttribute(o,""):r.setAttribute(o,String(i)));return mr(r,n),r}function We(e,...t){e.replaceChildren(),mr(e,t)}function Re(e){let t=document.createElement("template");return t.innerHTML=e.trim(),t.content.firstElementChild}var W=(e,t="i")=>Re(Gt(e,t));var Ae=()=>typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function ot(e,t,n=1){let r=Math.sqrt(e/n),o=t/(2*Math.sqrt(e*n)),i=f=>{if(o<.999){let O=r*Math.sqrt(1-o*o);return 1-Math.exp(-o*r*f)*(Math.cos(O*f)+o*r/O*Math.sin(O*f))}if(o<=1.001)return 1-Math.exp(-r*f)*(1+r*f);let E=Math.sqrt(o*o-1),x=-r*(o-E),b=-r*(o+E);return 1-(b*Math.exp(x*f)-x*Math.exp(b*f))/(b-x)},l=0;for(let f=0;f<3;f+=.004)Math.abs(1-i(f))>.0015&&(l=f);l+=.004;let m=[];for(let f=0;f<=64;f++)m.push(+i(l*f/64).toFixed(4));m[64]=1;let g=Math.round(l*1e3);return{duration:g,easing:`linear(${m.join(", ")})`,at:f=>f>=g?1:i(f/1e3)}}var Te=ot(300,20),U=ot(300,35),xe=ot(520,24),vr=ot(520,46),Le=ot(380,28),gr=ot(900,60),j="cubic-bezier(0.23, 1, 0.32, 1)",Z="cubic-bezier(0.55, 0, 1, 0.45)",Cn="cubic-bezier(0.32, 0.72, 0, 1)";function yr(e){e.style.setProperty("--spring-bouncy",Te.easing),e.style.setProperty("--spring-bouncy-dur",`${Te.duration}ms`),e.style.setProperty("--spring-smooth",U.easing),e.style.setProperty("--spring-smooth-dur",`${U.duration}ms`),e.style.setProperty("--spring-soft",Le.easing),e.style.setProperty("--spring-soft-dur",`${Le.duration}ms`),e.style.setProperty("--spring-quick",gr.easing),e.style.setProperty("--spring-quick-dur",`${gr.duration}ms`)}function $(e,t,n){var r;return Ae()?t.some(o=>"opacity"in o)?e.animate(t.map(o=>"opacity"in o?{opacity:o.opacity}:{}),{duration:Math.min(Number((r=n.duration)!=null?r:200),160),easing:"ease-out",fill:n.fill}):e.animate(t,{...n,duration:0,delay:0}):e.animate(t,n)}function br(e,t){return e<=0||t<=0?0:(1-1/(e*.55/t+1))*t}function xr(e,t,n){return e<=0||t<-.1?!1:t>.4||e>n/3}function Es(){return(typeof document=="undefined"?"":document.documentElement.lang)||"en"}function Ce(){let e=Es();return e==="en"?"en-GB":e}function N(e,...t){let n=0;return e.replace(/%([%sd])/g,(r,o)=>{var i;return o==="%"?"%":String((i=t[n++])!=null?i:"")})}function we(e,t){return e.toLocaleString(Ce(),t===void 0?void 0:{minimumFractionDigits:t,maximumFractionDigits:t})}function ze(e,t,n){return N(N_(e,t,n),we(e))}function st(e,...t){let n=0;return e.split(/(%[%sd])/).filter(Boolean).map(r=>r==="%%"?"%":r==="%s"||r==="%d"?t[n++]:r)}function Ts(e,t,n){let r=0;for(;e>=n&&r=100||r===0?we(Math.round(e)):we(e,1)} ${t[r]}`}function Be(e){return Ts(!e||e<0?0:e,[_("B"),_("KB"),_("MB"),_("GB"),_("TB")],1024)}function wr(e,t=Date.now()/1e3){if(!e)return _("never");let n=Math.max(0,Math.round(t-e));return n<60?_("just now"):n<3600?N(_("%s min ago"),Math.floor(n/60)):n<86400?N(_("%s h ago"),Math.floor(n/3600)):n<86400*30?N(_("%s d ago"),Math.floor(n/86400)):new Date(e*1e3).toLocaleDateString(Ce(),{day:"numeric",month:"short",year:"numeric"})}function Wt(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Se(e){let[t,n,r]=e.split("-").map(Number);return new Date(t,(n||1)-1,r||1,12)}function Ls(e){return(typeof e=="string"?/^\d{4}-\d{2}-\d{2}$/.test(e)?Se(e):new Date(e):e).toLocaleDateString(Ce(),{day:"numeric",month:"short",year:"numeric"})}function zt(e){return e?Ls(e):""}function As(e,t){let n=r=>{let[o,i,l]=r.split("-").map(Number);return Date.UTC(o,i-1,l)};return Math.round((n(e)-n(t))/864e5)}function it(e,t){let n=Se(e);return n.setDate(n.getDate()+t),Wt(n)}function qt(e,t=Date.now()){if(!e)return null;let n=typeof t=="number"?Wt(new Date(t)):t,r=As(e,n);return r>=0?r+1:r}function wt(e,t){return t!=null&&t>0&&e.expire_warn>0&&t<=e.expire_warn}function Mr(e){return e<=1?_("ends today"):e===2?_("ends tomorrow"):ze(e,"ends in %s day","ends in %s days")}function kr(e){return{lan:_("Home network"),internet:_("Internet"),both:_("Home network + Internet")}[e]}function Kt(e){return{computer:_("PC"),phone:_("Phone"),tablet:_("Tablet"),router:_("Router"),other:_("Other")}[e]}function Ut(e){let t=n=>n.disabled?3:n.online?0:n.handshake?1:2;return e.map((n,r)=>[n,r]).sort((n,r)=>t(n[0])-t(r[0])||n[1]-r[1]).map(([n])=>n)}var ce={vpn:"AmneziaVPN",awg:"AmneziaWG",wg:"WireGuard"};function _r(e,t=0){return/iPhone|iPad|iPod/.test(e)||/Macintosh/.test(e)&&t>1?"ios":/Android/.test(e)?"android":/Windows/.test(e)?"windows":/Mac OS X|Macintosh/.test(e)?"mac":/CrOS/.test(e)?"unknown":/Linux|X11/.test(e)?"linux":"unknown"}var Er=e=>/Telegram|FBAN|FBAV|Instagram|VKClient|Line\//i.test(e);function Tr(e,t){return e==="router"||t==="unknown"?!1:e==="phone"||e==="tablet"?t==="ios"||t==="android":e==="computer"?t==="windows"||t==="mac"||t==="linux":!0}function Lr(e){let t=[{id:"vpn",name:ce.vpn},{id:"awg",name:ce.awg}];return e==="off"&&t.push({id:"wg",name:ce.wg}),t}var Ft="https://github.com/amnezia-vpn/amnezia-client/releases/latest",Cr=e=>({href:e,top:_("APK file on"),main:"GitHub",mark:"github",why:_("The APK is for phones without Google Play, or where the store hides the app.")});function Ar(e,t){var l;let n=_("Download on the"),r=_("Get it on"),o=_("Official release on GitHub");return(l={vpn:{ios:{href:"https://apps.apple.com/app/amneziavpn/id1600529900",top:n,main:"App Store",mark:"appstore"},android:{href:"https://play.google.com/store/apps/details?id=org.amnezia.vpn",top:r,main:"Google Play",mark:"googleplay",alt:Cr(Ft)},windows:{href:Ft,top:o,main:_("Download for Windows"),mark:"windows"},mac:{href:Ft,top:o,main:_("Download for Mac"),mark:"apple"},linux:{href:Ft,top:o,main:_("Download for Linux"),mark:"linux"}},awg:{ios:{href:"https://apps.apple.com/us/app/amneziawg/id6478942365",top:n,main:"App Store",mark:"appstore"},android:{href:"https://play.google.com/store/apps/details?id=org.amnezia.awg",top:r,main:"Google Play",mark:"googleplay",alt:Cr("https://github.com/amnezia-vpn/amneziawg-android/releases")},windows:{href:"https://github.com/amnezia-vpn/amneziawg-windows-client/releases",top:o,main:_("Download for Windows"),mark:"windows"},mac:{href:"https://apps.apple.com/us/app/amneziawg/id6478942365",top:n,main:"Mac App Store",mark:"appstore"},linux:{href:"https://github.com/amnezia-vpn/amneziawg-tools",top:_("On GitHub"),main:"amneziawg-tools",mark:"linux"}},wg:{ios:{href:"https://apps.apple.com/app/wireguard/id1441195209",top:n,main:"App Store",mark:"appstore"},android:{href:"https://play.google.com/store/apps/details?id=com.wireguard.android",top:r,main:"Google Play",mark:"googleplay"},windows:{href:"https://www.wireguard.com/install/",top:_("Download from"),main:"wireguard.com",mark:"windows"},mac:{href:"https://apps.apple.com/app/wireguard/id1451685025",top:n,main:"Mac App Store",mark:"appstore"},linux:{href:"https://www.wireguard.com/install/",top:_("Install from"),main:"wireguard.com",mark:"linux"}}}[e][t])!=null?l:null}var Sr=e=>e==="wg"?{href:"https://openwrt.org/docs/guide-user/services/vpn/wireguard/start",top:_("OpenWrt packages"),main:"wireguard-tools",mark:"openwrt"}:{href:"https://openwrt.org/packages/start",top:_("OpenWrt packages + kmod"),main:"amneziawg-tools",mark:"openwrt"},_n=e=>e==="android",kt=e=>`${e.replace(/\.conf$/i,"")}.vpn`,qe=(...e)=>e.join(" → ");function Mt(e){return{ios:{file:qe("+",_("Create from file or archive","WireGuard app")),qr:qe("+",_("Create from QR code","WireGuard app"))},android:{file:qe("+",_("Import from file or archive","WireGuard app")),qr:qe("+",_("Scan from QR code","WireGuard app"))},mac:{file:qe("+",_("Import Tunnel(s) from File…","WireGuard app"))},windows:{file:qe(_("Add Tunnel","WireGuard app"),_("Import tunnel(s) from file…","WireGuard app"))}}[e]}function Ct(e,t="unknown"){var r;if(e==="vpn")return qe("+",_("QR code","AmneziaVPN app"));let n=(r=Mt(t))==null?void 0:r.qr;return n!=null?n:N(_("%s (Android: %s)"),Mt("ios").qr,Mt("android").qr.replace(/^.* → /,""))}function Vt(e,t="unknown"){var n;return e==="vpn"?qe("+",_("Insert","AmneziaVPN app")):((n=Mt(t))!=null?n:Mt("android")).file}var Pr=()=>N(_("Tap “%s” and connect"),_("Continue","AmneziaVPN app"));function Dr(e,t,n,r){if(t==="linux")return[[_("Open a terminal in the folder with the file"),""],[`${_("Run")} `,`sudo ${e==="wg"?"wg-quick":"awg-quick"} up ./${n}`]];let o=Vt(e,t);return[[N(_("Open %s","step"),ce[e]),""],[o.replace(/ → [^→]*$/," → "),o.replace(/^.* → /,"")],[r?_("Confirm the import and connect"):_("Pick the file and connect"),""]]}function $r(e){return{ios:"iPhone / iPad",android:"Android",windows:"Windows",mac:"Mac",linux:"Linux",unknown:_("this device")}[e]}var Hr=(e,t)=>`${e}#setup=${t}`;function Or(e){var t,n;return(n=(t=/^#setup=(d_[0-9a-f]{8})$/.exec(e))==null?void 0:t[1])!=null?n:null}var Rr=e=>`${e}#add`,Br=e=>e==="#add",En=(e,t=!1)=>(t?{phone:_("phone","on the"),tablet:_("tablet","on the"),computer:_("computer","on the"),router:_("router","on the"),other:_("device","on the")}:{phone:_("phone"),tablet:_("tablet"),computer:_("computer"),router:_("router"),other:_("device")})[e];var oe=null,pe=()=>oe;function Me(e){oe=e}var Ss=document.getElementById("app"),Nr,at=(Nr=Ss.dataset.base)!=null?Nr:"",Ir=/^\/[a-z]{6}-[a-z]{6}-[a-z]{6}$/.test(at)?at.slice(1):"",lt=()=>location.origin+location.pathname,Ne=()=>{var e;return(e=oe==null?void 0:oe.today)!=null?e:Wt(new Date)},ct=()=>{var e;return(e=oe==null?void 0:oe.now)!=null?e:Date.now()/1e3},Yt=()=>_r(navigator.userAgent,navigator.maxTouchPoints),Ps=()=>(oe==null?void 0:oe.server.awg_disguise)===!1,Gr=()=>{var e;return(e=oe==null?void 0:oe.server.preset)!=null?e:Ps()?"off":"max"},Wr=()=>(oe==null?void 0:oe.https_url)||null,Je=()=>(oe==null?void 0:oe.server.name)||"Dawnline",zr=()=>{};function qr(e){zr=e}var _e=(e={})=>zr(e);var Ke=class extends Error{constructor(n,r,o){super(r);this.status=n;this.httpsUrl=o}};async function fe(e,t){let n=await fetch(`${at}/api/${e}`,{method:t===void 0?"GET":"POST",credentials:"omit",headers:t===void 0?{"Accept-Language":Qe()}:{"Content-Type":"application/json","Accept-Language":Qe()},body:t===void 0?void 0:JSON.stringify(t),cache:"no-store"}),r=null;try{r=await n.json()}catch{}if(!n.ok)throw new Ke(n.status,r!=null&&r.error?pr(r.error):N(_("Request failed (%s)"),n.status),(r==null?void 0:r.https_url)||void 0);return r}var jt=e=>e instanceof Ke&&(e.status===404||e.status===401);var jr=xs(Vr(),1),Ds=e=>``,Yr="#0a0a0a",$s="#f2f2f2",Hs={night:[Yr,$s],day:["#ffffff",Yr]},Ln=e=>e.length>300,dt=e=>+e.toFixed(2);function Tn(e,t,n,r,o){return`M${dt(e+o)} ${dt(t)}h${dt(n-2*o)}a${o} ${o} 0 0 1 ${o} ${o}v${dt(r-2*o)}a${o} ${o} 0 0 1 -${o} ${o}h-${dt(n-2*o)}a${o} ${o} 0 0 1 -${o} -${o}v-${dt(r-2*o)}a${o} ${o} 0 0 1 ${o} -${o}z`}function Qr(e,t=3,n=!0,r="plain"){let o=Ln(e),i=r!=="plain",[l,m]=i?Hs[r]:["#fff","#000"],g=(0,jr.default)(0,o?"L":"H");g.addData(e,"Byte"),g.make();let f=g.getModuleCount(),E=f+t*2,x=n&&!o?Math.round(f*.22):0;x&&(f-x)%2&&x++;let b=(f-x)/2,O=b+x,H=(a,h)=>x>0&&a>=b&&a=b&&hi&&(h<7&&a<7||h<7&&a>=f-7||h>=f-7&&a<7),B="";if(i){let a=o?.48:.42;for(let h=0;h${Ds(i?l:"#fff")}`}let v=``;return i?`${v}${d}`:`${v}${d}`}var Jr={opacity:1,filter:"blur(0px)",transform:"none"},Os={opacity:0,filter:"blur(5px)",transform:"scale(.86)"},Xr={opacity:0,filter:"blur(5px)",transform:"scale(.6)"},Zr={duration:180,easing:Z,fill:"forwards"},Qt={duration:340,delay:70,easing:j,fill:"backwards"},eo=Qt.delay+Qt.duration,Jt=new WeakMap;function An(e){let t=getComputedStyle(e);return{opacity:t.opacity,filter:t.filter==="none"?"blur(0px)":t.filter,transform:t.transform}}function to(e){var t;for(let n of[...e.childNodes])n.nodeType===Node.TEXT_NODE&&((t=n.textContent)!=null&&t.trim())&&n.replaceWith(s("span",{},n.textContent));return[...e.children].filter(n=>!n.classList.contains("orb"))}function no(e,t){var r;let n=(r=Jt.get(e))!=null?r:[];Jt.set(e,t),n.forEach(o=>o.cancel())}function ro(e){var o;(o=e.querySelector(":scope > .orb"))==null||o.remove();let t=to(e),n=t.map(An),r=s("span",{class:"orb","aria-hidden":"true"},s("i"),s("i"));e.append(r),e.classList.add("busy"),e.setAttribute("aria-busy","true"),no(e,[...t.map((i,l)=>$(i,[n[l],Os],Zr)),$(r,[Xr,Jr],Qt)])}function oo(e){let t=e.querySelector(":scope > .orb"),n=to(e),r=[...t?[$(t,[An(t),Xr],Zr)]:[],...n.map(o=>$(o,[An(o),Jr],Qt))];no(e,r),e.removeAttribute("aria-busy"),Promise.all(r.map(o=>o.finished)).then(()=>{Jt.get(e)===r&&(Jt.delete(e),r.forEach(o=>o.cancel()),t==null||t.remove(),e.classList.remove("busy"))},()=>{})}var so=e=>[...e].map(t=>s("i",{},t)),ut=new WeakMap,_t=e=>{var t,n,r;return(r=(n=(t=ut.get(e))==null?void 0:t.text)!=null?n:e.textContent)!=null?r:""};function Dn(e){let t=document.createRange();return t.selectNodeContents(e),t.getBoundingClientRect()}function io(e){var i;let t=e.firstChild;if(!t||t.nodeType!==Node.TEXT_NODE)return[];let n=document.createRange(),r=[],o=0;for(let l of(i=t.textContent)!=null?i:"")n.setStart(t,o),n.setEnd(t,o+l.length),r.push(n.getBoundingClientRect().left),o+=l.length;return r.map(l=>l-r[0])}function ao(e,t){let n=[...e.children];if(!n.length)return;let r=n[0].getBoundingClientRect().left;n.forEach((o,i)=>{if(!i||t[i]===void 0)return;let l=r+t[i]-o.getBoundingClientRect().left;Math.abs(l)>.01&&(o.style.marginLeft=`${l}px`)})}function Rs(e,t){let n=0;for(;nnew Array(i.length+1).fill(0));for(let g=o.length-1;g>=0;g--)for(let f=i.length-1;f>=0;f--)l[g][f]=o[g]===i[f]?l[g+1][f+1]+1:Math.max(l[g+1][f],l[g][f+1]);let m=[];for(let g=0;g=l[g][f+1]?g++:f++;for(let g=r;g>0;g--)m.push([e.length-g,t.length-g]);return m}function Xt(e){let t=ut.get(e);t&&(clearTimeout(t.timer),ut.delete(e),e.getAnimations().forEach(n=>n.cancel()),e.classList.remove("mt","mt-ib"),e.textContent=t.text)}function Pe(e,t){Xt(e),e.textContent=t}function ee(e,t,n=_t(e),r={}){var le,ue;let{whole:o=!1,at:i}=r,l=((le=r.glide)!=null?le:!0)&&!i,m=ut.has(e)?e.getBoundingClientRect().width:null;if(Xt(e),n===t||Ae()||!e.getClientRects().length){e.textContent=t;return}let g=getComputedStyle(e),f=o&&g.display==="inline";g.display==="inline"&&!o&&e.classList.add("mt-ib"),g.position==="static"&&e.classList.add("mt");let E=null,x=i!=null?i:null,b=[];x||(e.textContent=n,E=e.getBoundingClientRect(),x=Dn(e),b=io(e)),e.textContent=t;let O=e.getBoundingClientRect(),H=io(e),P=(ue=m!=null?m:E==null?void 0:E.width)!=null?ue:O.width,B=l&&!f&&!!E&&Math.abs(O.width-P)>.5,D=!B||!E||Math.abs(O.left-E.left)<.5?"start":Math.abs(O.right-E.right)<.5?"end":"middle",d=s("span",{class:o?"mt-new w":"mt-new"},o?t:so(t)),v=s("span",{class:o?"mt-old w":"mt-old","aria-hidden":"true"},o?n:so(n));o&&(v.style.width=`${x.width+1}px`),e.replaceChildren(d,v),B&&$(e,[{width:`${P}px`},{width:`${O.width}px`}],{duration:U.duration,easing:U.easing,fill:"forwards"});let a=e.getBoundingClientRect(),h=(Y,te)=>{v.style.top=`${te}px`,D==="end"?v.style.right=`${-Y}px`:D==="middle"?(v.style.left="50%",v.style.translate=`calc(-50% + ${Y}px) 0`):v.style.left=`${Y}px`},p=D==="end"?x.right-a.right:D==="middle"?(x.left+x.right-a.left-a.right)/2:x.left-a.left;h(p,x.top-a.top);let A=Dn(v);if(h(p+x.left-A.left,x.top-a.top+x.top-A.top),o){$(v,[{opacity:1,filter:"blur(0px)"},{opacity:0,filter:"blur(4px)"}],{duration:180,easing:Z,fill:"forwards"}),$(d,[{opacity:0,filter:"blur(4px)"},{opacity:1,filter:"blur(0px)"}],{duration:280,delay:60,easing:j,fill:"backwards"});let Y=Math.max(340,B?U.duration:0)+40;ut.set(e,{text:t,timer:window.setTimeout(()=>Xt(e),Y)});return}ao(d,H),ao(v,b);let u=[...v.children],c=[...d.children],T=Rs([...n],[...t]),w=new Set(T.map(([Y])=>Y)),C=new Set(T.map(([,Y])=>Y));T.forEach(([Y,te])=>{let se=u[Y].getBoundingClientRect(),ne=c[te].getBoundingClientRect();u[Y].style.visibility="hidden",(Math.abs(se.left-ne.left)>.5||Math.abs(se.top-ne.top)>.5)&&$(c[te],[{transform:`translate(${se.left-ne.left}px, ${se.top-ne.top}px)`},{transform:"none"}],{duration:U.duration,easing:U.easing})});let I=u.filter((Y,te)=>!w.has(te)),G=c.filter((Y,te)=>!C.has(te)),V=Math.min(12,160/Math.max(1,I.length)),J=Math.min(22,260/Math.max(1,G.length));I.forEach((Y,te)=>$(Y,[{opacity:1,filter:"blur(0px)",transform:"none"},{opacity:0,filter:"blur(4px)",transform:"translateY(-0.45em)"}],{duration:220,delay:te*V,easing:Z,fill:"forwards"})),G.forEach((Y,te)=>$(Y,[{opacity:0,filter:"blur(4px)",transform:"translateY(0.45em)"},{opacity:1,filter:"blur(0px)",transform:"none"}],{duration:380,delay:120+te*J,easing:j,fill:"backwards"}));let re=Math.max(220+I.length*V,G.length?120+G.length*J+380:0,B||T.length?U.duration:0)+40;ut.set(e,{text:t,timer:window.setTimeout(()=>Xt(e),re)})}function Zt(e){return new Map([...e.querySelectorAll("[data-t]")].map(t=>[t.dataset.t,_t(t)]))}function en(e,t){e.querySelectorAll("[data-t]").forEach(n=>{var i;let r=t.get(n.dataset.t),o=(i=n.textContent)!=null?i:"";r!==void 0&&r!==o&&ee(n,o,r)})}var lo=e=>`${e.tagName}.${[...e.classList].filter(t=>t!=="mt"&&t!=="mt-ib").join(" ")}`,co=e=>e.outerHTML.replace(/\bgl\d+/g,"gl");function Bs(e){let t=new Map,n=(r,o)=>r.childNodes.forEach((i,l)=>{var E,x;let m=`${o}/${l}`;if(i.nodeType===Node.TEXT_NODE){if((E=i.textContent)!=null&&E.trim()){let b=document.createRange();b.selectNodeContents(i);let O=b.getBoundingClientRect();t.set(m,{kind:"#text",text:i.textContent,svg:"",at:O,words:O,node:i})}return}if(!(i instanceof Element))return;let g=i instanceof SVGElement?co(i):"",f=i instanceof HTMLElement&&!g?Dn((x=i.querySelector(":scope > .mt-new"))!=null?x:i):null;t.set(m,{kind:lo(i),text:i instanceof HTMLElement?_t(i):"",svg:g,at:i.getBoundingClientRect(),words:f,node:i}),g||n(i,m)});return n(e,""),t}var Sn=e=>$(e,[{opacity:0,filter:"blur(4px)"},{opacity:1,filter:"blur(0px)"}],{duration:280,delay:60,easing:j,fill:"backwards"});function tn(e,t){var O;let n=Bs(e),r=e.getBoundingClientRect();if(We(e,t),!n.size||Ae())return;let o=e.getBoundingClientRect(),i=H=>H&&new DOMRect(H.left-r.left+o.left,H.top-r.top+o.top,H.width,H.height),l=[],m=[],g=new Set,f=(H,P,B)=>{var v;let D=H.parentElement,d=B?(v=n.get(B))==null?void 0:v.at:r;P!=null&&P.at&&P.node instanceof Element&&m.push(D&&d?[P.node,P.at,D,d]:[P.node,P.at,e,r]),l.push(()=>Sn(H))},E=(H,P,B)=>{let D=H.getBoundingClientRect(),d=P.left-r.left-(D.left-o.left),v=P.top-r.top-(D.top-o.top),a=d-B[0],h=v-B[1];return(Math.abs(a)>.5||Math.abs(h)>.5)&&$(H,[{transform:`translate(${a}px, ${h}px)`},{transform:"none"}],{duration:U.duration,easing:U.easing}),[d,v]},x=(H,P,B)=>[...H.childNodes].forEach((D,d)=>{var A,u;let v=`${P}/${d}`;g.add(v);let a=n.get(v);if(D.nodeType===Node.TEXT_NODE){let c=(A=D.textContent)!=null?A:"";if(!c.trim()||(a==null?void 0:a.kind)==="#text"&&a.text===c)return;let T=s("span",{},c);D.replaceWith(T),a!=null&&a.at&&E(T,a.at,B),l.push(()=>{var w;return(a==null?void 0:a.kind)==="#text"&&c.length<=40&&a.text.length<=40?ee(T,c,a.text,{whole:!0,at:(w=i(a.words))!=null?w:void 0}):Sn(T)});return}if(!(D instanceof Element))return;let h=D.getBoundingClientRect();if(!a||a.kind!==lo(D)||a.at&&Math.abs(a.at.height-h.height)>1&&!(D instanceof SVGElement))return f(D,a,P);let p=a.at?E(D,a.at,B):B;if(D instanceof SVGElement){a.svg!==co(D)&&l.push(()=>Sn(D));return}if(!D.children.length&&D instanceof HTMLElement){let c=(u=D.textContent)!=null?u:"";c!==a.text&&l.push(()=>{var T;return c.length<=40&&a.text.length<=40?ee(D,c,a.text,{whole:!0,at:(T=i(a.words))!=null?T:void 0}):f(D,a,P)});return}x(D,v,p)});x(e,"",[0,0]);for(let[H,P]of n)!g.has(H)&&H.lastIndexOf("/")===0&&P.at&&P.node instanceof Element&&m.push([P.node,P.at,e,r]);l.forEach(H=>H());let b=new Map;for(let[,,H]of m)!b.has(H)&&getComputedStyle(H).position==="static"&&H.classList.add("mt"),b.set(H,((O=b.get(H))!=null?O:0)+1);for(let[H,P,B,D]of m){let d=H;d.style.position="absolute",d.style.margin="0",d.style.left=`${P.left-D.left-B.clientLeft}px`,d.style.top=`${P.top-D.top-B.clientTop}px`,d.style.width=`${P.width}px`,d.style.pointerEvents="none",d.setAttribute("aria-hidden","true"),B.appendChild(d),$(d,[{opacity:1,filter:"blur(0px)"},{opacity:0,filter:"blur(4px)"}],{duration:180,easing:Z,fill:"forwards"}).onfinish=()=>{d.remove();let v=b.get(B)-1;b.set(B,v),v||B.classList.remove("mt")}}}var Ns='',Pn=()=>[W("apple"),Re(Ns)];function Is(e,t){if(e===t)return["",e,e,""];let n=e.split(" "),r=t.split(" "),o=0;for(;og?d[2]:d[1],E=d=>s("span",{class:"osm-p"},d),x=()=>{l=o.findIndex(d=>d[1]!==d[2]),l<0&&(g=0),i=o.map(d=>({pre:E(d[0]),word:E(f(d)),suf:E(d[3])})),m=l>=0?s("span",{class:"osm-ic"},Pn()[g]):null,n.replaceChildren(...i.flatMap((d,v)=>[v?s("span",{class:"arr"},"›"):null,d.pre,v===l?m:null,d.word,d.suf]).filter(d=>!!d))},b={width:"1.05em",marginRight:"0.25em"},O=d=>$(d,[{opacity:1,filter:"blur(0px)",...b},{opacity:0,filter:"blur(3px)",width:"0px",marginRight:"0px"}],{duration:220,easing:Z,fill:"forwards"}).onfinish=()=>d.remove(),H=d=>$(d,[{opacity:0,filter:"blur(3px)",width:"0px",marginRight:"0px"},{opacity:1,filter:"blur(0px)",...b}],{duration:U.duration,easing:U.easing}),P=(d,v)=>{r.setAttribute("aria-label",(d===v?d:N(_("%s (Android: %s)"),d,v.split(" → ").pop())).replace(/ → /g," › "));let a=d.split(" → "),h=v.split(" → "),p=a.map((u,c)=>{var T;return Is(u,(T=h[c])!=null?T:u)});if(!i.length||p.length!==o.length)return o=p,x();let A=l;o=p,l=o.findIndex(u=>u[1]!==u[2]),l<0&&(g=0),o.forEach((u,c)=>{ee(i[c].pre,u[0],void 0,{whole:!0}),ee(i[c].word,f(u),void 0,{whole:!0}),ee(i[c].suf,u[3],void 0,{whole:!0})}),l!==A&&(m&&O(m),m=l>=0?s("span",{class:"osm-ic"},Pn()[g]):null,m&&(i[l].word.before(m),H(m)))};P(e,t);let B=()=>{if(!r.isConnected)return clearInterval(D);if(l<0||!m||!r.offsetParent)return;g=1-g,ee(i[l].word,f(o[l]));let d=m.firstElementChild,v=Pn()[g];if(Ae()){d.replaceWith(v);return}m.appendChild(v),$(d,[{opacity:1,filter:"blur(0px)",transform:"none"},{opacity:0,filter:"blur(3px)",transform:"scale(.5) rotate(-40deg)"}],{duration:200,easing:Z,fill:"forwards"}).onfinish=()=>d.remove(),$(v,[{opacity:0,filter:"blur(3px)",transform:"scale(.5) rotate(40deg)"},{opacity:1,filter:"blur(0px)",transform:"none"}],{duration:xe.duration,delay:80,easing:xe.easing,fill:"backwards"})},D=window.setInterval(B,3e3);return{el:r,set:P}}var nn=null,Et=null,po=0,fo=(e,t,n)=>$(e,t,{duration:n,easing:Z,fill:"forwards"}).onfinish=()=>e.remove();function ke(e,t=!1){nn!=null||(nn=document.body.appendChild(s("div",{class:"toasts"}))),Et&&fo(Et,[{opacity:1},{opacity:0,transform:"scale(.96)",filter:"blur(4px)"}],140);let n=s("div",{class:`toast${t?" bad":""}`,role:"status"},W(t?"alert":"check"),s("span",{},e));nn.appendChild(n),Et=n,$(n,[{opacity:0,transform:"translateY(18px) scale(.9)",filter:"blur(6px)"},{opacity:1,transform:"none",filter:"none"}],{duration:Te.duration,easing:Te.easing}),clearTimeout(po),po=window.setTimeout(()=>{Et===n&&(Et=null,fo(n,[{opacity:1},{opacity:0,transform:"translateY(6px) scale(.96)",filter:"blur(4px)"}],180))},2400)}function $n(e,t){var r;let n=W(t,(r=e.getAttribute("class"))!=null?r:"i");return e.replaceWith(n),$(n,[{opacity:0,transform:"scale(.6)",filter:"blur(3px)"},{opacity:1,transform:"none",filter:"none"}],{duration:xe.duration,easing:xe.easing}),n}function Gs(e){if(e.classList.contains("copied"))return;let t=e.querySelector("svg.i"),n=e.querySelector(".lbl, .b-main"),r=n?_t(n):"";e.classList.add("copied");let o=t?$n(t,"check"):null;n&&ee(n,_("Copied")),setTimeout(()=>{o&&t&&o.replaceWith(t),n&&ee(n,r),e.classList.remove("copied")},1600)}async function he(e,t=_("Copied"),n){try{await navigator.clipboard.writeText(e)}catch{let r=s("textarea",{class:"offscreen"},e);document.body.appendChild(r),r.select();let o=document.execCommand("copy");if(r.remove(),!o)return ke(_("Copying is blocked here. Select the text and copy it by hand."),!0)}n instanceof Element&&Gs(n),ke(t)}function Xe(e,t){var o;let n=navigator;if(Yt()!=="ios"||typeof n.share!="function"||typeof File=="undefined")return null;let r=new File([t],e,{type:"application/octet-stream"});return(o=n.canShare)!=null&&o.call(n,{files:[r]})?async()=>{try{await n.share({files:[r]})}catch(i){(i==null?void 0:i.name)!=="AbortError"&&rn(e,t)}}:null}function rn(e,t){let n=URL.createObjectURL(new Blob([t],{type:"application/octet-stream"})),r=s("a",{href:n,download:e,class:"offscreen"});document.body.appendChild(r),r.click(),setTimeout(()=>{URL.revokeObjectURL(n),r.remove()},1e3)}function Tt(e,t){let n=Xe(e,t);n?n():rn(e,t)}async function Ze(e,t){if(e.disabled)return;e.disabled=!0,ro(e);let n=performance.now();try{await t()}finally{let r=Ae()?0:eo-(performance.now()-n);r>0&&await new Promise(o=>setTimeout(o,r)),oo(e),e.disabled=!1}}var Hn=matchMedia("(prefers-color-scheme: light)"),Ws=()=>Hn.matches?"day":"night";function On(e,t){var n,r;e.dataset.qr=t,e.classList.toggle("dense",Ln(t)),e.classList.toggle("light",Hn.matches),e.innerHTML=Qr(t,3,!0,Ws()),e.dataset.mods=String((r=(n=e.firstElementChild)==null?void 0:n.viewBox.baseVal.width)!=null?r:0)}function Lt(e,t=!1){let n=s("div",{class:`qrbox${t?" big":""}`});return On(n,e),n}Hn.addEventListener("change",()=>document.querySelectorAll(".qrbox[data-qr]").forEach(e=>{var t;(t=e.querySelector("svg.old"))==null||t.remove(),On(e,e.dataset.qr)}));function Rn(e,t){let n=Lt(e),r=s("div",{class:"words"},t),o=s("div",{class:"side"},r),i=s("div",{class:`coderow${n.classList.contains("dense")?" stacked":""}`},n,o);return{el:i,swap(l,m){let g=n.dataset.qr===l?null:n.querySelector("svg");if(g){On(n,l),i.classList.toggle("stacked",n.classList.contains("dense"));let E=n.querySelector("svg");g.classList.add("old"),n.appendChild(g),$(E,[{opacity:0},{opacity:1}],{duration:200,easing:j}),$(g,[{opacity:1},{opacity:0}],{duration:220,delay:110,easing:Z,fill:"forwards"}).onfinish=()=>g.remove()}if(!m)return;let f=r;r=s("div",{class:"words"},m),o.appendChild(r),f.classList.add("old"),$(r,[{opacity:0,filter:"blur(3px)"},{opacity:1,filter:"blur(0px)"}],{duration:220,easing:j}),$(f,[{opacity:1,filter:"blur(0px)"},{opacity:0,filter:"blur(3px)"}],{duration:200,delay:90,easing:Z,fill:"forwards"}).onfinish=()=>f.remove()}}}function pt(e){let t=typeof navigator.share=="function";return s("div",{class:"linkrow"},s("span",{class:"mono"},e.replace(/^https?:\/\//,"")),s("button",{type:"button",class:"knob","aria-label":_("Copy the link"),onclick:n=>he(e,_("Link copied"),n.currentTarget)},W("copy")),t?s("button",{type:"button",class:"knob","aria-label":_("Share the link"),onclick:()=>navigator.share({url:e,title:Je()}).catch(()=>{})},W("share")):null)}var et=null,Ie=null,At=()=>!!et;function De(e=!1){let t=et;if(t){if(et=null,Ie==null||Ie.setAttribute("aria-expanded","false"),Ie=null,e){t.remove();return}$(t,[{opacity:1},{opacity:0,transform:"scale(.96)",filter:"blur(3px)"}],{duration:120,easing:Z,fill:"forwards"}).onfinish=()=>t.remove()}}function on(e,t){var f,E;if(Ie===e&&et)return De();De(!0);let n=t.filter((x,b)=>x||b>0&&t[b-1]&&t.slice(b+1).some(Boolean)),r=s("span",{class:"menu-hl"}),o=s("div",{class:"menu",role:"menu"},r);for(let x of n){if(!x){o.appendChild(s("div",{class:"menu-sep"}));continue}let b=s("button",{type:"button",role:x.checked===void 0?"menuitem":"menuitemradio","aria-checked":x.checked===void 0?null:String(x.checked),class:`mi ${(f=x.tone)!=null?f:""}`,onclick:()=>{De(),x.run()}},x.checked===void 0?W((E=x.icon)!=null?E:""):W("check",x.checked?"i":"i off"),s("span",{},x.label));b.addEventListener("pointerenter",()=>{var O;r.className=`menu-hl${r.style.opacity==="1"?" moving":""} ${(O=x.tone)!=null?O:""}`,r.style.transform=`translateY(${b.offsetTop-6}px)`,r.style.opacity="1"}),o.appendChild(b)}o.addEventListener("pointerleave",()=>r.style.opacity="0"),document.body.appendChild(o);let i=e.getBoundingClientRect(),l=o.offsetWidth,m=o.offsetHeight,g=i.bottom+8+m{let t=e.target;et&&!et.contains(t)&&!(Ie!=null&&Ie.contains(t))&&De()});addEventListener("scroll",()=>De(),{passive:!0});var de,$e,F,Bn,mt,Fe,ae,Ue=[],sn=null,Nn=null,St=!1,ft=null,He=()=>!!(de!=null&&de.classList.contains("open")),gt=400,ho=80,zs=3.2,vt=()=>matchMedia("(min-width: 760px)").matches,ht=gt,In=null;function yt(){var o;if(!de||!He())return null;if(!vt())return F.style.maxWidth&&(F.style.maxWidth=""),ht=gt,null;let e=[...ae.querySelectorAll(".qrbox.dense")].find(i=>{let l=i.closest(".acc-row");return i.offsetWidth&&(!l||l.classList.contains("open"))&&!i.closest(".leaving")}),t=gt;if(e){let i=Math.min(innerWidth-32-ho,innerHeight-120);t=Math.max(gt,Math.round(Math.min(+((o=e.dataset.mods)!=null?o:0)*zs,i)+ho))}let n=e&&e!==In?e:null;if(In=e!=null?e:null,Math.abs(t-ht)<8)return n?{from:t,want:t,reveal:n}:null;let r=parseFloat(getComputedStyle(F).maxWidth)||ht;return ht=t,F.getAnimations().filter(i=>{var l;return(l=i.effect)==null?void 0:l.getKeyframes().some(m=>"maxWidth"in m)}).forEach(i=>i.cancel()),F.style.maxWidth=`${t}px`,{from:r,want:t,reveal:n}}function bt(e){if(!e)return;Math.abs(e.from-e.want)>1&&$(F,[{maxWidth:`${e.from}px`},{maxWidth:`${e.want}px`}],{duration:U.duration,easing:U.easing});let t=e.reveal;t&&setTimeout(()=>{if(!t.isConnected)return;let n=Fe.getBoundingClientRect(),r=t.getBoundingClientRect(),o=r.bottom>n.bottom-16?r.bottom-n.bottom+16:r.topme()},W("x")),mt=s("div",{class:"sheet-acts"}),ae=s("div",{class:"vp"}),Fe=s("div",{class:"sheet-scroll"},ae),F=s("div",{class:"sheet",role:"dialog","aria-modal":"true"},Bn,mt,Fe),$e=s("div",{class:"scrim",onclick:()=>me()}),de=s("div",{class:"sheet-root","aria-hidden":"true"},$e,F),document.body.appendChild(de),new ResizeObserver(()=>bt(yt())).observe(ae),Us()}function mo(e){F.setAttribute("aria-label",e.label),Bn.setAttribute("aria-label",_("Close")),F.setAttribute("role",e.asks?"alertdialog":"dialog"),F.classList.toggle("asks",!!e.asks)}function an(){let e=Nn;Nn=null,e==null||e()}function go(e){Nn=e}function tt(e){sn=e}function ge(e){if(de||qs(),De(!0),an(),He()){Ue=[e],Gn(e());return}ft=document.activeElement instanceof HTMLElement?document.activeElement:null,Ue=[e],sn=null,ht=gt,In=null,F.style.maxWidth="",F.classList.remove("arrived");let t=e();ae.replaceChildren(t.el),vo(t,!1),mo(t),de.classList.add("open"),de.setAttribute("aria-hidden","false"),document.body.classList.add("locked");let n=yt();if(n&&bt({...n,from:n.want}),F.getAnimations().forEach(r=>r.cancel()),$e.getAnimations().forEach(r=>r.cancel()),F.style.transform="",vt()?$(F,[{opacity:0,transform:"scale(.9)",filter:"blur(4px)"},{opacity:1,transform:"none",filter:"none"}],{duration:Le.duration,easing:Le.easing}):$(F,[{transform:"translateY(calc(100% + 40px))"},{transform:"none"}],{duration:500,easing:Cn}),$($e,[{opacity:0},{opacity:1}],vt()?{duration:Le.duration,easing:Le.easing}:{duration:420,easing:"ease-out"}),!St)try{history.pushState({sheet:!0},""),St=!0}catch{}}function me(e=!1){if(!He()||de.dataset.closing)return;an(),St&&(St=!1,history.back()),document.body.classList.remove("locked");let t=()=>{de.classList.remove("open"),de.setAttribute("aria-hidden","true"),delete de.dataset.closing,F.style.transform="",$e.style.opacity="",F.getAnimations().forEach(i=>i.cancel()),$e.getAnimations().forEach(i=>i.cancel()),ae.getAnimations().forEach(i=>i.cancel()),ae.replaceChildren(),mt.replaceChildren(),F.classList.remove("arrived"),F.style.maxWidth="",ht=gt,Ue=[],ft!=null&&ft.isConnected&&ft.focus({preventScroll:!0}),ft=null;let o=sn;sn=null,o==null||o()};if(e)return t();de.dataset.closing="1";let n=getComputedStyle(F).transform;F.getAnimations().forEach(o=>o.cancel()),$($e,[{opacity:getComputedStyle($e).opacity},{opacity:0}],vt()?{duration:120,easing:Z,fill:"forwards"}:{duration:320,easing:"ease-out",fill:"forwards"});let r=n==="none"?"none":n;$(F,vt()?[{opacity:1,transform:r,filter:"blur(0px)"},{opacity:0,transform:`${r==="none"?"":r} scale(.96)`.trim(),filter:"blur(3px)"}]:[{transform:r},{transform:"translateY(calc(100% + 40px))"}],vt()?{duration:120,easing:Z,fill:"forwards"}:{duration:420,easing:Cn,fill:"forwards"}).onfinish=t}addEventListener("popstate",()=>{He()&&(St=!1,me())});function vo(e,t=!0){var o;let n=(o=e.acts)!=null?o:null,r=mt.firstElementChild;if(n!==r){if(!t||r&&n&&r.dataset.key===n.dataset.key)return mt.replaceChildren(...n?[n]:[]);r&&(Object.assign(r.style,{position:"absolute",right:"0",top:"0",pointerEvents:"none"}),$(r,[{opacity:1,transform:"none",filter:"none"},{opacity:0,transform:"scale(.9)",filter:"blur(3px)"}],{duration:180,easing:"cubic-bezier(.2,0,0,1)",fill:"forwards"}).onfinish=()=>r.remove()),n&&(mt.appendChild(n),$(n,[{opacity:0,transform:"scale(.9)",filter:"blur(3px)"},{opacity:1,transform:"none",filter:"none"}],{duration:260,delay:110,easing:"cubic-bezier(.2,0,0,1)",fill:"backwards"}))}}function Gn(e){mo(e),vo(e),F.classList.remove("arrived");let t=[...ae.children],n=ae.getBoundingClientRect().height;ae.getAnimations().forEach(i=>i.cancel()),t.forEach(i=>{i.classList.add("leaving"),Object.assign(i.style,{position:"absolute",left:"0",right:"0",top:"0",pointerEvents:"none"}),i.inert=!0}),ae.appendChild(e.el),e.el.style.pointerEvents="none",setTimeout(()=>e.el.style.pointerEvents="",320),Fe.scrollTop=0;let r=yt(),o=e.el.getBoundingClientRect().height;$(ae,[{height:`${n}px`},{height:`${o}px`}],{duration:360,easing:"cubic-bezier(.25,1,.5,1)"}),bt(r),t.forEach(i=>$(i,[{opacity:1,transform:"none",filter:"none"},{opacity:0,transform:"scale(.96)",filter:"blur(2px)"}],{duration:200,easing:"cubic-bezier(.2,0,0,1)",fill:"forwards"}).onfinish=()=>i.remove()),$(e.el,[{opacity:0,transform:"scale(.96)",filter:"blur(4px)"},{opacity:1,transform:"none",filter:"none"}],{duration:280,delay:110,easing:"cubic-bezier(.2,0,0,1)",fill:"backwards"})}function ln(e){if(!He())return ge(e);an(),Ue.push(e),Gn(e())}function Ks(){Ue.length<2||(an(),Ue.pop(),Gn(Ue[Ue.length-1]()))}function yo(e,t=[]){if(!He())return e();let n=ae.getBoundingClientRect().height;ae.getAnimations().forEach(g=>g.cancel());let r=ae.lastElementChild,o=new Map;r==null||r.querySelectorAll("*").forEach(g=>{(!(g instanceof SVGElement)||g instanceof SVGSVGElement)&&o.set(g,g.getBoundingClientRect())}),e();let i=yt(),l=ae.getBoundingClientRect().height;Math.abs(l-n)>1&&$(ae,[{height:`${n}px`},{height:`${l}px`}],{duration:U.duration,easing:U.easing}),bt(i);let m=new Set;for(let[g,f]of o){if(!g.isConnected||!f.width||!f.height)continue;let E=g.getBoundingClientRect();if(!E.width||!E.height)continue;let x=f.left-E.left,b=f.top-E.top;if(Math.abs(x)<.5&&Math.abs(b)<.5)continue;m.add(g);let O=g.parentElement;for(;O&&O!==r&&!m.has(O);)O=O.parentElement;O&&O!==r||$(g,[{transform:`translate(${x}px, ${b}px)`},{transform:"none"}],{duration:U.duration,easing:U.easing})}for(let g of t)g&&$(g,[{opacity:0,filter:"blur(4px)"},{opacity:1,filter:"none"}],{duration:280,easing:j})}function bo(){F==null||F.classList.add("arrived")}var xo=()=>Fe==null?void 0:Fe.scrollTo({top:0,behavior:"smooth"}),Wn=e=>He()&&ae.contains(e)&&!e.closest(".leaving");function Us(){let e=null;F.addEventListener("pointerdown",n=>{let r=n.target;!r.closest(".vhead")||r.closest("button, a, input")||(e={y:n.clientY,t:performance.now(),dy:0,v:0},F.setPointerCapture(n.pointerId))}),F.addEventListener("pointermove",n=>{if(!e)return;let r=n.clientY-e.y,o=performance.now(),i=r>0?r:-br(-r,F.offsetHeight);e.v=(i-e.dy)/Math.max(1,o-e.t),e.dy=i,e.t=o,F.style.transform=`translateY(${i}px)`,$e.style.opacity=String(Math.max(0,1-Math.max(0,i)/420))});let t=()=>{if(!e)return;let{dy:n,v:r}=e;if(e=null,xr(n,r,F.offsetHeight))return me();let o=F.style.transform;F.style.transform="",$e.style.opacity="",n!==0&&$(F,[{transform:o},{transform:"none"}],{duration:U.duration,easing:U.easing})};F.addEventListener("pointerup",t),F.addEventListener("pointercancel",t)}function Ee(e,t={}){return s("div",{class:`vhead${t.back?" center":""}${t.acts?" with-acts":""}`},t.back?s("button",{type:"button",class:"knob back","aria-label":_("Back"),onclick:Ks},W("chevron")):null,s("h2",{},e))}var Ge=e=>s("p",{class:"vsub"},e),Ve=(...e)=>s("p",{class:"hint"},...e);function wo(){ge(()=>{let e=lt();return{el:s("div",{class:"view"},Ee(_("Open on another device")),Ge(_("Point its camera at the code: this page opens there.")),Lt(e,!0),pt(e)),label:_("Open on another device")}})}var Fs='',dn=null,Pt=null,cn=null;function zn(e){if(Pt)return Pt;dn=s("header",{class:"crumbs"}),Pt=s("div",{class:"page-body"}),e.replaceChildren(s("div",{class:"edge-fade top","aria-hidden":"true"}),s("div",{class:"edge-fade bot","aria-hidden":"true"}),cn=s("main",{class:"page"},dn,Pt));let t=()=>document.body.classList.toggle("scrolled",scrollY>2);return addEventListener("scroll",t,{passive:!0}),t(),Pt}function qn(e){cn==null||cn.classList.toggle("single",e)}function Vs(){let e=s("button",{type:"button",class:"cr-lang","aria-label":_("Language"),"aria-haspopup":"menu","aria-expanded":"false"},s("span",{},Qe().toUpperCase()),W("chevron","i cr-down"));return e.addEventListener("click",()=>on(e,It.map(t=>({label:t.name,checked:t.code===Qe(),run:()=>t.code!==Qe()&&kn(t.code)})))),e}function Kn(e=!1,t=!1){var o;if(!dn)return;let n=e?null:(o=pe())==null?void 0:o.person,r=s("span",{class:n?"":"cur","aria-current":n?null:"page"},Je());dn.replaceChildren(s("span",{class:"cr-mark"},Re(Fs)),s("nav",{class:"cr-path","aria-label":_("Breadcrumb")},r,n?[W("chevron"),s("span",{class:"cur","aria-current":"page"},n.name)]:null),...t?[]:[Vs()],...n&&!t?[s("button",{type:"button",class:"knob cr-qr","aria-label":_("Open on another device"),onclick:wo},W("qr"))]:[])}function ko(e,t,n=10){let r=m=>(Se(m).getDay()+6)%7,o=it(e,-r(e)),i=it(t,6-r(t)),l=[];for(let m=o;m<=i;m=it(m,1))if(l.push({day:m,kind:mn*7)return null;return l}var Ys=/^([01]?\d|2[0-3]):([0-5]\d)$/;function Mo(e){let t=Ys.exec(e.trim());return t?+t[1]*60+ +t[2]:null}var Dt=e=>(e%1440+1440)%1440,nt=e=>`${String(Math.floor(Dt(e)/60)).padStart(2,"0")}:${String(Dt(e)%60).padStart(2,"0")}`;function un(e,t,n){let[r,o]=e.split("-"),i=Mo(r!=null?r:""),l=Mo(o!=null?o:"");if(i==null||l==null)return null;let m=t==null?0:n-t;return{from:Dt(i+m),to:Dt(l+m),yours:t!=null}}var Co=e=>e.fromDt(Math.floor(e/60)+t);function Eo(e){let t=Se(e);return{days:new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),day:t.getDate()}}var To={phone:{b:'',f:'',d:''},mobile:{b:'',f:'',d:''},tablet:{b:'',f:'',d:''},computer:{b:'',f:'',d:''},router:{b:'',f:'',d:''},other:{b:'',f:'',d:""},plus:{b:'',f:'',d:''},globe:{b:'',f:'',d:''},home:{b:'',f:'',d:''},shield:{b:'',f:'',d:''},chart:{b:'',f:'',d:''},calendar:{b:'',f:'',d:''},clock:{b:'',f:'',d:''},pause:{b:'',f:'',d:''},server:{b:'',f:'',d:''},link:{b:'',f:'',d:''},key:{b:'',f:'',d:''},lock:{b:'',f:'',d:''},check:{b:'',f:'',d:''},trash:{b:'',f:'',d:''},refresh:{b:'',f:'',d:''},app:{b:'',f:'',d:null},file:{b:'',f:'',d:''}},js=()=>Gt("amnezia","").replace(/^]*>/,"").replace(/<\/svg>$/,""),Qs=0;function Js(e,t="grey",n="gi"){var l;let r=(l=To[e])!=null?l:To.other,o=`gl${++Qs}`,i=r.d===null?`${js()}`:`${r.d}`;return``}var Q=(e,t="grey",n="gi")=>Re(Js(e,t,n));function pn(e,t,n,r){return s("div",{class:`notice ${e}`},Q(t,e==="bad"?"red":"orange"),s("div",{class:"t"},n?s("b",{},n):null,s("span",{},r)))}function Xs(e){var r;let t=un(e,(r=pe())==null?void 0:r.tz_offset,-new Date().getTimezoneOffset());if(!t)return N(_("%s (router time)"),e.replace("-","–"));let n=`${nt(t.from)}–${nt(t.to)}`;return N(t.yours?_("%s your time"):_("%s (router time)"),n)}function Un(e){switch(e.state){case"server_off":return["server",_("Server is disabled"),_("Your devices can’t connect until it’s enabled again.")];case"no_server":return["server",_("No server yet"),_("You haven’t been added to one.")];case"quota":return["chart",_("Out of data"),_("Nothing gets through until it resets.")];case"expired":return["calendar",_("Access ended"),_("Your devices can’t connect until it’s extended.")];case"hours":return["clock",_("Outside your hours"),N(_("Open %s."),Xs(e.hours))];default:return["pause",_("Access paused"),_("Your devices can’t connect until it’s resumed.")]}}function Lo(e){if(e.state!=="active")return pn(e.state==="quota"||e.state==="expired"?"bad":"warn",...Un(e));let t=qt(e.expires,Ne());return wt(e,t)?pn("warn","calendar",N(_("Access %s"),Mr(t)),N(_("On %s."),zt(e.expires))):null}var Ao=3,So=e=>e.reduce((t,[n,r])=>[t[0]+n,t[1]+r],[0,0]);function Zs(e,t){let n=Math.max(1,...e.map(l=>l[1])),r=Math.max(1,...e.map(l=>l[0])),o=Math.round((t-Ao)*Math.min(.8,Math.max(.55,n/(n+r)))),i=t-Ao-o;return{top:o,bottom:i,scale:Math.min(o/n,i/r)}}function fn(e,t,n,r=0){let{top:o,bottom:i,scale:l}=Zs(e,n),m=(E,x,b,O)=>{let H=s("i",{class:O});H.style.height=`${Math.max(2,Math.round(b*l))}px`;let P=s("div",{class:`half ${E}`},H);return P.style.height=`${x}px`,P},g=s("div",{class:`bars ${t}`,"aria-hidden":"true"});g.style.height=`${n}px`;let f=e.map(([E,x],b)=>g.appendChild(s("div",{class:`col${b===e.length-1?" today":""}`},m("top",o,x,"dn"),m("bottom",i,E,"up"))));for(let E=0;Es("span",{class:o,title:i},W("arrow"),s("span",{class:"offscreen"},i),l),n=s("span",{class:"num","data-t":`${e}:dn`}),r=s("span",{class:"num","data-t":`${e}:up`});return{el:s("span",{class:"ud"},t("ud-dn",_("Downloaded"),n),t("ud-up",_("Uploaded"),r)),set([o,i]){Pe(n,Be(i)),Pe(r,Be(o))}}}function ei(e){let t=s("div",{class:"view"},Ee(_("Open the link securely")),Ge(_("Connection settings only travel encrypted")),s("div",{class:"center-col secure"},Q("lock","blue","gi xl"),s("p",{},_("This page is open without encryption. To add or set up a device, open the same link over HTTPS:"))),s("a",{class:"btn accent block",href:e},W("lock"),s("span",{},_("Open securely"))),Ve(_("The browser may warn that the certificate is not trusted: it is this router’s own. Choose to continue (“Advanced” → “Proceed”).")));return t.lastElementChild.classList.add("secure-note"),{el:t,label:_("Open the link securely")}}var $t=e=>ge(()=>ei(e));function xt(){let e=Wr();return e?($t(e),!0):!1}var ti={jc:"0",jmin:"0",jmax:"0",s1:"0",s2:"0",s3:"0",s4:"0",h1:"1",h2:"2",h3:"3",h4:"4",i1:"",i2:"",i3:"",i4:"",i5:""},ni={header_protection_key:"HeaderProtectionKey",content_padding_addition:"ContentPaddingAddition",rekey_after_time:"RekeyAfterTime",rekey_timeout:"RekeyTimeout",reject_after_time:"RejectAfterTime",keepalive_timeout:"KeepaliveTimeout",max_handshake_attempts:"MaxHandshakeAttempts",random_trailers:"RandomTrailers",disable_cookies:"DisableCookies"};function ri(e){let t={};for(let[n,r]of Object.entries(ni))e[n]!=null&&e[n]!==""&&(t[r]=String(e[n]));return t}function oi(e,t){var g;let n=e.amnezia,r=(g=n.obfuscation)!=null?g:{},o=f=>r[f]!=null&&r[f]!==""?String(r[f]):ti[f],i=n.host.replace(/^\[(.*)\]$/,"$1"),l={H1:o("h1"),H2:o("h2"),H3:o("h3"),H4:o("h4"),I1:o("i1"),I2:o("i2"),I3:o("i3"),I4:o("i4"),I5:o("i5"),Jc:o("jc"),Jmin:o("jmin"),Jmax:o("jmax"),S1:o("s1"),S2:o("s2"),S3:o("s3"),S4:o("s4"),...ri(r),allowed_ips:n.allowed_ips,client_ip:n.client_ip,client_priv_key:n.client_priv_key,client_pub_key:n.client_pub_key,config:e.conf.replace(/\r?\n/g,`\r +`),hostName:i,mtu:n.mtu,persistent_keep_alive:n.persistent_keep_alive,port:Number(n.port),psk_key:n.psk_key,server_pub_key:n.server_pub_key},m={containers:[{container:"amnezia-awg",awg:{isThirdPartyConfig:!0,last_config:JSON.stringify(l),port:String(n.port),protocol_version:r.header_protection_key?"3.1":"2",transport_proto:"udp"}}],defaultContainer:"amnezia-awg",description:t,hostName:i};return n.dns[0]&&(m.dns1=n.dns[0]),n.dns[1]&&(m.dns2=n.dns[1]),m}function si(e){let t="";for(let n=0;ne.replace(/^vpn:\/\//,"");var Do=["height","marginTop","marginBottom","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"];function Ye(e,t={}){let n=s("div",{class:`acc${t.inset?" inset":""}`}),r=e.map((f,E)=>{var D;let x=f.body.filter(d=>!!d),b=!x.length,O=[f.icon,s("span",{class:"acc-title"},s("span",{class:"t"},f.title),(D=f.tag)!=null?D:null),f.val?s("span",{class:`acc-val${f.valHide?" hide-open":""}`},f.val):null],H=E===t.open&&!b,P=b?s("div",{class:"acc-head"},...O):s("button",{type:"button",class:"acc-head","aria-expanded":String(H),onclick:()=>g(B)},...O,W("chevron","i acc-chev")),B=s("div",{class:`acc-row${b?" still":""}${H?" open":""}`},P,s("div",{class:"acc-body"},...x));return n.appendChild(B),B}),o=f=>f.querySelector(".acc-body"),i=()=>r.forEach((f,E)=>{let x=f.classList.contains("open");f.classList.toggle("rt",E===0||x||r[E-1].classList.contains("open")),f.classList.toggle("rb",E===r.length-1||x||r[E+1].classList.contains("open"))}),l=f=>{let E=getComputedStyle(f),x={};for(let b of Do)x[b]=b==="height"?`${f.getBoundingClientRect().height}px`:E[b];return x},m=()=>r.forEach(f=>{var E;return(E=f.querySelector("button.acc-head"))==null?void 0:E.setAttribute("aria-expanded",String(f.classList.contains("open")))});function g(f){var H;let E=r.map(l);r.forEach(P=>P.getAnimations().forEach(B=>B.cancel())),r.forEach(P=>o(P).getAnimations().forEach(B=>B.cancel()));let x=!f.classList.contains("open"),b=r.filter(P=>P.classList.contains("open")&&(P===f||x));r.forEach(P=>{P.classList.remove("closing"),P!==f&&P.classList.remove("open","opened")}),f.classList.toggle("open",x),f.classList.toggle("opened",x),i();let O=yt();r.forEach((P,B)=>{let D=l(P);Do.some(d=>E[B][d]!==D[d])&&(b.includes(P)&&P.classList.add("closing"),$(P,[E[B],D],{duration:Le.duration,easing:Le.easing}).onfinish=()=>P.classList.remove("closing"))}),b.forEach(P=>$(o(P),[{opacity:1},{opacity:0,filter:"blur(2px)"}],{duration:160,easing:Z,fill:"forwards"})),x&&$(o(f),[{opacity:0,filter:"blur(2px)"},{opacity:1,filter:"blur(0px)"}],{duration:300,easing:"cubic-bezier(0,0,.58,1)"}),bt(O),m(),(H=t.onToggle)==null||H.call(t,r.indexOf(f),x,!1)}return i(),{el:n,openIndex:()=>r.findIndex(f=>f.classList.contains("open")),setOpen(f){r.forEach((E,x)=>E.classList.toggle("open",x===f&&!E.classList.contains("still"))),i(),m(),r.forEach((E,x)=>{var b;return(b=t.onToggle)==null?void 0:b.call(t,x,E.classList.contains("open"),!0)})}}}function $o(e,t,n){let r=s("span",{class:"seg-pill"}),o=s("div",{class:"seg appseg",role:"tablist"},r),i=e.map(b=>{let O=s("button",{type:"button",class:"seg-b",role:"tab","aria-label":b.label,title:b.label,onclick:()=>x(b.value)},W(b.icon),s("span",{class:"seg-l"},b.label));return O.dataset.v=b.value,o.appendChild(O),O}),l=b=>b.querySelector(".seg-l"),m=()=>i.forEach(b=>{let O=b.dataset.v===t;b.classList.toggle("on",O),b.setAttribute("aria-selected",String(O))}),g=()=>{let b=i.find(O=>O.dataset.v===t);return b&&b.offsetWidth?[b.offsetLeft,o.clientWidth-b.offsetLeft-b.offsetWidth]:null},f=()=>{let b=g();b&&(r.style.left=`${b[0]}px`,r.style.right=`${b[1]}px`)},E=0;function x(b){if(b===t)return;let O=i.findIndex(C=>C.dataset.v===t),H=i.findIndex(C=>C.dataset.v===b),P=getComputedStyle(r),B=parseFloat(P.left)||0,D=parseFloat(P.right)||0,d=i.map(C=>parseFloat(getComputedStyle(C).flexGrow)||0),v=l(i[O]),a=v.getBoundingClientRect().width;[...i,...i.map(l)].forEach(C=>C.getAnimations().forEach(I=>I.cancel())),t=b,m(),i.forEach((C,I)=>{let G=I===H?1:0;d[I]!==G&&$(C,[{flexGrow:d[I]},{flexGrow:G}],{duration:U.duration,easing:U.easing})}),$(v,[{opacity:1,maxWidth:`${a}px`,marginLeft:"0px"},{opacity:0,maxWidth:"0px",marginLeft:"-8px"}],{duration:220,easing:"ease-out"}),$(l(i[H]),[{opacity:0,filter:"blur(4px)"},{opacity:1,filter:"none"}],{duration:280,delay:70,easing:j,fill:"backwards"});let h=H>O,p=Ae()?U:vr,A=performance.now(),u=Math.max(U.duration,p.duration),c=h?U:p,T=h?p:U;cancelAnimationFrame(E);let w=()=>{let C=Ae()?u:performance.now()-A,I=g();if(!I){E=0;return}r.style.left=`${B+(I[0]-B)*c.at(C)}px`,r.style.right=`${D+(I[1]-D)*T.at(C)}px`,E=C{E||f()}).observe(o),{el:o,sync(b){b!==t&&(t=b,m(),f())}}}var Ro={vpn:"amnezia",awg:"amneziawg",wg:"wireguard"},Bo=e=>`dl.app.${e.id}`;function No(e){try{let t=localStorage.getItem(Bo(e));return t==="vpn"||t==="awg"||t==="wg"?t:null}catch{return null}}function Io(e,t){try{localStorage.setItem(Bo(e),t)}catch{}}function je(e,t=!1){var i,l;let n=[s("span",{class:"b-ic"},W(e.mark)),s("span",{class:"b-t"},s("span",{class:"b-top"},e.top),s("span",{class:"b-main"},e.main)),W(e.onclick||(i=e.href)!=null&&i.startsWith("vpn:")?"chevron":"open")],r=`badge${t?" primary":""}`;if(e.onclick)return s("button",{type:"button",class:r,onclick:e.onclick},n);let o=(l=e.href)==null?void 0:l.startsWith("vpn:");return s("a",{class:r,href:e.href,target:o?null:"_blank",rel:"noopener noreferrer"},n)}function Go(e,t,n){let r=n?Sr(e):Ar(e,t);return r?r.alt?[s("div",{class:"badges2"},je(r),je(r.alt)),Ve(r.alt.why)]:[je(r)]:[Ve(N(_("Get %s on the %s and come back here."),ce[e],$r(t)))]}var Ho=e=>s("ol",{class:"howto"},e.map(([t,n])=>s("li",{},t.replace(/ → $/," ›"),n?[" ",s("b",{},n)]:null))),ai=(e,t)=>s("button",{type:"button",onclick:t},e);function Wo(e){let t=e.app(),n=ce[t],r=e.pf==="ios"||e.pf==="android",o=e.same()&&r,i=g=>he(e.key,_("Key copied"),g.currentTarget),l=t==="vpn"&&o&&!_n(e.pf)?Xe(kt(e.cfg.filename),e.key):null;if(t==="vpn"&&o&&(_n(e.pf)||l))return[je(l?{top:_("Then come back here and tap"),main:_("Send to AmneziaVPN"),mark:"amnezia",onclick:()=>void l()}:{href:e.key,top:_("Then come back here and tap"),main:_("Open in AmneziaVPN"),mark:"amnezia"},!0),Ve(...st(l?_("Pick AmneziaVPN in the share sheet. Not there? %s and add it in the app."):_("Nothing opened? %s and add it in the app."),ai(_("Copy the key","in a sentence"),i)))];if(t==="vpn"){let g=Vt("vpn");return[je({top:_("The connection as one key"),main:_("Copy the key"),mark:"copy",onclick:i},!0),Ho([[N(_("Open %s","step"),n),""],[g.replace(/ → [^→]*$/," → "),g.replace(/^.* → /,"")],[Pr(),""]])]}let m=r?Xe(e.cfg.filename,e.cfg.conf):null;return[je(m?{top:e.same()?N(_("Straight into %s"),n):N(_("Send it to the %s"),e.there),main:_("Share the file"),mark:"share",onclick:()=>void m()}:{top:_("Then import it in the app"),main:_("Download the file"),mark:"download",onclick:()=>rn(e.cfg.filename,e.cfg.conf)},!0),Ho(Dr(t,e.pf,e.cfg.filename,!!m&&e.same()))]}function zo(e){let t=e.app(),n=(o,i,l)=>s("button",{type:"button",class:"btn soft sm",onclick:l},W(o),s("span",{class:"lbl"},i));if(t==="vpn"){let o=kt(e.cfg.filename),i=!!Xe(o,e.key);return[s("p",{class:"desc"},N(_("Send it to the %s in a message or a note, then in AmneziaVPN: %s."),e.there,Vt("vpn").replace(/ → /g," › "))),s("div",{class:"btnrow2"},n("copy",_("Copy the key"),l=>he(e.key,_("Key copied"),l.currentTarget)),n(i?"share":"download",i?_("Share as a file"):_("Download the key"),()=>Tt(o,e.key)))]}let r=!!Xe(e.cfg.filename,e.cfg.conf);return[s("p",{class:"desc"},...st(_("Send it to the %s, then import %s in %s."),e.there,s("b",{},e.cfg.filename),ce[t])),s("div",{class:"btnrow2"},n(r?"share":"download",r?_("Share the file"):_("Download the file"),()=>Tt(e.cfg.filename,e.cfg.conf)),n("copy",_("Copy the configuration"),o=>he(e.cfg.conf,_("Configuration copied"),o.currentTarget)))]}function Oo(e,t){if(/^\s*\[.+\]\s*$/.test(e))return s("span",{class:"sec"},e);let n=/^(\s*[A-Za-z0-9]+\s*=)\s*(.*)$/.exec(e);if(!n)return document.createTextNode(e);let o=/^(\s*)(PrivateKey|PresharedKey)\b/.test(e)?t?s("span",{class:"secret"},n[2]):s("span",{class:"mask"},"••••••••••••••••"):n[2];return s("span",{},s("span",{class:"k"},n[1])," ",o)}function qo(e){let t=!1,n=s("pre",{class:"conf"}),r=()=>n.replaceChildren(...e.conf.split(` `).flatMap((x,b)=>b?[` -`,Oo(x,t)]:[Oo(x,t)]));r();let o=!!Xe(e.filename,e.conf),i=W("key"),l=s("span",{},_("Show key")),m=s("button",{type:"button",class:"btn soft sm",onclick:()=>{t=!t,i=$n(i,t?"x":"key"),ee(l,t?_("Hide key"):_("Show key")),r(),n.querySelectorAll(".mask, .secret").forEach(x=>$(x,[{filter:"blur(4px)",opacity:.4},{filter:"none",opacity:1}],{duration:320,easing:j}))}},i,l),g=s("button",{type:"button",class:"btn soft sm",onclick:x=>he(e.conf,_("Configuration copied"),x.currentTarget)},W("copy"),s("span",{class:"lbl"},_("Copy"))),f=s("div",{class:"filecard"},s("div",{class:"fc-row"},s("span",{class:"filecard-ic"},".conf"),s("span",{class:"t"},s("span",{class:"mono"},e.filename),s("span",{},_("For computers and routers")))),s("button",{type:"button",class:"btn accent sm block",onclick:()=>Tt(e.filename,e.conf)},W(o?"open":"download"),s("span",{},o?_("Share file"):_("Download")))),E=Ye([{icon:Q("file"),title:_("Configuration"),body:[s("div",{class:"confbar"},m,g),n]}],{inset:!0});return s("div",{class:"step-box"},f,E.el)}function Ko(e){let t=s("span",{class:"osm-p"},ce[e]),n=uo(Ct(e,"ios"),Ct(e,"android"));return{el:s("span",{class:"scanline"},s("span",{},...st(_("In %s:"),t)),n.el),set(r){ee(t,ce[r],void 0,{whole:!0}),n.set(Ct(r,"ios"),Ct(r,"android"))}}}function qo(e){let t=s("span",{class:"tt"}),n=s("span",{class:"tt-m"}),r=s("span",{class:"hp-tip","aria-hidden":"true"},t,n),o=s("button",{type:"button",class:"hp-b",onclick:()=>Tt(e().file,e().text)},W("download")),i=s("button",{type:"button",class:"hp-b"},W("copy")),l=s("div",{class:"hpill",role:"group","aria-label":_("The connection"),"data-key":"conn"},o,i,r),m=null,g=0,f=0,E=a=>{var h;return a===i&&i.classList.contains("done")?_("Copied"):(h=a.getAttribute("aria-label"))!=null?h:""},x=(a,h)=>{n.textContent=h;let p=n.offsetWidth+20;return Math.min(a.offsetLeft+a.offsetWidth/2,l.offsetWidth+46-p/2)},b=a=>`translateX(${a}px) translateX(-50%)`,O=a=>{let h=getComputedStyle(r).transform;r.getAnimations().forEach(p=>p.cancel()),r.style.transform=b(a),$(r,[{transform:h},{transform:b(a)}],{duration:q.duration,easing:q.easing})},H=a=>ee(t,a),P=a=>{if(clearTimeout(g),m===a&&r.classList.contains("on"))return;if(m=a,r.classList.contains("on")){let p=E(a);return O(x(a,p)),H(p)}let h=()=>{let p=E(a);Pe(t,p);let A=x(a,p);r.getAnimations().forEach(u=>u.cancel()),r.style.transform=b(A),r.classList.add("on"),$(r,[{opacity:0,transform:`${b(A)} translateY(-3px) scale(.96)`,filter:"blur(3px)"},{opacity:1,transform:b(A),filter:"blur(0px)"}],{duration:220,easing:j})};performance.now(){clearTimeout(g),m=null,r.classList.contains("on")&&(f=performance.now()+500,r.classList.remove("on"),$(r,[{opacity:1},{opacity:0}],{duration:120,easing:"ease-out"}))};for(let a of[o,i])a.addEventListener("pointerenter",h=>{h.pointerType==="mouse"&&P(a)}),a.addEventListener("focus",()=>{a.matches(":focus-visible")&&P(a)}),a.addEventListener("blur",R);l.addEventListener("pointerleave",R);let D=a=>{let h=W(a);i.querySelector("svg").replaceWith(h),$(h,[{opacity:0,transform:"scale(.6)",filter:"blur(3px)"},{opacity:1,transform:"none",filter:"none"}],{duration:xe.duration,easing:xe.easing})},d=()=>{if(m!==i||!r.classList.contains("on"))return;let a=E(i);O(x(i,a)),H(a)},v=0;return i.addEventListener("click",()=>{let a=e();he(a.text,a.msg),clearTimeout(v),i.classList.contains("done")||(i.classList.add("done"),D("check"),d()),v=window.setTimeout(()=>{i.classList.remove("done"),D("copy"),d()},1600)}),{el:l,sync(){let a=e().app;o.setAttribute("aria-label",N(_("Download %s config"),a)),i.setAttribute("aria-label",N(_("Copy %s config"),a))}}}function Vo(e){let t=s("b",{},_("Waiting for the connection")),n=s("span",{class:"ws",hidden:!0}),r=s("div",{class:"way",role:"status","aria-live":"polite"},s("div",{class:"way-row"},s("span",{class:"way-end"},W(e.kind)),s("span",{class:"way-track"},s("span",{class:"way-glow"},s("i")),s("span",{class:"way-fill"})),s("span",{class:"way-end home"},W("server"))),s("div",{class:"way-text"},s("span",{class:"t"},t,n)));return{el:r,connected(){r.classList.add("done"),ee(t,N(_("%s connected"),e.name))},gaveUp(){r.classList.add("stopped"),ee(t,_("No connection yet")),n.textContent=_("Close this and open it again to keep checking."),n.hidden=!1,$(t.parentElement,[{opacity:0,filter:"blur(4px)"},{opacity:1,filter:"none"}],{duration:280,easing:j})}}}function Yo(e,t=4){window.setTimeout(async()=>{var n;try{let r=await fe("state");Me(r),At()||_e(),!((n=r.person.devices.find(o=>o.id===e))!=null&&n.online)&&t>1&&Yo(e,t-1)}catch{}},1500)}function jo(e,t,n){let r=ct(),o=0,i=0,l=!1,m=Date.now(),g=async()=>{if(o=0,!l){if(Date.now()-m>6e5){l=!0,n();return}if(document.hidden)return f();try{let x=await fe("state");Me(x);let b=x.person.devices.find(O=>O.id===e.id);if(b&&b.handshake>r){l=!0,t(),b.online||Yo(e.id);return}}catch(x){if(jt(x)){l=!0;return}}i++,f()}},f=()=>{!l&&!o&&(o=window.setTimeout(g,i<6?5e3:i<12?15e3:3e4))},E=()=>{!document.hidden&&!l&&!o&&g()};return document.addEventListener("visibilitychange",E),f(),()=>{l=!0,o&&clearTimeout(o),document.removeEventListener("visibilitychange",E)}}var Fo=e=>new Promise(t=>setTimeout(t,e));async function Qo(e,t,n){e.connected(),bo(),xo(),await Fo(400),Wn(e.el)&&(t.style.overflow="hidden",$(t,[{height:`${t.offsetHeight}px`,opacity:1,filter:"none"},{height:"0px",opacity:0,filter:"blur(4px)"}],{duration:520,easing:j,fill:"forwards"}),$(e.el,[{marginBottom:"18px"},{marginBottom:"0px"}],{duration:520,easing:j,fill:"forwards"}),await Fo(2400),Wn(e.el)&&(tt(()=>_e({flash:n.id})),me()))}async function li(e){try{return await fe(`devices/${e.id}/config`)}catch(t){return t instanceof Ke&&t.httpsUrl?$t(t.httpsUrl):ke(t.message,!0),null}}async function mn(e,t){if(xt())return;let n=async()=>{let r=await li(e);if(!r)return;let o=await Fn(r,r.server);ge(()=>Xo(e,r,o))};t instanceof HTMLButtonElement?await Ze(t,n):await n()}async function gn(e,t){let n=await Fn(t,t.server);ln(()=>Xo(e,t,n))}function Jo(e,t,n){return s("div",{class:"step"},s("span",{class:"step-n"},e),s("div",{class:"step-b"},typeof t=="string"?s("span",{class:"step-t"},t):t,n))}function ci(e,t,n){let r=e.hidden?0:e.getBoundingClientRect().height;if(e.getAnimations().forEach(m=>m.cancel()),n){e.hidden=t;return}e.style.overflow="hidden",e.hidden=!1;let o=t?0:e.getBoundingClientRect().height,[i,l]=t?[1,0]:[0,1];$(e,[{height:`${r}px`,opacity:i,filter:`blur(${4-i*4}px)`},{height:`${o}px`,opacity:l,filter:`blur(${4-l*4}px)`}],{duration:q.duration,easing:q.easing}).onfinish=()=>{e.style.overflow="",e.hidden=t}}function Xo(e,t,n){var Y,te;let r=Yt(),o=Lr(Gr()),i=e.kind==="phone"||e.kind==="tablet",l=e.kind==="router",m=Tr(e.kind,r),g=m?"same":l?"router":i?"away":"pc-away",f=En(e.kind),E=En(e.kind,!0),x=o.filter(se=>!l||se.id!=="vpn"),b=(Y=No(e))!=null?Y:l?"awg":"vpn";x.some(se=>se.id===b)||(b=x[0].id);let O={d:e,cfg:t,key:n,pf:r,there:f,app:()=>b,same:()=>m},H=[],P=()=>{if(x.length<2)return null;let se=$o(x.map(ne=>({value:ne.id,label:ne.name,icon:Bo[ne.id]})),b,ne=>{b=ne,Io(e,ne),H.forEach(Rt=>Rt.sync(ne)),yo(c)});return H.push(se),se.el},R=s("span",{class:"step-t"}),D=s("div",{class:"step-box"}),d=s("div",{class:"step-box"}),v=s("div",{class:"step-box"}),a=s("div",{class:"step-box"}),h=null,p=null,A=null,u=g==="away"?qo(()=>({...b==="vpn"?{text:n,msg:_("Key copied"),file:kt(t.filename)}:{text:t.conf,msg:_("Configuration copied"),file:t.filename},app:ce[b]})):null;function c(){ee(R,l?N(_("Get %s on the router"),ce[b]):N(_("Get %s"),ce[b]),void 0,{whole:!0}),tn(D,Go(b,r,l)),l?d.firstChild||We(d,Uo(t)):tn(d,Wo(O));let se=b==="vpn"?Po(n):t.conf;h&&p&&h.el.isConnected?A!==b&&(h.swap(se),p.set(b)):(p=Ko(b),h=Bn(se,[p.el]),v.replaceChildren(h.el)),A=b,tn(a,zo(O)),u==null||u.sync()}c();let T=Hr(lt(),e.id),w=()=>[i?Bn(T,[s("span",{},_("Point its camera at the code: the link opens there."))]).el:s("p",{class:"desc"},N(_("Open this link on the %s to set it up there."),E)),pt(T)],C=()=>Jo("1",R,[P(),D]),I=()=>Jo("2",l?_("Import the configuration"):_("Add the connection"),[d]),G=s("div",{class:"setup"});if(Er(navigator.userAgent)&&G.appendChild(pn("warn","shield",null,_("Open this page in Safari or Chrome: the store opens from here, but the app handoff does not."))),g==="same"){let se=s("div",{class:"steps-wrap"},s("div",{class:"steps-gap"}),C(),I()),ne=Ye([{icon:Q("link"),title:N(_("Not on the %s right now?"),E),body:w()}],{inset:!0,onToggle:(Rt,M,k)=>ci(se,M,k)});G.append(ne.el,se)}else g==="router"?G.append(C(),I()):g==="away"?G.appendChild(Ye([{icon:Q("link"),title:N(_("Open your link on the %s"),E),body:w()},{icon:Q("app"),title:_("Already has the app"),body:[P(),v]}],{inset:!0,open:1}).el):G.appendChild(Ye([{icon:Q("link"),title:N(_("Open your link on the %s"),E),body:w()},{icon:Q("key"),title:_("Copy or save the connection"),body:[P(),a]}],{inset:!0,open:0}).el);let V=Vo(e),J=!1;go(jo(e,()=>{J||(J=!0,Qo(V,G,e))},V.gaveUp)),tt(()=>_e());let re=g==="same"?_("Two steps, about a minute"):l?_("The packages and the file for OpenWrt"):N(_("The app goes on the %s."),f),le=N(_("Set up %s"),e.name);return{el:s("div",{class:"view"},Ee(le,{acts:!!u}),Ge(re),V.el,G),label:le,acts:(te=u==null?void 0:u.el)!=null?te:null}}var ve=navigator.userAgent,ts=/iPad/.test(ve)||/Macintosh/.test(ve)&&navigator.maxTouchPoints>1;function Ot(){return ts||/Tablet/i.test(ve)||/Android/.test(ve)&&!/Mobile/.test(ve)?"tablet":/Android|iPhone|Mobile/i.test(ve)?"phone":"computer"}var di=[[/^SM-S93/,"Galaxy S25"],[/^SM-S92/,"Galaxy S24"],[/^SM-S91/,"Galaxy S23"],[/^SM-S90/,"Galaxy S22"],[/^SM-G99/,"Galaxy S21"],[/^SM-F9/,"Galaxy Z Fold"],[/^SM-F7/,"Galaxy Z Flip"],[/^SM-A5/,"Galaxy A5x"],[/^SM-A3/,"Galaxy A3x"],[/^SM-X/,"Galaxy Tab"]],Vn="",ui=(async()=>{var t;let e=navigator.userAgentData;if(!e||!/Android/.test(ve))return"";try{let n=((t=(await e.getHighEntropyValues(["model"])).model)!=null?t:"").trim();if(!n||n==="K")return"";let r=di.find(([o])=>o.test(n));Vn=r?`${r[1]} (${n})`:/^SM-/.test(n)?`Galaxy ${n}`:n}catch{}return Vn})();function pi(e){return/iPhone/.test(ve)?"iPhone":ts?"iPad":/Android/.test(ve)?Vn||(e==="tablet"?_("Android tablet"):_("Android phone")):/CrOS/.test(ve)?"Chromebook":/Mac OS X/.test(ve)?"Mac":/Windows/.test(ve)?_("Windows PC"):/Linux/.test(ve)?_("Linux PC"):Kt(e)}var Zo=e=>e==="mobile"?_("Mobile"):Kt(e),Ht=e=>e==="phone"||e==="tablet"?"mobile":e,es=e=>e!=="mobile"?e:Ot()==="tablet"?"tablet":"phone";function Bt(){let e=pe();if(!(!e||e.locked)){if(!e.can_add)return ke(ze(e.person.device_limit,"You have reached your limit of %s device","You have reached your limit of %s devices"),!0);xt()||ge(fi)}}function fi(){let e=pe(),t=e.person,n=["computer","mobile","router","other"].filter(d=>e.kinds.some(v=>Ht(v)===d)),r=n.includes(Ht(Ot()))?Ht(Ot()):n[0],o=!1,i=new Set(t.devices.map(d=>d.name.toLowerCase())),l=d=>{let v=d===Ht(Ot())?pi(es(d)):Kt(d==="mobile"?"phone":d);if(!i.has(v.toLowerCase()))return v;for(let a=2;a<20;a++)if(!i.has(`${v} ${a}`.toLowerCase()))return`${v} ${a}`;return v},m=s("div",{class:"kinds",role:"radiogroup","aria-label":_("What is it?")});m.style.setProperty("--n",String(n.length));let g=n.map(d=>{let v=s("button",{type:"button",class:"kind",role:"radio","aria-label":Zo(d),onclick:()=>O(d)},s("span",{class:"kind-tile"},Q(d,"blue")),s("span",{class:"kind-lbl"},Zo(d)));return m.appendChild(v),v}),f=s("input",{type:"text",maxlength:48,required:!0,"aria-label":_("Name"),autocomplete:"off"}),E=s("button",{class:"go ready",type:"submit","aria-label":_("Create connection")},W("arrow")),x=s("p",{class:"hint bad-t",hidden:!0}),b=d=>{if(!x.hidden)return ee(x,d);x.textContent=d,x.hidden=!1,$(x,[{opacity:0,transform:"translateY(-4px)"},{opacity:1,transform:"none"}],{duration:220,easing:j})};f.value=l(r),f.addEventListener("input",()=>{o=!0,E.classList.toggle("ready",!!f.value.trim()),x.hidden=!0}),ui.then(()=>{!o&&r===Ht(Ot())&&(f.value=l(r))});function O(d){r=d,g.forEach((v,a)=>{let h=n[a]===d;v.classList.toggle("on",h),v.setAttribute("aria-checked",String(h))}),o||(f.value=l(d),E.classList.add("ready"))}O(r);let H=s("form",{class:"field",autocomplete:"off"},f,E);H.addEventListener("submit",d=>{d.preventDefault();let v=f.value.trim();if(v){if(i.has(v.toLowerCase()))return b(_("You already have a device with this name."));Ze(E,async()=>{try{let a=await fe("devices",{name:v,kind:es(r)});Me(a.state),_e({pop:a.id});let h=a.state.person.devices.find(p=>p.id===a.id);await gn(h,a.config)}catch(a){if(a instanceof Ke&&a.httpsUrl)return $t(a.httpsUrl);b(a.message)}})}});let P=s("button",{type:"button",class:"btn soft block",onclick:()=>ln(hi)},W("qr"),s("span",{},_("Add it from the device"))),R=t.device_limit-t.devices.length,D=s("div",{class:"view"},Ee(_("Add a device")),Ge(N(N_(t.device_limit,"%s of %s slot free","%s of %s slots free"),we(R),we(t.device_limit))),m,Ve(_("Phones and tablets get a smaller packet size that suits mobile networks.")),H,x,s("div",{class:"or"},_("OR")),P);return D.querySelector(".hint").classList.add("kinds-note"),{el:D,label:_("Add a device")}}function hi(){let e=Br(lt());return{el:s("div",{class:"view"},Ee(_("Open on the device"),{back:!0}),Ge(_("Point its camera at the code: your page opens there with this device ready to add.")),Lt(e,!0),pt(e)),label:_("Open on the device")}}function ns(e){let t=s("button",{type:"button",class:`btn ${e.cls}`,onclick:r=>Ze(r.currentTarget,e.run)},s("span",{},e.action));return{el:s("div",{class:"view"},s("div",{class:"ask"},Q(e.icon,e.tone,"gi xl"),s("h3",{},e.title),s("p",{},e.text),s("div",{class:"btnrow"},s("button",{type:"button",class:"btn soft",onclick:()=>me()},_("Cancel")),t))),label:e.title,asks:!0}}function rs(e){ge(()=>{let t=s("input",{type:"text",maxlength:48,"aria-label":_("Device name"),autocomplete:"off"});t.value=e.name;let n=s("button",{class:"go",type:"submit","aria-label":_("Save")},W("check"));t.addEventListener("input",()=>n.classList.toggle("ready",!!t.value.trim()&&t.value.trim()!==e.name));let r=s("form",{class:"field",autocomplete:"off"},t,n);r.addEventListener("submit",i=>{i.preventDefault();let l=t.value.trim();!l||l===e.name||Ze(n,async()=>{try{let m=await fe(`devices/${e.id}`,{action:"rename",name:l});Me(m.state),tt(()=>{_e(),ke(_("Renamed"))}),me()}catch(m){ke(m.message,!0)}})}),setTimeout(()=>t.select(),60);let o=N(_("Rename %s"),e.name);return{el:s("div",{class:"view"},Ee(o),r),label:o}})}function Yn(e){var n;if(xt())return;let t=((n=pe())==null?void 0:n.here)===e.id;ge(()=>ns({icon:"refresh",tone:"orange",title:N(_("Reconnect %s?"),e.name),text:t?_("It gets new keys. This device is connected through its current settings: it disconnects a few seconds after you confirm. Add the new ones that open next."):_("It gets new keys and its current settings stop working. Set it up again with the new ones that open next."),action:_("Reconnect"),cls:"accent",run:async()=>{var r;try{let o=await fe(`devices/${e.id}`,{action:"reconnect"});Me(o.state),_e(),await gn((r=o.state.person.devices.find(i=>i.id===e.id))!=null?r:{...e,handshake:0},o.config)}catch(o){ke(o.message,!0)}}}))}function os(e){ge(()=>ns({icon:"trash",tone:"red",title:N(_("Remove %s?"),e.name),text:_("Its connection stops working at once. You can add it again later."),action:_("Remove"),cls:"red",run:async()=>{try{let t=await fe(`devices/${e.id}`,{action:"delete"});Me(t.state),tt(()=>{let n=document.querySelector(`.dev[data-id="${CSS.escape(e.id)}"]`),r=()=>{_e(),ke(_("Device removed"))};if(!n)return r();$(n,[{opacity:1,transform:"none",filter:"none"},{opacity:0,transform:"scale(.9)",filter:"blur(6px)"}],{duration:220,easing:Z,fill:"forwards"}).onfinish=r}),me()}catch(t){ke(t.message,!0)}}}))}var jn=(e,t)=>e.access!=="internet"&&e.state==="active"&&!t.disabled;function mi(e,t){return e.disabled?["",_("Disabled")]:e.config_stale&&e.handshake?["warn-t",_("Settings changed")]:e.online&&t.state==="quota"?["warn-t",_("Connected, no data left")]:e.online&&t.state==="hours"?["warn-t",_("Connected, outside your hours")]:e.online?["ok-t",_("Connected")]:e.handshake?["",N(_("Last connected %s"),wr(e.handshake,ct()))]:["warn-t",_("Not set up yet")]}function gi(e,t){return[...jn(t.person,e)?[{label:_("Copy IP address"),icon:"copy",run:()=>he(e.address,_("IP address copied"))},...e.hostname?[{label:_("Copy local address"),icon:"home",run:()=>he(e.hostname,_("Address copied"))}]:[],null]:[],...e.disabled?[]:[{label:_("Rename"),icon:"edit",run:()=>rs(e)},{label:_("Reconnect"),icon:"refresh",tone:"warn",run:()=>Yn(e)},{label:_("Remove"),icon:"trash",tone:"bad",run:()=>os(e)}]]}function vi(e){return e===0?_("Today"):e===1?_("Yesterday"):Se(it(Ne(),-e)).toLocaleDateString(Ce(),{weekday:"short",day:"numeric",month:"short"})}function yi(e,t){let n=So(e.spark),r=s("span",{class:"use-lbl"},_("Last 7 days")),o=hn(e.id);o.set(n);let i;if(t)i=s("button",{type:"button",class:"upd-pill","aria-label":_("Update the connection"),title:_("Its settings changed: update the connection"),onclick:()=>Yn(e)},W("refresh"),s("span",{},_("Update")));else{let l=fn(e.spark,"bars-week",34);i=l.el,l.cols.forEach((m,g)=>{let f=e.spark.length-1-g;m.addEventListener("pointerenter",()=>{Pe(r,vi(f)),o.set(e.spark[g])}),m.addEventListener("pointerleave",()=>{Pe(r,_("Last 7 days")),o.set(n)})})}return s("div",{class:"dev-use"},s("div",{class:"use-txt"},r,s("span",{class:"use-val"},o.el)),i)}function bi(e,t){let n=t.person,r=!!t.locked,o=t.here===e.id,[i,l]=o?["here-t",_("This device")]:mi(e,n),m=!e.handshake&&!e.disabled,g=e.config_stale&&!m&&!r&&!e.disabled,f=!o&&e.handshake&&!e.online&&!e.disabled&&!e.config_stale?new Date(e.handshake*1e3).toLocaleString(Ce()):g?_("Settings changed, update needed"):l,E=gi(e,t),x=r||!E.length?null:s("button",{type:"button",class:"knob more","aria-label":N(_("%s options"),e.name),"aria-haspopup":"menu","aria-expanded":"false"},W("more"));return x==null||x.addEventListener("click",()=>on(x,E)),s("article",{class:`dev${o?" is-here":""}${e.disabled?" off":""}`,"data-id":e.id},s("div",{class:"dev-top"},Q(e.kind,o?"blue":"grey"),s("div",{class:"dev-id"},s("span",{class:"dev-name","data-t":`${e.id}:name`},e.name),s("span",{class:`dev-stat ${i}`,title:f,"data-t":`${e.id}:stat`},l)),x),m&&r?null:m?s("button",{type:"button",class:"btn tint block setup-btn","aria-label":N(_("Set up %s"),e.name),onclick:b=>mn(e,b.currentTarget)},W("qr"),s("span",{},_("Connect"))):yi(e,g))}var xi=e=>s("div",{class:"dev first","data-id":"first"},Q("plus","blue"),s("b",{},_("Add your first device")),s("p",{},_("Two steps, about a minute: get the app, then add the connection.")),s("button",{type:"button",class:"btn accent block",onclick:Bt},W("plus"),s("span",{},e?_("Add this phone"):_("Add this device")))),wi=()=>s("button",{type:"button",class:"dev add","data-id":"add",onclick:Bt},Q("plus"),s("span",{},_("Add device")));function ss(){return s("section",{class:"devices",id:"devices","aria-label":_("Your devices")},s("div",{class:"sec-head"},s("h2",{},_("Your devices")),s("span",{class:"aside num"})),s("div",{class:"dgrid"}),s("p",{class:"note-s limit",hidden:!0}))}function is(e,t,n={}){let r=t.person,o=e.querySelector(".dgrid"),i=o.childElementCount>0,l=new Map([...o.querySelectorAll("[data-id]")].map(D=>[D.dataset.id,D.getBoundingClientRect()])),m=Zt(o),f=qt(r.devices).sort((D,d)=>+(d.id===t.here)-+(D.id===t.here)).map(D=>bi(D,t)),E=t.locked?0:Math.max(0,r.device_limit-r.devices.length),x=matchMedia("(max-width: 959px)").matches||/Android|iPhone|iPad/.test(navigator.userAgent);!r.devices.length&&E?f.push(xi(x)):t.can_add&&!t.locked&&f.push(wi()),o.classList.toggle("empty",!r.devices.length),o.replaceChildren(...f);for(let D of f){let d=l.get(D.dataset.id),v=D.getBoundingClientRect();D.dataset.id===n.pop?$(D,[{opacity:0,transform:"scale(.9)",filter:"blur(6px)"},{opacity:1,transform:"none",filter:"none"}],{duration:Te.duration,easing:Te.easing}):d&&(d.left!==v.left||d.top!==v.top)?$(D,[{transform:`translate(${d.left-v.left}px, ${d.top-v.top}px)`},{transform:"none"}],{duration:q.duration,easing:q.easing}):!d&&i&&$(D,[{opacity:0,transform:"scale(.9)",filter:"blur(6px)"},{opacity:getComputedStyle(D).opacity,transform:"none",filter:"none"}],{duration:q.duration,delay:60,easing:q.easing,fill:"backwards"}),D.dataset.id===n.flash&&D.animate([{boxShadow:"inset 0 0 0 1.5px var(--ok)"},{boxShadow:"inset 0 0 0 1.5px transparent"}],{duration:1800,easing:"ease-out"})}i&&en(o,m);let b=e.querySelector(".sec-head .aside"),O=N(_("%s of %s"),we(r.devices.length),we(r.device_limit));i?ee(b,O):b.textContent=O,b.classList.toggle("warn-t",r.devices.length>r.device_limit);let H=e.querySelector(".limit"),P=H.hidden,R=t.can_add||!!t.locked;if(H.textContent=ze(r.device_limit,"You have reached your limit of %s device. Remove one to add another.","You have reached your limit of %s devices. Remove one to add another."),H.getAnimations().forEach(D=>D.cancel()),i&&!P&&R){let D=$(H,[{opacity:1,filter:"none"},{opacity:0,filter:"blur(4px)"}],{duration:200,easing:Z,fill:"forwards"});D.onfinish=()=>{H.hidden=!0,D.cancel()}}else H.hidden=R,i&&P&&!R&&$(H,[{opacity:0,transform:"translateY(6px)",filter:"blur(4px)"},{opacity:1,transform:"none",filter:"none"}],{duration:420,easing:j})}var Qn=e=>s("p",{class:"desc"},e),yn=(e,t)=>`${(e/t*100).toFixed(2)}%`,as=e=>Se(e).toLocaleDateString(Ce(),{day:"numeric",month:"short"});function Mi(e){let t=(n,r,o,i)=>s("div",{class:`reach-tile${n?"":" off"}`},Q(r,n?"blue":"grey","gi rt-ic"),s("b",{},o),s("span",{class:"rt-sub"},n?i:_("Not included")),s("span",{class:"rt-mark","aria-label":n?_("Included"):_("Not included")},W(n?"check":"minus")));return s("div",{class:"reach2"},t(e!=="internet","home",_("Home network"),_("Devices at home")),t(e!=="lan","globe",_("Internet"),_("Through the router")))}function ki(e,t){let n=qt(e.devices).filter(m=>m.hostname&&jn(e,m));if(!n.length)return[];let r=n[0].hostname,o=r.indexOf("."),i=o>0?r.slice(o):"",l=s("span",{class:"mono"},`${_("name")}${i}`);return[s("span",{class:"lbl-s"},...st(t?_("Devices at home and on this VPN reach yours as %s"):_("Other devices at home reach yours as %s"),l)),s("div",{class:"names"},n.map(m=>{let g=m.hostname.indexOf(".");return s("button",{type:"button",class:"namechip",title:m.name,"aria-label":N(_("Copy %s"),m.hostname),onclick:f=>he(m.hostname,_("Address copied"),f.currentTarget)},s("span",{},g>0?[m.hostname.slice(0,g),s("span",{class:"faint"},m.hostname.slice(g))]:m.hostname),W("copy"))}))]}function Ci(e){let t=2*Math.PI*6,n=e>=100?" bad":e>=90?" warn":"";return Be(``)}function _i(e){let t=s("i",{class:e>=100?"bad":e>=90?"warn":""});return t.style.width=`${e.toFixed(1)}%`,s("div",{class:"meter"},t)}function Ei(e,t,n){let{days:r,day:o}=Eo(Ne()),i=Array.from({length:o},(H,P)=>{var R,D;return(D=(R=e.month_days)==null?void 0:R[P])!=null?D:[0,0]}),l=H=>as(`${Ne().slice(0,8)}${String(H).padStart(2,"0")}`),m=hn("m"),g=e.quota_limit?N(_("%s left"),Re(Math.max(0,e.quota_limit-t))):_("No limit"),f=s("span",{class:"num","data-t":"m-left"},g),E=(H,P)=>{m.set(H),Pe(f,P?l(P):g),f.classList.toggle("bad-t",!P&&e.state==="quota")};E(e.month);let x=fn(i,"bars-month",64,r-o);x.cols.forEach((H,P)=>{H.addEventListener("pointerenter",()=>E(i[P],P+1)),H.addEventListener("pointerleave",()=>E(e.month))});let b=s("span",{class:"td"},_("Today"));b.style.left=yn(o-.5,r);let O=s("div",{class:"month-axis"},s("span",{class:o<=4?"hide":""},l(1)),b,s("span",{class:o>=r-3?"hide":""},l(r)));return s("div",{class:"month"},x.el,O,s("div",{class:"month-read"},m.el,f),e.quota_limit?_i(n):null)}function Ti(e,t){let n=l=>Se(l).toLocaleDateString(Ce(),{weekday:"short",day:"numeric",month:"short"}),r=Array.from({length:7},(l,m)=>new Date(2024,0,1+m,12).toLocaleDateString(Ce(),{weekday:"narrow"})),o=ko(Ne(),e.expires),i=o?s("div",{class:"cal","aria-hidden":"true"},s("div",{class:"cal-h"},r.map(l=>s("span",{},l))),s("div",{class:"cal-g"},o.map((l,m)=>{let g=s("i",{class:l.kind,title:n(l.day)});return g.style.setProperty("--i",String(m)),g}))):null;return s("div",{class:`until${wt(e,t)?" soon":""}`},s("div",{class:"until-num"},s("b",{class:"num"},we(t)),s("span",{},N_(t,"day left","days left")),s("span",{class:"until-sub"},N(_("Ends %s"),n(e.expires)))),i)}function Li(e,t){let n=-new Date().getTimezoneOffset(),r=un(e,t,n);if(!r)return null;let o=_o(ct(),r.yours?n:t!=null?t:n),i=Co(r),l=i.some(([f,E])=>o>=f&&os("span",{},f))))}function Ai(e,t=1){let n=e.person,r=n.quota_used||n.month[0]+n.month[1],o=n.quota_limit?Math.min(100,r/n.quota_limit*100):0,i=n.quota_period==="total"&&!!n.quota_gb,l=Ut(n.expires,Ne()),m=n.expires?s("span",{class:"until-val"},s("span",{class:"num","data-t":"until-date"},as(n.expires)),l!=null?s("span",{class:`num ${l<0?"bad-t":wt(n,l)?"warn-t":"ok-t"}`,"data-t":"until-left"},l>=0?ze(l,"%s day","%s days"):_("ended")):null):s("span",{},_("No end date")),g=[n.expires?l!=null&&l<0?Qn(N(_("It ended on %s."),zt(n.expires))):Ti(n,l!=null?l:0):null,n.hours?Li(n.hours,e.tz_offset):null];return Ye([{icon:Q(n.access==="internet"?"globe":n.access==="lan"?"home":"shield"),title:kr(n.access),body:[Mi(n.access),...ki(n,!!e.server.device_mesh)]},{icon:Q("chart"),title:i?_("Data used"):_("Data this month"),val:s("span",{class:"data-val"},n.quota_limit?Ci(o):null,s("span",{class:"num","data-t":"data-val"},`${Re(r)} ${n.quota_limit?`/ ${Re(n.quota_limit)}`:`· ${_("no limit")}`}`)),valHide:!0,body:[i?Qn(N(_("%s of %s in total."),Re(r),Re(n.quota_limit))):Ei(n,r,o),Qn(n.quota_limit?i?_("A total for your whole access, it does not reset."):_("Resets on the 1st."):_("No data limit. The count starts again on the 1st."))]},{icon:Q("calendar"),title:_("Access until"),val:m,valHide:!!n.expires&&(l!=null?l:0)>=0,body:g}],{open:t})}function ls(){return s("section",{class:"access",id:"access","aria-label":_("Your access")},s("div",{class:"sec-head"},s("h2",{},_("Your access"))),s("div",{class:"acc-slot"}))}var vn=null;function cs(e,t){let n=Ai(t,vn?vn.openIndex():1),r=Zt(e);e.querySelector(".acc-slot").replaceChildren(n.el),vn&&en(e,r),vn=n}yr(document.documentElement);var bn=document.getElementById("app"),Oe=null,Jn=!1,xn=()=>{};function ds(){let e=[...bn.querySelectorAll(".crumbs, .notice, .sec-head, .dgrid > *, .note-s:not([hidden]), .acc-slot .acc-row, .gone")].map(n=>({el:n,at:n.getBoundingClientRect()})).sort((n,r)=>Math.round(n.at.top)-Math.round(r.at.top)||n.at.left-r.at.left).map(n=>n.el),t=e.map(n=>getComputedStyle(n).opacity);e.forEach((n,r)=>$(n,[{opacity:0,transform:"translateY(10px)",filter:"blur(4px)"},{opacity:t[r],transform:"none",filter:"none"}],{duration:520,delay:60+r*40,easing:j,fill:"backwards"})),bn.querySelectorAll(".logo .sun").forEach(n=>$(n,[{transform:"translateY(7px)"},{transform:"none"}],{duration:900,delay:150,easing:j,fill:"backwards"})),Jn=!0}function Xn(e={}){let t=pe();if(!t)return;if(xn=Xn,t.person.state==="paused"){document.title=Je();let[r,o,i]=qn(t.person);return Zn(r,o,i,!1,"orange")}let n=zn(bn);Un(!1),Kn(),document.title=Je(),Oe||(Oe={notice:s("div",{class:"notice-slot"}),devices:ss(),access:ls()},We(n,Oe.notice,s("div",{class:"cols"},Oe.devices,Oe.access))),We(Oe.notice,Lo(t.person)),is(Oe.devices,t,e),cs(Oe.access,t),Jn||ds()}Ur(Xn);function Zn(e,t,n,r=!1,o="grey"){Oe=null;let i=zn(bn);Un(!0),Kn(r,!0),We(i,s("div",{class:"gone"},Q(e,o),s("h1",{},t),s("p",{},n))),Jn||ds()}function er(){Me(null),me(!0),xn=er,Zn("key",_("This link no longer works"),_("Ask for a new one."),!0)}function us(e){xn=()=>us(e),Zn("server",_("The page could not load"),e)}function ps(){let e=pe(),t=Or(location.hash),n=Rr(location.hash);if(!e||!t&&!n)return;if(history.replaceState(null,"",location.pathname+location.search),n)return Bt();let r=e.person.devices.find(o=>o.id===t);r&&!r.handshake&&!r.disabled&&!e.locked&&mn(r)}addEventListener("hashchange",ps);async function Si(){try{Me(await fe("state")),!He()&&!At()&&Xn(),ps()}catch(e){jt(e)?er():pe()||us(e.message)}}fr(()=>{De(!0),Oe=null,xn()});document.addEventListener("keydown",e=>{e.key==="Escape"&&(At()?De(!0):He()&&me(!0))});!at||!Ir?er():Si();})(); +`,Oo(x,t)]:[Oo(x,t)]));r();let o=!!Xe(e.filename,e.conf),i=W("key"),l=s("span",{},_("Show key")),m=s("button",{type:"button",class:"btn soft sm",onclick:()=>{t=!t,i=$n(i,t?"x":"key"),ee(l,t?_("Hide key"):_("Show key")),r(),n.querySelectorAll(".mask, .secret").forEach(x=>$(x,[{filter:"blur(4px)",opacity:.4},{filter:"none",opacity:1}],{duration:320,easing:j}))}},i,l),g=s("button",{type:"button",class:"btn soft sm",onclick:x=>he(e.conf,_("Configuration copied"),x.currentTarget)},W("copy"),s("span",{class:"lbl"},_("Copy"))),f=s("div",{class:"filecard"},s("div",{class:"fc-row"},s("span",{class:"filecard-ic"},".conf"),s("span",{class:"t"},s("span",{class:"mono"},e.filename),s("span",{},_("For computers and routers")))),s("button",{type:"button",class:"btn accent sm block",onclick:()=>Tt(e.filename,e.conf)},W(o?"open":"download"),s("span",{},o?_("Share file"):_("Download")))),E=Ye([{icon:Q("file"),title:_("Configuration"),body:[s("div",{class:"confbar"},m,g),n]}],{inset:!0});return s("div",{class:"step-box"},f,E.el)}function Ko(e){let t=s("span",{class:"osm-p"},ce[e]),n=uo(Ct(e,"ios"),Ct(e,"android"));return{el:s("span",{class:"scanline"},s("span",{},...st(_("In %s:"),t)),n.el),set(r){ee(t,ce[r],void 0,{whole:!0}),n.set(Ct(r,"ios"),Ct(r,"android"))}}}function Uo(e){let t=s("span",{class:"tt"}),n=s("span",{class:"tt-m"}),r=s("span",{class:"hp-tip","aria-hidden":"true"},t,n),o=s("button",{type:"button",class:"hp-b",onclick:()=>Tt(e().file,e().text)},W("download")),i=s("button",{type:"button",class:"hp-b"},W("copy")),l=s("div",{class:"hpill",role:"group","aria-label":_("The connection"),"data-key":"conn"},o,i,r),m=null,g=0,f=0,E=a=>{var h;return a===i&&i.classList.contains("done")?_("Copied"):(h=a.getAttribute("aria-label"))!=null?h:""},x=(a,h)=>{n.textContent=h;let p=n.offsetWidth+20;return Math.min(a.offsetLeft+a.offsetWidth/2,l.offsetWidth+46-p/2)},b=a=>`translateX(${a}px) translateX(-50%)`,O=a=>{let h=getComputedStyle(r).transform;r.getAnimations().forEach(p=>p.cancel()),r.style.transform=b(a),$(r,[{transform:h},{transform:b(a)}],{duration:U.duration,easing:U.easing})},H=a=>ee(t,a),P=a=>{if(clearTimeout(g),m===a&&r.classList.contains("on"))return;if(m=a,r.classList.contains("on")){let p=E(a);return O(x(a,p)),H(p)}let h=()=>{let p=E(a);Pe(t,p);let A=x(a,p);r.getAnimations().forEach(u=>u.cancel()),r.style.transform=b(A),r.classList.add("on"),$(r,[{opacity:0,transform:`${b(A)} translateY(-3px) scale(.96)`,filter:"blur(3px)"},{opacity:1,transform:b(A),filter:"blur(0px)"}],{duration:220,easing:j})};performance.now(){clearTimeout(g),m=null,r.classList.contains("on")&&(f=performance.now()+500,r.classList.remove("on"),$(r,[{opacity:1},{opacity:0}],{duration:120,easing:"ease-out"}))};for(let a of[o,i])a.addEventListener("pointerenter",h=>{h.pointerType==="mouse"&&P(a)}),a.addEventListener("focus",()=>{a.matches(":focus-visible")&&P(a)}),a.addEventListener("blur",B);l.addEventListener("pointerleave",B);let D=a=>{let h=W(a);i.querySelector("svg").replaceWith(h),$(h,[{opacity:0,transform:"scale(.6)",filter:"blur(3px)"},{opacity:1,transform:"none",filter:"none"}],{duration:xe.duration,easing:xe.easing})},d=()=>{if(m!==i||!r.classList.contains("on"))return;let a=E(i);O(x(i,a)),H(a)},v=0;return i.addEventListener("click",()=>{let a=e();he(a.text,a.msg),clearTimeout(v),i.classList.contains("done")||(i.classList.add("done"),D("check"),d()),v=window.setTimeout(()=>{i.classList.remove("done"),D("copy"),d()},1600)}),{el:l,sync(){let a=e().app;o.setAttribute("aria-label",N(_("Download %s config"),a)),i.setAttribute("aria-label",N(_("Copy %s config"),a))}}}function Vo(e){let t=s("b",{},_("Waiting for the connection")),n=s("span",{class:"ws",hidden:!0}),r=s("div",{class:"way",role:"status","aria-live":"polite"},s("div",{class:"way-row"},s("span",{class:"way-end"},W(e.kind)),s("span",{class:"way-track"},s("span",{class:"way-glow"},s("i")),s("span",{class:"way-fill"})),s("span",{class:"way-end home"},W("server"))),s("div",{class:"way-text"},s("span",{class:"t"},t,n)));return{el:r,connected(){r.classList.add("done"),ee(t,N(_("%s connected"),e.name))},gaveUp(){r.classList.add("stopped"),ee(t,_("No connection yet")),n.textContent=_("Close this and open it again to keep checking."),n.hidden=!1,$(t.parentElement,[{opacity:0,filter:"blur(4px)"},{opacity:1,filter:"none"}],{duration:280,easing:j})}}}function Yo(e,t=4){window.setTimeout(async()=>{var n;try{let r=await fe("state");Me(r),At()||_e(),!((n=r.person.devices.find(o=>o.id===e))!=null&&n.online)&&t>1&&Yo(e,t-1)}catch{}},1500)}function jo(e,t,n){let r=ct(),o=0,i=0,l=!1,m=Date.now(),g=async()=>{if(o=0,!l){if(Date.now()-m>6e5){l=!0,n();return}if(document.hidden)return f();try{let x=await fe("state");Me(x);let b=x.person.devices.find(O=>O.id===e.id);if(b&&b.handshake>r){l=!0,t(),b.online||Yo(e.id);return}}catch(x){if(jt(x)){l=!0;return}}i++,f()}},f=()=>{!l&&!o&&(o=window.setTimeout(g,i<6?5e3:i<12?15e3:3e4))},E=()=>{!document.hidden&&!l&&!o&&g()};return document.addEventListener("visibilitychange",E),f(),()=>{l=!0,o&&clearTimeout(o),document.removeEventListener("visibilitychange",E)}}var Fo=e=>new Promise(t=>setTimeout(t,e));async function Qo(e,t,n){e.connected(),bo(),xo(),await Fo(400),Wn(e.el)&&(t.style.overflow="hidden",$(t,[{height:`${t.offsetHeight}px`,opacity:1,filter:"none"},{height:"0px",opacity:0,filter:"blur(4px)"}],{duration:520,easing:j,fill:"forwards"}),$(e.el,[{marginBottom:"18px"},{marginBottom:"0px"}],{duration:520,easing:j,fill:"forwards"}),await Fo(2400),Wn(e.el)&&(tt(()=>_e({flash:n.id})),me()))}async function li(e){try{return await fe(`devices/${e.id}/config`)}catch(t){return t instanceof Ke&&t.httpsUrl?$t(t.httpsUrl):ke(t.message,!0),null}}async function mn(e,t){if(xt())return;let n=async()=>{let r=await li(e);if(!r)return;let o=await Fn(r,r.server);ge(()=>Xo(e,r,o))};t instanceof HTMLButtonElement?await Ze(t,n):await n()}async function gn(e,t){let n=await Fn(t,t.server);ln(()=>Xo(e,t,n))}function Jo(e,t,n){return s("div",{class:"step"},s("span",{class:"step-n"},e),s("div",{class:"step-b"},typeof t=="string"?s("span",{class:"step-t"},t):t,n))}function ci(e,t,n){let r=e.hidden?0:e.getBoundingClientRect().height;if(e.getAnimations().forEach(m=>m.cancel()),n){e.hidden=t;return}e.style.overflow="hidden",e.hidden=!1;let o=t?0:e.getBoundingClientRect().height,[i,l]=t?[1,0]:[0,1];$(e,[{height:`${r}px`,opacity:i,filter:`blur(${4-i*4}px)`},{height:`${o}px`,opacity:l,filter:`blur(${4-l*4}px)`}],{duration:U.duration,easing:U.easing}).onfinish=()=>{e.style.overflow="",e.hidden=t}}function Xo(e,t,n){var Y,te;let r=Yt(),o=Lr(Gr()),i=e.kind==="phone"||e.kind==="tablet",l=e.kind==="router",m=Tr(e.kind,r),g=m?"same":l?"router":i?"away":"pc-away",f=En(e.kind),E=En(e.kind,!0),x=o.filter(se=>!l||se.id!=="vpn"),b=(Y=No(e))!=null?Y:l?"awg":"vpn";x.some(se=>se.id===b)||(b=x[0].id);let O={d:e,cfg:t,key:n,pf:r,there:f,app:()=>b,same:()=>m},H=[],P=()=>{if(x.length<2)return null;let se=$o(x.map(ne=>({value:ne.id,label:ne.name,icon:Ro[ne.id]})),b,ne=>{b=ne,Io(e,ne),H.forEach(Bt=>Bt.sync(ne)),yo(c)});return H.push(se),se.el},B=s("span",{class:"step-t"}),D=s("div",{class:"step-box"}),d=s("div",{class:"step-box"}),v=s("div",{class:"step-box"}),a=s("div",{class:"step-box"}),h=null,p=null,A=null,u=g==="away"?Uo(()=>({...b==="vpn"?{text:n,msg:_("Key copied"),file:kt(t.filename)}:{text:t.conf,msg:_("Configuration copied"),file:t.filename},app:ce[b]})):null;function c(){ee(B,l?N(_("Get %s on the router"),ce[b]):N(_("Get %s"),ce[b]),void 0,{whole:!0}),tn(D,Go(b,r,l)),l?d.firstChild||We(d,qo(t)):tn(d,Wo(O));let se=b==="vpn"?Po(n):t.conf;h&&p&&h.el.isConnected?A!==b&&(h.swap(se),p.set(b)):(p=Ko(b),h=Rn(se,[p.el]),v.replaceChildren(h.el)),A=b,tn(a,zo(O)),u==null||u.sync()}c();let T=Hr(lt(),e.id),w=()=>[i?Rn(T,[s("span",{},_("Point its camera at the code: the link opens there."))]).el:s("p",{class:"desc"},N(_("Open this link on the %s to set it up there."),E)),pt(T)],C=()=>Jo("1",B,[P(),D]),I=()=>Jo("2",l?_("Import the configuration"):_("Add the connection"),[d]),G=s("div",{class:"setup"});if(Er(navigator.userAgent)&&G.appendChild(pn("warn","shield",null,_("Open this page in Safari or Chrome: the store opens from here, but the app handoff does not."))),g==="same"){let se=s("div",{class:"steps-wrap"},s("div",{class:"steps-gap"}),C(),I()),ne=Ye([{icon:Q("link"),title:N(_("Not on the %s right now?"),E),body:w()}],{inset:!0,onToggle:(Bt,M,k)=>ci(se,M,k)});G.append(ne.el,se)}else g==="router"?G.append(C(),I()):g==="away"?G.appendChild(Ye([{icon:Q("link"),title:N(_("Open your link on the %s"),E),body:w()},{icon:Q("app"),title:_("Already has the app"),body:[P(),v]}],{inset:!0,open:1}).el):G.appendChild(Ye([{icon:Q("link"),title:N(_("Open your link on the %s"),E),body:w()},{icon:Q("key"),title:_("Copy or save the connection"),body:[P(),a]}],{inset:!0,open:0}).el);let V=Vo(e),J=!1;go(jo(e,()=>{J||(J=!0,Qo(V,G,e))},V.gaveUp)),tt(()=>_e());let re=g==="same"?_("Two steps, about a minute"):l?_("The packages and the file for OpenWrt"):N(_("The app goes on the %s."),f),le=N(_("Set up %s"),e.name);return{el:s("div",{class:"view"},Ee(le,{acts:!!u}),Ge(re),V.el,G),label:le,acts:(te=u==null?void 0:u.el)!=null?te:null}}var ve=navigator.userAgent,ts=/iPad/.test(ve)||/Macintosh/.test(ve)&&navigator.maxTouchPoints>1;function Ot(){return ts||/Tablet/i.test(ve)||/Android/.test(ve)&&!/Mobile/.test(ve)?"tablet":/Android|iPhone|Mobile/i.test(ve)?"phone":"computer"}var di=[[/^SM-S93/,"Galaxy S25"],[/^SM-S92/,"Galaxy S24"],[/^SM-S91/,"Galaxy S23"],[/^SM-S90/,"Galaxy S22"],[/^SM-G99/,"Galaxy S21"],[/^SM-F9/,"Galaxy Z Fold"],[/^SM-F7/,"Galaxy Z Flip"],[/^SM-A5/,"Galaxy A5x"],[/^SM-A3/,"Galaxy A3x"],[/^SM-X/,"Galaxy Tab"]],Vn="",ui=(async()=>{var t;let e=navigator.userAgentData;if(!e||!/Android/.test(ve))return"";try{let n=((t=(await e.getHighEntropyValues(["model"])).model)!=null?t:"").trim();if(!n||n==="K")return"";let r=di.find(([o])=>o.test(n));Vn=r?`${r[1]} (${n})`:/^SM-/.test(n)?`Galaxy ${n}`:n}catch{}return Vn})();function pi(e){return/iPhone/.test(ve)?"iPhone":ts?"iPad":/Android/.test(ve)?Vn||(e==="tablet"?_("Android tablet"):_("Android phone")):/CrOS/.test(ve)?"Chromebook":/Mac OS X/.test(ve)?"Mac":/Windows/.test(ve)?_("Windows PC"):/Linux/.test(ve)?_("Linux PC"):Kt(e)}var Zo=e=>e==="mobile"?_("Mobile"):Kt(e),Ht=e=>e==="phone"||e==="tablet"?"mobile":e,es=e=>e!=="mobile"?e:Ot()==="tablet"?"tablet":"phone";function Rt(){let e=pe();if(!(!e||e.locked)){if(!e.can_add)return ke(ze(e.person.device_limit,"You have reached your limit of %s device","You have reached your limit of %s devices"),!0);xt()||ge(fi)}}function fi(){let e=pe(),t=e.person,n=["computer","mobile","router","other"].filter(d=>e.kinds.some(v=>Ht(v)===d)),r=n.includes(Ht(Ot()))?Ht(Ot()):n[0],o=!1,i=new Set(t.devices.map(d=>d.name.toLowerCase())),l=d=>{let v=d===Ht(Ot())?pi(es(d)):Kt(d==="mobile"?"phone":d);if(!i.has(v.toLowerCase()))return v;for(let a=2;a<20;a++)if(!i.has(`${v} ${a}`.toLowerCase()))return`${v} ${a}`;return v},m=s("div",{class:"kinds",role:"radiogroup","aria-label":_("What is it?")});m.style.setProperty("--n",String(n.length));let g=n.map(d=>{let v=s("button",{type:"button",class:"kind",role:"radio","aria-label":Zo(d),onclick:()=>O(d)},s("span",{class:"kind-tile"},Q(d,"blue")),s("span",{class:"kind-lbl"},Zo(d)));return m.appendChild(v),v}),f=s("input",{type:"text",maxlength:48,required:!0,"aria-label":_("Name"),autocomplete:"off"}),E=s("button",{class:"go ready",type:"submit","aria-label":_("Create connection")},W("arrow")),x=s("p",{class:"hint bad-t",hidden:!0}),b=d=>{if(!x.hidden)return ee(x,d);x.textContent=d,x.hidden=!1,$(x,[{opacity:0,transform:"translateY(-4px)"},{opacity:1,transform:"none"}],{duration:220,easing:j})};f.value=l(r),f.addEventListener("input",()=>{o=!0,E.classList.toggle("ready",!!f.value.trim()),x.hidden=!0}),ui.then(()=>{!o&&r===Ht(Ot())&&(f.value=l(r))});function O(d){r=d,g.forEach((v,a)=>{let h=n[a]===d;v.classList.toggle("on",h),v.setAttribute("aria-checked",String(h))}),o||(f.value=l(d),E.classList.add("ready"))}O(r);let H=s("form",{class:"field",autocomplete:"off"},f,E);H.addEventListener("submit",d=>{d.preventDefault();let v=f.value.trim();if(v){if(i.has(v.toLowerCase()))return b(_("You already have a device with this name."));Ze(E,async()=>{try{let a=await fe("devices",{name:v,kind:es(r)});Me(a.state),_e({pop:a.id});let h=a.state.person.devices.find(p=>p.id===a.id);await gn(h,a.config)}catch(a){if(a instanceof Ke&&a.httpsUrl)return $t(a.httpsUrl);b(a.message)}})}});let P=s("button",{type:"button",class:"btn soft block",onclick:()=>ln(hi)},W("qr"),s("span",{},_("Add it from the device"))),B=t.device_limit-t.devices.length,D=s("div",{class:"view"},Ee(_("Add a device")),Ge(N(N_(t.device_limit,"%s of %s slot free","%s of %s slots free"),we(B),we(t.device_limit))),m,Ve(_("Phones and tablets get a smaller packet size that suits mobile networks.")),H,x,s("div",{class:"or"},_("OR")),P);return D.querySelector(".hint").classList.add("kinds-note"),{el:D,label:_("Add a device")}}function hi(){let e=Rr(lt());return{el:s("div",{class:"view"},Ee(_("Open on the device"),{back:!0}),Ge(_("Point its camera at the code: your page opens there with this device ready to add.")),Lt(e,!0),pt(e)),label:_("Open on the device")}}function ns(e){let t=s("button",{type:"button",class:`btn ${e.cls}`,onclick:r=>Ze(r.currentTarget,e.run)},s("span",{},e.action));return{el:s("div",{class:"view"},s("div",{class:"ask"},Q(e.icon,e.tone,"gi xl"),s("h3",{},e.title),s("p",{},e.text),s("div",{class:"btnrow"},s("button",{type:"button",class:"btn soft",onclick:()=>me()},_("Cancel")),t))),label:e.title,asks:!0}}function rs(e){ge(()=>{let t=s("input",{type:"text",maxlength:48,"aria-label":_("Device name"),autocomplete:"off"});t.value=e.name;let n=s("button",{class:"go",type:"submit","aria-label":_("Save")},W("check"));t.addEventListener("input",()=>n.classList.toggle("ready",!!t.value.trim()&&t.value.trim()!==e.name));let r=s("form",{class:"field",autocomplete:"off"},t,n);r.addEventListener("submit",i=>{i.preventDefault();let l=t.value.trim();!l||l===e.name||Ze(n,async()=>{try{let m=await fe(`devices/${e.id}`,{action:"rename",name:l});Me(m.state),tt(()=>{_e(),ke(_("Renamed"))}),me()}catch(m){ke(m.message,!0)}})}),setTimeout(()=>t.select(),60);let o=N(_("Rename %s"),e.name);return{el:s("div",{class:"view"},Ee(o),r),label:o}})}function Yn(e){var n;if(xt())return;let t=((n=pe())==null?void 0:n.here)===e.id;ge(()=>ns({icon:"refresh",tone:"orange",title:N(_("Reconnect %s?"),e.name),text:t?_("It gets new keys. This device is connected through its current settings: it disconnects a few seconds after you confirm. Add the new ones that open next."):_("It gets new keys and its current settings stop working. Set it up again with the new ones that open next."),action:_("Reconnect"),cls:"accent",run:async()=>{var r;try{let o=await fe(`devices/${e.id}`,{action:"reconnect"});Me(o.state),_e(),await gn((r=o.state.person.devices.find(i=>i.id===e.id))!=null?r:{...e,handshake:0},o.config)}catch(o){ke(o.message,!0)}}}))}function os(e){ge(()=>ns({icon:"trash",tone:"red",title:N(_("Remove %s?"),e.name),text:_("Its connection stops working at once. You can add it again later."),action:_("Remove"),cls:"red",run:async()=>{try{let t=await fe(`devices/${e.id}`,{action:"delete"});Me(t.state),tt(()=>{let n=document.querySelector(`.dev[data-id="${CSS.escape(e.id)}"]`),r=()=>{_e(),ke(_("Device removed"))};if(!n)return r();$(n,[{opacity:1,transform:"none",filter:"none"},{opacity:0,transform:"scale(.9)",filter:"blur(6px)"}],{duration:220,easing:Z,fill:"forwards"}).onfinish=r}),me()}catch(t){ke(t.message,!0)}}}))}var jn=(e,t)=>e.access!=="internet"&&e.state==="active"&&!t.disabled;function mi(e,t){return e.disabled?["",_("Disabled")]:e.config_stale&&e.handshake?["warn-t",_("Settings changed")]:e.online&&t.state==="quota"?["warn-t",_("Connected, no data left")]:e.online&&t.state==="hours"?["warn-t",_("Connected, outside your hours")]:e.online?["ok-t",_("Connected")]:e.handshake?["",N(_("Last connected %s"),wr(e.handshake,ct()))]:["warn-t",_("Not set up yet")]}function gi(e,t){return[...jn(t.person,e)?[{label:_("Copy IP address"),icon:"copy",run:()=>he(e.address,_("IP address copied"))},...e.hostname?[{label:_("Copy local address"),icon:"home",run:()=>he(e.hostname,_("Address copied"))}]:[],null]:[],...e.disabled?[]:[{label:_("Rename"),icon:"edit",run:()=>rs(e)},{label:_("Reconnect"),icon:"refresh",tone:"warn",run:()=>Yn(e)},{label:_("Remove"),icon:"trash",tone:"bad",run:()=>os(e)}]]}function vi(e){return e===0?_("Today"):e===1?_("Yesterday"):Se(it(Ne(),-e)).toLocaleDateString(Ce(),{weekday:"short",day:"numeric",month:"short"})}function yi(e){let t=So(e.spark),n=s("span",{class:"use-lbl"},_("Last 7 days")),r=hn(e.id);r.set(t);let o=fn(e.spark,"bars-week",34);return o.cols.forEach((i,l)=>{let m=e.spark.length-1-l;i.addEventListener("pointerenter",()=>{Pe(n,vi(m)),r.set(e.spark[l])}),i.addEventListener("pointerleave",()=>{Pe(n,_("Last 7 days")),r.set(t)})}),s("div",{class:"dev-use"},s("div",{class:"use-txt"},n,s("span",{class:"use-val"},r.el)),o.el)}function bi(e,t){let n=t.person,r=!!t.locked,o=t.here===e.id,[i,l]=o?["here-t",_("This device")]:mi(e,n),m=!e.handshake&&!e.disabled,g=e.config_stale&&!m&&!r&&!e.disabled,f=!o&&e.handshake&&!e.online&&!e.disabled&&!e.config_stale?new Date(e.handshake*1e3).toLocaleString(Ce()):g?_("Settings changed, update needed"):l,E=gi(e,t),x=r||!E.length?null:s("button",{type:"button",class:"knob more","aria-label":N(_("%s options"),e.name),"aria-haspopup":"menu","aria-expanded":"false"},W("more"));return x==null||x.addEventListener("click",()=>on(x,E)),s("article",{class:`dev${o?" is-here":""}${e.disabled?" off":""}`,"data-id":e.id},s("div",{class:"dev-top"},Q(e.kind,o?"blue":"grey"),s("div",{class:"dev-id"},s("span",{class:"dev-name","data-t":`${e.id}:name`},e.name),s("span",{class:`dev-stat ${i}`,title:f,"data-t":`${e.id}:stat`},l)),x),m&&r?null:m?s("button",{type:"button",class:"btn tint block setup-btn","aria-label":N(_("Set up %s"),e.name),onclick:b=>mn(e,b.currentTarget)},W("qr"),s("span",{},_("Connect"))):g?s("button",{type:"button",class:"btn tint block setup-btn","aria-label":N(_("Reconnect %s"),e.name),onclick:()=>Yn(e)},W("refresh"),s("span",{},_("Reconnect"))):yi(e))}var xi=e=>s("div",{class:"dev first","data-id":"first"},Q("plus","blue"),s("b",{},_("Add your first device")),s("p",{},_("Two steps, about a minute: get the app, then add the connection.")),s("button",{type:"button",class:"btn accent block",onclick:Rt},W("plus"),s("span",{},e?_("Add this phone"):_("Add this device")))),wi=()=>s("button",{type:"button",class:"dev add","data-id":"add",onclick:Rt},Q("plus"),s("span",{},_("Add device")));function ss(){let e=s("div",{class:"dgrid"});return Mi(e),s("section",{class:"devices",id:"devices","aria-label":_("Your devices")},s("div",{class:"sec-head"},s("h2",{},_("Your devices")),s("span",{class:"aside num"})),e,s("p",{class:"note-s limit",hidden:!0}))}function Mi(e){let t=0;new ResizeObserver(()=>{var r,o;let n=(o=(r=e.querySelector(".dev"))==null?void 0:r.getBoundingClientRect().width)!=null?o:0;Math.abs(n-t)>16&&(e.classList.add("snap"),requestAnimationFrame(()=>requestAnimationFrame(()=>e.classList.remove("snap")))),t=n}).observe(e)}function is(e,t,n={}){let r=t.person,o=e.querySelector(".dgrid"),i=o.childElementCount>0,l=new Map([...o.querySelectorAll("[data-id]")].map(D=>[D.dataset.id,D.getBoundingClientRect()])),m=Zt(o),f=Ut(r.devices).sort((D,d)=>+(d.id===t.here)-+(D.id===t.here)).map(D=>bi(D,t)),E=t.locked?0:Math.max(0,r.device_limit-r.devices.length),x=matchMedia("(max-width: 959px)").matches||/Android|iPhone|iPad/.test(navigator.userAgent);!r.devices.length&&E?f.push(xi(x)):t.can_add&&!t.locked&&f.push(wi()),o.classList.toggle("empty",!r.devices.length),o.replaceChildren(...f);for(let D of f){let d=l.get(D.dataset.id),v=D.getBoundingClientRect();D.dataset.id===n.pop?$(D,[{opacity:0,transform:"scale(.9)",filter:"blur(6px)"},{opacity:1,transform:"none",filter:"none"}],{duration:Te.duration,easing:Te.easing}):d&&(d.left!==v.left||d.top!==v.top)?$(D,[{transform:`translate(${d.left-v.left}px, ${d.top-v.top}px)`},{transform:"none"}],{duration:U.duration,easing:U.easing}):!d&&i&&$(D,[{opacity:0,transform:"scale(.9)",filter:"blur(6px)"},{opacity:getComputedStyle(D).opacity,transform:"none",filter:"none"}],{duration:U.duration,delay:60,easing:U.easing,fill:"backwards"}),D.dataset.id===n.flash&&D.animate([{boxShadow:"inset 0 0 0 1.5px var(--ok)"},{boxShadow:"inset 0 0 0 1.5px transparent"}],{duration:1800,easing:"ease-out"})}i&&en(o,m);let b=e.querySelector(".sec-head .aside"),O=N(_("%s of %s"),we(r.devices.length),we(r.device_limit));i?ee(b,O):b.textContent=O,b.classList.toggle("warn-t",r.devices.length>r.device_limit);let H=e.querySelector(".limit"),P=H.hidden,B=t.can_add||!!t.locked;if(H.textContent=ze(r.device_limit,"You have reached your limit of %s device. Remove one to add another.","You have reached your limit of %s devices. Remove one to add another."),H.getAnimations().forEach(D=>D.cancel()),i&&!P&&B){let D=$(H,[{opacity:1,filter:"none"},{opacity:0,filter:"blur(4px)"}],{duration:200,easing:Z,fill:"forwards"});D.onfinish=()=>{H.hidden=!0,D.cancel()}}else H.hidden=B,i&&P&&!B&&$(H,[{opacity:0,transform:"translateY(6px)",filter:"blur(4px)"},{opacity:1,transform:"none",filter:"none"}],{duration:420,easing:j})}var Qn=e=>s("p",{class:"desc"},e),yn=(e,t)=>`${(e/t*100).toFixed(2)}%`,as=e=>Se(e).toLocaleDateString(Ce(),{day:"numeric",month:"short"});function ki(e){let t=(n,r,o,i)=>s("div",{class:`reach-tile${n?"":" off"}`},Q(r,n?"blue":"grey","gi rt-ic"),s("b",{},o),s("span",{class:"rt-sub"},n?i:_("Not included")),s("span",{class:"rt-mark","aria-label":n?_("Included"):_("Not included")},W(n?"check":"minus")));return s("div",{class:"reach2"},t(e!=="internet","home",_("Home network"),_("Devices at home")),t(e!=="lan","globe",_("Internet"),_("Through the router")))}function Ci(e,t){let n=Ut(e.devices).filter(m=>m.hostname&&jn(e,m));if(!n.length)return[];let r=n[0].hostname,o=r.indexOf("."),i=o>0?r.slice(o):"",l=s("span",{class:"mono"},`${_("name")}${i}`);return[s("span",{class:"lbl-s"},...st(t?_("Devices at home and on this VPN reach yours as %s"):_("Other devices at home reach yours as %s"),l)),s("div",{class:"names"},n.map(m=>{let g=m.hostname.indexOf(".");return s("button",{type:"button",class:"namechip",title:m.name,"aria-label":N(_("Copy %s"),m.hostname),onclick:f=>he(m.hostname,_("Address copied"),f.currentTarget)},s("span",{},g>0?[m.hostname.slice(0,g),s("span",{class:"faint"},m.hostname.slice(g))]:m.hostname),W("copy"))}))]}function _i(e){let t=2*Math.PI*6,n=e>=100?" bad":e>=90?" warn":"";return Re(``)}function Ei(e){let t=s("i",{class:e>=100?"bad":e>=90?"warn":""});return t.style.width=`${e.toFixed(1)}%`,s("div",{class:"meter"},t)}function Ti(e,t,n){let{days:r,day:o}=Eo(Ne()),i=Array.from({length:o},(H,P)=>{var B,D;return(D=(B=e.month_days)==null?void 0:B[P])!=null?D:[0,0]}),l=H=>as(`${Ne().slice(0,8)}${String(H).padStart(2,"0")}`),m=hn("m"),g=e.quota_limit?N(_("%s left"),Be(Math.max(0,e.quota_limit-t))):_("No limit"),f=s("span",{class:"num","data-t":"m-left"},g),E=(H,P)=>{m.set(H),Pe(f,P?l(P):g),f.classList.toggle("bad-t",!P&&e.state==="quota")};E(e.month);let x=fn(i,"bars-month",64,r-o);x.cols.forEach((H,P)=>{H.addEventListener("pointerenter",()=>E(i[P],P+1)),H.addEventListener("pointerleave",()=>E(e.month))});let b=s("span",{class:"td"},_("Today"));b.style.left=yn(o-.5,r);let O=s("div",{class:"month-axis"},s("span",{class:o<=4?"hide":""},l(1)),b,s("span",{class:o>=r-3?"hide":""},l(r)));return s("div",{class:"month"},x.el,O,s("div",{class:"month-read"},m.el,f),e.quota_limit?Ei(n):null)}function Li(e,t){let n=l=>Se(l).toLocaleDateString(Ce(),{weekday:"short",day:"numeric",month:"short"}),r=Array.from({length:7},(l,m)=>new Date(2024,0,1+m,12).toLocaleDateString(Ce(),{weekday:"narrow"})),o=ko(Ne(),e.expires),i=o?s("div",{class:"cal","aria-hidden":"true"},s("div",{class:"cal-h"},r.map(l=>s("span",{},l))),s("div",{class:"cal-g"},o.map((l,m)=>{let g=s("i",{class:l.kind,title:n(l.day)});return g.style.setProperty("--i",String(m)),g}))):null;return s("div",{class:`until${wt(e,t)?" soon":""}`},s("div",{class:"until-num"},s("b",{class:"num"},we(t)),s("span",{},N_(t,"day left","days left")),s("span",{class:"until-sub"},N(_("Ends %s"),n(e.expires)))),i)}function Ai(e,t){let n=-new Date().getTimezoneOffset(),r=un(e,t,n);if(!r)return null;let o=_o(ct(),r.yours?n:t!=null?t:n),i=Co(r),l=i.some(([f,E])=>o>=f&&os("span",{},f))))}function Si(e,t=1){let n=e.person,r=n.quota_used||n.month[0]+n.month[1],o=n.quota_limit?Math.min(100,r/n.quota_limit*100):0,i=n.quota_period==="total"&&!!n.quota_gb,l=qt(n.expires,Ne()),m=n.expires?s("span",{class:"until-val"},s("span",{class:"num","data-t":"until-date"},as(n.expires)),l!=null?s("span",{class:`num ${l<0?"bad-t":wt(n,l)?"warn-t":"ok-t"}`,"data-t":"until-left"},l>=0?ze(l,"%s day","%s days"):_("ended")):null):s("span",{},_("No end date")),g=[n.expires?l!=null&&l<0?Qn(N(_("It ended on %s."),zt(n.expires))):Li(n,l!=null?l:0):null,n.hours?Ai(n.hours,e.tz_offset):null];return Ye([{icon:Q(n.access==="internet"?"globe":n.access==="lan"?"home":"shield"),title:kr(n.access),body:[ki(n.access),...Ci(n,!!e.server.device_mesh)]},{icon:Q("chart"),title:i?_("Data used"):_("Data this month"),val:s("span",{class:"data-val"},n.quota_limit?_i(o):null,s("span",{class:"num","data-t":"data-val"},`${Be(r)} ${n.quota_limit?`/ ${Be(n.quota_limit)}`:`· ${_("no limit")}`}`)),valHide:!0,body:[i?Qn(N(_("%s of %s in total."),Be(r),Be(n.quota_limit))):Ti(n,r,o),Qn(n.quota_limit?i?_("A total for your whole access, it does not reset."):_("Resets on the 1st."):_("No data limit. The count starts again on the 1st."))]},{icon:Q("calendar"),title:_("Access until"),val:m,valHide:!!n.expires&&(l!=null?l:0)>=0,body:g}],{open:t})}function ls(){return s("section",{class:"access",id:"access","aria-label":_("Your access")},s("div",{class:"sec-head"},s("h2",{},_("Your access"))),s("div",{class:"acc-slot"}))}var vn=null;function cs(e,t){let n=Si(t,vn?vn.openIndex():1),r=Zt(e);e.querySelector(".acc-slot").replaceChildren(n.el),vn&&en(e,r),vn=n}yr(document.documentElement);var bn=document.getElementById("app"),Oe=null,Jn=!1,xn=()=>{};function ds(){let e=[...bn.querySelectorAll(".crumbs, .notice, .sec-head, .dgrid > *, .note-s:not([hidden]), .acc-slot .acc-row, .gone")].map(n=>({el:n,at:n.getBoundingClientRect()})).sort((n,r)=>Math.round(n.at.top)-Math.round(r.at.top)||n.at.left-r.at.left).map(n=>n.el),t=e.map(n=>getComputedStyle(n).opacity);e.forEach((n,r)=>$(n,[{opacity:0,transform:"translateY(10px)",filter:"blur(4px)"},{opacity:t[r],transform:"none",filter:"none"}],{duration:520,delay:60+r*40,easing:j,fill:"backwards"})),bn.querySelectorAll(".logo .sun").forEach(n=>$(n,[{transform:"translateY(7px)"},{transform:"none"}],{duration:900,delay:150,easing:j,fill:"backwards"})),Jn=!0}function Xn(e={}){let t=pe();if(!t)return;if(xn=Xn,t.person.state==="paused"){document.title=Je();let[r,o,i]=Un(t.person);return Zn(r,o,i,!1,"orange")}let n=zn(bn);qn(!1),Kn(),document.title=Je(),Oe||(Oe={notice:s("div",{class:"notice-slot"}),devices:ss(),access:ls()},We(n,Oe.notice,s("div",{class:"cols"},Oe.devices,Oe.access))),We(Oe.notice,Lo(t.person)),is(Oe.devices,t,e),cs(Oe.access,t),Jn||ds()}qr(Xn);function Zn(e,t,n,r=!1,o="grey"){Oe=null;let i=zn(bn);qn(!0),Kn(r,!0),We(i,s("div",{class:"gone"},Q(e,o),s("h1",{},t),s("p",{},n))),Jn||ds()}function er(){Me(null),me(!0),xn=er,Zn("key",_("This link no longer works"),_("Ask for a new one."),!0)}function us(e){xn=()=>us(e),Zn("server",_("The page could not load"),e)}function ps(){let e=pe(),t=Or(location.hash),n=Br(location.hash);if(!e||!t&&!n)return;if(history.replaceState(null,"",location.pathname+location.search),n)return Rt();let r=e.person.devices.find(o=>o.id===t);r&&!r.handshake&&!r.disabled&&!e.locked&&mn(r)}addEventListener("hashchange",ps);async function Pi(){try{Me(await fe("state")),!He()&&!At()&&Xn(),ps()}catch(e){jt(e)?er():pe()||us(e.message)}}fr(()=>{De(!0),Oe=null,xn()});document.addEventListener("keydown",e=>{e.key==="Escape"&&(At()?De(!0):He()&&me(!0))});!at||!Ir?er():Pi();})(); diff --git a/package/luci-app-dawnline/root/usr/share/ucode/dawnline/util.uc b/package/luci-app-dawnline/root/usr/share/ucode/dawnline/util.uc index 8b87517..9cbc19d 100644 --- a/package/luci-app-dawnline/root/usr/share/ucode/dawnline/util.uc +++ b/package/luci-app-dawnline/root/usr/share/ucode/dawnline/util.uc @@ -5,7 +5,7 @@ import { open, readfile, writefile, rename, mkdir, stat, unlink, popen, lsdir } from 'fs'; import { _ } from 'dawnline.i18n'; -export const VERSION = '0.12.0'; +export const VERSION = '0.12.1'; /** GitHub repository with Dawnline releases (updates and the installer). */ export const REPO = 'tickcount/luci-app-dawnline'; export const RUN_DIR = '/var/run/dawnline'; diff --git a/web/package-lock.json b/web/package-lock.json index 2bf8cb7..bd07199 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -1,12 +1,12 @@ { "name": "dawnline-web", - "version": "0.12.0", + "version": "0.12.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dawnline-web", - "version": "0.12.0", + "version": "0.12.1", "license": "MIT", "dependencies": { "qrcode-generator": "1.4.4" diff --git a/web/package.json b/web/package.json index 96237b4..e302ca7 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "dawnline-web", - "version": "0.12.0", + "version": "0.12.1", "private": true, "license": "MIT", "type": "module", diff --git a/web/src/portal/i18n/portal.pot b/web/src/portal/i18n/portal.pot index 18cc529..ff33e62 100644 --- a/web/src/portal/i18n/portal.pot +++ b/web/src/portal/i18n/portal.pot @@ -640,10 +640,6 @@ msgstr "" msgid "Its connection stops working at once. You can add it again later." msgstr "" -#: web/src/portal/page/devices.ts -msgid "Its settings changed: update the connection" -msgstr "" - #: web/src/shared/format.ts msgid "KB" msgstr "" @@ -939,6 +935,10 @@ msgstr "" msgid "Reconnect" msgstr "" +#: web/src/portal/page/devices.ts +msgid "Reconnect %s" +msgstr "" + #: web/src/portal/flows/device-actions.ts msgid "Reconnect %s?" msgstr "" @@ -1196,14 +1196,6 @@ msgstr "" msgid "Unknown service %s." msgstr "" -#: web/src/portal/page/devices.ts -msgid "Update" -msgstr "" - -#: web/src/portal/page/devices.ts -msgid "Update the connection" -msgstr "" - #: web/src/portal/ui/bars.ts msgid "Uploaded" msgstr "" diff --git a/web/src/portal/i18n/ru.po b/web/src/portal/i18n/ru.po index 7605bb3..cd70648 100644 --- a/web/src/portal/i18n/ru.po +++ b/web/src/portal/i18n/ru.po @@ -645,10 +645,6 @@ msgstr "Устройство получит новые ключи. Сейчас msgid "Its connection stops working at once. You can add it again later." msgstr "Подключение сразу перестанет работать. Устройство можно будет добавить снова." -#: web/src/portal/page/devices.ts -msgid "Its settings changed: update the connection" -msgstr "Настройки изменились: обновите подключение" - #: web/src/shared/format.ts msgid "KB" msgstr "КБ" @@ -944,6 +940,10 @@ msgstr "QR-код" msgid "Reconnect" msgstr "Переподключить" +#: web/src/portal/page/devices.ts +msgid "Reconnect %s" +msgstr "Переподключить %s" + #: web/src/portal/flows/device-actions.ts msgid "Reconnect %s?" msgstr "Переподключить «%s»?" @@ -1201,14 +1201,6 @@ msgstr "Неизвестный сервер." msgid "Unknown service %s." msgstr "Неизвестный сервис %s." -#: web/src/portal/page/devices.ts -msgid "Update" -msgstr "Обновить" - -#: web/src/portal/page/devices.ts -msgid "Update the connection" -msgstr "Обновить подключение" - #: web/src/portal/ui/bars.ts msgid "Uploaded" msgstr "Отправлено" diff --git a/web/src/portal/page/devices.ts b/web/src/portal/page/devices.ts index a86582e..3229f91 100644 --- a/web/src/portal/page/devices.ts +++ b/web/src/portal/page/devices.ts @@ -25,7 +25,7 @@ export const reachableFromHome = (p: Person, d: Device) => p.access !== 'interne /** The status line: its class and words (short, on one line; the full wording shows on hover). */ function statusOf(d: Device, p: Person): [string, string] { if (d.disabled) return ['', _('Disabled')]; - // The Update pill beside it says what to do. + // The Reconnect button under it says what to do. if (d.config_stale && d.handshake) return ['warn-t', _('Settings changed')]; // Over the data limit or outside the hours the tunnel stays up but passes nothing: the app says // "connected", so say here why nothing works. @@ -65,42 +65,25 @@ function dayName(back: number): string { } /** Last 7 days down and up over their bars; a day under the pointer puts its own numbers in their place. */ -function usage(d: Device, stale: boolean): HTMLElement { +function usage(d: Device): HTMLElement { const week = sumDays(d.spark); const lbl = h('span', { class: 'use-lbl' }, _('Last 7 days')); const val = upDown(d.id); val.set(week); - let side: HTMLElement; - if (stale) - side = h( - 'button', - { - type: 'button', - class: 'upd-pill', - 'aria-label': _('Update the connection'), - title: _('Its settings changed: update the connection'), - onclick: () => reconnect(d), - }, - ic('refresh'), - h('span', {}, _('Update')), - ); - else { - const chart = bars(d.spark, 'bars-week', 34); - side = chart.el; - chart.cols.forEach((col, i) => { - const back = d.spark.length - 1 - i; - // What the pointer reads off the bars changes at once: no morph while it moves. - col.addEventListener('pointerenter', () => { - setText(lbl, dayName(back)); - val.set(d.spark[i]); - }); - col.addEventListener('pointerleave', () => { - setText(lbl, _('Last 7 days')); - val.set(week); - }); + const chart = bars(d.spark, 'bars-week', 34); + chart.cols.forEach((col, i) => { + const back = d.spark.length - 1 - i; + // What the pointer reads off the bars changes at once: no morph while it moves. + col.addEventListener('pointerenter', () => { + setText(lbl, dayName(back)); + val.set(d.spark[i]); }); - } - return h('div', { class: 'dev-use' }, h('div', { class: 'use-txt' }, lbl, h('span', { class: 'use-val' }, val.el)), side); + col.addEventListener('pointerleave', () => { + setText(lbl, _('Last 7 days')); + val.set(week); + }); + }); + return h('div', { class: 'dev-use' }, h('div', { class: 'use-txt' }, lbl, h('span', { class: 'use-val' }, val.el)), chart.el); } function card(d: Device, st: State): HTMLElement { @@ -149,7 +132,8 @@ function card(d: Device, st: State): HTMLElement { ), more, ), - // Stopped by the admin: a device never set up has nothing to show. + // Stopped by the admin: a device never set up has nothing to show. Its settings changed: Reconnect in + // place of its week (new keys, then set it up again), as a device not set up yet shows Connect. setUp && locked ? null : setUp @@ -164,7 +148,19 @@ function card(d: Device, st: State): HTMLElement { ic('qr'), h('span', {}, _('Connect')), ) - : usage(d, stale), + : stale + ? h( + 'button', + { + type: 'button', + class: 'btn tint block setup-btn', + 'aria-label': fmt(_('Reconnect %s'), d.name), + onclick: () => reconnect(d), + }, + ic('refresh'), + h('span', {}, _('Reconnect')), + ) + : usage(d), ); } @@ -189,15 +185,35 @@ const addCard = () => /** The section, built once; `fill` puts the cards in. */ export function devicesSection(): HTMLElement { + const grid = h('div', { class: 'dgrid' }); + snapOnJump(grid); return h( 'section', { class: 'devices', id: 'devices', 'aria-label': _('Your devices') }, h('div', { class: 'sec-head' }, h('h2', {}, _('Your devices')), h('span', { class: 'aside num' })), - h('div', { class: 'dgrid' }), + grid, h('p', { class: 'note-s limit', hidden: true }), ); } +/** + * A card whose width jumps (the grid changed its columns: a window across 560 or 960 px, a phone turned) + * takes its new shape with the layout, at once: gliding there from the old one, its numbers would not fit + * for a moment and wrap. A threshold crossed while the window is resized a little at a time still glides + * (devices.css). The class goes on before the frame is painted, so the glide that began never shows. + */ +function snapOnJump(grid: HTMLElement) { + let was = 0; + new ResizeObserver(() => { + const w = grid.querySelector('.dev')?.getBoundingClientRect().width ?? 0; + if (Math.abs(w - was) > 16) { + grid.classList.add('snap'); + requestAnimationFrame(() => requestAnimationFrame(() => grid.classList.remove('snap'))); + } + was = w; + }).observe(grid); +} + /** The cards for this state, moving from where they were. */ export function fillDevices(section: HTMLElement, st: State, o: RepaintOpts = {}) { const p = st.person; diff --git a/web/src/portal/styles/bars.css b/web/src/portal/styles/bars.css index 8729632..3b14e85 100644 --- a/web/src/portal/styles/bars.css +++ b/web/src/portal/styles/bars.css @@ -12,6 +12,7 @@ } .bars-week { --gap: 4px; + transition: margin var(--fit); } .bars .col { display: flex; @@ -38,7 +39,19 @@ .bars-week i { width: 6px; border-radius: 3px; - transition-duration: 150ms; + transition: + background-color 150ms, + width var(--fit), + border-radius var(--fit); +} +/* A card turning compact (devices.css) thins the week's bars and their gaps: they glide there. */ +.bars-week .col { + transition: padding var(--fit); +} +.bars-week .axis { + transition: + left var(--fit), + right var(--fit); } .bars .dn { background: color-mix(in srgb, var(--text) 24%, transparent); @@ -77,14 +90,16 @@ /* ↓ down ↑ up: the arrows are the line icon turned; the upload one step quieter. */ .ud { display: inline-flex; + flex-wrap: wrap; align-items: center; - gap: 10px; - white-space: nowrap; + column-gap: 10px; + transition: column-gap var(--fit); } .ud > span { display: inline-flex; align-items: center; gap: 2px; + white-space: nowrap; } .ud .i { width: 0.8em; @@ -102,3 +117,15 @@ transform: rotate(-90deg); color: var(--text-3); } + +@media (prefers-reduced-motion: reduce) { + .bars-week, + .bars-week .col, + .bars-week .axis, + .ud { + transition: none; + } + .bars-week i { + transition: background-color 150ms; + } +} diff --git a/web/src/portal/styles/devices.css b/web/src/portal/styles/devices.css index 21798f8..1ebf71c 100644 --- a/web/src/portal/styles/devices.css +++ b/web/src/portal/styles/devices.css @@ -1,5 +1,5 @@ /* "Your devices": the grid, a card per device (its glass icon, name and one-line status, ⋯; the week - as a number and bars, the Update pill, or Connect), the card that adds one, the first device. */ + as down and up over bars, or Connect or Reconnect), the card that adds one, the first device. */ .dgrid { display: grid; @@ -19,6 +19,9 @@ flex-direction: column; gap: 8px; min-width: 0; + container: card / inline-size; + /* How a card glides between its full and compact shapes (a window resized across 330 or 270 px). */ + --fit: var(--spring-smooth-dur, 524ms) var(--spring-smooth, ease); } .dev.is-here { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 32%, transparent); @@ -75,14 +78,16 @@ border-radius: var(--r-row); padding: 12px 14px 12px 16px; display: flex; - align-items: flex-end; + align-items: center; justify-content: space-between; - gap: 12px; + gap: 16px; min-height: 66px; } +/* The words take what the bars leave, never more. */ .use-txt { display: flex; flex-direction: column; + flex: 1; min-width: 0; } .use-lbl { @@ -96,36 +101,37 @@ line-height: 24px; font-weight: 500; letter-spacing: -0.02em; + transition: + font-size var(--fit), + line-height var(--fit); } .dev .setup-btn { margin-top: auto; } -.upd-pill { - display: inline-flex; - align-items: center; - align-self: center; - gap: 6px; - height: 32px; - padding: 0 12px 0 10px; - border-radius: 999px; - flex: none; - background: color-mix(in srgb, var(--warn) 14%, transparent); - color: var(--warn); - font-size: 13px; - font-weight: 600; - transition: - background-color 150ms, - transform 150ms var(--ease-out); +/* A card under 330 px (a computer's two columns; the query reads inside its 8 px padding) keeps down and up on + one line by being compact: smaller numbers, thinner bars. A phone's card stays as it is. */ +@container card (max-width: 313px) { + .use-val { + font-size: 15px; + line-height: 22px; + } + .bars-week { + --gap: 3px; + } + .bars-week i { + width: 4px; + border-radius: 2px; + } } -.upd-pill:hover { - background: color-mix(in srgb, var(--warn) 22%, transparent); -} -.upd-pill:active { - transform: scale(0.94); -} -.upd-pill .i { - width: 14px; - height: 14px; +/* The narrowest (under 270 px): a step smaller again, so a day under the pointer fits as well as the week. */ +@container card (max-width: 253px) { + .use-val { + font-size: 14px; + line-height: 22px; + } + .use-val .ud { + column-gap: 8px; + } } .dev.add { align-items: center; @@ -178,3 +184,14 @@ .dev.first .btn { max-width: 320px; } + +/* A jump of the cards' width: the new shape at once, with the layout (page/devices.ts). */ +.dgrid.snap .dev * { + transition: none; +} + +@media (prefers-reduced-motion: reduce) { + .use-val { + transition: none; + } +}