var thelastofor = 'zeroorders';
var datajso = {"type":"FeatureCollection","metadata":{"name":"bf74 - новые зоны","creator":"Yandex Map Constructor"},"features":[{"type":"Feature","id":0,"geometry":{"type":"Polygon","coordinates":[[[61.415183915146706,55.18539669885818],[61.40545822525864,55.184569386157534],[61.387070642059044,55.18388915012563],[61.38815425450104,55.16778935626851],[61.38070844227572,55.16762353492849],[61.381030503173726,55.162289720446346],[61.37530657122779,55.16212517451533],[61.37381789627044,55.16325293702059],[61.36387489849825,55.16313381273278],[61.3600232463528,55.16127881347287],[61.36010598665944,55.15519465068721],[61.354072561566845,55.147107252520726],[61.33110589567801,55.14724048844287],[61.330026055350814,55.14481745641423],[61.32202890787613,55.13760943837417],[61.323973226818396,55.125304478235556],[61.32265244960871,55.11463640442567],[61.32013825973034,55.108465472980086],[61.32771555122717,55.09995977609794],[61.33567127247482,55.09707146968263],[61.34300199312676,55.102368712847955],[61.34832838569096,55.10029007034322],[61.35237856209591,55.098568814493774],[61.35298675265185,55.09569212890641],[61.354576304256874,55.09483606414591],[61.35734192202112,55.094908228173324],[61.362772118499194,55.09622156434114],[61.387413748408356,55.10214553846195],[61.393451016857426,55.103664446858204],[61.39888747048714,55.10577380815132],[61.40040917821229,55.10758114304137],[61.40296085419918,55.11160253234745],[61.40512415880393,55.115140694756754],[61.40448312914593,55.11813741672624],[61.40341294604556,55.12113391290653],[61.40114151055119,55.12667518635969],[61.409485353924104,55.13292634868332],[61.412701484213,55.13640671502729],[61.41713450516237,55.13556169054852],[61.42015885889099,55.13861282915764],[61.42208318079491,55.142291885330714],[61.422962777713714,55.14615416378582],[61.42478651220583,55.149352480372336],[61.426586442092805,55.15045292468495],[61.42842928732415,55.15098808377489],[61.43459032143131,55.15152563203685],[61.43841246927764,55.15182970222549],[61.443826184814206,55.15037433432273],[61.45137928540016,55.15956501198754],[61.45296715313699,55.17035028660408],[61.441750155036665,55.18777803293102],[61.43206738049291,55.18579834150833],[61.415183915146706,55.18539669885818]]]},"properties":{"description":"12.delivery","fill":"#f371d1","fill-opacity":0.6,"stroke":"#f371d1","stroke-width":"0","stroke-opacity":0}},{"type":"Feature","id":1,"geometry":{"type":"Polygon","coordinates":[[[61.29676761289484,55.22021274338575],[61.28457965513118,55.214618683511084],[61.284064671000344,55.20283913358685],[61.27977313657647,55.199893699071474],[61.28013791700248,55.192142479039596],[61.283574366013696,55.18913987442941],[61.29198791643007,55.18272605361582],[61.299272524342605,55.18580841531329],[61.30348909280012,55.18756375337455],[61.30888583322415,55.18876657314384],[61.31575738094806,55.1889874242133],[61.35718168874624,55.18896913559528],[61.358517428835576,55.188766573129946],[61.36043252607217,55.1881834330057],[61.36325420995599,55.19040545789394],[61.36307181974294,55.198469993928065],[61.33210839887498,55.198463857151786],[61.318171640833704,55.20790108789159],[61.314148327310846,55.20979028023502],[61.30915941854355,55.211177208262455],[61.29676761289484,55.22021274338575]]]},"properties":{"description":"12.delivery","fill":"#f371d1","fill-opacity":0.6,"stroke":"#f371d1","stroke-width":"0","stroke-opacity":0}},{"type":"Feature","id":2,"geometry":{"type":"Polygon","coordinates":[[[61.3634902443492,55.25918974103584],[61.3630356099212,55.258341857256305],[61.36053176780579,55.258082203576514],[61.35895194669597,55.2579611844616],[61.3573265280329,55.25740050881374],[61.35489619579054,55.25631053849863],[61.35627996476729,55.255251178096714],[61.35941206476333,55.24849450434813],[61.36060894092549,55.24564517127613],[61.36322202344753,55.242194897535896],[61.364257129008244,55.239738222983014],[61.36472406049593,55.23819793510139],[61.368688365419885,55.23621462986612],[61.3765794243417,55.2352673903051],[61.37818319112443,55.236340510607434],[61.38437928815712,55.24209068738681],[61.40041889806612,55.23748064606894],[61.41369046827188,55.23655489486143],[61.41834678312164,55.237446927028216],[61.41807856222012,55.23861634769397],[61.42116310258728,55.238919042696836],[61.424741169413174,55.23568430112391],[61.43058838506561,55.23118541757505],[61.433340331514884,55.23211819232655],[61.435877701243,55.23275663601293],[61.440276524027446,55.23268152551987],[61.44421400686126,55.23301185730713],[61.4472931828104,55.23304787940318],[61.44587697645061,55.2404968508326],[61.44323768278,55.246087256819486],[61.4327556099498,55.25422013262323],[61.42773987909192,55.258083735463096],[61.42517032285564,55.25949610831437],[61.42081002188501,55.260986299441086],[61.414810490759166,55.26561794705829],[61.408905407389376,55.27027872457206],[61.40428597291348,55.27373937477382],[61.40404390354987,55.274627315125805],[61.42044695278042,55.28857717019786],[61.41051674445498,55.291528066298596],[61.4033760335051,55.29349922554683],[61.37381674905648,55.29511503214669],[61.37391867299898,55.29103616992985],[61.38404401203014,55.280981086203425],[61.3915944304071,55.27695052750618],[61.39259757657875,55.27311479948824],[61.387812515696154,55.26899231685478],[61.38327421804297,55.264483433708634],[61.3775021042429,55.262639299429416],[61.37665452619427,55.25975958226652],[61.3634902443492,55.25918974103584]]]},"properties":{"description":"10.delivery","fill":"#ffd21e","fill-opacity":0.6,"stroke":"#ffd21e","stroke-width":"0","stroke-opacity":0}},{"type":"Feature","id":3,"geometry":{"type":"Polygon","coordinates":[[[61.26973094602404,55.1759293692194],[61.275481806756574,55.17576398532642],[61.279044351341106,55.17655320569714],[61.28410233796288,55.179043418422694],[61.2911484232492,55.18207630515072],[61.29935166862894,55.18572822809619],[61.30348227541418,55.18745767245118],[61.30892180019874,55.18875736460847],[61.31822690347484,55.18888812142038],[61.33263573030285,55.188861863600444],[61.332657187975,55.1880314853923],[61.33480885147808,55.188038401020684],[61.33612071762298,55.18774666373887],[61.33615706041298,55.18578453695839],[61.344183703858356,55.18576795645049],[61.34482877512637,55.18892937001031],[61.3559248309757,55.188916959383924],[61.357628033700124,55.18884636945443],[61.35873042160524,55.188616184055796],[61.36046312862883,55.188106702283314],[61.36332772785681,55.1903962497335],[61.36312387997165,55.198528292081626],[61.33212827259554,55.19854670236088],[61.31827734524268,55.20789801911045],[61.31426555253171,55.209803094464895],[61.30922220760842,55.211241622524895],[61.296768711152176,55.22021504226457],[61.28457270676145,55.214624816638796],[61.28404162937598,55.2028360640742],[61.27973936611621,55.199893697606115],[61.279758597765266,55.19731785759652],[61.27975545937039,55.19222533711188],[61.283657547670536,55.18887479878165],[61.29186453481464,55.18263703451955],[61.284096857507535,55.17912831488809],[61.29652084966466,55.16992374209402],[61.30220417879518,55.172478786119896],[61.31057696340649,55.17612779534999],[61.31425092050495,55.17775395319237],[61.31670179029263,55.178618711267205],[61.35829748769563,55.17864327063429],[61.35827603002311,55.1687876061251],[61.36632506750485,55.16782756848407],[61.3697481688171,55.165681305339305],[61.370982587573245,55.1653652524457],[61.37535690122875,55.16216694746085],[61.380954302195036,55.1623713959344],[61.38058341885537,55.167644687627266],[61.388059278924956,55.16782032957783],[61.38688983579444,55.18400912660939],[61.39886562727323,55.18435315786196],[61.40545286084077,55.1846032666338],[61.4151517286385,55.18546051836284],[61.43203141351497,55.18585385566986],[61.44181074758325,55.187836613540554],[61.446327325902686,55.18078068286257],[61.453049203355675,55.1703444112088],[61.45148279329105,55.15964513398447],[61.443881412942865,55.15027936479459],[61.43833192249092,55.15164796768971],[61.429055502612876,55.150937559594006],[61.42675282617358,55.150386888585764],[61.42513209967735,55.14936208314332],[61.42410236196425,55.14792152509253],[61.42315845493974,55.146087644753095],[61.42260870766856,55.14331677765158],[61.4202417110013,55.13854494694505],[61.41711296697399,55.13546901818625],[61.41259076257479,55.136292642995],[61.409795900781305,55.13288739705164],[61.401202103097624,55.12655556859067],[61.403938302404846,55.120634458475784],[61.40553655286575,55.115094238957845],[61.399714008582954,55.10571864746629],[61.39396965626536,55.10368133666467],[61.38771031981694,55.10208684492197],[61.36738105426871,55.097125804702145],[61.36099927559731,55.095542116524015],[61.37266846926699,55.08793393975644],[61.38058128019006,55.0837431814015],[61.38729753156312,55.08290615859016],[61.39571966786991,55.0858233530462],[61.39695884843487,55.08548487098417],[61.40246005912443,55.08567257503156],[61.406738182503304,55.08551564220558],[61.409452578026496,55.090475651323075],[61.41182365079574,55.0979206587475],[61.41665162702235,55.10104591625044],[61.41996411539933,55.1052779116363],[61.42774924694318,55.11051849959611],[61.43021287580152,55.113421493727216],[61.435534378486665,55.1147375559001],[61.43375339170053,55.128252350950284],[61.44044818540179,55.13926738375872],[61.45572604795059,55.13612054302618],[61.4661115612558,55.13480518808943],[61.47284927030113,55.13977134681388],[61.4750594105303,55.13980822190809],[61.477120124820544,55.139174808109836],[61.477721717406745,55.1407293150308],[61.47825487340394,55.14070775951607],[61.47870219871271,55.14228405660731],[61.48038421158717,55.142210537819345],[61.48225432743307,55.15051156960738],[61.464611988857996,55.151603946167725],[61.46482410092906,55.15932263612512],[61.471003910499135,55.15902777929153],[61.47993030210122,55.15843805906709],[61.50239648480966,55.155378744843965],[61.50273444314568,55.156395470787416],[61.50225700994072,55.15942706403559],[61.513538381057664,55.166205078047895],[61.51404800077007,55.1703781866469],[61.509193202453176,55.17802007139477],[61.496184488731075,55.17767930355141],[61.49213971753678,55.17979754275319],[61.48885669370279,55.18626821656669],[61.4892858471447,55.19542603786843],[61.49287806155958,55.21252877736207],[61.503447910743546,55.2235491737586],[61.4830202068858,55.23012308420791],[61.44559802671049,55.219869270022045],[61.43854918141903,55.22100394344526],[61.43373193402801,55.2206298114739],[61.42525179495132,55.22053608625498],[61.423294788198795,55.219595946851236],[61.413930525975566,55.21945755951355],[61.40479156930955,55.219306904593566],[61.39565261264359,55.21945065928892],[61.39159778316531,55.22014795799631],[61.39089035053764,55.21628180148018],[61.39550509114784,55.212082080201945],[61.39765354056881,55.20652828719004],[61.40125574727585,55.20302935081623],[61.40233935971784,55.19898547806559],[61.400075575309636,55.19892411112227],[61.3961756434021,55.19878296676872],[61.3940352406084,55.198494539803626],[61.38585986753063,55.19724261970434],[61.38467969556405,55.20437312618814],[61.36405408851672,55.20777991379949],[61.3600707179909,55.20836199904053],[61.35636629720266,55.208784561549386],[61.34501119609931,55.224780331117756],[61.32937390156394,55.22909598209258],[61.31125154157293,55.22897027582062],[61.308504959541175,55.232735174789475],[61.29388155599165,55.23288846113555],[61.28146292825255,55.24217344142255],[61.2738293613961,55.239405647701304],[61.27554902310064,55.23803087397526],[61.27971485942678,55.23475544070167],[61.269058077284676,55.23025645188571],[61.275095364051246,55.225560709974125],[61.255021711783954,55.1796440509757],[61.26973094602404,55.1759293692194]]]},"properties":{"description":"12.delivery","fill":"#f371d1","fill-opacity":0.6,"stroke":"#f371d1","stroke-width":"0","stroke-opacity":0}},{"type":"Feature","id":4,"geometry":{"type":"Polygon","coordinates":[[[61.40748920102929,55.07149007619713],[61.40719527548822,55.07902950761533],[61.40682401319371,55.08401639762607],[61.40666308065277,55.08544959462032],[61.402704140146795,55.08562114399795],[61.396846195658256,55.08543497827147],[61.39564456601958,55.08575192105391],[61.38787688871242,55.08261930784489],[61.37989463468405,55.08373944539323],[61.37294234891746,55.08733352014121],[61.360175034006595,55.095505140044814],[61.35737883110852,55.09487294543078],[61.35449679752202,55.09475758036995],[61.35280968805167,55.09570817851254],[61.352310797174965,55.098495238309894],[61.34848596711975,55.100174762874154],[61.343137642344075,55.102284834295084],[61.335690027796936,55.096826493274584],[61.32738150600513,55.09988036129853],[61.31015720029702,55.08789968042628],[61.25818671842451,55.07608249222278],[61.25419559141043,55.06189723698823],[61.2824338879191,55.04992449897684],[61.30798997541299,55.0522035379401],[61.329254528483155,55.05251150619208],[61.343759914835594,55.05534470242666],[61.35397376676426,55.055997540833864],[61.352931765742824,55.04128687850316],[61.36055866425749,55.027113158977436],[61.39680328031404,55.02446432463503],[61.41023716442139,55.03510055233542],[61.408305283250215,55.0364997365261],[61.410686739515256,55.0415369158982],[61.41392650266504,55.04440498916058],[61.42208041807046,55.051944842779484],[61.42002048154684,55.05963106869791],[61.40748920102929,55.07149007619713]]]},"properties":{"description":"11.delivery","fill":"#56db40","fill-opacity":0.6,"stroke":"#56db40","stroke-width":"0","stroke-opacity":0}},{"type":"Feature","id":5,"geometry":{"type":"Polygon","coordinates":[[[61.52168693204764,55.1211782117814],[61.51280345579033,55.13274228611856],[61.51303949018365,55.13562202276944],[61.518393179377355,55.14239641805987],[61.52024658580667,55.14453228721673],[61.52029754777794,55.14597981965156],[61.51794525047187,55.14799260476483],[61.495504548748706,55.14930617912232],[61.48230257326983,55.15053271311836],[61.480433008322215,55.14216392476064],[61.4787161692878,55.142247995200286],[61.47833843478583,55.14068197626716],[61.47776758123486,55.14071381137643],[61.47724018582456,55.139089592281294],[61.47507400343755,55.13976220285626],[61.47302093168143,55.139718449727376],[61.46611156125911,55.13476457765065],[61.455897709330436,55.13604305537699],[61.44053401609312,55.139214486006374],[61.43392505308042,55.128248619635315],[61.43560948034173,55.11475227248068],[61.44255103727232,55.115238097480486],[61.454932114084976,55.11233535868376],[61.463187953432794,55.108854252744386],[61.46701546569699,55.11037343007209],[61.467710157831945,55.11152353789244],[61.466798206766896,55.111720344461716],[61.475209614237684,55.12460905367984],[61.48199023862727,55.12783057832099],[61.505550762614064,55.12224807596317],[61.52168693204764,55.1211782117814]]]},"properties":{"description":"11.delivery","fill":"#56db40","fill-opacity":0.6,"stroke":"#56db40","stroke-width":"0","stroke-opacity":0}},{"type":"Feature","id":6,"geometry":{"type":"Polygon","coordinates":[[[61.52042669737203,55.18044292588326],[61.50952043195584,55.17814835308577],[61.514510147847105,55.17021141102979],[61.513952248372,55.16618261667657],[61.50257968214881,55.15940152740811],[61.50282644537813,55.156336144117276],[61.502554866931845,55.155348661764314],[61.50538023646116,55.15484597487675],[61.50677682797168,55.15347129337252],[61.53081797865758,55.16026151226674],[61.552790634907545,55.16679678854978],[61.55656718520047,55.16905685930073],[61.55738257674099,55.1707026994072],[61.55742549208525,55.174853843693654],[61.556395523823525,55.20529866539582],[61.551975243366975,55.205372293886704],[61.53991603163605,55.18899886088947],[61.535152428425555,55.18575773986829],[61.52807139662623,55.18300749010449],[61.52042669737203,55.18044292588326]]]},"properties":{"description":"11.delivery","fill":"#56db40","fill-opacity":0.6,"stroke":"#56db40","stroke-width":"0","stroke-opacity":0}},{"type":"Feature","id":7,"geometry":{"type":"Polygon","coordinates":[[[61.27030809041788,55.175717356794046],[61.26769796338012,55.17628612299696],[61.2547435691707,55.17964308550973],[61.260386936937984,55.19262025426376],[61.268025868212405,55.21062410621691],[61.23178386000327,55.21359328125032],[61.228994362627866,55.20809645138637],[61.227304107314644,55.19970338565692],[61.22371577528648,55.19972704570516],[61.218737595354824,55.198597899713455],[61.2099828651303,55.19417919323055],[61.226805680071465,55.190349249305534],[61.22062587050119,55.179274702781505],[61.22736357954672,55.175750335062396],[61.25143908766435,55.16925338058579],[61.24689006117512,55.15163624883512],[61.256932251726944,55.149375186292275],[61.266631119524675,55.15006334938701],[61.26714610365582,55.146720731264175],[61.2689056327693,55.14235769992495],[61.283206495904565,55.145031918920466],[61.29691292163661,55.146847217618756],[61.29761851144052,55.14577621986306],[61.30407475737234,55.14743351901777],[61.31160640028634,55.14554091653985],[61.32979177740737,55.145080041889],[61.33069299963626,55.14734749358856],[61.32632636336023,55.14876996157948],[61.319685213839584,55.14934446445585],[61.323279373919206,55.1563545734542],[61.312293045794526,55.16146545925091],[61.31915950087269,55.167656612715724],[61.33718394545253,55.16942533637243],[61.34091758040155,55.16669852115509],[61.346715840959284,55.16819216480651],[61.35070462343038,55.16812091707282],[61.35817072105632,55.16943639402329],[61.358233921801194,55.17193703417595],[61.35819100645688,55.17855020674442],[61.33268788781094,55.17853209898455],[61.333136154382785,55.176445872260636],[61.334185235773994,55.175194635255785],[61.33382984307946,55.171535572346166],[61.32098608521162,55.17059062422989],[61.311490071930706,55.166166698648986],[61.302676051799125,55.16622707901977],[61.30274734985598,55.16714625777375],[61.299299527104786,55.16719738330382],[61.29923739341442,55.16780324165067],[61.296521656786844,55.16984294016297],[61.284113757883695,55.178937015585674],[61.27908930506633,55.1764943952574],[61.275536053454246,55.175713493318646],[61.27030809041788,55.175717356794046]]]},"properties":{"description":"12.delivery","fill":"#f371d1","fill-opacity":0.6,"stroke":"#f371d1","stroke-width":"0","stroke-opacity":0.7}},{"type":"Feature","id":8,"geometry":{"type":"Polygon","coordinates":[[[61.349028580463724,55.26080024216681],[61.329287522114114,55.26080024216681],[61.31927808141354,55.24338055175985],[61.28684424666244,55.242365572618965],[61.2846770217784,55.23999933169955],[61.29385017660929,55.232979468951996],[61.30864524153546,55.23285070875774],[61.311413281238806,55.22909195279883],[61.32920169142559,55.229208461199775],[61.33099012706331,55.22896374244149],[61.34312772063087,55.22532057486757],[61.345085733211725,55.22485449347066],[61.34661191014118,55.22281225639815],[61.36494011489226,55.22325612994145],[61.37092445848061,55.223643652772424],[61.37579300311876,55.22400664055671],[61.37209289578274,55.22965302956739],[61.36696719435529,55.234150554383625],[61.36689209250287,55.23503037850197],[61.3686623504527,55.23610637375965],[61.36460685042225,55.238086619104635],[61.363061898029635,55.24215715293383],[61.36048279407924,55.24561787178435],[61.35604264302289,55.25518481956142],[61.35471486357532,55.256241402497714],[61.349028580463724,55.26080024216681]]]},"properties":{"description":"10.delivery","fill":"#ffd21e","fill-opacity":0.6,"stroke":"#ffd21e","stroke-width":"0","stroke-opacity":0}},{"type":"Feature","id":9,"geometry":{"type":"Polygon","coordinates":[[[61.376899705474585,55.23510185020498],[61.368729696815144,55.236003111544406],[61.366954074447285,55.23489339226951],[61.36735104138149,55.23390013648928],[61.372372136657404,55.22960800408912],[61.37541509299124,55.22496891164165],[61.37759430121751,55.22122211909317],[61.37686215454835,55.220031806650255],[61.377199563752804,55.21875050783871],[61.37333905500492,55.21848155076422],[61.373395495132485,55.217695665929774],[61.36311044400577,55.21424913279987],[61.35706389161346,55.214236779203745],[61.35672508000484,55.216494063314705],[61.35098344616755,55.21665337663627],[61.355448597589806,55.21038949468156],[61.35652818564471,55.20882345759443],[61.36280053035243,55.208018142178254],[61.385213884925044,55.20444944069383],[61.3864430051496,55.1974106189432],[61.39612846190239,55.19893676838265],[61.401822791641,55.19916190785554],[61.40108666613198,55.20304852589927],[61.397370324676295,55.20650527931317],[61.395203099792255,55.21203607055254],[61.39035366589329,55.21632397315619],[61.39138363415502,55.22043354445415],[61.39406584316995,55.21985700343841],[61.3982930045774,55.21967299922414],[61.41678951794412,55.21952579524081],[61.42331265026829,55.21972206710452],[61.42073772961404,55.225021039895275],[61.42880581433083,55.225511649671404],[61.43956723994271,55.22368785857043],[61.44436343270553,55.22618148507991],[61.44335572820423,55.227047544744124],[61.43902289061286,55.227528643542314],[61.43816780808149,55.22807383705051],[61.437076691156754,55.231734008931454],[61.435770997510865,55.23272061271887],[61.43054822292734,55.23117315306292],[61.42465375477575,55.23570882438966],[61.4211274699153,55.23888702780884],[61.41811616918569,55.238582970985036],[61.4184664963459,55.23742308758226],[61.41368888432282,55.236542632341795],[61.40032075459264,55.237443860896626],[61.38442061955233,55.24203551641943],[61.3780798774411,55.23618090898392],[61.376899705474585,55.23510185020498]]]},"properties":{"description":"10.delivery","fill":"#ffd21e","fill-opacity":0.6,"stroke":"#ffd21e","stroke-width":"0","stroke-opacity":0}},{"type":"Feature","id":10,"geometry":{"type":"Polygon","coordinates":[[[61.252852902953606,55.23972442921409],[61.24791763836622,55.243574122920826],[61.22545145565747,55.25525883768019],[61.217833982055204,55.25797037498348],[61.20912216717478,55.2518729850507],[61.21337078625439,55.24981375471219],[61.210624204223144,55.24765635085262],[61.212877259795654,55.242237806706044],[61.210956798140934,55.23837572185573],[61.21011994892831,55.23211589218642],[61.21084950978035,55.226272082759436],[61.21941112095593,55.22663389662989],[61.22144959980724,55.2215375356939],[61.21196903134875,55.21817967433786],[61.211160646026144,55.21605407589306],[61.238690839354966,55.21324458214895],[61.24759577328438,55.21247162970936],[61.26347445065254,55.21150235058944],[61.26497648770095,55.21268020566091],[61.26564167553663,55.2184462825593],[61.26752995068309,55.22286228463927],[61.253625379149916,55.22806272250365],[61.262895093505385,55.22963253184214],[61.26684330517531,55.23188902375932],[61.255685315673325,55.23757873682981],[61.252852902953606,55.23972442921409]]]},"properties":{"description":"7.delivery","fill":"#ed4543","fill-opacity":0.6,"stroke":"#ed4543","stroke-width":"0","stroke-opacity":0}},{"type":"Feature","id":11,"geometry":{"type":"Polygon","coordinates":[[[61.089495645109544,55.20126826115871],[61.08908794933857,55.19380577281878],[61.096426473203316,55.17956423475234],[61.12736843639896,55.17813979969108],[61.11979465844852,55.1630928190815],[61.094517260589704,55.14429845560501],[61.09780002432139,55.141847527294246],[61.11232660824358,55.13595458915173],[61.14663742596209,55.14311454939616],[61.16642139965586,55.129653986401635],[61.185904965940004,55.140791544890796],[61.1883082252172,55.15003359398265],[61.19182728344481,55.169395595470846],[61.192857251707046,55.17042731530935],[61.197148786130604,55.17416093440929],[61.20341442638926,55.177599483369335],[61.19895123058804,55.17897481953302],[61.19139813000229,55.17877834585666],[61.18461750561249,55.181381543114675],[61.18968151623308,55.185015910184866],[61.19011066967519,55.18698029430421],[61.18873737865947,55.18889547516271],[61.20015286022707,55.19031952406139],[61.20581768566671,55.191105184326815],[61.20573185497829,55.1932656698089],[61.20933674389376,55.1932656698089],[61.20916508251717,55.19493505525341],[61.21603153759558,55.19773357318681],[61.208135114255334,55.20018825087541],[61.189896092954186,55.21241028305653],[61.177278981747705,55.21037353939002],[61.16573475414828,55.20747774772142],[61.16710804516528,55.19454226546227],[61.1659064155266,55.192725559933784],[61.15054272228928,55.19375667328453],[61.142925248686964,55.19534011658036],[61.13781832272257,55.19742212554149],[61.13464258724896,55.20011768146612],[61.131531224791665,55.20326712278483],[61.12983606869426,55.205729127460536],[61.1213388305351,55.20360000090142],[61.0918774467155,55.20868026363843],[61.089495645109544,55.20126826115871]]]},"properties":{"description":"7.delivery","fill":"#ed4543","fill-opacity":0.6,"stroke":"#ed4543","stroke-width":"0","stroke-opacity":0}},{"type":"Feature","id":12,"geometry":{"type":"Polygon","coordinates":[[[61.289175377431306,55.145839912358014],[61.28346495443857,55.14498422394736],[61.26869939381162,55.14216201146125],[61.26609228664912,55.14603962154427],[61.26512669140376,55.14902592218943],[61.25632904583492,55.14890303358925],[61.244398580136625,55.15150819053745],[61.24663017803709,55.16114087164672],[61.24216698223627,55.16379436304952],[61.23667381817373,55.16261505543126],[61.19307182842764,55.16939559586883],[61.186377034726476,55.14098820702273],[61.167494283261654,55.129481858766816],[61.14191673809561,55.126039141414246],[61.12749718243154,55.10498289890591],[61.13542631248399,55.09992510584222],[61.16395991208656,55.09066708223531],[61.17324853195625,55.08371739165588],[61.194508113862504,55.071681402151306],[61.233978883288344,55.06561278483805],[61.25392578655752,55.08987260602881],[61.26728855186972,55.10022771283012],[61.29115484768422,55.11406108070422],[61.29749558979539,55.11724656398425],[61.30623959118397,55.12830153210855],[61.29707716518908,55.136120543148735],[61.292163358273896,55.14270895561592],[61.29815004879512,55.144208404351154],[61.29684113079586,55.14676471106067],[61.289175377431306,55.145839912358014]]]},"properties":{"description":"7.delivery","fill":"#ed4543","fill-opacity":0.6,"stroke":"#ed4543","stroke-width":"0","stroke-opacity":0.2}},{"type":"Feature","id":13,"geometry":{"type":"Polygon","coordinates":[[[61.314368993111835,55.17770724684925],[61.296544989544635,55.16990329092966],[61.299276866320184,55.16781047198875],[61.29932246387344,55.16720859899419],[61.30277849018912,55.1671617692076],[61.302761055830494,55.166247425748246],[61.311462141874756,55.166193685337525],[61.32091424644322,55.170620115466264],[61.3337352055344,55.171571971431995],[61.33414826572269,55.1751826755666],[61.333064653280644,55.176444502353085],[61.332635499838226,55.178541317977405],[61.31671390712586,55.178565877386845],[61.314368993111835,55.17770724684925]]]},"properties":{"description":"19.delivery","fill":"#e6761b","fill-opacity":0.4,"stroke":"#e6761b","stroke-width":"2","stroke-opacity":0.9}},{"type":"Feature","id":14,"geometry":{"type":"Polygon","coordinates":[[[61.33268507381122,55.18893166059571],[61.33271726031943,55.18806615841079],[61.3348415698592,55.18807843516957],[61.33618267436667,55.18775923820645],[61.33622558971088,55.185831725035456],[61.34410055537862,55.18580103139298],[61.3447979297225,55.188931660595706],[61.33268507381122,55.18893166059571]]]},"properties":{"description":"19.delivery","fill":"#e6761b","fill-opacity":0.4,"stroke":"#e6761b","stroke-width":"2","stroke-opacity":0.9}}]};
var script2 = document.createElement('script');
script2.src = '/sc-modules/yamaps-calculate/script_modal_2.js?v=87610cde2468d9b687f85b546513494f';
script2.async = true;
script2.onload = function() {//console.log('Второй скрипт успешно загружен.');
};
script2.onerror = function() {//console.error('Ошибка загрузки второго скрипта.');
};
document.head.appendChild(script2);
//console.log('ddffddff2');
document.body.insertAdjacentHTML('beforeend', ``);
function parseGeoJSON(geoJsonData) {
return geoJsonData.features.map(feature => {
// В GeoJSON координаты идут в порядке [долгота, широта],
// поэтому меняем их местами для удобства (если нужно)
const [longitude, latitude] = feature.geometry.coordinates;
return {
name: feature.properties.description,
coords: [latitude, longitude] // меняем порядок на [широта, долгота]
};
});
}
const geoJsonData = {"type":"FeatureCollection","metadata":{"name":"bf74_pickpoint","creator":"Yandex Map Constructor","description":"самовывоз"},"features":[{"type":"Feature","id":0,"geometry":{"type":"Point","coordinates":[61.32631209325394,55.19481229817141]},"properties":{"description":"Самовывоз Комсомольский пр., д. 64а","marker-color":"#1e98ff"}},{"type":"Feature","id":1,"geometry":{"type":"Point","coordinates":[61.40870104431787,55.160833643187374]},"properties":{"description":"Самовывоз пр. Ленина д.50/Пушкина, д. 56","marker-color":"#1e98ff"}},{"type":"Feature","id":2,"geometry":{"type":"Point","coordinates":[61.44084874909008,55.1613958264892]},"properties":{"description":"Самовывоз ул. Горького, д. 1","marker-color":"#1e98ff"}},{"type":"Feature","id":3,"geometry":{"type":"Point","coordinates":[61.39063932142503,55.148653927925906]},"properties":{"description":"Самовывоз ул. Курчатова, д. 11","marker-color":"#1e98ff"}},{"type":"Feature","id":4,"geometry":{"coordinates":[61.319612,55.176296],"type":"Point"},"properties":{"description":"Самовывоз Бр. Кашириных 127","marker-color":"#1e98ff"}}]};
// ========== CSS STYLES ========== //
const deliveryStylesPoint = document.createElement('style');
deliveryStylesPoint.textContent = `
.delivery-buttons-container {
display: flex;
gap: 10px;
opacity: 0;
transition: opacity 0.01s ease;
margin: 10px 0;
}
.delivery-buttons-container.visible {
opacity: 1;
}
.delivery-button, .pickup-button {
transition: all 0.01s ease;
}
[data-type-id="todoor"] {
transition: opacity 0.01s ease;
}
`;
document.head.appendChild(deliveryStylesPoint);
// ========== CORE FUNCTIONS ========== //
let deliveryButtonsTimeout;
function clickDropdownItemByText(text) {
// Находим все элементы с классом wa-name (где хранится текст)
const nameElements = document.querySelectorAll('.wa-name');
// Ищем элемент, содержащий нужный текст
const targetElement = Array.from(nameElements).find(el =>
el.textContent.trim() === text
);
if (targetElement) {
// Находим родительский элемент wa-dropdown-item
const dropdownItem = targetElement.closest('.wa-dropdown-item');
if (dropdownItem) {
// Создаем и инициируем событие клика
const clickEvent = new MouseEvent('click', {
view: window,
bubbles: true,
cancelable: true
});
dropdownItem.dispatchEvent(clickEvent);
console.log('Клик сэмулирован:', text);
return true;
}
}
console.error('Элемент не найден:', text);
return false;
}
//берет текст из элемента с классом wa-dropdown-toggle и вставляет его в input с именем details[shipping_address][street]
function copyTextFromDropdownToInput() {
// Находим элемент с классом wa-dropdown-toggle
const dropdownToggle = document.querySelector('.wa-dropdown-toggle');
// Находим input с нужным именем
const inputElement = document.querySelector('input[name="details[shipping_address][street]"]');
// Проверяем, что оба элемента существуют
if (dropdownToggle && inputElement) {
// Получаем текст из dropdown и устанавливаем его как значение input
inputElement.value = dropdownToggle.textContent.trim();
document.querySelector('input[name="details[shipping_address][kvofis]"]').value='';
document.querySelector('input[name="details[shipping_address][etazh]"]').value='';
} else {
// Если какие-то элементы не найдены, выводим сообщение в консоль
console.error('Не удалось найти один или оба элемента:');
if (!dropdownToggle) console.error('Элемент с классом .wa-dropdown-toggle не найден');
if (!inputElement) console.error('Input с именем details[shipping_address][street] не найден');
}
}
function cleanAddressShipping(){
setTimeout(() => {
// Находим input с нужным именем
const inputElement = document.querySelector('input[name="details[shipping_address][street]"]');
if (inputElement) {
inputElement.value = '';
}
sc_addressNotZone();
}, 1500);
}
function emulatePickupClick() {
const pickupElement = document.querySelector('div[data-variant-id="23.delivery"]');
if (pickupElement) {
pickupElement.click();
console.log('Pickup click emulated');
setTimeout(() => {
copyTextFromDropdownToInput();
}, 1500);
}
}
function emulateDeliveryClickPoint() {
const deliveryElement = document.querySelector('div[data-variant-id="10.delivery"]');
if (deliveryElement) {
deliveryElement.click();
console.log('Delivery click emulated');
}
}
function createDeliveryButtons(headerElement) {
if (headerElement.querySelector('.delivery-buttons-container')) return;
const container = document.createElement('div');
container.className = 'delivery-buttons-container';
container.style.setProperty('display', 'none', 'important');
container.innerHTML = `
`;
headerElement.appendChild(container);
// Находим элемент с id="js-delivery-short-variants-section" для замены текста
const deliverySectionChangeText = document.getElementById('js-delivery-short-variants-section');
if (deliverySectionChangeText) {
// Внутри него ищем элемент с классом wa-header
const waHeaderChangeText = deliverySectionChangeText.querySelector('.wa-header');
if (waHeaderChangeText) {
// Заменяем текст
waHeaderChangeText.textContent = 'Выберите точку для самовывоза';
}
}
// Создаем и добавляем pickupmapmodal ПОСЛЕ container
const pickupmapmodal = document.createElement('div');
pickupmapmodal.className = 'pickup-map-modal';
pickupmapmodal.style.setProperty('display', 'none', 'important');
pickupmapmodal.innerHTML = 'выбрать на карте';
container.after(pickupmapmodal); // вставляем после container
container.querySelector('.delivery-button').addEventListener('click', handleDeliveryClick);
container.querySelector('.pickup-button').addEventListener('click', handlePickupClick);
// Плавное появление через 1 секунду
clearTimeout(deliveryButtonsTimeout);
deliveryButtonsTimeout = setTimeout(() => {
container.classList.add('visible');
updateActiveButtonPoint();
}, 1000);
setTimeout(() => {
document.querySelector('.delivery-buttons-container').style.display = 'block';
}, 500);
}
// ========== EVENT HANDLERS ========== //
function handleDeliveryClick() {
const wasPickupActive = document.querySelector('.pickup-button.active');
document.querySelectorAll('.delivery-button').forEach(btn => btn.classList.add('active'));
document.querySelectorAll('.pickup-button').forEach(btn => btn.classList.remove('active'));
toggleDeliverySections('delivery');
if (wasPickupActive) {
emulateDeliveryClickPoint();
}
}
function handlePickupClick() {
document.querySelectorAll('.pickup-button').forEach(btn => btn.classList.add('active'));
document.querySelectorAll('.delivery-button').forEach(btn => btn.classList.remove('active'));
toggleDeliverySections('pickup');
emulatePickupClick();
}
// ========== SECTION TOGGLING ========== //
function toggleDeliverySections(activeType) {
requestAnimationFrame(() => {
const detailsFields = document.querySelector('.wa-details-fields-section').querySelector('.wa-line');
const pickupModMap = document.querySelector('.pickup-map-modal');
//const warequiredtext = document.getElementById('wa-step-region-section').querySelector('.wa-line');
const warequiredtext = document.getElementById('wa-step-region-section').querySelector('.wa-section-body');
//const detailWaTable = document.querySelector('.wa-table');
//const waScheduleWrapper = document.querySelector('.wa-schedule-wrapper');
//const waDetailsDescription = document.getElementById('wa-step-details-section').querySelector('.wa-details-description');
const deliverySection = document.getElementById('js-delivery-short-variants-section');
//const todoorElements = document.querySelectorAll('[data-type-id="todoor"]');
const todoorElements = Array.from(document.querySelectorAll('.wa-name'))
.filter(el => el.textContent.includes('Самовывоз'))
.map(el => el.closest('.wa-dropdown-item'));
const deliveryElements = Array.from(document.querySelectorAll('.wa-name'))
.filter(el => el.textContent.includes('Курьер'))
.map(el => el.closest('.wa-dropdown-item'));
if (activeType === 'pickup') {
// Находим контейнер для смены текста
const detailsSectionChangeText = document.getElementById('wa-step-details-section');
if (detailsSectionChangeText) {
// Находим все элементы с классом wa-name внутри контейнера
const nameElementsChangeText = detailsSectionChangeText.querySelectorAll('.wa-name');
// Перебираем все найденные элементы
nameElementsChangeText.forEach(element => {
const text = element.textContent.trim();
if (text === 'Стоимость доставки') {
element.textContent = 'Стоимость';
} else if (text === 'Срок доставки') {
element.textContent = 'Дата самовывоза';
}
});
}
if (detailsFields) detailsFields.style.setProperty('display', 'none', 'important');
if (pickupModMap) pickupModMap.style.setProperty('display', 'block', 'important');
if (warequiredtext) warequiredtext.style.setProperty('display', 'none', 'important');
//if (detailWaTable) detailWaTable.style.setProperty('display', 'none', 'important');
//if (waScheduleWrapper) waScheduleWrapper.style.setProperty('display', 'none', 'important');
//if (waDetailsDescription) waDetailsDescription.style.setProperty('display', 'none', 'important');
if (deliverySection) deliverySection.style.setProperty('display', 'block', 'important');
// Применяем стили и добавляем обработчик с задержкой
todoorElements.forEach(el => {
el.style.setProperty('display', 'block', 'important');
el.addEventListener('click', function() {
setTimeout(copyTextFromDropdownToInput, 2000); // Задержка 2 секунды
});
});
deliveryElements.forEach(el => el.style.setProperty('display', 'none', 'important'));
} else {
if (detailsFields) detailsFields.style.setProperty('display', 'block', 'important');
if (pickupModMap) pickupModMap.style.setProperty('display', 'none', 'important');
//if (detailWaTable) detailWaTable.style.setProperty('display', 'block', 'important');
//if (waScheduleWrapper) waScheduleWrapper.style.setProperty('display', 'block', 'important');
//if (waDetailsDescription) waDetailsDescription.style.setProperty('display', 'block', 'important');
if (deliverySection) deliverySection.style.setProperty('display', 'none', 'important');
//todoorElements.forEach(el => el.style.setProperty('display', 'block', 'important'));
}
});
}
// ========== ACTIVE BUTTON MANAGEMENT ========== //
function updateActiveButtonPoint() {
const dropdownToggle = document.querySelector('.wa-dropdown-toggle');
if (!dropdownToggle) return;
const text = dropdownToggle.textContent.toLowerCase();
const deliveryButtons = document.querySelectorAll('.delivery-button');
const pickupButtons = document.querySelectorAll('.pickup-button');
if (text.includes('урьер')) {
const wasPickupActive = document.querySelector('.pickup-button.active');
deliveryButtons.forEach(btn => btn.classList.add('active'));
pickupButtons.forEach(btn => btn.classList.remove('active'));
toggleDeliverySections('delivery');
if (wasPickupActive) emulateDeliveryClickPoint();
} else if (text.includes('амовывоз')) {
pickupButtons.forEach(btn => btn.classList.add('active'));
deliveryButtons.forEach(btn => btn.classList.remove('active'));
toggleDeliverySections('pickup');
}
}
// ========== OBSERVER AND INIT ========== //
const deliveryObserver = new MutationObserver(mutations => {
mutations.forEach(mutation => {
if (mutation.addedNodes.length || mutation.attributeName === 'class') {
checkAndReplaceDeliveryHeader();
}
});
});
function checkAndReplaceDeliveryHeader() {
const deliveryHeader = document.querySelector('.wa-step-region-section .wa-header');
if (deliveryHeader &&
deliveryHeader.textContent.trim() === 'Доставка') {
const oldButtons = deliveryHeader.querySelector('.delivery-buttons-container');
if (oldButtons) oldButtons.remove();
setTimeout(() => {
createDeliveryButtons(deliveryHeader);
}, 50);
}
}
function initPoint() {
deliveryObserver.observe(document.body, {
childList: true,
subtree: true,
attributes: true,
attributeFilter: ['class']
});
// Initial check with delay
setTimeout(checkAndReplaceDeliveryHeader, 50);
}
// Start initialization
if (document.readyState === 'complete') {
initPoint();
} else {
document.addEventListener('DOMContentLoaded', initPoint);
window.addEventListener('load', initPoint);
}