PageSourceSearch

https://rx-zenith-ui.lovable.app/assets/MobileScannerInfoModal-DvVOiE50.js

js rx-zenith-ui.lovable.app collected 2026-10-03 03:44:04 UTC 25,626 bytes, 9 lines download raw bytes

1import{j as o,ay as W,m as L,f as K,X as Z,as as ge,aZ as xe,b2 as we,bv as Ee,q as J,d as z,cA as be,at as ye,c7 as Ce,bI as Ne,c as Me}from"./vendor-ui-C55-z5ML.js";import{R as C,r as D,a as ve}from"./vendor-react-BeyMlh3v.js";import{t as Re,u as Ae}from"./index-bxsxYkA5.js";import"./vendor-export-CJuGTaQd.js";import"./vendor-charts-CLYneQfg.js";import"./vendor-supabase-C07NOBum.js";var Pe=Object.defineProperty,T=Object.getOwnPropertySymbols,q=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,X=(u,a,i)=>a in u?Pe(u,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):u[a]=i,Q=(u,a)=>{for(var i in a||(a={}))q.call(a,i)&&X(u,i,a[i]);if(T)for(var i of T(a))ee.call(a,i)&&X(u,i,a[i]);return u},U=(u,a)=>{var i={};for(var c in u)q.call(u,c)&&a.indexOf(c)<0&&(i[c]=u[c]);if(u!=null&&T)for(var c of T(u))a.indexOf(c)<0&&ee.call(u,c)&&(i[c]=u[c]);return i};/**
2 * @license QR Code generator library (TypeScript)
3 * Copyright (c) Project Nayuki.
4 * SPDX-License-Identifier: MIT
5 */var S;(u=>{const a=class x{constructor(e,s,t,r){if(this.version=e,this.errorCorrectionLevel=s,this.modules=[],this.isFunction=[],e<x.MIN_VERSION||e>x.MAX_VERSION)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let n=[];for(let l=0;l<this.size;l++)n.push(!1);for(let l=0;l<this.size;l++)this.modules.push(n.slice()),this.isFunction.push(n.slice());this.drawFunctionPatterns();const h=this.addEccAndInterleave(t);if(this.drawCodewords(h),r==-1){let l=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const m=this.getPenaltyScore();m<l&&(r=g,l=m),this.applyMask(g)}}f(0<=r&&r<=7),this.mask=r,this.applyMask(r),this.drawFormatBits(r),this.isFunction=[]}static encodeText(e,s){const t=u.QrSegment.makeSegments(e);return x.encodeSegments(t,s)}static encodeBinary(e,s){const t=u.QrSegment.makeBytes(e);return x.encodeSegments([t],s)}static encodeSegments(e,s,t=1,r=40,n=-1,h=!0){if(!(x.MIN_VERSION<=t&&t<=r&&r<=x.MAX_VERSION)||n<-1||n>7)throw new RangeError("Invalid value");let l,g;for(l=t;;l++){const p=x.getNumDataCodewords(l,s)*8,y=E.getTotalBits(e,l);if(y<=p){g=y;break}if(l>=r)throw new RangeError("Data too long")}for(const p of[x.Ecc.MEDIUM,x.Ecc.QUARTILE,x.Ecc.HIGH])h&&g<=x.getNumDataCodewords(l,p)*8&&(s=p);let m=[];for(const p of e){i(p.mode.modeBits,4,m),i(p.numChars,p.mode.numCharCountBits(l),m);for(const y of p.getData())m.push(y)}f(m.length==g);const M=x.getNumDataCodewords(l,s)*8;f(m.length<=M),i(0,Math.min(4,M-m.length),m),i(0,(8-m.length%8)%8,m),f(m.length%8==0);for(let p=236;m.length<M;p^=253)i(p,8,m);let N=[];for(;N.length*8<m.length;)N.push(0);return m.forEach((p,y)=>N[y>>>3]|=p<<7-(y&7)),new x(l,s,N,n)}getModule(e,s){return 0<=e&&e<this.size&&0<=s&&s<this.size&&this.modules[s][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let t=0;t<this.size;t++)this.setFunctionModule(6,t,t%2==0),this.setFunctionModule(t,6,t%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),s=e.length;for(let t=0;t<s;t++)for(let r=0;r<s;r++)t==0&&r==0||t==0&&r==s-1||t==s-1&&r==0||this.drawAlignmentPattern(e[t],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const s=this.errorCorrectionLevel.formatBits<<3|e;let t=s;for(let n=0;n<10;n++)t=t<<1^(t>>>9)*1335;const r=(s<<10|t)^21522;f(r>>>15==0);for(let n=0;n<=5;n++)this.setFunctionModule(8,n,c(r,n));this.setFunctionModule(8,7,c(r,6)),this.setFunctionModule(8,8,c(r,7)),this.setFunctionModule(7,8,c(r,8));for(let n=9;n<15;n++)this.setFunctionModule(14-n,8,c(r,n));for(let n=0;n<8;n++)this.setFunctionModule(this.size-1-n,8,c(r,n));for(let n=8;n<15;n++)this.setFunctionModule(8,this.size-15+n,c(r,n));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;const s=this.version<<12|e;f(s>>>18==0);for(let t=0;t<18;t++){const r=c(s,t),n=this.size-11+t%3,h=Math.floor(t/3);this.setFunctionModule(n,h,r),this.setFunctionModule(h,n,r)}}
5drawFinderPattern(e,s){for(let t=-4;t<=4;t++)for(let r=-4;r<=4;r++){const n=Math.max(Math.abs(r),Math.abs(t)),h=e+r,l=s+t;0<=h&&h<this.size&&0<=l&&l<this.size&&this.setFunctionModule(h,l,n!=2&&n!=4)}}drawAlignmentPattern(e,s){for(let t=-2;t<=2;t++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,s+t,Math.max(Math.abs(r),Math.abs(t))!=1)}setFunctionModule(e,s,t){this.modules[s][e]=t,this.isFunction[s][e]=!0}addEccAndInterleave(e){const s=this.version,t=this.errorCorrectionLevel;if(e.length!=x.getNumDataCodewords(s,t))throw new RangeError("Invalid argument");const r=x.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][s],n=x.ECC_CODEWORDS_PER_BLOCK[t.ordinal][s],h=Math.floor(x.getNumRawDataModules(s)/8),l=r-h%r,g=Math.floor(h/r);let m=[];const M=x.reedSolomonComputeDivisor(n);for(let p=0,y=0;p<r;p++){let v=e.slice(y,y+g-n+(p<l?0:1));y+=v.length;const k=x.reedSolomonComputeRemainder(v,M);p<l&&v.push(0),m.push(v.concat(k))}let N=[];for(let p=0;p<m[0].length;p++)m.forEach((y,v)=>{(p!=g-n||v>=l)&&N.push(y[p])});return f(N.length==h),N}drawCodewords(e){if(e.length!=Math.floor(x.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let r=0;r<this.size;r++)for(let n=0;n<2;n++){const h=t-n,g=(t+1&2)==0?this.size-1-r:r;!this.isFunction[g][h]&&s<e.length*8&&(this.modules[g][h]=c(e[s>>>3],7-(s&7)),s++)}}f(s==e.length*8)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let s=0;s<this.size;s++)for(let t=0;t<this.size;t++){let r;switch(e){case 0:r=(t+s)%2==0;break;case 1:r=s%2==0;break;case 2:r=t%3==0;break;case 3:r=(t+s)%3==0;break;case 4:r=(Math.floor(t/3)+Math.floor(s/2))%2==0;break;case 5:r=t*s%2+t*s%3==0;break;case 6:r=(t*s%2+t*s%3)%2==0;break;case 7:r=((t+s)%2+t*s%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[s][t]&&r&&(this.modules[s][t]=!this.modules[s][t])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let h=!1,l=0,g=[0,0,0,0,0,0,0];for(let m=0;m<this.size;m++)this.modules[n][m]==h?(l++,l==5?e+=x.PENALTY_N1:l>5&&e++):(this.finderPenaltyAddHistory(l,g),h||(e+=this.finderPenaltyCountPatterns(g)*x.PENALTY_N3),h=this.modules[n][m],l=1);e+=this.finderPenaltyTerminateAndCount(h,l,g)*x.PENALTY_N3}for(let n=0;n<this.size;n++){let h=!1,l=0,g=[0,0,0,0,0,0,0];for(let m=0;m<this.size;m++)this.modules[m][n]==h?(l++,l==5?e+=x.PENALTY_N1:l>5&&e++):(this.finderPenaltyAddHistory(l,g),h||(e+=this.finderPenaltyCountPatterns(g)*x.PENALTY_N3),h=this.modules[m][n],l=1);e+=this.finderPenaltyTerminateAndCount(h,l,g)*x.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let h=0;h<this.size-1;h++){const l=this.modules[n][h];l==this.modules[n][h+1]&&l==this.modules[n+1][h]&&l==this.modules[n+1][h+1]&&(e+=x.PENALTY_N2)}let s=0;for(const n of this.modules)s=n.reduce((h,l)=>h+(l?1:0),s);const t=this.size*this.size,r=Math.ceil(Math.abs(s*20-t*10)/t)-1;return f(0<=r&&r<=9),e+=r*x.PENALTY_N4,f(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{const e=Math.floor(this.version/7)+2,s=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2;let t=[6];for(let r=this.size-7;t.length<e;r-=s)t.splice(1,0,r);return t}}static getNumRawDataModules(e){if(e<x.MIN_VERSION||e>x.MAX_VERSION)throw new RangeError("Version number out of range");let s=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;s-=(25*t-10)*t-55,e>=7&&(s-=36)}return f(208<=s&&s<=29648),s}static getNumDataCodewords(e,s){return Math.floor(x.getNumRawDataModules(e)/8)-x.ECC_CODEWORDS_PER_BLOCK[s.ordinal][e]*x.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let s=[];for(let r=0;r<e-1;r++)s.push(0);s.push(1);let t=1;for(let r=0;r<e;r++){for(let n=0;n<s.length;n++)s[n]=x.reedSolomonMultiply(s[n],t),n+1<s.length&&(s[n]^=s[n+1]);t=x.reedSolomonMultiply(t,2)}return s}static reedSolomonComputeRemainder(e,s){let t=s.map(r=>0);for(const r of e){const n=r^t.shift();t.push(0),s.forEach((h,l)=>t[l]^=x.reedSolomonMultiply(h,n))}return t}static reedSolomonMultiply(e,s){if(e>>>8||s>>>8)throw new RangeError("Byte out of range");let t=0;for(let r=7;r>=0;r--)t=t<<1^(t>>>7)*285,t^=(s>>>r&1)*e;return f(t>>>8==0),t}finderPenaltyCountPatterns(e){const s=e[1];f(s<=this.size*3);const t=s>0&&e[2]==s&&e[3]==s*3&&e[4]==s&&e[5]==s;return(t&&e[0]>=s*4&&e[6]>=s?1:0)+(t&&e[6]>=s*4&&e[0]>=s?1:0)}finderPenaltyTerminateAndCount(e,s,t){return e&&(this.finderPenaltyAddHistory(s,t),s=0),s+=this.size,this.finderPenaltyAddHistory(s,t),this.finderPenaltyCountPatterns(t)}finderPenaltyAddHistory(e,s){s[0]==0&&(e+=this.size),s.pop(),s.unshift(e)}};a.MIN_VERSION=1,a.MAX_VERSION=40,a.PENALTY_N1=3,a.PENALTY_N2=3,a.PENALTY_N3=40,a.PENALTY_N4=10,a.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],a.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],u.QrCode=a;function i(w,e,s){if(e<0||e>31||w>>>e)throw new RangeError("Value out of range");for(let t=e-1;t>=0;t--)s.push(w>>>t&1)}function c(w,e){return(w>>>e&1)!=0}function f(w){if(!w)throw new Error("Assertion error")}const d=class b{constructor(e,s,t){if(this.mode=e,this.numChars=s,this.bitData=t,s<0)throw new RangeError("Invalid argument");this.bitData=t.slice()}static makeBytes(e){let s=[];for(const t of e)i(t,8,s);return new b(b.Mode.BYTE,e.length,s)}static makeNumeric(e){if(!b.isNumeric(e))throw new RangeError("String contains 
5non-numeric characters");let s=[];for(let t=0;t<e.length;){const r=Math.min(e.length-t,3);i(parseInt(e.substring(t,t+r),10),r*3+1,s),t+=r}return new b(b.Mode.NUMERIC,e.length,s)}static makeAlphanumeric(e){if(!b.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let s=[],t;for(t=0;t+2<=e.length;t+=2){let r=b.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t))*45;r+=b.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),i(r,11,s)}return t<e.length&&i(b.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,s),new b(b.Mode.ALPHANUMERIC,e.length,s)}static makeSegments(e){return e==""?[]:b.isNumeric(e)?[b.makeNumeric(e)]:b.isAlphanumeric(e)?[b.makeAlphanumeric(e)]:[b.makeBytes(b.toUtf8ByteArray(e))]}static makeEci(e){let s=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)i(e,8,s);else if(e<16384)i(2,2,s),i(e,14,s);else if(e<1e6)i(6,3,s),i(e,21,s);else throw new RangeError("ECI assignment value out of range");return new b(b.Mode.ECI,0,s)}static isNumeric(e){return b.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return b.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,s){let t=0;for(const r of e){const n=r.mode.numCharCountBits(s);if(r.numChars>=1<<n)return 1/0;t+=4+n+r.bitData.length}return t}static toUtf8ByteArray(e){e=encodeURI(e);let s=[];for(let t=0;t<e.length;t++)e.charAt(t)!="%"?s.push(e.charCodeAt(t)):(s.push(parseInt(e.substring(t+1,t+3),16)),t+=2);return s}};d.NUMERIC_REGEX=/^[0-9]*$/,d.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,d.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let E=d;u.QrSegment=d})(S||(S={}));(u=>{(a=>{const i=class{constructor(f,d){this.ordinal=f,this.formatBits=d}};i.LOW=new i(0,1),i.MEDIUM=new i(1,0),i.QUARTILE=new i(2,3),i.HIGH=new i(3,2),a.Ecc=i})(u.QrCode||(u.QrCode={}))})(S||(S={}));(u=>{(a=>{const i=class{constructor(f,d){this.modeBits=f,this.numBitsCharCount=d}numCharCountBits(f){return this.numBitsCharCount[Math.floor((f+7)/17)]}};i.NUMERIC=new i(1,[10,12,14]),i.ALPHANUMERIC=new i(2,[9,11,13]),i.BYTE=new i(4,[8,16,16]),i.KANJI=new i(8,[8,10,12]),i.ECI=new i(7,[0,0,0]),a.Mode=i})(u.QrSegment||(u.QrSegment={}))})(S||(S={}));var j=S;/**
6 * @license qrcode.react
7 * Copyright (c) Paul O'Shannessy
8 * SPDX-License-Identifier: ISC
9 */var Se={L:j.QrCode.Ecc.LOW,M:j.QrCode.Ecc.MEDIUM,Q:j.QrCode.Ecc.QUARTILE,H:j.QrCode.Ecc.HIGH},te=128,se="L",re="#FFFFFF",ne="#000000",oe=!1,ie=1,je=4,Ie=0,Oe=.1;function ae(u,a=0){const i=[];return u.forEach(function(c,f){let d=null;c.forEach(function(E,w){if(!E&&d!==null){i.push(`M${d+a} ${f+a}h${w-d}v1H${d+a}z`),d=null;return}if(w===c.length-1){if(!E)return;d===null?i.push(`M${w+a},${f+a} h1v1H${w+a}z`):i.push(`M${d+a},${f+a} h${w+1-d}v1H${d+a}z`);return}E&&d===null&&(d=w)})}),i.join("")}function le(u,a){return u.slice().map((i,c)=>c<a.y||c>=a.y+a.h?i:i.map((f,d)=>d<a.x||d>=a.x+a.w?f:!1))}function ke(u,a,i,c){if(c==null)return null;const f=u.length+i*2,d=Math.floor(a*Oe),E=f/a,w=(c.width||d)*E,e=(c.height||d)*E,s=c.x==null?u.length/2-w/2:c.x*E,t=c.y==null?u.length/2-e/2:c.y*E,r=c.opacity==null?1:c.opacity;let n=null;if(c.excavate){let l=Math.floor(s),g=Math.floor(t),m=Math.ceil(w+s-l),M=Math.ceil(e+t-g);n={x:l,y:g,w:m,h:M}}const h=c.crossOrigin;return{x:s,y:t,h:e,w,excavation:n,opacity:r,crossOrigin:h}}function Le(u,a){return a!=null?Math.max(Math.floor(a),0):u?je:Ie}function ce({value:u,level:a,minVersion:i,includeMargin:c,marginSize:f,imageSettings:d,size:E,boostLevel:w}){let e=C.useMemo(()=>{const l=(Array.isArray(u)?u:[u]).reduce((g,m)=>(g.push(...j.QrSegment.makeSegments(m)),g),[]);return j.QrCode.encodeSegments(l,Se[a],i,void 0,void 0,w)},[u,a,i,w]);const{cells:s,margin:t,numCells:r,calculatedImageSettings:n}=C.useMemo(()=>{let h=e.getModules();const l=Le(c,f),g=h.length+l*2,m=ke(h,E,l,d);return{cells:h,margin:l,numCells:g,calculatedImageSettings:m}},[e,E,d,c,f]);return{qrcode:e,margin:t,cells:s,numCells:r,calculatedImageSettings:n}}var Te=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),Fe=C.forwardRef(function(a,i){const c=a,{value:f,size:d=te,level:E=se,bgColor:w=re,fgColor:e=ne,includeMargin:s=oe,minVersion:t=ie,boostLevel:r,marginSize:n,imageSettings:h}=c,g=U(c,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:m}=g,M=U(g,["style"]),N=h?.src,p=C.useRef(null),y=C.useRef(null),v=C.useCallback(P=>{p.current=P,typeof i=="function"?i(P):i&&(i.current=P)},[i]),[k,_]=C.useState(!1),{margin:I,cells:F,numCells:B,calculatedImageSettings:R}=ce({value:f,level:E,minVersion:t,boostLevel:r,includeMargin:s,marginSize:n,imageSettings:h,size:d});C.useEffect(()=>{if(p.current!=null){const P=p.current,A=P.getContext("2d");if(!A)return;let $=F;const O=y.current,G=R!=null&&O!==null&&O.complete&&O.naturalHeight!==0&&O.naturalWi
9dth!==0;G&&R.excavation!=null&&($=le(F,R.excavation));const V=window.devicePixelRatio||1;P.height=P.width=d*V;const Y=d/B*V;A.scale(Y,Y),A.fillStyle=w,A.fillRect(0,0,B,B),A.fillStyle=e,Te?A.fill(new Path2D(ae($,I))):F.forEach(function(ue,me){ue.forEach(function(fe,pe){fe&&A.fillRect(pe+I,me+I,1,1)})}),R&&(A.globalAlpha=R.opacity),G&&A.drawImage(O,R.x+I,R.y+I,R.w,R.h)}}),C.useEffect(()=>{_(!1)},[N]);const he=Q({height:d,width:d},m);let H=null;return N!=null&&(H=C.createElement("img",{src:N,key:N,style:{display:"none"},onLoad:()=>{_(!0)},ref:y,crossOrigin:R?.crossOrigin})),C.createElement(C.Fragment,null,C.createElement("canvas",Q({style:he,height:d,width:d,ref:v,role:"img"},M)),H)});Fe.displayName="QRCodeCanvas";var de=C.forwardRef(function(a,i){const c=a,{value:f,size:d=te,level:E=se,bgColor:w=re,fgColor:e=ne,includeMargin:s=oe,minVersion:t=ie,boostLevel:r,title:n,marginSize:h,imageSettings:l}=c,g=U(c,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:m,cells:M,numCells:N,calculatedImageSettings:p}=ce({value:f,level:E,minVersion:t,boostLevel:r,includeMargin:s,marginSize:h,imageSettings:l,size:d});let y=M,v=null;l!=null&&p!=null&&(p.excavation!=null&&(y=le(M,p.excavation)),v=C.createElement("image",{href:l.src,height:p.h,width:p.w,x:p.x+m,y:p.y+m,preserveAspectRatio:"none",opacity:p.opacity,crossOrigin:p.crossOrigin}));const k=ae(y,m);return C.createElement("svg",Q({height:d,width:d,viewBox:`0 0 ${N} ${N}`,ref:i,role:"img"},g),!!n&&C.createElement("title",null,n),C.createElement("path",{fill:w,d:`M0,0 h${N}v${N}H0z`,shapeRendering:"crispEdges"}),C.createElement("path",{fill:e,d:k,shapeRendering:"crispEdges"}),v)});de.displayName="QRCodeSVG";const Be=({open:u,ownerUid:a,onClose:i})=>{const{toast:c}=Re(),[f,d]=D.useState(!1),E=D.useMemo(()=>`${typeof window<"u"?window.location.origin:""}/mobile-scan?owner=${encodeURIComponent(a)}`,[a]),w=async()=>{try{await navigator.clipboard.writeText(E),d(!0),setTimeout(()=>d(!1),1500),c({title:"Link copied"})}catch{c({title:"Copy failed",variant:"destructive"})}};return o.jsx(W,{children:u&&o.jsx(L.div,{initial:{opacity:0}
9,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[70] flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",onClick:i,children:o.jsxs(L.div,{initial:{scale:.94,y:8},animate:{scale:1,y:0},exit:{scale:.96},onClick:e=>e.stopPropagation(),className:"bg-card border border-border rounded-2xl w-full max-w-md shadow-xl overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border bg-muted/30",children:[o.jsxs("div",{className:"flex items-center gap-2.5",children:[o.jsx("div",{className:"w-9 h-9 rounded-xl bg-primary/15 text-primary grid place-items-center",children:o.jsx(K,{className:"w-4.5 h-4.5"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm font-bold text-foreground",children:"Pair Mobile Scanner"}),o.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Scan the QR with your phone"})]})]}),o.jsx("button",{onClick:i,className:"w-8 h-8 rounded-lg hover:bg-muted grid place-items-center",children:o.jsx(Z,{className:"w-4 h-4 text-muted-foreground"})})]}),o.jsxs("div",{className:"p-6 flex flex-col items-center gap-4",children:[o.jsx("div",{className:"p-4 rounded-2xl bg-white border border-border",children:o.jsx(de,{value:E,size:208,level:"M",includeMargin:!1})}),o.jsxs("ol",{className:"text-xs text-muted-foreground space-y-1.5 self-stretch list-decimal pl-5",children:[o.jsxs("li",{children:["Open the ",o.jsx("span",{className:"text-foreground font-medium",children:"Camera app"})," on your phone and scan the QR"]}),o.jsxs("li",{children:["Sign in with the ",o.jsx("span",{className:"text-foreground font-medium",children:"same owner account"})," (one-time)"]}),o.jsxs("li",{children:["After login you'll get ",o.jsx("span",{className:"text-foreground font-medium",children:"3 modes"}),": Barcode · AI Vision · AI Assistant"]}),o.jsx("li",{children:"Use any mode — every scan / add will sync to the POS cart automatically"})]}),o.jsxs("div",{className:"w-full flex items-center gap-2 bg-muted/40 border border-border rounded-xl px-3 py-2",children:[o.jsx("code",{className:"text-[11px] text-muted-foreground font-mono truncate flex-1",children:E}),o.jsx("button",{onClick:w,className:"w-8 h-8 rounded-lg hover:bg-muted grid place-items-center",title:"Copy link",children:f?o.jsx(ge,{className:"w-4 h-4 text-success"}):o.jsx(xe,{className:"w-4 h-4 text-muted-foreground"})}),o.jsx("a",{href:E,target:"_blank",rel:"noreferrer",className:"w-8 h-8 rounded-lg hover:bg-muted grid place-items-center",title:"Open",children:o.jsx(we,{className:"w-4 h-4 text-muted-foreground"})})]}),o.jsxs("p",{className:"text-[10px] text-muted-foreground text-center",children:["Pairing only works when both the phone and the desktop are signed in to the ",o.jsx("span",{className:"text-foreground font-medium",children:"same account"}),". (HTTPS required)"]})]})]})})})},ze=[{icon:Ce,title:"Phone as Scanner",desc:"Use your phone in place of a POS barcode scanner — no extra hardware needed."},{icon:J,title:"AI Vision Mode",desc:"Snap a photo of a strip or box to auto-detect the medicine — works even without a barcode."},{icon:Ne,title:"Instant Sync",desc:"Every scan is added to the POS cart instantly — wireless and real-time."},{icon:Me,title:"Secure Pairing",desc:"Works only when signed in with the same owner account — encrypted over HTTPS."}],De=["Tap Next to get a QR code and shareable link","Open the Camera app on your phone and scan the QR (or copy the link)","Sign in on the phone with the same owner account (only the first time)","Choose one of 3 modes: Barcode scan · AI Vision · AI Assistant","Scan or add items on your phone — they appear in the desktop POS automatically"],Xe=({open:u,onClose:a})=>{const{user:i}=Ae(),[c,f]=D.useState(!1);return ve.createPortal(o.jsxs(o.Fragment,{children:[o.jsx(W,{children:u&&!c&&o.jsx(L.div,{initial:{opacity:0}
9,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[90] flex items-center justify-center bg-black/60 backdrop-blur-sm p-3 sm:p-4",onClick:a,children:o.jsxs(L.div,{initial:{scale:.95,y:12},animate:{scale:1,y:0},exit:{scale:.96,opacity:0},transition:{type:"spring",damping:22,stiffness:280},onClick:d=>d.stopPropagation(),className:"bg-card border border-border rounded-2xl w-full max-w-2xl shadow-2xl overflow-hidden max-h-[calc(100dvh-1.5rem)] flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border bg-gradient-to-br from-primary/8 to-secondary/5 shrink-0",children:[o.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[o.jsx("div",{className:"w-10 h-10 rounded-xl bg-primary/15 text-primary grid place-items-center shrink-0",children:o.jsx(K,{className:"w-5 h-5"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsxs("h3",{className:"text-sm sm:text-base font-bold text-foreground font-display flex items-center gap-2",children:["Mobile Phone Scanner",o.jsxs("span",{className:"text-[10px] font-semibold px-2 py-0.5 rounded-full bg-success/15 text-success border border-success/30 inline-flex items-center gap-1",children:[o.jsx(Ee,{className:"w-3 h-3"})," Wireless"]})]}),o.jsx("p",{className:"text-[11px] text-muted-foreground truncate",children:"Turn your phone into a POS scanner + AI vision — free, no extra device"})]})]}),o.jsx("button",{onClick:a,className:"w-8 h-8 rounded-lg hover:bg-muted grid place-items-center shrink-0",children:o.jsx(Z,{className:"w-4 h-4 text-muted-foreground"})})]}),o.jsxs("div",{className:"overflow-y-auto p-4 sm:p-5 space-y-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wider text-muted-foreground mb-2",children:"Benefits"}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2.5",children:ze.map(d=>o.jsxs("div",{className:"flex items-start gap-2.5 p-3 rounded-xl bg-muted/30 border border-border/40",children:[o.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 text-primary grid place-items-center shrink-0",children:o.jsx(d.icon,{className:"w-4 h-4"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-[13px] font-semibold text-foreground",children:d.title}),o.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug",children:d.desc})]})]},d.title))})]}),o.jsxs("div",{children:[o.jsxs("p",{className:"text-[11px] font-bold uppercase tracking-wider text-muted-foreground mb-2 flex items-center gap-1.5",children:[o.jsx(J,{className:"w-3.5 h-3.5 text-primary"})," How to use (5 steps)"]}),o.jsx("ol",{className:"space-y-1.5 p-4 rounded-xl bg-muted/30 border border-border/40",children:De.map((d,E)=>o.jsxs("li",{className:"flex items-start gap-2.5 text-[12px] text-muted-foreground",children:[o.jsx("span",{className:"w-5 h-5 rounded-full bg-primary/15 text-primary text-[10px] font-bold grid place-items-center shrink-0 mt-px",children:E+1}),o.jsx("span",{className:"leading-snug",children:d})]},E))})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground px-1",children:[o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(z,{className:"w-3.5 h-3.5 text-success"})," HTTPS encrypted"]}),o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(z,{className:"w-3.5 h-3.5 text-success"})," Same-account only"]}),o.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.jsx(z,{className:"w-3.5 h-3.5 text-success"})," Offline queue support"]})]})]}),o.jsxs("div",{className:"px-4 sm:px-5 py-3.5 border-t border-border bg-muted/20 flex items-center justify-between gap-3 shrink-0",children:[o.jsx("button",{onClick:a,className:"px-4 py-2 rounded-lg text-sm font-medium text-muted-foreground hover:bg-muted transition-colors",children:"Cancel"}),o.jsxs("button",{onClick:()=>f(!0),className:"inline-flex items-center gap-2 px-4 sm:px-5 py-2.5 rounded-xl bg-primary text-primary-foreground text-sm font-semibold hover:opacity-90 transition-opacity shadow-sm",children:[o.jsx(be,{className:"w-4 h-4"})," Next: Show QR & Link ",o.jsx(ye,{className:"w-3.5 h-3.5"})]})]})]})})}),o.jsx(Be,{open:c,ownerUid:i?.uid||"",onClose:()=>{f(!1),a()}})]}),document.body)};export{Xe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.