PageSourceSearch

https://demo.sonraisecurity.com/_next/static/chunks/pages/admin/permits-ad52e6e61cc28c56.js

js sonraisecurity.com collected 2026-10-01 11:36:15 UTC 26,825 bytes, 5 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="70755179-5db8-52dc-a8dc-6c3810bd8d90")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2200],{1885:(e,t,r)=>{"use strict";function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===h(e)}r.d(t,{A:()=>U});let s=1/0;function i(e){return"string"==typeof e}function a(e){return"number"==typeof e}function l(e){return"object"==typeof e}function c(e){return null!=e}function o(e){return!e.trim().length}function h(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let u=Object.prototype.hasOwnProperty;class d{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let r=p(e);t+=r.weight,this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function p(e){let t=null,r=null,s=null,a=1,l=null;if(i(e)||n(e))s=e,t=m(e),r=f(e);else{if(!u.call(e,"name"))throw Error("Missing name property in key");let n=e.name;if(s=n,u.call(e,"weight")&&(a=e.weight)<=0)throw Error(`Property 'weight' in key '${n}' must be a positive integer`);t=m(n),r=f(n),l=e.getFn}return{path:t,id:r,weight:a,src:s,getFn:l}}function m(e){return n(e)?e:e.split(".")}function f(e){return n(e)?e.join("."):e}var g={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(e,t){let r=[],o=!1,u=(e,t,d)=>{if(c(e))if(t[d]){var p,m;let f=e[t[d]];if(!c(f))return;if(d===t.length-1&&(i(f)||a(f)||!0===(p=f)||!1===p||l(m=p)&&null!==m&&"[object Boolean]"==h(p)))r.push(null==f?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-s?"-0":t}(f));else if(n(f)){o=!0;for(let e=0,r=f.length;e<r;e+=1)u(f[e],t,d+1)}else t.length&&u(f,t,d+1)}else r.push(e)};return u(e,i(t)?t.split("."):t,0),o?r:r[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};let x=/[^ ]+/g;class y{constructor({getFn:e=g.getFn,fieldNormWeight:t=g.fieldNormWeight}={}){this.norm=function(e=1,t=3){let r=new Map,n=Math.pow(10,t);return{get(t){let s=t.match(x).length;if(r.has(s))return r.get(s);let i=parseFloat(Math.round(1/Math.pow(s,.5*e)*n)/n);return r.set(s,i),i},clear(){r.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,i(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();i(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,r=this.size();t<r;t+=1)this.records[t].i-=1}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!c(e)||o(e))return;let r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)}_addObject(e,t){let r={i:t,$:{}};this.keys.forEach((t,s)=>{let a=t.getFn?t.getFn(e):this.getFn(e,t.path);if(c(a)){if(n(a)){let e=[],t=[{nestedArrIndex:-1,value:a}];for(;t.length;){let{nestedArrIndex:r,value:s}=t.pop();if(c(s))if(i(s)&&!o(s)){let t={v:s,i:r,n:this.norm.get(s)};e.push(t)}else n(s)&&s.forEach((e,r)=>{t.push({nestedArrIndex:r,value:e})})}r.$[s]=e}else if(i(a)&&!o(a)){let e={v:a,n:this.norm.get(a)};r.$[s]=e}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function v(e,t,{getFn:r=g.getFn,fieldNormWeight:n=g.fieldNormWeight}={}){let s=new y({getFn:r,fieldNormWeight:n});return s.setKeys(e.map(p)),s.setSources(t),s.create(),s}function k(e,{errors:t=0,currentLocation:r=0,expectedLocation:n=0,distance:s=g.distance,ignoreLocation:i=g.ignoreLocation}={}){let a=t/e.length;if(i)return a;let l=Math.abs(n-r);return s?a+l/s:l?1:a}class A{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:n=g.distance,includeMatches:s=g.includeMatches,findAllMatches:i=g.findAllMatches,minMatchCharLength:a=g.minMatchCharLength,isCaseSensitive:l=g.isCaseSensitive,ignoreLocation:c=g.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:n,includeMatches:s,findAllMatches:i,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c},this.pattern=l?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;let o=(e,t)=>{this.chunks.push({pattern:e,alphabet:function(e){let t={};for(let r=0,n=e.length;r<n;r+=1){let s=e.charAt(r);t[s]=(t[s]||0)|1<<n-r-1}return t}(e),startIndex:t})},h=this.pattern.length;if(h>32){let e=0,t=h%32,r=h-t;
3for(;e<r;)o(this.pattern.substr(e,32),e),e+=32;if(t){let e=h-32;o(this.pattern.substr(e),e)}}else o(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,includeMatches:r}=this.options;if(t||(e=e.toLowerCase()),this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:n,distance:s,threshold:i,findAllMatches:a,minMatchCharLength:l,ignoreLocation:c}=this.options,o=[],h=0,u=!1;this.chunks.forEach(({pattern:t,alphabet:d,startIndex:p})=>{let{isMatch:m,score:f,indices:x}=function(e,t,r,{location:n=g.location,distance:s=g.distance,threshold:i=g.threshold,findAllMatches:a=g.findAllMatches,minMatchCharLength:l=g.minMatchCharLength,includeMatches:c=g.includeMatches,ignoreLocation:o=g.ignoreLocation}={}){let h;if(t.length>32)throw Error("Pattern length exceeds max of 32.");let u=t.length,d=e.length,p=Math.max(0,Math.min(n,d)),m=i,f=p,x=l>1||c,y=x?Array(d):[];for(;(h=e.indexOf(t,f))>-1;)if(m=Math.min(k(t,{currentLocation:h,expectedLocation:p,distance:s,ignoreLocation:o}),m),f=h+u,x){let e=0;for(;e<u;)y[h+e]=1,e+=1}f=-1;let v=[],A=1,b=u+d,j=1<<u-1;for(let n=0;n<u;n+=1){let i=0,l=b;for(;i<l;)k(t,{errors:n,currentLocation:p+l,expectedLocation:p,distance:s,ignoreLocation:o})<=m?i=l:b=l,l=Math.floor((b-i)/2+i);b=l;let c=Math.max(1,p-l+1),h=a?d:Math.min(p+l,d)+u,g=Array(h+2);g[h+1]=(1<<n)-1;for(let i=h;i>=c;i-=1){let a=i-1,l=r[e.charAt(a)];if(x&&(y[a]=+!!l),g[i]=(g[i+1]<<1|1)&l,n&&(g[i]|=(v[i+1]|v[i])<<1|1|v[i+1]),g[i]&j&&(A=k(t,{errors:n,currentLocation:a,expectedLocation:p,distance:s,ignoreLocation:o}))<=m){if(m=A,(f=a)<=p)break;c=Math.max(1,2*p-f)}}if(k(t,{errors:n+1,currentLocation:p,expectedLocation:p,distance:s,ignoreLocation:o})>m)break;v=g}let w={isMatch:f>=0,score:Math.max(.001,A)};if(x){let e=function(e=[],t=g.minMatchCharLength){let r=[],n=-1,s=-1,i=0;for(let a=e.length;i<a;i+=1){let a=e[i];a&&-1===n?n=i:a||-1===n||((s=i-1)-n+1>=t&&r.push([n,s]),n=-1)}return e[i-1]&&i-n>=t&&r.push([n,i-1]),r}(y,l);e.length?c&&(w.indices=e):w.isMatch=!1}return w}(e,t,d,{location:n+p,distance:s,threshold:i,findAllMatches:a,minMatchCharLength:l,includeMatches:r,ignoreLocation:c});m&&(u=!0),h+=f,m&&x&&(o=[...o,...x])});let d={isMatch:u,score:u?h/this.chunks.length:1};return u&&r&&(d.indices=o),d}}class b{constructor(e){this.pattern=e}static isMultiMatch(e){return j(e,this.multiRegex)}static isSingleMatch(e){return j(e,this.singleRegex)}search(){}}function j(e,t){let r=e.match(t);return r?r[1]:null}class w extends b{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}}class C extends b{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=-1===e.indexOf(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}}class _ extends b{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}}class N extends b{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}}class M extends b{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}}class S extends b{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}}class E extends b{constructor(e,{location:t=g.location,threshold:r=g.threshold,distance:n=g.distance,includeMatches:s=g.includeMatches,findAllMatches:i=g.findAllMatches,minMatchCharLength:a=g.minMatchCharLength,isCaseSensitive:l=g.isCaseSensitive,ignoreLocation:c=g.ignoreLocation}={}){super(e),this._bitapSearch=new A(e,{location:t,threshold:r,distance:n,includeMatches:s,findAllMatches:i,minMatchCharLength:a,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class $ extends b{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,r=0,n=[],s=this.pattern.length;for(;(t=e.indexOf(this.pattern,r))>-1;)r=t+s,n.push([t,r-1]);let i=!!n.length;return{isMatch:i,score:+!i,indices:n}}}let P=[w,$,_,N,S,M,C,E],L=P.length,I=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,W=new Set([E.type,$.type]);class R{constructor(e,{isCaseSensitive:t=g.isCaseSensitive,includeMatches:r=g.includeMatches,minMatchCharLength:n=g.minMatchCharLength,ignoreLocation:s=g.ignoreLocation,findAllMatches:i=g.findAllMatches,location:a=g.location,threshold:l=g.threshold,distance:c=g.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:r,minMatchCharLength:n,findAllMatches:i,ignoreLocation:s,location:a,threshold:l,distance:c},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map(e=>{let r=e.trim().split(I).filter(e=>e&&!!e.trim()),n=[];for(let e=0,s=r.length;e<s;e+=1){let s=r[e],i=!1,a=-1;for(;!i&&++a<L;){let e=P[a],r=e.isMultiMatch(s);r&&(n.push(new e(r,t)),i=!0)}if(!i)for(a=-1;++a<L;){let e=P[a],r=e.isSingleMatch(s);if(r){n.push(new e(r,t));break}}}return n})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let s=0,i=[],a=0;for(let n=0,l=t.length;n<l;n+=1){let l=t[n];i.length=0,s=0;for(let t=0,n=l.length;t<n;t+=1){let n=l[t],{isMatch:c,indices:o,score:h}=n.search(e);if(c){if(s+=1,a+=h,r){let e=n.constructor.type;W.has(e)?i=[...i,...o]:i.push(o)}}else{a=0,s=0,i.length=0;break}}
3if(s){let e={isMatch:!0,score:a/s};return r&&(e.indices=i),e}}return{isMatch:!1,score:1}}}let F=[];function T(e,t){for(let r=0,n=F.length;r<n;r+=1){let n=F[r];if(n.condition(e,t))return new n(e,t)}return new A(e,t)}let O={AND:"$and",OR:"$or"},D={PATH:"$path",PATTERN:"$val"},q=e=>!!(e[O.AND]||e[O.OR]),B=e=>({[O.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function K(e,t,{auto:r=!0}={}){let s=e=>{let a=Object.keys(e),c=!!e[D.PATH];if(!c&&a.length>1&&!q(e))return s(B(e));if(!n(e)&&l(e)&&!q(e)){let n=c?e[D.PATH]:a[0],s=c?e[D.PATTERN]:e[n];if(!i(s))throw Error(`Invalid value for key ${n}`);let l={keyId:f(n),pattern:s};return r&&(l.searcher=T(s,t)),l}let o={children:[],operator:a[0]};return a.forEach(t=>{let r=e[t];n(r)&&r.forEach(e=>{o.children.push(s(e))})}),o};return q(e)||(e=B(e)),s(e)}function V(e,t){let r=e.matches;t.matches=[],c(r)&&r.forEach(e=>{if(!c(e.indices)||!e.indices.length)return;let{indices:r,value:n}=e,s={indices:r,value:n};e.key&&(s.key=e.key.src),e.idx>-1&&(s.refIndex=e.idx),t.matches.push(s)})}function z(e,t){t.score=e.score}class U{constructor(e,t={},r){this.options={...g,...t},this.options.useExtendedSearch,this._keyStore=new d(this.options.keys),this.setCollection(e,r)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof y))throw Error("Incorrect 'index' type");this._myIndex=t||v(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){c(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let r=0,n=this._docs.length;r<n;r+=1){let s=this._docs[r];e(s,r)&&(this.removeAt(r),r-=1,n-=1,t.push(s))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:r,includeScore:n,shouldSort:s,sortFn:l,ignoreFieldNorm:c}=this.options,o=i(e)?i(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return!function(e,{ignoreFieldNorm:t=g.ignoreFieldNorm}){e.forEach(e=>{let r=1;e.matches.forEach(({key:e,norm:n,score:s})=>{let i=e?e.weight:null;r*=Math.pow(0===s&&i?Number.EPSILON:s,(i||1)*(t?1:n))}),e.score=r})}(o,{ignoreFieldNorm:c}),s&&o.sort(l),a(t)&&t>-1&&(o=o.slice(0,t)),function(e,t,{includeMatches:r=g.includeMatches,includeScore:n=g.includeScore}={}){let s=[];return r&&s.push(V),n&&s.push(z),e.map(e=>{let{idx:r}=e,n={item:t[r],refIndex:r};return s.length&&s.forEach(t=>{t(e,n)}),n})}(o,this._docs,{includeMatches:r,includeScore:n})}_searchStringList(e){let t=T(e,this.options),{records:r}=this._myIndex,n=[];return r.forEach(({v:e,i:r,n:s})=>{if(!c(e))return;let{isMatch:i,score:a,indices:l}=t.searchIn(e);i&&n.push({item:e,idx:r,matches:[{score:a,value:e,norm:s,indices:l}]})}),n}_searchLogical(e){let t=K(e,this.options),r=(e,t,n)=>{if(!e.children){let{keyId:r,searcher:s}=e,i=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:s});return i&&i.length?[{idx:n,item:t,matches:i}]:[]}let s=[];for(let i=0,a=e.children.length;i<a;i+=1){let a=r(e.children[i],t,n);if(a.length)s.push(...a);else if(e.operator===O.AND)return[]}return s},n=this._myIndex.records,s={},i=[];return n.forEach(({$:e,i:n})=>{if(c(e)){let a=r(t,e,n);a.length&&(s[n]||(s[n]={idx:n,item:e,matches:[]},i.push(s[n])),a.forEach(({matches:e})=>{s[n].matches.push(...e)}))}}),i}_searchObjectList(e){let t=T(e,this.options),{keys:r,records:n}=this._myIndex,s=[];return n.forEach(({$:e,i:n})=>{if(!c(e))return;let i=[];r.forEach((r,n)=>{i.push(...this._findMatches({key:r,value:e[n],searcher:t}))}),i.length&&s.push({idx:n,item:e,matches:i})}),s}_findMatches({key:e,value:t,searcher:r}){if(!c(t))return[];let s=[];if(n(t))t.forEach(({v:t,i:n,n:i})=>{if(!c(t))return;let{isMatch:a,score:l,indices:o}=r.searchIn(t);a&&s.push({score:l,key:e,value:t,idx:n,norm:i,indices:o})});else{let{v:n,n:i}=t,{isMatch:a,score:l,indices:c}=r.searchIn(n);a&&s.push({score:l,key:e,value:n,norm:i,indices:c})}return s}}U.version="6.6.2",U.createIndex=v,U.parseIndex=function(e,{getFn:t=g.getFn,fieldNormWeight:r=g.fieldNormWeight}={}){let{keys:n,records:s}=e,i=new y({getFn:t,fieldNormWeight:r});return i.setKeys(n),i.setIndexRecords(s),i},U.config=g,U.parseQuery=K,function(...e){F.push(...e)}(R)},21808:(e,t,r)=>{"use strict";r.d(t,{m:()=>l});var n=r(6029),s=r(69222),i=r(53525);let a=e=>{let{children:t,iconButton:r,...a}=e;return"button"===a.type?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.K,{icon:"more-vertical",size:"sm",...r}),t]}):"menu"===a.type&&a.menuItems.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.W1,{items:a.menuItems,align:"end",stopPropagation:!0,children:(0,n.jsx)(s.K,{icon:"more-vertical",size:"sm",...r})}),t]}):null};function l(e,t){return{id:"actions",header:()=>(0,n.jsx)("span",{className:"sr-only",children:"Actions"}),meta:{className:"w-10"},cell:t=>{let{row:r}=t;return(0,n.jsx)(a,{...e(r.original)})},enableHiding:!1,...t}}},24040:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__N_SSP:()=>q,default:()=>B});var n=r(6029),s=r(97803),i=r(31364),a=r(83650),l=r(3947),c=r(21808),o=r(55314),h=r(55809),u=r(59391),d=r(85966),p=r(26626);
3function m(){let e=(0,d._)(["\n    fragment WorkspaceCreatePermit on WorkspaceCreatePermit {\n  id\n  createdAt\n  domain\n  planType\n  accountType\n}\n    "]);return m=function(){return e},e}let f=(0,p.Ay)(m());var g=r(50197);function x(){let e=(0,d._)(["\n    mutation CreateWorkspaceCreatePermit($input: WorkspaceCreatePermitCreateInput!) {\n  createWorkspaceCreatePermit(input: $input) {\n    ...WorkspaceCreatePermit\n  }\n}\n    ",""]);return x=function(){return e},e}let y=(0,p.Ay)(x(),f);function v(){let e=(0,d._)(["\n    mutation DeleteWorkspaceCreatePermit($id: String!) {\n  deleteWorkspaceCreatePermit(id: $id) {\n    ...WorkspaceCreatePermit\n  }\n}\n    ",""]);return v=function(){return e},e}let k=(0,p.Ay)(v(),f);function A(){let e=(0,d._)(["\n    mutation UpdateWorkspaceCreatePermit($input: WorkspaceCreatePermitUpdateInput!) {\n  updateWorkspaceCreatePermit(input: $input) {\n    ...WorkspaceCreatePermit\n  }\n}\n    ",""]);return A=function(){return e},e}let b=(0,p.Ay)(A(),f);var j=r(49325),w=r(3967),C=r(51e3),_=r(55729);let N=[{id:"domain",header:"Domain",accessorKey:"domain"},{id:"account-type",header:"Account Type",accessorKey:"accountType"},{id:"plan-type",header:"Plan Type",accessorKey:"planType"},{id:"createdAt",header:"Created",accessorKey:"createdAt",cell:e=>{let{row:t}=e;return(0,C._)(new Date(t.original.createdAt))}},(0,c.m)(e=>{let[t,r]=(0,_.useState)(!1),[,s]=g.n_(k);return{type:"menu",menuItems:[{iconLeft:"pen",label:"Edit",onClick:()=>{r(!0)}},{iconLeft:"trash",label:"Delete",variant:"danger",group:"",onClick:()=>{u.oR.promise(s({id:e.id}).then(e=>{if(e.error)throw Error(e.error.message)}),{loading:"Deleting...",success:"Deleted",error:j.A})}}],children:(0,n.jsx)(E,{item:e,open:t,onClose:()=>r(!1)})}})];function M(e){let{open:t,onClose:r}=e,[,s]=g.n_(y),[c,u]=(0,_.useState)(!1),[d,p]=(0,_.useState)(""),[m,f]=(0,_.useState)(l.$vr.Trial),[x,v]=(0,_.useState)(l.lEx.Startup);return(0,n.jsx)(o.aF,{title:"New Workspace Create Permit",description:"This will allow a user with a matching email to create a workspace",primaryButton:{children:"Create",isLoading:c,onClick:async()=>{u(!0);let e=await s({input:{domain:d,accountType:m,planType:x}});if(u(!1),e.error)return void(0,w.iN)(e.error);(0,w.kX)("Created"),r()}},onOpenChange:r,open:t,children:(0,n.jsxs)(S,{children:[(0,n.jsx)(h.p,{elementLeft:"john.doe@",className:"col-span-2",placeholder:"acme.com",label:"Domain",value:d,onValueChange:p}),(0,n.jsx)(i.A,{className:"col-span-2 lg:col-span-1",value:m,onValueChange:e=>f(null!=e?e:l.$vr.None)}),(0,n.jsx)(a.A,{className:"col-span-2 lg:col-span-1",value:x,onValueChange:e=>v(null!=e?e:l.lEx.None)})]})})}function S(e){return(0,n.jsx)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:e.children})}function E(e){let[,t]=g.n_(b),[r,s]=(0,_.useState)(!1),[c,u]=(0,_.useState)(e.item.domain),[d,p]=(0,_.useState)(e.item.accountType),[m,f]=(0,_.useState)(e.item.planType);return(0,n.jsx)(o.aF,{title:"Edit Workspace Create Permit",primaryButton:{children:"Save",isLoading:r,onClick:async()=>{s(!0);let r=await t({input:{id:e.item.id,domain:c,accountType:d,planType:m}});if(s(!1),r.error)return void(0,w.iN)(r.error);(0,w.kX)("Updated"),e.onClose()}},onOpenChange:e.onClose,open:e.open,children:(0,n.jsxs)(S,{children:[(0,n.jsx)(h.p,{elementLeft:"john.doe@",className:"col-span-2",placeholder:"acme.com",label:"Domain",value:c,onValueChange:u}),(0,n.jsx)(i.A,{className:"col-span-2 lg:col-span-1",value:d,onValueChange:e=>p(null!=e?e:l.$vr.None)}),(0,n.jsx)(a.A,{className:"col-span-2 lg:col-span-1",value:m,onValueChange:e=>e&&f(null!=e?e:l.lEx.None)})]})})}var $=r(24002),P=r(73057),L=r(55613),I=r(89210),W=r(73537),R=r(1559);function F(){let e=(0,d._)(["\n    query ListWorkspaceCreatePermits {\n  workspaceCreatePermits {\n    ...WorkspaceCreatePermit\n  }\n}\n    ",""]);return F=function(){return e},e}let T=(0,p.Ay)(F(),f);var O=r(1885);function D(){let[{data:e,fetching:t}]=(0,R.s)(T,"workspaceCreatePermits",void 0),[r,s]=(0,_.useState)(""),[i,a]=(0,_.useState)(!1),l=(0,_.useMemo)(()=>{var t;let n=null!=(t=null==e?void 0:e.workspaceCreatePermits)?t:[];return r?new O.A(n,{keys:["domain"]}).search(r).map(e=>e.item):n},[r,e]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(P.A,{title:["Admin","Permits"]}
3),(0,n.jsx)($.A.Nav,{breadcrumbs:[{type:"link",value:"Permits"},{value:"All"}]}),(0,n.jsx)($.A.ActionBar,{title:"Workspace Permits",children:(0,n.jsx)(L.$,{onClick:()=>a(!0),iconLeft:"plus",children:"Create Permit"})}),(0,n.jsx)($.A.FilterBar,{children:(0,n.jsx)(I.I,{className:"w-[12em]",placeholder:"Search",value:r,onValueChange:s})}),(0,n.jsxs)($.A.Body,{children:[(0,n.jsx)(W.XI,{isLoading:t,columns:N,data:l}),(0,n.jsx)(M,{open:i,onClose:()=>a(!1)})]})]})}D.getLayout=function(e){return(0,n.jsx)(s.A,{children:e})};var q=!0;let B=D},31364:(e,t,r)=>{"use strict";r.d(t,{A:()=>l,s:()=>a});var n=r(6029),s=r(3947),i=r(78869);let a=[{label:"Trial",value:s.$vr.Trial},{label:"Customer",value:s.$vr.Customer},{label:"Navattic Internal",value:s.$vr.Internal},{label:"None",value:s.$vr.None}];function l(e){let{isFilter:t,...r}=e;return(0,n.jsx)(i.l6,{items:a,placeholder:"Select account type",...t?{elementLeft:"Account"}:{label:"Select account type"},...r})}},34545:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/permits",function(){return r(24040)}])},73057:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(6029),s=r(81278),i=r(51652);let a=e=>{let{title:t,includeSlug:r}=e,a=(0,s.useRouter)().query.workspace_slug,l=Array.isArray(t)?t:[t];r&&l.push(a);let c=l.join(" \xb7 ");return(0,n.jsx)(i.bV,{title:c,openGraph:{title:c}})}},83650:(e,t,r)=>{"use strict";r.d(t,{A:()=>l,o:()=>a});var n=r(6029),s=r(3947),i=r(78869);let a=[{label:"Starter",value:s.lEx.SingleSeat},{label:"Starter Plus",value:s.lEx.StarterPlus},{label:"Startup",value:s.lEx.Startup},{label:"Base",value:s.lEx.Base},{label:"Growth",value:s.lEx.Growth},{label:"Enterprise",value:s.lEx.Enterprise},{label:"None",value:s.lEx.None}];function l(e){let{isFilter:t,...r}=e;return(0,n.jsx)(i.l6,{label:t?void 0:"Workspace plan type",elementLeft:t&&"Plan",items:a,placeholder:"Select plan",className:"w-auto min-w-0",...r})}},97803:(e,t,r)=>{"use strict";r.d(t,{A:()=>m});var n=r(6029),s=r(72807),i=r(3947),a=r(73096),l=r(55613),c=r(98077),o=r(82203),h=r.n(o),u=r(81278);function d(){let e=(0,u.useRouter)(),t=[{name:"Workspaces",items:[{id:"workspace",n
3ame:"Workspaces",icon:"building",href:"/admin",isActive:e=>"/admin"===e},{id:"permits",name:"Permits",icon:"file-text",href:"/admin/permits",isActive:e=>e.includes("/admin/permits")},{id:"closure-requests",name:"Closure requests",icon:"square-x",href:"/admin/closure-requests",isActive:e=>e.includes("/admin/closure-requests")},{id:"feedback",name:"Feedback",icon:"message-square",href:"/admin/feedback",isActive:e=>e.includes("/admin/feedback")},{id:"export",name:"Export",icon:"download",href:"/admin/export",isActive:e=>e.includes("/admin/export")}]},{name:"Feature flags",items:[{id:"feature-flags",name:"Feature flags",icon:"flag",href:"/admin/feature-flags",isActive:e=>"/admin/feature-flags"===e},{id:"cohort-deployments",name:"Cohort deployments",icon:"team",href:"/admin/cohort-deployments",isActive:e=>"/admin/cohort-deployments"===e}]},{name:"Broadcasts",items:[{id:"broadcasts",name:"Broadcasts",icon:"radio",href:"/admin/broadcasts",isActive:e=>e.includes("/admin/broadcasts")}]},{name:"Features",items:[{id:"playbooks",name:"Playbooks",icon:"zap",href:"/admin/playbooks",isActive:e=>"/admin/playbooks"===e},{id:"crm-pull",name:"CRM Pull",icon:"refresh",href:"/admin/crm-pull",isActive:e=>"/admin/crm-pull"===e}]},{name:"Copilot",items:[{id:"copilot-logs",name:"Logs",icon:"list",href:"/admin/copilot",isActive:e=>e.includes("/admin/copilot")}]},{name:"Manage",items:[{id:"staff",name:"Staff",icon:"contact",href:"/admin/manage/staff",isActive:e=>e.includes("/admin/manage/staff"),hidden:!(0,s.cM)(i.ek1.Admin)},{id:"memberships",name:"Memberships",icon:"user-check",href:"/admin/manage/memberships",isActive:e=>e.includes("/admin/manage/memberships")}]},{name:"Activity",items:[{id:"activity-users",name:"Users",icon:"user",href:"/admin/activity/users",isActive:e=>e.includes("/admin/activity/users")}]}];return(0,n.jsxs)("div",{className:"border-subtle relative flex h-full w-[224px] shrink-0 flex-col justify-between border-r bg-linear-to-t from-gray-50 to-white",children:[(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-5",children:[(0,n.jsx)(c.Ay,{height:"17px",className:"text-emphasis"}),(0,n.jsx)(a.E,{colorScheme:"gray",iconLeft:"shield",children:"Admin"})]}),(0,n.jsx)("div",{className:"flex flex-col gap-2 px-2",children:(0,n.jsx)("div",{className:"flex flex-col gap-2",children:t.map(t=>(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("div",{className:"text-subtle px-2.5 py-3 text-xs leading-none font-medium",children:t.name}),(0,n.jsx)("div",{className:"flex flex-col gap-px",children:t.items.filter(e=>!e.hidden).map(t=>{let{href:r,isActive:s=e=>e.includes(r),...i}=t;return(0,n.jsx)(h(),{href:r,children:(0,n.jsx)(l.$,{iconLeft:i.icon,variant:"ghost",isActive:s(e.pathname),className:{root:"w-full border-none",contentWrapper:"justify-start gap-2"},children:i.name})},i.id)})})]},t.name))})})]}),(0,n.jsx)("div",{className:"m-5",children:(0,n.jsx)(h(),{href:"/",children:(0,n.jsx)(l.$,{variant:"outline",iconLeft:"arrow-left",className:"w-full",children:"Back to app"})})})]})}var p=r(1237);function m(e){let{children:t}=e;return(0,n.jsx)(p.A,{showNav:!1,children:(0,n.jsx)("div",{className:"relative flex h-full w-full flex-col",children:(0,n.jsxs)("div",{className:"flex h-full w-full items-stretch",children:[(0,n.jsx)(d,{}),(0,n.jsx)("div",{className:"w-full overflow-auto",children:(0,n.jsx)("main",{className:"bg-default ease flex h-full min-w-[600px] flex-1 flex-col overflow-auto transition-all",children:t})})]})})})}}},e=>{e.O(0,[6593,8635,8213,1663,9616,4254,4664,238,9913,8277,3684,4446,919,6838,9391,2292,1642,8750,1652,9047,6450,9899,7283,5460,488,5742,9928,7929,330,2726,2532,8975,6100,865,2593,4379,2146,1224,5389,2045,2444,5720,7676,7135,8938,1362,500,4641,3482,7205,8388,1237,8255,8792],()=>e(e.s=34545)),_N_E=e.O()}]);
4//# sourceMappingURL=permits-ad52e6e61cc28c56.js.map
5//# debugId=70755179-5db8-52dc-a8dc-6c3810bd8d90

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.