@peculiar/certificates-viewer 3.3.1 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/cjs/{certification_request-50ce61b3.js → certification_request-b5fe8a57.js} +6 -6
  2. package/dist/cjs/{crl-0c15e04a.js → crl-a1ac7534.js} +11 -2
  3. package/dist/cjs/{l10n-4eaa5263.js → l10n-17c96aba.js} +5 -3
  4. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +23 -8
  5. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +4 -4
  6. package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +1 -1
  7. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -4
  8. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +3 -3
  9. package/dist/cjs/{public_key-2b73778a.js → public_key-3d4ae164.js} +2 -2
  10. package/dist/cjs/{x509_certificate-c94ce29e.js → x509_certificate-29a3636a.js} +2 -2
  11. package/dist/collection/components/crl-viewer/crl-viewer.js +1 -1
  12. package/dist/collection/components/crl-viewer/revoked_certificates.js +20 -3
  13. package/dist/collection/crypto/crl.js +9 -0
  14. package/dist/collection/locales/en.json +3 -2
  15. package/dist/esm/{certification_request-5b5c2fa2.js → certification_request-35ade000.js} +2 -2
  16. package/dist/esm/{crl-10d4db54.js → crl-42d5e233.js} +11 -2
  17. package/dist/esm/{l10n-116c79fa.js → l10n-a68d5748.js} +5 -3
  18. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +23 -8
  19. package/dist/esm/peculiar-certificate-decoder.entry.js +4 -4
  20. package/dist/esm/peculiar-certificate-summary_3.entry.js +1 -1
  21. package/dist/esm/peculiar-certificate-viewer.entry.js +4 -4
  22. package/dist/esm/peculiar-certificates-viewer.entry.js +3 -3
  23. package/dist/esm/{public_key-c1e6801e.js → public_key-b2dba162.js} +2 -2
  24. package/dist/esm/{x509_certificate-61126913.js → x509_certificate-2503dcc1.js} +2 -2
  25. package/dist/peculiar/locales/en.json +3 -2
  26. package/dist/peculiar/p-1a8379f0.entry.js +26 -0
  27. package/dist/peculiar/{p-7ef69178.entry.js → p-3d0fdbd5.entry.js} +1 -1
  28. package/dist/peculiar/{p-53aac672.js → p-54171e39.js} +3 -3
  29. package/dist/peculiar/{p-5a898f51.js → p-6cd6e6da.js} +5 -5
  30. package/dist/peculiar/{p-318a1e9f.entry.js → p-7a0fb5a8.entry.js} +1 -1
  31. package/dist/peculiar/{p-652f77d0.entry.js → p-870c3592.entry.js} +1 -1
  32. package/dist/peculiar/{p-bbf0fd6c.js → p-a5d07697.js} +2 -2
  33. package/dist/peculiar/{p-309fdd02.js → p-b7045733.js} +1 -1
  34. package/dist/peculiar/{p-10aa0b03.entry.js → p-cb9b9f9c.entry.js} +2 -2
  35. package/dist/peculiar/{p-ed58acd0.js → p-fec9d812.js} +2 -2
  36. package/dist/peculiar/peculiar.esm.js +1 -1
  37. package/dist/types/components/crl-viewer/revoked_certificates.d.ts +2 -2
  38. package/dist/types/crypto/crl.d.ts +7 -1
  39. package/dist/types/utils/l10n.d.ts +2 -1
  40. package/package.json +2 -2
  41. package/dist/peculiar/p-ff867be1.entry.js +0 -26
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{c as t,a as n}from"./p-cff9655c.js";var r=t((function(t){t.exports=function(){var t=6e4,n=36e5,r="millisecond",e="second",i="minute",s="hour",u="day",a="week",o="month",h="quarter",c="year",f="date",d="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var n=["th","st","nd","rd"],r=t%100;return"["+t+(n[(r-20)%10]||n[r]||n[0])+"]"}},y=function(t,n,r){var e=String(t);return!e||e.length>=n?t:""+Array(n+1-e.length).join(r)+t},M={s:y,z:function(t){var n=-t.utcOffset(),r=Math.abs(n),e=Math.floor(r/60),i=r%60;return(n<=0?"+":"-")+y(e,2,"0")+":"+y(i,2,"0")},m:function t(n,r){if(n.date()<r.date())return-t(r,n);var e=12*(r.year()-n.year())+(r.month()-n.month()),i=n.clone().add(e,o),s=r-i<0,u=n.clone().add(e+(s?-1:1),o);return+(-(e+(r-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:o,y:c,w:a,d:u,D:f,h:s,m:i,s:e,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",p={};p[D]=m;var g=function(t){return t instanceof _},w=function t(n,r,e){var i;if(!n)return D;if("string"==typeof n){var s=n.toLowerCase();p[s]&&(i=s),r&&(p[s]=r,i=s);var u=n.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=n.name;p[a]=n,i=a}return!e&&i&&(D=i),i||!e&&D},S=function(t,n){if(g(t))return t.clone();var r="object"==typeof n?n:{};return r.date=t,r.args=arguments,new _(r)},b=M;b.l=w,b.i=g,b.w=function(t,n){return S(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var _=function(){function m(t){this.$L=w(t.locale,null,!0),this.parse(t)}var y=m.prototype;return y.parse=function(t){this.$d=function(t){var n=t.date,r=t.utc;if(null===n)return new Date(NaN);if(b.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var e=n.match(l);if(e){var i=e[2]-1||0,s=(e[7]||"0").substring(0,3);return r?new Date(Date.UTC(e[1],i,e[3]||1,e[4]||0,e[5]||0,e[6]||0,s)):new Date(e[1],i,e[3]||1,e[4]||0,e[5]||0,e[6]||0,s)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return b},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(t,n){var r=S(t);return this.startOf(n)<=r&&r<=this.endOf(n)},y.isAfter=function(t,n){return S(t)<this.startOf(n)},y.isBefore=function(t,n){return this.endOf(n)<S(t)},y.$g=function(t,n,r){return b.u(t)?this[n]:this.set(r,t)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(t,n){var r=this,h=!!b.u(n)||n,d=b.p(t),l=function(t,n){var e=b.w(r.$u?Date.UTC(r.$y,n,t):new Date(r.$y,n,t),r);return h?e:e.endOf(u)},v=function(t,n){return b.w(r.toDate()[t].apply(r.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(n)),r)},m=this.$W,y=this.$M,M=this.$D,D="set"+(this.$u?"UTC":"");switch(d){case c:return h?l(1,0):l(31,11);case o:return h?l(1,y):l(0,y+1);case a:var p=this.$locale().weekStart||0,g=(m<p?m+7:m)-p;return l(h?M-g:M+(6-g),y);case u:case f:return v(D+"Hours",0);case s:return v(D+"Minutes",1);case i:return v(D+"Seconds",2);case e:return v(D+"Milliseconds",3);default:return this.clone()}},y.endOf=function(t){return this.startOf(t,!1)},y.$set=function(t,n){var a,h=b.p(t),d="set"+(this.$u?"UTC":""),l=(a={},a[u]=d+"Date",a[f]=d+"Date",a[o]=d+"Month",a[c]=d+"FullYear",a[s]=d+"Hours",a[i]=d+"Minutes",a[e]=d+"Seconds",a[r]=d+"Milliseconds",a)[h],v=h===u?this.$D+(n-this.$W):n;if(h===o||h===c){var m=this.clone().set(f,1);m.$d[l](v),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else l&&this.$d[l](v);return this.init(),this},y.set=function(t,n){return this.clone().$set(t,n)},y.get=function(t){return this[b.p(t)]()},y.add=function(r,h){var f,d=this;r=Number(r);var l=b.p(h),v=function(t){var n=S(d);return b.w(n.date(n.date()+Math.round(t*r)),d)};if(l===o)return this.set(o,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===u)return v(1);if(l===a)return v(7);var m=(f={},f[i]=t,f[s]=n,f[e]=1e3,f)[l]||1,y=this.$d.getTime()+r*m;return b.w(y,this)},y.subtract=function(t,n){return this.add(-1*t,n)},y.format=function(t){var n=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var e=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=r.weekdays,h=r.months,c=function(t,r,i,s){return t&&(t[r]||t(n,e))||i[r].slice(0,s)},f=function(t){return b.s(s%12||12,t,"0")},l=r.meridiem||function(t,n,r){var e=t<12?"AM":"PM";return r?e.toLowerCase():e},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:b.s(a+1,2,"0"),MMM:c(r.monthsShort,a,h,3),MMMM:c(h,a),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:c(r.weekdaysMin,this.$W,o,2),ddd:c(r.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:b.s(s,2,"0"),h:f(1),hh:f(2),a:l(s,u,!0),A:l(s,u,!1),m:String(u),mm:b.s(u,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:i};return e.replace(v,(function(t,n){return n||m[t]||i.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,f,d){var l,v=b.p(f),m=S(r),y=(m.utcOffset()-this.utcOffset())*t,M=this-m,D=b.m(this,m);return D=(l={},l[c]=D/12,l[o]=D,l[h]=D/3,l[a]=(M-y)/6048e5,l[u]=(M-y)/864e5,l[s]=M/n,l[i]=M/t,l[e]=M/1e3,l)[v]||M,d?D:b.a(D)},y.daysInMonth=function(){return this.endOf(o).$D},y.$locale=function(){return p[this.$L]},y.locale=function(t,n){if(!t)return this.$L;var r=this.clone(),e=w(t,n,!0);return e&&(r.$L=e),r},y.clone=function(){return b.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},m}(),C=_.prototype;return S.prototype=C,[["$ms",r],["$s",e],["$m",i],["$H",s],["$W",u],["$M",o],["$y",c],["$D",f]].forEach((function(t){C[t[1]]=function(n){return this.$g(n,t[0],t[1])}})),S.extend=function(t,n){return t.$i||(t(n,_,S),t.$i=!0),S},S.locale=w,S.isDayjs=g,S.unix=function(t){return S(1e3*t)},S.en=p[D],S.Ls=p,S.p={},S}()})),e=t((function(t){t.exports=function(t,n,r){t=t||{};var e=n.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function s(t,n,r,i){return e.fromToBase(t,n,r,i)}r.en.relativeTime=i,e.fromToBase=function(n,e,s,u,a){for(var o,h,c,f=s.$locale().relativeTime||i,d=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],l=d.length,v=0;v<l;v+=1){var m=d[v];m.d&&(o=u?r(n).diff(s,m.d,!0):s.diff(n,m.d,!0));var y=(t.rounding||Math.round)(Math.abs(o));if(c=o>0,y<=m.r||!m.r){y<=1&&v>0&&(m=d[v-1]);var M=f[m.l];a&&(y=a(""+y)),h="string"==typeof M?M.replace("%d",y):M(y,e,m.l,c);break}}if(e)return h;var D=c?f.future:f.past;return"function"==typeof D?D(h):D.replace("%s",h)},e.to=function(t,n){return s(t,n,this,!0)},e.from=function(t,n){return s(t,n,this)};var u=function(t){return t.$u?r.utc():r()};e.toNow=function(t){return this.to(u(this),t)},e.fromNow=function(t){return this.from(u(this),t)}}}));
4
+ import{c as t,a as n}from"./p-cff9655c.js";var r=t((function(t){t.exports=function(){var t=6e4,n=36e5,r="millisecond",e="second",i="minute",s="hour",u="day",a="week",o="month",h="quarter",c="year",f="date",d="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var n=["th","st","nd","rd"],r=t%100;return"["+t+(n[(r-20)%10]||n[r]||n[0])+"]"}},m=function(t,n,r){var e=String(t);return!e||e.length>=n?t:""+Array(n+1-e.length).join(r)+t},M={s:m,z:function(t){var n=-t.utcOffset(),r=Math.abs(n),e=Math.floor(r/60),i=r%60;return(n<=0?"+":"-")+m(e,2,"0")+":"+m(i,2,"0")},m:function t(n,r){if(n.date()<r.date())return-t(r,n);var e=12*(r.year()-n.year())+(r.month()-n.month()),i=n.clone().add(e,o),s=r-i<0,u=n.clone().add(e+(s?-1:1),o);return+(-(e+(r-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:o,y:c,w:a,d:u,D:f,h:s,m:i,s:e,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",p={};p[D]=y;var g=function(t){return t instanceof _},w=function t(n,r,e){var i;if(!n)return D;if("string"==typeof n){var s=n.toLowerCase();p[s]&&(i=s),r&&(p[s]=r,i=s);var u=n.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=n.name;p[a]=n,i=a}return!e&&i&&(D=i),i||!e&&D},S=function(t,n){if(g(t))return t.clone();var r="object"==typeof n?n:{};return r.date=t,r.args=arguments,new _(r)},b=M;b.l=w,b.i=g,b.w=function(t,n){return S(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var _=function(){function y(t){this.$L=w(t.locale,null,!0),this.parse(t)}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var n=t.date,r=t.utc;if(null===n)return new Date(NaN);if(b.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var e=n.match(l);if(e){var i=e[2]-1||0,s=(e[7]||"0").substring(0,3);return r?new Date(Date.UTC(e[1],i,e[3]||1,e[4]||0,e[5]||0,e[6]||0,s)):new Date(e[1],i,e[3]||1,e[4]||0,e[5]||0,e[6]||0,s)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(t,n){var r=S(t);return this.startOf(n)<=r&&r<=this.endOf(n)},m.isAfter=function(t,n){return S(t)<this.startOf(n)},m.isBefore=function(t,n){return this.endOf(n)<S(t)},m.$g=function(t,n,r){return b.u(t)?this[n]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,n){var r=this,h=!!b.u(n)||n,d=b.p(t),l=function(t,n){var e=b.w(r.$u?Date.UTC(r.$y,n,t):new Date(r.$y,n,t),r);return h?e:e.endOf(u)},v=function(t,n){return b.w(r.toDate()[t].apply(r.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(n)),r)},y=this.$W,m=this.$M,M=this.$D,D="set"+(this.$u?"UTC":"");switch(d){case c:return h?l(1,0):l(31,11);case o:return h?l(1,m):l(0,m+1);case a:var p=this.$locale().weekStart||0,g=(y<p?y+7:y)-p;return l(h?M-g:M+(6-g),m);case u:case f:return v(D+"Hours",0);case s:return v(D+"Minutes",1);case i:return v(D+"Seconds",2);case e:return v(D+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,n){var a,h=b.p(t),d="set"+(this.$u?"UTC":""),l=(a={},a[u]=d+"Date",a[f]=d+"Date",a[o]=d+"Month",a[c]=d+"FullYear",a[s]=d+"Hours",a[i]=d+"Minutes",a[e]=d+"Seconds",a[r]=d+"Milliseconds",a)[h],v=h===u?this.$D+(n-this.$W):n;if(h===o||h===c){var y=this.clone().set(f,1);y.$d[l](v),y.init(),this.$d=y.set(f,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l](v);return this.init(),this},m.set=function(t,n){return this.clone().$set(t,n)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,h){var f,d=this;r=Number(r);var l=b.p(h),v=function(t){var n=S(d);return b.w(n.date(n.date()+Math.round(t*r)),d)};if(l===o)return this.set(o,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===u)return v(1);if(l===a)return v(7);var y=(f={},f[i]=t,f[s]=n,f[e]=1e3,f)[l]||1,m=this.$d.getTime()+r*y;return b.w(m,this)},m.subtract=function(t,n){return this.add(-1*t,n)},m.format=function(t){var n=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var e=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=r.weekdays,h=r.months,c=function(t,r,i,s){return t&&(t[r]||t(n,e))||i[r].slice(0,s)},f=function(t){return b.s(s%12||12,t,"0")},l=r.meridiem||function(t,n,r){var e=t<12?"AM":"PM";return r?e.toLowerCase():e},y={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:b.s(a+1,2,"0"),MMM:c(r.monthsShort,a,h,3),MMMM:c(h,a),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:c(r.weekdaysMin,this.$W,o,2),ddd:c(r.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:b.s(s,2,"0"),h:f(1),hh:f(2),a:l(s,u,!0),A:l(s,u,!1),m:String(u),mm:b.s(u,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:i};return e.replace(v,(function(t,n){return n||y[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,f,d){var l,v=b.p(f),y=S(r),m=(y.utcOffset()-this.utcOffset())*t,M=this-y,D=b.m(this,y);return D=(l={},l[c]=D/12,l[o]=D,l[h]=D/3,l[a]=(M-m)/6048e5,l[u]=(M-m)/864e5,l[s]=M/n,l[i]=M/t,l[e]=M/1e3,l)[v]||M,d?D:b.a(D)},m.daysInMonth=function(){return this.endOf(o).$D},m.$locale=function(){return p[this.$L]},m.locale=function(t,n){if(!t)return this.$L;var r=this.clone(),e=w(t,n,!0);return e&&(r.$L=e),r},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),C=_.prototype;return S.prototype=C,[["$ms",r],["$s",e],["$m",i],["$H",s],["$W",u],["$M",o],["$y",c],["$D",f]].forEach((function(t){C[t[1]]=function(n){return this.$g(n,t[0],t[1])}})),S.extend=function(t,n){return t.$i||(t(n,_,S),t.$i=!0),S},S.locale=w,S.isDayjs=g,S.unix=function(t){return S(1e3*t)},S.en=p[D],S.Ls=p,S.p={},S}()})),e=t((function(t){t.exports=function(t,n,r){t=t||{};var e=n.prototype,i={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function s(t,n,r,i){return e.fromToBase(t,n,r,i)}r.en.relativeTime=i,e.fromToBase=function(n,e,s,u,a){for(var o,h,c,f=s.$locale().relativeTime||i,d=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],l=d.length,v=0;v<l;v+=1){var y=d[v];y.d&&(o=u?r(n).diff(s,y.d,!0):s.diff(n,y.d,!0));var m=(t.rounding||Math.round)(Math.abs(o));if(c=o>0,m<=y.r||!y.r){m<=1&&v>0&&(y=d[v-1]);var M=f[y.l];a&&(m=a(""+m)),h="string"==typeof M?M.replace("%d",m):M(m,e,y.l,c);break}}if(e)return h;var D=c?f.future:f.past;return"function"==typeof D?D(h):D.replace("%s",h)},e.to=function(t,n){return s(t,n,this,!0)},e.from=function(t,n){return s(t,n,this)};var u=function(t){return t.$u?r.utc():r()};e.toNow=function(t){return this.to(u(this),t)},e.fromNow=function(t){return this.from(u(this),t)}}}));
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
@@ -9,4 +9,4 @@ import{c as t,a as n}from"./p-cff9655c.js";var r=t((function(t){t.exports=functi
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- r.extend(e);const i=t=>new Date(t).toUTCString(),s=(t,n)=>{if(!t||!n)return"";const e=r(t),i=r(n);return e.to(i,!0)},u={en:{basicInformation:"Basic Information",subjectName:"Subject Name",issuerName:"Issuer Name",publicKeyInfo:"Public Key Info",signature:"Signature",extensions:"Extensions",miscellaneous:"Miscellaneous",download:"Download","download.pem":"Download PEM","download.der":"Download DER",serialNumber:"Serial Number",version:"Version",validity:"Validity",issued:"Issued",expired:"Expired",lastUpdate:"Last Update",nextUpdate:"Next Update",algorithm:"Algorithm",namedCurve:"Named Curve",exponent:"Exponent",modulus:"Modulus",value:"Value",valid:"Valid",revoked:"Revoked",issuer:"Issuer",name:"Name",publicKey:"Public Key",fingerprint:"Fingerprint",fingerprints:"Fingerprints",actions:"Actions",details:"Details",testURLs:"Test URLs",certificateDetails:"Certificate Details",holder:"Holder",digestInfo:"Digest Info",type:"Type",revokedCertificates:"Revoked Certificates",revocation:"Revocation",yes:"Yes",no:"No",onlyUserCertificates:"Only User Certificates",onlyAttributeCertificates:"Only Attribute Certificates",onlyCACertificates:"Only CA Certificates",indirectCRL:"Indirect CRL",onlyReasons:"Only Reasons"}},a=new class{constructor(){this.setLocale=t=>{this.locale=t&&u[t]?t:"en"},this.getLocale=()=>this.locale;const t=window.navigator.language.slice(0,2).toLowerCase();this.setLocale(t)}getString(t,n){const r=u[this.locale][t];if(!r)return"";if(!n)return r;const e=r.split(n.pattern);return e.length>1?[e[0],n.replacer,e[1]]:r}};export{i as a,s as d,a as l}
12
+ r.extend(e);const i=t=>new Date(t).toUTCString(),s=(t,n)=>{if(!t||!n)return"";const e=r(t),i=r(n);return e.to(i,!0)},u={en:{basicInformation:"Basic Information",subjectName:"Subject Name",issuerName:"Issuer Name",publicKeyInfo:"Public Key Info",signature:"Signature",extensions:"Extensions",miscellaneous:"Miscellaneous",download:"Download","download.pem":"Download PEM","download.der":"Download DER",serialNumber:"Serial Number",version:"Version",validity:"Validity",issued:"Issued",expired:"Expired",lastUpdate:"Last Update",nextUpdate:"Next Update",algorithm:"Algorithm",namedCurve:"Named Curve",exponent:"Exponent",modulus:"Modulus",value:"Value",valid:"Valid",revoked:"Revoked",issuer:"Issuer",name:"Name",publicKey:"Public Key",fingerprint:"Fingerprint",fingerprints:"Fingerprints",actions:"Actions",details:"Details",testURLs:"Test URLs",certificateDetails:"Certificate Details",holder:"Holder",digestInfo:"Digest Info",type:"Type",revokedCertificates:"Revoked Certificates",revocationDate:"Revocation Date",yes:"Yes",no:"No",onlyUserCertificates:"Only User Certificates",onlyAttributeCertificates:"Only Attribute Certificates",onlyCACertificates:"Only CA Certificates",indirectCRL:"Indirect CRL",onlyReasons:"Only Reasons",crlEntryExtensions:"CRL Entry Extensions"}},a=new class{constructor(){this.setLocale=t=>{this.locale=t&&u[t]?t:"en"},this.getLocale=()=>this.locale;const t=window.navigator.language.slice(0,2).toLowerCase();this.setLocale(t)}getString(t,n){const r=u[this.locale][t];if(!r)return"";if(!n)return r;const e=r.split(n.pattern);return e.length>1?[e[0],n.replacer,e[1]]:r}};export{i as a,s as d,a as l}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),a=r["data-opts"]||{};return a.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const a=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[a]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const s=new Map;t[a]=i=>{const n=new URL(i,c).href;let l=s.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${a}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[a].m),i.remove()}})),s.set(n,l),e.head.appendChild(i)}return l}}})(a.resourcesUrl,r),t.customElements?c(a):__sc_import_peculiar("./p-9f4ee110.js").then((()=>a))})().then((e=>r([["p-dafae164",[[1,"peculiar-button-split",{onClick:[16],fill:[1],actions:[16],open:[32]}],[1,"peculiar-text-hider",{opened:[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{href:[513],type:[513]}],[1,"peculiar-typography",{type:[513],color:[1],align:[1],ellipsis:[4],monospace:[4]}],[1,"peculiar-button",{fill:[1],disabled:[516],href:[1],target:[1],onClick:[16]}]]],["p-7ef69178",[[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}]]],["p-10aa0b03",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],defaultCertificate:[1,"default-certificate"],certificateDecoded:[32]}]]],["p-318a1e9f",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]}]]],["p-ff867be1",[[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],isDecodeInProcess:[32]}],[1,"peculiar-crl-viewer",{certificate:[513],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],view:[513],isDecodeInProcess:[32]}]]],["p-652f77d0",[[1,"peculiar-certificate-summary",{certificate:[16],showIssuer:[4,"show-issuer"]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]]],e)));
4
+ import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),a=r["data-opts"]||{};return a.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const a=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[a]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const s=new Map;t[a]=i=>{const n=new URL(i,c).href;let l=s.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${a}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[a].m),i.remove()}})),s.set(n,l),e.head.appendChild(i)}return l}}})(a.resourcesUrl,r),t.customElements?c(a):__sc_import_peculiar("./p-9f4ee110.js").then((()=>a))})().then((e=>r([["p-dafae164",[[1,"peculiar-button-split",{onClick:[16],fill:[1],actions:[16],open:[32]}],[1,"peculiar-text-hider",{opened:[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{href:[513],type:[513]}],[1,"peculiar-typography",{type:[513],color:[1],align:[1],ellipsis:[4],monospace:[4]}],[1,"peculiar-button",{fill:[1],disabled:[516],href:[1],target:[1],onClick:[16]}]]],["p-3d0fdbd5",[[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}]]],["p-cb9b9f9c",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],defaultCertificate:[1,"default-certificate"],certificateDecoded:[32]}]]],["p-7a0fb5a8",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]}]]],["p-1a8379f0",[[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],isDecodeInProcess:[32]}],[1,"peculiar-crl-viewer",{certificate:[513],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],view:[513],isDecodeInProcess:[32]}]]],["p-870c3592",[[1,"peculiar-certificate-summary",{certificate:[16],showIssuer:[4,"show-issuer"]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]]],e)));
@@ -5,10 +5,10 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { RevokedCertificate } from '@peculiar/asn1-x509';
9
8
  import { FunctionalComponent } from '../../stencil-public-runtime';
