@acedatacloud/nexior 2.0.6 → 2.1.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 (114) hide show
  1. package/README.md +4 -4
  2. package/dist/assets/Auth.24285781.js +1 -0
  3. package/dist/assets/Buy.0599199b.js +1 -0
  4. package/dist/assets/Callback.d84026b2.js +1 -0
  5. package/dist/assets/{Chatdoc.6a3a337e.js → Chatdoc.092d9b8f.js} +1 -1
  6. package/dist/assets/Console.51415b2a.js +1 -0
  7. package/dist/assets/Conversation.47bf5812.js +1 -0
  8. package/dist/assets/Conversation.570ddb9e.js +1 -0
  9. package/dist/assets/CopyToClipboard.7029206a.js +1 -0
  10. package/dist/assets/DarkSelector.a968d7ec.js +1 -0
  11. package/dist/assets/Detail.85af1d0d.js +1 -0
  12. package/dist/assets/History.7c474eab.js +1 -0
  13. package/dist/assets/Index.1080c911.js +1 -0
  14. package/dist/assets/Index.14642a4b.js +1 -0
  15. package/dist/assets/Index.24047ba8.js +1 -0
  16. package/dist/assets/Index.4b173a67.js +3 -0
  17. package/dist/assets/Index.d208a180.js +1 -0
  18. package/dist/assets/{Index.63dd9477.js → Index.de69679e.js} +1 -1
  19. package/dist/assets/Index.e7176e93.js +1 -0
  20. package/dist/assets/Index.f5c2c30e.js +1 -0
  21. package/dist/assets/Index.fa66811d.js +1 -0
  22. package/dist/assets/InfoIcon.da279dde.js +1 -0
  23. package/dist/assets/Invitees.933581a0.js +1 -0
  24. package/dist/assets/List.26ef5775.js +1 -0
  25. package/dist/assets/List.65caf2cd.js +1 -0
  26. package/dist/assets/List.7f48e343.js +1 -0
  27. package/dist/assets/Login.5d109763.js +1 -0
  28. package/dist/assets/Main.d6cb32ae.js +1 -0
  29. package/dist/assets/Manage.37fd9e45.js +1 -0
  30. package/dist/assets/Navigator.67880be0.js +1 -0
  31. package/dist/assets/{Pagination.84cf8888.js → Pagination.8c4ab71b.js} +1 -1
  32. package/dist/assets/Setting.89cdc8b6.js +1 -0
  33. package/dist/assets/{Status.e8e87eff.js → Status.682924e3.js} +2 -2
  34. package/dist/assets/distribution.b88948cd.js +1 -0
  35. package/dist/assets/index.14170858.js +1 -0
  36. package/dist/assets/index.1f60bc66.js +1 -0
  37. package/dist/assets/index.6b9d5ecf.js +1 -0
  38. package/dist/assets/index.855c2d30.js +1 -0
  39. package/dist/assets/index.8688d47f.css +1 -0
  40. package/dist/assets/index.8efd735c.js +1 -0
  41. package/dist/assets/index.9c7322ff.js +1 -0
  42. package/dist/assets/{index.5b9e515e.js → index.a90daadd.js} +1 -1
  43. package/dist/assets/index.a9c9c79c.js +1 -0
  44. package/dist/assets/index.ad0fe8b9.js +1 -0
  45. package/dist/assets/index.ae9b8172.js +1 -0
  46. package/dist/assets/{index.58368632.js → index.b2031147.js} +1 -1
  47. package/dist/assets/index.c8e54e8b.js +1 -0
  48. package/dist/assets/index.c9cfe62b.js +1 -0
  49. package/dist/assets/index.d7afb3a1.js +1 -0
  50. package/dist/assets/index.ee7a1ec3.js +1 -0
  51. package/dist/assets/index.f0a4d852.js +1 -0
  52. package/dist/assets/index.f357c50b.js +3 -0
  53. package/dist/assets/index.f3f7084c.js +1 -0
  54. package/dist/assets/index.f512c03e.js +1 -0
  55. package/dist/assets/{order.ef27e43c.js → order.9766448a.js} +1 -1
  56. package/dist/assets/{price.b1cf3677.js → price.0b427681.js} +1 -1
  57. package/dist/assets/{vendor-@vue.31495dbd.js → vendor-@vue.b201070f.js} +1 -1
  58. package/dist/assets/{vendor-element-plus.eeef3ee7.js → vendor-element-plus.ec5f1739.js} +2 -2
  59. package/dist/assets/{vendor-fortawesome.35fae32b.js → vendor-fortawesome.7c293b44.js} +1 -1
  60. package/dist/assets/{vendor-markdown.95c097e3.js → vendor-markdown.59c24495.js} +1 -1
  61. package/dist/assets/vendor-others.ecc384b7.js +99 -0
  62. package/dist/assets/{vendor-qrcode.93be07bd.js → vendor-qrcode.1cdaa2c5.js} +6 -6
  63. package/dist/assets/{vendor-vue-dark-switch.81063cc1.js → vendor-vue-dark-switch.4b8d1916.js} +1 -1
  64. package/dist/index.html +7 -6
  65. package/package.json +11 -2
  66. package/dist/assets/Auth.64c9c331.js +0 -1
  67. package/dist/assets/Buy.0b30ac1e.js +0 -1
  68. package/dist/assets/Callback.09304fcb.js +0 -1
  69. package/dist/assets/Console.4d2b552a.js +0 -1
  70. package/dist/assets/Conversation.4790fc8f.js +0 -1
  71. package/dist/assets/Conversation.f1fffe01.js +0 -1
  72. package/dist/assets/CopyToClipboard.6e16b453.js +0 -1
  73. package/dist/assets/DarkSelector.434c896b.js +0 -1
  74. package/dist/assets/Detail.7351e6a0.js +0 -1
  75. package/dist/assets/History.7659a22c.js +0 -1
  76. package/dist/assets/Index.4e264107.js +0 -1
  77. package/dist/assets/Index.57de0dc3.js +0 -1
  78. package/dist/assets/Index.594c34b7.js +0 -1
  79. package/dist/assets/Index.95c1bc8c.js +0 -1
  80. package/dist/assets/Index.9be20e06.js +0 -1
  81. package/dist/assets/Index.acff474c.js +0 -1
  82. package/dist/assets/Index.bfd5abb9.js +0 -3
  83. package/dist/assets/Index.fa551fa7.js +0 -1
  84. package/dist/assets/InfoIcon.8de551d5.js +0 -1
  85. package/dist/assets/Invitees.8c1fc193.js +0 -1
  86. package/dist/assets/List.3dcfe020.js +0 -1
  87. package/dist/assets/List.468144c2.js +0 -1
  88. package/dist/assets/List.49b860ca.js +0 -1
  89. package/dist/assets/Login.b55d8c24.js +0 -1
  90. package/dist/assets/Main.f969e9be.js +0 -1
  91. package/dist/assets/Manage.d9fe084c.js +0 -1
  92. package/dist/assets/Navigator.74c173af.js +0 -1
  93. package/dist/assets/Setting.cb37c146.js +0 -1
  94. package/dist/assets/distribution.8c83db22.js +0 -1
  95. package/dist/assets/index.1ee8ef98.js +0 -1
  96. package/dist/assets/index.332f2a56.js +0 -1
  97. package/dist/assets/index.37aa4ee5.js +0 -1
  98. package/dist/assets/index.3eef99ee.js +0 -1
  99. package/dist/assets/index.424237c1.js +0 -1
  100. package/dist/assets/index.51362474.js +0 -1
  101. package/dist/assets/index.5776557e.js +0 -1
  102. package/dist/assets/index.62d00e03.css +0 -1
  103. package/dist/assets/index.6cf5b271.js +0 -1
  104. package/dist/assets/index.746cde97.js +0 -1
  105. package/dist/assets/index.748c2eb2.js +0 -3
  106. package/dist/assets/index.a3f87627.js +0 -1
  107. package/dist/assets/index.b22b07a1.js +0 -1
  108. package/dist/assets/index.bf2f2ede.js +0 -1
  109. package/dist/assets/index.c64aa4d3.js +0 -1
  110. package/dist/assets/index.e3a2de47.js +0 -1
  111. package/dist/assets/index.e902d4b4.js +0 -1
  112. package/dist/assets/index.fc03c45f.js +0 -1
  113. package/dist/assets/vendor-others.decd85ac.js +0 -99
  114. /package/dist/assets/{vendor-highlight.js.19da0c9f.js → vendor-highlight.js.6ee9ffbc.js} +0 -0
