(()=>{"use strict";var e,t={95565:(e,t,a)=>{var o,r=a(85471),n=a(32981),s=a(53334),i=a(99418),c=a(32051),l=a(32073),d=a(59892),f=a(40083),u=a(16044),p=a(82182),m=a(33691);!function(e){e[e.VeryWeak=0]="VeryWeak",e[e.Weak=1]="Weak",e[e.Moderate=2]="Moderate",e[e.Strong=3]="Strong",e[e.VeryStrong=4]="VeryStrong",e[e.ExtremelyStrong=5]="ExtremelyStrong"}(o||(o={}));const g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=new Set(e),a=parseInt(Math.log2(Math.pow(parseInt(t.size.toString()),e.length)).toFixed(2));return a<16?o.VeryWeak:a<31?o.Weak:a<46?o.Moderate:a<61?o.Strong:a<76?o.VeryStrong:o.ExtremelyStrong},b=(0,r.pM)({name:"Setup",components:{IconArrowRight:m.A,NcButton:c.A,NcCheckboxRadioSwitch:l.A,NcLoadingIcon:d.A,NcNoteCard:f.A,NcPasswordField:u.A,NcTextField:p.A},setup:()=>({t:s.t}),data:()=>({config:{},links:{},isValidAutoconfig:!1,loading:!1}),computed:{passwordHelperText(){if(""===this.config?.adminpass)return"";switch(g(this.config?.adminpass)){case o.VeryWeak:return(0,s.t)("core","Password is too weak");case o.Weak:return(0,s.t)("core","Password is weak");case o.Moderate:return(0,s.t)("core","Password is average");case o.Strong:return(0,s.t)("core","Password is strong");case o.VeryStrong:return(0,s.t)("core","Password is very strong");case o.ExtremelyStrong:return(0,s.t)("core","Password is extremely strong")}return(0,s.t)("core","Unknown password strength")},passwordHelperType(){return g(this.config?.adminpass)3?"vertical":"horizontal"},htaccessWarning(){const e=[(0,s.t)("core","Your data directory and files are probably accessible from the internet because the .htaccess file does not work."),(0,s.t)("core","For information how to properly configure your server, please {linkStart}see the documentation{linkEnd}",{linkStart:'',linkEnd:""},{escape:!1})].join("
");return i.A.sanitize(e)},errors(){return(this.config?.errors||[]).map((e=>"string"==typeof e?{heading:"",message:e}:""===e.hint?{heading:"",message:e.error}:{heading:e.error,message:e.hint}))}},beforeMount(){this.config=(0,n.C)("core","config"),this.links=(0,n.C)("core","links")},mounted(){if(""===this.config.dbtype&&(this.config.dbtype=Object.keys(this.config.databases).at(0)),this.config.hasAutoconfig){const e=this.$refs.form;e.querySelectorAll('input[name="adminlogin"], input[name="adminpass"]').forEach((e=>{e.removeAttribute("required")})),e.checkValidity()&&0===this.config.errors.length?this.isValidAutoconfig=!0:this.isValidAutoconfig=!1,e.querySelectorAll('input[name="adminlogin"], input[name="adminpass"]').forEach((e=>{e.setAttribute("required","true")}))}},methods:{async onSubmit(){this.loading=!0}}});var A=a(85072),h=a.n(A),y=a(97825),v=a.n(y),_=a(77659),C=a.n(_),k=a(55056),w=a.n(k),x=a(10540),S=a.n(x),N=a(41113),D=a.n(N),O=a(9716),T={};T.styleTagTransform=D(),T.setAttributes=w(),T.insert=C().bind(null,"head"),T.domAPI=v(),T.insertStyleElement=S(),h()(O.A,T),O.A&&O.A.locals&&O.A.locals;const P=(0,a(14486).A)(b,(function(){var e=this,t=e._self._c;return e._self._setupProxy,t("form",{ref:"form",staticClass:"setup-form",class:{"setup-form--loading":e.loading},attrs:{action:"","data-cy-setup-form":"",method:"POST"},on:{submit:e.onSubmit}},[e.config.hasAutoconfig?t("NcNoteCard",{attrs:{heading:e.t("core","Autoconfig file detected"),"data-cy-setup-form-note":"autoconfig",type:"success"}},[e._v("\n\t\t"+e._s(e.t("core","The setup form below is pre-filled with the values from the config file."))+"\n\t")]):e._e(),e._v(" "),!1===e.config.htaccessWorking?t("NcNoteCard",{attrs:{heading:e.t("core","Security warning"),"data-cy-setup-form-note":"htaccess",type:"warning"}},[t("p",{domProps:{innerHTML:e._s(e.htaccessWarning)}})]):e._e(),e._v(" "),e._l(e.errors,(function(a,o){return t("NcNoteCard",{key:o,attrs:{heading:a.heading,"data-cy-setup-form-note":"error",type:"error"}},[e._v("\n\t\t"+e._s(a.message)+"\n\t")])})),e._v(" "),t("fieldset",{staticClass:"setup-form__administration"},[t("legend",[e._v(e._s(e.t("core","Create administration account")))]),e._v(" "),t("NcTextField",{attrs:{label:e.t("core","Administration account name"),"data-cy-setup-form-field":"adminlogin",name:"adminlogin",required:""},model:{value:e.config.adminlogin,callback:function(t){e.$set(e.config,"adminlogin",t)},expression:"config.adminlogin"}}),e._v(" "),t("NcPasswordField",{attrs:{label:e.t("core","Administration account password"),"data-cy-setup-form-field":"adminpass",name:"adminpass",required:""},model:{value:e.config.adminpass,callback:function(t){e.$set(e.config,"adminpass",t)},expression:"config.adminpass"}}),e._v(" "),t("NcNoteCard",{directives:[{name:"show",rawName:"v-show",value:""!==e.config.adminpass,expression:"config.adminpass !== ''"}],attrs:{type:e.passwordHelperType}},[e._v("\n\t\t\t"+e._s(e.passwordHelperText)+"\n\t\t")])],1),e._v(" "),t("details",{attrs:{open:!e.isValidAutoconfig,"data-cy-setup-form-advanced-config":""}},[t("summary",[e._v(e._s(e.t("core","Storage & database")))]),e._v(" "),t("fieldset",{staticClass:"setup-form__data-folder"},[t("NcTextField",{attrs:{label:e.t("core","Data folder"),placeholder:e.config.serverRoot+"/data",required:"",autocomplete:"off",autocapitalize:"none","data-cy-setup-form-field":"directory",name:"directory",spellcheck:"false"},model:{value:e.config.directory,callback:function(t){e.$set(e.config,"directory",t)},expression:"config.directory"}})],1),e._v(" "),t("fieldset",{staticClass:"setup-form__database"},[t("legend",[e._v(e._s(e.t("core","Database configuration")))]),e._v(" "),t("fieldset",{staticClass:"setup-form__database-type"},[e.firstAndOnlyDatabase?t("NcNoteCard",{attrs:{"data-cy-setup-form-db-note":"single-db",type:"warning"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","Only {firstAndOnlyDatabase} is available.",{firstAndOnlyDatabase:e.firstAndOnlyDatabase}))),t("br"),e._v("\n\t\t\t\t\t"+e._s(e.t("core","Install and activate additional PHP modules to choose other database types."))),t("br"),e._v(" "),t("a",{attrs:{href:e.links.adminSourceInstall,target:"_blank",rel:"noreferrer noopener"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("core","For more details check out the documentation."))+" ↗\n\t\t\t\t\t")])]):t("p",{staticClass:"setup-form__database-type-select",class:`setup-form__database-type-select--${e.DBTypeGroupDirection}`},e._l(e.config.databases,(function(a,o){return t("NcCheckboxRadioSwitch",{key:o,attrs:{"button-variant":!0,"data-cy-setup-form-field":`dbtype-${o}`,value:o,"button-variant-grouped":e.DBTypeGroupDirection,name:"dbtype",type:"radio"},model:{value:e.config.dbtype,callback:function(t){e.$set(e.config,"dbtype",t)},expression:"config.dbtype"}},[e._v("\n\t\t\t\t\t\t"+e._s(a)+"\n\t\t\t\t\t")])})),1),e._v(" "),"sqlite"===e.config.dbtype?t("NcNoteCard",{attrs:{heading:e.t("core","Performance warning"),"data-cy-setup-form-db-note":"sqlite",type:"warning"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("core","You chose SQLite as database."))),t("br"),e._v("\n\t\t\t\t\t"+e._s(e.t("core","SQLite should only be used for minimal and development instances. For production we recommend a different database backend."))),t("br"),e._v("\n\t\t\t\t\t"+e._s(e.t("core","If you use clients for file syncing, the use of SQLite is highly discouraged."))+"\n\t\t\t\t")]):e._e()],1),e._v(" "),"sqlite"!==e.config.dbtype?t("fieldset",[t("NcTextField",{attrs:{label:e.t("core","Database user"),autocapitalize:"none",autocomplete:"off","data-cy-setup-form-field":"dbuser",name:"dbuser",spellcheck:"false",required:""},model:{value:e.config.dbuser,callback:function(t){e.$set(e.config,"dbuser",t)},expression:"config.dbuser"}}),e._v(" "),t("NcPasswordField",{attrs:{label:e.t("core","Database password"),autocapitalize:"none",autocomplete:"off","data-cy-setup-form-field":"dbpass",name:"dbpass",spellcheck:"false",required:""},model:{value:e.config.dbpass,callback:function(t){e.$set(e.config,"dbpass",t)},expression:"config.dbpass"}}),e._v(" "),t("NcTextField",{attrs:{label:e.t("core","Database name"),autocapitalize:"none",autocomplete:"off","data-cy-setup-form-field":"dbname",name:"dbname",pattern:"[0-9a-zA-Z\\$_\\-]+",spellcheck:"false",required:""},model:{value:e.config.dbname,callback:function(t){e.$set(e.config,"dbname",t)},expression:"config.dbname"}}),e._v(" "),"oci"===e.config.dbtype?t("NcTextField",{attrs:{label:e.t("core","Database tablespace"),autocapitalize:"none",autocomplete:"off","data-cy-setup-form-field":"dbtablespace",name:"dbtablespace",spellcheck:"false"},model:{value:e.config.dbtablespace,callback:function(t){e.$set(e.config,"dbtablespace",t)},expression:"config.dbtablespace"}}):e._e(),e._v(" "),t("NcTextField",{attrs:{"helper-text":e.t("core","Please specify the port number along with the host name (e.g., localhost:5432)."),label:e.t("core","Database host"),placeholder:e.t("core","localhost"),autocapitalize:"none",autocomplete:"off","data-cy-setup-form-field":"dbhost",name:"dbhost",spellcheck:"false"},model:{value:e.config.dbhost,callback:function(t){e.$set(e.config,"dbhost",t)},expression:"config.dbhost"}})],1):e._e()])]),e._v(" "),t("NcButton",{staticClass:"setup-form__button",class:{"setup-form__button--loading":e.loading},attrs:{disabled:e.loading,loading:e.loading,wide:!0,alignment:"center-reverse","data-cy-setup-form-submit":"","native-type":"submit",type:"primary"},scopedSlots:e._u([{key:"icon",fn:function(){return[e.loading?t("NcLoadingIcon"):t("IconArrowRight")]},proxy:!0}])},[e._v("\n\t\t"+e._s(e.loading?e.t("core","Installing …"):e.t("core","Install"))+"\n\t")]),e._v(" "),t("NcNoteCard",{attrs:{"data-cy-setup-form-note":"help",type:"info"}},[e._v("\n\t\t"+e._s(e.t("core","Need help?"))+"\n\t\t"),t("a",{attrs:{target:"_blank",rel:"noreferrer noopener",href:e.links.adminInstall}},[e._v(e._s(e.t("core","See the documentation"))+" ↗")])])],2)}),[],!1,null,null,null).exports;(new(r.Ay.extend(P))).$mount("#content")},9716:(e,t,a)=>{a.d(t,{A:()=>i});var o=a(71354),r=a.n(o),n=a(76314),s=a.n(n)()(r());s.push([e.id,"form{padding:calc(3*var(--default-grid-baseline));color:var(--color-main-text);border-radius:var(--border-radius-container);background-color:var(--color-main-background-blur);box-shadow:0 0 10px var(--color-box-shadow);-webkit-backdrop-filter:var(--filter-background-blur);backdrop-filter:var(--filter-background-blur);max-width:300px;margin-bottom:30px}form>fieldset:first-child,form>.notecard:first-child{margin-top:0}form>.notecard:last-child{margin-bottom:0}form fieldset,form details{margin-block:1rem}form .setup-form__button:not(.setup-form__button--loading) .material-design-icon{transition:all linear var(--animation-quick)}form .setup-form__button:not(.setup-form__button--loading):hover .material-design-icon{transform:translateX(0.2em)}form .setup-form__database-type-select{display:flex}form .setup-form__database-type-select--vertical{flex-direction:column}code{background-color:var(--color-background-dark);margin-top:1rem;padding:0 .3em;border-radius:var(--border-radius)}.input-field{margin-block-start:1rem !important}.notecard__heading{font-size:inherit !important}","",{version:3,sources:["webpack://./core/src/views/Setup.vue"],names:[],mappings:"AACA,KACC,4CAAA,CACA,4BAAA,CACA,4CAAA,CACA,kDAAA,CACA,2CAAA,CACA,qDAAA,CACA,6CAAA,CAEA,eAAA,CACA,kBAAA,CAEA,qDAEC,YAAA,CAGD,0BACC,eAAA,CAGD,2BAEC,iBAAA,CAIA,iFACC,4CAAA,CAGD,uFACC,2BAAA,CAKF,uCACC,YAAA,CACA,iDACC,qBAAA,CAMH,KACC,6CAAA,CACA,eAAA,CACA,cAAA,CACA,kCAAA,CAID,aACC,kCAAA,CAGD,mBACC,4BAAA",sourceRoot:""}]);const i=s}},a={};function o(e){var r=a[e];if(void 0!==r)return r.exports;var n=a[e]={id:e,loaded:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}o.m=t,e=[],o.O=(t,a,r,n)=>{if(!a){var s=1/0;for(d=0;d=n)&&Object.keys(o.O).every((e=>o.O[e](a[c])))?a.splice(c--,1):(i=!1,n0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[a,r,n]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var a in t)o.o(t,a)&&!o.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},o.e=()=>Promise.resolve(),o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=820,(()=>{o.b=document.baseURI||self.location.href;var e={820:0};o.O.j=t=>0===e[t];var t=(t,a)=>{var r,n,s=a[0],i=a[1],c=a[2],l=0;if(s.some((t=>0!==e[t]))){for(r in i)o.o(i,r)&&(o.m[r]=i[r]);if(c)var d=c(o)}for(t&&t(a);lo(95565)));r=o.O(r)})(); //# sourceMappingURL=core-install.js.map?v=8e1e6700ff38e3f083ed