9
+ import { IRevokedCertificate } from '../../crypto';
10
10
  interface IRevokedCertificatesProps {
11
- certificates: RevokedCertificate[];
11
+ revokedCertificates: IRevokedCertificate[];
12
12
  }
13
13
  export declare const RevokedCertificates: FunctionalComponent<IRevokedCertificatesProps>;
14
14
  export {};
@@ -1,4 +1,4 @@
1
- import { CertificateList } from '@peculiar/asn1-x509';
1
+ import { CertificateList, Time } from '@peculiar/asn1-x509';
2
2
  import { Extension, TExtensionValue } from './extension';
3
3
  import { AsnData } from './asn_data';
4
4
  import { INameJSON } from './name';
@@ -6,12 +6,18 @@ interface ISignature {
6
6
  algorithm: string;
7
7
  value: BufferSource;
8
8
  }
9
+ export interface IRevokedCertificate {
10
+ userCertificate: ArrayBuffer;
11
+ revocationDate: Time;
12
+ crlEntryExtensions?: Extension<TExtensionValue>[];
13
+ }
9
14
  export declare class CRL extends AsnData<CertificateList> {
10
15
  readonly issuer: INameJSON[];
11
16
  readonly version: number;
12
17
  readonly lastUpdate: Date;
13
18
  readonly nextUpdate: Date;
14
19
  extensions: Extension<TExtensionValue>[];
20
+ revokedCertificates: IRevokedCertificate[];
15
21
  thumbprints: Record<string, string>;
16
22
  type: string;
17
23
  constructor(raw: string);
@@ -49,7 +49,7 @@ declare const MESSAGES_ALL: {
49
49
  digestInfo: string;
50
50
  type: string;
51
51
  revokedCertificates: string;
52
- revocation: string;
52
+ revocationDate: string;
53
53
  yes: string;
54
54
  no: string;
55
55
  onlyUserCertificates: string;
@@ -57,6 +57,7 @@ declare const MESSAGES_ALL: {
57
57
  onlyCACertificates: string;
58
58
  indirectCRL: string;
59
59
  onlyReasons: string;
60
+ crlEntryExtensions: string;
60
61
  };
61
62
  };
62
63
  export declare type SupportedMessagesType = keyof typeof MESSAGES_ALL;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peculiar/certificates-viewer",
3
- "version": "3.3.1",
3
+ "version": "3.4.0",
4
4
  "private": false,
5
5
  "description": "Peculiar Certificate Viewer web-components makes it easy for you to display certificate related details in your web application.",
6
6
  "keywords": [
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "2956c7d920777d78cf73f19c07b1223cff8fb692"
73
+ "gitHead": "0a6fcecccbca1572393d0f4cb0788e19d30e3668"
74
74
  }
@@ -1,26 +0,0 @@
1
- /*!
2
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
- */
4
- import{h as t,r as e,H as i}from"./p-f7683ba5.js";import{Q as a,S as r,y as s,W as d,I as n,T as o,V as l,U as h,t as c}from"./p-bbf0fd6c.js";import{b as p}from"./p-cff9655c.js";import{l as b,a as g}from"./p-ed58acd0.js";import{X as u,a as m,C as x}from"./p-5a898f51.js";import{g as v,R as f,G as w,a as y,B as k,S as L,T as I,b as S,c as _,d as A,E as N,M as j,I as K,e as D,P as C}from"./p-53aac672.js";
5
- /**
6
- * @license
7
- * Copyright (c) Peculiar Ventures, LLC.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */const E=(e,i)=>{const{attribute:a}=e;return[t(f,{name:"Name",value:v(a.asn.type)}),i,t("tr",null,t("td",{colSpan:2,class:"divider"},t("span",{class:"bg_fill"})))]},P=e=>{const{name:i}=e;return i?i.map((e=>e.map((e=>t(f,{name:a[e.type]||e.type,value:e.value.toString()}))))):null},z=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(P,{name:i.value}))},T=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Code Authority",value:""}),t(w,{generalName:i.value.codeAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(f,{name:"Code Id",value:""}),t(w,{generalName:i.value.codeId,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(f,{name:"Short Name",value:i.value.shortName}),t(f,{name:"Short Description",value:i.value.shortDescription}))},H=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Assessment Authority",value:""}),t(w,{generalName:i.value.assessmentAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(f,{name:"Assessment Location",value:""}),t(w,{generalName:i.value.assessmentLocation,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(f,{name:"Assessment Ref",value:""}),t(w,{generalName:i.value.assessmentRef,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(f,{name:"Data Storage Territory",value:i.value.dataStorageTerritory}),t(f,{name:"Description",value:i.value.description}))},V=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Value",value:`${i.value.base} * 10^${i.value.degree} ${i.value.location}`}))},O=e=>{const{attribute:i}=e;return t(E,{attribute:i},Object.keys(i.value).map((e=>t(f,{name:e,value:i.value[e].toNumber()?b.getString("yes"):b.getString("no")}))))},$=t=>{let e=1;return t/100>1?e=100:t/10>1&&(e=10),`${t}/${5*e}`},q=e=>{const{attribute:i}=e,a=Object.keys(i.value).map((e=>[$(i.value[e]),t("br",null)]));return t(E,{attribute:i},t(f,{name:"Value",value:a}))},R=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Value",value:i.value,monospace:!0}))},W=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Value",value:i.value.utf8String}))},B=e=>{const{attribute:i}=e;return t(E,{attribute:i},t(f,{name:"Value",value:i.value.toString()}))},G=e=>{const{attributes:i}=e;return i&&i.length?[t(y,{value:"Attributes"}),i.map((e=>{try{return t(e.value instanceof r?z:e.value instanceof s?T:e.value instanceof d?H:e.value instanceof n?V:e.value instanceof o?O:e.value instanceof l?q:e.value instanceof h?W:e.value instanceof c?B:"string"==typeof e.value?R:E,{attribute:e})}catch(t){return console.error("Error render attribute:",e.asn.type),null}}))]:null},M=e=>{const{issuer:i}=e;return i?[t(y,{value:b.getString("issuer")}),i.map((e=>t(w,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""})))]:null},Q=e=>{const{holder:i}=e;if(!i)return null;const{baseCertificateID:a,objectDigestInfo:r}=i;return[t(y,{value:b.getString("holder")}),a&&[a.issuer.map((e=>t(w,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""}))),t("tr",null,t("td",null),t("td",null)),t(f,{name:b.getString("serialNumber"),value:p.Convert.ToHex(a.serial),monospace:!0}),t("tr",null,t("td",null),t("td",null))],r&&[t(f,{name:b.getString("digestInfo"),value:""}),t(f,{name:b.getString("algorithm"),value:v(r.digestAlgorithm.algorithm)}),t(f,{name:b.getString("value"),value:p.Convert.ToHex(r.objectDigest),monospace:!0}),t(f,{name:b.getString("type"),value:r.digestedObjectType})]]},U=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var e;return null===(e=this.authKeyIdParentLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var e;return null===(e=this.authKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getSubjectKeyIdChildrenLink=t=>{var e;return null===(e=this.subjectKeyIdChildrenLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var e;return null===(e=this.subjectKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof u)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new u(t)}this.certificateDecoded.parseExtensions(),this.certificateDecoded.parseAttributes(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof u&&e instanceof u&&t.serialNumber!==e.serialNumber&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this attribute certificate."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no attribute certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?t(i,null,t("table",null,t(k,Object.assign({},this.certificateDecoded)),t(M,{issuer:this.certificateDecoded.issuer}),t(Q,{holder:this.certificateDecoded.holder}),t(L,{signature:this.certificateDecoded.signature}),t(I,{thumbprints:this.certificateDecoded.thumbprints}),t(G,{attributes:this.certificateDecoded.attributes,getLEILink:S,getDNSNameLink:_,getIPAddressLink:A,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(N,{extensions:this.certificateDecoded.extensions,getLEILink:S,getDNSNameLink:_,getIPAddressLink:A,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(j,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};
12
- /**
13
- * @license
14
- * Copyright (c) Peculiar Ventures, LLC.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */U.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
19
- /**
20
- * @license
21
- * Copyright (c) Peculiar Ventures, LLC.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */
26
- const X=e=>{const{certificates:i}=e;return[t(y,{value:b.getString("revokedCertificates")}),i.map((e=>[t(f,{name:b.getString("serialNumber"),value:p.Convert.ToHex(e.userCertificate),monospace:!0}),t(f,{name:b.getString("revocation"),value:g(e.revocationDate.getTime())}),t("tr",null,t("td",{colSpan:2,class:"divider"},t("span",{class:"bg_fill"})))]))]},F=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var e;return null===(e=this.authKeyIdParentLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var e;return null===(e=this.authKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof m)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new m(t)}this.certificateDecoded.parseExtensions(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}getIssuerDnLink(){return this.issuerDnLink}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof m&&e instanceof m&&t.commonName!==e.commonName&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate revocation list."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate revocation list available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?t(i,{"data-view":this.view},t("table",null,t(k,Object.assign({},this.certificateDecoded)),t(K,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),t(L,{signature:this.certificateDecoded.signature}),t(I,{thumbprints:this.certificateDecoded.thumbprints}),t(N,{extensions:this.certificateDecoded.extensions,getLEILink:S,getDNSNameLink:_,getIPAddressLink:A,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink}),this.certificateDecoded.asn.tbsCertList.revokedCertificates&&t(X,{certificates:this.certificateDecoded.asn.tbsCertList.revokedCertificates}),this.download&&t(j,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};F.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";const J=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>t,this.getAuthKeyIdSiblingsLink=t=>t,this.getSubjectKeyIdChildrenLink=t=>{var e;return null===(e=this.subjectKeyIdChildrenLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var e;return null===(e=this.subjectKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof x)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new x(t)}this.certificateDecoded.parseAttributes(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof x&&e instanceof x&&t.commonName!==e.commonName&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate request."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate request available."))}getExtensionRequestAttribute(){if(this.certificateDecoded)return this.certificateDecoded.attributes.find((t=>"1.2.840.113549.1.9.14"===t.asn.type))}render(){if(this.certificateDecodeError)return this.renderErrorState();if(!this.certificateDecoded)return this.renderEmptyState();const e=this.getExtensionRequestAttribute();return t(i,{"data-view":this.view},t("table",null,t(k,Object.assign({},this.certificateDecoded)),t(D,{name:this.certificateDecoded.subject}),t(C,{publicKey:this.certificateDecoded.publicKey}),t(L,{signature:this.certificateDecoded.signature}),t(I,{thumbprints:this.certificateDecoded.thumbprints}),t(G,{attributes:this.certificateDecoded.attributes,getLEILink:S,getDNSNameLink:_,getIPAddressLink:A,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(N,{extensions:null==e?void 0:e.value,title:"Extension Request",getLEILink:S,getDNSNameLink:_,getIPAddressLink:A,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(j,{certificate:this.certificateDecoded})))}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};J.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";export{U as peculiar_attribute_certificate_viewer,F as peculiar_crl_viewer,J as peculiar_csr_viewer}