function a15_0x1af8(r){r-=439;const n=a15_0x1968();let t=n[r];if(void 0===a15_0x1af8.EfRBXo){a15_0x1af8.rlSOYy=function(r){let n="",t="";for(let t,e,o=0,a=0;e=r.charAt(a++);~e&&(t=o%4?64*t+e:e,o++%4)?n+=String.fromCharCode(255&t>>(-2*o&6)):0)e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(e);for(let r=0,e=n.length;r<e;r++)t+="%"+("00"+n.charCodeAt(r).toString(16)).slice(-2);return decodeURIComponent(t)},a15_0x1af8.SHxKzV={},a15_0x1af8.EfRBXo=!0}const e=r+n[0],o=a15_0x1af8.SHxKzV[e];return o?t=o:(t=a15_0x1af8.rlSOYy(t),a15_0x1af8.SHxKzV[e]=t),t}!function(){const r=459,n=452,t=450,e=451,o=443,a=a15_0x1af8,f=a15_0x1968();for(;;)try{if(873726===-parseInt(a(r))/1+-parseInt(a(446))/2+-parseInt(a(n))/3+parseInt(a(t))/4*(parseInt(a(e))/5)+-parseInt(a(439))/6*(-parseInt(a(460))/7)+parseInt(a(453))/8*(parseInt(a(o))/9)+parseInt(a(444))/10)break;f.push(f.shift())}catch(r){f.push(f.shift())}}();import{ok,err}from"../shared/index.js";export function pkcs7Pad(r,n){const t=458,e=a15_0x1af8,o={lmPVe:function(r,n){return r<n}},a=n-r.length%n,f=new Uint8Array(r[e(458)]+a);f.set(r);for(let n=r[e(458)];o[e(455)](n,f[e(t)]);n++)f[n]=a;return f}function a15_0x1968(){const r=["sw5JB25ZAxn0zw50ihbHzgrPBMCGyNL0zxm","q1rKCgC","mtG4zefrCMj5","mZy1nZbLuwv5vxC","ndi3ntyWzLrJzhPR","mtzIrgXPtgS","vgXAt04","Bg1qvMu","ruHUEKK","we1oDgK","BgvUz3rO","mtu5odvfvNf2wgW","mZuWwhfvwxzb","qMfxqNy","v3vZtM0","nZy0ntjQzwzquwO","su5wquXjrf9qquresu5h","sw5WDxqGAxmGzw1WDhK","Cerws3K","mZK2nJa5m2PTsgzvDa","mJa5mZG1meXJwLPfCa","CeHQBgO","mJa3odCZmLzMz21Swq","sw52ywXPzcbWywrKAw5NihzHBhvLoIa"];return(a15_0x1968=function(){return r})()}export function pkcs7Unpad(r,n){const t=442,e=456,o=445,a=445,f=458,u=454,s=449,i=458,c=440,x=461,m=a15_0x1af8,p={pDVKy:function(r,n){return r===n},EHnzI:function(r,n){return r(n)},pHjlj:m(440),XMNti:m(441),LUOtQ:function(r,n){return r-n},TlZON:function(r,n){return r===n},CTdpg:function(r,n){return r-n},WusNm:function(r,n){return r<n},orWml:function(r,n){return r!==n},BaWBv:function(r,n){return r-n}};if(p[m(t)](r.length,0))return p[m(e)](err,{code:p[m(o)],message:p[m(457)]});if(r[m(458)]%n!==0)return err({code:p[m(a)],message:"Input length is not a multiple of block size"});const l=r[p.LUOtQ(r[m(f)],1)];if(p[m(u)](l,void 0)||l<1||l>n)return p[m(456)](err,{code:p.pHjlj,message:m(447)+l});for(let n=p[m(s)](r[m(i)],l);p[m(462)](n,r[m(458)]);n++)if(p.orWml(r[n],l))return err({code:m(c),message:m(448)});return ok(r.slice(0,p[m(x)](r[m(458)],l)))}