PageSourceSearch

https://staticshield.vercel.app/_next/static/chunks/pages/site/[siteId]-7ec7e1b413f5feb802f3.js

js staticshield.vercel.app collected 2026-10-03 07:48:34 UTC 36,188 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[29],{54668:function(e,t,s){"use strict";var i=s(62478),r=s(41664),n=s(85893);t.Z=function(e){var t=e.alignRight,s=void 0===t||t;return(0,n.jsx)("div",{className:"py-10 mt-5 px-7 bg-warmgray-100",children:(0,n.jsxs)("div",{className:"grid max-w-xl grid-cols-2 ".concat(s&&"sm:mx-auto"),children:[(0,n.jsxs)("div",{className:"grid gap-x-2 gap-y-3",children:[(0,n.jsx)(i.xv,{small:!0,className:"mt-2 uppercase !font-bold !text-left",children:"Frameworks"}),(0,n.jsx)(r.default,{href:"/docs/with/nextjs-11",children:(0,n.jsx)(i.rU,{underline:!0,children:"Nextjs 11"})}),(0,n.jsx)(r.default,{href:"/docs/with/nextjs",children:(0,n.jsx)(i.rU,{underline:!0,children:"Nextjs"})}),(0,n.jsx)(r.default,{href:"/docs/with/svelte",children:(0,n.jsx)(i.rU,{underline:!0,children:"Svelte"})}),(0,n.jsx)(r.default,{href:"/docs/with/sveltekit",children:(0,n.jsx)(i.rU,{underline:!0,children:"Svelte Kit"})}),(0,n.jsx)(r.default,{href:"/docs/with/vue",children:(0,n.jsx)(i.rU,{underline:!0,children:"Vuejs"})}),(0,n.jsx)(r.default,{href:"/docs/with/vue",children:(0,n.jsx)(i.rU,{underline:!0,children:"Nuxtjs"})}),(0,n.jsx)(r.default,{href:"/docs/with/vue",children:(0,n.jsx)(i.rU,{underline:!0,children:"React"})}),(0,n.jsx)(r.default,{href:"/docs/with/vue",children:(0,n.jsx)(i.rU,{underline:!0,children:"Gatsby"})}),(0,n.jsx)(r.default,{href:"/docs/with/vue",children:(0,n.jsx)(i.rU,{underline:!0,children:"HTML"})})]}),(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)(i.xv,{small:!0,className:"mt-2 uppercase !font-bold !text-left",children:"Useful Links"}),(0,n.jsx)(r.default,{href:"/with",children:(0,n.jsx)(i.rU,{underline:!0,className:"mt-2",children:"Guides"})}),(0,n.jsx)(r.default,{href:"/docs/",children:(0,n.jsx)(i.rU,{underline:!0,className:"mt-2",children:"Docs"})}),(0,n.jsx)(r.default,{href:"/with",children:(0,n.jsx)(i.rU,{underline:!0,className:"mt-2",children:"Support"})}),(0,n.jsx)(i.rU,{href:"https://github.com/Lalit2005",underline:!0,className:"mt-2",children:"Made by Lalit"})]})]})})}},35875:function(e,t,s){"use strict";s.d(t,{Z:function(){return j}});var i=s(92809),r=s(66311),n=s(62478),a=s(41664),c=s(25675),l=s(22912),o=s(59920),d=s(67294),u=s(64135),p=s(42283),x=s(85893);function h(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function m(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?h(Object(s),!0).forEach((function(t){(0,i.Z)(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):h(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}function j(e){var t=(0,d.useState)(!1),s=t[0],i=t[1],h=(0,n.e1)(),j=(0,r.Z)(h,2),v=(j[0],j[1]),b=e.user,f=e.isNewSiteButtonVisible,w=(0,p.cI)({defaultValues:{email:null===b||void 0===b?void 0:b.email,name:null===b||void 0===b?void 0:b.name}}),y=w.register,g=w.handleSubmit,N=w.reset,A=(0,u.Z)({apikey:"2f163901-f8a9-435a-8b87-cbf43fa2a7b2",onSuccess:function(){i(!1),v({text:"Your feedback was successfully delivered",type:"success"}),N()},onError:function(){i(!1),v({text:"Your feedback was successfully delivered",type:"success"})}}).submit;return(0,x.jsxs)("div",{className:"fixed z-30 flex items-center justify-between w-full px-16 mb-12 border-b border-gray-200 bg-gray-50",children:[(0,x.jsx)(a.default,{href:"/dashboard",children:(0,x.jsxs)("div",{className:"flex items-center justify-between cursor-pointer select-none",children:[(0,x.jsx)(c.default,{src:l.Z,alt:"StaticShield",width:"30px",height:"30px"}),(0,x.jsxs)(n.xv,{b:!0,p:!0,className:"ml-2 text-2xl",children:["Static",(0,x.jsx)("span",{className:"px-1 bg-gray-900 rounded-md text-gray-50",children:"Shield"})]}),(0,x.jsx)("span",{children:(0,x.jsx)("sup",{className:"ml-1 text-gray-500",children:"BETA"})}),(0,x.jsx)(n.Ct,{type:"success",size:"small",className:"invisible ml-2 sm:visible",children:(0,x.jsx)("strong",{children:"DASHBOARD"})})]})}),(0,x.jsx)("div",{className:"absolute right-48",children:(0,x.jsxs)("div",{className:"flex items-center justify-between",children:[(0,x.jsx)(n.J2,{content:function(){return(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)("form",{onSubmit:function(){i(!0),g(A)()},children:[(0,x.jsx)(n.J2.Item,{children:"Thanks for giving feedback \ud83d\ude00"}),(0,x.jsx)(n.J2.Item,{children:(0,x.jsx)(n.gx,m({},y("feedback",{required:"Please enter a valid feedback",minLength:"3"})))}),(0,x.jsx)(n.J2.Item,{children:(0,x.jsx)(n.zx,{htmlType:"submit",type:"secondary",children:s?(0,x.jsx)(n.$j,{className:"relative top-1"}):(0,x.jsxs)(x.Fragment,{children:["Send Feedback ",(0,x.jsx)(o.vw7,{className:"p-1"})]})})})]})})},className:"invisible sm:visible",children:(0,x.jsx)(n.zx,{size:"small",auto:!0,className:"!cursor-text mr-3",children:"Feedback"})}),f&&(0,x.jsx)(n.u,{text:"Password protect a new website",placement:"leftStart",enterDelay:200,type:"dark",children:(0,x.jsx)(a.default,{href:"/new",children:(0,x.jsx)(n.zx,{size:"small",auto:!0,type:"default",className:"flex items-center justify-center invisible mr-3 sm:visible",children:(0,x.jsx)(o.gIb,{className:"mt-1 -mx-2"})})})}),(0,x.jsx)("div",{className:"-mt-2",children:(0,x.jsx)(n.J2,{content:function(){return(0,x.jsxs)("div",{className:"!min-w-[200px]",children:[(0,x.jsx)(n.J2.Item,{children:(0,x.jsxs)("p",{className:"!block font-bold",children:[(0,x.jsx)(o.n5m,{className:"inline-block w-5 h-5 mr-3"}),null===b||void 0===b?void 0:b.name]})}),(0,x.jsx)(n.J2.Item,{line:!0}),(0,x.jsx)(n.J2.Item,{className:"md:!hidden",children:(0,x.jsx)(n.rU,{block:!0,href:"/new",className:"-mx-5",children:(0,x.jsxs)("p",{className:"!font-bold -my-1",children:[(0,x.jsx)(o.gIb,{className:"inline-block w-5 h-5 mr-3"}),"Add new site"]})})}),(0,x.jsx)(n.J2.Item,{line:!0,className:"md:!hidden"}),(0,x.jsx)(n.J2.Item,{children:(0,x.jsx)(n.rU,{block:!0,href:"/logout",className:"-mx-5",children:(0,x.jsxs)("p",{className:"!font-bold -my-1",children:[(0,x.jsx)(o.d6Z,{className:"inline-block w-5 h-5 mr-3"}),"Logout"]})})}),(0,x.jsx)(n.J2.Item,{line:!0}),(0,x.jsx)(n.J2.Item,{children:(0,x.jsx)(n.rU,{block:!0,href:"/support",className:"font-bold",children:(0,x.jsxs)("p",{className:"-my-1 !font-bold",children:[(0,x.jsx)(o.WKj,{className:"inline-block w-5 h-5 mr-3"}),"Support"]})})}),(0,x.jsx)(n.J2.Item,{line:!0}),(0,x.jsx)(n.J2.Item,{children:(0,x.jsx)(n.rU,{block:!0,href:"/docs",className:"font-bold",children:(0,x.jsxs)("p",{className:"-my-1 !font-bold",children:[(0,x.jsx)(o.fy8,{className:"inline-block w-5 h-5 mr-3"}),"Docs"]})})})]})},placement:"leftStart",children:(0,x.jsx)(n.u,{text:null===b||void 0===b?void 0:b.email,type:"dark",className:"!-my-5",placement:"leftStart",children:(0,x.jsx)(n.qE,{src:null===b||void 0===b?void 0:b.picture,size:"small",className:"cursor-pointer"})})})})]})})]})}},74103:function(e,t,s){"use strict";
1var i=s(30266),r=s(809),n=s.n(r),a=function(){var e=(0,i.Z)(n().mark((function e(t){var s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return s=e.sent,e.abrupt("return",s.json());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.Z=a},99942:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return B}});var i=s(11163),r=s(35875),n=s(14713),a=s(62478),c=s(41664),l=s(59920),o=s(92809),d=s(30266),u=s(66311),p=s(809),x=s.n(p),h=s(42283),m=s(43530),j=s(1604),v=s(67294),b=s(9669),f=s.n(b),w=s(52503);function y(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function g(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?y(Object(s),!0).forEach((function(t){(0,o.Z)(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):y(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var N=j.Ry({site_name:j.Z_().nonempty().min(2).max(48),password:j.Z_().nonempty().min(8).max(50),site_desc:j.Z_(),expiration_days:j.Rx().int().min(1).max(365)});function A(e,t,s,i){return k.apply(this,arguments)}function k(){return(k=(0,d.Z)(x().mark((function e(t,s,i,r){return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N.safeParse(t).success){e.next=2;break}return e.abrupt("return",{success:!1});case 2:if(console.log(t),"site_name"!==s){e.next=16;break}return e.prev=4,e.next=7,f().post("/api/site/update-name",{siteName:t.site_name,siteId:i});case 7:e.next=12;break;case 9:return e.prev=9,e.t0=e.catch(4),e.abrupt("return",{success:!1});case 12:return(0,w.JG)("/api/get-site-from-site-id/?siteId="+i,g(g({},r),{},{site_name:t.site_name}),!1),e.abrupt("return",{success:!0});case 16:if("site_desc"!==s){e.next=29;break}return e.prev=17,e.next=20,f().post("/api/site/update-site-desc",{siteDesc:t.site_desc,siteId:i});case 20:e.next=25;break;case 22:return e.prev=22,e.t1=e.catch(17),e.abrupt("return",{success:!1});case 25:return(0,w.JG)("/api/get-site-from-site-id/?siteId="+i,g(g({},r),{},{site_desc:t.site_desc}),!1),e.abrupt("return",{success:!0});case 29:if("expiration_days"!==s){e.next=42;break}return e.prev=30,e.next=33,f().post("/api/site/update-max-login-duration",{max_login_duration:t.expiration_days,siteId:i});case 33:e.next=38;break;case 35:return e.prev=35,e.t2=e.catch(30),e.abrupt("return",{success:!1});case 38:return(0,w.JG)("/api/get-site-from-site-id/?siteId="+i,g(g({},r),{},{expiration_days:t.expiration_days}),!1),e.abrupt("return",{success:!0});case 42:if("password"!==s){e.next=57;break}if("A-str0ng-p@55w0rd"!==t.password){e.next=45;break}return e.abrupt("return",{success:!1});case 45:return e.prev=45,e.next=48,f().post("/api/site/update-site-password",{password:t.password,siteId:i});case 48:e.next=53;break;case 50:return e.prev=50,e.t3=e.catch(45),e.abrupt("return",{success:!1});case 53:return(0,w.JG)("/api/get-site-from-site-id/?siteId="+i,g(g({},r),{},{password:t.password}),!1),e.abrupt("return",{success:!0});case 57:if("logo_url"!==s){e.next=70;break}return e.prev=58,e.next=61,f().post("/api/site/update-logo-url",{logoUrl:t.logo_url,siteId:i});case 61:e.next=66;break;case 63:return e.prev=63,e.t4=e.catch(58),e.abrupt("return",{success:!1});case 66:return(0,w.JG)("/api/get-site-from-site-id/?siteId="+i,g(g({},r),{},{logo_url:t.logo_url}),!1),e.abrupt("return",{success:!0});case 70:if("cap"!==s){e.next=83;break}return e.prev=71,e.next=74,f().post("/api/site/update-caption",{cap:t.cap,siteId:i});case 74:e.next=79;break;case 76:return e.prev=76,e.t5=e.catch(71),e.abrupt("return",{success:!1});case 79:return(0,w.JG)("/api/get-site-from-site-id/?siteId="+i,g(g({},r),{},{cap:t.cap}),!1),e.abrupt("return",{success:!0});case 83:if("title"!==s){e.next=94;break}return e.prev=84,e.next=87,f().post("/api/site/update-title",{title:t.title,siteId:i});case 87:e.next=92;break;case 89:return e.prev=89,e.t6=e.catch(84),e.abrupt("return",{success:!1});case 92:return(0,w.JG)("/api/get-site-from-site-id/?siteId="+i,g(g({},r),{},{title:t.title}),!1),e.abrupt("return",{success:!0});case 94:case"end":return e.stop()}}),e,null,[[4,9],[17,22],[30,35],[45,50],[58,63],[71,76],[84,89]])})))).apply(this,arguments)}var _=s(85893);function S(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function I(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};
1t%2?S(Object(s),!0).forEach((function(t){(0,o.Z)(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):S(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}function O(e){var t,s=e.data,i=function(e){return(0,_.jsx)("p",{className:"px-3 py-1 text-base text-red-500 border border-red-600 rounded max-w-[384px]",children:e})},r=(0,a.e1)(),n=(0,u.Z)(r,2),c=(n[0],n[1]),l=function(e){t=e},o=(0,v.useState)(null===s||void 0===s?void 0:s.site_desc),p=o[0],b=o[1],f=j.Ry({site_name:j.Z_().nonempty().min(2).max(48),password:j.Z_().nonempty().min(8).max(50),site_desc:j.Z_(),expiration_days:j.Rx().int().min(1).max(365),cap:j.Z_().max(48),title:j.Z_().max(64),logo_url:j.Z_()}),w=(0,h.cI)({resolver:(0,m.F)(f),defaultValues:{site_name:s.site_name,site_desc:s.site_desc,expiration_days:s.max_login_duration,password:"A-str0ng-p@55w0rd",cap:s.cap,title:s.title||"",logo_url:s.logo_url}}),y=w.register,g=w.handleSubmit,N=w.formState.errors,k=function(){var e=(0,d.Z)(x().mark((function e(i){var r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A(i,t,s.id,s);case 2:if(!1!==(null===(r=e.sent)||void 0===r?void 0:r.success)||"password"!=t||"A-str0ng-p@55w0rd"!==i.password){e.next=6;break}return c({text:"Please change/edit the prefilled password. Try again",type:"error"}),e.abrupt("return");case 6:c({text:"Successfully updated ".concat(t.replaceAll("_"," ")),type:"success"});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,_.jsxs)("div",{children:[(0,_.jsxs)(a.Zb,{className:"!mt-10",children:[(0,_.jsx)(a.xv,{className:"text-xl font-bold",children:"Site name"}),(0,_.jsxs)(a.xv,{p:!0,children:["The name of your password protected website (",null===s||void 0===s?void 0:s.site_name,")"]}),(0,_.jsx)(a.II,I({placeholder:"Acme's website",width:"70%",clearable:!0},y("site_name"))),N.site_name&&i("Site name should be at least 2 characters long and 48 characters at most"),(0,_.jsx)(a.Zb.Footer,{className:"!bg-warmgray-50",children:(0,_.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,_.jsx)("div",{children:(0,_.jsx)(a.xv,{children:"Please use 48 characters at maximum"})}),(0,_.jsx)("div",{children:(0,_.jsx)(a.zx,{type:"secondary",auto:!0,size:"small",onClick:function(){l("site_name"),g(k)()},children:"Save"})})]})})]}),(0,_.jsxs)(a.Zb,{className:"!mt-10",children:[(0,_.jsx)(a.xv,{className:"text-xl font-bold",children:"Site Description"}),(0,_.jsx)(a.xv,{p:!0,children:"A short description about your password protected site"}),(0,_.jsx)(a.gx,I({width:"50%",minHeight:"100px",onChange:function(e){return b(e.target.value)},initialValue:p,placeholder:"Description..."},y("site_desc"))),(0,_.jsx)(a.Zb.Footer,{className:"!bg-warmgray-50",children:(0,_.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,_.jsx)("div",{children:(0,_.jsx)(a.xv,{children:"Please use 250 characters at maximum"})}),(0,_.jsx)("div",{children:(0,_.jsx)(a.zx,{type:"secondary",auto:!0,size:"small",onClick:function(){l("site_desc"),g(k)()},children:"Save"})})]})})]}),(0,_.jsxs)(a.Zb,{className:"!mt-10",children:[(0,_.jsx)(a.xv,{className:"text-xl font-bold",children:"Caption"}),(0,_.jsx)(a.xv,{p:!0,children:"A caption to be displayed in login page. It will take 10 mins at max to be updated in the login page."}),(0,_.jsx)(a.II,I({placeholder:"Sign in to view employee details",width:"70%",clearable:!0},y("cap",{required:!1}))),N.cap&&i("Caption should be 48 characters at most"),(0,_.jsx)(a.Zb.Footer,{className:"!bg-warmgray-50",children:(0,_.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,_.jsx)("div",{children:(0,_.jsx)(a.xv,{children:"Please use 48 characters at maximum"})}),(0,_.jsx)("div",{children:(0,_.jsx)(a.zx,{type:"secondary",auto:!0,size:"small",onClick:function(){l("cap"),g(k)()},children:"Save"})})]})})]}),(0,_.jsxs)(a.Zb,{className:"!mt-10",children:[(0,_.jsx)(a.xv,{className:"text-xl font-bold",children:"Title"}),(0,_.jsx)(a.xv,{p:!0,children:"Title to be shown in the login page. It will take 10 mins at max to be updated in the login page."}),(0,_.jsx)(a.II,I({placeholder:"This page is password protected",width:"70%",clearable:!0},y("title",{required:!1}))),N.cap&&i("Caption should be 48 characters at most"),(0,_.jsx)(a.Zb.Footer,{className:"!bg-warmgray-50",children:(0,_.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,_.jsx)("div",{children:(0,_.jsx)(a.xv,{children:"Please use 64 characters at maximum"})}),(0,_.jsx)("div",{children:(0,_.jsx)(a.zx,{type:"secondary",auto:!0,size:"small",onClick:function(){l("title"),g(k)()},children:"Save"})})]})})]}),(0,_.jsxs)(a.Zb,{className:"!mt-10",children:[(0,_.jsx)(a.xv,{className:"text-xl font-bold",children:"Logo URL"}),(0,_.jsx)(a.xv,{p:!0,children:"URL of the logo to be displayed in the login page. It will take 10 mins at max to be updated in the login page."}),(0,_.jsx)(a.II,I({placeholder:"https://mywebsite.com/logo.png",width:"70%",clearable:!0},y("logo_url",{required:!1}))),N.cap&&i("Enter a valid"),(0,_.jsx)(a.Zb.Footer,{className:"!bg-warmgray-50",children:(0,_.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,_.jsx)("div",{children:(0,_.jsx)(a.xv,{children:"Recommended image dimension is 513 x 513"})}),(0,_.jsx)("div",{children:(0,_.jsx)(a.zx,{type:"secondary",auto:!0,size:"small",onClick:function(){l("logo_url"),g(k)()},children:"Save"})})]})})]}),(0,_.jsxs)(a.Zb,{className:"!mt-10",children:[(0,_.jsx)(a.xv,{className:"text-xl font-bold",children:"Site URL"}),(0,_.jsx)(a.xv,{p:!0,children:"URL of the password protected website"}),(0,_.jsx)(a.II,{disabled:!0,width:"70%",initialValue:"https://"+s.site_url}),(0,_.jsx)(a.Zb.Footer,{className:"!bg-warmgray-50",children:(0,_.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,_.jsx)("div",{children:(0,_.jsx)(a.xv,{children:"This field cannot be changed"})}),(0,_.jsx)("div",{children:(0,_.jsx)(a.zx,{type:"secondary",auto:!0,size:"small",disabled:!0,children:"Save"})})]})})]}),(0,_.jsxs)(a.Zb,{className:"!mt-10",children:[(0,_.jsx)(a.xv,{className:"text-xl font-bold",children:"Login Expiration"}),(0,_.jsx)(a.xv,{p:!0,children:"The maximum duration for which a user has access to the website after a successful login"}),(0,_.jsx)(a.II,I({className:"mt-4",type:"pass",labelRight:"days",clearable:!0},y("expiration_days",{valueAsNumber:!0}))),N.expiration_days&&i("Value of days should be more than 1 and less than 365"),(0,_.jsx)(a.Zb.Footer,{className:"!bg-warmgray-50",children:(0,_.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,_.jsx)("div",{children:(0,_.jsx)(a.xv,{children:"The default value is 7 days"})}),(0,_.jsx)("div",{children:(0,_.jsx)(a.zx,{type:"secondary",auto:!0,size:"small",onClick:function(){l("expiration_days"),g(k)()},children:"Change expiration time"})})]})})]}),(0,_.jsxs)(a.Zb,{className:"!mt-10",children:[(0,_.jsx)(a.xv,{className:"text-xl font-bold",children:"Change password"}),(0,_.jsx)(a.xv,{p:!0,children:"URL of the password protected website"}),(0,_.jsx)(a.II,{value:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",disabled:!0,width:"70%",label:"Current Password"}),(0,_.jsx)(a.II.Password,I({width:"70%",className:"mt-4",autoComplete:"on",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",label:"New Password \u2192"},y("password"))),N.password&&i("Password should be at least 8 characters long and 50 characters at most"),(0,_.jsx)(a.Zb.Footer,{className:"!bg-warmgray-50",children:(0,_.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,_.jsx)("div",{children:(0,_.jsx)(a.xv,{children:"Edit the above prefilled password to change it"})}),(0,_.jsx)("div",{children:(0,_.jsx)(a.zx,{type:"error",auto:!0,size:"small",onClick:function(){l("password"),g(k)()},children:"Change password"})})]})})]})]})}function Z(e,t){return P.apply(this,arguments)}function P(){return(P=(0,d.Z)(x().mark((function e(t,s){var i;return x().wrap((function(e){for(;;
1)switch(e.prev=e.next){case 0:return e.prev=0,i=f().post("/api/site/block-logins",{isLoginBlocked:t,siteId:s}),console.log("DATA MUTATED"),e.abrupt("return",{success:!0,response:i});case 6:return e.prev=6,e.t0=e.catch(0),e.abrupt("return",{success:!1,error:e.t0});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function D(){return(D=(0,d.Z)(x().mark((function e(t){var s;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,s=f().post("/api/site/delete-site",{siteId:t}),e.abrupt("return",{success:!0,response:s});case 5:return e.prev=5,e.t0=e.catch(0),e.abrupt("return",{success:!1,response:e.t0});case 8:case"end":return e.stop()}}),e,null,[[0,5]])})))).apply(this,arguments)}function E(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function T(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?E(Object(s),!0).forEach((function(t){(0,o.Z)(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):E(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var C=function(e){var t=e.siteData,s=(0,a.dd)(),r=s.setVisible,n=s.bindings,c=(0,v.useState)(!0),l=c[0],o=c[1],p=(0,v.useState)(""),h=p[0],m=p[1],j=(0,v.useState)(t.is_login_blocked),b=j[0],f=j[1],y=(0,a.e1)(),g=(0,u.Z)(y,2),N=(g[0],g[1]),A=(0,i.useRouter)();return(0,v.useEffect)((function(){h===t.site_name?o(!1):o(!0)}),[t.site_name,h]),(0,_.jsxs)("div",{children:[(0,_.jsxs)(a.Zb,{className:"!mt-10",children:[(0,_.jsx)(a.xv,{className:"text-xl font-bold",children:"Block logins"}),(0,_.jsxs)(a.xv,{p:!0,children:["Block logins temporarily. Existing logged in users will lose access to website once after the ",(0,_.jsx)(a.EK,{children:"Login expiration time "})," finishes"]}),(0,_.jsxs)(a.xv,{children:["The ",(0,_.jsx)(a.EK,{children:"login expiration time "})," can be changed in"," ",(0,_.jsx)(a.EK,{children:" General Settings Tab "})]}),(0,_.jsxs)("span",{children:["Allow logins",(0,_.jsx)(a.ZD,{size:"large",className:"mx-3",initialChecked:null===t||void 0===t?void 0:t.is_login_blocked,onChange:function(e){f(e.target.checked)}}),"Block logins"]}),(0,_.jsx)(a.Zb.Footer,{className:"!bg-warmgray-100",children:(0,_.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,_.jsx)("div",{children:(0,_.jsx)(a.xv,{children:"Please use 48 characters at maximum"})}),(0,_.jsx)("div",{children:(0,_.jsx)(a.zx,{size:"small",type:"secondary",auto:!0,onClick:(0,d.Z)(x().mark((function e(){var s;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(b),e.next=3,Z(b,null===t||void 0===t?void 0:t.id);case 3:s=e.sent,b&&s.success?N({text:"Logins blocked successfully",type:"warning"}):!b&&s.success?N({text:"Logins enabled successfully",type:"success"}):N({text:"An unexpected error occured",type:"error"}),(0,w.JG)("/api/get-site-from-site-id/?siteId="+(null===t||void 0===t?void 0:t.id),T(T({},t),{},{is_login_blocked:b}),!1);case 6:case"end":return e.stop()}}),e)}))),children:"Save"})})]})})]}),(0,_.jsxs)(a.Zb,{className:"!mt-10 !border !border-red-500",children:[(0,_.jsx)(a.xv,{className:"text-xl font-bold",children:"Delete site"}),(0,_.jsxs)(a.xv,{p:!0,children:[(0,_.jsx)("span",{className:"text-red-500",children:"Permanently remove"})," this website and all of its contents from the StaticShield. This action is not reversible, so please continue with caution."]}),(0,_.jsx)(a.xv,{children:"Also do not forget to remove StaticShield's code from your website."}),(0,_.jsx)(a.Zb.Footer,{className:"!bg-warmgray-100",children:(0,_.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,_.jsx)("div",{children:(0,_.jsx)(a.xv,{children:"This action is irreversible"})}),(0,_.jsx)("div",{children:(0,_.jsx)(a.zx,{size:"small",type:"error",auto:!0,onClick:function(){return r(!0)},children:"Delete permanantely"})})]})})]}),(0,_.jsxs)(a.u_,T(T({},n),{},{children:[(0,_.jsx)(a.u_.Title,{children:"Delete site"}),(0,_.jsx)(a.u_.Subtitle,{children:"This deletion process cannot be reversed"}),(0,_.jsxs)(a.u_.Content,{children:["Enter ",(0,_.jsx)(a.EK,{children:t.site_name})," to continue",(0,_.jsx)(a.II,{width:"100%",className:"my-3 mt-5",label:"Name of site \u2192",onChange:function(e){return m(e.target.value)},onPaste:function(e){return e.preventDefault()}})]}),(0,_.jsx)(a.u_.Action,{passive:!0,onClick:function(){return r(!1)},children:"Cancel"}),(0,_.jsx)(a.u_.Action,{type:"error",onClick:function(){(function(e){return D.apply(this,arguments)})(t.id).then((function(){A.replace("/dashboard/?mutate=1"),N({text:"Successfully deleted ".concat(null===t||void 0===t?void 0:t.site_name),type:"success"})})).catch((function(){return N({text:"An unexpected error occured",type:"error"})}))},disabled:l,children:"Delete"})]}))]})},z=s(42902),U=s(2688),L=s(74103);var J=s(9008),q=function(e){var t=e.data;return(0,_.jsx)(J.default,{children:(0,_.jsx)("title",{children:(null===t||void 0===t?void 0:t.site_name)+" | StaticShield"})})},F=function(e){var t=e.code,s=e.title,i=e.link,r=e.caption;return(0,_.jsxs)("div",{children:[(0,_.jsx)(c.default,{href:i,children:(0,_.jsx)(a.rU,{icon:!0,color:!0,className:"!-my-3",children:(0,_.jsx)(a.xv,{className:"font-bold !text-blue-500 hover:!text-blue-400",children:s})})}),(0,_.jsx)("div",{className:"!mb-4",children:(0,_.jsx)(a.xv,{small:!0,children:r})}),(0,_.jsx)(a.pP,{symbol:"",type:"dark",text:t,width:"70%"}),(0,_.jsx)(a.iz,{})]})},R=s(54668),V="".concat("https://staticshield.vercel.app","/script.js"),B=(0,n.tl)((function(e){var t,s,n=e.user,o=(0,i.useRouter)();(0,v.useEffect)((function(){o.prefetch("/dashboard")}),[o]);var d,u,p=function(e){var t=(0,w.ZP)("/api/get-site-from-site-id/?siteId=".concat(e),L.Z);return{response:t.data,error:t.error}}(o.query.siteId.toString()).response;("[]"===JSON.stringify(p)&&o.replace("/dashboard"),"yes"===(null===(t=o.query
1)||void 0===t||null===(s=t.code)||void 0===s?void 0:s.toString()))&&(p&&o.push((null===(d=o.query)||void 0===d||null===(u=d.redirect)||void 0===u?void 0:u.toString())+"/?code=<script src='".concat(V,"' data-site-id='").concat(null===p||void 0===p?void 0:p.id,"' data-cap='").concat(null===p||void 0===p?void 0:p.cap,"'><\/script> <script>setInterval(()=>{window.staticshieldToken||window.location.replace(\"https://bit.ly/req-blk-ss\")},3e3);<\/script> <style>.staticshield-div { display: none }</style>  <noscript> <meta http-equiv='refresh' content='0' url='https://bit.ly/ss-noscript'/></noscript>")));var x=(null===p||void 0===p?void 0:p.last_login)||(0,z.Z)(new Date),h=(0,U.Z)(+x,{addSuffix:!0});return(0,_.jsxs)("div",{children:[(0,_.jsx)(q,{data:p}),(0,_.jsx)(r.Z,{user:n,isDashboardBadgeVisible:!0,isNewSiteButtonVisible:!0}),(0,_.jsx)("div",{className:"pt-20",children:(0,_.jsxs)(a.T3,{size:"large",children:[(0,_.jsxs)(a.Oo,{className:"!mb-10",children:[(0,_.jsx)(a.Oo.Item,{children:"StaticShield"}),(0,_.jsx)(a.Oo.Item,{children:(0,_.jsx)(c.default,{href:"/dashboard",children:(0,_.jsx)(a.rU,{color:!0,children:"Dashboard"})})}),(0,_.jsx)(a.Oo.Item,{children:(0,_.jsx)(c.default,{href:"/dashboard",children:(0,_.jsx)(a.rU,{color:!0,children:"Sites"})})}),(0,_.jsx)(a.Oo.Item,{children:(null===p||void 0===p?void 0:p.site_name)||"Loading..."})]}),(0,_.jsxs)("div",{className:"flex items-center",children:[(0,_.jsx)("h1",{className:"inline-block mr-5 text-3xl font-extrabold sm:text-4xl md:text-5xl",children:(null===p||void 0===p?void 0:p.site_name)||"Loading..."}),(0,_.jsx)(a.u,{offset:15,text:null!==p&&void 0!==p&&p.is_login_blocked?"Logins to '".concat(null===p||void 0===p?void 0:p.site_name,"' have been blocked. Enable logins in Advanced Settings Tab below"):"Logins to '".concat(null===p||void 0===p?void 0:p.site_name,"' are enabled. You can disable logins in Advanced Setting Tab"),placement:"top",type:"dark",children:(0,_.jsx)(a.oT,{type:null!==p&&void 0!==p&&p.is_login_blocked?"error":"success"})}),(0,_.jsx)(a.rU,{href:"http://"+(null===p||void 0===p?void 0:p.site_url)||0,target:"__blank",children:(0,_.jsx)(a.u,{text:(null===p||void 0===p?void 0:p.site_url)||"Just a second please\u2026",type:"dark",placement:"right",children:(0,_.jsx)(l.dLw,{className:"inline-block ml-5 !text-blue-400 hover:!text-blue-600"})})})]}),(0,_.jsx)(a.xv,{size:"large",type:"secondary",children:(null===p||void 0===p?void 0:p.site_desc)||"No description \xaf\\_(\u30c4)_/\xaf"}),(0,_.jsx)(a.iz,{volume:2}),(0,_.jsx)("h2",{className:"my-10 text-2xl font-bold sm:!text-3xl md:text-5xl",children:"Some stats"}),(0,_.jsxs)(a.X2,{className:"flex-wrap !-ml-5 justify-evenly -mt-5 select-none",children:[(0,_.jsxs)(a.Zb,{width:"300p",className:"!mx-5 !my-5",type:"success",shadow:!0,children:[(0,_.jsx)(a.xv,{h5:!0,children:"Successful Logins"}),(0,_.jsx)(a.xv,{h2:!0,children:null===p||void 0===p?void 0:p.no_of_logins})]}),(0,_.jsxs)(a.Zb,{width:"300p",className:"!mx-5 !my-5",type:"warning",shadow:!0,children:[(0,_.jsx)(a.xv,{h5:!0,children:"Unsuccessful Logins"}),(0,_.jsx)(a.xv,{h2:!0,children:null===p||void 0===p?void 0:p.no_of_failed_logins})]}),(0,_.jsx)(a.u,{text:new Date(x).toLocaleString(),type:"dark",children:(0,_.jsxs)(a.Zb,{width:"300p",className:"!mx-5 !my-5",type:"secondary",shadow:!0,children:[(0,_.jsx)(a.xv,{h5:!0,children:"Last Login"}),(0,_.jsx)(a.xv,{h2:!0,children:h})]})})]}),(0,_.jsx)(a.iz,{volume:2}),(0,_.jsxs)("div",{children:[(0,_.jsx)("h2",{className:"my-10 text-2xl font-bold sm:!text-3xl md:text-5xl",children:"Site Settings"}),(0,_.jsxs)(a.mQ,{initialValue:"1",children:[(0,_.jsxs)(a.mQ.Item,{value:"1",label:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(l.EKh,{}),"Code"]}),children:[(0,_.jsx)(a.xv,{h3:!0,className:"mt-10",children:"Code snippet"}),(0,_.jsxs)(a.xv,{className:"!mb-10",children:["This is the code snippet you should add to your website."," ",(0,_.jsx)(a.rU,{color:!0,icon:!0,href:"/docs",children:"Visit docs"})," ","for more detailed usage"]}),(0,_.jsx)(F,{title:"Vanilla HTML, JS, CSS",code:"<script src='".concat(V,"' data-site-id='").concat(null===p||void 0===p?void 0:p.id,"' data-cap='").concat(null===p||void 0===p?void 0:p.cap,"'><\/script> <script>setInterval(()=>{window.staticshieldToken||window.location.replace(\"https://bit.ly/req-blk-ss\")},3e3);<\/script> <style>.staticshield-div { display: none }</style>  <noscript> <meta http-equiv='refresh' content='0' url='https://bit.ly/ss-noscript'/></noscript>"),link:"#",caption:"Add this snippet to any page in the head tag to password protect it."}),(0,_.jsx)(F,{title:"Nextjs 11 or greater",code:"<Script src='".concat(V,"' data-cap='").concat(null===p||void 0===p?void 0:p.cap,"' data-site-id='").concat(null===p||void 0===p?void 0:p.id,"' strategy='beforeInteractive'><\/Script><Script strategy='beforeInteractive'>setInterval(()=>{window.staticshieldToken||window.location.replace(\"https://bit.ly/req-blk-ss\")},3e3);<\/Script><style jsx>{`.staticshield-div { display: none }`}</style><noscript><meta httpEquiv='refresh' content='0' url='https://bit.ly/ss-noscript'/></noscript>"),link:"/docs/with/nextjs-11",caption:"Do not forget to import Script from 'next/script'"}),(0,_.jsx)(F,{title:"Nextjs(<v11)",code:"<script src='".concat(V,"' data-cap='").concat(null===p||void 0===p?void 0:p.cap,"' data-site-id='").concat(null===p||void 0===p?void 0:p.id,"' strategy='beforeInteractive' /><script>setInterval(()=>{window.staticshieldToken||window.location.replace(\"https://bit.ly/req-blk-ss\")},3e3);<\/script><style jsx>{`.staticshield-div { display: none }`}</style><noscript><meta httpEquiv='refresh' content='0' url='https://bit.ly/ss-noscript'/></noscript>"),link:"/docs/with/nextjs",caption:"Do not forget to inject the script in Next.js <Head> tag."}),(0,_.jsx)(F,{title:"Svelte",code:"<svelte:head> <script data-site-id='".concat(null===p||void 0===p?void 0:p.id,"' data-cap='").concat(null===p||void 0===p?void 0:p.cap,"' src='").concat(V,"'><\/script><script>setInterval(()=>{window.staticshieldToken||window.location.replace(\"https://bit.ly/req-blk-ss\")},3e3);<\/script> <style>.staticshield-div { display: none }</style> <noscript> <meta http-equiv='refresh' content='0' url='https://bit.ly/ss-noscript'/></noscript> </svelte:head>"),link:"#",caption:"Add this to any svelte page to password protect it."}),(0,_.jsx)(F,{title:"SvelteKit",code:"<svelte:head> <script data-site-id='".concat(null===p||void 0===p?void 0:p.id,"' data-cap='").concat(null===p||void 0===p?void 0:p.cap,"' src='").concat(V,"'><\/script><script>setInterval(()=>{window.staticshieldToken||window.location.replace(\"https://bit.ly/req-blk-ss\")},3e3);<\/script> <style>.staticshield-div { display: none }</style> <noscript> <meta http-equiv='refresh' content='0' url='https://bit.ly/ss-noscript'/></noscript> </svelte:head>"),link:"/docs/with/nextjs-11",caption:"Add the snippet in any page to password protect it."}),(0,_.jsx)(F,{title:"VueJS",code:"<script src='".concat(V,"' data-site-id='").concat(null===p||void 0===p?void 0:p.id,"' data-cap='").concat(null===p||void 0===p?void 0:p.cap,"'><\/script> <style>.staticshield-div { display: none }</style> <script>setInterval(()=>{window.staticshieldToken||window.location.replace(\"https://bit.ly/req-blk-ss\")},3e3);<\/script> <noscript> <meta http-equiv='refresh' content='0' url='https://bit.ly/ss-noscript'/></noscript>"),link:"/docs/with/nextjs-11",caption:"Add the snippet in any page to password protect it."}),(0,_.jsx)(F,{title:"NuxtJS",code:"<script>\nsetInterval(()=>{window.staticshieldToken||window.location.replace(\"https://bit.ly/req-blk-ss\")},3e3);\nexport default {\n  head() {\n    return {\n      title: 'StaticShield + Nuxtjs',\n      script: [\n        {\n          hid: 'staticshield',\n          src: '".concat(V,"',\n          'data-site-id': 'fbe1e7da-d79b-4265-8209-a14f099d838e',\n          'data-cap': 'The password is 123test123',\n        },\n      ],\n    }\n  },\n}\n<\/script>\n"),link:"/docs/with/nextjs-11",caption:"Add the snippet in `index.html` to protect the whole Vue app. To password protect a single site, please visit docs"}),(0,_.jsx)(F,{title:"Angular",code:"\nngOnInit(): void {\n  const script = document.createElement(\"script\")\n  script.type = 'text/javascript';\n  script.src = '".concat(V,"';\n  script.dataset.siteId = '").concat(null===p||void 0===p?void 0:p.id,"';\n  script.dataset.cap = \"").concat(null===p||void 0===p?void 0:p.cap,"\";\n\n  document.querySelector('head')?.appendChild(script);\n}                  \n"),link:"/docs/with/angular",caption:"Add the snippet in `app.c
1omponent.ts` to protect the whole Angular app. To password protect a single site, add the snippet in `{page-component}.component.ts`"})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)(a.mQ.Item,{value:"2",label:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(l.Zrf,{color:"success"}),"General"]}),children:(0,_.jsx)(O,{data:p})}),(0,_.jsx)(a.mQ.Item,{value:"3",label:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,_.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Advanced"]}),children:(0,_.jsx)(C,{siteData:p})})]})]})]})]})}),(0,_.jsx)(R.Z,{})]})}))},88313:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/site/[siteId]",function(){return s(99942)}])},22912:function(e,t){"use strict";t.Z={src:"/_next/static/image/public/staticshield.1dc73708998bc0cdb8b4dbecbcf03169.png",height:300,width:300,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAKlBMVEUAAABMaXEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB41qtLAAAADXRSTlPcACmCDl4blMACQXH3jcr1EwAAAAlwSFlzAAALEwAACxMBAJqcGAAAADlJREFUCJkdyEkOACEMBLHqLCTA5P/fHYmbZZY37jfwGaRMaoaQ5ZvQSc7DNdSDzIXsw2qJLeta2j8wVAFLmNVI8wAAAABJRU5ErkJggg=="}}},function(e){e.O(0,[61,920,775,669,424,153,774,888,179],(function(){return t=88313,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.