Submit
Path:
~
/
/
usr
/
local
/
psa
/
admin
/
cp
/
public
/
javascript
/
components
/
pages
/
VirtualDirectoryPage
/
File Content:
ProtectionSettingsPage.js.map
{"version":3,"file":"javascript/components/pages/VirtualDirectoryPage/ProtectionSettingsPage.js?cd6887854c3ab7165014","mappings":"2MAEO,MAAMA,EAA+BA,CAACC,EAAOC,EAAUC,KAC1DF,EAAMG,OAAO,CACTC,GAAIJ,EAAMK,SAAS,CAAEC,WAAY,SAAUF,GAAIG,KAAK,UAAUN,OAC9DO,OAAQ,CACJC,OAAAA,CAAQC,GACJ,MAAMC,EAAmB,CAAC,EAC1B,IAAK,MAAMC,KAAOF,EACVE,IAAQV,GAAaU,EAAIC,WAAW,GAAGX,QAG3CS,EAAiBC,GAAOF,EAAcE,IAE1C,OAAOD,CACX,IAEN,C,2FCfC,MAAMG,EAAyCA,CAClDd,GACEC,WAAUO,aAEZO,OAAOC,OAAOhB,EAAMiB,WACfC,QAAO,EAAGZ,gBAAgC,qBAAfA,IAE3BY,QAAO,EAAGN,SAAUO,KAAKP,GAAKQ,MAAM,KAAK,KAAOnB,IAChDoB,SAAQC,IACL,MAAMlB,EAAKJ,EAAMK,SAASiB,GAE1Bd,EAAOa,SAAQnB,GAAaF,EAAMuB,MAAM,CAAEnB,KAAIF,eAAa,GAC7D,C,4GCVH,MAAMsB,EAA4CA,CAACxB,EAAOC,MAC7Da,EAAAA,EAAAA,wCACId,EAAO,CAAEC,WAAUO,OAAQ,CAAC,WAAY,cAC3C,C,6GCHE,MAAMiB,EAA6CA,CAACzB,EAAOC,MAC9Da,EAAAA,EAAAA,wCACId,EAAO,CAAEC,WAAUO,OAAQ,CAAC,UAAW,uBAC1C,C,snBCAE,MAAMkB,EAA6CA,CAAC1B,EAAOC,MAC9DF,EAAAA,EAAAA,8BAA6BC,EAAOC,EAAU,yBAC9CwB,EAAAA,EAAAA,4CAA2CzB,EAAOC,EAAS,C,2FCO/D,MA+DA,EA/DqB0B,EACjBC,UACAC,UAA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,IAAIE,EAAUrB,EAAIe,YAAYI,GAC9B,GAAIE,EAAQjE,MAAQiE,EAAQjE,KAAKC,OAASD,EACxC,OAAOiE,CAEX,CACF,CAhBErB,EAAIe,YAAY/G,SAAQ,SAAS8G,GAC/B,GAAIA,EAAI1D,KAAM,CACZ,IAAIkD,EAAO,IAAIgB,IACflB,EAA0BU,EAAKR,GAC/BW,EAAeH,EAAI1D,KAAKC,OAASiD,CACnC,CACF,IA0DFiB,EAAOC,QAAUxB,EAEbuB,EAAOC,QAAP,yBAhDJ,SAAkBxB,EAAKyB,GAErB,IAAIC,EAAS,CACXnB,KAAMP,EAAIO,KACVQ,YAAa,CAACG,EAAclB,EAAKyB,KAE/BzB,EAAI2B,eAAe,SACrBD,EAAOzB,IAAMD,EAAIC,KAKnB,IAAI2B,EAASX,EAAeQ,IAAkB,IAAIH,IAC9CO,EAAU,IAAIP,IACdQ,EAAU,IAAIR,IAOlB,IAJAM,EAAO5H,SAAQ,SAAS+H,GACtBD,EAAQtB,IAAIuB,EACd,IAEOD,EAAQnC,KAAO,GAAG,CACvB,IAAIqC,EAAWF,EACfA,EAAU,IAAIR,IAEdU,EAAShI,SAAQ,SAAS+H,GACnBF,EAAQI,IAAIF,KACfF,EAAQrB,IAAIuB,IACId,EAAec,IAAY,IAAIT,KACrCtH,SAAQ,SAASkI,GACzBJ,EAAQtB,IAAI0B,EACd,IAEJ,GACF,CASA,OAPAL,EAAQ7H,SAAQ,SAAS+H,GACvB,IAAII,EAAKjB,EAAclB,EAAK+B,GACxBI,GACFT,EAAOX,YAAYqB,KAAKD,EAE5B,IAEOT,CACT,CAIiDW,CAASrC,EAAK,2B","sources":["webpack:///./api/cache/evictDomainHostingFieldCache.js","webpack:///./api/cache/evictDomainVirtualDirectoryFieldsCache.js","webpack:///./api/cache/evictDomainVirtualDirectoryMimeTypesCache.js","webpack:///./api/cache/evictDomainVirtualDirectoryProtectionCache.js","webpack:///./api/cache/modifyCacheOnProtectedDirectoryAddOrDelete.js","webpack:///./components/common/DrawerAsPage.tsx","webpack:///./components/forms/ProtectedDirectoryForm.tsx","webpack:///./components/pages/ProtectedDirectoryEditPage/ProtectedDirectoryEditPage.js","webpack:///./components/pages/VirtualDirectoryPage/ProtectionSettingsPage/ProtectionSettingsPage.js","webpack:///./components/pages/ProtectedDirectoryEditPage/UpdateProtectedDirectory.graphql"],"sourcesContent":["// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nexport const evictDomainHostingFieldCache = (cache, domainId, fieldName) => {\n cache.modify({\n id: cache.identify({ __typename: 'Domain', id: btoa(`Domain:${domainId}`) }),\n fields: {\n hosting(cachedHosting) {\n const newCachedHosting = {};\n for (const key in cachedHosting) {\n if (key === fieldName || key.startsWith(`${fieldName}(`)) {\n continue;\n }\n newCachedHosting[key] = cachedHosting[key];\n }\n return newCachedHosting;\n },\n },\n });\n};\n\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nexport const evictDomainVirtualDirectoryFieldsCache = (\n cache,\n { domainId, fields },\n) => {\n Object.values(cache.extract())\n .filter(({ __typename }) => __typename === 'VirtualDirectory')\n // key contains domainId\n .filter(({ key }) => atob(key).split(':')[1] === domainId)\n .forEach(directory => {\n const id = cache.identify(directory);\n\n fields.forEach(fieldName => cache.evict({ id, fieldName }));\n });\n};\n\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport { evictDomainVirtualDirectoryFieldsCache } from 'api/cache';\n\nexport const evictDomainVirtualDirectoryMimeTypesCache = (cache, domainId) => {\n evictDomainVirtualDirectoryFieldsCache(\n cache, { domainId, fields: ['mimeType', 'mimeTypes'] },\n );\n};\n\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport { evictDomainVirtualDirectoryFieldsCache } from 'api/cache';\n\nexport const evictDomainVirtualDirectoryProtectionCache = (cache, domainId) => {\n evictDomainVirtualDirectoryFieldsCache(\n cache, { domainId, fields: ['content', 'protectedDirectory'] },\n );\n};\n\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport {\n evictDomainHostingFieldCache,\n evictDomainVirtualDirectoryProtectionCache,\n} from 'api/cache';\n\nexport const modifyCacheOnProtectedDirectoryAddOrDelete = (cache, domainId) => {\n evictDomainHostingFieldCache(cache, domainId, 'protectedDirectories');\n evictDomainVirtualDirectoryProtectionCache(cache, domainId);\n};\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport { useCallback, useState, useEffect, useRef, useMemo, isValidElement, cloneElement } from 'react';\nimport { useNavigate, To } from 'react-router-dom';\nimport { Drawer, type DrawerProps } from '@plesk/ui-library';\n\ntype DrawerAsPageProps = DrawerProps & {\n onClose?: (...args: unknown[]) => void;\n isOpen?: boolean;\n closeOnFormSuccess?: boolean;\n closeUrl?: To;\n form?: DrawerProps['form'] & {\n onSuccess?: (...args: unknown[]) => void;\n }\n};\n\nconst DrawerAsPage = ({\n onClose = undefined,\n isOpen = true,\n closeOnFormSuccess = true,\n closeUrl = '..',\n form = undefined,\n ...props\n}: DrawerAsPageProps) => {\n const navigate = useNavigate();\n const [open, setIsOpen] = useState(isOpen);\n const closeTimeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const handleClose = useCallback((...args: unknown[]) => {\n const closeFn = onClose ?? (() => navigate(closeUrl, { preventScrollReset: true }));\n setIsOpen(false);\n closeTimeout.current = setTimeout(() => {\n closeFn(...args);\n closeTimeout.current = null;\n }, 300);\n }, [closeUrl, navigate, onClose]);\n\n useEffect(() => () => {\n closeTimeout.current && clearTimeout(closeTimeout.current);\n }, []);\n\n // remove timeout if change isOpen directly from props\n useEffect(() => {\n if (!isOpen) {\n setIsOpen(isOpen);\n } else if (closeTimeout.current) {\n clearTimeout(closeTimeout.current);\n }\n }, [isOpen]);\n\n const preparedForm = useMemo(() => {\n if (form && closeOnFormSuccess) {\n if (isValidElement(form)) {\n return cloneElement(form, {\n // @ts-expect-error No overload matches this call\n onSuccess: (...props: unknown[]) => {\n // @ts-expect-error form.props is of type unknown\n form.props.onSuccess?.(...props);\n handleClose();\n },\n });\n } else if (typeof form === 'object') {\n return {\n ...form,\n onSuccess: (...props: unknown[]) => {\n form.onSuccess?.(...props);\n handleClose();\n },\n };\n }\n }\n return form;\n }, [closeOnFormSuccess, handleClose, form]);\n\n\n // eslint-disable-next-line @plesk/plesk/data-type-required\n return <Drawer {...props} form={preparedForm} onClose={handleClose} isOpen={open} />;\n};\n\nexport default DrawerAsPage;\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport { useState } from 'react';\nimport { Locale } from 'jsw';\nimport {\n FormField,\n FormFieldText,\n FormFieldCheckbox,\n setIn,\n} from '@plesk/ui-library';\nimport Form, { FormProps } from 'components/Form';\n\nconst Translate = Locale.getTranslate('components.forms.ProtectedDirectory');\n\nexport type ProtectedDirectory = {\n id: string;\n path: string;\n realm: string;\n isNonSsl: boolean;\n isCgiBin: boolean;\n};\n\nexport type FormValues = {\n path: string;\n realm: string;\n isNonSsl?: boolean;\n isCgiBin?: boolean;\n};\n\nconst getInitialValues = (\n protectedDirectory: ProtectedDirectory | null,\n withLocation: boolean,\n): FormValues => {\n if (!protectedDirectory) {\n return {\n path: '/',\n realm: '',\n ...(withLocation ? { isNonSsl: true, isCgiBin: false } : {}),\n };\n }\n\n const { path, realm, isNonSsl, isCgiBin } = protectedDirectory;\n return {\n path: `/${path}`,\n realm,\n ...(withLocation ? { isNonSsl, isCgiBin } : {}),\n };\n};\n\ntype ProtectedDirectoryFormProps = {\n readonlyPath?: boolean;\n withLocation: boolean;\n protectedDirectory?: ProtectedDirectory | null;\n};\n\nconst ProtectedDirectoryForm = <Mutation, > ({\n mutation,\n readonlyPath = false,\n withLocation,\n protectedDirectory = null,\n ...restFormProps\n}: ProtectedDirectoryFormProps & FormProps<FormValues, Mutation>) => {\n const [values, setValues] = useState(() => getInitialValues(protectedDirectory, withLocation));\n\n const handleFieldChange = (name: keyof FormValues, value: FormValues[keyof FormValues]) => {\n setValues(values => setIn(values, name, value));\n };\n\n return (\n <Form\n values={values}\n onFieldChange={handleFieldChange}\n mutation={mutation}\n applyButton={false}\n {...restFormProps}\n >\n {readonlyPath ? (\n <FormField label={<Translate content=\"pathLabel\" />}>\n {values.path}\n </FormField>\n ) : (\n <FormFieldText\n name=\"path\"\n label={<Translate content=\"pathLabel\" />}\n required\n autoFocus\n inputProps={{ maxLength: 128 }}\n />\n )}\n {withLocation && (\n <FormField label={<Translate content=\"locationLabel\" />}>\n <FormFieldCheckbox\n name=\"isNonSsl\"\n label={<Translate content=\"isNonSslLabel\" />}\n onChange={value => {\n if (!value && !values.isCgiBin) {\n handleFieldChange('isCgiBin', true);\n }\n }}\n />\n <FormFieldCheckbox\n name=\"isCgiBin\"\n label={<Translate content=\"isCgiBinLabel\" />}\n onChange={value => {\n if (!value && !values.isNonSsl) {\n handleFieldChange('isNonSsl', true);\n }\n }}\n />\n </FormField>\n )}\n <FormFieldText\n name=\"realm\"\n label={<Translate content=\"realmLabel\" />}\n inputProps={{ maxLength: 255 }}\n />\n </Form>\n );\n};\n\nexport default ProtectedDirectoryForm;\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport PropTypes from 'prop-types';\nimport { useLocation } from 'react-router-dom';\nimport { useMutation } from '@apollo/client';\nimport { Locale } from 'jsw';\nimport DrawerAsPage from 'components/common/DrawerAsPage';\nimport ProtectedDirectoryForm from 'components/forms/ProtectedDirectoryForm';\nimport { addToast } from 'helpers/toasts';\nimport {\n evictDomainHostingFieldCache,\n evictDomainVirtualDirectoryProtectionCache,\n} from 'api/cache';\n\nimport PROTECTED_DIRECTORY_LIST from 'queries/ProtectedDirectoryList.graphql';\nimport UPDATE_PROTECTED_DIRECTORY from './UpdateProtectedDirectory.graphql';\n\nconst Translate = Locale.getTranslate('components.pages.ProtectedDirectoryEdit');\n\nconst ProtectedDirectoryEditPage = ({\n domainId,\n protectedDirectoryId = undefined,\n protectedDirectory = null,\n readonlyPath = false,\n isProtectedDirectoryLocationSupported,\n}) => {\n const location = useLocation();\n\n const [update] = useMutation(UPDATE_PROTECTED_DIRECTORY, {\n refetchQueries: [PROTECTED_DIRECTORY_LIST],\n onCompleted(_, { variables: { input: { path } } }) {\n addToast({\n intent: 'success',\n message: <Translate content=\"success\" params={{ path: <b>{path}</b> }} />,\n });\n },\n awaitRefetchQueries: true,\n update(cache) {\n evictDomainHostingFieldCache(cache, domainId, 'protectedDirectories');\n evictDomainVirtualDirectoryProtectionCache(cache, domainId);\n },\n });\n\n const mutation = ({ variables }) => update({ variables: { id: protectedDirectoryId, ...variables } });\n\n return (\n <DrawerAsPage\n isOpen\n closeUrl={{ ...location, pathname: '..' }}\n data-type=\"protected-directory-edit-drawer\"\n title={<Translate content=\"title\" />}\n size=\"sm\"\n form={\n <ProtectedDirectoryForm\n mutation={mutation}\n protectedDirectory={protectedDirectory}\n submitButton={{\n 'data-type': 'protected-directory-edit-submit',\n }}\n readonlyPath={readonlyPath}\n withLocation={isProtectedDirectoryLocationSupported}\n />\n }\n />\n );\n};\n\nProtectedDirectoryEditPage.propTypes = {\n domainId: PropTypes.string.isRequired,\n protectedDirectoryId: PropTypes.string,\n protectedDirectory: PropTypes.shape({\n id: PropTypes.string.isRequired,\n path: PropTypes.string.isRequired,\n realm: PropTypes.string.isRequired,\n isNonSsl: PropTypes.bool.isRequired,\n isCgiBin: PropTypes.bool.isRequired,\n }),\n readonlyPath: PropTypes.bool,\n isProtectedDirectoryLocationSupported: PropTypes.bool.isRequired,\n};\n\nexport default ProtectedDirectoryEditPage;\n","// Copyright 1999-2025. WebPros International GmbH. All rights reserved.\n\nimport ProtectedDirectoryEditPage from 'components/pages/ProtectedDirectoryEditPage';\n\nconst ProtectionSettingsPage = props => (\n <ProtectedDirectoryEditPage {...props} readonlyPath />\n);\n\nexport default ProtectionSettingsPage;\n","\n var doc = {\"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 doc.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}};\n \n\n var names = {};\n function unique(defs) {\n return defs.filter(\n function(def) {\n if (def.kind !== 'FragmentDefinition') return true;\n var name = def.name.value\n if (names[name]) {\n return false;\n } else {\n names[name] = true;\n return true;\n }\n }\n )\n }\n doc.definitions = doc.definitions.concat(unique(require(\"queries/ProtectedDirectoryEditFragment.graphql\").definitions));\n\n\n // Collect any fragment/type references from a node, adding them to the refs Set\n function collectFragmentReferences(node, refs) {\n if (node.kind === \"FragmentSpread\") {\n refs.add(node.name.value);\n } else if (node.kind === \"VariableDefinition\") {\n var type = node.type;\n if (type.kind === \"NamedType\") {\n refs.add(type.name.value);\n }\n }\n\n if (node.selectionSet) {\n node.selectionSet.selections.forEach(function(selection) {\n collectFragmentReferences(selection, refs);\n });\n }\n\n if (node.variableDefinitions) {\n node.variableDefinitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n\n if (node.definitions) {\n node.definitions.forEach(function(def) {\n collectFragmentReferences(def, refs);\n });\n }\n }\n\n var definitionRefs = {};\n (function extractReferences() {\n doc.definitions.forEach(function(def) {\n if (def.name) {\n var refs = new Set();\n collectFragmentReferences(def, refs);\n definitionRefs[def.name.value] = refs;\n }\n });\n })();\n\n function findOperation(doc, name) {\n for (var i = 0; i < doc.definitions.length; i++) {\n var element = doc.definitions[i];\n if (element.name && element.name.value == name) {\n return element;\n }\n }\n }\n\n function oneQuery(doc, operationName) {\n // Copy the DocumentNode, but clear out the definitions\n var newDoc = {\n kind: doc.kind,\n definitions: [findOperation(doc, operationName)]\n };\n if (doc.hasOwnProperty(\"loc\")) {\n newDoc.loc = doc.loc;\n }\n\n // Now, for the operation we're running, find any fragments referenced by\n // it or the fragments it references\n var opRefs = definitionRefs[operationName] || new Set();\n var allRefs = new Set();\n var newRefs = new Set();\n\n // IE 11 doesn't support \"new Set(iterable)\", so we add the members of opRefs to newRefs one by one\n opRefs.forEach(function(refName) {\n newRefs.add(refName);\n });\n\n while (newRefs.size > 0) {\n var prevRefs = newRefs;\n newRefs = new Set();\n\n prevRefs.forEach(function(refName) {\n if (!allRefs.has(refName)) {\n allRefs.add(refName);\n var childRefs = definitionRefs[refName] || new Set();\n childRefs.forEach(function(childRef) {\n newRefs.add(childRef);\n });\n }\n });\n }\n\n allRefs.forEach(function(refName) {\n var op = findOperation(doc, refName);\n if (op) {\n newDoc.definitions.push(op);\n }\n });\n\n return newDoc;\n }\n \n module.exports = doc;\n \n module.exports[\"UpdateProtectedDirectory\"] = oneQuery(doc, \"UpdateProtectedDirectory\");\n \n"],"names":["evictDomainHostingFieldCache","cache","domainId","fieldName","modify","id","identify","__typename","btoa","fields","hosting","cachedHosting","newCachedHosting","key","startsWith","evictDomainVirtualDirectoryFieldsCache","Object","values","extract","filter","atob","split","forEach","directory","evict","evictDomainVirtualDirectoryMimeTypesCache","evictDomainVirtualDirectoryProtectionCache","modifyCacheOnProtectedDirectoryAddOrDelete","DrawerAsPage","onClose","isOpen","closeOnFormSuccess","closeUrl","form","props","navigate","useNavigate","open","setIsOpen","useState","closeTimeout","useRef","handleClose","useCallback","args","closeFn","preventScrollReset","current","setTimeout","useEffect","clearTimeout","preparedForm","useMemo","isValidElement","cloneElement","onSuccess","_jsx","Drawer","Translate","Locale","getTranslate","ProtectedDirectoryForm","mutation","readonlyPath","withLocation","protectedDirectory","restFormProps","setValues","getInitialValues","path","realm","isNonSsl","isCgiBin","handleFieldChange","name","value","setIn","_jsxs","Form","onFieldChange","applyButton","children","FormField","label","content","FormFieldText","required","autoFocus","inputProps","maxLength","FormFieldCheckbox","onChange","ProtectedDirectoryEditPage","protectedDirectoryId","isProtectedDirectoryLocationSupported","location","useLocation","update","useMutation","UPDATE_PROTECTED_DIRECTORY","refetchQueries","PROTECTED_DIRECTORY_LIST","onCompleted","_","variables","input","addToast","intent","message","params","awaitRefetchQueries","pathname","title","size","submitButton","propTypes","PropTypes","isRequired","doc","loc","source","names","collectFragmentReferences","node","refs","kind","add","type","selectionSet","selections","selection","variableDefinitions","def","definitions","concat","definitionRefs","findOperation","i","length","element","Set","module","exports","operationName","newDoc","hasOwnProperty","opRefs","allRefs","newRefs","refName","prevRefs","has","childRef","op","push","oneQuery"],"sourceRoot":""}
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
AspDotNetSettingsPage.js
17088 bytes
0644
AspDotNetSettingsPage.js.map
57578 bytes
0644
Browse.js
9323 bytes
0644
Browse.js.map
31280 bytes
0644
CreateDirectoryPage.js
4957 bytes
0644
CreateDirectoryPage.js.map
17256 bytes
0644
CreateMimeTypePage.js
8528 bytes
0644
CreateMimeTypePage.js.map
27034 bytes
0644
CreateVirtualDirectoryPage.js
22472 bytes
0644
CreateVirtualDirectoryPage.js.map
71903 bytes
0644
EditErrorDocPage.js
8271 bytes
0644
EditErrorDocPage.js.map
25716 bytes
0644
EditMimeTypePage.js
8959 bytes
0644
EditMimeTypePage.js.map
27964 bytes
0644
EditVirtualDirectoryPage.js
25600 bytes
0644
EditVirtualDirectoryPage.js.map
80217 bytes
0644
ErrorDocList.js
1777 bytes
0644
ErrorDocList.js.map
5830 bytes
0644
MimeTypeList.js
7765 bytes
0644
MimeTypeList.js.map
24584 bytes
0644
PermissionsPage.js
28464 bytes
0644
PermissionsPage.js.map
97083 bytes
0644
PhpVersionPage.js
5373 bytes
0644
PhpVersionPage.js.map
18823 bytes
0644
Protection.js
18244 bytes
0644
Protection.js.map
56034 bytes
0644
ProtectionSettingsPage.js
8753 bytes
0644
ProtectionSettingsPage.js.map
27906 bytes
0644
N4ST4R_ID | Naxtarrr