import{W as pe}from"./api.77308ba3.js";import{e as he}from"./emitter.c27b7986.js";import{d as ve,j as me,o as _e,c as ge,aF as we,aG as ye,a as be}from"./vue.adf17aba.js";import{_ as Se}from"./_plugin-vue_export-helper.c27b6911.js";import"./index.b098562c.js";import"./elementPlus.4833989a.js";import"./echarts.72dc8373.js";var O=typeof window<"u"?window:void 0,R=typeof document<"u"?document:void 0,v=typeof navigator<"u"?navigator:void 0,W=typeof location<"u"?location:void 0;function Me(){return(W==null?void 0:W.href)||""}var I,M=(v==null?void 0:v.userAgent)||"",ke=(v==null?void 0:v.platform)||"";(I=M==null?void 0:M.match(/wxwork\/([\d.]+)/i))==null||I[1];var se=xe();se.isIOS;se.isMac;function xe(){var e,n=(e=v==null?void 0:v.maxTouchPoints)!=null?e:1,t=/Mac/i.test(ke);return t&&n>2?{isMac:!1,isIOS:!0}:{isMac:t,isIOS:/\b(iPhone|iPad|iPod)\b/i.test(M)}}function j(e,n,t,a,r,c,u){try{var o=e[c](u),s=o.value}catch(l){t(l);return}o.done?n(s):Promise.resolve(s).then(a,r)}function Pe(e){return function(){var n=this,t=arguments;return new Promise(function(a,r){var c=e.apply(n,t);function u(s){j(c,a,r,u,o,"next",s)}function o(s){j(c,a,r,u,o,"throw",s)}u(void 0)})}}function Ae(e,n){var t=function(i){return function(f){return a([i,f])}},a=function(i){if(c)throw new TypeError("Generator is already executing.");for(;s&&(s=0,i[0]&&(r=0)),r;)try{if(c=1,u&&(o=i[0]&2?u.return:i[0]?u.throw||((o=u.return)&&o.call(u),0):u.next)&&!(o=o.call(u,i[1])).done)return o;switch(u=0,o&&(i=[i[0]&2,o.value]),i[0]){case 0:case 1:o=i;break;case 4:return r.label++,{value:i[1],done:!1};case 5:r.label++,u=i[1],i=[0];continue;case 7:i=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]e.length)&&(n=e.length);for(var t=0,a=new Array(n);t=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Oe={config:"preVerifyJsApi",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareWechat:"menu:share:wechat",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress",getBrandWCPayRequest:"getBrandWCPayRequest"};for(var Re=S(Object.keys(Oe)),B;!(B=Re()).done;)B.value;function We(e){if(Array.isArray(e))return x(e)}function Ie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function je(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Be(e){return We(e)||Ie(e)||le(e)||je()}function qe(){for(var e=arguments.length,n=new Array(e),t=0;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function y(e,n,t){return ze()?y=Reflect.construct:y=function(r,c,u){var o=[null];o.push.apply(o,c);var s=Function.bind.apply(r,o),l=new s;return u&&g(l,u.prototype),l},y.apply(null,arguments)}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},P(e)}function Je(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function A(e){var n=typeof Map=="function"?new Map:void 0;return A=function(a){var r=function(){return y(a,arguments,P(this).constructor)};if(a===null||!Je(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n<"u"){if(n.has(a))return n.get(a);n.set(a,r)}return r.prototype=Object.create(a.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,a)},A(e)}A(Error);var C;(function(e){e.CLProximityUnknown="0",e.CLProximityImmediate="1",e.CLProximityNear="2",e.CLProximityFar="3"})(C||(C={}));var L;(function(e){e.wgs84="wgs84",e.gcj02="gcj02"})(L||(L={}));var E;(function(e){e.wifi="wifi",e.network2g="2g",e.network3g="3g",e.network4g="4g",e.none="none",e.unknown="unknown"})(E||(E={}));var z;(function(e){e.original="original",e.compressed="compressed"})(z||(z={}));var J;(function(e){e.album="album",e.camera="camera"})(J||(J={}));var N;(function(e){e.normal="normal",e.batch="batch",e.front="front",e.batch_front="batch_front"})(N||(N={}));var D;(function(e){e[e.common=0]="common",e[e.corp_training=1]="corp_training",e[e.edu_normal_class=2]="edu_normal_class",e[e.edu_small_class=3]="edu_small_class"})(D||(D={}));var Q;(function(e){e[e.normal=0]="normal",e[e.scan=1]="scan"})(Q||(Q={}));var V;(function(e){e[e.chat=0]="chat",e[e.qrcode=1]="qrcode"})(V||(V={}));var H;(function(e){e.contact_profile="contact_profile",e.single_chat_tools="single_chat_tools",e.group_chat_tools="group_chat_tools",e.chat_attachment="chat_attachment",e.single_kf_tools="single_kf_tools",e.chain_single_chat_tools="chain_single_chat_tools",e.chain_group_chat_tools="chain_group_chat_tools",e.normal="normal"})(H||(H={}));var F;(function(e){e.release="release",e.trial="trial",e.develop="develop"})(F||(F={}));var G;(function(e){e[e.internal=1]="internal",e[e.external=2]="external"})(G||(G={}));var K;(function(e){e[e.mediaid=1]="mediaid",e[e.url=2]="url",e[e.localId=4]="localId"})(K||(K={}));var U;(function(e){e.None="None",e.HWOpenTalk="HWOpenTalk",e.VoIP="VoIP",e.SystemCall="SystemCall"})(U||(U={}));var Z;(function(e){e.qrCode="qrCode",e.barCode="barCode"})(Z||(Z={}));var $;(function(e){e.single="single",e.multi="multi"})($||($={}));var X;(function(e){e.department="department",e.user="user"})(X||(X={}));var Y;(function(e){e.single="single",e.multi="multi"})(Y||(Y={}));var T;(function(e){e.department="department",e.user="user"})(T||(T={}));var ee;(function(e){e[e.all=0]="all",e[e.unselected=1]="unselected"})(ee||(ee={}));var ne;(function(e){e.single="single",e.multi="multi"})(ne||(ne={}));var te;(function(e){e.create_approval="10001",e.view_approval="10002"})(te||(te={}));var re;(function(e){e.link="link",e.text="text"})(re||(re={}));function Ne(e,n,t){var a=document.createElement("iframe"),r=a.style;r.display="block",r.border="none",r.background="transparent",r.width=e,r.height=n,a.referrerPolicy="origin",a.setAttribute("frameborder","0"),a.setAttribute("allowtransparency","true");var c=De(t);return c&&c.appendChild(a),a}function De(e){return typeof e=="string"?document.querySelector(e):e}function Qe(){var e=Math.random().toString(36).slice(2);return Date.now().toString(36)+"."+e}function Ve(e){return!e||typeof e!="object"?e:k({},e,{message:e.message,stack:e.stack})}function He(e,n){var t=function(s){return new Promise(function(l,i){var f=Qe();r.set(f,{resolve:l,reject:i}),e({type:"ww-iframe-handle:call",uid:f,args:s})})},a=function(s){var l=r.get(s.uid);l&&(l[s.kind](s.args),r.delete(s.uid))},r=new Map;function c(o){return u.apply(this,arguments)}function u(){return u=Pe(function(o){var s,l;return Ae(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),s={type:"ww-iframe-handle:response",uid:o.uid,kind:"resolve"},[4,n(o.args)];case 1:return e.apply(void 0,[(s.args=i.sent(),s)]),[3,3];case 2:throw l=i.sent(),e({type:"ww-iframe-handle:response",uid:o.uid,kind:"reject",args:Ve(l)}),l;case 3:return[2]}})}),u.apply(this,arguments)}return{invoke:t,handleCallMessage:c,handleResponseMessage:a}}var ae=!1,b=[];function Fe(e,n,t){var a=typeof n=="string"?n:JSON.stringify(n);e==null||e.postMessage(a,t)}function Ge(e){return ae||(ae=!0,window.addEventListener("message",Ke)),b.push(e),function(){var n=b.indexOf(e);n>=0&&b.splice(n,1)}}function Ke(e){try{var n=JSON.parse(e.data);if(!n.type.startsWith("ww-iframe-handle:"))return;for(var t=S(b.slice()),a;!(a=t()).done;){var r=a.value;r(n,e)}}catch{}}function Ue(e,n,t){var a=function(){p||u({type:"ww-iframe-handle:init"})},r=function(){if(!p){p=!0;for(var d=S(f),_;!(_=d()).done;){var de=_.value;u(de)}}},c=function(d){var _=JSON.stringify(d);p?u(_):f.push(_)},u=function(d){Fe(e.contentWindow,d,n)},o=He(c,t),s=o.invoke,l=o.handleCallMessage,i=o.handleResponseMessage,f=[],p=!1,fe=Ge(function(h,d){if(!(d.origin!==n||e.contentWindow!==d.source))switch(h.type){case"ww-iframe-handle:ready":return r();case"ww-iframe-handle:call":return l(h);case"ww-iframe-handle:response":return i(h)}});return e.addEventListener("load",a),{el:e,invoke:s,dispose:fe}}function Ze(e,n){Ce(n[e.name],e.payload||e.data)}var $e="1.4.5",oe;(function(e){e.serviceApp="ServiceApp",e.corpApp="CorpApp"})(oe||(oe={}));var ie;(function(e){e.zh="zh",e.en="en"})(ie||(ie={}));var ce;(function(e){e.top="top",e.callback="callback",e.self="self"})(ce||(ce={}));var m;(function(e){e.middle="middle",e.small="small"})(m||(m={}));var w,ue=(w={},w[m.middle]=["480px","416px"],w[m.small]=["320px","380px"],w);function Xe(e){for(var n,t=Ye((n=e.params)==null?void 0:n.panel_size),a=t.width,r=t.height,c=Ne(a,r,e.el),u=Ue(c,"https://login.work.weixin.qq.com",function(f){if(f.type==="call")return Ze(f,e);throw new Error("Unknown message type '"+f.type+"'")}).dispose,o=new URL("https://login.work.weixin.qq.com/wwlogin/sso/login"),s=S(Object.keys(e.params||{})),l;!(l=s()).done;){var i=l.value;o.searchParams.set(i,e.params[i])}return o.searchParams.set("version",$e),c.src=o.href,{el:c,unmount:function(){var p;u(),(p=c.parentNode)==null||p.removeChild(c)}}}function Ye(e){e===void 0&&(e=m.middle);var n=ue[e]||ue[m.middle];return{width:n[0],height:n[1]}}const Te=e=>(we("data-v-6c484747"),e=e(),ye(),e),en={class:"login-scan-container"},nn=Te(()=>be("div",{id:"wx_qrcode"},null,-1)),tn=[nn],rn=ve({__name:"scan",props:{isScan:{type:Boolean,default:!1}},setup(e){const n=e;function t(){Xe({el:"#wx_qrcode",params:{login_type:"CorpApp",appid:"ww467ec1685e8262e6",agentid:"1000065",redirect_uri:"http://amzads.zositechc.cn/web/",state:"Wechat",scope:"snsapi_privateinfo",redirect_type:"callback"},onCheckWeComLogin({isWeComLogin:r}){},onLoginSuccess({code:r}){a({code:r,state:"Wechat"})},onLoginFail(r){}})}async function a(r){try{const c=await pe(r);c&&he.emit("scan-wecomLogin",{loginInfo:c})}catch(c){console.log("error:",c)}}return me(()=>{n.isScan&&t()}),(r,c)=>(_e(),ge("div",en,tn))}});const dn=Se(rn,[["__scopeId","data-v-6c484747"]]);export{dn as default};