@@ -1,8 +1,8 @@
1
- import{o as Mt,q as Pt,_ as Rt}from"./vendor-others.decd85ac.js";import{H as Lt,r as Ut,s as Dt,ah as Ft}from"./vendor-@vue.31495dbd.js";var K={},kt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},dt={},I={};let it;const zt=[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];I.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};I.getSymbolTotalCodewords=function(e){return zt[e]};I.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};I.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');it=e};I.isKanjiModeEnabled=function(){return typeof it!="undefined"};I.toSJIS=function(e){return it(e)};var $={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+i)}}t.isValid=function(r){return r&&typeof r.bit!="undefined"&&r.bit>=0&&r.bit<4},t.from=function(r,n){if(t.isValid(r))return r;try{return e(r)}catch{return n}}})($);function ht(){this.buffer=[],this.length=0}ht.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let i=0;i<e;i++)this.putBit((t>>>e-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Vt=ht;function J(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}J.prototype.set=function(t,e,i,r){const n=t*this.size+e;this.data[n]=i,r&&(this.reservedBit[n]=!0)};J.prototype.get=function(t,e){return this.data[t*this.size+e]};J.prototype.xor=function(t,e,i){this.data[t*this.size+e]^=i};J.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var Ht=J,mt={};(function(t){const e=I.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const n=Math.floor(r/7)+2,o=e(r),s=o===145?26:Math.ceil((o-13)/(2*n-2))*2,a=[o-7];for(let u=1;u<n-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},t.getPositions=function(r){const n=[],o=t.getRowColCoords(r),s=o.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||n.push([o[a],o[u]]);return n}})(mt);var wt={};const Kt=I.getSymbolSize,lt=7;wt.getPositions=function(e){const i=Kt(e);return[[0,0],[i-lt,0],[0,i-lt]]};var yt={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){const o=n.size;let s=0,a=0,u=0,c=null,l=null;for(let p=0;p<o;p++){a=u=0,c=l=null;for(let m=0;m<o;m++){let g=n.get(p,m);g===c?a++:(a>=5&&(s+=e.N1+(a-5)),c=g,a=1),g=n.get(m,p),g===l?u++:(u>=5&&(s+=e.N1+(u-5)),l=g,u=1)}a>=5&&(s+=e.N1+(a-5)),u>=5&&(s+=e.N1+(u-5))}return s},t.getPenaltyN2=function(n){const o=n.size;let s=0;for(let a=0;a<o-1;a++)for(let u=0;u<o-1;u++){const c=n.get(a,u)+n.get(a,u+1)+n.get(a+1,u)+n.get(a+1,u+1);(c===4||c===0)&&s++}return s*e.N2},t.getPenaltyN3=function(n){const o=n.size;let s=0,a=0,u=0;for(let c=0;c<o;c++){a=u=0;for(let l=0;l<o;l++)a=a<<1&2047|n.get(c,l),l>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|n.get(l,c),l>=10&&(u===1488||u===93)&&s++}return s*e.N3},t.getPenaltyN4=function(n){let o=0;const s=n.data.length;for(let u=0;u<s;u++)o+=n.data[u];return Math.abs(Math.ceil(o*100/s/5)-10)*e.N4};function i(r,n,o){switch(r){case t.Patterns.PATTERN000:return(n+o)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(n+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return n*o%2+n*o%3===0;case t.Patterns.PATTERN110:return(n*o%2+n*o%3)%2===0;case t.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(n,o){const s=o.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)o.isReserved(u,a)||o.xor(u,a,i(n,u,a))},t.getBestMask=function(n,o){const s=Object.keys(t.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){o(c),t.applyMask(c,n);const l=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(c,n),l<u&&(u=l,a=c)}return a}})(yt);var j={};const R=$,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],_=[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];j.getBlocksCount=function(e,i){switch(i){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}};j.getTotalCodewordsCount=function(e,i){switch(i){case R.L:return _[(e-1)*4+0];case R.M:return _[(e-1)*4+1];case R.Q:return _[(e-1)*4+2];case R.H:return _[(e-1)*4+3];default:return}};var Et={},G={};const V=new Uint8Array(512),v=new Uint8Array(256);(function(){let e=1;for(let i=0;i<255;i++)V[i]=e,v[e]=i,e<<=1,e&256&&(e^=285);for(let i=255;i<512;i++)V[i]=V[i-255]})();G.log=function(e){if(e<1)throw new Error("log("+e+")");return v[e]};G.exp=function(e){return V[e]};G.mul=function(e,i){return e===0||i===0?0:V[v[e]+v[i]]};(function(t){const e=G;t.mul=function(r,n){const o=new Uint8Array(r.length+n.length-1);for(let s=0;s<r.length;s++)for(let a=0;a<n.length;a++)o[s+a]^=e.mul(r[s],n[a]);return o},t.mod=function(r,n){let o=new Uint8Array(r);for(;o.length-n.length>=0;){const s=o[0];for(let u=0;u<n.length;u++)o[u]^=e.mul(n[u],s);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},t.generateECPolynomial=function(r){let n=new Uint8Array([1]);for(let o=0;o<r;o++)n=t.mul(n,new Uint8Array([1,e.exp(o)]));return n}})(Et);const Ct=Et;function st(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}st.prototype.initialize=function(e){this.degree=e,this.genPoly=Ct.generateECPolynomial(this.degree)};st.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(e.length+this.degree);i.set(e);const r=Ct.mod(i,this.genPoly),n=this.degree-r.length;if(n>0){const o=new Uint8Array(this.degree);return o.set(r,n),o}return r};var Jt=st,Bt={},L={},ut={};ut.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var b={};const pt="[0-9]+",Ot="[A-Z $%*+\\-./:]+";let H="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";H=H.replace(/u/g,"\\u");const _t="(?:(?![A-Z0-9 $%*+\\-./:]|"+H+`)(?:.|[\r
2
- ]))+`;b.KANJI=new RegExp(H,"g");b.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");b.BYTE=new RegExp(_t,"g");b.NUMERIC=new RegExp(pt,"g");b.ALPHANUMERIC=new RegExp(Ot,"g");const vt=new RegExp("^"+H+"$"),Yt=new RegExp("^"+pt+"$"),$t=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");b.testKanji=function(e){return vt.test(e)};b.testNumeric=function(e){return Yt.test(e)};b.testAlphanumeric=function(e){return $t.test(e)};(function(t){const e=ut,i=b;t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,s){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?o.ccBits[0]:s<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return i.testNumeric(o)?t.NUMERIC:i.testAlphanumeric(o)?t.ALPHANUMERIC:i.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function r(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}t.from=function(o,s){if(t.isValid(o))return o;try{return r(o)}catch{return s}}})(L);(function(t){const e=I,i=j,r=$,n=L,o=ut,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,a=e.getBCHDigit(s);function u(m,g,y){for(let E=1;E<=40;E++)if(g<=t.getCapacity(E,y,m))return E}function c(m,g){return n.getCharCountIndicator(m,g)+4}function l(m,g){let y=0;return m.forEach(function(E){y+=c(E.mode,g)+E.getBitsLength()}),y}function p(m,g){for(let y=1;y<=40;y++)if(l(m,y)<=t.getCapacity(y,g,n.MIXED))return y}t.from=function(g,y){return o.isValid(g)?parseInt(g,10):y},t.getCapacity=function(g,y,E){if(!o.isValid(g))throw new Error("Invalid QR Code version");typeof E=="undefined"&&(E=n.BYTE);const N=e.getSymbolTotalCodewords(g),h=i.getTotalCodewordsCount(g,y),w=(N-h)*8;if(E===n.MIXED)return w;const d=w-c(E,g);switch(E){case n.NUMERIC:return Math.floor(d/10*3);case n.ALPHANUMERIC:return Math.floor(d/11*2);case n.KANJI:return Math.floor(d/13);case n.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(g,y){let E;const N=r.from(y,r.M);if(Array.isArray(g)){if(g.length>1)return p(g,N);if(g.length===0)return 1;E=g[0]}else E=g;return u(E.mode,E.getLength(),N)},t.getEncodedBits=function(g){if(!o.isValid(g)||g<7)throw new Error("Invalid QR Code version");let y=g<<12;for(;e.getBCHDigit(y)-a>=0;)y^=s<<e.getBCHDigit(y)-a;return g<<12|y}})(Bt);var At={};const et=I,Nt=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,jt=1<<14|1<<12|1<<10|1<<4|1<<1,ft=et.getBCHDigit(Nt);At.getEncodedBits=function(e,i){const r=e.bit<<3|i;let n=r<<10;for(;et.getBCHDigit(n)-ft>=0;)n^=Nt<<et.getBCHDigit(n)-ft;return(r<<10|n)^jt};var It={};const Gt=L;function U(t){this.mode=Gt.NUMERIC,this.data=t.toString()}U.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(e){let i,r,n;for(i=0;i+3<=this.data.length;i+=3)r=this.data.substr(i,3),n=parseInt(r,10),e.put(n,10);const o=this.data.length-i;o>0&&(r=this.data.substr(i),n=parseInt(r,10),e.put(n,o*3+1))};var Qt=U;const qt=L,W=["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 D(t){this.mode=qt.ALPHANUMERIC,this.data=t}D.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(e){let i;for(i=0;i+2<=this.data.length;i+=2){let r=W.indexOf(this.data[i])*45;r+=W.indexOf(this.data[i+1]),e.put(r,11)}this.data.length%2&&e.put(W.indexOf(this.data[i]),6)};var Wt=D;const Xt=Mt,Zt=L;function F(t){this.mode=Zt.BYTE,typeof t=="string"&&(t=Xt(t)),this.data=new Uint8Array(t)}F.getBitsLength=function(e){return e*8};F.prototype.getLength=function(){return this.data.length};F.prototype.getBitsLength=function(){return F.getBitsLength(this.data.length)};F.prototype.write=function(t){for(let e=0,i=this.data.length;e<i;e++)t.put(this.data[e],8)};var xt=F;const te=L,ee=I;function k(t){this.mode=te.KANJI,this.data=t}k.getBitsLength=function(e){return e*13};k.prototype.getLength=function(){return this.data.length};k.prototype.getBitsLength=function(){return k.getBitsLength(this.data.length)};k.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let i=ee.toSJIS(this.data[e]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
3
- Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),t.put(i,13)}};var ne=k;(function(t){const e=L,i=Qt,r=Wt,n=xt,o=ne,s=b,a=I,u=Pt.exports;function c(h){return unescape(encodeURIComponent(h)).length}function l(h,w,d){const f=[];let C;for(;(C=h.exec(d))!==null;)f.push({data:C[0],index:C.index,mode:w,length:C[0].length});return f}function p(h){const w=l(s.NUMERIC,e.NUMERIC,h),d=l(s.ALPHANUMERIC,e.ALPHANUMERIC,h);let f,C;return a.isKanjiModeEnabled()?(f=l(s.BYTE,e.BYTE,h),C=l(s.KANJI,e.KANJI,h)):(f=l(s.BYTE_KANJI,e.BYTE,h),C=[]),w.concat(d,f,C).sort(function(A,S){return A.index-S.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function m(h,w){switch(w){case e.NUMERIC:return i.getBitsLength(h);case e.ALPHANUMERIC:return r.getBitsLength(h);case e.KANJI:return o.getBitsLength(h);case e.BYTE:return n.getBitsLength(h)}}function g(h){return h.reduce(function(w,d){const f=w.length-1>=0?w[w.length-1]:null;return f&&f.mode===d.mode?(w[w.length-1].data+=d.data,w):(w.push(d),w)},[])}function y(h){const w=[];for(let d=0;d<h.length;d++){const f=h[d];switch(f.mode){case e.NUMERIC:w.push([f,{data:f.data,mode:e.ALPHANUMERIC,length:f.length},{data:f.data,mode:e.BYTE,length:f.length}]);break;case e.ALPHANUMERIC:w.push([f,{data:f.data,mode:e.BYTE,length:f.length}]);break;case e.KANJI:w.push([f,{data:f.data,mode:e.BYTE,length:c(f.data)}]);break;case e.BYTE:w.push([{data:f.data,mode:e.BYTE,length:c(f.data)}])}}return w}function E(h,w){const d={},f={start:{}};let C=["start"];for(let B=0;B<h.length;B++){const A=h[B],S=[];for(let P=0;P<A.length;P++){const T=A[P],z=""+B+P;S.push(z),d[z]={node:T,lastCount:0},f[z]={};for(let q=0;q<C.length;q++){const M=C[q];d[M]&&d[M].node.mode===T.mode?(f[M][z]=m(d[M].lastCount+T.length,T.mode)-m(d[M].lastCount,T.mode),d[M].lastCount+=T.length):(d[M]&&(d[M].lastCount=T.length),f[M][z]=m(T.length,T.mode)+4+e.getCharCountIndicator(T.mode,w))}}C=S}for(let B=0;B<C.length;B++)f[C[B]].end=0;return{map:f,table:d}}function N(h,w){let d;const f=e.getBestModeForData(h);if(d=e.from(w,f),d!==e.BYTE&&d.bit<f.bit)throw new Error('"'+h+'" cannot be encoded with mode '+e.toString(d)+`.
4
- Suggested mode is: `+e.toString(f));switch(d===e.KANJI&&!a.isKanjiModeEnabled()&&(d=e.BYTE),d){case e.NUMERIC:return new i(h);case e.ALPHANUMERIC:return new r(h);case e.KANJI:return new o(h);case e.BYTE:return new n(h)}}t.fromArray=function(w){return w.reduce(function(d,f){return typeof f=="string"?d.push(N(f,null)):f.data&&d.push(N(f.data,f.mode)),d},[])},t.fromString=function(w,d){const f=p(w,a.isKanjiModeEnabled()),C=y(f),B=E(C,d),A=u.find_path(B.map,"start","end"),S=[];for(let P=1;P<A.length-1;P++)S.push(B.table[A[P]].node);return t.fromArray(g(S))},t.rawSplit=function(w){return t.fromArray(p(w,a.isKanjiModeEnabled()))}})(It);const Q=I,X=$,re=Vt,oe=Ht,ie=mt,se=wt,nt=yt,rt=j,ue=Jt,Y=Bt,ae=At,ce=L,Z=It;function le(t,e){const i=t.size,r=se.getPositions(e);for(let n=0;n<r.length;n++){const o=r[n][0],s=r[n][1];for(let a=-1;a<=7;a++)if(!(o+a<=-1||i<=o+a))for(let u=-1;u<=7;u++)s+u<=-1||i<=s+u||(a>=0&&a<=6&&(u===0||u===6)||u>=0&&u<=6&&(a===0||a===6)||a>=2&&a<=4&&u>=2&&u<=4?t.set(o+a,s+u,!0,!0):t.set(o+a,s+u,!1,!0))}}function fe(t){const e=t.size;for(let i=8;i<e-8;i++){const r=i%2===0;t.set(i,6,r,!0),t.set(6,i,r,!0)}}function ge(t,e){const i=ie.getPositions(e);for(let r=0;r<i.length;r++){const n=i[r][0],o=i[r][1];for(let s=-2;s<=2;s++)for(let a=-2;a<=2;a++)s===-2||s===2||a===-2||a===2||s===0&&a===0?t.set(n+s,o+a,!0,!0):t.set(n+s,o+a,!1,!0)}}function de(t,e){const i=t.size,r=Y.getEncodedBits(e);let n,o,s;for(let a=0;a<18;a++)n=Math.floor(a/3),o=a%3+i-8-3,s=(r>>a&1)===1,t.set(n,o,s,!0),t.set(o,n,s,!0)}function x(t,e,i){const r=t.size,n=ae.getEncodedBits(e,i);let o,s;for(o=0;o<15;o++)s=(n>>o&1)===1,o<6?t.set(o,8,s,!0):o<8?t.set(o+1,8,s,!0):t.set(r-15+o,8,s,!0),o<8?t.set(8,r-o-1,s,!0):o<9?t.set(8,15-o-1+1,s,!0):t.set(8,15-o-1,s,!0);t.set(r-8,8,1,!0)}function he(t,e){const i=t.size;let r=-1,n=i-1,o=7,s=0;for(let a=i-1;a>0;a-=2)for(a===6&&a--;;){for(let u=0;u<2;u++)if(!t.isReserved(n,a-u)){let c=!1;s<e.length&&(c=(e[s]>>>o&1)===1),t.set(n,a-u,c),o--,o===-1&&(s++,o=7)}if(n+=r,n<0||i<=n){n-=r,r=-r;break}}}function me(t,e,i){const r=new re;i.forEach(function(u){r.put(u.mode.bit,4),r.put(u.getLength(),ce.getCharCountIndicator(u.mode,t)),u.write(r)});const n=Q.getSymbolTotalCodewords(t),o=rt.getTotalCodewordsCount(t,e),s=(n-o)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const a=(s-r.getLengthInBits())/8;for(let u=0;u<a;u++)r.put(u%2?17:236,8);return we(r,t,e)}function we(t,e,i){const r=Q.getSymbolTotalCodewords(e),n=rt.getTotalCodewordsCount(e,i),o=r-n,s=rt.getBlocksCount(e,i),a=r%s,u=s-a,c=Math.floor(r/s),l=Math.floor(o/s),p=l+1,m=c-l,g=new ue(m);let y=0;const E=new Array(s),N=new Array(s);let h=0;const w=new Uint8Array(t.buffer);for(let A=0;A<s;A++){const S=A<u?l:p;E[A]=w.slice(y,y+S),N[A]=g.encode(E[A]),y+=S,h=Math.max(h,S)}const d=new Uint8Array(r);let f=0,C,B;for(C=0;C<h;C++)for(B=0;B<s;B++)C<E[B].length&&(d[f++]=E[B][C]);for(C=0;C<m;C++)for(B=0;B<s;B++)d[f++]=N[B][C];return d}function ye(t,e,i,r){let n;if(Array.isArray(t))n=Z.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){const l=Z.rawSplit(t);c=Y.getBestVersionForData(l,i)}n=Z.fromString(t,c||40)}else throw new Error("Invalid data");const o=Y.getBestVersionForData(n,i);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
1
+ import{o as Mt,q as Pt}from"./vendor-others.ecc384b7.js";import{H as Rt,r as Lt,s as Ut,ah as Dt}from"./vendor-@vue.b201070f.js";function Ft(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(i[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)e.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(i[r[n]]=t[r[n]]);return i}var H={},kt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},dt={},b={};let it;const zt=[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];b.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};b.getSymbolTotalCodewords=function(e){return zt[e]};b.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};b.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');it=e};b.isKanjiModeEnabled=function(){return typeof it!="undefined"};b.toSJIS=function(e){return it(e)};var Y={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+i)}}t.isValid=function(r){return r&&typeof r.bit!="undefined"&&r.bit>=0&&r.bit<4},t.from=function(r,n){if(t.isValid(r))return r;try{return e(r)}catch{return n}}})(Y);function ht(){this.buffer=[],this.length=0}ht.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let i=0;i<e;i++)this.putBit((t>>>e-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Ot=ht;function v(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}v.prototype.set=function(t,e,i,r){const n=t*this.size+e;this.data[n]=i,r&&(this.reservedBit[n]=!0)};v.prototype.get=function(t,e){return this.data[t*this.size+e]};v.prototype.xor=function(t,e,i){this.data[t*this.size+e]^=i};v.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var Vt=v,mt={};(function(t){const e=b.getSymbolSize;t.getRowColCoords=function(r){if(r===1)return[];const n=Math.floor(r/7)+2,o=e(r),s=o===145?26:Math.ceil((o-13)/(2*n-2))*2,a=[o-7];for(let u=1;u<n-1;u++)a[u]=a[u-1]-s;return a.push(6),a.reverse()},t.getPositions=function(r){const n=[],o=t.getRowColCoords(r),s=o.length;for(let a=0;a<s;a++)for(let u=0;u<s;u++)a===0&&u===0||a===0&&u===s-1||a===s-1&&u===0||n.push([o[a],o[u]]);return n}})(mt);var wt={};const Ht=b.getSymbolSize,lt=7;wt.getPositions=function(e){const i=Ht(e);return[[0,0],[i-lt,0],[0,i-lt]]};var yt={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){const o=n.size;let s=0,a=0,u=0,c=null,l=null;for(let B=0;B<o;B++){a=u=0,c=l=null;for(let m=0;m<o;m++){let g=n.get(B,m);g===c?a++:(a>=5&&(s+=e.N1+(a-5)),c=g,a=1),g=n.get(m,B),g===l?u++:(u>=5&&(s+=e.N1+(u-5)),l=g,u=1)}a>=5&&(s+=e.N1+(a-5)),u>=5&&(s+=e.N1+(u-5))}return s},t.getPenaltyN2=function(n){const o=n.size;let s=0;for(let a=0;a<o-1;a++)for(let u=0;u<o-1;u++){const c=n.get(a,u)+n.get(a,u+1)+n.get(a+1,u)+n.get(a+1,u+1);(c===4||c===0)&&s++}return s*e.N2},t.getPenaltyN3=function(n){const o=n.size;let s=0,a=0,u=0;for(let c=0;c<o;c++){a=u=0;for(let l=0;l<o;l++)a=a<<1&2047|n.get(c,l),l>=10&&(a===1488||a===93)&&s++,u=u<<1&2047|n.get(l,c),l>=10&&(u===1488||u===93)&&s++}return s*e.N3},t.getPenaltyN4=function(n){let o=0;const s=n.data.length;for(let u=0;u<s;u++)o+=n.data[u];return Math.abs(Math.ceil(o*100/s/5)-10)*e.N4};function i(r,n,o){switch(r){case t.Patterns.PATTERN000:return(n+o)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(n+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return n*o%2+n*o%3===0;case t.Patterns.PATTERN110:return(n*o%2+n*o%3)%2===0;case t.Patterns.PATTERN111:return(n*o%3+(n+o)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}t.applyMask=function(n,o){const s=o.size;for(let a=0;a<s;a++)for(let u=0;u<s;u++)o.isReserved(u,a)||o.xor(u,a,i(n,u,a))},t.getBestMask=function(n,o){const s=Object.keys(t.Patterns).length;let a=0,u=1/0;for(let c=0;c<s;c++){o(c),t.applyMask(c,n);const l=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(c,n),l<u&&(u=l,a=c)}return a}})(yt);var $={};const R=Y,K=[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],J=[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];$.getBlocksCount=function(e,i){switch(i){case R.L:return K[(e-1)*4+0];case R.M:return K[(e-1)*4+1];case R.Q:return K[(e-1)*4+2];case R.H:return K[(e-1)*4+3];default:return}};$.getTotalCodewordsCount=function(e,i){switch(i){case R.L:return J[(e-1)*4+0];case R.M:return J[(e-1)*4+1];case R.Q:return J[(e-1)*4+2];case R.H:return J[(e-1)*4+3];default:return}};var Et={},G={};const O=new Uint8Array(512),_=new Uint8Array(256);(function(){let e=1;for(let i=0;i<255;i++)O[i]=e,_[e]=i,e<<=1,e&256&&(e^=285);for(let i=255;i<512;i++)O[i]=O[i-255]})();G.log=function(e){if(e<1)throw new Error("log("+e+")");return _[e]};G.exp=function(e){return O[e]};G.mul=function(e,i){return e===0||i===0?0:O[_[e]+_[i]]};(function(t){const e=G;t.mul=function(r,n){const o=new Uint8Array(r.length+n.length-1);for(let s=0;s<r.length;s++)for(let a=0;a<n.length;a++)o[s+a]^=e.mul(r[s],n[a]);return o},t.mod=function(r,n){let o=new Uint8Array(r);for(;o.length-n.length>=0;){const s=o[0];for(let u=0;u<n.length;u++)o[u]^=e.mul(n[u],s);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},t.generateECPolynomial=function(r){let n=new Uint8Array([1]);for(let o=0;o<r;o++)n=t.mul(n,new Uint8Array([1,e.exp(o)]));return n}})(Et);const Ct=Et;function st(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}st.prototype.initialize=function(e){this.degree=e,this.genPoly=Ct.generateECPolynomial(this.degree)};st.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(e.length+this.degree);i.set(e);const r=Ct.mod(i,this.genPoly),n=this.degree-r.length;if(n>0){const o=new Uint8Array(this.degree);return o.set(r,n),o}return r};var vt=st,pt={},L={},ut={};ut.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var T={};const Bt="[0-9]+",Kt="[A-Z $%*+\\-./:]+";let V="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";V=V.replace(/u/g,"\\u");const Jt="(?:(?![A-Z0-9 $%*+\\-./:]|"+V+`)(?:.|[\r
2
+ ]))+`;T.KANJI=new RegExp(V,"g");T.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");T.BYTE=new RegExp(Jt,"g");T.NUMERIC=new RegExp(Bt,"g");T.ALPHANUMERIC=new RegExp(Kt,"g");const _t=new RegExp("^"+V+"$"),jt=new RegExp("^"+Bt+"$"),Yt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");T.testKanji=function(e){return _t.test(e)};T.testNumeric=function(e){return jt.test(e)};T.testAlphanumeric=function(e){return Yt.test(e)};(function(t){const e=ut,i=T;t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,s){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?o.ccBits[0]:s<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return i.testNumeric(o)?t.NUMERIC:i.testAlphanumeric(o)?t.ALPHANUMERIC:i.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function r(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}t.from=function(o,s){if(t.isValid(o))return o;try{return r(o)}catch{return s}}})(L);(function(t){const e=b,i=$,r=Y,n=L,o=ut,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,a=e.getBCHDigit(s);function u(m,g,y){for(let E=1;E<=40;E++)if(g<=t.getCapacity(E,y,m))return E}function c(m,g){return n.getCharCountIndicator(m,g)+4}function l(m,g){let y=0;return m.forEach(function(E){y+=c(E.mode,g)+E.getBitsLength()}),y}function B(m,g){for(let y=1;y<=40;y++)if(l(m,y)<=t.getCapacity(y,g,n.MIXED))return y}t.from=function(g,y){return o.isValid(g)?parseInt(g,10):y},t.getCapacity=function(g,y,E){if(!o.isValid(g))throw new Error("Invalid QR Code version");typeof E=="undefined"&&(E=n.BYTE);const N=e.getSymbolTotalCodewords(g),h=i.getTotalCodewordsCount(g,y),w=(N-h)*8;if(E===n.MIXED)return w;const d=w-c(E,g);switch(E){case n.NUMERIC:return Math.floor(d/10*3);case n.ALPHANUMERIC:return Math.floor(d/11*2);case n.KANJI:return Math.floor(d/13);case n.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(g,y){let E;const N=r.from(y,r.M);if(Array.isArray(g)){if(g.length>1)return B(g,N);if(g.length===0)return 1;E=g[0]}else E=g;return u(E.mode,E.getLength(),N)},t.getEncodedBits=function(g){if(!o.isValid(g)||g<7)throw new Error("Invalid QR Code version");let y=g<<12;for(;e.getBCHDigit(y)-a>=0;)y^=s<<e.getBCHDigit(y)-a;return g<<12|y}})(pt);var At={};const et=b,Nt=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,$t=1<<14|1<<12|1<<10|1<<4|1<<1,ft=et.getBCHDigit(Nt);At.getEncodedBits=function(e,i){const r=e.bit<<3|i;let n=r<<10;for(;et.getBCHDigit(n)-ft>=0;)n^=Nt<<et.getBCHDigit(n)-ft;return(r<<10|n)^$t};var bt={};const Gt=L;function U(t){this.mode=Gt.NUMERIC,this.data=t.toString()}U.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};U.prototype.getLength=function(){return this.data.length};U.prototype.getBitsLength=function(){return U.getBitsLength(this.data.length)};U.prototype.write=function(e){let i,r,n;for(i=0;i+3<=this.data.length;i+=3)r=this.data.substr(i,3),n=parseInt(r,10),e.put(n,10);const o=this.data.length-i;o>0&&(r=this.data.substr(i),n=parseInt(r,10),e.put(n,o*3+1))};var Qt=U;const qt=L,W=["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 D(t){this.mode=qt.ALPHANUMERIC,this.data=t}D.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};D.prototype.getLength=function(){return this.data.length};D.prototype.getBitsLength=function(){return D.getBitsLength(this.data.length)};D.prototype.write=function(e){let i;for(i=0;i+2<=this.data.length;i+=2){let r=W.indexOf(this.data[i])*45;r+=W.indexOf(this.data[i+1]),e.put(r,11)}this.data.length%2&&e.put(W.indexOf(this.data[i]),6)};var Wt=D;const Xt=Mt,Zt=L;function F(t){this.mode=Zt.BYTE,typeof t=="string"&&(t=Xt(t)),this.data=new Uint8Array(t)}F.getBitsLength=function(e){return e*8};F.prototype.getLength=function(){return this.data.length};F.prototype.getBitsLength=function(){return F.getBitsLength(this.data.length)};F.prototype.write=function(t){for(let e=0,i=this.data.length;e<i;e++)t.put(this.data[e],8)};var xt=F;const te=L,ee=b;function k(t){this.mode=te.KANJI,this.data=t}k.getBitsLength=function(e){return e*13};k.prototype.getLength=function(){return this.data.length};k.prototype.getBitsLength=function(){return k.getBitsLength(this.data.length)};k.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let i=ee.toSJIS(this.data[e]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
3
+ Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),t.put(i,13)}};var ne=k;(function(t){const e=L,i=Qt,r=Wt,n=xt,o=ne,s=T,a=b,u=Pt.exports;function c(h){return unescape(encodeURIComponent(h)).length}function l(h,w,d){const f=[];let C;for(;(C=h.exec(d))!==null;)f.push({data:C[0],index:C.index,mode:w,length:C[0].length});return f}function B(h){const w=l(s.NUMERIC,e.NUMERIC,h),d=l(s.ALPHANUMERIC,e.ALPHANUMERIC,h);let f,C;return a.isKanjiModeEnabled()?(f=l(s.BYTE,e.BYTE,h),C=l(s.KANJI,e.KANJI,h)):(f=l(s.BYTE_KANJI,e.BYTE,h),C=[]),w.concat(d,f,C).sort(function(A,S){return A.index-S.index}).map(function(A){return{data:A.data,mode:A.mode,length:A.length}})}function m(h,w){switch(w){case e.NUMERIC:return i.getBitsLength(h);case e.ALPHANUMERIC:return r.getBitsLength(h);case e.KANJI:return o.getBitsLength(h);case e.BYTE:return n.getBitsLength(h)}}function g(h){return h.reduce(function(w,d){const f=w.length-1>=0?w[w.length-1]:null;return f&&f.mode===d.mode?(w[w.length-1].data+=d.data,w):(w.push(d),w)},[])}function y(h){const w=[];for(let d=0;d<h.length;d++){const f=h[d];switch(f.mode){case e.NUMERIC:w.push([f,{data:f.data,mode:e.ALPHANUMERIC,length:f.length},{data:f.data,mode:e.BYTE,length:f.length}]);break;case e.ALPHANUMERIC:w.push([f,{data:f.data,mode:e.BYTE,length:f.length}]);break;case e.KANJI:w.push([f,{data:f.data,mode:e.BYTE,length:c(f.data)}]);break;case e.BYTE:w.push([{data:f.data,mode:e.BYTE,length:c(f.data)}])}}return w}function E(h,w){const d={},f={start:{}};let C=["start"];for(let p=0;p<h.length;p++){const A=h[p],S=[];for(let P=0;P<A.length;P++){const I=A[P],z=""+p+P;S.push(z),d[z]={node:I,lastCount:0},f[z]={};for(let q=0;q<C.length;q++){const M=C[q];d[M]&&d[M].node.mode===I.mode?(f[M][z]=m(d[M].lastCount+I.length,I.mode)-m(d[M].lastCount,I.mode),d[M].lastCount+=I.length):(d[M]&&(d[M].lastCount=I.length),f[M][z]=m(I.length,I.mode)+4+e.getCharCountIndicator(I.mode,w))}}C=S}for(let p=0;p<C.length;p++)f[C[p]].end=0;return{map:f,table:d}}function N(h,w){let d;const f=e.getBestModeForData(h);if(d=e.from(w,f),d!==e.BYTE&&d.bit<f.bit)throw new Error('"'+h+'" cannot be encoded with mode '+e.toString(d)+`.
4
+ Suggested mode is: `+e.toString(f));switch(d===e.KANJI&&!a.isKanjiModeEnabled()&&(d=e.BYTE),d){case e.NUMERIC:return new i(h);case e.ALPHANUMERIC:return new r(h);case e.KANJI:return new o(h);case e.BYTE:return new n(h)}}t.fromArray=function(w){return w.reduce(function(d,f){return typeof f=="string"?d.push(N(f,null)):f.data&&d.push(N(f.data,f.mode)),d},[])},t.fromString=function(w,d){const f=B(w,a.isKanjiModeEnabled()),C=y(f),p=E(C,d),A=u.find_path(p.map,"start","end"),S=[];for(let P=1;P<A.length-1;P++)S.push(p.table[A[P]].node);return t.fromArray(g(S))},t.rawSplit=function(w){return t.fromArray(B(w,a.isKanjiModeEnabled()))}})(bt);const Q=b,X=Y,re=Ot,oe=Vt,ie=mt,se=wt,nt=yt,rt=$,ue=vt,j=pt,ae=At,ce=L,Z=bt;function le(t,e){const i=t.size,r=se.getPositions(e);for(let n=0;n<r.length;n++){const o=r[n][0],s=r[n][1];for(let a=-1;a<=7;a++)if(!(o+a<=-1||i<=o+a))for(let u=-1;u<=7;u++)s+u<=-1||i<=s+u||(a>=0&&a<=6&&(u===0||u===6)||u>=0&&u<=6&&(a===0||a===6)||a>=2&&a<=4&&u>=2&&u<=4?t.set(o+a,s+u,!0,!0):t.set(o+a,s+u,!1,!0))}}function fe(t){const e=t.size;for(let i=8;i<e-8;i++){const r=i%2===0;t.set(i,6,r,!0),t.set(6,i,r,!0)}}function ge(t,e){const i=ie.getPositions(e);for(let r=0;r<i.length;r++){const n=i[r][0],o=i[r][1];for(let s=-2;s<=2;s++)for(let a=-2;a<=2;a++)s===-2||s===2||a===-2||a===2||s===0&&a===0?t.set(n+s,o+a,!0,!0):t.set(n+s,o+a,!1,!0)}}function de(t,e){const i=t.size,r=j.getEncodedBits(e);let n,o,s;for(let a=0;a<18;a++)n=Math.floor(a/3),o=a%3+i-8-3,s=(r>>a&1)===1,t.set(n,o,s,!0),t.set(o,n,s,!0)}function x(t,e,i){const r=t.size,n=ae.getEncodedBits(e,i);let o,s;for(o=0;o<15;o++)s=(n>>o&1)===1,o<6?t.set(o,8,s,!0):o<8?t.set(o+1,8,s,!0):t.set(r-15+o,8,s,!0),o<8?t.set(8,r-o-1,s,!0):o<9?t.set(8,15-o-1+1,s,!0):t.set(8,15-o-1,s,!0);t.set(r-8,8,1,!0)}function he(t,e){const i=t.size;let r=-1,n=i-1,o=7,s=0;for(let a=i-1;a>0;a-=2)for(a===6&&a--;;){for(let u=0;u<2;u++)if(!t.isReserved(n,a-u)){let c=!1;s<e.length&&(c=(e[s]>>>o&1)===1),t.set(n,a-u,c),o--,o===-1&&(s++,o=7)}if(n+=r,n<0||i<=n){n-=r,r=-r;break}}}function me(t,e,i){const r=new re;i.forEach(function(u){r.put(u.mode.bit,4),r.put(u.getLength(),ce.getCharCountIndicator(u.mode,t)),u.write(r)});const n=Q.getSymbolTotalCodewords(t),o=rt.getTotalCodewordsCount(t,e),s=(n-o)*8;for(r.getLengthInBits()+4<=s&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const a=(s-r.getLengthInBits())/8;for(let u=0;u<a;u++)r.put(u%2?17:236,8);return we(r,t,e)}function we(t,e,i){const r=Q.getSymbolTotalCodewords(e),n=rt.getTotalCodewordsCount(e,i),o=r-n,s=rt.getBlocksCount(e,i),a=r%s,u=s-a,c=Math.floor(r/s),l=Math.floor(o/s),B=l+1,m=c-l,g=new ue(m);let y=0;const E=new Array(s),N=new Array(s);let h=0;const w=new Uint8Array(t.buffer);for(let A=0;A<s;A++){const S=A<u?l:B;E[A]=w.slice(y,y+S),N[A]=g.encode(E[A]),y+=S,h=Math.max(h,S)}const d=new Uint8Array(r);let f=0,C,p;for(C=0;C<h;C++)for(p=0;p<s;p++)C<E[p].length&&(d[f++]=E[p][C]);for(C=0;C<m;C++)for(p=0;p<s;p++)d[f++]=N[p][C];return d}function ye(t,e,i,r){let n;if(Array.isArray(t))n=Z.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){const l=Z.rawSplit(t);c=j.getBestVersionForData(l,i)}n=Z.fromString(t,c||40)}else throw new Error("Invalid data");const o=j.getBestVersionForData(n,i);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
5
5
  The chosen QR Code version cannot contain this amount of data.
6
6
  Minimum version required to store current data is: `+o+`.
7
- `);const s=me(e,i,n),a=Q.getSymbolSize(e),u=new oe(a);return le(u,e),fe(u),ge(u,e),x(u,i,0),e>=7&&de(u,e),he(u,s),isNaN(r)&&(r=nt.getBestMask(u,x.bind(null,u,i))),nt.applyMask(r,u),x(u,i,r),{modules:u,version:e,errorCorrectionLevel:i,maskPattern:r,segments:n}}dt.create=function(e,i){if(typeof e=="undefined"||e==="")throw new Error("No input text");let r=X.M,n,o;return typeof i!="undefined"&&(r=X.from(i.errorCorrectionLevel,X.M),n=Y.from(i.version),o=nt.from(i.maskPattern),i.toSJISFunc&&Q.setToSJISFunction(i.toSJISFunc)),ye(e,n,r,o)};var St={},at={};(function(t){function e(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let r=i.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+i);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const n=parseInt(r.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const n=typeof r.margin=="undefined"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:o,scale:o?4:s,margin:n,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,n){return n.width&&n.width>=r+n.margin*2?n.width/(r+n.margin*2):n.scale},t.getImageWidth=function(r,n){const o=t.getScale(r,n);return Math.floor((r+n.margin*2)*o)},t.qrToImageData=function(r,n,o){const s=n.modules.size,a=n.modules.data,u=t.getScale(s,o),c=Math.floor((s+o.margin*2)*u),l=o.margin*u,p=[o.color.light,o.color.dark];for(let m=0;m<c;m++)for(let g=0;g<c;g++){let y=(m*c+g)*4,E=o.color.light;if(m>=l&&g>=l&&m<c-l&&g<c-l){const N=Math.floor((m-l)/u),h=Math.floor((g-l)/u);E=p[a[N*s+h]?1:0]}r[y++]=E.r,r[y++]=E.g,r[y++]=E.b,r[y]=E.a}}})(at);(function(t){const e=at;function i(n,o,s){n.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,s,a){let u=a,c=s;typeof u=="undefined"&&(!s||!s.getContext)&&(u=s,s=void 0),s||(c=r()),u=e.getOptions(u);const l=e.getImageWidth(o.modules.size,u),p=c.getContext("2d"),m=p.createImageData(l,l);return e.qrToImageData(m.data,o,u),i(p,c,l),p.putImageData(m,0,0),c},t.renderToDataURL=function(o,s,a){let u=a;typeof u=="undefined"&&(!s||!s.getContext)&&(u=s,s=void 0),u||(u={});const c=t.render(o,s,u),l=u.type||"image/png",p=u.rendererOpts||{};return c.toDataURL(l,p.quality)}})(St);var Tt={};const Ee=at;function gt(t,e){const i=t.a/255,r=e+'="'+t.hex+'"';return i<1?r+" "+e+'-opacity="'+i.toFixed(2).slice(1)+'"':r}function tt(t,e,i){let r=t+e;return typeof i!="undefined"&&(r+=" "+i),r}function Ce(t,e,i){let r="",n=0,o=!1,s=0;for(let a=0;a<t.length;a++){const u=Math.floor(a%e),c=Math.floor(a/e);!u&&!o&&(o=!0),t[a]?(s++,a>0&&u>0&&t[a-1]||(r+=o?tt("M",u+i,.5+c+i):tt("m",n,0),n=0,o=!1),u+1<e&&t[a+1]||(r+=tt("h",s),s=0)):n++}return r}Tt.render=function(e,i,r){const n=Ee.getOptions(i),o=e.modules.size,s=e.modules.data,a=o+n.margin*2,u=n.color.light.a?"<path "+gt(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+gt(n.color.dark,"stroke")+' d="'+Ce(s,o,n.margin)+'"/>',l='viewBox="0 0 '+a+" "+a+'"',p=n.width?'width="'+n.width+'" height="'+n.width+'" ':"",m='<svg xmlns="http://www.w3.org/2000/svg" '+p+l+' shape-rendering="crispEdges">'+u+c+`</svg>
8
- `;return typeof r=="function"&&r(null,m),m};const Be=kt,ot=dt,bt=St,pe=Tt;function ct(t,e,i,r,n){const o=[].slice.call(arguments,1),s=o.length,a=typeof o[s-1]=="function";if(!a&&!Be())throw new Error("Callback required as last argument");if(a){if(s<2)throw new Error("Too few arguments provided");s===2?(n=i,i=e,e=r=void 0):s===3&&(e.getContext&&typeof n=="undefined"?(n=r,r=void 0):(n=r,r=i,i=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(i=e,e=r=void 0):s===2&&!e.getContext&&(r=i,i=e,e=void 0),new Promise(function(u,c){try{const l=ot.create(i,r);u(t(l,e,r))}catch(l){c(l)}})}try{const u=ot.create(i,r);n(null,t(u,e,r))}catch(u){n(u)}}K.create=ot.create;K.toCanvas=ct.bind(null,bt.render);K.toDataURL=ct.bind(null,bt.renderToDataURL);K.toString=ct.bind(null,function(t,e,i){return pe.render(t,i)});const Ae=["low","medium","quartile","high","L","M","Q","H"],Ne=[0,1,2,3,4,5,6,7],Ie=["alphanumeric","numeric","kanji","byte"],Se=["image/png","image/jpeg","image/webp"],Te=40;var Pe=Lt({props:{version:{type:Number,validator:t=>t===Number.parseInt(String(t),10)&&t>=1&&t<=Te},errorCorrectionLevel:{type:String,validator:t=>Ae.includes(t)},maskPattern:{type:Number,validator:t=>Ne.includes(t)},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:t=>["dark","light"].every(e=>["string","undefined"].includes(typeof t[e])),required:!0},type:{type:String,validator:t=>Se.includes(t),required:!0},quality:{type:Number,validator:t=>t===Number.parseFloat(String(t))&&t>=0&&t<=1,required:!1},value:{type:[String,Array],required:!0,validator(t){return typeof t=="string"?!0:t.every(e=>typeof e.data=="string"&&"mode"in e&&Ie.includes(e.mode))}}},setup(t,{attrs:e,emit:i}){const r=Ut();return Dt(t,()=>{const{quality:o,value:s}=t,a=Rt(t,["quality","value"]);K.toDataURL(s,Object.assign(a,o==null||{renderOptions:{quality:o}})).then(u=>{r.value=u,i("change",u)}).catch(u=>i("error",u))},{immediate:!0}),()=>Ft("img",Object.assign(Object.assign({},e),{src:r.value}))}});export{Pe as Q};
7
+ `);const s=me(e,i,n),a=Q.getSymbolSize(e),u=new oe(a);return le(u,e),fe(u),ge(u,e),x(u,i,0),e>=7&&de(u,e),he(u,s),isNaN(r)&&(r=nt.getBestMask(u,x.bind(null,u,i))),nt.applyMask(r,u),x(u,i,r),{modules:u,version:e,errorCorrectionLevel:i,maskPattern:r,segments:n}}dt.create=function(e,i){if(typeof e=="undefined"||e==="")throw new Error("No input text");let r=X.M,n,o;return typeof i!="undefined"&&(r=X.from(i.errorCorrectionLevel,X.M),n=j.from(i.version),o=nt.from(i.maskPattern),i.toSJISFunc&&Q.setToSJISFunction(i.toSJISFunc)),ye(e,n,r,o)};var St={},at={};(function(t){function e(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let r=i.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+i);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(o){return[o,o]}))),r.length===6&&r.push("F","F");const n=parseInt(r.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+r.slice(0,6).join("")}}t.getOptions=function(r){r||(r={}),r.color||(r.color={});const n=typeof r.margin=="undefined"||r.margin===null||r.margin<0?4:r.margin,o=r.width&&r.width>=21?r.width:void 0,s=r.scale||4;return{width:o,scale:o?4:s,margin:n,color:{dark:e(r.color.dark||"#000000ff"),light:e(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},t.getScale=function(r,n){return n.width&&n.width>=r+n.margin*2?n.width/(r+n.margin*2):n.scale},t.getImageWidth=function(r,n){const o=t.getScale(r,n);return Math.floor((r+n.margin*2)*o)},t.qrToImageData=function(r,n,o){const s=n.modules.size,a=n.modules.data,u=t.getScale(s,o),c=Math.floor((s+o.margin*2)*u),l=o.margin*u,B=[o.color.light,o.color.dark];for(let m=0;m<c;m++)for(let g=0;g<c;g++){let y=(m*c+g)*4,E=o.color.light;if(m>=l&&g>=l&&m<c-l&&g<c-l){const N=Math.floor((m-l)/u),h=Math.floor((g-l)/u);E=B[a[N*s+h]?1:0]}r[y++]=E.r,r[y++]=E.g,r[y++]=E.b,r[y]=E.a}}})(at);(function(t){const e=at;function i(n,o,s){n.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,s,a){let u=a,c=s;typeof u=="undefined"&&(!s||!s.getContext)&&(u=s,s=void 0),s||(c=r()),u=e.getOptions(u);const l=e.getImageWidth(o.modules.size,u),B=c.getContext("2d"),m=B.createImageData(l,l);return e.qrToImageData(m.data,o,u),i(B,c,l),B.putImageData(m,0,0),c},t.renderToDataURL=function(o,s,a){let u=a;typeof u=="undefined"&&(!s||!s.getContext)&&(u=s,s=void 0),u||(u={});const c=t.render(o,s,u),l=u.type||"image/png",B=u.rendererOpts||{};return c.toDataURL(l,B.quality)}})(St);var It={};const Ee=at;function gt(t,e){const i=t.a/255,r=e+'="'+t.hex+'"';return i<1?r+" "+e+'-opacity="'+i.toFixed(2).slice(1)+'"':r}function tt(t,e,i){let r=t+e;return typeof i!="undefined"&&(r+=" "+i),r}function Ce(t,e,i){let r="",n=0,o=!1,s=0;for(let a=0;a<t.length;a++){const u=Math.floor(a%e),c=Math.floor(a/e);!u&&!o&&(o=!0),t[a]?(s++,a>0&&u>0&&t[a-1]||(r+=o?tt("M",u+i,.5+c+i):tt("m",n,0),n=0,o=!1),u+1<e&&t[a+1]||(r+=tt("h",s),s=0)):n++}return r}It.render=function(e,i,r){const n=Ee.getOptions(i),o=e.modules.size,s=e.modules.data,a=o+n.margin*2,u=n.color.light.a?"<path "+gt(n.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",c="<path "+gt(n.color.dark,"stroke")+' d="'+Ce(s,o,n.margin)+'"/>',l='viewBox="0 0 '+a+" "+a+'"',B=n.width?'width="'+n.width+'" height="'+n.width+'" ':"",m='<svg xmlns="http://www.w3.org/2000/svg" '+B+l+' shape-rendering="crispEdges">'+u+c+`</svg>
8
+ `;return typeof r=="function"&&r(null,m),m};const pe=kt,ot=dt,Tt=St,Be=It;function ct(t,e,i,r,n){const o=[].slice.call(arguments,1),s=o.length,a=typeof o[s-1]=="function";if(!a&&!pe())throw new Error("Callback required as last argument");if(a){if(s<2)throw new Error("Too few arguments provided");s===2?(n=i,i=e,e=r=void 0):s===3&&(e.getContext&&typeof n=="undefined"?(n=r,r=void 0):(n=r,r=i,i=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(i=e,e=r=void 0):s===2&&!e.getContext&&(r=i,i=e,e=void 0),new Promise(function(u,c){try{const l=ot.create(i,r);u(t(l,e,r))}catch(l){c(l)}})}try{const u=ot.create(i,r);n(null,t(u,e,r))}catch(u){n(u)}}H.create=ot.create;H.toCanvas=ct.bind(null,Tt.render);H.toDataURL=ct.bind(null,Tt.renderToDataURL);H.toString=ct.bind(null,function(t,e,i){return Be.render(t,i)});const Ae=["low","medium","quartile","high","L","M","Q","H"],Ne=[0,1,2,3,4,5,6,7],be=["alphanumeric","numeric","kanji","byte"],Se=["image/png","image/jpeg","image/webp"],Ie=40;var Pe=Rt({props:{version:{type:Number,validator:t=>t===Number.parseInt(String(t),10)&&t>=1&&t<=Ie},errorCorrectionLevel:{type:String,validator:t=>Ae.includes(t)},maskPattern:{type:Number,validator:t=>Ne.includes(t)},toSJISFunc:Function,margin:Number,scale:Number,width:Number,color:{type:Object,validator:t=>["dark","light"].every(e=>["string","undefined"].includes(typeof t[e])),required:!0},type:{type:String,validator:t=>Se.includes(t),required:!0},quality:{type:Number,validator:t=>t===Number.parseFloat(String(t))&&t>=0&&t<=1,required:!1},value:{type:[String,Array],required:!0,validator(t){return typeof t=="string"?!0:t.every(e=>typeof e.data=="string"&&"mode"in e&&be.includes(e.mode))}}},setup(t,{attrs:e,emit:i}){const r=Lt();return Ut(t,()=>{const{quality:o,value:s}=t,a=Ft(t,["quality","value"]);H.toDataURL(s,Object.assign(a,o==null||{renderOptions:{quality:o}})).then(u=>{r.value=u,i("change",u)}).catch(u=>i("error",u))},{immediate:!0}),()=>Dt("img",Object.assign(Object.assign({},e),{src:r.value}))}});export{Pe as Q};
@@ -1,4 +1,4 @@
1
- import"./vendor-others.decd85ac.js";import{H as so,ah as M,X as Dt,y as xr,m as L,J as Ft,v as be,r as q,o as ve,e as mr,L as At,M as Lo,V as ko,I as Be,u as to,A as fr,s as $o,t as br,aa as vr,q as co,p as Ot,x as Wt,F as Sr,G as yr,l as Lt,a6 as kt,W as jt,n as Rt,_ as Hr,f as Pr,aJ as Et,C as _t}from"./vendor-@vue.31495dbd.js";function K(o){return typeof o=="string"?o.endsWith("px")?Number(o.slice(0,o.length-2)):Number(o):o}function ne(o){if(o!=null)return typeof o=="number"?`${o}px`:o.endsWith("px")?o:`${o}px`}const De={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"},ho="^\\s*",xo="\\s*$",lo="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",no="([0-9A-Fa-f])",io="([0-9A-Fa-f]{2})",Gt=new RegExp(`${ho}rgb\\s*\\(${lo},${lo},${lo}\\)${xo}`),Nt=new RegExp(`${ho}rgba\\s*\\(${lo},${lo},${lo},${lo}\\)${xo}`),Vt=new RegExp(`${ho}#${no}${no}${no}${xo}`),Ut=new RegExp(`${ho}#${io}${io}${io}${xo}`),qt=new RegExp(`${ho}#${no}${no}${no}${no}${xo}`),Qt=new RegExp(`${ho}#${io}${io}${io}${io}${xo}`);function G(o){return parseInt(o,16)}function X(o){try{let e;if(e=Ut.exec(o))return[G(e[1]),G(e[2]),G(e[3]),1];if(e=Gt.exec(o))return[E(e[1]),E(e[5]),E(e[9]),1];if(e=Nt.exec(o))return[E(e[1]),E(e[5]),E(e[9]),Io(e[13])];if(e=Vt.exec(o))return[G(e[1]+e[1]),G(e[2]+e[2]),G(e[3]+e[3]),1];if(e=Qt.exec(o))return[G(e[1]),G(e[2]),G(e[3]),Io(G(e[4])/255)];if(e=qt.exec(o))return[G(e[1]+e[1]),G(e[2]+e[2]),G(e[3]+e[3]),Io(G(e[4]+e[4])/255)];if(o in De)return X(De[o]);throw new Error(`[seemly/rgba]: Invalid color value ${o}.`)}catch(e){throw e}}function Jt(o){return o>1?1:o<0?0:o}function de(o,e,r,t){return`rgba(${E(o)}, ${E(e)}, ${E(r)}, ${Jt(t)})`}function ie(o,e,r,t,l){return E((o*e*(1-t)+r*t)/l)}function H(o,e){Array.isArray(o)||(o=X(o)),Array.isArray(e)||(e=X(e));const r=o[3],t=e[3],l=Io(r+t-r*t);return de(ie(o[0],r,e[0],t,l),ie(o[1],r,e[1],t,l),ie(o[2],r,e[2],t,l),l)}function v(o,e){const[r,t,l,n=1]=Array.isArray(o)?o:X(o);return e.alpha?de(r,t,l,e.alpha):de(r,t,l,n)}function W(o,e){const[r,t,l,n=1]=Array.isArray(o)?o:X(o),{lightness:i=1,alpha:a=1}=e;return Yt([r*i,t*i,l*i,n*a])}function Io(o){const e=Math.round(Number(o)*100)/100;return e>1?1:e<0?0:e}function E(o){const e=Math.round(Number(o));return e>255?255:e<0?0:e}function Yt(o){const[e,r,t]=o;return 3 in o?`rgba(${E(e)}, ${E(r)}, ${E(t)}, ${Io(o[3])})`:`rgba(${E(e)}, ${E(r)}, ${E(t)}, 1)`}function _o(o,...e){if(Array.isArray(o))o.forEach(r=>_o(r,...e));else return o(...e)}const Fe=new Set;function Kt(o,e){const r=`[naive/${o}]: ${e}`;Fe.has(r)||(Fe.add(r),console.error(r))}function Xt(o,e){console.error(`[naive/${o}]: ${e}`)}function wr(o,e){throw new Error(`[naive/${o}]: ${e}`)}function Se(o){return o.some(e=>Lt(e)?!(e.type===kt||e.type===jt&&!Se(e.children)):!0)?o:null}function ro(o,e){const r=o&&Se(o());return e(r||null)}function ae(o){return!(o&&Se(o()))}const Zt=/^(\d|\.)+$/,Ae=/(\d|\.)+/;function ol(o,{c:e=1,offset:r=0,attachPx:t=!0}={}){if(typeof o=="number"){const l=(o+r)*e;return l===0?"0":`${l}px`}else if(typeof o=="string")if(Zt.test(o)){const l=(Number(o)+r)*e;return t?l===0?"0":`${l}px`:`${l}`}else{const l=Ae.exec(o);return l?o.replace(Ae,String((Number(l[0])+r)*e)):o}return o}function el(o){let e=0;for(let r=0;r<o.length;++r)o[r]==="&"&&++e;return e}const zr=/\s*,(?![^(]*\))\s*/g,rl=/\s+/g;function tl(o,e){const r=[];return e.split(zr).forEach(t=>{let l=el(t);if(l){if(l===1){o.forEach(i=>{r.push(t.replace("&",i))});return}}else{o.forEach(i=>{r.push((i&&i+" ")+t)});return}let n=[t];for(;l--;){const i=[];n.forEach(a=>{o.forEach(c=>{i.push(a.replace("&",c))})}),n=i}n.forEach(i=>r.push(i))}),r}function ll(o,e){const r=[];return e.split(zr).forEach(t=>{o.forEach(l=>{r.push((l&&l+" ")+t)})}),r}function nl(o){let e=[""];return o.forEach(r=>{r=r&&r.trim(),r&&(r.includes("&")?e=tl(e,r):e=ll(e,r))}),e.join(", ").replace(rl," ")}function Oe(o){if(!o)return;const e=o.parentElement;e&&e.removeChild(o)}function ye(o){return document.querySelector(`style[cssr-id="${o}"]`)}function il(o){const e=document.createElement("style");return e.setAttribute("cssr-id",o),e}function jo(o){return o?/^\s*@(s|m)/.test(o):!1}const al=/[A-Z]/g;function Ir(o){return o.replace(al,e=>"-"+e.toLowerCase())}function sl(o,e=" "){return typeof o=="object"&&o!==null?` {
1
+ import"./vendor-others.ecc384b7.js";import{H as so,ah as M,X as Dt,y as xr,m as L,J as Ft,v as be,r as q,o as ve,e as mr,L as At,M as Lo,V as ko,I as Be,u as to,A as fr,s as $o,t as br,aa as vr,q as co,p as Ot,x as Wt,F as Sr,G as yr,l as Lt,a6 as kt,W as jt,n as Rt,_ as Hr,f as Pr,aJ as Et,C as _t}from"./vendor-@vue.b201070f.js";function K(o){return typeof o=="string"?o.endsWith("px")?Number(o.slice(0,o.length-2)):Number(o):o}function ne(o){if(o!=null)return typeof o=="number"?`${o}px`:o.endsWith("px")?o:`${o}px`}const De={black:"#000",silver:"#C0C0C0",gray:"#808080",white:"#FFF",maroon:"#800000",red:"#F00",purple:"#800080",fuchsia:"#F0F",green:"#008000",lime:"#0F0",olive:"#808000",yellow:"#FF0",navy:"#000080",blue:"#00F",teal:"#008080",aqua:"#0FF",transparent:"#0000"},ho="^\\s*",xo="\\s*$",lo="\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*",no="([0-9A-Fa-f])",io="([0-9A-Fa-f]{2})",Gt=new RegExp(`${ho}rgb\\s*\\(${lo},${lo},${lo}\\)${xo}`),Nt=new RegExp(`${ho}rgba\\s*\\(${lo},${lo},${lo},${lo}\\)${xo}`),Vt=new RegExp(`${ho}#${no}${no}${no}${xo}`),Ut=new RegExp(`${ho}#${io}${io}${io}${xo}`),qt=new RegExp(`${ho}#${no}${no}${no}${no}${xo}`),Qt=new RegExp(`${ho}#${io}${io}${io}${io}${xo}`);function G(o){return parseInt(o,16)}function X(o){try{let e;if(e=Ut.exec(o))return[G(e[1]),G(e[2]),G(e[3]),1];if(e=Gt.exec(o))return[E(e[1]),E(e[5]),E(e[9]),1];if(e=Nt.exec(o))return[E(e[1]),E(e[5]),E(e[9]),Io(e[13])];if(e=Vt.exec(o))return[G(e[1]+e[1]),G(e[2]+e[2]),G(e[3]+e[3]),1];if(e=Qt.exec(o))return[G(e[1]),G(e[2]),G(e[3]),Io(G(e[4])/255)];if(e=qt.exec(o))return[G(e[1]+e[1]),G(e[2]+e[2]),G(e[3]+e[3]),Io(G(e[4]+e[4])/255)];if(o in De)return X(De[o]);throw new Error(`[seemly/rgba]: Invalid color value ${o}.`)}catch(e){throw e}}function Jt(o){return o>1?1:o<0?0:o}function de(o,e,r,t){return`rgba(${E(o)}, ${E(e)}, ${E(r)}, ${Jt(t)})`}function ie(o,e,r,t,l){return E((o*e*(1-t)+r*t)/l)}function H(o,e){Array.isArray(o)||(o=X(o)),Array.isArray(e)||(e=X(e));const r=o[3],t=e[3],l=Io(r+t-r*t);return de(ie(o[0],r,e[0],t,l),ie(o[1],r,e[1],t,l),ie(o[2],r,e[2],t,l),l)}function v(o,e){const[r,t,l,n=1]=Array.isArray(o)?o:X(o);return e.alpha?de(r,t,l,e.alpha):de(r,t,l,n)}function W(o,e){const[r,t,l,n=1]=Array.isArray(o)?o:X(o),{lightness:i=1,alpha:a=1}=e;return Yt([r*i,t*i,l*i,n*a])}function Io(o){const e=Math.round(Number(o)*100)/100;return e>1?1:e<0?0:e}function E(o){const e=Math.round(Number(o));return e>255?255:e<0?0:e}function Yt(o){const[e,r,t]=o;return 3 in o?`rgba(${E(e)}, ${E(r)}, ${E(t)}, ${Io(o[3])})`:`rgba(${E(e)}, ${E(r)}, ${E(t)}, 1)`}function _o(o,...e){if(Array.isArray(o))o.forEach(r=>_o(r,...e));else return o(...e)}const Fe=new Set;function Kt(o,e){const r=`[naive/${o}]: ${e}`;Fe.has(r)||(Fe.add(r),console.error(r))}function Xt(o,e){console.error(`[naive/${o}]: ${e}`)}function wr(o,e){throw new Error(`[naive/${o}]: ${e}`)}function Se(o){return o.some(e=>Lt(e)?!(e.type===kt||e.type===jt&&!Se(e.children)):!0)?o:null}function ro(o,e){const r=o&&Se(o());return e(r||null)}function ae(o){return!(o&&Se(o()))}const Zt=/^(\d|\.)+$/,Ae=/(\d|\.)+/;function ol(o,{c:e=1,offset:r=0,attachPx:t=!0}={}){if(typeof o=="number"){const l=(o+r)*e;return l===0?"0":`${l}px`}else if(typeof o=="string")if(Zt.test(o)){const l=(Number(o)+r)*e;return t?l===0?"0":`${l}px`:`${l}`}else{const l=Ae.exec(o);return l?o.replace(Ae,String((Number(l[0])+r)*e)):o}return o}function el(o){let e=0;for(let r=0;r<o.length;++r)o[r]==="&"&&++e;return e}const zr=/\s*,(?![^(]*\))\s*/g,rl=/\s+/g;function tl(o,e){const r=[];return e.split(zr).forEach(t=>{let l=el(t);if(l){if(l===1){o.forEach(i=>{r.push(t.replace("&",i))});return}}else{o.forEach(i=>{r.push((i&&i+" ")+t)});return}let n=[t];for(;l--;){const i=[];n.forEach(a=>{o.forEach(c=>{i.push(a.replace("&",c))})}),n=i}n.forEach(i=>r.push(i))}),r}function ll(o,e){const r=[];return e.split(zr).forEach(t=>{o.forEach(l=>{r.push((l&&l+" ")+t)})}),r}function nl(o){let e=[""];return o.forEach(r=>{r=r&&r.trim(),r&&(r.includes("&")?e=tl(e,r):e=ll(e,r))}),e.join(", ").replace(rl," ")}function Oe(o){if(!o)return;const e=o.parentElement;e&&e.removeChild(o)}function ye(o){return document.querySelector(`style[cssr-id="${o}"]`)}function il(o){const e=document.createElement("style");return e.setAttribute("cssr-id",o),e}function jo(o){return o?/^\s*@(s|m)/.test(o):!1}const al=/[A-Z]/g;function Ir(o){return o.replace(al,e=>"-"+e.toLowerCase())}function sl(o,e=" "){return typeof o=="object"&&o!==null?` {
2
2
  `+Object.entries(o).map(r=>e+` ${Ir(r[0])}: ${r[1]};`).join(`
3
3
  `)+`
4
4
  `+e+"}":`: ${o};`}function cl(o,e,r){return typeof o=="function"?o({context:e.context,props:r}):o}function We(o,e,r,t){if(!e)return"";const l=cl(e,r,t);if(!l)return"";if(typeof l=="string")return`${o} {
package/dist/index.html CHANGED
@@ -4,14 +4,15 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
6
6
  <title>Nexior</title>
7
- <script type="module" crossorigin src="/assets/index.748c2eb2.js"></script>
8
- <link rel="modulepreload" href="/assets/vendor-@vue.31495dbd.js">
9
- <link rel="modulepreload" href="/assets/vendor-element-plus.eeef3ee7.js">
10
- <link rel="modulepreload" href="/assets/vendor-others.decd85ac.js">
7
+ <script type="module" crossorigin src="/assets/index.f357c50b.js"></script>
8
+ <link rel="modulepreload" href="/assets/vendor-@vue.b201070f.js">
9
+ <link rel="modulepreload" href="/assets/vendor-element-plus.ec5f1739.js">
10
+ <link rel="modulepreload" href="/assets/vendor-others.ecc384b7.js">
11
11
  <link rel="modulepreload" href="/assets/vendor-axios.168e6950.js">
12
- <link rel="modulepreload" href="/assets/vendor-fortawesome.35fae32b.js">
12
+ <link rel="modulepreload" href="/assets/vendor-qrcode.1cdaa2c5.js">
13
+ <link rel="modulepreload" href="/assets/vendor-fortawesome.7c293b44.js">
13
14
  <link rel="stylesheet" href="/assets/vendor-others.bcdc6bd8.css">
14
- <link rel="stylesheet" href="/assets/index.62d00e03.css">
15
+ <link rel="stylesheet" href="/assets/index.8688d47f.css">
15
16
  </head>
16
17
  <body>
17
18
  <div id="app">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/nexior",
3
- "version": "2.0.6",
3
+ "version": "2.1.0",
4
4
  "author": "Germey Technology <dev@germey.tech>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,12 @@
11
11
  ],
12
12
  "scripts": {
13
13
  "start": "vite --host",
14
- "build": "vite build --mode=development",
14
+ "build": "yarn build:web",
15
+ "build:web": "cross-env VITE_SURFACE=web vite build --mode development",
16
+ "build:android": "cross-env VITE_SURFACE=android vite build --mode development",
17
+ "build:ios": "cross-env VITE_SURFACE=ios vite build --mode development",
18
+ "pack:android": "yarn build:android && npx cap copy android",
19
+ "pack:ios": "yarn build:ios && npx cap copy ios",
15
20
  "serve": "vite preview",
16
21
  "translate": "transmart",
17
22
  "lint": "eslint src --fix --ext .ts,.tsx,.vue,.js,.jsx",
@@ -62,6 +67,10 @@
62
67
  "vuex-persistedstate": "^4.0.0"
63
68
  },
64
69
  "devDependencies": {
70
+ "@capacitor/android": "^6.1.1",
71
+ "@capacitor/cli": "^6.1.1",
72
+ "@capacitor/core": "^6.1.1",
73
+ "@capacitor/ios": "^6.1.1",
65
74
  "@rollup/plugin-replace": "^3.0.0",
66
75
  "@transmart/cli": "^0.5.0",
67
76
  "@types/lodash": "^4.14.172",
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{_}from"./index.748c2eb2.js";import{j as s,k as c}from"./vendor-element-plus.eeef3ee7.js";import{H as i,al as e,L as p,M as o,o as l,V as t}from"./vendor-@vue.31495dbd.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const u=i({name:"LayoutAuth",components:{ElContainer:s,ElMain:c}});function m(d,f,v,h,x,k){const n=e("router-view"),r=e("el-main"),a=e("el-container");return l(),p(a,null,{default:o(()=>[t(r,null,{default:o(()=>[t(n)]),_:1})]),_:1})}var B=_(u,[["render",m],["__scopeId","data-v-8e16c232"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Auth.vue"]]);export{B as default};
@@ -1 +0,0 @@
1
- var U=Object.defineProperty,z=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var N=(e,a,t)=>a in e?U(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,S=(e,a)=>{for(var t in a||(a={}))H.call(a,t)&&N(e,t,a[t]);if(P)for(var t of P(a))J.call(a,t)&&N(e,t,a[t]);return e},w=(e,a)=>z(e,G(a));import"./vendor-others.decd85ac.js";import{_ as O,w as K,x as Q}from"./index.748c2eb2.js";import{g as V}from"./price.b1cf3677.js";import{H as A,o as r,e as g,U as p,al as l,L as k,M as i,V as o,f as W,T as E,ai as j,W as X,S as C,Q as F}from"./vendor-@vue.31495dbd.js";import{o as Y}from"./order.ef27e43c.js";import{A as Z,b as x,a as ee,n as ae,G as te,H as ie,i as oe,B as re,I as se,J as ne,K as le}from"./vendor-element-plus.eeef3ee7.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const pe=A({name:"ApiPrice",props:{price:{type:Number,required:!1,default:0},unit:{type:String,required:!1,default:void 0},start:{type:Boolean,required:!1,default:!1}},methods:{getPriceString:V}}),ce={class:"price-text"},de={key:0,class:"unfree"},ue={key:1,class:"free"};function me(e,a,t,c,u,v){return r(),g("div",ce,[e.price>0?(r(),g("span",de,p(e.getPriceString({value:e.price}))+" "+p(e.unit?` / ${e.unit}`:"")+p(e.start?e.$t("common.message.startPrice"):""),1)):(r(),g("span",ue,p(e.$t("common.message.free")),1))])}var fe=O(pe,[["render",me],["__scopeId","data-v-d195ccd6"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/Price.vue"]]);const _e=A({name:"ConsoleApplicationBuy",components:{ElSkeleton:Z,ElRow:x,ElCol:ee,ElCard:ae,ElForm:te,ElFormItem:ie,ElButton:oe,ElDivider:re,ElRadioGroup:se,ElRadioButton:ne,Price:fe},data(){return{application:void 0,loading:!1,form:{packageId:void 0,amount:void 0},creating:!1}},computed:{id(){var e,a;return(a=(e=this.$route.params)==null?void 0:e.id)==null?void 0:a.toString()},price(){var e,a,t;return((a=(e=this.application)==null?void 0:e.service)==null?void 0:a.price)&&this.form.amount?this.form.amount*((t=this.application.service)==null?void 0:t.price):0},package(){var e,a,t;if(((a=(e=this.application)==null?void 0:e.service)==null?void 0:a.packages)&&this.form.packageId){const c=(t=this.application.service)==null?void 0:t.packages.filter(u=>u.id===this.form.packageId);if(c.length>0)return c[0]}}},mounted(){this.onFetchApplication()},methods:{getPriceString:V,onFetchApplication(){this.loading=!0,K.get(this.id).then(({data:e})=>{var a,t,c,u;this.application=e,this.loading=!1,this.form.packageId=(u=(c=(t=(a=this.application)==null?void 0:a.service)==null?void 0:t.packages)==null?void 0:c[0])==null?void 0:u.id}).catch(()=>{this.loading=!1})},onCreateOrder(){var a,t,c,u,v,m,f,$;if(!((a=this.application)!=null&&a.id))return;this.creating=!0;const e=this.$t(`service.unit.${(c=(t=this.application)==null?void 0:t.service)==null?void 0:c.unit}s`);Y.create(w(S({application_id:(u=this.application)==null?void 0:u.id,amount:(v=this.package)==null?void 0:v.amount},this.form.packageId!=="custom"&&this.package?{package_id:this.package.id}:{}),{description:`${(f=(m=this.application)==null?void 0:m.service)==null?void 0:f.title} x ${($=this.package)==null?void 0:$.amount} ${e}`})).then(({data:_})=>{this.creating=!1;const b=_;this.$router.push({name:Q,params:{id:b.id}})}).catch(()=>{le.error(this.$t("order.message.createFailed")),this.creating=!1})}}}),ge={class:"title"},he={key:0,class:"ml-2"},ke={key:1,class:F({price:!0,free:!0})};function ve(e,a,t,c,u,v){const m=l("el-col"),f=l("el-row"),$=l("el-skeleton"),_=l("el-form-item"),b=l("el-radio-button"),R=l("el-radio-group"),D=l("price"),L=l("el-divider"),T=l("el-button"),q=l("el-form"),M=l("el-card");return r(),k(f,{class:"panel"},{default:i(()=>[o(m,{span:24},{default:i(()=>[o(f,null,{default:i(()=>[o(m,{span:24},{default:i(()=>[W("h2",ge,p(e.$t("common.title.buyMore")),1)]),_:1})]),_:1}),o(f,null,{default:i(()=>[o(m,{span:24},{default:i(()=>[o(M,{shadow:"hover"},{default:i(()=>[o(f,null,{default:i(()=>[o(m,{span:16,offset:4},{default:i(()=>[e.loading?(r(),k($,{key:0})):e.application?(r(),k(q,{key:1,"label-width":"100px"},{default:i(()=>[o(_,{label:e.$t("application.field.service")},{default:i(()=>{var s,n;return[E(p((n=(s=e.application)==null?void 0:s.service)==null?void 0:n.title),1)]}),_:1},8,["label"]),o(_,{label:e.$t("application.field.package")},{default:i(()=>{var s,n;return[(n=(s=e.application)==null?void 0:s.service)!=null&&n.packages?(r(),k(R,{key:0,modelValue:e.form.packageId,"onUpdate:modelValue":a[0]||(a[0]=d=>e.form.packageId=d)},{default:i(()=>{var d;return[(r(!0),g(X,null,j((d=e.application)==null?void 0:d.service.packages,(h,y)=>(r(),k(b,{key:y,label:h.id,class:"mb-2"},{default:i(()=>{var B,I;return[E(p(h.amount)+" "+p(e.$t(`service.unit.${(I=(B=e.application)==null?void 0:B.service)==null?void 0:I.unit}s`)),1)]}),_:2},1032,["label"]))),128))]}),_:1},8,["modelValue"])):C("v-if",!0)]}),_:1},8,["label"]),o(_,{label:e.$t("service.field.price")},{default:i(()=>{var s,n,d,h,y;return[o(D,{price:(s=e.package)==null?void 0:s.price},null,8,["price"]),e.package?(r(),g("span",he,"("+p(e.getPriceString({value:((n=e.package)==null?void 0:n.price)/((d=e.package)==null?void 0:d.amount)})+" / "+e.$t(`service.unit.${(y=(h=e.application)==null?void 0:h.service)==null?void 0:y.unit}`))+") ",1)):C("v-if",!0)]}),_:1},8,["label"]),o(L,{"border-style":"dashed"}),o(_,{label:e.$t("application.field.shouldPayPrice")},{default:i(()=>{var s,n,d;return[e.package?(r(),g("span",{key:0,class:F({price:!0,unfree:((s=e.package)==null?void 0:s.price)>0,free:((n=e.package)==null?void 0:n.price)===0})},p(e.getPriceString({value:(d=e.package)==null?void 0:d.price})),3)):(r(),g("span",ke," $ 0 "))]}),_:1},8,["label"]),o(_,null,{default:i(()=>[o(T,{type:"primary",size:"large",class:"btn-create",loading:e.creating,round:"",onClick:e.onCreateOrder},{default:i(()=>[E(p(e.$t("application.button.createOrder")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})):C("v-if",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}var Se=O(_e,[["render",ve],["__scopeId","data-v-5881dfca"],["__file","/home/runner/work/Nexior/Nexior/src/pages/console/application/Buy.vue"]]);export{Se as default};
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{_ as r}from"./index.748c2eb2.js";import{H as t}from"./vendor-@vue.31495dbd.js";import"./vendor-element-plus.eeef3ee7.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const a=t({name:"AuthCallback",data(){var e;return{redirect:(e=this.$route.query.redirect)==null?void 0:e.toString()}},async mounted(){this.redirect?await this.$router.push(this.redirect):await this.$router.push("/")}});var p=r(a,[["__scopeId","data-v-4aa7f9d0"],["__file","/home/runner/work/Nexior/Nexior/src/pages/auth/Callback.vue"]]);export{p as default};
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{N as h}from"./Navigator.74c173af.js";import{B as v,d as $,e as w,f as N,R as g,_}from"./index.748c2eb2.js";import{ai as L}from"./vendor-fortawesome.35fae32b.js";import{H as l,al as a,o as t,e as i,f as s,W as S,ai as x,Q as C,V as r,U as E,L as O,S as y,aK as I,aL as k}from"./vendor-@vue.31495dbd.js";import"./vendor-element-plus.eeef3ee7.js";import"./DarkSelector.434c896b.js";import"./vendor-vue-dark-switch.81063cc1.js";import"./vendor-axios.168e6950.js";const R=l({name:"Navigator",components:{FontAwesomeIcon:L},computed:{isOfficial(){return window.location.origin===v},active(){return this.$route.matched[0].path},user(){return this.$store.getters.user},links(){return[{key:"application-list",text:this.$t("console.menu.applicationList"),name:$,icon:"fa-solid fa-cube"},{key:"order-list",text:this.$t("console.menu.orderList"),name:w,icon:"fa-solid fa-store"},{key:"usage-list",text:this.$t("console.menu.usageList"),name:N,icon:"fa-solid fa-rotate-left"}]}},mounted(){},methods:{onHome(){this.$router.push({name:g})},onNavigate(e){e.name?this.$router.push({name:e.name}):e.href&&window.open(e.href,"_blank")}}}),T=e=>(I("data-v-3859f1b5"),e=e(),k(),e),U={class:"side-panel"},b={class:"links"},B=["onClick"],A={class:"icon"},P={class:"text"},V={class:"outer"},D=T(()=>s("span",{class:"suffix"},null,-1));function H(e,d,m,p,u,f){const n=a("font-awesome-icon");return t(),i("div",U,[s("div",b,[(t(!0),i(S,null,x(e.links,(o,c)=>(t(),i("a",{key:c,class:C({link:!0,active:e.$route.name===o.name}),onClick:K=>e.onNavigate(o)},[s("span",A,[r(n,{icon:o.icon,class:"text-sm"},null,8,["icon"])]),s("span",P,E(o.text),1),s("span",V,[!o.name&&o.href?(t(),O(n,{key:0,icon:"fa-solid fa-up-right-from-square",class:"text-sm ml-2"})):y("v-if",!0)]),D],10,B))),128))])])}var W=_(R,[["render",H],["__scopeId","data-v-3859f1b5"],["__file","/home/runner/work/Nexior/Nexior/src/components/console/SidePanel.vue"]]);const z=l({name:"LayoutConsole",components:{SidePanel:W,Navigator:h},data(){return{mobile:window.innerWidth<768}},mounted(){window.addEventListener("resize",()=>{this.mobile=window.innerWidth<768})}}),F={class:"wrapper"},q={class:"main"};function G(e,d,m,p,u,f){const n=a("side-panel"),o=a("router-view"),c=a("navigator");return t(),i("div",F,[s("div",q,[r(n,{class:"side"}),r(o,{class:"panel"})]),r(c,{class:"navigator",direction:e.mobile?"row":"column"},null,8,["direction"])])}var se=_(z,[["render",G],["__scopeId","data-v-44569c68"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Console.vue"]]);export{se as default};
@@ -1 +0,0 @@
1
- var se=Object.defineProperty;var B=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var P=(e,t,a)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,A=(e,t)=>{for(var a in t||(t={}))oe.call(t,a)&&P(e,a,t[a]);if(B)for(var a of B(t))ne.call(t,a)&&P(e,a,t[a]);return e};import{a as ae}from"./vendor-axios.168e6950.js";import{I as ie}from"./vendor-others.decd85ac.js";import{_ as E,I as N,y as T,v as re,z as le,A as U,D as H,E as W,F as z,G as F,H as G,i as Q,J as L,j as Y,K as j}from"./index.748c2eb2.js";import{H as S,o as n,e as d,al as i,f as l,L as f,S as v,W as I,ai as D,M as C,T as de,U as b,Q as q,V as g,O as ce,aw as ue,a0 as V,as as X,$ as O,I as K}from"./vendor-@vue.31495dbd.js";import{M as pe,E as Z,a as ee,b as he,c as me,d as _e,e as ge,f as fe,g as x,A as $e,h as ye}from"./Status.e8e87eff.js";import{C as we}from"./CopyToClipboard.6e16b453.js";import{C as ke,i as te,o as ve,q as Ce,L as be,K as J,d as Ee,M as Se,h as Ie,b as Ne,a as De,N as Ae,A as Oe,O as Re}from"./vendor-element-plus.eeef3ee7.js";import{ai as R}from"./vendor-fortawesome.35fae32b.js";import{i as Te}from"./is.dd611415.js";import"./application.ea1e2a72.js";import"./vendor-markdown.95c097e3.js";import"./vendor-highlight.js.19da0c9f.js";const qe=S({name:"AnsweringMark",data(){return{}},computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()}}}),Me={class:"mark"};function Ue(e,t,a,m,k,o){return n(),d("div",Me)}var Ge=E(qe,[["render",Ue],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/AnsweringMark.vue"]]);const Le=S({name:"Message",components:{CopyToClipboard:we,AnsweringMark:Ge,MarkdownRenderer:pe,ElAlert:ke,ElButton:te,ElImage:ve},props:{message:{type:Object,required:!0},application:{type:Object,required:!0}},emits:["stop"],data(){return{copied:!1,messageState:N}},computed:{errorText(){var e,t;if(!(!this.message.error||!((e=this.message.error)!=null&&e.code)))switch((t=this.message.error)==null?void 0:t.code){case x:return this.$t("chat.message.errorUsedUp");case fe:return this.$t("chat.message.errorApiError");case ge:return this.$t("chat.message.errorBadRequest");case _e:return this.$t("chat.message.errorTimeout");case me:return this.$t("chat.message.errorTooManyRequests");case he:return this.$t("chat.message.errorContentTooLarge");case ee:return this.$t("chat.message.errorNotApplied");case Z:default:return this.$t("chat.message.errorUnknown")}},showBuyMore(){var e;return this.message.role===T&&((e=this.message.error)==null?void 0:e.code)===x}},methods:{onCopy(){ie(this.message.content.toString(),{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)},onBuyMore(){var e;this.$router.push({name:re,params:{id:(e=this.application)==null?void 0:e.id}})}}}),Ve=["role"],Be={class:"author"},Pe={key:0,class:"main"},He={class:"content"},We={key:1},ze=["src"],Fe={class:"operations"};function je(e,t,a,m,k,o){var w;const c=i("el-image"),u=i("markdown-renderer"),_=i("answering-mark"),r=i("copy-to-clipboard"),h=i("el-alert"),s=i("el-button");return n(),d("div",{class:q({message:!0,[e.message.role]:!0}),role:e.message.role},[l("div",Be,[e.message.role==="assistant"?(n(),f(c,{key:0,src:"https://cdn.acedata.cloud/7dljuv.png",fit:"cover",class:"avatar"})):v("v-if",!0)]),e.errorText?(n(),f(h,{key:1,class:"error",title:e.errorText,type:"error",closable:!1},null,8,["title"])):(n(),d("div",Pe,[l("div",He,[Array.isArray(e.message.content)?(n(),d("div",We,[(n(!0),d(I,null,D(e.message.content,($,p)=>{var y;return n(),d("div",{key:p},[$.type==="image_url"?(n(),d("img",{key:0,src:typeof($==null?void 0:$.image_url)=="string"?$.image_url:(y=$.image_url)==null?void 0:y.url,fit:"cover",class:"image"},null,8,ze)):v("v-if",!0),$.type==="text"?(n(),f(u,{key:p,content:$.text},null,8,["content"])):v("v-if",!0)])}),128))])):(n(),f(u,{key:0,content:(w=e.message)==null?void 0:w.content},null,8,["content"])),e.message.state===e.messageState.PENDING?(n(),f(_,{key:2})):v("v-if",!0)]),l("div",Fe,[Array.isArray(e.message.content)?v("v-if",!0):(n(),f(r,{key:0,content:e.message.content,class:"btn-copy"},null,8,["content"]))])])),e.showBuyMore?(n(),f(s,{key:2,round:"",type:"primary",class:"btn btn-buy",size:"small",onClick:e.onBuyMore},{default:C(()=>[de(b(e.$t("common.button.buyMore")),1)]),_:1},8,["onClick"])):v("v-if",!0)],10,Ve)}var Ke=E(Le,[["render",je],["__scopeId","data-v-f0476f80"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Message.vue"]]);const xe=S({name:"InputBox",components:{ElTooltip:Ce,FontAwesomeIcon:R,ElUpload:be},props:{disabled:{type:Boolean,required:!1,default:!1},references:{type:Array,required:!1,default:()=>[]},question:{type:String,required:!0}},emits:["update:question","update:references","submit"],data(){return{inputHeight:"35px",questionValue:this.question,fileList:[],uploadUrl:le()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var t;return(t=e==null?void 0:e.response)==null?void 0:t.file_url})},canUpload(){return[U.name].includes(this.model.name)},model(){return this.$store.state.chat.model}},watch:{urls(e){this.$emit("update:references",e)},questionValue(e){this.$emit("update:question",e)},question(e){e!==this.questionValue&&(this.questionValue=e)},references(e){e.length===0&&(this.fileList=[])}},methods:{adjustTextareaHeight(){this.$nextTick(()=>{const e=this.$refs.textarea;e&&(e.style.height="35px",e.style.height=e.scrollHeight+"px")})},onSubmit(){!this.question||this.$emit("submit")},onExceed(){J.warning(this.$t("chat.message.uploadReferencesExceed"))},onError(){J.error(this.$t("chat.message.uploadReferencesError"))}}}),Je={class:"input-box"},Qe={class:"btn btn-upload"},Ye=["disabled","placeholder"],Xe={class:"info"};function Ze(e,t,a,m,k,o){const c=i("font-awesome-icon"),u=i("el-tooltip"),_=i("el-upload");return n(),d(I,null,[l("div",Je,[g(_,{"file-list":e.fileList,"onUpdate:file-list":t[0]||(t[0]=r=>e.fileList=r),class:q({upload:!0,disabled:!e.canUpload}),disabled:!e.canUpload,name:"file","show-file-list":!0,limit:1,multiple:!1,action:e.uploadUrl,"on-exceed":e.onExceed,"on-error":e.onError,headers:e.headers},{default:C(()=>[g(u,{class:"box-item",effect:"dark",content:e.$t("chat.message.uploadFile"),placement:"top"},{default:C(()=>[l("span",Qe,[g(c,{icon:"fa-solid fa-paperclip",class:"icon icon-attachment"})])]),_:1},8,["content"])]),_:1},8,["file-list","class","disabled","action","on-exceed","on-error","headers"]),l("span",{class:q({btn:!0,"btn-send":!0,disabled:!e.questionValue}),onClick:t[1]||(t[1]=(...r)=>e.onSubmit&&e.onSubmit(...r))},[g(c,{icon:"fa-solid fa-location-arrow",class:"icon icon-send"})],2),v(" add this textarea "),ce(l("textarea",{ref:"textarea","onUpdate:modelValue":t[2]||(t[2]=r=>e.questionValue=r),disabled:e.disabled,class:"input",placeholder:e.$t("chat.message.newMessagePlaceholder"),style:V({height:e.inputHeight}),onKeydown:t[3]||(t[3]=X(O((...r)=>e.onSubmit&&e.onSubmit(...r),["exact","prevent"]),["enter"])),onInput:t[4]||(t[4]=(...r)=>e.adjustTextareaHeight&&e.adjustTextareaHeight(...r))},null,44,Ye),[[ue,e.questionValue]])]),l("p",Xe,b(e.$t("chat.message.howToUse")),1)],64)}var et=E(xe,[["render",Ze],["__scopeId","data-v-020f4eb8"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/InputBox.vue"]]);const tt=S({name:"ModelSelector",components:{ElDropdown:Ee,ElDropdownMenu:Se,ElDropdownItem:Ie,FontAwesomeIcon:R},emits:["update:modelValue","select"],data(){return{options:[{icon:"fa-solid fa-bolt",color:"#ff9900",model:H},{icon:"fa-solid fa-bolt",color:"#ff9900",model:W},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:z},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:F},{icon:"fa-solid fa-wand-magic-sparkles",color:"#ce65e6",model:U}]}},computed:{model(){const e=this.$store.state.chat.model.name;return[H,W,z,F,U].find(a=>a.name===e)}},methods:{onCommandChange(e){this.$emit("select",e),this.$store.dispatch("chat/setModel",e)}}}),st={class:"selector"},ot={class:"name"},nt={class:"angle"},at={class:"item"},it={class:"info"},rt={class:"name"},lt={class:"description"};function dt(e,t,a,m,k,o){const c=i("font-awesome-icon"),u=i("el-dropdown-item"),_=i("el-dropdown-menu"),r=i("el-dropdown");return n(),d("div",st,[g(r,{trigger:"click","popper-class":"popper"},{dropdown:C(()=>[g(_,null,{default:C(()=>[(n(!0),d(I,null,D(e.options,(h,s)=>(n(),f(u,{key:s,onClick:w=>e.onCommandChange(h.model)},{default:C(()=>[l("div",at,[l("div",{class:"icon",style:V({color:h.color})},[g(c,{icon:h.icon},null,8,["icon"])],4),l("div",it,[l("p",rt,b(h.model.getDisplayName()),1),l("p",lt,b(h.model.getDescription()),1)])])]),_:2},1032,["onClick"]))),128))]),_:1})]),default:C(()=>{var h;return[l("div",null,[l("span",ot,b((h=e.model)==null?void 0:h.getDisplayName()),1),l("span",nt,[g(c,{icon:"fa-solid fa-angle-down"})])])]}),_:1})])}var ct=E(tt,[["render",dt],["__scopeId","data-v-358d65be"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/ModelSelector.vue"]]);const ut=S({name:"ConversationIntroductionItem",components:{FontAwesomeIcon:R},props:{content:{type:String,required:!0},icon:{type:String,required:!0},color:{type:String,default:"rgb(0, 0, 0)"}},data(){return{}},computed:{}}),pt={class:"item"},ht={class:"icon"},mt={class:"content"};function _t(e,t,a,m,k,o){const c=i("font-awesome-icon");return n(),d("div",pt,[l("div",ht,[g(c,{icon:e.icon,style:V({color:e.color})},null,8,["icon","style"])]),l("div",mt,b(e.content),1)])}var gt=E(ut,[["render",_t],["__scopeId","data-v-bc919b38"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/IntroductionItem.vue"]]);const ft=S({name:"ConversationIntroduction",components:{IntroductionItem:gt,ElRow:Ne,ElCol:De},emits:["draft"],data(){return{items:[{icon:"fa-solid fa-pen-nib",content:this.$t("chat.message.question1"),color:"rgb(226, 197, 65)"},{icon:"fa-solid fa-laptop-code",content:this.$t("chat.message.question2"),color:"rgb(203, 139, 208)"},{icon:"fa-solid fa-fan",content:this.$t("chat.message.question3"),color:"rgb(118, 208, 235)"},{icon:"fa-solid fa-plane-departure",content:this.$t("chat.message.question4"),color:"rgb(237, 98, 98)"}].sort(()=>Math.random()-.5)}},computed:{}}),$t={class:"introduction"};function yt(e,t,a,m,k,o){const c=i("introduction-item"),u=i("el-col"),_=i("el-row");return n(),d("div",$t,[g(_,{class:"items",justify:"center",gutter:15},{default:C(()=>[(n(!0),d(I,null,D(e.items,(r,h)=>(n(),f(u,{key:h,md:6,sm:12,xs:12},{default:C(()=>[g(c,{content:r.content,icon:r.icon,color:r.color,class:"cursor-pointer",onClick:s=>e.$emit("draft",r.content)},null,8,["content","icon","color","onClick"])]),_:2},1024))),128))]),_:1})])}var wt=E(ft,[["render",yt],["__scopeId","data-v-52040931"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/Introduction.vue"]]);const kt=S({name:"SidePanel",components:{ElInput:Ae,FontAwesomeIcon:R,ElSkeleton:Oe},props:{},emits:["click"],computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.id)==null?void 0:t.toString()},conversationGroups(){var c,u,_,r,h,s,w,$;const e=this.$store.state.chat.conversations,t=new Date;t.setHours(0,0,0,0);const a=new Date(t);a.setDate(a.getDate()-1);const m=new Date(t);m.setDate(m.getDate()-t.getDay());const k=new Date(m);k.setDate(k.getDate()-7);const o=e==null?void 0:e.reduce((p,y)=>{const M=new Date(y.updated_at*1e3);return M>=t?p.today.push(y):M>=a?p.yesterday.push(y):M>=m?p.thisWeek.push(y):p.earlier.push(y),p},{today:[],yesterday:[],thisWeek:[],earlier:[]});return A(A(A(A({},((c=o==null?void 0:o.today)==null?void 0:c.length)>0?{today:(u=o==null?void 0:o.today)==null?void 0:u.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((_=o==null?void 0:o.yesterday)==null?void 0:_.length)>0?{yesterday:(r=o==null?void 0:o.yesterday)==null?void 0:r.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((h=o==null?void 0:o.thisWeek)==null?void 0:h.length)>0?{thisWeek:(s=o==null?void 0:o.thisWeek)==null?void 0:s.sort((p,y)=>y.updated_at-p.updated_at)}:{}),((w=o==null?void 0:o.earlier)==null?void 0:w.length)>0?{earlier:($=o==null?void 0:o.earlier)==null?void 0:$.sort((p,y)=>y.updated_at-p.updated_at)}:{})},application(){return this.$store.state.chat.application},loading(){return this.$store.state.chat.status.getConversations===G.Request},token(){var e,t;return(t=(e=this.$store.state.chat)==null?void 0:e.credential)==null?void 0:t.token}},methods:{async onNewConversation(){this.$router.push({name:Q})},async onConfirm(e){const t=this.token;if(!t){console.error("Token is not found");return}e!=null&&e.deleting?(await L.deleteConversation(e.id,{token:t}),await this.$store.dispatch("chat/getConversations")):e!=null&&e.editing?(await L.updateConversation(e,{token:t}),await this.$store.dispatch("chat/getConversations")):e.editing=!0},onClick(e){!e||(this.$router.push({name:Y,params:{id:e}}),this.$emit("click",e))}}}),vt={class:"panel"},Ct={key:1,class:"conversations"},bt={class:"icons"},Et={class:"title"},St={class:"key"},It=["onClick"],Nt={class:"title"},Dt={key:0},At={key:1},Ot={key:2},Rt={class:"operations"};function Tt(e,t,a,m,k,o){const c=i("el-skeleton"),u=i("font-awesome-icon"),_=i("el-input");return n(),d("div",vt,[e.loading&&e.conversationGroups===void 0?(n(),f(c,{key:0})):(n(),d("div",Ct,[l("div",{class:"conversation",onClick:t[0]||(t[0]=(...r)=>e.onNewConversation&&e.onNewConversation(...r))},[l("div",bt,[g(u,{icon:"fa-solid fa-plus",class:"icon"})]),l("div",Et,b(e.$t("chat.message.startNewChat")),1)]),(n(!0),d(I,null,D(e.conversationGroups,(r,h)=>(n(),d("div",{key:h,class:"group"},[l("div",St,b(e.$t(`chat.group.${h}`)),1),(n(!0),d(I,null,D(r,(s,w)=>{var $;return n(),d("div",{key:w,class:q({conversation:!0,active:s.id===e.conversationId}),onClick:p=>e.onClick(s.id)},[l("div",Nt,[s!=null&&s.deleting?(n(),d("span",Dt,b(`${e.$t("chat.message.confirmDelete")}?`),1)):s!=null&&s.editing?(n(),d("span",At,[g(_,{modelValue:s.title,"onUpdate:modelValue":p=>s.title=p,onKeydown:X(p=>e.onConfirm(s),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])])):(s==null?void 0:s.title)||(s==null?void 0:s.messages)?(n(),d("span",Ot,b((s==null?void 0:s.title)||(($=s==null?void 0:s.messages[(s==null?void 0:s.messages.length)-1])==null?void 0:$.content)),1)):v("v-if",!0)]),l("div",Rt,[!(s!=null&&s.editing)&&!s.deleting?(n(),f(u,{key:0,icon:"fa-solid fa-edit",class:"icon icon-edit",onClick:O(p=>s.editing=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),!(s!=null&&s.editing)&&!s.deleting?(n(),f(u,{key:1,icon:"fa-solid fa-trash",class:"icon icon-delete",onClick:O(p=>s.deleting=!0,["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),f(u,{key:2,icon:"fa-solid fa-check",class:"icon icon-confirm",onClick:O(p=>e.onConfirm(s),["stop"])},null,8,["onClick"])):v("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(n(),f(u,{key:3,icon:"fa-solid fa-xmark",class:"icon icon-cancel",onClick:O(p=>{s.editing=!1,s.deleting=!1},["stop"])},null,8,["onClick"])):v("v-if",!0)])],10,It)}),128))]))),128))]))])}var qt=E(kt,[["render",Tt],["__scopeId","data-v-d866c834"],["__file","/home/runner/work/Nexior/Nexior/src/components/chat/SidePanel.vue"]]);const Mt=S({name:"LayoutChat",components:{SidePanel:qt,ElDrawer:Re,ElButton:te,FontAwesomeIcon:R},data(){return{drawer:!1}}}),Ut={class:"main"},Gt={class:"side"},Lt={class:"chat"};function Vt(e,t,a,m,k,o){const c=i("side-panel"),u=i("font-awesome-icon"),_=i("el-button"),r=i("el-drawer");return n(),d("div",Ut,[l("div",Gt,[K(e.$slots,"side",{},()=>[g(c)],!0)]),l("div",Lt,[K(e.$slots,"chat",{},void 0,!0)]),g(_,{round:"",class:"menu",onClick:t[0]||(t[0]=h=>e.drawer=!0)},{default:C(()=>[g(u,{icon:"fa-solid fa-bars",class:"icon-menu"})]),_:1}),g(r,{modelValue:e.drawer,"onUpdate:modelValue":t[1]||(t[1]=h=>e.drawer=h),"with-header":!1,size:"290px",class:"drawer"},{default:C(()=>[g(c)]),_:1},8,["modelValue"])])}var Bt=E(Mt,[["render",Vt],["__scopeId","data-v-8d7a06d2"],["__file","/home/runner/work/Nexior/Nexior/src/layouts/Chat.vue"]]);const Pt=S({name:"ChatConversation",components:{InputBox:et,Introduction:wt,ModelSelector:ct,Message:Ke,ApplicationStatus:$e,Layout:Bt},data(){var e,t;return{question:"",references:[],answering:!1,messages:((t=(e=this.$store.state.chat.conversations)==null?void 0:e.find(a=>{var m;return a.id===((m=this.$route.params.id)==null?void 0:m.toString())}))==null?void 0:t.messages)||[]}},computed:{model(){return this.$store.state.chat.model},conversationId(){var e;return(e=this.$route.params.id)==null?void 0:e.toString()},conversation(){var e;return(e=this.$store.state.chat.conversations)==null?void 0:e.find(t=>t.id===this.conversationId)},service(){return this.$store.state.chat.service},application(){return this.$store.state.chat.application},credential(){var e;return(e=this.$store.state.chat)==null?void 0:e.credential},needApply(){return this.$store.state.chat.status.getApplication===G.Success&&!this.application},conversations(){return this.$store.state.chat.conversations},initializing(){return this.$store.state.chat.status.getApplication===G.Request}},watch:{model(e){e&&this.onModelChanged()},conversationId(e){var t,a;e?(this.messages=((a=(t=this.conversations)==null?void 0:t.find(m=>m.id===e))==null?void 0:a.messages)||[],this.onScrollDown()):this.messages=[]}},async mounted(){await this.onGetService(),await this.onGetApplication(),await this.onGetConversations(),await this.onScrollDown()},methods:{async onGetService(){console.debug("start onGetService"),await this.$store.dispatch("chat/getService"),console.debug("end onGetService")},async onGetApplication(){console.debug("start onGetApplication"),await this.$store.dispatch("chat/getApplication"),console.debug("end onGetApplication")},async onGetConversations(){console.debug("start onGetConversations"),await this.$store.dispatch("chat/getConversations"),console.debug("end onGetConversations")},async onDraft(e){this.question=e,this.onSubmit()},async onCreateNewConversation(){await this.$router.push({name:Q})},async onModelChanged(){await this.onCreateNewConversation(),await this.$store.dispatch("chat/getApplication")},async onSubmit(){if(this.references.length>0){let e=[];e.push({type:"text",text:this.question});for(let t=0;t<this.references.length;t++)e.push({type:"image_url",image_url:this.references[t]});this.messages.push({content:e,role:j})}else this.messages.push({content:this.question,role:j});console.debug("onSubmit",this.question,this.references),await this.onFetchAnswer()},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".dialogue");!e||!this.messages||this.messages.length===0||(e.scrollTop=e==null?void 0:e.scrollHeight)},0)},async onFetchAnswer(){var k;const e=(k=this.credential)==null?void 0:k.token,t=this.question,a=this.references;if(console.debug("validated",t,a),this.question="",this.references=[],!e||!t){console.error("no token or endpoint or question"),this.messages.push({error:{code:ee},role:T,state:N.FAILED});return}let m=this.conversationId;this.messages.push({content:"",role:T,state:N.PENDING}),console.debug("start to get answer",this.messages),this.onScrollDown(),this.answering=!0,L.chatConversation({question:t,model:this.model.name,references:a,id:this.conversationId,stateful:!0},{token:e,stream:o=>{console.debug("stream response",o),this.messages[this.messages.length-1]={role:T,content:o.answer,state:N.ANSWERING},m=o==null?void 0:o.id,this.onScrollDown()}}).then(async()=>{console.debug("finished fetch answer",this.messages),this.messages[this.messages.length-1].state=N.FINISHED,await this.$store.dispatch("chat/setConversation",{id:m,messages:this.messages}),this.answering=!1,this.conversationId||await this.$router.push({name:Y,params:{id:m}}),this.onScrollDown(),await this.$store.dispatch("chat/getConversations"),await this.$store.dispatch("chat/getApplication")}).catch(o=>{var c,u;if(this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].state=N.FAILED),console.error(o),ae.isCancel(o))this.messages[this.messages.length-1].error={code:ye};else if((c=o==null?void 0:o.response)!=null&&c.data){let _=(u=o==null?void 0:o.response)==null?void 0:u.data;Te(_)&&(_=JSON.parse(_)),console.debug("error",_),this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error=_.error)}else this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error={code:Z});this.answering=!1})}}}),Ht={class:"dialogue"},Wt={key:1,class:"messages"},zt={class:"bottom"};function Ft(e,t,a,m,k,o){const c=i("model-selector"),u=i("application-status"),_=i("introduction"),r=i("message"),h=i("input-box"),s=i("layout");return n(),f(s,null,{chat:C(()=>[g(c,{class:"selector"}),g(u,{initializing:e.initializing,application:e.application,"need-apply":e.needApply,service:e.service,onRefresh:t[0]||(t[0]=w=>e.$store.dispatch("chat/getApplication"))},null,8,["initializing","application","need-apply","service"]),l("div",Ht,[e.messages.length===0?(n(),f(_,{key:0,onDraft:e.onDraft},null,8,["onDraft"])):(n(),d("div",Wt,[(n(!0),d(I,null,D(e.messages,(w,$)=>(n(),f(r,{key:$,message:w,application:e.application,class:"message"},null,8,["message","application"]))),128))]))]),l("div",zt,[g(h,{disabled:e.answering,question:e.question,references:e.references,"onUpdate:question":t[1]||(t[1]=w=>e.question=w),"onUpdate:references":t[2]||(t[2]=w=>e.references=w),onSubmit:e.onSubmit},null,8,["disabled","question","references","onSubmit"])])]),_:1})}var as=E(Pt,[["render",Ft],["__scopeId","data-v-3ab2fb26"],["__file","/home/runner/work/Nexior/Nexior/src/pages/chat/Conversation.vue"]]);export{as as default};
@@ -1 +0,0 @@
1
- import{I as L}from"./vendor-others.decd85ac.js";import{L as F}from"./Chatdoc.6a3a337e.js";import{$ as P,a0 as b,a1 as A,_ as k,y as N,H as v,K as H}from"./index.748c2eb2.js";import{a as K}from"./vendor-axios.168e6950.js";import{M as z,E as T,a as q,b as G,c as W,d as Q,e as J,f as j,g as O,A as Y,h as X}from"./Status.e8e87eff.js";import{i as Z}from"./is.dd611415.js";import{ai as D}from"./vendor-fortawesome.35fae32b.js";import{N as V,A as x,C as ee,i as se}from"./vendor-element-plus.eeef3ee7.js";import{H as E,al as l,o,e as c,L as h,f as i,V as m,U as I,W as R,ai as M,Q as S,as as U,S as f,$ as w,M as B,T as te}from"./vendor-@vue.31495dbd.js";import{C as oe}from"./CopyToClipboard.6e16b453.js";import"./application.ea1e2a72.js";import"./vendor-markdown.95c097e3.js";import"./vendor-highlight.js.19da0c9f.js";var $=(e=>(e.PENDING="pending",e.ANSWERING="answering",e.FINISHED="finished",e.FAILED="failed",e))($||{});const ie=E({name:"SidePanel",components:{ElInput:V,FontAwesomeIcon:D,ElSkeleton:x},props:{},emits:["click"],computed:{repositoryId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.repositoryId)==null?void 0:t.toString()},conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.conversationId)==null?void 0:t.toString()},repository(){var e,t,n;return(n=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:n.find(d=>d.id===this.repositoryId)},conversations(){var e;return(e=this.repository)==null?void 0:e.conversations},application(){return this.$store.state.chatdoc.application}},methods:{async onNewConversation(){this.$router.push({name:P,params:{repositoryId:this.repositoryId}})},async onConfirm(e){e!=null&&e.deleting?(await b.deleteConversation(e.id),await this.$store.dispatch("chat/getConversations")):e!=null&&e.editing?(await b.updateConversation(e),await this.$store.dispatch("chat/getConversations")):e.editing=!0},onClick(e){!e||(this.$router.push({name:A,params:{repositoryId:this.repositoryId,conversationId:e}}),this.$emit("click",e))}}}),ne={class:"panel"},ae={key:1,class:"conversations"},re={class:"icons"},le={class:"title"},de=["onClick"],ce={class:"icons"},ue={class:"title"},pe={key:0},he={key:1},me={key:2},_e={class:"operations"};function ge(e,t,n,d,r,y){const u=l("el-skeleton"),a=l("font-awesome-icon"),_=l("el-input");return o(),c("div",ne,[e.conversations===void 0?(o(),h(u,{key:0})):(o(),c("div",ae,[i("div",{class:"conversation",onClick:t[0]||(t[0]=(...s)=>e.onNewConversation&&e.onNewConversation(...s))},[i("div",re,[m(a,{icon:"fa-solid fa-plus",class:"icon"})]),i("div",le,I(e.$t("chatdoc.message.startNewChat")),1)]),(o(!0),c(R,null,M(e.conversations,(s,C)=>{var p;return o(),c("div",{key:C,class:S({conversation:!0,active:s.id===e.conversationId}),onClick:g=>e.onClick(s.id)},[i("div",ce,[m(a,{icon:"fa-regular fa-comment",class:"icon"})]),i("div",ue,[s!=null&&s.deleting?(o(),c("span",pe,I(`${e.$t("chatdoc.message.confirmDelete")}?`),1)):s!=null&&s.editing?(o(),c("span",he,[m(_,{modelValue:s.title,"onUpdate:modelValue":g=>s.title=g,onKeydown:U(g=>e.onConfirm(s),["enter"])},null,8,["modelValue","onUpdate:modelValue","onKeydown"])])):(s==null?void 0:s.title)||(s==null?void 0:s.messages)?(o(),c("span",me,I((s==null?void 0:s.title)||((p=s==null?void 0:s.messages[(s==null?void 0:s.messages.length)-1])==null?void 0:p.content)),1)):f("v-if",!0)]),i("div",_e,[!(s!=null&&s.editing)&&!s.deleting?(o(),h(a,{key:0,icon:"fa-solid fa-edit",class:"icon icon-edit",onClick:w(g=>s.editing=!0,["stop"])},null,8,["onClick"])):f("v-if",!0),!(s!=null&&s.editing)&&!s.deleting?(o(),h(a,{key:1,icon:"fa-solid fa-trash",class:"icon icon-delete",onClick:w(g=>s.deleting=!0,["stop"])},null,8,["onClick"])):f("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(o(),h(a,{key:2,icon:"fa-solid fa-check",class:"icon icon-confirm",onClick:w(g=>e.onConfirm(s),["stop"])},null,8,["onClick"])):f("v-if",!0),(s==null?void 0:s.editing)||s.deleting?(o(),h(a,{key:3,icon:"fa-solid fa-xmark",class:"icon icon-cancel",onClick:w(g=>{s.editing=!1,s.deleting=!1},["stop"])},null,8,["onClick"])):f("v-if",!0)])],10,de)}),128))]))])}var fe=k(ie,[["render",ge],["__scopeId","data-v-2282a6e1"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/Conversations.vue"]]);const ye=E({name:"AnsweringMark",data(){return{}},computed:{conversationId(){var e,t;return(t=(e=this.$route.params)==null?void 0:e.conversationId)==null?void 0:t.toString()}}}),$e={class:"mark"};function Ce(e,t,n,d,r,y){return o(),c("div",$e)}var we=k(ye,[["render",Ce],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/AnsweringMark.vue"]]);const Ie=E({name:"Message",components:{CopyToClipboard:oe,AnsweringMark:we,MarkdownRenderer:z,ElAlert:ee,ElButton:se},props:{message:{type:Object,required:!0}},emits:["stop"],data(){return{copied:!1,messageState:$}},computed:{errorText(){var e,t;if(!(!this.message.error||!((e=this.message.error)!=null&&e.code)))switch((t=this.message.error)==null?void 0:t.code){case O:return this.$t("chatdoc.message.errorUsedUp");case j:return this.$t("chatdoc.message.errorApiError");case J:return this.$t("chatdoc.message.errorBadRequest");case Q:return this.$t("chatdoc.message.errorTimeout");case W:return this.$t("chatdoc.message.errorTooManyRequests");case G:return this.$t("chatdoc.message.errorContentTooLarge");case q:return this.$t("chatdoc.message.errorNotApplied");case T:default:return this.$t("chatdoc.message.errorUnknown")}},showBuyMore(){var e;return this.message.role===N&&((e=this.message.error)==null?void 0:e.code)===O}},methods:{onCopy(){L(this.message.content.toString(),{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)},onBuyMore(){}}}),ke=["role"],Ee={class:"content"},Ne={class:"operations"};function Re(e,t,n,d,r,y){var p;const u=l("markdown-renderer"),a=l("answering-mark"),_=l("copy-to-clipboard"),s=l("el-alert"),C=l("el-button");return o(),c(R,null,[i("div",{class:S({message:!0,[e.message.role]:!0,hidden:e.errorText&&e.message.role==="assistant"}),role:e.message.role},[i("div",Ee,[m(u,{content:(p=e.message)==null?void 0:p.content},null,8,["content"]),e.message.state===e.messageState.PENDING?(o(),h(a,{key:0})):f("v-if",!0)]),i("div",Ne,[m(_,{content:e.message.content,class:"btn-copy"},null,8,["content"])])],10,ke),e.errorText?(o(),h(s,{key:0,class:"error",title:e.errorText,type:"error",closable:!1},null,8,["title"])):f("v-if",!0),e.showBuyMore?(o(),h(C,{key:1,round:"",type:"primary",class:"btn btn-buy",size:"small",onClick:e.onBuyMore},{default:B(()=>[te(I(e.$t("common.button.buyMore")),1)]),_:1},8,["onClick"])):f("v-if",!0)],64)}var be=k(Ie,[["render",Re],["__scopeId","data-v-95a62450"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/Message.vue"]]);const Se=E({name:"InputBox",components:{ElInput:V,FontAwesomeIcon:D},props:{disabled:{type:Boolean,required:!1,default:!1},question:{type:String,required:!0}},emits:["update:question","submit"],data(){return{questionValue:this.question,fileList:[]}},computed:{model(){return this.$store.state.chat.model}},watch:{questionValue(e){this.$emit("update:question",e)},question(e){e!==this.questionValue&&(this.questionValue=e)},references(e){e.length===0&&(this.fileList=[])}},methods:{onSubmit(){!this.question||this.$emit("submit")}}}),ve={class:"input-box"},Oe={class:"info"};function Ae(e,t,n,d,r,y){const u=l("font-awesome-icon"),a=l("el-input");return o(),c(R,null,[i("div",ve,[i("span",{class:S({btn:!0,"btn-send":!0,disabled:!e.question}),onClick:t[0]||(t[0]=(..._)=>e.onSubmit&&e.onSubmit(..._))},[m(u,{icon:"fa-solid fa-location-arrow",class:"icon icon-send"})],2),m(a,{modelValue:e.questionValue,"onUpdate:modelValue":t[1]||(t[1]=_=>e.questionValue=_),disabled:e.disabled,class:"input",type:"textarea",placeholder:e.$t("chat.message.newMessagePlaceholder"),onKeydown:U(w(e.onSubmit,["exact","prevent"]),["enter"])},null,8,["modelValue","disabled","placeholder","onKeydown"])]),i("p",Oe,I(e.$t("chat.message.howToUse")),1)],64)}var Te=k(Se,[["render",Ae],["__scopeId","data-v-7ed35c20"],["__file","/home/runner/work/Nexior/Nexior/src/components/chatdoc/InputBox.vue"]]);const qe=E({name:"ChatdocConversation",components:{Layout:F,Conversations:fe,Message:be,InputBox:Te,ApplicationStatus:Y},data(){return{loading:!1,repositoryId:this.$route.params.repositoryId.toString(),answering:!1,question:""}},computed:{messages:{get(){var e,t;return((t=(e=this.conversations)==null?void 0:e.find(n=>{var d;return n.id===((d=this.$route.params.conversationId)==null?void 0:d.toString())}))==null?void 0:t.messages)||[]},set(e){console.debug("set messages",e)}},repository(){var e,t,n;return(n=(t=(e=this.$store.state)==null?void 0:e.chatdoc)==null?void 0:t.repositories)==null?void 0:n.find(d=>d.id===this.repositoryId)},conversations(){var e;return(e=this.repository)==null?void 0:e.conversations},conversationId(){var e;return(e=this.$route.params.conversationId)==null?void 0:e.toString()},application(){return this.$store.state.chatdoc.application},credential(){return this.$store.state.chatdoc.credential},needApply(){return this.$store.state.chatdoc.status.getApplication===v.Success&&!this.application},initializing(){return this.$store.state.chatdoc.status.getApplication===v.Request},service(){return this.$store.state.chatdoc.service}},async mounted(){console.debug("start get conversations"),this.loading=!0,this.$store.dispatch("chatdoc/getConversations",{repositoryId:this.repositoryId}).finally(()=>{this.loading=!1})},methods:{async onSubmit(){this.messages.push({content:this.question,role:H}),await this.onFetchAnswer()},async onScrollDown(){setTimeout(()=>{const e=document.querySelector(".dialogue");!e||!this.messages||this.messages.length===0||(e.scrollTop=e==null?void 0:e.scrollHeight)},0)},async onFetchAnswer(){var d;const e=(d=this.credential)==null?void 0:d.token,t=this.question;if(console.debug(this.onFetchAnswer,"validated",t),this.question="",!e||!t){console.error("no token or endpoint or question"),this.messages.push({error:{code:q},role:N,state:$.FAILED});return}let n=this.conversationId;this.messages.push({content:"",role:N,state:$.PENDING}),console.debug("start to get answer",this.messages),this.onScrollDown(),this.answering=!0,b.chatConversation({repositoryId:this.repositoryId,question:t,id:this.conversationId},{token:e,stream:r=>{this.messages[this.messages.length-1]={role:N,content:r.answer,state:$.ANSWERING},n=r.id,this.onScrollDown()}}).then(async()=>{console.debug("finished fetch answer"),this.messages[this.messages.length-1].state=$.FINISHED,await this.$store.dispatch("chatdoc/setConversation",{id:n,messages:this.messages,repositoryId:this.repositoryId}),this.answering=!1,this.conversationId||(console.debug("push to conversation",n),await this.$router.push({name:A,params:{conversationId:n,repositoryId:this.repositoryId}})),this.onScrollDown(),await this.$store.dispatch("chatdoc/getConversations",{repositoryId:this.repositoryId})}).catch(r=>{var y,u;if(this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].state=$.FAILED),console.error(r),K.isCancel(r))this.messages[this.messages.length-1].error={code:X};else if((y=r==null?void 0:r.response)!=null&&y.data){let a=(u=r==null?void 0:r.response)==null?void 0:u.data;Z(a)&&(a=JSON.parse(a)),this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error=a.error)}else this.messages&&this.messages.length>0&&(this.messages[this.messages.length-1].error={code:T});this.answering=!1})}}}),De={class:"wrapper"},Ve={class:"chat"},Me={class:"status"},Ue={class:"dialogue"},Be={class:"messages"},Le={class:"bottom"};function Fe(e,t,n,d,r,y){const u=l("conversations"),a=l("application-status"),_=l("message"),s=l("input-box"),C=l("layout");return o(),h(C,null,{chatdoc:B(()=>[i("div",De,[m(u,{class:"side"}),i("div",Ve,[i("div",Me,[m(a,{"show-price":!1,initializing:e.initializing,application:e.application,"need-apply":e.needApply,service:e.service,onRefresh:t[0]||(t[0]=p=>e.$store.dispatch("chatdoc/getApplication"))},null,8,["initializing","application","need-apply","service"])]),i("div",Ue,[i("div",Be,[(o(!0),c(R,null,M(e.messages,(p,g)=>(o(),h(_,{key:g,message:p,class:"message"},null,8,["message"]))),128))])]),i("div",Le,[m(s,{disabled:e.answering,question:e.question,"onUpdate:question":t[1]||(t[1]=p=>e.question=p),onSubmit:e.onSubmit},null,8,["disabled","question","onSubmit"])])])])]),_:1})}var es=k(qe,[["render",Fe],["__scopeId","data-v-24089614"],["__file","/home/runner/work/Nexior/Nexior/src/pages/chatdoc/Conversation.vue"]]);export{es as default};
@@ -1 +0,0 @@
1
- import{I as p}from"./vendor-others.decd85ac.js";import{ai as r}from"./vendor-fortawesome.35fae32b.js";import{_ as i}from"./index.748c2eb2.js";import{q as s}from"./vendor-element-plus.eeef3ee7.js";import{H as l,al as t,o as n,L as a,M as m,V as d}from"./vendor-@vue.31495dbd.js";const _=l({name:"CopyToClipboard",components:{FontAwesomeIcon:r,ElTooltip:s},props:{content:{type:String,required:!0}},data(){return{copied:!1}},methods:{onCopy(){p(this.content,{debug:!0}),this.copied=!0,setTimeout(()=>{this.copied=!1},3e3)}}});function f(o,u,C,y,k,b){const e=t("font-awesome-icon"),c=t("el-tooltip");return o.copied?(n(),a(c,{key:1,visible:o.copied,effect:"dark",content:o.$t("common.message.copied"),placement:"top-start"},{default:m(()=>[d(e,{icon:"fa-solid fa-check",class:"icon-check"})]),_:1},8,["visible","content"])):(n(),a(e,{key:0,icon:"fa-regular fa-copy",class:"icon-copy",onClick:o.onCopy},null,8,["onClick"]))}var $=i(_,[["render",f],["__scopeId","data-v-1ba27772"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/CopyToClipboard.vue"]]);export{$ as C};
@@ -1 +0,0 @@
1
- var b=Object.defineProperty,y=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var m=(e,o,t)=>o in e?b(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,p=(e,o)=>{for(var t in o||(o={}))V.call(o,t)&&m(e,t,o[t]);if(u)for(var t of u(o))B.call(o,t)&&m(e,t,o[t]);return e},_=(e,o)=>y(e,D(o));import{B as v,z as x}from"./vendor-others.decd85ac.js";import{S as N,s as O,g as h,_ as f}from"./index.748c2eb2.js";import{r as g,s as H,t as M}from"./vendor-element-plus.eeef3ee7.js";import{H as C,al as l,o as s,L as i,M as c,V as L,e as T,ai as q,W as A}from"./vendor-@vue.31495dbd.js";import{h as I,C as P,a as k}from"./vendor-vue-dark-switch.81063cc1.js";const U=C({name:"LocaleSelector",components:{ElDialog:g,ElSelect:H,ElOption:M},props:{visible:{type:Boolean,default:!1}},emits:["close"],data(){return{value:this.$i18n.locale,locales:N}},methods:{async onSelectLocale(e){this.$router.push({query:_(p({},this.$route.query),{locale:void 0})}),await O(e),this.setCookie(e),window.location.reload()},setCookie(e){v("LOCALE",e,{path:"/",domain:h()})}}});function z(e,o,t,$,w,E){const n=l("el-option"),r=l("el-select"),d=l("el-dialog");return s(),i(d,{"model-value":e.visible,width:300,class:"text-center",onClose:o[1]||(o[1]=a=>e.$emit("close"))},{default:c(()=>[L(r,{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=a=>e.value=a),onChange:e.onSelectLocale},{default:c(()=>[(s(!0),T(A,null,q(e.locales,(a,S)=>(s(),i(n,{key:S,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["model-value"])}var X=f(U,[["render",z],["__scopeId","data-v-32a102bd"],["__file","/home/runner/work/Nexior/Nexior/src/components/common/LocaleSelector.vue"]]);const F=C({components:{DarkSwitch:I,ElDialog:g},props:{visible:{type:Boolean,default:!0}},emits:["update:dark","close"],computed:{dark(){return x("THEME")==="dark"},switchValue(){return P.value}},watch:{switchValue(e){this.setCookie(e)},dark(e){document.documentElement.classList.toggle("dark",e),this.setCookie(this.dark)}},mounted(){this.dark?(k(!0),document.documentElement.classList.add("dark")):(k(!1),document.documentElement.classList.remove("dark"))},methods:{setCookie(e){v("THEME",e?"dark":"light",{path:"/",domain:h()})}}});function R(e,o,t,$,w,E){const n=l("dark-switch"),r=l("el-dialog");return s(),i(r,{"model-value":e.visible,width:200,class:"text-center",onClose:o[0]||(o[0]=d=>e.$emit("close"))},{default:c(()=>[L(n,{class:"switch","dark-background":"#333","light-background":"#fff"})]),_:1},8,["model-value"])}var Y=f(F,[["render",R],["__file","/home/runner/work/Nexior/Nexior/src/components/common/DarkSelector.vue"]]);export{Y as D,X as L};
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{o as w}from"./order.ef27e43c.js";import{_ as V}from"./index.748c2eb2.js";import{O as P}from"./order.1bf5c3a2.js";import{Q as Y}from"./vendor-qrcode.93be07bd.js";import{r as z,b as H,a as U,i as Z,n as x,A as ee,B as re,C as ae,D as te,F as oe}from"./vendor-element-plus.eeef3ee7.js";import{H as D,al as l,o as t,L as c,M as r,V as a,f as m,S as n,U as i,aK as L,aL as Q,e as p,W as se,T as v,Q as j}from"./vendor-@vue.31495dbd.js";import{I as ie}from"./application.ea1e2a72.js";import{g as le}from"./price.b1cf3677.js";import"./vendor-axios.168e6950.js";import"./vendor-fortawesome.35fae32b.js";const de=D({name:"PayOrderDialog",components:{ElDialog:z,QrCode:Y,ElRow:H,ElCol:U},props:{modelValue:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:["hide","update:modelValue"],data(){return{refreshTimer:void 0}},mounted(){this.onRefresh()},unmounted(){this.refreshTimer&&clearTimeout(this.refreshTimer)},methods:{onRefresh(){if(!this.modelValue.id){console.error("id does not exist");return}w.refresh(this.modelValue.id).then(({data:e})=>{e.state!==P.PAID?setTimeout(()=>{this.onRefresh()},2e3):this.$emit("hide"),this.$emit("update:modelValue",e)}).catch(()=>{setTimeout(()=>{this.onRefresh()},2e3)})}}}),ne=e=>(L("data-v-875060be"),e=e(),Q(),e),pe={class:"paycode wechat"},ue={class:"help-text"},ye=ne(()=>m("div",{class:"help-img"},[m("img",{src:"https://midas.gtimg.cn/enterprise/images/ep_sys_wx_tip.jpg"})],-1));function ce(e,o,I,E,T,C){const u=l("qr-code"),f=l("el-col"),k=l("el-row"),W=l("el-dialog");return t(),c(W,{"model-value":e.visible,title:e.$t("application.title.buyService"),width:"500px",center:""},{default:r(()=>[a(k,{class:"paycodes"},{default:r(()=>[a(f,{span:12},{default:r(()=>{var h,g;return[m("div",pe,[(h=e.modelValue)!=null&&h.pay_url?(t(),c(u,{key:0,value:(g=e.modelValue)==null?void 0:g.pay_url,size:200,class:"qrcode m-auto"},null,8,["value"])):n("v-if",!0),m("p",ue,i(e.$t("order.message.wechatPayHelp")),1)])]}),_:1}),a(f,{span:12},{default:r(()=>[ye]),_:1})]),_:1})]),_:1},8,["model-value","title"])}var me=V(de,[["render",ce],["__scopeId","data-v-875060be"],["__file","/home/runner/work/Nexior/Nexior/src/components/order/WechatPay.vue"]]);const fe=D({name:"PayOrderDialog",components:{ElDialog:z},props:{modelValue:{type:Object,required:!0},visible:{type:Boolean,required:!1,default:!1}},emits:["hide","update:modelValue"],data(){return{refreshTimer:void 0}},watch:{visible:{handler(e){e&&this.modelValue.pay_url&&window.open(this.modelValue.pay_url,"_blank")}}},mounted(){this.onRefresh()},unmounted(){this.refreshTimer&&clearTimeout(this.refreshTimer)},methods:{onRefresh(){if(!this.modelValue.id){console.error("id does not exist");return}w.refresh(this.modelValue.id).then(({data:e})=>{e.state!==P.PAID?setTimeout(()=>{this.onRefresh()},2e3):this.$emit("hide"),this.$emit("update:modelValue",e)}).catch(()=>{setTimeout(()=>{this.onRefresh()},5e3)})}}}),he={class:"text-center"};function _e(e,o,I,E,T,C){const u=l("el-dialog");return t(),c(u,{"model-value":e.visible,title:e.$t("application.title.buyService"),width:"500px",center:""},{default:r(()=>[m("p",he,i(e.$t("order.message.buyInExternalUrl")),1)]),_:1},8,["model-value","title"])}var ve=V(fe,[["render",_e],["__scopeId","data-v-85959ecc"],["__file","/home/runner/work/Nexior/Nexior/src/components/order/StripePay.vue"]]);var G=(e=>(e.WechatPay="WechatPay",e.Stripe="Stripe",e.AliPay="AliPay",e))(G||{});const $e=D({name:"ConsoleOrderDetail",components:{ElButton:Z,ElRow:H,ElCard:x,ElCol:U,ElSkeleton:ee,ElDivider:re,ElAlert:ae,ElDescriptions:te,ElDescriptionsItem:oe,WechatPayOrder:me,StripePayOrder:ve},data(){return{PayWay:G,payWay:"WechatPay",OrderState:P,order:void 0,showPayWays:!0,loading:!1,paying:!1,prepaying:!1,applicationType:ie}},computed:{id(){var e,o;return(o=(e=this.$route.params)==null?void 0:e.id)==null?void 0:o.toString()},redirect(){var e;return(e=this.$route.query)==null?void 0:e.redirect}},watch:{order:{handler(e){if((e==null?void 0:e.state)===P.PAID){setTimeout(()=>{var o;this.redirect&&window.location.replace((o=this.redirect)==null?void 0:o.toString())},2e3);return}},deep:!0}},mounted(){this.onFetchData()},methods:{getPriceString:le,onFetchData(){this.loading=!0,w.refresh(this.id).then(({data:e})=>{this.order=e,e.pay_way&&(this.payWay=e.pay_way),this.loading=!1}).catch(()=>{this.loading=!1})},onRepay(){this.paying=!0},onPay(){this.prepaying=!0,w.pay(this.id,{pay_way:this.payWay}).then(({data:e})=>{this.prepaying=!1,this.order=e,this.order.price&&this.order.price>0&&(this.paying=!0)}).catch(()=>{this.prepaying=!1})}}}),K=e=>(L("data-v-2d1dc98e"),e=e(),Q(),e),ge={class:"title"},be={key:0,class:"pt-5"},we={key:1,class:"order"},Pe={key:0},ke={key:1},We={key:0,class:"price unfree"},Se={key:1,class:"price free"},Ve={key:0,class:"payways mb-6"},De=K(()=>m("span",{class:"payicon wechatpay"},null,-1)),Ie={class:"payname"},Ee=K(()=>m("span",{class:"payicon stripe"},null,-1)),Te={class:"payname"},Ce={key:1},Oe={key:2};function Ne(e,o,I,E,T,C){const u=l("el-col"),f=l("el-row"),k=l("el-skeleton"),W=l("copy-to-clipboard"),h=l("el-descriptions-item"),g=l("el-descriptions"),S=l("el-divider"),O=l("el-alert"),N=l("el-button"),M=l("el-card"),X=l("wechat-pay-order"),J=l("stripe-pay-order");return t(),p(se,null,[a(f,{class:"panel"},{default:r(()=>[a(u,{span:24},{default:r(()=>[a(f,null,{default:r(()=>[a(u,{span:24},{default:r(()=>[m("h2",ge,i(e.$t("order.title.info")),1)]),_:1})]),_:1}),a(f,null,{default:r(()=>[a(u,{span:24},{default:r(()=>[a(M,{shadow:"hover"},{default:r(()=>{var _,R,A,q;return[a(f,null,{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[e.loading?(t(),p("div",be,[a(k,{animated:""})])):(t(),p("div",we,[a(g,{column:1},{default:r(()=>{var $,b,B;return[a(h,{label:e.$t("order.field.id")},{default:r(()=>{var s,d,y;return[m("span",null,i((s=e.order)==null?void 0:s.id),1),(d=e.order)!=null&&d.id?(t(),c(W,{key:0,content:(y=e.order)==null?void 0:y.id,class:"inline-block"},null,8,["content"])):n("v-if",!0)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.description")},{default:r(()=>{var s;return[v(i((s=e.order)==null?void 0:s.description),1)]}),_:1},8,["label"]),(b=($=e.order)==null?void 0:$.application)!=null&&b.service?(t(),c(h,{key:0,label:e.$t("order.field.api")},{default:r(()=>{var s,d,y;return[v(i((y=(d=(s=e.order)==null?void 0:s.application)==null?void 0:d.service)==null?void 0:y.title),1)]}),_:1},8,["label"])):n("v-if",!0),(B=e.order)!=null&&B.pay_way?(t(),c(h,{key:1,label:e.$t("order.field.payWay")},{default:r(()=>{var s,d;return[((s=e.order)==null?void 0:s.pay_way)===e.PayWay.WechatPay?(t(),p("span",Pe,i(e.$t("order.title.wechatPay")),1)):n("v-if",!0),((d=e.order)==null?void 0:d.pay_way)===e.PayWay.Stripe?(t(),p("span",ke,i(e.$t("order.title.stripe")),1)):n("v-if",!0)]}),_:1},8,["label"])):n("v-if",!0),a(h,{label:e.$t("order.field.amount")},{default:r(()=>{var s,d,y,F;return[v(i((s=e.order)==null?void 0:s.amount)+" "+i(e.$t(`service.unit.${(F=(y=(d=e.order)==null?void 0:d.application)==null?void 0:y.service)==null?void 0:F.unit}`)),1)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.createdAt")},{default:r(()=>{var s;return[v(i(e.$dayjs.format((s=e.order)==null?void 0:s.created_at)),1)]}),_:1},8,["label"]),a(h,{label:e.$t("order.field.price")},{default:r(()=>{var s,d,y;return[((s=e.order)==null?void 0:s.price)&&((d=e.order)==null?void 0:d.price)>0?(t(),p("span",We,i(e.getPriceString({value:(y=e.order)==null?void 0:y.price})),1)):(t(),p("span",Se,i(e.$t("order.message.free")),1))]}),_:1},8,["label"])]}),_:1})]))]),_:1})]),_:1}),((_=e.order)==null?void 0:_.state)===e.OrderState.PAID?(t(),c(f,{key:0,class:"mb-5"},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[a(S,{"border-style":"dashed"}),a(O,{title:e.$t("order.message.paidSuccessfully"),type:"success","show-icon":"",closable:!1},null,8,["title"])]),_:1})]),_:1})):n("v-if",!0),((R=e.order)==null?void 0:R.state)===e.OrderState.EXPIRED?(t(),c(f,{key:1,class:"mb-5"},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>[a(S,{"border-style":"dashed"}),a(O,{title:e.$t("order.message.orderExpired"),type:"error","show-icon":"",closable:!1},null,8,["title"])]),_:1})]),_:1})):n("v-if",!0),((A=e.order)==null?void 0:A.state)===e.OrderState.PENDING||((q=e.order)==null?void 0:q.state)===e.OrderState.FAILED?(t(),c(f,{key:2},{default:r(()=>[a(u,{span:16,offset:4},{default:r(()=>{var $;return[a(S,{"border-style":"dashed"}),e.showPayWays&&e.order.price&&e.order.price>0&&!e.order.pay_way?(t(),p("div",Ve,[(t(),p("div",{key:0,class:j({payway:!0,wechatpay:!0,active:e.payWay===e.PayWay.WechatPay}),onClick:o[0]||(o[0]=b=>e.payWay=e.PayWay.WechatPay)},[De,m("span",Ie,i(e.$t("order.title.wechatPay")),1)],2)),n("v-if",!0),(t(),p("div",{key:2,class:j({payway:!0,stripe:!0,active:e.payWay===e.PayWay.Stripe}),onClick:o[2]||(o[2]=b=>e.payWay=e.PayWay.Stripe)},[Ee,m("span",Te,i(e.$t("order.title.stripe")),1)],2))])):n("v-if",!0),($=e.order)!=null&&$.pay_way?(t(),p("div",Oe,[a(N,{type:"primary",round:"",size:"large",class:"btn-repay",onClick:e.onRepay},{default:r(()=>[v(i(e.$t("common.button.repay")),1)]),_:1},8,["onClick"])])):(t(),p("div",Ce,[a(N,{loading:e.prepaying,round:"",type:"primary",size:"large",class:"btn-pay",onClick:e.onPay},{default:r(()=>[v(i(e.$t("common.button.pay")),1)]),_:1},8,["loading","onClick"])]))]}),_:1})]),_:1})):n("v-if",!0)]}),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e.order&&e.payWay===e.PayWay.WechatPay?(t(),c(X,{key:0,modelValue:e.order,"onUpdate:modelValue":o[3]||(o[3]=_=>e.order=_),visible:e.paying,onHide:o[4]||(o[4]=_=>e.paying=!1)},null,8,["modelValue","visible"])):n("v-if",!0),e.order&&e.payWay===e.PayWay.Stripe?(t(),c(J,{key:1,modelValue:e.order,"onUpdate:modelValue":o[5]||(o[5]=_=>e.order=_),visible:e.paying,onHide:o[6]||(o[6]=_=>e.paying=!1)},null,8,["modelValue","visible"])):n("v-if",!0)],64)}var Ge=V($e,[["render",Ne],["__scopeId","data-v-2d1dc98e"],["__file","/home/runner/work/Nexior/Nexior/src/pages/console/order/Detail.vue"]]);export{Ge as default};
@@ -1 +0,0 @@
1
- import"./vendor-others.decd85ac.js";import{P as w}from"./Pagination.84cf8888.js";import{C as y}from"./CopyToClipboard.6e16b453.js";import{b as v}from"./distribution.8c83db22.js";import{_ as $}from"./index.748c2eb2.js";import{g as C}from"./price.b1cf3677.js";import{b as H,a as D,u as P,w as S,n as k}from"./vendor-element-plus.eeef3ee7.js";import{H as E,al as s,av as F,L as _,M as o,o as h,V as e,f as a,U as n,O as N}from"./vendor-@vue.31495dbd.js";import"./vendor-fortawesome.35fae32b.js";import"./vendor-axios.168e6950.js";const q=E({name:"ConsoleDistributionList",components:{Pagination:w,CopyToClipboard:y,ElRow:H,ElCol:D,ElTable:P,ElTableColumn:S,ElCard:k},data(){return{distributionHistories:[],distributionStatus:void 0,loading:!1,total:void 0,limit:10}},computed:{redirect(){return this.$route.query.redirect},page(){var t;return parseInt(((t=this.$route.query.page)==null?void 0:t.toString())||"1")}},watch:{page:{handler(){this.onFetchData()}}},mounted(){this.onFetchData()},methods:{getPriceString:C,onPageChange(t){var p;this.$router.push({name:(p=this.$route.name)==null?void 0:p.toString(),query:{page:t}})},onFetchData(){this.loading=!0,Promise.all([this.onFetchDistributionHistory()]).finally(()=>{this.loading=!1})},async onFetchDistributionHistory(){const{data:t}=await v.getAll({user_id:this.$store.getters.user.id,ordering:"-created_at",limit:this.limit,offset:(this.page-1)*this.limit});this.distributionHistories=t.items,this.total=t.count}}}),B={class:"title"},I={class:"key"},T={class:"copy"},V={class:"key"},z={class:"copy"},A={class:"price"},L={class:"description"},O={class:"description"},j={class:"created-at"},M={class:"pagination m-v-lg"};function R(t,p,U,G,J,K){const d=s("el-col"),c=s("el-row"),u=s("copy-to-clipboard"),r=s("el-table-column"),m=s("el-table"),f=s("el-card"),g=s("pagination"),b=F("loading");return h(),_(c,{class:"panel"},{default:o(()=>[e(d,{span:24},{default:o(()=>[e(c,null,{default:o(()=>[e(d,{span:24},{default:o(()=>[a("h2",B,n(t.$t("common.title.distributionHistory")),1)]),_:1})]),_:1}),e(c,null,{default:o(()=>[e(d,{span:24},{default:o(()=>[e(f,{shadow:"hover"},{default:o(()=>[N((h(),_(m,{data:t.distributionHistories,stripe:""},{default:o(()=>[e(r,{prop:"id",label:t.$t("distribution.field.id"),"class-name":"text-center",width:"350px"},{default:o(i=>[a("span",I,n(i.row.id),1),a("span",T,[e(u,{content:i.row.id},null,8,["content"])])]),_:1},8,["label"]),e(r,{prop:"id",label:t.$t("distribution.field.userId"),"class-name":"text-center",width:"350px"},{default:o(i=>[a("span",V,n(i.row.user_id),1),a("span",z,[e(u,{content:i.row.user_id},null,8,["content"])])]),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.price"),width:"100px"},{default:o(i=>{var l;return[a("span",A,n(t.getPriceString({value:(l=i.row)==null?void 0:l.price})),1)]}),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.reward"),width:"100px"},{default:o(i=>{var l;return[a("span",L,n(t.getPriceString({value:(l=i.row)==null?void 0:l.reward})),1)]}),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.percentage"),width:"120px"},{default:o(i=>[a("span",O,n(i.row.percentage)+"%",1)]),_:1},8,["label"]),e(r,{label:t.$t("distribution.field.createdAt"),width:"200px"},{default:o(i=>[a("span",j,n(t.$dayjs.format(i.row.created_at)),1)]),_:1},8,["label"])]),_:1},8,["data"])),[[b,t.loading]])]),_:1})]),_:1})]),_:1}),e(c,null,{default:o(()=>[e(d,{span:10,offset:14},{default:o(()=>[a("div",M,[e(g,{"current-page":t.page,"page-size":t.limit,total:t.total,onChange:t.onPageChange},null,8,["current-page","page-size","total","onChange"])])]),_:1})]),_:1})]),_:1})]),_:1})}var at=$(q,[["render",R],["__scopeId","data-v-63f0e9ed"],["__file","/home/runner/work/Nexior/Nexior/src/pages/distribution/History.vue"]]);export{at as default};
@@ -1 +0,0 @@
1
- var ie=Object.defineProperty,le=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var se=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var x=(e,i,u)=>i in e?ie(e,i,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[i]=u,r=(e,i)=>{for(var u in i||(i={}))se.call(i,u)&&x(e,u,i[u]);if(Z)for(var u of Z(i))ne.call(i,u)&&x(e,u,i[u]);return e},p=(e,i)=>le(e,oe(i));import"./vendor-others.decd85ac.js";import{r as R,N as ee,i as W,W as H,a1 as J,L as ae,K as M,x as de,B as re,b as ue,o as pe,a as me,n as fe,G as ce,S as ve,H as he}from"./vendor-element-plus.eeef3ee7.js";import{_ as A,z as be,aj as ge}from"./index.748c2eb2.js";import{H as B,al as a,o as y,e as I,V as t,M as o,f as s,T as f,U as n,W as U,ai as te,L as D,as as $e,O as j,P as z,S as _e}from"./vendor-@vue.31495dbd.js";import{ai as we}from"./vendor-fortawesome.35fae32b.js";import"./vendor-axios.168e6950.js";const Ce=B({name:"EditText",components:{ElDialog:R,ElInput:ee,ElButton:W,ElIcon:H,Edit:J},props:{modelValue:{type:String,required:!0},title:{type:String,required:!0},placeholder:{type:String,required:!0}},emits:["confirm","cancel"],data(){return{editing:!1,value:this.modelValue}},methods:{onCancel(){this.editing=!1},onConfirm(){this.$emit("confirm",this.value),this.editing=!1}}}),ke={class:"dialog-footer"};function ye(e,i,u,E,F,L){const C=a("el-input"),b=a("el-button"),c=a("el-dialog"),d=a("edit"),$=a("el-icon");return y(),I(U,null,[t(c,{modelValue:e.editing,"onUpdate:modelValue":i[1]||(i[1]=g=>e.editing=g),title:e.title,width:"400px"},{footer:o(()=>[s("span",ke,[t(b,{round:"",onClick:e.onCancel},{default:o(()=>[f(n(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),t(b,{round:"",type:"primary",onClick:e.onConfirm},{default:o(()=>[f(n(e.$t("common.button.confirm")),1)]),_:1},8,["onClick"])])]),default:o(()=>[s("div",null,[t(C,{modelValue:e.value,"onUpdate:modelValue":i[0]||(i[0]=g=>e.value=g),placeholder:e.placeholder},null,8,["modelValue","placeholder"])])]),_:1},8,["modelValue","title"]),s("span",{class:"edit",onClick:i[2]||(i[2]=g=>e.editing=!0)},[t($,{class:"icon"},{default:o(()=>[t(d)]),_:1})])],64)}var Ve=A(Ce,[["render",ye],["__file","/home/runner/work/Nexior/Nexior/src/components/site/EditText.vue"]]);const Ee=B({name:"EditImage",components:{ElDialog:R,ElButton:W,FontAwesomeIcon:we,ElIcon:H,Edit:J,ElUpload:ae},props:{modelValue:{type:String,required:!0},title:{type:String,required:!0},tip:{type:String,required:!0}},emits:["confirm","cancel"],data(){return{editing:!1,value:this.modelValue,fileList:[],uploadUrl:be()+"/api/v1/files/"}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},urls(){return this.fileList.map(e=>{var i;return(i=e==null?void 0:e.response)==null?void 0:i.file_url})}},methods:{onCancel(){this.editing=!1},onConfirm(){var e;this.$emit("confirm",(e=this.urls)==null?void 0:e[0]),this.editing=!1},onExceed(){M.warning(this.$t("site.message.uploadImageExceed"))},onError(){M.error(this.$t("site.message.uploadImageError"))}}}),Ie={class:"el-upload__tip"},Se={class:"dialog-footer"};function Te(e,i,u,E,F,L){const C=a("font-awesome-icon"),b=a("el-button"),c=a("el-upload"),d=a("el-dialog"),$=a("edit"),g=a("el-icon");return y(),I(U,null,[t(d,{modelValue:e.editing,"onUpdate:modelValue":i[1]||(i[1]=m=>e.editing=m),title:e.title,width:"400px"},{footer:o(()=>[s("span",Se,[t(b,{round:"",onClick:e.onCancel},{default:o(()=>[f(n(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),t(b,{round:"",type:"primary",onClick:e.onConfirm},{default:o(()=>[f(n(e.$t("common.button.confirm")),1)]),_:1},8,["onClick"])])]),default:o(()=>[s("div",null,[t(c,{"file-list":e.fileList,"onUpdate:file-list":i[0]||(i[0]=m=>e.fileList=m),name:"file",limit:5,multiple:!0,action:e.uploadUrl,"list-type":"picture","on-exceed":e.onExceed,"on-error":e.onError,headers:e.headers},{tip:o(()=>[s("div",Ie,n(e.tip),1)]),default:o(()=>[t(b,{round:"",type:"primary",class:"btn btn-upload"},{default:o(()=>[t(C,{icon:"fa-solid fa-upload",class:"icon mr-2"}),f(" "+n(e.$t("site.button.upload")),1)]),_:1})]),_:1},8,["file-list","action","on-exceed","on-error","headers"])])]),_:1},8,["modelValue","title"]),s("span",{class:"edit",onClick:i[2]||(i[2]=m=>e.editing=!0)},[t(g,{class:"icon"},{default:o(()=>[t($)]),_:1})])],64)}var Ue=A(Ee,[["render",Te],["__file","/home/runner/work/Nexior/Nexior/src/components/site/EditImage.vue"]]);const Ne=B({name:"EditText",components:{ElDialog:R,ElInput:ee,ElButton:W,ElIcon:H,ElTag:de,Edit:J},props:{modelValue:{type:Array,required:!0},title:{type:String,required:!0},placeholder:{type:String,required:!0},tip:{type:String,default:void 0},min:{type:Number,default:void 0},minErrorMessage:{type:String,default:void 0}},emits:["confirm","cancel"],data(){return{inputVisible:!1,inputValue:"",editing:!1,value:JSON.parse(JSON.stringify(this.modelValue))}},methods:{onCancel(){this.editing=!1},onConfirm(){if(this.min!==void 0&&this.value.length<this.min){M.error(this.minErrorMessage);return}this.$emit("confirm",this.value),this.editing=!1},onClose(e){this.value.splice(this.value.indexOf(e),1)},onInputConfirm(){const e=this.inputValue;e&&this.value.push(e),this.inputVisible=!1,this.inputValue=""},onNewItem(){this.inputVisible=!0,this.$nextTick(()=>{this.$refs.input.focus()})}}}),qe=f(" + "),De={class:"block tip"},Ae={class:"dialog-footer"};function Be(e,i,u,E,F,L){const C=a("el-tag"),b=a("el-input"),c=a("el-button"),d=a("el-dialog"),$=a("edit"),g=a("el-icon");return y(),I(U,null,[t(d,{modelValue:e.editing,"onUpdate:modelValue":i[1]||(i[1]=m=>e.editing=m),title:e.title,width:"400px"},{footer:o(()=>[s("span",Ae,[t(c,{round:"",onClick:e.onCancel},{default:o(()=>[f(n(e.$t("common.button.cancel")),1)]),_:1},8,["onClick"]),t(c,{round:"",type:"primary",onClick:e.onConfirm},{default:o(()=>[f(n(e.$t("common.button.confirm")),1)]),_:1},8,["onClick"])])]),default:o(()=>[(y(!0),I(U,null,te(e.value,(m,N)=>(y(),D(C,{key:N,closable:"",round:"",class:"mr-2 mb-2","disable-transitions":!1,onClose:S=>e.onClose(m)},{default:o(()=>[f(n(m),1)]),_:2},1032,["onClose"]))),128)),e.inputVisible?(y(),D(b,{key:0,ref:"input",modelValue:e.inputValue,"onUpdate:modelValue":i[0]||(i[0]=m=>e.inputValue=m),class:"block",size:"small",onKeyup:$e(e.onInputConfirm,["enter"]),onBlur:e.onInputConfirm},null,8,["modelValue","onKeyup","onBlur"])):(y(),D(c,{key:1,round:"",class:"block",size:"small",onClick:e.onNewItem},{default:o(()=>[qe]),_:1},8,["onClick"])),s("span",De,n(e.tip),1)]),_:1},8,["modelValue","title"]),s("span",{class:"edit",onClick:i[2]||(i[2]=m=>e.editing=!0)},[t(g,{class:"icon"},{default:o(()=>[t($)]),_:1})])],64)}var Fe=A(Ne,[["render",Be],["__file","/home/runner/work/Nexior/Nexior/src/components/site/EditArray.vue"]]);const Le=B({name:"SiteIndex",components:{EditText:Ve,EditImage:Ue,EditArray:Fe,ElDivider:re,ElRow:ue,ElImage:pe,ElCol:me,ElCard:fe,ElForm:ce,ElSwitch:ve,ElFormItem:he},data(){return{editing:{title:!1}}},computed:{site(){return this.$store.getters.site}},methods:{onSave(e){var u;const i=r(r({},this.site),e);ge.update((u=this.site)==null?void 0:u.id,i).then(()=>{var E;console.debug("getSite for id",(E=this.site)==null?void 0:E.id),this.$store.dispatch("getSite")})}}}),Oe={class:"title"},Ke={class:"title"},je={class:"block w-full"},ze={class:"block tip"},Me={class:"block w-full"},Re={class:"block tip"},We={class:"block w-full"},He={class:"block tip"},Je={class:"block w-full"},Pe={class:"block tip"},Qe={class:"block w-full"},Ge={class:"block tip"},Xe={class:"title"},Ye={class:"block w-full"},Ze={class:"block tip"},xe={class:"block w-full"},et={class:"block tip"},tt={class:"title"},it={class:"block tip"},lt={class:"block tip"},ot={class:"title"},st={class:"w-full"},nt={class:"block tip w-full"},at={key:0},dt={class:"block w-full"},rt={class:"block w-full"};function ut(e,i,u,E,F,L){const C=a("el-col"),b=a("el-row"),c=a("el-divider"),d=a("el-form-item"),$=a("edit-text"),g=a("el-image"),m=a("edit-image"),N=a("edit-array"),S=a("el-form"),q=a("el-card"),O=a("el-switch");return y(),D(b,{class:"panel"},{default:o(()=>[t(C,{span:24},{default:o(()=>[t(b,null,{default:o(()=>[t(C,{span:24},{default:o(()=>[s("h2",Oe,n(e.$t("common.title.site")),1)]),_:1})]),_:1}),t(b,{gutter:15},{default:o(()=>[t(C,{md:12,xs:24},{default:o(()=>[t(q,{shadow:"hover",class:"mb-4"},{default:o(()=>[s("h4",Ke,n(e.$t("site.title.basicConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[t(d,{label:e.$t("site.field.origin")},{default:o(()=>[s("span",je,n(e.site.origin),1),s("span",ze,n(e.$t("site.message.originTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.title")},{default:o(()=>[s("span",Me,[f(n(e.site.title)+" ",1),t($,{"model-value":e.site.title,title:e.$t("site.title.editTitle"),placeholder:e.$t("site.placeholder.title"),onConfirm:i[0]||(i[0]=l=>e.onSave({title:l}))},null,8,["model-value","title","placeholder"])]),s("span",Re,n(e.$t("site.message.titleTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.logo")},{default:o(()=>[s("span",We,[t(g,{src:e.site.logo,class:"logo"},null,8,["src"]),t(m,{"model-value":e.site.logo,title:e.$t("site.title.editLogo"),tip:e.$t("site.message.editLogoTip"),onConfirm:i[1]||(i[1]=l=>e.onSave({logo:l}))},null,8,["model-value","title","tip"])]),s("span",He,n(e.$t("site.message.logoTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.favicon")},{default:o(()=>[s("span",Je,[t(g,{src:e.site.favicon,class:"favicon"},null,8,["src"]),t(m,{"model-value":e.site.favicon,title:e.$t("site.title.editFavicon"),tip:e.$t("site.message.editFaviconTip"),onConfirm:i[2]||(i[2]=l=>e.onSave({favicon:l}))},null,8,["model-value","title","tip"])]),s("span",Pe,n(e.$t("site.message.faviconTip")),1)]),_:1},8,["label"]),t(c,{"border-style":"dashed"}),t(d,{label:e.$t("site.field.admins")},{default:o(()=>{var l,v;return[s("span",Qe,[f(n((l=e.site.admins)==null?void 0:l.join(", "))+" ",1),t(N,{"model-value":((v=e.site)==null?void 0:v.admins)||[],title:e.$t("site.title.editAdmins"),placeholder:e.$t("site.placeholder.admins"),tip:e.$t("site.message.adminsTip2"),min:1,"min-error-message":e.$t("site.message.atLeastOneAdmin"),onConfirm:i[3]||(i[3]=k=>e.onSave({admins:k}))},null,8,["model-value","title","placeholder","tip","min-error-message"])]),s("span",Ge,n(e.$t("site.message.adminsTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])]),_:1}),t(q,{shadow:"hover"},{default:o(()=>[s("h4",Xe,n(e.$t("site.title.seoConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[t(d,{label:e.$t("site.field.description")},{default:o(()=>[s("span",Ye,[f(n(e.site.description)+" ",1),t($,{"model-value":e.site.description,title:e.$t("site.title.editDescription"),placeholder:e.$t("site.placeholder.description"),onConfirm:i[4]||(i[4]=l=>e.onSave({description:l}))},null,8,["model-value","title","placeholder"])]),s("span",Ze,n(e.$t("site.message.descriptionTip")),1)]),_:1},8,["label"]),t(d,{label:e.$t("site.field.keywords")},{default:o(()=>{var l,v;return[s("span",xe,[f(n((l=e.site.keywords)==null?void 0:l.join(", "))+" ",1),t(N,{"model-value":((v=e.site)==null?void 0:v.keywords)||[],title:e.$t("site.title.editKeywords"),placeholder:e.$t("site.placeholder.keywords"),tip:e.$t("site.message.keywordsTip2"),onConfirm:i[5]||(i[5]=k=>e.onSave({keywords:k}))},null,8,["model-value","title","placeholder","tip"])]),s("span",et,n(e.$t("site.message.keywordsTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])]),_:1})]),_:1}),t(C,{md:12,xs:24},{default:o(()=>[t(q,{shadow:"hover",class:"mb-4"},{default:o(()=>[s("h4",tt,n(e.$t("site.title.distributionConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[t(d,{label:e.$t("site.field.distributionDefaultInviterId")},{default:o(()=>{var l,v;return[f(n((l=e.site.distribution)==null?void 0:l.default_inviter_id)+" ",1),t($,{"model-value":(v=e.site.distribution)==null?void 0:v.default_inviter_id,title:e.$t("site.title.editDistributionDefaultInviterId"),placeholder:e.$t("site.placeholder.editDistributionDefaultInviterId"),onConfirm:i[6]||(i[6]=k=>e.onSave({distribution:p(r({},e.site.distribution),{default_inviter_id:k})}))},null,8,["model-value","title","placeholder"]),s("span",it,n(e.$t("site.message.distributionDefaultInviterIdTip")),1)]}),_:1},8,["label"]),t(d,{label:e.$t("site.field.distributionForceInviterId")},{default:o(()=>{var l,v;return[f(n((l=e.site.distribution)==null?void 0:l.force_inviter_id)+" ",1),t($,{"model-value":(v=e.site.distribution)==null?void 0:v.force_inviter_id,title:e.$t("site.title.editDistributionForceInviterId"),placeholder:e.$t("site.placeholder.editDistributionForceInviterId"),onConfirm:i[7]||(i[7]=k=>e.onSave({distribution:p(r({},e.site.distribution),{force_inviter_id:k})}))},null,8,["model-value","title","placeholder"]),s("span",lt,n(e.$t("site.message.distributionForceInviterIdTip")),1)]}),_:1},8,["label"])]),_:1},8,["model"])]),_:1}),t(q,{shadow:"hover"},{default:o(()=>[s("h4",ot,n(e.$t("site.title.featuresConfig")),1),t(c),t(S,{model:e.site,class:"form","label-width":"auto",style:{"max-width":"600px"}},{default:o(()=>[(y(),I(U,null,te(["chat","midjourney","qrart","suno","support"],(l,v)=>t(d,{key:v,label:e.$t("site.field.features"+l.charAt(0).toUpperCase()+l.slice(1))},{default:o(()=>{var k,P,Q,G,X,Y;return[s("div",st,[t(O,{"model-value":((k=e.site.features[l])==null?void 0:k.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":h=>e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{enabled:h})})})},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]),s("span",nt,n(e.$t("site.message.features"+l.charAt(0).toUpperCase()+l.slice(1))),1),l==="support"?j((y(),I("div",at,[t(d,{label:"WeChat"},{default:o(()=>{var h,_;return[t(O,{"model-value":((_=(h=e.site.features[l])==null?void 0:h.wechat)==null?void 0:_.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":V=>{var w;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{wechat:p(r({},(w=e.site.features[l])==null?void 0:w.wechat),{enabled:V})})})})}},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]}),_:2},1024),j(t(d,{label:e.$t("site.field.qr")},{default:o(()=>{var h,_,V,w;return[s("span",dt,[t(g,{src:(_=(h=e.site.features[l])==null?void 0:h.wechat)==null?void 0:_.qr},null,8,["src"]),t(m,{"model-value":(w=(V=e.site.features[l])==null?void 0:V.wechat)==null?void 0:w.qr,title:e.$t("site.title.editQR"),tip:e.$t("site.message.editQRTip"),onConfirm:K=>{var T;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{wechat:p(r({},(T=e.site.features[l])==null?void 0:T.wechat),{qr:K})})})})}},null,8,["model-value","title","tip","onConfirm"])])]}),_:2},1032,["label"]),[[z,(Q=(P=e.site.features[l])==null?void 0:P.wechat)==null?void 0:Q.enabled]]),t(d,{label:"Discord"},{default:o(()=>{var h,_;return[t(O,{"model-value":((_=(h=e.site.features[l])==null?void 0:h.discord)==null?void 0:_.enabled)||!1,"inline-prompt":"","active-text":e.$t("site.button.enabled"),"inactive-text":e.$t("site.button.disabled"),"onUpdate:modelValue":V=>{var w;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{discord:p(r({},(w=e.site.features[l])==null?void 0:w.discord),{enabled:V})})})})}},null,8,["model-value","active-text","inactive-text","onUpdate:modelValue"])]}),_:2},1024),j(t(d,{label:e.$t("site.field.url")},{default:o(()=>{var h,_,V,w;return[s("span",rt,[f(n((_=(h=e.site.features[l])==null?void 0:h.discord)==null?void 0:_.url)+" ",1),t($,{"model-value":(w=(V=e.site.features[l])==null?void 0:V.discord)==null?void 0:w.url,title:e.$t("site.title.editUrl"),placeholder:e.$t("site.placeholder.editUrl"),onConfirm:K=>{var T;return e.onSave({features:p(r({},e.site.features),{[l]:p(r({},e.site.features[l]),{discord:p(r({},(T=e.site.features[l])==null?void 0:T.discord),{url:K})})})})}},null,8,["model-value","title","placeholder","onConfirm"])])]}),_:2},1032,["label"]),[[z,(X=(G=e.site.features[l])==null?void 0:G.discord)==null?void 0:X.enabled]])],512)),[[z,(Y=e.site.features[l])==null?void 0:Y.enabled]]):_e("v-if",!0)]}),_:2},1032,["label"])),64))]),_:1},8,["model"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}var gt=A(Le,[["render",ut],["__scopeId","data-v-262b806e"],["__file","/home/runner/work/Nexior/Nexior/src/pages/site/Index.vue"]]);export{gt as default};