PageSourceSearch

https://slipapinksw1.theworkpc.com/assets/SlipPage-CkZ1fNtx.js

js slipapinksw1.theworkpc.com collected 2026-10-10 02:42:27 UTC 54,389 bytes, 8 lines download raw bytes

vendor: 22,379 bytes, lines 1-7
1import{g as St,h as Lt,u as Mt,i as kt,r as z,a as ce,k as Dt,m as _t,j as a,P as xe,f as ye,F as we,l as Ut,o as qt}from"./index-D3X0tlrW.js";import{A as Qe,C as Ft}from"./ChangePasswordModal-DmVV0F_5.js";import{C as zt}from"./circle-alert-DMvjewzl.js";import{K as Ot,D as Ht,C as Kt}from"./key-round-Bv0zYgR-.js";import{P as Vt,U as Jt,B as Yt}from"./user-DG3Qs2Gd.js";var X={},Ne,We;function Gt(){return We||(We=1,Ne=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Ne}var ve={},V={},Xe;function Y(){if(Xe)return V;Xe=1;let r;const o=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return V.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17},V.getSymbolTotalCodewords=function(t){return o[t]},V.getBCHDigit=function(s){let t=0;for(;s!==0;)t++,s>>>=1;return t},V.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');r=t},V.isKanjiModeEnabled=function(){return typeof r<"u"},V.toSJIS=function(t){return r(t)},V}var Ce={},Ze;function Ke(){return Ze||(Ze=1,(function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function o(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+s)}}r.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4},r.from=function(t,e){if(r.isValid(t))return t;try{return o(t)}catch{return e}}})(Ce)),Ce}var Ee,$e;function Qt(){if($e)return Ee;$e=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(o){const s=Math.floor(o/8);return(this.buffer[s]>>>7-o%8&1)===1},put:function(o,s){for(let t=0;t<s;t++)this.putBit((o>>>s-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(o){const s=Math.floor(this.length/8);this.buffer.length<=s&&this.buffer.push(0),o&&(this.buffer[s]|=128>>>this.length%8),this.length++}},Ee=r,Ee}var je,et;function Wt(){if(et)return je;et=1;function r(o){if(!o||o<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=o,this.data=new Uint8Array(o*o),this.reservedBit=new Uint8Array(o*o)}return r.prototype.set=function(o,s,t,e){const n=o*this.size+s;this.data[n]=t,e&&(this.reservedBit[n]=!0)},r.prototype.get=function(o,s){return this.data[o*this.size+s]},r.prototype.xor=function(o,s,t){this.data[o*this.size+s]^=t},r.prototype.isReserved=function(o,s){return this.reservedBit[o*this.size+s]},je=r,je}var Be={},tt;function Xt(){return tt||(tt=1,(function(r){const o=Y().getSymbolSize;r.getRowColCoords=function(t){if(t===1)return[];const e=Math.floor(t/7)+2,n=o(t),i=n===145?26:Math.ceil((n-13)/(2*e-2))*2,l=[n-7];for(let c=1;c<e-1;c++)l[c]=l[c-1]-i;return l.push(6),l.reverse()},r.getPositions=function(t){const e=[],n=r.getRowColCoords(t),i=n.length;for(let l=0;l<i;l++)for(let c=0;c<i;c++)l===0&&c===0||l===0&&c===i-1||l===i-1&&c===0||e.push([n[l],n[c]]);return e}})(Be)),Be}var Re={},nt;function Zt(){if(nt)return Re;nt=1;const r=Y().getSymbolSize,o=7;return Re.getPositions=function(t){const e=r(t);return[[0,0],[e-o,0],[0,e-o]]},Re}var Ae={},rt;function $t(){return rt||(rt=1,(function(r){r.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const o={N1:3,N2:3,N3:40,N4:10};r.isValid=function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7},r.from=function(e){return r.isValid(e)?parseInt(e,10):void 0},r.getPenaltyN1=function(e){const n=e.size;let i=0,l=0,c=0,f=null,d=null;for(let w=0;w<n;w++){l=c=0,f=d=null;for(let x=0;x<n;x++){let u=e.get(w,x);u===f?l++:(l>=5&&(i+=o.N1+(l-5)),f=u,l=1),u=e.get(x,w),u===d?c++:(c>=5&&(i+=o.N1+(c-5)),d=u,c=1)}l>=5&&(i+=o.N1+(l-5)),c>=5&&(i+=o.N1+(c-5))}return i},r.getPenaltyN2=function(e){const n=e.size;let i=0;for(let l=0;l<n-1;l++)for(let c=0;c<n-1;c++){const f=e.get(l,c)+e.get(l,c+1)+e.get(l+1,c)+e.get(l+1,c+1);(f===4||f===0)&&i++}return i*o.N2},r.getPenaltyN3=function(e){const n=e.size;let i=0,l=0,c=0;for(let f=0;f<n;f++){l=c=0;for(let d=0;d<n;d++)l=l<<1&2047|e.get(f,d),d>=10&&(l===1488||l===93)&&i++,c=c<<1&2047|e.get(d,f),d>=10&&(c===1488||c===93)&&i++}return i*o.N3},r.getPenaltyN4=function(e){let n=0;const i=e.data.length;for(let c=0;c<i;c++)n+=e.data[c];return Math.abs(Math.ceil(n*100/i/5)-10)*o.N4};function s(t,e,n){switch(t){case r.Patterns.PATTERN000:return(e+n)%2===0;case r.Patterns.PATTERN001:return e%2===0;case r.Patterns.PATTERN010:return n%3===0;case r.Patterns.PATTERN011:return(e+n)%3===0;case r.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(n/3))%2===0;case r.Patterns.PATTERN101:return e*n%2+e*n%3===0;case r.Patterns.PATTERN110:return(e*n%2+e*n%3)%2===0;case r.Patterns.PATTERN111:return(e*n%3+(e+n)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}r.applyMask=function(e,n){const i=n.size;for(let l=0;l<i;l++)for(let c=0;c<i;c++)n.isReserved(c,l)||n.xor(c,l,s(e,c,l))},r.getBestMask=function(e,n){const i=Object.keys(r.Patterns).length;let l=0,c=1/0;for(let f=0;f<i;f++){n(f),r.applyMask(f,e);const d=r.getPenaltyN1(e)+r.getPenaltyN2(e)+r.getPenaltyN3(e)+r.getPenaltyN4(e);r.applyMask(f,e),d<c&&(c=d,l=f)}return l}})(Ae)),Ae}var de={},ot;function Et(){if(ot)return de;ot=1;const r=Ke(),o=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return de.getBlocksCount=function(e,n){switch(n){case r.L:return o[(e-1)*4+0];case r.M:return o[(e-1)*4+1];case r.Q:return o[(e-1)*4+2];case r.H:return o[(e-1)*4+3];default:return}},de.getTotalCodewordsCount=function(e,n){switch(n){case r.L:return s[(e-1)*4+0];case r.M:return s[(e-1)*4+1];case r.Q:return s[(e-1)*4+2];case r.H:return s[(e-1)*4+3];default:return}},de}var Te={},re={},st;function en(){if(st)return re;st=1;const r=new Uint8Array(512),o=new Uint8Array(256);return(function(){let t=1;for(let e=0;e<255;e++)r[e]=t,o[t]=e,t<<=1,t&256&&(t^=285);for(let e=255;e<512;e++)r[e]=r[e-255]})(),re.log=function(t){if(t<1)throw new Error("log("+t+")");return o[t]},re.exp=function(t){return r[t]},re.mul=function(t,e){return t===0||e===0?0:r[o[t]+o[e]]},re}var it;function tn(){return it||(it=1,(function(r){const o=en();r.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let i=0;i<t.length;i++)for(let l=0;l<e.length;l++)n[i+l]^=o.mul(t[i],e[l]);return n},r.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const i=n[0];for(let c=0;c<e.length;c++)n[c]^=o.mul(e[c],i);let l=0;for(;l<n.length&&n[l]===0;)l++;n=n.slice(l)}return n},r.generateECPolynomial=function(t){let e=new Uint8Array([1]);for(let n=0;n<t;n++)e=r.mul(e,new Uint8Array([1,o.exp(n)]));return e}})(Te)),Te}var Ie,at;function nn(){if(at)return Ie;at=1;const r=tn();function o(s){this.genPoly=void 0,this.degree=s,this.degree&&this.initialize(this.degree)}return o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),i=this.degree-n.length;if(i>0){const l=new Uint8Array(this.degree);return l.set(n,i),l}return n},Ie=o,Ie}var Pe={},Se={},Le={},lt;function jt(){return lt||(lt=1,Le.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}),Le}var K={},ct;function Bt(){if(ct)return K;ct=1;const r="[0-9]+",o="[A-Z $%*+\\-./:]+";let s="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";s=s.replace(/u/g,"\\u");const t="(?:(?![A-Z0-9 $%*+\\-./:]|"+s+`)(?:.|[\r
2]))+`;K.KANJI=new RegExp(s,"g"),K.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),K.BYTE=new RegExp(t,"g"),K.NUMERIC=new RegExp(r,"g"),K.ALPHANUMERIC=new RegExp(o,"g");const e=new RegExp("^"+s+"$"),n=new RegExp("^"+r+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return K.testKanji=function(c){return e.test(c)},K.testNumeric=function(c){return n.test(c)},K.testAlphanumeric=function(c){return i.test(c)},K}var dt;function G(){return dt||(dt=1,(function(r){const o=jt(),s=Bt();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(n,i){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!o.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?n.ccBits[0]:i<27?n.ccBits[1]:n.ccBits[2]},r.getBestModeForData=function(n){return s.testNumeric(n)?r.NUMERIC:s.testAlphanumeric(n)?r.ALPHANUMERIC:s.testKanji(n)?r.KANJI:r.BYTE},r.toString=function(n){if(n&&n.id)return n.id;throw new Error("Invalid mode")},r.isValid=function(n){return n&&n.bit&&n.ccBits};function t(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+e)}}r.from=function(n,i){if(r.isValid(n))return n;try{return t(n)}catch{return i}}})(Se)),Se}var ut;function rn(){return ut||(ut=1,(function(r){const o=Y(),s=Et(),t=Ke(),e=G(),n=jt(),i=7973,l=o.getBCHDigit(i);function c(x,u,g){for(let y=1;y<=40;y++)if(u<=r.getCapacity(y,g,x))return y}function f(x,u){return e.getCharCountIndicator(x,u)+4}function d(x,u){let g=0;return x.forEach(function(y){const T=f(y.mode,u);g+=T+y.getBitsLength()}),g}function w(x,u){for(let g=1;g<=40;g++)if(d(x,g)<=r.getCapacity(g,u,e.MIXED))return g}r.from=function(u,g){return n.isValid(u)?parseInt(u,10):g},r.getCapacity=function(u,g,y){if(!n.isValid(u))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=e.BYTE);const T=o.getSymbolTotalCodewords(u),m=s.getTotalCodewordsCount(u,g),I=(T-m)*8;if(y===e.MIXED)return I;const E=I-f(y,u);switch(y){case e.NUMERIC:return Math.floor(E/10*3);case e.ALPHANUMERIC:return Math.floor(E/11*2);case e.KANJI:return Math.floor(E/13);case e.BYTE:default:return Math.floor(E/8)}},r.getBestVersionForData=function(u,g){let y;const T=t.from(g,t.M);if(Array.isArray(u)){if(u.length>1)return w(u,T);if(u.length===0)return 1;y=u[0]}else y=u;return c(y.mode,y.getLength(),T)},r.getEncodedBits=function(u){if(!n.isValid(u)||u<7)throw new Error("Invalid QR Code version");let g=u<<12;for(;o.getBCHDigit(g)-l>=0;)g^=i<<o.getBCHDigit(g)-l;return u<<12|g}})(Pe)),Pe}var Me={},ft;function on(){if(ft)return Me;ft=1;const r=Y(),o=1335,s=21522,t=r.getBCHDigit(o);return Me.getEncodedBits=function(n,i){const l=n.bit<<3|i;let c=l<<10;for(;r.getBCHDigit(c)-t>=0;)c^=o<<r.getBCHDigit(c)-t;return(l<<10|c)^s},Me}var ke={},De,ht;function sn(){if(ht)return De;ht=1;const r=G();function o(s){this.mode=r.NUMERIC,this.data=s.toString()}return o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e,n,i;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),i=parseInt(n,10),t.put(i,10);const l=this.data.length-e;l>0&&(n=this.data.substr(e),i=parseInt(n,10),t.put(i,l*3+1))},De=o,De}var _e,gt;function an(){if(gt)return _e;gt=1;const r=G(),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function s(t){this.mode=r.ALPHANUMERIC,this.data=t}return s.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(e){let n;for(n=0;n+2<=this.data.length;n+=2){let i=o.indexOf(this.data[n])*45;i+=o.indexOf(this.data[n+1]),e.put(i,11)}this.data.length%2&&e.put(o.indexOf(this.data[n]),6)},_e=s,_e}var Ue,mt;function ln(){if(mt)return Ue;mt=1;const r=G();function o(s){this.mode=r.BYTE,typeof s=="string"?this.data=new TextEncoder().encode(s):this.data=new Uint8Array(s)}return o.getBitsLength=function(t){return t*8},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(s){for(let t=0,e=this.data.length;t<e;t++)s.put(this.data[t],8)},Ue=o,Ue}var qe,pt;function cn(){if(pt)return qe;pt=1;const r=G(),o=Y();function s(t){this.mode=r.KANJI,this.data=t}return s.getBitsLength=function(e){return e*13},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
3Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),t.put(n,13)}},qe=s,qe}var Fe={exports:{}},bt;function dn(){return bt||(bt=1,(function(r){var o={single_source_shortest_paths:function(s,t,e){var n={},i={};i[t]=0;var l=o.PriorityQueue.make();l.push(t,0);for(var c,f,d,w,x,u,g,y,T;!l.empty();){c=l.pop(),f=c.value,w=c.cost,x=s[f]||{};for(d in x)x.hasOwnProperty(d)&&(u=x[d],g=w+u,y=i[d],T=typeof i[d]>"u",(T||y>g)&&(i[d]=g,l.push(d,g),n[d]=f))}if(typeof e<"u"&&typeof i[e]>"u"){var m=["Could not find a path from ",t," to ",e,"."].join("");throw new Error(m)}return n},extract_shortest_path_from_predecessor_list:function(s,t){for(var e=[],n=t;n;)e.push(n),s[n],n=s[n];return e.reverse(),e},find_path:function(s,t,e){var n=o.single_source_shortest_paths(s,t,e);return o.extract_shortest_path_from_predecessor_list(n,e)},PriorityQueue:{make:function(s){var t=o.PriorityQueue,e={},n;s=s||{};for(n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e.queue=[],e.sorter=s.sorter||t.default_sorter,e},default_sorter:function(s,t){return s.cost-t.cost},push:function(s,t){var e={value:s,cost:t};this.queue.push(e),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=o})(Fe)),Fe.exports}var xt;function un(){return xt||(xt=1,(function(r){const o=G(),s=sn(),t=an(),e=ln(),n=cn(),i=Bt(),l=Y(),c=dn();function f(m){return unescape(encodeURIComponent(m)).length}function d(m,I,E){const R=[];let _;for(;(_=m.exec(E))!==null;)R.push({data:_[0],index:_.index,mode:I,length:_[0].length});return R}function w(m){const I=d(i.NUMERIC,o.NUMERIC,m),E=d(i.ALPHANUMERIC,o.ALPHANUMERIC,m);let R,_;return l.isKanjiModeEnabled()?(R=d(i.BYTE,o.BYTE,m),_=d(i.KANJI,o.KANJI,m)):(R=d(i.BYTE_KANJI,o.BYTE,m),_=[]),I.concat(E,R,_).sort(function(j,N){return j.index-N.index}).map(function(j){return{data:j.data,mode:j.mode,length:j.length}})}function x(m,I){switch(I){case o.NUMERIC:return s.getBitsLength(m);case o.ALPHANUMERIC:return t.getBitsLength(m);case o.KANJI:return n.getBitsLength(m);case o.BYTE:return e.getBitsLength(m)}}function u(m){return m.reduce(function(I,E){const R=I.length-1>=0?I[I.length-1]:null;return R&&R.mode===E.mode?(I[I.length-1].data+=E.data,I):(I.push(E),I)},[])}function g(m){const I=[];for(let E=0;E<m.length;E++){const R=m[E];switch(R.mode){case o.NUMERIC:I.push([R,{data:R.data,mode:o.ALPHANUMERIC,length:R.length},{data:R.data,mode:o.BYTE,length:R.length}]);break;case o.ALPHANUMERIC:I.push([R,{data:R.data,mode:o.BYTE,length:R.length}]);break;case o.KANJI:I.push([R,{data:R.data,mode:o.BYTE,length:f(R.data)}]);break;case o.BYTE:I.push([{data:R.data,mode:o.BYTE,length:f(R.data)}])}}return I}function y(m,I){const E={},R={start:{}};let _=["start"];for(let p=0;p<m.length;p++){const j=m[p],N=[];for(let b=0;b<j.length;b++){const A=j[b],v=""+p+b;N.push(v),E[v]={node:A,lastCount:0},R[v]={};for(let B=0;B<_.length;B++){const C=_[B];E[C]&&E[C].node.mode===A.mode?(R[C][v]=x(E[C].lastCount+A.length,A.mode)-x(E[C].lastCount,A.mode),E[C].lastCount+=A.length):(E[C]&&(E[C].lastCount=A.length),R[C][v]=x(A.length,A.mode)+4+o.getCharCountIndicator(A.mode,I))}}_=N}for(let p=0;p<_.length;p++)R[_[p]].end=0;return{map:R,table:E}}function T(m,I){let E;const R=o.getBestModeForData(m);if(E=o.from(I,R),E!==o.BYTE&&E.bit<R.bit)throw new Error('"'+m+'" cannot be encoded with mode '+o.toString(E)+`.
4 Suggested mode is: `+o.toString(R));switch(E===o.KANJI&&!l.isKanjiModeEnabled()&&(E=o.BYTE),E){case o.NUMERIC:return new s(m);case o.ALPHANUMERIC:return new t(m);case o.KANJI:return new n(m);case o.BYTE:return new e(m)}}r.fromArray=function(I){return I.reduce(function(E,R){return typeof R=="string"?E.push(T(R,null)):R.data&&E.push(T(R.data,R.mode)),E},[])},r.fromString=function(I,E){const R=w(I,l.isKanjiModeEnabled()),_=g(R),p=y(_,E),j=c.find_path(p.map,"start","end"),N=[];for(let b=1;b<j.length-1;b++)N.push(p.table[j[b]].node);return r.fromArray(u(N))},r.rawSplit=function(I){return r.fromArray(w(I,l.isKanjiModeEnabled()))}})(ke)),ke}var yt;function fn(){if(yt)return ve;yt=1;const r=Y(),o=Ke(),s=Qt(),t=Wt(),e=Xt(),n=Zt(),i=$t(),l=Et(),c=nn(),f=rn(),d=on(),w=G(),x=un();function u(p,j){const N=p.size,b=n.getPositions(j);for(let A=0;A<b.length;A++){const v=b[A][0],B=b[A][1];for(let C=-1;C<=7;C++)if(!(v+C<=-1||N<=v+C))for(let P=-1;P<=7;P++)B+P<=-1||N<=B+P||(C>=0&&C<=6&&(P===0||P===6)||P>=0&&P<=6&&(C===0||C===6)||C>=2&&C<=4&&P>=2&&P<=4?p.set(v+C,B+P,!0,!0):p.set(v+C,B+P,!1,!0))}}function g(p){const j=p.size;for(let N=8;N<j-8;N++){const b=N%2===0;p.set(N,6,b,!0),p.set(6,N,b,!0)}}function y(p,j){const N=e.getPositions(j);for(let b=0;b<N.length;b++){const A=N[b][0],v=N[b][1];for(let B=-2;B<=2;B++)for(let C=-2;C<=2;C++)B===-2||B===2||C===-2||C===2||B===0&&C===0?p.set(A+B,v+C,!0,!0):p.set(A+B,v+C,!1,!0)}}function T(p,j){const N=p.size,b=f.getEncodedBits(j);let A,v,B;for(let C=0;C<18;C++)A=Math.floor(C/3),v=C%3+N-8-3,B=(b>>C&1)===1,p.set(A,v,B,!0),p.set(v,A,B,!0)}function m(p,j,N){const b=p.size,A=d.getEncodedBits(j,N);let v,B;for(v=0;v<15;v++)B=(A>>v&1)===1,v<6?p.set(v,8,B,!0):v<8?p.set(v+1,8,B,!0):p.set(b-15+v,8,B,!0),v<8?p.set(8,b-v-1,B,!0):v<9?p.set(8,15-v-1+1,B,!0):p.set(8,15-v-1,B,!0);p.set(b-8,8,1,!0)}function I(p,j){const N=p.size;let b=-1,A=N-1,v=7,B=0;for(let C=N-1;C>0;C-=2)for(C===6&&C--;;){for(let P=0;P<2;P++)if(!p.isReserved(A,C-P)){let O=!1;B<j.length&&(O=(j[B]>>>v&1)===1),p.set(A,C-P,O),v--,v===-1&&(B++,v=7)}if(A+=b,A<0||N<=A){A-=b,b=-b;break}}}function E(p,j,N){const b=new s;N.forEach(function(P){b.put(P.mode.bit,4),b.put(P.getLength(),w.getCharCountIndicator(P.mode,p)),P.write(b)});const A=r.getSymbolTotalCodewords(p),v=l.getTotalCodewordsCount(p,j),B=(A-v)*8;for(b.getLengthInBits()+4<=B&&b.put(0,4);b.getLengthInBits()%8!==0;)b.putBit(0);const C=(B-b.getLengthInBits())/8;for(let P=0;P<C;P++)b.put(P%2?17:236,8);return R(b,p,j)}function R(p,j,N){const b=r.getSymbolTotalCodewords(j),A=l.getTotalCodewordsCount(j,N),v=b-A,B=l.getBlocksCount(j,N),C=b%B,P=B-C,O=Math.floor(b/B),J=Math.floor(v/B),oe=J+1,$=O-J,se=new c($);let ee=0;const Q=new Array(B),ie=new Array(B);let te=0;const S=new Uint8Array(p.buffer);for(let H=0;H<B;H++){const W=H<P?J:oe;Q[H]=S.slice(ee,ee+W),ie[H]=se.encode(Q[H]),ee+=W,te=Math.max(te,W)}const L=new Uint8Array(b);let D=0,k,U;for(k=0;k<te;k++)for(U=0;U<B;U++)k<Q[U].length&&(L[D++]=Q[U][k]);for(k=0;k<$;k++)for(U=0;U<B;U++)L[D++]=ie[U][k];return L}function _(p,j,N,b){let A;if(Array.isArray(p))A=x.fromArray(p);else if(typeof p=="string"){let O=j;if(!O){const J=x.rawSplit(p);O=f.getBestVersionForData(J,N)}A=x.fromString(p,O||40)}else throw new Error("Invalid data");const v=f.getBestVersionForData(A,N);if(!v)throw new Error("The amount of data is too big to be stored in a QR Code");if(!j)j=v;else if(j<v)throw new Error(`
5The chosen QR Code version cannot contain this amount of data.
6Minimum version required to store current data is: `+v+`.
7`);const B=E(j,N,A),C=r.getSymbolSize(j),P=new t(C);return u(P,j),g(P),y(P,j),m(P,N,0),j>=7&&T(P,j),I(P,B),isNaN(b)&&(b=i.getBestMask(P,m.bind(null,P,N))),i.applyMask(b,P),m(P,N,b),{modules:P,version:j,errorCorrectionLevel:N,maskPattern:b,segments:A}}return ve.create=function(j,N){if(typeof j>"u"||j==="")throw new Error("No input text");let b=o.M,A,v;return typeof N<"u"&&(b=o.from(N.errorCorrectionLevel,o.M),A=f.from(N.version),v=i.from(N.maskPattern),N.toSJISFunc&&r.setToSJISFunction(N.toSJISFunc)),_(j,A,b,v)},ve}var ze={},Oe={},wt;function Rt(){return wt||(wt=1,(function(r){function o(s){if(typeof s=="number"&&(s=s.toString()),typeof s!="string")throw new Error("Color should be defined as hex string");let t=s.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+s);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(n){return[n,n]}))),t.length===6&&t.push("F","F");const e=parseInt(t.join(""),16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:e&255,hex:"#"+t.slice(0,6).join("")}}r.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,n=t.width&&t.width>=21?t.width:void 0,i=t.scale||4;
7return{width:n,scale:n?4:i,margin:e,color:{dark:o(t.color.dark||"#000000ff"),light:o(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},r.getScale=function(t,e){return e.width&&e.width>=t+e.margin*2?e.width/(t+e.margin*2):e.scale},r.getImageWidth=function(t,e){const n=r.getScale(t,e);return Math.floor((t+e.margin*2)*n)},r.qrToImageData=function(t,e,n){const i=e.modules.size,l=e.modules.data,c=r.getScale(i,n),f=Math.floor((i+n.margin*2)*c),d=n.margin*c,w=[n.color.light,n.color.dark];for(let x=0;x<f;x++)for(let u=0;u<f;u++){let g=(x*f+u)*4,y=n.color.light;if(x>=d&&u>=d&&x<f-d&&u<f-d){const T=Math.floor((x-d)/c),m=Math.floor((u-d)/c);y=w[l[T*i+m]?1:0]}t[g++]=y.r,t[g++]=y.g,t[g++]=y.b,t[g]=y.a}}})(Oe)),Oe}var Nt;function hn(){return Nt||(Nt=1,(function(r){const o=Rt();function s(e,n,i){e.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=i,n.width=i,n.style.height=i+"px",n.style.width=i+"px"}function t(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}r.render=function(n,i,l){let c=l,f=i;typeof c>"u"&&(!i||!i.getContext)&&(c=i,i=void 0),i||(f=t()),c=o.getOptions(c);const d=o.getImageWidth(n.modules.size,c),w=f.getContext("2d"),x=w.createImageData(d,d);return o.qrToImageData(x.data,n,c),s(w,f,d),w.putImageData(x,0,0),f},r.renderToDataURL=function(n,i,l){let c=l;typeof c>"u"&&(!i||!i.getContext)&&(c=i,i=void 0),c||(c={});const f=r.render(n,i,c),d=c.type||"image/png",w=c.rendererOpts||{};return f.toDataURL(d,w.quality)}})(ze)),ze}var He={},vt;function gn(){if(vt)return He;vt=1;const r=Rt();function o(e,n){const i=e.a/255,l=n+'="'+e.hex+'"';return i<1?l+" "+n+'-opacity="'+i.toFixed(2).slice(1)+'"':l}function s(e,n,i){let l=e+n;return typeof i<"u"&&(l+=" "+i),l}function t(e,n,i){let l="",c=0,f=!1,d=0;for(let w=0;w<e.length;w++){const x=Math.floor(w%n),u=Math.floor(w/n);!x&&!f&&(f=!0),e[w]?(d++,w>0&&x>0&&e[w-1]||(l+=f?s("M",x+i,.5+u+i):s("m",c,0),c=0,f=!1),x+1<n&&e[w+1]||(l+=s("h",d),d=0)):c++}return l}return He.render=function(n,i,l){const c=r.getOptions(i),f=n.modules.size,d=n.modules.data,w=f+c.margin*2,x=c.color.light.a?"<path "+o(c.color.light,"fill")+' d="M0 0h'+w+"v"+w+'H0z"/>':"",u="<path "+o(c.color.dark,"stroke")+' d="'+t(d,f,c.margin)+'"/>',g='viewBox="0 0 '+w+" "+w+'"',T='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+g+' shape-rendering="crispEdges">'+x+u+`</svg>
8`;return typeof l=="function"&&l(null,T),T},He}var Ct;function mn(){if(Ct)return X;Ct=1;const r=Gt(),o=fn(),s=hn(),t=gn();function e(n,i,l,c,f){const d=[].slice.call(arguments,1),w=d.length,x=typeof d[w-1]=="function";if(!x&&!r())throw new Error("Callback required as last argument");if(x){if(w<2)throw new Error("Too few arguments provided");w===2?(f=l,l=i,i=c=void 0):w===3&&(i.getContext&&typeof f>"u"?(f=c,c=void 0):(f=c,c=l,l=i,i=void 0))}else{if(w<1)throw new Error("Too few arguments provided");return w===1?(l=i,i=c=void 0):w===2&&!i.getContext&&(c=l,l=i,i=void 0),new Promise(function(u,g){try{const y=o.create(l,c);u(n(y,i,c))}catch(y){g(y)}})}try{const u=o.create(l,c);f(null,n(u,i,c))}catch(u){f(u)}}return X.create=o.create,X.toCanvas=e.bind(null,s.render),X.toDataURL=e.bind(null,s.renderToDataURL),X.toString=e.bind(null,function(n,i,l){return t.render(n,l)}),X}var pn=mn();const bn=St(pn);function xn(r){if(r===null||typeof r>"u"||isNaN(r))return"";let o="",[s,t]=String(Number(r).toFixed(2)).split(".");const e=n=>{let i="";const l=["","หนึ่ง","สอง","สาม","สี่","ห้า","หก","เจ็ด","แปด","เก้า","สิบ"],c=["","สิบ","ร้อย","พัน","หมื่น","แสน"];let f=n.split("").map(Number);for(let d=0;d<f.length;d++)f[d]!==0&&(d===f.length-1&&f[d]===1&&f.length>1&&f.length<7?i+="เอ็ด":d===f.length-2&&f[d]===2?i+="ยี่":d===f.length-2&&f[d]===1?i+="":i+=l[f[d]],i+=c[f.length-d-1]);return i};if(s.length>6){let n=s.substring(0,s.length-6),i=s.substring(s.length-6);o+=e(n)+"ล้าน",o+=e(i)}else o+=e(s);return s!=="0"&&(o+="บาท"),t==="00"&&s!=="0"?o+="ถ้วน":t!=="00"&&(o+=e(t)+"สตางค์"),o?`(${o})`:""}const F=r=>r===null||typeof r>
8"u"||isNaN(r)?"-":Number(r)===0?"0.00":Number(r).toLocaleString("th-TH",{minimumFractionDigits:2,maximumFractionDigits:2}),Z=(r="")=>String(r).replace(/[’'()]/g,"").replace(/_/g," ").replace(/\s+/g,"").replace(/\.+/g,"").trim().toLowerCase(),yn=[["ภาษีหัก ณ ที่จ่าย","ภาษีหัก ณ ที่จ่าย","ภาษี"],["ชพค.","ชพค.","ชพค"],["ชพส.","ชพส.","ชพส"],["สหกรณ์ออมทรัพย์ครูนครสวรรค์","สหกรณ์ออมทรัพย์ครูนครสวรรค์"],["สหกรณ์ออมทรัพย์สามัญ","สหกรณ์ออมทรัพย์สามัญ","สหกรณ์สามัญ"],["สหกรณ์ออมทรัพย์ครูลาดยาว","สหกรณ์ออมทรัพย์ครูลาดยาว"],["บำเหน็จค้ำประกันฯ","บำเหน็จค้ำประกันฯ","บำเหน็จค้ำประกัน"],["ธนาคารออมสิน(ชพค.)","ธนาคารออมสิน(ชพค.)","ธนาคารออมสิน ชพค","ธนาคารออมสิน"],["ประกันชีวิตบริษัท AIA นครสวรรค์","ประกันชีวิตบริษัท AIA นครสวรรค์","ประกันชีวิตบริษัทAIAนครสวรรค์","ประกันชีวิตAIAนครสวรรค์","AIA นครสวรรค์","AIA"],["ไทยสมุทร","ไทยสมุทร"],["คืนคลัง/พสธ/บังคับคดี/อื่นๆ ของครู","คืนคลัง","พสธ","บังคับคดี","อื่นๆ ของครู","อื่นๆ"]],At=[["ภาษี","ภาษี"],["กบข","กบข"],["กสจ","กสจ"],["กยศ.","กยศ.","กยศ"],["กบข.ตกเบิก","กบข.ตกเบิก","กบข ตกเบิก"],["กสจ. ตกเบิก","กสจ. ตกเบิก","กสจ ตกเบิก"],["กบข ส่วนเพิ่มเติม","กบข ส่วนเพิ่มเติม"],["กบข.สะสมส่วนเพิ่ม (ตกเบิก)","กบข.สะสมส่วนเพิ่ม (ตกเบิก)","กบข.สะสมส่วนเพิ่ม","กบข สะสมส่วนเพิ่ม ตกเบิก"],["ชพค","ชพค","ชพค."],["ชพค. เก็บเพิ่ม","ชพค. เก็บเพิ่ม","ชพค เก็บเพิ่ม"],["ชพส","ชพส","ชพส."],["ชพส. เก็บเพิ่ม","ชพส. เก็บเพิ่ม","ชพส เก็บเพิ่ม"],["สหกรณ์ออมทรัพย์ครูนครสวรรค์ จำกัด","สหกรณ์ออมทรัพย์ครูนครสวรรค์ จำกัด","สหกรณ์ออมทรัพย์ครูนครสวรรค์"],["สหกรณ์สามัญศึกษานครสวรรค์ จำกัด","สหกรณ์สามัญศึกษานครสวรรค์ จำกัด","สหกรณ์ออมทรัพย์สามัญ","สหกรณ์สามัญ"],["สหกรณ์ออมทรัพย์ครูลาดยาว จำกัด","สหกรณ์ออมทรัพย์ครูลาดยาว จำกัด","สหกรณ์ออมทรัพย์ครูลาดยาว"],["สหกรณ์ออมทรัพยครูจังหวัดอื่น","สหกรณ์ออมทรัพยครูจังหวัดอื่น"],["หนี้สินครู ธกส.","หนี้สินครู ธกส.","ธกส"],["ธ.อาคารสงเคราะห์","ธ.อาคารสงเคราะห์","อาคารสงเคราะห์"],["เงินกู้อเนกประสงค์","เงินกู้อเนกประสงค์"],["ธนาคารออมสิน","ธนาคารออมสิน"],["ประกันชีวิตAIA นครสวรรค์","ประกันชีวิตAIA นครสวรรค์","ประกันชีวิตAIAนครสวรรค์","ประกันชีวิตAIA","AIA"],["ประกันชีวิตไทยสมุทร","ประกันชีวิตไทยสมุทร","ไทยสมุทร"],["เบิกเกินส่งคืน","เบิกเกินส่งคืน"],["สวัสดิการสหกรณ์ฯ สพท.นว1","สวัสดิการสหกรณ์ฯ สพท.นว1","สวัสดิการสหกรณ์ สพท นว1","สวัสดิการสหกรณ์"],["สำนักงานบังคับคดี","สำนักงานบังคับคดี","บังคับคดี"]],wn=r=>r==="pensioner"?yn:At,Nn=(r,o,s=null)=>{const t=g=>String(g).replace(/[’']/g,"").trim(),e=new Map(r.map(g=>[t(g.name),g.value])),n=new Map(o.map(g=>[t(g.name),g.value])),i=new Set([...e.keys(),...n.keys()]),l=s||At,c=new Map;l.forEach(g=>{const[y,...T]=g;T.forEach(m=>{c.set(Z(m),y)})});const f=g=>{const y=Z(g),T=c.get(y);if(T)return T;for(let m=0;m<l.length;m+=1){const[I,...E]=l[m];if(E.some(R=>{const _=Z(R);return y.includes(_)||_.includes(y)}))return I}return g},d=g=>{const y=Z(g);for(let T=0;T<l.length;T+=1){const[,...m]=l[T];if(m.some(I=>y===Z(I)))return T}for(let T=0;T<l.length;T+=1){const[,...m]=l[T];if(m.some(I=>{const E=Z(I);return y.includes(E)||E.includes(y)}))return T}return-1},w=Array.from(i).sort((g,y)=>{const T=d(g),m=d(y);return T!==-1&&m!==-1?T-m:T!==-1?-1:m!==-1?1:g.localeCompare(y,"th")}),x=[],u=new Map;
8return w.forEach(g=>{const y=f(g),T=u.get(y);if(T===void 0){u.set(y,x.length),x.push({name:y,left:e.get(g)||0,right:n.get(g)||0});return}x[T].left+=e.get(g)||0,x[T].right+=n.get(g)||0}),x},h={navy:"#1f2937",navy2:"#374151",rowEven:"#f9fafb",netBg:"#f9fafb",border:"#c3cad5",borderLt:"#e2e8f0",muted:"#6b7280"},ue=()=>a.jsxs(a.Fragment,{children:[a.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 -z-30 bg-cover bg-center scale-110 blur-[8px] opacity-38 print:hidden",style:{backgroundImage:`url(${qt})`}}),a.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 -z-20 bg-white/82 backdrop-saturate-75 print:hidden"}),a.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 -z-10 bg-[linear-gradient(180deg,rgba(248,250,252,0.96)_0%,rgba(248,250,252,0.88)_42%,rgba(226,232,240,0.84)_100%)] print:hidden"})]}),vn={back:{button:{background:"#ffffff",border:"1.5px solid #d6dbe3",color:"#1f2937"},badge:{background:"#f1f5f9",color:"#334155"}},password:{button:{background:"#ffffff",border:"1.5px solid #c7d2fe",color:"#3730a3"},badge:{background:"#eef2ff",color:"#4f46e5"}},print:{button:{background:"#ffffff",border:"1.5px solid #fdba74",color:"#9a3412"},badge:{background:"#ffedd5",color:"#ea580c"}},download:{button:{background:"linear-gradient(135deg,#f97316 0%,#ea580c 100%)",border:"1.5px solid #ea580c",color:"#ffffff",boxShadow:"0 6px 16px -6px rgba(234,88,12,0.55)"},badge:{background:"rgba(255,255,255,0.22)",color:"#ffffff"}}},fe=({icon:r,label:o,onClick:s,variant:t="back"})=>{const e=vn[t];return a.jsxs("button",{type:"button",onClick:s,className:"group flex w-full flex-col sm:flex-row items-center justify-center gap-1.5 sm:gap-2.5 rounded-2xl px-3 py-3 sm:py-0 sm:h-12 text-[13px] sm:text-sm font-bold transition-all duration-200 hover:-translate-y-0.5 active:translate-y-0 active:scale-[0.98]",style:e.button,children:[a.jsx("span",{className:"flex h-9 w-9 sm:h-7 sm:w-7 flex-shrink-0 items-center justify-center rounded-xl sm:rounded-lg transition-transform duration-200 group-hover:scale-105",style:e.badge,children:a.jsx(r,{size:17,strokeWidth:2.4})}),a.jsx("span",{className:"truncate leading-tight",children:o})]})},Tn=()=>{const r=Lt(),o=Mt(),[s]=kt(),t=s.get("token"),[e,n]=z.useState(null),[i,l]=z.useState(!!t),[c,f]=z.useState(""),d=r.state?.slipData||e,w=r.state?.type||e?.slipType||"teacher",x=r.state?.password,[u,g]=z.useState(null),y=z.useRef(null),[T,m]=z.useState(!0),[I,E]=z.useState(""),[R,_]=z.useState(!1),p=d?.idCard||"";if(z.useEffect(()=>{if(!t)return;let S=!1;return(async()=>{try{const{data:L}=await ce.get("/slips/view",{params:{token:t}});S||n(L)}catch(L){S||f(L.response?.data?.message||"ลิงก์หมดอายุหรือไม่ถูกต้อง กรุณากลับไปเลือกงวดใหม่อีกครั้ง")}finally{S||l(!1)}})(),()=>{S=!0}},[t]),z.useEffect(()=>{Dt(),_t()},[]),z.useEffect(()=>{const S=setTimeout(()=>m(!1),300);return()=>clearTimeout(S)},[]),z.useEffect(()=>{if(!d)return;let S=!1;return(async()=>{const D=[],k=[],U=[],H=[];let W="";Object.entries(d).forEach(([M,q])=>{const ae=Number(q),be=le=>{let ne=M.replace(le,"").replace(/['']/g,"").replace(/_/g," ").trim();return ne=ne.replace(/ช[\.\s]*ค[\.\s]*บ\.?/g,"ช.ค.บ."),ne=ne.replace(/ช[\.\s]*ร[\.\s]*บ\.?/g,"ช.ร.บ."),ne};if((M.includes("เลขบัญชี")||M.includes("ธนาคาร"))&&q&&typeof q=="string"&&q.trim().length>5&&(W=q.trim()),M.includes("วันที่")||M.includes("Date")){if(q&&typeof q=="string"&&q.includes("/"))H.push({label:M.replace(/_/g," "),value:q});else if(M.includes("โอนเงินเข้าบัญชี")&&M.includes("วันที่")){const le=M.replace("รวม_","").replace(/_/g," ").replace("โอนเงินเข้าบัญชี","").trim();le&&H.push({label:"จ่ายเมื่อ",value:le})}}ae<=0||M.includes("เงินโอนเข้าบัญชี")||M.includes("โอนเงินเข้าบัญชี")||M.includes("เลขบัญชี")||(M.startsWith("รายรับ_")?D.push({name:be("รายรับ_"),value:ae}):M.startsWith("รายจ่ายเรียกเก็บ_")?k.push({name:be("รายจ่ายเรียกเก็บ_"),value:ae}):M.startsWith("รายจ่ายหักเก็บได้_")&&U.push({name:be("รายจ่ายหักเก็บได้_"),value:ae}))});const Tt=wn(w),he=Nn(k,U,Tt),Ve=D.reduce((M,q)=>M+q.value,0),Je=he.reduce((M,q)=>M+q.right,0),It=he.reduce((M,q)=>M+q.left,0),Ye=Ve-Je,Pt=Object.keys(d).filter(M=>(M.includes("เงินโอนเข้าบัญชี")||M.includes("โอนเงินเข้าบัญชี"))&&!M.startsWith("รายรับ_")&&!M.startsWith("รายจ่าย_")).map(M=>({label:M.replace("รวม_","").replace(/_/g," ").trim(),value:Number(d[M])})).filter(M=>M.value>0),ge=[...H];if(d.paymentDateInfo){const M=d.paymentDateInfo.replace("โอนเงินเข้าบัญชี","").replace("วันที่","").replace(/_/g," ").trim();M&&!ge.some(q=>q.value.includes(M))&&ge.push({label:"โอนเงินเข้าบัญชี วันที่",value:M})}const me=d.verificationToken||"",pe=me?`${window.location.origin}/verify-slip?token=${encodeURIComponent(me)}`:"";let Ge="";if(pe)try{Ge=await bn.toDataURL(pe,{width:220,margin:1,errorCorrectionLevel:"M"})}catch(M){console.error("QR generation failed:",M)}S||g({fullName:d.fullName||d["ชื่อ นามสกุล"]||"ไม่พบข้อมูล",month:d.month,year:d.year,department:d.department||d.หน่วยงาน||"",incomeItems:D,expenseMerged:he,totalIncome:Ve,totalBilled:It,totalDeducted:Je,net:Ye,netText:xn(Ye),transfers:Pt,bankAccount:W||d.รวม_เลขบัญชีธนาคาร||d.เลขบัญชีธนาคาร,paymentDates:ge,verificationToken:me,verificationUrl:pe,qrCodeDataUrl:Ge})})(),()=>{S=!0}},[d,w]),z.useEffect(()=>{if(!u)return;const S={data:u,at:Date.now(),promise:null};S.promise=ce.post("/slips/generate-pdf",{slipData:u,type:w},{responseType:"blob"}).then(L=>L.data).catch(()=>null),y.current=S},[u,w]),!d&&i)return a.jsx(xe,{tone:"slip",children:a.jsxs("div",{className:"relative isolate overflow-hidden flex flex-col items-center justify-center min-h-screen bg-slate-100 font-sukhumvit",children:[a.jsx(ue,{}),a.jsx(ye,{active:!0,message:"กำลังโหลดสลิปเงินเดือน..."}),a.jsx(we,{})]})});if(!d)return a.jsx(xe,{tone:"slip",children:a.jsxs("div",{className:"relative isolate overflow-hidden flex flex-col items-center justify-center min-h-screen bg-slate-100 font-sukhumvit",children:[a.jsx(ue,{}),a.jsx("div",{className:"flex-grow flex flex-col items-center justify-center px-4",children:a.jsxs("div",{className:"bg-white/98 roun
8ded-xl shadow-2xl p-10 flex flex-col items-center gap-4 max-w-sm w-full border-[3px] border-slate-300 ring-1 ring-slate-400/30",style:{borderColor:h.border},children:[a.jsx(zt,{size:52,color:"#ef4444"}),a.jsx("h2",{className:"text-xl font-bold text-slate-800",children:c||"ไม่พบข้อมูลสลิปที่ถูกต้อง"}),a.jsxs("button",{onClick:()=>o("/"),className:"flex items-center gap-2 px-6 py-2.5 rounded-lg text-white font-bold text-sm transition-all hover:opacity-90",style:{background:`linear-gradient(90deg,${h.navy},${h.navy2})`},children:[a.jsx(Qe,{size:15})," กลับหน้าค้นหา"]})]})}),a.jsx(we,{})]})});if(!u)return a.jsxs("div",{className:"relative isolate overflow-hidden min-h-screen flex items-center justify-center bg-slate-100 font-sukhumvit",children:[a.jsx(ue,{}),a.jsx(ye,{active:!0,message:I||"กำลังเตรียมข้อมูลสลิป..."})]});const{incomeItems:j,expenseMerged:N,totalIncome:b,totalBilled:A,totalDeducted:v,net:B,netText:C,transfers:P}=u,O=()=>`Slip_${u.fullName?.replace(/\s+/g,"_")||"User"}_${u.month||"M"}_${u.year||"Y"}.pdf`,J=120*1e3,oe=async S=>{const L=y.current;let D=null;return L&&L.data===u&&Date.now()-L.at<J&&(D=await L.promise),D||(E("กำลังสร้างไฟล์ PDF จากเซิร์ฟเวอร์..."),D=(await ce.post("/slips/generate-pdf",{slipData:u,type:w},{responseType:"blob"})).data),p&&ce.post("/slips/pdf-log",{idCard:p,type:w,month:u.month,year:u.year,action:S}).catch(()=>{}),D},$=S=>{const L=window.URL.createObjectURL(S);return setTimeout(()=>window.URL.revokeObjectURL(L),6e4),L},se=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,ee=async()=>{m(!0);const S=se()?window.open("","_blank"):null;try{const L=await oe("print"),D=$(L);if(se()){S?S.location.href=D:window.open(D,"_blank");return}let k=document.getElementById("slip-print-frame");k||(k=document.createElement("iframe"),k.id="slip-print-frame",Object.assign(k.style,{position:"absolute",width:"0",height:"0",border:"0",visibility:"hidden"}),document.body.appendChild(k));const U=()=>{try{k.contentWindow?.focus(),k.contentWindow?.print()}catch{}};k.onload=()=>setTimeout(U,300),k.src=D,setTimeout(U,1500)}catch{S&&S.close(),alert("ไม่สามารถสร้างไฟล์ PDF สำหรับพิมพ์ได้ กรุณาลองใหม่อีกครั้ง")}finally{m(!1),E("")}},Q=async()=>{m(!0);try{const S=await oe("download"),L=$(S),D=document.createElement("a");D.href=L,D.download=O(),document.body.appendChild(D),D.click(),D.remove()}catch{alert("ไม่สามารถดาวน์โหลดไฟล์ PDF ได้ กรุณาลองใหม่อีกครั้ง")}finally{m(!1),E("")}},ie=()=>_(!1),te=Math.max(j.length,N.length);return a.jsx(xe,{tone:"slip",children:a.jsxs("div",{className:"relative isolate overflow-hidden min-h-screen flex flex-col pt-8 px-4 pb-4 bg-slate-100 font-sukhumvit print:bg-white print:p-0",style:{fontFamily:"'SukhumvitSet','Sarabun',sans-serif"},children:[a.jsx(ue,{}),a.jsx(ye,{active:T,message:I}),a.jsx("div",{className:"max-w-[210mm] mx-auto mb-5 print:hidden",children:a.jsx("div",{className:"rounded-3xl border border-slate-200/80 bg-white/90 p-2.5 sm:p-3 backdrop-blur-md",style:{boxShadow:"0 12px 32px -12px rgba(15,23,42,0.18)"},children:a.jsxs("div",{className:`grid gap-2.5 sm:gap-3 ${p?"grid-cols-2 sm:grid-cols-4":"grid-cols-3"}`,children:[a.jsx(fe,{icon:Qe,label:"กลับหน้าเมนู",variant:"back",onClick:()=>o("/account",{state:{slipData:d,type:w,idCard:p,password:x,initialPanel:"slip",loginInfo:r.state?.loginInfo}})}),p&&a.jsx(fe,{icon:Ot,label:"เปลี่ยนรหัสผ่าน",variant:"password",onClick:()=>_(!0)}),a.jsx(fe,{icon:Vt,label:"พิมพ์",variant:"print",onClick:ee}),a.jsx(fe,{icon:Ht,label:"ดาวน์โหลด PDF",variant:"download",onClick:Q})]})})}),a.jsx("div",{className:"flex-grow",children:a.jsxs("div",{id:"slip-content-export",className:"max-w-[210mm] mx-auto bg-white shadow-2xl relative overflow-hidden mb-8 print:shadow-none print:w-full print:max-w-none print:m-0 print:p-0",style:{border:`1.5px solid ${h.border}`,borderRadius:"10px"},children:[a.jsx("div",{style:{height:"7px",background:"linear-gradient(90deg,#e5e7eb 0%,#f3f4f6 60%,#f9fafb 100%)"}}),a.jsx("div",{style:{height:"2.5px",background:"#e5e7eb"}}),a.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 flex items-center justify-center pointer-events-none select-none",style:{zIndex:50},children:a.jsx("div",{style:{fontSize:"120px",fontWeight:900,letterSpacing:"0.05em",color:"#64748b",opacity:.15,transform:"rotate(-35deg)",whiteSpace:"nowrap",textTransform:"uppercase"},children:"สพป. นว. 1"})}),a.jsxs("div",{className:"relative p-5 md:p-8",style:{zIndex:1},children:[a.jsxs("header",{className:"mb-4 text-center",style:{minHeight:"132px",boxSizing:"border-box"},children:[u.qrCodeDataUrl&&a.jsxs("div",{className:"absolute bg-white",style:{to
8p:"0.5cm",right:"1cm",border:`1px solid ${h.borderLt}`,zIndex:20,width:"2cm",textAlign:"center",borderRadius:"4px",padding:"4px"},title:"QR สำหรับตรวจสอบเอกสาร",children:[a.jsx("img",{src:u.qrCodeDataUrl,alt:"Verification QR",style:{width:"1.8cm",height:"1.8cm",minWidth:"1.5cm",minHeight:"1.5cm",display:"block"}}),a.jsx("div",{className:"text-[9px] text-center font-semibold",style:{color:h.navy2,marginTop:"2px",lineHeight:1.1},children:"ตรวจสอบความถูกต้อง"})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row justify-center items-center gap-3 mb-3",style:{paddingRight:"calc(88px + 1cm)"},children:[a.jsx("img",{src:Ut,alt:"Logo",className:"h-14 w-auto object-contain flex-shrink-0"}),a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"font-extrabold text-xl md:text-2xl leading-tight",style:{color:h.navy},children:"ใบรับเงินเดือน / ค่าจ้างประจำ"}),a.jsx("p",{className:"font-semibold text-sm md:text-base leading-snug mt-0.5",style:{color:h.navy2},children:"สำนักงานเขตพื้นที่การศึกษาประถมศึกษานครสวรรค์ เขต 1"}),a.jsxs("div",{className:"inline-flex items-center gap-1.5 mt-1.5 px-3 py-0.5 rounded-full text-xs font-medium",style:{background:"#eef2fa",color:h.navy,border:`1px solid ${h.borderLt}`},children:[a.jsx(Kt,{size:11}),"ประจำเดือน ",u.month," ",u.year]})]})]}),a.jsx("div",{style:{height:"1px",background:"#e5e7eb",margin:"10px 0 12px"}}),a.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-1 text-left rounded-lg px-3 py-2.5",style:{background:"#f9fafb",borderLeft:`4px solid ${h.border}`},children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Jt,{size:15,color:h.navy,className:"flex-shrink-0"}),a.jsx("span",{className:"font-bold text-base",style:{color:h.navy},children:u.fullName})]}),u.department&&a.jsxs("div",{className:"flex items-center gap-1.5 text-xs",style:{color:h.muted},children:[a.jsx(Yt,{size:12}),u.department]})]})]}),a.jsx("div",{className:"mb-4 hidden md:block print:block overflow-hidden",style:{border:`1.5px solid ${h.border}`,borderRadius:"6px"},children:a.jsxs("table",{className:"w-full border-collapse text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{style:{background:"#f8fafc"},children:[a.jsx("th",{className:"py-2.5 px-3 text-left font-bold w-[30%]",style:{color:h.navy},children:"รายการรับ"}),a.jsx("th",{className:"py-2.5 px-3 text-right font-bold w-[14%]",style:{color:h.navy},children:"จำนวนเงิน"}),a.jsx("th",{className:"py-2.5 px-3 text-left font-bold w-[26%] pl-4",style:{color:h.navy,borderLeft:`2px solid ${h.border}`},children:"รายการจ่าย"}),a.jsx("th",{className:"py-2.5 px-3 text-right font-bold w-[14%]",style:{color:h.navy,borderLeft:`1px solid ${h.borderLt}`},children:"เรียกเก็บ"}),a.jsx("th",{className:"py-2.5 px-3 text-right font-bold w-[16%]",style:{color:h.navy,borderLeft:`1px solid ${h.borderLt}`},children:"หักเก็บได้"})]})}),a.jsx("tbody",{children:Array.from({length:te}).map((S,L)=>{const D=j[L],k=N[L],U=L%2===1;return a.jsxs("tr",{style:{background:U?h.rowEven:"#fff"},children:[a.jsx("td",{className:"py-1.5 px-3 break-words",children:D?.name||""}),a.jsx("td",{className:"py-1.5 px-3 text-right font-mono tabular-nums",style:{borderRight:`2px solid ${h.border}`},children:D?F(D.value):""}),a.jsx("td",{className:"py-1.5 px-3 pl-4 break-words",style:{borderRight:`1px solid ${h.borderLt}`},children:k?.name||""}),a.jsx("td",{className:"py-1.5 px-3 text-right font-mono tabular-nums",style:{borderRight:`1px solid ${h.borderLt}`},children:k?F(k.left):""}),a.jsx("td",{className:"py-1.5 px-3 text-right font-mono tabular-nums",children:k?F(k.right):""})]},L)})}),a.jsx("tfoot",{children:a.jsxs("tr",{style:{background:"#f3f4f6",borderTop:`2px solid ${h.border}`},children:[a.jsx("td",{className:"py-2.5 px-3 font-bold",style:{color:h.navy},children:"รวมรายรับ"}),a.jsx("td",{className:"py-2.5 px-3 text-right font-bold font-mono tabular-nums text-sm",style:{borderRight:`2px solid ${h.border}`,color:h.navy},children:F(b)}),a.jsx("td",{className:"py-2.5 px-3 pl-4 font-bold",style:{borderRight:`1px solid ${h.borderLt}`,color:h.navy},children:"รวมรายจ่าย"}),a.jsx("td",{className:"py-2.5 px-3 text-right font-bold font-mono tabular-nums text-sm",style:{borderRight:`1px solid ${h.borderLt}`,color:h.navy},children:F(A)}),a.jsx("td",{className:"py-2.5 px-3 text-right font-bold font-mono tabular-nums text-sm",style:{color:h.navy},children:F(v)})]})})]})}),a.jsxs("div",{className:"mb-4 block md:hidden print:hidden overflow-hidden",style:{border:`1.5px solid ${h.border}`,borderRadius:"6px"},children:[a.jsxs("table",{className:"w-full text-xs border-collapse",children:[a.jsx("thead",{children:a.jsxs("tr",{style:{background:"#f8fafc"},children:[a.jsx("th",{className:"py-2 px-3 text-left font-bold",style:{color:h.navy},children:"รายการรับ"}),a.jsx("th",{className:"py-2 px-3 text-right font-bold",style:{color:h.navy}
8,children:"จำนวนเงิน"})]})}),a.jsx("tbody",{children:j.map((S,L)=>a.jsxs("tr",{style:{background:L%2?h.rowEven:"#fff"},children:[a.jsx("td",{className:"py-1.5 px-3 break-words",children:S.name}),a.jsx("td",{className:"py-1.5 px-3 text-right font-mono tabular-nums",children:F(S.value)})]},L))}),a.jsx("tfoot",{children:a.jsxs("tr",{style:{background:"#f3f4f6",borderTop:`2px solid ${h.border}`},children:[a.jsx("td",{className:"py-2 px-3 font-bold",style:{color:h.navy},children:"รวมรายรับ"}),a.jsx("td",{className:"py-2 px-3 text-right font-bold font-mono",style:{color:h.navy},children:F(b)})]})})]}),a.jsxs("table",{className:"w-full text-xs border-collapse",style:{borderTop:`2px solid ${h.border}`},children:[a.jsx("thead",{children:a.jsxs("tr",{style:{background:"#f8fafc"},children:[a.jsx("th",{className:"py-2 px-3 text-left font-bold",style:{color:h.navy,borderLeft:`2px solid ${h.border}`},children:"รายการจ่าย"}),a.jsx("th",{className:"py-2 px-3 text-right font-bold",style:{color:h.navy,borderLeft:`1px solid ${h.borderLt}`},children:"เรียกเก็บ"}),a.jsx("th",{className:"py-2 px-3 text-right font-bold",style:{color:h.navy,borderLeft:`1px solid ${h.borderLt}`},children:"หักเก็บได้"})]})}),a.jsx("tbody",{children:N.map((S,L)=>a.jsxs("tr",{style:{background:L%2?h.rowEven:"#fff"},children:[a.jsx("td",{className:"py-1.5 px-3 break-words",style:{borderRight:`1px solid ${h.borderLt}`},children:S.name}),a.jsx("td",{className:"py-1.5 px-3 text-right font-mono tabular-nums",style:{borderRight:`1px solid ${h.borderLt}`},children:F(S.left)}),a.jsx("td",{className:"py-1.5 px-3 text-right font-mono tabular-nums",children:F(S.right)})]},L))}),a.jsx("tfoot",{children:a.jsxs("tr",{style:{background:"#f5f5f5",borderTop:`2px solid ${h.border}`},children:[a.jsx("td",{className:"py-2 px-3 font-bold",style:{borderRight:`1px solid ${h.borderLt}`,color:h.navy},children:"รวมรายจ่าย"}),a.jsx("td",{className:"py-2 px-3 text-right font-bold font-mono",style:{borderRight:`1px solid ${h.borderLt}`,color:h.navy},children:F(A)}),a.jsx("td",{className:"py-2 px-3 text-right font-bold font-mono",style:{color:h.navy},children:F(v)})]})})]})]}),a.jsxs("div",{className:"overflow-hidden",style:{border:`1.5px solid ${h.border}`,borderRadius:"8px"},children:[a.jsxs("div",{className:"flex justify-between items-center px-4 py-2.5",style:{background:"#f8fafc",borderBottom:`1px solid ${h.borderLt}`},children:[a.jsx("span",{className:"font-bold text-sm",style:{color:h.navy},children:"คงเหลือสุทธิ"}),a.jsxs("span",{className:"font-black text-xl md:text-2xl tabular-nums",style:{color:h.navy},children:[F(B)," ",a.jsx("span",{className:"text-base font-bold",children:"บาท"})]})]}),a.jsxs("div",{className:"px-4 py-3",style:{background:h.netBg},children:[C&&a.jsx("p",{className:"text-center text-sm font-semibold mb-3 pb-2",style:{color:h.navy2,borderBottom:`1px dashed ${h.borderLt}`},children:C}),P.length>0&&a.jsx("div",{className:"space-y-1.5 mb-2",children:P.map((S,L)=>a.jsxs("div",{className:"flex justify-between items-center text-xs",children:[a.jsx("span",{className:"text-slate-600",children:S.label}),a.jsx("span",{className:"font-bold text-slate-800 font-mono tabular-nums",children:F(S.value)})]},L))}),(u.bankAccount||u.paymentDates?.length>0)&&a.jsxs("div",{className:"pt-2 mt-1 flex flex-col gap-1.5 text-[11px]",style:{borderTop:`1px solid ${h.borderLt}`},children:[u.bankAccount&&w!=="teacher"&&a.jsxs("div",{className:"flex justify-between",style:{color:h.muted},children:[a.jsx("span",{children:"เลขที่บัญชี:"}),a.jsx("span",{className:"font-medium",children:u.bankAccount})]}),u.paymentDates?.map((S,L)=>a.jsxs("div",{className:"flex justify-between",style:{color:h.muted},children:[a.jsxs("span",{children:[S.label,":"]}),a.jsx("span",{className:"font-bold",children:S.value})]},L))]})]})]})]}),a.jsx("div",{className:"px-5 py-2 text-[10px] flex justify-end print:flex hidden",style:{borderTop:`1px solid ${h.borderLt}`,color:h.muted},children:"พิมพ์โดยระบบสลิปออนไลน์ สพป.นครสวรรค์ เขต 1"})]})}),a.jsx(we,{}),R&&a.jsx(Ft,{idCard:p,onClose:ie})]})})};export{Tn as default};

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.