72cbf8dff306b07abd2dd798c5ff6055818f7b59.svn-base
10.8 KB
google.maps.__gjsload__('places_impl', 'function AJ(a,b){Yc(a.l,b.l)}var BJ;function CJ(a){this.l=a||[]}CJ[D].b=function(){if(!BJ){var a=[];BJ={ba:-1,Y:a};a[1]={type:"m",label:1,W:Qk()};a[2]={type:"s",label:1};a[3]={type:"s",label:1};a[4]={type:"s",label:1};a[5]={type:"v",label:1};a[6]={type:"s",label:3};a[7]={type:"u",label:1};a[8]={type:"e",label:1};a[100]={type:"b",label:1}}return bd(this.l,BJ)};Ea(CJ[D],function(){var a=this.l[0];return a?new fd(a):Xh});var DJ="focus";\nfunction EJ(a){return"\\u672a\\u6307\\u5b9a\\u5c5e\\u6027 "+(a+"\\u3002")}function FJ(a){return"\\u5c5e\\u6027 "+(a+" \\u65e0\\u6548\\uff08\\u53ef\\u80fd\\u662f\\u56e0\\u5176\\u4ed6\\u5c5e\\u6027\\u5f15\\u8d77\\uff09\\u3002")};function GJ(a){this.l=a||[]}var HJ;function IJ(a){this.l=a||[]}function JJ(a){this.l=a||[]}function KJ(a){this.l=a||[]}function LJ(a){this.l=a||[]}GJ[D].b=function(){if(!HJ){var a=[];HJ={ba:-1,Y:a};a[1]={type:"s",label:1};a[2]={type:"u",label:1};a[4]={type:"s",label:1};a[5]={type:"s",label:1};a[6]={type:"m",label:1,W:Qk()};a[7]={type:"s",label:3};a[9]={type:"s",label:3};a[10]={type:"u",label:1}}return bd(this.l,HJ)};var MJ=new fd;Ea(GJ[D],function(){var a=this.l[5];return a?new fd(a):MJ});\nfunction NJ(a){a.l[5]=a.l[5]||[];return new fd(a.l[5])}function OJ(a,b){Zc(a.l,6)[q](b)}function PJ(a,b){Zc(a.l,8)[q](b)}function QJ(a){a=a.l[0];return a!=j?a:""}function RJ(a){a=a.l[3];return a!=j?a:""}Qi(JJ[D],function(){var a=this.l[1];return a!=j?a:0});Qi(KJ[D],function(){var a=this.l[0];return a!=j?a:0});KJ[D].getLength=function(){var a=this.l[1];return a!=j?a:0};gj(LJ[D],function(){var a=this.l[0];return a!=j?a:-1});function SJ(a){this.l=a||[]}var TJ;SJ[D].b=function(){if(!TJ){var a=[];TJ={ba:-1,Y:a};a[1]={type:"s",label:1};a[2]={type:"s",label:1};a[3]={type:"v",label:1};a[4]={type:"u",label:1}}return bd(this.l,TJ)};function UJ(a){try{var b=bm(a);if(Gd(a.selectionEnd))return a.selectionEnd;if(b.selection&&b.selection.createRange){var c=b.selection.createRange();if(c.parentElement()!=a)return-1;var d=c.duplicate();"TEXTAREA"==a[xc]?d.moveToElementText(a):d.expand("textedit");d.setEndPoint("EndToStart",c);var e=K(d.text);return e>K(a[wp])?-1:e}return K(a[wp])}catch(f){return-1}}function VJ(a){var b=a[ac](),a=a[ob](),c=new fd,d=Gk(c),e=Ek(c);Kk(d,b.lat());Ik(d,b.lng());Kk(e,a.lat());Ik(e,a.lng());return c}\nfunction WJ(a,b,c){var d=io(Co,c);lo(n,cg,vo+a,bg,b.b(),d,function(){c(j)})};function XJ(a){this.b=a}L(XJ,W);Da(XJ[D],function(a,b){b=YJ(b);ZJ(this,a,b)});function ZJ(a,b,c){var d=new Uq;d.l[0]=b;d.l[1]=a.b;WJ("/maps/api/js/PlaceService.GetPlaceDetails",d,function(a){var b=a&&a[Bp]||Oc,a=b==Lc?$J(a[Rp],a.html_attributions):j;c(a,b)})}\nfunction aK(a,b,c){a.hours=Al(a[Oj][bb](0,2));a.minutes=Al(a[Oj][bb](2,4));Gd(a.day)&&Gd(c)&&(c=new Date(b[Nb]()+6E4*c),a.nextDate=b[Nb]()-b[Nb]()%6E4+864E5*(a.day-c.getUTCDay())+6E4*(60*(a.hours-c.getUTCHours())+a.minutes-c.getUTCMinutes()),a.nextDate<b[Nb]()&&(a.nextDate+=6048E5))}\nfunction $J(a,b){var c={},d;for(d in a)c[d]=a[d];c.html_attributions=b;if(d=a.geometry){var e=d[$j];c.geometry.location=new Q(e.lat,e.lng);(d=d.viewport)&&(c.geometry.viewport=new fe(new Q(d.southwest.lat,d.southwest.lng),new Q(d.northeast.lat,d.northeast.lng)))}e=c.utc_offset;if(Gd(e)){d=0<e?"+":"-";var e=o.abs(e),f=e%60,e=("00"+(e-f)/60)[bb](-2)+("00"+f)[bb](-2);c.tz="GMT"+d+e}f=c.opening_hours;if(Gd(f)){d=c.utc_offset;for(var e=new Date,f=f.periods,g=0,h=K(f);g<h;g++){var m=f[g],p=m[rp],m=m[$p];\np&&p[Oj]&&aK(p,e,d);m&&m[Oj]&&aK(m,e,d)}}return c}XJ[D].e=function(a,b){var c=b.html_attributions||[];this.j(c[Dc](". "));for(var d=b.results,e=0,f=K(d);e<f;e++)d[e]=$J(d[e],c);a(d,b[Bp])};\nXJ[D].xk=function(a,b){var c=a[$j],d=a[ub];!a.rankBy||0==a.rankBy?a.bounds||(c&&d?a.bounds=Tg(c,d/6378137):aa(ja(EJ(!c?"location":!d?"radius":"bounds")))):1==a.rankBy?(a.bounds&&aa(ja(FJ("bounds"))),d&&aa(ja(FJ("radius"))),c||aa(ja(EJ("location"))),!a.keyword&&!a[Yp]&&!a[Mb]&&aa(ja(EJ("keyword | types | name"))),a.bounds=Tg(c,0)):aa(ja(FJ("rankBy")));c=P(this,this.e,b);d=new CJ;d.l[0]=d.l[0]||[];AJ(new fd(d.l[0]),VJ(a.bounds));var e=a[Mb];e&&(d.l[2]=e);(e=a.keyword)&&(d.l[3]=e);e=a.rankBy;Gd(e)&&\n(d.l[7]=e);for(var e=a[Yp]||[],f=0,g=e[B];f<g;f++){var h=e[f];Zc(d.l,5)[q](h)}d.l[1]=this.b;c=bK(c);WJ("/maps/api/js/PlaceService.FindPlaces",d,c)};XJ[D].j=Hf("attributionText");function bK(a){return function(b){a[vc](j,arguments);dr(function(a){for(var d=[],e=0;e<b.results[B];e++)Ed(d,b.results[e][Yp]);a.rl(b[Bp])})}}function YJ(a){return function(b,c){a[vc](j,arguments);dr(function(a){a.ql(c)})}};function cK(a,b,c){this.Ra=a;this.$f=[];this.ti=b;this.ui=c;this.b=j;this.e="";this.mg("");this.md([])}L(cK,W);function dK(a,b){var c=io(Co,b);lo(l[Xb],cg,vo+"/maps/api/js/AutocompletionService.GetPredictions",bg,a.b(),c)}I=cK[D];I.input_changed=function(){l[$a](this.b);this.b=l[Vb](P(this,this.wj),100)};I.wj=function(){var a=this.e,b=this.lb();a!=b&&(eK(this),this.e=b);this.b=j};\nfunction eK(a){var b=a.lb();if(!(b&&b==a.Zj()))if(ym(a),b){var c=xm(a),d=new GJ;d.l[0]=b;for(var b=a.bk(),e=0;e<K(b);e++)PJ(d,b[e]);var b=a.ak(),f;for(f in b)OJ(d,f+":"+b[f]);if(f=a.$j())b=NJ(d),Kk(Gk(b),f[ac]().lat()),Ik(Gk(b),f[ac]().lng()),Kk(Ek(b),f[ob]().lat()),Ik(Ek(b),f[ob]().lng());d.l[3]=Dg(Fg(mf));d.l[4]=Eg();dK(d,P(a,function(a){if(c==this.__gm_ticket__){var b=new LJ(a);if(0==b[hk]()||5==b[hk]()){for(var a=[],d=[],e=this.ui,f=this.ti,v=0,z=$c(b.l,1);v<z&&K(a)<f;++v){var C=new IJ(Zc(b.l,\n1)[v]);if(-1==Zc(C.l,2)[Dc](" ")[qb]("geocode"))a[q](C);else if(e)a[q](C),e--;else d[q](C)}b=pd(K(d),f-K(a));a[q][vc](a,d[bb](0,b));this.lb();this.md(fK(a));this.$f=a}}}))}else a.md([])}I.selectionIndex_changed=function(){var a=this.pk(),b=this.$f;if(-1!=a&&a<K(b)){var c=b[a],d=this.lb();ZJ(this.Ra,RJ(c),P(this,function(a){a&&d==this.lb()&&(this.mg(QJ(c)),this.qk(a),this.md([]),dr(function(b){b.rk(a)}))}))}};\nfunction fK(a){for(var b=[],c=0;c<a[B];c++){var d=a[c],d={Af:QJ(d),Hh:gK(d),name:gK(d,0),wl:gK(d,1),types:Zc(d.l,2)||[]};b[q](d)}return b}function gK(a,b){var c,d,e=QJ(a);if(Gd(b)){d=new JJ(Zc(a.l,5)[b]);if(!d)return"";c=d[Cj]();d=d.l[0];d=c+K(d!=j?d:"")}else c=0,d=K(e);for(var f="",g=0,h=$c(a.l,6);g<h;++g){var m=new KJ(Zc(a.l,6)[g]),p=m[Cj](),m=p+m[$b]();c<=p&&d>=m&&(f+=e[hq](c,p)+"<b>"+e[hq](p,m)+"</b>",c=m)}return f+=e[hq](c,d)}I.mg=Hf("formattedPrediction");I.Zj=Gf("formattedPrediction");\nI.lb=Gf("input");I.pk=Gf("selectionIndex");I.md=Hf("predictions");I.qk=Hf("place");I.$j=Gf("bounds");I.bk=Gf("types");I.ak=Gf("componentRestrictions");function hK(a,b){this.b=a;this.e=b}L(hK,W);hK[D].getPredictions=function(a,b){a.input||aa(ja(EJ("input")));if(!a.bounds){var c=a[$j],d=a[ub];if(c&&Gd(d))a.bounds=Tg(c,d/6378137);else if(c||d)aa(ja(EJ(c?"radius":"location")))}c=new GJ;c.l[0]=a.input;c.l[3]=this.b;c.l[4]=this.e;a.bounds&&AJ(NJ(c),VJ(a.bounds));WJ("/maps/api/js/AutocompletionService.GetPredictionsJson",c,function(a){var c=a&&a[Bp]||Oc;b(c==Lc?a.predictions:j,c)})};function iK(a,b){this.b=a;this.C=a[wp];this.ac(this.C);this.A=b||"";this.B=!("placeholder"in $("input"));var c=a[gq]("placeholder");c==j?this.B||a[x]("placeholder",this.A):this.A=c;jK(this);var c=bm(a),d=c[wb]("div");c[ek][Va](d);R[sc](d,Ak,P(this,this.qf,-1));this.O=d;$k(d,"pac-container");c=d[F];Yi(c,"absolute");Vi(c,"1000");this.n=this.e=-1;this.j=[];this.F=k;a[x]("autocomplete","off");R.T(a,DJ,this,this.sh);R.T(a,AG,this,this.rh);R.T(a,ar,this,this.qh);R.T(a,yG,this,this.th);R.T(l,ol,this,this.Pd);\nR[A](this,ol,this,this.Pd);this.Qd(-1);kK(this)}L(iK,W);I=iK[D];I.qh=function(a){var b=this.e;switch(a[Ep]){case 37:break;case 38:0>b&&(b=K(this.j));lK(this,b-1);Td(a);break;case 40:lK(this,b+1);Td(a);break;case 39:a=this.b;UJ(a)>=K(a[wp])-1&&(this.ac(a[wp]),mK(this,i));break;case 27:b=-1;case 9:case 13:case 10:this.L&&nK(this,b,a[Ep]);break;default:this.F=i,mK(this,i)}};\nI.th=function(){var a=this.Ge(),b=this.b[wp];this.B&&a&&a!=b&&Fq(this.b,"pac-placeholder");this.F&&this.C!=b&&this.ac(b);this.C=b;this.F=k};I.sh=function(){this.B&&this.b[wp]==this.A&&(Zo(this.b,""),Fq(this.b,"pac-placeholder"));this.b[wp]!=this.Ge()&&(this.ac(this.b[wp]),mK(this,i))};I.rh=function(){nK(this);jK(this)};function jK(a){a.B&&!a.b[wp]&&(Zo(a.b,a.A),$k(a.b,"pac-placeholder"))}\nI.Pd=function(){var a=this.b,b=this.O,c=kn(a,j),d;d=bm(this.b)[ek];var e=d[yc];d=new T(l&&l[Nj]||d[jk]||e[jk]||0,l&&l[Jj]||d[Pj]||e[Pj]||0);c.y+=d.y;c.x+=d.x;var e=(d=pq())?a[hb]:a[Uj],f=nm(a),g=om(f.borderLeftWidth),f=om(f.borderTopWidth);c.y+=a[Cc]-f;c.x-=g;if(d||2==Z[y]&&7>=Z[lj])c.x-=2,c.y-=2;qa(b[F],X(e));cm(b,c)};\nI.Z=function(){for(var a=this.j,b=0;b<a[B];b++)th(a[b]),Wq(a[b]);La(this.j,0);this.e=this.n=-1;for(var a=this.O,b=bm(this.b),c=this.gd(),d=0;d<K(c);d++){var e=b[wb]("div");Ki(e,c[d].Hh);$k(e,"pac-item");this.j[q](e);R[sc](e,Bk,P(this,this.qf,d));a[Va](e)}};I.qf=function(a){this.n=a};function lK(a,b){oK(a);var c=a.j[b];c?($k(c,"pac-selected"),Zo(a.b,a.gd()[b].Af),a.e=b,mK(a,i)):(Zo(a.b,a.lb()),a.e=-1)}function oK(a){var b=a.e;0<=b&&Fq(a.j[b],"pac-selected");a.e=-1}\nfunction nK(a,b,c){b=N(b)?b:-1<a.n?a.n:a.e;oK(a);0<=b?(c=a.gd()[b].Af,Zo(a.b,c),a.ac(c),a.Qd(b)):a.b[wp]!=a.lb()?Zo(a.b,a.lb()):-1==b&&(13==c||10==c)&&a.set("place",{name:a.b[wp]});a.e=a.n=-1;mK(a,k)}function mK(a,b){(a.L=b)&&a.Pd();kK(a)}function kK(a){Rq(a.O,a.L&&K(a.gd()))}I.predictions_changed=function(){this.Z();this.Qd(-1);kK(this)};I.formattedPrediction_changed=function(){var a=this.Ge();a&&(Zo(this.b,a),this.ac(a))};I.ac=Hf("input");I.lb=Gf("input");I.Qd=Hf("selectionIndex");I.gd=Gf("predictions");\nI.Ge=Gf("formattedPrediction");function pK(){}L(pK,W);Da(pK[D],function(a,b){a.reference||aa(ja(EJ("reference")));a.event_id||aa(ja(EJ("event_id")));var c=new SJ;c.l[0]=a.reference;c.l[1]=a.event_id;WJ("/maps/api/js/EventService.GetEventDetails",c,function(a){var c=a&&a[Bp]||Oc;c==Lc?(a=a[Rp],delete a.scope):a=j;b(a,c)})});function qK(a){if(a instanceof Uf){var b=$("div");this.b=YH(b);this.b[F].paddingBottom=0;a[dq][9][q](b)}else this.b=a}L(qK,W);qK[D].td=function(){return this.get("attributionText")||""};fG(qK[D],function(){Vq(this.b,this.td());for(var a=this.b[Ob]("a"),b=0;b<K(a);b++)$o(a[b][F],"#444")});function rK(){}rK[D].vk=function(a){var b=new XJ(Dg(Fg(mf)));(new qK(a))[t]("attributionText",b);return b};\nrK[D].$k=function(a,b){ts(".pac-container{background-color:#fff;border:1px solid #ccc;overflow:hidden}.pac-item{cursor:pointer;padding:0 4px;text-overflow:ellipsis;white-space:nowrap}.pac-item:hover{background-color:#f0f0ff}.pac-selected{background-color:#d5ddf3}.pac-placeholder{color:gray}");var c=new cK(new XJ(Dg(Fg(mf))),10,10),d=new iK(b,"\\u8f93\\u5165\\u5730\\u70b9");R[E](a,ol,d);c[t]("input",d);d[t]("predictions",c);d[t]("formattedPrediction",c);d[t]("place",c);c[t]("selectionIndex",d);c[t]("bounds",\na,"bounds",i);a[t]("types",c);a[t]("componentRestrictions",c);a[t]("place",c,"place",i)};rK[D].wk=function(){return new hK(Dg(Fg(mf)),Eg())};rK[D].uk=function(a){var b=new pK;(new qK(a))[t]("attributionText",b);return b};var sK=new rK;ff[De]=function(a){eval(a)};jf(De,sK);\n')