Files
pyMC_Repeater/repeater/web/html/assets/Setup-Cs8nXwGE.js
T
2026-04-11 21:14:39 +01:00

1 line
24 KiB
JavaScript

import{A as e,E as t,S as n,W as r,dt as i,f as a,g as o,j as s,l as c,lt as l,m as u,o as d,p as f,r as p,s as m,u as h,ut as g,w as _,x as v,z as y}from"./runtime-core.esm-bundler-IofF4kUm.js";import{n as b}from"./pinia-BrpcNUEi.js";import{i as x}from"./vue-router-BsDVl_JC.js";import{t as S}from"./_plugin-vue_export-helper-V-yks4gF.js";import{d as C,m as w,s as T,t as ee,u as E}from"./index-BPH8UrxU.js";var te=b(`setup`,()=>{let e=y(1),t=y(5),n=y(`pyRpt${Math.floor(Math.random()*1e4).toString().padStart(4,`0`)}`),r=y(null),i=y(null),a=y(``),o=y(``),s=y(!1),c=y({frequency:`915.0`,spreading_factor:`7`,bandwidth:`125`,coding_rate:`5`}),l=y([]),u=y([]),f=y(!1),p=y(!1),m=y(null),h=d(()=>{switch(e.value){case 1:return!0;case 2:return n.value.trim().length>0;case 3:return r.value!==null;case 4:return s.value?c.value.frequency&&c.value.spreading_factor&&c.value.bandwidth&&c.value.coding_rate:i.value!==null;case 5:return a.value.length>=6&&a.value===o.value;default:return!1}}),g=d(()=>e.value>1),_=d(()=>e.value===t.value);async function v(){f.value=!0,m.value=null;try{let e=await(await fetch(`/api/hardware_options`)).json();if(e.error)throw Error(e.error);l.value=e.hardware||[]}catch(e){m.value=e instanceof Error?e.message:`Failed to load hardware options`,console.error(`Error fetching hardware options:`,e)}finally{f.value=!1}}async function b(){f.value=!0,m.value=null;try{let e=await(await fetch(`/api/radio_presets`)).json();if(e.error)throw Error(e.error);u.value=e.presets||[]}catch(e){m.value=e instanceof Error?e.message:`Failed to load radio presets`,console.error(`Error fetching radio presets:`,e)}finally{f.value=!1}}async function x(){if(!h.value)return{success:!1,error:`Please complete all required fields`};p.value=!0,m.value=null;try{let e=s.value?{title:`Custom Configuration`,description:`Custom radio settings`,frequency:c.value.frequency,spreading_factor:c.value.spreading_factor,bandwidth:c.value.bandwidth,coding_rate:c.value.coding_rate}:i.value,t=await(await fetch(`/api/setup_wizard`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({node_name:n.value.trim(),hardware_key:r.value?.key,radio_preset:e,admin_password:a.value})})).json();if(!t.success)throw Error(t.error||`Setup failed`);return{success:!0,data:t}}catch(e){let t=e instanceof Error?e.message:`Failed to complete setup`;return m.value=t,{success:!1,error:t}}finally{p.value=!1}}function S(){h.value&&e.value<t.value&&e.value++}function C(){g.value&&e.value--}function w(n){n>=1&&n<=t.value&&(e.value=n)}function T(){e.value=1,n.value=`pyRpt${Math.floor(Math.random()*1e4).toString().padStart(4,`0`)}`,r.value=null,i.value=null,s.value=!1,c.value={frequency:`915.0`,spreading_factor:`7`,bandwidth:`125`,coding_rate:`5`},a.value=``,o.value=``,m.value=null}return{currentStep:e,totalSteps:t,nodeName:n,selectedHardware:r,selectedRadioPreset:i,useCustomRadio:s,customRadio:c,adminPassword:a,confirmPassword:o,hardwareOptions:l,radioPresets:u,isLoading:f,isSubmitting:p,error:m,canGoNext:h,canGoBack:g,isLastStep:_,fetchHardwareOptions:v,fetchRadioPresets:b,completeSetup:x,nextStep:S,previousStep:C,goToStep:w,reset:T}}),ne={class:`min-h-screen bg-background dark:bg-background overflow-hidden relative flex items-center justify-center p-4`},re={class:`absolute top-4 right-4 z-20`},ie={class:`w-full max-w-4xl relative z-10`},ae={class:`mb-8`},oe={class:`flex justify-between mb-2`},se={class:`text-content-secondary dark:text-content-muted text-sm`},ce={class:`text-content-secondary dark:text-content-muted text-sm`},D={class:`h-2 bg-stroke-subtle dark:bg-stroke/10 rounded-full overflow-hidden`},O={class:`bg-white dark:bg-surface-elevated backdrop-blur-xl border border-stroke-subtle dark:border-white/10 rounded-[20px] p-6 sm:p-8 md:p-12`},k={class:`flex justify-center mb-8`},A={class:`flex gap-2`},j={class:`mb-8`},M={class:`text-2xl sm:text-3xl font-bold text-content-primary dark:text-content-primary mb-2 text-center`},N={key:0,class:`space-y-6 mt-8`},P={key:1,class:`space-y-6 mt-8`},F={class:`max-w-md mx-auto`},I={key:2,class:`space-y-6 mt-8`},L={key:0,class:`text-center text-content-secondary dark:text-content-muted`},R={key:1,class:`text-center text-content-secondary dark:text-content-muted`},z={key:2,class:`grid grid-cols-1 md:grid-cols-2 gap-4 max-w-3xl mx-auto`},B=[`onClick`],V={class:`font-medium text-content-primary dark:text-content-primary mb-1`},H={class:`text-sm text-content-secondary dark:text-content-muted`},U={key:3,class:`space-y-6 mt-8`},W={key:0,class:`text-center text-content-secondary dark:text-content-muted`},G={key:1,class:`text-center text-content-secondary dark:text-content-muted`},le={key:2,class:`max-w-5xl mx-auto`},ue={class:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-4`},de=[`onClick`],fe={class:`relative z-10`},pe={class:`font-medium text-content-primary dark:text-content-primary mb-1 flex items-start justify-between gap-2`},me={class:`flex items-center gap-2`},he={class:`text-2xl`},ge={key:0,class:`text-primary flex-shrink-0`},_e={class:`text-xs text-content-secondary dark:text-content-muted mb-3`},ve={class:`grid grid-cols-2 gap-2 text-xs`},ye={class:`bg-gray-50 dark:bg-white/5 rounded px-2 py-1`},be={class:`text-content-primary dark:text-content-primary/80 font-medium`},xe={class:`bg-gray-50 dark:bg-white/5 rounded px-2 py-1`},Se={class:`text-content-primary dark:text-content-primary/80 font-medium`},K={class:`bg-gray-50 dark:bg-white/5 rounded px-2 py-1`},Ce={class:`text-content-primary dark:text-content-primary/80 font-medium`},we={class:`bg-gray-50 dark:bg-white/5 rounded px-2 py-1`},Te={class:`text-content-primary dark:text-content-primary/80 font-medium`},Ee={class:`border-t border-stroke-subtle dark:border-stroke/10 pt-6`},De={class:`flex items-center justify-between mb-2`},Oe={key:0,class:`text-primary`},ke={key:0,class:`mt-4 grid grid-cols-2 gap-4`},Ae={key:4,class:`space-y-6 mt-8`},je={class:`max-w-md mx-auto space-y-4`},Me={key:0,class:`text-red-600 dark:text-red-400 text-sm`},Ne={key:0,class:`mb-6 bg-red-500/10 border border-red-500/30 rounded-lg p-4 text-red-600 dark:text-red-200`},Pe={class:`flex justify-between gap-4`},Fe={key:1},Ie=[`disabled`],Le={key:0,class:`w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin`},Re={key:1},ze={key:2},Be={key:3},Ve={key:4,class:`w-4 h-4`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},He={class:`flex justify-center mb-6`},Ue={key:0,class:`w-16 h-16 rounded-full bg-green-100 dark:bg-green-500/20 flex items-center justify-center`},We={key:1,class:`w-16 h-16 rounded-full bg-red-100 dark:bg-red-500/20 flex items-center justify-center`},Ge={class:`text-2xl font-bold text-content-primary dark:text-content-primary text-center mb-4`},Ke={class:`text-content-secondary dark:text-content-primary/70 text-center mb-6`},q=S(o({name:`SetupView`,__name:`Setup`,setup(o){let b=te(),S=x(),q=y(!1),J=y(``),Y=y(``),X=y(`success`),Z=null,qe=e=>{let t=e.toLowerCase();return t.includes(`australia`)?`🇦🇺`:t.includes(`eu`)||t.includes(`uk`)?`🇪🇺`:t.includes(`czech`)?`🇨🇿`:t.includes(`new zealand`)?`🇳🇿`:t.includes(`portugal`)?`🇵🇹`:t.includes(`switzerland`)?`🇨🇭`:t.includes(`usa`)||t.includes(`canada`)?`🇺🇸`:t.includes(`vietnam`)?`🇻🇳`:`🌍`};n(async()=>{await Promise.all([b.fetchHardwareOptions(),b.fetchRadioPresets()])});let Q=d(()=>b.currentStep/b.totalSteps*100);async function Je(){if(b.isLastStep){let e=await b.completeSetup();e.success?(X.value=`success`,J.value=`Setup Complete!`,Y.value=`Your repeater has been configured successfully. The service is restarting now...`,q.value=!0,Xe()):(X.value=`error`,J.value=`Setup Failed`,Y.value=e.error||`An unknown error occurred`,q.value=!0)}else b.nextStep()}function Ye(){b.previousStep()}function $(){q.value=!1,X.value===`success`&&(Z||S.push(`/login`))}function Xe(){let e=0;function t(){e++,fetch(`/api/status`,{method:`GET`}).then(e=>{e.ok?(Z=null,q.value=!1,S.push(`/login`)):n()}).catch(()=>{n()})}function n(){e<30?Z=setTimeout(t,1e3):(Z=null,q.value=!1,S.push(`/login`))}Z=setTimeout(t,2e3)}v(()=>{Z&&=(clearTimeout(Z),null)});let Ze=[`Welcome`,`Repeater Name`,`Hardware Selection`,`Radio Configuration`,`Security Setup`];return(n,o)=>(_(),h(`div`,ne,[m(`div`,re,[u(ee)]),o[36]||=m(`div`,{class:`bg-gradient-light dark:bg-gradient-dark absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] blur-[120px] opacity-80 animate-pulse-slow -top-[79px] left-[575px] mix-blend-multiply dark:mix-blend-screen pointer-events-none`},null,-1),o[37]||=m(`div`,{class:`bg-gradient-light dark:bg-gradient-dark absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] blur-[120px] opacity-75 animate-pulse-slower -top-[94px] -left-[92px] mix-blend-multiply dark:mix-blend-screen pointer-events-none`},null,-1),o[38]||=m(`div`,{class:`bg-gradient-light dark:bg-gradient-dark absolute rounded-full -rotate-[24.22deg] w-[705px] h-[512px] blur-[120px] opacity-80 animate-pulse-slowest top-[373px] left-[246px] mix-blend-multiply dark:mix-blend-screen pointer-events-none`},null,-1),m(`div`,ie,[m(`div`,ae,[m(`div`,oe,[m(`span`,se,`Step `+i(r(b).currentStep)+` of `+i(r(b).totalSteps),1),m(`span`,ce,i(Math.round(Q.value))+`% Complete`,1)]),m(`div`,D,[m(`div`,{class:`h-full bg-gradient-to-r from-primary to-primary/80 transition-all duration-500`,style:g({width:`${Q.value}%`})},null,4)])]),m(`div`,O,[m(`div`,k,[m(`div`,A,[(_(!0),h(p,null,t(r(b).totalSteps,e=>(_(),h(`div`,{key:e,class:l([`w-10 h-10 rounded-full flex items-center justify-center text-sm font-medium transition-all`,e===r(b).currentStep?`bg-primary text-white`:e<r(b).currentStep?`bg-primary/30 text-content-secondary dark:text-content-primary/70`:`bg-background-mute dark:bg-stroke/10 text-content-muted dark:text-content-muted`])},i(e),3))),128))])]),m(`div`,j,[m(`h2`,M,i(Ze[r(b).currentStep-1]),1),r(b).currentStep===1?(_(),h(`div`,N,[...o[9]||=[a(`<div class="text-center space-y-4" data-v-a201f2f2><div class="w-20 h-20 mx-auto bg-primary/20 rounded-full flex items-center justify-center mb-6" data-v-a201f2f2><svg class="w-10 h-10 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-a201f2f2><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" data-v-a201f2f2></path></svg></div><p class="text-content-secondary dark:text-content-primary/70 text-lg" data-v-a201f2f2> Welcome to your pyMC Repeater! Let&#39;s get you set up in just a few steps. </p><div class="bg-primary/10 border border-primary/30 rounded-lg p-4 text-left" data-v-a201f2f2><p class="text-primary text-sm font-medium mb-2" data-v-a201f2f2>You&#39;ll configure:</p><ul class="space-y-2 text-content-secondary dark:text-content-primary/70 text-sm" data-v-a201f2f2><li class="flex items-center gap-2" data-v-a201f2f2><svg class="w-4 h-4 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-a201f2f2><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" data-v-a201f2f2></path></svg> Repeater name and identification </li><li class="flex items-center gap-2" data-v-a201f2f2><svg class="w-4 h-4 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-a201f2f2><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" data-v-a201f2f2></path></svg> Hardware board selection </li><li class="flex items-center gap-2" data-v-a201f2f2><svg class="w-4 h-4 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-a201f2f2><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" data-v-a201f2f2></path></svg> Radio frequency and settings </li><li class="flex items-center gap-2" data-v-a201f2f2><svg class="w-4 h-4 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-a201f2f2><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" data-v-a201f2f2></path></svg> Admin password for secure access </li></ul></div></div>`,1)]])):r(b).currentStep===2?(_(),h(`div`,P,[o[12]||=m(`p`,{class:`text-content-secondary dark:text-content-primary/70 text-center mb-6`},` Choose a unique name for your repeater. This will be used for identification on the mesh network. `,-1),m(`div`,F,[o[10]||=m(`label`,{class:`block text-content-primary dark:text-content-primary/90 text-sm font-medium mb-2`},`Repeater Name`,-1),s(m(`input`,{"onUpdate:modelValue":o[0]||=e=>r(b).nodeName=e,type:`text`,class:`w-full bg-white dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-lg px-4 py-3 text-content-primary dark:text-content-primary placeholder-gray-500 dark:placeholder-white/40 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent`,placeholder:`e.g., pyRpt0001`,maxlength:`32`},null,512),[[C,r(b).nodeName]]),o[11]||=m(`p`,{class:`text-content-secondary dark:text-content-muted text-xs mt-2`},` Use letters, numbers, hyphens, or underscores (3-32 characters) `,-1)])])):r(b).currentStep===3?(_(),h(`div`,I,[o[13]||=m(`p`,{class:`text-content-secondary dark:text-content-primary/70 text-center mb-6`},` Select your hardware board type `,-1),r(b).isLoading?(_(),h(`div`,L,` Loading hardware options... `)):r(b).hardwareOptions.length===0?(_(),h(`div`,R,` No hardware options available `)):(_(),h(`div`,z,[(_(!0),h(p,null,t(r(b).hardwareOptions,e=>(_(),h(`button`,{key:e.key,onClick:t=>r(b).selectedHardware=e,class:l([`p-4 rounded-[12px] border transition-all duration-300 text-left backdrop-blur-sm`,r(b).selectedHardware?.key===e.key?`bg-gradient-to-r from-primary/20 to-primary/10 border-primary/50 shadow-lg shadow-primary/20`:`bg-background-mute dark:bg-white/5 border-stroke-subtle dark:border-stroke/10 hover:bg-stroke-subtle dark:hover:bg-white/10 hover:border-stroke dark:hover:border-stroke/20`])},[m(`div`,V,i(e.name),1),m(`div`,H,i(e.description||e.key),1)],10,B))),128))]))])):r(b).currentStep===4?(_(),h(`div`,U,[o[28]||=m(`p`,{class:`text-content-secondary dark:text-content-primary/70 text-center mb-6`},` Choose a radio configuration preset for your region or create a custom configuration `,-1),r(b).isLoading?(_(),h(`div`,W,` Loading radio presets... `)):r(b).radioPresets.length===0?(_(),h(`div`,G,` No radio presets available `)):(_(),h(`div`,le,[m(`div`,ue,[(_(!0),h(p,null,t(r(b).radioPresets,e=>(_(),h(`button`,{key:e.title,onClick:t=>{r(b).selectedRadioPreset=e,r(b).useCustomRadio=!1},class:l([`p-4 rounded-[12px] border transition-all duration-300 text-left backdrop-blur-sm relative overflow-hidden`,!r(b).useCustomRadio&&r(b).selectedRadioPreset?.title===e.title?`bg-gradient-to-r from-primary/20 to-primary/10 border-primary/50 shadow-lg shadow-primary/20`:`bg-background-mute dark:bg-white/5 border-stroke-subtle dark:border-stroke/10 hover:bg-stroke-subtle dark:hover:bg-white/10 hover:border-stroke dark:hover:border-stroke/20`])},[m(`div`,fe,[m(`div`,pe,[m(`span`,me,[m(`span`,he,i(qe(e.title)),1),m(`span`,null,i(e.title),1)]),!r(b).useCustomRadio&&r(b).selectedRadioPreset?.title===e.title?(_(),h(`div`,ge,[...o[14]||=[m(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 20 20`},[m(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z`,"clip-rule":`evenodd`})],-1)]])):c(``,!0)]),m(`div`,_e,i(e.description),1),m(`div`,ve,[m(`div`,ye,[o[15]||=m(`div`,{class:`text-content-muted dark:text-content-muted`},`Freq`,-1),m(`div`,be,i(e.frequency),1)]),m(`div`,xe,[o[16]||=m(`div`,{class:`text-content-muted dark:text-content-muted`},`BW`,-1),m(`div`,Se,i(e.bandwidth),1)]),m(`div`,K,[o[17]||=m(`div`,{class:`text-content-muted dark:text-content-muted`},`SF`,-1),m(`div`,Ce,i(e.spreading_factor),1)]),m(`div`,we,[o[18]||=m(`div`,{class:`text-content-muted dark:text-content-muted`},`CR`,-1),m(`div`,Te,i(e.coding_rate),1)])])])],10,de))),128))]),m(`div`,Ee,[m(`button`,{onClick:o[1]||=e=>{r(b).useCustomRadio=!r(b).useCustomRadio,r(b).useCustomRadio&&(r(b).selectedRadioPreset=null)},class:l([`w-full p-4 rounded-[12px] border transition-all duration-300 text-left backdrop-blur-sm`,r(b).useCustomRadio?`bg-gradient-to-r from-primary/20 to-primary/10 border-primary/50 shadow-lg shadow-primary/20`:`bg-background-mute dark:bg-white/5 border-stroke-subtle dark:border-stroke/10 hover:bg-stroke-subtle dark:hover:bg-white/10 hover:border-stroke dark:hover:border-stroke/20`])},[m(`div`,De,[o[20]||=m(`div`,{class:`font-medium text-content-primary dark:text-content-primary flex items-center gap-2`},[m(`svg`,{class:`w-5 h-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4`})]),f(` Custom Configuration `)],-1),r(b).useCustomRadio?(_(),h(`div`,Oe,[...o[19]||=[m(`svg`,{class:`w-5 h-5`,fill:`currentColor`,viewBox:`0 0 20 20`},[m(`path`,{"fill-rule":`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z`,"clip-rule":`evenodd`})],-1)]])):c(``,!0)]),o[21]||=m(`div`,{class:`text-xs text-content-secondary dark:text-content-muted`},` Manually configure frequency, bandwidth, spreading factor, and coding rate `,-1)],2),u(T,{name:`slide`},{default:e(()=>[r(b).useCustomRadio?(_(),h(`div`,ke,[m(`div`,null,[o[22]||=m(`label`,{class:`block text-content-primary dark:text-content-primary/90 text-sm font-medium mb-2`},`Frequency (MHz)`,-1),s(m(`input`,{"onUpdate:modelValue":o[2]||=e=>r(b).customRadio.frequency=e,type:`number`,step:`0.1`,class:`w-full bg-white dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-[12px] px-4 py-2.5 text-content-primary dark:text-content-primary placeholder-gray-500 dark:placeholder-white/40 focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-transparent transition-all`,placeholder:`915.0`},null,512),[[C,r(b).customRadio.frequency]])]),m(`div`,null,[o[23]||=m(`label`,{class:`block text-content-primary dark:text-content-primary/90 text-sm font-medium mb-2`},`Bandwidth (kHz)`,-1),s(m(`input`,{"onUpdate:modelValue":o[3]||=e=>r(b).customRadio.bandwidth=e,type:`number`,class:`w-full bg-white dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-[12px] px-4 py-2.5 text-content-primary dark:text-content-primary placeholder-gray-500 dark:placeholder-white/40 focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-transparent transition-all`,placeholder:`125`},null,512),[[C,r(b).customRadio.bandwidth]])]),m(`div`,null,[o[25]||=m(`label`,{class:`block text-content-primary dark:text-content-primary/90 text-sm font-medium mb-2`},`Spreading Factor`,-1),s(m(`select`,{"onUpdate:modelValue":o[4]||=e=>r(b).customRadio.spreading_factor=e,class:`w-full bg-white dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-[12px] px-4 py-2.5 text-content-primary dark:text-content-primary focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-transparent transition-all`},[...o[24]||=[m(`option`,{value:`7`},`7`,-1),m(`option`,{value:`8`},`8`,-1),m(`option`,{value:`9`},`9`,-1),m(`option`,{value:`10`},`10`,-1),m(`option`,{value:`11`},`11`,-1),m(`option`,{value:`12`},`12`,-1)]],512),[[E,r(b).customRadio.spreading_factor]])]),m(`div`,null,[o[27]||=m(`label`,{class:`block text-content-primary dark:text-content-primary/90 text-sm font-medium mb-2`},`Coding Rate`,-1),s(m(`select`,{"onUpdate:modelValue":o[5]||=e=>r(b).customRadio.coding_rate=e,class:`w-full bg-white dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-[12px] px-4 py-2.5 text-content-primary dark:text-content-primary focus:outline-none focus:ring-2 focus:ring-primary/50 focus:border-transparent transition-all`},[...o[26]||=[m(`option`,{value:`5`},`4/5`,-1),m(`option`,{value:`6`},`4/6`,-1),m(`option`,{value:`7`},`4/7`,-1),m(`option`,{value:`8`},`4/8`,-1)]],512),[[E,r(b).customRadio.coding_rate]])])])):c(``,!0)]),_:1})])]))])):r(b).currentStep===5?(_(),h(`div`,Ae,[o[32]||=m(`p`,{class:`text-content-secondary dark:text-content-primary/70 text-center mb-6`},` Set a secure admin password to protect your repeater `,-1),m(`div`,je,[m(`div`,null,[o[29]||=m(`label`,{class:`block text-content-primary dark:text-content-primary/90 text-sm font-medium mb-2`},`Admin Password`,-1),s(m(`input`,{"onUpdate:modelValue":o[6]||=e=>r(b).adminPassword=e,type:`password`,class:`w-full bg-white dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-lg px-4 py-3 text-content-primary dark:text-content-primary placeholder-gray-500 dark:placeholder-white/40 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent`,placeholder:`Enter password (min 6 characters)`,minlength:`6`},null,512),[[C,r(b).adminPassword]])]),m(`div`,null,[o[30]||=m(`label`,{class:`block text-content-primary dark:text-content-primary/90 text-sm font-medium mb-2`},`Confirm Password`,-1),s(m(`input`,{"onUpdate:modelValue":o[7]||=e=>r(b).confirmPassword=e,type:`password`,class:`w-full bg-white dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 rounded-lg px-4 py-3 text-content-primary dark:text-content-primary placeholder-gray-500 dark:placeholder-white/40 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent`,placeholder:`Confirm password`},null,512),[[C,r(b).confirmPassword]])]),r(b).adminPassword&&r(b).confirmPassword&&r(b).adminPassword!==r(b).confirmPassword?(_(),h(`div`,Me,` Passwords do not match `)):c(``,!0),o[31]||=m(`div`,{class:`bg-yellow-500/10 border border-yellow-500/30 rounded-lg p-3 text-sm text-yellow-800 dark:text-yellow-200`},[m(`strong`,null,`Important:`),f(` Remember this password - you'll need it to access the dashboard. `)],-1)])])):c(``,!0)]),r(b).error?(_(),h(`div`,Ne,i(r(b).error),1)):c(``,!0),m(`div`,Pe,[r(b).canGoBack?(_(),h(`button`,{key:0,onClick:Ye,class:`px-6 py-3 rounded-[12px] bg-background-mute dark:bg-white/5 border border-stroke-subtle dark:border-stroke/10 text-content-primary dark:text-content-primary hover:bg-stroke-subtle dark:hover:bg-white/10 hover:border-stroke dark:hover:border-stroke/20 transition-all duration-300 font-medium`},` Back `)):(_(),h(`div`,Fe)),m(`button`,{onClick:Je,disabled:!r(b).canGoNext||r(b).isSubmitting,class:l([`px-8 py-3 rounded-[12px] font-semibold transition-all duration-300 flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed`,r(b).canGoNext&&!r(b).isSubmitting?`bg-primary hover:bg-primary/90 text-white border border-primary hover:border-primary/80`:`bg-background-mute dark:bg-stroke/5 text-content-muted dark:text-content-muted border border-stroke-subtle dark:border-stroke/10`])},[r(b).isSubmitting?(_(),h(`div`,Le)):c(``,!0),r(b).isSubmitting?(_(),h(`span`,Re,`Setting up...`)):r(b).isLastStep?(_(),h(`span`,ze,`Complete Setup`)):(_(),h(`span`,Be,`Next`)),!r(b).isSubmitting&&!r(b).isLastStep?(_(),h(`svg`,Ve,[...o[33]||=[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M9 5l7 7-7 7`},null,-1)]])):c(``,!0)],10,Ie)])])]),u(T,{name:`modal`},{default:e(()=>[q.value?(_(),h(`div`,{key:0,class:`fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm`,onClick:$},[m(`div`,{class:`bg-white dark:bg-surface-elevated backdrop-blur-xl max-w-md w-full p-8 rounded-[24px] border border-stroke-subtle dark:border-white/20 shadow-[0_8px_32px_0_rgba(0,0,0,0.37)]`,onClick:o[8]||=w(()=>{},[`stop`])},[m(`div`,He,[X.value===`success`?(_(),h(`div`,Ue,[...o[34]||=[m(`svg`,{class:`w-8 h-8 text-green-600 dark:text-green-400`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M5 13l4 4L19 7`})],-1)]])):(_(),h(`div`,We,[...o[35]||=[m(`svg`,{class:`w-8 h-8 text-red-600 dark:text-red-400`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`},[m(`path`,{"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M6 18L18 6M6 6l12 12`})],-1)]]))]),m(`h3`,Ge,i(J.value),1),m(`p`,Ke,i(Y.value),1),m(`button`,{onClick:$,class:l([`w-full px-6 py-3 rounded-lg font-medium transition-all`,X.value===`success`?`bg-primary hover:bg-primary/90 text-white`:`bg-accent-red hover:bg-accent-red/90 text-white`])},i(X.value===`success`?`Continue to Login`:`Close`),3)])])):c(``,!0)]),_:1})]))}}),[[`__scopeId`,`data-v-a201f2f2`]]);export{q as default};