1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];if(null!=i)for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:cdn77-js-app":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0f88281e-ed73-4b4c-8f8d-512808872496",e._sentryDebugIdIdentifier="sentry-dbid-0f88281e-ed73-4b4c-8f8d-512808872496")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1921],{51921:(e,t,i)=>{i.d(t,{f:()=>G,y:()=>Z});var n=i(46499),r=i(37876),s=i(22488),o=i(45737),a=i(14824),c=i(67024),l=i(25021),d=i(58894),u=i(14232),f=i(73649),p=i(40490),h=i(20441),x=i(15340),g=i(21158),m=i(56557),y=i.n(m),j=i(71626),v=i(15213),S=function(e){var t,i,n=e.certificate,s=e.isOpen,o=e.close,a=(0,v.R)(),c=u.useMemo(function(){return y()(n.expires_at).isBefore(a)},[a,n]);return(0,r.jsx)(f.a,{closeModal:o,isOpen:s,width:560,children:(0,r.jsx)(p.k,{buttons:(0,r.jsx)(h.P,{closeButtonText:"Close"}),description:"Your SSL certificate has been successfully added. You can assign it to your CDN Resource by navigating to the CNAME & SSL section and choosing Change SSL settings.",title:"SNI certificate successfully added",children:(0,r.jsxs)(x.B,{labelWidth:150,spacing:"sm",textProps:{size:14},children:[(0,r.jsx)(g.x,{label:"Certificate CNAMEs",value:null!=(t=null==(i=n.cnames)?void 0:i.join(", "))?t:""}),(0,r.jsx)(g.x,{label:"Certificate expiration",value:(0,r.jsx)(d.E,{color:c?"error-500":{light:"grey-900",dark:"grey-50"},size:14,tag:"span",weight:c?"bold":"regular",children:(0,r.jsx)(j.F,{date:y()(n.expires_at),format:{date:"medium"}})})})]})})})},b=i(52411),w=i(16690),E=i(94682),N=i(84362),_=i(76386),M=function(e){var t=e.isOpen,i=e.close,n=e.id,s=e.name,o=e.expiration,a=(0,_.s)("".concat(N.p8.clap.ssl,"/sni")),c=(0,v.R)(),l=u.useMemo(function(){return y()(o).isBefore(c)},[c,o]);return(0,r.jsx)(f.a,{closeModal:i,isOpen:t,width:440,children:(0,r.jsx)(E._,{proxy:!0,endpointUrl:"".concat(N.p8.clap.ssl,"/sni/").concat(n),initialValues:{},method:"DELETE",successMessage:(0,r.jsxs)("div",{children:["You successfully removed SNI certificate ",(0,r.jsx)("strong",{children:s}),"."]}),onSuccess:function(){i(),a.update(function(e){return e.filter(function(e){return e.id!==n})})},children:function(e){var t=e.submitButtonProps;return(0,r.jsx)(p.k,{buttons:(0,r.jsx)(h.P,{button:(0,w._)((0,b._)({},t),{color:l?"primary":"danger",disabled:!1,text:"Remove SNI certificate"})}),buttonsPosition:"static",description:(0,r.jsxs)(r.Fragment,{children:["Are you sure you want to remove SNI certificate ",(0,r.jsx)("strong",{children:s}),"?"]}),title:"Remove SNI certificate"})}})})},C=i(60176),k=i(23426),I=i(72370),A=i(39279),z=i(29337),L=i(10515),R=i(54423),D=i(11353),O=function(e){var t=e.cdns,i=e.expiresAt,n=(0,v.R)(),s=u.useMemo(function(){var e=i.isBefore(n),r=void 0===t||0===t.length,s=i.diff(n,"day"),o=s>0?s:0;return e&&r?{theme:"grey",text:"Expired",tooltip:"SNI certificate is expired."}:e?{theme:"error",text:"Expired",tooltip:"SNI certificate is expired. Please renew the certificate or activate a free SSL certificate by Let's Encrypt in the CDN Resource settings."}:r?{theme:"grey",text:"Not used",tooltip:"There is no CDN Resource connected with this SNI certificate."}:0!==o&&o<D.f?{theme:"warning",text:"Expiring soon",tooltip:"SNI certificate will expire in ".concat(o," ").concat(1===o?"day":"days",". Please renew the certificate. Or you can activate a free SSL certificate by Let's Encrypt in the CDN Resource settings.")}:0!==o&&o<30?{theme:"info",text:"Expiring soon",tooltip:"SNI certificate is active, but it will expire in ".concat(o," ").concat(1===o?"day":"days",".")}:0===o?{theme:"info",text:"Expiring soon",tooltip:"SNI certificate is active, but it will expire in less than 24 hours."}:{theme:"success",text:"Active",tooltip:"SNI certificate is active."}},[]),o=s.text,a=s.theme,c=s.tooltip;return c?(0,r.jsx)(L.m,{text:c,children:(0,r.jsx)(R.E,{size:"sm",theme:a,children:o})}):(0,r.jsx)(R.E,{size:"sm",theme:a,children:o})},P=i(76680),T=i(31068),B=i(15140),F=i(29197),Y=i(33919),V=function(e){var t=e.onEditClick,i=e.onDeleteClick,n=(0,F.Y)(),s=(0,T.qp)().hasAccess,o=(0,Y.IT)({url:"".concat(N.p8.clap.ssl,"/sni"),proxy:!0}),a=u.useMemo(function(){var e,t;return null!=(e=null==(t=o.data)?void 0:t.map(function(e){return{type:"SNI",domains:Z(e.cnames),cdns:e.assigned_resources,status:{type:"SNI",cdns:e.assigned_resources,expiresAt:y()(e.expires_at)},expiration:y()(e.expires_at),id:e.id,inUse:e.assigned_resources.length>0}}))?e:[]},[o.data]),c=(0,k.X)(function(e){return[e.accessor("type",{header:"Type",size:50,cell:function(e){return(0,r.jsx)(d.E,{size:14,tag:"strong",weight:"bold",children:e.getValue()})}}),e.accessor("domains",{header:"Certificate",minSize:200,sortingFn:function(e,t,i){var n=e.original[i],r=t.original[i];return"string"!=typeof n||"string"!=typeof r?0:n.localeCompare(r)}}),e.accessor("cdns",{header:"CDN Resources",minSize:170,enableSorting:!1,cell:function(e){var t=e.getValue();return 0!==t.length?t.map(function(e,t,i){return(0,r.jsxs)(u.Fragment,{children:[(0,r.jsx)(B.$,{color:{light:"blue-500",dark:"info-500"},href:n.cdn.cnameAndSsl.getRoute(e.id.toString()),size:"sm",theme:"link",weight:"regular",children:e.label}),t!==i.length-1&&", "]},e.id)}):"â"}}),e.accessor("status",{header:"Status",size:90,enableSorting:!1,cell:function(e){return(0,r.jsx)(O,(0,b._)({},e.getValue()))}}),e.accessor("expiration",{header:"Expiration",size:180,cell:function(e){return(0,r.jsx)(P.e,{date:e.getValue(),withRelativeDate:!0})}}),e.display({id:"action",align:"right",cell:function(e){var n={edit:s("ssl","edit",e.row.original.id),delete:s("ssl","delete",e.row.original.id)};return n.edit||n.delete?(0,r.jsx)(I.i,{actions:(0,C._)(n.edit?[[{label:"Update SNI certificate",onClick:function(){t(e.row.original.id)}}]]:[]).concat((0,C._)(n.delete?[[{label:"Remove SNI certificate",color:"error-500",disabled:e.row.original.inUse,tooltip:e.row.original.inUse?"This certificate cannot be removed because some CDN Resources use it.":void 0,onClick:function(){i(e.row.original.id)}}]]:[]))}):null}})]});return(0,r.jsx)(A.A,{padding:{x:32,top:0,bottom:24},isLoading:o.isLoading,children:(0,r.jsx)(z.X,{columns:c,data:a,initialSort:[{id:"expiration",desc:!0}],isLoading:o.isLoading,placeholder:"You have no SSL certificates."})})},U=i(53599),K=i(52526),$=i(92861),q=i(86422),Q=i(87151),X=i(40900),W=i(48932),Z=function(e){return(Array.isArray(e)?e:[]).sort(X.d).join(", ")},G=function(){var e=(0,n._)(u.useState(null),2),t=e[0],i=e[1],f=(0,n._)(u.useState(null),2),p=f[0],h=f[1],x=(0,Y.IT)({url:"".concat(N.p8.clap.ssl,"/sni"),proxy:!0}),g=(0,s.h)(),m=(0,s.h)(),y=(0,s.h)(),j=(0,s.h)(),v=u.useMemo(function(){return p&&x.data?x.data.find(function(e){return e.id===p}):null},[p,x.data]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)($.p,{title:"Your SSL Certificates"}),(0,r.jsxs)(o.m,{width:"xl",children:[(0,r.jsx)(q.K,{title:"SSL Certificates"}),(0,r.jsxs)(a.Z,{padding:{top:24,x:32,bottom:10},children:[(0,r.jsx)(c.a,{className:"mb-40",content:(0,r.jsx)(K.M,{section:"ssl",type:"create",children:(0,r.jsxs)(B.$,{color:"secondary",size:"sm",theme:"button",onClick:function(){h(null),g.openModal()},children:[(0,r.jsx)(l.I,{className:"mr-6",color:"currentColor",opacity:50,size:14,children:(0,r.jsx)(W.A,{})}),"Add new certificate"]})}),title:"Your SSL Certificates",isSticky:!0}),(0,r.jsx)(V,{onDeleteClick:function(e){h(e),y.openModal()},onEditClick:function(e){h(e),j.openModal()}}),(0,r.jsx)(d.E,{className:"mb-10",color:{light:"grey-700",dark:"grey-400"},size:14,tag:"p",children:"All of your CDN Resources use SSL certificate by Let's Encrypt if you do not choose otherwise."})]})]}),(0,r.jsx)(Q.Q,{close:g.closeModal,isExistingSslAssignEnabled:!1,isOpen:g.isOpen,onSuccess:function(e){i(e),m.openModal()}}),t&&(0,r.jsx)(S,{certificate:t,close:function(){i(null),m.closeModal()},isOpen:m.isOpen}),v&&(0,r.jsx)(M,{close:function(){h(null),y.closeModal()}
1,expiration:v.expires_at,id:v.id,isOpen:y.isOpen,name:Z(v.cnames)}),v&&(0,r.jsx)(U.Y,{certificate:v,close:function(){h(null),j.closeModal()},isOpen:j.isOpen})]})}},76680:(e,t,i)=>{i.d(t,{e:()=>d});var n=i(37876),r=i(58894),s=i(54423),o=i(56557),a=i.n(o);i(14232);var c=i(71626),l=function(e){var t=function(e,t){return"(in ".concat(e," ").concat(t).concat(e>1?"s":"",")")},i=Math.round(e.diff(a()(),"year",!0));if(i>1)return t(i,"year");var n=Math.round(e.diff(a()(),"month",!0));if(n>1)return t(n,"month");var r=Math.round(e.diff(a()(),"day",!0));return r>0?t(r,"day"):null},d=function(e){var t=e.date,i=e.withRelativeDate,o=Math.round(t.diff(a()(),"day",!0)),d=o<7,u=o<30;return t.isBefore(a()(),"minute")?(0,n.jsxs)(r.E,{size:15,tag:"span",children:[(0,n.jsxs)("span",{className:"mr-8",children:[(0,n.jsx)(c.F,{date:t,format:{date:"medium"}})," "]}),(0,n.jsx)(s.E,{size:"sm",theme:"error",children:"Expired"})]}):(0,n.jsxs)(r.E,{size:15,tag:"span",children:[(0,n.jsx)("span",{className:"mr-4",children:(0,n.jsx)(c.F,{date:t,format:{date:"medium"}})}),i&&(0,n.jsx)(r.E,{color:d||u?"".concat(d?"warning":"info","-500"):{light:"grey-600",dark:"grey-500"},size:"inherit",tag:"span",weight:d||u?"bold":"regular",children:l(t)})]})}},87151:(e,t,i)=>{i.d(t,{Q:()=>b});var n=i(52411),r=i(16690),s=i(60176),o=i(37876),a=i(96573),c=i(73649),l=i(40490),d=i(20441),u=i(56557),f=i.n(u);i(14232);var p=i(89848),h=i(60099),x=i(15140),g=i(94682),m=i(40919),y=i(84362),j=i(76386),v="sslAlreadyExists",S="sslExpired",b=function(e){var t=e.isExistingSslAssignEnabled,i=e.isOpen,u=e.close,b=e.onSuccess,w=e.onError,E=(0,a.tt)().format,N=(0,j.s)("".concat(y.p8.clap.ssl,"/sni"));return(0,o.jsx)(c.a,{closeModal:u,isOpen:i,width:660,children:(0,o.jsx)(g._,{proxy:!0,endpointUrl:"".concat(y.p8.clap.ssl,"/sni"),excludedErrorTypes:t?[v,S]:[S],getValues:function(e){return{certificate:e.certificate,private_key:e.privateKey}},initialValues:{certificate:"",privateKey:""},showSuccessMessage:!1,onError:function(e,i){if(t&&e.type===v&&(i&&(null==w||w(i.certificate)),u()),e.type===S){var n=/(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+\d{2}:\d{2})/.exec(e.message);if(null==n?void 0:n[0]){var r=f()(n[0]);(0,p.oR)(e.message.replace(n[0],E({value:r,type:"date",format:{date:"medium"}})),{type:"error"});return}(0,p.oR)(e.message,{type:"error"})}},onSuccess:function(e){u(),e&&(b(e),N.update(function(t){return(0,s._)(t).concat([e])}))},children:function(e){var t=e.submitButtonProps;return(0,o.jsx)(l.k,{buttons:(0,o.jsx)(d.P,{button:(0,r._)((0,n._)({},t),{color:"primary",text:"Add certificate"})}),description:(0,o.jsxs)(o.Fragment,{children:["Fill in data about your certificate. If you need help with the setup,"," ",(0,o.jsx)(x.$,{color:{light:"blue-500",dark:"info-500"},href:y.qv.support.sniCertificate.pathname,theme:"link",external:!0,children:"read this guide"})," ","or"," ",(0,o.jsx)(x.$,{color:{light:"blue-500",dark:"info-500"},theme:"link",onClick:m.e,children:"contact our support"}),"."]}),title:"Add new SNI certificate",children:(0,o.jsx)(h.B,{})})}})})}}}]);
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.