1(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["components/pages/VirtualDirectoryPage/ProtectionSettingsPage"],{2940(e,t,i){"use strict";i.r(t),i.d(t,{evictDomainHostingFieldCache:()=>n});const n=(e,t,i)=>{e.modify({id:e.identify({__typename:"Domain",id:btoa(`Domain:${t}`)}),fields:{hosting(e){const t={};for(const n in e)n===i||n.startsWith(`${i}(`)||(t[n]=e[n]);return t}}})}},2941(e,t,i){"use strict";i.r(t),i.d(t,{evictDomainVirtualDirectoryFieldsCache:()=>n});const n=(e,{domainId:t,fields:i})=>{Object.values(e.extract()).filter(({__typename:e})=>"VirtualDirectory"===e).filter(({key:e})=>atob(e).split(":")[1]===t).forEach(t=>{const n=e.identify(t);i.forEach(t=>e.evict({id:n,fieldName:t}))})}},2942(e,t,i){"use strict";i.r(t),i.d(t,{evictDomainVirtualDirectoryMimeTypesCache:()=>r});var n=i(2939);const r=(e,t)=>{(0,n.evictDomainVirtualDirectoryFieldsCache)(e,{domainId:t,fields:["mimeType","mimeTypes"]})}},2943(e,t,i){"use strict";i.r(t),i.d(t,{evictDomainVirtualDirectoryProtectionCache:()=>r});var n=i(2939);const r=(e,t)=>{(0,n.evictDomainVirtualDirectoryFieldsCache)(e,{domainId:t,fields:["content","protectedDirectory"]})}},2939(e,t,i){"use strict";i.r(t),i.d(t,{evictDomainHostingFieldCache:()=>n.evictDomainHostingFieldCache,evictDomainVirtualDirectoryFieldsCache:()=>r.evictDomainVirtualDirectoryFieldsCache,evictDomainVirtualDirectoryMimeTypesCache:()=>a.evictDomainVirtualDirectoryMimeTypesCache,evictDomainVirtualDirectoryProtectionCache:()=>o.evictDomainVirtualDirectoryProtectionCache,modifyCacheOnProtectedDirectoryAddOrDelete:()=>c.modifyCacheOnProtectedDirectoryAddOrDelete});var n=i(2940),r=i(2941),a=i(2942),o=i(2943),c=i(2944)},2944(e,t,i){"use strict";i.r(t),i.d(t,{modifyCacheOnProtectedDirectoryAddOrDelete:()=>r});var n=i(2939);const r=(e,t)=>{(0,n.evictDomainHostingFieldCache)(e,t,"protectedDirectories"),(0,n.evictDomainVirtualDirectoryProtectionCache)(e,t)}},1526(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(396),r=i(715),a=i(397);const o=({onClose:e,isOpen:t=!0,closeOnFormSuccess:i=!0,closeUrl:o="..",form:c,...s})=>{const d=(0,r.useNavigate)(),[l,u]=(0,n.useState)(t),m=(0,n.useRef)(null),p=(0,n.useCallback)((...t)=>{const i=e??(()=>d(o,{preventScrollReset:!0}));u(!1),m.current=setTimeout(()=>{i(...t),m.current=null},300)},[o,d,e]);(0,n.useEffect)(()=>()=>{m.current&&clearTimeout(m.current)},[]),(0,n.useEffect)(()=>{t?m.current&&clearTimeout(m.current):u(t)},[t]);const f=(0,n.useMemo)(()=>{if(c&&i){if((0,n.isValidElement)(c))return(0,n.cloneElement)(c,{onSuccess:(...e)=>{c.props.onSuccess?.(...e),p()}});if("object"==typeof c)return{...c,onSuccess:(...e)=>{c.onSuccess?.(...e),p()}}}return c},[i,p,c]);return(0,n.jsx)(a.Drawer,{...s,form:f,onClose:p,isOpen:l})}},2949(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(396),r=i(95),a=i(397),o=i(1371);const c=r.Locale.getTranslate("components.forms.ProtectedDirectory"),s=({mutation:e,readonlyPath:t=!1,withLocation:i,protectedDirectory:r=null,...s})=>
1{const[d,l]=(0,n.useState)(()=>((e,t)=>{if(!e)return{path:"/",realm:"",...t?{isNonSsl:!0,isCgiBin:!1}:{}};const{path:i,realm:n,isNonSsl:r,isCgiBin:a}=e;return{path:`/${i}`,realm:n,...t?{isNonSsl:r,isCgiBin:a}:{}}})(r,i)),u=(e,t)=>{l(i=>(0,a.setIn)(i,e,t))};return(0,n.jsxs)(o.default,{values:d,onFieldChange:u,mutation:e,applyButton:!1,...s,children:[t?(0,n.jsx)(a.FormField,{label:(0,n.jsx)(c,{content:"pathLabel"}),children:d.path}):(0,n.jsx)(a.FormFieldText,{name:"path",label:(0,n.jsx)(c,{content:"pathLabel"}),required:!0,autoFocus:!0,inputProps:{maxLength:128}}),i&&(0,n.jsxs)(a.FormField,{label:(0,n.jsx)(c,{content:"locationLabel"}),children:[(0,n.jsx)(a.FormFieldCheckbox,{name:"isNonSsl",label:(0,n.jsx)(c,{content:"isNonSslLabel"}),onChange:e=>{e||d.isCgiBin||u("isCgiBin",!0)}}),(0,n.jsx)(a.FormFieldCheckbox,{name:"isCgiBin",label:(0,n.jsx)(c,{content:"isCgiBinLabel"}),onChange:e=>{e||d.isNonSsl||u("isNonSsl",!0)}})]}),(0,n.jsx)(a.FormFieldText,{name:"realm",label:(0,n.jsx)(c,{content:"realmLabel"}),inputProps:{maxLength:255}})]})}},2952(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>k});var n=i(787),r=i.n(n),a=i(715),o=i(810),c=i(95),s=i(1526),d=i(2949),l=i(663),u=i(2939),m=i(1299),p=i.n(m),f=i(2953),y=i.n(f),D=i(396);const v=c.Locale.getTranslate("components.pages.ProtectedDirectoryEdit"),h=({domainId:e,protectedDirectoryId:t,protectedDirectory:i=null,readonlyPath:n=!1,isProtectedDirectoryLocationSupported:r})=>{const c=(0,a.useLocation)(),[m]=(0,o.useMutation)(y(),{refetchQueries:[p()],onCompleted(e,{variables:{input:{path:t}}}){(0,l.addToast)({intent:"success",message:(0,D.jsx)(v,{content:"success",params:{path:(0,D.jsx)("b",{children:t})}})})},awaitRefetchQueries:!0,update(t){(0,u.evictDomainHostingFieldCache)(t,e,"protectedDirectories"),(0,u.evictDomainVirtualDirectoryProtectionCache)(t,e)}});return(0,D.jsx)(s.default,{isOpen:!0,closeUrl:{...c,pathname:".."},"data-type":"protected-directory-edit-drawer",title:(0,D.jsx)(v,{content:"title"}),size:"sm",form:(0,D.jsx)(d.default,{mutation:({variables:e})=>m({variables:{id:t,...e}}),protectedDirectory:i,submitButton:{"data-type":"protected-directory-edit-submit"},readonlyPath:n,withLocation:r})})};h.propTypes={domainId:r().string.isRequired,protectedDirectoryId:r().string,protectedDirectory:r().shape({id:r().string.isRequired,path:r().string.isRequired,realm:r().string.isRequired,isNonSsl:r().bool.isRequired,isCgiBin:r().bool.isRequired}),readonlyPath:r().bool,isProtectedDirectoryLocationSupported:r().bool.isRequired};const k=h},2951(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>n.default});var n=i(2952)},3019(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(2951),r=i(396);const a=e=>(0,r.jsx)(n.default,{...e,readonlyPath:!0})},3018(e,t,i){"use strict";i.r(t),i.d(t,{default:()=>n.default});var n=i(3019)},2953(e,t,i){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateProtectedDirectory"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ProtectedDirectoryInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateProtectedDirectory"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"protectedDirectory"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ProtectedDirectoryEditFragment"},directives:[]}]}}]}}]}}],loc:{start:0,end:298}};n.loc.source={body:'#import "queries/ProtectedDirectoryEditFragment.graphql"\n\nmutation UpdateProtectedDirectory(\n $id: ID!,\n $input: ProtectedDirectoryInput!, \n) {\n updateProtectedDirectory(id: $id, input: $input) {\n protectedDirectory {\n ...ProtectedDirectoryEditFragment\n }\n }\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}};var r={};function a(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);
1else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){a(e,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){a(e,t)}),e.definitions&&e.definitions.forEach(function(e){a(e,t)})}n.definitions=n.definitions.concat(i(1298).definitions.filter(function(e){if("FragmentDefinition"!==e.kind)return!0;var t=e.name.value;return!r[t]&&(r[t]=!0,!0)}));var o={};function c(e,t){for(var i=0;i<e.definitions.length;i++){var n=e.definitions[i];if(n.name&&n.name.value==t)return n}}n.definitions.forEach(function(e){if(e.name){var t=new Set;a(e,t),o[e.name.value]=t}}),e.exports=n,e.exports.UpdateProtectedDirectory=function(e,t){var i={kind:e.kind,definitions:[c(e,t)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var n=o[t]||new Set,r=new Set,a=new Set;for(n.forEach(function(e){a.add(e)});a.size>0;){var s=a;a=new Set,s.forEach(function(e){r.has(e)||(r.add(e),(o[e]||new Set).forEach(function(e){a.add(e)}))})}return r.forEach(function(t){var n=c(e,t);n&&i.definitions.push(n)}),i}(n,"UpdateProtectedDirectory")}}]); 2//# sourceMappingURL=ProtectionSettingsPage.js.map?63e3db8bed4c0b5c36c4
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.