import{c as I,r as y,d as c,e,t,w as _,v as h,f as j,g as m,h as f,u as w,j as v,k as p,F as V,l as H,o as d,m as D,n as b,p as k,T as O,I as B,q as C,s as T,_ as L,a as F,i as R}from"./Notification-CBsCzcFI.js";import{S as Q,a as J,N as K}from"./Navbar-BJwSTNaf.js";import{a as N}from"./fetch_utils-B73kExl8.js";import{a as X,_ as $,P as Y}from"./Checkbox-Bu3ROfG8.js";import{T as G,S as W,C as Z}from"./trash-2-BLmZGN1a.js";import{S as x}from"./save-6rxVew8l.js";import{G as ee}from"./gamepad-2-CDOjvke-.js";/**
 * @license lucide-vue-next v1.0.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oe=I("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]);/**
 * @license lucide-vue-next v1.0.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const te=I("file-cog",[["path",{d:"M15 8a1 1 0 0 1-1-1V2a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8z",key:"1ckgky"}],["path",{d:"M20 8v12a2 2 0 0 1-2 2h-4.182",key:"1726p0"}],["path",{d:"m3.305 19.53.923-.382",key:"ao1pio"}],["path",{d:"M4 10.592V4a2 2 0 0 1 2-2h8",key:"1foop0"}],["path",{d:"m4.228 16.852-.924-.383",key:"1fv9zy"}],["path",{d:"m5.852 15.228-.383-.923",key:"1a9hc2"}],["path",{d:"m5.852 20.772-.383.924",key:"1sh9ke"}],["path",{d:"m8.148 15.228.383-.923",key:"4yu6lf"}],["path",{d:"m8.53 21.696-.382-.924",key:"18b0s9"}],["path",{d:"m9.773 16.852.922-.383",key:"ti6xop"}],["path",{d:"m9.773 19.148.922.383",key:"rws47d"}],["circle",{cx:"7",cy:"18",r:"3",key:"lvkj7j"}]]);/**
 * @license lucide-vue-next v1.0.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const le=I("gpu",[["path",{d:"M2 17h18a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H2",key:"hpo31w"}],["path",{d:"M2 21V3",key:"1bzk4w"}],["path",{d:"M7 17v3a1 1 0 0 0 1 1h5a1 1 0 0 0 1-1v-3",key:"5hbqbf"}],["circle",{cx:"16",cy:"11",r:"2",key:"qt15rb"}],["circle",{cx:"8",cy:"11",r:"2",key:"ssideg"}]]);/**
 * @license lucide-vue-next v1.0.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ne=I("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
 * @license lucide-vue-next v1.0.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const se=I("sliders-vertical",[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]]);/**
 * @license lucide-vue-next v1.0.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ae=I("undo",[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]]);/**
 * @license lucide-vue-next v1.0.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ie=I("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),de={id:"general",class:"config-page"},re={class:"mb-3"},ue={for:"locale",class:"form-label"},_e={class:"form-text"},ce={class:"mb-3"},pe={for:"sunshine_name",class:"form-label"},fe={class:"form-text"},me={class:"mb-3"},ve={for:"min_log_level",class:"form-label"},ge={value:"0"},$e={value:"1"},he={value:"2"},be={value:"3"},ye={value:"4"},ke={value:"5"},we={value:"6"},Ve={class:"form-text"},Ue={id:"global_prep_cmd",class:"mb-3 d-flex flex-column"},qe={class:"form-label"},Se={class:"form-text"},Ee={key:0,class:"table"},Ie={scope:"col"},Me={scope:"col"},De={key:0,scope:"col"},Ae=["onUpdate:modelValue"],Oe=["onUpdate:modelValue"],Pe={key:0,class:"align-middle"},Ce=["onClick"],Te={__name:"General",props:{platform:String,config:Object},setup(a){const r=a,o=y(r.config);function n(){let s={do:"",undo:""};r.platform==="windows"&&(s={...s,elevated:!1}),o.value.global_prep_cmd.push(s)}function l(s){o.value.global_prep_cmd.splice(s,1)}return(s,i)=>(d(),c("div",de,[e("div",re,[e("label",ue,t(s.$t("config.locale")),1),_(e("select",{id:"locale",class:"form-select","onUpdate:modelValue":i[0]||(i[0]=u=>o.value.locale=u)},[...i[5]||(i[5]=[j('<option value="bg">Български (Bulgarian)</option><option value="cs">Čeština (Czech)</option><option value="de">Deutsch (German)</option><option value="en">English</option><option value="en_GB">English, United Kingdom</option><option value="en_US">English, United States</option><option value="es">Español (Spanish)</option><option value="fr">Français (French)</option><option value="hu">Magyar (Hungarian)</option><option value="it">Italiano (Italian)</option><option value="ja">日本語 (Japanese)</option><option value="ko">한국어 (Korean)</option><option value="pl">Polski (Polish)</option><option value="pt">Português (Portuguese)</option><option value="pt_BR">Português, Brasileiro (Portuguese, Brazilian)</option><option value="ru">Русский (Russian)</option><option value="sv">svenska (Swedish)</option><option value="tr">Türkçe (Turkish)</option><option value="uk">Українська (Ukranian)</option><option value="vi">Tiếng Việt (Vietnamese)</option><option value="zh">简体中文 (Chinese Simplified)</option><option value="zh_TW">繁體中文 (Chinese Traditional)</option>',22)])],512),[[h,o.value.locale]]),e("div",_e,t(s.$t("config.locale_desc")),1)]),e("div",ce,[e("label",pe,t(s.$t("config.sunshine_name")),1),_(e("input",{type:"text",class:"form-control",id:"sunshine_name",placeholder:"Sunshine","onUpdate:modelValue":i[1]||(i[1]=u=>o.value.sunshine_name=u)},null,512),[[m,o.value.sunshine_name]]),e("div",fe,t(s.$t("config.sunshine_name_desc")),1)]),e("div",me,[e("label",ve,t(s.$t("config.min_log_level")),1),_(e("select",{id:"min_log_level",class:"form-select","onUpdate:modelValue":i[2]||(i[2]=u=>o.value.min_log_level=u)},[e("option",ge,t(s.$t("config.min_log_level_0")),1),e("option",$e,t(s.$t("config.min_log_level_1")),1),e("option",he,t(s.$t("config.min_log_level_2")),1),e("option",be,t(s.$t("config.min_log_level_3")),1),e("option",ye,t(s.$t("config.min_log_level_4")),1),e("option",ke,t(s.$t("config.min_log_level_5")),1),e("option",we,t(s.$t("config.min_log_level_6")),1)],512),[[h,o.value.min_log_level]]),e("div",Ve,t(s.$t("config.min_log_level_desc")),1)]),e("div",Ue,[e("label",qe,t(s.$t("config.global_prep_cmd")),1),e("div",Se,t(s.$t("config.global_prep_cmd_desc")),1),o.value.global_prep_cmd.length>0?(d(),c("table",Ee,[e("thead",null,[e("tr",null,[e("th",Ie,[f(w(X),{size:16}),v(" "+t(s.$t("_common.do_cmd")),1)]),e("th",Me,[f(w(ae),{size:16}),v(" "+t(s.$t("_common.undo_cmd")),1)]),a.platform==="windows"?(d(),c("th",De,[f(w(Q),{size:16}),v(" "+t(s.$t("_common.run_as")),1)])):p("",!0),i[6]||(i[6]=e("th",{scope:"col"},null,-1))])]),e("tbody",null,[(d(!0),c(V,null,H(o.value.global_prep_cmd,(u,g)=>(d(),c("tr",null,[e("td",null,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":U=>u.do=U},null,8,Ae),[[m,u.do]])]),e("td",null,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":U=>u.undo=U},null,8,Oe),[[m,u.undo]])]),a.platform==="windows"?(d(),c("td",Pe,[f($,{id:"prep-cmd-admin-"+g,label:"_common.elevated",desc:"",modelValue:u.elevated,"onUpdate:modelValue":U=>u.elevated=U},null,8,["id","modelValue","onUpdate:modelValue"])])):p("",!0),e("td",null,[e("button",{class:"btn btn-danger",onClick:U=>l(g)},[f(w(G),{size:16})],8,Ce),e("button",{class:"btn btn-success",onClick:n},[f(w(Y),{size:16})])])]))),256))])])):p("",!0),e("button",{class:"ms-0 mt-2 btn btn-success",style:{margin:"0 auto"},onClick:n}," + "+t(s.$t("config.add")),1)]),f($,{class:"mb-3",id:"notify_pre_releases","locale-prefix":"config",modelValue:o.value.notify_pre_releases,"onUpdate:modelValue":i[3]||(i[3]=u=>o.value.notify_pre_releases=u),default:"false"},null,8,["modelValue"]),f($,{class:"mb-3",id:"system_tray","locale-prefix":"config",modelValue:o.value.system_tray,"onUpdate:modelValue":i[4]||(i[4]=u=>o.value.system_tray=u),default:"true"},null,8,["modelValue"])]))}},S={__name:"PlatformLayout",props:{platform:{type:String,required:!0}},setup(a){return(r,o)=>(d(),c(V,null,[r.$slots.windows&&a.platform==="windows"?D(r.$slots,"windows",{key:0}):p("",!0),r.$slots.freebsd&&a.platform==="freebsd"?D(r.$slots,"freebsd",{key:1}):p("",!0),r.$slots.linux&&a.platform==="linux"?D(r.$slots,"linux",{key:2}):p("",!0),r.$slots.macos&&a.platform==="macos"?D(r.$slots,"macos",{key:3}):p("",!0)],64))}},Ne={id:"input",class:"config-page"},ze={key:0,class:"mb-3"},je={for:"gamepad",class:"form-label"},He={value:"auto"},Ge={value:"switch"},Be={value:"xone"},Le={value:"ds5"},Fe={value:"switch"},Re={value:"xone"},Qe={value:"ds4"},Je={value:"x360"},Ke={class:"form-text"},Xe={key:0,class:"mb-3 accordion"},Ye={class:"accordion-item"},We={class:"accordion-header"},Ze={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},xe={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},eo={class:"accordion-body"},oo={key:2,class:"mb-3"},to={for:"back_button_timeout",class:"form-label"},lo={class:"form-text"},no={key:3,class:"mb-3"},so={for:"key_repeat_delay",class:"form-label"},ao={class:"form-text"},io={key:4,class:"mb-3"},ro={for:"key_repeat_frequency",class:"form-label"},uo={class:"form-text"},_o={__name:"Inputs",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Ne,[f($,{class:"mb-3",id:"controller","locale-prefix":"config",modelValue:o.value.controller,"onUpdate:modelValue":l[0]||(l[0]=s=>o.value.controller=s),default:"true"},null,8,["modelValue"]),o.value.controller==="enabled"&&a.platform!=="macos"?(d(),c("div",ze,[e("label",je,t(n.$t("config.gamepad")),1),_(e("select",{id:"gamepad",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.gamepad=s)},[e("option",He,t(n.$t("_common.auto")),1),f(S,{platform:a.platform},{freebsd:b(()=>[e("option",Ge,t(n.$t("config.gamepad_switch")),1),e("option",Be,t(n.$t("config.gamepad_xone")),1)]),linux:b(()=>[e("option",Le,t(n.$t("config.gamepad_ds5")),1),e("option",Fe,t(n.$t("config.gamepad_switch")),1),e("option",Re,t(n.$t("config.gamepad_xone")),1)]),windows:b(()=>[e("option",Qe,t(n.$t("config.gamepad_ds4")),1),e("option",Je,t(n.$t("config.gamepad_x360")),1)]),_:1},8,["platform"])],512),[[h,o.value.gamepad]]),e("div",Ke,t(n.$t("config.gamepad_desc")),1)])):p("",!0),o.value.controller==="enabled"?(d(),c(V,{key:1},[o.value.gamepad==="ds4"||o.value.gamepad==="ds5"||o.value.gamepad==="auto"&&a.platform!=="macos"?(d(),c("div",Xe,[e("div",Ye,[e("h2",We,[e("button",Ze,t(n.$t(o.value.gamepad==="ds4"?"config.gamepad_ds4_manual":o.value.gamepad==="ds5"?"config.gamepad_ds5_manual":"config.gamepad_auto")),1)]),e("div",xe,[e("div",eo,[o.value.gamepad==="auto"&&(a.platform==="windows"||a.platform==="linux")?(d(),c(V,{key:0},[f($,{class:"mb-3",id:"motion_as_ds4","locale-prefix":"config",modelValue:o.value.motion_as_ds4,"onUpdate:modelValue":l[2]||(l[2]=s=>o.value.motion_as_ds4=s),default:"true"},null,8,["modelValue"]),f($,{class:"mb-3",id:"touchpad_as_ds4","locale-prefix":"config",modelValue:o.value.touchpad_as_ds4,"onUpdate:modelValue":l[3]||(l[3]=s=>o.value.touchpad_as_ds4=s),default:"true"},null,8,["modelValue"])],64)):p("",!0),o.value.gamepad==="ds4"||o.value.gamepad==="auto"&&a.platform==="windows"?(d(),k($,{key:1,class:"mb-3",id:"ds4_back_as_touchpad_click","locale-prefix":"config",modelValue:o.value.ds4_back_as_touchpad_click,"onUpdate:modelValue":l[4]||(l[4]=s=>o.value.ds4_back_as_touchpad_click=s),default:"true"},null,8,["modelValue"])):p("",!0),o.value.gamepad==="ds5"||o.value.gamepad==="auto"&&a.platform==="linux"?(d(),k($,{key:2,class:"mb-3",id:"ds5_inputtino_randomize_mac","locale-prefix":"config",modelValue:o.value.ds5_inputtino_randomize_mac,"onUpdate:modelValue":l[5]||(l[5]=s=>o.value.ds5_inputtino_randomize_mac=s),default:"true"},null,8,["modelValue"])):p("",!0)])])])])):p("",!0)],64)):p("",!0),o.value.controller==="enabled"?(d(),c("div",oo,[e("label",to,t(n.$t("config.back_button_timeout")),1),_(e("input",{type:"text",class:"form-control",id:"back_button_timeout",placeholder:"-1","onUpdate:modelValue":l[6]||(l[6]=s=>o.value.back_button_timeout=s)},null,512),[[m,o.value.back_button_timeout]]),e("div",lo,t(n.$t("config.back_button_timeout_desc")),1)])):p("",!0),l[15]||(l[15]=e("hr",null,null,-1)),f($,{class:"mb-3",id:"keyboard","locale-prefix":"config",modelValue:o.value.keyboard,"onUpdate:modelValue":l[7]||(l[7]=s=>o.value.keyboard=s),default:"true"},null,8,["modelValue"]),o.value.keyboard==="enabled"&&a.platform==="windows"?(d(),c("div",no,[e("label",so,t(n.$t("config.key_repeat_delay")),1),_(e("input",{type:"text",class:"form-control",id:"key_repeat_delay",placeholder:"500","onUpdate:modelValue":l[8]||(l[8]=s=>o.value.key_repeat_delay=s)},null,512),[[m,o.value.key_repeat_delay]]),e("div",ao,t(n.$t("config.key_repeat_delay_desc")),1)])):p("",!0),o.value.keyboard==="enabled"&&a.platform==="windows"?(d(),c("div",io,[e("label",ro,t(n.$t("config.key_repeat_frequency")),1),_(e("input",{type:"text",class:"form-control",id:"key_repeat_frequency",placeholder:"24.9","onUpdate:modelValue":l[9]||(l[9]=s=>o.value.key_repeat_frequency=s)},null,512),[[m,o.value.key_repeat_frequency]]),e("div",uo,t(n.$t("config.key_repeat_frequency_desc")),1)])):p("",!0),o.value.keyboard==="enabled"&&a.platform==="windows"?(d(),k($,{key:5,class:"mb-3",id:"always_send_scancodes","locale-prefix":"config",modelValue:o.value.always_send_scancodes,"onUpdate:modelValue":l[10]||(l[10]=s=>o.value.always_send_scancodes=s),default:"true"},null,8,["modelValue"])):p("",!0),o.value.keyboard==="enabled"?(d(),k($,{key:6,class:"mb-3",id:"key_rightalt_to_key_win","locale-prefix":"config",modelValue:o.value.key_rightalt_to_key_win,"onUpdate:modelValue":l[11]||(l[11]=s=>o.value.key_rightalt_to_key_win=s),default:"false"},null,8,["modelValue"])):p("",!0),l[16]||(l[16]=e("hr",null,null,-1)),f($,{class:"mb-3",id:"mouse","locale-prefix":"config",modelValue:o.value.mouse,"onUpdate:modelValue":l[12]||(l[12]=s=>o.value.mouse=s),default:"true"},null,8,["modelValue"]),o.value.mouse==="enabled"?(d(),k($,{key:7,class:"mb-3",id:"high_resolution_scrolling","locale-prefix":"config",modelValue:o.value.high_resolution_scrolling,"onUpdate:modelValue":l[13]||(l[13]=s=>o.value.high_resolution_scrolling=s),default:"true"},null,8,["modelValue"])):p("",!0),o.value.mouse==="enabled"?(d(),k($,{key:8,class:"mb-3",id:"native_pen_touch","locale-prefix":"config",modelValue:o.value.native_pen_touch,"onUpdate:modelValue":l[14]||(l[14]=s=>o.value.native_pen_touch=s),default:"true"},null,8,["modelValue"])):p("",!0)]))}},co={id:"network",class:"config-page"},po={class:"mb-3"},fo={for:"address_family",class:"form-label"},mo={value:"ipv4"},vo={value:"both"},go={class:"form-text"},$o={class:"mb-3"},ho={for:"bind_address",class:"form-label"},bo={class:"form-text"},yo={class:"mb-3"},ko={for:"port",class:"form-label"},wo={class:"form-text"},Vo={key:0,class:"alert alert-danger"},Uo={key:1,class:"alert alert-danger"},qo={class:"table"},So={scope:"col"},Eo={scope:"col"},Io={scope:"col"},Mo={key:0,class:"alert alert-primary",role:"alert"},Do={key:2,class:"alert alert-warning"},Ao={class:"mb-3"},Oo={for:"origin_web_ui_allowed",class:"form-label"},Po={value:"pc"},Co={value:"lan"},To={value:"wan"},No={class:"form-text"},zo={class:"mb-3"},jo={for:"csrf_allowed_origins",class:"form-label"},Ho={class:"form-text"},Go={class:"mb-3"},Bo={for:"external_ip",class:"form-label"},Lo={class:"form-text"},Fo={class:"mb-3"},Ro={for:"lan_encryption_mode",class:"form-label"},Qo={value:"0"},Jo={value:"1"},Ko={value:"2"},Xo={class:"form-text"},Yo={class:"mb-3"},Wo={for:"wan_encryption_mode",class:"form-label"},Zo={value:"0"},xo={value:"1"},et={value:"2"},ot={class:"form-text"},tt={class:"mb-3"},lt={for:"ping_timeout",class:"form-label"},nt={class:"form-text"},z=47989,st={__name:"Network",props:["platform","config"],setup(a){const o=y(a.config),n=C(()=>{var l;return+((l=o.value)==null?void 0:l.port)});return(l,s)=>(d(),c("div",co,[f($,{class:"mb-3",id:"upnp","locale-prefix":"config",modelValue:o.value.upnp,"onUpdate:modelValue":s[0]||(s[0]=i=>o.value.upnp=i),default:"false"},null,8,["modelValue"]),e("div",po,[e("label",fo,t(l.$t("config.address_family")),1),_(e("select",{id:"address_family",class:"form-select","onUpdate:modelValue":s[1]||(s[1]=i=>o.value.address_family=i)},[e("option",mo,t(l.$t("config.address_family_ipv4")),1),e("option",vo,t(l.$t("config.address_family_both")),1)],512),[[h,o.value.address_family]]),e("div",go,t(l.$t("config.address_family_desc")),1)]),e("div",$o,[e("label",ho,t(l.$t("config.bind_address")),1),_(e("input",{type:"text",class:"form-control",id:"bind_address","onUpdate:modelValue":s[2]||(s[2]=i=>o.value.bind_address=i)},null,512),[[m,o.value.bind_address]]),e("div",bo,t(l.$t("config.bind_address_desc")),1)]),e("div",yo,[e("label",ko,t(l.$t("config.port")),1),_(e("input",{type:"number",min:"1029",max:"65514",class:"form-control",id:"port",placeholder:z,"onUpdate:modelValue":s[3]||(s[3]=i=>o.value.port=i)},null,512),[[m,o.value.port]]),e("div",wo,t(l.$t("config.port_desc")),1),+n.value-5<1024?(d(),c("div",Vo,[f(w(O),{size:20}),v(" "+t(l.$t("config.port_alert_1")),1)])):p("",!0),+n.value+21>65535?(d(),c("div",Uo,[f(w(O),{size:20}),v(" "+t(l.$t("config.port_alert_2")),1)])):p("",!0),e("table",qo,[e("thead",null,[e("tr",null,[e("th",So,t(l.$t("config.port_protocol")),1),e("th",Eo,t(l.$t("config.port_port")),1),e("th",Io,t(l.$t("config.port_note")),1)])]),e("tbody",null,[e("tr",null,[e("td",null,t(l.$t("config.port_tcp")),1),e("td",null,t(+n.value-5),1),s[10]||(s[10]=e("td",null,null,-1))]),e("tr",null,[e("td",null,t(l.$t("config.port_tcp")),1),e("td",null,t(+n.value),1),e("td",null,[+n.value!==z?(d(),c("div",Mo,[f(w(B),{size:20}),v(" "+t(l.$t("config.port_http_port_note")),1)])):p("",!0)])]),e("tr",null,[e("td",null,t(l.$t("config.port_tcp")),1),e("td",null,t(+n.value+1),1),e("td",null,t(l.$t("config.port_web_ui")),1)]),e("tr",null,[e("td",null,t(l.$t("config.port_tcp")),1),e("td",null,t(+n.value+21),1),s[11]||(s[11]=e("td",null,null,-1))]),e("tr",null,[e("td",null,t(l.$t("config.port_udp")),1),e("td",null,t(+n.value+9)+" - "+t(+n.value+11),1),s[12]||(s[12]=e("td",null,null,-1))])])]),o.value.origin_web_ui_allowed==="wan"?(d(),c("div",Do,[f(w(O),{size:20}),v(" "+t(l.$t("config.port_warning")),1)])):p("",!0)]),e("div",Ao,[e("label",Oo,t(l.$t("config.origin_web_ui_allowed")),1),_(e("select",{id:"origin_web_ui_allowed",class:"form-select","onUpdate:modelValue":s[4]||(s[4]=i=>o.value.origin_web_ui_allowed=i)},[e("option",Po,t(l.$t("config.origin_web_ui_allowed_pc")),1),e("option",Co,t(l.$t("config.origin_web_ui_allowed_lan")),1),e("option",To,t(l.$t("config.origin_web_ui_allowed_wan")),1)],512),[[h,o.value.origin_web_ui_allowed]]),e("div",No,t(l.$t("config.origin_web_ui_allowed_desc")),1)]),e("div",zo,[e("label",jo,t(l.$t("config.csrf_allowed_origins")),1),_(e("input",{type:"text",class:"form-control",id:"csrf_allowed_origins","onUpdate:modelValue":s[5]||(s[5]=i=>o.value.csrf_allowed_origins=i)},null,512),[[m,o.value.csrf_allowed_origins]]),e("div",Ho,t(l.$t("config.csrf_allowed_origins_desc")),1)]),e("div",Go,[e("label",Bo,t(l.$t("config.external_ip")),1),_(e("input",{type:"text",class:"form-control",id:"external_ip",placeholder:"123.456.789.12","onUpdate:modelValue":s[6]||(s[6]=i=>o.value.external_ip=i)},null,512),[[m,o.value.external_ip]]),e("div",Lo,t(l.$t("config.external_ip_desc")),1)]),e("div",Fo,[e("label",Ro,t(l.$t("config.lan_encryption_mode")),1),_(e("select",{id:"lan_encryption_mode",class:"form-select","onUpdate:modelValue":s[7]||(s[7]=i=>o.value.lan_encryption_mode=i)},[e("option",Qo,t(l.$t("_common.disabled_def")),1),e("option",Jo,t(l.$t("config.lan_encryption_mode_1")),1),e("option",Ko,t(l.$t("config.lan_encryption_mode_2")),1)],512),[[h,o.value.lan_encryption_mode]]),e("div",Xo,t(l.$t("config.lan_encryption_mode_desc")),1)]),e("div",Yo,[e("label",Wo,t(l.$t("config.wan_encryption_mode")),1),_(e("select",{id:"wan_encryption_mode",class:"form-select","onUpdate:modelValue":s[8]||(s[8]=i=>o.value.wan_encryption_mode=i)},[e("option",Zo,t(l.$t("_common.disabled")),1),e("option",xo,t(l.$t("config.wan_encryption_mode_1")),1),e("option",et,t(l.$t("config.wan_encryption_mode_2")),1)],512),[[h,o.value.wan_encryption_mode]]),e("div",ot,t(l.$t("config.wan_encryption_mode_desc")),1)]),e("div",tt,[e("label",lt,t(l.$t("config.ping_timeout")),1),_(e("input",{type:"text",class:"form-control",id:"ping_timeout",placeholder:"10000","onUpdate:modelValue":s[9]||(s[9]=i=>o.value.ping_timeout=i)},null,512),[[m,o.value.ping_timeout]]),e("div",nt,t(l.$t("config.ping_timeout_desc")),1)])]))}},at={id:"files",class:"config-page"},it={class:"mb-3"},dt={for:"file_apps",class:"form-label"},rt={class:"form-text"},ut={class:"mb-3"},_t={for:"credentials_file",class:"form-label"},ct={class:"form-text"},pt={class:"mb-3"},ft={for:"log_path",class:"form-label"},mt={class:"form-text"},vt={class:"mb-3"},gt={for:"pkey",class:"form-label"},$t={class:"form-text"},ht={class:"mb-3"},bt={for:"cert",class:"form-label"},yt={class:"form-text"},kt={class:"mb-3"},wt={for:"file_state",class:"form-label"},Vt={class:"form-text"},Ut={__name:"Files",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",at,[e("div",it,[e("label",dt,t(n.$t("config.file_apps")),1),_(e("input",{type:"text",class:"form-control",id:"file_apps",placeholder:"apps.json","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.file_apps=s)},null,512),[[m,o.value.file_apps]]),e("div",rt,t(n.$t("config.file_apps_desc")),1)]),e("div",ut,[e("label",_t,t(n.$t("config.credentials_file")),1),_(e("input",{type:"text",class:"form-control",id:"credentials_file",placeholder:"sunshine_state.json","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.credentials_file=s)},null,512),[[m,o.value.credentials_file]]),e("div",ct,t(n.$t("config.credentials_file_desc")),1)]),e("div",pt,[e("label",ft,t(n.$t("config.log_path")),1),_(e("input",{type:"text",class:"form-control",id:"log_path",placeholder:"sunshine.log","onUpdate:modelValue":l[2]||(l[2]=s=>o.value.log_path=s)},null,512),[[m,o.value.log_path]]),e("div",mt,t(n.$t("config.log_path_desc")),1)]),e("div",vt,[e("label",gt,t(n.$t("config.pkey")),1),_(e("input",{type:"text",class:"form-control",id:"pkey",placeholder:"/dir/pkey.pem","onUpdate:modelValue":l[3]||(l[3]=s=>o.value.pkey=s)},null,512),[[m,o.value.pkey]]),e("div",$t,t(n.$t("config.pkey_desc")),1)]),e("div",ht,[e("label",bt,t(n.$t("config.cert")),1),_(e("input",{type:"text",class:"form-control",id:"cert",placeholder:"/dir/cert.pem","onUpdate:modelValue":l[4]||(l[4]=s=>o.value.cert=s)},null,512),[[m,o.value.cert]]),e("div",yt,t(n.$t("config.cert_desc")),1)]),e("div",kt,[e("label",wt,t(n.$t("config.file_state")),1),_(e("input",{type:"text",class:"form-control",id:"file_state",placeholder:"sunshine_state.json","onUpdate:modelValue":l[5]||(l[5]=s=>o.value.file_state=s)},null,512),[[m,o.value.file_state]]),e("div",Vt,t(n.$t("config.file_state_desc")),1)])]))}},qt={class:"config-page"},St={class:"mb-3"},Et={for:"fec_percentage",class:"form-label"},It={class:"form-text"},Mt={class:"mb-3"},Dt={for:"qp",class:"form-label"},At={class:"form-text"},Ot={class:"mb-3"},Pt={for:"min_threads",class:"form-label"},Ct={class:"form-text"},Tt={class:"mb-3"},Nt={for:"hevc_mode",class:"form-label"},zt={value:"0"},jt={value:"1"},Ht={value:"2"},Gt={value:"3"},Bt={class:"form-text"},Lt={class:"mb-3"},Ft={for:"av1_mode",class:"form-label"},Rt={value:"0"},Qt={value:"1"},Jt={value:"2"},Kt={value:"3"},Xt={class:"form-text"},Yt={key:0,class:"mb-3"},Wt={for:"capture",class:"form-label"},Zt={value:""},xt={value:"wgc"},el={class:"form-text"},ol={class:"mb-3"},tl={for:"encoder",class:"form-label"},ll={value:""},nl={value:"software"},sl={class:"form-text"},al={__name:"Advanced",props:["platform","config","global_prep_cmd"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",qt,[e("div",St,[e("label",Et,t(n.$t("config.fec_percentage")),1),_(e("input",{type:"text",class:"form-control",id:"fec_percentage",placeholder:"20","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.fec_percentage=s)},null,512),[[m,o.value.fec_percentage]]),e("div",It,t(n.$t("config.fec_percentage_desc")),1)]),e("div",Mt,[e("label",Dt,t(n.$t("config.qp")),1),_(e("input",{type:"number",class:"form-control",id:"qp",placeholder:"28","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.qp=s)},null,512),[[m,o.value.qp]]),e("div",At,t(n.$t("config.qp_desc")),1)]),e("div",Ot,[e("label",Pt,t(n.$t("config.min_threads")),1),_(e("input",{type:"number",class:"form-control",id:"min_threads",placeholder:"2",min:"1","onUpdate:modelValue":l[2]||(l[2]=s=>o.value.min_threads=s)},null,512),[[m,o.value.min_threads]]),e("div",Ct,t(n.$t("config.min_threads_desc")),1)]),e("div",Tt,[e("label",Nt,t(n.$t("config.hevc_mode")),1),_(e("select",{id:"hevc_mode",class:"form-select","onUpdate:modelValue":l[3]||(l[3]=s=>o.value.hevc_mode=s)},[e("option",zt,t(n.$t("config.hevc_mode_0")),1),e("option",jt,t(n.$t("config.hevc_mode_1")),1),e("option",Ht,t(n.$t("config.hevc_mode_2")),1),e("option",Gt,t(n.$t("config.hevc_mode_3")),1)],512),[[h,o.value.hevc_mode]]),e("div",Bt,t(n.$t("config.hevc_mode_desc")),1)]),e("div",Lt,[e("label",Ft,t(n.$t("config.av1_mode")),1),_(e("select",{id:"av1_mode",class:"form-select","onUpdate:modelValue":l[4]||(l[4]=s=>o.value.av1_mode=s)},[e("option",Rt,t(n.$t("config.av1_mode_0")),1),e("option",Qt,t(n.$t("config.av1_mode_1")),1),e("option",Jt,t(n.$t("config.av1_mode_2")),1),e("option",Kt,t(n.$t("config.av1_mode_3")),1)],512),[[h,o.value.av1_mode]]),e("div",Xt,t(n.$t("config.av1_mode_desc")),1)]),a.platform!=="macos"?(d(),c("div",Yt,[e("label",Wt,t(n.$t("config.capture")),1),_(e("select",{id:"capture",class:"form-select","onUpdate:modelValue":l[5]||(l[5]=s=>o.value.capture=s)},[e("option",Zt,t(n.$t("_common.autodetect")),1),f(S,{platform:a.platform},{freebsd:b(()=>[...l[7]||(l[7]=[e("option",{value:"wlr"},"wlroots",-1),e("option",{value:"x11"},"X11",-1),e("option",{value:"portal"},"XDG Portal",-1)])]),linux:b(()=>[...l[8]||(l[8]=[e("option",{value:"nvfbc"},"NvFBC",-1),e("option",{value:"wlr"},"wlroots",-1),e("option",{value:"kms"},"KMS",-1),e("option",{value:"x11"},"X11",-1),e("option",{value:"portal"},"XDG Portal",-1)])]),windows:b(()=>[l[9]||(l[9]=e("option",{value:"ddx"},"Desktop Duplication API",-1)),e("option",xt,"Windows.Graphics.Capture "+t(n.$t("_common.beta")),1)]),_:1},8,["platform"])],512),[[h,o.value.capture]]),e("div",el,t(n.$t("config.capture_desc")),1)])):p("",!0),e("div",ol,[e("label",tl,t(n.$t("config.encoder")),1),_(e("select",{id:"encoder",class:"form-select","onUpdate:modelValue":l[6]||(l[6]=s=>o.value.encoder=s)},[e("option",ll,t(n.$t("_common.autodetect")),1),f(S,{platform:a.platform},{windows:b(()=>[...l[10]||(l[10]=[e("option",{value:"nvenc"},"NVIDIA NVENC",-1),e("option",{value:"quicksync"},"Intel QuickSync",-1),e("option",{value:"amdvce"},"AMD AMF/VCE",-1)])]),freebsd:b(()=>[...l[11]||(l[11]=[e("option",{value:"vulkan"},"Vulkan",-1),e("option",{value:"vaapi"},"VA-API",-1)])]),linux:b(()=>[...l[12]||(l[12]=[e("option",{value:"nvenc"},"NVIDIA NVENC",-1),e("option",{value:"vaapi"},"VA-API",-1),e("option",{value:"vulkan"},"Vulkan",-1)])]),macos:b(()=>[...l[13]||(l[13]=[e("option",{value:"videotoolbox"},"VideoToolbox",-1)])]),_:1},8,["platform"]),e("option",nl,t(n.$t("config.encoder_software")),1)],512),[[h,o.value.encoder]]),e("div",sl,t(n.$t("config.encoder_desc")),1)])]))}};class il{constructor(r){this.platform=r}getPlatformKey(r,o){return r+"_"+o}getMessageUsingPlatform(r,o){const n=this.getPlatformKey(r,this.platform),l=T("i18n");let s=l.t(n);if(s!==n)return s;if(this.platform==="windows")return o||s;const i=this.getPlatformKey(r,"unix");return s=l.t(i),s===i&&o?o:s}}function dl(a){if(a||(a=T("platform").value),!a)throw"platform argument missing";return T("platformMessage",()=>new il(a),!0)}function A(a,r){return dl().getMessageUsingPlatform(a,r)}const rl={key:0,class:"mb-3"},ul={for:"adapter_name",class:"form-label"},_l=["placeholder"],cl={class:"form-text"},pl={__name:"AdapterNameSelector",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>a.platform!=="macos"?(d(),c("div",rl,[e("label",ul,t(n.$t("config.adapter_name")),1),_(e("input",{type:"text",class:"form-control",id:"adapter_name",placeholder:w(A)("config.adapter_name_placeholder","/dev/dri/renderD128"),"onUpdate:modelValue":l[0]||(l[0]=s=>o.value.adapter_name=s)},null,8,_l),[[m,o.value.adapter_name]]),e("div",cl,[f(S,{platform:a.platform},{windows:b(()=>[v(t(n.$t("config.adapter_name_desc_windows")),1),l[1]||(l[1]=e("br",null,null,-1)),l[2]||(l[2]=e("pre",null,"tools\\dxgi-info.exe",-1))]),freebsd:b(()=>[v(t(n.$t("config.adapter_name_desc_linux_1")),1),l[3]||(l[3]=e("br",null,null,-1)),e("pre",null,"ls /dev/dri/renderD*  # "+t(n.$t("config.adapter_name_desc_linux_2")),1),l[4]||(l[4]=e("pre",null,`              vainfo --display drm --device /dev/dri/renderD129 | \\
                grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version"
            `,-1)),v(" "+t(n.$t("config.adapter_name_desc_linux_3")),1),l[5]||(l[5]=e("br",null,null,-1)),l[6]||(l[6]=e("i",null,"VAProfileH264High : VAEntrypointEncSlice",-1))]),linux:b(()=>[v(t(n.$t("config.adapter_name_desc_linux_1")),1),l[7]||(l[7]=e("br",null,null,-1)),e("pre",null,"ls /dev/dri/renderD*  # "+t(n.$t("config.adapter_name_desc_linux_2")),1),l[8]||(l[8]=e("pre",null,`              vainfo --display drm --device /dev/dri/renderD129 | \\
                grep -E "((VAProfileH264High|VAProfileHEVCMain|VAProfileHEVCMain10).*VAEntrypointEncSlice)|Driver version"
            `,-1)),v(" "+t(n.$t("config.adapter_name_desc_linux_3")),1),l[9]||(l[9]=e("br",null,null,-1)),l[10]||(l[10]=e("i",null,"VAProfileH264High : VAEntrypointEncSlice",-1))]),_:1},8,["platform"])])])):p("",!0)}},fl={class:"mb-3"},ml={for:"output_name",class:"form-label"},vl=["placeholder"],gl={class:"form-text"},$l={__name:"DisplayOutputSelector",props:["platform","config"],setup(a){const r=a,o=y(r.config),n=r.platform==="windows"?"{de9bb7e2-186e-505b-9e93-f48793333810}":"0";return(l,s)=>(d(),c("div",fl,[e("label",ml,t(l.$t("config.output_name")),1),_(e("input",{type:"text",class:"form-control",id:"output_name",placeholder:w(n),"onUpdate:modelValue":s[0]||(s[0]=i=>o.value.output_name=i)},null,8,vl),[[m,o.value.output_name]]),e("div",gl,[v(t(w(A)("config.output_name_desc")),1),s[5]||(s[5]=e("br",null,null,-1)),f(S,{platform:a.platform},{windows:b(()=>[...s[1]||(s[1]=[e("pre",{style:{"white-space":"pre-line"}},[v("            "),e("b",null,"  {"),v(`
            `),e("b",null,'    "device_id": "{de9bb7e2-186e-505b-9e93-f48793333810}"'),v(`
            `),e("b",null,'    "display_name": "\\\\\\\\.\\\\DISPLAY1"'),v(`
            `),e("b",null,'    "friendly_name": "ROG PG279Q"'),v(`
            `),e("b",null,"    ..."),v(`
            `),e("b",null,"  }"),v(`
          `)],-1)])]),freebsd:b(()=>[...s[2]||(s[2]=[e("pre",{style:{"white-space":"pre-line"}},`            Info: Detecting displays
            Info: Detected display: DVI-D-0 (id: 0) connected: false
            Info: Detected display: HDMI-0 (id: 1) connected: true
            Info: Detected display: DP-0 (id: 2) connected: true
            Info: Detected display: DP-1 (id: 3) connected: false
            Info: Detected display: DVI-D-1 (id: 4) connected: false
          `,-1)])]),linux:b(()=>[...s[3]||(s[3]=[e("pre",{style:{"white-space":"pre-line"}},`            Info: Detecting displays
            Info: Detected display: DVI-D-0 (id: 0) connected: false
            Info: Detected display: HDMI-0 (id: 1) connected: true
            Info: Detected display: DP-0 (id: 2) connected: true
            Info: Detected display: DP-1 (id: 3) connected: false
            Info: Detected display: DVI-D-1 (id: 4) connected: false
          `,-1)])]),macos:b(()=>[...s[4]||(s[4]=[e("pre",{style:{"white-space":"pre-line"}},`            Info: Detecting displays
            Info: Detected display: Monitor-0 (id: 3) connected: true
            Info: Detected display: Monitor-1 (id: 2) connected: true
          `,-1)])]),_:1},8,["platform"])])]))}},hl={class:"mb-3 accordion"},bl={class:"accordion-item"},yl={class:"accordion-header"},kl={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},wl={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},Vl={class:"accordion-body"},Ul={class:"mb-3"},ql={for:"dd_configuration_option",class:"form-label"},Sl={value:"disabled"},El={value:"verify_only"},Il={value:"ensure_active"},Ml={value:"ensure_primary"},Dl={value:"ensure_only_display"},Al={key:0,class:"mb-3"},Ol={for:"dd_resolution_option",class:"form-label"},Pl={value:"disabled"},Cl={value:"auto"},Tl={value:"manual"},Nl={key:0,class:"form-text"},zl={key:1,class:"mt-2 ps-4"},jl={class:"form-text"},Hl={key:1,class:"mb-3"},Gl={for:"dd_refresh_rate_option",class:"form-label"},Bl={value:"disabled"},Ll={value:"auto"},Fl={value:"manual"},Rl={key:0,class:"mt-2 ps-4"},Ql={class:"form-text"},Jl={key:2,class:"mb-3"},Kl={for:"dd_hdr_option",class:"form-label"},Xl={value:"disabled"},Yl={value:"auto"},Wl={for:"dd_wa_hdr_toggle_delay",class:"form-label"},Zl={class:"form-text"},xl={key:3,class:"mb-3"},en={for:"dd_config_revert_delay",class:"form-label"},on={class:"form-text"},tn={key:4,class:"mb-3"},ln={key:5,class:"mb-3"},nn={for:"dd_mode_remapping",class:"form-label"},sn={id:"dd_mode_remapping",class:"d-flex flex-column"},an={class:"form-text"},dn={key:0,class:"table"},rn={key:0,scope:"col"},un={key:1,scope:"col"},_n={key:2,scope:"col"},cn={key:3,scope:"col"},pn={key:0},fn=["onUpdate:modelValue"],mn={key:1},vn=["onUpdate:modelValue"],gn={key:2},$n=["onUpdate:modelValue"],hn={key:3},bn=["onUpdate:modelValue"],yn=["onClick"],M="refresh_rate_only",E="resolution_only",P="mixed",kn={__name:"DisplayDeviceOptions",props:{platform:String,config:Object},setup(a){const o=y(a.config);function n(){return(o.value.dd_resolution_option==="auto"||o.value.dd_refresh_rate_option==="auto")&&o.value.dd_configuration_option!=="disabled"}function l(){return o.value.dd_resolution_option!=="auto"?M:o.value.dd_refresh_rate_option!=="auto"?E:P}function s(){const i=l();let u={};i!==E&&(u.requested_fps="",u.final_refresh_rate=""),i!==M&&(u.requested_resolution="",u.final_resolution=""),o.value.dd_mode_remapping[i].push(u)}return(i,u)=>(d(),k(S,{platform:a.platform},{windows:b(()=>[e("div",hl,[e("div",bl,[e("h2",yl,[e("button",kl,t(i.$t("config.dd_options_header")),1)]),e("div",wl,[e("div",Vl,[e("div",Ul,[e("label",ql,t(i.$t("config.dd_configuration_option")),1),_(e("select",{id:"dd_configuration_option",class:"form-select","onUpdate:modelValue":u[0]||(u[0]=g=>o.value.dd_configuration_option=g)},[e("option",Sl,t(i.$t("_common.disabled_def")),1),e("option",El,t(i.$t("config.dd_config_verify_only")),1),e("option",Il,t(i.$t("config.dd_config_ensure_active")),1),e("option",Ml,t(i.$t("config.dd_config_ensure_primary")),1),e("option",Dl,t(i.$t("config.dd_config_ensure_only_display")),1)],512),[[h,o.value.dd_configuration_option]])]),o.value.dd_configuration_option!=="disabled"?(d(),c("div",Al,[e("label",Ol,t(i.$t("config.dd_resolution_option")),1),_(e("select",{id:"dd_resolution_option",class:"form-select","onUpdate:modelValue":u[1]||(u[1]=g=>o.value.dd_resolution_option=g)},[e("option",Pl,t(i.$t("config.dd_resolution_option_disabled")),1),e("option",Cl,t(i.$t("config.dd_resolution_option_auto")),1),e("option",Tl,t(i.$t("config.dd_resolution_option_manual")),1)],512),[[h,o.value.dd_resolution_option]]),o.value.dd_resolution_option==="auto"||o.value.dd_resolution_option==="manual"?(d(),c("div",Nl,t(i.$t("config.dd_resolution_option_ogs_desc")),1)):p("",!0),o.value.dd_resolution_option==="manual"?(d(),c("div",zl,[e("div",jl,t(i.$t("config.dd_manual_resolution")),1),_(e("input",{type:"text",class:"form-control",id:"dd_manual_resolution",placeholder:"2560x1440","onUpdate:modelValue":u[2]||(u[2]=g=>o.value.dd_manual_resolution=g)},null,512),[[m,o.value.dd_manual_resolution]])])):p("",!0)])):p("",!0),o.value.dd_configuration_option!=="disabled"?(d(),c("div",Hl,[e("label",Gl,t(i.$t("config.dd_refresh_rate_option")),1),_(e("select",{id:"dd_refresh_rate_option",class:"form-select","onUpdate:modelValue":u[3]||(u[3]=g=>o.value.dd_refresh_rate_option=g)},[e("option",Bl,t(i.$t("config.dd_refresh_rate_option_disabled")),1),e("option",Ll,t(i.$t("config.dd_refresh_rate_option_auto")),1),e("option",Fl,t(i.$t("config.dd_refresh_rate_option_manual")),1)],512),[[h,o.value.dd_refresh_rate_option]]),o.value.dd_refresh_rate_option==="manual"?(d(),c("div",Rl,[e("div",Ql,t(i.$t("config.dd_manual_refresh_rate")),1),_(e("input",{type:"text",class:"form-control",id:"dd_manual_refresh_rate",placeholder:"59.9558","onUpdate:modelValue":u[4]||(u[4]=g=>o.value.dd_manual_refresh_rate=g)},null,512),[[m,o.value.dd_manual_refresh_rate]])])):p("",!0)])):p("",!0),o.value.dd_configuration_option!=="disabled"?(d(),c("div",Jl,[e("label",Kl,t(i.$t("config.dd_hdr_option")),1),_(e("select",{id:"dd_hdr_option",class:"mb-3 form-select","onUpdate:modelValue":u[5]||(u[5]=g=>o.value.dd_hdr_option=g)},[e("option",Xl,t(i.$t("config.dd_hdr_option_disabled")),1),e("option",Yl,t(i.$t("config.dd_hdr_option_auto")),1)],512),[[h,o.value.dd_hdr_option]]),e("label",Wl,t(i.$t("config.dd_wa_hdr_toggle_delay")),1),_(e("input",{type:"number",class:"form-control",id:"dd_wa_hdr_toggle_delay",placeholder:"0",min:"0",max:"3000","onUpdate:modelValue":u[6]||(u[6]=g=>o.value.dd_wa_hdr_toggle_delay=g)},null,512),[[m,o.value.dd_wa_hdr_toggle_delay]]),e("div",Zl,[v(t(i.$t("config.dd_wa_hdr_toggle_delay_desc_1"))+" ",1),u[10]||(u[10]=e("br",null,null,-1)),v(" "+t(i.$t("config.dd_wa_hdr_toggle_delay_desc_2"))+" ",1),u[11]||(u[11]=e("br",null,null,-1)),v(" "+t(i.$t("config.dd_wa_hdr_toggle_delay_desc_3")),1)])])):p("",!0),o.value.dd_configuration_option!=="disabled"?(d(),c("div",xl,[e("label",en,t(i.$t("config.dd_config_revert_delay")),1),_(e("input",{type:"number",class:"form-control",id:"dd_config_revert_delay",placeholder:"3000",min:"0","onUpdate:modelValue":u[7]||(u[7]=g=>o.value.dd_config_revert_delay=g)},null,512),[[m,o.value.dd_config_revert_delay]]),e("div",on,t(i.$t("config.dd_config_revert_delay_desc")),1)])):p("",!0),o.value.dd_configuration_option!=="disabled"?(d(),c("div",tn,[f($,{id:"dd_config_revert_on_disconnect","locale-prefix":"config",modelValue:o.value.dd_config_revert_on_disconnect,"onUpdate:modelValue":u[8]||(u[8]=g=>o.value.dd_config_revert_on_disconnect=g),default:"false"},null,8,["modelValue"])])):p("",!0),n()?(d(),c("div",ln,[e("label",nn,t(i.$t("config.dd_mode_remapping")),1),e("div",sn,[e("div",an,[v(t(i.$t("config.dd_mode_remapping_desc_1")),1),u[14]||(u[14]=e("br",null,null,-1)),v(" "+t(i.$t("config.dd_mode_remapping_desc_2")),1),u[15]||(u[15]=e("br",null,null,-1)),v(" "+t(i.$t("config.dd_mode_remapping_desc_3")),1),u[16]||(u[16]=e("br",null,null,-1)),v(" "+t(i.$t(l()===P?"config.dd_mode_remapping_desc_4_final_values_mixed":"config.dd_mode_remapping_desc_4_final_values_non_mixed")),1),u[17]||(u[17]=e("br",null,null,-1)),l()===P?(d(),c(V,{key:0},[v(t(i.$t("config.dd_mode_remapping_desc_5_sops_mixed_only")),1),u[12]||(u[12]=e("br",null,null,-1))],64)):p("",!0),l()===E?(d(),c(V,{key:1},[v(t(i.$t("config.dd_mode_remapping_desc_5_sops_resolution_only")),1),u[13]||(u[13]=e("br",null,null,-1))],64)):p("",!0)])]),o.value.dd_mode_remapping[l()].length>0?(d(),c("table",dn,[e("thead",null,[e("tr",null,[l()!==M?(d(),c("th",rn,t(i.$t("config.dd_mode_remapping_requested_resolution")),1)):p("",!0),l()!==E?(d(),c("th",un,t(i.$t("config.dd_mode_remapping_requested_fps")),1)):p("",!0),l()!==M?(d(),c("th",_n,t(i.$t("config.dd_mode_remapping_final_resolution")),1)):p("",!0),l()!==E?(d(),c("th",cn,t(i.$t("config.dd_mode_remapping_final_refresh_rate")),1)):p("",!0),u[18]||(u[18]=e("th",{scope:"col"},null,-1))])]),e("tbody",null,[(d(!0),c(V,null,H(o.value.dd_mode_remapping[l()],(g,U)=>(d(),c("tr",null,[l()!==M?(d(),c("td",pn,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.requested_resolution=q,placeholder:"1920x1080"},null,8,fn),[[m,g.requested_resolution]])])):p("",!0),l()!==E?(d(),c("td",mn,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.requested_fps=q,placeholder:"60"},null,8,vn),[[m,g.requested_fps]])])):p("",!0),l()!==M?(d(),c("td",gn,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.final_resolution=q,placeholder:"2560x1440"},null,8,$n),[[m,g.final_resolution]])])):p("",!0),l()!==E?(d(),c("td",hn,[_(e("input",{type:"text",class:"form-control monospace","onUpdate:modelValue":q=>g.final_refresh_rate=q,placeholder:"119.95"},null,8,bn),[[m,g.final_refresh_rate]])])):p("",!0),e("td",null,[e("button",{class:"btn btn-danger",onClick:q=>o.value.dd_mode_remapping[l()].splice(U,1)},[f(w(G),{size:16})],8,yn)])]))),256))])])):p("",!0),e("button",{class:"ms-0 mt-2 btn btn-success",style:{margin:"0 auto"},onClick:u[9]||(u[9]=g=>s())}," + "+t(i.$t("config.dd_mode_remapping_add")),1)])):p("",!0)])])])])]),freebsd:b(()=>[...u[19]||(u[19]=[])]),linux:b(()=>[...u[20]||(u[20]=[])]),macos:b(()=>[...u[21]||(u[21]=[])]),_:1},8,["platform"]))}},wn={class:"mb-3"},Vn={for:"max_bitrate",class:"form-label"},Un={class:"form-text"},qn={class:"mb-3"},Sn={for:"minimum_fps_target",class:"form-label"},En={class:"form-text"},In={__name:"DisplayModesSettings",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c(V,null,[e("div",wn,[e("label",Vn,t(n.$t("config.max_bitrate")),1),_(e("input",{type:"number",class:"form-control",id:"max_bitrate",placeholder:"0","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.max_bitrate=s)},null,512),[[m,o.value.max_bitrate]]),e("div",Un,t(n.$t("config.max_bitrate_desc")),1)]),e("div",qn,[e("label",Sn,t(n.$t("config.minimum_fps_target")),1),_(e("input",{type:"number",min:"0",max:"1000",class:"form-control",id:"minimum_fps_target",placeholder:"0","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.minimum_fps_target=s)},null,512),[[m,o.value.minimum_fps_target]]),e("div",En,t(n.$t("config.minimum_fps_target_desc")),1)])],64))}},Mn=L(In,[["__scopeId","data-v-0714bb25"]]),Dn={id:"audio-video",class:"config-page"},An={class:"mb-3"},On={for:"audio_sink",class:"form-label"},Pn=["placeholder"],Cn={class:"form-text"},Tn={class:"mb-3"},Nn={for:"virtual_sink",class:"form-label"},zn=["placeholder"],jn={class:"form-text"},Hn={__name:"AudioVideo",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Dn,[e("div",An,[e("label",On,t(n.$t("config.audio_sink")),1),_(e("input",{type:"text",class:"form-control",id:"audio_sink",placeholder:w(A)("config.audio_sink_placeholder","alsa_output.pci-0000_09_00.3.analog-stereo"),"onUpdate:modelValue":l[0]||(l[0]=s=>o.value.audio_sink=s)},null,8,Pn),[[m,o.value.audio_sink]]),e("div",Cn,[v(t(w(A)("config.audio_sink_desc")),1),l[8]||(l[8]=e("br",null,null,-1)),f(S,{platform:a.platform},{windows:b(()=>[...l[4]||(l[4]=[e("pre",null,"tools\\audio-info.exe",-1)])]),freebsd:b(()=>[...l[5]||(l[5]=[e("pre",null,'pacmd list-sinks | grep "name:"',-1),e("pre",null,"pactl info | grep Source",-1)])]),linux:b(()=>[...l[6]||(l[6]=[e("pre",null,'pacmd list-sinks | grep "name:"',-1),e("pre",null,"pactl info | grep Source",-1)])]),macos:b(()=>[...l[7]||(l[7]=[e("a",{href:"https://github.com/mattingalls/Soundflower",target:"_blank"},"Soundflower",-1),e("br",null,null,-1),e("a",{href:"https://github.com/ExistentialAudio/BlackHole",target:"_blank"},"BlackHole",-1),v(". ",-1)])]),_:1},8,["platform"])])]),f(S,{platform:a.platform},{windows:b(()=>[e("div",Tn,[e("label",Nn,t(n.$t("config.virtual_sink")),1),_(e("input",{type:"text",class:"form-control",id:"virtual_sink",placeholder:n.$t("config.virtual_sink_placeholder"),"onUpdate:modelValue":l[1]||(l[1]=s=>o.value.virtual_sink=s)},null,8,zn),[[m,o.value.virtual_sink]]),e("div",jn,t(n.$t("config.virtual_sink_desc")),1)]),f($,{class:"mb-3",id:"install_steam_audio_drivers","locale-prefix":"config",modelValue:o.value.install_steam_audio_drivers,"onUpdate:modelValue":l[2]||(l[2]=s=>o.value.install_steam_audio_drivers=s),default:"true"},null,8,["modelValue"])]),_:1},8,["platform"]),f($,{class:"mb-3",id:"stream_audio","locale-prefix":"config",modelValue:o.value.stream_audio,"onUpdate:modelValue":l[3]||(l[3]=s=>o.value.stream_audio=s),default:"true"},null,8,["modelValue"]),f(pl,{platform:a.platform,config:o.value},null,8,["platform","config"]),f($l,{platform:a.platform,config:o.value},null,8,["platform","config"]),f(kn,{platform:a.platform,config:o.value},null,8,["platform","config"]),f(Mn,{platform:a.platform,config:o.value},null,8,["platform","config"])]))}},Gn={id:"nvidia-nvenc-encoder",class:"config-page"},Bn={class:"mb-3"},Ln={for:"nvenc_preset",class:"form-label"},Fn={value:"1"},Rn={value:"7"},Qn={class:"form-text"},Jn={class:"mb-3"},Kn={for:"nvenc_twopass",class:"form-label"},Xn={value:"disabled"},Yn={value:"quarter_res"},Wn={value:"full_res"},Zn={class:"form-text"},xn={class:"mb-3"},es={for:"nvenc_vbv_increase",class:"form-label"},os={class:"form-text"},ts={class:"mb-3 accordion"},ls={class:"accordion-item"},ns={class:"accordion-header"},ss={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},as={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},is={class:"accordion-body"},ds={__name:"NvidiaNvencEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Gn,[e("div",Bn,[e("label",Ln,t(n.$t("config.nvenc_preset")),1),_(e("select",{id:"nvenc_preset",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.nvenc_preset=s)},[e("option",Fn,"P1 "+t(n.$t("config.nvenc_preset_1")),1),l[8]||(l[8]=j('<option value="2">P2</option><option value="3">P3</option><option value="4">P4</option><option value="5">P5</option><option value="6">P6</option>',5)),e("option",Rn,"P7 "+t(n.$t("config.nvenc_preset_7")),1)],512),[[h,o.value.nvenc_preset]]),e("div",Qn,t(n.$t("config.nvenc_preset_desc")),1)]),e("div",Jn,[e("label",Kn,t(n.$t("config.nvenc_twopass")),1),_(e("select",{id:"nvenc_twopass",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.nvenc_twopass=s)},[e("option",Xn,t(n.$t("config.nvenc_twopass_disabled")),1),e("option",Yn,t(n.$t("config.nvenc_twopass_quarter_res")),1),e("option",Wn,t(n.$t("config.nvenc_twopass_full_res")),1)],512),[[h,o.value.nvenc_twopass]]),e("div",Zn,t(n.$t("config.nvenc_twopass_desc")),1)]),f($,{class:"mb-3",id:"nvenc_spatial_aq","locale-prefix":"config",modelValue:o.value.nvenc_spatial_aq,"onUpdate:modelValue":l[2]||(l[2]=s=>o.value.nvenc_spatial_aq=s),default:"false"},null,8,["modelValue"]),e("div",xn,[e("label",es,t(n.$t("config.nvenc_vbv_increase")),1),_(e("input",{type:"number",min:"0",max:"400",class:"form-control",id:"nvenc_vbv_increase",placeholder:"0","onUpdate:modelValue":l[3]||(l[3]=s=>o.value.nvenc_vbv_increase=s)},null,512),[[m,o.value.nvenc_vbv_increase]]),e("div",os,[v(t(n.$t("config.nvenc_vbv_increase_desc")),1),l[9]||(l[9]=e("br",null,null,-1)),l[10]||(l[10]=e("br",null,null,-1)),l[11]||(l[11]=e("a",{href:"https://en.wikipedia.org/wiki/Video_buffering_verifier"},"VBV/HRD",-1))])]),e("div",ts,[e("div",ls,[e("h2",ns,[e("button",ss,t(n.$t("config.misc")),1)]),e("div",as,[e("div",is,[a.platform==="windows"?(d(),k($,{key:0,class:"mb-3",id:"nvenc_realtime_hags","locale-prefix":"config",modelValue:o.value.nvenc_realtime_hags,"onUpdate:modelValue":l[4]||(l[4]=s=>o.value.nvenc_realtime_hags=s),default:"true"},{default:b(()=>[...l[12]||(l[12]=[e("br",null,null,-1),e("br",null,null,-1),e("a",{href:"https://devblogs.microsoft.com/directx/hardware-accelerated-gpu-scheduling/"},"HAGS",-1)])]),_:1},8,["modelValue"])):p("",!0),a.platform==="windows"?(d(),k($,{key:1,class:"mb-3",id:"nvenc_latency_over_power","locale-prefix":"config",modelValue:o.value.nvenc_latency_over_power,"onUpdate:modelValue":l[5]||(l[5]=s=>o.value.nvenc_latency_over_power=s),default:"true"},null,8,["modelValue"])):p("",!0),a.platform==="windows"?(d(),k($,{key:2,class:"mb-3",id:"nvenc_opengl_vulkan_on_dxgi","locale-prefix":"config",modelValue:o.value.nvenc_opengl_vulkan_on_dxgi,"onUpdate:modelValue":l[6]||(l[6]=s=>o.value.nvenc_opengl_vulkan_on_dxgi=s),default:"true"},null,8,["modelValue"])):p("",!0),f($,{class:"mb-3",id:"nvenc_h264_cavlc","locale-prefix":"config",modelValue:o.value.nvenc_h264_cavlc,"onUpdate:modelValue":l[7]||(l[7]=s=>o.value.nvenc_h264_cavlc=s),default:"false"},null,8,["modelValue"])])])])])]))}},rs={id:"intel-quicksync-encoder",class:"config-page"},us={class:"mb-3"},_s={for:"qsv_preset",class:"form-label"},cs={value:"veryfast"},ps={value:"faster"},fs={value:"fast"},ms={value:"medium"},vs={value:"slow"},gs={value:"slower"},$s={value:"slowest"},hs={class:"mb-3"},bs={for:"qsv_coder",class:"form-label"},ys={value:"auto"},ks={value:"cabac"},ws={value:"cavlc"},Vs={__name:"IntelQuickSyncEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",rs,[e("div",us,[e("label",_s,t(n.$t("config.qsv_preset")),1),_(e("select",{id:"qsv_preset",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.qsv_preset=s)},[e("option",cs,t(n.$t("config.qsv_preset_veryfast")),1),e("option",ps,t(n.$t("config.qsv_preset_faster")),1),e("option",fs,t(n.$t("config.qsv_preset_fast")),1),e("option",ms,t(n.$t("config.qsv_preset_medium")),1),e("option",vs,t(n.$t("config.qsv_preset_slow")),1),e("option",gs,t(n.$t("config.qsv_preset_slower")),1),e("option",$s,t(n.$t("config.qsv_preset_slowest")),1)],512),[[h,o.value.qsv_preset]])]),e("div",hs,[e("label",bs,t(n.$t("config.qsv_coder")),1),_(e("select",{id:"qsv_coder",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.qsv_coder=s)},[e("option",ys,t(n.$t("config.ffmpeg_auto")),1),e("option",ks,t(n.$t("config.coder_cabac")),1),e("option",ws,t(n.$t("config.coder_cavlc")),1)],512),[[h,o.value.qsv_coder]])]),f($,{class:"mb-3",id:"qsv_slow_hevc","locale-prefix":"config",modelValue:o.value.qsv_slow_hevc,"onUpdate:modelValue":l[2]||(l[2]=s=>o.value.qsv_slow_hevc=s),default:"false"},null,8,["modelValue"])]))}},Us={id:"amd-amf-encoder",class:"config-page"},qs={class:"mb-3"},Ss={for:"amd_usage",class:"form-label"},Es={value:"transcoding"},Is={value:"webcam"},Ms={value:"lowlatency_high_quality"},Ds={value:"lowlatency"},As={value:"ultralowlatency"},Os={class:"form-text"},Ps={class:"mb-3 accordion"},Cs={class:"accordion-item"},Ts={class:"accordion-header"},Ns={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne"},zs={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingOne"},js={class:"accordion-body"},Hs={class:"mb-3"},Gs={for:"amd_rc",class:"form-label"},Bs={value:"cbr"},Ls={value:"cqp"},Fs={value:"vbr_latency"},Rs={value:"vbr_peak"},Qs={class:"form-text"},Js={class:"mb-3 accordion"},Ks={class:"accordion-item"},Xs={class:"accordion-header"},Ys={class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseTwo"},Ws={id:"panelsStayOpen-collapseTwo",class:"accordion-collapse collapse show","aria-labelledby":"panelsStayOpen-headingTwo"},Zs={class:"accordion-body"},xs={class:"mb-3"},ea={for:"amd_quality",class:"form-label"},oa={value:"speed"},ta={value:"balanced"},la={value:"quality"},na={class:"form-text"},sa={class:"mb-3"},aa={for:"amd_coder",class:"form-label"},ia={value:"auto"},da={value:"cabac"},ra={value:"cavlc"},ua={class:"form-text"},_a={__name:"AmdAmfEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Us,[e("div",qs,[e("label",Ss,t(n.$t("config.amd_usage")),1),_(e("select",{id:"amd_usage",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.amd_usage=s)},[e("option",Es,t(n.$t("config.amd_usage_transcoding")),1),e("option",Is,t(n.$t("config.amd_usage_webcam")),1),e("option",Ms,t(n.$t("config.amd_usage_lowlatency_high_quality")),1),e("option",Ds,t(n.$t("config.amd_usage_lowlatency")),1),e("option",As,t(n.$t("config.amd_usage_ultralowlatency")),1)],512),[[h,o.value.amd_usage]]),e("div",Os,t(n.$t("config.amd_usage_desc")),1)]),e("div",Ps,[e("div",Cs,[e("h2",Ts,[e("button",Ns,t(n.$t("config.amd_rc_group")),1)]),e("div",zs,[e("div",js,[e("div",Hs,[e("label",Gs,t(n.$t("config.amd_rc")),1),_(e("select",{id:"amd_rc",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.amd_rc=s)},[e("option",Bs,t(n.$t("config.amd_rc_cbr")),1),e("option",Ls,t(n.$t("config.amd_rc_cqp")),1),e("option",Fs,t(n.$t("config.amd_rc_vbr_latency")),1),e("option",Rs,t(n.$t("config.amd_rc_vbr_peak")),1)],512),[[h,o.value.amd_rc]]),e("div",Qs,t(n.$t("config.amd_rc_desc")),1)]),f($,{class:"mb-3",id:"amd_enforce_hrd","locale-prefix":"config",modelValue:o.value.amd_enforce_hrd,"onUpdate:modelValue":l[2]||(l[2]=s=>o.value.amd_enforce_hrd=s),default:"false"},null,8,["modelValue"])])])])]),e("div",Js,[e("div",Ks,[e("h2",Xs,[e("button",Ys,t(n.$t("config.amd_quality_group")),1)]),e("div",Ws,[e("div",Zs,[e("div",xs,[e("label",ea,t(n.$t("config.amd_quality")),1),_(e("select",{id:"amd_quality",class:"form-select","onUpdate:modelValue":l[3]||(l[3]=s=>o.value.amd_quality=s)},[e("option",oa,t(n.$t("config.amd_quality_speed")),1),e("option",ta,t(n.$t("config.amd_quality_balanced")),1),e("option",la,t(n.$t("config.amd_quality_quality")),1)],512),[[h,o.value.amd_quality]]),e("div",na,t(n.$t("config.amd_quality_desc")),1)]),f($,{class:"mb-3",id:"amd_preanalysis","locale-prefix":"config",modelValue:o.value.amd_preanalysis,"onUpdate:modelValue":l[4]||(l[4]=s=>o.value.amd_preanalysis=s),default:"false"},null,8,["modelValue"]),f($,{class:"mb-3",id:"amd_vbaq","locale-prefix":"config",modelValue:o.value.amd_vbaq,"onUpdate:modelValue":l[5]||(l[5]=s=>o.value.amd_vbaq=s),default:"true"},null,8,["modelValue"]),e("div",sa,[e("label",aa,t(n.$t("config.amd_coder")),1),_(e("select",{id:"amd_coder",class:"form-select","onUpdate:modelValue":l[6]||(l[6]=s=>o.value.amd_coder=s)},[e("option",ia,t(n.$t("config.ffmpeg_auto")),1),e("option",da,t(n.$t("config.coder_cabac")),1),e("option",ra,t(n.$t("config.coder_cavlc")),1)],512),[[h,o.value.amd_coder]]),e("div",ua,t(n.$t("config.amd_coder_desc")),1)])])])])])]))}},ca={id:"videotoolbox-encoder",class:"config-page"},pa={class:"mb-3"},fa={for:"vt_coder",class:"form-label"},ma={value:"auto"},va={value:"cabac"},ga={value:"cavlc"},$a={class:"mb-3"},ha={for:"vt_software",class:"form-label"},ba={value:"auto"},ya={value:"disabled"},ka={value:"allowed"},wa={value:"forced"},Va={__name:"VideotoolboxEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",ca,[e("div",pa,[e("label",fa,t(n.$t("config.vt_coder")),1),_(e("select",{id:"vt_coder",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.vt_coder=s)},[e("option",ma,t(n.$t("config.ffmpeg_auto")),1),e("option",va,t(n.$t("config.coder_cabac")),1),e("option",ga,t(n.$t("config.coder_cavlc")),1)],512),[[h,o.value.vt_coder]])]),e("div",$a,[e("label",ha,t(n.$t("config.vt_software")),1),_(e("select",{id:"vt_software",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.vt_software=s)},[e("option",ba,t(n.$t("_common.auto")),1),e("option",ya,t(n.$t("_common.disabled")),1),e("option",ka,t(n.$t("config.vt_software_allowed")),1),e("option",wa,t(n.$t("config.vt_software_forced")),1)],512),[[h,o.value.vt_software]])]),f($,{class:"mb-3",id:"vt_realtime",desc:"","locale-prefix":"config",modelValue:o.value.vt_realtime,"onUpdate:modelValue":l[2]||(l[2]=s=>o.value.vt_realtime=s),default:"true"},null,8,["modelValue"])]))}},Ua={id:"software-encoder",class:"config-page"},qa={class:"mb-3"},Sa={for:"sw_preset",class:"form-label"},Ea={value:"ultrafast"},Ia={value:"superfast"},Ma={value:"veryfast"},Da={value:"faster"},Aa={value:"fast"},Oa={value:"medium"},Pa={value:"slow"},Ca={value:"slower"},Ta={value:"veryslow"},Na={class:"form-text"},za={class:"mb-3"},ja={for:"sw_tune",class:"form-label"},Ha={value:"film"},Ga={value:"animation"},Ba={value:"grain"},La={value:"stillimage"},Fa={value:"fastdecode"},Ra={value:"zerolatency"},Qa={class:"form-text"},Ja={__name:"SoftwareEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Ua,[e("div",qa,[e("label",Sa,t(n.$t("config.sw_preset")),1),_(e("select",{id:"sw_preset",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.sw_preset=s)},[e("option",Ea,t(n.$t("config.sw_preset_ultrafast")),1),e("option",Ia,t(n.$t("config.sw_preset_superfast")),1),e("option",Ma,t(n.$t("config.sw_preset_veryfast")),1),e("option",Da,t(n.$t("config.sw_preset_faster")),1),e("option",Aa,t(n.$t("config.sw_preset_fast")),1),e("option",Oa,t(n.$t("config.sw_preset_medium")),1),e("option",Pa,t(n.$t("config.sw_preset_slow")),1),e("option",Ca,t(n.$t("config.sw_preset_slower")),1),e("option",Ta,t(n.$t("config.sw_preset_veryslow")),1)],512),[[h,o.value.sw_preset]]),e("div",Na,t(n.$t("config.sw_preset_desc")),1)]),e("div",za,[e("label",ja,t(n.$t("config.sw_tune")),1),_(e("select",{id:"sw_tune",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.sw_tune=s)},[e("option",Ha,t(n.$t("config.sw_tune_film")),1),e("option",Ga,t(n.$t("config.sw_tune_animation")),1),e("option",Ba,t(n.$t("config.sw_tune_grain")),1),e("option",La,t(n.$t("config.sw_tune_stillimage")),1),e("option",Fa,t(n.$t("config.sw_tune_fastdecode")),1),e("option",Ra,t(n.$t("config.sw_tune_zerolatency")),1)],512),[[h,o.value.sw_tune]]),e("div",Qa,t(n.$t("config.sw_tune_desc")),1)])]))}},Ka={id:"vaapi-encoder",class:"config-page"},Xa={__name:"VAAPIEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Ka,[f($,{class:"mb-3",id:"vaapi_strict_rc_buffer","locale-prefix":"config",modelValue:o.value.vaapi_strict_rc_buffer,"onUpdate:modelValue":l[0]||(l[0]=s=>o.value.vaapi_strict_rc_buffer=s),default:"false"},null,8,["modelValue"])]))}},Ya={id:"vulkan-encoder",class:"config-page"},Wa={class:"mb-3"},Za={for:"vk_tune",class:"form-label"},xa={value:"0"},ei={value:"1"},oi={value:"2"},ti={value:"3"},li={class:"form-text"},ni={class:"mb-3"},si={for:"vk_rc_mode",class:"form-label"},ai={value:"0"},ii={value:"1"},di={value:"2"},ri={value:"4"},ui={class:"form-text"},_i={__name:"VulkanEncoder",props:["platform","config"],setup(a){const o=y(a.config);return(n,l)=>(d(),c("div",Ya,[e("div",Wa,[e("label",Za,t(n.$t("config.vk_tune")),1),_(e("select",{id:"vk_tune",class:"form-select","onUpdate:modelValue":l[0]||(l[0]=s=>o.value.vk_tune=s)},[e("option",xa,t(n.$t("_common.auto")),1),e("option",ei,t(n.$t("config.vk_tune_hq")),1),e("option",oi,t(n.$t("config.vk_tune_ll")),1),e("option",ti,t(n.$t("config.vk_tune_ull")),1)],512),[[h,o.value.vk_tune]]),e("div",li,t(n.$t("config.vk_tune_desc")),1)]),e("div",ni,[e("label",si,t(n.$t("config.vk_rc_mode")),1),_(e("select",{id:"vk_rc_mode",class:"form-select","onUpdate:modelValue":l[1]||(l[1]=s=>o.value.vk_rc_mode=s)},[e("option",ai,t(n.$t("_common.auto")),1),e("option",ii,t(n.$t("config.vk_rc_cqp")),1),e("option",di,t(n.$t("config.vk_rc_cbr")),1),e("option",ri,t(n.$t("config.vk_rc_vbr")),1)],512),[[h,o.value.vk_rc_mode]]),e("div",ui,t(n.$t("config.vk_rc_mode_desc")),1)])]))}},ci={__name:"ContainerEncoders",props:["platform","config","currentTab"],setup(a){const o=y(a.config);return(n,l)=>(d(),c(V,null,[a.currentTab==="nv"?(d(),k(ds,{key:0,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="qsv"?(d(),k(Vs,{key:1,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="amd"?(d(),k(_a,{key:2,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="vt"?(d(),k(Va,{key:3,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="vaapi"?(d(),k(Xa,{key:4,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="vulkan"?(d(),k(_i,{key:5,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0),a.currentTab==="sw"?(d(),k(Ja,{key:6,platform:a.platform,config:o.value},null,8,["platform","config"])):p("",!0)],64))}},pi=F({components:{Navbar:K,General:Te,Inputs:_o,Network:st,Files:Ut,Advanced:al,AudioVideo:Hn,ContainerEncoders:ci,Cpu:oe,Check:Z,FileCog:te,Gamepad2:ee,Gpu:le,NetworkIcon:ne,Save:x,Search:W,Settings:J,Sliders:se,Volume2:ie},data(){return{platform:"",saved:!1,restarted:!1,config:null,currentTab:"general",searchQuery:"",tabs:[{id:"general",name:"General",options:{locale:"en",sunshine_name:"",min_log_level:2,global_prep_cmd:[],notify_pre_releases:"disabled",system_tray:"enabled"}},{id:"input",name:"Input",options:{controller:"enabled",gamepad:"auto",ds4_back_as_touchpad_click:"enabled",motion_as_ds4:"enabled",touchpad_as_ds4:"enabled",ds5_inputtino_randomize_mac:"enabled",back_button_timeout:-1,keyboard:"enabled",key_repeat_delay:500,key_repeat_frequency:24.9,always_send_scancodes:"enabled",key_rightalt_to_key_win:"disabled",mouse:"enabled",high_resolution_scrolling:"enabled",native_pen_touch:"enabled",keybindings:"[0x10,0xA0,0x11,0xA2,0x12,0xA4]"}},{id:"av",name:"Audio/Video",options:{audio_sink:"",virtual_sink:"",stream_audio:"enabled",install_steam_audio_drivers:"enabled",adapter_name:"",output_name:"",dd_configuration_option:"disabled",dd_resolution_option:"auto",dd_manual_resolution:"",dd_refresh_rate_option:"auto",dd_manual_refresh_rate:"",dd_hdr_option:"auto",dd_wa_hdr_toggle_delay:0,dd_config_revert_delay:3e3,dd_config_revert_on_disconnect:"disabled",dd_mode_remapping:{mixed:[],resolution_only:[],refresh_rate_only:[]},max_bitrate:0,minimum_fps_target:0}},{id:"network",name:"Network",options:{upnp:"disabled",address_family:"ipv4",bind_address:"",port:47989,origin_web_ui_allowed:"lan",csrf_allowed_origins:"",external_ip:"",lan_encryption_mode:0,wan_encryption_mode:1,ping_timeout:1e4}},{id:"files",name:"Config Files",options:{file_apps:"",credentials_file:"",log_path:"",pkey:"",cert:"",file_state:""}},{id:"advanced",name:"Advanced",options:{fec_percentage:20,qp:28,min_threads:2,hevc_mode:0,av1_mode:0,capture:"",encoder:""}},{id:"nv",name:"NVIDIA NVENC Encoder",options:{nvenc_preset:1,nvenc_twopass:"quarter_res",nvenc_spatial_aq:"disabled",nvenc_vbv_increase:0,nvenc_realtime_hags:"enabled",nvenc_latency_over_power:"enabled",nvenc_opengl_vulkan_on_dxgi:"enabled",nvenc_h264_cavlc:"disabled"}},{id:"qsv",name:"Intel QuickSync Encoder",options:{qsv_preset:"medium",qsv_coder:"auto",qsv_slow_hevc:"disabled"}},{id:"amd",name:"AMD AMF Encoder",options:{amd_usage:"ultralowlatency",amd_rc:"vbr_latency",amd_enforce_hrd:"disabled",amd_quality:"balanced",amd_preanalysis:"disabled",amd_vbaq:"enabled",amd_coder:"auto"}},{id:"vt",name:"VideoToolbox Encoder",options:{vt_coder:"auto",vt_software:"auto",vt_realtime:"enabled"}},{id:"vaapi",name:"VA-API Encoder",options:{vaapi_strict_rc_buffer:"disabled"}},{id:"vulkan",name:"Vulkan Encoder",options:{vk_tune:2,vk_rc_mode:4}},{id:"sw",name:"Software Encoder",options:{sw_preset:"superfast",sw_tune:"zerolatency"}}]}},provide(){return{platform:C(()=>this.platform),searchQuery:C(()=>this.searchQuery)}},computed:{allConfigOptions(){const a=[];return this.tabs.forEach(r=>{Object.keys(r.options).forEach(o=>{a.push({key:o,label:o.replaceAll("_"," ").replaceAll(/\b\w/g,n=>n.toUpperCase()),tab:r.name,tabId:r.id})})}),a},searchResults(){if(!this.searchQuery)return[];const a=this.searchQuery.toLowerCase();return this.allConfigOptions.filter(r=>r.key.toLowerCase().includes(a)||r.label.toLowerCase().includes(a))}},created(){fetch("./api/config").then(a=>a.json()).then(a=>{this.config=a,this.platform=this.config.platform,document.getElementById("app"),this.platform==="windows"&&(this.tabs=this.tabs.filter(o=>o.id!=="vt"&&o.id!=="vaapi"&&o.id!=="vulkan")),(this.platform==="freebsd"||this.platform==="linux")&&(this.tabs=this.tabs.filter(o=>o.id!=="amd"&&o.id!=="qsv"&&o.id!=="vt")),this.platform==="macos"&&(this.tabs=this.tabs.filter(o=>o.id!=="amd"&&o.id!=="nv"&&o.id!=="qsv"&&o.id!=="vaapi"&&o.id!=="vulkan")),delete this.config.platform,delete this.config.status,delete this.config.version;const r=["dd_mode_remapping","global_prep_cmd"];for(const o of r)this.config.hasOwnProperty(o)&&(this.config[o]=JSON.parse(this.config[o]));this.tabs.forEach(o=>{Object.keys(o.options).forEach(n=>{this.config[n]===void 0&&(this.config[n]=JSON.parse(JSON.stringify(o.options[n])))})})})},methods:{getTabIcon(a){return{general:"Settings",input:"Gamepad2",av:"Volume2",network:"NetworkIcon",files:"FileCog",advanced:"Sliders",nv:"Gpu",amd:"Gpu",qsv:"Gpu",vaapi:"Gpu",vt:"Gpu",vulkan:"Gpu",sw:"Cpu"}[a]||"Settings"},forceUpdate(){this.$forceUpdate()},serialize(){return JSON.parse(JSON.stringify(this.config))},save(){this.saved=!1,this.restarted=!1;let a=this.serialize();return this.tabs.forEach(r=>{Object.keys(r.options).forEach(o=>{let n=!1;JSON.stringify(a[o])===JSON.stringify(r.options[o])&&(n=!0),n&&delete a[o]})}),N("./api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then(r=>r.status===200?(this.saved=!0,this.saved):!1)},apply(){this.saved=this.restarted=!1,this.save().then(r=>{r===!0&&(this.restarted=!0,setTimeout(()=>{this.saved=this.restarted=!1},5e3),N("./api/restart",{method:"POST",headers:{"Content-Type":"application/json"}}))})},handleSearch(){if(document.querySelectorAll(".config-search-highlight").forEach(r=>{r.classList.remove("config-search-highlight")}),!this.searchQuery){document.querySelectorAll(".mb-3").forEach(r=>{r.style.display=""});return}const a=this.searchResults;a.length!==0&&(a.length>0&&a[0].tabId!==this.currentTab&&(this.currentTab=a[0].tabId),this.$nextTick(()=>{if(document.querySelectorAll(".config-page .mb-3").forEach(r=>{r.style.display="none"}),a.forEach(r=>{const o=document.getElementById(r.key);if(o){const n=o.closest(".mb-3");n&&(n.style.display="")}}),a.length>0){const r=document.getElementById(a[0].key);if(r){const o=r.closest(".mb-3");o&&(o.scrollIntoView({behavior:"smooth",block:"center"}),o.classList.add("config-search-highlight"),setTimeout(()=>{o.classList.remove("config-search-highlight")},3e3))}}}))}},mounted(){const a=()=>{let r=window.location.hash;if(r){let o=r.substring(1);this.tabs.forEach(n=>{Object.keys(n.options).forEach(l=>{if((n.id===o||l===o)&&(this.currentTab=n.id),l===o&&setTimeout(()=>{document.getElementById(o)&&(window.location.hash=r)},2e3),this.currentTab===n.id)return!0})})}};a(),window.addEventListener("hashchange",a)}});R(pi);
