2024-07-30 23:42:57 +00:00
import { s as Ce , ac as _e , N as Ee , _ as Se } from "./index.00fa277a.js" ; /* empty css */ /* empty css */ /* empty css */ /* empty css */ /* empty css */ /* empty css */ /* empty css */ /* empty css */ /* empty css */ /* empty css */ import { d as Be , f as wt , r as Ae , o as Ie , aY as Te , bZ as Pe , bV as Ne , b3 as Fe , bP as Me , bI as De , C as x , D as q , aI as C , aH as S , aM as L , aN as v , G , u as Re , a$ as Zt , b0 as Wt , aK as nt , aJ as ot , aE as rt , n as Xt , bc as Le , bk as Ue , bY as ve , b8 as ke , bi as Ve , b _ as $e , bG as xe , bJ as Oe , bL as He , bm as ze , bn as Je } from "./arco.c29bba08.js" ; import { e as yt , g as te , h as I , b as F , s as Ye } from "./serial.c6b76da8.js" ; import { u as Ke } from "./loading.d503f2cd.js" ; import "./chart.34708d29.js" ; import "./vue.437ba699.js" ; var W = { } , je = function ( ) { return typeof Promise == "function" && Promise . prototype && Promise . prototype . then } , re = { } , k = { } ; let Pt ; const qe = [ 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 ] ; k . getSymbolSize = function ( n ) { if ( ! n ) throw new Error ( '"version" cannot be null or undefined' ) ; if ( n < 1 || n > 40 ) throw new Error ( '"version" should be in range from 1 to 40' ) ; return n * 4 + 17 } ; k . getSymbolTotalCodewords = function ( n ) { return qe [ n ] } ; k . getBCHDigit = function ( o ) { let n = 0 ; for ( ; o !== 0 ; ) n ++ , o >>>= 1 ; return n } ; k . setToSJISFunction = function ( n ) { if ( typeof n != "function" ) throw new Error ( '"toSJISFunc" is not a valid function.' ) ; Pt = n } ; k . isKanjiModeEnabled = function ( ) { return typeof Pt < "u" } ; k . toSJIS = function ( n ) { return Pt ( n ) } ; var ut = { } ; ( function ( o ) { o . L = { bit : 1 } , o . M = { bit : 0 } , o . Q = { bit : 3 } , o . H = { bit : 2 } ; function n ( i ) { if ( typeof i != "string" ) throw new Error ( "Param is not a string" ) ; switch ( i . toLowerCase ( ) ) { case "l" : case "low" : return o . L ; case "m" : case "medium" : return o . M ; case "q" : case "quartile" : return o . Q ; case "h" : case "high" : return o . H ; default : throw new Error ( "Unknown EC Level: " + i ) } } o . isValid = function ( e ) { return e && typeof e . bit < "u" && e . bit >= 0 && e . bit < 4 } , o . from = function ( e , a ) { if ( o . isValid ( e ) ) return e ; try { return n ( e ) } catch { return a } } } ) ( ut ) ; function ae ( ) { this . buffer = [ ] , this . length = 0 } ae . prototype = { get : function ( o ) { const n = Math . floor ( o / 8 ) ; return ( this . buffer [ n ] >>> 7 - o % 8 & 1 ) === 1 } , put : function ( o , n ) { for ( let i = 0 ; i < n ; i ++ ) this . putBit ( ( o >>> n - i - 1 & 1 ) === 1 ) } , getLengthInBits : function ( ) { return this . length } , putBit : function ( o ) { const n = Math . floor ( this . length / 8 ) ; this . buffer . length <= n && this . buffer . push ( 0 ) , o && ( this . buffer [ n ] |= 128 >>> this . length % 8 ) , this . length ++ } } ; var Ge = ae ; function X ( 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 ) } X . prototype . set = function ( o , n , i , e ) { const a = o * this . size + n ; this . data [ a ] = i , e && ( this . reservedBit [ a ] = ! 0 ) } ; X . prototype . get = function ( o , n ) { return this . data [ o * this . size + n ] } ; X . prototype . xor = function ( o , n , i ) { this . data [ o * this . size + n ] ^= i } ; X . prototype . isReserved = function ( o , n ) { return this . reservedBit [ o * this . size + n ] } ; var Qe = X , ie = { } ; ( function ( o ) { const n = k . getSymbolSize ; o . getRowColCoords = function ( e ) { if ( e === 1 ) return [ ] ; const a = Math . floor ( e / 7 ) + 2 , r = n ( e ) , s = r === 145 ? 26 : Math . ceil ( ( r - 13 ) / ( 2 * a - 2 ) ) * 2 , t = [ r - 7 ] ; for ( let l = 1 ; l < a - 1 ; l ++ ) t [ l ] = t [ l - 1 ] - s ; return t . push ( 6 ) , t . reverse ( ) } , o . getPositions = function ( e ) { const a = [ ] , r = o . getRowColCoords ( e ) , s = r . length ; for ( let t = 0 ; t < s ; t ++ ) for ( let l = 0 ; l < s ; l ++ ) t === 0 && l === 0 || t === 0 && l === s - 1 || t === s - 1 && l === 0 || a . push ( [ r [ t ] , r [ l ] ] ) ; return a } } ) ( ie ) ; var se = { } ; const Ze = k . getSymbolSize , ee = 7 ; se . getPositions = function ( n ) { const i = Ze ( n ) ; return [ [ 0 , 0 ] , [ i - ee , 0 ] , [ 0 , i - ee ] ] } ; var le = { } ; ( function ( o ) { o . Patterns = { PATTERN000 : 0 , PATTERN001 : 1 , PATTERN010 : 2 , PATTERN011 : 3 , PATTERN100 : 4 , PATTERN101 : 5 , PATTERN110 : 6 , PATTERN111 : 7 } ; const n = { N1 : 3 , N2 : 3 , N3 : 40 , N4 : 10 } ; o . isValid = function ( a ) { return a != null && a !== "" && ! isNaN ( a ) && a >= 0 && a <= 7 } , o . from = function ( a ) { return o . isValid ( a ) ? parseInt ( a , 10 ) : void 0 } , o . getPenaltyN1 = function ( a ) { const r = a . size ; let s = 0 , t = 0 , l = 0 , g = null , h = null ; for ( let A = 0 ; A < r ; A ++ ) { t = l = 0 , g = h = null ; for ( let y = 0 ; y < r ; y ++ ) { let m = a . get ( A , y ) ; m === g ? t ++ : ( t >= 5 && ( s += n . N1 + ( t - 5 ) ) , g =
2024-07-28 12:10:16 +00:00
] ) ) + ` ; $ .KANJI=new RegExp(Z,"g"); $ .BYTE_KANJI=new RegExp("[^A-Z0-9 $ %*+ \\ -./:]+","g"); $ .BYTE=new RegExp(tn,"g"); $ .NUMERIC=new RegExp(de,"g"); $ .ALPHANUMERIC=new RegExp(Xe,"g");const en=new RegExp("^"+Z+" $ "),nn=new RegExp("^"+de+" $ "),on=new RegExp("^[A-Z0-9 $ %*+ \\ -./:]+ $ "); $ .testKanji=function(n){return en.test(n)}; $ .testNumeric=function(n){return nn.test(n)}; $ .testAlphanumeric=function(n){return on.test(n)};(function(o){const n=Ft,i= $ ;o.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},o.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},o.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},o.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},o.MIXED={bit:-1},o.getCharCountIndicator=function(r,s){if(!r.ccBits)throw new Error("Invalid mode: "+r);if(!n.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?r.ccBits[0]:s<27?r.ccBits[1]:r.ccBits[2]},o.getBestModeForData=function(r){return i.testNumeric(r)?o.NUMERIC:i.testAlphanumeric(r)?o.ALPHANUMERIC:i.testKanji(r)?o.KANJI:o.BYTE},o.toString=function(r){if(r&&r.id)return r.id;throw new Error("Invalid mode")},o.isValid=function(r){return r&&r.bit&&r.ccBits};function e(a){if(typeof a!="string")throw new Error("Param is not a string");switch(a.toLowerCase()){case"numeric":return o.NUMERIC;case"alphanumeric":return o.ALPHANUMERIC;case"kanji":return o.KANJI;case"byte":return o.BYTE;default:throw new Error("Unknown mode: "+a)}}o.from=function(r,s){if(o.isValid(r))return r;try{return e(r)}catch{return s}}})(H);(function(o){const n=k,i=ct,e=ut,a=H,r=Ft,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,t=n.getBCHDigit(s);function l(y,m,_){for(let E=1;E<=40;E++)if(m<=o.getCapacity(E,_,y))return E}function g(y,m){return a.getCharCountIndicator(y,m)+4}function h(y,m){let _=0;return y.forEach(function(E){const T=g(E.mode,m);_+=T+E.getBitsLength()}),_}function A(y,m){for(let _=1;_<=40;_++)if(h(y,_)<=o.getCapacity(_,m,a.MIXED))return _}o.from=function(m,_){return r.isValid(m)?parseInt(m,10):_},o.getCapacity=function(m,_,E){if(!r.isValid(m))throw new Error("Invalid QR Code version");typeof E>"u"&&(E=a.BYTE);const T=n.getSymbolTotalCodewords(m),b=i.getTotalCodewordsCount(m,_),c=(T-b)*8;if(E===a.MIXED)return c;const u=c-g(E,m);switch(E){case a.NUMERIC:return Math.floor(u/10*3);case a.ALPHANUMERIC:return Math.floor(u/11*2);case a.KANJI:return Math.floor(u/13);case a.BYTE:default:return Math.floor(u/8)}},o.getBestVersionForData=function(m,_){let E;const T=e.from(_,e.M);if(Array.isArray(m)){if(m.length>1)return A(m,T);if(m.length===0)return 1;E=m[0]}else E=m;return l(E.mode,E.getLength(),T)},o.getEncodedBits=function(m){if(!r.isValid(m)||m<7)throw new Error("Invalid QR Code version");let _=m<<12;for(;n.getBCHDigit(_)-t>=0;)_^=s<<n.getBCHDigit(_)-t;return m<<12|_}})(fe);var ge={};const Bt=k,he=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,rn=1<<14|1<<12|1<<10|1<<4|1<<1,ne=Bt.getBCHDigit(he);ge.getEncodedBits=function(n,i){const e=n.bit<<3|i;let a=e<<10;for(;Bt.getBCHDigit(a)-ne>=0;)a^=he<<Bt.getBCHDigit(a)-ne;return(e<<10|a)^rn};var pe={};const an=H;function J(o){this.mode=an.NUMERIC,this.data=o.toString()}J.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)};J.prototype.getLength=function(){return this.data.length};J.prototype.getBitsLength=function(){return J.getBitsLength(this.data.length)};J.prototype.write=function(n){let i,e,a;for(i=0;i+3<=this.data.length;i+=3)e=this.data.substr(i,3),a=parseInt(e,10),n.put(a,10);const r=this.data.length-i;r>0&&(e=this.data.substr(i),a=parseInt(e,10),n.put(a,r*3+1))};var sn=J;const ln=H,bt=["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 Y(o){this.mode=ln.ALPHANUMERIC,this.data=o}Y.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)};Y.prototype.getLength=function(){return this.data.length};Y.prototype.getBitsLength=function(){return Y.getBitsLength(this.data.length)};Y.prototype.write=function(n){let i;for(i=0;i+2<=this.data.length;i+=2){let e=bt.indexOf(this.data[i])*45;e+=bt.indexOf(this.data[i+1]),
Make sure your charset is UTF - 8 ` );i=(i>>>8&255)*192+(i&255),o.put(i,13)}};var mn=j,me={exports:{}};(function(o){var n={single_source_shortest_paths:function(i,e,a){var r={},s={};s[e]=0;var t=n.PriorityQueue.make();t.push(e,0);for(var l,g,h,A,y,m,_,E,T;!t.empty();){l=t.pop(),g=l.value,A=l.cost,y=i[g]||{};for(h in y)y.hasOwnProperty(h)&&(m=y[h],_=A+m,E=s[h],T=typeof s[h]>"u",(T||E>_)&&(s[h]=_,t.push(h,_),r[h]=g))}if(typeof a<"u"&&typeof s[a]>"u"){var b=["Could not find a path from ",e," to ",a,"."].join("");throw new Error(b)}return r},extract_shortest_path_from_predecessor_list:function(i,e){for(var a=[],r=e;r;)a.push(r),i[r],r=i[r];return a.reverse(),a},find_path:function(i,e,a){var r=n.single_source_shortest_paths(i,e,a);return n.extract_shortest_path_from_predecessor_list(r,a)},PriorityQueue:{make:function(i){var e=n.PriorityQueue,a={},r;i=i||{};for(r in e)e.hasOwnProperty(r)&&(a[r]=e[r]);return a.queue=[],a.sorter=i.sorter||e.default_sorter,a},default_sorter:function(i,e){return i.cost-e.cost},push:function(i,e){var a={value:i,cost:e};this.queue.push(a),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};o.exports=n})(me);(function(o){const n=H,i=sn,e=un,a=gn,r=mn,s= $ ,t=k,l=me.exports;function g(b){return unescape(encodeURIComponent(b)).length}function h(b,c,u){const f=[];let d;for(;(d=b.exec(u))!==null;)f.push({data:d[0],index:d.index,mode:c,length:d[0].length});return f}function A(b){const c=h(s.NUMERIC,n.NUMERIC,b),u=h(s.ALPHANUMERIC,n.ALPHANUMERIC,b);let f,d;return t.isKanjiModeEnabled()?(f=h(s.BYTE,n.BYTE,b),d=h(s.KANJI,n.KANJI,b)):(f=h(s.BYTE_KANJI,n.BYTE,b),d=[]),c.concat(u,f,d).sort(function(B,R){return B.index-R.index}).map(function(B){return{data:B.data,mode:B.mode,length:B.length}})}function y(b,c){switch(c){case n.NUMERIC:return i.getBitsLength(b);case n.ALPHANUMERIC:return e.getBitsLength(b);case n.KANJI:return r.getBitsLength(b);case n.BYTE:return a.getBitsLength(b)}}function m(b){return b.reduce(function(c,u){const f=c.length-1>=0?c[c.length-1]:null;return f&&f.mode===u.mode?(c[c.length-1].data+=u.data,c):(c.push(u),c)},[])}function _(b){const c=[];for(let u=0;u<b.length;u++){const f=b[u];switch(f.mode){case n.NUMERIC:c.push([f,{data:f.data,mode:n.ALPHANUMERIC,length:f.length},{data:f.data,mode:n.BYTE,length:f.length}]);break;case n.ALPHANUMERIC:c.push([f,{data:f.data,mode:n.BYTE,length:f.length}]);break;case n.KANJI:c.push([f,{data:f.data,mode:n.BYTE,length:g(f.data)}]);break;case n.BYTE:c.push([{data:f.data,mode:n.BYTE,length:g(f.data)}])}}return c}function E(b,c){const u={},f={start:{}};let d=["start"];for(let p=0;p<b.length;p++){const B=b[p],R=[];for(let M=0;M<B.length;M++){const D=B[M],P=""+p+M;R.push(P),u[P]={node:D,lastCount:0},f[P]={};for(let V=0;V<d.length;V++){const U=d[V];u[U]&&u[U].node.mode===D.mode?(f[U][P]=y(u[U].lastCount+D.length,D.mode)-y(u[U].lastCount,D.mode),u[U].lastCount+=D.length):(u[U]&&(u[U].lastCount=D.length),f[U][P]=y(D.length,D.mode)+4+n.getCharCountIndicator(D.mode,c))}}d=R}for(let p=0;p<d.length;p++)f[d[p]].end=0;return{map:f,table:u}}function T(b,c){let u;const f=n.getBestModeForData(b);if(u=n.from(c,f),u!==n.BYTE&&u.bit<f.bit)throw new Error('"'+b+'" cannot be encoded with mode '+n.toString(u)+ ` .
Suggested mode is : ` +n.toString(f));switch(u===n.KANJI&&!t.isKanjiModeEnabled()&&(u=n.BYTE),u){case n.NUMERIC:return new i(b);case n.ALPHANUMERIC:return new e(b);case n.KANJI:return new r(b);case n.BYTE:return new a(b)}}o.fromArray=function(c){return c.reduce(function(u,f){return typeof f=="string"?u.push(T(f,null)):f.data&&u.push(T(f.data,f.mode)),u},[])},o.fromString=function(c,u){const f=A(c,t.isKanjiModeEnabled()),d=_(f),p=E(d,u),B=l.find_path(p.map,"start","end"),R=[];for(let M=1;M<B.length-1;M++)R.push(p.table[B[M]].node);return o.fromArray(m(R))},o.rawSplit=function(c){return o.fromArray(A(c,t.isKanjiModeEnabled()))}})(pe);const dt=k,Ct=ut,wn=Ge,yn=Qe,bn=ie,Cn=se,At=le,It=ct,_n=We,lt=fe,En=ge,Sn=H,_t=pe;function Bn(o,n){const i=o.size,e=Cn.getPositions(n);for(let a=0;a<e.length;a++){const r=e[a][0],s=e[a][1];for(let t=-1;t<=7;t++)if(!(r+t<=-1||i<=r+t))for(let l=-1;l<=7;l++)s+l<=-1||i<=s+l||(t>=0&&t<=6&&(l===0||l===6)||l>=0&&l<=6&&(t===0||t===6)||t>=2&&t<=4&&l>=2&&l<=4?o.set(r+t,s+l,!0,!0):o.set(r+t,s+l,!1,!0))}}function An(o){const n=o.size;for(let i=8;i<n-8;i++){const e=i%2===0;o.set(i,6,e,!0),o.set(6,i,e,!0)}}function In(o,n){const i=bn.getPositions(n);for(let e=0;e<i.length;e++){const a=i[e][0],r=i[e][1];for(let s=-2;s<=2;s++)for(let t=-2;t<=2;t++)s===-2||s===2||t===-2||t===2||s===0&&t===0?o.set(a+s,r+t,!0,!0):o.set(a+s,r+t,!1,!0)}}function Tn(o,n){const i=o.size,e=lt.getEncodedBits(n);let a,r,s;for(let t=0;t<18;t++)a=Math.floor(t/3),r=t%3+i-8-3,s=(e>>t&1)===1,o.set(a,r,s,!0),o.set(r,a,s,!0)}function Et(o,n,i){const e=o.size,a=En.getEncodedBits(n,i);let r,s;for(r=0;r<15;r++)s=(a>>r&1)===1,r<6?o.set(r,8,s,!0):r<8?o.set(r+1,8,s,!0):o.set(e-15+r,8,s,!0),r<8?o.set(8,e-r-1,s,!0):r<9?o.set(8,15-r-1+1,s,!0):o.set(8,15-r-1,s,!0);o.set(e-8,8,1,!0)}function Pn(o,n){const i=o.size;let e=-1,a=i-1,r=7,s=0;for(let t=i-1;t>0;t-=2)for(t===6&&t--;;){for(let l=0;l<2;l++)if(!o.isReserved(a,t-l)){let g=!1;s<n.length&&(g=(n[s]>>>r&1)===1),o.set(a,t-l,g),r--,r===-1&&(s++,r=7)}if(a+=e,a<0||i<=a){a-=e,e=-e;break}}}function Nn(o,n,i){const e=new wn;i.forEach(function(l){e.put(l.mode.bit,4),e.put(l.getLength(),Sn.getCharCountIndicator(l.mode,o)),l.write(e)});const a=dt.getSymbolTotalCodewords(o),r=It.getTotalCodewordsCount(o,n),s=(a-r)*8;for(e.getLengthInBits()+4<=s&&e.put(0,4);e.getLengthInBits()%8!==0;)e.putBit(0);const t=(s-e.getLengthInBits())/8;for(let l=0;l<t;l++)e.put(l%2?17:236,8);return Fn(e,o,n)}function Fn(o,n,i){const e=dt.getSymbolTotalCodewords(n),a=It.getTotalCodewordsCount(n,i),r=e-a,s=It.getBlocksCount(n,i),t=e%s,l=s-t,g=Math.floor(e/s),h=Math.floor(r/s),A=h+1,y=g-h,m=new _n(y);let _=0;const E=new Array(s),T=new Array(s);let b=0;const c=new Uint8Array(o.buffer);for(let B=0;B<s;B++){const R=B<l?h:A;E[B]=c.slice(_,_+R),T[B]=m.encode(E[B]),_+=R,b=Math.max(b,R)}const u=new Uint8Array(e);let f=0,d,p;for(d=0;d<b;d++)for(p=0;p<s;p++)d<E[p].length&&(u[f++]=E[p][d]);for(d=0;d<y;d++)for(p=0;p<s;p++)u[f++]=T[p][d];return u}function Mn(o,n,i,e){let a;if(Array.isArray(o))a=_t.fromArray(o);else if(typeof o=="string"){let g=n;if(!g){const h=_t.rawSplit(o);g=lt.getBestVersionForData(h,i)}a=_t.fromString(o,g||40)}else throw new Error("Invalid data");const r=lt.getBestVersionForData(a,i);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!n)n=r;else if(n<r)throw new Error( `
The chosen QR Code version cannot contain this amount of data .
Minimum version required to store current data is : ` +r+ ` .
` );const s=Nn(n,i,a),t=dt.getSymbolSize(n),l=new yn(t);return Bn(l,n),An(l),In(l,n),Et(l,i,0),n>=7&&Tn(l,n),Pn(l,s),isNaN(e)&&(e=At.getBestMask(l,Et.bind(null,l,i))),At.applyMask(e,l),Et(l,i,e),{modules:l,version:n,errorCorrectionLevel:i,maskPattern:e,segments:a}}re.create=function(n,i){if(typeof n>"u"||n==="")throw new Error("No input text");let e=Ct.M,a,r;return typeof i<"u"&&(e=Ct.from(i.errorCorrectionLevel,Ct.M),a=lt.from(i.version),r=At.from(i.maskPattern),i.toSJISFunc&&dt.setToSJISFunction(i.toSJISFunc)),Mn(n,a,e,r)};var we={},Mt={};(function(o){function n(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let e=i.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+i);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(r){return[r,r]}))),e.length===6&&e.push("F","F");const a=parseInt(e.join(""),16);return{r:a>>24&255,g:a>>16&255,b:a>>8&255,a:a&255,hex:"#"+e.slice(0,6).join("")}}o.getOptions=function(e){e||(e={}),e.color||(e.color={});const a=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,s=e.scale||4;return{width:r,scale:r?4:s,margin:a,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},o.getScale=function(e,a){return a.width&&a.width>=e+a.margin*2?a.width/(e+a.margin*2):a.scale},o.getImageWidth=function(e,a){const r=o.getScale(e,a);return Math.floor((e+a.margin*2)*r)},o.qrToImageData=function(e,a,r){const s=a.modules.size,t=a.modules.data,l=o.getScale(s,r),g=Math.floor((s+r.margin*2)*l),h=r.margin*l,A=[r.color.light,r.color.dark];for(let y=0;y<g;y++)for(let m=0;m<g;m++){let _=(y*g+m)*4,E=r.color.light;if(y>=h&&m>=h&&y<g-h&&m<g-h){const T=Math.floor((y-h)/l),b=Math.floor((m-h)/l);E=A[t[T*s+b]?1:0]}e[_++]=E.r,e[_++]=E.g,e[_++]=E.b,e[_]=E.a}}})(Mt);(function(o){const n=Mt;function i(a,r,s){a.clearRect(0,0,r.width,r.height),r.style||(r.style={}),r.height=s,r.width=s,r.style.height=s+"px",r.style.width=s+"px"}function e(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}o.render=function(r,s,t){let l=t,g=s;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),s||(g=e()),l=n.getOptions(l);const h=n.getImageWidth(r.modules.size,l),A=g.getContext("2d"),y=A.createImageData(h,h);return n.qrToImageData(y.data,r,l),i(A,g,h),A.putImageData(y,0,0),g},o.renderToDataURL=function(r,s,t){let l=t;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),l||(l={});const g=o.render(r,s,l),h=l.type||"image/png",A=l.rendererOpts||{};return g.toDataURL(h,A.quality)}})(we);var ye={};const Dn=Mt;function oe(o,n){const i=o.a/255,e=n+'="'+o.hex+'"';return i<1?e+" "+n+'-opacity="'+i.toFixed(2).slice(1)+'"':e}function St(o,n,i){let e=o+n;return typeof i<"u"&&(e+=" "+i),e}function Rn(o,n,i){let e="",a=0,r=!1,s=0;for(let t=0;t<o.length;t++){const l=Math.floor(t%n),g=Math.floor(t/n);!l&&!r&&(r=!0),o[t]?(s++,t>0&&l>0&&o[t-1]||(e+=r?St("M",l+i,.5+g+i):St("m",a,0),a=0,r=!1),l+1<n&&o[t+1]||(e+=St("h",s),s=0)):a++}return e}ye.render=function(n,i,e){const a=Dn.getOptions(i),r=n.modules.size,s=n.modules.data,t=r+a.margin*2,l=a.color.light.a?"<path "+oe(a.color.light,"fill")+' d="M0 0h'+t+"v"+t+'H0z"/>':"",g="<path "+oe(a.color.dark,"stroke")+' d="'+Rn(s,r,a.margin)+'"/>',h='viewBox="0 0 '+t+" "+t+'"',y='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+h+' shape-rendering="crispEdges">'+l+g+ ` < / s v g >
2024-07-30 23:42:57 +00:00
` ;return typeof e=="function"&&e(null,y),y};const Ln=je,Tt=re,be=we,Un=ye;function Dt(o,n,i,e,a){const r=[].slice.call(arguments,1),s=r.length,t=typeof r[s-1]=="function";if(!t&&!Ln())throw new Error("Callback required as last argument");if(t){if(s<2)throw new Error("Too few arguments provided");s===2?(a=i,i=n,n=e=void 0):s===3&&(n.getContext&&typeof a>"u"?(a=e,e=void 0):(a=e,e=i,i=n,n=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(i=n,n=e=void 0):s===2&&!n.getContext&&(e=i,i=n,n=void 0),new Promise(function(l,g){try{const h=Tt.create(i,e);l(o(h,n,e))}catch(h){g(h)}})}try{const l=Tt.create(i,e);a(null,o(l,n,e))}catch(l){a(l)}}W.create=Tt.create;W.toCanvas=Dt.bind(null,be.render);W.toDataURL=Dt.bind(null,be.renderToDataURL);W.toString=Dt.bind(null,function(o,n,i){return Un.render(o,i)});const vn=o=>(ze("data-v-9605df5b"),o=o(),Je(),o),kn={class:"container"},Vn={style:{"text-align":"center"}}, $ n=["src"],xn=vn(()=>G("br",null,null,-1)),On=["innerHTML"],Hn={name:"Sat"},zn=Be({...Hn,setup(o){const{loading:n,setLoading:i}=Ke(!0),e=Ce(),a=wt(null),r=wt(null),s=wt(null),t=Ae({uuid:"",qrcode:"",visible:!1,showHide:0,status:" \u 70B9 \u 51FB \u 5199 \u 5165 \u 6309 \u 94AE \u 5199 \u 5165 \u 536B \u 661F \u 6570 \u 636E \u 5230 \u 8BBE \u 5907<br/><br/>",sat:"",satData:[],lng:0,lat:0,alt:0,tx:0,rx:0,txTone:0,rxTone:0,CTCSSOption:[67,69.3,71.9,74.4,77,79.7,82.5,85.4,88.5,91.5,94.8,97.4,100,103.5,107.2,110.9,114.8,118.8,123,127.3,131.8,136.5,141.3,146.2,151.4,156.7,159.8,162.2,165.5,167.9,171.3,173.8,177.3,179.9,183.5,186.2,189.9,192.8,196.6,199.5,203.5,206.5,210.7,218.1,225.7,229.1,233.6,241.8,250.3,254.1],pass:void 0,passOption:[],dt:"",timer:void 0,passCustom:void 0,dtCustom:void 0,freqDb:[]});Ie(async()=>{const c=await(await fetch("https://mirror.ghproxy.com/https://raw.githubusercontent.com/palewire/ham-satellite-database/main/data/amsat-active-frequencies.json")).text();t.freqDb=JSON.parse(c),t.lng=parseFloat(localStorage.getItem("myLng")||"0"),t.lat=parseFloat(localStorage.getItem("myLat")||"0"),t.alt=parseFloat(localStorage.getItem("myAlt")||"0"),await a.value. $ forceUpdate(),await r.value. $ forceUpdate(),await s.value. $ forceUpdate(),t.lng=parseFloat(a.value.inputRef.modelValue||"0"),t.lat=parseFloat(r.value.inputRef.modelValue||"0"),t.alt=parseFloat(s.value.inputRef.modelValue||"0"),t.timer=setInterval(()=>{t.dt=new Date().toLocaleString("zh-CN",{timeZone:"Asia/Shanghai"}),localStorage.setItem("myLng",t.lng.toString()),localStorage.setItem("myLat",t.lat.toString()),localStorage.setItem("myAlt",t.alt.toString())},1e3)}),Te(()=>{try{clearInterval(t.timer)}catch{}});const l=async()=>{if(e.connectState!=!0){alert(sessionStorage.getItem("noticeConnectK5"));return}i(!0),await yt(e.connectPort),await g(),await te(e.connectPort),i(!1)},g=async()=>{var f;const c=t.dtCustom?new Date(t.dtCustom):new Date,u=[...I(parseInt(c.getFullYear().toString().substring(2,4)).toString(16)),...I((c.getMonth()+1).toString(16)),...I(c.getDate().toString(16)),...I(c.getHours().toString(16)),...I(c.getMinutes().toString(16)),...I(c.getSeconds().toString(16))];await F(e.connectPort,11200,new Uint8Array(u),6,(f=e.configuration)==null?void 0:f.uart)},h=async c=>{const u=t.satData.find(f=>f.name==c);if(u&&u.path){t.status+="<br/> \u 536B \u 661F \u 53C2 \u 6570 \u FF1A<br/>",u.path.map(d=>{t.status+=d+"<br/>"});let f=!1;t.freqDb.map(d=>{u.path[1].split(" ")[1]==d.norad_id&&d.mode.indexOf("FM")!=-1&&(console.log(d),f=!0,t.tx=d.uplink?parseFloat(d.uplink.split("/")[0]):0,t.rx=d.downlink?parseFloat(d.downlink.split("/")[0]):0,t.txTone=parseFloat([0,...t.CTCSSOption].reduce((p,B)=>d.mode.indexOf(B)!=-1?B:p)))}),f||(t.tx=0,t.rx=0,t.txTone=0,t.rxTone=0)}Xt(()=>{const f=document==null?void 0:document.getElementById("statusArea");f&&(f.scrollTop=f==null?void 0:f.scrollHeight)})};(async()=>{i(!0);const u=(await(await fetch("https://celestrak.org/NORAD/elements/amateur.txt")).text()).split(/ \r ? \n /),f=[];let d={};for(let p=0;p<u.length;p++)Number.isNaN(parseInt(u[p].substring(0,1)))?(d.name&&d.name!=""&&(f.push(d),d={}),d.name=u[p]):(d.path||(d.path=[]),d.path.push(u[p]));t