You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pingAnQiYeWeb/public/modules/autocomplete_o4qswj.js

1 line
20 KiB

/**/_jsload2 && _jsload2('autocomplete', 'x.lang.Da.prototype.mi=ja(0,function(){delete window[x.ba]._instances[this.ba];for(var a in this)x.lang.Pt(this[a])||delete this[a]});x.K.getComputedStyle=function(a,b){var a=x.K.Xj(a),c=x.K.lE(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,p))?c[b]||c.getPropertyValue(b):""};x.K.remove=function(a){var a=x.K.Xj(a),b=a.parentNode;b&&b.removeChild(a)};x.lang.isArray=function(a){return"[object Array]"==Object.prototype.toString.call(a)}; x.event=x.event||{};x.event.stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=o};x.event.preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=q};x.event.stop=function(a){var b=x.event;b.stopPropagation(a);b.preventDefault(a)};x.kc.indexOf=function(a,b,c){var d=a.length,c=c|0;for(0>c&&(c=Math.max(0,d+c));c<d;c++)if(c in a&&a[c]===b)return c;return-1};x.kc.contains=function(a,b){return 0<=x.kc.indexOf(a,b)};x.Qb=x.Qb||{version:"1.3.9"}; x.Qb.EY=function(a){for(var a=a.split("-"),b=x.Qb,c=a.length,d=0;d<c;d++)b=b[a[d].charAt(0).toUpperCase()+a[d].slice(1)];return b};x.Qb.create=function(a,b){x.lang.ug(a)&&(a=x.Qb.EY(a));return new a(b)};x.event.qB=x.event.qB||[]; x.event.M=function(a,b,c){function d(b){c.call(a,b)}var b=b.replace(/^on/i,""),a=x.K.Xj(a),e=x.event.qB,f=x.event.T1,g=b,b=b.toLowerCase();f&&f[b]&&(f=f[b](a,b,d),g=f.type,d=f.w4);a&&a.addEventListener?a.addEventListener(g,d,q):a&&a.attachEvent&&a.attachEvent("on"+g,d);e[e.length]=[a,b,c,d,g];return a};x.M=x.event.M; x.event.cd=function(a,b,c){for(var a=x.K.Xj(a),b=b.replace(/^on/i,"").toLowerCase(),d=x.event.qB,e=d.length,f=!c,g,i;e--;)if(g=d[e],g[1]===b&&g[0]===a&&(f||g[2]===c))i=g[4],g=g[3],a.removeEventListener?a.removeEventListener(i,g,q):a.detachEvent&&a.detachEvent("on"+i,g),d.splice(e,1);return a};x.cd=x.event.cd; x.Qb.NG={id:"",Yb:function(a){var b;b="tangram-"+this.Mu+"--"+(this.id?this.id:this.ba);return a?b+"-"+a:b},mt:function(a){var b=this.PK,c=this.e0;a&&(b+="-"+a,c+="-"+a);this.e0&&(b+=" "+c);return b},ri:function(){return x.$(this.pN)},MX:function(){return x.$(this.Yb())},Mu:"",qp:function(){return"window[\'$BAIDU$\']._instances[\'"+this.ba+"\']"},w3:function(a){for(var b=0,c=Array.prototype.slice.call(arguments,1),d=c.length;b<d;b++)"string"==typeof c[b]&&(c[b]="\'"+c[b]+"\'");return this.qp()+"."+a+"("+ c.join(",")+");"},M:function(a,b,c){x.M(a,b,c);this.addEventListener("ondispose",function(){x.cd(a,b,c)})},i_:function(a){if(!this.ri())return a=x.$(a),a||(a=document.createElement("div"),document.body.appendChild(a),a.style.position="absolute",a.className=this.mt("main")),a.id||(a.id=this.Yb("main")),this.pN=a.id,a.setAttribute("data-guid",this.ba),a},mi:function(){this.dispatchEvent("dispose");x.lang.Da.prototype.mi.call(this)}}; x.Qb.MW=function(a){function b(){}function c(b,d){var m=this,b=b||{};e.call(m,!f?b:b.ba||"",o);x.object.extend(m,c.options);x.object.extend(m,b);m.PK=m.PK||"tangram-"+m.Mu.toLowerCase();for(g in x.Qb.mm)"undefined"!=typeof m[g]&&m[g]&&(x.object.extend(m,x.Qb.mm[g]),x.lang.Pt(m[g])?m.addEventListener("onload",function(){x.Qb.mm[g].call(m[g].apply(m))}):x.Qb.mm[g].call(m));a.apply(m,arguments);g=0;for(i=c.Wz.length;g<i;g++)c.Wz[g](m);b.parent&&m.U_&&m.U_(b.parent);!d&&b.B2&&m.va(b.element)}var d;d= d||{};var e=d.n0||x.lang.Da,f=e==x.lang.Da?1:0,g,i;b.prototype=e.prototype;d=c.prototype=new b;for(g in x.Qb.NG)d[g]=x.Qb.NG[g];c.extend=function(a){for(g in a)c.prototype[g]=a[g];return c};c.Wz=[];c.Xe=function(a){"function"==typeof a&&c.Wz.push(a)};c.options={};return c};x.K.fE=function(a,b){a=x.K.$(a);if(a===p)return a;if("style"==b)return a.style.cssText;b=x.K.jH[b]||b;return a.getAttribute(b)};x.fE=x.K.fE; x.Qb.get=function(a){var b;if(x.lang.ug(a))return x.lang.Lc(a);do{if(!a||9==a.nodeType)return p;if(b=x.K.fE(a,"data-guid"))return x.lang.Lc(b)}while((a=a.parentNode)!=document.body)}; x.Qb.Li=x.Qb.MW(function(){var a=this;a.addEventListener("onload",function(){eventName=J()?"touchstart":"mousedown";a.M(document,eventName,a.cX);a.M(window,"blur",a.d1)});a.cX=a.KS();a.d1=a.kT();a.zk=[];a.Xc=-1}).extend({Mu:"suggestion",I4:new Function,M4:new Function,J4:new Function,L4:new Function,O4:new Function,K4:new Function,getData:function(){return[]},b5:"",z2:"",zm:{},C0:"<div id=\'#{0}\' class=\'#{1}\' style=\'position:relative; top:0px; left:0px\'></div>",H5:"<div id=\'#{0}\' class=\'#{1}\'>#{2}</div>", B0:\'<div style="height:22px;line-height:22px;overflow:hidden;zoom:1;border-top:#E7E7E7 solid 1px;background:#F7F7F7;"><span style="float:right;color:#4B4B4B;border-left:1px solid #E7E7E7;padding:0 10px;font-size:14px;" onmousedown="#{0}">\\u5173\\u95ed</span></div>\',A0:\'<table cellspacing="0" cellpadding="2"><tbody>#{0}</tbody></table>\',D0:\'<tr><td id="#{0}" onmouseover="#{2}" onmouseout="#{3}" onmousedown="#{4}" onclick="#{5}" class="#{6}"><i class="route-icon">#{1}</i></td></tr>\',vY:function(){return x.np(this.C0, this.Yb(),this.mt(),this.ba)},va:function(a,b){var c,a=x.$(a);this.AC=b;!this.ri()&&a&&(this.p0=a.id?a.id:a.id=this.Yb("input"),c=this.i_(),c.style.display="none",c.innerHTML=this.vY(),this.dispatchEvent("onload"))},lB:function(){var a=this.ri();return a&&"none"!=a.style.display},Dj:function(a){var b=this.zm,a={data:{item:(b&&"number"==typeof a&&"undefined"!=typeof b[a]?b[a].value:a)==a?{value:a,content:a}:b[a],index:a}};this.dispatchEvent("onbeforepick",a)&&this.dispatchEvent("onpick",a)},show:function(a, b,c){var a=0,d=b.length;this.zk=[];this.Xc=-1;if(0==d&&!c)this.U();else{for(this.zm=[];a<d;a++)"undefined"!=typeof b[a].value?this.zm.push(b[a]):this.zm.push({value:b[a],content:b[a]}),("undefined"==typeof b[a].disable||b[a].disable==q)&&this.zk.push(a);this.MX().innerHTML=this.FS();this.ri().style.display="block";this.dispatchEvent("onshow")}},U:function(){if(this.lB()){if(0<=this.Xc&&this.NY)for(var a=this.zm,b=-1,c=0,d=a.length;c<d;c++)if("undefined"==typeof a[c].disable||a[c].disable==q)b++,b== this.Xc&&this.Dj(c);this.ri().style.display="none";this.dispatchEvent("onhide")}},Gt:function(a){var b=this.zk,c=p;this.Gr(a)&&(0<=this.Xc&&this.HH(),c=this.nI(a),x.Ta(c,this.mt("current")),this.Xc=x.kc.indexOf(b,a),this.dispatchEvent("onhighlight",{index:a,data:this.Hm(a)}))},MC:function(){var a=this.zk[this.Xc];this.HH()&&this.dispatchEvent("onclearhighlight",{index:a,data:this.Hm(a)})},HH:function(){var a=this.Xc,b=this.zk,c=p;return 0<=a?(c=this.nI(b[a]),x.Tb(c,this.mt("current")),this.Xc=-1, o):q},confirm:function(a,b){if("keyboard"==b||this.Gr(a))this.Dj(a),this.dispatchEvent("onconfirm",{data:this.Hm(a)||a,source:b}),this.Xc=-1,this.U()},Hm:function(a){return{item:this.zm[a],index:a}},zE:function(){return this.Pm().value},Pm:function(){return x.$(this.p0)},nI:function(a){return x.$(this.Yb("item"+a))},FS:function(){for(var a="",b=[],c=this.zm,d=c.length,e=0;e<d;e++)b.push(x.np(this.D0,this.Yb("item"+e),c[e].content,this.qp()+"._itemOver(event, "+e+")",this.qp()+"._itemOut(event, "+ e+")",this.qp()+"._itemDown(event, "+e+")",this.qp()+"._itemClick(event, "+e+")","undefined"==typeof c[e].disable||c[e].disable==q?"":this.mt("disable")));a+=x.np(this.A0,b.join(""));J()&&(a+=x.np(this.B0,this.qp()+"._close(event)"));return a},_close:function(){this.U()},_itemOver:function(a,b){x.event.stop(a||window.event);this.Gr(b)&&this.Gt(b);this.dispatchEvent("onmouseoveritem",{index:b,data:this.Hm(b)})},_itemOut:function(a,b){x.event.stop(a||window.event);this.NY||this.Gr(b)&&this.MC();this.dispatchEvent("onmouseoutitem", {index:b,data:this.Hm(b)})},_itemDown:function(a,b){x.event.stop(a||window.event);this.dispatchEvent("onmousedownitem",{index:b,data:this.Hm(b)})},_itemClick:function(a,b){x.event.stop(a||window.event);this.dispatchEvent("onitemclick",{index:b,data:this.Hm(b)});this.Gr(b)&&this.confirm(b,"mouse")},Gr:function(a){return x.kc.contains(this.zk,a)},KS:function(){var a=this;return function(b){var b=b||window.event,b=b.target||b.srcElement,c=x.Qb.get(b);b==a.Pm()||c&&c.Mu==a.Mu||a.U()}},kT:function(){var a= this;return function(){a.U()}},mi:function(){this.dispatchEvent("dispose");x.K.remove(this.pN);x.lang.Da.prototype.mi.call(this)}});x.Qb.mm=x.Qb.mm||{};x.K.children=function(a){a=x.K.$(a);if(a===p)return a;for(var b=[],a=a.firstChild;a;a=a.nextSibling)1==a.nodeType&&b.push(a);return b};x.K.insertBefore=function(a,b){var c;c=x.K.Xj;a=c(a);b=c(b);(c=b.parentNode)&&c.insertBefore(a,b);return a}; x.K.bd=function(a,b,c){var d=x.K,e,a=d.$(a),b=x.al.gP(b);if(e=d.$l)c=e.filter(b,c,"set");(e=d.iC[b])&&e.set?e.set(a,c):a.style[e||b]=c;return a};x.bd=x.K.bd;x.K.Di=function(a,b){a=x.K.$(a);if(a===p)return a;for(var c in b)x.K.bd(a,c,b[c]);return a};x.Di=x.K.Di;x.K.$l[x.K.$l.length]={set:function(a,b){b.constructor==Number&&!/zIndex|fontWeight|opacity|zoom|lineHeight/i.test(a)&&(b+="px");return b}}; x.K.lu=function(a,b){function c(a,b){return parseFloat(x.wj(a,b))||0}var d={};b.width&&(d.width=parseFloat(b.width));b.height&&(d.height=parseFloat(b.height));if(x.da.ZE&&(b.width&&(d.width=parseFloat(b.width)-c(a,"paddingLeft")-c(a,"paddingRight")-c(a,"borderLeftWidth")-c(a,"borderRightWidth"),0>d.width&&(d.width=0)),b.height))d.height=parseFloat(b.height)-c(a,"paddingTop")-c(a,"paddingBottom")-c(a,"borderTopWidth")-c(a,"borderBottomWidth"),0>d.height&&(d.height=0);return x.K.Di(a,d)}; (function(){var a=x.Qb.mm.aL=t();a.Ez=q;a.Bq;a.RG;a.SG;a.XP=function(){if(this.Bq)this.YP(),x.bd(this.Bq,"display","block");else{var a=this.BW||{},c=this.RG=a.Ua||this.ri(),d=a.opacity||"0",a=a.color||"",e=this.Bq=document.createElement("iframe"),f=this.SG=document.createElement("div");0<x.K.children(c).length?x.K.insertBefore(f,c.firstChild):c.appendChild(f);x.Di(f,{position:"absolute",top:"0px",left:"0px"});x.K.lu(f,{width:c.offsetWidth,height:c.offsetHeight});x.K.lu(e,{width:f.offsetWidth});x.K.Di(e, {zIndex:-1,display:"block",border:0,backgroundColor:a,filter:"progid:DXImageTransform.Microsoft.Alpha(style=0,opacity="+d+")"});f.appendChild(e);e.src="javascript:void(0)";e.frameBorder="0";e.scrolling="no";e.height="97%";this.Ez=o}};a.WP=function(){var a=this.Bq;this.Ez&&(x.bd(a,"display","none"),this.Ez=q)};a.YP=function(){var a;a=a||{};var c=this.RG,d=this.SG,e=this.Bq;x.K.lu(d,{width:c.offsetWidth,height:c.offsetHeight});x.K.lu(e,x.extend({width:x.wj(d,"width")},a))}})(); x.extend(x.Qb.Li.prototype,{aL:o,BW:{}});x.Qb.Li.Xe(function(a){a.aL&&(a.addEventListener("onshow",function(){a.XP()}),a.addEventListener("onhide",function(){a.WP()}))});x.Qb.Li.extend({setData:function(a,b,c){this.dD[a]=b;c||this.show(a,this.dD[a])}});x.Qb.Li.Xe(function(a){a.dD={};a.addEventListener("onneeddata",function(b,c){var d=a.dD;"undefined"==typeof d[c]?a.getData(c):a.show(c,d[c])})});x.K.S_=x.K.n5=function(a,b){return x.K.lu(a,{width:b})}; x.K.HY=function(a){a=x.K.$(a);if(a===p)return a;a=x.K.lE(a);return a.parentWindow||a.defaultView||p};x.K.ta=function(a,b){return x.K.Di(a,{left:b.left-(parseFloat(x.K.wj(a,"margin-left"))||0),top:b.top-(parseFloat(x.K.wj(a,"margin-top"))||0)})};x.page=x.page||{};x.page.DE=function(){var a=document;return("BackCompat"==a.compatMode?a.body:a.documentElement).clientWidth};x.page.CE=function(){var a=document;return("BackCompat"==a.compatMode?a.body:a.documentElement).clientHeight}; x.page.tY=function(){var a=document;return window.pageYOffset||a.documentElement.scrollTop||a.body.scrollTop};x.page.sY=function(){var a=document;return window.pageXOffset||a.documentElement.scrollLeft||a.body.scrollLeft};x.Em=x.Em||{};x.Em.bind=function(a,b){var c=2<arguments.length?[].slice.call(arguments,2):p;return function(){var d=x.lang.ug(a)?b[a]:a,e=c?c.concat([].slice.call(arguments,0)):arguments;return d.apply(b||d,e)}}; (function(){function a(a){a.x=a[0]||a.x||a.left||0;a.y=a[1]||a.y||a.top||0;return a}var b=x.Qb.mm.ZZ=t();b.ta=function(a,b,e){b=x.$(b)||this.ri();e=e||{};this.BQ(b,e.MZ,[b,a,e])};b._positionByCoordinate=function(b,d,e,f){var d=d||[0,0],e=e||{},g={},i=x.page.CE(),j=x.page.DE(),l=x.page.sY(),m=x.page.tY(),n=b.offsetWidth,s=b.offsetHeight,u=b.offsetParent,u=!u||u==document.body?{left:0,top:0}:x.K.ia(u);e.position="undefined"!==typeof e.position?e.position.toLowerCase():"bottomright";d=a(d||[0,0]);e.Aa= a(e.Aa||[0,0]);d.x+=0<=e.position.indexOf("right")?d.width||0:0;d.y+=0<=e.position.indexOf("bottom")?d.height||0:0;g.left=d.x+e.Aa.x-u.left;g.top=d.y+e.Aa.y-u.top;switch(e.o4){case "surround":g.left+=g.left<l?n+(d.width||0):g.left+n>l+j?-n-(d.width||0):0;g.top+=g.top<m?s+(d.height||0):g.top+s>m+i?-s-(d.height||0):0;break;case "fix":g.left=Math.max(0-parseFloat(x.K.wj(b,"marginLeft"))||0,Math.min(g.left,x.page.DE()-n-u.left));g.top=Math.max(0-parseFloat(x.K.wj(b,"marginTop"))||0,Math.min(g.top,x.page.CE()- s-u.top));break;case "verge":var w=-1<e.position.indexOf("right")?d.width:0,y=-1<e.position.indexOf("bottom")?d.height:0,D=-1<e.position.indexOf("bottom")?d.width:0,C=-1<e.position.indexOf("right")?d.height:0;g.left-=0<=e.position.indexOf("right")?d.width||0:0;g.top-=0<=e.position.indexOf("bottom")?d.height||0:0;g.left+=g.left+w+n-l>j-u.left?D-n:w;g.top+=g.top+y+s-m>i-u.top?C-s:y}x.K.ta(b,g);!f&&(i!=x.page.CE()||j!=x.page.DE())&&this._positionByCoordinate(b,d,{},o);f||this.dispatchEvent("onpositionupdate")}; b.BQ=function(a,b,e){("undefined"==typeof b||!b)&&x.event.M(x.K.HY(a),"resize",x.Em.bind.apply(this,["_positionByCoordinate",this].concat([].slice.call(e))));this._positionByCoordinate.apply(this,e)}})(); x.Qb.Li.extend({ZZ:o,xX:o,IY:function(){var a=this;return function(){a.Tw(o)}},Tw:function(a){var b=this.Pm(),c=this.AC,d=this.ri();if(this.lB()||!a)c&&(b=c),a=x.K.ia(b),b={top:a.top+b.offsetHeight-1,left:a.left,width:b.offsetWidth},b="function"==typeof this.view?this.view(b):b,this.ta([b.left,b.top],p,{MZ:o}),x.K.S_(d,b.width)}}); x.Qb.Li.Xe(function(a){a.e1=a.IY();a.addEventListener("onload",function(){a.Tw();a.xX&&(a.yX=setInterval(function(){var b=a.ri(),c=a.Pm();0!=b.offsetWidth&&(c&&c.offsetWidth!=b.offsetWidth)&&(a.Tw(),b.style.display="block")},100));a.M(window,"resize",a.e1)});a.addEventListener("onshow",function(){a.Tw()});a.addEventListener("ondispose",function(){clearInterval(a.yX)})}); x.Qb.Li.Xe(function(a){function b(){setTimeout(function(){var b=a.Pm();e=b===p?"":b.value},20)}var c,d="",e,f,g=q,i=q;a.addEventListener("onload",function(){c=this.Pm();b();a.M(window,"onload",b);a.q0=a.zY();a.M(c,"keydown",a.q0);c.setAttribute("autocomplete","off");a.nW=setInterval(function(){if(!i){x.$(c)==p&&a.mi();var b=c.value;b==d&&""!=b&&b!=e&&b!=f?0==a.OF&&(a.OF=setTimeout(function(){a.dispatchEvent("onneeddata",b)},100)):(clearTimeout(a.OF),a.OF=0,""==b&&""!=d&&(f="",a.U()),d=b,b!=f&&(a.zx= b),e!=c.value&&(e=""))}},10);a.M(c,"beforedeactivate",a.TV)});a.addEventListener("onitemclick",function(){i=q;a.zx=d=a.zE()});a.addEventListener("onpick",function(a){g&&c.blur();c.value=f=a.data.item.value;g&&c.focus()});a.addEventListener("onmousedownitem",function(){i=g=o;setTimeout(function(){g=i=q},500)});a.addEventListener("ondispose",function(){clearInterval(a.nW)})}); x.Qb.Li.extend({TV:function(){return function(){mousedownView&&(window.event.cancelBubble=o,window.event.returnValue=q)}},zY:function(){var a=this;return function(b){var c=q,b=b||window.event;switch(b.keyCode){case 9:case 27:a.U();break;case 13:x.event.stop(b);a.confirm(-1==a.Xc?a.Pm().value:a.zk[a.Xc],"keyboard");break;case 38:c=o;case 40:x.event.stop(b);b=c;if(a.lB()){var c=a.zk,d=a.Xc;if(0!=c.length){if(b)switch(d){case -1:d=c.length-1;a.Dj(c[d]);a.Gt(c[d]);break;case 0:d=-1;a.Dj(a.zx);a.MC(); break;default:d--,a.Dj(c[d]),a.Gt(c[d])}else switch(d){case -1:d=0;a.Dj(c[d]);a.Gt(c[d]);break;case c.length-1:d=-1;a.Dj(a.zx);a.MC();break;default:d++,a.Dj(c[d]),a.Gt(c[d])}a.Xc=d}}else a.dispatchEvent("onneeddata",a.zE());break;default:a.Xc=-1}}},zx:""});ka.L5=o;var Vi=q,Wi=B.jc+"res/20/bmap_autocomplete.css",yj={ALL:"0",CITY:"1"}; x.extend(Oe.prototype,{Td:function(){this.Vi()},Vi:function(){this.vl=-1;this.Ha=p;this.Bw=[];this.FH=0;this.ka=this.Dv();this.oc.input&&(this.fT(),this.CU(),this.bz(this.FI));var a=p;this.ej&&(a={method:"search"},a.arguments=[this.ej]);this.wI();this.eI(a)},CU:function(){var a=this,b=new x.Qb.Li({getData:function(b){a.CJ(b)},onhide:function(){a.vl=-1;""===a.og.zE()&&(a.ej="",a.ka=a.Dv())},onhighlight:function(b){if(a.Ha){var d={},e={},e={index:b.data.index,value:a.Ha.$m[b.data.index].value},d={index:a.vl, value:0<=a.vl?a.Ha.$m[a.vl].value:{}},f=new N("onhighlight");f.fromitem=f.p3=d;f.toitem=f.E5=e;a.dispatchEvent(f);a.vl=b.data.index}},onbeforepick:function(b){if(a.Ha&&"number"===typeof b.data.index){var d=a.Ha.$m[b.data.index].value;b.data.item.content=b.data.item.value=d.province+d.city+d.district+d.street+d.business}},onconfirm:function(b){if(a.Ha){Ta(5012);var d={};"number"===typeof b.data.index&&(d={index:b.data.index,value:a.Ha.$m[b.data.index].value},b=new N("onconfirm"),b.item=b.item=d,a.dispatchEvent(b))}}}); b.va(x.$(this.oc.input),x.$(this.oc.AC));this.og=b},show:function(){this.og&&(this.og.ri().style.display="block")},U:function(){this.og&&this.og.U();this.vl=-1},mi:function(){this.og&&this.og.mi();x.lang.Da.prototype.mi.call(this)},eG:function(a){this.oc.types=a||[];this.wI()},An:function(a){this.Ad.src=a;this.eI()},search:function(a){this.CJ(a)},bz:function(a){this.og&&this.og.Dj(a)},CJ:function(a){var b=this,c=(1E5*Math.random()).toFixed(0);B._rd["_cbk"+c]=function(a){x.$(b.oc.input)!==p&&b.DS(a); delete B._rd["_cbk"+c]};var d=B.url.proto+B.url.domain.baidumap+"/su?wd="+encodeURIComponent(a)+"&callback=BMap._rd._cbk"+c+"&cid="+b.FH+"&type="+b.Bw+"&t="+(new Date).getTime()+"&from=jsapi&ak="+ra;b.ej=a;b.vl=-1;b.ka=this.Dv();Ta(5010,{tp:b.Bw,wd:encodeURIComponent(a)});B.alog("cus.fire","count","z_sug");sa(d)},DS:function(a){a&&a.q&&(this.ej=a.q);this.cV(this.rS(a));this.ka=this.Dv(this.Ha);this.oc.Ky(this.ka)},rS:function(a){var b=[],c=a.s,d={};d.wb=a.q||"";d.count=a.s.length||0;d.status=0>a.e? 7:0;d.$m=[];var e=0,f=c.length;for(J()&&6<f&&(f=6);e<f;e++){var g=this.OS(c[e],this.Bw);d.$m.push(g.value);b.push(g.BM)}this.Ha=d;return{data:b,W5:a.q}},cV:function(a){if(this.og){var b=this.og;b.show(a.word,a.data);1>a.data.length&&b.U()}},OS:function(a,b){switch(b.toString()){case "1":return this.PS(a);default:return this.QS(a)}},QS:function(a){var a=a.split("$"),b=this.ej,c=RegExp(b,"g"),d="<b>"+b+"</b>",e={province:"",city:a[0],district:a[1],street:a[2],streetNumber:"",business:a[3]},f="";7<= a.length&&(e.city=a[5]||e.city,e.district=a[6]||e.city,a[0]=a[5],a[1]=a[6]);for(var g=3;0<=g;g--)if(f=a[g]+f,-1<f.indexOf(b)){for(var b=g-1,i="";-1<b;)i=a[b]+i,b--;f=f.replace(c,d);i&&(f+=\'&nbsp;<span class="tangram-suggestion-grey">\'+i+"</span>");break}if(!i)for(g=3;0<=g;g--)i+=a[g];return{value:{value:e},BM:f}},PS:function(a){var b=a.split("$"),c=this.ej,a={province:b[0],city:b[1],district:"",street:"",streetNumber:"",business:""},b=(b[0]+b[1]).replace(RegExp(c,"g"),"<b>"+c+"</b>");return{value:{value:a}, BM:b}},wI:function(){var a=this.oc.types,b=[];if(x.ug(a))b.push(yj[a.toUpperCase()]);else if(x.lang.isArray(a))for(var c=0,d=a.length;c<d;c++)b.push(yj[a[c].toUpperCase()]);this.Bw=0<b.length?b.join(","):"0"},eI:function(a){var b=this;b.Pg(b.Ad,function(c){b.FH=c;a&&b[a.method].apply(b,a.arguments)})},fT:function(){if(!Vi){var a=document,b=a.createElement("link");b.setAttribute("rel","stylesheet");b.setAttribute("type","text/css");b.setAttribute("href",Wi);var c=a.getElementsByTagName("head");c.length? c[0].appendChild(b):a.documentElement.appendChild(b);Vi=o}},Dv:function(a){if(!a)return new zj({wb:this.ej,total:0,Qk:[]});for(var b=[],c=0,d=a.$m.length;c<d;c++)b.push(a.$m[c].value);return new zj({wb:a.wb,total:a.count,Qk:b})}});U(ug,{show:ug.show,hide:ug.U,setTypes:ug.eG,setLocation:ug.An,search:ug.search,setInputValue:ug.bz,dispose:ug.mi});function zj(a){this.keyword=a.wb||"";this.BB=a.total||0;this.Yr=a.Qk&&a.Qk.slice(0)||[]}x.extend(zj.prototype,{Gk:function(a){if(this.Yr[a])return this.Yr[a]},yt:v("BB"),toString:ea("AutocompleteResult")});var Aj=zj.prototype;U(Aj,{getPoi:Aj.Gk,getNumPois:Aj.yt}); ');