1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404 |
- import {
- o
- } from "./chunk-WDLTDV2L.js";
- import "./chunk-A5ICIBVI.js";
- // node_modules/@arcgis/core/chunks/index.js
- function e(t, e2) {
- for (var i2 = 0; i2 < e2.length; i2++) {
- const n2 = e2[i2];
- if (typeof n2 != "string" && !Array.isArray(n2)) {
- for (const e3 in n2)
- if (e3 !== "default" && !(e3 in t)) {
- const i3 = Object.getOwnPropertyDescriptor(n2, e3);
- i3 && Object.defineProperty(t, e3, i3.get ? i3 : { enumerable: true, get: () => n2[e3] });
- }
- }
- }
- return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
- }
- var i;
- var n = { exports: {} };
- self, i = function() {
- return (() => {
- var t, e2, i2, n2, r2 = {}, s = {};
- function a(t2) {
- var e3 = s[t2];
- if (e3 !== void 0)
- return e3.exports;
- var i3 = s[t2] = { exports: {} };
- return r2[t2].call(i3.exports, i3, i3.exports, a), i3.exports;
- }
- a.m = r2, a.n = (t2) => {
- var e3 = t2 && t2.__esModule ? () => t2.default : () => t2;
- return a.d(e3, { a: e3 }), e3;
- }, e2 = Object.getPrototypeOf ? (t2) => Object.getPrototypeOf(t2) : (t2) => t2.__proto__, a.t = function(i3, n3) {
- if (1 & n3 && (i3 = this(i3)), 8 & n3)
- return i3;
- if (typeof i3 == "object" && i3) {
- if (4 & n3 && i3.__esModule)
- return i3;
- if (16 & n3 && typeof i3.then == "function")
- return i3;
- }
- var r3 = Object.create(null);
- a.r(r3);
- var s2 = {};
- t = t || [null, e2({}), e2([]), e2(e2)];
- for (var o3 = 2 & n3 && i3; typeof o3 == "object" && !~t.indexOf(o3); o3 = e2(o3))
- Object.getOwnPropertyNames(o3).forEach((t2) => s2[t2] = () => i3[t2]);
- return s2.default = () => i3, a.d(r3, s2), r3;
- }, a.d = (t2, e3) => {
- for (var i3 in e3)
- a.o(e3, i3) && !a.o(t2, i3) && Object.defineProperty(t2, i3, { enumerable: true, get: e3[i3] });
- }, a.f = {}, a.e = (t2) => Promise.all(Object.keys(a.f).reduce((e3, i3) => (a.f[i3](t2, e3), e3), [])), a.u = (t2) => ({ 265: "canvg", 297: "xlsx", 643: "pdfmake" }[t2] || t2) + ".js", a.g = function() {
- if (typeof globalThis == "object")
- return globalThis;
- try {
- return this || new Function("return this")();
- } catch (t2) {
- if (typeof window == "object")
- return window;
- }
- }(), a.o = (t2, e3) => Object.prototype.hasOwnProperty.call(t2, e3), i2 = {}, n2 = "EsriAmCharts:", a.l = (t2, e3, r3, s2) => {
- if (i2[t2])
- i2[t2].push(e3);
- else {
- var o3, l2;
- if (r3 !== void 0)
- for (var h2 = document.getElementsByTagName("script"), p2 = 0; p2 < h2.length; p2++) {
- var u2 = h2[p2];
- if (u2.getAttribute("src") == t2 || u2.getAttribute("data-webpack") == n2 + r3) {
- o3 = u2;
- break;
- }
- }
- o3 || (l2 = true, (o3 = document.createElement("script")).charset = "utf-8", o3.timeout = 120, a.nc && o3.setAttribute("nonce", a.nc), o3.setAttribute("data-webpack", n2 + r3), o3.src = t2), i2[t2] = [e3];
- var d2 = (e4, n3) => {
- o3.onerror = o3.onload = null, clearTimeout(c2);
- var r4 = i2[t2];
- if (delete i2[t2], o3.parentNode && o3.parentNode.removeChild(o3), r4 && r4.forEach((t3) => t3(n3)), e4)
- return e4(n3);
- }, c2 = setTimeout(d2.bind(null, void 0, { type: "timeout", target: o3 }), 12e4);
- o3.onerror = d2.bind(null, o3.onerror), o3.onload = d2.bind(null, o3.onload), l2 && document.head.appendChild(o3);
- }
- }, a.r = (t2) => {
- typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
- }, a.p = "", (() => {
- var t2 = { 826: 0 };
- a.f.j = (e4, i4) => {
- var n3 = a.o(t2, e4) ? t2[e4] : void 0;
- if (n3 !== 0)
- if (n3)
- i4.push(n3[2]);
- else {
- var r3 = new Promise((i5, r4) => n3 = t2[e4] = [i5, r4]);
- i4.push(n3[2] = r3);
- var s2 = a.p + a.u(e4), o3 = new Error();
- a.l(s2, (i5) => {
- if (a.o(t2, e4) && ((n3 = t2[e4]) !== 0 && (t2[e4] = void 0), n3)) {
- var r4 = i5 && (i5.type === "load" ? "missing" : i5.type), s3 = i5 && i5.target && i5.target.src;
- o3.message = "Loading chunk " + e4 + " failed.\n(" + r4 + ": " + s3 + ")", o3.name = "ChunkLoadError", o3.type = r4, o3.request = s3, n3[1](o3);
- }
- }, "chunk-" + e4, e4);
- }
- };
- var e3 = (e4, i4) => {
- var n3, r3, [s2, o3, l2] = i4, h2 = 0;
- if (s2.some((e5) => t2[e5] !== 0)) {
- for (n3 in o3)
- a.o(o3, n3) && (a.m[n3] = o3[n3]);
- l2 && l2(a);
- }
- for (e4 && e4(i4); h2 < s2.length; h2++)
- r3 = s2[h2], a.o(t2, r3) && t2[r3] && t2[r3][0](), t2[r3] = 0;
- }, i3 = self.webpackChunkEsriAmCharts = self.webpackChunkEsriAmCharts || [];
- i3.forEach(e3.bind(null, 0)), i3.push = e3.bind(null, i3.push.bind(i3));
- })();
- var o2 = {};
- a.r(o2), a.d(o2, { am4charts: () => P, am4core: () => _, am4themes_animated: () => vu, am4themes_dark: () => bu });
- var l = {};
- a.r(l), a.d(l, { castNumber: () => Y, castString: () => X, checkArray: () => N, checkBoolean: () => R, checkDate: () => W, checkNumber: () => B, checkObject: () => H, checkString: () => E, getDefault: () => j, getType: () => L, getValue: () => q, getValueDefault: () => $, hasValue: () => Z, isArray: () => it, isDate: () => J, isNaN: () => M, isNumber: () => tt, isObject: () => et, isString: () => Q, toBoolean: () => z, toNumber: () => U, toNumberOrPercent: () => K, toText: () => G });
- var h = {};
- a.r(h), a.d(h, { DEGREES: () => at, HALFPI: () => rt, PI: () => nt, RADIANS: () => st, adjustTension: () => jt, ceil: () => ht, closest: () => mt, cos: () => ft, fitAngleToRange: () => Rt, fitToRange: () => ut, getAngle: () => Dt, getArcPoint: () => Ht, getArcRect: () => Bt, getBBox: () => Tt, getCenterShift: () => kt, getCommonRectangle: () => At, getCubicControlPointA: () => Mt, getCubicControlPointB: () => Lt, getCubicCurveDistance: () => Ct, getDistance: () => _t, getHorizontalDistance: () => Pt, getLineIntersection: () => Wt, getMidPoint: () => St, getPointOnCubicCurve: () => Ft, getPointOnQuadraticCurve: () => Vt, getRotation: () => It, getScale: () => Ot, getVerticalDistance: () => wt, intersect: () => vt, intersection: () => xt, invertRange: () => bt, isInRectangle: () => Nt, max: () => gt, min: () => yt, normalizeAngle: () => Et, round: () => lt, sin: () => dt, stretch: () => pt, tan: () => ct, toNumberRange: () => ot });
- var p = {};
- a.r(p), a.d(p, { add: () => ne, any: () => Yt, copy: () => oe, each: () => Ut, eachContinue: () => Kt, eachReverse: () => Gt, find: () => ce, findIndex: () => de, first: () => $t, getSortedIndex: () => ue, has: () => ae, indexOf: () => Xt, insert: () => Jt, insertIndex: () => he, keepIf: () => ge, last: () => qt, map: () => zt, move: () => ie, pushAll: () => te, remove: () => ee, removeIndex: () => pe, replace: () => re, setIndex: () => Qt, shiftLeft: () => Zt, shuffle: () => fe, slice: () => le, toArray: () => se });
- var u = {};
- a.r(u), a.d(u, { clone: () => ze, copy: () => Xe, copyAllProperties: () => Ze, copyProperties: () => Ue, each: () => Ne, eachContinue: () => He, eachOrdered: () => We, entries: () => Le, forceCopyProperties: () => Ke, getKey: () => Be, hasKey: () => Re, keys: () => je, keysOrdered: () => Ee, merge: () => Ye, softCopyProperties: () => Ge });
- var d = {};
- a.r(d), a.d(d, { ListIterator: () => mi, concat: () => ri, contains: () => pi, each: () => ti, eachContinue: () => Qe, filter: () => ni, find: () => li, findIndex: () => oi, findMap: () => hi, flatten: () => si, foldl: () => ui, fromArray: () => qe, indexed: () => ai, join: () => yi, length: () => $e, map: () => ii, max: () => gi, min: () => ci, sort: () => ei, toArray: () => Je });
- var c = {};
- a.r(c), a.d(c, { order: () => vi, random: () => xi, repeat: () => bi });
- var f = {};
- a.r(f), a.d(f, { order: () => Bi });
- var g = {};
- a.r(g), a.d(g, { brighten: () => nn, getBrightnessStep: () => rn, getLightnessStep: () => en, hexToRgb: () => Gi, hexToRgbWithAlpha: () => Ki, hslToRgb: () => an, hsvToRgb: () => hn, interpolate: () => Qi, isLight: () => pn, lighten: () => tn, pad2: () => Ji, rgb: () => Ui, rgbToHex: () => qi, rgbToHsl: () => on, rgbToHsv: () => ln, rgbToRGBA: () => $i, rgbaToRgb: () => Zi, saturate: () => sn });
- var y = {};
- a.r(y), a.d(y, { anyToDate: () => Qn, anyToNumber: () => tr, camelToDashed: () => jn, capitalize: () => En, cleanFormat: () => Zn, copy: () => Tn, copyProperties: () => Sn, decimalPlaces: () => _r, documentPointToSprite: () => mr, documentPointToSvg: () => gr, escapeForRgex: () => Bn, fitNumber: () => lr, fitNumberRelative: () => hr, get12Hours: () => sr, getBaseURI: () => Dn, getDayFromWeek: () => rr, getFormat: () => Kn, getMonthWeek: () => nr, getPixelRatio: () => Ln, getTimeZone: () => ar, getWeek: () => ir, getYearDay: () => er, height: () => xr, isIE: () => Ir, isNotEmpty: () => An, joinUrl: () => Sr, ltrim: () => Yn, numberToString: () => Jn, padString: () => Gn, parseUrl: () => wr, plainText: () => $n, random: () => or, relativeRadiusToValue: () => Fn, relativeToValue: () => Vn, reverseString: () => zn, rtrim: () => Xn, serializeUrl: () => Cr, softCopyProperties: () => kn, splitTextByCharCount: () => Hn, spritePointToDocument: () => vr, spritePointToSprite: () => dr, spritePointToSvg: () => ur, spriteRectToSvg: () => fr, stringify: () => Rn, stripHash: () => In, stripTags: () => qn, svgPointToDocument: () => yr, svgPointToSprite: () => pr, svgRectToSprite: () => cr, trim: () => Wn, truncateWithEllipsis: () => Nn, unquote: () => Un, used: () => On, valueToRelative: () => Mn, width: () => br });
- var m = {};
- a.r(m), a.d(m, { bounceIn: () => $r, bounceInOut: () => Qr, bounceOut: () => Jr, circleIn: () => Gr, circleInOut: () => Zr, circleOut: () => Kr, cubicIn: () => Yr, cubicInOut: () => Ur, cubicOut: () => zr, elasticIn: () => is, elasticInOut: () => rs, elasticOut: () => ns, expIn: () => Rr, expInOut: () => Hr, expOut: () => Br, linear: () => Dr, polyIn: () => Vr, polyIn3: () => Lr, polyInOut: () => Mr, polyInOut3: () => Er, polyOut: () => Fr, polyOut3: () => jr, quadIn: () => kr, quadInOut: () => Ar, quadOut: () => Tr, sinIn: () => Nr, sinInOut: () => Xr, sinOut: () => Wr });
- var v = {};
- a.r(v), a.d(v, { add: () => sa, checkChange: () => ra, copy: () => na, getDuration: () => ta, getNextUnit: () => Qs, getTime: () => ia, getTimezoneMinutes: () => la, now: () => ea, round: () => aa, setTimezone: () => oa, timeUnitDurations: () => Js });
- var b = {};
- a.r(b), a.d(b, { load: () => Ha, readBlob: () => Na });
- var x = {};
- a.r(x), a.d(x, { arc: () => ko, arcTo: () => Do, arcToPoint: () => To, closePath: () => Io, cubicCurveTo: () => So, lineTo: () => Co, moveTo: () => wo, pathToPoints: () => Fo, pointsToPath: () => Lo, polyline: () => Po, quadraticCurveTo: () => Oo, rectToPath: () => Vo, rectangle: () => Ao, spiralPoints: () => Mo });
- var _ = {};
- a.r(_), a.d(_, { AMElement: () => Ws, Adapter: () => Yi, Animation: () => ys, BaseObject: () => yn, BaseObjectEvents: () => mn, Basis: () => ll, BlurFilter: () => Il, Button: () => go, CSVParser: () => io, Cache: () => Ci, Circle: () => yo, CirclePattern: () => wl, CloseButton: () => Yo, Color: () => un, ColorModifier: () => fl, ColorSet: () => kl, ColorizeFilter: () => Ol, Component: () => uo, Cone: () => ml, Container: () => $a, CounterDisposer: () => be, DATE: () => _n, DURATION: () => Pn, DataItem: () => po, DataLoader: () => ro, DataParser: () => to, DataSource: () => ao, DateFormatter: () => Ma, DesaturateFilter: () => Sl, Dictionary: () => Pi, DictionaryDisposer: () => _i, DictionaryTemplate: () => wi, Disposer: () => ye, DropShadowFilter: () => qo, DurationFormatter: () => La, Ellipse: () => mo, EventDispatcher: () => Fe, Export: () => Ga, ExportMenu: () => Ba, Filter: () => Zo, FocusFilter: () => Dl, GlobalAdapter: () => Wi, Group: () => Xs, Image: () => vo, IndexedIterable: () => ki, Inertia: () => Zs, Interaction: () => ha, InteractionKeyboardObject: () => Ks, InteractionObject: () => Gs, InteractionObjectEventDispatcher: () => Us, InterfaceColorSet: () => Ys, JSONParser: () => no, Keyboard: () => qs, Label: () => co, Language: () => Ta, LightenFilter: () => vl, Line: () => bo, LinePattern: () => Pl, LinearGradient: () => Oa, LinearGradientModifier: () => yl, List: () => Fi, ListDisposer: () => Ai, ListGrouper: () => Ti, ListIterator: () => mi, ListTemplate: () => Mi, Modal: () => ca, Morpher: () => Ro, MouseCursorStyle: () => Ia, MultiDisposer: () => me, MutableValueDisposer: () => ve, NUMBER: () => xn, NumberFormatter: () => Fa, OrderedList: () => Li, OrderedListTemplate: () => Ei, PLACEHOLDER: () => wn, PLACEHOLDER2: () => Cn, PX: () => vn, Paper: () => _a, Pattern: () => Ca, PatternSet: () => Tl, Percent: () => A, PlayButton: () => cl, Plugin: () => Al, PointedRectangle: () => _o, PointedShape: () => xo, Polyarc: () => Eo, Polygon: () => Bo, Polyline: () => jo, Polyspline: () => Ho, Popup: () => da, Preloader: () => Wo, RadialGradient: () => Sa, RadialGradientModifier: () => _l, RectPattern: () => Cl, Rectangle: () => qa, Rectangle3D: () => bl, Registry: () => Si, ResizeButton: () => Xo, Responsive: () => oo, ResponsiveBreakpoints: () => ho, RoundedRectangle: () => fo, STRING: () => bn, SVGContainer: () => xa, SVGDefaults: () => os, Scrollbar: () => Uo, Slice: () => No, Slice3D: () => xl, Slider: () => Go, SortedList: () => ji, SortedListTemplate: () => Ri, Sprite: () => Za, SpriteEventDispatcher: () => as, SpriteState: () => ss, StyleClass: () => Es, StyleRule: () => Ls, SwitchButton: () => zo, System: () => Ja, TargetedEventDispatcher: () => Me, Tension: () => tl, TextFormatter: () => Aa, TextLink: () => Ko, Tooltip: () => $o, Trapezoid: () => Jo, Triangle: () => Qo, Validatable: () => Ra, WavedCircle: () => hl, WavedLine: () => pl, WavedRectangle: () => ul, ZoomOutButton: () => dl, addClass: () => Ps, addLicense: () => Ul, animate: () => hs, array: () => p, blur: () => Ss, cache: () => Oi, castColor: () => fn, castNumber: () => Y, castString: () => X, checkBoolean: () => R, checkNumber: () => B, checkObject: () => H, checkString: () => E, color: () => dn, colors: () => g, copyAttributes: () => Fs, create: () => Bl, createDeferred: () => Nl, createFromConfig: () => Hl, dataLoader: () => so, defaultRules: () => lo, disposeAllCharts: () => Ml, ease: () => m, fixPixelPerfect: () => Ms, focus: () => Is, getElement: () => _s, getInteraction: () => ua, getTextFormatter: () => Va, globalAdapter: () => Xi, is: () => Di, isArray: () => it, isColor: () => cn, isElement: () => ks, isNaN: () => M, isNumber: () => tt, isObject: () => et, isPercent: () => F, isString: () => Q, iter: () => d, join: () => yi, keyboard: () => $s, math: () => h, max: () => gi, min: () => ci, net: () => b, nextFrame: () => De, number: () => f, object: () => u, options: () => ls, or: () => Ni, outerHTML: () => Ds, path: () => x, percent: () => V, readFrame: () => ke, ready: () => Rs, registry: () => Ii, removeClass: () => ws, reverse: () => Hi, string: () => c, system: () => Qa, time: () => v, triggerIdle: () => Ve, type: () => l, unuseAllThemes: () => zl, unuseTheme: () => Yl, useTheme: () => Xl, utils: () => y, viewPortHandler: () => El, whenIdle: () => Ae, writeFrame: () => Te });
- var P = {};
- a.r(P), a.d(P, { Axis: () => oh, AxisBreak: () => rh, AxisBullet: () => gh, AxisDataItem: () => ah, AxisFill: () => hh, AxisFillCircular: () => Bh, AxisLabel: () => uh, AxisLabelCircular: () => Nh, AxisLine: () => lh, AxisRenderer: () => fh, AxisRendererCircular: () => Wh, AxisRendererRadial: () => Xh, AxisRendererX: () => wh, AxisRendererX3D: () => Ap, AxisRendererY: () => yh, AxisRendererY3D: () => Vp, AxisTick: () => ch, Bullet: () => ql, Candlestick: () => Bp, CandlestickSeries: () => Np, CandlestickSeriesDataItem: () => Hp, CategoryAxis: () => Sh, CategoryAxisBreak: () => Ch, CategoryAxisDataItem: () => Oh, Chart: () => Zl, ChartDataItem: () => Kl, ChordDiagram: () => wp, ChordDiagramDataItem: () => Pp, ChordLink: () => _p, ChordNode: () => bp, CircleBullet: () => uu, ClockHand: () => Uh, Column: () => Cp, Column3D: () => Fp, ColumnSeries: () => Sp, ColumnSeries3D: () => Lp, ColumnSeries3DDataItem: () => Mp, ColumnSeriesDataItem: () => Op, ConeColumn: () => su, ConeSeries: () => ou, ConeSeriesDataItem: () => au, Cursor: () => gu, CurvedColumn: () => lu, CurvedColumnSeries: () => pu, CurvedColumnSeriesDataItem: () => hu, DateAxis: () => Ph, DateAxisBreak: () => xh, DateAxisDataItem: () => _h, DurationAxis: () => Mh, DurationAxisDataItem: () => Fh, ErrorBullet: () => du, FlowDiagram: () => cp, FlowDiagramDataItem: () => dp, FlowDiagramLink: () => up, FlowDiagramNode: () => pp, FunnelSeries: () => tu, FunnelSeriesDataItem: () => Qp, FunnelSlice: () => $p, GaugeChart: () => Kh, GaugeChartDataItem: () => Gh, Grid: () => ph, GridCircular: () => Hh, HeatLegend: () => Rp, LabelBullet: () => fp, Legend: () => Ql, LegendDataItem: () => $l, LegendSettings: () => Jl, LineSeries: () => jh, LineSeriesDataItem: () => Lh, LineSeriesSegment: () => Vh, NavigationBar: () => fu, NavigationBarDataItem: () => cu, OHLC: () => Wp, OHLCSeries: () => Yp, OHLCSeriesDataItem: () => Xp, PictorialStackedSeries: () => ru, PictorialStackedSeriesDataItem: () => nu, PieChart: () => np, PieChart3D: () => op, PieChart3DDataItem: () => ap, PieChartDataItem: () => ip, PieSeries: () => ep, PieSeries3D: () => sp, PieSeries3DDataItem: () => rp, PieSeriesDataItem: () => tp, PieTick: () => Qh, PyramidSeries: () => iu, PyramidSeriesDataItem: () => eu, RadarChart: () => zh, RadarChartDataItem: () => Yh, RadarColumn: () => Kp, RadarColumnSeries: () => qp, RadarColumnSeriesDataItem: () => Zp, RadarCursor: () => mu, RadarSeries: () => Rh, RadarSeriesDataItem: () => Eh, SankeyDiagram: () => vp, SankeyDiagramDataItem: () => mp, SankeyLink: () => yp, SankeyNode: () => gp, SerialChart: () => nh, SerialChartDataItem: () => ih, Series: () => eh, SeriesDataItem: () => th, SlicedChart: () => hp, SlicedChartDataItem: () => lp, StepLineSeries: () => Gp, StepLineSeriesDataItem: () => Up, Tick: () => dh, TreeMap: () => Tp, TreeMapDataItem: () => kp, TreeMapSeries: () => Dp, TreeMapSeriesDataItem: () => Ip, ValueAxis: () => bh, ValueAxisBreak: () => mh, ValueAxisDataItem: () => vh, XYChart: () => Ah, XYChart3D: () => Ep, XYChart3DDataItem: () => jp, XYChartDataItem: () => Th, XYChartScrollbar: () => kh, XYCursor: () => yu, XYSeries: () => Dh, XYSeriesDataItem: () => Ih });
- var w = function(t2, e3) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t3, e4) {
- t3.__proto__ = e4;
- } || function(t3, e4) {
- for (var i3 in e4)
- Object.prototype.hasOwnProperty.call(e4, i3) && (t3[i3] = e4[i3]);
- }, w(t2, e3);
- };
- function C(t2, e3) {
- if (typeof e3 != "function" && e3 !== null)
- throw new TypeError("Class extends value " + String(e3) + " is not a constructor or null");
- function i3() {
- this.constructor = t2;
- }
- w(t2, e3), t2.prototype = e3 === null ? Object.create(e3) : (i3.prototype = e3.prototype, new i3());
- }
- var O = function() {
- return O = Object.assign || function(t2) {
- for (var e3, i3 = 1, n3 = arguments.length; i3 < n3; i3++)
- for (var r3 in e3 = arguments[i3])
- Object.prototype.hasOwnProperty.call(e3, r3) && (t2[r3] = e3[r3]);
- return t2;
- }, O.apply(this, arguments);
- };
- function S(t2, e3, i3, n3) {
- return new (i3 || (i3 = Promise))(function(r3, s2) {
- function a2(t3) {
- try {
- l2(n3.next(t3));
- } catch (t4) {
- s2(t4);
- }
- }
- function o3(t3) {
- try {
- l2(n3.throw(t3));
- } catch (t4) {
- s2(t4);
- }
- }
- function l2(t3) {
- var e4;
- t3.done ? r3(t3.value) : (e4 = t3.value, e4 instanceof i3 ? e4 : new i3(function(t4) {
- t4(e4);
- })).then(a2, o3);
- }
- l2((n3 = n3.apply(t2, e3 || [])).next());
- });
- }
- function I(t2, e3) {
- var i3, n3, r3, s2, a2 = { label: 0, sent: function() {
- if (1 & r3[0])
- throw r3[1];
- return r3[1];
- }, trys: [], ops: [] };
- return s2 = { next: o3(0), throw: o3(1), return: o3(2) }, typeof Symbol == "function" && (s2[Symbol.iterator] = function() {
- return this;
- }), s2;
- function o3(s3) {
- return function(o4) {
- return function(s4) {
- if (i3)
- throw new TypeError("Generator is already executing.");
- for (; a2; )
- try {
- if (i3 = 1, n3 && (r3 = 2 & s4[0] ? n3.return : s4[0] ? n3.throw || ((r3 = n3.return) && r3.call(n3), 0) : n3.next) && !(r3 = r3.call(n3, s4[1])).done)
- return r3;
- switch (n3 = 0, r3 && (s4 = [2 & s4[0], r3.value]), s4[0]) {
- case 0:
- case 1:
- r3 = s4;
- break;
- case 4:
- return a2.label++, { value: s4[1], done: false };
- case 5:
- a2.label++, n3 = s4[1], s4 = [0];
- continue;
- case 7:
- s4 = a2.ops.pop(), a2.trys.pop();
- continue;
- default:
- if (!((r3 = (r3 = a2.trys).length > 0 && r3[r3.length - 1]) || s4[0] !== 6 && s4[0] !== 2)) {
- a2 = 0;
- continue;
- }
- if (s4[0] === 3 && (!r3 || s4[1] > r3[0] && s4[1] < r3[3])) {
- a2.label = s4[1];
- break;
- }
- if (s4[0] === 6 && a2.label < r3[1]) {
- a2.label = r3[1], r3 = s4;
- break;
- }
- if (r3 && a2.label < r3[2]) {
- a2.label = r3[2], a2.ops.push(s4);
- break;
- }
- r3[2] && a2.ops.pop(), a2.trys.pop();
- continue;
- }
- s4 = e3.call(t2, a2);
- } catch (t3) {
- s4 = [6, t3], n3 = 0;
- } finally {
- i3 = r3 = 0;
- }
- if (5 & s4[0])
- throw s4[1];
- return { value: s4[0] ? s4[1] : void 0, done: true };
- }([s3, o4]);
- };
- }
- }
- function D(t2) {
- var e3 = typeof Symbol == "function" && Symbol.iterator, i3 = e3 && t2[e3], n3 = 0;
- if (i3)
- return i3.call(t2);
- if (t2 && typeof t2.length == "number")
- return { next: function() {
- return t2 && n3 >= t2.length && (t2 = void 0), { value: t2 && t2[n3++], done: !t2 };
- } };
- throw new TypeError(e3 ? "Object is not iterable." : "Symbol.iterator is not defined.");
- }
- function k(t2, e3) {
- var i3 = typeof Symbol == "function" && t2[Symbol.iterator];
- if (!i3)
- return t2;
- var n3, r3, s2 = i3.call(t2), a2 = [];
- try {
- for (; (e3 === void 0 || e3-- > 0) && !(n3 = s2.next()).done; )
- a2.push(n3.value);
- } catch (t3) {
- r3 = { error: t3 };
- } finally {
- try {
- n3 && !n3.done && (i3 = s2.return) && i3.call(s2);
- } finally {
- if (r3)
- throw r3.error;
- }
- }
- return a2;
- }
- function T() {
- for (var t2 = [], e3 = 0; e3 < arguments.length; e3++)
- t2 = t2.concat(k(arguments[e3]));
- return t2;
- }
- var A = function() {
- function t2(t3) {
- this._value = t3;
- }
- return Object.defineProperty(t2.prototype, "value", { get: function() {
- return this._value / 100;
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "percent", { get: function() {
- return this._value;
- }, enumerable: true, configurable: true }), t2.prototype.toString = function() {
- return this._value + "%";
- }, t2;
- }();
- function V(t2) {
- return new A(t2);
- }
- function F(t2) {
- return t2 instanceof A;
- }
- function M(t2) {
- return Number(t2) !== t2;
- }
- function L(t2) {
- return {}.toString.call(t2);
- }
- function j(t2, e3) {
- return t2 || e3;
- }
- function E(t2) {
- if (typeof t2 == "string")
- return true;
- throw new Error("Expected a string but got " + L(t2));
- }
- function R(t2) {
- if (typeof t2 == "boolean")
- return true;
- throw new Error("Expected a boolean but got " + L(t2));
- }
- function B(t2) {
- if (typeof t2 != "number")
- throw new Error("Expected a number but got " + L(t2));
- if (M(t2))
- throw new Error("Expected a number but got NaN");
- return true;
- }
- function H(t2) {
- var e3 = L(t2);
- if (e3 === "[object Object]")
- return true;
- throw new Error("Expected an object but got " + e3);
- }
- function N(t2) {
- if (Array.isArray(t2))
- return true;
- throw new Error("Expected an array but got " + L(t2));
- }
- function W(t2) {
- var e3 = L(t2);
- if (e3 === "[object Date]")
- return true;
- throw new Error("Expected a date but got " + e3);
- }
- function X(t2) {
- if (typeof t2 == "string")
- return t2;
- if (typeof t2 == "number")
- return "" + t2;
- throw new Error("Expected a string or number but got " + L(t2));
- }
- function Y(t2) {
- if (typeof t2 == "string") {
- var e3 = +t2;
- if (M(e3))
- throw new Error("Cannot cast string " + JSON.stringify(t2) + " to a number");
- return e3;
- }
- if (typeof t2 == "number") {
- if (M(t2))
- throw new Error("Expected a number but got NaN");
- return t2;
- }
- var i3 = L(t2);
- if (i3 === "[object Date]")
- return t2.getTime();
- throw new Error("Expected a string, number, or date but got " + i3);
- }
- function z(t2) {
- return !!t2;
- }
- function U(t2) {
- if (Z(t2) && !tt(t2)) {
- var e3 = Number(t2);
- return M(e3) && Q(t2) && t2 != "" ? U(t2.replace(/[^0-9.\-]+/g, "")) : e3;
- }
- return t2;
- }
- function G(t2) {
- if (Z(t2) && !Q(t2)) {
- if (tt(t2))
- return X(t2);
- if (et(t2))
- return t2.toString();
- }
- return t2;
- }
- function K(t2) {
- return !Z(t2) || tt(t2) || F(t2) ? t2 : Q(t2) && t2.indexOf("%") != -1 ? V(U(t2)) : U(t2);
- }
- function Z(t2) {
- return t2 != null;
- }
- function q(t2) {
- if (Z(t2))
- return t2;
- throw new Error("Value doesn't exist");
- }
- function $(t2, e3) {
- return Z(t2) ? t2 : e3;
- }
- function J(t2) {
- return L(t2) === "[object Date]";
- }
- function Q(t2) {
- return typeof t2 == "string";
- }
- function tt(t2) {
- return typeof t2 == "number" && Number(t2) == t2;
- }
- function et(t2) {
- return typeof t2 == "object" && t2 != null;
- }
- function it(t2) {
- return Array.isArray(t2);
- }
- var nt = Math.PI, rt = nt / 2, st = nt / 180, at = 180 / nt;
- function ot(t2, e3, i3) {
- return Z(t2) ? ut(t2 = U(t2), e3, i3) : t2;
- }
- function lt(t2, e3, i3) {
- if (!tt(e3) || e3 <= 0) {
- var n3 = Math.round(t2);
- return i3 && n3 - t2 == 0.5 && n3--, n3;
- }
- var r3 = Math.pow(10, e3);
- return Math.round(t2 * r3) / r3;
- }
- function ht(t2, e3) {
- if (!tt(e3) || e3 <= 0)
- return Math.ceil(t2);
- var i3 = Math.pow(10, e3);
- return Math.ceil(t2 * i3) / i3;
- }
- function pt(t2, e3, i3) {
- return t2 * (i3 - e3) + e3;
- }
- function ut(t2, e3, i3) {
- if (tt(e3)) {
- if (tt(i3) && i3 < e3) {
- var n3 = i3;
- i3 = e3, e3 = n3;
- }
- t2 < e3 && (t2 = e3);
- }
- return tt(i3) && t2 > i3 && (t2 = i3), t2;
- }
- function dt(t2) {
- return lt(Math.sin(st * t2), 10);
- }
- function ct(t2) {
- return lt(Math.tan(st * t2), 10);
- }
- function ft(t2) {
- return lt(Math.cos(st * t2), 10);
- }
- function gt(t2, e3) {
- return tt(t2) ? tt(e3) && e3 > t2 ? e3 : t2 : tt(e3) ? e3 : null;
- }
- function yt(t2, e3) {
- return tt(t2) ? tt(e3) && e3 < t2 ? e3 : t2 : tt(e3) ? e3 : null;
- }
- function mt(t2, e3) {
- return t2.reduce(function(t3, i3) {
- return Math.abs(i3 - e3) < Math.abs(t3 - e3) ? i3 : t3;
- });
- }
- function vt(t2, e3) {
- var i3 = q(t2.start), n3 = q(e3.start), r3 = q(t2.end), s2 = q(e3.end);
- return Math.max(i3, n3) <= Math.min(r3, s2);
- }
- function bt(t2) {
- var e3 = q(t2.start);
- return { start: 1 - q(t2.end), end: 1 - e3 };
- }
- function xt(t2, e3) {
- var i3 = q(t2.start), n3 = q(e3.start), r3 = q(t2.end), s2 = q(e3.end), a2 = Math.max(i3, n3), o3 = Math.min(r3, s2);
- return o3 < a2 ? void 0 : { start: a2, end: o3 };
- }
- function _t(t2, e3) {
- return t2 ? (e3 || (e3 = { x: 0, y: 0 }), Math.sqrt(Math.pow(Math.abs(t2.x - e3.x), 2) + Math.pow(Math.abs(t2.y - e3.y), 2))) : 0;
- }
- function Pt(t2, e3) {
- return t2 ? (e3 || (e3 = { x: 0, y: 0 }), Math.abs(t2.x - e3.x)) : 0;
- }
- function wt(t2, e3) {
- return t2 ? (e3 || (e3 = { x: 0, y: 0 }), Math.abs(t2.y - e3.y)) : 0;
- }
- function Ct(t2, e3, i3, n3, r3) {
- if (!t2)
- return 0;
- e3 || (e3 = { x: 0, y: 0 });
- var s2 = 0, a2 = t2;
- if (r3 > 0)
- for (var o3 = 0; o3 <= r3; o3++) {
- var l2 = Ft(t2, e3, i3, n3, o3 / r3);
- s2 += _t(a2, l2), a2 = l2;
- }
- return s2;
- }
- function Ot(t2, e3, i3, n3) {
- var r3 = _t(e3, n3), s2 = _t(t2, i3);
- return Math.abs(s2 / r3);
- }
- function St(t2, e3, i3) {
- return tt(i3) || (i3 = 0.5), { x: t2.x + (e3.x - t2.x) * i3, y: t2.y + (e3.y - t2.y) * i3 };
- }
- function It(t2, e3, i3, n3) {
- var r3 = Dt(e3, n3) - Dt(t2, i3);
- return r3 < 0 && (r3 += 360), r3;
- }
- function Dt(t2, e3) {
- e3 || (e3 = { x: 2 * t2.x, y: 2 * t2.y });
- var i3 = e3.x - t2.x, n3 = e3.y - t2.y, r3 = Math.atan2(n3, i3) * at;
- return r3 < 0 && (r3 += 360), Et(r3);
- }
- function kt(t2, e3, i3, n3, r3) {
- var s2 = It(e3, i3, n3, r3) - 90;
- s2 < 0 && (s2 += 360);
- var a2 = _t(e3, n3), o3 = Math.cos(s2) / a2 + e3.x, l2 = Math.cos(s2) / a2 + e3.y;
- return { x: o3 - t2.x, y: l2 - t2.y };
- }
- function Tt(t2) {
- if (t2) {
- var e3 = t2.length;
- if (e3 !== 0) {
- for (var i3, n3 = void 0, r3 = void 0, s2 = void 0, a2 = 0; a2 < e3; a2++) {
- var o3 = t2[a2];
- (!tt(r3) || o3.x > r3) && (r3 = o3.x), (!tt(n3) || o3.x < n3) && (n3 = o3.x), (!tt(i3) || o3.y < i3) && (i3 = o3.y), (!tt(s2) || o3.y > s2) && (s2 = o3.y);
- }
- return { x: n3, y: i3, width: r3 - n3, height: s2 - i3 };
- }
- }
- return { x: 0, y: 0, width: 0, height: 0 };
- }
- function At(t2) {
- var e3 = t2.length;
- if (e3 !== 0) {
- for (var i3 = void 0, n3 = void 0, r3 = void 0, s2 = void 0, a2 = 0; a2 < e3; a2++) {
- var o3 = t2[a2];
- i3 = yt(o3.x, i3), n3 = yt(o3.y, n3), r3 = gt(o3.x + o3.width, r3), s2 = gt(o3.y + o3.height, s2);
- }
- return { x: i3, y: n3, width: r3 - i3, height: s2 - n3 };
- }
- }
- function Vt(t2, e3, i3, n3) {
- return { x: (1 - n3) * (1 - n3) * t2.x + 2 * (1 - n3) * n3 * i3.x + n3 * n3 * e3.x, y: (1 - n3) * (1 - n3) * t2.y + 2 * (1 - n3) * n3 * i3.y + n3 * n3 * e3.y };
- }
- function Ft(t2, e3, i3, n3, r3) {
- var s2 = { x: 0, y: 0 }, a2 = 1 - r3, o3 = a2 * a2, l2 = o3 * a2;
- return s2.x = t2.x * l2 + 3 * i3.x * o3 * r3 + 3 * n3.x * a2 * r3 * r3 + e3.x * r3 * r3 * r3, s2.y = t2.y * l2 + 3 * i3.y * o3 * r3 + 3 * n3.y * a2 * r3 * r3 + e3.y * r3 * r3 * r3, s2;
- }
- function Mt(t2, e3, i3, n3, r3, s2) {
- return r3 = jt(r3), s2 = jt(s2), { x: (-t2.x + e3.x / r3 + i3.x) * r3, y: (-t2.y + e3.y / s2 + i3.y) * s2 };
- }
- function Lt(t2, e3, i3, n3, r3, s2) {
- return r3 = jt(r3), s2 = jt(s2), { x: (e3.x + i3.x / r3 - n3.x) * r3, y: (e3.y + i3.y / s2 - n3.y) * s2 };
- }
- function jt(t2) {
- return 1 - t2 + 1e-5;
- }
- function Et(t2) {
- return t2 == 360 ? 360 : t2 % 360;
- }
- function Rt(t2, e3, i3) {
- if (e3 > i3) {
- var n3 = e3;
- e3 = i3, i3 = n3;
- }
- t2 = Et(t2);
- var r3 = (e3 - Et(e3)) / 360;
- return t2 < e3 && (t2 += 360 * (r3 + 1)), t2 > i3 && (t2 - 360 > e3 ? t2 -= 360 : t2 = t2 < e3 + (i3 - e3) / 2 + 180 ? i3 : e3), t2 < e3 && (t2 = t2 > e3 + (i3 - e3) / 2 - 180 ? e3 : i3), t2;
- }
- function Bt(t2, e3, i3) {
- var n3 = Number.MAX_VALUE, r3 = Number.MAX_VALUE, s2 = -Number.MAX_VALUE, a2 = -Number.MAX_VALUE, o3 = [];
- tt(i3) || (i3 = 1), o3.push(Ht(i3, t2)), o3.push(Ht(i3, e3));
- for (var l2 = Math.min(90 * Math.floor(t2 / 90), 90 * Math.floor(e3 / 90)), h2 = Math.max(90 * Math.ceil(t2 / 90), 90 * Math.ceil(e3 / 90)), p2 = l2; p2 <= h2; p2 += 90)
- p2 >= t2 && p2 <= e3 && o3.push(Ht(i3, p2));
- for (var u2 = 0; u2 < o3.length; u2++) {
- var d2 = o3[u2];
- d2.x < n3 && (n3 = d2.x), d2.y < r3 && (r3 = d2.y), d2.x > s2 && (s2 = d2.x), d2.y > a2 && (a2 = d2.y);
- }
- return { x: n3, y: r3, width: s2 - n3, height: a2 - r3 };
- }
- function Ht(t2, e3) {
- return { x: t2 * ft(e3), y: t2 * dt(e3) };
- }
- function Nt(t2, e3) {
- return t2.x >= e3.x && t2.x <= e3.x + e3.width && t2.y >= e3.y && t2.y <= e3.y + e3.height;
- }
- function Wt(t2, e3, i3, n3) {
- return { x: ((t2.x * e3.y - e3.x * t2.y) * (i3.x - n3.x) - (t2.x - e3.x) * (i3.x * n3.y - i3.y * n3.x)) / ((t2.x - e3.x) * (i3.y - n3.y) - (t2.y - e3.y) * (i3.x - n3.x)), y: ((t2.x * e3.y - e3.x * t2.y) * (i3.y - n3.y) - (t2.y - e3.y) * (i3.x * n3.y - i3.y * n3.x)) / ((t2.x - e3.x) * (i3.y - n3.y) - (t2.y - e3.y) * (i3.x - n3.x)) };
- }
- function Xt(t2, e3) {
- for (var i3 = t2.length, n3 = 0; n3 < i3; ++n3)
- if (t2[n3] === e3)
- return n3;
- return -1;
- }
- function Yt(t2, e3) {
- for (var i3 = t2.length, n3 = 0; n3 < i3; ++n3)
- if (e3(t2[n3]))
- return true;
- return false;
- }
- function zt(t2, e3) {
- for (var i3 = t2.length, n3 = new Array(i3), r3 = 0; r3 < i3; ++r3)
- n3[r3] = e3(t2[r3], r3);
- return n3;
- }
- function Ut(t2, e3) {
- for (var i3 = t2.length, n3 = 0; n3 < i3; ++n3)
- e3(t2[n3], n3);
- }
- function Gt(t2, e3) {
- for (var i3 = t2.length; i3--; )
- e3(t2[i3], i3);
- }
- function Kt(t2, e3) {
- for (var i3 = t2.length, n3 = 0; n3 < i3 && e3(t2[n3], n3); ++n3)
- ;
- }
- function Zt(t2, e3) {
- for (var i3 = t2.length, n3 = e3; n3 < i3; ++n3)
- t2[n3 - e3] = t2[n3];
- t2.length = i3 - e3;
- }
- function qt(t2) {
- var e3 = t2.length;
- return e3 ? t2[e3 - 1] : void 0;
- }
- function $t(t2) {
- return t2[0];
- }
- function Jt(t2, e3, i3) {
- i3 = ut(i3, 0, t2.length), t2.splice(i3, 0, e3);
- }
- function Qt(t2, e3, i3) {
- ee(t2, e3), Jt(t2, e3, i3);
- }
- function te(t2, e3) {
- for (var i3 = e3.length, n3 = 0; n3 < i3; ++n3)
- t2.push(e3[n3]);
- }
- function ee(t2, e3) {
- var i3 = false, n3 = t2.indexOf(e3);
- if (n3 !== -1) {
- i3 = true, t2.splice(n3, 1);
- for (var r3 = t2.length; n3 < r3; )
- t2[n3] === e3 ? (t2.splice(n3, 1), --r3) : ++n3;
- }
- return i3;
- }
- function ie(t2, e3, i3) {
- var n3 = Xt(t2, e3);
- n3 !== -1 && pe(t2, n3), i3 == null ? t2.push(e3) : he(t2, i3, e3);
- }
- function ne(t2, e3, i3) {
- tt(i3) ? i3 === 0 ? t2.unshift(e3) : t2.splice(i3, 0, e3) : t2.push(e3);
- }
- function re(t2, e3, i3) {
- var n3 = t2.indexOf(e3);
- n3 !== -1 && t2.splice(n3, 1), tt(i3) ? t2.splice(i3, 0, e3) : t2.push(e3);
- }
- function se(t2) {
- return Array.isArray(t2) ? t2 : [t2];
- }
- function ae(t2, e3) {
- return Xt(t2, e3) !== -1;
- }
- function oe(t2) {
- for (var e3 = t2.length, i3 = new Array(e3), n3 = 0; n3 < e3; ++n3)
- i3[n3] = t2[n3];
- return i3;
- }
- function le(t2, e3, i3) {
- i3 === void 0 && (i3 = t2.length);
- for (var n3 = new Array(i3 - e3), r3 = e3; r3 < i3; ++r3)
- n3[r3 - e3] = t2[r3];
- return n3;
- }
- function he(t2, e3, i3) {
- t2.splice(e3, 0, i3);
- }
- function pe(t2, e3) {
- t2.splice(e3, 1);
- }
- function ue(t2, e3, i3) {
- for (var n3 = 0, r3 = t2.length, s2 = false; n3 < r3; ) {
- var a2 = n3 + r3 >> 1, o3 = e3(i3, t2[a2]);
- o3 < 0 ? r3 = a2 : o3 === 0 ? (s2 = true, n3 = a2 + 1) : n3 = a2 + 1;
- }
- return { found: s2, index: s2 ? n3 - 1 : n3 };
- }
- function de(t2, e3) {
- for (var i3 = t2.length, n3 = 0; n3 < i3; ++n3)
- if (e3(t2[n3], n3))
- return n3;
- return -1;
- }
- function ce(t2, e3) {
- var i3 = de(t2, e3);
- if (i3 !== -1)
- return t2[i3];
- }
- function fe(t2) {
- for (var e3, i3, n3 = t2.length; n3 !== 0; )
- i3 = Math.floor(Math.random() * n3), e3 = t2[n3 -= 1], t2[n3] = t2[i3], t2[i3] = e3;
- }
- function ge(t2, e3) {
- for (var i3 = t2.length, n3 = 0; n3 < i3; )
- e3(t2[n3]) ? ++n3 : (t2.splice(n3, 1), --i3);
- }
- var ye = function() {
- function t2(t3) {
- this._disposed = false, this._dispose = t3;
- }
- return t2.prototype.isDisposed = function() {
- return this._disposed;
- }, t2.prototype.dispose = function() {
- this._disposed || (this._disposed = true, this._dispose());
- }, t2;
- }(), me = function(t2) {
- function e3(e4) {
- return t2.call(this, function() {
- Ut(e4, function(t3) {
- t3.dispose();
- });
- }) || this;
- }
- return C(e3, t2), e3;
- }(ye), ve = function(t2) {
- function e3() {
- var e4 = t2.call(this, function() {
- Z(e4._disposer) && (e4._disposer.dispose(), e4._disposer = void 0);
- }) || this;
- return e4;
- }
- return C(e3, t2), e3.prototype.get = function() {
- return this._value;
- }, e3.prototype.set = function(t3, e4) {
- Z(this._disposer) && this._disposer.dispose(), this._disposer = e4, this._value = t3;
- }, e3.prototype.reset = function() {
- this.set(void 0, void 0);
- }, e3;
- }(ye), be = function(t2) {
- function e3() {
- var e4 = t2 !== null && t2.apply(this, arguments) || this;
- return e4._counter = 0, e4;
- }
- return C(e3, t2), e3.prototype.increment = function() {
- var t3 = this;
- return ++this._counter, new ye(function() {
- --t3._counter, t3._counter === 0 && t3.dispose();
- });
- }, e3;
- }(ye), xe = false, _e = [], Pe = [], we = [], Ce = [], Oe = typeof requestAnimationFrame == "function" ? function(t2) {
- requestAnimationFrame(t2);
- } : function(t2) {
- setTimeout(t2, 16.666666666666668);
- };
- function Se() {
- for (var t2 = Date.now(), e3 = _e.length, i3 = 0; i3 < e3; ++i3)
- _e[i3](t2);
- for (Zt(_e, e3), i3 = 0; i3 < Pe.length; ++i3)
- Pe[i3](t2);
- for (Pe.length = 0, i3 = 0; i3 < we.length; ++i3)
- we[i3](t2);
- we.length = 0, _e.length === 0 && Pe.length === 0 ? xe = false : Oe(Se);
- }
- function Ie() {
- xe || (xe = true, Oe(Se));
- }
- function De(t2) {
- _e.push(t2), Ie();
- }
- function ke(t2) {
- Pe.push(t2), Ie();
- }
- function Te(t2) {
- we.push(t2), Ie();
- }
- function Ae(t2) {
- Ce.push(t2);
- }
- function Ve() {
- for (var t2 = Date.now(), e3 = Ce.length, i3 = 0; i3 < e3; ++i3)
- Ce.shift()(t2);
- }
- var Fe = function() {
- function t2() {
- this._listeners = [], this._killed = [], this._disabled = {}, this._iterating = 0, this._enabled = true, this._disposed = false;
- }
- return t2.prototype.isDisposed = function() {
- return this._disposed;
- }, t2.prototype.dispose = function() {
- if (!this._disposed) {
- this._disposed = true;
- var t3 = this._listeners;
- this._iterating = 1, this._listeners = null, this._disabled = null;
- try {
- Ut(t3, function(t4) {
- t4.disposer.dispose();
- });
- } finally {
- this._killed = null, this._iterating = null;
- }
- }
- }, t2.prototype.hasListeners = function() {
- return this._listeners.length !== 0;
- }, t2.prototype.hasListenersByType = function(t3) {
- return Yt(this._listeners, function(e3) {
- return (e3.type === null || e3.type === t3) && !e3.killed;
- });
- }, t2.prototype.enable = function() {
- this._enabled = true;
- }, t2.prototype.disable = function() {
- this._enabled = false;
- }, t2.prototype.enableType = function(t3) {
- delete this._disabled[t3];
- }, t2.prototype.disableType = function(t3, e3) {
- e3 === void 0 && (e3 = 1 / 0), this._disabled[t3] = e3;
- }, t2.prototype._removeListener = function(t3) {
- if (this._iterating === 0) {
- var e3 = this._listeners.indexOf(t3);
- if (e3 === -1)
- throw new Error("Invalid state: could not remove listener");
- this._listeners.splice(e3, 1);
- } else
- this._killed.push(t3);
- }, t2.prototype._removeExistingListener = function(t3, e3, i3, n3) {
- if (this._disposed)
- throw new Error("EventDispatcher is disposed");
- this._eachListener(function(r3) {
- r3.once !== t3 || r3.type !== e3 || i3 != null && r3.callback !== i3 || r3.context !== n3 || r3.disposer.dispose();
- });
- }, t2.prototype.isEnabled = function(t3) {
- if (this._disposed)
- throw new Error("EventDispatcher is disposed");
- return this._enabled && this._listeners.length > 0 && this.hasListenersByType(t3) && this._disabled[t3] == null;
- }, t2.prototype.has = function(t3, e3, i3) {
- return de(this._listeners, function(n3) {
- return n3.once !== true && n3.type === t3 && (e3 == null || n3.callback === e3) && n3.context === i3;
- }) !== -1;
- }, t2.prototype._shouldDispatch = function(t3) {
- if (this._disposed)
- throw new Error("EventDispatcher is disposed");
- var e3 = this._disabled[t3];
- return tt(e3) ? (e3 <= 1 ? delete this._disabled[t3] : --this._disabled[t3], false) : this._enabled;
- }, t2.prototype._eachListener = function(t3) {
- var e3 = this;
- ++this._iterating;
- try {
- Ut(this._listeners, t3);
- } finally {
- --this._iterating, this._iterating === 0 && this._killed.length !== 0 && (Ut(this._killed, function(t4) {
- e3._removeListener(t4);
- }), this._killed.length = 0);
- }
- }, t2.prototype.dispatchImmediately = function(t3, e3) {
- this._shouldDispatch(t3) && this._eachListener(function(i3) {
- i3.killed || i3.type !== null && i3.type !== t3 || i3.dispatch(t3, e3);
- });
- }, t2.prototype.dispatch = function(t3, e3) {
- this._shouldDispatch(t3) && this._eachListener(function(i3) {
- i3.killed || i3.type !== null && i3.type !== t3 || Ae(function() {
- i3.killed || i3.dispatch(t3, e3);
- });
- });
- }, t2.prototype._on = function(t3, e3, i3, n3, r3, s2) {
- var a2 = this;
- if (this._disposed)
- throw new Error("EventDispatcher is disposed");
- this._removeExistingListener(t3, e3, i3, n3);
- var o3 = { type: e3, callback: i3, context: n3, shouldClone: r3, dispatch: s2, killed: false, once: t3, disposer: new ye(function() {
- o3.killed = true, a2._removeListener(o3);
- }) };
- return this._listeners.push(o3), o3;
- }, t2.prototype.onAll = function(t3, e3, i3) {
- return i3 === void 0 && (i3 = true), this._on(false, null, t3, e3, i3, function(i4, n3) {
- return t3.call(e3, i4, n3);
- }).disposer;
- }, t2.prototype.on = function(t3, e3, i3, n3) {
- return n3 === void 0 && (n3 = true), this._on(false, t3, e3, i3, n3, function(t4, n4) {
- return e3.call(i3, n4);
- }).disposer;
- }, t2.prototype.once = function(t3, e3, i3, n3) {
- n3 === void 0 && (n3 = true);
- var r3 = this._on(true, t3, e3, i3, n3, function(t4, n4) {
- r3.disposer.dispose(), e3.call(i3, n4);
- });
- return r3.disposer;
- }, t2.prototype.off = function(t3, e3, i3) {
- this._removeExistingListener(false, t3, e3, i3);
- }, t2.prototype.copyFrom = function(t3) {
- var e3 = this;
- if (this._disposed)
- throw new Error("EventDispatcher is disposed");
- if (t3 === this)
- throw new Error("Cannot copyFrom the same TargetedEventDispatcher");
- Ut(t3._listeners, function(t4) {
- !t4.killed && t4.shouldClone && (t4.type === null ? e3.onAll(t4.callback, t4.context) : t4.once ? e3.once(t4.type, t4.callback, t4.context) : e3.on(t4.type, t4.callback, t4.context));
- });
- }, t2;
- }(), Me = function(t2) {
- function e3(e4) {
- var i3 = t2.call(this) || this;
- return i3.target = e4, i3;
- }
- return C(e3, t2), e3.prototype.copyFrom = function(t3) {
- var e4 = this;
- if (this._disposed)
- throw new Error("EventDispatcher is disposed");
- if (t3 === this)
- throw new Error("Cannot copyFrom the same TargetedEventDispatcher");
- Ut(t3._listeners, function(i3) {
- i3.context !== t3.target && !i3.killed && i3.shouldClone && (i3.type === null ? e4.onAll(i3.callback, i3.context) : i3.once ? e4.once(i3.type, i3.callback, i3.context) : e4.on(i3.type, i3.callback, i3.context));
- });
- }, e3;
- }(Fe);
- function Le(t2) {
- return function(e3) {
- for (var i3 in t2)
- if (Re(t2, i3) && !e3([i3, t2[i3]]))
- break;
- };
- }
- function je(t2) {
- var e3 = [];
- for (var i3 in t2)
- Re(t2, i3) && e3.push(i3);
- return e3;
- }
- function Ee(t2, e3) {
- return je(t2).sort(e3);
- }
- function Re(t2, e3) {
- return {}.hasOwnProperty.call(t2, e3);
- }
- function Be(t2, e3) {
- return t2[e3];
- }
- function He(t2, e3) {
- for (var i3 in t2)
- if (Re(t2, i3) && !e3(i3, t2[i3]))
- break;
- }
- function Ne(t2, e3) {
- He(t2, function(t3, i3) {
- return e3(t3, i3), true;
- });
- }
- function We(t2, e3, i3) {
- Ut(Ee(t2, i3), function(i4) {
- e3(i4, t2[i4]);
- });
- }
- function Xe(t2) {
- return Object.assign({}, t2);
- }
- function Ye(t2, e3) {
- return Object.assign({}, t2, e3);
- }
- function ze(t2) {
- return JSON.parse(JSON.stringify(t2));
- }
- function Ue(t2, e3, i3) {
- Ut(i3, function(i4) {
- Z(t2[i4]) && (e3[i4] = t2[i4]);
- });
- }
- function Ge(t2, e3, i3) {
- Ut(i3, function(i4) {
- Z(t2[i4]) && !Z(e3[i4]) && (e3[i4] = t2[i4]);
- });
- }
- function Ke(t2, e3, i3) {
- Ut(i3, function(i4) {
- e3[i4] = t2[i4];
- });
- }
- function Ze(t2, e3) {
- Ue(t2, e3, je(t2));
- }
- function qe(t2) {
- return function(e3) {
- for (var i3 = t2.length, n3 = 0; n3 < i3 && e3(t2[n3]); ++n3)
- ;
- };
- }
- function $e(t2) {
- var e3 = 0;
- return t2(function(t3) {
- return ++e3, true;
- }), e3;
- }
- function Je(t2) {
- var e3 = [];
- return t2(function(t3) {
- return e3.push(t3), true;
- }), e3;
- }
- function Qe(t2, e3) {
- t2(e3);
- }
- function ti(t2, e3) {
- t2(function(t3) {
- return e3(t3), true;
- });
- }
- function ei(t2, e3) {
- return qe(Je(t2).sort(e3));
- }
- function ii(t2, e3) {
- return function(i3) {
- return t2(function(t3) {
- return i3(e3(t3));
- });
- };
- }
- function ni(t2, e3) {
- return function(i3) {
- return t2(function(t3) {
- return !e3(t3) || i3(t3);
- });
- };
- }
- function ri() {
- for (var t2 = [], e3 = 0; e3 < arguments.length; e3++)
- t2[e3] = arguments[e3];
- return function(e4) {
- for (var i3 = true, n3 = function(t3) {
- return i3 = e4(t3);
- }, r3 = t2.length, s2 = 0; s2 < r3 && (t2[s2](n3), i3); ++s2)
- ;
- };
- }
- function si(t2) {
- return function(e3) {
- var i3 = true, n3 = function(t3) {
- return i3 = e3(t3);
- };
- t2(function(t3) {
- return t3(n3), i3;
- });
- };
- }
- function ai(t2) {
- return function(e3) {
- var i3 = 0;
- t2(function(t3) {
- return e3([i3++, t3]);
- });
- };
- }
- function oi(t2, e3) {
- var i3 = false, n3 = 0;
- return t2(function(t3) {
- return e3(t3) ? (i3 = true, false) : (++n3, true);
- }), i3 ? n3 : -1;
- }
- function li(t2, e3) {
- var i3;
- return t2(function(t3) {
- return !e3(t3) || (i3 = t3, false);
- }), i3;
- }
- function hi(t2, e3) {
- var i3;
- return t2(function(t3) {
- var n3 = e3(t3);
- return n3 === null || (i3 = n3, false);
- }), i3;
- }
- function pi(t2, e3) {
- var i3 = false;
- return t2(function(t3) {
- return !e3(t3) || (i3 = true, false);
- }), i3;
- }
- function ui(t2, e3, i3) {
- return t2(function(t3) {
- return e3 = i3(e3, t3), true;
- }), e3;
- }
- function di(t2, e3) {
- return t2 == null || e3 < t2 ? e3 : t2;
- }
- function ci(t2) {
- return ui(t2, null, di);
- }
- function fi(t2, e3) {
- return t2 == null || e3 > t2 ? e3 : t2;
- }
- function gi(t2) {
- return ui(t2, null, fi);
- }
- function yi(t2, e3) {
- e3 === void 0 && (e3 = "");
- var i3 = true, n3 = "";
- return t2(function(t3) {
- return i3 ? i3 = false : n3 += e3, n3 += t3, true;
- }), n3;
- }
- var mi = function() {
- function t2(t3, e3) {
- this.createNewItems = false, this.list = t3, this._create = e3, this.reset();
- }
- return t2.prototype.reset = function() {
- this._listCopy = Je(this.list.iterator());
- }, t2.prototype.clear = function() {
- this._listCopy.length = 0;
- }, t2.prototype.getFirst = function() {
- return this.returnItem(0);
- }, t2.prototype.getLast = function() {
- return this.returnItem(this._listCopy.length - 1);
- }, t2.prototype.find = function(t3) {
- var e3 = de(this._listCopy, t3);
- if (e3 !== -1) {
- var i3 = this._listCopy[e3];
- return ee(this._listCopy, i3), i3;
- }
- return this.getLast();
- }, t2.prototype.removeItem = function(t3) {
- return ee(this._listCopy, t3);
- }, t2.prototype.returnItem = function(t3) {
- if (t3 >= 0 && t3 < this._listCopy.length) {
- var e3 = this._listCopy[t3];
- return ee(this._listCopy, e3), e3;
- }
- if (this.createNewItems)
- return this._create();
- }, t2.prototype.iterator = function() {
- return qe(this._listCopy);
- }, t2;
- }();
- function vi(t2, e3) {
- return t2 === e3 ? 0 : t2 < e3 ? -1 : 1;
- }
- function bi(t2, e3) {
- return new Array(e3 + 1).join(t2);
- }
- function xi(t2) {
- for (var e3 = "", i3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", n3 = 0; n3 < t2; n3++)
- e3 += i3.charAt(Math.floor(Math.random() * i3.length));
- return e3;
- }
- var _i = function(t2) {
- function e3(e4) {
- var i3 = e4.events.on("removed", function(t3) {
- t3.oldValue.dispose();
- }, void 0, false);
- return t2.call(this, function() {
- i3.dispose(), ti(e4.iterator(), function(t3) {
- t3[1].dispose();
- });
- }) || this;
- }
- return C(e3, t2), e3;
- }(ye), Pi = function() {
- function t2() {
- this.events = new Fe(), this._dictionary = {};
- }
- return t2.prototype.hasKey = function(t3) {
- return Re(this._dictionary, t3);
- }, t2.prototype.getKey = function(t3) {
- return this._dictionary[t3];
- }, t2.prototype.insertKey = function(t3, e3) {
- if (Re(this._dictionary, t3))
- throw new Error("Key " + t3 + " already exists in dictionary");
- this._dictionary[t3] = e3, this.events.isEnabled("insertKey") && this.events.dispatchImmediately("insertKey", { type: "insertKey", target: this, key: t3, newValue: e3 });
- }, t2.prototype.setKey = function(t3, e3) {
- if (Re(this._dictionary, t3)) {
- var i3 = this._dictionary[t3];
- i3 !== e3 && (this._dictionary[t3] = e3, this.events.isEnabled("setKey") && this.events.dispatchImmediately("setKey", { type: "setKey", target: this, key: t3, oldValue: i3, newValue: e3 }), this.events.isEnabled("removed") && this.events.dispatchImmediately("removed", { type: "removed", target: this, oldValue: i3 }));
- } else
- this._dictionary[t3] = e3, this.events.isEnabled("insertKey") && this.events.dispatchImmediately("insertKey", { type: "insertKey", target: this, key: t3, newValue: e3 });
- }, t2.prototype.updateKey = function(t3, e3) {
- if (!Re(this._dictionary, t3))
- throw new Error("Key " + t3 + " doesn't exist in dictionary");
- var i3 = this._dictionary[t3], n3 = e3(i3);
- i3 !== n3 && (this._dictionary[t3] = n3, this.events.isEnabled("setKey") && this.events.dispatchImmediately("setKey", { type: "setKey", target: this, key: t3, oldValue: i3, newValue: n3 }), this.events.isEnabled("removed") && this.events.dispatchImmediately("removed", { type: "removed", target: this, oldValue: i3 }));
- }, t2.prototype.removeKey = function(t3) {
- if (Re(this._dictionary, t3)) {
- var e3 = this._dictionary[t3];
- delete this._dictionary[t3], this.events.isEnabled("removeKey") && this.events.dispatchImmediately("removeKey", { type: "removeKey", target: this, key: t3, oldValue: e3 }), this.events.isEnabled("removed") && this.events.dispatchImmediately("removed", { type: "removed", target: this, oldValue: e3 });
- }
- }, t2.prototype.insertKeyIfEmpty = function(t3, e3) {
- return this.hasKey(t3) || this.insertKey(t3, e3()), this.getKey(t3);
- }, t2.prototype.clear = function() {
- var t3 = this;
- this.events.isEnabled("removed") && Ne(this._dictionary, function(e3, i3) {
- t3.events.dispatchImmediately("removed", { type: "removed", target: t3, oldValue: i3 });
- }), this._dictionary = {}, this.events.isEnabled("cleared") && this.events.dispatchImmediately("cleared", { type: "cleared", target: this });
- }, t2.prototype.copyFrom = function(t3) {
- var e3 = this;
- ti(t3.iterator(), function(t4) {
- e3.setKey(t4[0], t4[1]);
- });
- }, t2.prototype.iterator = function() {
- return Le(this._dictionary);
- }, t2.prototype[Symbol.iterator] = function() {
- var t3, e3, i3, n3;
- return I(this, function(r3) {
- switch (r3.label) {
- case 0:
- for (e3 in t3 = [], this._dictionary)
- t3.push(e3);
- i3 = 0, r3.label = 1;
- case 1:
- return i3 < t3.length ? (n3 = t3[i3], Re(this._dictionary, n3) ? [4, [n3, this._dictionary[n3]]] : [3, 3]) : [3, 4];
- case 2:
- r3.sent(), r3.label = 3;
- case 3:
- return i3++, [3, 1];
- case 4:
- return [2];
- }
- });
- }, t2.prototype.each = function(t3) {
- ti(this.iterator(), function(e3) {
- var i3 = k(e3, 2), n3 = i3[0], r3 = i3[1];
- return t3(n3, r3);
- });
- }, t2.prototype.sortedIterator = function() {
- return ei(this.iterator(), function(t3, e3) {
- return vi(t3[0], e3[0]);
- });
- }, t2;
- }(), wi = function(t2) {
- function e3(e4) {
- var i3 = t2.call(this) || this;
- return i3.template = e4, i3;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "template", { get: function() {
- return this._template;
- }, set: function(t3) {
- t3.isTemplate = true, this._template = t3;
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(t3) {
- var e4 = this;
- ti(t3.iterator(), function(t4) {
- e4.setKey(t4[0], t4[1].clone());
- });
- }, e3.prototype.create = function(t3) {
- var e4 = this;
- return this.insertKeyIfEmpty(t3, function() {
- return e4.template.clone();
- });
- }, e3;
- }(Pi), Ci = function() {
- function t2() {
- this._storage = new Pi(), this.ttl = 1e3;
- }
- return t2.prototype.set = function(t3, e3, i3, n3) {
- var r3 = this._storage.insertKeyIfEmpty(t3, function() {
- return new Pi();
- }), s2 = { touched: new Date().getTime(), ttl: tt(n3) ? n3 : this.ttl, value: i3 };
- r3.setKey(e3, s2);
- }, t2.prototype.get = function(t3, e3, i3) {
- if (i3 === void 0 && (i3 = void 0), this._storage.hasKey(t3)) {
- var n3 = this._storage.getKey(t3);
- if (n3.hasKey(e3)) {
- var r3 = n3.getKey(e3);
- return r3.ttl && r3.touched + r3.ttl < new Date().getTime() && (r3.expired = true), r3.expired ? (n3.removeKey(e3), i3) : r3.value;
- }
- return i3;
- }
- return i3;
- }, t2.prototype.clear = function(t3) {
- t3 ? this._storage.removeKey(t3) : this._storage.clear();
- }, t2;
- }(), Oi = new Ci(), Si = function() {
- function t2() {
- var t3 = this;
- this.events = new Fe(), this.themes = [], this.loadedThemes = {}, this._uidCount = 0, this.registeredClasses = {}, this._placeholders = {}, this.invalidSprites = {}, this.invalidDatas = {}, this.invalidRawDatas = [], this.invalidDataItems = [], this.invalidDataRange = [], this.invalidPositions = {}, this.invalidLayouts = {}, this.baseSprites = [], this.baseSpritesByUid = {}, this.queue = [], this.deferred = [], this.uid = this.getUniqueId(), this.invalidSprites.noBase = [], this.invalidDatas.noBase = [], this.invalidLayouts.noBase = [], this.invalidPositions.noBase = [], typeof addEventListener != "undefined" && (addEventListener("beforeprint", function() {
- Ut(t3.baseSprites, function(t4) {
- var e3 = t4.paper.svg;
- e3.setAttribute("viewBox", "0 0 " + e3.clientWidth + " " + e3.clientHeight);
- });
- }), addEventListener("afterprint", function() {
- Ut(t3.baseSprites, function(t4) {
- t4.paper.svg.removeAttribute("viewBox");
- });
- }));
- }
- return t2.prototype.getUniqueId = function() {
- var t3 = this._uidCount;
- return this._uidCount += 1, "id-" + t3;
- }, Object.defineProperty(t2.prototype, "map", { get: function() {
- return this._map || (this._map = new Pi()), this._map;
- }, enumerable: true, configurable: true }), t2.prototype.setCache = function(t3, e3, i3) {
- Oi.set(this.uid, t3, e3, i3);
- }, t2.prototype.getCache = function(t3, e3) {
- return e3 === void 0 && (e3 = void 0), Oi.get(this.uid, t3, e3);
- }, t2.prototype.dispatch = function(t3, e3) {
- this.events.isEnabled(t3) && (e3 ? (e3.type = t3, e3.target = e3.target || this, this.events.dispatch(t3, { type: t3, target: this })) : this.events.dispatch(t3, { type: t3, target: this }));
- }, t2.prototype.dispatchImmediately = function(t3, e3) {
- this.events.isEnabled(t3) && (e3 ? (e3.type = t3, e3.target = e3.target || this, this.events.dispatchImmediately(t3, e3)) : this.events.dispatchImmediately(t3, { type: t3, target: this }));
- }, t2.prototype.getPlaceholder = function(t3) {
- return Z(this._placeholders[t3]) || (this._placeholders[t3] = "__amcharts_" + t3 + "_" + xi(8) + "__"), this._placeholders[t3];
- }, t2.prototype.addToInvalidComponents = function(t3) {
- t3.baseId ? ie(this.invalidDatas[t3.baseId], t3) : ie(this.invalidDatas.noBase, t3);
- }, t2.prototype.removeFromInvalidComponents = function(t3) {
- t3.baseId && ee(this.invalidDatas[t3.baseId], t3), ee(this.invalidDatas.noBase, t3);
- }, t2.prototype.addToInvalidSprites = function(t3) {
- t3.baseId ? ne(this.invalidSprites[t3.baseId], t3) : ne(this.invalidSprites.noBase, t3);
- }, t2.prototype.removeFromInvalidSprites = function(t3) {
- t3.baseId && ee(this.invalidSprites[t3.baseId], t3), ee(this.invalidSprites.noBase, t3);
- }, t2.prototype.addToInvalidPositions = function(t3) {
- t3.baseId ? ne(this.invalidPositions[t3.baseId], t3) : ne(this.invalidPositions.noBase, t3);
- }, t2.prototype.removeFromInvalidPositions = function(t3) {
- t3.baseId && ee(this.invalidPositions[t3.baseId], t3), ee(this.invalidPositions.noBase, t3);
- }, t2.prototype.addToInvalidLayouts = function(t3) {
- t3.baseId ? ne(this.invalidLayouts[t3.baseId], t3) : ne(this.invalidLayouts.noBase, t3);
- }, t2.prototype.removeFromInvalidLayouts = function(t3) {
- t3.baseId && ee(this.invalidLayouts[t3.baseId], t3), ee(this.invalidLayouts.noBase, t3);
- }, t2;
- }(), Ii = new Si();
- function Di(t2, e3) {
- var i3 = Ii.registeredClasses[e3];
- return i3 != null && t2 instanceof i3;
- }
- var ki = function() {
- function t2(t3, e3, i3) {
- this._array = t3, this._start = e3, this._end = i3;
- }
- return t2.prototype.iterator = function() {
- var t3 = this;
- return function(e3) {
- if (t3._start !== t3._end)
- if (t3._start < t3._end)
- for (var i3 = t3._start; i3 < t3._end && e3(t3._array[i3]); ++i3)
- ;
- else
- for (i3 = t3._start - 1; i3 >= t3._end && e3(t3._array[i3]); --i3)
- ;
- };
- }, t2.prototype.backwards = function() {
- return new t2(this._array, this._end, this._start);
- }, t2.prototype.range = function(e3, i3) {
- if (e3 <= i3) {
- if (this._start === this._end)
- return this;
- if (this._start < this._end) {
- var n3 = i3 - e3;
- return e3 = Math.max(this._start + e3, this._start), i3 = Math.min(e3 + n3, this._end), new t2(this._array, e3, i3);
- }
- return n3 = i3 - e3, e3 = Math.max(this._start - e3, this._end), i3 = Math.max(e3 - n3, this._end), new t2(this._array, e3, i3);
- }
- throw new Error("Start index must be lower than end index");
- }, t2;
- }(), Ti = function(t2) {
- function e3(e4, i3, n3) {
- var r3 = t2.call(this, [e4.events.on("inserted", function(t3) {
- var i4 = t3.newValue, n4 = r3._getKey(i4), s2 = 0;
- Qe(e4.iterator(), function(t4) {
- return t4 !== i4 && (r3._getKey(t4) === n4 && ++s2, true);
- }), r3._insert(i4, n4, s2);
- }, void 0, false), e4.events.on("removed", function(t3) {
- r3._remove(t3.oldValue);
- }, void 0, false)]) || this;
- return r3._keys = [], r3._groups = {}, r3._getKey = i3, r3._sort = n3, ti(e4.iterator(), function(t3) {
- r3._insert(t3, i3(t3));
- }), r3;
- }
- return C(e3, t2), e3.prototype._insert = function(t3, e4, i3) {
- if (this._groups[e4] == null) {
- this._groups[e4] = [];
- var n3 = ue(this._keys, this._sort, e4), r3 = n3.found, s2 = n3.index;
- if (r3)
- throw new Error("Key already exists: " + e4);
- he(this._keys, s2, e4);
- }
- i3 == null ? this._groups[e4].push(t3) : he(this._groups[e4], i3, t3);
- }, e3.prototype._remove = function(t3) {
- var e4 = this._getKey(t3), i3 = this._groups[e4];
- if (i3 != null && (ee(i3, t3), i3.length === 0)) {
- delete this._groups[e4];
- var n3 = ue(this._keys, this._sort, e4), r3 = n3.found, s2 = n3.index;
- if (!r3)
- throw new Error("Key doesn't exist: " + e4);
- pe(this._keys, s2);
- }
- }, e3.prototype.iterator = function() {
- var t3 = this;
- return si(ii(qe(this._keys), function(e4) {
- return qe(t3._groups[e4]);
- }));
- }, e3;
- }(me), Ai = function(t2) {
- function e3(e4, i3) {
- i3 === void 0 && (i3 = true);
- var n3 = this;
- if (i3) {
- var r3 = e4.events.on("removed", function(t3) {
- t3.oldValue.dispose();
- }, void 0, false);
- n3 = t2.call(this, function() {
- r3.dispose(), ti(e4.iterator(), function(t3) {
- t3.dispose();
- });
- }) || this;
- } else
- n3 = t2.call(this, function() {
- ti(e4.iterator(), function(t3) {
- t3.dispose();
- });
- }) || this;
- return n3;
- }
- return C(e3, t2), e3;
- }(ye);
- function Vi(t2, e3) {
- if (!(t2 >= 0 && t2 < e3))
- throw new Error("Index out of bounds: " + t2);
- }
- var Fi = function() {
- function t2(t3) {
- t3 === void 0 && (t3 = []), this.events = new Fe(), this._values = t3;
- }
- return Object.defineProperty(t2.prototype, "values", { get: function() {
- return this._values;
- }, enumerable: true, configurable: true }), t2.prototype.contains = function(t3) {
- return this._values.indexOf(t3) !== -1;
- }, t2.prototype.removeValue = function(t3) {
- for (var e3 = 0, i3 = this._values.length; e3 < i3; )
- this._values[e3] === t3 ? (this.removeIndex(e3), --i3) : ++e3;
- }, t2.prototype.indexOf = function(t3) {
- return Xt(this._values, t3);
- }, Object.defineProperty(t2.prototype, "length", { get: function() {
- return this._values.length;
- }, enumerable: true, configurable: true }), t2.prototype.hasIndex = function(t3) {
- return t3 >= 0 && t3 < this._values.length;
- }, t2.prototype.getIndex = function(t3) {
- return this._values[t3];
- }, t2.prototype.setIndex = function(t3, e3) {
- Vi(t3, this._values.length);
- var i3 = this._values[t3];
- return i3 !== e3 && (this._values[t3] = e3, this.events.isEnabled("setIndex") && this.events.dispatchImmediately("setIndex", { type: "setIndex", target: this, index: t3, oldValue: i3, newValue: e3 }), this.events.isEnabled("removed") && this.events.dispatchImmediately("removed", { type: "removed", target: this, oldValue: i3 }), this.events.isEnabled("inserted") && this.events.dispatchImmediately("inserted", { type: "inserted", target: this, newValue: e3 })), i3;
- }, t2.prototype.insertIndex = function(t3, e3) {
- Vi(t3, this._values.length + 1), he(this._values, t3, e3), this.events.isEnabled("insertIndex") && this.events.dispatchImmediately("insertIndex", { type: "insertIndex", target: this, index: t3, newValue: e3 }), this.events.isEnabled("inserted") && this.events.dispatchImmediately("inserted", { type: "inserted", target: this, newValue: e3 });
- }, t2.prototype._sortQuicksort = function(t3, e3, i3) {
- if (t3 < e3) {
- var n3 = this._sortPartition(t3, e3, i3);
- this._sortQuicksort(t3, n3, i3), this._sortQuicksort(n3 + 1, e3, i3);
- }
- }, t2.prototype._sortPartition = function(t3, e3, i3) {
- for (var n3 = this._values, r3 = n3[t3], s2 = t3 - 1, a2 = e3 + 1; ; ) {
- do {
- ++s2;
- } while (i3(n3[s2], r3) < 0);
- do {
- --a2;
- } while (i3(n3[a2], r3) > 0);
- if (s2 >= a2)
- return a2;
- this.swap(s2, a2);
- }
- }, t2.prototype.sort = function(t3) {
- this._sortQuicksort(0, this._values.length - 1, t3);
- }, t2.prototype.swap = function(t3, e3) {
- var i3 = this._values.length;
- if (Vi(t3, i3), Vi(e3, i3), t3 !== e3) {
- var n3 = this._values[t3], r3 = this._values[e3];
- this._values[t3] = r3, this.events.isEnabled("setIndex") && this.events.dispatchImmediately("setIndex", { type: "setIndex", target: this, index: t3, oldValue: n3, newValue: r3 }), this._values[e3] = n3, this.events.isEnabled("setIndex") && this.events.dispatchImmediately("setIndex", { type: "setIndex", target: this, index: e3, oldValue: r3, newValue: n3 });
- }
- }, t2.prototype.removeIndex = function(t3) {
- Vi(t3, this._values.length);
- var e3 = this._values[t3];
- return pe(this._values, t3), this.events.isEnabled("removeIndex") && this.events.dispatchImmediately("removeIndex", { type: "removeIndex", target: this, index: t3, oldValue: e3 }), this.events.isEnabled("removed") && this.events.dispatchImmediately("removed", { type: "removed", target: this, oldValue: e3 }), e3;
- }, t2.prototype.moveValue = function(t3, e3) {
- var i3 = this.indexOf(t3);
- if (i3 !== -1) {
- var n3 = this._values[i3];
- pe(this._values, i3), this.events.isEnabled("removeIndex") && this.events.dispatchImmediately("removeIndex", { type: "removeIndex", target: this, index: i3, oldValue: n3 });
- }
- e3 == null ? (e3 = this._values.length, this._values.push(t3)) : he(this._values, e3, t3), this.events.isEnabled("insertIndex") && this.events.dispatchImmediately("insertIndex", { type: "insertIndex", target: this, index: e3, newValue: t3 }), i3 === -1 && this.events.isEnabled("inserted") && this.events.dispatchImmediately("inserted", { type: "inserted", target: this, newValue: t3 });
- }, t2.prototype.push = function(t3) {
- var e3 = this._values.push(t3) - 1;
- return this.events.isEnabled("insertIndex") && this.events.dispatchImmediately("insertIndex", { type: "insertIndex", target: this, index: e3, newValue: t3 }), this.events.isEnabled("inserted") && this.events.dispatchImmediately("inserted", { type: "inserted", target: this, newValue: t3 }), t3;
- }, t2.prototype.unshift = function(t3) {
- this.insertIndex(0, t3);
- }, t2.prototype.pushAll = function(t3) {
- var e3 = this;
- Ut(t3, function(t4) {
- e3.push(t4);
- });
- }, t2.prototype.copyFrom = function(t3) {
- this.pushAll(t3._values);
- }, t2.prototype.pop = function() {
- return this._values.length - 1 < 0 ? void 0 : this.removeIndex(this._values.length - 1);
- }, t2.prototype.shift = function() {
- return this._values.length ? this.removeIndex(0) : void 0;
- }, t2.prototype.setAll = function(t3) {
- var e3 = this, i3 = oe(this._values);
- this._values.length = 0, Ut(t3, function(t4) {
- e3._values.push(t4);
- }), this.events.isEnabled("setAll") && this.events.dispatchImmediately("setAll", { type: "setAll", target: this, oldArray: i3, newArray: this._values }), this.events.isEnabled("removed") && Ut(i3, function(t4) {
- e3.events.dispatchImmediately("removed", { type: "removed", target: e3, oldValue: t4 });
- }), this.events.isEnabled("inserted") && Ut(this._values, function(t4) {
- e3.events.dispatchImmediately("inserted", { type: "inserted", target: e3, newValue: t4 });
- });
- }, t2.prototype.clear = function() {
- this.setAll([]);
- }, t2.prototype.iterator = function() {
- return qe(this._values);
- }, t2.prototype[Symbol.iterator] = function() {
- var t3, e3;
- return I(this, function(i3) {
- switch (i3.label) {
- case 0:
- t3 = this._values.length, e3 = 0, i3.label = 1;
- case 1:
- return e3 < t3 ? [4, this._values[e3]] : [3, 4];
- case 2:
- i3.sent(), i3.label = 3;
- case 3:
- return ++e3, [3, 1];
- case 4:
- return [2];
- }
- });
- }, t2.prototype.each = function(t3) {
- Ut(this._values, t3);
- }, t2.prototype.range = function(t3, e3) {
- if (t3 <= e3) {
- var i3 = e3 - t3;
- return t3 = Math.max(t3, 0), e3 = Math.min(t3 + i3, this._values.length), new ki(this._values, t3, e3);
- }
- throw new Error("Start index must be lower than end index");
- }, t2.prototype.backwards = function() {
- return new ki(this._values, this._values.length, 0);
- }, t2;
- }(), Mi = function(t2) {
- function e3(e4) {
- var i3 = t2.call(this) || this;
- return i3.template = e4, i3;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "template", { get: function() {
- return this._template;
- }, set: function(t3) {
- t3.isTemplate = true, this._template = t3;
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(t3) {
- var e4 = this;
- ti(t3.iterator(), function(t4) {
- e4.push(t4.clone());
- });
- }, e3.prototype.create = function(t3) {
- var e4 = t3 != null ? new t3() : this.template.clone();
- return this.push(e4), e4;
- }, e3.prototype.clone = function() {
- for (var t3 = new e3(this.template), i3 = this.values, n3 = i3.length, r3 = 0; r3 < n3; ++r3)
- t3.push(i3[r3].clone());
- return t3;
- }, e3;
- }(Fi), Li = function() {
- function t2(t3) {
- this._values = [], this.events = new Fe(), t3 != null && this.setAll(t3);
- }
- return Object.defineProperty(t2.prototype, "values", { get: function() {
- return this._values;
- }, enumerable: true, configurable: true }), t2.prototype._insert = function(t3) {
- return this._values.push(t3), this._values.length - 1;
- }, Object.defineProperty(t2.prototype, "length", { get: function() {
- return this._values.length;
- }, enumerable: true, configurable: true }), t2.prototype.indexOf = function(t3) {
- return Xt(this._values, t3);
- }, t2.prototype.contains = function(t3) {
- return this.indexOf(t3) !== -1;
- }, t2.prototype.getIndex = function(t3) {
- return this._values[t3];
- }, Object.defineProperty(t2.prototype, "first", { get: function() {
- return this._values[0];
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "last", { get: function() {
- return this._values[this._values.length - 1];
- }, enumerable: true, configurable: true }), t2.prototype.insert = function(t3) {
- var e3 = this._insert(t3);
- this.events.isEnabled("inserted") && this.events.dispatchImmediately("inserted", { type: "inserted", target: this, index: e3, newValue: t3 });
- }, t2.prototype.remove = function(t3) {
- var e3 = this.indexOf(t3);
- if (e3 !== -1) {
- var i3 = this._values[e3];
- pe(this._values, e3), this.events.isEnabled("removed") && this.events.dispatchImmediately("removed", { type: "removed", target: this, index: e3, oldValue: i3 });
- }
- }, t2.prototype.setAll = function(t3) {
- var e3 = this;
- Gt(this._values, function(t4, i3) {
- e3._values.pop(), e3.events.isEnabled("removed") && e3.events.dispatchImmediately("removed", { type: "removed", target: e3, index: i3, oldValue: t4 });
- }), Ut(t3, function(t4) {
- e3.insert(t4);
- });
- }, t2.prototype.clear = function() {
- this.setAll([]);
- }, t2.prototype.slice = function(e3, i3) {
- var n3 = new t2();
- return n3._values = this._values.slice(e3, i3), n3;
- }, t2.prototype.findClosestIndex = function(t3, e3, i3) {
- i3 === void 0 && (i3 = "any");
- var n3, r3, s2 = -1, a2 = 0;
- return Qe(this.iterator(), function(o3) {
- var l2 = e3(o3);
- if (i3 === "any") {
- if (l2 === t3)
- return s2 = a2, false;
- var h2 = Math.abs(t3 - l2);
- (!Z(r3) || r3 > h2) && (s2 = a2, n3 = l2, r3 = h2);
- } else
- i3 === "left" && l2 < t3 ? (!Z(n3) || n3 < l2) && (s2 = a2, n3 = l2) : i3 === "right" && l2 >= t3 && (!Z(n3) || n3 >= l2) && (s2 = a2, n3 = l2);
- return ++a2, true;
- }), s2 === -1 && (i3 === "left" ? s2 = 0 : i3 === "right" && (s2 = this.length - 1)), s2;
- }, t2.prototype.iterator = function() {
- return qe(this._values);
- }, t2.prototype[Symbol.iterator] = function() {
- var t3, e3;
- return I(this, function(i3) {
- switch (i3.label) {
- case 0:
- t3 = this._values.length, e3 = 0, i3.label = 1;
- case 1:
- return e3 < t3 ? [4, this._values[e3]] : [3, 4];
- case 2:
- i3.sent(), i3.label = 3;
- case 3:
- return ++e3, [3, 1];
- case 4:
- return [2];
- }
- });
- }, t2.prototype.each = function(t3) {
- Ut(this._values, t3);
- }, t2;
- }(), ji = function(t2) {
- function e3(e4) {
- var i3 = t2.call(this) || this;
- return i3._ordering = e4, i3;
- }
- return C(e3, t2), e3.prototype._insert = function(t3) {
- var e4 = ue(this._values, this._ordering, t3).index;
- return he(this._values, e4, t3), e4;
- }, e3.prototype.indexOf = function(t3) {
- var e4 = ue(this._values, this._ordering, t3), i3 = e4.found, n3 = e4.index;
- return i3 ? n3 : -1;
- }, e3.prototype.update = function(t3) {
- var e4 = Xt(this._values, t3);
- if (e4 !== -1) {
- var i3 = this._values.length - 1;
- (e4 === 0 || this._ordering(this._values[e4 - 1], t3) < 0) && (e4 === i3 || this._ordering(t3, this._values[e4 + 1]) < 0) || (pe(this._values, e4), this._insert(t3));
- }
- }, e3;
- }(Li), Ei = function(t2) {
- function e3(e4) {
- var i3 = t2.call(this) || this;
- return i3.template = e4, i3;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "template", { get: function() {
- return this._template;
- }, set: function(t3) {
- t3.isTemplate = true, this._template = t3;
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(t3) {
- var e4 = this;
- ti(t3.iterator(), function(t4) {
- e4.insert(t4.clone());
- });
- }, e3.prototype.slice = function(t3, i3) {
- var n3 = new e3(this.template);
- return n3._values = this._values.slice(t3, i3), n3;
- }, e3.prototype.create = function(t3) {
- var e4 = t3 != null ? new t3() : this.template.clone();
- return this.insert(e4), e4;
- }, e3;
- }(Li), Ri = function(t2) {
- function e3(e4, i3) {
- var n3 = t2.call(this, i3) || this;
- return n3.template = e4, n3;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "template", { get: function() {
- return this._template;
- }, set: function(t3) {
- t3.isTemplate = true, this._template = t3;
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(t3) {
- var e4 = this;
- ti(t3.iterator(), function(t4) {
- e4.insert(t4.clone());
- });
- }, e3.prototype.create = function(t3) {
- var e4 = t3 != null ? new t3() : this.template.clone();
- return this.insert(e4), e4;
- }, e3;
- }(ji);
- function Bi(t2, e3) {
- return t2 === e3 ? 0 : t2 < e3 ? -1 : 1;
- }
- function Hi(t2) {
- switch (t2) {
- case 0:
- return 0;
- case -1:
- return 1;
- case 1:
- return -1;
- }
- }
- function Ni(t2, e3) {
- return t2 === 0 ? e3 : t2;
- }
- var Wi = function() {
- function t2() {
- this._callbackId = 0, this._callbacks = new ji(function(t3, e3) {
- return Ni(Bi(t3.priority, e3.priority), Bi(t3.id, e3.id));
- });
- }
- return t2.prototype.addAll = function(t3, e3, i3, n3, r3) {
- n3 === void 0 && (n3 = 0), this._callbacks.insert({ id: ++this._callbackId, key: e3, callback: i3, priority: n3, scope: r3, type: t3 });
- }, t2.prototype.isEnabled = function(t3, e3) {
- return Yt(this._callbacks.values, function(i3) {
- return i3.key === e3 && t3 instanceof i3.type;
- });
- }, t2.prototype.applyAll = function(t3, e3, i3) {
- var n3 = this._callbacks.values, r3 = n3.length;
- if (r3 == 0)
- return i3;
- for (var s2 = 0; s2 < r3; ++s2) {
- var a2 = n3[s2];
- a2.key === e3 && t3 instanceof a2.type && (i3 = a2.callback.call(a2.scope, i3, t3, e3));
- }
- return i3;
- }, t2;
- }(), Xi = new Wi(), Yi = function() {
- function t2(t3) {
- this._callbackId = 0, this._callbacks = new ji(function(t4, e3) {
- return Ni(Bi(t4.priority, e3.priority), Bi(t4.id, e3.id));
- }), this._disabled = {}, this.object = t3, this.events = this._callbacks.events;
- }
- return t2.prototype.add = function(t3, e3, i3, n3) {
- i3 === void 0 && (i3 = 0), this._callbacks.insert({ id: ++this._callbackId, key: t3, callback: e3, priority: i3, scope: n3 });
- }, t2.prototype.has = function(t3, e3, i3, n3) {
- return i3 === void 0 && (i3 = 0), pi(this._callbacks.iterator(), function(r3) {
- return r3.key === t3 && r3.callback === e3 && r3.priority === i3 && r3.scope === n3;
- });
- }, t2.prototype.remove = function(t3, e3) {
- var i3 = this;
- Ut(Je(this._callbacks.iterator()), function(n3) {
- n3.key !== t3 || tt(e3) && e3 !== n3.priority || i3._callbacks.remove(n3);
- });
- }, t2.prototype.enableKey = function(t3) {
- delete this._disabled[t3];
- }, t2.prototype.disableKey = function(t3, e3) {
- e3 === void 0 && (e3 = 1 / 0), this._disabled[t3] = e3;
- }, t2.prototype._hasListenersByType = function(t3) {
- return Yt(this._callbacks.values, function(e3) {
- return e3.key === t3;
- });
- }, t2.prototype.isEnabled = function(t3) {
- return this._disabled[t3] == null && (this._hasListenersByType(t3) || Xi.isEnabled(this.object, t3));
- }, t2.prototype._shouldDispatch = function(t3) {
- var e3 = this._disabled[t3];
- return !tt(e3) || (e3 <= 1 ? delete this._disabled[t3] : --this._disabled[t3], false);
- }, t2.prototype.apply = function(t3, e3) {
- if (this._shouldDispatch(t3)) {
- var i3 = this._callbacks.values, n3 = i3.length;
- if (n3 > 0)
- for (var r3 = 0; r3 < n3; ++r3) {
- var s2 = i3[r3];
- s2.key === t3 && (e3 = s2.callback.call(s2.scope, e3, this.object, t3));
- }
- return Xi.applyAll(this.object, t3, e3);
- }
- return e3;
- }, t2.prototype.keys = function() {
- return Je(ii(this._callbacks.iterator(), function(t3) {
- return t3.key;
- }));
- }, t2.prototype.copyFrom = function(t3) {
- var e3 = this;
- ti(t3._callbacks.iterator(), function(t4) {
- e3.add(t4.key, t4.callback, t4.priority, t4.scope);
- }), Ne(t3._disabled, function(t4, i3) {
- e3._disabled[t4] = i3;
- });
- }, t2.prototype.clear = function() {
- this._callbacks.clear();
- }, t2;
- }(), zi = { aliceblue: { r: 240, g: 248, b: 255 }, antiquewhite: { r: 250, g: 235, b: 215 }, aqua: { r: 0, g: 255, b: 255 }, aquamarine: { r: 127, g: 255, b: 212 }, azure: { r: 240, g: 255, b: 255 }, beige: { r: 245, g: 245, b: 220 }, bisque: { r: 255, g: 228, b: 196 }, black: { r: 0, g: 0, b: 0 }, blanchedalmond: { r: 255, g: 235, b: 205 }, blue: { r: 0, g: 0, b: 255 }, blueviolet: { r: 138, g: 43, b: 226 }, brown: { r: 165, g: 42, b: 42 }, burlywood: { r: 222, g: 184, b: 135 }, cadetblue: { r: 95, g: 158, b: 160 }, chartreuse: { r: 127, g: 255, b: 0 }, chocolate: { r: 210, g: 105, b: 30 }, coral: { r: 255, g: 127, b: 80 }, cornflowerblue: { r: 100, g: 149, b: 237 }, cornsilk: { r: 255, g: 248, b: 220 }, crimson: { r: 220, g: 20, b: 60 }, cyan: { r: 0, g: 255, b: 255 }, darkblue: { r: 0, g: 0, b: 139 }, darkcyan: { r: 0, g: 139, b: 139 }, darkgoldenrod: { r: 184, g: 134, b: 11 }, darkgray: { r: 169, g: 169, b: 169 }, darkgrey: { r: 169, g: 169, b: 169 }, darkgreen: { r: 0, g: 100, b: 0 }, darkkhaki: { r: 189, g: 183, b: 107 }, darkmagenta: { r: 139, g: 0, b: 139 }, darkolivegreen: { r: 85, g: 107, b: 47 }, darkorange: { r: 255, g: 140, b: 0 }, darkorchid: { r: 153, g: 50, b: 204 }, darkred: { r: 139, g: 0, b: 0 }, darksalmon: { r: 233, g: 150, b: 122 }, darkseagreen: { r: 143, g: 188, b: 143 }, darkslateblue: { r: 72, g: 61, b: 139 }, darkslategray: { r: 47, g: 79, b: 79 }, darkslategrey: { r: 47, g: 79, b: 79 }, darkturquoise: { r: 0, g: 206, b: 209 }, darkviolet: { r: 148, g: 0, b: 211 }, deeppink: { r: 255, g: 20, b: 147 }, deepskyblue: { r: 0, g: 191, b: 255 }, dimgray: { r: 105, g: 105, b: 105 }, dimgrey: { r: 105, g: 105, b: 105 }, dodgerblue: { r: 30, g: 144, b: 255 }, firebrick: { r: 178, g: 34, b: 34 }, floralwhite: { r: 255, g: 250, b: 240 }, forestgreen: { r: 34, g: 139, b: 34 }, fuchsia: { r: 255, g: 0, b: 255 }, gainsboro: { r: 220, g: 220, b: 220 }, ghostwhite: { r: 248, g: 248, b: 255 }, gold: { r: 255, g: 215, b: 0 }, goldenrod: { r: 218, g: 165, b: 32 }, gray: { r: 128, g: 128, b: 128 }, grey: { r: 128, g: 128, b: 128 }, green: { r: 0, g: 128, b: 0 }, greenyellow: { r: 173, g: 255, b: 47 }, honeydew: { r: 240, g: 255, b: 240 }, hotpink: { r: 255, g: 105, b: 180 }, indianred: { r: 205, g: 92, b: 92 }, indigo: { r: 75, g: 0, b: 130 }, ivory: { r: 255, g: 255, b: 240 }, khaki: { r: 240, g: 230, b: 140 }, lavender: { r: 230, g: 230, b: 250 }, lavenderblush: { r: 255, g: 240, b: 245 }, lawngreen: { r: 124, g: 252, b: 0 }, lemonchiffon: { r: 255, g: 250, b: 205 }, lightblue: { r: 173, g: 216, b: 230 }, lightcoral: { r: 240, g: 128, b: 128 }, lightcyan: { r: 224, g: 255, b: 255 }, lightgoldenrodyellow: { r: 250, g: 250, b: 210 }, lightgray: { r: 211, g: 211, b: 211 }, lightgrey: { r: 211, g: 211, b: 211 }, lightgreen: { r: 144, g: 238, b: 144 }, lightpink: { r: 255, g: 182, b: 193 }, lightsalmon: { r: 255, g: 160, b: 122 }, lightseagreen: { r: 32, g: 178, b: 170 }, lightskyblue: { r: 135, g: 206, b: 250 }, lightslategray: { r: 119, g: 136, b: 153 }, lightslategrey: { r: 119, g: 136, b: 153 }, lightsteelblue: { r: 176, g: 196, b: 222 }, lightyellow: { r: 255, g: 255, b: 224 }, lime: { r: 0, g: 255, b: 0 }, limegreen: { r: 50, g: 205, b: 50 }, linen: { r: 250, g: 240, b: 230 }, magenta: { r: 255, g: 0, b: 255 }, maroon: { r: 128, g: 0, b: 0 }, mediumaquamarine: { r: 102, g: 205, b: 170 }, mediumblue: { r: 0, g: 0, b: 205 }, mediumorchid: { r: 186, g: 85, b: 211 }, mediumpurple: { r: 147, g: 112, b: 219 }, mediumseagreen: { r: 60, g: 179, b: 113 }, mediumslateblue: { r: 123, g: 104, b: 238 }, mediumspringgreen: { r: 0, g: 250, b: 154 }, mediumturquoise: { r: 72, g: 209, b: 204 }, mediumvioletred: { r: 199, g: 21, b: 133 }, midnightblue: { r: 25, g: 25, b: 112 }, mintcream: { r: 245, g: 255, b: 250 }, mistyrose: { r: 255, g: 228, b: 225 }, moccasin: { r: 255, g: 228, b: 181 }, navajowhite: { r: 255, g: 222, b: 173 }, navy: { r: 0, g: 0, b: 128 }, oldlace: { r: 253, g: 245, b: 230 }, olive: { r: 128, g: 128, b: 0 }, olivedrab: { r: 107, g: 142, b: 35 }, orange: { r: 255, g: 165, b: 0 }, orangered: { r: 255, g: 69, b: 0 }, orchid: { r: 218, g: 112, b: 214 }, palegoldenrod: { r: 238, g: 232, b: 170 }, palegreen: { r: 152, g: 251, b: 152 }, paleturquoise: { r: 175, g: 238, b: 238 }, palevioletred: { r: 219, g: 112, b: 147 }, papayawhip: { r: 255, g: 239, b: 213 }, peachpuff: { r: 255, g: 218, b: 185 }, peru: { r: 205, g: 133, b: 63 }, pink: { r: 255, g: 192, b: 203 }, plum: { r: 221, g: 160, b: 221 }, powderblue: { r: 176, g: 224, b: 230 }, purple: { r: 128, g: 0, b: 128 }, rebeccapurple: { r: 102, g: 51, b: 153 }, red: { r: 255, g: 0, b: 0 }, rosybrown: { r: 188, g: 143, b: 143 }, royalblue: { r: 65, g: 105, b: 225 }, saddlebrown: { r: 139, g: 69, b: 19 }, salmon: { r: 250, g: 128, b: 114 }, sandybrown: { r: 244, g: 164, b: 96 }, seagreen: { r: 46, g: 139, b: 87 }, seashell: { r: 255, g: 245, b: 238 }, sienna: { r: 160, g: 82, b: 45 }, silver: { r: 192, g: 192, b: 192 }, skyblue: { r: 135, g: 206, b: 235 }, slateblue: { r: 106, g: 90, b: 205 }, slategray: { r: 112, g: 128, b: 144 }, slategrey: { r: 112, g: 128, b: 144 }, snow: { r: 255, g: 250, b: 250 }, springgreen: { r: 0, g: 255, b: 127 }, steelblue: { r: 70, g: 130, b: 180 }, tan: { r: 210, g: 180, b: 140 }, teal: { r: 0, g: 128, b: 128 }, thistle: { r: 216, g: 191, b: 216 }, tomato: { r: 255, g: 99, b: 71 }, turquoise: { r: 64, g: 224, b: 208 }, violet: { r: 238, g: 130, b: 238 }, wheat: { r: 245, g: 222, b: 179 }, white: { r: 255, g: 255, b: 255 }, whitesmoke: { r: 245, g: 245, b: 245 }, yellow: { r: 255, g: 255, b: 0 }, yellowgreen: { r: 154, g: 205, b: 50 } };
- function Ui(t2, e3) {
- var i3;
- return zi[t2] ? i3 = zi[t2] : t2.charAt(0) === "#" ? i3 = Gi(t2) : t2.match(/^rgba?\(/) && (i3 = Zi(t2)), i3 || (i3 = { r: 0, g: 0, b: 0, a: 1 }), Z(e3) && (i3.a = e3), i3;
- }
- function Gi(t2) {
- t2 = t2.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function(t3, e4, i3, n3) {
- return e4 + e4 + i3 + i3 + n3 + n3;
- });
- var e3 = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t2);
- return e3 ? { r: parseInt(e3[1], 16), g: parseInt(e3[2], 16), b: parseInt(e3[3], 16) } : Ki(t2);
- }
- function Ki(t2) {
- t2 = t2.replace(/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])$/i, function(t3, e4, i3, n3, r3) {
- return e4 + e4 + i3 + i3 + n3 + n3 + r3 + r3;
- });
- var e3 = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t2);
- return e3 ? { r: parseInt(e3[1], 16), g: parseInt(e3[2], 16), b: parseInt(e3[3], 16), a: parseInt(e3[4], 16) / 256 } : void 0;
- }
- function Zi(t2) {
- var e3 = (t2 = t2.replace(/[ ]/g, "")).match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);
- if (e3)
- e3.push("1");
- else if (!(e3 = t2.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i)))
- return;
- return { r: parseInt(e3[1]), g: parseInt(e3[2]), b: parseInt(e3[3]), a: parseFloat(e3[4]) };
- }
- function qi(t2) {
- return "#" + Ji(t2.r.toString(16)) + Ji(t2.g.toString(16)) + Ji(t2.b.toString(16));
- }
- function $i(t2) {
- return Z(t2.a) && t2.a !== 1 ? "rgba(" + t2.r + "," + t2.g + "," + t2.b + "," + t2.a + ")" : "rgb(" + t2.r + "," + t2.g + "," + t2.b + ")";
- }
- function Ji(t2) {
- return t2.length == 1 ? "0" + t2 : "" + t2;
- }
- function Qi(t2, e3, i3) {
- return i3 = ut(i3, 0, 1), t2 ? e3 ? { r: t2.r + Math.round((e3.r - t2.r) * i3), g: t2.g + Math.round((e3.g - t2.g) * i3), b: t2.b + Math.round((e3.b - t2.b) * i3), a: (t2.a || 1) + Math.round(((e3.a || 1) - (t2.a || 1)) * i3) } : t2 : e3 || t2;
- }
- function tn(t2, e3) {
- return t2 ? { r: Math.max(0, Math.min(255, t2.r + en(t2.r, e3))), g: Math.max(0, Math.min(255, t2.g + en(t2.g, e3))), b: Math.max(0, Math.min(255, t2.b + en(t2.b, e3))), a: t2.a } : t2;
- }
- function en(t2, e3) {
- var i3 = e3 > 0 ? 255 - t2 : t2;
- return Math.round(i3 * e3);
- }
- function nn(t2, e3) {
- if (t2) {
- var i3 = en(Math.min(Math.max(t2.r, t2.g, t2.b), 230), e3);
- return { r: Math.max(0, Math.min(255, Math.round(t2.r + i3))), g: Math.max(0, Math.min(255, Math.round(t2.g + i3))), b: Math.max(0, Math.min(255, Math.round(t2.b + i3))), a: t2.a };
- }
- return t2;
- }
- function rn(t2, e3) {
- return Math.round(255 * e3);
- }
- function sn(t2, e3) {
- if (t2 == null || e3 == 1)
- return t2;
- var i3 = on(t2);
- return i3.s = e3, an(i3);
- }
- function an(t2) {
- var e3, i3, n3, r3 = t2.h, s2 = t2.s, a2 = t2.l;
- if (s2 == 0)
- e3 = i3 = n3 = a2;
- else {
- var o3 = function(t3, e4, i4) {
- return i4 < 0 && (i4 += 1), i4 > 1 && (i4 -= 1), i4 < 1 / 6 ? t3 + 6 * (e4 - t3) * i4 : i4 < 0.5 ? e4 : i4 < 2 / 3 ? t3 + (e4 - t3) * (2 / 3 - i4) * 6 : t3;
- }, l2 = a2 < 0.5 ? a2 * (1 + s2) : a2 + s2 - a2 * s2, h2 = 2 * a2 - l2;
- e3 = o3(h2, l2, r3 + 1 / 3), i3 = o3(h2, l2, r3), n3 = o3(h2, l2, r3 - 1 / 3);
- }
- return { r: Math.round(255 * e3), g: Math.round(255 * i3), b: Math.round(255 * n3) };
- }
- function on(t2) {
- var e3 = t2.r / 255, i3 = t2.g / 255, n3 = t2.b / 255, r3 = Math.max(e3, i3, n3), s2 = Math.min(e3, i3, n3), a2 = 0, o3 = 0, l2 = (r3 + s2) / 2;
- if (r3 === s2)
- a2 = o3 = 0;
- else {
- var h2 = r3 - s2;
- switch (o3 = l2 > 0.5 ? h2 / (2 - r3 - s2) : h2 / (r3 + s2), r3) {
- case e3:
- a2 = (i3 - n3) / h2 + (i3 < n3 ? 6 : 0);
- break;
- case i3:
- a2 = (n3 - e3) / h2 + 2;
- break;
- case n3:
- a2 = (e3 - i3) / h2 + 4;
- }
- a2 /= 6;
- }
- return { h: a2, s: o3, l: l2 };
- }
- function ln(t2) {
- var e3, i3 = t2.r / 255, n3 = t2.g / 255, r3 = t2.b / 255, s2 = Math.max(i3, n3, r3), a2 = Math.min(i3, n3, r3), o3 = 0, l2 = s2, h2 = s2 - a2;
- if (e3 = s2 == 0 ? 0 : h2 / s2, s2 == a2)
- o3 = 0;
- else {
- switch (s2) {
- case i3:
- o3 = (n3 - r3) / h2 + (n3 < r3 ? 6 : 0);
- break;
- case n3:
- o3 = (r3 - i3) / h2 + 2;
- break;
- case r3:
- o3 = (i3 - n3) / h2 + 4;
- }
- o3 /= 6;
- }
- return { h: o3, s: e3, v: l2 };
- }
- function hn(t2) {
- var e3 = 0, i3 = 0, n3 = 0, r3 = t2.h, s2 = t2.s, a2 = t2.v, o3 = Math.floor(6 * r3), l2 = 6 * r3 - o3, h2 = a2 * (1 - s2), p2 = a2 * (1 - l2 * s2), u2 = a2 * (1 - (1 - l2) * s2);
- switch (o3 % 6) {
- case 0:
- e3 = a2, i3 = u2, n3 = h2;
- break;
- case 1:
- e3 = p2, i3 = a2, n3 = h2;
- break;
- case 2:
- e3 = h2, i3 = a2, n3 = u2;
- break;
- case 3:
- e3 = h2, i3 = p2, n3 = a2;
- break;
- case 4:
- e3 = u2, i3 = h2, n3 = a2;
- break;
- case 5:
- e3 = a2, i3 = h2, n3 = p2;
- }
- return { r: Math.round(255 * e3), g: Math.round(255 * i3), b: Math.round(255 * n3) };
- }
- function pn(t2) {
- return (299 * t2.r + 587 * t2.g + 114 * t2.b) / 1e3 >= 128;
- }
- var un = function() {
- function t2(t3) {
- this._value = t3;
- }
- return Object.defineProperty(t2.prototype, "rgb", { get: function() {
- return this._value;
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "hex", { get: function() {
- return this._value ? qi(this._value) : "none";
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "rgba", { get: function() {
- return this._value ? $i(this._value) : "none";
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "alpha", { get: function() {
- return this._value != null && this._value.a != null ? this._value.a : 1;
- }, set: function(t3) {
- this._value && (this._value.a = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "lightColor", { get: function() {
- return this._lightColor || (this._lightColor = new t2({ r: 255, g: 255, b: 255 })), this._lightColor;
- }, set: function(t3) {
- this._lightColor = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "darkColor", { get: function() {
- return this._darkColor || (this._darkColor = new t2({ r: 0, g: 0, b: 0 })), this._darkColor;
- }, set: function(t3) {
- this._darkColor = t3;
- }, enumerable: true, configurable: true }), t2.prototype.toString = function() {
- return this.alpha < 1 ? this.rgba : this.hex;
- }, t2.prototype.lighten = function(e3) {
- return new t2(tn(this.rgb, e3));
- }, t2.prototype.brighten = function(e3) {
- return new t2(nn(this.rgb, e3));
- }, t2.prototype.saturate = function(e3) {
- return new t2(sn(this.rgb, e3));
- }, Object.defineProperty(t2.prototype, "alternative", { get: function() {
- if (this.rgb != null)
- return pn(this.rgb) ? this.darkColor : this.lightColor;
- throw new Error("Color does not exist");
- }, enumerable: true, configurable: true }), t2;
- }();
- function dn(t2, e3) {
- if (!Z(t2))
- return new un(void 0);
- if (typeof t2 == "string") {
- var i3 = "_color_" + t2 + "_" + (e3 || "1"), n3 = Ii.getCache(i3);
- if (n3)
- return new un({ r: n3.r, g: n3.g, b: n3.b, a: n3.a });
- var r3 = Ui(t2, e3);
- return Ii.setCache(i3, r3), new un(r3);
- }
- return t2 instanceof un ? (Z(e3) && (t2.alpha = e3), t2) : new un(t2);
- }
- function cn(t2) {
- return t2 instanceof un;
- }
- function fn(t2) {
- return dn(t2);
- }
- function gn(t2) {
- return Z(t2) && !cn(t2) ? fn(t2) : t2;
- }
- var yn = function() {
- function t2() {
- this._disposed = false, this._disposers = [], this.className = "BaseObject";
- }
- return t2.prototype.debug = function() {
- }, Object.defineProperty(t2.prototype, "uid", { get: function() {
- return this._uid || (this._uid = Ii.getUniqueId(), Ii.map.setKey(this._uid, this)), this._uid;
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "id", { get: function() {
- return this._id;
- }, set: function(t3) {
- this._id = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "map", { get: function() {
- return this._map || (this._map = new Pi()), this._map;
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "delayedMap", { get: function() {
- return this._delayedMap || (this._delayedMap = new Pi()), this._delayedMap;
- }, enumerable: true, configurable: true }), t2.prototype.addDelayedMap = function(t3, e3) {
- var i3 = this.delayedMap;
- i3.hasKey(e3) || i3.setKey(e3, []), i3.getKey(e3).push({ property: t3, target: this });
- }, t2.prototype.processDelayedMap = function() {
- var t3 = this;
- this.delayedMap.each(function(e3, i3) {
- if (t3.map.hasKey(e3)) {
- var n3 = t3.map.getKey(e3);
- Ut(i3, function(t4) {
- t4.target[t4.property] = n3;
- }), t3.delayedMap.removeKey(e3);
- }
- });
- }, t2.prototype.applyTheme = function() {
- var t3 = this;
- if (Ii) {
- var e3 = this.getCurrentThemes();
- e3 && Ut(e3, function(e4, i3) {
- e4(t3);
- });
- }
- }, Object.defineProperty(t2.prototype, "themes", { get: function() {
- return this._themes;
- }, set: function(t3) {
- this._themes = t3;
- }, enumerable: true, configurable: true }), t2.prototype.getCurrentThemes = function() {
- return this.themes || Ii.themes;
- }, t2.prototype.isDisposed = function() {
- return this._disposed;
- }, t2.prototype.dispose = function() {
- if (!this._disposed) {
- this._disposed = true;
- var t3 = this._disposers;
- for (this._disposers = null; t3.length !== 0; )
- t3.shift().dispose();
- this.clearCache(), this.clonedFrom && this.clonedFrom.clones.removeValue(this);
- var e3 = this._uid;
- e3 != null && Ii.map.removeKey(e3);
- }
- }, t2.prototype.addDisposer = function(t3) {
- this._disposers.push(t3);
- }, t2.prototype.removeDispose = function(t3) {
- if (!this._disposed) {
- var e3 = Xt(this._disposers, t3);
- e3 > -1 && this._disposers.splice(e3, 1);
- }
- t3.dispose();
- }, t2.prototype.clone = function(t3) {
- t3 || (t3 = "clone-" + Ii.getUniqueId());
- var e3 = new this.constructor();
- return e3.cloneId = t3, e3.copyFrom(this), e3;
- }, Object.defineProperty(t2.prototype, "clones", { get: function() {
- return this._clones || (this._clones = new Fi()), this._clones;
- }, enumerable: true, configurable: true }), t2.prototype.copyFrom = function(t3) {
- t3.clones.push(this), this.clonedFrom = t3;
- }, Object.defineProperty(t2.prototype, "className", { get: function() {
- return this._className;
- }, set: function(t3) {
- this._className = t3;
- }, enumerable: true, configurable: true }), t2.prototype.setCache = function(t3, e3, i3) {
- Oi.set(this.uid, t3, e3, i3);
- }, t2.prototype.getCache = function(t3, e3) {
- return e3 === void 0 && (e3 = void 0), Oi.get(this.uid, t3, e3);
- }, t2.prototype.clearCache = function() {
- Oi.clear(this.uid);
- }, t2.prototype.setTimeout = function(t3, e3) {
- var i3 = this, n3 = setTimeout(function() {
- i3.removeDispose(r3), t3();
- }, e3), r3 = new ye(function() {
- clearTimeout(n3);
- });
- return this._disposers.push(r3), r3;
- }, t2.prototype.setInterval = function(t3, e3) {
- var i3 = this, n3 = setInterval(function() {
- i3.removeDispose(r3), t3();
- }, e3), r3 = new ye(function() {
- clearTimeout(n3);
- });
- return this._disposers.push(r3), r3;
- }, Object.defineProperty(t2.prototype, "config", { set: function(t3) {
- try {
- this.processConfig(t3);
- } catch (t4) {
- this.raiseCriticalError(t4);
- }
- }, enumerable: true, configurable: true }), t2.prototype.processConfig = function(e3) {
- var i3 = this;
- if (e3) {
- var n3 = this;
- if (We(e3, function(e4, r4) {
- var s2, a2 = r4;
- if (e4 == "callback" && typeof r4 == "function" && r4.call(n3), i3.hasProperty(e4))
- if (!et(a2) || !Z(a2.type) || et(n3[e4]) && Z(n3[e4].className) && !a2.forceCreate && n3[e4].className == a2.type || i3.asIs(e4) ? s2 = n3[e4] : (s2 = i3.createClassInstance(a2.type)) ? n3[e4] = s2 : s2 = n3[e4], s2 instanceof Yi)
- i3.processAdapters(s2, a2);
- else if (s2 instanceof Fe)
- i3.processEvents(s2, a2);
- else if (e4 == "locale" && Q(a2))
- window["am4lang_" + a2] && (n3[e4] = window["am4lang_" + a2]);
- else if (e4 == "parent" && Q(a2)) {
- var o3 = i3.map.getKey(a2);
- o3 ? n3[e4] = o3 : i3.addDelayedMap("parent", a2);
- } else if (i3.asIs(e4))
- n3[e4] = a2;
- else if (i3.asFunction(e4) && Q(a2)) {
- if (!Z(Ii.registeredClasses[a2]))
- throw Error("Invalid easing function: " + a2);
- n3[e4] = Ii.registeredClasses[a2];
- } else if (a2 instanceof t2)
- n3[e4] = a2;
- else if (s2 instanceof t2)
- s2.config = a2;
- else if (s2 instanceof Mi || s2 instanceof Ei || s2 instanceof Ri) {
- if (it(a2))
- s2 instanceof Mi ? i3.processListTemplate(a2, s2) : i3.processOrderedTemplate(a2, s2);
- else if (et(a2))
- if (a2 instanceof t2)
- s2.template = a2;
- else {
- var l2;
- l2 = Z(a2.template) ? a2.template : a2, s2.template instanceof t2 ? s2.template.config = l2 : Ne(l2, function(e5, n4) {
- var r5 = s2.template[e5];
- r5 instanceof Yi ? i3.processAdapters(r5, n4) : r5 instanceof Fe ? i3.processEvents(r5, n4) : r5 instanceof wi ? i3.processDictionaryTemplate(r5, n4) : s2.template[e5] instanceof t2 ? s2.template[e5].config = n4 : et(n4) && Z(n4.type) ? (r5 = i3.createClassInstance(n4.type)) ? (r5 instanceof t2 && (r5.config = n4), s2.template[e5] = r5) : s2.template[e5] = n4 : r5 instanceof Fi ? i3.processList(n4, r5) : s2.template[e5] = i3.maybeColorOrPercent(n4);
- }), Z(a2.values) && (s2 instanceof Mi ? i3.processListTemplate(a2.values, s2) : i3.processOrderedTemplate(a2.values, s2));
- }
- } else
- s2 instanceof Fi ? e4 == "children" ? i3.processList(a2, s2, i3) : i3.processList(a2, s2) : s2 instanceof wi ? i3.processDictionaryTemplate(s2, a2) : s2 instanceof Pi ? i3.processDictionary(s2, a2) : s2 instanceof un || s2 instanceof A ? n3[e4] = i3.maybeColorOrPercent(a2) : et(s2) && et(a2) ? Ze(a2, s2) : (a2 = i3.maybeColorOrPercent(a2), n3[e4] = a2);
- else
- i3.isReserved(e4) || (n3[e4] = a2);
- }, this.configOrder), this.processingErrors.length) {
- var r3 = this.processingErrors.join("\n");
- throw this._processingErrors = [], Error(r3);
- }
- }
- }, t2.prototype.maybeColorOrPercent = function(t3) {
- if (Q(t3)) {
- if (t3.match(/^[\-]?[0-9.]+\%$/))
- return V(U(t3));
- if (t3.match(/^\#[0-9abcdef]{3,}$/i))
- return dn(t3);
- }
- return t3;
- }, t2.prototype.processAdapters = function(t3, e3) {
- var i3 = this;
- it(e3) ? Ut(e3, function(e4, n3) {
- t3.add(e4.key, e4.callback, e4.priority || 0, i3);
- }) : et(e3) && Ne(e3, function(e4, i4) {
- t3.has(e4, i4) || t3.add(e4, i4);
- });
- }, t2.prototype.processEvents = function(t3, e3) {
- var i3 = this;
- it(e3) ? Ut(e3, function(e4, n3) {
- t3.on(e4.type, e4.callback, i3);
- }) : et(e3) && Ne(e3, function(e4, i4) {
- t3.has(e4, i4) || t3.on(e4, i4);
- });
- }, t2.prototype.processDictionaryTemplate = function(e3, i3) {
- et(i3) && Ne(i3, function(i4, n3) {
- var r3;
- (r3 = i4 == "template" ? e3.template : e3.hasKey(i4) ? e3.getKey(i4) : e3.create(i4)) instanceof t2 ? r3.config = n3 : et(r3) && et(n3) ? Ze(n3, r3) : r3.setKey(i4, n3);
- });
- }, t2.prototype.processDictionary = function(t3, e3) {
- et(e3) && Ne(e3, function(e4, i3) {
- t3.setKey(e4, i3);
- });
- }, t2.prototype.processListTemplate = function(e3, i3) {
- var n3 = this;
- for (Ut(e3, function(e4, r3) {
- var s2, a2 = n3.getConfigEntryType(e4);
- if (i3.hasIndex(r3) && !e4.forceCreate)
- s2 = i3.getIndex(r3);
- else {
- if (e4 instanceof t2)
- return void i3.push(e4);
- s2 = a2 ? i3.create(a2) : i3.create();
- }
- e4 === s2 || et(e4) && (s2 instanceof t2 ? s2.config = e4 : et(s2) && et(e4) ? Ze(e4, s2) : i3.setIndex(i3.indexOf(s2), e4));
- }); e3.length > i3.length; )
- i3.pop();
- }, t2.prototype.processOrderedTemplate = function(e3, i3) {
- var n3 = this;
- Ut(e3, function(e4, r3) {
- var s2, a2 = n3.getConfigEntryType(e4);
- s2 = a2 ? i3.create(a2) : i3.create(), et(e4) && (s2 instanceof t2 ? s2.config = e4 : et(s2) && et(e4) ? Ze(e4, s2) : i3.insert(e4));
- });
- }, t2.prototype.processList = function(e3, i3, n3) {
- var r3 = this;
- it(e3) || (e3 = [e3]);
- var s2 = i3.length, a2 = 0;
- for (Ut(e3, function(e4, o3) {
- if (et(e4)) {
- var l2 = void 0;
- if (o3 < s2 && !e4.forceCreate)
- l2 = i3.getIndex(o3);
- else {
- if (e4 instanceof t2)
- return void i3.push(e4);
- a2++, l2 = r3.createEntryInstance(e4), n3 ? l2.parent = n3 : i3.push(l2);
- }
- l2 instanceof t2 ? l2.config = e4 : et(l2) && et(e4) && Ze(e4, l2);
- } else
- i3.hasIndex(o3) ? i3.setIndex(o3, e4) : i3.push(e4);
- }); !n3 && e3.length + a2 < i3.length; )
- i3.pop();
- }, t2.prototype.configOrder = function(t3, e3) {
- return t3 == e3 ? 0 : t3 == "language" ? -1 : e3 == "language" ? 1 : 0;
- }, t2.prototype.asIs = function(t3) {
- return Xt(["locale"], t3) != -1;
- }, t2.prototype.asFunction = function(t3) {
- return false;
- }, t2.prototype.createClassInstance = function(t3) {
- if (Z(Ii.registeredClasses[t3]))
- return new Ii.registeredClasses[t3]();
- throw Error('Invalid type: "' + t3 + '".');
- }, t2.prototype.createEntryInstance = function(t3) {
- var e3;
- return Z(t3.type) && (e3 = this.createClassInstance(t3.type)), e3 || t3;
- }, t2.prototype.getConfigEntryType = function(t3) {
- if (Z(t3.type)) {
- if (Z(Ii.registeredClasses[t3.type]))
- return Ii.registeredClasses[t3.type];
- throw Error('Invalid type: "' + t3.type + '".');
- }
- }, t2.prototype.hasProperty = function(t3) {
- return t3 in this;
- }, t2.prototype.isReserved = function(t3) {
- return ["type", "forceCreate"].indexOf(t3) !== -1;
- }, Object.defineProperty(t2.prototype, "processingErrors", { get: function() {
- return this._processingErrors || (this._processingErrors = []), this._processingErrors;
- }, enumerable: true, configurable: true }), t2;
- }(), mn = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "BaseObjectEvents", e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "events", { get: function() {
- return this._eventDispatcher || (this._eventDispatcher = new Fe(), this._disposers.push(this._eventDispatcher)), this._eventDispatcher;
- }, enumerable: true, configurable: true }), e3.prototype.dispatch = function(t3, e4) {
- this._eventDispatcher && this.events.isEnabled(t3) && (e4 ? (e4.type = t3, e4.target = e4.target || this, this.events.dispatch(t3, { type: t3, target: this })) : this.events.dispatch(t3, { type: t3, target: this }));
- }, e3.prototype.dispatchImmediately = function(t3, e4) {
- this._eventDispatcher && this.events.isEnabled(t3) && (e4 ? (e4.type = t3, e4.target = e4.target || this, this.events.dispatchImmediately(t3, e4)) : this.events.dispatchImmediately(t3, { type: t3, target: this }));
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), e4._eventDispatcher && this.events.copyFrom(e4._eventDispatcher);
- }, e3;
- }(yn), vn = "px", bn = "string", xn = "number", _n = "date", Pn = "duration", wn = "__\xA7\xA7\xA7__", Cn = "__\xA7\xA7\xA7\xA7__";
- function On(t2) {
- }
- function Sn(t2, e3) {
- return Ne(t2, function(t3, i3) {
- Z(i3) && (e3[t3] = i3);
- }), e3;
- }
- function In(t2) {
- return /^[^#]*/.exec(t2)[0];
- }
- function Dn() {
- var t2 = "#";
- if (/apple/i.test(navigator.vendor)) {
- var e3 = document.baseURI;
- if (e3) {
- e3 = In(e3);
- var i3 = In(location.href);
- e3 !== i3 && (t2 = i3 + t2);
- }
- }
- return t2;
- }
- function kn(t2, e3) {
- return Ne(t2, function(t3, i3) {
- Z(i3) && !Z(e3[t3]) && (e3[t3] = i3);
- }), e3;
- }
- function Tn(t2, e3) {
- return Ne(t2, function(t3, i3) {
- e3[t3] = i3;
- }), e3;
- }
- function An(t2) {
- return Z(t2) && t2.toString() !== "";
- }
- function Vn(t2, e3) {
- return tt(t2) ? t2 : t2 != null && tt(t2.value) && tt(e3) ? e3 * t2.value : 0;
- }
- function Fn(t2, e3, i3) {
- var n3;
- return tt(t2) ? (n3 = t2) < 0 && (n3 = i3 ? e3 + n3 : e3 - n3) : t2 != null && tt(t2.value) && (n3 = e3 * t2.value), n3;
- }
- function Mn(t2, e3) {
- return t2 instanceof A ? t2.value : t2 / e3;
- }
- function Ln() {
- return window.devicePixelRatio || 1;
- }
- function jn(t2) {
- return t2.replace(/\W+/g, "-").replace(/([a-z\d])([A-Z])/g, "$1-$2").toLowerCase();
- }
- function En(t2) {
- var e3 = t2.split("");
- return e3[0] = e3[0].toUpperCase(), e3.join("");
- }
- function Rn(t2) {
- return JSON.stringify(t2);
- }
- function Bn(t2) {
- return t2.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
- }
- function Hn(t2, e3, i3, n3, r3) {
- if (t2.length <= e3)
- return [t2];
- var s2 = [];
- if (i3) {
- for (var a2 = -1, o3 = t2.replace(/([,;:!?\\\/]+|[\s])/g, wn + "$1" + wn).split(wn), l2 = 1; l2 < o3.length; l2++)
- (h2 = o3[l2]) != "." && h2 != "," || !o3[l2 - 1].match(/[\w]+$/) || (o3[l2 - 1] += h2, o3[l2] = "");
- for (l2 = 0; l2 < o3.length; l2++) {
- var h2, p2 = (h2 = o3[l2]).length;
- if (p2 !== 0) {
- if (p2 > e3 && (i3 !== true || r3 != 0)) {
- if (n3 && (h2 = zn(h2)), d2 = h2.match(new RegExp(".{1," + e3 + "}", "g"))) {
- if (n3)
- for (var u2 = 0; u2 < d2.length; u2++)
- d2[u2] = zn(d2[u2]);
- s2 = s2.concat(d2);
- }
- } else
- a2 === -1 && (s2.push(""), a2 = 0), s2[a2].length + p2 + 1 > e3 && s2[a2] !== "" && (s2.push(""), a2++), s2[a2] += h2;
- a2 = s2.length - 1;
- }
- }
- } else {
- var d2;
- if (d2 = t2.match(new RegExp(".{1," + e3 + "}", "g"))) {
- if (n3)
- for (u2 = 0; u2 < d2.length; u2++)
- d2[u2] = zn(d2[u2]);
- s2 = d2;
- }
- }
- return s2.length == 1 && i3 && r3 && s2[0].length > e3 && (s2 = []), s2;
- }
- function Nn(t2, e3, i3, n3, r3) {
- return t2.length <= e3 ? t2 : ((e3 -= i3.length) < 1 && (e3 = 1), (Hn(t2, e3, n3, r3)[0] || "") + i3);
- }
- function Wn(t2) {
- return t2.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
- }
- function Xn(t2) {
- return t2.replace(/[\s\uFEFF\xA0]+$/g, "");
- }
- function Yn(t2) {
- return t2.replace(/^[\s\uFEFF\xA0]+/g, "");
- }
- function zn(t2) {
- return t2.split("").reverse().join("");
- }
- function Un(t2) {
- var e3 = t2.trim();
- return (e3 = t2.replace(/^'(.*)'$/, "$1")) == t2 && (e3 = t2.replace(/^"(.*)"$/, "$1")), e3;
- }
- function Gn(t2, e3, i3) {
- return e3 === void 0 && (e3 = 0), i3 === void 0 && (i3 = "0"), typeof t2 != "string" && (t2 = t2.toString()), e3 > t2.length ? Array(e3 - t2.length + 1).join(i3) + t2 : t2;
- }
- function Kn(t2) {
- if (t2 === void 0)
- return bn;
- var e3 = (t2 = (t2 = (t2 = t2.toLowerCase().replace(/^\[[^\]]*\]/, "")).replace(/\[[^\]]+\]/, "")).trim()).match(/\/(date|number|duration)$/);
- return e3 ? e3[1] : t2 === xn ? xn : t2 === _n ? _n : t2 === Pn ? Pn : t2.match(/[#0]/) ? xn : t2.match(/[ymwdhnsqaxkzgtei]/) ? _n : bn;
- }
- function Zn(t2) {
- return t2.replace(/\/(date|number|duration)$/i, "");
- }
- function qn(t2) {
- return t2 ? t2.replace(/<[^>]*>/g, "") : t2;
- }
- function $n(t2) {
- return t2 ? qn(("" + t2).replace(/[\n\r]+/g, ". ")) : t2;
- }
- function Jn(t2) {
- if (M(t2))
- return "NaN";
- if (t2 === 1 / 0)
- return "Infinity";
- if (t2 === -1 / 0)
- return "-Infinity";
- if (t2 === 0 && 1 / t2 == -1 / 0)
- return "-0";
- var e3 = t2 < 0;
- t2 = Math.abs(t2);
- var i3, n3 = q(/^([0-9]+)(?:\.([0-9]+))?(?:e[\+\-]([0-9]+))?$/.exec("" + t2)), r3 = n3[1], s2 = n3[2] || "";
- if (n3[3] == null)
- i3 = s2 === "" ? r3 : r3 + "." + s2;
- else {
- var a2, o3 = +n3[3];
- i3 = t2 < 1 ? "0." + bi("0", a2 = o3 - 1) + r3 + s2 : (a2 = o3 - s2.length) == 0 ? r3 + s2 : a2 < 0 ? r3 + s2.slice(0, a2) + "." + s2.slice(a2) : r3 + s2 + bi("0", a2);
- }
- return e3 ? "-" + i3 : i3;
- }
- function Qn(t2) {
- if (J(t2)) {
- var e3 = new Date(t2);
- return e3.setMilliseconds(t2.getMilliseconds()), e3;
- }
- if (tt(t2))
- return new Date(t2);
- var i3 = Number(t2);
- return tt(i3) ? new Date(i3) : new Date(t2);
- }
- function tr(t2) {
- if (J(t2))
- return t2.getTime();
- if (tt(t2))
- return t2;
- if (Q(t2)) {
- var e3 = Number(t2);
- return tt(e3) ? e3 : void 0;
- }
- }
- function er(t2, e3) {
- var i3 = new Date(t2.getFullYear(), 0, 0), n3 = t2.getTime() - i3.getTime() + 60 * (i3.getTimezoneOffset() - t2.getTimezoneOffset()) * 1e3;
- return Math.floor(n3 / 864e5);
- }
- function ir(t2, e3) {
- var i3 = er(t2) - 1, n3 = Math.floor((i3 - (t2.getDay() || 7) + 10) / 7);
- return n3 === 0 ? n3 = 53 : n3 === 53 && (n3 = 1), n3;
- }
- function nr(t2, e3) {
- var i3 = ir(new Date(t2.getFullYear(), t2.getMonth(), 1)), n3 = ir(t2);
- return n3 == 1 && (n3 = 53), n3 - i3 + 1;
- }
- function rr(t2, e3, i3, n3) {
- i3 === void 0 && (i3 = 1), n3 === void 0 && (n3 = false);
- var r3 = new Date(e3, 0, 4, 0, 0, 0, 0);
- return n3 && r3.setUTCFullYear(e3), 7 * t2 + i3 - ((r3.getDay() || 7) + 3);
- }
- function sr(t2, e3) {
- return t2 > 12 ? t2 -= 12 : t2 === 0 && (t2 = 12), Z(e3) ? t2 + (e3 - 1) : t2;
- }
- function ar(t2, e3, i3, n3) {
- if (e3 === void 0 && (e3 = false), i3 === void 0 && (i3 = false), n3 === void 0 && (n3 = false), n3)
- return e3 ? "Coordinated Universal Time" : "UTC";
- var r3 = t2.toLocaleString("UTC"), s2 = t2.toLocaleString("UTC", { timeZoneName: e3 ? "long" : "short" }).substr(r3.length);
- return i3 === false && (s2 = s2.replace(/ (standard|daylight|summer|winter) /i, " ")), s2;
- }
- function or(t2, e3) {
- return Math.floor(Math.random() * (e3 - t2)) + t2;
- }
- function lr(t2, e3, i3) {
- return t2 > i3 ? i3 : t2 < e3 ? e3 : t2;
- }
- function hr(t2, e3, i3) {
- var n3 = i3 - e3;
- return (t2 > i3 || t2 < e3) && (t2 = e3 + (t2 - n3 * Math.floor(t2 / n3))), t2;
- }
- function pr(t2, e3) {
- var i3 = t2.x, n3 = t2.y, r3 = [];
- if (e3) {
- for (; Z(e3.parent); )
- r3.push(e3), e3 = e3.parent;
- r3.reverse();
- for (var s2 = 0; s2 < r3.length; s2++) {
- var a2 = r3[s2], o3 = a2.rotation, l2 = i3 - a2.pixelX - a2.ex, h2 = n3 - a2.pixelY - a2.ey;
- a2.dx && (i3 -= a2.dx), a2.dy && (n3 -= a2.dy);
- var p2 = a2.scale;
- a2.group && (p2 = a2.group.scale), i3 = (ft(-o3) * l2 - dt(-o3) * h2) / p2 - a2.pixelPaddingLeft, n3 = (ft(-o3) * h2 + dt(-o3) * l2) / p2 - a2.pixelPaddingTop;
- }
- }
- return { x: i3, y: n3 };
- }
- function ur(t2, e3) {
- var i3 = t2.x, n3 = t2.y;
- if (e3)
- for (; Z(e3.parent); ) {
- var r3 = e3.rotation;
- i3 += e3.pixelPaddingLeft + e3.ex, n3 += e3.pixelPaddingTop + e3.ey;
- var s2 = e3.scale;
- e3.group && (s2 = e3.group.scale);
- var a2 = e3.pixelX + (i3 * ft(r3) - n3 * dt(r3)) * s2, o3 = e3.pixelY + (i3 * dt(r3) + n3 * ft(r3)) * s2;
- e3.dx && (a2 += e3.dx), e3.dy && (o3 += e3.dy), i3 = a2, n3 = o3, e3 = e3.parent;
- }
- return { x: i3, y: n3 };
- }
- function dr(t2, e3, i3) {
- return pr(ur(t2, e3), i3);
- }
- function cr(t2, e3) {
- var i3 = pr(t2, e3), n3 = pr({ x: t2.x + t2.width, y: t2.y + t2.height }, e3);
- return { x: i3.x, y: i3.y, width: n3.x - i3.x, height: n3.y - i3.y };
- }
- function fr(t2, e3) {
- var i3 = ur(t2, e3), n3 = ur({ x: t2.x + t2.width, y: t2.y + t2.height }, e3);
- return { x: i3.x, y: i3.y, width: n3.x - i3.x, height: n3.y - i3.y };
- }
- function gr(t2, e3, i3) {
- try {
- var n3 = e3.getBoundingClientRect();
- return tt(i3) || (i3 = 1), { x: (t2.x - n3.left) / i3, y: (t2.y - n3.top) / i3 };
- } catch (e4) {
- return t2;
- }
- }
- function yr(t2, e3) {
- try {
- var i3 = e3.getBoundingClientRect();
- return { x: t2.x + i3.left, y: t2.y + i3.top };
- } catch (e4) {
- return t2;
- }
- }
- function mr(t2, e3) {
- return e3 && e3.htmlContainer ? pr(gr(t2, q(e3.htmlContainer), e3.svgContainer.cssScale), e3) : t2;
- }
- function vr(t2, e3) {
- return e3 && e3.htmlContainer ? yr(ur(t2, e3), q(e3.htmlContainer)) : t2;
- }
- function br(t2) {
- var e3 = getComputedStyle(t2), i3 = parseFloat(e3.paddingLeft) + parseFloat(e3.paddingRight), n3 = parseFloat(e3.borderLeftWidth) + parseFloat(e3.borderRightWidth);
- return t2.clientWidth - i3 - n3;
- }
- function xr(t2) {
- var e3 = getComputedStyle(t2), i3 = parseFloat(e3.paddingTop) + parseFloat(e3.paddingBottom), n3 = parseFloat(e3.borderTopWidth) + parseFloat(e3.borderBottomWidth);
- return t2.clientHeight - i3 - n3;
- }
- function _r(t2) {
- var e3 = ("" + t2).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
- return e3 ? Math.max(0, (e3[1] ? e3[1].length : 0) - (e3[2] ? +e3[2] : 0)) : 0;
- }
- var Pr = /^([a-zA-Z][a-zA-Z0-9\+\.\-]*:)?(?:(\/\/)([^\@]+\@)?([^\/\?\#\:]*)(\:[0-9]+)?)?([^\?\#]*)(\?[^\#]*)?(\#.*)?$/;
- function wr(t2) {
- var e3 = Pr.exec(t2);
- return { protocol: e3 && e3[1] || "", separator: e3 && e3[2] || "", authority: e3 && e3[3] || "", domain: e3 && e3[4] || "", port: e3 && e3[5] || "", path: e3 && e3[6] || "", query: e3 && e3[7] || "", hash: e3 && e3[8] || "" };
- }
- function Cr(t2) {
- return t2.protocol + t2.separator + t2.authority + t2.domain + t2.port + t2.path + t2.query + t2.hash;
- }
- function Or(t2) {
- return t2.protocol === "" && t2.separator === "" && t2.authority === "" && t2.domain === "" && t2.port === "";
- }
- function Sr(t2, e3) {
- var i3 = wr(t2), n3 = wr(e3);
- if (Or(i3))
- throw new Error("Left URL is not absolute");
- if (Or(n3)) {
- if (n3.path !== "")
- if (n3.path[0] === "/")
- i3.path = n3.path;
- else {
- var r3 = i3.path.split(/\//), s2 = n3.path.split(/\//);
- if (r3.length === 0 ? s2.length !== 0 && r3.push("") : r3.length > 1 && r3.pop(), te(r3, s2), i3.path = r3.join("/"), i3.path !== "" && i3.path[0] !== "/")
- throw new Error("URL path must start with /");
- }
- return i3.query = n3.query, i3.hash = n3.hash, Cr(i3);
- }
- return Cr(n3);
- }
- function Ir() {
- return !!window.MSInputMethodContext && !!document.documentMode;
- }
- function Dr(t2) {
- return +t2;
- }
- function kr(t2) {
- return t2 * t2;
- }
- function Tr(t2) {
- return t2 * (2 - t2);
- }
- function Ar(t2) {
- return ((t2 *= 2) <= 1 ? t2 * t2 : --t2 * (2 - t2) + 1) / 2;
- }
- function Vr(t2, e3) {
- return Math.pow(t2, e3);
- }
- function Fr(t2, e3) {
- return 1 - Math.pow(1 - t2, e3);
- }
- function Mr(t2, e3) {
- return ((t2 *= 2) <= 1 ? Math.pow(t2, e3) : 2 - Math.pow(2 - t2, e3)) / 2;
- }
- function Lr(t2) {
- return Vr(t2, 3);
- }
- function jr(t2) {
- return Fr(t2, 3);
- }
- function Er(t2) {
- return Mr(t2, 3);
- }
- function Rr(t2) {
- return Math.pow(2, 10 * t2 - 10);
- }
- function Br(t2) {
- return 1 - Math.pow(2, -10 * t2);
- }
- function Hr(t2) {
- return ((t2 *= 2) <= 1 ? Math.pow(2, 10 * t2 - 10) : 2 - Math.pow(2, 10 - 10 * t2)) / 2;
- }
- function Nr(t2) {
- return 1 - Math.cos(t2 * rt);
- }
- function Wr(t2) {
- return Math.sin(t2 * rt);
- }
- function Xr(t2) {
- return (1 - Math.cos(nt * t2)) / 2;
- }
- function Yr(t2) {
- return t2 * t2 * t2;
- }
- function zr(t2) {
- return --t2 * t2 * t2 + 1;
- }
- function Ur(t2) {
- return ((t2 *= 2) <= 1 ? t2 * t2 * t2 : (t2 -= 2) * t2 * t2 + 2) / 2;
- }
- function Gr(t2) {
- return 1 - Math.sqrt(1 - t2 * t2);
- }
- function Kr(t2) {
- return Math.sqrt(1 - --t2 * t2);
- }
- function Zr(t2) {
- return ((t2 *= 2) <= 1 ? 1 - Math.sqrt(1 - t2 * t2) : Math.sqrt(1 - (t2 -= 2) * t2) + 1) / 2;
- }
- Ii.registeredClasses["ease.linear"] = Dr, Ii.registeredClasses["ease.quadIn"] = kr, Ii.registeredClasses["ease.quadOut"] = Tr, Ii.registeredClasses["ease.quadInOut"] = Ar, Ii.registeredClasses["ease.polyIn"] = Vr, Ii.registeredClasses["ease.polyOut"] = Fr, Ii.registeredClasses["ease.polyInOut"] = Mr, Ii.registeredClasses["ease.polyIn3"] = Lr, Ii.registeredClasses["ease.polyOut3"] = jr, Ii.registeredClasses["ease.polyInOut3"] = Er, Ii.registeredClasses["ease.expIn"] = Rr, Ii.registeredClasses["ease.expOut"] = Br, Ii.registeredClasses["ease.expInOut"] = Hr, Ii.registeredClasses["ease.sinIn"] = Nr, Ii.registeredClasses["ease.sinOut"] = Wr, Ii.registeredClasses["ease.sinInOut"] = Xr, Ii.registeredClasses["ease.cubicIn"] = Yr, Ii.registeredClasses["ease.cubicOut"] = zr, Ii.registeredClasses["ease.cubicInOut"] = Ur, Ii.registeredClasses["ease.circleIn"] = Gr, Ii.registeredClasses["ease.circleOut"] = Kr, Ii.registeredClasses["ease.circleInOut"] = Zr;
- var qr = 7.5625;
- function $r(t2) {
- return 1 - Jr(1 - t2);
- }
- function Jr(t2) {
- return (t2 = +t2) < 0.36363636363636365 ? qr * t2 * t2 : t2 < 0.7272727272727273 ? qr * (t2 -= 0.5454545454545454) * t2 + 0.75 : t2 < 0.9090909090909091 ? qr * (t2 -= 0.8181818181818182) * t2 + 0.9375 : qr * (t2 -= 0.9545454545454546) * t2 + 0.984375;
- }
- function Qr(t2) {
- return ((t2 *= 2) <= 1 ? 1 - Jr(1 - t2) : Jr(t2 - 1) + 1) / 2;
- }
- Ii.registeredClasses["ease.bounceIn"] = $r, Ii.registeredClasses["ease.bounceOut"] = Jr, Ii.registeredClasses["ease.bounceInOut"] = Qr;
- var ts = 0.3 / (2 * Math.PI), es = Math.asin(1) * ts;
- function is(t2) {
- return 1 * Math.pow(2, 10 * --t2) * Math.sin((es - t2) / ts);
- }
- function ns(t2) {
- return 1 - 1 * Math.pow(2, -10 * (t2 = +t2)) * Math.sin((t2 + es) / ts);
- }
- function rs(t2) {
- return ((t2 = 2 * t2 - 1) < 0 ? 1 * Math.pow(2, 10 * t2) * Math.sin((es - t2) / ts) : 2 - 1 * Math.pow(2, -10 * t2) * Math.sin((es + t2) / ts)) / 2;
- }
- Ii.registeredClasses["ease.elasticIn"] = is, Ii.registeredClasses["ease.elasticOut"] = ns, Ii.registeredClasses["ease.elasticInOut"] = rs;
- var ss = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.transitionDuration = 0, e4.transitionEasing = zr, e4.properties = {}, e4.propertyFields = {}, e4.filters = new Fi(), e4.isTemplate = false, e4.className = "SpriteState", e4._disposers.push(new Ai(e4.filters)), e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "adapter", { get: function() {
- var t3 = this;
- return this._adapterO || (this._adapterO = new Yi(this), this._adapterO.events.on("inserted", function(e4) {
- t3[e4.newValue.key] = t3[e4.newValue.key];
- }, void 0, false), this._adapterO.events.on("removed", function(e4) {
- t3[e4.newValue.key] = t3[e4.newValue.key];
- }, void 0, false)), this._adapterO;
- }, enumerable: true, configurable: true }), e3.prototype.getPropertyValue = function(t3) {
- var e4 = this.properties[t3], i3 = this.sprite;
- if (i3) {
- var n3 = this.propertyFields[t3];
- if (Z(n3) && (i3.dataItem && (e4 = i3.dataItem.dataContext[n3]), e4 == null && (e4 = "__unset")), Z(e4))
- this._adapterO && (e4 = this._adapterO.apply(t3, e4));
- else {
- var r3 = i3.getPropertyValue(t3);
- (e4 = this._adapterO ? this._adapterO.apply(t3, r3) : r3) == r3 && (e4 = void 0);
- }
- }
- return e4;
- }, e3.prototype.copyFrom = function(t3) {
- t3 && t3 != this && (this.transitionDuration = t3.transitionDuration, this.transitionEasing = t3.transitionEasing, Sn(t3.properties, this.properties), Sn(t3.propertyFields, this.propertyFields), this.filters.copyFrom(t3.filters), t3._adapterO && this.adapter.copyFrom(t3._adapterO));
- }, Object.defineProperty(e3.prototype, "allValues", { get: function() {
- var t3 = this, e4 = {};
- return Ne(this.properties, function(i3, n3) {
- e4[i3] = t3.getPropertyValue(i3);
- }), this._adapterO && Ne(this._adapterO.keys(), function(i3, n3) {
- var r3 = t3.getPropertyValue(n3);
- e4[n3] = r3;
- }), Ne(this.propertyFields, function(i3) {
- var n3 = t3.getPropertyValue(i3);
- e4[i3] = n3;
- }), e4;
- }, enumerable: true, configurable: true }), e3.prototype.reset = function() {
- this.properties = {}, this.filters.clear();
- }, e3.prototype.processConfig = function(e4) {
- Z(e4) && Z(e4.properties) && Ne(e4.properties, function(t3, i3) {
- Q(i3) && (i3.match(/^[0-9.\-]+\%$/) ? e4.properties[t3] = V(U(i3)) : i3.match(/^\#[0-9abcdef]{3,}$/i) && (e4.properties[t3] = gn(i3)));
- }), t2.prototype.processConfig.call(this, e4);
- }, e3.prototype.asFunction = function(e4) {
- return e4 == "transitionEasing" || t2.prototype.asIs.call(this, e4);
- }, e3;
- }(yn);
- Ii.registeredClasses.SpriteState = ss;
- var as = function(t2) {
- function e3() {
- var e4 = t2 !== null && t2.apply(this, arguments) || this;
- return e4._interactionEvents = new Pi(), e4;
- }
- return C(e3, t2), e3.prototype._dispatchSpriteEvent = function(t3) {
- if (!this.target.disabled && !this.target.isTemplate && this.target.events.isEnabled(t3.type)) {
- var e4 = Ye(t3, { target: this.target });
- this.target.events.dispatchImmediately(e4.type, e4);
- }
- }, e3.prototype._dispatchSpritePointEvent = function(t3) {
- if (!this.target.disabled && !this.target.isTemplate && this.target.events.isEnabled(t3.type)) {
- var e4 = Ye(t3, { target: this.target, spritePoint: t3.point ? mr(t3.point, this.target) : void 0, svgPoint: this.target.getSvgPoint(t3.point) });
- this.target.events.dispatchImmediately(e4.type, e4);
- }
- }, e3.prototype._addInteractionObjectEvent = function(t3, e4, i3, n3) {
- var r3 = this, s2 = n3 + "-" + t3;
- return this._interactionEvents.insertKeyIfEmpty(s2, function() {
- var a2 = r3.target.interactions.events.on(t3, e4, i3, n3);
- return new be(function() {
- r3._interactionEvents.removeKey(s2), a2.dispose();
- });
- }).increment();
- }, e3.prototype._on = function(e4, i3, n3, r3, s2, a2) {
- var o3 = t2.prototype._on.call(this, e4, i3, n3, r3, s2, a2), l2 = [o3.disposer];
- switch (i3) {
- case "hit":
- case "track":
- case "doublehit":
- case "wheel":
- case "wheelup":
- case "wheeldown":
- case "wheelleft":
- case "wheelright":
- l2.push(this._addInteractionObjectEvent(i3, this._dispatchSpritePointEvent, this, s2));
- break;
- case "rightclick":
- case "down":
- case "up":
- case "drag":
- case "dragged":
- case "dragstart":
- case "dragstop":
- case "over":
- case "out":
- case "swipe":
- case "swipeleft":
- case "swiperight":
- case "resize":
- case "focus":
- case "blur":
- case "toggled":
- l2.push(this._addInteractionObjectEvent(i3, this._dispatchSpriteEvent, this, s2));
- }
- switch (i3) {
- case "hit":
- case "doublehit":
- case "rightclick":
- case "down":
- case "up":
- this.target.clickable = true;
- break;
- case "toggled":
- this.target.togglable = true;
- break;
- case "drag":
- case "dragstart":
- case "dragstop":
- this.target.draggable = true;
- break;
- case "track":
- this.target.trackable = true;
- break;
- case "resize":
- this.target.resizable = true;
- break;
- case "swipe":
- case "swipeleft":
- case "swiperight":
- this.target.swipeable = true;
- break;
- case "wheel":
- case "wheelup":
- case "wheeldown":
- case "wheelleft":
- case "wheelright":
- this.target.wheelable = true;
- break;
- case "over":
- this.target.hoverable = true;
- case "out":
- this.target.hoverable = true;
- break;
- case "focus":
- case "blur":
- this.target.focusable = true;
- }
- return o3.disposer = new me(l2), o3;
- }, e3;
- }(Me), os = function() {
- function t2() {
- }
- return t2.opacity = 1, t2.strokeOpacity = 1, t2.strokeWidth = 1, t2.fillOpacity = 1, t2.fill = dn("#000000"), t2.stroke = dn("#000000"), t2.focusable = void 0, t2.tabindex = 0, t2;
- }(), ls = { verbose: true, commercialLicense: false, classNamePrefix: "amcharts-", autoSetClassName: false, minPolylineStep: 0.5, onlyShowOnViewport: false, queue: false, autoDispose: false, licenses: [], suppressErrors: false, suppressWarnings: false, animationsEnabled: true, nonce: "", deferredDelay: 100, disableHoverOnTransform: "never", pixelPerfectPrecision: 0 };
- function hs(t2, e3) {
- var i3 = false, n3 = Date.now();
- return De(function r3(s2) {
- if (!i3) {
- var a2 = s2 - n3;
- a2 >= t2 ? e3(1) : (De(r3), e3(a2 / t2));
- }
- }), new ye(function() {
- i3 = true;
- });
- }
- function ps(t2, e3, i3) {
- return e3 + (i3 - e3) * t2;
- }
- function us(t2, e3, i3) {
- return new A(ps(t2, e3.percent, i3.percent));
- }
- function ds(t2, e3, i3) {
- var n3 = new un(Qi(e3.rgb, i3.rgb, t2));
- return e3.alpha != i3.alpha && (n3.alpha = e3.alpha + (i3.alpha - e3.alpha) * t2), n3;
- }
- function cs(t2, e3) {
- return e3 + t2.charAt(0).toUpperCase() + t2.substr(1);
- }
- var fs, gs = function() {
- function t2(t3) {
- this._disposer = new ye(function() {
- for (; t3.length !== 0; )
- t3[0].dispose();
- });
- }
- return t2.prototype.isDisposed = function() {
- return this._disposer.isDisposed();
- }, t2.prototype.dispose = function() {
- this._disposer.dispose();
- }, t2;
- }(), ys = function(t2) {
- function e3(e4, i3, n3, r3) {
- var s2 = t2.call(this) || this;
- return s2.duration = 0, s2.easing = Dr, s2.progress = 0, s2._loop = 0, s2._pause = false, s2._delayTimeout = null, s2._time = 0, s2._isFinished = false, s2.className = "Animation", ls.animationsEnabled === false && (n3 = 0), s2.object = e4, s2.animationOptions = se(i3), s2.duration = n3, r3 && (s2.easing = r3), s2.applyTheme(), s2;
- }
- return C(e3, t2), e3.prototype.debug = function() {
- }, e3.prototype.dispose = function() {
- t2.prototype.dispose.call(this), this.pause();
- }, e3.prototype.delay = function(t3) {
- var e4 = this;
- if (t3 > 0) {
- this.pause(), ie(this.object.animations, this);
- var i3 = setTimeout(function() {
- e4._delayTimeout = null, e4.start();
- }, t3);
- this._delayTimeout = new ye(function() {
- clearTimeout(i3);
- });
- }
- return this;
- }, e3.prototype._start = function() {
- this._isFinished = false, this._delayTimeout && (this.removeDispose(this._delayTimeout), this._delayTimeout = null), this.stopSameAnimations(), this._pause = false, ie(Qa.animations, this), ie(this.object.animations, this), Qa.requestFrame();
- }, e3.prototype.start = function() {
- this._start(), this._startTime = Date.now(), this._time = 0, this.staticOptions = [];
- for (var t3 = this.animationOptions.length - 1; t3 >= 0; t3--) {
- var e4 = this.animationOptions[t3];
- if (Z(e4.from) || (e4.childObject ? e4.from = e4.childObject[e4.property] : (e4.from = this.object[e4.property], Z(e4.from) || (e4.from = os[e4.property]))), e4.from == e4.to)
- ee(this.animationOptions, e4);
- else if (!Z(e4.from) || !(e4.from instanceof A) && e4.to instanceof A || e4.from instanceof A && !(e4.to instanceof A))
- this.staticOptions.push(e4), ee(this.animationOptions, e4);
- else if (tt(e4.to))
- if (e4.updateMethod = ps, e4.from instanceof A) {
- var i3 = this.object[cs(e4.property, "pixel")];
- isNaN(i3) ? (this.staticOptions.push(e4), ee(this.animationOptions, e4)) : e4.from = i3;
- } else
- isNaN(e4.from) && (this.staticOptions.push(e4), ee(this.animationOptions, e4));
- else
- e4.to instanceof un ? e4.from ? e4.updateMethod = ds : (this.staticOptions.push(e4), ee(this.animationOptions, e4)) : e4.to instanceof A ? (e4.updateMethod = us, isNaN(e4.from) || (i3 = this.object[cs(e4.property, "relative")], isNaN(i3) || (e4.from = V(100 * i3)))) : (this.staticOptions.push(e4), ee(this.animationOptions, e4));
- }
- if (this.applyStaticOptions(), this.events.isEnabled("animationstarted")) {
- var n3 = { type: "animationstarted", target: this, progress: this.progress };
- this.events.dispatchImmediately("animationstarted", n3);
- }
- return this.update(), this.duration === 0 && this.end(), this;
- }, e3.prototype.loop = function(t3) {
- return tt(t3) || (t3 = 1 / 0), this._loop = t3, this;
- }, e3.prototype.pause = function() {
- return this._pause = true, this._delayTimeout && (this.removeDispose(this._delayTimeout), this._delayTimeout = null), ee(Qa.animations, this), ee(this.object.animations, this), this;
- }, e3.prototype.resume = function() {
- return this._start(), this._startTime = Date.now() - this._time, this;
- }, e3.prototype.end = function() {
- if (this._loop == 0 && this.pause(), this.setProgress(1), this.applyStaticOptions(), this.events.isEnabled("animationended")) {
- var t3 = { type: "animationended", target: this, progress: this.progress };
- this.events.dispatchImmediately("animationended", t3);
- }
- return this._loop > 0 ? (this._loop--, this.start()) : (this.stop(), this._isFinished = true), this;
- }, e3.prototype.kill = function() {
- this.pause(), this._isFinished = true;
- }, e3.prototype.isFinished = function() {
- return this._isFinished;
- }, e3.prototype.applyStaticOptions = function() {
- var t3 = this;
- Ut(this.staticOptions, function(e4) {
- e4.childObject ? e4.childObject[e4.property] = t3.progress == 1 ? e4.to : e4.from : t3.object[e4.property] = t3.progress == 1 ? e4.to : e4.from;
- });
- }, e3.prototype.stop = function(t3) {
- if (this.pause(), !t3 && this.events.isEnabled("animationstopped")) {
- var e4 = { type: "animationstopped", target: this, progress: this.progress };
- this.events.dispatchImmediately("animationstopped", e4);
- }
- return this;
- }, e3.prototype.setProgress = function(t3) {
- var e4 = this;
- if (this._time = this.duration * t3, Ut(this.animationOptions, function(i4) {
- if (i4.updateMethod && Z(i4.from)) {
- var n3 = i4.updateMethod(t3, i4.from, i4.to);
- i4.childObject ? i4.childObject[i4.property] = n3 : e4.object[i4.property] = n3;
- }
- }), this.progress = t3, this.events.isEnabled("animationprogress")) {
- var i3 = { type: "animationprogress", target: this, progress: this.progress };
- this.events.dispatchImmediately("animationprogress", i3);
- }
- Qa.requestFrame();
- }, e3.prototype.update = function() {
- if (!this._pause) {
- var t3 = void 0;
- this._time = ut(Date.now() - this._startTime, 0, this.duration);
- var e4 = this._time / this.duration;
- t3 = this.easing(e4), (this.duration == 0 || !tt(t3) || e4 >= 1) && (t3 = 1), this.setProgress(t3), lt(this._time / this.duration, 6) == 1 && this.end();
- }
- return this;
- }, Object.defineProperty(e3.prototype, "delayed", { get: function() {
- return !!this._delayTimeout;
- }, enumerable: true, configurable: true }), e3.prototype.stopSameAnimations = function() {
- var t3 = this;
- Ut(oe(this.object.animations), function(e4) {
- if (e4 !== t3 && !e4.delayed) {
- var i3 = [];
- Ut(t3.animationOptions, function(t4) {
- Ut(e4.animationOptions, function(n3) {
- t4.property == n3.property && t4.childObject == n3.childObject && (i3.push(n3), e4.animationOptions.length == 0 && e4.kill());
- });
- }), Ut(i3, function(t4) {
- ee(e4.animationOptions, t4);
- });
- }
- });
- }, e3.prototype.asFunction = function(e4) {
- return e4 == "easing" || t2.prototype.asIs.call(this, e4);
- }, e3;
- }(mn), ms = "http://www.w3.org/2000/svg", vs = "http://www.w3.org/2000/xmlns/", bs = "http://www.w3.org/1999/xlink";
- function xs(t2, e3, i3, n3) {
- return t2.addEventListener(e3, i3, n3 || false), new ye(function() {
- t2.removeEventListener(e3, i3, n3 || false);
- });
- }
- function _s(t2) {
- if (Q(t2)) {
- var e3 = document.getElementById(t2);
- if (e3 == null && (e3 = document.getElementsByClassName(t2)[0]), e3 instanceof HTMLElement)
- return e3;
- } else if (t2 instanceof HTMLElement)
- return t2;
- }
- function Ps(t2, e3) {
- if (t2)
- if (t2.classList)
- Ut(e3.split(" "), function(e4) {
- t2.classList.add(e4);
- });
- else {
- var i3 = t2.getAttribute("class");
- i3 ? t2.setAttribute("class", i3.split(" ").filter(function(t3) {
- return t3 !== e3;
- }).join(" ") + " " + e3) : t2.setAttribute("class", e3);
- }
- }
- function ws(t2, e3) {
- if (t2)
- if (t2.classList)
- t2.classList.remove(e3);
- else {
- var i3 = t2.getAttribute("class");
- i3 && t2.setAttribute("class", i3.split(" ").filter(function(t3) {
- return t3 !== e3;
- }).join(" "));
- }
- }
- function Cs(t2, e3, i3) {
- t2.style[e3] = i3;
- }
- function Os(t2, e3) {
- return t2.currentStyle ? t2.currentStyle[e3] : document.defaultView.getComputedStyle(t2, null).getPropertyValue(e3);
- }
- function Ss() {
- if (document.activeElement && document.activeElement != document.body)
- if (document.activeElement.blur)
- document.activeElement.blur();
- else {
- var t2 = document.createElement("button");
- t2.style.position = "fixed", t2.style.top = "0px", t2.style.left = "-10000px", document.body.appendChild(t2), t2.focus(), t2.blur(), document.body.removeChild(t2);
- }
- }
- function Is(t2) {
- if (t2 instanceof HTMLElement)
- t2.focus();
- else {
- var e3 = document.createElement("input"), i3 = document.createElementNS(ms, "foreignObject");
- i3.appendChild(e3), t2.appendChild(i3), e3.focus(), e3.disabled = true, i3.remove();
- }
- }
- function Ds(t2) {
- if (t2.outerHTML)
- return t2.outerHTML;
- var e3 = document.createElement("div"), i3 = t2.cloneNode(true);
- return e3.appendChild(i3), e3.innerHTML;
- }
- function ks(t2) {
- return t2 instanceof Object && t2 && t2.nodeType === 1;
- }
- function Ts(t2, e3) {
- for (var i3 = e3; ; ) {
- if (t2 === i3)
- return true;
- if (i3.parentNode == null) {
- if (i3.host == null)
- return false;
- i3 = i3.host;
- } else
- i3 = i3.parentNode;
- }
- }
- function As(t2) {
- for (var e3 = t2; ; ) {
- if (e3.parentNode == null)
- return e3.host != null ? e3 : null;
- e3 = e3.parentNode;
- }
- }
- function Vs(t2) {
- for (var e3 = t2.ownerDocument, i3 = t2; ; ) {
- if (i3.parentNode == null)
- return i3 === e3 || i3.host != null ? i3 : null;
- i3 = i3.parentNode;
- }
- }
- function Fs(t2, e3) {
- Ut(t2.attributes, function(t3) {
- t3.value != null && e3.setAttribute(t3.name, t3.value);
- });
- }
- function Ms(t2) {
- ke(function() {
- try {
- var e3 = t2.getBoundingClientRect(), i3 = e3.left - Math.round(e3.left), n3 = e3.top - Math.round(e3.top);
- i3 !== 0 && Te(function() {
- t2.style.left = i3 + "px";
- }), n3 !== 0 && Te(function() {
- t2.style.top = n3 + "px";
- });
- } catch (t3) {
- }
- });
- }
- var Ls = function(t2) {
- function e3(e4, i3, n3) {
- var r3 = this, s2 = function(t3) {
- return t3 == null ? (Z(fs) || ((e5 = document.createElement("style")).type = "text/css", ls.nonce != "" && e5.setAttribute("nonce", ls.nonce), document.head.appendChild(e5), fs = e5.sheet), fs) : ((e5 = document.createElement("style")).type = "text/css", ls.nonce != "" && e5.setAttribute("nonce", ls.nonce), t3.appendChild(e5), e5.sheet);
- var e5;
- }(e4);
- return (r3 = t2.call(this, function() {
- var t3 = Xt(s2.cssRules, r3._rule);
- if (t3 === -1)
- throw new Error("Could not dispose StyleRule");
- s2.deleteRule(t3);
- }) || this)._rule = function(t3, e5) {
- var i4 = t3.cssRules.length;
- return t3.insertRule(e5 + "{}", i4), t3.cssRules[i4];
- }(s2, i3), Ne(n3, function(t3, e5) {
- r3.setStyle(t3, e5);
- }), r3;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "selector", { get: function() {
- return this._rule.selectorText;
- }, set: function(t3) {
- this._rule.selectorText = t3;
- }, enumerable: true, configurable: true }), e3.prototype._setVendorPrefixName = function(t3, e4) {
- var i3 = this._rule.style;
- i3.setProperty("-webkit-" + t3, e4, ""), i3.setProperty("-moz-" + t3, e4, ""), i3.setProperty("-ms-" + t3, e4, ""), i3.setProperty("-o-" + t3, e4, ""), i3.setProperty(t3, e4, "");
- }, e3.prototype.setStyle = function(t3, e4) {
- t3 === "transition" ? this._setVendorPrefixName(t3, e4) : this._rule.style.setProperty(t3, e4, "");
- }, e3;
- }(ye), js = 0, Es = function(t2) {
- function e3(e4, i3, n3) {
- var r3 = this, s2 = Z(n3) ? n3 : "__style_" + ++js + "__";
- return (r3 = t2.call(this, e4, "." + s2, i3) || this)._className = s2, r3;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "className", { get: function() {
- return this._className;
- }, set: function(t3) {
- this._className = t3, this.selector = "." + t3;
- }, enumerable: true, configurable: true }), e3.prototype.toString = function() {
- return this._className;
- }, e3;
- }(Ls);
- function Rs(t2) {
- if (document.readyState !== "loading")
- t2();
- else {
- var e3 = function() {
- document.readyState !== "loading" && (document.removeEventListener("readystatechange", e3), t2());
- };
- document.addEventListener("readystatechange", e3);
- }
- }
- function Bs(t2) {
- var e3 = Os(t2, "font-family");
- if (e3)
- return e3;
- var i3 = t2.parentElement || t2.parentNode;
- return i3 ? Bs(i3) : void 0;
- }
- function Hs(t2) {
- var e3 = Os(t2, "font-size");
- if (e3)
- return e3;
- var i3 = t2.parentElement || t2.parentNode;
- return i3 ? Hs(i3) : void 0;
- }
- function Ns(t2, e3) {
- var i3 = t2.getBoundingClientRect(), n3 = it(e3) ? e3 : e3 ? [e3] : [];
- if (n3.length) {
- for (var r3 = 0; r3 < n3.length; r3++) {
- var s2 = n3[r3];
- if (!Ns(s2))
- return false;
- var a2 = s2.getBoundingClientRect();
- if (i3.top >= 0 && i3.left >= 0 && i3.top <= a2.top + a2.height && i3.left <= a2.left + a2.width)
- return true;
- }
- return false;
- }
- return i3.top >= 0 && i3.left >= 0 && i3.top <= (window.innerHeight || document.documentElement.clientHeight) && i3.left <= (window.innerWidth || document.documentElement.clientWidth);
- }
- var Ws = function() {
- function t2(t3) {
- this._isDisposed = false, this._x = 0, this._y = 0, this._rotationY = 0, this._rotationX = 0, this._rotation = 0, this._scale = 1, this.node = typeof t3 == "string" ? document.createElementNS(ms, t3) : t3;
- }
- return t2.prototype.removeNode = function() {
- this.node && this.node.parentNode && this.node.parentNode.removeChild(this.node);
- }, Object.defineProperty(t2.prototype, "transformString", { get: function() {
- if (this.node)
- return this._transformString;
- }, enumerable: true, configurable: true }), t2.prototype.transform = function() {
- var t3 = "translate(" + this._x + "," + this._y + ")";
- if (this._scale != 1 && (t3 += (t3 ? " " : "") + "scale(" + this._scale + ")"), this._rotation != 0) {
- var e3 = "rotate(" + this._rotation + ")";
- this._rotationX && this._rotationY && (e3 = "rotate(" + this._rotation + " " + this._rotationX + " " + this._rotationY + ")"), t3 += (t3 ? " " : "") + e3;
- }
- this._transformString = t3, this.node.setAttribute("transform", t3);
- }, t2.prototype.getBBox = function() {
- var t3 = { width: 0, height: 0, x: 0, y: 0 };
- if (this.node && this.node.parentNode)
- try {
- var e3 = this.node.getBBox();
- t3.x = e3.x, t3.y = e3.y, t3.width = e3.width, t3.height = e3.height;
- } catch (t4) {
- }
- return t3;
- }, t2.prototype.moveTo = function(t3) {
- if (t3) {
- var e3 = t3.x, i3 = t3.y;
- this._x == e3 && this._y == i3 || (this._x = e3, this._y = i3, this.transform());
- }
- }, Object.defineProperty(t2.prototype, "content", { get: function() {
- return this.node.innerHTML || "";
- }, set: function(t3) {
- this.node.innerHTML = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "textContent", { get: function() {
- return this.node.textContent || "";
- }, set: function(t3) {
- this.node.textContent = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "x", { get: function() {
- return this._x;
- }, set: function(t3) {
- this._x != t3 && (this._x = t3, this.transform());
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "y", { get: function() {
- return this._y;
- }, set: function(t3) {
- this._y != t3 && (this._y = t3, this.transform());
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "rotation", { get: function() {
- return this._rotation;
- }, set: function(t3) {
- this._rotation != t3 && (this._rotation = t3, this.transform());
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "rotationX", { get: function() {
- return this._rotationX;
- }, set: function(t3) {
- this._rotationX != t3 && (this._rotationX = t3, this.transform());
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "rotationY", { get: function() {
- return this._rotationY;
- }, set: function(t3) {
- this._rotationY != t3 && (this._rotationY = t3, this.transform());
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "scale", { get: function() {
- return this._scale;
- }, set: function(t3) {
- this._scale != t3 && (this._scale = t3, this.transform());
- }, enumerable: true, configurable: true }), t2.prototype.removeAttr = function(t3) {
- this.node.removeAttribute(t3);
- }, t2.prototype.attr = function(t3) {
- var e3 = this;
- return Ne(t3, function(t4, i3) {
- Z(i3) ? e3.node.setAttribute(t4, i3) : e3.node.removeAttribute(t4);
- }), this;
- }, t2.prototype.getAttr = function(t3) {
- return this.node.getAttribute(t3);
- }, t2.prototype.attrNS = function(t3, e3, i3) {
- return this.node.setAttributeNS(t3, e3, i3), this;
- }, t2.prototype.getAttrNS = function(t3, e3) {
- return this.node.getAttributeNS(t3, e3);
- }, t2.prototype.removeStyle = function(t3) {
- this.node.style[t3] = null, delete this.node.style[t3];
- }, t2.prototype.getStyle = function(t3) {
- return this.node.style[t3];
- }, t2.prototype.addStyle = function(t3) {
- var e3 = this;
- return Ne(t3, function(t4, i3) {
- Z(i3) ? e3.node.style[t4] = i3 : e3.removeStyle(t4);
- }), this;
- }, t2.prototype.addClass = function(t3) {
- Ps(this.node, t3);
- }, t2.prototype.removeClass = function(t3) {
- ws(this.node, t3);
- }, t2.prototype.setClass = function(t3) {
- this.node.setAttribute("class", t3);
- }, t2.prototype.removeChildNodes = function() {
- for (; this.node.childNodes.length > 0; )
- this.node.removeChild(this.node.firstChild);
- }, t2.prototype.isDisposed = function() {
- return this._isDisposed;
- }, t2.prototype.dispose = function() {
- this.removeNode();
- }, t2;
- }(), Xs = function(t2) {
- function e3(e4) {
- return t2.call(this, e4) || this;
- }
- return C(e3, t2), e3.prototype.add = function(t3) {
- t3 && this.node.appendChild(t3.node);
- }, e3.prototype.addToBack = function(t3) {
- if (t3) {
- var e4 = this.node.childNodes[0];
- e4 ? e4 != t3.node && this.node.insertBefore(t3.node, e4) : this.node.appendChild(t3.node);
- }
- }, e3.prototype.removeElement = function(t3) {
- if (t3)
- try {
- t3.node && t3.node.parentNode == this.node && this.node.removeChild(t3.node);
- } catch (t4) {
- }
- }, e3.prototype.hasChild = function(t3) {
- for (var e4 = 0; e4 < this.node.childNodes.length; e4++)
- if (this.node.childNodes[e4] == t3.node)
- return true;
- return false;
- }, Object.defineProperty(e3.prototype, "content", { get: function() {
- return this.node.innerHTML;
- }, set: function(t3) {
- this.node.innerHTML = t3;
- }, enumerable: true, configurable: true }), e3.prototype.removeChildren = function() {
- if (this.node.childNodes)
- for (; this.node.childNodes.length > 0; ) {
- var t3 = this.node.firstChild;
- t3 && t3.parentNode && t3.parentNode.removeChild(t3);
- }
- }, e3;
- }(Ws), Ys = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._purposes = { stroke: dn("#e5e5e5"), fill: dn("#f3f3f3"), primaryButton: dn("#6794dc"), primaryButtonHover: dn("#6771dc"), primaryButtonDown: dn("#68dc75"), primaryButtonActive: dn("#68dc75"), primaryButtonText: dn("#FFFFFF"), primaryButtonStroke: dn("#FFFFFF"), secondaryButton: dn("#d9d9d9"), secondaryButtonHover: dn("#d9d9d9").brighten(-0.25), secondaryButtonDown: dn("#d9d9d9").brighten(-0.35), secondaryButtonActive: dn("#d9d9d9").brighten(0.35), secondaryButtonText: dn("#000000"), secondaryButtonStroke: dn("#FFFFFF"), grid: dn("#000000"), background: dn("#ffffff"), alternativeBackground: dn("#000000"), text: dn("#000000"), alternativeText: dn("#FFFFFF"), disabledBackground: dn("#999999"), positive: dn("#67dc75"), negative: dn("#dc6788") }, e4.className = "InterfaceColorSet", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.debug = function() {
- }, e3.prototype.getFor = function(t3) {
- return this._purposes[t3];
- }, e3.prototype.setFor = function(t3, e4) {
- this._purposes[t3] = e4;
- }, e3;
- }(yn);
- Ii.registeredClasses.InterfaceColorSet = Ys;
- var zs = new Pi(), Us = function(t2) {
- function e3() {
- var e4 = t2 !== null && t2.apply(this, arguments) || this;
- return e4._domEvents = {}, e4;
- }
- return C(e3, t2), e3.prototype._addDOMEvent = function(t3, e4, i3, n3) {
- var r3 = this;
- if (!this._domEvents[t3]) {
- var s2 = function(t4) {
- i3.call(n3, e4, t4);
- };
- this.target.element.addEventListener(t3, s2, false), this._domEvents[t3] = new be(function() {
- delete r3._domEvents[t3], r3.target.element.removeEventListener(t3, s2, false);
- });
- }
- return this._domEvents[t3].increment();
- }, e3.prototype._dispatchKeyboardEvent = function(t3, e4) {
- this.target.events.isEnabled(t3) && this.target.events.dispatchImmediately(t3, { type: t3, target: this.target, event: e4 });
- }, e3.prototype._on = function(e4, i3, n3, r3, s2, a2) {
- var o3 = t2.prototype._on.call(this, e4, i3, n3, r3, s2, a2), l2 = [o3.disposer];
- switch (i3) {
- case "hit":
- case "doublehit":
- case "rightclick":
- case "down":
- case "up":
- this.target.clickable = true;
- break;
- case "drag":
- case "dragstart":
- case "dragstop":
- this.target.draggable = true;
- break;
- case "track":
- this.target.trackable = true;
- break;
- case "resize":
- this.target.resizable = true;
- break;
- case "swipe":
- case "swipeleft":
- case "swiperight":
- this.target.swipeable = true;
- break;
- case "wheel":
- case "wheelup":
- case "wheeldown":
- case "wheelleft":
- case "wheelright":
- this.target.wheelable = true;
- break;
- case "over":
- case "out":
- this.target.hoverable = true;
- break;
- case "focus":
- case "blur":
- case "focusin":
- case "focusout":
- this.target.focusable = true;
- break;
- case "keydown":
- case "keyup":
- case "keypress":
- case "input":
- l2.push(this._addDOMEvent(i3, i3, this._dispatchKeyboardEvent, this));
- }
- return o3.disposer = new me(l2), o3;
- }, e3;
- }(Me), Gs = function(t2) {
- function e3(e4) {
- var i3 = t2.call(this) || this;
- return i3._eventDispatcher = new Us(i3), i3.eventDisposers = new Pi(), i3.replacedStyles = new Pi(), i3._clickable = false, i3._contextMenuDisabled = false, i3._hoverable = false, i3._trackable = false, i3._draggable = false, i3._swipeable = false, i3._resizable = false, i3._wheelable = false, i3._inert = false, i3._isHover = false, i3.isRealHover = false, i3._isHoverByTouch = false, i3._isDown = false, i3._isFocused = false, i3._isTouchProtected = false, i3._inertiaOptions = new Pi(), i3.inertias = new Pi(), i3._hitOptions = {}, i3._hoverOptions = {}, i3._swipeOptions = {}, i3._keyboardOptions = {}, i3._mouseOptions = {}, i3._cursorOptions = { defaultStyle: [{ property: "cursor", value: "default" }] }, i3._disposers.push(i3._eventDispatcher), i3._element = e4, i3.className = "InteractionObject", i3._disposers.push(new _i(i3.inertias)), i3._disposers.push(new _i(i3.eventDisposers)), i3.applyTheme(), i3;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "events", { get: function() {
- return this._eventDispatcher;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isHover", { get: function() {
- return this._isHover;
- }, set: function(t3) {
- this.isHover != t3 && (this._isHover = t3, t3 ? ua().overObjects.moveValue(this) : (this.isRealHover = false, ua().overObjects.removeValue(this)));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isHoverByTouch", { get: function() {
- return this._isHoverByTouch;
- }, set: function(t3) {
- this.isHoverByTouch != t3 && (this._isHoverByTouch = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "overPointers", { get: function() {
- return this._overPointers || (this._overPointers = new Fi()), this._overPointers;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isDown", { get: function() {
- return this._isDown;
- }, set: function(t3) {
- this.isDown != t3 && (this._isDown = t3, t3 ? ua().downObjects.moveValue(this) : ua().downObjects.removeValue(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "downPointers", { get: function() {
- return this._downPointers || (this._downPointers = new Fi()), this._downPointers;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isFocused", { get: function() {
- return this._isFocused;
- }, set: function(t3) {
- this.isFocused != t3 && (this._isFocused = t3, ua().focusedObject = t3 ? this : void 0);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isTouchProtected", { get: function() {
- return this._isTouchProtected;
- }, set: function(t3) {
- this._isTouchProtected != t3 && (this._isTouchProtected = t3, t3 ? ua().unprepElement(this) : (this.draggable || this.swipeable || this.trackable || this.resizable) && ua().prepElement(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "clickable", { get: function() {
- return this._clickable;
- }, set: function(t3) {
- this._clickable !== t3 && (this._clickable = t3, ua().processClickable(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "contextMenuDisabled", { get: function() {
- return this._contextMenuDisabled;
- }, set: function(t3) {
- this._contextMenuDisabled !== t3 && (this._contextMenuDisabled = t3, ua().processContextMenu(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hoverable", { get: function() {
- return this._hoverable;
- }, set: function(t3) {
- this._hoverable !== t3 && (this._hoverable = t3, ua().processHoverable(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "trackable", { get: function() {
- return this._trackable;
- }, set: function(t3) {
- this._trackable !== t3 && (this._trackable = t3, ua().processTrackable(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "draggable", { get: function() {
- return this._draggable;
- }, set: function(t3) {
- this._draggable !== t3 && (this._draggable = t3, ua().processDraggable(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "swipeable", { get: function() {
- return this._swipeable;
- }, set: function(t3) {
- this._swipeable !== t3 && (this._swipeable = t3, ua().processSwipeable(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "resizable", { get: function() {
- return this._resizable;
- }, set: function(t3) {
- this._resizable !== t3 && (this._resizable = t3, ua().processResizable(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "wheelable", { get: function() {
- return this._wheelable;
- }, set: function(t3) {
- this._wheelable !== t3 && (this._wheelable = t3, ua().processWheelable(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "inert", { get: function() {
- return this._inert;
- }, set: function(t3) {
- this._inert !== t3 && (this._inert = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "focusable", { get: function() {
- return this._focusable;
- }, set: function(t3) {
- this._focusable !== t3 && (this._focusable = t3, this._focusable && this.tabindex == -1 && (this._tabindex = 1), ua().processFocusable(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tabindex", { get: function() {
- return $(this._tabindex, -1);
- }, set: function(t3) {
- this._tabindex !== t3 && (this._tabindex = t3, t3 > -1 && (this.focusable = true), ua().processFocusable(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "element", { get: function() {
- return this._element;
- }, set: function(t3) {
- this._element = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "originalPosition", { get: function() {
- return this._originalPosition || { x: 0, y: 0 };
- }, set: function(t3) {
- this._originalPosition = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "originalScale", { get: function() {
- return $(this._originalScale, 1);
- }, set: function(t3) {
- this._originalScale !== t3 && (this._originalScale = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "originalAngle", { get: function() {
- return $(this._originalAngle, 0);
- }, set: function(t3) {
- this._originalAngle !== t3 && (this._originalAngle = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "inertiaOptions", { get: function() {
- return this.sprite && this.sprite._adapterO ? this.sprite._adapterO.apply("inertiaOptions", this._inertiaOptions) : this._inertiaOptions;
- }, set: function(t3) {
- this._inertiaOptions = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hitOptions", { get: function() {
- return this.sprite && this.sprite._adapterO ? this.sprite._adapterO.apply("hitOptions", this._hitOptions) : this._hitOptions;
- }, set: function(t3) {
- this._hitOptions = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hoverOptions", { get: function() {
- return this.sprite && this.sprite._adapterO ? this.sprite._adapterO.apply("hoverOptions", this._hoverOptions) : this._hoverOptions;
- }, set: function(t3) {
- this._hoverOptions = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "swipeOptions", { get: function() {
- return this.sprite && this.sprite._adapterO ? this.sprite._adapterO.apply("swipeOptions", this._swipeOptions) : this._swipeOptions;
- }, set: function(t3) {
- this._swipeOptions = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "keyboardOptions", { get: function() {
- return this.sprite && this.sprite._adapterO ? this.sprite._adapterO.apply("keyboardOptions", this._keyboardOptions) : this._keyboardOptions;
- }, set: function(t3) {
- this._keyboardOptions = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "mouseOptions", { get: function() {
- return this.sprite && this.sprite._adapterO ? this.sprite._adapterO.apply("mouseOptions", this._mouseOptions) : this._mouseOptions;
- }, set: function(t3) {
- this._mouseOptions = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cursorOptions", { get: function() {
- return this.sprite && this.sprite._adapterO ? this.sprite._adapterO.apply("cursorOptions", this._cursorOptions) : this._cursorOptions;
- }, set: function(t3) {
- this._cursorOptions = t3;
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.inertiaOptions = e4.inertiaOptions, this.hitOptions = e4.hitOptions, this.hoverOptions = e4.hoverOptions, this.swipeOptions = e4.swipeOptions, this.keyboardOptions = e4.keyboardOptions, this.cursorOptions = e4.cursorOptions, this.contextMenuDisabled = e4.contextMenuDisabled, ua().applyCursorOverStyle(this);
- }, e3.prototype.setEventDisposer = function(t3, e4, i3) {
- var n3 = this.eventDisposers.getKey(t3);
- e4 ? n3 == null && this.eventDisposers.setKey(t3, i3()) : n3 != null && (n3.dispose(), this.eventDisposers.removeKey(t3));
- }, e3.prototype.dispose = function() {
- t2.prototype.dispose.call(this);
- var e4 = ua();
- e4.overObjects.removeValue(this), e4.downObjects.removeValue(this), e4.trackedObjects.removeValue(this), e4.transformedObjects.removeValue(this), this.isHover && this.wheelable && e4.unlockWheel(), e4.focusedObject === this && (e4.focusedObject = void 0);
- }, e3;
- }(mn), Ks = function() {
- function t2(t3, e3) {
- this._disposed = false, this.directionX = 0, this.directionY = 0, this.interaction = t3, this.keyboardEvent = e3, this._startedOn = new Date().getTime(), ua().processDragStart(t3), Qa.animations.push(this), this.update();
- }
- return t2.prototype.update = function() {
- var t3 = this.interaction, e3 = ua().getKeyboardOption(t3, "speed"), i3 = ua().getKeyboardOption(t3, "accelleration"), n3 = ua().getKeyboardOption(t3, "accellerationDelay"), r3 = { x: 0, y: 0 };
- this.keyboardEvent.shiftKey ? (e3 *= 0.5, i3 = 1) : this.keyboardEvent.ctrlKey && (e3 *= 2);
- var s2 = new Date().getTime() - this._startedOn, a2 = s2 - n3;
- if (i3 > 0 && a2 > 0) {
- var o3 = s2 / n3;
- s2 = n3, r3.x += this.directionX * (e3 * i3 * o3 * a2), r3.y += this.directionY * (e3 * i3 * o3 * a2);
- }
- r3.x += this.directionX * (e3 * s2), r3.y += this.directionY * (e3 * s2), ua().handleTransformMove(t3, r3, { x: 0, y: 0 }, this.keyboardEvent, true, false);
- }, t2.prototype.isDisposed = function() {
- return this._disposed;
- }, t2.prototype.dispose = function() {
- this._disposed || (ua().processDragStop(this.interaction), ee(Qa.animations, this));
- }, t2;
- }(), Zs = function(t2) {
- function e3(e4, i3, n3, r3) {
- var s2 = t2.call(this) || this;
- return s2.animations = [], s2.className = "Inertia", s2.interaction = e4, s2.type = i3, s2.point = n3, s2.startPoint = r3, s2._disposers.push(new gs(s2.animations)), s2;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "x", { get: function() {
- return this.point.x;
- }, set: function(t3) {
- tt(t3) && (this.point.x = t3, this.handleMove());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "y", { get: function() {
- return this.point.y;
- }, set: function(t3) {
- tt(t3) && (this.point.y = t3, this.handleMove());
- }, enumerable: true, configurable: true }), e3.prototype.handleMove = function() {
- if (this.interaction.events.isEnabled("drag")) {
- var t3 = { type: "drag", target: this.interaction, shift: { x: this.x - this.startPoint.x, y: this.y - this.startPoint.y }, startPoint: this.startPoint, point: { x: this.x, y: this.y }, touch: false };
- this.interaction.events.dispatchImmediately("drag", t3);
- }
- }, e3.prototype.done = function() {
- this.interaction.inertias.removeKey(this.type), this.type === "move" && ua().processDragStop(this.interaction), this.dispose();
- }, e3;
- }(yn), qs = function() {
- function t2() {
- }
- return t2.prototype.getEventKey = function(t3) {
- var e3;
- switch (t3.keyCode || t3.which) {
- case 38:
- e3 = "up";
- break;
- case 40:
- e3 = "down";
- break;
- case 37:
- e3 = "left";
- break;
- case 39:
- e3 = "right";
- break;
- case 13:
- e3 = "enter";
- break;
- case 27:
- e3 = "esc";
- break;
- case 36:
- case 36:
- e3 = "home";
- break;
- case 35:
- case 35:
- e3 = "end";
- break;
- case 9:
- e3 = "tab";
- break;
- case 17:
- e3 = "ctrl";
- break;
- case 18:
- e3 = "alt";
- break;
- case 16:
- e3 = "shift";
- break;
- case 32:
- e3 = "space";
- break;
- case 33:
- e3 = "pgup";
- break;
- case 34:
- e3 = "pgdn";
- break;
- case 45:
- e3 = "ins";
- break;
- case 46:
- e3 = "del";
- break;
- case 107:
- e3 = "plus";
- break;
- case 109:
- e3 = "minus";
- break;
- default:
- e3 = "other";
- }
- return e3;
- }, t2.prototype.isKey = function(t3, e3) {
- var i3 = this.getEventKey(t3);
- return Q(e3) && (e3 = [e3]), e3.indexOf(i3) !== -1;
- }, t2.prototype.shiftKey = function(t3) {
- return t3.shiftKey;
- }, t2.prototype.ctrlKey = function(t3) {
- return t3.ctrlKey;
- }, t2.prototype.altKey = function(t3) {
- return t3.altKey;
- }, t2.prototype.metaKey = function(t3) {
- return t3.metaKey;
- }, t2;
- }(), $s = new qs(), Js = { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5, month: 2592e6, year: 31536e6 };
- function Qs(t2) {
- switch (t2) {
- case "year":
- return;
- case "month":
- return "year";
- case "week":
- case "day":
- return "month";
- case "hour":
- return "day";
- case "minute":
- return "hour";
- case "second":
- return "minute";
- case "millisecond":
- return "second";
- }
- }
- function ta(t2, e3) {
- return Z(e3) || (e3 = 1), Js[t2] * e3;
- }
- function ea() {
- return new Date();
- }
- function ia() {
- return ea().getTime();
- }
- function na(t2) {
- return new Date(t2.getTime());
- }
- function ra(t2, e3, i3, n3) {
- t2 = new Date(t2.getTime()), e3 = new Date(e3.getTime());
- var r3 = 0, s2 = 0;
- n3 || i3 == "millisecond" || (r3 = t2.getTimezoneOffset(), t2.setUTCMinutes(t2.getUTCMinutes() - r3), s2 = e3.getTimezoneOffset(), e3.setUTCMinutes(e3.getUTCMinutes() - s2));
- var a2 = false;
- switch (i3) {
- case "year":
- t2.getUTCFullYear() != e3.getUTCFullYear() && (a2 = true);
- break;
- case "month":
- (t2.getUTCFullYear() != e3.getUTCFullYear() || t2.getUTCMonth() != e3.getUTCMonth()) && (a2 = true);
- break;
- case "day":
- (t2.getUTCMonth() != e3.getUTCMonth() || t2.getUTCDate() != e3.getUTCDate()) && (a2 = true);
- break;
- case "hour":
- t2.getUTCHours() != e3.getUTCHours() && (a2 = true);
- break;
- case "minute":
- t2.getUTCMinutes() != e3.getUTCMinutes() && (a2 = true);
- break;
- case "second":
- t2.getUTCSeconds() != e3.getUTCSeconds() && (a2 = true);
- break;
- case "millisecond":
- t2.getTime() != e3.getTime() && (a2 = true);
- }
- if (a2)
- return true;
- var o3 = Qs(i3);
- return !!o3 && (t2.setUTCMinutes(t2.getUTCMinutes() + r3), e3.setUTCMinutes(e3.getUTCMinutes() + s2), ra(t2, e3, o3, n3));
- }
- function sa(t2, e3, i3, n3) {
- var r3 = 0;
- switch (n3 || e3 == "millisecond" || (r3 = t2.getTimezoneOffset(), t2.setUTCMinutes(t2.getUTCMinutes() - r3)), e3) {
- case "day":
- var s2 = t2.getUTCDate();
- t2.setUTCDate(s2 + i3);
- break;
- case "second":
- var a2 = t2.getUTCSeconds();
- t2.setUTCSeconds(a2 + i3);
- break;
- case "millisecond":
- var o3 = t2.getUTCMilliseconds();
- t2.setUTCMilliseconds(o3 + i3);
- break;
- case "hour":
- var l2 = t2.getUTCHours();
- t2.setUTCHours(l2 + i3);
- break;
- case "minute":
- var h2 = t2.getUTCMinutes();
- t2.setUTCMinutes(h2 + i3);
- break;
- case "year":
- var p2 = t2.getUTCFullYear();
- t2.setUTCFullYear(p2 + i3);
- break;
- case "month":
- var u2 = t2.getUTCMonth();
- t2.setUTCMonth(u2 + i3);
- break;
- case "week":
- var d2 = t2.getUTCDate();
- t2.setUTCDate(d2 + 7 * i3);
- }
- if (!n3 && e3 != "millisecond" && (t2.setUTCMinutes(t2.getUTCMinutes() + r3), e3 == "day" || e3 == "week" || e3 == "month" || e3 == "year")) {
- var c2 = t2.getTimezoneOffset();
- if (c2 != r3) {
- var f2 = c2 - r3;
- t2.setUTCMinutes(t2.getUTCMinutes() + f2), t2.getTimezoneOffset() != c2 && t2.setUTCMinutes(t2.getUTCMinutes() - f2);
- }
- }
- return t2;
- }
- function aa(t2, e3, i3, n3, r3, s2, a2, o3) {
- a2 === void 0 && (a2 = 0), tt(i3) || (i3 = 1);
- var l2 = 0;
- switch (o3 && ["day", "month", "week", "year"].indexOf(e3) != -1 && (t2 = oa(t2, o3)), r3 || e3 == "millisecond" || (l2 = t2.getTimezoneOffset(), t2.setUTCMinutes(t2.getUTCMinutes() - l2)), e3) {
- case "day":
- var h2 = t2.getUTCDate();
- if (i3 > 1) {
- if (s2) {
- s2 = aa(s2, "day", 1);
- var p2 = t2.getTime() - s2.getTime(), u2 = Math.floor(p2 / ta("day") / i3), d2 = ta("day", u2 * i3);
- t2.setTime(s2.getTime() + d2 - l2 * ta("minute"));
- }
- } else
- t2.setUTCDate(h2);
- t2.setUTCHours(0, 0, 0, 0);
- break;
- case "second":
- var c2 = t2.getUTCSeconds();
- i3 > 1 && (c2 = Math.floor(c2 / i3) * i3), t2.setUTCSeconds(c2, 0);
- break;
- case "millisecond":
- if (i3 == 1)
- return t2;
- var f2 = t2.getUTCMilliseconds();
- f2 = Math.floor(f2 / i3) * i3, t2.setUTCMilliseconds(f2);
- break;
- case "hour":
- var g2 = t2.getUTCHours();
- i3 > 1 && (g2 = Math.floor(g2 / i3) * i3), t2.setUTCHours(g2, a2, 0, 0);
- break;
- case "minute":
- var y2 = t2.getUTCMinutes();
- f2 = t2.getUTCMilliseconds(), i3 > 1 && (y2 = Math.floor(y2 / i3) * i3), t2.setUTCMinutes(y2, 0, 0);
- break;
- case "month":
- var m2 = t2.getUTCMonth();
- i3 > 1 && (m2 = Math.floor(m2 / i3) * i3), t2.setUTCMonth(m2, 1), t2.setUTCHours(0, a2, 0, 0);
- break;
- case "year":
- var v2 = t2.getUTCFullYear();
- i3 > 1 && (v2 = Math.floor(v2 / i3) * i3), t2.setUTCFullYear(v2, 0, 1), t2.setUTCHours(0, a2, 0, 0);
- break;
- case "week":
- var b2 = t2.getUTCDate(), x2 = t2.getUTCDay();
- tt(n3) || (n3 = 1), b2 = x2 >= n3 ? b2 - x2 + n3 : b2 - (7 + x2) + n3, t2.setUTCDate(b2), t2.setUTCHours(0, a2, 0, 0);
- }
- if (!r3 && e3 != "millisecond" && (t2.setUTCMinutes(t2.getUTCMinutes() + l2), e3 == "day" || e3 == "week" || e3 == "month" || e3 == "year")) {
- var _2 = t2.getTimezoneOffset();
- if (_2 != l2) {
- var P2 = _2 - l2;
- t2.setUTCMinutes(t2.getUTCMinutes() + P2);
- }
- }
- return t2;
- }
- function oa(t2, e3) {
- return new Date(t2.toLocaleString("en-US", { timeZone: e3 }));
- }
- function la(t2) {
- var e3 = new Date();
- return e3.setHours(0, 0, 0, 0), oa(e3, t2).getMinutes();
- }
- var ha = function(t2) {
- function e3() {
- var i3 = t2.call(this) || this;
- return i3._globalEventsAdded = false, i3._pointerEvents = { pointerdown: "mousedown", pointerup: "mouseup", pointermove: "mousemove", pointercancel: "mouseup", pointerover: "mouseover", pointerout: "mouseout", wheel: "wheel" }, i3._usePointerEventsOnly = false, i3._useTouchEventsOnly = false, i3._addHoverEvents = true, i3._passiveSupported = false, i3._delayedEvents = { out: [] }, i3.overObjects = new Fi(), i3.downObjects = new Fi(), i3.trackedObjects = new Fi(), i3.transformedObjects = new Fi(), i3.pointers = new Pi(), i3.inertiaOptions = new Pi(), i3.hitOptions = { doubleHitTime: 300, hitTolerance: 10, noFocus: true }, i3.hoverOptions = { touchOutBehavior: "leave", touchOutDelay: 1e3 }, i3.swipeOptions = { time: 500, verticalThreshold: 75, horizontalThreshold: 30 }, i3.keyboardOptions = { speed: 0.1, accelleration: 1.2, accellerationDelay: 2e3 }, i3.mouseOptions = { sensitivity: 1 }, i3.className = "Interaction", i3.body = i3.getInteraction(document.body), i3._disposers.push(i3.body), window.hasOwnProperty("PointerEvent") ? (i3._pointerEvents.pointerdown = "pointerdown", i3._pointerEvents.pointerup = "pointerup", i3._pointerEvents.pointermove = "pointermove", i3._pointerEvents.pointercancel = "pointercancel", i3._pointerEvents.pointerover = "pointerover", i3._pointerEvents.pointerout = "pointerout") : window.hasOwnProperty("MSPointerEvent") ? (i3._pointerEvents.pointerdown = "MSPointerDown", i3._pointerEvents.pointerup = "MSPointerUp", i3._pointerEvents.pointermove = "MSPointerMove", i3._pointerEvents.pointercancel = "MSPointerUp", i3._pointerEvents.pointerover = "MSPointerOver", i3._pointerEvents.pointerout = "MSPointerOut") : typeof matchMedia != "undefined" && matchMedia("(pointer:fine)").matches ? "ontouchstart" in window && (i3._addHoverEvents = false, i3._useTouchEventsOnly = true) : window.navigator.userAgent.match(/MSIE /) || i3.fullFF() ? i3._usePointerEventsOnly = true : i3._useTouchEventsOnly = true, "onwheel" in document.createElement("div") ? i3._pointerEvents.wheel = "wheel" : Z(document.onmousewheel) && (i3._pointerEvents.wheel = "mousewheel"), i3.inertiaOptions.setKey("move", { time: 100, duration: 500, factor: 1, easing: jr }), i3.inertiaOptions.setKey("resize", { time: 100, duration: 500, factor: 1, easing: jr }), i3._passiveSupported = e3.passiveSupported, i3.applyTheme(), i3;
- }
- return C(e3, t2), e3.prototype.fullFF = function() {
- return window.navigator.userAgent.match(/Firefox/) && !window.navigator.userAgent.match(/Android/);
- }, e3.prototype.debug = function() {
- }, e3.prototype.addGlobalEvents = function() {
- var t3 = this;
- this._globalEventsAdded || (this._useTouchEventsOnly || (this._disposers.push(xs(document, this._pointerEvents.pointerdown, function(e4) {
- t3.handleGlobalPointerDown(e4);
- })), this._disposers.push(xs(document, this._pointerEvents.pointermove, function(e4) {
- t3.handleGlobalPointerMove(e4);
- })), this._disposers.push(xs(document, this._pointerEvents.pointerup, function(e4) {
- t3.handleGlobalPointerUp(e4);
- })), this._disposers.push(xs(document, this._pointerEvents.pointercancel, function(e4) {
- t3.handleGlobalPointerUp(e4, true);
- })), this._disposers.push(xs(document, "mouseenter", function(e4) {
- Z(e4.relatedTarget) || e4.buttons != 0 && e4.which != 0 || t3.handleDocumentLeave(e4);
- }))), this._usePointerEventsOnly || (this._disposers.push(xs(document, "touchstart", function(e4) {
- t3.handleGlobalTouchStart(e4);
- })), this._disposers.push(xs(document, "touchmove", function(e4) {
- t3.handleGlobalTouchMove(e4);
- })), this._disposers.push(xs(document, "touchend", function(e4) {
- t3.handleGlobalTouchEnd(e4);
- }))), this._disposers.push(xs(document, "keydown", function(e4) {
- t3.handleGlobalKeyDown(e4);
- })), this._disposers.push(xs(document, "keyup", function(e4) {
- t3.handleGlobalKeyUp(e4);
- })), this._globalEventsAdded = true);
- }, e3.prototype.processClickable = function(t3) {
- this.processTouchable(t3);
- }, e3.prototype.processContextMenu = function(t3) {
- t3.contextMenuDisabled ? t3.eventDisposers.hasKey("contextMenuDisabled") || t3.eventDisposers.setKey("contextMenuDisabled", xs(t3.element, "contextmenu", function(t4) {
- t4.preventDefault();
- })) : t3.eventDisposers.hasKey("contextMenuDisabled") && t3.eventDisposers.getKey("contextMenuDisabled").dispose();
- }, e3.prototype.processHoverable = function(t3) {
- var e4 = this;
- if (t3.hoverable || t3.trackable)
- this.addGlobalEvents(), this.applyCursorOverStyle(t3), !t3.eventDisposers.hasKey("hoverable") && this._addHoverEvents && t3.eventDisposers.setKey("hoverable", new me([xs(t3.element, this._pointerEvents.pointerout, function(i4) {
- return e4.handlePointerOut(t3, i4);
- }), xs(t3.element, this._pointerEvents.pointerover, function(i4) {
- return e4.handlePointerOver(t3, i4);
- })])), t3.trackable;
- else {
- var i3 = t3.eventDisposers.getKey("hoverable");
- i3 != null && (i3.dispose(), t3.eventDisposers.removeKey("hoverable"));
- }
- this.processTouchable(t3);
- }, e3.prototype.processMovable = function(t3) {
- (t3.draggable || t3.swipeable || t3.trackable || t3.resizable) && (this.isGlobalElement(t3) || t3.isTouchProtected || this.prepElement(t3), this.applyCursorOverStyle(t3)), this.processTouchable(t3);
- }, e3.prototype.processTrackable = function(t3) {
- this.processHoverable(t3), this.processMovable(t3), t3.trackable ? this.trackedObjects.moveValue(t3) : this.trackedObjects.removeValue(t3);
- }, e3.prototype.processDraggable = function(t3) {
- this.processMovable(t3);
- }, e3.prototype.processSwipeable = function(t3) {
- this.processMovable(t3);
- }, e3.prototype.processResizable = function(t3) {
- this.processMovable(t3);
- }, e3.prototype.processWheelable = function(t3) {
- var e4 = this;
- if (t3.wheelable)
- t3.eventDisposers.hasKey("wheelable") || t3.eventDisposers.setKey("wheelable", new me([xs(t3.element, this._pointerEvents.wheel, function(i4) {
- return e4.handleMouseWheel(t3, i4);
- }, !!this._passiveSupported && { passive: false }), t3.events.on("out", function(i4) {
- t3.wheelable && e4.unlockWheel();
- }), t3.events.on("over", function(i4) {
- t3.wheelable && e4.lockWheel();
- })]));
- else {
- var i3 = t3.eventDisposers.getKey("wheelable");
- i3 != null && (i3.dispose(), t3.eventDisposers.removeKey("wheelable"));
- }
- }, e3.prototype.processFocusable = function(t3) {
- var e4 = this;
- if (t3.focusable === true && t3.tabindex > -1 && !this._useTouchEventsOnly)
- t3.eventDisposers.hasKey("focusable") || t3.eventDisposers.setKey("focusable", new me([xs(t3.element, "focus", function(i4) {
- return e4.handleFocus(t3, i4);
- }), xs(t3.element, "blur", function(i4) {
- return e4.handleBlur(t3, i4);
- }), xs(t3.element, this._pointerEvents.pointerdown, function(i4) {
- return e4.handleFocusBlur(t3, i4);
- }), xs(t3.element, "touchstart", function(i4) {
- return e4.handleFocusBlur(t3, i4);
- }, !!this._passiveSupported && { passive: false })]));
- else {
- var i3 = t3.eventDisposers.getKey("focusable");
- i3 != null && (i3.dispose(), t3.eventDisposers.removeKey("focusable"));
- }
- }, e3.prototype.processTouchable = function(t3) {
- var e4 = this;
- if (t3.clickable || t3.hoverable || t3.trackable || t3.draggable || t3.swipeable || t3.resizable)
- this.addGlobalEvents(), t3.eventDisposers.hasKey("touchable") || (this._useTouchEventsOnly || this._usePointerEventsOnly ? this._useTouchEventsOnly ? this._usePointerEventsOnly || t3.eventDisposers.setKey("touchable", xs(t3.element, "touchstart", function(i4) {
- return e4.handleTouchDown(t3, i4);
- }, !!this._passiveSupported && { passive: false })) : t3.eventDisposers.setKey("touchable", xs(t3.element, this._pointerEvents.pointerdown, function(i4) {
- return e4.handlePointerDown(t3, i4);
- })) : t3.eventDisposers.setKey("touchable", new me([xs(t3.element, this._pointerEvents.pointerdown, function(i4) {
- return e4.handlePointerDown(t3, i4);
- }), xs(t3.element, "touchstart", function(i4) {
- return e4.handleTouchDown(t3, i4);
- }, !!this._passiveSupported && { passive: false })])));
- else {
- var i3 = t3.eventDisposers.getKey("touchable");
- i3 != null && (i3.dispose(), t3.eventDisposers.removeKey("touchable"));
- }
- }, e3.prototype.handleFocus = function(t3, e4) {
- if (t3.focusable) {
- if (t3.isFocused = true, t3.events.isEnabled("focus") && !Qa.isPaused) {
- var i3 = { type: "focus", target: t3, event: e4 };
- t3.events.dispatchImmediately("focus", i3);
- }
- } else
- e4.preventDefault();
- }, e3.prototype.handleFocusBlur = function(t3, e4) {
- t3.focusable !== false && this.getHitOption(t3, "noFocus") && t3.events.once("focus", function() {
- t3.events.disableType("blur"), Ss(), t3.sprite && t3.sprite.handleBlur(), t3.events.enableType("blur");
- });
- }, e3.prototype.handleBlur = function(t3, e4) {
- if (t3.focusable) {
- if (t3.isFocused = false, t3.events.isEnabled("blur") && !Qa.isPaused) {
- var i3 = { type: "blur", target: t3, event: e4 };
- t3.events.dispatchImmediately("blur", i3);
- }
- } else
- e4.preventDefault();
- }, e3.prototype.handleGlobalKeyDown = function(t3) {
- if (this.focusedObject) {
- if ($s.isKey(t3, "esc"))
- Ss();
- else if (this.focusedObject.draggable && $s.isKey(t3, ["up", "down", "left", "right"])) {
- t3.preventDefault();
- var e4 = this.focusedObject, i3 = "interactionKeyboardObject";
- if (e4.eventDisposers.hasKey(i3))
- return;
- var n3 = new Ks(e4, t3);
- switch (e4.eventDisposers.setKey(i3, n3), $s.getEventKey(t3)) {
- case "up":
- n3.directionY = -1;
- break;
- case "down":
- n3.directionY = 1;
- break;
- case "left":
- n3.directionX = -1;
- break;
- case "right":
- n3.directionX = 1;
- }
- }
- }
- }, e3.prototype.handleGlobalKeyUp = function(t3) {
- var e4 = "interactionKeyboardObject";
- if (this.focusedObject) {
- var i3 = this.focusedObject.eventDisposers.getKey(e4);
- i3 != null && (t3.preventDefault(), i3.dispose(), this.focusedObject.eventDisposers.removeKey(e4)), $s.isKey(t3, "enter") && this.focusedObject.sprite && !this.focusedObject.sprite.events.isEnabled("toggled") && (this.focusedObject.sprite.events.isEnabled("hit") ? this.focusedObject.dispatchImmediately("hit") : this.focusedObject.sprite.showTooltipOn == "hit" && this.focusedObject.dispatchImmediately("up"));
- }
- }, e3.prototype.handleGlobalPointerMove = function(t3) {
- var e4 = this.getPointer(t3);
- if (e4.point = this.getPointerPoint(t3), this.events.isEnabled("track") && !Qa.isPaused) {
- var i3 = { type: "track", target: this, event: t3, pointer: e4, touch: e4.touch };
- this.events.dispatchImmediately("track", i3);
- }
- this.addBreadCrumb(e4, e4.point), this.handleGlobalMove(e4, t3);
- }, e3.prototype.handleGlobalPointerDown = function(t3) {
- this.processDelayed();
- var e4 = this.getPointer(t3);
- if (this.events.isEnabled("down") && !Qa.isPaused) {
- var i3 = { type: "down", target: this, event: t3, pointer: e4, touch: e4.touch };
- this.events.dispatchImmediately("down", i3);
- }
- }, e3.prototype.preventTouchAction = function(t3) {
- t3.defaultPrevented || t3.preventDefault();
- }, e3.prototype.handleGlobalPointerUp = function(t3, e4) {
- e4 === void 0 && (e4 = false);
- var i3 = this.getPointer(t3);
- if (this.events.isEnabled("up") && !Qa.isPaused) {
- var n3 = { type: "up", target: this, event: t3, pointer: i3, touch: i3.touch };
- this.events.dispatchImmediately("up", n3);
- }
- this.handleGlobalUp(i3, t3, e4);
- }, e3.prototype.handleGlobalTouchMove = function(t3) {
- for (var e4 = 0; e4 < t3.changedTouches.length; e4++) {
- var i3 = this.getPointer(t3.changedTouches[e4]);
- if (i3.point = this.getPointerPoint(t3.changedTouches[e4]), this.events.isEnabled("track") && !Qa.isPaused) {
- var n3 = { type: "track", target: this, event: t3, pointer: i3, touch: i3.touch };
- this.events.dispatchImmediately("track", n3);
- }
- this.addBreadCrumb(i3, i3.point), this.handleGlobalMove(i3, t3);
- }
- }, e3.prototype.handleGlobalTouchStart = function(t3) {
- this.processDelayed();
- for (var e4 = 0; e4 < t3.changedTouches.length; e4++) {
- var i3 = this.getPointer(t3.changedTouches[e4]);
- if (!this._usePointerEventsOnly && this.events.isEnabled("down") && !Qa.isPaused) {
- var n3 = { type: "down", target: this, event: t3, pointer: i3, touch: i3.touch };
- this.events.dispatchImmediately("down", n3);
- }
- }
- }, e3.prototype.handleGlobalTouchEnd = function(t3) {
- for (var e4 = 0; e4 < t3.changedTouches.length; e4++) {
- var i3 = this.getPointer(t3.changedTouches[e4]);
- if (this.events.isEnabled("up") && !Qa.isPaused) {
- var n3 = { type: "up", target: this, event: t3, pointer: i3, touch: i3.touch };
- this.events.dispatchImmediately("up", n3);
- }
- this.handleGlobalUp(i3, t3);
- }
- }, e3.prototype.handlePointerDown = function(t3, e4) {
- var i3 = this.getPointer(e4);
- (i3.touch || e4.which == 1 || e4.which == 3) && (i3.button = e4.which, this.resetPointer(i3, e4), this.handleDown(t3, i3, e4));
- }, e3.prototype.handlePointerOver = function(t3, e4) {
- var i3 = this.getPointer(e4);
- this.handleOver(t3, i3, e4);
- }, e3.prototype.handlePointerOut = function(t3, e4) {
- var i3 = this.getPointer(e4);
- this.handleOut(t3, i3, e4);
- }, e3.prototype.handleMouseWheel = function(t3, e4) {
- var i3 = this.getPointer(e4);
- i3.point = this.getPointerPoint(e4);
- var n3, r3, s2 = 1;
- if (e4.deltaMode == 1 && (s2 = 50), s2 *= this.getMouseOption(t3, "sensitivity"), !(e4 instanceof WheelEvent))
- throw new Error("Invalid event type");
- n3 = Math.round(-1 * e4.wheelDeltaX || e4.deltaX * s2), r3 = Math.round(-1 * e4.wheelDeltaY || e4.deltaY * s2), this.handleWheel(t3, i3, n3, r3, e4);
- }, e3.prototype.handleTouchDown = function(t3, e4) {
- for (var i3 = 0; i3 < e4.changedTouches.length; i3++) {
- var n3 = this.getPointer(e4.changedTouches[i3]);
- this.maybePreventDefault(t3, e4, n3), this.resetPointer(n3, e4.changedTouches[i3]), this.handleDown(t3, n3, e4);
- }
- }, e3.prototype.handleHit = function(t3, e4, i3) {
- var n3 = ia();
- if (t3.lastHit && t3.lastHit >= n3 - this.getHitOption(t3, "doubleHitTime")) {
- if (n3 - t3.lastHit < 100)
- return;
- if (t3.lastHit = void 0, t3.lastHitPointer = void 0, t3.events.isEnabled("doublehit") && !Qa.isPaused) {
- var r3 = { type: "doublehit", target: t3, point: e4.point, event: i3, touch: e4.touch };
- t3.events.dispatchImmediately("doublehit", r3);
- }
- } else
- t3.lastHit = n3, t3.lastHitPointer = e4, e4.button === 3 ? t3.events.isEnabled("rightclick") && !Qa.isPaused && (r3 = { type: "rightclick", target: t3, event: i3 }, t3.events.dispatchImmediately("rightclick", r3)) : t3.events.isEnabled("hit") && !Qa.isPaused && (r3 = { type: "hit", target: t3, event: i3, point: e4.point, touch: e4.touch }, t3.events.dispatchImmediately("hit", r3));
- }, e3.prototype.handleOver = function(t3, e4, i3, n3) {
- if (t3.hoverable) {
- var r3 = false;
- if (this.shouldCancelHovers(e4) && this.areTransformed() && this.moved(e4, this.getHitOption(t3, "hitTolerance")) && (r3 = true, this.cancelAllHovers(i3)), this.processDelayed(), t3.overPointers.moveValue(e4), !t3.isRealHover && (r3 || (t3.isHover = true, t3.isRealHover = true, this.overObjects.moveValue(t3)), this.handleTrack(this.body, e4, i3, true), t3.events.isEnabled("over") && !Qa.isPaused && !r3)) {
- var s2 = { type: "over", target: t3, event: i3, pointer: e4, touch: e4.touch };
- t3.events.dispatchImmediately("over", s2);
- }
- }
- }, e3.prototype.handleOut = function(t3, e4, i3, n3, r3) {
- var s2 = this;
- if (n3 === void 0 && (n3 = false), r3 === void 0 && (r3 = false), t3.hoverable && (t3.overPointers.removeValue(e4), t3.isHover && (!t3.hasDelayedOut || r3))) {
- if (n3 && t3.overPointers.length)
- return;
- if (e4 && e4.touch && !r3 && !this.old(e4)) {
- var a2 = this.getHoverOption(t3, "touchOutBehavior");
- if (a2 == "leave")
- return this._delayedEvents.out.push({ type: "out", io: t3, pointer: e4, event: i3, keepUntil: ia() + 500 }), void (t3.hasDelayedOut = true);
- if (a2 == "delay" && this.getHoverOption(t3, "touchOutDelay"))
- return void this._delayedEvents.out.push({ type: "out", io: t3, pointer: e4, event: i3, keepUntil: ia() + 500, timeout: this.setTimeout(function() {
- s2.handleOut(t3, e4, i3, true);
- }, this.getHoverOption(t3, "touchOutDelay")) });
- }
- if (t3.isHover = false, this.overObjects.removeValue(t3), !t3.isDisposed() && t3.events.isEnabled("out") && !Qa.isPaused) {
- var o3 = { type: "out", target: t3, event: i3, pointer: e4, touch: e4.touch };
- t3.events.dispatchImmediately("out", o3);
- }
- t3.overPointers.clear(), t3.hasDelayedOut = false;
- }
- }, e3.prototype.processDelayed = function() {
- for (var t3; t3 = this._delayedEvents.out.pop(); )
- t3.timeout && t3.timeout.dispose(), this.handleOut(t3.io, t3.pointer, t3.event, false, true);
- }, e3.prototype.handleDown = function(t3, e4, i3) {
- if (this.maybePreventDefault(t3, i3, e4), t3.inert && this.stopInertia(t3), this.handleOver(t3, e4, i3, true), t3.downPointers.moveValue(e4), this.applyCursorDownStyle(t3, e4), t3.isDown || (t3.focusable !== false && this.getHitOption(t3, "noFocus") && this.focusedObject && Ss(), t3.isDown = true, this.downObjects.moveValue(t3), t3.draggable && this.processDragStart(t3, e4, i3), t3.resizable && this.processResizeStart(t3, e4, i3)), t3.events.isEnabled("down") && !Qa.isPaused) {
- var n3 = { type: "down", target: t3, event: i3, pointer: e4, touch: e4.touch };
- t3.events.dispatchImmediately("down", n3);
- }
- }, e3.prototype.handleGlobalUp = function(t3, e4, i3) {
- var n3 = this;
- i3 === void 0 && (i3 = false);
- var r3 = this.downObjects.values.slice();
- r3.sort(function(t4, e5) {
- if (t4 && e5) {
- var i4 = t4.element.compareDocumentPosition(e5.element);
- return i4 & Node.DOCUMENT_POSITION_CONTAINED_BY ? 1 : i4 & Node.DOCUMENT_POSITION_CONTAINS ? -1 : 0;
- }
- return 0;
- }), Ut(r3, function(r4) {
- r4 && r4.downPointers.contains(t3) && n3.handleUp(r4, t3, e4, i3);
- });
- }, e3.prototype.handleDocumentLeave = function(t3) {
- var e4 = this;
- ti(this.downObjects.backwards().iterator(), function(i3) {
- i3.downPointers.each(function(n3) {
- e4.handleUp(i3, n3, t3);
- });
- });
- }, e3.prototype.handleUp = function(t3, e4, i3, n3) {
- if (n3 === void 0 && (n3 = false), this.restoreCursorDownStyle(t3, e4), t3.downPointers.removeValue(e4), (e4.touch || this._useTouchEventsOnly) && this.handleOut(t3, e4, i3, true), t3.isDown) {
- if (t3.downPointers.length == 0 && (t3.isDown = false, this.downObjects.removeValue(t3)), t3.events.isEnabled("up") && !Qa.isPaused) {
- var r3 = { type: "up", target: t3, event: i3, pointer: e4, touch: e4.touch };
- t3.events.dispatchImmediately("up", r3);
- }
- n3 || (t3.swipeable && this.swiped(t3, e4) ? this.handleSwipe(t3, e4, i3) : (t3.clickable && !this.moved(e4, this.getHitOption(t3, "hitTolerance")) && this.handleHit(t3, e4, i3), t3.inert && this.moved(e4, this.getHitOption(t3, "hitTolerance")) ? this.handleInertia(t3, e4) : t3.draggable && this.processDragStop(t3, e4, i3), t3.resizable && this.processResizeStop(t3, e4, i3)));
- }
- }, e3.prototype.maybePreventDefault = function(t3, e4, i3) {
- !Z(e4) || !(t3.draggable || t3.swipeable || t3.trackable || t3.resizable) || this.isGlobalElement(t3) || e4.cancelable === false || t3.isTouchProtected && i3 && i3.touch || e4.preventDefault();
- }, e3.prototype.cancelAllHovers = function(t3) {
- var e4 = this;
- ti(this.overObjects.backwards().iterator(), function(i3) {
- if (i3) {
- var n3 = i3.overPointers.getIndex(0);
- e4.handleOut(i3, n3, t3, true, true);
- }
- });
- }, e3.prototype.shouldCancelHovers = function(t3) {
- return ls.disableHoverOnTransform == "always" || ls.disableHoverOnTransform == "touch" && t3.touch;
- }, e3.prototype.handleGlobalMove = function(t3, e4) {
- var i3, n3 = this;
- if (!t3.touch) {
- var r3 = typeof (i3 = t3.lastEvent).composedPath == "function" ? i3.composedPath()[0] : i3.target;
- ti(this.overObjects.backwards().iterator(), function(i4) {
- if (i4 && i4.overPointers.contains(t3) && i4.hoverable) {
- var s2 = false;
- i4.element && t3.lastEvent && Ts(i4.element, r3) || (s2 = true), s2 && n3.handleOut(i4, t3, e4, true);
- }
- });
- }
- ti(this.transformedObjects.backwards().iterator(), function(i4) {
- !i4.downPointers.contains(t3) || i4.swipeable && n3.swiping(i4, t3) || !i4.draggable && !i4.resizable || n3.handleTransform(i4, e4);
- }), ti(this.trackedObjects.backwards().iterator(), function(i4) {
- i4.overPointers.contains(t3) || n3.handleTrack(i4, t3, e4);
- });
- }, e3.prototype.handleTrack = function(t3, e4, i3, n3) {
- if (n3 === void 0 && (n3 = false), (n3 || this.moved(e4, 0)) && t3.events.isEnabled("track") && !Qa.isPaused) {
- var r3 = { type: "track", target: t3, event: i3, point: e4.point, pointer: e4, touch: e4.touch };
- t3.events.dispatchImmediately("track", r3);
- }
- }, e3.prototype.handleSwipe = function(t3, e4, i3) {
- if (t3.events.isEnabled("swipe") && !Qa.isPaused) {
- var n3 = { type: "swipe", target: t3, event: i3, touch: e4.touch };
- t3.events.dispatchImmediately("swipe", n3);
- }
- e4.startPoint.x < e4.point.x ? t3.events.isEnabled("swiperight") && !Qa.isPaused && (n3 = { type: "swiperight", target: t3, event: i3, touch: e4.touch }, t3.events.dispatchImmediately("swiperight", n3)) : t3.events.isEnabled("swipeleft") && !Qa.isPaused && (n3 = { type: "swipeleft", target: t3, event: i3, touch: e4.touch }, t3.events.dispatchImmediately("swipeleft", n3));
- }, e3.prototype.handleWheel = function(t3, e4, i3, n3, r3) {
- var s2 = { x: i3, y: n3 };
- t3.events.isEnabled("wheel") && !Qa.isPaused && t3.events.dispatchImmediately("wheel", { type: "wheel", target: t3, event: r3, point: e4.point, shift: s2 }), i3 < 0 ? t3.events.isEnabled("wheelleft") && !Qa.isPaused && t3.events.dispatchImmediately("wheelleft", { type: "wheelleft", target: t3, event: r3, point: e4.point, shift: s2 }) : i3 > 0 ? t3.events.isEnabled("swiperight") && !Qa.isPaused && t3.events.dispatchImmediately("wheelright", { type: "wheelright", target: t3, event: r3, point: e4.point, shift: s2 }) : n3 < 0 ? t3.events.isEnabled("wheelup") && !Qa.isPaused && t3.events.dispatchImmediately("wheelup", { type: "wheelup", target: t3, event: r3, point: e4.point, shift: s2 }) : n3 > 0 && t3.events.isEnabled("wheeldown") && !Qa.isPaused && t3.events.dispatchImmediately("wheeldown", { type: "wheeldown", target: t3, event: r3, point: e4.point, shift: s2 });
- }, e3.prototype.handleInertia = function(t3, e4) {
- t3.draggable && t3.downPointers.length === 0 && this.handleMoveInertia(t3, e4), t3.resizable && t3.downPointers.length > 1 && this.handleResizeInertia(t3, e4);
- }, e3.prototype.handleMoveInertia = function(t3, e4) {
- var i3 = t3, n3 = { x: e4.point.x, y: e4.point.y }, r3 = { x: e4.startPoint.x, y: e4.startPoint.y }, s2 = new Zs(i3, "move", n3, r3), a2 = this.getTrailPoint(e4, ia() - this.getInertiaOption(t3, "move", "time"));
- if (a2 !== void 0) {
- var o3 = this.getInertiaOption(t3, "move", "factor"), l2 = [{ to: e4.point.x + (e4.point.x - a2.point.x) * o3, property: "x" }, { to: e4.point.y + (e4.point.y - a2.point.y) * o3, property: "y" }], h2 = new ys(s2, l2, this.getInertiaOption(t3, "move", "duration"), this.getInertiaOption(t3, "move", "easing")).start();
- this._disposers.push(h2.events.on("animationended", function(t4) {
- s2.done();
- })), t3.inertias.setKey("move", s2);
- } else
- this.processDragStop(t3, e4, e4.lastUpEvent);
- }, e3.prototype.handleResizeInertia = function(t3, e4) {
- }, e3.prototype.handleTransform = function(t3, e4) {
- var i3, n3, r3, s2 = t3.downPointers.getIndex(0), a2 = null, o3 = null;
- s2 && (a2 = s2.point, o3 = s2.startPoint), r3 = n3 = { x: t3.originalPosition.x, y: t3.originalPosition.y };
- for (var l2 = true, h2 = 1; h2 < t3.downPointers.length; h2++) {
- var p2 = t3.downPointers.getIndex(h2);
- if (o3.x != p2.startPoint.x && o3.y != p2.startPoint.y) {
- l2 = false, n3 = (i3 = p2).point, r3 = i3.startPoint;
- break;
- }
- }
- var u2 = s2 && this.moved(s2, 0);
- if (t3.draggable && s2 && s2.dragStartEvents && s2.dragStartEvents.length && u2 && t3.events.isEnabled("dragstart") && !Qa.isPaused && t3.events.dispatchImmediately("dragstart", s2.dragStartEvents.shift()), l2 && t3.draggable)
- this.handleTransformMove(t3, a2, o3, e4, u2, s2.touch), this.shouldCancelHovers(s2) && this.moved(s2, this.getHitOption(t3, "hitTolerance")) && this.cancelAllHovers(e4);
- else {
- var d2 = i3 && this.moved(i3, 0);
- (this.shouldCancelHovers(s2) && this.moved(s2, this.getHitOption(t3, "hitTolerance")) || this.shouldCancelHovers(i3) && this.moved(i3, this.getHitOption(t3, "hitTolerance"))) && this.cancelAllHovers(e4), t3.draggable && t3.resizable ? (this.handleTransformMove(t3, a2, o3, e4, u2 && d2, s2.touch), this.handleTransformResize(t3, a2, o3, n3, r3, e4, u2 && d2, s2.touch)) : (t3.draggable && this.handleTransformMove(t3, a2, o3, e4, u2, s2.touch), !t3.resizable || l2 && !e4.ctrlKey || this.handleTransformResize(t3, a2, o3, n3, r3, e4, u2 && d2, s2.touch));
- }
- }, e3.prototype.handleTransformMove = function(t3, e4, i3, n3, r3, s2) {
- if (r3 && t3.events.isEnabled("drag") && !Qa.isPaused && (!t3.isTouchProtected || !s2)) {
- var a2 = { type: "drag", target: t3, event: n3, shift: { x: e4.x - i3.x, y: e4.y - i3.y }, startPoint: i3, point: e4, touch: s2 };
- t3.events.dispatchImmediately("drag", a2);
- }
- }, e3.prototype.handleTransformResize = function(t3, e4, i3, n3, r3, s2, a2, o3) {
- if (t3.events.isEnabled("resize") && !Qa.isPaused && (!t3.isTouchProtected || !o3)) {
- var l2 = { type: "resize", target: t3, event: s2, scale: Ot(e4, i3, n3, r3), startPoint1: i3, point1: e4, startPoint2: r3, point2: n3, touch: o3 };
- t3.events.dispatchImmediately("resize", l2);
- }
- }, e3.prototype.processDragStart = function(t3, e4, i3) {
- this.transformedObjects.moveValue(t3), this.shouldCancelHovers(e4) && this.cancelAllHovers(i3);
- var n3 = { type: "dragstart", target: t3, event: i3, touch: !!e4 && e4.touch };
- e4 && (e4.dragTarget = t3), e4 && e4.dragStartEvents ? e4.dragStartEvents.push(n3) : Qa.isPaused || t3.dispatchImmediately("dragstart", n3);
- }, e3.prototype.processDragStop = function(t3, e4, i3) {
- if (e4 || (e4 = this.getDragPointer(t3)), e4 && (e4.dragTarget = void 0), this.transformedObjects.removeValue(t3), (!e4 || this.moved(e4, 0)) && t3.events.isEnabled("dragstop") && !Qa.isPaused) {
- var n3 = { type: "dragstop", target: t3, touch: !!e4 && e4.touch };
- t3.events.dispatchImmediately("dragstop", n3);
- }
- }, e3.prototype.processResizeStart = function(t3, e4, i3) {
- this.transformedObjects.moveValue(t3);
- }, e3.prototype.processResizeStop = function(t3, e4, i3) {
- this.transformedObjects.removeValue(t3);
- }, e3.prototype.dragStart = function(t3, e4) {
- e4 || (e4 = this.getDragPointer(t3)), e4 && this.handleDown(t3, e4, e4.lastDownEvent);
- }, e3.prototype.dragStop = function(t3, e4, i3) {
- e4 || (e4 = this.getDragPointer(t3)), e4 && !i3 && this.handleGlobalUp(e4, e4.lastUpEvent, i3);
- }, e3.prototype.getDragPointer = function(t3) {
- return t3 ? t3.downPointers.getIndex(0) : this.transformedObjects.length ? this.getDragPointer(this.transformedObjects.getIndex(0)) : void 0;
- }, e3.prototype.getPointerId = function(t3) {
- return (Z(t3.identifier) ? "" + t3.identifier : Z(t3.pointerId) ? "" + t3.pointerId : "m").replace("-", "");
- }, e3.prototype.getPointerPoint = function(t3) {
- return { x: t3.clientX, y: t3.clientY };
- }, e3.prototype.getPointer = function(t3) {
- var e4, i3 = this.getPointerId(t3), n3 = this.getPointerPoint(t3);
- return this.pointers.hasKey(i3) ? (e4 = this.pointers.getKey(i3)).touch = this.isPointerTouch(t3) : (e4 = { id: i3, touch: this.isPointerTouch(t3), startPoint: n3, startTime: ia(), point: n3, track: [], swipeCanceled: false, dragStartEvents: [] }, this.addBreadCrumb(e4, n3), this.pointers.setKey(i3, e4)), e4.lastEvent = t3, this.lastPointer = e4, e4;
- }, e3.prototype.isPointerTouch = function(t3) {
- if (typeof Touch != "undefined" && t3 instanceof Touch)
- return true;
- if (typeof PointerEvent != "undefined" && t3 instanceof PointerEvent && Z(t3.pointerType))
- switch (t3.pointerType) {
- case "touch":
- case "pen":
- case 2:
- return true;
- case "mouse":
- case 4:
- return false;
- default:
- return !(t3 instanceof MouseEvent);
- }
- else if (Z(t3.type) && t3.type.match(/^mouse/))
- return false;
- return true;
- }, e3.prototype.resetPointer = function(t3, e4) {
- var i3 = this.getPointerPoint(e4);
- t3.startTime = ia(), t3.startPoint = { x: i3.x, y: i3.y }, t3.point = { x: i3.x, y: i3.y }, t3.track = [], t3.swipeCanceled = false;
- }, e3.prototype.addBreadCrumb = function(t3, e4) {
- t3.track.push({ timestamp: ia(), point: e4 });
- }, e3.prototype.lockDocument = function() {
- this.prepElement(this.body);
- }, e3.prototype.unlockDocument = function() {
- this.transformedObjects.length == 0 && this.restoreAllStyles(this.body);
- }, e3.prototype.lockElement = function(t3) {
- this.prepElement(t3);
- }, e3.prototype.unlockElement = function(t3) {
- this.restoreAllStyles(t3);
- }, e3.prototype.lockWheel = function() {
- window.addEventListener(this._pointerEvents.wheel, this.wheelLockEvent, !!this._passiveSupported && { passive: false });
- }, e3.prototype.unlockWheel = function() {
- window.removeEventListener(this._pointerEvents.wheel, this.wheelLockEvent);
- }, e3.prototype.isLocalElement = function(t3, e4, i3) {
- var n3 = this.getCache("local_pointer_" + t3.id);
- if (Z(n3))
- return n3;
- var r3 = Vs(e4) || document;
- if (r3.elementFromPoint) {
- var s2 = r3.elementFromPoint(t3.point.x, t3.point.y), a2 = s2 && Ts(e4, s2);
- return this.setCache("local_pointer_" + t3.id + "_" + i3, a2, 100), a2;
- }
- return false;
- }, e3.prototype.wheelLockEvent = function(t3) {
- return t3.preventDefault(), false;
- }, e3.prototype.prepElement = function(t3) {
- var e4 = t3.element;
- if (e4) {
- for (var i3 = ["touchAction", "webkitTouchAction", "MozTouchAction", "MSTouchAction", "msTouchAction", "oTouchAction", "userSelect", "webkitUserSelect", "MozUserSelect", "MSUserSelect", "msUserSelect", "oUserSelect", "touchSelect", "webkitTouchSelect", "MozTouchSelect", "MSTouchSelect", "msTouchSelect", "oTouchSelect", "touchCallout", "webkitTouchCallout", "MozTouchCallout", "MSTouchCallout", "msTouchCallout", "oTouchCallout", "contentZooming", "webkitContentZooming", "MozContentZooming", "MSContentZooming", "msContentZooming", "oContentZooming", "userDrag", "webkitUserDrag", "MozUserDrag", "MSUserDrag", "msUserDrag", "oUserDrag"], n3 = 0; n3 < i3.length; n3++)
- i3[n3] in e4.style && this.setTemporaryStyle(t3, i3[n3], "none");
- this.setTemporaryStyle(t3, "tapHighlightColor", "rgba(0, 0, 0, 0)");
- }
- }, e3.prototype.unprepElement = function(t3) {
- var e4 = t3.element;
- if (e4) {
- for (var i3 = ["touchAction", "webkitTouchAction", "MozTouchAction", "MSTouchAction", "msTouchAction", "oTouchAction", "userSelect", "webkitUserSelect", "MozUserSelect", "MSUserSelect", "msUserSelect", "oUserSelect", "touchSelect", "webkitTouchSelect", "MozTouchSelect", "MSTouchSelect", "msTouchSelect", "oTouchSelect", "touchCallout", "webkitTouchCallout", "MozTouchCallout", "MSTouchCallout", "msTouchCallout", "oTouchCallout", "contentZooming", "webkitContentZooming", "MozContentZooming", "MSContentZooming", "msContentZooming", "oContentZooming", "userDrag", "webkitUserDrag", "MozUserDrag", "MSUserDrag", "msUserDrag", "oUserDrag"], n3 = 0; n3 < i3.length; n3++)
- i3[n3] in e4.style && this.restoreStyle(t3, i3[n3]);
- this.restoreStyle(t3, "tapHighlightColor");
- }
- }, e3.prototype.getHitOption = function(t3, e4) {
- var i3 = t3.hitOptions[e4];
- return i3 === void 0 && (i3 = this.hitOptions[e4]), i3;
- }, e3.prototype.getHoverOption = function(t3, e4) {
- var i3 = t3.hoverOptions[e4];
- return i3 === void 0 && (i3 = this.hoverOptions[e4]), i3;
- }, e3.prototype.getSwipeOption = function(t3, e4) {
- var i3 = t3.swipeOptions[e4];
- return i3 === void 0 && (i3 = this.swipeOptions[e4]), i3;
- }, e3.prototype.getKeyboardOption = function(t3, e4) {
- var i3 = t3.keyboardOptions[e4];
- return i3 === void 0 && (i3 = this.keyboardOptions[e4]), i3;
- }, e3.prototype.getMouseOption = function(t3, e4) {
- var i3 = t3.mouseOptions[e4];
- return i3 === void 0 && (i3 = this.mouseOptions[e4]), i3;
- }, e3.prototype.getInertiaOption = function(t3, e4, i3) {
- var n3 = t3.inertiaOptions.getKey(e4);
- return n3 && Z(n3[i3]) ? n3[i3] : this.inertiaOptions.getKey(e4)[i3];
- }, e3.prototype.stopInertia = function(t3) {
- for (var e4, i3 = ["move", "resize"], n3 = 0; n3 < i3.length; n3++)
- if (e4 = i3[n3], t3.inertias.hasKey(e4)) {
- var r3 = t3.inertias.getKey(e4);
- if (r3) {
- r3.dispose();
- continue;
- }
- }
- }, e3.prototype.swiping = function(t3, e4) {
- var i3 = ia();
- return !(e4.swipeCanceled || !t3.swipeable) && Math.abs(e4.startPoint.y - e4.point.y) < this.getSwipeOption(t3, "verticalThreshold") && e4.startTime > i3 - this.getSwipeOption(t3, "time");
- }, e3.prototype.swiped = function(t3, e4) {
- var i3 = ia();
- return !e4.swipeCanceled && Math.abs(e4.startPoint.x - e4.point.x) > this.getSwipeOption(t3, "horizontalThreshold") && Math.abs(e4.startPoint.y - e4.point.y) < this.getSwipeOption(t3, "verticalThreshold") && e4.startTime > i3 - this.getSwipeOption(t3, "time");
- }, e3.prototype.applyCursorOverStyle = function(t3) {
- var e4 = t3.cursorOptions;
- if (Z(e4.overStyle))
- for (var i3 = 0; i3 < e4.overStyle.length; i3++)
- Cs(t3.element, e4.overStyle[i3].property, e4.overStyle[i3].value);
- }, e3.prototype.applyCursorDownStyle = function(t3, e4) {
- if (!e4 || !e4.touch) {
- var i3 = t3.cursorOptions.downStyle;
- if (t3.downPointers.contains(e4) && Z(i3))
- for (var n3 = 0; n3 < i3.length; n3++)
- this.setTemporaryStyle(this.body, i3[n3].property, i3[n3].value), this.setTemporaryStyle(t3, i3[n3].property, i3[n3].value);
- }
- }, e3.prototype.restoreCursorDownStyle = function(t3, e4) {
- if (!e4 || !e4.touch) {
- var i3 = t3.cursorOptions.downStyle;
- if (t3.downPointers.contains(e4) && Z(i3))
- for (var n3 = 0; n3 < i3.length; n3++)
- this.restoreStyle(this.body, i3[n3].property), this.restoreStyle(t3, i3[n3].property);
- }
- }, e3.prototype.setGlobalStyle = function(t3) {
- for (var e4 = ua().body, i3 = it(t3) ? t3 : [t3], n3 = 0; n3 < i3.length; n3++)
- this.setTemporaryStyle(e4, i3[n3].property, i3[n3].value);
- }, e3.prototype.restoreGlobalStyle = function(t3) {
- for (var e4 = ua().body, i3 = it(t3) ? t3 : [t3], n3 = 0; n3 < i3.length; n3++)
- this.restoreStyle(e4, i3[n3].property);
- }, e3.prototype.isGlobalElement = function(t3) {
- return document.body === t3.element;
- }, e3.prototype.moved = function(t3, e4, i3) {
- var n3 = this.getShift(t3);
- return Math.abs(n3.x) > e4 || Math.abs(n3.y) > e4;
- }, e3.prototype.old = function(t3, e4) {
- return e4 === void 0 && (e4 = 300), ia() - t3.startTime > e4;
- }, e3.prototype.getShift = function(t3) {
- return { x: t3.startPoint.x - t3.point.x, y: t3.startPoint.y - t3.point.y };
- }, e3.prototype.getTrailPoint = function(t3, e4) {
- for (var i3, n3 = 0; n3 < t3.track.length; n3++)
- if (t3.track[n3].timestamp >= e4) {
- i3 = t3.track[n3];
- break;
- }
- return i3;
- }, e3.prototype.pointerExists = function(t3, e4) {
- var i3 = false;
- return t3.each(function(t4) {
- t4 != e4 && (i3 = t4.point.x == e4.point.x && t4.point.y == e4.point.y);
- }), i3;
- }, e3.prototype.getInteraction = function(t3) {
- return new Gs(t3);
- }, e3.prototype.setTemporaryStyle = function(t3, e4, i3) {
- var n3 = t3.element;
- Z(n3.style[e4]) && !t3.replacedStyles.hasKey(e4) && t3.replacedStyles.setKey(e4, n3.style[e4]), Cs(n3, e4, i3);
- }, e3.prototype.restoreStyle = function(t3, e4) {
- t3.replacedStyles.hasKey(e4) ? (t3.element.style[e4] = t3.replacedStyles.getKey(e4), t3.replacedStyles.removeKey(e4)) : delete t3.element.style[e4];
- }, e3.prototype.restoreAllStyles = function(t3) {
- ti(t3.replacedStyles.iterator(), function(e4) {
- var i3 = e4[0], n3 = e4[1];
- t3.element.style[i3] = n3, t3.replacedStyles.removeKey(i3);
- });
- }, e3.prototype.dispose = function() {
- this.isDisposed() || (t2.prototype.dispose.call(this), this.restoreAllStyles(this.body), this.unlockWheel());
- }, e3.prototype.log = function(t3, e4, i3) {
- if (e4.changedTouches)
- for (var n3 = 0; n3 < e4.changedTouches.length; n3++)
- this.logTouch(t3, e4.type, e4.changedTouches[n3]);
- else {
- var r3, s2 = "";
- if (e4.pointerType)
- switch (e4.pointerType) {
- case 2:
- s2 = "touch";
- break;
- case 4:
- s2 = "mouse";
- break;
- default:
- s2 = e4.pointerType;
- }
- else
- s2 = typeof TouchEvent != "undefined" && e4 instanceof TouchEvent ? "touch" : e4.type.match(/^mouse/) ? "mouse" : "???";
- r3 = Z(e4.identifier) ? e4.identifier : Z(e4.pointerId) ? e4.pointerId : "???", i3 ? console.log(t3 + " (" + i3.uid + ") " + e4.type + " " + s2 + " " + r3) : console.log(t3 + " " + e4.type + " " + s2 + " " + r3);
- }
- }, e3.prototype.areTransformed = function(t3) {
- var e4 = this.transformedObjects.length;
- if (t3)
- for (var i3 = it(t3) ? t3 : [t3], n3 = 0; n3 < i3.length; n3++)
- this.transformedObjects.contains(i3[n3]) && e4--;
- return e4 > 0;
- }, e3.prototype.logTouch = function(t3, e4, i3) {
- console.log(t3 + " " + e4 + " touch " + i3.identifier);
- }, Object.defineProperty(e3, "passiveSupported", { get: function() {
- var t3 = this;
- if (this._passiveSupported == null)
- try {
- var e4 = Object.defineProperty({}, "passive", { get: function() {
- t3._passiveSupported = true;
- } });
- window.addEventListener("test", e4, e4), window.removeEventListener("test", e4, e4);
- } catch (t4) {
- this._passiveSupported = false;
- }
- return this._passiveSupported;
- }, enumerable: true, configurable: true }), e3;
- }(mn), pa = null;
- function ua() {
- return pa == null && (pa = new ha()), pa;
- }
- var da = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.adapter = new Yi(e4), e4._elements = {}, e4._IOs = {}, e4._content = "", e4._title = "", e4._classPrefix = "ampopup", e4._defaultStyles = true, e4._showCurtain = false, e4._draggable = true, e4._align = "center", e4._dynamicResize = true, e4._verticalAlign = "middle", e4._shift = { x: 0, y: 0 }, e4._tempShift = { x: 0, y: 0 }, e4._readerTitle = "", e4._closable = true, e4._cssLoaded = false, e4._fitTo = "window", e4.isTemplate = false, e4._sized = false, e4.className = "Popup", e4;
- }
- return C(e3, t2), e3.prototype.open = function() {
- this.container && (this._elements.wrapper && this.container.appendChild(this._elements.wrapper), this._elements.curtain && (this.container.appendChild(this._elements.curtain), this.showCurtain = this.showCurtain), this.positionElement(), this.dispatchImmediately("opened"));
- }, e3.prototype.close = function() {
- this._elements.wrapper && this._elements.wrapper.parentElement && this._elements.wrapper.parentElement.removeChild(this._elements.wrapper), this._elements.curtain && this._elements.curtain.parentElement && this._elements.curtain.parentElement.removeChild(this._elements.curtain), this.dispatchImmediately("closed"), this.releasePointers();
- }, e3.prototype.dispose = function() {
- this.close(), t2.prototype.dispose.call(this);
- }, e3.prototype.positionElement = function(t3) {
- var e4 = this;
- t3 === void 0 && (t3 = true), this._elements.wrapper && setTimeout(function() {
- if (e4._elements.wrapper) {
- if (t3 || !e4._sized) {
- e4._elements.wrapper.style.opacity = "0.01", e4._elements.wrapper.style.left = "0", e4._elements.wrapper.style.top = "0", e4._elements.wrapper.style.margin = "0 0 0 0", e4._elements.wrapper.style.width = "", e4._elements.wrapper.style.height = "";
- var i3 = e4._elements.wrapper.getBoundingClientRect();
- e4._elements.wrapper.style.width = i3.width + "px", e4._elements.wrapper.style.height = i3.height + "px", e4._sized = true;
- }
- if (e4.dynamicResize)
- for (var n3 = e4._elements.wrapper.getElementsByTagName("img"), r3 = 0; r3 < n3.length; r3++) {
- var s2 = n3[r3];
- if (!s2.complete) {
- s2.addEventListener("load", function() {
- e4.positionElement(true);
- });
- break;
- }
- }
- setTimeout(function() {
- if (e4._elements.wrapper) {
- var i4;
- switch (!t3 && e4._sized || !e4._bbox ? (i4 = e4._elements.wrapper.getBoundingClientRect(), e4._elements.wrapper.style.opacity = "") : i4 = e4._bbox, e4.align) {
- case "left":
- e4._elements.wrapper.style.left = "0", e4._elements.wrapper.style.right = "auto", e4._elements.wrapper.style.marginLeft = e4.toStyle(e4._shift.x + e4._tempShift.x);
- break;
- case "center":
- e4._elements.wrapper.style.left = "50%", e4._elements.wrapper.style.right = "auto", e4._elements.wrapper.style.marginLeft = e4.toStyle(Math.round(-i4.width / 2) + (e4._shift.x + e4._tempShift.x));
- break;
- case "right":
- e4._elements.wrapper.style.left = "auto", e4._elements.wrapper.style.right = "0", e4._elements.wrapper.style.marginLeft = e4.toStyle(e4._shift.x + e4._tempShift.x);
- break;
- default:
- e4._elements.wrapper.style.left = e4.toStyle(e4.left) || "auto", e4._elements.wrapper.style.right = e4.toStyle(e4.right) || "auto", e4._elements.wrapper.style.marginLeft = e4.toStyle(e4._shift.x + e4._tempShift.x);
- }
- switch (e4.verticalAlign) {
- case "top":
- e4._elements.wrapper.style.top = "0", e4._elements.wrapper.style.bottom = "auto", e4._elements.wrapper.style.marginTop = e4.toStyle(e4._shift.y + e4._tempShift.y);
- break;
- case "middle":
- e4._elements.wrapper.style.top = "50%", e4._elements.wrapper.style.bottom = "auto", e4._elements.wrapper.style.marginTop = e4.toStyle(Math.round(-i4.height / 2) + (e4._shift.y + e4._tempShift.y));
- break;
- case "bottom":
- e4._elements.wrapper.style.top = "auto", e4._elements.wrapper.style.bottom = "0", e4._elements.wrapper.style.marginTop = e4.toStyle(e4._shift.y + e4._tempShift.y);
- break;
- default:
- e4._elements.wrapper.style.top = e4.toStyle(e4.top) || "auto", e4._elements.wrapper.style.bottom = e4.toStyle(e4.bottom) || "auto", e4._elements.wrapper.style.marginTop = e4.toStyle(e4._shift.y + e4._tempShift.y);
- }
- }
- }, 1);
- }
- }, 1);
- }, e3.prototype.setupDragging = function() {
- var t3 = this;
- this.draggable ? (this._IOs.header.events.has("drag") || this._IOs.header.events.on("drag", function(e4) {
- t3._tempShift.x = e4.shift.x, t3._tempShift.y = e4.shift.y, t3.positionElement(false);
- }), this._IOs.header.events.has("dragstop") || this._IOs.header.events.on("dragstop", function(e4) {
- t3._shift.x += t3._tempShift.x, t3._shift.y += t3._tempShift.y, t3._tempShift.x = 0, t3._tempShift.y = 0, t3.positionElement(false);
- })) : this._IOs.header && (ua().unprepElement(this._IOs.header), this._IOs.header.events.has("drag") && this._IOs.header.events.off("drag"), this._IOs.header.events.has("dragstop") && this._IOs.header.events.off("dragstop"));
- }, e3.prototype.toStyle = function(t3) {
- return Z(t3) ? tt(t3) ? t3 + "px" : t3.toString() : null;
- }, Object.defineProperty(e3.prototype, "classPrefix", { get: function() {
- return this.adapter.apply("classPrefix", this._classPrefix);
- }, set: function(t3) {
- this._classPrefix = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "classPrefixRaw", { get: function() {
- return this._classPrefix;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "content", { get: function() {
- return this.adapter.apply("content", this._content);
- }, set: function(t3) {
- this._content != t3 && (this._content = t3, this._elements.content || this.createContentElement(), this._elements.content.innerHTML = t3, this.positionElement());
- }, enumerable: true, configurable: true }), e3.prototype.getClassNames = function() {
- return this.adapter.apply("classNames", { wrapperClass: this.classPrefix + "", headerClass: this.classPrefix + "-header", titleClass: this.classPrefix + "-title", contentClass: this.classPrefix + "-content", insideClass: this.classPrefix + "-inside", curtainClass: this.classPrefix + "-curtain", closeClass: this.classPrefix + "-close" });
- }, e3.prototype.createContentElement = function() {
- if (!this._elements.wrapper) {
- var t3 = this.getClassNames(), e4 = document.createElement("div");
- e4.className = t3.contentClass, e4.style.opacity = "0.01";
- var i3 = document.createElement("a");
- i3.className = t3.closeClass;
- var n3 = document.createElement("div");
- n3.className = t3.headerClass;
- var r3 = document.createElement("div");
- r3.innerHTML = this.title, r3.className = t3.titleClass, this.title || (r3.style.display = "none");
- var s2 = document.createElement("div");
- s2.className = t3.insideClass, s2.innerHTML = this.content, this._IOs.wrapper = ua().getInteraction(e4), this._IOs.header = ua().getInteraction(n3), this._disposers.push(this._IOs.wrapper), this._IOs.wrapper.events.on("over", this.disablePointers, this), this._IOs.wrapper.events.on("out", this.releasePointers, this), this._IOs.close = ua().getInteraction(i3), this._disposers.push(this._IOs.close), i3.style.visibility = "hidden", e4.setAttribute("role", "dialog"), n3.appendChild(i3), n3.appendChild(r3), e4.appendChild(n3), e4.appendChild(s2), this.container.appendChild(e4), this._elements.wrapper = e4, this._elements.header = n3, this._elements.content = s2, this._elements.title = r3, this._elements.close = i3, this.defaultStyles && this.loadDefaultCSS(), this.createCurtainElement(), this.applyEvents(), this.applyReaderSettings(), this.setupDragging();
- }
- }, Object.defineProperty(e3.prototype, "title", { get: function() {
- return this.adapter.apply("title", this._title);
- }, set: function(t3) {
- this._title != t3 && (this._title = t3, this._elements.content || this.createContentElement(), this._elements.title.innerHTML = t3, this.positionElement(), this.applyReaderSettings());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "readerTitle", { get: function() {
- return this.adapter.apply("readerTitle", this._readerTitle != "" ? this._readerTitle : this.title);
- }, set: function(t3) {
- this._readerTitle != t3 && (this._readerTitle = t3, this.applyReaderSettings());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "closable", { get: function() {
- return this.adapter.apply("closable", this._closable);
- }, set: function(t3) {
- t3 !== this._closable && (this._closable = t3, this.applyEvents());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fitTo", { get: function() {
- return this.adapter.apply("fitTo", this._fitTo);
- }, set: function(t3) {
- t3 != this._fitTo && (this._fitTo = t3, this.positionElement());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "defaultStyles", { get: function() {
- return this.adapter.apply("defaultStyles", this._defaultStyles);
- }, set: function(t3) {
- this._defaultStyles != t3 && (this._defaultStyles = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "showCurtain", { get: function() {
- return this.adapter.apply("showCurtain", this._showCurtain);
- }, set: function(t3) {
- this._showCurtain != t3 && (this._showCurtain = t3, this._elements.curtain && (this._elements.curtain.style.display = t3 ? "block" : "none"));
- }, enumerable: true, configurable: true }), e3.prototype.createCurtainElement = function() {
- var t3 = this.getClassNames(), e4 = document.createElement("div");
- e4.className = t3.curtainClass, this.container.appendChild(e4), this._IOs.curtain = ua().getInteraction(e4), this._disposers.push(this._IOs.curtain), this._IOs.curtain.events.on("over", this.disablePointers, this), this._IOs.curtain.events.on("out", this.releasePointers, this), e4.style.display = this.showCurtain ? "block" : "none", this._elements.curtain = e4;
- }, Object.defineProperty(e3.prototype, "draggable", { get: function() {
- return this.adapter.apply("draggable", this._draggable);
- }, set: function(t3) {
- this._draggable != t3 && (this._draggable = t3, this.setupDragging());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dynamicResize", { get: function() {
- return this.adapter.apply("dynamicResize", this._dynamicResize);
- }, set: function(t3) {
- this._dynamicResize != t3 && (this._dynamicResize = t3, this.positionElement(true));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "align", { get: function() {
- return this.adapter.apply("align", this._align);
- }, set: function(t3) {
- this._align != t3 && (this._align = t3, this.positionElement());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "verticalAlign", { get: function() {
- return this.adapter.apply("verticalAlign", this._verticalAlign);
- }, set: function(t3) {
- this._verticalAlign != t3 && (this._verticalAlign = t3, this.positionElement());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "left", { get: function() {
- return this.adapter.apply("left", this._left);
- }, set: function(t3) {
- this.left != t3 && (this._left = t3, this._align = "none", this.positionElement());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "right", { get: function() {
- return this.adapter.apply("right", this._right);
- }, set: function(t3) {
- this.right != t3 && (this._right = t3, this._align = "none", this.positionElement());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "top", { get: function() {
- return this.adapter.apply("top", this._top);
- }, set: function(t3) {
- this.top != t3 && (this._top = t3, this._verticalAlign = "none", this.positionElement());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "bottom", { get: function() {
- return this.adapter.apply("bottom", this._bottom);
- }, set: function(t3) {
- this.bottom != t3 && (this._bottom = t3, this._verticalAlign = "none", this.positionElement());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "elements", { get: function() {
- return this._elements;
- }, enumerable: true, configurable: true }), e3.prototype.loadDefaultCSS = function() {
- this._cssLoaded || (this._disposers.push(function(t3, e4) {
- e4 || (e4 = "ampopup");
- var i3 = new Ys(), n3 = i3.getFor("text"), r3 = i3.getFor("background");
- r3.alpha = 0.8;
- var s2 = i3.getFor("alternativeBackground");
- return s2.alpha = 0.05, zs.insertKeyIfEmpty(e4, function() {
- var i4 = new me([new Ls(t3, "." + e4, { overflow: "visible", position: "absolute", top: "0", left: "0", "z-index": "2000" }), new Ls(t3, "." + e4 + "-curtain", { width: "100%", height: "100%", position: "absolute", top: "0", left: "0", "z-index": "2001", "background-color": r3.hex, opacity: "0.5" }), new Ls(t3, "." + e4 + "-header", { display: "block", width: "100%", "min-height": "1.8em", background: s2.rgba }), new Ls(t3, "." + e4 + "-title", { "font-weight": "bold", "font-size": "110%", padding: "0.5em 1.2em 0.5em 1em" }), new Ls(t3, "." + e4 + "-content", { background: r3.hex, "background-color": r3.rgba, color: n3.hex, display: "inline-block", position: "absolute", top: "0", left: "0", "max-width": "90%", "max-height": "90%", overflow: "auto", "z-index": "2002" }), new Ls(t3, "." + e4 + "-inside", { padding: "1em" }), new Ls(t3, "." + e4 + "-close", { display: "block", position: "absolute", top: "0.3em", right: "0.3em", "background-color": "rgb(100, 100, 100)", background: "rgba(100, 100, 100, 0.1) url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyBoZWlnaHQ9IjUxMiIgdmVyc2lvbj0iMSIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHdpZHRoPSI1MTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTQ0NS4yIDEwOS4ybC00Mi40LTQyLjRMMjU2IDIxMy42IDEwOS4yIDY2LjhsLTQyLjQgNDIuNEwyMTMuNiAyNTYgNjYuOCA0MDIuOGw0Mi40IDQyLjRMMjU2IDI5OC40bDE0Ni44IDE0Ni44IDQyLjQtNDIuNEwyOTguNCAyNTYiLz48L3N2Zz4=) no-repeat center", "background-size": "80%", width: "1.2em", height: "1.2em", cursor: "pointer" })]);
- return new be(function() {
- zs.removeKey(e4), i4.dispose();
- });
- }).increment();
- }(As(this.container), this.classPrefix)), Ne(this._elements, function(t3, e4) {
- e4.style.display = "";
- }), this._cssLoaded = true);
- }, e3.prototype.applyEvents = function() {
- var t3 = this;
- if (this._IOs.close)
- if (this.closable) {
- this._IOs.close.element.style.visibility = "visible";
- var e4 = [ua().body.events.on("keyup", function(e5) {
- $s.isKey(e5.event, "esc") && t3.closable && t3.close();
- }), this._IOs.close.events.on("hit", function(e5) {
- t3.close();
- })];
- e4.push(this._IOs.curtain.events.on("hit", function(e5) {
- t3.showCurtain && t3.closable && t3.close();
- })), this._disposers.push(new me(e4));
- } else
- this._IOs.close.element.style.visibility = "hidden";
- }, e3.prototype.disablePointers = function() {
- this.sprite && (this._spriteInteractionsEnabled = this.sprite.interactionsEnabled, this.sprite.interactionsEnabled = false);
- }, e3.prototype.releasePointers = function() {
- Z(this._spriteInteractionsEnabled) && (this.sprite.interactionsEnabled = this._spriteInteractionsEnabled, this._spriteInteractionsEnabled = void 0);
- }, e3.prototype.applyReaderSettings = function() {
- this.elements.wrapper.setAttribute("aria-label", this.readerTitle);
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.container = e4.container, this.sprite = e4.sprite, this.classPrefix = e4.classPrefixRaw, this.content = e4.content, this.title = e4.title, this.readerTitle = e4.readerTitle, this.defaultStyles = e4.defaultStyles, this.showCurtain = e4.showCurtain, this.align = e4.align, this.verticalAlign = e4.verticalAlign, this.left = e4.left, this.right = e4.right, this.top = e4.top, this.bottom = e4.bottom, this.adapter.copyFrom(e4.adapter);
- }, e3;
- }(mn), ca = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.adapter = new Yi(e4), e4.className = "Modal", e4.showCurtain = true, e4.draggable = false, e4;
- }
- return C(e3, t2), e3;
- }(da);
- function fa() {
- for (var t2 = [], e3 = 0; e3 < arguments.length; e3++)
- t2[e3] = arguments[e3];
- ls.suppressWarnings || console && console.warn.apply(console, T(t2));
- }
- var ga = function() {
- function t2() {
- var t3 = this;
- this._targets = [], this._observer = new ResizeObserver(function(e3) {
- Ut(e3, function(e4) {
- Ut(t3._targets, function(t4) {
- t4.target === e4.target && t4.callback();
- });
- });
- });
- }
- return t2.prototype.addTarget = function(t3, e3) {
- this._observer.observe(t3, { box: "content-box" }), this._targets.push({ target: t3, callback: e3 });
- }, t2.prototype.removeTarget = function(t3) {
- this._observer.unobserve(t3), ge(this._targets, function(e3) {
- return e3.target !== t3;
- });
- }, t2;
- }(), ya = function() {
- function t2() {
- this._targets = [];
- }
- return t2.prototype.addTarget = function(e3, i3) {
- var n3 = this;
- if (this._targets.length === 0) {
- var r3 = null, s2 = function() {
- var e4 = Date.now();
- (r3 === null || e4 > r3 + t2.delay) && (r3 = e4, Ut(n3._targets, function(t3) {
- var e5 = t3.target.getBoundingClientRect();
- e5.width === t3.size.width && e5.height === t3.size.height || (t3.size = e5, t3.callback());
- })), n3._timer = requestAnimationFrame(s2);
- };
- this._timer = requestAnimationFrame(s2);
- }
- var a2 = e3.getBoundingClientRect();
- this._targets.push({ target: e3, callback: i3, size: a2 });
- }, t2.prototype.removeTarget = function(t3) {
- ge(this._targets, function(e3) {
- return e3.target !== t3;
- }), this._targets.length === 0 && cancelAnimationFrame(this._timer);
- }, t2.delay = 200, t2;
- }(), ma = null, va = function() {
- function t2(t3, e3) {
- this._disposed = false, this._sensor = (ma === null && (ma = typeof ResizeObserver != "undefined" ? new ga() : new ya()), ma), this._element = t3, this._sensor.addTarget(t3, e3);
- }
- return t2.prototype.isDisposed = function() {
- return this._disposed;
- }, t2.prototype.dispose = function() {
- this._disposed || (this._disposed = true, this._sensor.removeTarget(this._element));
- }, Object.defineProperty(t2.prototype, "sensor", { get: function() {
- return this._sensor;
- }, enumerable: true, configurable: true }), t2.prototype.reset = function() {
- fa("resizeSensor.reset() is no longer needed and can be removed");
- }, t2;
- }(), ba = [], xa = function() {
- function t2(t3, e3) {
- var i3 = this;
- this._disposed = false, this.autoResize = true, this.nonExportableSprites = [], this._disposers = [], this.cssScale = 1, this._printing = false, this.htmlElement = t3, e3 || (this._printing = false, this.initSensor(), this._disposers.push(xs(window, "beforeprint", function() {
- i3._printing = true;
- })), this._disposers.push(xs(window, "afterprint", function() {
- i3._printing = false;
- }))), ba.push(this);
- var n3 = document.createElement("div"), r3 = n3.style;
- r3.width = "100%", r3.height = "100%", r3.position = "relative", t3.appendChild(n3), this.SVGContainer = n3;
- }
- return t2.prototype.initSensor = function() {
- var t3 = this;
- this.resizeSensor && this.resizeSensor.dispose(), this.resizeSensor = new va(this.htmlElement, function() {
- t3.autoResize && !t3._printing && t3.measure();
- }), this._disposers.push(this.resizeSensor);
- }, t2.prototype.measure = function() {
- var t3 = br(this.htmlElement), e3 = xr(this.htmlElement), i3 = this.container;
- i3 && (this.width == t3 && this.height == e3 || (this.width = t3, this.height = e3, t3 > 0 && (i3.maxWidth = t3), e3 > 0 && (i3.maxHeight = e3), Ms(this.SVGContainer)), i3.maxWidth || (i3.maxWidth = 0), i3.maxHeight || (i3.maxHeight = 0), this.cssScale = 1, this.checkTransform(this.htmlElement));
- }, Object.defineProperty(t2.prototype, "container", { get: function() {
- return this._container;
- }, set: function(t3) {
- this._container = t3, this.measure();
- }, enumerable: true, configurable: true }), t2.prototype.isDisposed = function() {
- return this._disposed;
- }, t2.prototype.dispose = function() {
- this._disposed || ee(ba, this), Ut(this._disposers, function(t3) {
- t3.dispose();
- });
- }, Object.defineProperty(t2.prototype, "hideOverflow", { set: function(t3) {
- this.SVGContainer.style.overflow = t3 ? "hidden" : "";
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "modal", { get: function() {
- return Z(this._modal) || (this._modal = new ca(), this._modal.container = this.SVGContainer, this._disposers.push(this._modal)), this._modal;
- }, enumerable: true, configurable: true }), t2.prototype.openModal = function(t3, e3) {
- this.closeModal();
- var i3 = this.modal;
- return i3.content = t3, i3.readerTitle = e3 || "", i3.title = e3 || "", i3.open(), i3;
- }, t2.prototype.closeModal = function() {
- this._modal && this.modal.close();
- }, Object.defineProperty(t2.prototype, "popups", { get: function() {
- if (!Z(this._popups)) {
- var t3 = new da();
- t3.container = this.SVGContainer, this._popups = new Mi(t3), this._disposers.push(new Ai(this._popups)), this._disposers.push(this._popups.template);
- }
- return this._popups;
- }, enumerable: true, configurable: true }), t2.prototype.openPopup = function(t3, e3) {
- var i3 = this.popups.create();
- return i3.content = t3, Z(e3) && (i3.title = e3), i3.open(), i3;
- }, t2.prototype.closeAllPopups = function() {
- this.popups.each(function(t3) {
- t3.close();
- });
- }, Object.defineProperty(t2.prototype, "readerAlertElement", { get: function() {
- if (!Z(this._readerAlertElement)) {
- var t3 = document.createElement("div");
- t3.setAttribute("role", "alert"), t3.style.zIndex = "-100000", t3.style.opacity = "0", t3.style.position = "absolute", t3.style.top = "0", this.SVGContainer.appendChild(t3), this._readerAlertElement = t3;
- }
- return this._readerAlertElement;
- }, enumerable: true, configurable: true }), t2.prototype.readerAlert = function(t3) {
- this.readerAlertElement.innerHTML = t3;
- }, t2.prototype.checkTransform = function(t3) {
- if (window.getComputedStyle) {
- if (t3 && t3.style) {
- var e3 = window.getComputedStyle(t3, null);
- if (e3) {
- var i3 = e3.getPropertyValue("-webkit-transform") || e3.getPropertyValue("-moz-transform") || e3.getPropertyValue("-ms-transform") || e3.getPropertyValue("-o-transform") || e3.getPropertyValue("transform");
- if (i3 && i3 !== "none") {
- var n3 = i3.split("(")[1].split(")")[0].split(","), r3 = Number(n3[0]), s2 = Number(n3[1]), a2 = Math.sqrt(r3 * r3 + s2 * s2);
- isNaN(a2) || (this.cssScale *= a2);
- }
- }
- }
- t3.parentNode && t3.parentNode instanceof HTMLElement && this.checkTransform(t3.parentNode);
- }
- }, t2;
- }(), _a = function() {
- function t2(t3, e3) {
- this.container = t3, this.id = e3;
- var i3 = document.createElementNS(ms, "svg");
- i3.setAttribute("version", "1.1"), i3.setAttributeNS(vs, "xmlns", ms), i3.setAttributeNS(vs, "xmlns:xlink", bs), i3.setAttribute("role", "group"), this.container.appendChild(i3), this.defs = document.createElementNS(ms, "defs"), i3.appendChild(this.defs), i3.style.width = "100%", i3.style.height = "100%", i3.style.overflow = "visible", this.svg = i3;
- }
- return t2.prototype.add = function(t3) {
- return new Ws(t3);
- }, t2.prototype.addGroup = function(t3) {
- return new Xs(t3);
- }, t2.prototype.append = function(t3) {
- t3 && this.svg.appendChild(t3.node);
- }, t2.prototype.appendDef = function(t3) {
- t3 && this.defs.appendChild(t3.node);
- }, t2.prototype.foreignObject = function() {
- return new Ws("foreignObject");
- }, t2.prototype.supportsForeignObject = function() {
- return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Extensibility", "1.1");
- }, t2;
- }(), Pa = null;
- function wa() {
- if (Pa === null) {
- var t2 = document.createElement("div");
- t2.hidden = true, t2.style.width = "1px", t2.style.height = "1px", t2.style.position = "absolute", t2.style.zIndex = "-1000000", document.body.appendChild(t2);
- var e3 = new xa(t2, true);
- Pa = new _a(e3.SVGContainer, "ghost");
- }
- return Pa;
- }
- var Ca = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._elements = new Fi(), e4.properties = {}, e4.className = "Pattern", e4.width = 10, e4.height = 10, e4.x = 0, e4.y = 0, e4.patternUnits = "userSpaceOnUse";
- var i3 = new Ys();
- return e4.backgroundFill = i3.getFor("background"), e4.backgroundOpacity = 0, e4.fillOpacity = 1, e4.fill = i3.getFor("alternativeBackground"), e4.stroke = i3.getFor("alternativeBackground"), e4.strokeOpacity = 1, e4.strokeWidth = 1, e4.shapeRendering = "crispEdges", e4.rotation = 0, e4.element = e4.paper.addGroup("pattern"), e4.id = "pattern-" + Ii.getUniqueId(), e4.element.attr({ id: e4.id }), e4._disposers.push(e4.element), e4._disposers.push(new Ai(e4._elements)), e4.patternUnits = e4.patternUnits, e4.width = e4.width, e4.height = e4.height, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- var t3 = this, e4 = this.element;
- if (e4) {
- e4.removeChildNodes();
- var i3 = this.paper.add("rect");
- i3.attr({ width: this.width, height: this.height, "shape-rendering": "crispEdges", fill: this.backgroundFill.hex, "fill-opacity": this.backgroundOpacity, stroke: this.backgroundFill.hex, "stroke-opacity": 0 }), e4.add(i3), e4.attr({ x: this.x, y: this.y, width: this.width, height: this.height, stroke: this.stroke.hex, fill: this.fill.hex, "fill-opacity": this.fillOpacity, "stroke-opacity": this.strokeOpacity, "stroke-width": this.strokeWidth, "shape-rendering": this.shapeRendering, patternUnits: this.patternUnits, "stroke-dasharray": this.strokeDasharray }), ti(this._elements.iterator(), function(e5) {
- e5.rotation = t3.rotation, e5.rotationX = t3.properties.rotationX, e5.rotationY = t3.properties.rotationY, t3.element.add(e5);
- });
- }
- }, e3.prototype.animate = function(t3, e4, i3) {
- return new ys(this, t3, e4, i3).start();
- }, e3.prototype.addElement = function(t3) {
- this._elements.push(t3), this._disposers.push(t3);
- }, e3.prototype.removeElement = function(t3) {
- this._elements.removeValue(t3), this.removeDispose(t3);
- }, Object.defineProperty(e3.prototype, "elements", { get: function() {
- return this._elements;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fillOpacity", { get: function() {
- return this.properties.fillOpacity;
- }, set: function(t3) {
- this.properties.fillOpacity = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fill", { get: function() {
- return this.properties.fill;
- }, set: function(t3) {
- this.properties.fill = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "backgroundFill", { get: function() {
- return this.properties.backgroundFill;
- }, set: function(t3) {
- this.properties.backgroundFill = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "backgroundOpacity", { get: function() {
- return this.properties.backgroundOpacity;
- }, set: function(t3) {
- this.properties.backgroundOpacity = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "stroke", { get: function() {
- return this.properties.stroke;
- }, set: function(t3) {
- this.properties.stroke = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "strokeOpacity", { get: function() {
- return this.properties.strokeOpacity;
- }, set: function(t3) {
- this.properties.strokeOpacity = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "strokeWidth", { get: function() {
- return this.properties.strokeWidth;
- }, set: function(t3) {
- this.properties.strokeWidth = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "shapeRendering", { get: function() {
- return this.properties.shapeRendering;
- }, set: function(t3) {
- this.properties.shapeRendering = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "rotation", { get: function() {
- return this.properties.rotation;
- }, set: function(t3) {
- this.properties.rotation = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "patternUnits", { get: function() {
- return this.properties.patternUnits;
- }, set: function(t3) {
- this.properties.patternUnits = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "width", { get: function() {
- return this.properties.width;
- }, set: function(t3) {
- this.properties.width = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "height", { get: function() {
- return this.properties.height;
- }, set: function(t3) {
- this.properties.height = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "x", { get: function() {
- return this.properties.x;
- }, set: function(t3) {
- this.properties.x = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "y", { get: function() {
- return this.properties.y;
- }, set: function(t3) {
- this.properties.y = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "paper", { get: function() {
- return this._paper ? this._paper : wa();
- }, set: function(t3) {
- this._paper != t3 && (this._paper = t3, this.draw(), t3.appendDef(this.element));
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- var i3 = this;
- t2.prototype.copyFrom.call(this, e4), Ne(e4.properties, function(t3, e5) {
- i3[t3] = e5;
- });
- }, Object.defineProperty(e3.prototype, "animations", { get: function() {
- return this._animations || (this._animations = [], this._disposers.push(new gs(this._animations))), this._animations;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "strokeDasharray", { get: function() {
- return this.properties.strokeDashArray;
- }, set: function(t3) {
- this.properties.strokeDashArray = t3, this.draw();
- }, enumerable: true, configurable: true }), e3.prototype.processConfig = function(e4) {
- if (e4 && Z(e4.elements) && it(e4.elements))
- for (var i3 = 0, n3 = e4.elements.length; i3 < n3; i3++) {
- var r3 = e4.elements[i3];
- if (Z(r3.type)) {
- var s2 = this.createEntryInstance(r3);
- s2 instanceof yn && (s2.config = r3), this.addElement(Z(r3.typeProperty) ? s2[r3.typeProperty] : s2.element);
- }
- }
- t2.prototype.processConfig.call(this, e4);
- }, e3;
- }(yn);
- Ii.registeredClasses.Pattern = Ca;
- var Oa = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._stops = new Fi(), e4._rotation = 0, e4.className = "LinearGradient", e4._stops.events.on("setIndex", e4.validate, e4), e4._stops.events.on("inserted", e4.validate, e4), e4.element = e4.paper.addGroup("linearGradient"), e4.id = "gradient-" + Ii.getUniqueId(), e4.element.attr({ id: e4.id }), e4._disposers.push(e4.element), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.validate = function() {
- var t3 = this, e4 = (this._rotation + 90) * st, i3 = Math.round(50 + 50 * Math.sin(e4 + Math.PI)) + "%", n3 = Math.round(50 + 50 * Math.cos(e4)) + "%", r3 = Math.round(50 + 50 * Math.sin(e4)) + "%", s2 = Math.round(50 + 50 * Math.cos(e4 + Math.PI)) + "%", a2 = this.element;
- a2.removeChildNodes(), a2.attr({ x1: i3, x2: r3, y1: n3, y2: s2 }), ti(ai(this._stops.iterator()), function(e5) {
- var i4 = e5[0], n4 = e5[1], r4 = n4.offset;
- tt(r4) || (r4 = i4 / (t3._stops.length - 1));
- var s3 = t3.paper.add("stop");
- Z(n4.color) && s3.attr({ "stop-color": n4.color.toString() }), tt(n4.opacity) && s3.attr({ "stop-opacity": n4.opacity }), tt(r4) && s3.attr({ offset: r4 }), a2.add(s3);
- });
- }, e3.prototype.clear = function() {
- this._stops.clear();
- }, e3.prototype.addColor = function(t3, e4, i3) {
- this._stops.push({ color: t3, opacity: e4, offset: i3 });
- }, Object.defineProperty(e3.prototype, "stops", { get: function() {
- return this._stops;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "paper", { get: function() {
- return this._paper ? this._paper : wa();
- }, set: function(t3) {
- this._paper != t3 && (this._paper = t3, this.validate(), t3.appendDef(this.element));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "rotation", { get: function() {
- return this._rotation;
- }, set: function(t3) {
- this._rotation = t3, this.validate();
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.stops.copyFrom(e4.stops), this._rotation = e4.rotation;
- }, Object.defineProperty(e3.prototype, "gradientUnits", { set: function(t3) {
- this.element.attr({ gradientUnits: t3 });
- }, enumerable: true, configurable: true }), e3;
- }(yn);
- Ii.registeredClasses.LinearGradient = Oa;
- var Sa = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._stops = new Fi(), e4.element = e4.paper.addGroup("radialGradient"), e4.id = "gradient-" + Ii.getUniqueId(), e4.element.attr({ id: e4.id }), e4._disposers.push(e4.element), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- var t3, e4 = this, i3 = this.element;
- tt(this.cx) && ((t3 = this.cx) instanceof A && (t3 = t3.percent + "%"), i3.attr({ cx: t3 })), tt(this.cy) && ((t3 = this.cy) instanceof A && (t3 = t3.percent + "%"), i3.attr({ cy: t3 })), this.fx && ((t3 = this.fx) instanceof A && (t3 = t3.percent + "%"), i3.attr({ fx: t3 })), this.fy && ((t3 = this.fy) instanceof A && (t3 = t3.percent + "%"), i3.attr({ fy: t3 })), i3.removeChildNodes(), ti(ai(this._stops.iterator()), function(t4) {
- var n3 = t4[0], r3 = t4[1], s2 = r3.offset;
- tt(s2) || (s2 = n3 / (e4._stops.length - 1));
- var a2 = e4.paper.add("stop");
- Z(r3.color) && a2.attr({ "stop-color": r3.color.toString() }), tt(r3.opacity) && a2.attr({ "stop-opacity": r3.opacity }), tt(s2) && a2.attr({ offset: s2 }), i3.add(a2);
- });
- }, e3.prototype.addColor = function(t3, e4, i3) {
- this._stops.push({ color: t3, opacity: e4, offset: i3 }), this.draw();
- }, Object.defineProperty(e3.prototype, "paper", { get: function() {
- return this._paper ? this._paper : wa();
- }, set: function(t3) {
- this._paper != t3 && (this._paper = t3, this.draw(), t3.appendDef(this.element));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cx", { get: function() {
- return this._cx;
- }, set: function(t3) {
- this._cx = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cy", { get: function() {
- return this._cy;
- }, set: function(t3) {
- this._cy = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fx", { get: function() {
- return this._fx;
- }, set: function(t3) {
- this._fx = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fy", { get: function() {
- return this._fy;
- }, set: function(t3) {
- this._fy = t3, this.draw();
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.stops.copyFrom(e4.stops), this.cx = e4.cx, this.cy = e4.cy, this.fx = e4.fx, this.fy = e4.fy;
- }, Object.defineProperty(e3.prototype, "stops", { get: function() {
- return this._stops;
- }, enumerable: true, configurable: true }), e3.prototype.clear = function() {
- this._stops.clear();
- }, e3;
- }(yn);
- Ii.registeredClasses.RadialGradient = Sa;
- var Ia = function() {
- function t2() {
- }
- return t2.grab = [{ property: "cursor", value: "move" }, { property: "cursor", value: "grab" }, { property: "cursor", value: "-webkit-grab" }], t2.grabbing = [{ property: "cursor", value: "move" }, { property: "cursor", value: "grabbing" }, { property: "cursor", value: "-webkit-grabbing" }], t2.pointer = [{ property: "cursor", value: "pointer" }], t2.default = [{ property: "cursor", value: "default" }], t2.horizontalResize = [{ property: "cursor", value: "ew-resize" }], t2.verticalResize = [{ property: "cursor", value: "ns-resize" }], t2.notAllowed = [{ property: "cursor", value: "not-allowed" }], t2.text = [{ property: "cursor", value: "text" }], t2;
- }();
- const Da = { _decimalSeparator: ".", _thousandSeparator: ",", _big_number_suffix_3: "k", _big_number_suffix_6: "M", _big_number_suffix_9: "G", _big_number_suffix_12: "T", _big_number_suffix_15: "P", _big_number_suffix_18: "E", _big_number_suffix_21: "Z", _big_number_suffix_24: "Y", _small_number_suffix_3: "m", _small_number_suffix_6: "\u03BC", _small_number_suffix_9: "n", _small_number_suffix_12: "p", _small_number_suffix_15: "f", _small_number_suffix_18: "a", _small_number_suffix_21: "z", _small_number_suffix_24: "y", _byte_suffix_B: "B", _byte_suffix_KB: "KB", _byte_suffix_MB: "MB", _byte_suffix_GB: "GB", _byte_suffix_TB: "TB", _byte_suffix_PB: "PB", _date: "yyyy-MM-dd", _date_millisecond: "mm:ss SSS", _date_second: "HH:mm:ss", _date_minute: "HH:mm", _date_hour: "HH:mm", _date_day: "MMM dd", _date_week: "ww", _date_month: "MMM", _date_year: "yyyy", _duration_millisecond: "SSS", _duration_millisecond_second: "ss.SSS", _duration_millisecond_minute: "mm:ss SSS", _duration_millisecond_hour: "hh:mm:ss SSS", _duration_millisecond_day: "d'd' mm:ss SSS", _duration_millisecond_week: "d'd' mm:ss SSS", _duration_millisecond_month: "M'm' dd'd' mm:ss SSS", _duration_millisecond_year: "y'y' MM'm' dd'd' mm:ss SSS", _duration_second: "ss", _duration_second_minute: "mm:ss", _duration_second_hour: "hh:mm:ss", _duration_second_day: "d'd' hh:mm:ss", _duration_second_week: "d'd' hh:mm:ss", _duration_second_month: "M'm' dd'd' hh:mm:ss", _duration_second_year: "y'y' MM'm' dd'd' hh:mm:ss", _duration_minute: "mm", _duration_minute_hour: "hh:mm", _duration_minute_day: "d'd' hh:mm", _duration_minute_week: "d'd' hh:mm", _duration_minute_month: "M'm' dd'd' hh:mm", _duration_minute_year: "y'y' MM'm' dd'd' hh:mm", _duration_hour: "hh'h'", _duration_hour_day: "d'd' hh'h'", _duration_hour_week: "d'd' hh'h'", _duration_hour_month: "M'm' dd'd' hh'h'", _duration_hour_year: "y'y' MM'm' dd'd' hh'h'", _duration_day: "d'd'", _duration_day_week: "d'd'", _duration_day_month: "M'm' dd'd'", _duration_day_year: "y'y' MM'm' dd'd'", _duration_week: "w'w'", _duration_week_month: "w'w'", _duration_week_year: "w'w'", _duration_month: "M'm'", _duration_month_year: "y'y' MM'm'", _duration_year: "y'y'", _era_ad: "AD", _era_bc: "BC", A: "", P: "", AM: "", PM: "", "A.M.": "", "P.M.": "", January: "", February: "", March: "", April: "", May: "", June: "", July: "", August: "", September: "", October: "", November: "", December: "", Jan: "", Feb: "", Mar: "", Apr: "", "May(short)": "May", Jun: "", Jul: "", Aug: "", Sep: "", Oct: "", Nov: "", Dec: "", Sunday: "", Monday: "", Tuesday: "", Wednesday: "", Thursday: "", Friday: "", Saturday: "", Sun: "", Mon: "", Tue: "", Wed: "", Thu: "", Fri: "", Sat: "", _dateOrd: function(t2) {
- var e3 = "th";
- if (t2 < 11 || t2 > 13)
- switch (t2 % 10) {
- case 1:
- e3 = "st";
- break;
- case 2:
- e3 = "nd";
- break;
- case 3:
- e3 = "rd";
- }
- return e3;
- }, "Zoom Out": "", Play: "", Stop: "", Legend: "", "Click, tap or press ENTER to toggle": "", Loading: "", Home: "", Chart: "", "Serial chart": "", "X/Y chart": "", "Pie chart": "", "Gauge chart": "", "Radar chart": "", "Sankey diagram": "", "Flow diagram": "", "Chord diagram": "", "TreeMap chart": "", "Force directed tree": "", "Sliced chart": "", Series: "", "Candlestick Series": "", "OHLC Series": "", "Column Series": "", "Line Series": "", "Pie Slice Series": "", "Funnel Series": "", "Pyramid Series": "", "X/Y Series": "", Map: "", "Press ENTER to zoom in": "", "Press ENTER to zoom out": "", "Use arrow keys to zoom in and out": "", "Use plus and minus keys on your keyboard to zoom in and out": "", Export: "", Image: "", Data: "", Print: "", "Press ENTER or use arrow keys to navigate": "", "Click, tap or press ENTER to open": "", "Click, tap or press ENTER to print.": "", "Click, tap or press ENTER to export as %1.": "", 'To save the image, right-click this link and choose "Save picture as..."': "", 'To save the image, right-click thumbnail on the left and choose "Save picture as..."': "", "(Press ESC to close this message)": "", "Image Export Complete": "", "Export operation took longer than expected. Something might have gone wrong.": "", "Saved from": "", PNG: "", JPG: "", GIF: "", SVG: "", PDF: "", JSON: "", CSV: "", XLSX: "", "Use TAB to select grip buttons or left and right arrows to change selection": "", "Use left and right arrows to move selection": "", "Use left and right arrows to move left selection": "", "Use left and right arrows to move right selection": "", "Use TAB select grip buttons or up and down arrows to change selection": "", "Use up and down arrows to move selection": "", "Use up and down arrows to move lower selection": "", "Use up and down arrows to move upper selection": "", "From %1 to %2": "", "From %1": "", "To %1": "", "No parser available for file: %1": "", "Error parsing file: %1": "", "Unable to load file: %1": "", "Invalid date": "", Close: "", Minimize: "" };
- var ka, Ta = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.adapter = new Yi(e4), e4._locale = Da, e4._defaultLocale = Da, e4.className = "Language", Z(ls.defaultLocale) && (e4.locale = ls.defaultLocale), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.getLocale = function(t3) {
- return t3 == null && (t3 = this._locale), this.adapter.apply("locale", { locale: t3 }).locale;
- }, e3.prototype.translate = function(t3, e4) {
- for (var i3 = [], n3 = 2; n3 < arguments.length; n3++)
- i3[n3 - 2] = arguments[n3];
- e4 = this.getLocale(e4);
- var r3 = t3, s2 = this.getTranslations(e4)[t3];
- if (s2 === null)
- s2 = "";
- else if (Z(s2))
- s2 && (r3 = s2);
- else if (e4 !== this._defaultLocale)
- return this.translate.apply(this, T([t3, this._defaultLocale], i3));
- if (i3.length)
- for (var a2 = i3.length, o3 = 0; o3 < a2; ++o3)
- r3 = r3.split("%" + (o3 + 1)).join(i3[o3]);
- return this.adapter.apply("translate", { translation: r3, locale: e4 }).translation;
- }, e3.prototype.translateAny = function(t3, e4) {
- for (var i3 = [], n3 = 2; n3 < arguments.length; n3++)
- i3[n3 - 2] = arguments[n3];
- return this.translate.apply(this, T([t3, e4], i3));
- }, e3.prototype.setTranslationAny = function(t3, e4, i3) {
- (i3 || this.locale)[t3] = e4;
- }, e3.prototype.translateEmpty = function(t3, e4) {
- for (var i3 = [], n3 = 2; n3 < arguments.length; n3++)
- i3[n3 - 2] = arguments[n3];
- var r3 = this.translate.apply(this, T([t3, e4], i3));
- return r3 == t3 ? "" : r3;
- }, e3.prototype.translateFunc = function(t3, e4) {
- e4 = this.getLocale(e4);
- var i3 = this.getTranslations(e4)[t3];
- return i3 != null ? i3 : e4 !== this._defaultLocale ? this.translateFunc(t3, this._defaultLocale) : function() {
- return "";
- };
- }, e3.prototype.translateAll = function(t3, e4) {
- var i3 = this;
- return this.isDefault() ? t3 : zt(t3, function(t4) {
- return i3.translate(t4, e4);
- });
- }, e3.prototype.isDefault = function() {
- return this._defaultLocale === this._locale;
- }, Object.defineProperty(e3.prototype, "locale", { get: function() {
- return this._locale;
- }, set: function(t3) {
- if (this._locale != t3 && (this._locale = t3, this.events.isEnabled("localechanged"))) {
- var e4 = { type: "localechanged", locale: t3, target: this };
- this.events.dispatchImmediately("localechanged", e4);
- }
- }, enumerable: true, configurable: true }), e3.prototype.getTranslations = function(t3) {
- return this.adapter.apply("translations", { translations: t3, locale: t3 }).translations;
- }, e3;
- }(mn), Aa = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.adapter = new Yi(e4), e4.className = "TextFormatter", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.debug = function() {
- }, e3.prototype.format = function(t3, e4) {
- Z(e4) || (e4 = "svg");
- var i3 = "", n3 = (t3 = this.escape(t3)).match(/\[([^\]]*?)\]/gm);
- if (!n3)
- return this.wrap(t3, "", e4);
- for (var r3 = t3.split(/\[[^\[\]]*\]/), s2 = 0, a2 = r3.length; s2 < a2; s2++) {
- var o3 = r3[s2];
- if (o3 !== "") {
- o3 = this.adapter.apply("chunk", o3);
- var l2 = "";
- s2 > 0 && (l2 = n3[s2 - 1].replace("[", "").replace("]", "")), i3 += this.wrap(o3, l2, e4);
- }
- }
- return i3 = this.unescape(i3), this.cleanUp(i3);
- }, e3.prototype.escape = function(t3) {
- return t3.replace(/\[\[/g, Ii.getPlaceholder("1")).replace(/([^\/\]]{1})\]\]/g, "$1" + Ii.getPlaceholder("2")).replace(/\]\]/g, Ii.getPlaceholder("2")).replace(/\{\{/g, Ii.getPlaceholder("3")).replace(/\}\}/g, Ii.getPlaceholder("4")).replace(/\'\'/g, Ii.getPlaceholder("5"));
- }, e3.prototype.unescape = function(t3) {
- return t3.replace(new RegExp(Ii.getPlaceholder("1"), "g"), "[[").replace(new RegExp(Ii.getPlaceholder("2"), "g"), "]]").replace(new RegExp(Ii.getPlaceholder("3"), "g"), "{{").replace(new RegExp(Ii.getPlaceholder("4"), "g"), "}}").replace(new RegExp(Ii.getPlaceholder("5"), "g"), "''");
- }, e3.prototype.cleanUp = function(t3) {
- return t3.replace(/\[\[/g, "[").replace(/\]\]/g, "]").replace(/\{\{/g, "{").replace(/\}\}/g, "}").replace(/\'\'/g, "'");
- }, e3.prototype.wrap = function(t3, e4, i3) {
- return e4 !== "" && e4 !== "/" || (e4 = ""), i3 === "html" ? this.wrapHtml(t3, this.translateStyleShortcuts(e4)) : this.wrapSvg(t3, this.translateStyleShortcuts(e4));
- }, e3.prototype.wrapSvg = function(t3, e4) {
- return e4 === "" ? "<tspan>" + t3 + "</tspan>" : "<tspan style='" + e4 + "'>" + t3 + "</tspan>";
- }, e3.prototype.getSvgElement = function(t3, e4) {
- var i3 = new Ws("tspan");
- return i3.textContent = t3, e4 && i3.node.setAttribute("style", e4), i3;
- }, e3.prototype.wrapHtml = function(t3, e4) {
- return e4 === "" ? "<span>" + t3 + "</span>" : "<span style='" + this.styleSvgToHtml(e4) + "'>" + t3 + "</span>";
- }, e3.prototype.getHtmlElement = function(t3, e4) {
- var i3 = document.createElement("span");
- return i3.innerHTML = t3, e4 && i3.setAttribute("style", e4), i3;
- }, e3.prototype.styleSvgToHtml = function(t3) {
- return t3.replace(/fill:/, "color:");
- }, e3.prototype.translateStyleShortcuts = function(t3) {
- if (t3 == "" || t3 == "[ ]")
- return "";
- var e4 = Ii.getCache("translateStyleShortcuts_" + t3);
- if (e4)
- return e4;
- var i3 = t3.match(/('[^']*')|("[^"]*")/gi);
- if (i3)
- for (var n3 = 0; n3 < i3.length; n3++)
- t3 = t3.replace(i3[n3], i3[n3].replace(/['"]*/g, "").replace(/[ ]+/g, "+"));
- var r3 = t3.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w]+)|(\/)/gi);
- if (!r3)
- return t3;
- for (n3 = 0; n3 < r3.length; n3++)
- r3[n3].match(/^bold$/i) ? r3[n3] = "font-weight:" + r3[n3] : r3[n3] == "/" ? r3[n3] = "" : r3[n3].match(/:/) ? r3[n3] = r3[n3].replace(/\+/g, " ") : r3[n3] = "fill:" + r3[n3];
- var s2 = r3.join(";");
- return Ii.setCache("translateStyleShortcuts_" + t3, s2), s2;
- }, e3.prototype.chunk = function(t3, e4, i3) {
- e4 === void 0 && (e4 = false), i3 === void 0 && (i3 = false);
- var n3 = [];
- t3 = this.escape(t3);
- for (var r3 = e4 ? t3.split("'") : [t3], s2 = 0; s2 < r3.length; s2++) {
- var a2 = r3[s2];
- if (a2 !== "")
- if (s2 % 2 == 0)
- for (var o3 = (a2 = (a2 = a2.replace(/\]\[/g, "]" + wn + "[")).replace(/\[\]/g, "[ ]")).split(/[\[\]]+/), l2 = 0; l2 < o3.length; l2++)
- (h2 = this.cleanUp(this.unescape(o3[l2]))) !== wn && h2 !== "" && (l2 % 2 == 0 ? n3.push({ type: "value", text: this.adapter.apply("chunk", h2) }) : n3.push({ type: i3 ? "value" : "format", text: "[" + h2 + "]" }));
- else
- for (o3 = a2.split(/[\[\]]+/), l2 = 0; l2 < o3.length; l2++) {
- var h2;
- (h2 = this.cleanUp(this.unescape(o3[l2]))) !== "" && (l2 % 2 == 0 ? n3.push({ type: "text", text: h2 }) : this.isImage(h2) ? n3.push({ type: "image", text: "[" + h2 + "]" }) : n3.push({ type: "format", text: "[" + h2 + "]" }));
- }
- }
- return n3;
- }, e3.prototype.isImage = function(t3) {
- return !!t3.match(/img[ ]?:/);
- }, e3;
- }(yn);
- function Va() {
- return ka == null && (ka = new Aa()), ka;
- }
- Ii.registeredClasses.TextFormatter = Aa;
- var Fa = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._negativeBase = 0, e4._numberFormat = "#,###.#####", e4._outputFormat = "svg", e4._smallNumberThreshold = 1, e4._forceLTR = false, e4.className = "NumberFormatter", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.dispose = function() {
- t2.prototype.dispose.call(this), this.language && this.language.dispose();
- }, Object.defineProperty(e3.prototype, "language", { get: function() {
- return this._language || (this.sprite ? this._language = this.sprite.language : this._language = new Ta()), this._language;
- }, set: function(t3) {
- this._language = t3;
- }, enumerable: true, configurable: true }), e3.prototype.format = function(t3, e4, i3) {
- var n3;
- (e4 === void 0 || Q(e4) && e4.toLowerCase() === "number") && (e4 = this._numberFormat);
- var r3 = Number(t3);
- if (et(e4))
- try {
- return this.intlLocales ? new Intl.NumberFormat(this.intlLocales, e4).format(r3) : new Intl.NumberFormat(void 0, e4).format(r3);
- } catch (t4) {
- return "Invalid";
- }
- else {
- e4 = Zn(e4);
- var s2 = this.parseFormat(e4, this.language), a2 = void 0;
- a2 = r3 > this._negativeBase ? s2.positive : r3 < this._negativeBase ? s2.negative : s2.zero, Z(i3) && !a2.mod && ((a2 = ze(a2)).decimals.active = r3 == 0 ? 0 : i3), n3 = a2.template.split(wn).join(this.applyFormat(r3, a2));
- }
- return this.forceLTR && (n3 = "\u200E" + n3), n3;
- }, e3.prototype.parseFormat = function(t3, e4) {
- var i3 = this, n3 = this.getCache(t3);
- if (Z(n3))
- return n3;
- var r3 = { positive: { thousands: { active: -1, passive: -1, interval: -1, separator: e4.translateEmpty("_thousandSeparator") }, decimals: { active: -1, passive: -1, separator: e4.translateEmpty("_decimalSeparator") }, template: "", source: "", parsed: false }, negative: { thousands: { active: -1, passive: -1, interval: -1, separator: e4.translateEmpty("_thousandSeparator") }, decimals: { active: -1, passive: -1, separator: e4.translateEmpty("_decimalSeparator") }, template: "", source: "", parsed: false }, zero: { thousands: { active: -1, passive: -1, interval: -1, separator: e4.translateEmpty("_thousandSeparator") }, decimals: { active: -1, passive: -1, separator: e4.translateEmpty("_decimalSeparator") }, template: "", source: "", parsed: false } }, s2 = (t3 = t3.replace("||", Cn)).split("|");
- return r3.positive.source = s2[0], s2[2] === void 0 ? r3.zero = r3.positive : r3.zero.source = s2[2], s2[1] === void 0 ? r3.negative = r3.positive : r3.negative.source = s2[1], Ne(r3, function(t4, e5) {
- if (!e5.parsed)
- if (i3.getCache(e5.source) === void 0) {
- var n4 = e5.source;
- n4.toLowerCase() === "number" && (n4 = Q(i3._numberFormat) ? i3._numberFormat : "#,###.#####");
- for (var s3 = Va().chunk(n4, true), a2 = 0; a2 < s3.length; a2++) {
- var o3 = s3[a2];
- if (o3.text = o3.text.replace(Cn, "|"), o3.type === "value") {
- var l2 = o3.text.match(/[#0.,]+[ ]?[abesABES%!]?[abesABES‰!]?/);
- if (l2)
- if (l2 === null || l2[0] === "")
- e5.template += o3.text;
- else {
- var h2 = l2[0].match(/[abesABES%‰!]{2}|[abesABES%‰]{1}$/);
- h2 && (e5.mod = h2[0].toLowerCase(), e5.modSpacing = !!l2[0].match(/[ ]{1}[abesABES%‰!]{1}$/));
- var p2 = l2[0].split(".");
- if (p2[0] === "")
- ;
- else {
- e5.thousands.active = (p2[0].match(/0/g) || []).length, e5.thousands.passive = (p2[0].match(/\#/g) || []).length + e5.thousands.active;
- var u2 = p2[0].split(",");
- u2.length === 1 || (e5.thousands.interval = q(u2.pop()).length, e5.thousands.interval === 0 && (e5.thousands.interval = -1));
- }
- p2[1] === void 0 || (e5.decimals.active = (p2[1].match(/0/g) || []).length, e5.decimals.passive = (p2[1].match(/\#/g) || []).length + e5.decimals.active), e5.template += o3.text.split(l2[0]).join(wn);
- }
- } else
- e5.template += o3.text;
- }
- i3.setCache(e5.source, e5), e5.parsed = true;
- } else
- r3[t4] = i3.getCache(e5.source);
- }), this.setCache(t3, r3), r3;
- }, e3.prototype.applyFormat = function(t3, e4) {
- var i3 = t3 < 0;
- t3 = Math.abs(t3);
- var n3, r3 = "", s2 = "", a2 = e4.mod ? e4.mod.split("") : [];
- if (a2.indexOf("b") !== -1) {
- var o3 = this.applyPrefix(t3, this.bytePrefixes, a2.indexOf("!") !== -1);
- t3 = o3[0], r3 = o3[1], s2 = o3[2], e4.modSpacing && (s2 = " " + s2);
- } else if (a2.indexOf("a") !== -1) {
- var l2 = this.applyPrefix(t3, t3 < this.smallNumberThreshold ? this.smallNumberPrefixes : this.bigNumberPrefixes, a2.indexOf("!") !== -1);
- t3 = l2[0], r3 = l2[1], s2 = l2[2], e4.modSpacing && (s2 = " " + s2);
- } else if (a2.indexOf("%") !== -1) {
- var h2 = yt(t3.toString().length + 2, 21);
- t3 *= 100, t3 = parseFloat(t3.toPrecision(h2)), s2 = "%";
- } else
- a2.indexOf("\u2030") !== -1 && (h2 = yt(t3.toString().length + 3, 21), t3 *= 1e3, t3 = parseFloat(t3.toPrecision(h2)), s2 = "\u2030");
- if (a2.indexOf("e") !== -1)
- n3 = e4.decimals.passive >= 0 ? t3.toExponential(e4.decimals.passive).split("e") : t3.toExponential().split("e"), t3 = Number(n3[0]), s2 = "e" + n3[1], e4.modSpacing && (s2 = " " + s2);
- else if (e4.decimals.passive === 0)
- t3 = Math.round(t3);
- else if (e4.decimals.passive > 0) {
- var p2 = Math.pow(10, e4.decimals.passive);
- t3 = Math.round(t3 * p2) / p2;
- }
- var u2 = "", d2 = Jn(t3).split("."), c2 = d2[0];
- if (c2.length < e4.thousands.active && (c2 = Array(e4.thousands.active - c2.length + 1).join("0") + c2), e4.thousands.interval > 0) {
- for (var f2 = [], g2 = c2.split("").reverse().join(""), y2 = 0, m2 = c2.length; y2 <= m2; y2 += e4.thousands.interval) {
- var v2 = g2.substr(y2, e4.thousands.interval).split("").reverse().join("");
- v2 !== "" && f2.unshift(v2);
- }
- c2 = f2.join(e4.thousands.separator);
- }
- u2 += c2, d2.length === 1 && d2.push("");
- var b2 = d2[1];
- return b2.length < e4.decimals.active && (b2 += Array(e4.decimals.active - b2.length + 1).join("0")), b2 !== "" && (u2 += e4.decimals.separator + b2), u2 === "" && (u2 = "0"), t3 !== 0 && i3 && a2.indexOf("s") === -1 && (u2 = "-" + u2), r3 && (u2 = r3 + u2), s2 && (u2 += s2), u2;
- }, e3.prototype.applyPrefix = function(t3, e4, i3) {
- i3 === void 0 && (i3 = false);
- for (var n3 = t3, r3 = "", s2 = "", a2 = false, o3 = 1, l2 = 0, h2 = e4.length; l2 < h2; l2++)
- e4[l2].number <= t3 && (e4[l2].number === 0 ? n3 = 0 : (n3 = t3 / e4[l2].number, o3 = e4[l2].number), r3 = e4[l2].prefix, s2 = e4[l2].suffix, a2 = true);
- return !a2 && i3 && e4.length && t3 != 0 && (n3 = t3 / e4[0].number, r3 = e4[0].prefix, s2 = e4[0].suffix, a2 = true), a2 && (n3 = parseFloat(n3.toPrecision(yt(o3.toString().length + Math.floor(n3).toString().replace(/[^0-9]*/g, "").length, 21)))), [n3, r3, s2];
- }, e3.prototype.invalidateSprite = function() {
- this.sprite && this.sprite.invalidate();
- }, Object.defineProperty(e3.prototype, "numberFormat", { get: function() {
- return this._numberFormat;
- }, set: function(t3) {
- this._numberFormat = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "intlLocales", { get: function() {
- return this._intlLocales;
- }, set: function(t3) {
- this._intlLocales = t3, this.invalidateSprite();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "negativeBase", { get: function() {
- return this._negativeBase;
- }, set: function(t3) {
- this._negativeBase = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "bigNumberPrefixes", { get: function() {
- return Z(this._bigNumberPrefixes) || (this._bigNumberPrefixes = [{ number: 1e3, suffix: this.language.translate("_big_number_suffix_3") }, { number: 1e6, suffix: this.language.translate("_big_number_suffix_6") }, { number: 1e9, suffix: this.language.translate("_big_number_suffix_9") }, { number: 1e12, suffix: this.language.translate("_big_number_suffix_12") }, { number: 1e15, suffix: this.language.translate("_big_number_suffix_15") }, { number: 1e18, suffix: this.language.translate("_big_number_suffix_18") }, { number: 1e21, suffix: this.language.translate("_big_number_suffix_21") }, { number: 1e24, suffix: this.language.translate("_big_number_suffix_24") }]), this._bigNumberPrefixes;
- }, set: function(t3) {
- this._bigNumberPrefixes = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "smallNumberPrefixes", { get: function() {
- return Z(this._smallNumberPrefixes) || (this._smallNumberPrefixes = [{ number: 1e-24, suffix: this.language.translate("_small_number_suffix_24") }, { number: 1e-21, suffix: this.language.translate("_small_number_suffix_21") }, { number: 1e-18, suffix: this.language.translate("_small_number_suffix_18") }, { number: 1e-15, suffix: this.language.translate("_small_number_suffix_15") }, { number: 1e-12, suffix: this.language.translate("_small_number_suffix_12") }, { number: 1e-9, suffix: this.language.translate("_small_number_suffix_9") }, { number: 1e-6, suffix: this.language.translate("_small_number_suffix_6") }, { number: 1e-3, suffix: this.language.translate("_small_number_suffix_3") }]), this._smallNumberPrefixes;
- }, set: function(t3) {
- this._smallNumberPrefixes = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "smallNumberThreshold", { get: function() {
- return this._smallNumberThreshold;
- }, set: function(t3) {
- this._smallNumberThreshold = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "bytePrefixes", { get: function() {
- return Z(this._bytePrefixes) || (this._bytePrefixes = [{ number: 1, suffix: this.language.translate("_byte_suffix_B") }, { number: 1024, suffix: this.language.translate("_byte_suffix_KB") }, { number: 1048576, suffix: this.language.translate("_byte_suffix_MB") }, { number: 1073741824, suffix: this.language.translate("_byte_suffix_GB") }, { number: 1099511627776, suffix: this.language.translate("_byte_suffix_TB") }, { number: 1125899906842624, suffix: this.language.translate("_byte_suffix_PB") }]), this._bytePrefixes;
- }, set: function(t3) {
- this._bytePrefixes = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "outputFormat", { get: function() {
- return this._outputFormat;
- }, set: function(t3) {
- this._outputFormat = t3.toLowerCase(), this.invalidateSprite();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "forceLTR", { get: function() {
- return this._forceLTR;
- }, set: function(t3) {
- this._forceLTR = t3, this.invalidateSprite();
- }, enumerable: true, configurable: true }), e3.prototype.escape = function(t3) {
- return t3.replace("||", Cn);
- }, e3.prototype.unescape = function(t3) {
- return t3.replace(Cn, "|");
- }, e3;
- }(yn);
- Ii.registeredClasses.NumberFormatter = Fa;
- var Ma = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._dateFormat = "yyyy-MM-dd", e4._inputDateFormat = "yyyy-MM-dd", e4._utc = false, e4.timezoneMinutes = 0, e4._firstDayOfWeek = 1, e4.months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], e4.monthsShort = ["Jan", "Feb", "Mar", "Apr", "May(short)", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], e4.weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], e4.weekdaysShort = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], e4._outputFormat = "svg", e4.capitalize = true, e4.className = "DateFormatter", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "language", { get: function() {
- return this._language;
- }, set: function(t3) {
- this._language = t3, this.dateFormat = this._language.translate("_date");
- }, enumerable: true, configurable: true }), e3.prototype.format = function(t3, e4, i3) {
- var n3, r3;
- if (this.language || (this.sprite ? this.language = this.sprite.language : this.language = new Ta()), e4 !== void 0 && e4 !== "" || (e4 = this._dateFormat), r3 = Q(t3) ? this.parse(t3) : Qn(t3), et(e4))
- try {
- return this.intlLocales ? new Intl.DateTimeFormat(this.intlLocales, e4).format(r3) : new Intl.DateTimeFormat(void 0, e4).format(r3);
- } catch (t4) {
- return "Invalid";
- }
- else {
- e4 = Zn(e4);
- var s2 = this.parseFormat(e4);
- if (Z(this.timezoneOffset) ? r3.setMinutes(r3.getMinutes() + r3.getTimezoneOffset() - this.timezoneOffset) : Z(this.timezone) && i3 !== false && (r3 = oa(r3, this.timezone)), !tt(r3.getTime()))
- return this.language.translate("Invalid date");
- n3 = this.applyFormat(r3, s2, this.language), this.capitalize && (n3 = n3.replace(/^.{1}/, n3.substr(0, 1).toUpperCase()));
- }
- return n3;
- }, e3.prototype.parseFormat = function(t3) {
- var e4 = this.getCache(t3);
- if (Z(e4))
- return e4;
- for (var i3 = { template: "", parts: [] }, n3 = Va().chunk(t3, true), r3 = 0; r3 < n3.length; r3++) {
- var s2 = n3[r3];
- if (s2.type === "value") {
- s2.text.match(/^date$/i) && Q(this._dateFormat) && (s2.text = this._dateFormat);
- var a2 = s2.text.match(/G|yyyy|yyy|yy|y|YYYY|YYY|YY|Y|u|q|MMMMM|MMMM|MMM|MM|M|ww|w|W|dd|d|DDD|DD|D|F|g|EEEEE|EEEE|EEE|EE|E|eeeee|eeee|eee|ee|e|aaa|aa|a|hh|h|HH|H|KK|K|kk|k|mm|m|ss|s|SSS|SS|S|A|zzzz|zzz|zz|z|ZZ|Z|t|x|nnn|nn|n|i|I/g);
- if (a2)
- for (var o3 = 0; o3 < a2.length; o3++)
- i3.parts.push(a2[o3]), s2.text = s2.text.replace(a2[o3], wn);
- }
- i3.template += s2.text;
- }
- return this.setCache(t3, i3), i3;
- }, e3.prototype.applyFormat = function(t3, e4, i3) {
- var n3, r3, s2, a2, o3, l2, h2, p2, u2 = e4.template, d2 = t3.getTimezoneOffset(), c2 = t3.getTime();
- this.utc ? (n3 = t3.getUTCFullYear(), r3 = t3.getUTCMonth(), s2 = t3.getUTCDay(), a2 = t3.getUTCDate(), o3 = t3.getUTCHours(), l2 = t3.getUTCMinutes(), h2 = t3.getUTCSeconds(), p2 = t3.getUTCMilliseconds()) : (n3 = t3.getFullYear(), r3 = t3.getMonth(), s2 = t3.getDay(), a2 = t3.getDate(), o3 = t3.getHours(), l2 = t3.getMinutes(), h2 = t3.getSeconds(), p2 = t3.getMilliseconds());
- for (var f2 = 0, g2 = e4.parts.length; f2 < g2; f2++) {
- var y2 = "";
- switch (e4.parts[f2]) {
- case "G":
- y2 = i3.translate(n3 < 0 ? "_era_bc" : "_era_ad");
- break;
- case "yyyy":
- y2 = Math.abs(n3).toString(), n3 < 0 && (y2 += i3.translate("_era_bc"));
- break;
- case "yyy":
- case "yy":
- case "y":
- y2 = Math.abs(n3).toString().substr(-e4.parts[f2].length), n3 < 0 && (y2 += i3.translate("_era_bc"));
- break;
- case "YYYY":
- case "YYY":
- case "YY":
- case "Y":
- var m2 = n3;
- ir(t3) == 1 && s2 > 4 && m2--, y2 = e4.parts[f2] == "YYYY" ? Math.abs(m2).toString() : Math.abs(m2).toString().substr(-e4.parts[f2].length), m2 < 0 && (y2 += i3.translate("_era_bc"));
- break;
- case "u":
- case "F":
- case "g":
- break;
- case "q":
- y2 = "" + Math.ceil((t3.getMonth() + 1) / 3);
- break;
- case "MMMMM":
- y2 = i3.translate(this.months[r3]).substr(0, 1);
- break;
- case "MMMM":
- y2 = i3.translate(this.months[r3]);
- break;
- case "MMM":
- y2 = i3.translate(this.monthsShort[r3]);
- break;
- case "MM":
- y2 = Gn(r3 + 1, 2, "0");
- break;
- case "M":
- y2 = (r3 + 1).toString();
- break;
- case "ww":
- y2 = Gn(ir(t3, this.utc), 2, "0");
- break;
- case "w":
- y2 = ir(t3, this.utc).toString();
- break;
- case "W":
- y2 = nr(t3, this.utc).toString();
- break;
- case "dd":
- y2 = Gn(a2, 2, "0");
- break;
- case "d":
- y2 = a2.toString();
- break;
- case "DD":
- case "DDD":
- y2 = Gn(er(t3, this.utc).toString(), e4.parts[f2].length, "0");
- break;
- case "D":
- y2 = er(t3, this.utc).toString();
- break;
- case "t":
- y2 = i3.translateFunc("_dateOrd").call(this, a2);
- break;
- case "E":
- y2 = (s2 || 7).toString();
- break;
- case "EE":
- y2 = Gn((s2 || 7).toString(), 2, "0");
- break;
- case "EEE":
- case "eee":
- y2 = i3.translate(this.weekdaysShort[s2]);
- break;
- case "EEEE":
- case "eeee":
- y2 = i3.translate(this.weekdays[s2]);
- break;
- case "EEEEE":
- case "eeeee":
- y2 = i3.translate(this.weekdays[s2]).substr(0, 1);
- break;
- case "e":
- case "ee":
- y2 = (s2 - this.firstDayOfWeek + 1).toString(), e4.parts[f2] == "ee" && (y2 = Gn(y2, 2, "0"));
- break;
- case "a":
- y2 = o3 >= 12 ? i3.translate("PM") : i3.translate("AM");
- break;
- case "aa":
- y2 = o3 >= 12 ? i3.translate("P.M.") : i3.translate("A.M.");
- break;
- case "aaa":
- y2 = o3 >= 12 ? i3.translate("P") : i3.translate("A");
- break;
- case "h":
- y2 = sr(o3).toString();
- break;
- case "hh":
- y2 = Gn(sr(o3), 2, "0");
- break;
- case "H":
- y2 = o3.toString();
- break;
- case "HH":
- y2 = Gn(o3, 2, "0");
- break;
- case "K":
- y2 = sr(o3, 0).toString();
- break;
- case "KK":
- y2 = Gn(sr(o3, 0), 2, "0");
- break;
- case "k":
- y2 = (o3 + 1).toString();
- break;
- case "kk":
- y2 = Gn(o3 + 1, 2, "0");
- break;
- case "m":
- y2 = l2.toString();
- break;
- case "mm":
- y2 = Gn(l2, 2, "0");
- break;
- case "s":
- y2 = h2.toString();
- break;
- case "ss":
- y2 = Gn(h2, 2, "0");
- break;
- case "S":
- case "SS":
- case "SSS":
- y2 = Math.round(p2 / 1e3 * Math.pow(10, e4.parts[f2].length)).toString();
- break;
- case "x":
- y2 = c2.toString();
- break;
- case "n":
- case "nn":
- case "nnn":
- y2 = Gn(p2, e4.parts[f2].length, "0");
- break;
- case "z":
- y2 = ar(t3, false, false, this.utc);
- break;
- case "zz":
- y2 = ar(t3, true, false, this.utc);
- break;
- case "zzz":
- y2 = ar(t3, false, true, this.utc);
- break;
- case "zzzz":
- y2 = ar(t3, true, true, this.utc);
- break;
- case "Z":
- case "ZZ":
- var v2 = Math.abs(d2) / 60, b2 = Math.floor(v2), x2 = 60 * v2 - 60 * b2;
- this.utc && (b2 = 0, x2 = 0), e4.parts[f2] == "Z" ? (y2 = "GMT", y2 += d2 > 0 ? "-" : "+", y2 += Gn(b2, 2) + ":" + Gn(x2, 2)) : (y2 = d2 > 0 ? "-" : "+", y2 += Gn(b2, 2) + Gn(x2, 2));
- break;
- case "i":
- y2 = t3.toISOString();
- break;
- case "I":
- y2 = t3.toUTCString();
- }
- u2 = u2.replace(wn, y2);
- }
- return u2;
- }, e3.prototype.parse = function(t3, e4) {
- if (Z(e4) || (e4 = this.inputDateFormat), t3 instanceof Date)
- return t3;
- if (typeof t3 == "number")
- return new Date(t3);
- var i3;
- typeof t3 != "string" && (t3 = t3.toString()), this.language || (this.sprite ? this.language = this.sprite.language : this.language = new Ta());
- var n3 = "";
- e4 = (e4 = Zn(e4)).substr(0, t3.length);
- for (var r3 = this.parseFormat(e4), s2 = { year: -1, year3: -1, year2: -1, year1: -1, month: -1, monthShort: -1, monthLong: -1, weekdayShort: -1, weekdayLong: -1, day: -1, yearDay: -1, week: -1, hourBase0: -1, hour12Base0: -1, hourBase1: -1, hour12Base1: -1, minute: -1, second: -1, millisecond: -1, millisecondDigits: -1, am: -1, zone: -1, timestamp: -1, iso: -1 }, a2 = { year: 1970, month: 0, day: 1, hour: 0, minute: 0, second: 0, millisecond: 0, timestamp: null, offset: 0, utc: this.utc }, o3 = 0, l2 = 0, h2 = 0; h2 < r3.parts.length; h2++) {
- switch (l2 = h2 + o3 + 1, r3.parts[h2]) {
- case "yyyy":
- case "YYYY":
- n3 += "([0-9]{4})", s2.year = l2;
- break;
- case "yyy":
- case "YYY":
- n3 += "([0-9]{3})", s2.year3 = l2;
- break;
- case "yy":
- case "YY":
- n3 += "([0-9]{2})", s2.year2 = l2;
- break;
- case "y":
- case "Y":
- n3 += "([0-9]{1})", s2.year1 = l2;
- break;
- case "MMMM":
- n3 += "(" + this.getStringList(this.months).join("|") + ")", s2.monthLong = l2;
- break;
- case "MMM":
- n3 += "(" + this.getStringList(this.monthsShort).join("|") + ")", s2.monthShort = l2;
- break;
- case "MM":
- case "M":
- n3 += "([0-9]{2}|[0-9]{1})", s2.month = l2;
- break;
- case "ww":
- case "w":
- n3 += "([0-9]{2}|[0-9]{1})", s2.week = l2;
- break;
- case "dd":
- case "d":
- n3 += "([0-9]{2}|[0-9]{1})", s2.day = l2;
- break;
- case "DDD":
- case "DD":
- case "D":
- n3 += "([0-9]{3}|[0-9]{2}|[0-9]{1})", s2.yearDay = l2;
- break;
- case "dddd":
- n3 += "(" + this.getStringList(this.weekdays).join("|") + ")", s2.weekdayLong = l2;
- break;
- case "ddd":
- n3 += "(" + this.getStringList(this.weekdaysShort).join("|") + ")", s2.weekdayShort = l2;
- break;
- case "aaa":
- case "aa":
- case "a":
- n3 += "(" + this.getStringList(["AM", "PM", "A.M.", "P.M.", "A", "P"]).join("|") + ")", s2.am = l2;
- break;
- case "hh":
- case "h":
- n3 += "([0-9]{2}|[0-9]{1})", s2.hour12Base1 = l2;
- break;
- case "HH":
- case "H":
- n3 += "([0-9]{2}|[0-9]{1})", s2.hourBase0 = l2;
- break;
- case "KK":
- case "K":
- n3 += "([0-9]{2}|[0-9]{1})", s2.hour12Base0 = l2;
- break;
- case "kk":
- case "k":
- n3 += "([0-9]{2}|[0-9]{1})", s2.hourBase1 = l2;
- break;
- case "mm":
- case "m":
- n3 += "([0-9]{2}|[0-9]{1})", s2.minute = l2;
- break;
- case "ss":
- case "s":
- n3 += "([0-9]{2}|[0-9]{1})", s2.second = l2;
- break;
- case "SSS":
- case "SS":
- case "S":
- n3 += "([0-9]{3}|[0-9]{2}|[0-9]{1})", s2.millisecond = l2, s2.millisecondDigits = r3.parts[h2].length;
- break;
- case "nnn":
- case "nn":
- case "n":
- n3 += "([0-9]{3}|[0-9]{2}|[0-9]{1})", s2.millisecond = l2;
- break;
- case "x":
- n3 += "([0-9]{1,})", s2.timestamp = l2;
- break;
- case "Z":
- n3 += "GMT([-+]+[0-9]{2}:[0-9]{2})", s2.zone = l2;
- break;
- case "ZZ":
- n3 += "([\\-+]+[0-9]{2}[0-9]{2})", s2.zone = l2;
- break;
- case "i":
- n3 += "([0-9]{4})-?([0-9]{2})-?([0-9]{2})T?([0-9]{2}):?([0-9]{2}):?([0-9]{2}).?([0-9]{0,3})([zZ]|[+-][0-9]{2}:?[0-9]{2}|$)", s2.iso = l2, o3 += 7;
- break;
- case "G":
- case "YYYY":
- case "YYY":
- case "YY":
- case "Y":
- case "MMMMM":
- case "W":
- case "EEEEE":
- case "EEEE":
- case "EEE":
- case "EE":
- case "E":
- case "eeeee":
- case "eeee":
- case "eee":
- case "ee":
- case "e":
- case "zzzz":
- case "zzz":
- case "zz":
- case "z":
- case "t":
- o3--;
- }
- n3 += "[^0-9]*";
- }
- var p2 = new RegExp(n3), u2 = t3.match(p2);
- if (u2) {
- if (s2.year > -1 && (a2.year = parseInt(u2[s2.year])), s2.year3 > -1) {
- var d2 = parseInt(u2[s2.year3]);
- d2 += 1e3, a2.year = d2;
- }
- if (s2.year2 > -1 && (d2 = parseInt(u2[s2.year2]), d2 += d2 > 50 ? 1e3 : 2e3, a2.year = d2), s2.year1 > -1 && (d2 = parseInt(u2[s2.year1]), d2 = 10 * Math.floor(new Date().getFullYear() / 10) + d2, a2.year = d2), s2.monthLong > -1 && (a2.month = this.resolveMonth(u2[s2.monthLong])), s2.monthShort > -1 && (a2.month = this.resolveShortMonth(u2[s2.monthShort])), s2.month > -1 && (a2.month = parseInt(u2[s2.month]) - 1), s2.week > -1 && s2.day === -1 && (a2.month = 0, a2.day = rr(parseInt(u2[s2.week]), a2.year, 1, this.utc)), s2.day > -1 && (a2.day = parseInt(u2[s2.day])), s2.yearDay > -1 && (a2.month = 0, a2.day = parseInt(u2[s2.yearDay])), s2.hourBase0 > -1 && (a2.hour = parseInt(u2[s2.hourBase0])), s2.hourBase1 > -1 && (a2.hour = parseInt(u2[s2.hourBase1]) - 1), s2.hour12Base0 > -1 && ((d2 = parseInt(u2[s2.hour12Base0])) == 11 && (d2 = 0), s2.am > -1 && !this.isAm(u2[s2.am]) && (d2 += 12), a2.hour = d2), s2.hour12Base1 > -1 && ((d2 = parseInt(u2[s2.hour12Base1])) == 12 && (d2 = 0), s2.am > -1 && !this.isAm(u2[s2.am]) && (d2 += 12), a2.hour = d2), s2.minute > -1 && (a2.minute = parseInt(u2[s2.minute])), s2.second > -1 && (a2.second = parseInt(u2[s2.second])), s2.millisecond > -1 && (d2 = parseInt(u2[s2.millisecond]), s2.millisecondDigits == 2 ? d2 *= 10 : s2.millisecondDigits == 1 && (d2 *= 100), a2.millisecond = d2), s2.timestamp > -1) {
- a2.timestamp = parseInt(u2[s2.timestamp]);
- var c2 = new Date(a2.timestamp);
- a2.year = c2.getUTCFullYear(), a2.month = c2.getUTCMonth(), a2.day = c2.getUTCDate(), a2.hour = c2.getUTCHours(), a2.minute = c2.getUTCMinutes(), a2.second = c2.getUTCSeconds(), a2.millisecond = c2.getUTCMilliseconds();
- }
- s2.zone > -1 && (a2.offset = this.resolveTimezoneOffset(new Date(a2.year, a2.month, a2.day), u2[s2.zone])), s2.iso > -1 && (a2.year = U(u2[s2.iso + 0]), a2.month = U(u2[s2.iso + 1]) - 1, a2.day = U(u2[s2.iso + 2]), a2.hour = U(u2[s2.iso + 3]), a2.minute = U(u2[s2.iso + 4]), a2.second = U(u2[s2.iso + 5]), a2.millisecond = U(u2[s2.iso + 6]), u2[s2.iso + 7] == "Z" || u2[s2.iso + 7] == "z" ? a2.utc = true : u2[s2.iso + 7] != "" && (a2.offset = this.resolveTimezoneOffset(new Date(a2.year, a2.month, a2.day), u2[s2.iso + 7]))), i3 = a2.utc ? new Date(Date.UTC(a2.year, a2.month, a2.day, a2.hour, a2.minute, a2.second, a2.millisecond)) : new Date(a2.year, a2.month, a2.day, a2.hour, a2.minute + a2.offset, a2.second, a2.millisecond);
- } else
- i3 = new Date(t3);
- return i3;
- }, e3.prototype.resolveTimezoneOffset = function(t3, e4) {
- if (e4.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)) {
- var i3 = q(e4.match(/([+\-]?)([0-9]{2}):?([0-9]{2})/)), n3 = i3[1], r3 = i3[2], s2 = i3[3], a2 = 60 * parseInt(r3) + parseInt(s2);
- return n3 == "+" && (a2 *= -1), a2 - (t3 || new Date()).getTimezoneOffset();
- }
- return 0;
- }, e3.prototype.resolveMonth = function(t3) {
- var e4 = this.months.indexOf(t3);
- return e4 > -1 || this.language && !this.language.isDefault() && (e4 = this.language.translateAll(this.months).indexOf(t3)) > -1 ? e4 : 0;
- }, e3.prototype.resolveShortMonth = function(t3) {
- var e4 = this.monthsShort.indexOf(t3);
- return e4 > -1 || (e4 = this.months.indexOf(t3)) > -1 || this.language && !this.language.isDefault() && (e4 = this.language.translateAll(this.monthsShort).indexOf(t3)) > -1 ? e4 : 0;
- }, e3.prototype.isAm = function(t3) {
- return this.getStringList(["AM", "A.M.", "A"]).indexOf(t3.toUpperCase()) > -1;
- }, e3.prototype.invalidateSprite = function() {
- this.sprite && this.sprite.invalidate();
- }, e3.prototype.getStringList = function(t3) {
- for (var e4 = [], i3 = 0; i3 < t3.length; i3++)
- this.language ? e4.push(Bn(this.language.translate(t3[i3]))) : e4.push(Bn(t3[i3]));
- return e4;
- }, Object.defineProperty(e3.prototype, "dateFormat", { get: function() {
- return this._dateFormat;
- }, set: function(t3) {
- this._dateFormat = t3, this.invalidateSprite();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "inputDateFormat", { get: function() {
- return this._inputDateFormat;
- }, set: function(t3) {
- this._inputDateFormat = t3, this.invalidateSprite();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "intlLocales", { get: function() {
- return this._intlLocales;
- }, set: function(t3) {
- this._intlLocales = t3, this.invalidateSprite();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "utc", { get: function() {
- return this._utc;
- }, set: function(t3) {
- this._utc = t3, this.invalidateSprite();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "timezoneOffset", { get: function() {
- return this._timezoneOffset;
- }, set: function(t3) {
- this._timezoneOffset != t3 && (this._timezoneOffset = t3, this.invalidateSprite());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "timezone", { get: function() {
- return this._timezone;
- }, set: function(t3) {
- this._timezone != t3 && (this._timezone = t3, this.timezoneMinutes = la(t3), this.invalidateSprite());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "firstDayOfWeek", { get: function() {
- return this._firstDayOfWeek;
- }, set: function(t3) {
- this._firstDayOfWeek = t3, this.invalidateSprite();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "outputFormat", { get: function() {
- return this._outputFormat;
- }, set: function(t3) {
- this._outputFormat = t3.toLowerCase(), this.invalidateSprite();
- }, enumerable: true, configurable: true }), e3;
- }(yn);
- Ii.registeredClasses.DateFormatter = Ma;
- var La = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._negativeBase = 0, e4._baseUnit = "second", e4._outputFormat = "svg", e4._unitValues = { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5, month: 2592e6, year: 31536e6 }, e4._unitAliases = { Y: "y", D: "d", H: "h", K: "h", k: "h", n: "S" }, e4.className = "DurationFormatter", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.format = function(t3, e4, i3) {
- this.language || (this.sprite ? this.language = this.sprite.language : this.language = new Ta());
- var n3 = i3 || this._baseUnit;
- e4 !== void 0 && e4 !== "" || (e4 = Z(this.durationFormat) ? this.durationFormat : this.getFormat(U(t3), null, n3)), e4 = Zn(e4);
- var r3, s2 = this.parseFormat(e4, n3), a2 = Number(t3);
- r3 = a2 > this._negativeBase ? s2.positive : a2 < this._negativeBase ? s2.negative : s2.zero;
- var o3 = this.applyFormat(a2, r3);
- return r3.color !== "" && (this._outputFormat === "svg" ? o3 = "<tspan fill='" + r3.color + "'>" + o3 + "</tspan>" : this._outputFormat === "html" && (o3 = "<span style='color: " + r3.color + ";'>" + o3 + "</span>")), o3;
- }, e3.prototype.parseFormat = function(t3, e4) {
- var i3 = this, n3 = this.getCache(t3);
- if (Z(n3))
- return n3;
- var r3 = e4 || this._baseUnit, s2 = { positive: { color: "", template: "", parts: [], source: "", baseUnit: r3, parsed: false, absolute: false }, negative: { color: "", template: "", parts: [], source: "", baseUnit: r3, parsed: false, absolute: false }, zero: { color: "", template: "", parts: [], source: "", baseUnit: r3, parsed: false, absolute: false } }, a2 = (t3 = t3.replace("||", Cn)).split("|");
- return s2.positive.source = a2[0], a2[2] === void 0 ? s2.zero = s2.positive : s2.zero.source = a2[2], a2[1] === void 0 ? s2.negative = s2.positive : s2.negative.source = a2[1], Ne(s2, function(t4, e5) {
- if (!e5.parsed)
- if (i3.getCache(e5.source) === void 0) {
- var n4, r4 = e5.source;
- (n4 = e5.source.match(/^\[([^\]]*)\]/)) && n4.length && n4[0] !== "" && (r4 = e5.source.substr(n4[0].length), e5.color = n4[1]);
- for (var a3 = Va().chunk(r4, true), o3 = 0; o3 < a3.length; o3++) {
- var l2 = a3[o3];
- if (l2.text = l2.text.replace(Cn, "|"), l2.type === "value") {
- l2.text.match(/[yYMdDwhHKkmsSn]+a/) && (e5.absolute = true, l2.text = l2.text.replace(/([yYMdDwhHKkmsSn]+)a/, "$1"));
- var h2 = l2.text.match(/y+|Y+|M+|d+|D+|w+|h+|H+|K+|k+|m+|s+|S+|n+/g);
- if (h2)
- for (var p2 = 0; p2 < h2.length; p2++)
- Z(h2[p2]) || (h2[p2] = i3._unitAliases[h2[p2]]), e5.parts.push(h2[p2]), l2.text = l2.text.replace(h2[p2], wn);
- }
- e5.template += l2.text;
- }
- i3.setCache(e5.source, e5), e5.parsed = true;
- } else
- s2[t4] = i3.getCache(e5.source);
- }), this.setCache(t3, s2), s2;
- }, e3.prototype.applyFormat = function(t3, e4) {
- var i3 = !e4.absolute && t3 < this._negativeBase;
- t3 = Math.abs(t3);
- for (var n3 = this.toTimeStamp(t3, e4.baseUnit), r3 = e4.template, s2 = 0, a2 = e4.parts.length; s2 < a2; s2++) {
- var o3 = e4.parts[s2], l2 = this.toTimeUnit(o3.substr(0, 1)), h2 = o3.length, p2 = Math.floor(n3 / this._unitValues[l2]);
- r3 = r3.replace(wn, Gn(p2, h2, "0")), n3 -= p2 * this._unitValues[l2];
- }
- return i3 && (r3 = "-" + r3), r3;
- }, e3.prototype.toTimeStamp = function(t3, e4) {
- return t3 * this._unitValues[e4];
- }, e3.prototype.toTimeUnit = function(t3) {
- switch (t3) {
- case "S":
- return "millisecond";
- case "s":
- return "second";
- case "m":
- return "minute";
- case "h":
- return "hour";
- case "d":
- return "day";
- case "w":
- return "week";
- case "M":
- return "month";
- case "y":
- return "year";
- }
- }, e3.prototype.invalidateSprite = function() {
- this.sprite && this.sprite.invalidate();
- }, Object.defineProperty(e3.prototype, "baseUnit", { get: function() {
- return this._baseUnit;
- }, set: function(t3) {
- this._baseUnit = t3, this.invalidateSprite();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "outputFormat", { get: function() {
- return this._outputFormat;
- }, set: function(t3) {
- this._outputFormat = t3.toLowerCase(), this.invalidateSprite();
- }, enumerable: true, configurable: true }), e3.prototype.getFormat = function(t3, e4, i3) {
- if (Z(this.durationFormat))
- return this.durationFormat;
- if (i3 || (i3 = this.baseUnit), Z(e4) && t3 != e4) {
- t3 = Math.abs(t3), e4 = Math.abs(e4);
- var n3 = this.getValueUnit(gt(t3, e4), i3);
- return this.durationFormats[i3][n3];
- }
- var r3 = this.getValueUnit(t3, i3);
- return this.durationFormats[i3][r3];
- }, e3.prototype.getValueUnit = function(t3, e4) {
- var i3;
- e4 || (e4 = this.baseUnit);
- var n3 = this.getMilliseconds(t3, e4);
- return He(this._unitValues, function(t4, r3) {
- if (t4 == e4 || i3) {
- if (n3 / r3 <= 1)
- return i3 || (i3 = t4), false;
- i3 = t4;
- }
- return true;
- }), i3;
- }, e3.prototype.getMilliseconds = function(t3, e4) {
- return e4 || (e4 = this.baseUnit), t3 * this._unitValues[e4];
- }, Object.defineProperty(e3.prototype, "durationFormat", { get: function() {
- return this._durationFormat;
- }, set: function(t3) {
- this._durationFormat != t3 && (this._durationFormat = t3, this.invalidateSprite());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "durationFormats", { get: function() {
- return this._durationFormats || (this._durationFormats = { millisecond: { millisecond: this.language.translate("_duration_millisecond"), second: this.language.translate("_duration_millisecond_second"), minute: this.language.translate("_duration_millisecond_minute"), hour: this.language.translate("_duration_millisecond_hour"), day: this.language.translate("_duration_millisecond_day"), week: this.language.translate("_duration_millisecond_week"), month: this.language.translate("_duration_millisecond_month"), year: this.language.translate("_duration_millisecond_year") }, second: { second: this.language.translate("_duration_second"), minute: this.language.translate("_duration_second_minute"), hour: this.language.translate("_duration_second_hour"), day: this.language.translate("_duration_second_day"), week: this.language.translate("_duration_second_week"), month: this.language.translate("_duration_second_month"), year: this.language.translate("_duration_second_year") }, minute: { minute: this.language.translate("_duration_minute"), hour: this.language.translate("_duration_minute_hour"), day: this.language.translate("_duration_minute_day"), week: this.language.translate("_duration_minute_week"), month: this.language.translate("_duration_minute_month"), year: this.language.translate("_duration_minute_year") }, hour: { hour: this.language.translate("_duration_hour"), day: this.language.translate("_duration_hour_day"), week: this.language.translate("_duration_hour_week"), month: this.language.translate("_duration_hour_month"), year: this.language.translate("_duration_hour_year") }, day: { day: this.language.translate("_duration_day"), week: this.language.translate("_duration_day_week"), month: this.language.translate("_duration_day_month"), year: this.language.translate("_duration_day_year") }, week: { week: this.language.translate("_duration_week"), month: this.language.translate("_duration_week_month"), year: this.language.translate("_duration_week_year") }, month: { month: this.language.translate("_duration_month"), year: this.language.translate("_duration_month_year") }, year: { year: this.language.translate("_duration_year") } }), this._durationFormats;
- }, set: function(t3) {
- this._durationFormats = t3, this.invalidateSprite();
- }, enumerable: true, configurable: true }), e3;
- }(yn);
- Ii.registeredClasses.DurationFormatter = La;
- var ja, Ea = new Pi(), Ra = function(t2) {
- function e3() {
- var e4 = t2 !== null && t2.apply(this, arguments) || this;
- return e4._validateDisposer = null, e4;
- }
- return C(e3, t2), e3.prototype.invalidate = function() {
- this._validateDisposer === null && (this._validateDisposer = Ii.events.on("exitframe", this.validate, this));
- }, e3.prototype.validate = function() {
- this._validateDisposer !== null && (this._validateDisposer.dispose(), this._validateDisposer = null);
- }, e3.prototype.dispose = function() {
- this._validateDisposer !== null && (this._validateDisposer.dispose(), this._validateDisposer = null), t2.prototype.dispose.call(this);
- }, e3;
- }(mn), Ba = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.adapter = new Yi(e4), e4.closeDelay = 1e3, e4.closeOnClick = true, e4._language = new ve(), e4._menuTag = "ul", e4._itemTag = "li", e4._labelTag = "a", e4._iconTag = "img", e4._classPrefix = "amexport", e4._defaultStyles = true, e4._align = "right", e4._verticalAlign = "top", e4._tabindex = 0, e4._ignoreNextClose = false, e4._items = [{ label: "...", menu: [{ label: "Image", menu: [{ type: "png", label: "PNG" }, { type: "jpg", label: "JPG" }, { type: "svg", label: "SVG" }, { type: "pdf", label: "PDF" }] }, { label: "Data", menu: [{ type: "json", label: "JSON" }, { type: "csv", label: "CSV" }, { type: "xlsx", label: "XLSX" }, { type: "html", label: "HTML" }, { type: "pdfdata", label: "PDF" }] }, { label: "Print", type: "print" }] }], e4.className = "ExportMenu", e4._disposers.push(e4._language), e4.invalidate(), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.validate = function() {
- this.draw(), t2.prototype.validate.call(this);
- }, e3.prototype.draw = function() {
- var t3 = this;
- this._element ? (this._element.innerHTML = "", this._element.className = this.getMenuItemClass(0)) : this._element = this.createMenuElement(0), this.defaultStyles && (this._element.style.display = "none"), q(this._container).appendChild(this._element);
- for (var e4 = this.adapter.apply("items", { items: this._items }).items, i3 = e4.length, n3 = 0; n3 < i3; n3++)
- this.drawBranch(this._element, e4[n3], 0);
- this._element = this.adapter.apply("menuElement", { menuElement: this._element }).menuElement, this._disposers.push(ua().body.events.on("down", function(e5) {
- e5.pointer.touch || (t3._ignoreNextClose = false), t3.close();
- })), this._disposers.push(ua().body.events.on("keydown", function(e5) {
- var i4 = $s.getEventKey(e5.event);
- switch (i4) {
- case "esc":
- t3.close();
- break;
- case "up":
- case "down":
- case "left":
- case "right":
- t3._currentSelection && e5.event.preventDefault(), t3.moveSelection(i4);
- }
- })), this.defaultStyles && this.loadDefaultCSS();
- }, e3.prototype.drawBranch = function(t3, e4, i3) {
- var n3 = this;
- if ((e4 = this.adapter.apply("branch", { branch: e4, level: i3 }).branch).unsupported !== true) {
- e4.ascendants || (e4.ascendants = new Fi());
- var r3, s2 = e4.type, a2 = this.createItemElement(i3, s2);
- e4.icon ? ((r3 = this.createIconElement(i3, s2)).src = e4.icon, (e4.label || e4.title) && (r3.title = e4.title || e4.label)) : e4.svg ? (r3 = this.createSvgElement(i3, s2, e4.svg), (e4.label || e4.title) && (r3.title = e4.title || e4.label)) : ((r3 = this.createLabelElement(i3, s2)).innerHTML = e4.label ? this.language.translate(e4.label) : "", e4.title && (r3.title = e4.title));
- var o3 = this.getReaderLabel(e4, r3.innerHTML);
- r3.setAttribute("aria-label", o3), a2.appendChild(r3), e4.interactions = ua().getInteraction(a2), e4.element = a2, this.typeClickable(s2) && (e4.interactions.events.on("hit", function(t4) {
- if (n3.events.isEnabled("hit") && !n3.isDisposed()) {
- var i4 = { type: "hit", event: t4.event, target: n3, branch: e4 };
- n3.events.dispatchImmediately("hit", i4);
- }
- }), e4.interactions.events.on("keyup", function(t4) {
- if ($s.isKey(t4.event, "enter") && n3.events.isEnabled("enter")) {
- var i4 = { type: "enter", event: t4.event, target: n3, branch: e4 };
- n3.events.dispatchImmediately("enter", i4);
- }
- }));
- var l2 = this.getSubMenu(e4);
- l2 != null && (e4.interactions.events.on("keyup", function(t4) {
- $s.isKey(t4.event, "enter") && (n3.selectBranch(l2[0]), n3.setFocus(l2[0]));
- }), e4.interactions.events.on("hit", function(t4) {
- n3.selectBranch(e4);
- })), e4.interactions.events.on("over", function(t4) {
- if (t4.pointer.touch && (n3._ignoreNextClose = true), n3.selectBranch(e4), n3.events.isEnabled("over")) {
- var i4 = { type: "over", event: t4.event, target: n3, branch: e4 };
- n3.events.dispatchImmediately("over", i4);
- }
- }), e4.interactions.events.on("out", function(t4) {
- if (!n3.isDisposed() && (t4.pointer.touch || n3.delayUnselectBranch(e4), n3.events.isEnabled("out"))) {
- var i4 = { type: "out", event: t4.event, target: n3, branch: e4 };
- n3.events.dispatchImmediately("out", i4);
- }
- }), e4.interactions.events.on("focus", function(t4) {
- n3.selectBranch(e4);
- }), e4.interactions.events.on("blur", function(t4) {
- n3.delayUnselectBranch(e4);
- });
- var h2 = i3 + 1;
- if (e4.menu) {
- var p2 = this.createMenuElement(h2);
- e4.submenuElement = p2;
- for (var u2 = e4.menu.length, d2 = 0; d2 < u2; d2++) {
- var c2 = new Fi();
- e4.menu[d2].ascendants = c2, e4.ascendants.length && c2.copyFrom(e4.ascendants), c2.push(e4), this.drawBranch(p2, e4.menu[d2], h2);
- }
- if (p2.innerHTML == "")
- return;
- a2.appendChild(p2);
- }
- e4.hidden && this.hideBranch(e4), e4.id && a2.setAttribute("id", e4.id), e4.color && (a2.style.backgroundColor = e4.color.hex), t3.appendChild(a2);
- }
- }, e3.prototype.createMenuElement = function(t3) {
- var e4 = document.createElement(this.menuTag);
- return e4.className = this.getMenuItemClass(t3), t3 === 0 ? e4.setAttribute("role", "menubar") : e4.setAttribute("role", "menu"), e4;
- }, e3.prototype.getMenuItemClass = function(t3) {
- var e4 = this.classPrefix + "-menu " + this.classPrefix + "-menu-level-" + t3;
- return t3 === 0 && (e4 += " " + this.classPrefix + "-menu-root " + this.classPrefix + "-" + this.align + " " + this.classPrefix + "-" + this.verticalAlign), this.adapter.apply("menuClass", { className: e4, level: t3 }).className;
- }, e3.prototype.createItemElement = function(t3, e4) {
- var i3 = document.createElement(this.itemTag), n3 = this.classPrefix + "-item " + this.classPrefix + "-item-level-" + t3 + " " + this.classPrefix + "-item-" + (e4 || "blank");
- return i3.className = this.adapter.apply("itemClass", { className: n3, level: t3, type: e4 }).className, i3.setAttribute("role", "menuitem"), i3.setAttribute("tabindex", this.tabindex.toString()), i3;
- }, e3.prototype.createLabelElement = function(t3, e4) {
- var i3 = document.createElement(this.labelTag), n3 = this.classPrefix + "-label " + this.classPrefix + "-label-level-" + t3 + " " + this.classPrefix + "-item-" + (e4 || "blank");
- return this.typeClickable(e4) && (n3 += " " + this.classPrefix + "-clickable"), i3.className = this.adapter.apply("labelClass", { className: n3, level: t3, type: e4 }).className, i3;
- }, e3.prototype.createIconElement = function(t3, e4) {
- var i3 = document.createElement(this.iconTag), n3 = this.classPrefix + "-icon " + this.classPrefix + "-icon-level-" + t3 + " " + this.classPrefix + "-item-" + (e4 || "blank");
- return this.typeClickable(e4) && (n3 += " " + this.classPrefix + "-clickable"), i3.className = this.adapter.apply("labelClass", { className: n3, level: t3, type: e4 }).className, i3.setAttribute("tabindex", this.tabindex.toString()), i3.setAttribute("role", "menuitem"), i3;
- }, e3.prototype.createSvgElement = function(t3, e4, i3) {
- var n3 = new DOMParser().parseFromString(i3, "image/svg+xml").documentElement, r3 = this.classPrefix + "-icon " + this.classPrefix + "-icon-level-" + t3 + " " + this.classPrefix + "-item-" + (e4 || "blank");
- return this.typeClickable(e4) && (r3 += " " + this.classPrefix + "-clickable"), n3.setAttribute("class", this.adapter.apply("labelClass", { className: r3, level: t3, type: e4 }).className), n3.setAttribute("tabindex", this.tabindex.toString()), n3.setAttribute("role", "menuitem"), n3;
- }, e3.prototype.dispose = function() {
- this._disposed || (t2.prototype.dispose.call(this), this._element && this._element.parentNode && this._element.parentNode.removeChild(this._element));
- }, e3.prototype.typeClickable = function(t3) {
- return Z(t3);
- }, e3.prototype.hasSubMenu = function(t3) {
- return !(!t3.menu || !t3.menu.length);
- }, e3.prototype.getSubMenu = function(t3) {
- if (t3.menu && t3.menu.length)
- return t3.menu;
- }, e3.prototype.getReaderLabel = function(t3, e4) {
- return e4 = qn(e4), t3.ascendants.length == 0 ? (e4 = e4 == "..." ? this.language.translate("Export") : e4, e4 += " [" + this.language.translate("Press ENTER or use arrow keys to navigate") + "]") : this.hasSubMenu(t3) ? e4 += " [" + this.language.translate("Click, tap or press ENTER to open") + "]" : t3.type == "print" ? e4 = this.language.translate("Click, tap or press ENTER to print.") : this.typeClickable(t3.type) && (e4 = this.language.translate("Click, tap or press ENTER to export as %1.", void 0, e4)), this.adapter.apply("rederLabel", { label: e4, branch: t3 }).label;
- }, Object.defineProperty(e3.prototype, "container", { get: function() {
- return this._container;
- }, set: function(t3) {
- this._container = t3, this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "items", { get: function() {
- return this._items;
- }, set: function(t3) {
- this._items = t3, this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tag", { set: function(t3) {
- this._menuTag = t3, this._itemTag = t3 == "ul" ? "li" : "div", this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "menuTag", { get: function() {
- return this.adapter.apply("menuTag", { tag: this._menuTag }).tag;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "itemTag", { get: function() {
- return this.adapter.apply("itemTag", { tag: this._itemTag }).tag;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "labelTag", { get: function() {
- return this.adapter.apply("labelTag", { tag: this._labelTag }).tag;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "iconTag", { get: function() {
- return this.adapter.apply("iconTag", { tag: this._iconTag }).tag;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "align", { get: function() {
- return this.adapter.apply("align", { align: this._align }).align;
- }, set: function(t3) {
- this._align = t3, this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "verticalAlign", { get: function() {
- return this.adapter.apply("verticalAlign", { verticalAlign: this._verticalAlign }).verticalAlign;
- }, set: function(t3) {
- this._verticalAlign = t3, this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "classPrefix", { get: function() {
- return this.adapter.apply("classPrefix", { classPrefix: this._classPrefix }).classPrefix;
- }, set: function(t3) {
- this._classPrefix = t3, this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "defaultStyles", { get: function() {
- return this.adapter.apply("defaultStyles", { defaultStyles: this._defaultStyles }).defaultStyles;
- }, set: function(t3) {
- this._defaultStyles != t3 && (this._defaultStyles = t3, t3 && this.loadDefaultCSS()), this.invalidate();
- }, enumerable: true, configurable: true }), e3.prototype.loadDefaultCSS = function() {
- var t3, e4, i3, n3;
- this._disposers.push((t3 = As(this.container), e4 = this.classPrefix, i3 = e4 || "amexport", n3 = new Ys(), Ea.insertKeyIfEmpty(i3, function() {
- var e5 = new me([new Ls(t3, "." + i3 + "-menu *", { "box-sizing": "border-box" }), new Ls(t3, "." + i3 + "-menu-level-0", { position: "absolute", top: "5px", right: "5px" }), new Ls(t3, "." + i3 + "-menu-level-0." + i3 + "-left", { right: "auto", left: "5px" }), new Ls(t3, "." + i3 + "-menu-level-0." + i3 + "-right", { right: "5px", left: "auto" }), new Ls(t3, "." + i3 + "-menu-level-0." + i3 + "-top", { top: "5px", bottom: "auto" }), new Ls(t3, "." + i3 + "-menu-level-0." + i3 + "-bottom", { top: "auto", bottom: "5px" }), new Ls(t3, "." + i3 + "-item." + i3 + "-item-level-0", { opacity: "0.3", width: "30px", "min-height": "30px", transition: "all 100ms ease-in-out" }), new Ls(t3, "div:hover > div > ." + i3 + "-menu ." + i3 + "-item." + i3 + "-item-level-0, ." + i3 + "-item." + i3 + "-item-level-0.active", { opacity: "0.9" }), new Ls(t3, "." + i3 + "-item." + i3 + "-item-level-0 > a", { padding: "0", "text-align": "center", overflow: "hidden" }), new Ls(t3, "." + i3 + "-item." + i3 + "-item-level-0:before", { display: "block" }), new Ls(t3, "." + i3 + "-item", { position: "relative", display: "block", opacity: "0", "z-index": "1", "border-radius": "3px", "background-color": n3.getFor("secondaryButton").hex, padding: "0", margin: "1px 1px 0 0", color: n3.getFor("secondaryButton").alternative.hex, transition: "all 100ms ease-in-out, opacity 0.5s ease 0.5s" }), new Ls(t3, "." + i3 + "-left ." + i3 + "-item", { margin: "1px 0 0 1px" }), new Ls(t3, "." + i3 + "-item:hover, ." + i3 + "-item.active", { background: n3.getFor("secondaryButtonHover").hex, color: n3.getFor("secondaryButtonText").hex }), new Ls(t3, "." + i3 + "-item > ." + i3 + "-menu", { position: "absolute", top: "-1px", right: "0", "margin-right": "100%" }), new Ls(t3, "." + i3 + "-left ." + i3 + "-item > ." + i3 + "-menu", { left: "0", right: "auto", "margin-left": "100%", "margin-right": "auto" }), new Ls(t3, "." + i3 + "-right ." + i3 + "-item > ." + i3 + "-menu", { left: "auto", right: "0", "margin-left": "auto", "margin-right": "100%" }), new Ls(t3, "." + i3 + "-top ." + i3 + "-item > ." + i3 + "-menu", { top: "-1px", bottom: "auto" }), new Ls(t3, "." + i3 + "-bottom ." + i3 + "-item > ." + i3 + "-menu", { top: "auto", bottom: "0" }), new Ls(t3, "." + i3 + "-item > ." + i3 + "-menu", { display: "none" }), new Ls(t3, "." + i3 + "-item:hover > ." + i3 + "-menu, ." + i3 + "-item.active > ." + i3 + "-menu", { display: "block" }), new Ls(t3, "." + i3 + "-item:hover > ." + i3 + "-menu > ." + i3 + "-item, ." + i3 + "-item.active > ." + i3 + "-menu > ." + i3 + "-item", { opacity: "1" }), new Ls(t3, "." + i3 + "-menu", { display: "block", "list-style": "none", margin: "0", padding: "0" }), new Ls(t3, "." + i3 + "-label", { display: "block", cursor: "default", padding: "0.5em 1em" }), new Ls(t3, "." + i3 + "-icon", { display: "block", cursor: "default", padding: "0.2em 0.4em", width: "1.2em", height: "1.2em", "min-width": "32px", "min-height": "32px", margin: "auto auto", "border-radius": "3px" }), new Ls(t3, "." + i3 + "-item-level-0 > ." + i3 + "-icon", { padding: "0.1em 0.2em" }), new Ls(t3, "." + i3 + "-clickable", { cursor: "pointer" })]);
- return new be(function() {
- Ea.removeKey(i3), e5.dispose();
- });
- }).increment())), this._element && (this._element.style.display = "");
- }, Object.defineProperty(e3.prototype, "tabindex", { get: function() {
- return this.adapter.apply("tabindex", { tabindex: this._tabindex }).tabindex;
- }, set: function(t3) {
- this._tabindex = t3, this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "language", { get: function() {
- var t3 = this, e4 = this._language.get();
- return e4 == null && (e4 = new Ta(), this._language.set(e4, e4.events.on("localechanged", function(e5) {
- t3.invalidate();
- }))), e4;
- }, set: function(t3) {
- var e4 = this;
- this._language.set(t3, t3.events.on("localechanged", function(t4) {
- e4.invalidate();
- })), this.invalidate();
- }, enumerable: true, configurable: true }), e3.prototype.close = function() {
- var t3 = this;
- if (!this.isDisposed())
- if (this._ignoreNextClose)
- this._ignoreNextClose = false;
- else {
- if (this.closeOnClick && (this._element.style.pointerEvents = "none", setTimeout(function() {
- t3._element.style.pointerEvents = "auto";
- }, 100)), this._currentSelection && (this.setBlur(this._currentSelection), this._currentSelection = void 0), this._element)
- for (var e4 = this._element.getElementsByClassName("active"), i3 = e4.length - 1; i3 >= 0; i3--)
- e4[i3] && ws(e4[i3], "active");
- this.events.dispatchImmediately("closed", { type: "closed", target: this });
- }
- }, e3.prototype.selectBranch = function(t3) {
- var e4 = this;
- if (!this.isDisposed() && (t3.closeTimeout && (this.removeDispose(t3.closeTimeout), t3.closeTimeout = void 0), Ps(t3.element, "active"), t3.submenuElement && t3.submenuElement.setAttribute("aria-expanded", "true"), this._currentSelection && this._currentSelection !== t3 && this._currentSelection.ascendants && ti(ri(qe([this._currentSelection]), this._currentSelection.ascendants.iterator()), function(i4) {
- t3.ascendants.contains(i4) || t3 === i4 || e4.unselectBranch(i4, true);
- }), ti(t3.ascendants.iterator(), function(t4) {
- t4.closeTimeout && (e4.removeDispose(t4.closeTimeout), t4.closeTimeout = void 0), Ps(t4.element, "active");
- }), this._currentSelection = t3, this.events.isEnabled("branchselected"))) {
- var i3 = { type: "branchselected", target: this, branch: t3 };
- this.events.dispatchImmediately("branchselected", i3);
- }
- }, e3.prototype.unselectBranch = function(t3, e4) {
- if (!this.isDisposed() && (ws(t3.element, "active"), t3.submenuElement && t3.submenuElement.removeAttribute("aria-expanded"), this._currentSelection == t3 && (this._currentSelection = void 0), this.events.isEnabled("branchunselected"))) {
- var i3 = { type: "branchunselected", target: this, branch: t3 };
- this.events.dispatchImmediately("branchunselected", i3);
- }
- }, e3.prototype.delayUnselectBranch = function(t3, e4) {
- var i3 = this;
- this.isDisposed() || (t3.closeTimeout && (this.removeDispose(t3.closeTimeout), t3.closeTimeout = void 0), t3.closeTimeout = this.setTimeout(function() {
- i3.unselectBranch(t3, e4);
- }, this.closeDelay), e4 !== true && t3.ascendants && ti(t3.ascendants.iterator(), function(t4) {
- i3.delayUnselectBranch(t4, true);
- }));
- }, e3.prototype.moveSelection = function(t3) {
- if (!this.isDisposed() && this._currentSelection) {
- var e4;
- if (t3 == "up")
- e4 = this.getPrevSibling(this._currentSelection);
- else if (t3 == "down")
- e4 = this.getNextSibling(this._currentSelection);
- else if (t3 == "left" && this.align == "right" || t3 == "right" && this.align == "left") {
- var i3 = this.getSubMenu(this._currentSelection);
- i3 != null && (e4 = i3[0]);
- } else
- (t3 == "right" && this.align == "right" || t3 == "left" && this.align == "left") && (e4 = this.getParentItem(this._currentSelection));
- e4 && e4 !== this._currentSelection && (this.selectBranch(e4), this.setFocus(e4), this._currentSelection = e4);
- }
- }, e3.prototype.getSiblings = function(t3) {
- var e4 = this.getParentItem(t3);
- return e4 && e4.menu ? e4.menu : [];
- }, e3.prototype.getParentItem = function(t3) {
- return t3.ascendants && t3.ascendants.length ? t3.ascendants.getIndex(t3.ascendants.length - 1) : void 0;
- }, e3.prototype.getNextSibling = function(t3) {
- var e4 = this.getSiblings(t3);
- if (e4.length > 1) {
- var i3 = e4.indexOf(t3) + 1;
- return e4[i3 = e4.length == i3 ? 0 : i3].unsupported ? this.getNextSibling(e4[i3]) : e4[i3];
- }
- return t3;
- }, e3.prototype.getPrevSibling = function(t3) {
- var e4 = this.getSiblings(t3);
- if (e4.length > 1) {
- var i3 = e4.indexOf(t3) - 1;
- return e4[i3 = i3 == -1 ? e4.length - 1 : i3].unsupported ? this.getPrevSibling(e4[i3]) : e4[i3];
- }
- return t3;
- }, e3.prototype.setFocus = function(t3) {
- if (t3.interactions)
- try {
- t3.interactions.element.focus();
- } catch (t4) {
- }
- }, e3.prototype.setBlur = function(t3) {
- if (t3.interactions)
- try {
- t3.interactions.element.blur();
- } catch (t4) {
- }
- }, e3.prototype.hideBranch = function(t3) {
- t3.element.style.display = "none";
- }, e3.prototype.showBranch = function(t3) {
- t3.element.style.display = "";
- }, Object.defineProperty(e3.prototype, "element", { get: function() {
- return this._element;
- }, enumerable: true, configurable: true }), e3;
- }(Ra);
- function Ha(t2, e3, i3) {
- return new Promise(function(n3, r3) {
- var s2 = Z(i3) && i3.responseType == "blob", a2 = new XMLHttpRequest();
- if (a2.onload = function() {
- if (a2.status === 200) {
- var t3, i4;
- if (s2)
- return void Na(t3 = a2.response).then(function(i5) {
- var r4 = { xhr: a2, error: false, response: i5, blob: t3, type: a2.getResponseHeader("Content-Type"), target: e3 };
- n3(r4);
- });
- i4 = a2.responseText || a2.response;
- var o4 = { xhr: a2, error: false, response: i4, blob: t3, type: a2.getResponseHeader("Content-Type"), target: e3 };
- n3(o4);
- } else
- r3({ xhr: a2, error: true, type: a2.getResponseHeader("Content-Type"), target: e3 });
- }, a2.onerror = function() {
- r3({ xhr: a2, error: true, type: a2.getResponseHeader("Content-Type"), target: e3 });
- }, a2.open("GET", t2, true), i3 && i3.withCredentials && (a2.withCredentials = true), Z(i3)) {
- if (Z(i3.requestHeaders))
- for (var o3 = 0; o3 < i3.requestHeaders.length; o3++) {
- var l2 = i3.requestHeaders[o3];
- a2.setRequestHeader(l2.key, l2.value);
- }
- Z(i3.responseType) && (a2.responseType = i3.responseType);
- }
- a2.send();
- });
- }
- function Na(t2) {
- return new Promise(function(e3, i3) {
- var n3 = new FileReader();
- n3.onload = function(t3) {
- e3(n3.result);
- }, n3.onerror = function(t3) {
- i3(t3);
- }, n3.readAsText(t2);
- });
- }
- var Wa = /src: ([^;]+);/;
- function Xa(t2) {
- return S(this, void 0, void 0, function() {
- var e3;
- return I(this, function(i3) {
- switch (i3.label) {
- case 0:
- e3 = t2.sheet, i3.label = 1;
- case 1:
- return i3.trys.push([1, 2, , 4]), [2, e3.cssRules];
- case 2:
- return i3.sent(), [4, new Promise(function(i4, n3) {
- t2.addEventListener("load", function() {
- i4(e3.cssRules);
- }, true), t2.addEventListener("error", function(t3) {
- n3(t3);
- }, true), setTimeout(function() {
- n3(new Error("Timeout while waiting for <style> to load"));
- }, 1e4);
- })];
- case 3:
- return [2, i3.sent()];
- case 4:
- return [2];
- }
- });
- });
- }
- function Ya(t2, e3, i3) {
- return S(this, void 0, void 0, function() {
- var n3, r3, s2, a2;
- return I(this, function(o3) {
- switch (o3.label) {
- case 0:
- return o3.trys.push([0, 2, , 3]), [4, Ha(e3)];
- case 1:
- return n3 = o3.sent(), [3, 3];
- case 2:
- return r3 = o3.sent(), console.error("Failed to load stylesheet", e3, r3), [2];
- case 3:
- (s2 = t2.createElement("style")).textContent = n3.response, ls.nonce != "" && s2.setAttribute("nonce", ls.nonce), t2.head.appendChild(s2), o3.label = 4;
- case 4:
- return o3.trys.push([4, , 7, 8]), [4, Xa(s2)];
- case 5:
- return a2 = o3.sent(), [4, za(t2, e3, a2, i3)];
- case 6:
- return o3.sent(), [3, 8];
- case 7:
- return t2.head.removeChild(s2), [7];
- case 8:
- return [2];
- }
- });
- });
- }
- function za(t2, e3, i3, n3) {
- return S(this, void 0, void 0, function() {
- var r3, s2, a2, o3, l2;
- return I(this, function(h2) {
- switch (h2.label) {
- case 0:
- for (r3 = [], s2 = i3.length, a2 = 0; a2 < s2; a2++)
- (o3 = i3[a2]).type === CSSRule.IMPORT_RULE ? (l2 = o3.href) && (l2 = Sr(e3, l2), r3.push(Ya(t2, l2, n3))) : n3(e3, o3);
- return r3.length ? [4, Promise.all(r3)] : [3, 2];
- case 1:
- h2.sent(), h2.label = 2;
- case 2:
- return [2];
- }
- });
- });
- }
- function Ua(t2) {
- return S(this, void 0, void 0, function() {
- var e3, i3;
- return I(this, function(n3) {
- switch (n3.label) {
- case 0:
- (e3 = document.createElement("iframe")).src = "about:blank", e3.setAttribute("title", ""), document.head.appendChild(e3), n3.label = 1;
- case 1:
- return n3.trys.push([1, , 3, 4]), i3 = e3.contentDocument, [4, Promise.all(zt(document.styleSheets, function(e4) {
- var n4 = e4.href;
- return n4 == null ? za(i3, location.href, e4.cssRules, t2) : (n4 = Sr(location.href, n4), Ya(i3, n4, t2));
- }))];
- case 2:
- return n3.sent(), [3, 4];
- case 3:
- return document.head.removeChild(e3), [7];
- case 4:
- return [2];
- }
- });
- });
- }
- var Ga = function(t2) {
- function e3(e4) {
- var i3 = t2.call(this) || this;
- return i3.adapter = new Yi(i3), i3._formatOptions = new Pi(), i3._extraSprites = [], i3._validateSprites = [], i3.dataFieldsOrder = [], i3._dynamicDataFields = true, i3._removedObjects = new Fi(), i3._hiddenObjects = [], i3._objectsAlreadyHidden = false, i3._filePrefix = "amCharts", i3.useWebFonts = true, i3.useRetina = true, i3.useSimplifiedExport = true, i3.timeoutDelay = 2e3, i3._exportRunning = false, i3._prevHasData = false, i3._container = e4, i3.className = "Export", i3._formatOptions.setKey("png", {}), i3._formatOptions.setKey("jpg", { quality: 0.8 }), i3._formatOptions.setKey("gif", {}), i3._formatOptions.setKey("svg", {}), i3._formatOptions.setKey("pdf", { fontSize: 14, imageFormat: "png", align: "left", addURL: true, addColumnNames: true }), i3._formatOptions.setKey("json", { indent: 2, useLocale: true }), i3._formatOptions.setKey("csv", { addColumnNames: true, emptyAs: "", addBOM: true }), i3._formatOptions.setKey("xlsx", { addColumnNames: true, useLocale: true, emptyAs: "" }), i3._formatOptions.setKey("html", { addColumnNames: true, emptyAs: "" }), i3._formatOptions.setKey("pdfdata", { fontSize: 14, imageFormat: "png", addURL: true, addColumnNames: true, emptyAs: "" }), i3._formatOptions.setKey("print", { delay: 500, printMethod: "iframe" }), i3.adapter.add("options", function(t3) {
- var e5 = i3._formatOptions.getKey(t3.type);
- return t3.options ? t3.options = Ye(e5, t3.options) : t3.options = e5, t3;
- }), i3.applyTheme(), i3.dispatchImmediately("inited"), i3;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "menu", { get: function() {
- return this._menu;
- }, set: function(t3) {
- var e4 = this;
- this._menu && this.removeDispose(this._menu), this._menu = t3, this._menu.container = this.container, this._menu.language = this._language, this._menu.adapter.add("branch", function(t4) {
- return t4.branch.unsupported = !e4.typeSupported(t4.branch.type), t4;
- }), this._menu.events.on("hit", function(t4) {
- e4.export(t4.branch.type, t4.branch.options), e4.menu.close();
- }), this._menu.events.on("enter", function(t4) {
- e4.export(t4.branch.type, t4.branch.options), e4.menu.close();
- }), this._menu.events.on("over", function(t4) {
- e4._disablePointers();
- }), this._menu.events.on("out", function(t4) {
- setTimeout(function() {
- e4._releasePointers();
- }, 10);
- }), this.dispatchImmediately("menucreated"), this._menu.adapter.add("classPrefix", function(t4) {
- return t4.classPrefix = ls.classNamePrefix + t4.classPrefix, t4;
- }), this._disposers.push(this._menu);
- }, enumerable: true, configurable: true }), e3.prototype.typeSupported = function(t3) {
- var e4 = true, i3 = this.getFormatOptions(t3);
- return Z(i3) && i3.disabled ? e4 = false : t3 === "pdf" || (t3 === "xlsx" ? e4 = !!this._hasData() : (t3 != "print" || window.print) && (["json", "csv", "html", "pdfdata"].indexOf(t3) === -1 || this._hasData()) || (e4 = false)), this.adapter.apply("supported", { supported: e4, type: t3 }).supported;
- }, e3.prototype._hasData = function() {
- return this.data && this.data.length;
- }, e3.prototype._getFunction = function(t3) {
- switch (t3) {
- case "png":
- case "gif":
- case "jpg":
- return this.getImage;
- case "svg":
- return this.getSVG;
- case "pdf":
- case "pdfdata":
- return this.getPDF;
- case "xlsx":
- return this.getExcel;
- case "csv":
- return this.getCSV;
- case "json":
- return this.getJSON;
- case "html":
- return this.getHTML;
- case "print":
- return this.getPrint;
- default:
- return this.unsupported;
- }
- }, e3.prototype.export = function(t3, e4) {
- return S(this, void 0, void 0, function() {
- var i3, n3, r3, s2, a2, o3 = this;
- return I(this, function(l2) {
- switch (l2.label) {
- case 0:
- return t3 == "custom" ? (this.handleCustom(e4), [2, true]) : (this._exportRunning = true, this.events.isEnabled("exportstarted") && (i3 = { type: "exportstarted", target: this, format: t3, options: e4 }, this.events.dispatchImmediately("exportstarted", i3)), this.showPreloader(), this.timeoutDelay && (this.hideTimeout(), this._timeoutTimeout = this.setTimeout(function() {
- if (o3.events.isEnabled("exporttimedout")) {
- var i4 = { type: "exporttimedout", target: o3, format: t3, options: e4 };
- o3.events.dispatchImmediately("exporttimedout", i4);
- }
- o3.showTimeout();
- }, this.timeoutDelay)), this.hideNonExportableSprites(), n3 = this._getFunction(t3), e4 = this.adapter.apply("options", { options: e4, type: t3 }).options, [4, (n3 = this.adapter.apply("exportFunction", { func: n3, type: t3, options: e4 }).func).call(this, t3, e4)]);
- case 1:
- return r3 = l2.sent(), this._exportRunning = false, this._releasePointers(), this.restoreNonExportableSprites(), r3 ? (this.events.isEnabled("exportfinished") && (s2 = { type: "exportfinished", target: this, format: t3, options: e4 }, this.events.dispatchImmediately("exportfinished", s2)), this.hidePreloader(), this.hideTimeout(), this.menu && this.menu.close(), t3 === "print" ? [2, this.print(r3, e4, this.adapter.apply("title", { title: this.title, options: e4 }).title)] : t3 == "pdfdata" ? [2, this.download(r3, this.filePrefix + ".pdf")] : [2, this.download(r3, this.filePrefix + "." + t3, e4 && e4.addBOM)]) : (this.events.isEnabled("error") && (a2 = { type: "error", target: this, format: t3, options: e4 }, this.events.dispatchImmediately("error", a2)), [2, false]);
- }
- });
- });
- }, e3.prototype.unsupported = function(t3, e4) {
- return S(this, void 0, void 0, function() {
- return I(this, function(t4) {
- return [2, ""];
- });
- });
- }, e3.prototype.handleCustom = function(t3) {
- Z(t3) && Z(t3.callback) && t3.callback.call(t3.callbackTarget || this, t3);
- }, e3.prototype.getPrint = function(t3, e4) {
- return S(this, void 0, void 0, function() {
- return I(this, function(t4) {
- return [2, this.getImage("png", e4)];
- });
- });
- }, e3.prototype.getFontFamilies = function() {
- return S(this, void 0, void 0, function() {
- var t3, e4, i3, n3, r3 = this;
- return I(this, function(s2) {
- switch (s2.label) {
- case 0:
- return t3 = this.getDOMURL(), e4 = [], i3 = [], [4, Ua(function(n4, s3) {
- if (s3.type === CSSRule.FONT_FACE_RULE) {
- var a2 = s3.cssText, o3 = Wa.exec(a2);
- if (o3 !== null) {
- var l2 = o3[1].split(/ *, */).map(function(i4) {
- return S(r3, void 0, void 0, function() {
- var r4, s4, a3, o4, l3, h2;
- return I(this, function(p2) {
- switch (p2.label) {
- case 0:
- return (r4 = /^url\(["']?([^"'\)]+)["']?\)([^,]*)$/.exec(i4)) !== null ? [3, 1] : [2, i4];
- case 1:
- if (s4 = r4[2], a3 = Sr(n4, r4[1]), this.webFontFilter && !a3.match(this.webFontFilter))
- return [2, null];
- p2.label = 2;
- case 2:
- return p2.trys.push([2, 7, , 8]), [4, Ha(a3, void 0, { responseType: "blob" })];
- case 3:
- return o4 = p2.sent(), window.navigator.msSaveOrOpenBlob == null ? [3, 4] : (l3 = t3.createObjectURL(o4.blob), e4.push(l3), [3, 6]);
- case 4:
- return [4, (u2 = o4.blob, new Promise(function(t4, e5) {
- var i5 = new FileReader();
- i5.onload = function(e6) {
- t4(i5.result);
- }, i5.onerror = function(t5) {
- e5(t5);
- }, i5.readAsDataURL(u2);
- }))];
- case 5:
- l3 = p2.sent(), p2.label = 6;
- case 6:
- return [2, 'url("' + l3 + '")' + s4];
- case 7:
- return h2 = p2.sent(), console.error("Failed to load font", a3, h2), [2, null];
- case 8:
- return [2];
- }
- var u2;
- });
- });
- });
- i3.push(Promise.all(l2).then(function(t4) {
- return (t4 = t4.filter(function(t5) {
- return t5 != null;
- })).length === 0 ? "" : a2.replace(Wa, "src: " + t4.join(", ") + ";");
- }));
- }
- }
- })];
- case 1:
- return s2.sent(), [4, Promise.all(i3)];
- case 2:
- return n3 = s2.sent(), [2, { blobs: e4, cssText: n3.filter(function(t4) {
- return !!t4;
- }).join("\n") }];
- }
- });
- });
- }, e3.prototype.getImage = function(t3, e4, i3) {
- return S(this, void 0, void 0, function() {
- var n3, r3, s2, a2, o3;
- return I(this, function(l2) {
- switch (l2.label) {
- case 0:
- return (n3 = this._objectsAlreadyHidden) || this.hideNonExportableSprites(), Z(e4) || (e4 = this.getFormatOptions(t3)), [4, this.awaitValidSprites()];
- case 1:
- return l2.sent(), [4, this.simplifiedImageExport()];
- case 2:
- if (!l2.sent())
- return [3, 10];
- r3 = void 0, l2.label = 3;
- case 3:
- return l2.trys.push([3, 7, , 9]), [4, this.getCanvas(e4)];
- case 4:
- return r3 = l2.sent(), i3 === false ? [3, 6] : [4, this.addExtras(r3, e4)];
- case 5:
- r3 = l2.sent(), l2.label = 6;
- case 6:
- return s2 = r3.toDataURL(this.getContentType(t3), e4.quality), this.disposeCanvas(r3), n3 || this.restoreNonExportableSprites(), [2, s2];
- case 7:
- return a2 = l2.sent(), console.error(a2.message + "\n" + a2.stack), fa("Simple export failed, falling back to advanced export"), r3 && this.disposeCanvas(r3), [4, this.getImageAdvanced(t3, e4, i3)];
- case 8:
- return o3 = l2.sent(), n3 || this.restoreNonExportableSprites(), [2, o3];
- case 9:
- return [3, 12];
- case 10:
- return [4, this.getImageAdvanced(t3, e4, i3)];
- case 11:
- return o3 = l2.sent(), n3 || this.restoreNonExportableSprites(), [2, o3];
- case 12:
- return [2];
- }
- });
- });
- }, e3.prototype.addExtras = function(t3, e4, i3) {
- return S(this, void 0, void 0, function() {
- var n3, r3, s2, a2, o3, l2, h2, p2, u2, d2, c2, f2, g2, y2, m2 = this;
- return I(this, function(v2) {
- switch (v2.label) {
- case 0:
- return this.extraSprites.length ? (n3 = 0, r3 = 0, s2 = t3.width, a2 = t3.height, o3 = 0, l2 = 0, [4, Promise.all(zt(this.extraSprites, function(t4) {
- return S(m2, void 0, void 0, function() {
- var h3, p3, u3, d3;
- return I(this, function(c3) {
- switch (c3.label) {
- case 0:
- return (h3 = t4 instanceof Za ? { sprite: t4, position: "bottom" } : t4).position = h3.position || "bottom", h3.marginTop = h3.marginTop || 0, h3.marginRight = h3.marginRight || 0, h3.marginBottom = h3.marginBottom || 0, h3.marginLeft = h3.marginLeft || 0, i3 ? [4, h3.sprite.exporting.getCanvasAdvanced(e4)] : [3, 2];
- case 1:
- return p3 = c3.sent(), [3, 4];
- case 2:
- return [4, h3.sprite.exporting.getCanvas(e4)];
- case 3:
- p3 = c3.sent(), c3.label = 4;
- case 4:
- return u3 = p3.width + h3.marginLeft + h3.marginRight, d3 = p3.height + h3.marginTop + h3.marginBottom, h3.position == "top" ? (s2 = h3.crop ? a2 : gt(s2, u3), r3 += d3) : h3.position == "right" ? (a2 = h3.crop ? a2 : gt(a2, d3), o3 += u3) : h3.position == "left" ? (a2 = h3.crop ? a2 : gt(a2, d3), n3 += u3) : h3.position === "bottom" && (s2 = h3.crop ? a2 : gt(s2, u3), l2 += d3), [2, { canvas: p3, position: h3.position, left: h3.marginLeft, top: h3.marginTop, width: u3, height: d3 }];
- }
- });
- });
- }))]) : [3, 2];
- case 1:
- return h2 = v2.sent(), (p2 = this.getDisposableCanvas()).width = n3 + s2 + o3, p2.height = r3 + a2 + l2, u2 = p2.getContext("2d"), (d2 = this.backgroundColor || this.findBackgroundColor(this.sprite.dom)) && (u2.fillStyle = d2.toString(), u2.fillRect(0, 0, p2.width, p2.height)), g2 = (c2 = n3) + s2, y2 = (f2 = r3) + a2, Ut(h2, function(t4) {
- t4.position == "top" ? (f2 -= t4.height, u2.drawImage(t4.canvas, n3 + t4.left, f2 + t4.top)) : t4.position == "right" ? (u2.drawImage(t4.canvas, g2 + t4.left, r3 + t4.top), g2 += t4.width) : t4.position == "left" ? (c2 -= t4.width, u2.drawImage(t4.canvas, c2 + t4.left, r3 + t4.top)) : t4.position === "bottom" && (u2.drawImage(t4.canvas, n3 + t4.left, y2 + t4.top), y2 += t4.height), m2.disposeCanvas(t4.canvas);
- }), u2.drawImage(t3, n3, r3), [2, p2];
- case 2:
- return [2, t3];
- }
- });
- });
- }, e3.prototype.getCanvas = function(t3) {
- return S(this, void 0, void 0, function() {
- var e4, i3, n3, r3, s2, a2, o3, l2, h2, p2, u2, d2, c2, f2, g2, y2, m2;
- return I(this, function(v2) {
- switch (v2.label) {
- case 0:
- Z(t3) || (t3 = {}), e4 = this.backgroundColor || this.findBackgroundColor(this.sprite.dom), i3 = this.getDOMURL(), n3 = null, r3 = null, v2.label = 1;
- case 1:
- return v2.trys.push([1, , 4, 5]), a2 = this.sprite.pixelWidth, o3 = this.sprite.pixelHeight, l2 = Bs(this.sprite.dom), h2 = Hs(this.sprite.dom), p2 = t3.scale || 1, u2 = this.getPixelRatio(t3), p2 = this.getAdjustedScale(a2 * u2, o3 * u2, p2, t3), (s2 = this.getDisposableCanvas()).style.width = a2 * p2 + "px", s2.style.height = o3 * p2 + "px", s2.width = a2 * p2, s2.height = o3 * p2, d2 = s2.getContext("2d"), e4 && (d2.fillStyle = e4.toString(), d2.fillRect(0, 0, a2 * p2, o3 * p2)), c2 = [], this.useWebFonts && c2.push(this.getFontFamilies().then(function(t4) {
- return r3 = t4.blobs, t4.cssText;
- })), c2.push(this.imagesToDataURI(this.sprite.dom, t3)), c2.push(this.prepForeignObjects(this.sprite.dom, t3)), [4, Promise.all(c2)];
- case 2:
- return f2 = v2.sent(), g2 = this.normalizeSVG("<style>" + f2[0] + "</style>" + this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), t3, a2, o3, p2, l2, h2), y2 = new Blob([g2], { type: "image/svg+xml" }), n3 = i3.createObjectURL(y2), [4, this.loadNewImage(n3, a2 * p2 * u2, o3 * p2 * u2, "anonymous")];
- case 3:
- return m2 = v2.sent(), d2.drawImage(m2, 0, 0), [3, 5];
- case 4:
- return n3 !== null && i3.revokeObjectURL(n3), r3 !== null && Ut(r3, function(t4) {
- i3.revokeObjectURL(t4);
- }), this.restoreRemovedObjects(), [7];
- case 5:
- return [2, s2];
- }
- });
- });
- }, e3.prototype.getCanvasAdvanced = function(t3) {
- return S(this, void 0, void 0, function() {
- var e4, i3, n3, r3, s2, a2, o3, l2, h2, p2, u2;
- return I(this, function(d2) {
- switch (d2.label) {
- case 0:
- return Z(t3) || (t3 = {}), [4, this.imagesToDataURI(this.sprite.dom, t3)];
- case 1:
- return d2.sent(), e4 = this.backgroundColor || this.findBackgroundColor(this.sprite.dom), [4, this.canvg];
- case 2:
- return i3 = d2.sent(), n3 = this.sprite.pixelWidth, r3 = this.sprite.pixelHeight, s2 = Bs(this.sprite.dom), a2 = Hs(this.sprite.dom), o3 = t3.scale || 1, l2 = this.getPixelRatio(t3), o3 = this.getAdjustedScale(n3 * l2, r3 * l2, o3, t3), h2 = this.normalizeSVG(this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), t3, n3, r3, o3, s2, a2, e4), (p2 = this.getDisposableCanvas()).style.width = n3 * l2 * o3 + "px", p2.style.height = r3 * l2 * o3 + "px", p2.width = n3 * l2 * o3, p2.height = r3 * l2 * o3, u2 = { useCORS: true }, l2 != 1 && (u2.ignoreDimensions = true, u2.scaleWidth = n3 * l2 * o3, u2.scaleHeight = r3 * l2 * o3), [4, i3.fromString(p2.getContext("2d"), h2, u2).render()];
- case 3:
- return d2.sent(), [2, p2];
- }
- });
- });
- }, e3.prototype.getImageAdvanced = function(t3, e4, i3) {
- return S(this, void 0, void 0, function() {
- var n3, r3, s2;
- return I(this, function(a2) {
- switch (a2.label) {
- case 0:
- return (n3 = this._objectsAlreadyHidden) || this.hideNonExportableSprites(), Z(e4) || (e4 = this.getFormatOptions(t3)), [4, this.getCanvasAdvanced(e4)];
- case 1:
- return r3 = a2.sent(), i3 === false ? [3, 3] : [4, this.addExtras(r3, e4, true)];
- case 2:
- r3 = a2.sent(), a2.label = 3;
- case 3:
- return s2 = r3.toDataURL(this.getContentType(t3), e4.quality), this.disposeCanvas(r3), n3 || this.restoreNonExportableSprites(), [2, s2];
- }
- });
- });
- }, e3.prototype.getDisposableCanvas = function() {
- var t3 = document.createElement("canvas");
- return t3.style.position = "fixed", t3.style.top = "-10000px", document.body.appendChild(t3), t3;
- }, e3.prototype.disposeCanvas = function(t3) {
- document.body.removeChild(t3);
- }, e3.prototype.getPixelRatio = function(t3) {
- return this.useRetina ? Ln() : 1;
- }, e3.prototype.getAdjustedScale = function(t3, e4, i3, n3) {
- if (!n3)
- return i3;
- var r3, s2, a2 = t3 * i3, o3 = t3 * i3;
- return n3.maxWidth && a2 > n3.maxWidth && (r3 = n3.maxWidth / t3), n3.maxHeight && o3 > n3.maxHeight && (s2 = n3.maxHeight / e4), r3 || s2 ? yt(r3, s2) : (n3.minWidth && a2 < n3.minWidth && (r3 = n3.minWidth / t3), n3.minHeight && o3 < n3.minHeight && (s2 = n3.minHeight / e4), r3 || s2 ? gt(r3, s2) : i3);
- }, e3.prototype.imagesToDataURI = function(t3, i3) {
- return S(this, void 0, void 0, function() {
- var n3, r3, s2, a2, o3, l2;
- return I(this, function(h2) {
- switch (h2.label) {
- case 0:
- if (!(n3 = t3.querySelectorAll("image")).length)
- return [3, 2];
- for (r3 = [], s2 = n3.length, a2 = 0; a2 < s2; a2++)
- o3 = n3[a2], (l2 = o3.getAttributeNS(e3.XLINK, "href")) && (l2.indexOf("data:image") !== -1 || (l2.indexOf(".svg") !== -1 ? r3.push(this.svgToDataURI(o3, i3)) : r3.push(this.imageToDataURI(o3, i3))));
- return [4, Promise.all(r3)];
- case 1:
- return h2.sent(), [2];
- case 2:
- return [2];
- }
- });
- });
- }, e3.prototype.prepForeignObjects = function(t3, e4) {
- return S(this, void 0, void 0, function() {
- var e5, i3, n3;
- return I(this, function(r3) {
- if ((e5 = t3.querySelectorAll("foreignObject")).length)
- for (i3 = e5.length, n3 = 0; n3 < i3; n3++)
- this.temporarilyRemoveObject(e5[n3]);
- return [2];
- });
- });
- }, e3.prototype.imageToDataURI = function(t3, i3) {
- return S(this, void 0, void 0, function() {
- var n3, r3, s2;
- return I(this, function(a2) {
- switch (a2.label) {
- case 0:
- return a2.trys.push([0, 2, , 3]), [4, this.loadNewImage(t3.getAttributeNS(e3.XLINK, "href"), null, null, "anonymous")];
- case 1:
- n3 = a2.sent(), (r3 = document.createElement("canvas")).width = n3.width, r3.height = n3.height, r3.getContext("2d").drawImage(n3, 0, 0);
- try {
- return s2 = r3.toDataURL(), t3.setAttribute("href", s2), [2, s2];
- } catch (e4) {
- return i3.keepTainted !== false && this.temporarilyRemoveObject(t3), [2, void 0];
- }
- return [3, 3];
- case 2:
- return a2.sent(), i3 && i3.keepTainted === false || this.temporarilyRemoveObject(t3), [2, void 0];
- case 3:
- return [2];
- }
- });
- });
- }, e3.prototype.svgToDataURI = function(t3, i3) {
- return S(this, void 0, void 0, function() {
- var n3, r3, s2, a2;
- return I(this, function(o3) {
- switch (o3.label) {
- case 0:
- n3 = t3.getAttributeNS(e3.XLINK, "href"), o3.label = 1;
- case 1:
- return o3.trys.push([1, 3, , 4]), [4, Ha(n3)];
- case 2:
- return r3 = o3.sent(), s2 = this.adapter.apply("charset", { charset: "base64", type: "svg", options: i3 }).charset, a2 = this.adapter.apply("svgToDataURI", { data: "data:" + this.getContentType("svg") + ";" + s2 + "," + btoa(r3.response), options: i3 }).data, t3.setAttributeNS(e3.XLINK, "href", a2), [2, a2];
- case 3:
- return o3.sent(), i3 && i3.keepTainted === false || this.temporarilyRemoveObject(t3), [2, void 0];
- case 4:
- return [2];
- }
- });
- });
- }, e3.prototype.temporarilyRemoveObject = function(t3, e4) {
- var i3 = t3.parentElement || t3.parentNode;
- e4 || (e4 = this.sprite.paper.add("g").node), i3.insertBefore(e4, t3), t3.textContent, i3.removeChild(t3), this._removedObjects.push({ element: t3, placeholder: e4 });
- }, e3.prototype.restoreRemovedObjects = function() {
- for (var t3; t3 = this._removedObjects.pop(); )
- (t3.placeholder.parentElement || t3.placeholder.parentNode).insertBefore(t3.element, t3.placeholder);
- }, e3.prototype.simplifiedImageExport = function() {
- return S(this, void 0, void 0, function() {
- var t3, e4, i3, n3, r3, s2, a2;
- return I(this, function(o3) {
- switch (o3.label) {
- case 0:
- if (this.useSimplifiedExport === false)
- return [2, false];
- if ((t3 = Ii.getCache("simplifiedImageExport")) === false || t3 === true)
- return [2, t3];
- o3.label = 1;
- case 1:
- o3.trys.push([1, 6, , 7]), (e4 = document.createElement("canvas")).width = 1, e4.height = 1, i3 = e4.getContext("2d"), n3 = this.getDOMURL(), r3 = new Blob([this.normalizeSVG("<g></g>", {}, 1, 1)], { type: "image/svg+xml" }), s2 = n3.createObjectURL(r3), a2 = void 0, o3.label = 2;
- case 2:
- return o3.trys.push([2, 4, , 5]), [4, this.loadNewImage(s2, 1, 1)];
- case 3:
- return a2 = o3.sent(), [3, 5];
- case 4:
- return o3.sent(), [2, false];
- case 5:
- i3.drawImage(a2, 0, 0), n3.revokeObjectURL(s2);
- try {
- return Ii.setCache("simplifiedImageExport", true), [2, true];
- } catch (t4) {
- return Ii.setCache("simplifiedImageExport", false), [2, false];
- }
- return [3, 7];
- case 6:
- return o3.sent(), Ii.setCache("simplifiedImageExport", false), [2, false];
- case 7:
- return [2];
- }
- });
- });
- }, e3.prototype.loadNewImage = function(t3, e4, i3, n3) {
- return new Promise(function(r3, s2) {
- var a2;
- function o3() {
- if (n3) {
- var e5 = a2.src;
- a2.onerror = function() {
- s2(new Error('Loading image "' + t3 + '" failed'));
- }, a2.removeAttribute("crossorigin"), a2.src = "", a2.src = e5;
- } else
- s2(new Error('Loading image "' + t3 + '" failed'));
- }
- a2 = e4 && i3 ? new Image(e4, i3) : new Image(), n3 && a2.setAttribute("crossOrigin", n3), a2.onload = function() {
- r3(a2);
- }, a2.onabort = o3, a2.onerror = o3, a2.src = t3;
- });
- }, e3.prototype.getDOMURL = function() {
- return self.URL || self.webkitURL || self;
- }, e3.prototype.getSVG = function(t3, e4, i3) {
- return i3 === void 0 && (i3 = true), S(this, void 0, void 0, function() {
- var n3, r3, s2, a2, o3, l2, h2, p2, u2, d2;
- return I(this, function(c2) {
- switch (c2.label) {
- case 0:
- return (n3 = this._objectsAlreadyHidden) || this.hideNonExportableSprites(), Z(e4) || (e4 = this.getFormatOptions("svg")), [4, this.awaitValidSprites()];
- case 1:
- return c2.sent(), r3 = this.sprite.pixelWidth, s2 = this.sprite.pixelHeight, a2 = Bs(this.sprite.dom), o3 = Hs(this.sprite.dom), l2 = e4.scale || 1, h2 = this.getPixelRatio(e4), l2 = this.getAdjustedScale(r3 * h2, s2 * h2, l2, e4), p2 = this.normalizeSVG(this.serializeElement(this.sprite.paper.defs) + this.serializeElement(this.sprite.dom), e4, r3, s2, l2, a2, o3), u2 = this.adapter.apply("charset", { charset: "charset=utf-8", type: "svg", options: e4 }).charset, d2 = this.adapter.apply("getSVG", { data: i3 ? "data:" + this.getContentType(t3) + ";" + u2 + "," + encodeURIComponent(p2) : p2, options: e4 }).data, n3 || this.restoreNonExportableSprites(), [2, d2];
- }
- });
- });
- }, e3.prototype.normalizeSVG = function(t3, e4, i3, n3, r3, s2, a2, o3) {
- var l2 = "";
- i3 && (l2 += 'width="' + Math.round(i3 * (r3 || 1)) + 'px" '), n3 && (l2 += 'height="' + Math.round(n3 * (r3 || 1)) + 'px" ');
- var h2 = "";
- s2 && (h2 += "font-family: " + s2.replace(/"/g, "") + ";"), a2 && (h2 += "font-size: " + a2 + ";"), r3 && (l2 += 'viewBox="0 0 ' + i3 + " " + n3 + '" ');
- var p2 = [], u2 = t3.match(/<foreignObject[\s\S]*<\/foreignObject>/gi);
- if (u2)
- for (var d2 = 0; d2 < u2.length; d2++)
- t3 = t3.replace(u2[d2], wn), p2.push(u2[d2]);
- t3.match(/<svg/) ? l2 !== "" && (t3 = (t3 = (t3 = t3.replace(/(<svg[^>]*)width="[^"]*"/, "$1")).replace(/(<svg[^>]*)height="[^"]*"/, "$1")).replace(/(<svg)/, "$1" + l2)) : t3 = '<?xml version="1.0" encoding="utf-8"?><svg ' + l2 + ' style="' + h2 + '" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' + t3 + "</svg>", o3 && (t3 = t3.replace(/(<svg[^>]*>)/, '$1<rect width="100%" height="100%" fill="' + o3.rgba + '"/>')), /MSIE |Trident\//.test(navigator.userAgent) && (t3 = t3.replace(/<feColorMatrix [^\/>]*\/>/gi, ""));
- var c2 = new RegExp("url\\(" + Bn(Dn()), "g");
- if (t3 = (t3 = t3.replace(c2, "url(#")).replace(/url\("([^)]*)"\)/gm, "url($1)"), p2.length)
- for (d2 = 0; d2 < p2.length; d2++)
- t3 = t3.replace(wn, p2[d2]);
- return this.adapter.apply("normalizeSVG", { data: t3, options: e4 }).data;
- }, e3.prototype.serializeElement = function(t3) {
- return new XMLSerializer().serializeToString(t3);
- }, e3.prototype.getPDF = function(t3, e4) {
- return S(this, void 0, void 0, function() {
- function i3(t4) {
- var e5 = {};
- e5.normal = t4.normal.path, c2[t4.normal.path] = t4.normal.bytes, t4.bold ? (e5.bold = t4.bold.path, c2[t4.bold.path] = t4.bold.bytes) : e5.bold = t4.normal.path, t4.italics ? (e5.italics = t4.italics.path, c2[t4.italics.path] = t4.italics.bytes) : e5.italics = t4.normal.path, t4.bolditalics ? (e5.bolditalics = t4.bolditalics.path, c2[t4.bolditalics.path] = t4.bolditalics.bytes) : e5.bolditalics = t4.normal.path, d2[t4.name] = e5;
- }
- var n3, r3, s2, a2, o3, l2, h2, p2, u2, d2, c2;
- return I(this, function(f2) {
- switch (f2.label) {
- case 0:
- return [4, this.getImage(e4.imageFormat || "png", e4)];
- case 1:
- return n3 = f2.sent(), [4, this.pdfmake];
- case 2:
- return r3 = f2.sent(), s2 = [30, 30, 30, 30], a2 = { pageSize: e4.pageSize || "A4", pageOrientation: e4.pageOrientation || "portrait", pageMargins: e4.pageMargins || s2, defaultStyle: { font: e4.font ? e4.font.name : void 0 }, content: [] }, o3 = this.adapter.apply("title", { title: this.title, options: e4 }).title, l2 = 0, o3 && (a2.content.push({ text: o3, fontSize: e4.fontSize || 14, bold: true, margin: [0, 0, 0, 15] }), l2 += 50), e4.addURL && (a2.content.push({ text: this.language.translate("Saved from") + ": " + document.location.href, fontSize: e4.fontSize, margin: [0, 0, 0, 15] }), l2 += 50), t3 != "pdfdata" && a2.content.push({ image: n3, alignment: e4.align || "left", fit: this.getPageSizeFit(a2.pageSize, a2.pageMargins, l2) }), t3 == "pdfdata" || e4.addData ? (p2 = (h2 = a2.content).push, u2 = {}, [4, this.getPDFData("pdf", e4)]) : [3, 4];
- case 3:
- p2.apply(h2, [(u2.table = f2.sent(), u2.fontSize = e4.fontSize || 14, u2)]), f2.label = 4;
- case 4:
- return a2 = this.adapter.apply("pdfmakeDocument", { doc: a2, options: e4 }).doc, d2 = null, c2 = null, e4.font && (d2 = {}, c2 = {}, i3(e4.font), e4.extraFonts && Ut(e4.extraFonts, i3)), [4, new Promise(function(t4, e5) {
- r3.createPdf(a2, null, d2, c2).getDataUrl(function(e6) {
- t4(e6);
- });
- })];
- case 5:
- return [2, f2.sent()];
- }
- });
- });
- }, e3.prototype.getPDFData = function(t3, e4) {
- return S(this, void 0, void 0, function() {
- var t4, i3, n3, r3, s2, a2, o3 = this;
- return I(this, function(l2) {
- if (t4 = { body: [] }, i3 = this.adapter.apply("formatDataFields", { dataFields: this.dataFields, format: "pdf" }).dataFields, n3 = this.data, e4.pivot)
- r3 = this.adapter.apply("dataFieldsOrder", { dataFieldsOrder: this.dataFieldsOrder, format: "pdfdata" }).dataFieldsOrder, We(i3, function(i4, r4) {
- var s3 = [];
- e4.addColumnNames && s3.push(r4);
- for (var a3 = n3.length, l3 = 0; l3 < a3; l3++) {
- var h2 = n3[l3][i4];
- s3.push(o3.convertToSpecialFormat(i4, h2, e4, true));
- }
- t4.body.push(o3.getPDFDataRow(s3, e4, void 0, true));
- }, function(t5, e5) {
- var i4 = r3.indexOf(t5), n4 = r3.indexOf(e5);
- return i4 > n4 ? 1 : i4 < n4 ? -1 : 0;
- });
- else
- for (e4.addColumnNames && (t4.body.push(this.getPDFDataRow(i3, e4, void 0, true)), t4.headerRows = 1), s2 = n3.length, a2 = 0; a2 < s2; a2++)
- t4.body.push(this.getPDFDataRow(n3[a2], e4, i3));
- return [2, this.adapter.apply("pdfmakeTable", { table: t4, options: e4 }).table];
- });
- });
- }, e3.prototype.getPDFDataRow = function(t3, e4, i3, n3) {
- var r3 = this;
- n3 === void 0 && (n3 = false);
- var s2 = [];
- i3 || (i3 = t3);
- var a2 = this.adapter.apply("dataFieldsOrder", { dataFieldsOrder: this.dataFieldsOrder, format: "pdfdata" }).dataFieldsOrder;
- return We(i3, function(i4, a3) {
- var o3 = r3.convertEmptyValue(i4, t3[i4], e4), l2 = n3 ? o3 : r3.convertToSpecialFormat(i4, o3, e4);
- l2 = "" + l2, s2.push(l2);
- }, function(t4, e5) {
- var i4 = a2.indexOf(t4), n4 = a2.indexOf(e5);
- return i4 > n4 ? 1 : i4 < n4 ? -1 : 0;
- }), s2;
- }, e3.prototype.getPageSizeFit = function(t3, e4, i3) {
- i3 === void 0 && (i3 = 0);
- var n3 = [0, 0, 0, 0];
- typeof e4 == "number" ? n3 = [e4, e4, e4, e4] : e4.length == 2 ? n3 = [e4[0], e4[1], e4[0], e4[1]] : e4.length == 4 && (n3 = e4);
- var r3 = { "4A0": [4767.87, 6740.79], "2A0": [3370.39, 4767.87], A0: [2383.94, 3370.39], A1: [1683.78, 2383.94], A2: [1190.55, 1683.78], A3: [841.89, 1190.55], A4: [595.28, 841.89], A5: [419.53, 595.28], A6: [297.64, 419.53], A7: [209.76, 297.64], A8: [147.4, 209.76], A9: [104.88, 147.4], A10: [73.7, 104.88], B0: [2834.65, 4008.19], B1: [2004.09, 2834.65], B2: [1417.32, 2004.09], B3: [1000.63, 1417.32], B4: [708.66, 1000.63], B5: [498.9, 708.66], B6: [354.33, 498.9], B7: [249.45, 354.33], B8: [175.75, 249.45], B9: [124.72, 175.75], B10: [87.87, 124.72], C0: [2599.37, 3676.54], C1: [1836.85, 2599.37], C2: [1298.27, 1836.85], C3: [918.43, 1298.27], C4: [649.13, 918.43], C5: [459.21, 649.13], C6: [323.15, 459.21], C7: [229.61, 323.15], C8: [161.57, 229.61], C9: [113.39, 161.57], C10: [79.37, 113.39], RA0: [2437.8, 3458.27], RA1: [1729.13, 2437.8], RA2: [1218.9, 1729.13], RA3: [864.57, 1218.9], RA4: [609.45, 864.57], SRA0: [2551.18, 3628.35], SRA1: [1814.17, 2551.18], SRA2: [1275.59, 1814.17], SRA3: [907.09, 1275.59], SRA4: [637.8, 907.09], EXECUTIVE: [521.86, 756], FOLIO: [612, 936], LEGAL: [612, 1008], LETTER: [612, 792], TABLOID: [792, 1224] }[t3];
- return r3[0] -= n3[0] + n3[2], r3[1] -= n3[1] + n3[3] + i3, r3;
- }, e3.prototype.getExcel = function(t3, e4) {
- return S(this, void 0, void 0, function() {
- var i3, n3, r3, s2, a2, o3, l2, h2, p2, u2 = this;
- return I(this, function(d2) {
- switch (d2.label) {
- case 0:
- return Z(e4) || (e4 = this.getFormatOptions("xlsx")), [4, this.xlsx];
- case 1:
- if (i3 = d2.sent(), n3 = this.adapter.apply("xlsxWorkbookOptions", { xlsx: i3, options: { bookType: "xlsx", bookSST: false, type: "base64" } }).options, r3 = this.normalizeExcelSheetName(this.adapter.apply("xlsxSheetName", { xlsx: i3, name: this.title || this.language.translate("Data") }).name), s2 = { SheetNames: [r3], Sheets: {} }, a2 = [], o3 = this.adapter.apply("formatDataFields", { dataFields: this.dataFields, format: "xslx" }).dataFields, e4.pivot)
- l2 = this.adapter.apply("dataFieldsOrder", { dataFieldsOrder: this.dataFieldsOrder, format: "xlsx" }).dataFieldsOrder, We(o3, function(t4, i4) {
- var n4 = [];
- e4.addColumnNames && n4.push(i4);
- for (var r4 = u2.data.length, s3 = 0; s3 < r4; s3++) {
- var o4 = u2.data[s3][t4];
- n4.push(u2.convertToSpecialFormat(t4, o4, e4, true));
- }
- a2.push(u2.getExcelRow(n4, e4, void 0, true));
- }, function(t4, e5) {
- var i4 = l2.indexOf(t4), n4 = l2.indexOf(e5);
- return i4 > n4 ? 1 : i4 < n4 ? -1 : 0;
- });
- else
- for (e4.addColumnNames && a2.push(this.getExcelRow(o3, e4, void 0, true)), h2 = this.data.length, p2 = 0; p2 < h2; p2++)
- a2.push(this.getExcelRow(this.data[p2], e4, o3));
- return s2.Sheets[r3] = i3.utils.aoa_to_sheet(a2), s2 = this.adapter.apply("xlsxWorkbook", { xlsx: i3, workbook: s2, options: e4 }).workbook, [2, this.adapter.apply("getExcel", { data: "data:" + this.getContentType(t3) + ";base64," + i3.write(s2, n3), options: e4 }).data];
- }
- });
- });
- }, e3.prototype.normalizeExcelSheetName = function(t3) {
- return Nn(t3 = t3.replace(/([:\\\/?*\[\]]+)/g, " "), 31, "...", true);
- }, e3.prototype.getExcelRow = function(t3, e4, i3, n3) {
- var r3 = this;
- n3 === void 0 && (n3 = false);
- var s2 = [];
- i3 || (i3 = t3);
- var a2 = this.adapter.apply("dataFieldsOrder", { dataFieldsOrder: this.dataFieldsOrder, format: "xlsx" }).dataFieldsOrder;
- return We(i3, function(i4, a3) {
- var o3 = r3.convertEmptyValue(i4, t3[i4], e4), l2 = n3 ? o3 : r3.convertToSpecialFormat(i4, o3, e4, true);
- s2.push(l2);
- }, function(t4, e5) {
- var i4 = a2.indexOf(t4), n4 = a2.indexOf(e5);
- return i4 > n4 ? 1 : i4 < n4 ? -1 : 0;
- }), s2;
- }, e3.prototype.getCSV = function(t3, e4, i3) {
- return i3 === void 0 && (i3 = true), S(this, void 0, void 0, function() {
- var n3, r3, s2, a2, o3, l2, h2, p2, u2, d2 = this;
- return I(this, function(c2) {
- if (Z(e4) || (e4 = this.getFormatOptions("csv")), n3 = "", r3 = this.adapter.apply("formatDataFields", { dataFields: this.dataFields, format: "csv" }).dataFields, s2 = "", a2 = this.data, e4.pivot)
- o3 = this.adapter.apply("dataFieldsOrder", { dataFieldsOrder: this.dataFieldsOrder, format: "csv" }).dataFieldsOrder, We(r3, function(t4, i4) {
- var r4 = [];
- e4.addColumnNames && r4.push(i4);
- for (var o4 = a2.length, l3 = 0; l3 < o4; l3++) {
- var h3 = a2[l3][t4];
- r4.push(d2.convertToSpecialFormat(t4, h3, e4, true));
- }
- n3 += s2 + d2.getCSVRow(r4, e4, void 0, true), s2 = "\n";
- }, function(t4, e5) {
- var i4 = o3.indexOf(t4), n4 = o3.indexOf(e5);
- return i4 > n4 ? -1 : i4 < n4 ? 1 : 0;
- });
- else {
- for (l2 = a2.length, h2 = 0; h2 < l2; h2++)
- p2 = this.getCSVRow(a2[h2], e4, r3), e4.reverse ? n3 = p2 + s2 + n3 : n3 += s2 + p2, s2 = "\n";
- e4.addColumnNames && (n3 = this.getCSVRow(r3, e4, void 0, true) + s2 + n3);
- }
- return u2 = this.adapter.apply("charset", { charset: "charset=utf-8", type: t3, options: e4 }).charset, [2, this.adapter.apply("getCSV", { data: i3 ? "data:" + this.getContentType(t3) + ";" + u2 + "," + encodeURIComponent(n3) : n3, options: e4 }).data];
- });
- });
- }, e3.prototype.getCSVRow = function(t3, e4, i3, n3) {
- var r3 = this;
- n3 === void 0 && (n3 = false);
- var s2 = e4.separator || ",", a2 = [];
- i3 || (i3 = t3);
- var o3 = this.adapter.apply("dataFieldsOrder", { dataFieldsOrder: this.dataFieldsOrder, format: "csv" }).dataFieldsOrder;
- return We(i3, function(i4, o4) {
- var l2 = r3.convertEmptyValue(i4, t3[i4], e4), h2 = n3 ? l2 : r3.convertToSpecialFormat(i4, l2, e4);
- h2 = (h2 = "" + h2).replace(/"/g, '""'), (e4.forceQuotes || h2.search(new RegExp('"|\n|' + s2, "g")) >= 0) && (h2 = '"' + h2 + '"'), a2.push(h2);
- }, function(t4, e5) {
- var i4 = o3.indexOf(t4), n4 = o3.indexOf(e5);
- return i4 > n4 ? 1 : i4 < n4 ? -1 : 0;
- }), a2.join(s2);
- }, e3.prototype.getHTML = function(t3, e4, i3) {
- return i3 === void 0 && (i3 = true), S(this, void 0, void 0, function() {
- var n3, r3, s2, a2, o3, l2, h2, p2 = this;
- return I(this, function(u2) {
- if (Z(e4) || (e4 = this.getFormatOptions("html")), n3 = "<table>", e4.tableClass && (n3 = '<table class="' + e4.tableClass + '">'), r3 = this.adapter.apply("formatDataFields", { dataFields: this.dataFields, format: "html" }).dataFields, s2 = this.data, e4.pivot)
- a2 = this.adapter.apply("dataFieldsOrder", { dataFieldsOrder: this.dataFieldsOrder, format: "html" }).dataFieldsOrder, n3 += "\n<tbody>", We(r3, function(t4, i4) {
- var r4 = [];
- e4.addColumnNames && r4.push(i4);
- for (var a3 = s2.length, o4 = 0; o4 < a3; o4++) {
- var l3 = s2[o4][t4];
- r4.push(p2.convertToSpecialFormat(t4, l3, e4, true));
- }
- n3 += "\n" + p2.getHTMLRow(r4, e4, void 0, true);
- }, function(t4, e5) {
- var i4 = a2.indexOf(t4), n4 = a2.indexOf(e5);
- return i4 > n4 ? -1 : i4 < n4 ? 1 : 0;
- }), n3 += "\n</tbody>";
- else {
- for (e4.addColumnNames && (n3 += "\n<thead>\n" + this.getHTMLRow(r3, e4, void 0, true, true) + "\n</thead>"), n3 += "\n<tbody>", o3 = s2.length, l2 = 0; l2 < o3; l2++)
- n3 += "\n" + this.getHTMLRow(s2[l2], e4, r3);
- n3 += "\n</tbody>";
- }
- return n3 += "\n</table>", h2 = this.adapter.apply("charset", { charset: "charset=utf-8", type: t3, options: e4 }).charset, [2, this.adapter.apply("getHTML", { data: i3 ? "data:" + this.getContentType(t3) + ";" + h2 + "," + encodeURIComponent(n3) : n3, options: e4 }).data];
- });
- });
- }, e3.prototype.getHTMLRow = function(t3, e4, i3, n3, r3) {
- var s2 = this;
- n3 === void 0 && (n3 = false), r3 === void 0 && (r3 = false);
- var a2 = " <tr>";
- e4.rowClass && (a2 = ' <tr class="' + e4.rowClass + '">'), i3 || (i3 = t3);
- var o3 = this.adapter.apply("dataFieldsOrder", { dataFieldsOrder: this.dataFieldsOrder, format: "html" }).dataFieldsOrder, l2 = r3 ? "th" : "td", h2 = true;
- return We(i3, function(i4, r4) {
- var o4 = s2.convertEmptyValue(i4, t3[i4], e4), p2 = n3 ? o4 : s2.convertToSpecialFormat(i4, o4, e4);
- p2 = (p2 = "" + p2).replace(/[\u00A0-\u9999<>\&]/gim, function(t4) {
- return "&#" + t4.charCodeAt(0) + ";";
- });
- var u2 = l2;
- e4.pivot && h2 && (u2 = "th"), e4.cellClass ? a2 += "\n <" + u2 + ' class="' + e4.cellClass + '">' + p2 + "</" + u2 + ">" : a2 += "\n <" + u2 + ">" + p2 + "</" + u2 + ">", h2 = false;
- }, function(t4, e5) {
- var i4 = o3.indexOf(t4), n4 = o3.indexOf(e5);
- return i4 > n4 ? 1 : i4 < n4 ? -1 : 0;
- }), a2 += "\n </tr>";
- }, e3.prototype.getJSON = function(t3, e4, i3) {
- return i3 === void 0 && (i3 = true), S(this, void 0, void 0, function() {
- var n3, r3, s2, a2, o3, l2, h2, p2, u2 = this;
- return I(this, function(d2) {
- if (Z(e4) || (e4 = this.getFormatOptions("json")), r3 = this.adapter.apply("formatDataFields", { dataFields: this.dataFields, format: "json" }).dataFields, this._dynamicDataFields)
- n3 = this.data;
- else
- for (n3 = [], s2 = this.data, a2 = function(t4, i4) {
- var a3 = s2[i4];
- if (typeof a3 == "object") {
- var o4 = {};
- Ne(a3, function(t5, i5) {
- Z(r3[t5]) && (o4[r3[t5]] = u2.convertToSpecialFormat(t5, i5, e4));
- }), n3.push(o4);
- }
- }, o3 = s2.length, l2 = 0; l2 < o3; l2++)
- a2(0, l2);
- return h2 = JSON.stringify(n3, function(t4, i4) {
- return typeof i4 == "object" && Ne(i4, function(t5, n4) {
- i4[t5] = u2.convertToSpecialFormat(t5, n4, e4);
- }), i4;
- }, e4.indent), p2 = this.adapter.apply("charset", { charset: "charset=utf-8", type: t3, options: e4 }).charset, [2, this.adapter.apply("getJSON", { data: i3 ? "data:" + this.getContentType(t3) + ";" + p2 + "," + encodeURIComponent(h2) : h2, options: e4 }).data];
- });
- });
- }, e3.prototype.convertToSpecialFormat = function(t3, e4, i3, n3) {
- if (typeof e4 == "number")
- if (this.isDateField(t3))
- e4 = new Date(e4);
- else {
- if (this.isDurationField(t3))
- return this.durationFormatter.format(e4, this.durationFormat);
- if (this.isNumberField(t3) && this.numberFormat)
- return this.numberFormatter.format(e4, this.numberFormat);
- }
- return e4 instanceof Date ? i3.useTimestamps ? e4 = e4.getTime() : i3.useLocale ? n3 || (e4 = e4.toLocaleString()) : e4 = this.dateFormatter.format(e4, this.dateFormat) : Q(e4) && this.isDateField(t3) && this.dateFormat && (e4 = this.dateFormatter.format(this.dateFormatter.parse(e4), this.dateFormat)), e4;
- }, e3.prototype.convertEmptyValue = function(t3, e4, i3) {
- return Z(e4) ? e4 : i3.emptyAs;
- }, e3.prototype.download = function(t3, e4, i3) {
- return i3 === void 0 && (i3 = false), S(this, void 0, void 0, function() {
- var n3, r3, s2, a2, o3, l2, h2, p2, u2, d2, c2, f2, g2, y2, m2;
- return I(this, function(v2) {
- if (this.msBlobDownloadSupport()) {
- if (f2 = t3.split(";"), g2 = f2.shift().replace(/data:/, ""), t3 = decodeURIComponent(f2.join(";").replace(/^[^,]*,/, "")), ["image/svg+xml", "application/json", "text/csv"].indexOf(g2) != -1)
- return n3 = new Blob([t3], { type: g2 }), window.navigator.msSaveBlob(n3, e4), [2, true];
- try {
- s2 = atob(t3), t3 = s2;
- } catch (t4) {
- return [2, false];
- }
- for (l2 = new Array(t3.length), h2 = 0; h2 < t3.length; ++h2)
- p2 = t3.charCodeAt(h2), l2[h2] = p2;
- u2 = new Blob([new Uint8Array(l2)], { type: g2 }), window.navigator.msSaveBlob(u2, e4);
- } else if (this.blobDownloadSupport()) {
- if ((r3 = document.createElement("a")).download = e4, document.body.appendChild(r3), f2 = t3.split(";"), g2 = f2.shift().replace(/data:/, ""), t3 = decodeURIComponent(f2.join(";").replace(/^[^,]*,/, "")), ["image/svg+xml", "application/json", "text/csv", "text/html"].indexOf(g2) != -1)
- return i3 && (t3 = "\uFEFF" + t3), a2 = new Blob([t3], { type: g2 }), o3 = window.URL.createObjectURL(a2), r3.href = o3, r3.download = e4, r3.click(), setTimeout(function() {
- document.body.removeChild(r3), window.URL.revokeObjectURL(o3);
- }, 100), [2, true];
- try {
- s2 = atob(t3), t3 = s2;
- } catch (t4) {
- return [2, false];
- }
- for (l2 = new Array(t3.length), h2 = 0; h2 < t3.length; ++h2)
- p2 = t3.charCodeAt(h2), l2[h2] = p2;
- i3 && (l2 = [239, 187, 191].concat(l2)), u2 = new Blob([new Uint8Array(l2)], { type: g2 }), d2 = window.URL.createObjectURL(u2), r3.href = d2, r3.download = e4, document.body.appendChild(r3), r3.click(), document.body.removeChild(r3), setTimeout(function() {
- window.URL.revokeObjectURL(d2);
- }, 100);
- } else
- this.linkDownloadSupport() ? ((c2 = document.createElement("a")).download = e4, c2.href = t3, document.body.appendChild(c2), c2.click(), document.body.removeChild(c2)) : this.legacyIE() ? (f2 = t3.match(/^data:(.*);[ ]*([^,]*),(.*)$/)).length === 4 && (f2[2] == "base64" ? f2[1].match(/^image\//) && this.showModal('<img src="' + t3 + '" style="float: left; max-width: 50%; max-height: 80%; margin: 0 1em 0.5em 0; border: 1px solid #eee;" /><p>' + this.language.translate('To save the image, right-click thumbnail on the left and choose "Save picture as..."') + '</p><p style="text-align: center;"><small>' + this.language.translate("(Press ESC to close this message)") + "</small></p>", this.language.translate("Image Export Complete")) : (g2 = void 0, e4.match(/\.svg$/) ? g2 = "image/svg+xml" : (g2 = "text/plain", e4 += ".txt"), (y2 = document.createElement("iframe")).width = "1px", y2.height = "1px", y2.style.display = "none", document.body.appendChild(y2), (m2 = y2.contentDocument).open(g2, "replace"), m2.write(decodeURIComponent(f2[3])), m2.close(), m2.execCommand("SaveAs", true, e4), document.body.removeChild(y2))) : window.location.href = t3;
- return [2, true];
- });
- });
- }, e3.prototype.downloadSupport = function() {
- return this.linkDownloadSupport() || this.msBlobDownloadSupport();
- }, e3.prototype.linkDownloadSupport = function() {
- var t3 = Ii.getCache("linkDownloadSupport");
- if (t3 === false || t3 === true)
- return t3;
- var e4 = document.createElement("a").download !== void 0;
- return Ii.setCache("linkDownloadSupport", e4), e4;
- }, e3.prototype.blobDownloadSupport = function() {
- return Z(window.Blob);
- }, e3.prototype.msBlobDownloadSupport = function() {
- return Z(window.navigator.msSaveOrOpenBlob);
- }, e3.prototype.legacyIE = function() {
- var t3 = document.createElement("div");
- return t3.innerHTML = "<!--[if lt IE 10]><i></i><![endif]-->", t3.getElementsByTagName("i").length == 1;
- }, e3.prototype.print = function(t3, e4, i3) {
- return S(this, void 0, void 0, function() {
- return I(this, function(n3) {
- return e4.printMethod == "css" ? [2, this.printViaCSS(t3, e4, i3)] : [2, this.printViaIframe(t3, e4, i3)];
- });
- });
- }, e3.prototype.printViaCSS = function(t3, e4, i3) {
- return S(this, void 0, void 0, function() {
- var n3, r3, s2, a2;
- return I(this, function(o3) {
- return n3 = document.documentElement.scrollTop || document.body.scrollTop, r3 = new Ls(As(this.container), "body > *", { display: "none", position: "fixed", visibility: "hidden", opacity: "0", clipPath: "polygon(0px 0px,0px 0px,0px 0px,0px 0px);" }), i3 && document && document.title && (s2 = document.title, document.title = i3), (a2 = new Image()).src = t3, a2.style.maxWidth = "100%", a2.style.display = "block", a2.style.position = "relative", a2.style.visibility = "visible", a2.style.opacity = "1", a2.style.clipPath = "none", document.body.appendChild(a2), this.setTimeout(function() {
- window.print();
- }, 50), /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && e4.delay < 1e3 ? e4.delay = 1e3 : e4.delay < 100 && (e4.delay = 100), this.setTimeout(function() {
- document.body.removeChild(a2), r3.dispose(), s2 && (document.title = document.title), document.documentElement.scrollTop = document.body.scrollTop = n3;
- }, e4.delay || 500), [2, true];
- });
- });
- }, e3.prototype.printViaIframe = function(t3, e4, i3) {
- return S(this, void 0, void 0, function() {
- var n3, r3;
- return I(this, function(s2) {
- return (n3 = document.createElement("iframe")).style.visibility = "hidden", document.body.appendChild(n3), n3.contentWindow.document.open(), n3.contentWindow.document.close(), (r3 = new Image()).src = t3, r3.style.maxWidth = "100%", r3.style.height = "auto", i3 && (n3.contentWindow.document.title = i3), n3.contentWindow.document.body.appendChild(r3), n3.load = function() {
- n3.contentWindow.document.body.appendChild(r3);
- }, this.setTimeout(function() {
- try {
- n3.contentWindow.document.execCommand("print", false, null) || n3.contentWindow.print();
- } catch (t4) {
- n3.contentWindow.print();
- }
- }, e4.delay || 50), /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream && e4.delay < 1e3 ? e4.delay = 1e3 : e4.delay < 100 && (e4.delay = 100), this.setTimeout(function() {
- document.body.removeChild(n3);
- }, e4.delay + 50 || 100), [2, true];
- });
- });
- }, e3.prototype.findBackgroundColor = function(t3) {
- var e4 = 1, i3 = Os(t3, "background-color");
- if ((i3.match(/[^,]*,[^,]*,[^,]*,[ ]?0/) || i3 == "transparent") && (e4 = 0), e4 == 0) {
- var n3 = t3.parentElement;
- return n3 ? this.findBackgroundColor(n3) : dn("#fff");
- }
- return dn(i3, e4);
- }, Object.defineProperty(e3.prototype, "container", { get: function() {
- return this.adapter.apply("container", { container: this._container }).container;
- }, set: function(t3) {
- this._container = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "sprite", { get: function() {
- return this.adapter.apply("sprite", { sprite: this._sprite }).sprite;
- }, set: function(t3) {
- this._sprite = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "extraSprites", { get: function() {
- return this.adapter.apply("extraSprites", { extraSprites: this._extraSprites }).extraSprites;
- }, set: function(t3) {
- this._extraSprites = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "validateSprites", { get: function() {
- return this.adapter.apply("validateSprites", { validateSprites: this._validateSprites }).validateSprites;
- }, set: function(t3) {
- this._validateSprites = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "data", { get: function() {
- return this.adapter.apply("data", { data: this._data }).data;
- }, set: function(t3) {
- this._data = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dataFields", { get: function() {
- return this._dataFields || this.generateDataFields(), this.adapter.apply("dataFields", { dataFields: this._dataFields }).dataFields;
- }, set: function(t3) {
- this._dataFields = t3, this._dynamicDataFields = false;
- }, enumerable: true, configurable: true }), e3.prototype.handleDataUpdated = function() {
- this._dynamicDataFields && (this._dataFields = void 0);
- var t3 = this.data.length > 0;
- this._prevHasData != t3 && (this._prevHasData = t3, this.menu && this.menu.invalidate());
- }, Object.defineProperty(e3.prototype, "dateFormatter", { get: function() {
- return this._dateFormatter || (this._dateFormatter = new Ma(), this._dateFormatter.language = this.language), this.adapter.apply("dateFormatter", { dateFormatter: this._dateFormatter }).dateFormatter;
- }, set: function(t3) {
- this._dateFormatter = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dateFormat", { get: function() {
- return this.adapter.apply("dateFormat", { dateFormat: this._dateFormat }).dateFormat;
- }, set: function(t3) {
- this._dateFormat = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dateFields", { get: function() {
- return this._dateFields || (this._dateFields = new Fi()), this.adapter.apply("dateFields", { dateFields: this._dateFields }).dateFields;
- }, set: function(t3) {
- this._dateFields = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "numberFormatter", { get: function() {
- return this._numberFormatter || (this._numberFormatter = new Fa(), this._numberFormatter.language = this.language), this.adapter.apply("numberFormatter", { numberFormatter: this._numberFormatter }).numberFormatter;
- }, set: function(t3) {
- this._numberFormatter = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "numberFormat", { get: function() {
- return this.adapter.apply("numberFormat", { numberFormat: this._numberFormat }).numberFormat;
- }, set: function(t3) {
- this._numberFormat = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "numberFields", { get: function() {
- return this._numberFields || (this._numberFields = new Fi()), this.adapter.apply("numberFields", { numberFields: this._numberFields }).numberFields;
- }, set: function(t3) {
- this._numberFields = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "durationFormatter", { get: function() {
- return this._durationFormatter || (this._durationFormatter = new La(), this._durationFormatter.language = this.language), this.adapter.apply("durationFormatter", { durationFormatter: this._durationFormatter }).durationFormatter;
- }, set: function(t3) {
- this._durationFormatter = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "durationFormat", { get: function() {
- return this.adapter.apply("durationFormat", { durationFormat: this._durationFormat }).durationFormat;
- }, set: function(t3) {
- this._durationFormat = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "durationFields", { get: function() {
- return this._durationFields || (this._durationFields = new Fi()), this.adapter.apply("durationFields", { durationFields: this._durationFields }).durationFields;
- }, set: function(t3) {
- this._durationFields = t3;
- }, enumerable: true, configurable: true }), e3.prototype.generateDataFields = function() {
- var t3 = this;
- this._dataFields = {}, this.data.length && Ut(this.data, function(e4) {
- Ne(e4, function(e5, i3) {
- Z(t3._dataFields[e5]) || (t3._dataFields[e5] = t3.adapter.apply("dataFieldName", { name: e5, field: e5 }).name);
- });
- });
- }, e3.prototype.isDateField = function(t3) {
- return this.adapter.apply("isDateField", { isDateField: this.dateFields.contains(t3), field: t3 }).isDateField;
- }, e3.prototype.isNumberField = function(t3) {
- return this.adapter.apply("isNumberField", { isNumberField: this.numberFields.contains(t3), field: t3 }).isNumberField;
- }, e3.prototype.isDurationField = function(t3) {
- return this.adapter.apply("isDurationField", { isDurationField: this.durationFields.contains(t3), field: t3 }).isDurationField;
- }, e3.prototype.getContentType = function(t3) {
- var e4 = "";
- switch (t3) {
- case "png":
- case "gif":
- e4 = "image/" + t3;
- break;
- case "jpg":
- e4 = "image/jpeg";
- break;
- case "svg":
- e4 = "image/svg+xml";
- break;
- case "csv":
- e4 = "text/csv";
- break;
- case "json":
- e4 = "application/json";
- break;
- case "html":
- e4 = "text/html";
- break;
- case "pdf":
- case "pdfdata":
- e4 = "application/pdf";
- break;
- case "xlsx":
- e4 = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
- }
- return this.adapter.apply("contentType", { contentType: e4, type: t3 }).contentType;
- }, Object.defineProperty(e3.prototype, "filePrefix", { get: function() {
- return this.adapter.apply("filePrefix", { filePrefix: this._filePrefix }).filePrefix;
- }, set: function(t3) {
- this._filePrefix = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "backgroundColor", { get: function() {
- return this.adapter.apply("backgroundColor", { backgroundColor: this._backgroundColor }).backgroundColor;
- }, set: function(t3) {
- this._backgroundColor = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "title", { get: function() {
- return this.adapter.apply("title", { title: this._title }).title;
- }, set: function(t3) {
- this._title = t3;
- }, enumerable: true, configurable: true }), e3.prototype.showPreloader = function() {
- var t3 = this.preloader;
- t3 && (t3.progress = 0.5, t3.label.text = "...");
- }, e3.prototype.hidePreloader = function() {
- var t3 = this.preloader;
- t3 && (t3.progress = 1);
- }, Object.defineProperty(e3.prototype, "preloader", { get: function() {
- return this._sprite && this._sprite.parent && this._sprite.parent.preloader ? this._sprite.parent.preloader : void 0;
- }, enumerable: true, configurable: true }), e3.prototype.showTimeout = function() {
- this.showModal(this.adapter.apply("timeoutMessage", { message: this.language.translate("Export operation took longer than expected. Something might have gone wrong.") }).message);
- }, e3.prototype.hideTimeout = function() {
- this._timeoutTimeout && (this.removeDispose(this._timeoutTimeout), this._timeoutTimeout = null), this.hideModal();
- }, Object.defineProperty(e3.prototype, "language", { get: function() {
- return this._language || (this._language = new Ta()), this._language;
- }, set: function(t3) {
- this._language = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "modal", { get: function() {
- return this._modal || (this._modal = new ca(), this._modal.adapter.add("classPrefix", function(t3) {
- return ls.classNamePrefix + t3;
- })), this._modal;
- }, enumerable: true, configurable: true }), e3.prototype.showModal = function(t3, e4) {
- this.hideModal(), this.hidePreloader();
- var i3 = this.modal;
- i3.container = this.sprite.svgContainer.SVGContainer, i3.content = t3, i3.readerTitle = e4, i3.open();
- }, e3.prototype.hideModal = function() {
- this._modal && this.modal.close();
- }, e3.prototype._canvg = function() {
- return S(this, void 0, void 0, function() {
- var t3;
- return I(this, function(e4) {
- switch (e4.label) {
- case 0:
- return [4, a.e(265).then(a.bind(a, 1234))];
- case 1:
- return (t3 = e4.sent()).default != null ? [2, t3.default] : [2, t3];
- }
- });
- });
- }, Object.defineProperty(e3.prototype, "canvg", { get: function() {
- return this._canvg();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pdfmake", { get: function() {
- return ja == null && (ja = function() {
- return S(this, void 0, void 0, function() {
- var t3, e4, i3, n3;
- return I(this, function(r3) {
- switch (r3.label) {
- case 0:
- return [4, Promise.all([a.e(643).then(a.t.bind(a, 6727, 23)), a.e(643).then(a.bind(a, 4995))])];
- case 1:
- return t3 = r3.sent(), e4 = t3[0], i3 = t3[1], (n3 = window).pdfMake = n3.pdfMake || {}, n3.pdfMake.vfs = i3.default, e4.vfs = i3.default, [2, e4];
- }
- });
- });
- }()), ja;
- }, enumerable: true, configurable: true }), e3.prototype._xlsx = function() {
- return S(this, void 0, void 0, function() {
- return I(this, function(t3) {
- switch (t3.label) {
- case 0:
- return [4, Promise.all([a.e(739), a.e(297)]).then(a.t.bind(a, 7739, 23))];
- case 1:
- return [2, t3.sent()];
- }
- });
- });
- }, Object.defineProperty(e3.prototype, "xlsx", { get: function() {
- return this._xlsx();
- }, enumerable: true, configurable: true }), e3.prototype.setFormatOptions = function(t3, e4) {
- this._formatOptions.setKey(t3, e4);
- }, e3.prototype.getFormatOptions = function(t3) {
- return this._formatOptions.getKey(t3);
- }, Object.defineProperty(e3.prototype, "formatOptions", { get: function() {
- return this._formatOptions;
- }, enumerable: true, configurable: true }), e3.prototype._disablePointers = function() {
- Z(this._spriteInteractionsEnabled) || (this._spriteInteractionsEnabled = this.sprite.interactionsEnabled), this.sprite.interactionsEnabled = false;
- }, e3.prototype._releasePointers = function() {
- Z(this._spriteInteractionsEnabled) && !this._exportRunning && (this.sprite.interactionsEnabled = this._spriteInteractionsEnabled);
- }, e3.prototype.hideNonExportableSprites = function() {
- var t3 = this;
- if (!this._objectsAlreadyHidden) {
- var e4 = this.sprite.svgContainer;
- e4 && Ut(e4.nonExportableSprites, function(e5) {
- e5.isHidden || e5.isHiding || !e5.visible || t3._hiddenObjects.push(e5), e5.hide(0);
- }), this._objectsAlreadyHidden = true;
- }
- }, e3.prototype.restoreNonExportableSprites = function() {
- this._objectsAlreadyHidden && (Ut(this._hiddenObjects, function(t3) {
- t3.show(0);
- }), this._hiddenObjects = [], this._objectsAlreadyHidden = false);
- }, e3.prototype.awaitValidSprites = function() {
- return S(this, void 0, void 0, function() {
- var t3;
- return I(this, function(e4) {
- switch (e4.label) {
- case 0:
- return t3 = [], this.validateSprites.length && Ut(this.validateSprites, function(e5, i3) {
- e5.invalid && t3.push(new Promise(function(t4, i4) {
- e5.events.once("validated", function(e6) {
- t4();
- });
- }));
- }), t3.length ? [4, Promise.all(t3)] : [3, 2];
- case 1:
- e4.sent(), e4.label = 2;
- case 2:
- return [2];
- }
- });
- });
- }, e3.prototype.processConfig = function(e4) {
- Ii.registeredClasses.ExportMenu = Ba, e4 && (Z(e4.menu) && !Z(e4.menu.type) && (e4.menu.type = "ExportMenu"), Z(e4.dataFields) && et(e4.dataFields) && (this.dataFields = e4.dataFields, delete e4.dataFields)), t2.prototype.processConfig.call(this, e4);
- }, e3.XLINK = "http://www.w3.org/1999/xlink", e3;
- }(Ra), Ka = ["fill", "fillOpacity", "stroke", "strokeOpacity", "strokeWidth", "strokeDasharray", "strokeDashoffset", "strokeLinecap", "strokeLinejoin"], Za = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.properties = {}, e4._eventDispatcher = new as(e4), e4._bindings = {}, e4._isTemplate = false, e4._isPath = false, e4._inited = false, e4._ready = false, e4.isHiding = false, e4._isHidden = false, e4.isShowing = false, e4.isStandaloneInstance = false, e4._isActive = false, e4._mask = new ve(), e4._positionPrecision = 3, e4._language = new ve(), e4._exporting = new ve(), e4._exportable = true, e4._bbox = { x: 0, y: 0, width: 0, height: 0 }, e4.invalid = false, e4.positionInvalid = false, e4.propertyFields = {}, e4.applyOnClones = false, e4._measuredWidthSelf = 0, e4._measuredHeightSelf = 0, e4.maxLeft = 0, e4.maxRight = 0, e4.maxTop = 0, e4.maxBottom = 0, e4.maxLeftSelf = 0, e4.maxRightSelf = 0, e4.maxTopSelf = 0, e4.maxBottomSelf = 0, e4._isDragged = false, e4._isResized = false, e4._disabled = false, e4._internalDisabled = false, e4._updateDisabled = false, e4._internalDefaultsApplied = false, e4.rollOutDelay = 0, e4.isBaseSprite = false, e4.shouldClone = true, e4.appeared = false, e4.ex = 0, e4.ey = 0, e4.dragWhileResize = false, e4.measureFailed = false, e4.preventShow = false, e4.cloneTooltip = true, e4.className = "Sprite", e4._disposers.push(e4._eventDispatcher), e4.uid, e4.group = e4.paper.addGroup("g"), e4.setPropertyValue("scale", 1), e4.setPropertyValue("rotation", 0), e4.setPropertyValue("align", "none"), e4.setPropertyValue("valign", "none"), e4.setPropertyValue("pixelPerfect", false), e4.setPropertyValue("visible", true), e4.setPropertyValue("tooltipPosition", "fixed"), e4.setPropertyValue("verticalCenter", "none"), e4.setPropertyValue("horizontalCenter", "none"), e4.setPropertyValue("tooltipX", V(50)), e4.setPropertyValue("tooltipX", V(50)), e4.setPropertyValue("marginTop", 0), e4.setPropertyValue("marginBottom", 0), e4.setPropertyValue("marginLeft", 0), e4.setPropertyValue("marginRight", 0), e4.setPropertyValue("dx", 0), e4.setPropertyValue("dy", 0), e4.setPropertyValue("paddingTop", 0), e4.setPropertyValue("paddingBottom", 0), e4.setPropertyValue("paddingRight", 0), e4.setPropertyValue("paddingLeft", 0), e4.setPropertyValue("togglable", false), e4.setPropertyValue("hidden", false), e4.setPropertyValue("urlTarget", "_self"), e4.setPropertyValue("alwaysShowTooltip", false), e4.setPropertyValue("showTooltipOn", "hover"), e4._prevMeasuredWidth = 0, e4._prevMeasuredHeight = 0, e4._measuredWidth = 0, e4._measuredHeight = 0, e4._isMeasured = true, e4.invalidate(), e4.applyTheme(), e4._disposers.push(e4.events), e4._disposers.push(e4.group), e4._disposers.push(e4._mask), e4._disposers.push(e4._language), e4._disposers.push(e4._exporting), e4._disposers.push(new ye(function() {
- Ne(e4._bindings, function(t3, e5) {
- e5.dispose();
- });
- })), e4.setPropertyValue("interactionsEnabled", true), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "events", { get: function() {
- return this._eventDispatcher;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "adapter", { get: function() {
- return this._adapterO || (this._adapterO = new Yi(this)), this._adapterO;
- }, enumerable: true, configurable: true }), e3.prototype.applyTheme = function() {
- t2.prototype.applyTheme.call(this), ls.autoSetClassName && this.setClassName();
- }, e3.prototype.getCurrentThemes = function() {
- var t3 = this._themes;
- if (t3)
- return t3;
- var e4 = this._parent;
- return e4 ? e4.getCurrentThemes() : Ii.themes;
- }, e3.prototype.applyInternalDefaults = function() {
- this._internalDefaultsApplied = true;
- }, e3.prototype.invalidate = function() {
- this.disabled || this._isTemplate || this.__disabled || this.invalid || (this.invalid = true, Ii.addToInvalidSprites(this), Qa.requestFrame());
- }, e3.prototype.validate = function() {
- this.dispatchImmediately("beforevalidated"), this._internalDefaultsApplied || this.applyInternalDefaults(), this.beforeDraw(), this.draw(), this.invalid = false, Ii.removeFromInvalidSprites(this), this.afterDraw();
- }, e3.prototype.invalidatePosition = function() {
- this.disabled || this._isTemplate || this.positionInvalid || (this.positionInvalid = true, Ii.addToInvalidPositions(this), Qa.requestFrame());
- }, e3.prototype.validatePosition = function() {
- var t3 = this.pixelX, e4 = this.pixelY, i3 = this.dx, n3 = this.dy, r3 = t3 + i3, s2 = e4 + n3;
- this._updateDisabled && (this._internalDisabled ? this.group.attr({ display: "none" }) : this.disabled || this.removeSVGAttribute("display"), this._updateDisabled = false);
- var a2 = this.measure(), o3 = this.group.transformString;
- this.group.moveTo({ x: r3, y: s2 }), this.group.rotation = this.rotation, this.nonScaling ? this.group.scale = this.scale / this.globalScale : this.group.scale = this.scale, (o3 != this.group.transformString || a2) && (o3 == null ? this.dispatch("transformed") : this.dispatchImmediately("transformed"), this.dispatch("positionchanged"), this.showTooltipOn != "hit" && this.showTooltipOn != "always" || this.updateTooltipPosition()), t3 + i3 == r3 && e4 + n3 == s2 && (Ii.removeFromInvalidPositions(this), this.positionInvalid = false);
- var l2 = this._maskRectangle;
- l2 && this._clipElement.moveTo({ x: l2.x - t3, y: l2.y - e4 });
- }, e3.prototype.beforeDraw = function() {
- }, e3.prototype.draw = function() {
- }, e3.prototype.afterDraw = function() {
- var t3, e4;
- if ((this.isMeasured || this.horizontalCenter !== "none" || this.verticalCenter !== "none") && this.measureElement(), this._inited)
- this.dispatch("validated");
- else {
- if (this._adapterO)
- try {
- for (var i3 = D(this._adapterO.keys()), n3 = i3.next(); !n3.done; n3 = i3.next()) {
- var r3 = n3.value;
- switch (r3) {
- case "mask":
- case "fill":
- case "opacity":
- case "fillOpacity":
- case "stroke":
- case "strokeOpacity":
- case "strokeWidth":
- case "shapeRendering":
- case "strokeDasharray":
- case "strokeDashoffset":
- case "strokeLinecap":
- case "strokeLinejoin":
- case "textDecoration":
- case "fontSize":
- case "fontFamily":
- case "fontWeight":
- this[r3] = this[r3];
- }
- }
- } catch (e5) {
- t3 = { error: e5 };
- } finally {
- try {
- n3 && !n3.done && (e4 = i3.return) && e4.call(i3);
- } finally {
- if (t3)
- throw t3.error;
- }
- }
- this.applyFilters(), this.visible = this.visible, this.interactionsEnabled = this.getPropertyValue("interactionsEnabled"), this._inited = true, this.showOnInit || (this.appeared = true), this.hidden && this.hide(0), this.applyMask(), this.dispatch("validated"), this.dispatch("inited"), this.dispatchReady();
- }
- this.showTooltipOn == "always" && (!this.visible || this.disabled || this.__disabled ? this.hideTooltip(0) : this.showTooltip());
- }, e3.prototype.dispatchReady = function() {
- this.isReady() || (this._ready = true, this.dispatch("ready"));
- }, e3.prototype.reinit = function() {
- this._inited = false, this.setState(this.defaultState), this.invalidate();
- }, e3.prototype.handleGlobalScale = function() {
- this.dispatch("globalscalechanged"), this.nonScalingStroke && (this.strokeWidth = this.strokeWidth), this.nonScaling && this.validatePosition(), this.updateFilterScale();
- }, e3.prototype.updateFilterScale = function() {
- var t3 = this;
- ti(this.filters.iterator(), function(e4) {
- e4.scale = t3.globalScale;
- });
- }, e3.prototype.removeFromInvalids = function() {
- Ii.removeFromInvalidSprites(this), Ii.removeFromInvalidPositions(this);
- }, e3.prototype.copyFrom = function(e4) {
- var i3 = this;
- t2.prototype.copyFrom.call(this, e4), this.isMeasured = e4.isMeasured, this.states.copyFrom(e4.states), e4.filters.length > 0 && e4.filters.each(function(t3) {
- i3.filters.push(t3.clone());
- }), e4._adapterO && this.adapter.copyFrom(e4._adapterO), e4._interaction && this.interactions.copyFrom(e4.interactions), e4._plugins && this.plugins.copyFrom(e4.plugins), this.configField = e4.configField, this.applyOnClones = e4.applyOnClones, this.disabled = e4.disabled, this.virtualParent = e4.virtualParent, this.exportable = e4.exportable, e4._tooltip && (this._tooltip ? this._tooltip.copyFrom(e4.tooltip) : e4.cloneTooltip ? this.tooltip = e4.tooltip.clone() : this._tooltip = e4.tooltip), this._showSystemTooltip = e4.showSystemTooltip, Sn(e4.propertyFields, this.propertyFields), Sn(e4.properties, this), e4.fillModifier && (this.fillModifier = e4.fillModifier.clone()), e4.strokeModifier && (this.strokeModifier = e4.strokeModifier.clone());
- }, e3.prototype.dispose = function() {
- if (!this.isDisposed()) {
- if (this.showTooltipOn == "always" && this.tooltip && this.tooltip.hide(), this.dispatchImmediately("beforedisposed"), this.isBaseSprite) {
- if (this.htmlContainer)
- for (; this.htmlContainer.childNodes.length > 0; )
- this.htmlContainer.removeChild(this.htmlContainer.firstChild);
- this.isBaseSprite = false;
- }
- if (t2.prototype.dispose.call(this), this._adapterO && this._adapterO.clear(), this.applyOnClones && this._clones)
- for (var e4 = this._clones.length - 1; e4 >= 0; e4--)
- this._clones.getIndex(e4).dispose();
- this._svgContainer && this._svgContainer.dispose(), this._interactionDisposer && (this._interactionDisposer.dispose(), this._interactionDisposer = void 0), this._urlDisposer && this._urlDisposer.dispose(), this.removeFromInvalids(), this.element && this.element.dispose(), this.group && this.group.dispose(), this._numberFormatter && this._numberFormatter.dispose(), this._focusFilter && this._focusFilter.dispose();
- var i3 = this.stroke;
- !i3 || i3 instanceof un || !i3.dispose || this.clonedFrom && this.clonedFrom.stroke == i3 || i3.dispose();
- var n3 = this.fill;
- if (!n3 || n3 instanceof un || !n3.dispose || this.clonedFrom && this.clonedFrom.fill == n3 || n3.dispose(), Z(this.id) && this.map.removeKey(this.id), this.parent = void 0, this._filters)
- for (; this._filters.length > 0; ) {
- var r3 = this._filters.getIndex(0);
- r3.dispose(), this._filters.removeValue(r3);
- }
- this._alwaysShowDisposers = void 0;
- }
- }, Object.defineProperty(e3.prototype, "isTemplate", { get: function() {
- return this._isTemplate;
- }, set: function(t3) {
- t3 = z(t3), this._isTemplate != t3 && (this._isTemplate = t3, this instanceof $a && ti(this.children.iterator(), function(e4) {
- e4.isTemplate = t3;
- }), t3 ? (this.parent = this._parent, this.removeFromInvalids()) : this.invalidate());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "showSystemTooltip", { get: function() {
- return Z(this._showSystemTooltip) ? this._showSystemTooltip : this.virtualParent ? this.virtualParent.showSystemTooltip : !!this._parent && this._parent.showSystemTooltip;
- }, set: function(t3) {
- t3 = z(t3), this._showSystemTooltip != t3 && (this._showSystemTooltip = t3, this.applyAccessibility());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "topParent", { get: function() {
- return this._topParent ? this._topParent : this._parent ? this._parent.topParent : void 0;
- }, set: function(t3) {
- this._topParent = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "parent", { get: function() {
- return this._parent;
- }, set: function(t3) {
- if (!this._isTemplate) {
- this.paper;
- var e4 = this._parent;
- e4 != t3 && (e4 && e4.children.removeValue(this), this._parent = t3, t3 ? (this.topParent = t3.topParent, t3.isTemplate && (this.isTemplate = true), this.baseId = t3.baseId, t3.children.push(this), this._tooltip && !this._tooltipContainer && (this._tooltip.parent = t3.tooltipContainer), this._dataItem || (this.dataItem = t3.dataItem), this.handleAlwaysShowTooltip(), this.dataItem && this.applyAccessibility(), this.dispatchImmediately("parentset")) : this.topParent = void 0);
- }
- }, enumerable: true, configurable: true }), e3.prototype.handleAlwaysShow = function() {
- this.showTooltip();
- }, e3.prototype.handleAlwaysShowTooltip = function() {
- var t3 = this, e4 = this._alwaysShowDisposers;
- if (e4 && Ut(e4, function(t4) {
- t4.dispose();
- }), this._alwaysShowDisposers = [], this.showTooltipOn == "always")
- for (; t3 != null; ) {
- var i3 = t3.events.on("visibilitychanged", this.handleAlwaysShow, this, false);
- this.addDisposer(i3), this._alwaysShowDisposers.push(i3), t3 = t3.parent;
- }
- }, Object.defineProperty(e3.prototype, "virtualParent", { get: function() {
- return this._virtualParent;
- }, set: function(t3) {
- this._virtualParent = t3, this.dataItem && this.applyAccessibility();
- }, enumerable: true, configurable: true }), e3.prototype.appendDefs = function() {
- this.filterElement && this.paper.appendDef(this.filterElement);
- var t3 = this.fill;
- t3 && t3.element && this.paper.appendDef(t3.element);
- var e4 = this.stroke;
- if (e4 && e4.element && this.paper.appendDef(e4.element), this.fillModifier && this.fill instanceof un) {
- var i3 = this.fillModifier.modify(this.fill);
- i3 && i3.element && this.paper.appendDef(i3.element);
- }
- if (this.strokeModifier && this.stroke instanceof un) {
- var n3 = this.strokeModifier.modify(this.stroke);
- n3 && n3.element && this.paper.appendDef(n3.element);
- }
- this._clipPath && this.paper.appendDef(this._clipPath), this._exportable === false && (this.exportable = false);
- }, Object.defineProperty(e3.prototype, "map", { get: function() {
- var t3 = this.topParent;
- return t3 ? t3.map : (this._map || (this._map = new Pi()), this._map);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "delayedMap", { get: function() {
- var t3 = this.topParent;
- return t3 ? t3.delayedMap : (this._delayedMap || (this._delayedMap = new Pi()), this._delayedMap);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "id", { get: function() {
- return this._id;
- }, set: function(t3) {
- if (this._id != t3) {
- if (this._id = t3, this.map.hasKey(t3))
- throw Error("Duplicate id (" + t3 + ") used on multiple objects.");
- this.map.setKey(t3, this), ls.autoSetClassName && this.setClassName();
- }
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dom", { get: function() {
- return this.group.node;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "paper", { get: function() {
- if (this._paper)
- return this._paper;
- var t3 = this._parent;
- return t3 ? t3.paper : wa();
- }, set: function(t3) {
- this.setPaper(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setPaper = function(t3) {
- return this._paper != t3 && (this._paper = t3, this.appendDefs(), true);
- }, Object.defineProperty(e3.prototype, "htmlContainer", { get: function() {
- if (this._htmlContainer)
- return this._htmlContainer;
- var t3 = this._parent;
- return t3 ? t3.htmlContainer : void 0;
- }, set: function(t3) {
- this._htmlContainer = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "titleElement", { get: function() {
- return this._titleElement || (this._titleElement = this.paper.add("title"), this.group.add(this._titleElement)), this._titleElement;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "descriptionElement", { get: function() {
- return this._descriptionElement || (this._descriptionElement = this.paper.add("desc"), this.group.add(this._descriptionElement)), this._descriptionElement;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "filters", { get: function() {
- return this._filters || (this._filters = new Fi(), this._disposers.push(this._filters.events.onAll(this.applyFilters, this)), this._disposers.push(new Ai(this._filters))), this._filters;
- }, enumerable: true, configurable: true }), e3.prototype.setSVGAttributes = function() {
- this.fill = this.fill, this.opacity = this.opacity, this.fillOpacity = this.fillOpacity, this.stroke = this.stroke, this.strokeOpacity = this.strokeOpacity, this.shapeRendering = this.shapeRendering, this.strokeDasharray = this.strokeDasharray, this.strokeDashoffset = this.strokeDashoffset, this.strokeLinecap = this.strokeLinecap, this.strokeLinejoin = this.strokeLinejoin, this.focusable = this.focusable, this.tabindex = this.tabindex, this.role = this.role;
- }, e3.prototype.setSVGAttribute = function(t3) {
- this.group.attr(t3);
- }, e3.prototype.removeSVGAttribute = function(t3) {
- this.group.removeAttr(t3);
- }, e3.prototype.setClassName = function() {
- var t3 = this.className, e4 = ls.classNamePrefix;
- this.element && this.element.addClass(e4 + t3), this.group.addClass(e4 + t3 + "-group"), Z(this.id) && this.group.addClass(e4 + this.id), this.userClassName && this.group.addClass(this.userClassName);
- }, e3.prototype.uidAttr = function() {
- return this.setSVGAttribute({ id: this.uid }), this.uid;
- }, e3.prototype.updateClipPath = function() {
- var t3 = this._clipElement;
- t3 && t3.moveTo({ x: this.mask.pixelX, y: this.mask.pixelY });
- }, e3.prototype.createClipPath = function() {
- if (!this._clipPath) {
- this._clipPath = this.paper.addGroup("clipPath"), this.paper.appendDef(this._clipPath), this._disposers.push(this._clipPath);
- var t3 = Ii.getUniqueId();
- this._clipPath.attr({ id: t3 }), this.group.attr({ "clip-path": 'url("' + Dn() + t3 + '")' });
- }
- }, e3.prototype.applyMask = function() {
- var t3 = this.mask;
- if (this._clipPath && t3)
- if (t3 instanceof $a) {
- this._clipElement.attr({ width: gt(0, t3.pixelWidth), height: gt(0, t3.pixelHeight) });
- var e4 = dr({ x: t3.pixelX, y: t3.pixelY }, t3.parent, this);
- this._clipPath.x = e4.x, this._clipPath.y = e4.y;
- } else
- t3.element && t3.element != this._clipElement && (this._clipElement = t3.element, this._clipPath.add(this._clipElement)), this._clipPath.scale = t3.scale, this._clipPath.x = t3.pixelX, this._clipPath.y = t3.pixelY, this._clipPath.rotation = t3.rotation;
- }, e3.prototype.applyFilters = function() {
- var t3 = this;
- if (this._filters && this._filters.length > 0) {
- var e4 = 100, i3 = 100;
- this.filterElement ? this.filterElement.removeChildNodes() : (this.filterElement = this.paper.addGroup("filter"), this._disposers.push(this.filterElement)), this.paper.appendDef(this.filterElement);
- var n3 = "filter-" + this.uid;
- this.filterElement.attr({ id: n3 }), ti(this.filters.iterator(), function(n4) {
- n4.sprite = t3, n4.paper = t3.paper, t3.filterElement.attr({ filterUnits: n4.filterUnits }), n4.appendPrimitives(t3.filterElement), n4.width > e4 && (e4 = n4.width), n4.height > i3 && (i3 = n4.height), n4.scale = t3.globalScale;
- });
- var r3 = e4 + "%", s2 = i3 + "%";
- this.filterElement.attr({ width: r3, height: s2, x: -(e4 - 100) / 2 + "%", y: -(i3 - 100) / 2 + "%" }), this.group.attr({ filter: 'url("' + Dn() + n3 + '")' });
- } else
- this.filterElement && (this.group.removeAttr("filter"), this.filterElement.removeChildNodes());
- }, e3.prototype.removeClipPath = function() {
- this._clipPath && (this.removeDispose(this._clipPath), this._clipPath = void 0);
- }, e3.prototype.setElement = function(t3) {
- this.element = t3, this.setSVGAttributes(), this.applyAccessibility();
- }, Object.defineProperty(e3.prototype, "element", { get: function() {
- return this._element;
- }, set: function(t3) {
- this.removeElement(), this._element = t3, this.group.add(t3), t3.node instanceof SVGPathElement && (this._isPath = true), this.invalid || this.validate(), ls.autoSetClassName && this.setClassName();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "svgContainer", { get: function() {
- return this._svgContainer ? this._svgContainer : this._parent ? this._parent.svgContainer : void 0;
- }, set: function(t3) {
- this._svgContainer = t3;
- }, enumerable: true, configurable: true }), e3.prototype.measureElement = function() {
- if (this.element)
- if (this.definedBBox)
- this._bbox = this.definedBBox;
- else {
- var t3 = this.element.getBBox();
- this._bbox = { x: t3.x, y: t3.y, width: t3.width, height: t3.height };
- }
- }, e3.prototype.updateCenter = function() {
- if (this.element) {
- var t3 = this.element.transformString, e4 = this.bbox, i3 = 0, n3 = 0, r3 = e4.x, s2 = e4.y, a2 = e4.width, o3 = e4.height, l2 = this.pixelPaddingLeft, h2 = this.pixelPaddingRight, p2 = this.pixelPaddingTop, u2 = this.pixelPaddingBottom, d2 = gt(a2 + l2 + h2, this.pixelWidth), c2 = gt(o3 + p2 + u2, this.pixelHeight), f2 = e4.x, g2 = e4.x + d2, y2 = e4.y, m2 = e4.y + c2, v2 = this.horizontalCenter, b2 = this.verticalCenter;
- switch (v2) {
- case "none":
- i3 = r3 + l2;
- break;
- case "left":
- i3 = l2;
- break;
- case "middle":
- i3 = l2 - (a2 + h2 + l2) / 2;
- break;
- case "right":
- i3 = -h2 - a2;
- }
- switch (b2) {
- case "none":
- n3 = s2 + p2;
- break;
- case "top":
- n3 = p2;
- break;
- case "middle":
- n3 = p2 - (o3 + u2 + p2) / 2;
- break;
- case "bottom":
- n3 = -u2 - o3;
- }
- this._measuredHeight = c2, this._measuredWidth = d2;
- var x2 = lt(i3 - r3, this._positionPrecision, true), _2 = lt(n3 - s2, this._positionPrecision, true);
- this.ex = x2 - l2, this.ey = _2 - p2, this.maxLeft = f2 + x2 - l2, this.maxRight = g2 + x2 - l2, this.maxTop = y2 + _2 - p2, this.maxBottom = m2 + _2 - p2, this.pixelPerfect && ls.pixelPerfectPrecision == 0 && (x2 -= 0.5, _2 -= 0.5), this.element.moveTo({ x: x2, y: _2 }), t3 != this.element.transformString && this.dispatchImmediately("transformed");
- }
- }, e3.prototype.measure = function() {
- this.updateCenter();
- var t3 = this._measuredWidth, e4 = this._measuredHeight, i3 = this.maxLeft, n3 = this.maxRight, r3 = this.maxTop, s2 = this.maxBottom;
- this._measuredWidthSelf = t3, this._measuredHeightSelf = e4;
- var a2 = this._positionPrecision;
- if (this.maxLeftSelf = this.maxLeft, this.maxRightSelf = this.maxRight, this.maxTopSelf = this.maxTop, this.maxBottomSelf = this.maxBottom, this.rotation !== 0 || this.scale !== 1 || this.nonScaling) {
- this.nonScalingStroke && (this.strokeWidth = this.strokeWidth);
- var o3 = this.paper.svg, l2 = o3.createSVGMatrix(), h2 = this.rotation, p2 = this.scale;
- this.nonScaling && (p2 = this.scale / this.globalScale), l2.a = ft(h2) * p2, l2.c = -dt(h2) * p2, l2.e = 0, l2.b = dt(h2) * p2, l2.d = ft(h2) * p2, l2.f = 0;
- var u2 = o3.createSVGPoint();
- u2.x = i3, u2.y = r3;
- var d2 = o3.createSVGPoint();
- d2.x = n3, d2.y = r3;
- var c2 = o3.createSVGPoint();
- c2.x = n3, c2.y = s2;
- var f2 = o3.createSVGPoint();
- f2.x = i3, f2.y = s2;
- var g2 = u2.matrixTransform(l2), y2 = d2.matrixTransform(l2), m2 = c2.matrixTransform(l2), v2 = f2.matrixTransform(l2);
- i3 = Math.min(g2.x, y2.x, m2.x, v2.x), n3 = Math.max(g2.x, y2.x, m2.x, v2.x), r3 = Math.min(g2.y, y2.y, m2.y, v2.y), t3 = n3 - i3, e4 = (s2 = Math.max(g2.y, y2.y, m2.y, v2.y)) - r3, this.maxLeft = lt(i3, a2, true), this.maxRight = lt(n3, a2, true), this.maxTop = lt(r3, a2, true), this.maxBottom = lt(s2, a2, true);
- }
- return this._measuredWidth = lt(t3, a2, true), this._measuredHeight = lt(e4, a2, true), (this._measuredWidth != this._prevMeasuredWidth || this._measuredHeight != this._prevMeasuredHeight) && (this._prevMeasuredHeight = this._measuredHeight, this._prevMeasuredWidth = this._measuredWidth, this.dispatch("sizechanged"), (this.isHover || this.showTooltipOn == "hit" || this.showTooltipOn == "always") && this.tooltip && this.tooltip.visible && (Z(this.tooltipText) || Z(this.tooltipHTML)) && this.updateTooltipPosition(), true);
- }, e3.prototype.insertBefore = function(t3) {
- var e4 = this._parent;
- if (e4) {
- var i3 = e4.children.indexOf(t3);
- i3 !== -1 && (e4.children.moveValue(this, i3), e4.sortChildren());
- }
- return this;
- }, e3.prototype.insertAfter = function(t3) {
- var e4 = this._parent;
- if (e4) {
- var i3 = e4.children.indexOf(t3);
- i3 !== -1 && (e4.children.moveValue(this, i3 + 1), e4.sortChildren());
- }
- return this;
- }, e3.prototype.removeElement = function() {
- this._element && (this.removeDispose(this._element), this._element = void 0);
- }, e3.prototype.getRelativeX = function(t3) {
- return t3 instanceof A ? t3.value : this._parent ? t3 / this._parent.innerWidth : 0;
- }, e3.prototype.getRelativeY = function(t3) {
- return t3 instanceof A ? t3.value : this._parent ? t3 / this._parent.innerHeight : 0;
- }, e3.prototype.getPixelX = function(t3) {
- var e4 = 0;
- if (tt(t3))
- e4 = t3;
- else if (t3 instanceof A) {
- var i3 = t3.value;
- this._parent && (e4 = lt(this._parent.innerWidth * i3, this._positionPrecision, true));
- }
- return e4;
- }, e3.prototype.getPixelY = function(t3) {
- var e4 = 0;
- if (tt(t3))
- e4 = t3;
- else if (t3 instanceof A) {
- var i3 = t3.value;
- this._parent && (e4 = lt(this._parent.innerHeight * i3, this._positionPrecision, true));
- }
- return e4;
- }, e3.prototype.moveTo = function(t3, e4, i3, n3) {
- this.isDragged && !n3 || (t3 && (tt(t3.x) && this.setPropertyValue("x", lt(t3.x, this._positionPrecision, true)), tt(t3.y) && this.setPropertyValue("y", lt(t3.y, this._positionPrecision, true))), tt(e4) && (this.rotation = e4), tt(i3) && (this.scale = i3), this.invalidatePosition());
- }, Object.defineProperty(e3.prototype, "mask", { get: function() {
- return this._adapterO ? this._adapterO.apply("mask", this._mask.get()) : this._mask.get();
- }, set: function(t3) {
- var e4 = this;
- this._mask.get() !== t3 && (t3 ? (this.createClipPath(), t3 instanceof $a ? this._clipElement = this.paper.add("rect") : (t3.isMeasured = false, t3.element && (this._clipElement = t3.element)), this._clipElement && this._clipPath.add(this._clipElement), this._mask.set(t3, new me([t3.events.on("maxsizechanged", function() {
- e4.inited && e4.applyMask();
- }, void 0, false), t3.events.on("validated", this.applyMask, this, false), t3.events.on("positionchanged", this.applyMask, this, false)])), this.applyMask()) : (this._mask.reset(), this.group.removeAttr("clip-path"), this.removeClipPath()));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maskRectangle", { get: function() {
- return this._maskRectangle;
- }, set: function(t3) {
- t3 ? (this.createClipPath(), this._clipElement || (this._clipElement = this.paper.add("rect"), this._clipPath.add(this._clipElement)), this._clipElement.attr({ width: t3.width, height: t3.height })) : (this.removeClipPath(), this._clipElement = void 0), this._maskRectangle = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isMeasured", { get: function() {
- return this._isMeasured;
- }, set: function(t3) {
- (t3 = z(t3)) || (this._measuredWidth = 0, this._measuredHeight = 0), this._isMeasured != t3 && (this._isMeasured = t3, this.invalidatePosition());
- }, enumerable: true, configurable: true }), e3.prototype.hitTest = function(t3) {
- this.invalid && this.validate(), t3.invalid && t3.validate();
- var e4 = this.pixelX + this.maxLeft, i3 = this.pixelY + this.maxTop, n3 = e4 + this.maxRight, r3 = i3 + this.maxBottom, s2 = t3.pixelX + t3.maxLeft, a2 = t3.pixelY + t3.maxTop, o3 = s2 + t3.maxRight, l2 = a2 + t3.maxBottom;
- return !(s2 > n3 || o3 < e4 || a2 > r3 || l2 < i3);
- }, Object.defineProperty(e3.prototype, "inited", { get: function() {
- return this._inited;
- }, enumerable: true, configurable: true }), e3.prototype.isReady = function() {
- return this._ready;
- }, Object.defineProperty(e3.prototype, "states", { get: function() {
- if (!this._states) {
- var t3 = new ss();
- this._states = new wi(t3), this._disposers.push(this._states.events.on("insertKey", this.processState, this, false)), this._disposers.push(this._states.events.on("setKey", this.processState, this, false)), this._disposers.push(new _i(this._states)), this._disposers.push(t3);
- }
- return this._states;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hiddenState", { get: function() {
- if (!this.states.getKey("hidden")) {
- var t3 = this.states.create("hidden");
- t3.properties.opacity = 0, t3.properties.visible = false;
- }
- return this.states.getKey("hidden");
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "defaultState", { get: function() {
- return this.states.getKey("default") || (this.states.create("default").properties.opacity = 1), this.states.getKey("default");
- }, enumerable: true, configurable: true }), e3.prototype.processState = function(t3) {
- var e4 = t3.newValue;
- if (e4.sprite = this, e4.name = t3.key, (this.states.hasKey("hover") || this.showTooltipOn == "hover" && (Z(this.tooltipHTML) || Z(this.tooltipText))) && (this.hoverable = true), (this.states.hasKey("down") || this.showTooltipOn == "hover" && (Z(this.tooltipHTML) || Z(this.tooltipText))) && (this.clickable = true), this.states.hasKey("focus") && (this.focusable = true), this.applyOnClones)
- for (var i3 = this.clones.values, n3 = i3.length, r3 = 0; r3 < n3; ++r3) {
- var s2 = i3[r3];
- s2.isDisposed() || s2.states.setKey(e4.name, e4);
- }
- }, Object.defineProperty(e3.prototype, "animations", { get: function() {
- return this._animations || (this._animations = [], this._disposers.push(new gs(this._animations))), this._animations;
- }, enumerable: true, configurable: true }), e3.prototype.getSvgPoint = function(t3) {
- try {
- var e4 = this.htmlContainer.getBoundingClientRect();
- return { x: t3.x - e4.left, y: t3.y - e4.top };
- } catch (e5) {
- return t3;
- }
- }, e3.prototype.animate = function(t3, e4, i3) {
- return new ys(this, t3, e4, i3).start();
- }, e3.prototype.setState = function(t3, e4, i3) {
- var n3;
- if (t3 instanceof ss)
- this.states.setKey(t3.name, t3), n3 = t3;
- else if (!(n3 = this.states.getKey(t3)))
- return;
- if (n3.name == "hover") {
- if (this.isHidden)
- return;
- this.isHover = true;
- }
- return n3.name == "hidden" ? this.isHiding = true : this.visible || this.setVisibility(n3.properties.visible || this.defaultState.properties.visible), n3.name == "active" && (this.isActive = true), tt(e4) || (e4 = n3.transitionDuration), Z(i3) || (i3 = n3.transitionEasing), this.transitTo(n3, e4, i3);
- }, e3.prototype.applyCurrentState = function(t3) {
- var e4 = this.setState(this.defaultState, t3);
- return this.isHover && (e4 = this.setState("hover", t3)), this.isDown && this.interactions.downPointers.length && (e4 = this.setState("down", t3)), this.isFocused = this.isFocused, this.isActive && (e4 = this.setState("active", t3), this.isHover && this.states.hasKey("hoverActive") && (e4 = this.setState("hoverActive", t3))), e4;
- }, e3.prototype.transitTo = function(t3, e4, i3) {
- var n3, r3 = this, s2 = [];
- if (Ne(t3.allValues, function(t4, e5) {
- var i4 = r3[t4];
- if (e5 != i4 && r3.defaultState.properties[t4] == null && (r3.defaultState.properties[t4] = i4), e5 != "__unset") {
- var n4 = { from: i4, to: e5, property: t4 };
- s2.push(n4);
- }
- }), s2.length > 0 && ((n3 = this.animate(s2, e4, i3)) && !n3.isFinished() ? this._disposers.push(n3.events.on("animationended", function() {
- r3.dispatchImmediately("transitionended");
- })) : this.dispatchImmediately("transitionended")), t3.filters.length > 0) {
- var a2 = [];
- ti(t3.filters.iterator(), function(t4) {
- var n4 = t4.clone();
- a2.push(n4);
- var s3 = [];
- ti(r3.filters.iterator(), function(t5) {
- t5.className == n4.className && (pi(r3.defaultState.filters.iterator(), function(t6) {
- return t6.className === n4.className;
- }) || r3.defaultState.filters.push(t5), Ne(n4.properties, function(e5, i4) {
- var n5 = t5.properties[e5];
- n5 != i4 && s3.push({ property: e5, from: n5, to: i4 });
- }));
- }), n4.animate(s3, e4, i3);
- }), this.filters.clear(), this.filters.pushAll(a2);
- }
- return n3;
- }, e3.prototype.isInTransition = function() {
- return this.animations.length > 0;
- }, Object.defineProperty(e3.prototype, "isHover", { get: function() {
- return !!this.isInteractive() && this.interactions.isHover;
- }, set: function(t3) {
- (t3 = z(t3)) !== this.isHover && this.isInteractive() && (this.interactions.isHover = t3, t3 ? this.handleOver() : (this.interactions.isRealHover = false, this.handleOut()));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isDragged", { get: function() {
- return this._isDragged;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isResized", { get: function() {
- return this._isResized;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isDown", { get: function() {
- return !!this.isInteractive() && this.interactions.isDown;
- }, set: function(t3) {
- t3 = z(t3), this.isInteractive() && this.isDown != t3 && (this.interactions.isDown = t3, t3 ? this.handleDown() : this.handleUp());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isFocused", { get: function() {
- return !!this.isInteractive() && this.interactions.isFocused;
- }, set: function(t3) {
- t3 = z(t3), this.focusable && this.isFocused != t3 && this.isInteractive() && (this.interactions.isFocused = t3, t3 === true ? this.handleFocus() : this.handleBlur());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isActive", { get: function() {
- return this._isActive;
- }, set: function(t3) {
- this.setActive(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setActive = function(t3) {
- t3 = z(t3), this._isActive !== t3 && (this._isActive = t3, t3 && this.states.hasKey("active") ? (this.setState("active"), this.isHover && this.states.hasKey("hoverActive") && this.setState("hoverActive")) : this.applyCurrentState(), this.dispatchImmediately("toggled"));
- }, Object.defineProperty(e3.prototype, "disabled", { get: function() {
- var t3 = this.getPropertyValue("disabled");
- return Z(t3) ? t3 : this.virtualParent ? this.virtualParent.disabled : !!this._parent && this._parent.disabled;
- }, set: function(t3) {
- this.setDisabled(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setDisabled = function(t3) {
- if (t3 = z(t3), this.getPropertyValue("disabled") != t3) {
- if (this.setPropertyValue("disabled", t3, true), t3)
- this.parent = this._parent, this.removeFromInvalids(), this.group.attr({ display: "none" }), this.dispatch("disabled");
- else {
- if (this._parent) {
- var e4 = this._parent.element;
- e4.hasChild(this.group) || e4.add(this.group);
- }
- this instanceof $a ? (this.deepInvalidate(), this._background && this._background.invalidate()) : this.invalidate(), this.__disabled || this.removeSVGAttribute("display"), this.dispatch("enabled");
- }
- return this.dispatch("transformed"), Qa.requestFrame(), true;
- }
- return false;
- }, Object.defineProperty(e3.prototype, "__disabled", { get: function() {
- return this._internalDisabled;
- }, set: function(t3) {
- this._internalDisabled != t3 && (this._internalDisabled = t3, this._updateDisabled = true, this.invalidatePosition(), t3 || this.invalidate());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "numberFormatter", { get: function() {
- return this._numberFormatter ? this._numberFormatter : this.virtualParent ? this.virtualParent.numberFormatter : this._parent ? this._parent.numberFormatter : (this._numberFormatter = new Fa(), this._numberFormatter.language = this.language, this.numberFormatter);
- }, set: function(t3) {
- this._numberFormatter = t3, this._numberFormatter.language = this.language;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dateFormatter", { get: function() {
- return this._dateFormatter ? this._dateFormatter : this.virtualParent ? this.virtualParent.dateFormatter : this._parent ? this._parent.dateFormatter : (this._dateFormatter = new Ma(), this._dateFormatter.language = this.language, this.dateFormatter);
- }, set: function(t3) {
- this._dateFormatter = t3, this._dateFormatter.language = this.language;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "durationFormatter", { get: function() {
- return this._durationFormatter ? this._durationFormatter : this.virtualParent ? this.virtualParent.durationFormatter : this._parent ? this._parent.durationFormatter : (this._durationFormatter = new La(), this._durationFormatter.language = this.language, this.durationFormatter);
- }, set: function(t3) {
- this._durationFormatter = t3, this._durationFormatter.language = this.language;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "language", { get: function() {
- var t3 = this._language.get();
- return t3 || (this.virtualParent ? this.virtualParent.language : this._parent ? this._parent.language : (t3 = new Ta(), this.language = t3, t3));
- }, set: function(t3) {
- var e4 = this;
- this._language.get() !== t3 && this._language.set(t3, t3.events.on("localechanged", function(t4) {
- if (e4._numberFormatter && (e4._numberFormatter.language = e4.language), e4._dateFormatter && (e4._dateFormatter.language = e4.language), e4._durationFormatter && (e4._durationFormatter.language = e4.language), e4._exporting.get()) {
- var i3 = e4._exporting.get();
- i3.numberFormatter.language = e4.language, i3.dateFormatter.language = e4.language, i3.durationFormatter.language = e4.language, i3.language = e4.language;
- }
- e4 instanceof $a && e4.deepInvalidate();
- }));
- }, enumerable: true, configurable: true }), e3.prototype.populateString = function(t3, e4) {
- if (Z(t3)) {
- t3 = X(t3);
- var i3 = (t3 = Va().escape(t3)).match(/\{([^}]+)\}/g), n3 = void 0;
- if (i3)
- for (n3 = 0; n3 < i3.length; n3++) {
- var r3 = i3[n3].replace(/\{([^}]+)\}/, "$1"), s2 = this.getTagValue(r3, "", e4);
- Z(s2) || (s2 = ""), t3 = t3.split(i3[n3]).join(s2);
- }
- t3 = Va().unescape(t3);
- } else
- t3 = "";
- return this._adapterO ? this._adapterO.apply("populateString", t3) : t3;
- }, e3.prototype.getTagValue = function(t3, e4, i3) {
- var n3;
- Z(i3) || (i3 = this.dataItem);
- for (var r3, s2 = [], a2 = /([^.]+)\(([^)]*)\)|([^.]+)/g; (r3 = a2.exec(t3)) !== null; )
- if (r3[3])
- s2.push({ prop: r3[3] });
- else {
- var o3 = [];
- if (Wn(r3[2]) != "")
- for (var l2 = /'([^']*)'|"([^"]*)"|([0-9\-]+)/g, h2 = void 0; (h2 = l2.exec(r3[2])) !== null; )
- o3.push(h2[1] || h2[2] || h2[3]);
- s2.push({ method: r3[1], params: o3 });
- }
- if (i3) {
- Z(n3 = this.getTagValueFromObject(s2, i3.values)) && !et(n3) || (n3 = this.getTagValueFromObject(s2, i3));
- var p2 = i3.dataContext;
- !Z(n3) && p2 && (Z(n3 = this.getTagValueFromObject(s2, i3.dataContext)) || (n3 = this.getTagValueFromObject([{ prop: t3 }], p2)), !Z(n3) && p2.dataContext && (n3 = this.getTagValueFromObject(s2, p2.dataContext))), !Z(n3) && i3.component && i3.component.dataItem !== i3 && (n3 = i3.component.getTagValue(t3, e4));
- }
- return Z(n3) || (n3 = this.getTagValueFromObject(s2, this.populateStringFrom || this)), !Z(n3) && this._parent && (n3 = this._parent.getTagValue(t3, e4)), n3;
- }, e3.prototype.getTagValueFromObject = function(t3, e4, i3) {
- for (var n3 = e4, r3 = false, s2 = 0, a2 = t3.length; s2 < a2; s2++) {
- var o3 = t3[s2];
- if (o3.prop) {
- if (!Z(n3 = n3[o3.prop]))
- return;
- } else
- switch (o3.method) {
- case "formatNumber":
- var l2 = tr(n3);
- Z(l2) && (n3 = this.numberFormatter.format(l2, i3 || o3.params[0] || void 0), r3 = true);
- break;
- case "formatDate":
- var h2 = void 0;
- if (!J(h2 = Q(n3) ? this.dateFormatter.parse(n3) : Qn(n3)) || M(h2.getTime()))
- return;
- Z(h2) && (n3 = this.dateFormatter.format(h2, i3 || o3.params[0] || void 0), r3 = true);
- break;
- case "formatDuration":
- var p2 = tr(n3);
- Z(p2) && (n3 = this.durationFormatter.format(p2, i3 || o3.params[0] || void 0, o3.params[1] || void 0), r3 = true);
- break;
- case "urlEncode":
- case "encodeURIComponent":
- n3 = encodeURIComponent(n3);
- break;
- default:
- n3[o3.method] && n3[o3.method].apply(this, o3.params);
- }
- }
- if (!r3) {
- var u2 = [{ method: "", params: i3 }];
- if (Z(i3)) {
- var d2 = Kn(i3);
- d2 === xn ? u2[0].method = "formatNumber" : d2 === _n ? u2[0].method = "formatDate" : d2 === Pn && (u2[0].method = "formatDuration");
- } else
- tt(n3) ? (u2[0].method = "formatNumber", u2[0].params = "") : J(n3) && (u2[0].method = "formatDate", u2[0].params = "");
- u2[0].method && (n3 = this.getTagValueFromObject(u2, n3));
- }
- return n3;
- }, Object.defineProperty(e3.prototype, "dataItem", { get: function() {
- if (!this._dataItem) {
- if (this.virtualParent)
- return this.virtualParent.dataItem;
- if (this._parent)
- return this._parent.dataItem;
- }
- return this._dataItem;
- }, set: function(t3) {
- this.setDataItem(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setDataItem = function(t3) {
- var e4 = this;
- if (this._dataItem != t3) {
- if (this._dataItem = t3, t3) {
- if (this.configField) {
- var i3 = t3.dataContext;
- i3 && (this.config = i3[this.configField], !this.config && i3.dataContext && (this.config = i3.dataContext[this.configField]));
- }
- var n3 = t3.dataContext;
- if (n3) {
- var r3 = n3.dataContext;
- Ne(this.propertyFields, function(t4, i4) {
- if (Z(n3[i4]))
- e4[t4] = n3[i4];
- else if (r3) {
- var s2 = r3[i4];
- Z(s2) && (e4[t4] = s2);
- }
- });
- }
- }
- this.invalidate();
- }
- }, e3.prototype.getPropertyValue = function(t3) {
- var e4 = this.properties[t3];
- return this._isTemplate || (this._adapterO && (e4 = this._adapterO.apply(t3, e4)), e4 = Xi.applyAll(this, t3, e4)), e4;
- }, e3.prototype.setColorProperty = function(t3, e4, i3) {
- var n3 = this.properties[t3];
- return !(e4 instanceof un && n3 instanceof un && e4.toString() == n3.toString()) && this.setPropertyValue(t3, e4, i3);
- }, e3.prototype.setPercentProperty = function(t3, e4, i3, n3, r3, s2) {
- if (tt(e4 = K(e4)))
- return tt(r3) && (e4 = lt(e4, r3, s2)), this.setPropertyValue(t3, e4, i3, n3);
- var a2 = this.properties[t3];
- return !(e4 instanceof A && a2 instanceof A && e4.value == a2.value) && this.setPropertyValue(t3, e4, i3, n3);
- }, e3.prototype.setPropertyValue = function(t3, e4, i3, n3) {
- if (this.properties[t3] !== e4 && !this.isDisposed()) {
- if (this.properties[t3] = e4, this.events.isEnabled("propertychanged")) {
- var r3 = { type: "propertychanged", target: this, property: t3 };
- this.events.dispatchImmediately("propertychanged", r3);
- }
- if (i3 && this.invalidate(), n3 && this.invalidatePosition(), this.applyOnClones)
- for (var s2 = this.clones.values, a2 = s2.length, o3 = 0; o3 < a2; ++o3) {
- var l2 = s2[o3];
- l2.isDisposed() || (l2[t3] = e4);
- }
- return true;
- }
- return false;
- }, e3.prototype.bind = function(t3, e4, i3, n3) {
- var r3 = this;
- i3 === void 0 && (i3 = t3), Z(this._bindings[t3]) && this._bindings[t3].dispose(), this[t3] = e4[i3], this._bindings[t3] = e4.events.on("propertychanged", function(s2) {
- if (s2.property === i3) {
- var a2 = e4[i3];
- n3 && (a2 = n3(a2)), r3[t3] = a2;
- }
- });
- }, e3.prototype.observe = function(t3, e4, i3, n3) {
- var r3 = this;
- return new me(zt(se(t3), function(t4) {
- return r3.events.on("propertychanged", function(n4) {
- n4.property === t4 && e4.call(i3, n4);
- }, i3, n3);
- }));
- }, e3.prototype.applyAccessibility = function() {
- var t3 = this.readerTitle, e4 = this.readerDescription, i3 = this.role, n3 = this.readerHidden, r3 = this.readerChecked, s2 = this.readerControls, a2 = this.readerLive, o3 = this.readerOrientation, l2 = this.readerValueNow, h2 = this.readerValueText, p2 = [], u2 = [], d2 = this.readerLabelledBy;
- d2 && p2.push(d2);
- var c2 = this.readerDescribedBy;
- if (c2 && u2.push(c2), t3)
- if (p2.length || this.showSystemTooltip) {
- var f2 = this.titleElement, g2 = this.uid + "-title";
- f2.node.textContent != t3 && (f2.node.textContent = t3, f2.attr({ id: g2 })), p2.push(g2);
- } else
- this._titleElement && (this.group.removeElement(this._titleElement), this._titleElement = void 0), this.setSVGAttribute({ "aria-label": t3 });
- else
- this.removeSVGAttribute("aria-label"), this._titleElement && (this.group.removeElement(this._titleElement), this._titleElement = void 0);
- if (e4) {
- var y2 = this.descriptionElement, m2 = this.uid + "-description";
- y2.node.textContent != e4 && (y2.node.textContent = e4, y2.attr({ id: m2 })), u2.push(m2);
- } else
- this._descriptionElement && (this.group.removeElement(this._descriptionElement), this._descriptionElement = void 0);
- p2.length ? this.setSVGAttribute({ "aria-labelledby": p2.join(" ") }) : this.removeSVGAttribute("aria-labelledby"), u2.length ? this.setSVGAttribute({ "aria-describedby": u2.join(" ") }) : this.removeSVGAttribute("aria-describedby"), i3 ? this.setSVGAttribute({ role: i3 }) : this.removeSVGAttribute("role"), n3 ? this.setSVGAttribute({ "aria-hidden": "true" }) : this.removeSVGAttribute("aria-hidden"), r3 ? this.setSVGAttribute({ "aria-checked": "true" }) : r3 === false ? this.setSVGAttribute({ "aria-checked": "false" }) : this.removeSVGAttribute("aria-checked"), s2 ? this.setSVGAttribute({ "aria-controls": s2 }) : this.removeSVGAttribute("aria-controls"), a2 ? this.setSVGAttribute({ "aria-live": a2 }) : this.removeSVGAttribute("aria-live"), o3 ? this.setSVGAttribute({ "aria-orientation": o3 }) : this.removeSVGAttribute("aria-orientation"), l2 ? this.setSVGAttribute({ "aria-valuenow": l2 }) : this.removeSVGAttribute("aria-valuenow"), h2 ? this.setSVGAttribute({ "aria-valuetext": h2 }) : this.removeSVGAttribute("aria-valuetext");
- }, Object.defineProperty(e3.prototype, "readerTitle", { get: function() {
- var t3 = this.getPropertyValue("readerTitle");
- return Z(t3) && this.dataItem ? this.populateString(t3) : t3;
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("readerTitle", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "readerDescription", { get: function() {
- var t3 = this.getPropertyValue("readerDescription");
- return Z(t3) && this.dataItem ? this.populateString(t3) : this.getPropertyValue("readerDescription");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("readerDescription", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "role", { get: function() {
- return this.getPropertyValue("role");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("role", t3) && (this.applyAccessibility(), t3 == "slider" && (this.setSVGAttribute({ "aria-valuemin": "0" }), this.setSVGAttribute({ "aria-valuemax": "100" })));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "readerHidden", { get: function() {
- return this.getPropertyValue("readerHidden");
- }, set: function(t3) {
- t3 = z(t3), this.setPropertyValue("readerHidden", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "readerChecked", { get: function() {
- return this.getPropertyValue("readerChecked");
- }, set: function(t3) {
- t3 = z(t3), this.setPropertyValue("readerChecked", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "readerControls", { get: function() {
- return this.getPropertyValue("readerControls");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("readerControls", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "readerLive", { get: function() {
- return this.getPropertyValue("readerLive");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("readerLive", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "readerLabelledBy", { get: function() {
- return this.getPropertyValue("readerLabelledBy");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("readerLabelledBy", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "readerDescribedBy", { get: function() {
- return this.getPropertyValue("readerDescribedBy");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("readerDescribedBy", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "readerOrientation", { get: function() {
- return this.getPropertyValue("readerOrientation");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("readerOrientation", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "readerValueNow", { get: function() {
- return this.getPropertyValue("readerValueNow");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("readerValueNow", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "readerValueText", { get: function() {
- return this.getPropertyValue("readerValueText");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("readerValueText", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "keyboardOptions", { get: function() {
- if (!this.interactions.keyboardOptions) {
- if (this.virtualParent)
- return this.virtualParent.keyboardOptions;
- if (this._parent)
- return this._parent.keyboardOptions;
- }
- return this.interactions.keyboardOptions;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "mouseOptions", { get: function() {
- if (!this.interactions.mouseOptions) {
- if (this.virtualParent)
- return this.virtualParent.mouseOptions;
- if (this._parent)
- return this._parent.mouseOptions;
- }
- return this.interactions.mouseOptions;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "interactions", { get: function() {
- if (!this._interaction) {
- var t3 = ua().getInteraction(this.dom);
- this._interaction = t3, this._interaction.clickable = this.clickable, this._interaction.hoverable = this.hoverable, this._interaction.trackable = this.trackable, this._interaction.draggable = this.draggable, this._interaction.swipeable = this.swipeable, this._interaction.resizable = this.resizable, this._interaction.wheelable = this.wheelable, this._interaction.contextMenuDisabled = this.contextMenuDisabled, this._interaction.inert = this.inert, this._interaction.sprite = this, this._disposers.push(this._interaction);
- }
- return this._interaction;
- }, enumerable: true, configurable: true }), e3.prototype.isInteractive = function() {
- return !!this._interaction;
- }, Object.defineProperty(e3.prototype, "focusable", { get: function() {
- return this.getPropertyValue("focusable");
- }, set: function(t3) {
- var e4 = this;
- t3 = z(t3), this.setPropertyValue("focusable", t3) && (t3 || this.isInteractive()) && (this.interactions.focusable = t3, t3 ? (this.setSVGAttribute({ focusable: t3 }), this._tabindex || (this.tabindex = 0)) : (this.removeSVGAttribute("focusable"), this.tabindex = void 0), this.interactions.setEventDisposer("sprite-focusable", t3, function() {
- return new me([e4.events.on("blur", e4.handleBlur, e4, false), e4.events.on("focus", e4.handleFocus, e4, false)]);
- }));
- }, enumerable: true, configurable: true }), e3.prototype.handleFocus = function(t3) {
- this.focusable && (this.topParent && (this.topParent.hasFocused = true, this.topParent.focusedElement = this), this.focusFilter && this.filters.push(this.focusFilter), this.hoverOnFocus && (this.isHover = true, this.handleOver()));
- }, e3.prototype.handleBlur = function(t3) {
- this.focusable && (this.topParent && (this.topParent.hasFocused = false, this.topParent.focusedElement = void 0), this.focusFilter && this.filters.removeValue(this.focusFilter), this.hoverOnFocus && (this.isHover = false, this.handleOut()));
- }, Object.defineProperty(e3.prototype, "focusFilter", { get: function() {
- return this._focusFilter || (this.virtualParent ? this.virtualParent.focusFilter : this._parent ? this._parent.focusFilter : void 0);
- }, set: function(t3) {
- this._focusFilter = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hoverOnFocus", { get: function() {
- return this.getPropertyValue("hoverOnFocus");
- }, set: function(t3) {
- t3 !== this.hoverOnFocus && this.setPropertyValue("hoverOnFocus", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tabindex", { get: function() {
- var t3 = this._tabindex;
- return t3 != null ? t3 : this.virtualParent ? this.virtualParent.tabindex : this._parent ? this._parent.tabindex : void 0;
- }, set: function(t3) {
- t3 = U(t3), this.setPropertyValue("tabindex", t3) && tt(t3) && (this.interactions.tabindex = t3, this.setSVGAttribute({ tabindex: t3 }), this._tabindex = t3, this.focusable = t3 > -1 || void 0);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "inertiaOptions", { get: function() {
- return !this.interactions.inertiaOptions && this._parent ? this._parent.inertiaOptions : this.interactions.inertiaOptions;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "draggable", { get: function() {
- return this.getPropertyValue("draggable");
- }, set: function(t3) {
- var e4 = this;
- t3 = z(t3), this.setPropertyValue("draggable", t3) && (t3 || this.isInteractive()) && (this.applyCursorStyle(), this.interactions.draggable = t3, this.interactions.setEventDisposer("sprite-draggable", t3, function() {
- return new me([e4.events.on("down", e4.handleDown, e4, false), e4.events.on("dragstart", e4.handleDragStart, e4, false), e4.events.on("drag", e4.handleDragMove, e4, false), e4.events.on("dragstop", e4.handleDragStop, e4, false)]);
- }));
- }, enumerable: true, configurable: true }), e3.prototype.handleDragStart = function(t3) {
- this.interactions.isTouchProtected && t3.touch || (this.interactions.originalPosition = { x: this.pixelX, y: this.pixelY }, this._isDragged = true, this.hideTooltip(0));
- }, e3.prototype.dragStart = function(t3) {
- this._isDragged = true, ua().dragStart(this.interactions, t3);
- }, e3.prototype.handleDragStop = function(t3) {
- this.interactions.isTouchProtected && t3.touch || (this._isDragged = false, this.showTooltip(), this.interactions.originalPosition = void 0);
- }, e3.prototype.dragStop = function(t3, e4) {
- this._isDragged = false, ua().dragStop(this.interactions, t3, e4);
- }, e3.prototype.handleDragMove = function(t3) {
- if (!this.interactions.isTouchProtected || !t3.touch) {
- var e4 = this.interactions.originalPosition;
- if (e4 && this._isDragged) {
- var i3 = this._parent.globalScale * this.svgContainer.cssScale;
- this.moveTo({ x: e4.x + t3.shift.x / i3, y: e4.y + t3.shift.y / i3 }, void 0, void 0, true);
- }
- this.dispatchImmediately("dragged", t3);
- }
- }, Object.defineProperty(e3.prototype, "inert", { get: function() {
- return this.getPropertyValue("inert");
- }, set: function(t3) {
- t3 = z(t3), this.setPropertyValue("inert", t3) && (t3 || this.isInteractive()) && (this.interactions.inert = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hoverOptions", { get: function() {
- if (!this.interactions.hoverOptions) {
- if (this.virtualParent)
- return this.virtualParent.hoverOptions;
- if (this._parent)
- return this._parent.hoverOptions;
- }
- return this.interactions.hoverOptions;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hoverable", { get: function() {
- return this.getPropertyValue("hoverable");
- }, set: function(t3) {
- var e4 = this;
- t3 = z(t3), this.setPropertyValue("hoverable", t3) && (t3 || this.isInteractive()) && (this.applyCursorStyle(), this.interactions.hoverable = t3, this.interactions.setEventDisposer("sprite-hoverable", t3, function() {
- return new me([e4.events.on("over", e4.handleOver, e4, false), e4.events.on("out", e4.handleOut, e4, false)]);
- }));
- }, enumerable: true, configurable: true }), e3.prototype.handleOver = function(t3) {
- if (this._outTimeout && this._outTimeout.dispose(), this.isHover) {
- this.states.hasKey("hover") && (this.isHidden || this.applyCurrentState());
- var e4 = void 0;
- t3 && t3.pointer && (e4 = gr(t3.pointer.point, this.svgContainer.SVGContainer, this.svgContainer.cssScale)), this.showTooltipOn == "hover" && this.showTooltip(e4);
- } else
- this.showTooltipOn == "hover" && this.hideTooltip(), !this.isHidden && this.states.hasKey("hover") && this.applyCurrentState();
- }, e3.prototype.handleOut = function(t3) {
- var e4 = this;
- this.tooltip && this.tooltip.targetSprite == this && this.tooltip.keepTargetHover ? this._outTimeout = this.setTimeout(function() {
- e4.tooltip.isHover || (e4.tooltip.targetSprite == e4 && e4.hideTooltip(), e4._outTimeout = e4.setTimeout(e4.handleOutReal.bind(e4), e4.rollOutDelay));
- }, 10) : (this.showTooltipOn == "hover" && this.hideTooltip(), this._outTimeout = this.setTimeout(this.handleOutReal.bind(this), this.rollOutDelay));
- }, e3.prototype.handleOutReal = function() {
- this.isHidden || this.isHiding || !this.states.hasKey("hover") || this.applyCurrentState();
- }, Object.defineProperty(e3.prototype, "hitOptions", { get: function() {
- if (!this.interactions.hitOptions) {
- if (this.virtualParent)
- return this.virtualParent.hitOptions;
- if (this._parent)
- return this._parent.hitOptions;
- }
- return this.interactions.hitOptions;
- }, enumerable: true, configurable: true }), e3.prototype.handleDown = function(t3) {
- this.interactions.downPointers.length === 1 && (this.interactions.originalPosition = { x: this.pixelX, y: this.pixelY }, this.interactions.originalAngle = this.rotation, this.interactions.originalScale = this.scale, this.states.hasKey("down") && this.setState("down"));
- }, e3.prototype.handleUp = function(t3) {
- var e4 = this;
- this._isResized = false, this.states.hasKey("down") && this.applyCurrentState(), this.showTooltipOn == "hit" && (this.updateTooltipPosition(t3.pointer ? t3.pointer.point : void 0), this._disposers.push(Ii.events.once("exitframe", function() {
- e4.showTooltip();
- })), this._disposers.push(ua().body.events.once("down", function(t4) {
- e4.hideTooltip();
- })));
- }, Object.defineProperty(e3.prototype, "clickable", { get: function() {
- return this.getPropertyValue("clickable");
- }, set: function(t3) {
- var e4 = this;
- t3 = z(t3), this.setPropertyValue("clickable", t3) && (t3 || this.isInteractive()) && (this.applyCursorStyle(), this.interactions.clickable = t3, this.interactions.setEventDisposer("sprite-clickable", t3, function() {
- return new me([e4.events.on("down", e4.handleDown, e4, false), e4.events.on("up", e4.handleUp, e4, false)]);
- }));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "togglable", { get: function() {
- return this.getPropertyValue("togglable");
- }, set: function(t3) {
- var e4 = this;
- t3 = z(t3), this.setPropertyValue("togglable", t3) && (t3 || this.isInteractive()) && this.interactions.setEventDisposer("sprite-togglable", t3, function() {
- return e4.events.on("hit", e4.handleToggle, e4, false);
- });
- }, enumerable: true, configurable: true }), e3.prototype.handleToggle = function(t3) {
- this.isActive = !this.isActive;
- }, Object.defineProperty(e3.prototype, "contextMenuDisabled", { get: function() {
- return this.getPropertyValue("contextMenuDisabled");
- }, set: function(t3) {
- t3 = z(t3), this.setPropertyValue("contextMenuDisabled", t3) && (this.interactions.contextMenuDisabled = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "url", { get: function() {
- return this.getPropertyValue("url");
- }, set: function(t3) {
- this.setPropertyValue("url", t3) && (this._urlDisposer && this._urlDisposer.dispose(), An(t3) && (this._urlDisposer = this.events.on("hit", this.urlHandler, this, false), this.clickable = true, this.cursorOverStyle = Ia.pointer));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "baseId", { get: function() {
- return !this._baseId && this._parent && (this.baseId = this._parent.baseId), this._baseId;
- }, set: function(t3) {
- this.setBaseId(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setBaseId = function(t3) {
- t3 != this._baseId && (this.invalid && (this.invalid = false, Ii.removeFromInvalidSprites(this), this.invalidate()), this._baseId = t3);
- }, Object.defineProperty(e3.prototype, "baseSprite", { get: function() {
- return this.isBaseSprite ? this : this._parent ? this._parent.baseSprite : void 0;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "urlTarget", { get: function() {
- return this.getPropertyValue("urlTarget");
- }, set: function(t3) {
- this.setPropertyValue("urlTarget", t3);
- }, enumerable: true, configurable: true }), e3.prototype.urlHandler = function(t3) {
- if (An(this.url)) {
- var e4 = this.populateString(this.url);
- this.urlTarget === "_self" ? window.location.href = e4 : window.open(e4, this.urlTarget);
- }
- }, Object.defineProperty(e3.prototype, "swipeOptions", { get: function() {
- if (!this.interactions.swipeOptions) {
- if (this.virtualParent)
- return this.virtualParent.swipeOptions;
- if (this._parent)
- return this._parent.swipeOptions;
- }
- return this.interactions.swipeOptions;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "swipeable", { get: function() {
- return this.getPropertyValue("swipeable");
- }, set: function(t3) {
- t3 = z(t3), this.setPropertyValue("swipeable", t3) && (this.applyCursorStyle(), (t3 || this.isInteractive()) && (this.interactions.swipeable = t3));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "trackable", { get: function() {
- return this.getPropertyValue("trackable");
- }, set: function(t3) {
- t3 = z(t3), this.setPropertyValue("trackable", t3) && (t3 || this.isInteractive()) && (this.applyCursorStyle(), this.interactions.trackable = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "wheelable", { get: function() {
- return this.getPropertyValue("wheelable");
- }, set: function(t3) {
- this.setPropertyValue("wheelable", t3) && (t3 || this.isInteractive()) && (this.applyCursorStyle(), this.interactions.wheelable = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "resizable", { get: function() {
- return this.getPropertyValue("resizable");
- }, set: function(t3) {
- var e4 = this;
- t3 = z(t3), this.setPropertyValue("resizable", t3) && (t3 || this.isInteractive()) && (this.applyCursorStyle(), this.interactions.resizable = t3, this.interactions.setEventDisposer("sprite-resizable", t3, function() {
- return new me([e4.events.on("down", e4.handleDown, e4, false), e4.events.on("resize", e4.handleResize, e4, false)]);
- }));
- }, enumerable: true, configurable: true }), e3.prototype.handleResize = function(t3) {
- if ((!this.interactions.isTouchProtected || !t3.touch) && (this._isResized = true, this.scale = this.interactions.originalScale * t3.scale, this.validatePosition(), this.draggable || this.dragWhileResize)) {
- this._isDragged = false;
- var e4 = St(gr(t3.point1, this.htmlContainer, this.svgContainer.cssScale), gr(t3.point2, this.htmlContainer, this.svgContainer.cssScale)), i3 = mr(t3.startPoint1, this._parent), n3 = mr(t3.startPoint2, this._parent), r3 = this.interactions.originalPosition, s2 = this.interactions.originalScale;
- if (r3) {
- var a2 = St({ x: (i3.x - r3.x) / s2, y: (i3.y - r3.y) / s2 }, { x: (n3.x - r3.x) / s2, y: (n3.y - r3.y) / s2 }), o3 = pr(e4, this._parent);
- this.moveTo({ x: o3.x - a2.x * this.scale, y: o3.y - a2.y * this.scale }, void 0, void 0, true);
- }
- }
- }, Object.defineProperty(e3.prototype, "cursorOptions", { get: function() {
- if (!this.interactions.cursorOptions) {
- if (this.virtualParent)
- return this.virtualParent.cursorOptions;
- if (this._parent)
- return this._parent.cursorOptions;
- }
- return this.interactions.cursorOptions;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cursorOverStyle", { set: function(t3) {
- this.cursorOptions.overStyle || (this.interactions.cursorOptions = { defaultStyle: this.cursorOptions.defaultStyle }), this.cursorOptions.overStyle = t3, ua().applyCursorOverStyle(this.interactions);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cursorDownStyle", { set: function(t3) {
- this.cursorOptions.downStyle = t3;
- }, enumerable: true, configurable: true }), e3.prototype.applyCursorStyle = function() {
- }, Object.defineProperty(e3.prototype, "interactionsEnabled", { get: function() {
- return this.getPropertyValue("interactionsEnabled") !== false && (this.virtualParent ? this.virtualParent.interactionsEnabled : !this._parent || this._parent.interactionsEnabled);
- }, set: function(t3) {
- if (t3 = z(t3), this.setPropertyValue("interactionsEnabled", t3)) {
- var e4 = null;
- t3 ? this.group.node.style.pointerEvents = "" : e4 = "none", this.group.node.style.pointerEvents = e4;
- }
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "exporting", { get: function() {
- return this.getExporting();
- }, set: function(t3) {
- this._exporting.set(t3, t3);
- }, enumerable: true, configurable: true }), e3.prototype.getExporting = function() {
- var t3 = this._exporting.get();
- return t3 || (!this.isStandaloneInstance && this._parent ? this._parent.exporting : ((t3 = new Ga(this.svgContainer.SVGContainer)).sprite = this, t3.language = this.language, t3.numberFormatter = this.numberFormatter, t3.dateFormatter = this.dateFormatter, t3.durationFormatter = this.durationFormatter, this._exporting.set(t3, t3), t3));
- }, Object.defineProperty(e3.prototype, "exportable", { get: function() {
- return this._exportable;
- }, set: function(t3) {
- var e4 = this.svgContainer;
- this._exportable = t3, e4 && (t3 ? ee(e4.nonExportableSprites, this) : Xt(e4.nonExportableSprites, this) == -1 && e4.nonExportableSprites.push(this));
- }, enumerable: true, configurable: true }), e3.prototype.modalPrefix = function(t3) {
- return ls.classNamePrefix + t3;
- }, Object.defineProperty(e3.prototype, "modal", { get: function() {
- var t3 = this.svgContainer;
- if (t3) {
- var e4 = t3.modal;
- return e4.adapter.has("classPrefix", this.modalPrefix) || e4.adapter.add("classPrefix", this.modalPrefix), e4;
- }
- }, enumerable: true, configurable: true }), e3.prototype.openModal = function(t3, e4) {
- var i3 = this.svgContainer;
- if (i3)
- return i3.openModal(t3, e4);
- }, e3.prototype.closeModal = function() {
- var t3 = this.svgContainer;
- t3 && t3.closeModal();
- }, Object.defineProperty(e3.prototype, "popups", { get: function() {
- var t3 = this.svgContainer;
- if (t3) {
- var e4 = t3.popups;
- return e4.template.sprite = this, e4.template.adapter.has("classPrefix", this.modalPrefix) || e4.template.adapter.add("classPrefix", this.modalPrefix), e4;
- }
- }, enumerable: true, configurable: true }), e3.prototype.openPopup = function(t3, e4) {
- var i3 = this.svgContainer;
- if (i3)
- return i3.openPopup(t3, e4);
- }, e3.prototype.closeAllPopups = function() {
- var t3 = this.svgContainer;
- t3 && t3.closeAllPopups();
- }, Object.defineProperty(e3.prototype, "x", { get: function() {
- return this.getPropertyValue("x");
- }, set: function(t3) {
- this.isDragged || this.setPercentProperty("x", t3, false, true, this._positionPrecision, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelX", { get: function() {
- var t3 = ut(this.getPixelX(this.x), this.minX, this.maxX);
- return this._adapterO ? this._adapterO.apply("pixelX", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativeX", { get: function() {
- return this._adapterO ? this._adapterO.apply("relativeX", this.getRelativeX(this.x)) : this.getRelativeX(this.x);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "minX", { get: function() {
- return this.getPropertyValue("minX");
- }, set: function(t3) {
- tt(t3) && (t3 = lt(t3, this._positionPrecision, true), this.setPropertyValue("minX", t3, false, true));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxX", { get: function() {
- return this.getPropertyValue("maxX");
- }, set: function(t3) {
- tt(t3) && (t3 = lt(t3, this._positionPrecision, true), this.setPropertyValue("maxX", t3, false, true));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "y", { get: function() {
- return this.getPropertyValue("y");
- }, set: function(t3) {
- this.isDragged || this.setPercentProperty("y", t3, false, true, this._positionPrecision, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelY", { get: function() {
- var t3 = ut(this.getPixelY(this.y), this.minY, this.maxY);
- return this._adapterO ? this._adapterO.apply("pixelY", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativeY", { get: function() {
- return this._adapterO ? this._adapterO.apply("relativeY", this.getRelativeX(this.y)) : this.getRelativeX(this.y);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "minY", { get: function() {
- return this.getPropertyValue("minY");
- }, set: function(t3) {
- tt(t3) && (t3 = lt(t3, this._positionPrecision, true), this.setPropertyValue("minY", t3, false, true));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxY", { get: function() {
- return this.getPropertyValue("maxY");
- }, set: function(t3) {
- tt(t3) && (t3 = lt(t3, this._positionPrecision, true), this.setPropertyValue("maxY", t3, false, true));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dx", { get: function() {
- return this.getPropertyValue("dx");
- }, set: function(t3) {
- tt(t3) && (t3 = lt(t3, this._positionPrecision, true), this.setPropertyValue("dx", t3, false, true));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dy", { get: function() {
- return this.getPropertyValue("dy");
- }, set: function(t3) {
- tt(t3) && (t3 = lt(t3, this._positionPrecision, true), this.setPropertyValue("dy", t3, false, true));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "rotation", { get: function() {
- return this.getPropertyValue("rotation");
- }, set: function(t3) {
- tt(t3 = U(t3)) || (t3 = 0), this.setPropertyValue("rotation", t3, false, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "align", { get: function() {
- return this.getPropertyValue("align");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("align", t3) && this._parent && this._parent.invalidateLayout();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "valign", { get: function() {
- return this.getPropertyValue("valign");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("valign", t3) && this._parent && this._parent.invalidateLayout();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "horizontalCenter", { get: function() {
- return this.getPropertyValue("horizontalCenter");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("horizontalCenter", t3) && this.updateCenter();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "verticalCenter", { get: function() {
- return this.getPropertyValue("verticalCenter");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("verticalCenter", t3) && this.updateCenter();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxWidth", { get: function() {
- var t3 = this.getPropertyValue("maxWidth");
- if (!tt(t3) && this._parent) {
- var e4 = this._parent.maxWidth;
- return this._parent.layout != "absolute" && this.align != "none" && this.align != null && (e4 = e4 - this.pixelMarginLeft - this.pixelMarginRight), e4;
- }
- return t3;
- }, set: function(t3) {
- this.setMaxWidth(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setMaxWidth = function(t3) {
- var e4 = this.maxWidth, i3 = this.maxHeight;
- if (this.setPropertyValue("maxWidth", t3)) {
- tt(this.relativeWidth) && this.invalidate();
- var n3 = { type: "maxsizechanged", target: this, previousWidth: e4, previousHeight: i3 };
- this.dispatchImmediately("maxsizechanged", n3);
- }
- }, Object.defineProperty(e3.prototype, "maxHeight", { get: function() {
- var t3 = this.getPropertyValue("maxHeight");
- if (!tt(t3) && this._parent) {
- var e4 = this._parent.maxHeight;
- return this._parent.layout != "absolute" && this.valign != "none" && this.valign != null && (e4 = e4 - this.pixelMarginTop - this.pixelMarginBottom), e4;
- }
- return t3;
- }, set: function(t3) {
- this.setMaxHeight(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setMaxHeight = function(t3) {
- var e4 = this.maxWidth, i3 = this.maxHeight;
- if (this.setPropertyValue("maxHeight", t3)) {
- tt(this.relativeHeight) && this.invalidate();
- var n3 = { type: "maxsizechanged", target: this, previousWidth: e4, previousHeight: i3 };
- this.dispatchImmediately("maxsizechanged", n3);
- }
- }, Object.defineProperty(e3.prototype, "minWidth", { get: function() {
- return this.getPropertyValue("minWidth");
- }, set: function(t3) {
- this.setPropertyValue("minWidth", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "minHeight", { get: function() {
- return this.getPropertyValue("minHeight");
- }, set: function(t3) {
- this.setPropertyValue("minHeight", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "width", { get: function() {
- return this.getPropertyValue("width");
- }, set: function(t3) {
- this.setPercentProperty("width", t3, true, false, this._positionPrecision, true) && (this.percentWidth = void 0, this.relativeWidth = void 0, t3 instanceof A ? (this.percentWidth = t3.percent, tt(this._pixelWidth) && (this.maxWidth = void 0), this._pixelWidth = void 0) : (this._pixelWidth = Number(t3), this.maxWidth = this._pixelWidth), this.invalidatePosition());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "height", { get: function() {
- return this.getPropertyValue("height");
- }, set: function(t3) {
- this.setPercentProperty("height", t3, true, false, this._positionPrecision, true) && (this.percentHeight = void 0, this._relativeHeight = void 0, t3 instanceof A ? (this.percentHeight = t3.percent, tt(this._pixelHeight) && (this.maxHeight = void 0), this._pixelHeight = void 0) : (this._pixelHeight = Number(t3), this.maxHeight = this._pixelHeight), this.invalidatePosition());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelWidth", { get: function() {
- var t3;
- t3 = tt(this.percentWidth) ? this.maxWidth : tt(this._pixelWidth) ? this._pixelWidth : 0;
- var e4 = this.minWidth;
- e4 != null && t3 < e4 && (t3 = e4);
- var i3 = lt(t3, this._positionPrecision, true);
- return this._adapterO ? this._adapterO.apply("pixelWidth", i3) : i3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelHeight", { get: function() {
- var t3;
- t3 = tt(this.percentHeight) ? this.maxHeight : tt(this._pixelHeight) ? this._pixelHeight : 0;
- var e4 = this.minHeight;
- e4 != null && t3 < e4 && (t3 = e4);
- var i3 = lt(t3, this._positionPrecision, true);
- return this._adapterO ? this._adapterO.apply("pixelHeight", i3) : i3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativeWidth", { get: function() {
- var t3 = this._relativeWidth;
- if (tt(t3))
- return this._adapterO ? this._adapterO.apply("relativeWidth", t3) : t3;
- }, set: function(t3) {
- this._relativeWidth != t3 && (this._relativeWidth = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativeHeight", { get: function() {
- var t3 = this._relativeHeight;
- if (tt(t3))
- return this._adapterO ? this._adapterO.apply("relativeHeight", t3) : t3;
- }, set: function(t3) {
- this._relativeHeight != t3 && (this._relativeHeight = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "measuredWidth", { get: function() {
- return this.disabled || this.__disabled ? 0 : this._adapterO ? this._adapterO.apply("measuredWidth", this._measuredWidth) : this._measuredWidth;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "measuredHeight", { get: function() {
- return this.disabled || this.__disabled ? 0 : this._adapterO ? this._adapterO.apply("measuredHeight", this._measuredHeight) : this._measuredHeight;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "outerWidth", { get: function() {
- var t3 = this.pixelWidth + this.pixelMarginRight + this.pixelMarginLeft;
- return this._adapterO ? this._adapterO.apply("outerWidth", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "outerHeight", { get: function() {
- var t3 = this.pixelHeight + this.pixelMarginTop + this.pixelMarginBottom;
- return this._adapterO ? this._adapterO.apply("outerHeight", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerWidth", { get: function() {
- var t3 = Math.max(0, this.pixelWidth - this.pixelPaddingRight - this.pixelPaddingLeft);
- return this._adapterO ? this._adapterO.apply("innerWidth", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerHeight", { get: function() {
- var t3 = Math.max(0, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom);
- return this._adapterO ? this._adapterO.apply("innerHeight", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "globalScale", { get: function() {
- var t3 = this.scale;
- return this._parent && (t3 *= this._parent.globalScale), this._adapterO ? this._adapterO.apply("globalScale", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "scale", { get: function() {
- return this.getPropertyValue("scale");
- }, set: function(t3) {
- (t3 = U(t3)) < 0 && (t3 = 0), t3 != this.getPropertyValue("scale") && (this.setPropertyValue("scale", t3, false, true), this.handleGlobalScale());
- }, enumerable: true, configurable: true }), e3.prototype.margin = function(t3, e4, i3, n3) {
- return this.marginTop = t3, this.marginRight = e4, this.marginBottom = i3, this.marginLeft = n3, this;
- }, Object.defineProperty(e3.prototype, "marginLeft", { get: function() {
- return this.getPropertyValue("marginLeft");
- }, set: function(t3) {
- this.setPercentProperty("marginLeft", t3, true, true, this._positionPrecision, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "marginRight", { get: function() {
- return this.getPropertyValue("marginRight");
- }, set: function(t3) {
- this.setPercentProperty("marginRight", t3, true, true, this._positionPrecision, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "marginTop", { get: function() {
- return this.getPropertyValue("marginTop");
- }, set: function(t3) {
- this.setPercentProperty("marginTop", t3, true, true, this._positionPrecision, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "marginBottom", { get: function() {
- return this.getPropertyValue("marginBottom");
- }, set: function(t3) {
- this.setPercentProperty("marginBottom", t3, true, true, this._positionPrecision, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelMarginRight", { get: function() {
- var t3 = this.getPixelX(this.marginRight);
- return this._adapterO ? this._adapterO.apply("pixelMarginRight", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativeMarginRight", { get: function() {
- var t3 = this.getRelativeX(this.marginRight);
- return this._adapterO ? this._adapterO.apply("relativeMarginRight", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelMarginLeft", { get: function() {
- var t3 = this.getPixelX(this.marginLeft);
- return this._adapterO ? this._adapterO.apply("pixelMarginLeft", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativeMarginLeft", { get: function() {
- var t3 = this.getRelativeX(this.marginLeft);
- return this._adapterO ? this._adapterO.apply("relativeMarginLeft", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelMarginTop", { get: function() {
- var t3 = this.getPixelY(this.marginTop);
- return this._adapterO ? this._adapterO.apply("pixelMarginTop", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativeMarginTop", { get: function() {
- var t3 = this.getRelativeY(this.marginTop);
- return this._adapterO ? this._adapterO.apply("relativeMarginTop", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelMarginBottom", { get: function() {
- var t3 = this.getPixelY(this.marginBottom);
- return this._adapterO ? this._adapterO.apply("pixelMarginBottom", t3) : t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativeMarginBottom", { get: function() {
- var t3 = this.getRelativeY(this.marginBottom);
- return this._adapterO ? this._adapterO.apply("relativeMarginBottom", t3) : t3;
- }, enumerable: true, configurable: true }), e3.prototype.padding = function(t3, e4, i3, n3) {
- return this.paddingTop = t3, this.paddingRight = e4, this.paddingBottom = i3, this.paddingLeft = n3, this;
- }, Object.defineProperty(e3.prototype, "paddingLeft", { get: function() {
- return this.getPropertyValue("paddingLeft");
- }, set: function(t3) {
- this.setPercentProperty("paddingLeft", t3, true, true, this._positionPrecision, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "paddingRight", { get: function() {
- return this.getPropertyValue("paddingRight");
- }, set: function(t3) {
- this.setPercentProperty("paddingRight", t3, true, true, this._positionPrecision, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "paddingTop", { get: function() {
- return this.getPropertyValue("paddingTop");
- }, set: function(t3) {
- this.setPercentProperty("paddingTop", t3, true, true, this._positionPrecision, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "paddingBottom", { get: function() {
- return this.getPropertyValue("paddingBottom");
- }, set: function(t3) {
- this.setPercentProperty("paddingBottom", t3, true, true, this._positionPrecision, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelPaddingRight", { get: function() {
- return this.getPixelX(this.paddingRight);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativePaddingRight", { get: function() {
- return this.getRelativeX(this.paddingRight);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelPaddingLeft", { get: function() {
- return this.getPixelX(this.paddingLeft);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativePaddingLeft", { get: function() {
- return this.getRelativeX(this.paddingLeft);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelPaddingTop", { get: function() {
- return this.getPixelY(this.paddingTop);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativePaddingTop", { get: function() {
- return this.getRelativeY(this.paddingTop);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelPaddingBottom", { get: function() {
- return this.getPixelY(this.paddingBottom);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "relativePaddingBottom", { get: function() {
- return this.getRelativeY(this.paddingBottom);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "path", { get: function() {
- return this.getPropertyValue("path");
- }, set: function(t3) {
- this.setPath(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setPath = function(t3) {
- return !!this.setPropertyValue("path", t3) && (this._adapterO && (t3 = this._adapterO.apply("path", t3)), this._isPath || (this.element && (!this.element.node || this.element.node instanceof SVGPathElement) || (this.element = this.paper.add("path")), this._isPath = true), Z(t3) ? this.element.attr({ d: t3 }) : this.element.removeAttr("d"), this.invalidatePosition(), this.inited || this.events.once("inited", this.validatePosition, this, false), true);
- }, Object.defineProperty(e3.prototype, "fillModifier", { get: function() {
- return this.getPropertyValue("fillModifier");
- }, set: function(t3) {
- this.setPropertyValue("fillModifier", t3) && this.setFill(this.fill);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "strokeModifier", { get: function() {
- return this.getPropertyValue("strokeModifier");
- }, set: function(t3) {
- this.setPropertyValue("strokeModifier", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fillOpacity", { get: function() {
- return this.getPropertyValue("fillOpacity");
- }, set: function(t3) {
- t3 = ot(t3, 0, 1), this.setPropertyValue("fillOpacity", t3) && this.setSVGAttribute({ "fill-opacity": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fill", { get: function() {
- return this.getPropertyValue("fill");
- }, set: function(t3) {
- this.setFill(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setFill = function(t3) {
- if (et(t3) && !("r" in t3) || (t3 = gn(t3)), this.setColorProperty("fill", t3) || this.fillModifier)
- if (t3 instanceof un && this.fillModifier && (t3 = this.fillModifier.modify(t3)), this.realFill = t3, t3 instanceof un)
- this.setSVGAttribute({ fill: t3.toString() });
- else if (Z(t3)) {
- if (t3 instanceof Ca || t3 instanceof Oa || t3 instanceof Sa) {
- var e4 = t3;
- e4.paper = this.paper, this.setSVGAttribute({ fill: 'url("' + Dn() + e4.id + '")' });
- }
- } else
- this.removeSVGAttribute("fill");
- }, Object.defineProperty(e3.prototype, "opacity", { get: function() {
- return this.getPropertyValue("opacity");
- }, set: function(t3) {
- t3 = ot(t3, 0, 1), this.setPropertyValue("opacity", t3) && this.setSVGAttribute({ opacity: t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "stroke", { get: function() {
- return this.getPropertyValue("stroke");
- }, set: function(t3) {
- this.setStroke(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setStroke = function(t3) {
- if (et(t3) && !("r" in t3) || (t3 = gn(t3)), this.setColorProperty("stroke", t3) || this.strokeModifier)
- if (t3 instanceof un && this.strokeModifier && (t3 = this.strokeModifier.modify(t3)), this.realStroke = t3, t3 instanceof un)
- t3.hex == "none" ? this.removeSVGAttribute("stroke") : this.setSVGAttribute({ stroke: t3.toString() });
- else if (Z(t3)) {
- if (t3 instanceof Ca || t3 instanceof Oa || t3 instanceof Sa) {
- var e4 = t3;
- e4.paper = this.paper, this.setSVGAttribute({ stroke: 'url("' + Dn() + e4.id + '")' });
- }
- } else
- this.removeSVGAttribute("stroke");
- }, Object.defineProperty(e3.prototype, "strokeOpacity", { get: function() {
- return this.getPropertyValue("strokeOpacity");
- }, set: function(t3) {
- t3 = ot(t3, 0, 1), this.setPropertyValue("strokeOpacity", t3) && this.setSVGAttribute({ "stroke-opacity": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "nonScalingStroke", { get: function() {
- return this.getPropertyValue("nonScalingStroke");
- }, set: function(t3) {
- t3 = z(t3), this.setPropertyValue("nonScalingStroke", t3) && (this.strokeWidth = this.strokeWidth);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "nonScaling", { get: function() {
- return this.getPropertyValue("nonScaling");
- }, set: function(t3) {
- t3 = z(t3), this.setPropertyValue("nonScaling", t3, false, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "strokeWidth", { get: function() {
- return this.getPropertyValue("strokeWidth");
- }, set: function(t3) {
- t3 = U(t3), this.setPropertyValue("strokeWidth", t3, true), this.nonScalingStroke && (tt(t3) || (t3 = 1), t3 /= this.globalScale), this.setSVGAttribute({ "stroke-width": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "strokeDasharray", { get: function() {
- return this.getPropertyValue("strokeDasharray");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("strokeDasharray", t3) && this.setSVGAttribute({ "stroke-dasharray": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "strokeDashoffset", { get: function() {
- return this.getPropertyValue("strokeDashoffset");
- }, set: function(t3) {
- t3 = U(t3), this.setPropertyValue("strokeDashoffset", t3) && this.setSVGAttribute({ "stroke-dashoffset": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "strokeLinecap", { get: function() {
- return this.getPropertyValue("strokeLinecap");
- }, set: function(t3) {
- this.setPropertyValue("strokeLinecap", t3) && this.setSVGAttribute({ "stroke-linecap": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "strokeLinejoin", { get: function() {
- return this.getPropertyValue("strokeLinejoin");
- }, set: function(t3) {
- this.setPropertyValue("strokeLinejoin", t3) && this.setSVGAttribute({ "stroke-linejoin": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "shapeRendering", { get: function() {
- return this.getPropertyValue("shapeRendering");
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("shapeRendering", t3) && this.setSVGAttribute({ "shape-rendering": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelPerfect", { get: function() {
- return this.getPropertyValue("pixelPerfect");
- }, set: function(t3) {
- t3 = z(t3), this._positionPrecision = t3 ? ls.pixelPerfectPrecision : 3, this.setPropertyValue("pixelPerfect", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "rtl", { get: function() {
- return Z(this._rtl) ? this._rtl : !!this._topParent && this._topParent.rtl;
- }, set: function(t3) {
- t3 = z(t3), this.isBaseSprite && (this.topParent.rtl = t3), this._rtl = t3;
- }, enumerable: true, configurable: true }), e3.prototype.show = function(t3) {
- return this.showReal(t3);
- }, e3.prototype.showReal = function(t3) {
- var e4 = this;
- if (!this.preventShow) {
- var i3, n3 = this.defaultState.properties;
- if (!this.disabled && (this.isHidden || !this.visible || this.isHiding || n3.opacity != null && this.opacity < n3.opacity && !this.isShowing) && !this.isDisposed()) {
- this.invalid && this.validate(), this.positionInvalid && this.validatePosition(), tt(t3) || (t3 = this.defaultState.transitionDuration), this._hideAnimation && (this._hideAnimation.kill(), this._hideAnimation = void 0), this._showHideDisposer && this.removeDispose(this._showHideDisposer), this._isHidden = false, this.isHiding = false, this.isShowing = true, (i3 = this.applyCurrentState(t3)) && !i3.isFinished() ? (this._showHideDisposer = i3.events.on("animationended", function() {
- e4.isShowing = false;
- }), this._disposers.push(this._showHideDisposer)) : this.isShowing = false;
- var r3 = this.defaultState.properties.visible;
- Z(r3) || (r3 = true), this.visible = r3, this.readerHidden = false, this.dispatchImmediately("shown");
- }
- return i3;
- }
- }, e3.prototype.hide = function(t3) {
- return this.hideReal(t3);
- }, e3.prototype.hideReal = function(t3) {
- var e4, i3 = this;
- if (!this.isHiding && this.visible && !this.isDisposed()) {
- this.tooltip && this.tooltip.currentSprite == this && this.hideTooltip(0), this._hideAnimation && (this._hideAnimation.kill(), this._hideAnimation = void 0), this.isShowing = false, this._showHideDisposer && this.removeDispose(this._showHideDisposer);
- var n3 = this.hiddenState;
- n3 ? (e4 = this.setState(n3, t3, void 0)) && !e4.isFinished() ? (this._hideAnimation = e4, this._showHideDisposer = e4.events.on("animationended", function() {
- i3.isHiding = false, i3._isHidden = true, n3.properties.visible == 0 && (i3.visible = false);
- }, this), this._disposers.push(this._showHideDisposer), this._disposers.push(e4)) : (this.isHiding = false, this._isHidden = true) : (this.visible = false, this.isHiding = false, this._isHidden = true), this.readerHidden = true, this.dispatchImmediately("hidden"), this.invalidate();
- }
- return tt(t3) || (t3 = this.hiddenState.transitionDuration), e4;
- }, Object.defineProperty(e3.prototype, "visible", { get: function() {
- return this.getVisibility();
- }, set: function(t3) {
- t3 = z(t3), this.setVisibility(t3);
- }, enumerable: true, configurable: true }), e3.prototype.getVisibility = function() {
- var t3 = this.getPropertyValue("visible");
- return Z(t3) || (t3 = true), t3;
- }, e3.prototype.setVisibility = function(t3) {
- if (this.setPropertyValue("visible", t3) && (t3 ? this.group.removeAttr("visibility") : this.group.attr({ visibility: "hidden" }), this.events.isEnabled("visibilitychanged"))) {
- var e4 = { type: "visibilitychanged", target: this, visible: t3 };
- this.events.dispatchImmediately("visibilitychanged", e4);
- }
- }, Object.defineProperty(e3.prototype, "zIndex", { get: function() {
- return this.getPropertyValue("zIndex");
- }, set: function(t3) {
- t3 = U(t3), this.setPropertyValue("zIndex", t3) && this.dispatch("zIndexChanged");
- }, enumerable: true, configurable: true }), e3.prototype.toFront = function() {
- var t3 = this._parent;
- t3 && t3.children.indexOf(this) != t3.children.length - 1 && (t3.children.moveValue(this, t3.children.length - 1), this.dispatch("zIndexChanged"));
- }, e3.prototype.toBack = function() {
- var t3 = this._parent;
- t3 && t3.children.indexOf(this) != 0 && (t3.children.moveValue(this, 0), this.dispatch("zIndexChanged"));
- }, Object.defineProperty(e3.prototype, "userClassName", { get: function() {
- return this.getPropertyValue("userClassName");
- }, set: function(t3) {
- this.setPropertyValue("userClassName", t3) && (!t3 && this.userClassName && this.group.removeClass(this.userClassName), this.setClassName());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltip", { get: function() {
- return this._tooltip ? this._tooltip : this.virtualParent ? this.virtualParent.tooltip : this._parent ? this._parent.tooltip : void 0;
- }, set: function(t3) {
- this._tooltip && this.removeDispose(this._tooltip), this._tooltip = t3, t3 && (t3.parent = this.tooltipContainer);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipDataItem", { get: function() {
- return this._tooltipDataItem || this.dataItem;
- }, set: function(t3) {
- this._tooltipDataItem = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipColorSource", { get: function() {
- return this._tooltipColorSource;
- }, set: function(t3) {
- this._tooltipColorSource = t3;
- }, enumerable: true, configurable: true }), e3.prototype.showTooltip = function(t3) {
- this.showTooltipOn == "always" && !this._tooltip && this.tooltip && (this._tooltip = this.tooltip.clone()), !t3 && this.tooltipPosition == "pointer" && this.isHover && (t3 = gr(ua().lastPointer.point, this.svgContainer.SVGContainer, this.svgContainer.cssScale));
- for (var e4 = this; e4 != null; ) {
- if (!e4.visible || e4.disabled || e4.__disabled)
- return void (this._tooltip && this._tooltip.visible && this._tooltip.hide(0));
- e4 = e4.parent;
- }
- if (Z(this.tooltipText) || Z(this.tooltipHTML)) {
- var i3 = this.tooltip, n3 = this.tooltipDataItem;
- if (i3) {
- i3.targetSprite = this;
- var r3 = this, s2 = this.tooltipColorSource;
- if ((i3.getStrokeFromObject || i3.getFillFromObject) && s2 && (s2.isTemplate ? n3 && Kt(n3.sprites, function(t4) {
- return t4.clonedFrom != s2 || (r3 = t4, false);
- }) : r3 = s2), i3.getStrokeFromObject) {
- for (var a2 = this.stroke, o3 = r3; o3.parent != null && ((a2 = o3.stroke) == null && (o3 = o3.parent), a2 == null); )
- ;
- a2 instanceof un ? i3.background.animate({ property: "stroke", to: a2 }, i3.animationDuration) : i3.background.stroke = a2;
- }
- if (i3.dataItem = n3, i3.label.populateStringFrom = this, i3.getFillFromObject) {
- var l2 = this.fill;
- for (o3 = r3; o3.parent != null; )
- if ((l2 = o3.fill) == null || l2 instanceof un && l2.rgb == null)
- o3 = o3.parent;
- else if (l2 != null)
- break;
- l2 == null && (l2 = dn("#000000")), l2 instanceof un && i3.visible ? i3.background.animate({ property: "fill", to: l2 }, i3.animationDuration) : i3.background.fill = l2, i3.autoTextColor && l2 instanceof un && (i3.label.fill = l2.alternative);
- }
- var h2 = "";
- if (this.tooltipHTML && (i3.html = this.tooltipHTML, h2 = this.tooltipHTML), this.tooltipText && (i3.text = this.tooltipText, h2 = this.tooltipText), this.updateTooltipPosition(t3)) {
- if (i3.readerDescribedBy = this.uidAttr(), i3.label.invalid && i3.label.validate(), h2 != null && h2 != "" && i3.label.currentText != "") {
- i3 && !i3.parent && (i3.parent = this.tooltipContainer);
- var p2 = i3.defaultState.transitionDuration;
- return p2 <= 0 && (p2 = 1), i3.show(p2), i3.currentSprite = this, true;
- }
- this.hideTooltip(0);
- } else
- this.hideTooltip(0);
- }
- }
- return false;
- }, e3.prototype.updateTooltipPosition = function(t3) {
- var e4 = this;
- if (this.tooltipPosition != "pointer") {
- var i3 = ur({ x: this.getTooltipX(), y: this.getTooltipY() }, this);
- return this.pointTooltipTo(i3);
- }
- if (this._interactionDisposer && this._interactionDisposer.dispose(), this._interactionDisposer = ua().body.events.on("track", function(t4) {
- return e4.pointTooltipTo(gr(t4.point, e4.svgContainer.SVGContainer, e4.svgContainer.cssScale), true);
- }), t3)
- return this.pointTooltipTo(t3, true);
- }, e3.prototype.pointTooltipTo = function(t3, e4) {
- var i3 = this.tooltip;
- if (i3 && this.topParent) {
- if (i3.showInViewport)
- return i3.pointTo(t3, e4), true;
- if (Nt(t3, { x: 0, y: 0, width: this.topParent.maxWidth, height: this.topParent.maxHeight }))
- return i3.pointTo(t3, e4), true;
- }
- return false;
- }, e3.prototype.hideTooltip = function(t3) {
- if (this.showTooltipOn != "always") {
- var e4 = this.tooltip;
- e4 && (e4.targetSprite == this && (e4.targetSprite = void 0), e4.hide(t3), this._interactionDisposer && (this._interactionDisposer.dispose(), this._interactionDisposer = void 0));
- }
- }, Object.defineProperty(e3.prototype, "tooltipHTML", { get: function() {
- return this.getPropertyValue("tooltipHTML");
- }, set: function(t3) {
- t3 = G(t3), this.hoverable = true, this.setPropertyValue("tooltipHTML", t3) && this.tooltip && this.tooltip.visible && this.showTooltip();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipText", { get: function() {
- return this.getPropertyValue("tooltipText");
- }, set: function(t3) {
- (t3 = G(t3)) && (this.hoverable = true), this.setPropertyValue("tooltipText", t3) && this.tooltip && this.tooltip.visible && this.showTooltip();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipContainer", { get: function() {
- return this._tooltipContainer ? this._tooltipContainer : this._parent ? this._parent.tooltipContainer : void 0;
- }, set: function(t3) {
- this._tooltipContainer = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipX", { get: function() {
- return this.getTooltipX();
- }, set: function(t3) {
- this.setPercentProperty("tooltipX", t3) && this.tooltip && this.tooltip.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "alwaysShowTooltip", { get: function() {
- return this.getPropertyValue("showTooltipOn") == "always";
- }, set: function(t3) {
- (t3 = z(t3)) && (this.showTooltipOn = "always");
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "showTooltipOn", { get: function() {
- return this.getPropertyValue("showTooltipOn");
- }, set: function(t3) {
- this.setPropertyValue("showTooltipOn", t3) && (t3 == "hit" && (this.clickable = true), this.tooltip && (t3 == "always" ? this.showTooltip() : this.handleAlwaysShowTooltip()));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipPosition", { get: function() {
- return this.getPropertyValue("tooltipPosition");
- }, set: function(t3) {
- this.setPropertyValue("tooltipPosition", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipY", { get: function() {
- return this.getTooltipY();
- }, set: function(t3) {
- this.setPercentProperty("tooltipY", t3) && this.tooltip && this.tooltip.invalidate();
- }, enumerable: true, configurable: true }), e3.prototype.getTooltipX = function() {
- var t3, e4 = this.getPropertyValue("tooltipX");
- return Z(e4) || (e4 = V(50)), tt(e4) && (t3 = e4), e4 instanceof A && (t3 = this.maxLeftSelf + this._measuredWidthSelf * e4.value - this.pixelPaddingLeft - this.ex), tt(t3) || (t3 = 0), t3;
- }, e3.prototype.getTooltipY = function() {
- var t3, e4 = this.getPropertyValue("tooltipY");
- return Z(e4) || (e4 = V(50)), tt(e4) && (t3 = e4), e4 instanceof A && (t3 = this.maxTopSelf + this._measuredHeightSelf * e4.value - this.pixelPaddingTop - this.ey), tt(t3) || (t3 = 0), t3;
- }, e3.prototype.raiseCriticalError = function(t3, e4) {
- this.svgContainer && (this._adapterO ? this.modal.content = this._adapterO.apply("criticalError", t3).message : this.modal.content = t3.message, e4 ? this.modal.closable = true : this.disabled = true, ls.suppressErrors || this.modal.open()), ls.verbose && console.log(t3);
- }, e3.prototype.processConfig = function(e4) {
- e4 && (Z(e4.tooltipColorSource) && Q(e4.tooltipColorSource) && this.map.hasKey(e4.tooltipColorSource) && (e4.tooltipColorSource = this.map.getKey(e4.tooltipColorSource)), Z(e4.cursorOverStyle) && Q(e4.cursorOverStyle) && (e4.cursorOverStyle = this.getCursorStyle(e4.cursorOverStyle)), Z(e4.cursorDowntyle) && Q(e4.cursorDowntyle) && (e4.cursorDowntyle = this.getCursorStyle(e4.cursorDowntyle)), Z(e4.cursorOptions) && (Z(e4.cursorOptions.overStyle) && Q(e4.cursorOptions.overStyle) && (e4.cursorOptions.overStyle = this.getCursorStyle(e4.cursorOptions.overStyle)), Z(e4.cursorOptions.downStyle) && Q(e4.cursorOptions.downStyle) && (e4.cursorOptions.downStyle = this.getCursorStyle(e4.cursorOptions.downStyle)))), t2.prototype.processConfig.call(this, e4), this.processDelayedMap();
- }, e3.prototype.getCursorStyle = function(t3) {
- switch (t3) {
- case "grab":
- return Ia.grab;
- case "grabbing":
- return Ia.grabbing;
- case "pointer":
- return Ia.pointer;
- case "horizontalResize":
- return Ia.horizontalResize;
- case "verticalResize":
- return Ia.verticalResize;
- default:
- return Ia.default;
- }
- }, e3.prototype.configOrder = function(e4, i3) {
- return e4 == i3 ? 0 : e4 == "tooltipColorSource" ? 1 : i3 == "tooltipColorSource" ? -1 : t2.prototype.configOrder.call(this, e4, i3);
- }, Object.defineProperty(e3.prototype, "isHidden", { get: function() {
- return this._isHidden ? this._isHidden : !!this._parent && this._parent.isHidden;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "showOnInit", { get: function() {
- return this.getPropertyValue("showOnInit");
- }, set: function(t3) {
- t3 = z(t3), this.setShowOnInit(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setShowOnInit = function(t3) {
- this.setPropertyValue("showOnInit", t3) && (this.isTemplate || (!t3 || this.inited || this.hidden ? this._showOnInitDisposer && this._showOnInitDisposer.dispose() : (this._showOnInitDisposer = new me([Ii.events.once("enterframe", this.hideInitially, this), this.events.once("beforevalidated", this.hideInitially, this, false), this.events.on("inited", this.appear, this, false)]), this._disposers.push(this._showOnInitDisposer))));
- }, e3.prototype.hideInitially = function() {
- this.isDisposed() || (this.appeared = false, this.inited || this.hide(0));
- }, e3.prototype.appear = function() {
- var t3 = this;
- if (this.appeared = false, this.hidden || this.isHidden || this.hide(0), this.hidden)
- this.appeared = true, this.dispatch("appeared");
- else {
- var e4 = this.show();
- e4 && !e4.isFinished() ? this.addDisposer(e4.events.on("animationended", function() {
- t3.appeared = true, t3.dispatch("appeared");
- })) : (this.appeared = true, this.dispatch("appeared"));
- }
- }, Object.defineProperty(e3.prototype, "hidden", { get: function() {
- return this.getPropertyValue("hidden");
- }, set: function(t3) {
- t3 = z(t3), this.setPropertyValue("hidden", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "bbox", { get: function() {
- return this.definedBBox ? this.definedBBox : this._bbox;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "plugins", { get: function() {
- var t3 = this;
- return this._plugins || (this._plugins = new Fi(), this._disposers.push(this._plugins.events.on("inserted", function(e4) {
- e4.newValue.target = t3, e4.newValue.init();
- })), this._disposers.push(new Ai(this._plugins))), this._plugins;
- }, enumerable: true, configurable: true }), e3.prototype._systemUpdate = function(t3) {
- this.validate();
- }, e3.prototype._systemCheckIfValidate = function() {
- return true;
- }, e3.prototype._systemValidatePositions = function() {
- this.validatePosition();
- }, e3.prototype._systemValidateLayouts = function() {
- }, e3;
- }(mn);
- Ii.registeredClasses.Sprite = Za;
- var qa = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Rectangle", e4.element = e4.paper.add("rect"), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this._positionPrecision;
- this.pixelPerfect && (e4 = 0);
- var i3 = lt(this.innerWidth, e4), n3 = lt(this.innerHeight, e4);
- this.element.attr({ width: i3, height: n3 });
- }, e3.prototype.measureElement = function() {
- }, Object.defineProperty(e3.prototype, "bbox", { get: function() {
- return this.definedBBox ? this.definedBBox : this.isMeasured ? { x: 0, y: 0, width: this.innerWidth, height: this.innerHeight } : { x: 0, y: 0, width: 0, height: 0 };
- }, enumerable: true, configurable: true }), e3;
- }(Za);
- Ii.registeredClasses.Rectangle = qa;
- var $a = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._childrenByLayout = [], e4._childrenDisposers = new Pi(), e4.hasFocused = false, e4.setStateOnSprites = [], e4.layoutInvalid = false, e4._absoluteWidth = 0, e4._absoluteHeight = 0, e4._shouldBeReady = [], e4._tapToActivate = false, e4.tapTimeout = 3e3, e4.className = "Container", e4._element = e4.paper.addGroup("g"), e4.group.add(e4.element), e4.setPropertyValue("pixelPerfect", false), e4.setPropertyValue("layout", "absolute"), e4.setPropertyValue("fixedWidthGrid", false), e4.setPropertyValue("verticalCenter", "none"), e4.setPropertyValue("horizontalCenter", "none"), e4._positionPrecision = 4, e4._disposers.push(new _i(e4._childrenDisposers)), e4.children.events.on("inserted", e4.handleChildAdded, e4), e4.children.events.on("removed", e4.handleChildRemoved, e4), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.handleChildAdded = function(t3) {
- this.processChild(t3.newValue);
- }, e3.prototype.processChild = function(t3) {
- try {
- this._childrenDisposers.insertKey(t3.uid, new me([t3.events.on("transformed", this.handleChildTransform, this), t3.events.on("zIndexChanged", this.sortAndAdd, this)]));
- } catch (t4) {
- }
- this.element && this.element.add(t3.group), t3.parent = this, t3.paper = this.paper, this.dispatchImmediately("childadded", { type: "childadded", newValue: t3 }), this.invalidate();
- }, e3.prototype.sortAndAdd = function() {
- this.sortChildren(), this.addChildren();
- }, e3.prototype.handleChildRemoved = function(t3) {
- var e4 = t3.oldValue;
- this._childrenDisposers.removeKey(e4.uid), this.element && this.element.removeElement(e4.group), e4.isMeasured && this.invalidateLayout(), this.dispatchImmediately("childremoved", { type: "childremoved", oldValue: e4 });
- }, e3.prototype.handleChildTransform = function(t3) {
- t3.target.isMeasured && this.invalidateLayout();
- }, e3.prototype.invalidateLayout = function() {
- this.layoutInvalid || this.disabled || this.isTemplate || this.layout == "none" || this.__disabled || (this.layoutInvalid = true, Ii.addToInvalidLayouts(this), Qa.requestFrame());
- }, e3.prototype.invalidate = function() {
- t2.prototype.invalidate.call(this), this.invalidateLayout();
- }, e3.prototype.deepInvalidate = function() {
- t2.prototype.invalidate.call(this), Ut(this._childrenByLayout, function(t3) {
- t3 instanceof e3 ? t3.deepInvalidate() : t3.invalidate();
- }), this.invalidateLayout();
- }, Object.defineProperty(e3.prototype, "children", { get: function() {
- return this._children || (this._children = new Fi()), this._children;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "minWidth", { get: function() {
- return this.getPropertyValue("minWidth");
- }, set: function(t3) {
- this.setPropertyValue("minWidth", t3) && this.invalidateLayout();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "minHeight", { get: function() {
- return this.getPropertyValue("minHeight");
- }, set: function(t3) {
- this.setPropertyValue("minHeight", t3) && this.invalidateLayout();
- }, enumerable: true, configurable: true }), e3.prototype.removeElement = function() {
- }, e3.prototype.sortChildren = function() {
- var t3 = this;
- if (this._childrenByLayout = [], this.layout != "none" && this.layout != "absolute" && this.layout) {
- var e4 = [], i3 = [];
- ti(this.children.iterator(), function(n3) {
- t3.layout == "horizontal" || t3.layout == "grid" ? tt(n3.percentWidth) ? i3.push(n3) : e4.push(n3) : t3.layout == "vertical" && tt(n3.percentHeight) ? i3.push(n3) : e4.push(n3);
- }), this._childrenByLayout = e4.concat(i3);
- } else
- this._childrenByLayout = this.children.values;
- this.calculateRelativeSize();
- }, e3.prototype.calculateRelativeSize = function() {
- var t3 = this, e4 = 0, i3 = 0;
- Ut(this._childrenByLayout, function(t4) {
- t4.isMeasured && (tt(t4.percentWidth) && (e4 += t4.percentWidth), tt(t4.percentHeight) && (i3 += t4.percentHeight));
- }), Ut(this._childrenByLayout, function(n3) {
- n3.isMeasured && (t3.layout == "horizontal" && (tt(n3.percentWidth) && (n3.relativeWidth = n3.percentWidth / e4), tt(n3.percentHeight) && (n3.relativeHeight = n3.percentHeight / 100)), t3.layout == "vertical" && (tt(n3.percentHeight) && (n3.relativeHeight = n3.percentHeight / i3), tt(n3.percentWidth) && (n3.relativeWidth = n3.percentWidth / 100)), t3.layout == "grid" && (tt(n3.percentHeight) && (n3.relativeHeight = n3.percentHeight / 100), tt(n3.percentWidth) && (n3.relativeWidth = n3.percentWidth / 100))), t3.layout != "absolute" && n3.isMeasured || (tt(n3.percentWidth) && (n3.relativeWidth = n3.percentWidth / 100), tt(n3.percentHeight) && (n3.relativeHeight = n3.percentHeight / 100));
- });
- }, e3.prototype.addChildren = function() {
- if (this.element) {
- var t3 = oe(this.children.values), e4 = t3.map(function(t4, e5) {
- return { idx: e5, data: t4 };
- });
- e4.sort(function(t4, e5) {
- var i4 = t4.data.zIndex || 0, n4 = e5.data.zIndex || 0;
- return i4 < n4 ? -1 : i4 > n4 ? 1 : t4.idx - e5.idx;
- }), t3 = e4.map(function(t4) {
- return t4.data;
- });
- var i3 = this.element, n3 = true;
- if (i3.node && i3.node.childNodes) {
- for (var r3 = 0, s2 = i3.node.childNodes.length; r3 < s2; r3++)
- if (i3.node.childNodes[r3] != t3[r3].group.node) {
- n3 = false;
- break;
- }
- }
- n3 || (Ut(t3, function(t4) {
- t4.group && i3.add(t4.group);
- }), this._background && this.group.addToBack(this._background.group), this.invalidateLayout());
- }
- }, e3.prototype.createChild = function(t3) {
- var e4 = new t3();
- return e4.parent = this, e4;
- }, e3.prototype.removeChildren = function() {
- for (; this.children.length > 0; ) {
- var t3 = this.children.getIndex(0);
- t3.parent = void 0, this.children.removeValue(t3);
- }
- }, e3.prototype.disposeChildren = function() {
- for (; this.children.length > 0; ) {
- var t3 = this.children.getIndex(0);
- t3.dispose(), this.children.removeValue(t3);
- }
- }, Object.defineProperty(e3.prototype, "background", { get: function() {
- return this._background || (this._background = this.createBackground(), this.processBackground()), this._background;
- }, set: function(t3) {
- this._background && this.background != t3 && this.removeDispose(this._background), t3 && (this._background = t3, this._disposers.push(t3), this.processBackground());
- }, enumerable: true, configurable: true }), e3.prototype.handleGlobalScale = function() {
- t2.prototype.handleGlobalScale.call(this), this.children.each(function(t3) {
- t3.handleGlobalScale();
- });
- }, e3.prototype.createBackground = function() {
- return new qa();
- }, e3.prototype.processBackground = function() {
- var t3 = this._background;
- t3 && (t3.isMeasured = false, this._background.fill = new Ys().getFor("background"), t3.parent = this, t3.isMeasured = false, this.children.removeValue(t3), this._disposers.push(t3), this.group.addToBack(this._background.group));
- }, e3.prototype.validateLayout = function() {
- var t3 = this;
- Ii.removeFromInvalidLayouts(this), this.layoutInvalid = false, this._availableWidth = this.innerWidth, this._availableHeight = this.innerHeight;
- var e4 = 0, i3 = 0, n3 = true;
- this.children && (this.sortChildren(), Ut(this._childrenByLayout, function(r3) {
- var s2, a2;
- if (tt(r3.relativeWidth) ? (s2 = lt(t3._availableWidth * r3.relativeWidth, 2), t3.layout == "horizontal" && (s2 -= r3.pixelMarginRight + r3.pixelMarginLeft)) : t3.layout == "horizontal" && r3.invalid && r3.validate(), tt(r3.relativeHeight) ? (a2 = lt(t3._availableHeight * r3.relativeHeight, 2), t3.layout == "vertical" && (a2 -= r3.pixelMarginTop + r3.pixelMarginBottom)) : t3.layout == "vertical" && r3.invalid && r3.validate(), r3.invalid == 0) {
- if (tt(r3.relativeWidth) && (r3.maxWidth = s2), tt(r3.relativeHeight) && (r3.maxHeight = a2), r3.isMeasured) {
- t3.layout == "horizontal" && (tt(r3.percentWidth) || r3.measuredWidth > 0 && (t3._availableWidth -= r3.measuredWidth + r3.pixelMarginLeft + r3.pixelMarginRight)), t3.layout == "vertical" && (tt(r3.percentHeight) || r3.measuredHeight > 0 && (t3._availableHeight -= r3.measuredHeight + r3.pixelMarginTop + r3.pixelMarginBottom));
- var o3 = r3.measuredWidth, l2 = r3.measuredHeight;
- r3.align != "none" && (o3 += r3.pixelMarginLeft + r3.pixelMarginRight), r3.valign != "none" && (l2 += r3.pixelMarginTop + r3.pixelMarginBottom), e4 = Math.max(e4, o3), i3 = Math.max(i3, l2);
- }
- } else
- r3.isMeasured && (tt(r3.relativeWidth) && r3.maxWidth != s2 && (r3.maxWidth = s2, n3 = false), tt(r3.relativeHeight) && r3.maxHeight != a2 && (r3.maxHeight = a2, n3 = false));
- })), this._absoluteWidth = e4, this._absoluteHeight = i3, n3 && this.arrange();
- }, e3.prototype.arrange = function() {
- var t3, e4, i3, n3, r3, s2, a2, o3, l2, h2, p2, u2 = this, d2 = this.children, c2 = 0, f2 = 0, g2 = gt(this.innerWidth, this._absoluteWidth), y2 = gt(this.innerHeight, this._absoluteHeight), m2 = this.pixelPaddingLeft, v2 = this.pixelPaddingRight, b2 = this.pixelPaddingTop, x2 = this.pixelPaddingBottom, _2 = 0, P2 = 0, w2 = 0, C2 = 0, O2 = [], S2 = [], I2 = this.maxWidth, D2 = this.maxHeight, k2 = this.minWidth, T2 = this.minHeight, V2 = oe(d2.values);
- if (this.reverseOrder && V2.reverse(), this.layout == "grid") {
- s2 = I2, r3 = 1;
- for (var F2 = 0, M2 = V2.length; F2 < M2; F2++)
- if ((j2 = V2[F2]).isMeasured && !j2.disabled && !j2.__disabled) {
- var L2 = j2.measuredWidth;
- L2 < s2 && (s2 = L2), L2 > r3 && (r3 = L2);
- }
- s2 = ut(s2, 1, I2), r3 = ut(r3, 1, I2), a2 = this.fixedWidthGrid ? I2 / r3 : I2 / s2, a2 = gt(1, Math.floor(a2)), a2 = yt(this.maxColumns, a2), O2 = this.getColumnWidth(V2, a2, r3);
- }
- for (F2 = 0, M2 = V2.length; F2 < M2; F2++) {
- var j2;
- if (!(j2 = V2[F2]).isMeasured || j2.disabled || j2.__disabled)
- j2.validatePosition();
- else {
- var E2 = void 0, R2 = void 0, B2 = j2.pixelMarginLeft, H2 = j2.pixelMarginRight, N2 = j2.pixelMarginTop, W2 = j2.pixelMarginBottom, X2 = j2.measuredWidth, Y2 = j2.measuredHeight, z2 = void 0, U2 = void 0, G2 = void 0, K2 = void 0;
- switch (this.layout) {
- case "none":
- break;
- case "absolute":
- switch (j2.align) {
- case "left":
- E2 = B2 - j2.maxLeft;
- break;
- case "center":
- E2 = (g2 - X2) / 2 - j2.maxLeft;
- break;
- case "right":
- E2 = g2 - H2 - j2.maxRight;
- break;
- default:
- j2.x instanceof A || (E2 = j2.pixelX);
- }
- switch (j2.valign) {
- case "top":
- R2 = N2 - j2.maxTop;
- break;
- case "middle":
- R2 = (y2 - Y2) / 2 - j2.maxTop;
- break;
- case "bottom":
- R2 = y2 - W2 - j2.maxBottom;
- break;
- default:
- j2.y instanceof A || (R2 = j2.pixelY);
- }
- break;
- case "vertical":
- switch (j2.align) {
- case "left":
- E2 = B2 - j2.maxLeft;
- break;
- case "center":
- E2 = (g2 - X2) / 2 - j2.maxLeft;
- break;
- case "right":
- E2 = g2 - H2 - j2.maxRight;
- break;
- default:
- E2 = j2.pixelX;
- }
- P2 = (R2 = P2 + N2 - j2.maxTop) + j2.maxBottom + W2;
- break;
- case "horizontal":
- switch (j2.valign) {
- case "top":
- R2 = N2 - j2.maxTop;
- break;
- case "middle":
- R2 = (y2 - Y2) / 2 - j2.maxTop;
- break;
- case "bottom":
- R2 = y2 - W2 - j2.maxBottom;
- break;
- default:
- R2 = j2.pixelY;
- }
- _2 = (E2 = _2 + B2 - j2.maxLeft) + j2.maxRight + H2;
- break;
- case "grid":
- switch (E2 = _2 + B2 - j2.maxLeft, j2.valign) {
- case "top":
- R2 = P2 + N2 - j2.maxTop;
- break;
- case "middle":
- R2 = P2 + (y2 - Y2) / 2 - j2.maxTop;
- break;
- case "bottom":
- R2 = P2 + y2 - W2 - j2.maxBottom;
- break;
- default:
- R2 = P2 - j2.maxTop;
- }
- _2 += O2[C2], S2[w2] = gt(S2[w2], Y2);
- var Z2 = O2[++C2];
- if (tt(Z2) || (Z2 = r3), _2 > yt(this.innerWidth, I2) - Z2 + 1 && C2 < a2) {
- a2 = C2, _2 = 0, P2 = 0, w2 = 0, C2 = 0, O2 = this.getColumnWidth(V2, a2, r3), S2 = [], F2 = -1;
- continue;
- }
- C2 >= a2 && (C2 = 0, P2 += S2[w2], w2++, _2 = 0);
- }
- this.layout !== "none" && (j2.moveTo({ x: E2, y: R2 }), z2 = E2 + j2.maxLeft - B2, U2 = E2 + j2.maxRight + H2, G2 = R2 + j2.maxTop - N2, K2 = R2 + j2.maxBottom + W2, (U2 > e4 || !tt(e4)) && (e4 = U2), (z2 < t3 || !tt(t3)) && (t3 = z2), (G2 < i3 || !tt(i3)) && (i3 = G2), (K2 > n3 || !tt(n3)) && (n3 = K2), (U2 > l2 || !tt(l2)) && (l2 = U2), (z2 < o3 || !tt(o3)) && (o3 = z2), (G2 < h2 || !tt(h2)) && (h2 = G2), K2 > p2 || tt(p2));
- }
- }
- if (this.layout == "none") {
- var q2 = this.bbox;
- t3 = q2.x, e4 = q2.x + q2.width, i3 = q2.y, n3 = q2.y + q2.height;
- }
- tt(t3) || (t3 = 0, o3 = 0), tt(e4) || (l2 = e4 = this._availableWidth), tt(i3) || (i3 = 0, h2 = 0), tt(n3) || (p2 = n3 = this._availableHeight), tt(h2) || (h2 = 0), tt(p2) || (p2 = h2), tt(o3) || (o3 = 0), tt(l2) || (l2 = o3), c2 = e4 - t3, f2 = n3 - i3, tt(this.relativeWidth) && (t3 = 0, e4 = c2 = I2 - m2 - v2), tt(this.relativeHeight) && (i3 = 0, n3 = f2 = D2 - b2 - x2), tt(this._pixelWidth) && (t3 = 0, c2 = this._pixelWidth - m2 - v2), tt(k2) && c2 < k2 && (t3 = 0, c2 = this.minWidth - m2 - v2), tt(this._pixelHeight) && (i3 = 0, f2 = this._pixelHeight - b2 - x2), tt(T2) && f2 < T2 && (i3 = 0, f2 = T2 - b2 - x2);
- var $2 = l2 - o3, J2 = p2 - h2;
- if (this.layout != "none" && (this.contentAlign || this.contentValign) && d2.length > 0) {
- var Q2, et2, it2 = c2, nt2 = f2;
- it2 < $2 && (it2 = $2), nt2 < J2 && (nt2 = J2), this.contentAlign == "center" && (Q2 = (it2 - $2) / 2), this.contentAlign == "right" && (Q2 = it2 - $2), this.contentValign == "middle" && (et2 = (nt2 - J2) / 2), this.contentValign == "bottom" && (et2 = nt2 - J2), tt(Q2) && ti(d2.iterator(), function(t4) {
- var e5 = t4.maxLeft, i4 = Q2;
- u2.layout == "horizontal" && (t4.x = t4.pixelX + i4), u2.layout == "grid" && (t4.x = t4.pixelX + i4), u2.layout == "vertical" && (i4 += t4.pixelMarginLeft, t4.align == "none" && (t4.x = i4 - e5)), u2.layout == "absolute" && (i4 += t4.pixelMarginLeft, t4.align == "none" && (t4.x = i4 - e5));
- }), tt(et2) && ti(d2.iterator(), function(t4) {
- var e5 = t4.maxTop, i4 = et2;
- u2.layout == "horizontal" && (i4 += t4.pixelMarginTop, t4.valign == "none" && (t4.y = i4 - e5)), u2.layout == "grid" && (i4 += t4.pixelMarginTop, t4.y = i4 - e5), u2.layout == "vertical" && (t4.y = t4.pixelY + i4), u2.layout == "absolute" && (i4 += t4.pixelMarginTop, t4.valign == "none" && (t4.y = i4 - e5));
- });
- }
- var rt2 = this.bbox;
- c2 = gt(c2, k2), f2 = gt(f2, T2), this.contentWidth = c2, this.contentHeight = f2, c2 = yt(c2, I2), f2 = yt(f2, D2), this._bbox = { x: t3, y: i3, width: c2, height: f2 };
- var st2 = this.maxLeft, at2 = this.maxTop, ot2 = this.maxBottom, lt2 = this.maxRight;
- if (this.measure(), (st2 != this.maxLeft || lt2 != this.maxRight || at2 != this.maxTop || ot2 != this.maxBottom) && this.events.isEnabled("transformed")) {
- var ht2 = { type: "transformed", target: this };
- rt2 && (ht2.dummyData = rt2.width + " " + c2 + " " + rt2.height + " " + f2), this.events.dispatchImmediately("transformed", ht2);
- }
- this.dispatchImmediately("layoutvalidated");
- }, e3.prototype.updateCenter = function() {
- t2.prototype.updateCenter.call(this), this.updateBackground();
- }, e3.prototype.updateBackground = function() {
- var t3 = this._background;
- t3 && (t3.x = this.maxLeft, t3.y = this.maxTop, t3.width = this.maxRight - this.maxLeft, t3.height = this.maxBottom - this.maxTop);
- }, e3.prototype.getColumnWidth = function(t3, e4, i3) {
- var n3 = this, r3 = [], s2 = 0;
- return Ut(t3, function(t4) {
- !t4.isMeasured || t4.disabled || t4.__disabled || (n3.fixedWidthGrid ? r3[s2] = i3 : r3[s2] = gt(r3[s2], t4.measuredWidth + t4.pixelMarginRight + t4.pixelMarginLeft), ++s2 == e4 && (s2 = 0));
- }), r3;
- }, Object.defineProperty(e3.prototype, "layout", { get: function() {
- return this.getPropertyValue("layout");
- }, set: function(t3) {
- this.setPropertyValue("layout", t3) && this.invalidateLayout();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "contentValign", { get: function() {
- return this.getPropertyValue("contentValign");
- }, set: function(t3) {
- this.setPropertyValue("contentValign", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "contentAlign", { get: function() {
- return this.getPropertyValue("contentAlign");
- }, set: function(t3) {
- this.setPropertyValue("contentAlign", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fixedWidthGrid", { get: function() {
- return this.getPropertyValue("fixedWidthGrid");
- }, set: function(t3) {
- this.setPropertyValue("fixedWidthGrid", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxColumns", { get: function() {
- return this.getPropertyValue("maxColumns");
- }, set: function(t3) {
- this.setPropertyValue("maxColumns", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "reverseOrder", { get: function() {
- return this.getPropertyValue("reverseOrder");
- }, set: function(t3) {
- this.setPropertyValue("reverseOrder", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "setStateOnChildren", { get: function() {
- return this.getPropertyValue("setStateOnChildren");
- }, set: function(t3) {
- this.setPropertyValue("setStateOnChildren", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.fitsToBounds = function(t3) {
- var e4 = t3.x, i3 = t3.y;
- return e4 >= -0.5 && e4 <= this.pixelWidth + 0.5 && i3 >= -0.5 && i3 <= this.pixelHeight + 0.5;
- }, e3.prototype.copyFrom = function(e4) {
- var i3 = this;
- t2.prototype.copyFrom.call(this, e4), this.layout = e4.layout, this.setStateOnChildren = e4.setStateOnChildren, e4._background && (this.background = e4._background.clone(), this.background.copyFrom(e4._background)), ti(e4.children.iterator(), function(t3) {
- t3.shouldClone && (t3.clone().parent = i3);
- });
- }, Object.defineProperty(e3.prototype, "preloader", { get: function() {
- return this._preloader || (this.parent ? this.parent.preloader : void 0);
- }, set: function(t3) {
- this._preloader && this.removeDispose(this._preloader), this._preloader = t3, t3 && (t3.parent = this.tooltipContainer, this._disposers.push(t3));
- }, enumerable: true, configurable: true }), e3.prototype.setPaper = function(e4) {
- var i3 = this, n3 = t2.prototype.setPaper.call(this, e4);
- return n3 && (this._background && (this._background.paper = e4, this._background.topParent = this.topParent), this.children.each(function(t3) {
- t3.setPaper(e4), t3.topParent = i3.topParent;
- })), n3;
- }, e3.prototype.removeFromInvalids = function() {
- t2.prototype.removeFromInvalids.call(this), Ii.removeFromInvalidLayouts(this);
- }, e3.prototype.setDataItem = function(e4) {
- this._dataItem != e4 && (ti(this.children.iterator(), function(t3) {
- t3.dataItem = e4;
- }), this._background && (this._background.dataItem = e4)), t2.prototype.setDataItem.call(this, e4);
- }, e3.prototype.measureElement = function() {
- this.disabled || this.isTemplate || this.layout == "none" || this.__disabled || this.validateLayout();
- }, Object.defineProperty(e3.prototype, "fontFamily", { get: function() {
- return this.getPropertyValue("fontFamily");
- }, set: function(t3) {
- this.setPropertyValue("fontFamily", t3, true) && (this.setSVGAttribute({ "font-family": t3 }), this.invalidateLabels());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fontSize", { get: function() {
- return this.getPropertyValue("fontSize");
- }, set: function(t3) {
- this.setPropertyValue("fontSize", t3, true) && (this.setSVGAttribute({ "font-size": t3 }), this.invalidateLabels());
- }, enumerable: true, configurable: true }), e3.prototype.invalidateLabels = function() {
- this.children.each(function(t3) {
- t3.hardInvalidate ? (t3.hardInvalidate(), t3.events.once("validated", t3.handleValidate, t3, false)) : t3 instanceof e3 && t3.invalidateLabels();
- });
- }, Object.defineProperty(e3.prototype, "fontWeight", { get: function() {
- return this.getPropertyValue("fontWeight");
- }, set: function(t3) {
- this.setPropertyValue("fontWeight", t3), this.setSVGAttribute({ "font-weight": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "textDecoration", { get: function() {
- return this.getPropertyValue("textDecoration");
- }, set: function(t3) {
- this.setPropertyValue("textDecoration", t3), this.setSVGAttribute({ "text-decoration": t3 });
- }, enumerable: true, configurable: true }), e3.prototype.dispose = function() {
- this._background && this._background.dispose(), this._shouldBeReady = [], this.disposeChildren(), t2.prototype.dispose.call(this);
- }, e3.prototype.setState = function(e4, i3, n3) {
- var r3 = e4;
- return e4 instanceof ss && (r3 = e4.name), this.setStateOnChildren && ti(this.children.iterator(), function(t3) {
- t3.setState(r3, i3, n3), r3 != "active" && (t3.isActive = false);
- }), this._background && this._background.setState(r3), this.setStateOnSprites.length && Ut(this.setStateOnSprites, function(t3) {
- t3.setState(r3, i3, n3);
- }), t2.prototype.setState.call(this, e4, i3, n3);
- }, e3.prototype.setActive = function(e4) {
- t2.prototype.setActive.call(this, e4), this._background && (this._background.isActive = e4);
- }, e3.prototype.dispatchReady = function() {
- var e4 = this;
- if (!this.isReady() && !this.isDisposed()) {
- var i3 = true;
- Qe(this.children.iterator(), function(t3) {
- return !!(t3.__disabled || t3.disabled || t3.isReady()) || (i3 = false, false);
- }), Kt(this._shouldBeReady, function(t3) {
- return !!(t3.__disabled || t3.disabled || t3.isReady()) || (i3 = false, false);
- }), i3 ? t2.prototype.dispatchReady.call(this) : Ii.events.once("exitframe", function() {
- e4.dispatchReady(), Qa.requestFrame();
- }, void 0, false);
- }
- }, e3.prototype._systemUpdate = function(e4) {
- this.children.each(function(t3) {
- t3.invalid && (t3._systemCheckIfValidate() ? t3.dataItem && t3.dataItem.component && t3.dataItem.component.dataInvalid ? e4.push(t3) : t3.validate() : e4.push(t3));
- }), t2.prototype._systemUpdate.call(this, e4);
- }, e3.prototype._systemValidatePositions = function() {
- this.children.each(function(t3) {
- t3.positionInvalid && t3.validatePosition();
- }), t2.prototype._systemValidatePositions.call(this);
- }, e3.prototype._systemValidateLayouts = function() {
- this.layoutInvalid && !this.isDisposed() && this.validateLayout();
- }, Object.defineProperty(e3.prototype, "tapToActivate", { get: function() {
- return this._tapToActivate;
- }, set: function(t3) {
- this._tapToActivate != t3 && this.setTapToActivate(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setTapToActivate = function(t3) {
- var e4 = this;
- this._tapToActivate = t3, this.interactions.isTouchProtected = t3, t3 && this.interactions.setEventDisposer("container-tapToActivate", t3, function() {
- return new me([e4.events.on("hit", e4.handleTapToActivate, e4, false), e4.events.on("down", e4.initTapTimeout, e4, false), e4.events.on("track", e4.initTapTimeout, e4, false), ua().body.events.on("down", function(t4) {
- ua().isLocalElement(t4.pointer, e4.paper.svg, e4.uid) || e4.handleTapToActivateDeactivation();
- }, e4, false)]);
- }), ua();
- }, e3.prototype.handleTapToActivate = function() {
- this.interactions.isTouchProtected = false, this.initTapTimeout();
- }, e3.prototype.handleTapToActivateDeactivation = function() {
- this.interactions.isTouchProtected = true;
- }, e3.prototype.initTapTimeout = function() {
- var t3 = this;
- this._tapToActivateTimeout && this._tapToActivateTimeout.dispose(), this.tapToActivate && !this.interactions.isTouchProtected && this.tapTimeout && (this._tapToActivateTimeout = this.setTimeout(function() {
- t3.handleTapToActivateDeactivation();
- }, this.tapTimeout));
- }, e3.prototype.moveHtmlContainer = function(t3) {
- var e4 = _s(t3);
- if (e4) {
- this.htmlContainer = e4;
- var i3 = this.svgContainer;
- i3.htmlElement = e4, i3.htmlElement.appendChild(i3.SVGContainer), i3.initSensor(), i3.measure();
- } else
- Q(t3) && t3 != "" && Qa.log("html container '" + t3 + "' not found");
- }, e3.prototype.hasLicense = function() {
- if (ls.commercialLicense)
- return true;
- for (var t3 = 0; t3 < ls.licenses.length; t3++)
- if (ls.licenses[t3].match(/^CH.{5,}/i))
- return true;
- return false;
- }, e3;
- }(Za);
- Ii.registeredClasses.Container = $a;
- var Ja = function() {
- function t2() {
- this._isPaused = false, this.animations = [], this.uid = Ii.getUniqueId(), this.dummyCounter = 0, this._frameRequested = false, this.updateStepDuration = 45, this.time = Date.now();
- }
- return t2.prototype.reportTime = function(t3, e3) {
- this.dummyCounter, e3 && (this.time = Date.now());
- }, t2.prototype.update = function() {
- var t3 = this;
- if (!this._isPaused) {
- this._frameRequested = false;
- var e3 = Date.now();
- for (var i3 in Ii.dispatchImmediately("enterframe"), Ii.invalidDatas)
- if (Re(Ii.invalidDatas, i3)) {
- for (var n3 = Ii.invalidDatas[i3]; n3.length > 0; ) {
- var r3 = (s2 = n3[0]).dataProvider;
- if (s2.isDisposed())
- ee(n3, s2);
- else if (r3 && r3.dataInvalid)
- try {
- if (r3.validateData(), r3.dataValidationProgress < 1)
- break;
- } catch (t4) {
- ee(n3, r3), r3.raiseCriticalError(t4);
- }
- else
- try {
- if (s2.validateData(), s2.dataValidationProgress < 1)
- break;
- } catch (t4) {
- ee(n3, s2), s2.raiseCriticalError(t4);
- }
- }
- if (Date.now() - e3 > this.updateStepDuration)
- break;
- }
- for (; Ii.invalidRawDatas.length > 0; )
- if ((s2 = Ii.invalidRawDatas[0]).isDisposed())
- ee(Ii.invalidRawDatas, s2);
- else
- try {
- s2.validateRawData();
- } catch (t4) {
- ee(Ii.invalidRawDatas, s2), s2.raiseCriticalError(t4);
- }
- for (; Ii.invalidDataItems.length > 0; ) {
- if (r3 = (s2 = Ii.invalidDataItems[0]).dataProvider, s2.isDisposed() || s2.dataInvalid || r3 && r3.dataInvalid)
- ;
- else
- try {
- s2.validateDataItems();
- } catch (t4) {
- ee(Ii.invalidDataItems, s2), s2.raiseCriticalError(t4);
- }
- ee(Ii.invalidDataItems, s2);
- }
- for (; Ii.invalidDataRange.length > 0; ) {
- var s2;
- if (r3 = (s2 = Ii.invalidDataRange[0]).dataProvider, s2.isDisposed() || s2.dataInvalid || r3 && r3.dataInvalid)
- ;
- else
- try {
- s2.validateDataRange(), s2.skipRangeEvent || s2.dispatchImmediately("datarangechanged"), s2.skipRangeEvent = false;
- } catch (t4) {
- ee(Ii.invalidDataRange, s2), s2.raiseCriticalError(t4);
- }
- ee(Ii.invalidDataRange, s2);
- }
- var a2 = [];
- Ne(Ii.invalidLayouts, function(e4) {
- t3.validateLayouts(e4);
- }), Ne(Ii.invalidPositions, function(e4) {
- t3.validatePositions(e4);
- });
- var o3 = false;
- if (e3 = Date.now(), Ne(Ii.invalidSprites, function(i4, n4) {
- for (var r4 = 0; n4.length > 0; ) {
- if (t3.validateLayouts(i4), t3.validatePositions(i4), ++r4 == 5) {
- if (Date.now() - e3 > t3.updateStepDuration)
- break;
- r4 = 0;
- }
- var s3 = n4[n4.length - 1];
- if (s3 && !s3.isDisposed()) {
- if (s3._systemCheckIfValidate())
- if (t3.checkIfValidate2(s3))
- try {
- s3._systemUpdate(a2);
- } catch (t4) {
- s3.invalid = false, ee(n4, s3), s3.raiseCriticalError(t4);
- }
- else
- a2.push(s3);
- else
- a2.push(s3);
- s3.invalid = false;
- }
- ee(n4, s3);
- }
- Ii.invalidSprites[i4] = Ii.invalidSprites[i4].concat(a2);
- }), Ne(Ii.invalidSprites, function(t4, e4) {
- e4.length > 0 && (o3 = true);
- }), Ne(Ii.invalidDatas, function(t4, e4) {
- e4.length > 0 && (o3 = true);
- }), Ut(oe(this.animations), function(t4) {
- t4.update();
- }), Ne(Ii.invalidLayouts, function(e4) {
- t3.validateLayouts(e4);
- }), Ne(Ii.invalidPositions, function(e4) {
- t3.validatePositions(e4);
- }), Ve(), Ne(Ii.invalidLayouts, function(e4) {
- t3.validateLayouts(e4);
- }), Ne(Ii.invalidPositions, function(e4) {
- t3.validatePositions(e4);
- }), Ii.dispatchImmediately("exitframe"), (o3 || this.animations.length > 0 || [].length > 0) && this.requestFrame(), this.updateStepDuration < 200) {
- var l2 = true;
- Ne(Ii.invalidDatas, function(t4, e4) {
- e4.length > 0 && (l2 = false);
- }), Ne(Ii.invalidSprites, function(t4, e4) {
- e4.length > 0 && (l2 = false);
- }), l2 && (this.updateStepDuration = 200);
- }
- }
- }, t2.prototype.checkIfValidate2 = function(t3) {
- return !(t3.dataItem && t3.dataItem.component && t3.dataItem.component.dataInvalid && !t3.dataItem.component.isTemplate);
- }, t2.prototype.requestFrame = function() {
- var t3 = this;
- this._frameRequested || (Oe(function() {
- t3.update();
- }), this._frameRequested = true);
- }, t2.prototype.softInvalidate = function(t3) {
- var e3 = this;
- t3.children.each(function(t4) {
- t4 instanceof $a && e3.softInvalidate(t4), t4.measureFailed && (Di(t4, "Label") ? t4.hardInvalidate() : t4.invalidate(), t4.measureFailed = false);
- });
- }, t2.prototype.validatePositions = function(t3) {
- for (var e3 = Ii.invalidPositions[t3]; e3.length > 0; ) {
- var i3 = e3[e3.length - 1];
- if (i3.isDisposed())
- ee(e3, i3);
- else
- try {
- i3._systemValidatePositions();
- } catch (t4) {
- i3.positionInvalid = false, ee(e3, i3), i3.raiseCriticalError(t4);
- }
- }
- }, t2.prototype.validateLayouts = function(t3) {
- for (var e3 = Ii.invalidLayouts[t3]; e3.length > 0; ) {
- var i3 = e3[e3.length - 1];
- if (i3.isDisposed())
- ee(e3, i3);
- else
- try {
- i3.children.each(function(t4) {
- t4._systemValidateLayouts();
- }), i3.validateLayout();
- } catch (t4) {
- i3.layoutInvalid = false, ee(e3, i3), i3.raiseCriticalError(t4);
- }
- }
- }, t2.prototype.log = function(t3) {
- !function() {
- for (var t4 = [], e3 = 0; e3 < arguments.length; e3++)
- t4[e3] = arguments[e3];
- ls.verbose && console && console.log.apply(console, T(t4));
- }(t3);
- }, Object.defineProperty(t2.prototype, "isPaused", { get: function() {
- return this._isPaused;
- }, set: function(t3) {
- this._isPaused = t3, t3 || (this._frameRequested = false, this.requestFrame());
- }, enumerable: true, configurable: true }), t2.VERSION = "4.10.24", t2;
- }(), Qa = new Ja(), to = function() {
- function t2() {
- }
- return t2.prototype.parse = function(t3) {
- return [];
- }, Object.defineProperty(t2.prototype, "parsableNumbers", { get: function() {
- return this.options.numberFields && this.options.numberFields.length > 0;
- }, enumerable: true, configurable: true }), t2.prototype.maybeToNumber = function(t3, e3) {
- return this.options.numberFields.indexOf(t3) !== -1 ? tr(e3) : e3;
- }, Object.defineProperty(t2.prototype, "parsableDates", { get: function() {
- return this.options.dateFields && this.options.dateFields.length > 0;
- }, enumerable: true, configurable: true }), t2.prototype.maybeToDate = function(t3, e3) {
- return this.options.dateFields.indexOf(t3) !== -1 ? this.options.dateFormatter.parse(e3, this.dateFormat) : e3;
- }, t2.prototype.maybeToEmpty = function(t3) {
- return Z(t3) && t3 != "" || !Z(this.options.emptyAs) ? t3 : this.options.emptyAs;
- }, Object.defineProperty(t2.prototype, "dateFormatter", { get: function() {
- return this.options.dateFormatter || (this.options.dateFormatter = new Ma(), this.options.dateFormat && (this.options.dateFormat = this.options.dateFormat)), this.options.dateFormatter;
- }, enumerable: true, configurable: true }), Object.defineProperty(t2.prototype, "dateFormat", { get: function() {
- return this.options.dateFormat || this.dateFormatter.inputDateFormat;
- }, enumerable: true, configurable: true }), t2;
- }(), eo = [",", ";", " "], io = function(t2) {
- function e3() {
- var e4 = t2 !== null && t2.apply(this, arguments) || this;
- return e4.contentType = "text/csv", e4.options = { delimiter: "", reverse: false, skipRows: 0, skipEmpty: true, useColumnNames: false }, e4;
- }
- return C(e3, t2), e3.isCSV = function(t3) {
- return !!e3.getDelimiterFromData(t3);
- }, e3.getDelimiterFromData = function(t3) {
- var e4, i3 = t3.split("\n"), n3 = i3.length;
- return Ut(eo, function(t4) {
- for (var r3 = 0, s2 = 0, a2 = 0; a2 < n3; ++a2) {
- if (!((r3 = i3[a2].split(t4).length) > 1)) {
- s2 = 0;
- break;
- }
- if (s2 === 0)
- s2 = r3;
- else if (r3 != s2) {
- s2 = 0;
- break;
- }
- }
- s2 && (e4 = t4);
- }), e4;
- }, e3.prototype.parse = function(t3) {
- this.options.delimiter || (this.options.delimiter = e3.getDelimiterFromData(t3));
- var i3, n3, r3, s2 = this.CSVToArray(t3, this.options.delimiter), a2 = Z(this.options.emptyAs), o3 = this.parsableNumbers, l2 = this.parsableDates, h2 = [], p2 = [];
- for (n3 = 0; n3 < this.options.skipRows; n3++)
- s2.shift();
- if (this.options.useColumnNames) {
- p2 = s2.shift();
- for (var u2 = 0; u2 < p2.length; u2++)
- (i3 = Z(p2[u2]) ? p2[u2].replace(/^\s+|\s+$/gm, "") : "") === "" && (i3 = "col" + u2), p2[u2] = i3;
- }
- for (; r3 = this.options.reverse ? s2.pop() : s2.shift(); )
- if (!this.options.skipEmpty || r3.length !== 1 || r3[0] !== "") {
- var d2 = {};
- for (n3 = 0; n3 < r3.length; n3++)
- d2[i3 = p2[n3] === void 0 ? "col" + n3 : p2[n3]] = r3[n3] === "" ? this.options.emptyAs : r3[n3], a2 && (d2[i3] = this.maybeToEmpty(d2[i3])), o3 && (d2[i3] = this.maybeToNumber(i3, d2[i3])), l2 && (d2[i3] = this.maybeToDate(i3, d2[i3]));
- h2.push(d2);
- }
- return h2;
- }, e3.prototype.CSVToArray = function(t3, e4) {
- e4 = e4 || ",";
- for (var i3 = new RegExp("(\\" + e4 + '|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\' + e4 + "\\r\\n]*))", "gi"), n3 = [[]], r3 = null; r3 = i3.exec(t3); ) {
- var s2, a2 = r3[1];
- a2.length && a2 !== e4 && n3.push([]), s2 = r3[2] ? r3[2].replace(new RegExp('""', "g"), '"') : r3[3], n3[n3.length - 1].push(s2);
- }
- return n3;
- }, e3;
- }(to), no = function(t2) {
- function e3() {
- var e4 = t2 !== null && t2.apply(this, arguments) || this;
- return e4.contentType = "application/json", e4.options = {}, e4;
- }
- return C(e3, t2), e3.isJSON = function(t3) {
- try {
- return JSON.parse(t3), true;
- } catch (t4) {
- return false;
- }
- }, e3.prototype.parse = function(t3) {
- var e4, i3 = this;
- try {
- Z(JSON) && (e4 = JSON.parse(t3));
- } catch (t4) {
- return;
- }
- var n3 = Z(this.options.emptyAs), r3 = this.parsableNumbers, s2 = this.parsableDates;
- if (Array.isArray(e4) && (r3 || s2 || n3))
- for (var a2 = function(t4, a3) {
- var o4 = e4[t4];
- Ne(o4, function(t5, e5) {
- n3 && (o4[t5] = i3.maybeToEmpty(o4[t5])), r3 && (o4[t5] = i3.maybeToNumber(t5, o4[t5])), s2 && (o4[t5] = i3.maybeToDate(t5, o4[t5]));
- });
- }, o3 = 0, l2 = e4.length; o3 < l2; o3++)
- a2(o3);
- return e4;
- }, e3;
- }(to), ro = function() {
- function t2() {
- this.adapter = new Yi(this);
- }
- return t2.prototype.load = function(t3) {
- var e3 = zt(Array.isArray(t3) ? t3 : [t3], function(t4) {
- return t4.dispatchImmediately("started"), t4.dispatchImmediately("loadstarted"), Ha(t4.url, t4, t4.requestOptions);
- });
- Promise.all(e3).then(function(t4) {
- Ut(t4, function(t5) {
- var e4 = t5.target;
- e4.dispatchImmediately("loadended"), t5.error ? e4.events.isEnabled("error") && e4.events.dispatchImmediately("error", { type: "error", code: t5.xhr.status, message: e4.language.translate("Unable to load file: %1", null, e4.url), target: e4 }) : e4.processData(t5.response, t5.type), e4.dispatchImmediately("ended");
- });
- }).catch(function(t4) {
- t4.target && (t4.target.dispatchImmediately("loadended"), t4.target.events.isEnabled("error") && t4.target.events.dispatchImmediately("error", { type: "error", code: t4.xhr.status, message: t4.target.language.translate("Unable to load file: %1", null, t4.target.url), target: t4.target }), t4.target.dispatchImmediately("ended"));
- });
- }, t2.prototype.getParserByType = function(t3) {
- return this.adapter.apply("getParserByType", { parser: null, type: t3 }).parser || (t3 == "csv" || t3 == "text/csv" || t3 == "application/vnd.ms-excel" ? new io() : t3 == "json" || t3 == "application/json" ? new no() : void 0);
- }, t2.prototype.getParserByData = function(t3, e3) {
- var i3 = this.adapter.apply("getParserByData", { parser: null, data: t3, type: e3 }).parser;
- if (!i3) {
- if (i3 = this.getParserByType(e3))
- return i3;
- if (no.isJSON(t3))
- return this.getParserByType("json");
- if (io.isCSV(t3))
- return this.getParserByType("csv");
- }
- return i3;
- }, t2;
- }(), so = new ro(), ao = function(t2) {
- function e3(e4, i3) {
- var n3 = t2.call(this) || this;
- return n3.adapter = new Yi(n3), n3._requestOptions = {}, n3._incremental = false, n3._incrementalParams = {}, n3._keepCount = false, n3._updateCurrentData = false, n3.showPreloader = true, n3.className = "DataSource", e4 && (n3.url = e4), i3 && (n3.parser = typeof i3 == "string" ? so.getParserByType(i3) : i3), n3;
- }
- return C(e3, t2), e3.prototype.processData = function(t3, e4) {
- if (this.dispatchImmediately("parsestarted"), this.parser || (this.parser = so.getParserByData(t3, e4), this.parser)) {
- if (this.parser.options = this.adapter.apply("parserOptions", this.parser.options), this.parser.options.dateFields = this.adapter.apply("dateFields", this.parser.options.dateFields || []), this.parser.options.numberFields = this.adapter.apply("numberFields", this.parser.options.numberFields || []), this.parser.options.dateFields && !this.parser.options.dateFormatter && (this.parser.options.dateFormatter = this.dateFormatter), this.data = this.adapter.apply("parsedData", this.parser.parse(this.adapter.apply("unparsedData", t3))), !Z(this.data) && this.events.isEnabled("parseerror")) {
- var i3 = { type: "parseerror", message: this.language.translate("Error parsing file: %1", null, this.url), target: this };
- this.events.dispatchImmediately("parseerror", i3);
- }
- this.dispatchImmediately("parseended"), Z(this.data) && this.dispatchImmediately("done", { data: this.data }), this.lastLoad = new Date();
- } else {
- if (this.events.isEnabled("parseerror")) {
- var n3 = { type: "parseerror", message: this.language.translate("No parser available for file: %1", null, this.url), target: this };
- this.events.dispatchImmediately("parseerror", n3);
- }
- this.dispatchImmediately("parseended");
- }
- }, Object.defineProperty(e3.prototype, "url", { get: function() {
- var t3 = this.disableCache ? this.timestampUrl(this._url) : this._url;
- return this.incremental && this.component.data.length && (t3 = this.addUrlParams(t3, this.incrementalParams)), this.adapter.apply("url", t3);
- }, set: function(t3) {
- this._url = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "requestOptions", { get: function() {
- return this.adapter.apply("requestOptions", this._requestOptions);
- }, set: function(t3) {
- this._requestOptions = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "parser", { get: function() {
- return this._parser || (this._parser = new no()), this.adapter.apply("parser", this._parser);
- }, set: function(t3) {
- this._parser = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "reloadFrequency", { get: function() {
- return this.adapter.apply("reloadTimeout", this._reloadFrequency);
- }, set: function(t3) {
- var e4 = this;
- this._reloadFrequency != t3 && (this._reloadFrequency = t3, t3 ? Z(this._reloadDisposer) || (this._reloadDisposer = this.events.on("ended", function(t4) {
- e4._reloadTimeout = setTimeout(function() {
- e4.load();
- }, e4.reloadFrequency);
- })) : Z(this._reloadDisposer) && (this._reloadDisposer.dispose(), this._reloadDisposer = void 0));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "incremental", { get: function() {
- return this.adapter.apply("incremental", this._incremental);
- }, set: function(t3) {
- this._incremental = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "incrementalParams", { get: function() {
- return this.adapter.apply("incrementalParams", this._incrementalParams);
- }, set: function(t3) {
- this._incrementalParams = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "keepCount", { get: function() {
- return this.adapter.apply("keepCount", this._keepCount);
- }, set: function(t3) {
- this._keepCount = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "updateCurrentData", { get: function() {
- return this.adapter.apply("updateCurrentData", this._updateCurrentData);
- }, set: function(t3) {
- this._updateCurrentData = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "language", { get: function() {
- return this._language ? this._language : this.component ? (this._language = this.component.language, this._language) : (this.language = new Ta(), this.language);
- }, set: function(t3) {
- this._language = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dateFormatter", { get: function() {
- return this._dateFormatter ? this._dateFormatter : this.component ? (this._dateFormatter = this.component.dateFormatter, this._dateFormatter) : (this.dateFormatter = new Ma(), this.dateFormatter);
- }, set: function(t3) {
- this._dateFormatter = t3;
- }, enumerable: true, configurable: true }), e3.prototype.timestampUrl = function(t3) {
- var e4 = {};
- return e4[new Date().getTime().toString()] = "", this.addUrlParams(t3, e4);
- }, e3.prototype.dispose = function() {
- t2.prototype.dispose.call(this), this._reloadTimeout && clearTimeout(this._reloadTimeout), Z(this._reloadDisposer) && (this._reloadDisposer.dispose(), this._reloadDisposer = void 0);
- }, e3.prototype.load = function() {
- this.url && (this._reloadTimeout && clearTimeout(this._reloadTimeout), so.load(this));
- }, e3.prototype.addUrlParams = function(t3, e4) {
- var i3 = t3.match(/\?/) ? "&" : "?", n3 = [];
- return Ne(e4, function(t4, e5) {
- e5 != "" ? n3.push(t4 + "=" + encodeURIComponent(e5)) : n3.push(t4);
- }), n3.length ? t3 + i3 + n3.join("&") : t3;
- }, e3.prototype.processConfig = function(e4) {
- Ii.registeredClasses.json = no, Ii.registeredClasses.JSONParser = no, Ii.registeredClasses.csv = io, Ii.registeredClasses.CSVParser = io, t2.prototype.processConfig.call(this, e4);
- }, e3;
- }(mn), oo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._rules = new Fi(), e4._appliedRules = {}, e4._appliedTargets = [], e4._useDefault = true, e4.adapter = new Yi(e4), e4._enabled = false, e4._responsiveDisposers = [], e4._noStates = [], e4.className = "Responsive", e4.rules.events.on("inserted", function() {
- e4.checkRules();
- }, true), e4.rules.events.on("removed", function() {
- e4.checkRules();
- }, true), e4._disposers.push(e4.rules.events), e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "component", { get: function() {
- return this._component;
- }, set: function(t3) {
- var e4 = this;
- t3 != this._component && (this.disposeResponsiveHandlers(), this._component = t3, this._responsiveDisposers.push(q(this.component).events.on("sizechanged", function() {
- e4.checkRules();
- }, this)), this._responsiveDisposers.push(q(this.component).events.on("datavalidated", function() {
- e4._component.isReady() && e4.checkRules(true);
- }, this)), this.enabled = true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "enabled", { get: function() {
- return this.adapter.apply("enabled", this._enabled);
- }, set: function(t3) {
- this._enabled != t3 && (this._enabled = t3, this.applyRules());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "useDefault", { get: function() {
- return this.adapter.apply("useDefault", this._useDefault);
- }, set: function(t3) {
- this._useDefault != t3 && (this._useDefault = t3, this.applyRules());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "rules", { get: function() {
- return this.adapter.apply("rules", this._rules);
- }, set: function(t3) {
- this._rules = t3, this._enabled = true, this.applyRules();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "defaultRules", { get: function() {
- return this.adapter.apply("defaultRules", lo);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "allRules", { get: function() {
- var t3 = new Fi();
- return this.useDefault && t3.copyFrom(this.defaultRules), t3.copyFrom(this.rules), this.adapter.apply("allRules", t3);
- }, enumerable: true, configurable: true }), e3.prototype.isApplied = function(t3) {
- var e4 = this._appliedRules[t3];
- return !!Z(e4) && e4;
- }, e3.prototype.checkRules = function(t3) {
- var e4 = this;
- t3 === void 0 && (t3 = false);
- var i3 = this.allRules;
- if (i3 && i3.length != 0) {
- var n3 = false, r3 = q(this.component);
- if (ti(i3.iterator(), function(t4) {
- t4.id || (t4.id = Ii.getUniqueId());
- var i4 = t4.relevant(r3);
- (i4 && !e4.isApplied(t4.id) || !i4 && e4.isApplied(t4.id)) && (n3 = true), e4._appliedRules[t4.id] = i4;
- }), t3 && (n3 = true), n3) {
- if (!this.component.isReady())
- return r3.hidden = true, void r3.events.once("ready", function(t4) {
- t4.target.show(0), e4.applyRules();
- });
- this.dispatchImmediately("ruleschanged"), this.applyRules();
- }
- }
- }, e3.prototype.applyRules = function(t3) {
- var e4 = this, i3 = Z(t3) ? t3 : q(this.component), n3 = false;
- if (this.enabled) {
- var r3 = false;
- ti(this.allRules.iterator(), function(t4) {
- var s2 = e4.getState(t4, i3);
- s2 && (n3 || (Xt(e4._appliedTargets, i3.uid) !== -1 && i3.setState(e4.getDefaultState(i3), 0), n3 = true), e4.isApplied(q(t4.id)) && (s2.transitionDuration = 0, e4.setTargetState(i3, s2), e4.dispatchImmediately("ruleapplied", { rule: t4 }), r3 = true));
- }), r3 ? re(this._appliedTargets, i3.uid) : ee(this._appliedTargets, i3.uid);
- }
- i3.children && ti(i3.children.iterator(), function(t4) {
- e4.applyRules(t4);
- });
- }, e3.prototype.getState = function(t3, e4) {
- var i3 = "responsive-" + t3.id, n3 = e4.uid + "_" + i3;
- if (Xt(this._noStates, n3) === -1) {
- if (e4.states.hasKey(i3))
- return e4.states.getKey(i3);
- var r3 = t3.state(e4, i3);
- return r3 || this._noStates.push(n3), r3;
- }
- }, e3.prototype.getDefaultState = function(t3) {
- return t3.states.hasKey("responsive-default") ? t3.states.getKey("responsive-default") : t3.states.create("responsive-default");
- }, e3.prototype.setTargetState = function(t3, e4) {
- var i3 = this, n3 = this.getDefaultState(t3);
- Ne(e4.properties, function(e5, r3) {
- Z(n3.properties[e5]) || (n3.properties[e5] = i3.getValue(t3, e5));
- }), t3.setState(e4);
- }, e3.prototype.getValue = function(t3, e4) {
- var i3 = t3.getPropertyValue(e4);
- return !Z(i3) && Z(t3[e4]) && (i3 = t3[e4]), i3;
- }, e3.prototype.dispose = function() {
- this.disposeResponsiveHandlers(), t2.prototype.dispose.call(this);
- }, e3.prototype.disposeResponsiveHandlers = function() {
- for (var t3 = this._responsiveDisposers.pop(); t3; )
- t3.dispose(), t3 = this._responsiveDisposers.pop();
- }, e3;
- }(mn), lo = new Fi();
- lo.events.on("inserted", function(t2) {
- t2.newValue.id = Ii.getUniqueId();
- });
- var ho = function() {
- function t2() {
- }
- return t2.widthXXS = function(e3) {
- return e3.pixelWidth <= t2.XXS;
- }, t2.widthXS = function(e3) {
- return e3.pixelWidth <= t2.XS;
- }, t2.widthS = function(e3) {
- return e3.pixelWidth <= t2.S;
- }, t2.widthM = function(e3) {
- return e3.pixelWidth <= t2.M;
- }, t2.widthL = function(e3) {
- return e3.pixelWidth <= t2.L;
- }, t2.widthXL = function(e3) {
- return e3.pixelWidth <= t2.XL;
- }, t2.widthXXL = function(e3) {
- return e3.pixelWidth <= t2.XXL;
- }, t2.heightXXS = function(e3) {
- return e3.pixelHeight <= t2.XXS;
- }, t2.heightXS = function(e3) {
- return e3.pixelHeight <= t2.XS;
- }, t2.heightS = function(e3) {
- return e3.pixelHeight <= t2.S;
- }, t2.heightM = function(e3) {
- return e3.pixelHeight <= t2.M;
- }, t2.heightL = function(e3) {
- return e3.pixelHeight <= t2.L;
- }, t2.heightXL = function(e3) {
- return e3.pixelHeight <= t2.XL;
- }, t2.heightXXL = function(e3) {
- return e3.pixelHeight <= t2.XXL;
- }, t2.isXXS = function(e3) {
- return e3.pixelWidth <= t2.XXS && e3.pixelHeight <= t2.XXS;
- }, t2.isXS = function(e3) {
- return e3.pixelWidth <= t2.XS && e3.pixelHeight <= t2.XS;
- }, t2.isS = function(e3) {
- return e3.pixelWidth <= t2.S && e3.pixelHeight <= t2.S;
- }, t2.isM = function(e3) {
- return e3.pixelWidth <= t2.M && e3.pixelHeight <= t2.M;
- }, t2.isL = function(e3) {
- return e3.pixelWidth <= t2.L && e3.pixelHeight <= t2.L;
- }, t2.isXL = function(e3) {
- return e3.pixelWidth <= t2.XL && e3.pixelHeight <= t2.XL;
- }, t2.isXXL = function(e3) {
- return e3.pixelWidth <= t2.XXL && e3.pixelHeight <= t2.XXL;
- }, t2.maybeXXS = function(e3) {
- return e3.pixelWidth <= t2.XXS || e3.pixelHeight <= t2.XXS;
- }, t2.maybeXS = function(e3) {
- return e3.pixelWidth <= t2.XS || e3.pixelHeight <= t2.XS;
- }, t2.maybeS = function(e3) {
- return e3.pixelWidth <= t2.S || e3.pixelHeight <= t2.S;
- }, t2.maybeM = function(e3) {
- return e3.pixelWidth <= t2.M || e3.pixelHeight <= t2.M;
- }, t2.maybeL = function(e3) {
- return e3.pixelWidth <= t2.L || e3.pixelHeight <= t2.L;
- }, t2.maybeXL = function(e3) {
- return e3.pixelWidth <= t2.XL || e3.pixelHeight <= t2.XL;
- }, t2.maybeXXL = function(e3) {
- return e3.pixelWidth <= t2.XXL || e3.pixelHeight <= t2.XXL;
- }, t2.XXS = 100, t2.XS = 200, t2.S = 300, t2.M = 400, t2.L = 600, t2.XL = 800, t2.XXL = 1e3, t2;
- }(), po = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._disabled = false, e4.hasProperties = false, e4.values = {}, e4.categories = {}, e4.dates = {}, e4.locations = {}, e4.workingLocations = {}, e4.properties = {}, e4.sprites = [], e4.isTemplate = false, e4._index = null, e4._visible = true, e4._hidden = false, e4._ignoreMinMax = false, e4.hasChildren = {}, e4.isHiding = false, e4._valueAnimations = {}, e4._locationAnimations = {}, e4.className = "DataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "adapter", { get: function() {
- return this._adapterO || (this._adapterO = new Yi(this)), this._adapterO;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "index", { get: function() {
- return this.component && this._index != null ? this._index : -1;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "animations", { get: function() {
- return this._animations || (this._animations = [], this._disposers.push(new gs(this._animations))), this._animations;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "visible", { get: function() {
- return !this._hidden && this._visible;
- }, set: function(t3) {
- t3 && (this.hidden = false), this._visible != t3 && this.setVisibility(t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hidden", { get: function() {
- return this._hidden;
- }, set: function(t3) {
- this._hidden != t3 && (this._hidden = t3, t3 ? this.setVisibility(false) : this.setVisibility(true, true));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "__disabled", { get: function() {
- return this._disabled;
- }, set: function(t3) {
- this._disabled = t3, Ut(this.sprites, function(e4) {
- e4.__disabled = t3;
- });
- }, enumerable: true, configurable: true }), e3.prototype.setVisibility = function(t3, e4) {
- if (Ut(this.sprites, function(e5) {
- t3 ? e5.visible = e5.defaultState.properties.visible : e5.hiddenState ? e5.visible = e5.hiddenState.properties.visible : e5.visible = false;
- }), this._visible = t3, this._eventDispatcher && !this.__disabled && this.events.isEnabled("visibilitychanged")) {
- var i3 = { type: "visibilitychanged", target: this, visible: t3 };
- this.events.dispatchImmediately("visibilitychanged", i3);
- }
- }, e3.prototype.show = function(t3, e4, i3) {
- var n3, r3 = this;
- if (!this.hidden)
- return this.setVisibility(true, true), this.isHiding = false, this._hideDisposer && this.removeDispose(this._hideDisposer), i3 && Ut(i3, function(i4) {
- n3 = r3.setWorkingValue(i4, r3.values[i4].value, t3, e4);
- }), Ut(this.sprites, function(i4) {
- var n4 = i4.show(t3);
- n4 == null || n4.isFinished() || (r3._disposers.push(n4), e4 != null && e4 > 0 && n4.delay(e4));
- }), n3;
- }, e3.prototype.dispose = function() {
- t2.prototype.dispose.call(this), Ut(this.sprites, function(t3) {
- t3.dispose();
- }), this.sprites = [];
- }, e3.prototype.hide = function(t3, e4, i3, n3) {
- var r3 = this;
- if (this.isHiding = true, Ut(this.sprites, function(i4) {
- var n4 = i4.hide(t3);
- n4 == null || n4.isFinished() || (r3._disposers.push(n4), e4 != null && e4 > 0 && n4.delay(e4));
- }), tt(i3) && n3) {
- var s2;
- if (Ut(n3, function(n4) {
- var a2 = r3.setWorkingValue(n4, i3, t3, e4);
- a2 && (s2 = a2);
- }), s2 && !s2.isFinished())
- return this._hideDisposer = s2.events.on("animationended", function() {
- r3.setVisibility(false, true), r3.isHiding = false;
- }), this._disposers.push(this._hideDisposer), s2;
- this.isHiding = false, this.setVisibility(false, true);
- } else
- this.isHiding = false, this.setVisibility(false);
- }, e3.prototype.getDuration = function(t3) {
- if (!tt(t3)) {
- var e4 = this.component;
- e4 && (t3 = e4.interpolationDuration);
- }
- if (t3 != null)
- return this._adapterO ? this._adapterO.apply("duration", t3) : t3;
- }, e3.prototype.getValue = function(t3, e4) {
- if (t3 && this.component) {
- e4 || (e4 = this.component.dataFields[t3 + "Show"]) || (e4 = "value");
- var i3 = this.values[t3][e4];
- return this._adapterO && this._adapterO.isEnabled("value") ? this._adapterO.apply("value", { value: i3, field: t3 }).value : i3;
- }
- }, e3.prototype.getWorkingValue = function(t3) {
- if (t3 && this.component) {
- var e4 = this.component.dataFields[t3 + "Show"];
- return e4 || (e4 = "workingValue"), this._adapterO ? this._adapterO.apply("workingValue", { workingValue: this.values[t3][e4], field: t3 }).workingValue : this.values[t3][e4];
- }
- }, e3.prototype.getActualWorkingValue = function(t3) {
- return this.values[t3].workingValue;
- }, e3.prototype.setValue = function(t3, e4, i3, n3) {
- var r3 = this.values[t3].value, s2 = this.getDuration(i3);
- if (r3 !== (e4 = U(e4))) {
- if (this.values[t3].value = e4, this._eventDispatcher && !this.__disabled && this.events.isEnabled("valuechanged")) {
- var a2 = { type: "valuechanged", target: this, property: t3 };
- this.events.dispatchImmediately("valuechanged", a2);
- }
- this.component && this.component.handleDataItemValueChange(this, t3);
- }
- this.setWorkingValue(t3, e4, s2, n3);
- }, e3.prototype.setCalculatedValue = function(t3, e4, i3) {
- if (this.values[t3][i3] !== e4 && tt(e4)) {
- if (this.values[t3][i3] = e4, this._eventDispatcher && !this.__disabled && this.events.isEnabled("calculatedvaluechanged")) {
- var n3 = { type: "calculatedvaluechanged", target: this, property: t3 };
- this.events.dispatchImmediately("calculatedvaluechanged", n3);
- }
- this.component && this.component.handleDataItemCalculatedValueChange(this, t3);
- }
- }, e3.prototype.setWorkingValue = function(t3, e4, i3, n3) {
- if (tt(this.values[t3].value)) {
- var r3 = this.getDuration(i3), s2 = this.values[t3].workingValue;
- if (r3 != null && r3 > 0 && tt(s2) && this.component) {
- if (s2 != e4) {
- var a2 = this.animate({ childObject: this.values[t3], property: "workingValue", from: s2, to: e4, dummyData: t3 }, r3, this.component.interpolationEasing);
- return n3 != null && a2.delay(n3), a2.events.on("animationstarted", this.handleInterpolationProgress, this), a2.events.on("animationprogress", this.handleInterpolationProgress, this), a2.events.on("animationended", this.handleInterpolationProgress, this), this._valueAnimations[t3] = a2, a2;
- }
- (o3 = this._valueAnimations[t3]) && o3.stop(), this.values[t3].workingValue = e4;
- } else {
- var o3;
- if ((o3 = this._valueAnimations[t3]) && o3.stop(), this.values[t3].workingValue = e4, this._eventDispatcher && !this.__disabled && this.events.isEnabled("workingvaluechanged")) {
- var l2 = { type: "workingvaluechanged", target: this, property: t3 };
- this.events.dispatchImmediately("workingvaluechanged", l2);
- }
- this.component && this.component.handleDataItemWorkingValueChange(this, t3);
- }
- }
- }, e3.prototype.setLocation = function(t3, e4, i3, n3) {
- if (this.locations[t3] !== e4) {
- if (this.locations[t3] = e4, this._eventDispatcher && !this.__disabled && this.events.isEnabled("locationchanged")) {
- var r3 = { type: "locationchanged", target: this, property: t3 };
- this.events.dispatchImmediately("locationchanged", r3);
- }
- this.component && this.component.handleDataItemValueChange(this, t3), this.setWorkingLocation(t3, e4, i3, n3);
- }
- }, e3.prototype.setWorkingLocation = function(t3, e4, i3, n3) {
- var r3 = this.getDuration(i3), s2 = this.workingLocations[t3];
- if (r3 != null && r3 > 0 && tt(s2) && this.component) {
- if (s2 != e4) {
- var a2 = this.animate({ childObject: this.workingLocations, property: t3, from: s2, to: e4, dummyData: t3 }, r3, this.component.interpolationEasing);
- return n3 != null && a2.delay(n3), a2.events.on("animationstarted", this.handleInterpolationProgress, this), a2.events.on("animationprogress", this.handleInterpolationProgress, this), a2.events.on("animationended", this.handleInterpolationProgress, this), this._locationAnimations[t3] = a2, a2;
- }
- (o3 = this._locationAnimations[t3]) && o3.stop(), this.workingLocations[t3] = e4;
- } else {
- var o3;
- if ((o3 = this._locationAnimations[t3]) && o3.stop(), this.workingLocations[t3] = e4, this._eventDispatcher && !this.__disabled && this.events.isEnabled("workinglocationchanged")) {
- var l2 = { type: "workinglocationchanged", target: this, property: t3 };
- this.events.dispatchImmediately("workinglocationchanged", l2);
- }
- this.component && this.component.handleDataItemWorkingLocationChange(this, t3);
- }
- }, e3.prototype.setDate = function(t3, e4, i3) {
- !J(e4) && this.component && (e4 = this.component.dateFormatter.parse(e4)), this.dates[t3] !== e4 && (this.dates[t3] = e4, this.setValue(t3, e4.getTime(), i3));
- }, e3.prototype.getDate = function(t3) {
- return this._adapterO ? this._adapterO.apply("date", { date: this.dates[t3], field: t3 }).date : this.dates[t3];
- }, e3.prototype.setProperty = function(t3, e4) {
- if (this.properties[t3] !== e4) {
- if (this.hasProperties = true, this.properties[t3] = e4, this._eventDispatcher && !this.__disabled && this.events.isEnabled("propertychanged")) {
- var i3 = { type: "propertychanged", target: this, property: t3, value: e4 };
- this.events.dispatchImmediately("propertychanged", i3);
- }
- this.component && this.component.handleDataItemPropertyChange(this, t3);
- }
- }, e3.prototype.setCategory = function(t3, e4) {
- Q(e4) || (e4 = X(e4)), this.categories[t3] !== e4 && (this.categories[t3] = e4);
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), e4.dataContext && (this.dataContext = Tn(e4.dataContext, {})), Sn(e4.locations, this.locations), e4._adapterO && this.adapter.copyFrom(e4._adapterO), this.component = e4.component;
- }, Object.defineProperty(e3.prototype, "opacity", { set: function(t3) {
- Ut(this.sprites, function(e4) {
- e4.opacity = t3;
- });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "ignoreMinMax", { get: function() {
- return this._ignoreMinMax;
- }, set: function(t3) {
- if (this._ignoreMinMax = t3, this._eventDispatcher && !this.__disabled && this.events.isEnabled("propertychanged")) {
- var e4 = { type: "propertychanged", target: this, property: "ignoreMinMax", value: t3 };
- this.events.dispatchImmediately("propertychanged", e4);
- }
- this.component && this.component.handleDataItemPropertyChange(this, "ignoreMinMax");
- }, enumerable: true, configurable: true }), e3.prototype.animate = function(t3, e4, i3) {
- return new ys(this, t3, e4, i3).start();
- }, e3.prototype.handleInterpolationProgress = function(t3) {
- var e4 = t3.target.animationOptions[0];
- if (e4) {
- if (this._eventDispatcher && !this.__disabled && this.events.isEnabled("workingvaluechanged")) {
- var i3 = { type: "workingvaluechanged", target: this, property: e4.dummyData };
- this.events.dispatchImmediately("workingvaluechanged", i3);
- }
- this.component && this.component.handleDataItemWorkingValueChange(this, e4.dummyData);
- }
- }, e3.prototype.hasValue = function(t3) {
- for (var e4 = 0, i3 = t3.length; e4 < i3; e4++) {
- var n3 = this.values[t3[e4]];
- if (!n3 || !Z(n3.value))
- return false;
- }
- return true;
- }, Object.defineProperty(e3.prototype, "depth", { get: function() {
- return this.parent ? this.parent.depth + 1 : 0;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dataContext", { get: function() {
- return this._dataContext;
- }, set: function(t3) {
- this._dataContext = t3;
- }, enumerable: true, configurable: true }), e3.prototype.addSprite = function(t3) {
- t3.dataItem && t3.dataItem != this && ee(t3.dataItem.sprites, t3), this.visible || t3.hide(0), this.isHiding && t3.hide(), this.sprites.push(t3), t3.dataItem = this;
- }, e3;
- }(mn), uo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.dataFields = {}, e4._dataSources = {}, e4._parseDataFrom = 0, e4._dataDisposers = [], e4._currentDataSetId = "", e4._start = 0, e4._end = 1, e4.skipRangeEvent = false, e4.rangeChangeDuration = 0, e4.rangeChangeEasing = zr, e4.parsingStepDuration = 50, e4.dataInvalid = false, e4.rawDataInvalid = false, e4.dataRangeInvalid = false, e4.dataItemsInvalid = false, e4.interpolationDuration = 0, e4.interpolationEasing = zr, e4.sequencedInterpolation = true, e4.sequencedInterpolationDelay = 0, e4.dataValidationProgress = 0, e4._addAllDataItems = true, e4._usesData = true, e4.className = "Component", e4.minZoomCount = 1, e4.maxZoomCount = 0, e4._dataItems = new Ei(e4.createDataItem()), e4._dataItems.events.on("inserted", e4.handleDataItemAdded, e4, false), e4._dataItems.events.on("removed", e4.handleDataItemRemoved, e4, false), e4._disposers.push(new Ai(e4._dataItems)), e4._disposers.push(e4._dataItems.template), e4.invalidateData(), e4.dataUsers.events.on("inserted", e4.handleDataUserAdded, e4, false), e4._disposers.push(new me(e4._dataDisposers)), e4._start = 0, e4._end = 1, e4.maxZoomDeclination = 1, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.createDataItem = function() {
- return new po();
- }, e3.prototype.handleDataUserAdded = function(t3) {
- t3.newValue.dataProvider = this;
- }, e3.prototype.handleDataItemValueChange = function(t3, e4) {
- this.dataItemsInvalid || this.invalidateDataItems();
- }, e3.prototype.handleDataItemWorkingValueChange = function(t3, e4) {
- }, e3.prototype.handleDataItemWorkingLocationChange = function(t3, e4) {
- }, e3.prototype.handleDataItemCalculatedValueChange = function(t3, e4) {
- }, e3.prototype.handleDataItemPropertyChange = function(t3, e4) {
- }, e3.prototype.processDataItem = function(t3, e4) {
- var i3 = this;
- if (t3) {
- e4 || (e4 = {}), t3.dataContext = e4;
- var n3 = false;
- Ne(this.dataFields, function(r3, s2) {
- var a2 = r3, o3 = e4[s2];
- if (i3._adapterO && i3._adapterO.isEnabled("dataContextValue") && (o3 = i3._adapterO.apply("dataContextValue", { field: a2, value: o3, dataItem: t3 }).value), Z(o3))
- if (n3 = true, t3.hasChildren[a2]) {
- var l2 = i3.createDataItem();
- l2.copyFrom(i3.mainDataSet.template);
- var h2 = new Ei(l2);
- h2.events.on("inserted", i3.handleDataItemAdded, i3, false), h2.events.on("removed", i3.handleDataItemRemoved, i3, false), i3._dataDisposers.push(new Ai(h2));
- for (var p2 = o3.length, u2 = 0; u2 < p2; u2++) {
- var d2 = o3[u2], c2 = h2.create();
- c2.parent = t3, i3.processDataItem(c2, d2);
- }
- t3[a2] = h2;
- } else
- t3[a2] = o3;
- }), Ne(this.propertyFields, function(i4, r3) {
- var s2 = i4, a2 = e4[r3];
- Z(a2) && (n3 = true, t3.setProperty(s2, a2));
- }), this._addAllDataItems || n3 || this.mainDataSet.remove(t3);
- }
- }, e3.prototype.updateDataItem = function(t3) {
- var e4 = this;
- if (t3) {
- var i3 = t3.dataContext;
- Ne(this.dataFields, function(n3, r3) {
- var s2 = n3, a2 = i3[r3];
- e4._adapterO && (a2 = e4._adapterO.apply("dataContextValue", { field: s2, value: a2, dataItem: t3 }).value), Z(a2) && (t3.hasChildren[s2] ? t3[s2].each(function(t4) {
- e4.updateDataItem(t4);
- }) : t3[s2] = a2);
- }), Ne(this.propertyFields, function(e5, n3) {
- var r3 = e5, s2 = i3[n3];
- Z(s2) && t3.setProperty(r3, s2);
- });
- }
- }, e3.prototype.validateDataElements = function() {
- for (var t3 = this.endIndex, e4 = this.startIndex; e4 < t3; e4++) {
- var i3 = this.dataItems.getIndex(e4);
- i3 && this.validateDataElement(i3);
- }
- }, e3.prototype.validate = function() {
- this.validateDataElements(), t2.prototype.validate.call(this);
- }, e3.prototype.validateDataElement = function(t3) {
- }, e3.prototype.addData = function(t3, e4, i3) {
- var n3 = this;
- if (!this.dataInvalid && this.inited && (this._parseDataFrom = this.data.length), i3 || (t3 instanceof Array ? Ut(t3, function(t4) {
- n3.data.push(t4);
- }) : this.data.push(t3)), this.inited)
- this.removeData(e4, i3);
- else if (tt(e4))
- for (; e4 > 0; )
- this.data.shift(), e4--;
- this.invalidateData();
- }, e3.prototype.removeData = function(t3, e4) {
- if (tt(t3) && t3 > 0) {
- for (; t3 > 0; ) {
- var i3 = this.mainDataSet.getIndex(0);
- i3 && this.mainDataSet.remove(i3), this.dataUsers.each(function(t4) {
- if (!t4.data || t4.data.length == 0) {
- var e5 = t4.mainDataSet.getIndex(0);
- e5 && t4.mainDataSet.remove(e5);
- }
- }), e4 || this.data.shift(), this._parseDataFrom > 0 && this._parseDataFrom--, t3--;
- }
- this.invalidateDataItems();
- }
- }, e3.prototype.invalidateData = function() {
- this.disabled || this.isTemplate || (Ii.addToInvalidComponents(this), Qa.requestFrame(), this.dataInvalid = true, ti(this.dataUsers.iterator(), function(t3) {
- t3.invalidateDataItems();
- }));
- }, e3.prototype.invalidateDataUsers = function() {
- ti(this.dataUsers.iterator(), function(t3) {
- t3.invalidate();
- });
- }, e3.prototype.invalidateDataItems = function() {
- this.disabled || this.isTemplate || (ie(Ii.invalidDataItems, this), Qa.requestFrame(), this.dataItemsInvalid = true, ti(this.dataUsers.iterator(), function(t3) {
- t3.invalidateDataItems();
- }));
- }, e3.prototype.invalidateDataRange = function() {
- this.disabled || this.isTemplate || (this.dataRangeInvalid = true, ie(Ii.invalidDataRange, this), Qa.requestFrame());
- }, e3.prototype.validateDataRange = function() {
- ee(Ii.invalidDataRange, this), this.dataRangeInvalid = false, this.startIndex == this._prevStartIndex && this.endIndex == this._prevEndIndex || (this.rangeChangeUpdate(), this.appendDataItems(), this.invalidate(), this.dispatchImmediately("datarangechanged"));
- }, e3.prototype.sliceData = function() {
- this._workingStartIndex = this.startIndex, this._workingEndIndex = this.endIndex;
- }, e3.prototype.rangeChangeUpdate = function() {
- this.sliceData(), this._prevStartIndex = this.startIndex, this._prevEndIndex = this.endIndex;
- }, e3.prototype.appendDataItems = function() {
- for (var t3 = this.endIndex, e4 = this.startIndex; e4 < t3; e4++)
- (i3 = this.dataItems.getIndex(e4)) && (i3.__disabled = false);
- for (e4 = 0; e4 < this.startIndex; e4++)
- (i3 = this.dataItems.getIndex(e4)) && (i3.__disabled = true);
- for (e4 = this.endIndex; e4 < this.dataItems.length; e4++) {
- var i3;
- (i3 = this.dataItems.getIndex(e4)) && (i3.__disabled = true);
- }
- }, e3.prototype.invalidateRawData = function() {
- this.disabled || this.isTemplate || (ie(Ii.invalidRawDatas, this), Qa.requestFrame(), this.rawDataInvalid = true, ti(this.dataUsers.iterator(), function(t3) {
- t3.invalidateRawData();
- }));
- }, e3.prototype.validateRawData = function() {
- var t3 = this;
- ee(Ii.invalidRawDatas, this), ti(this.mainDataSet.iterator(), function(e4) {
- e4 && t3.updateDataItem(e4);
- });
- }, e3.prototype.dispose = function() {
- var e4 = this;
- this.mainDataSet.template.clones.clear(), Ne(this._dataSources, function(t3, i3) {
- e4.removeDispose(i3);
- }), this.disposeData(), t2.prototype.dispose.call(this);
- }, e3.prototype.disposeData = function() {
- this.mainDataSet.template.clones.clear(), Ut(this._dataDisposers, function(t3) {
- t3.dispose();
- }), ti(this.dataUsers.iterator(), function(t3) {
- t3.disposeData();
- }), this._dataDisposers.length = 0, this._startIndex = void 0, this._endIndex = void 0, this.mainDataSet.clear(), this.mainDataSet.template.clones.clear(), this._dataSets && this._dataSets.clear();
- }, e3.prototype.getDataItem = function(t3) {
- return this.mainDataSet.create();
- }, e3.prototype.validateData = function() {
- if (this.dispatchImmediately("beforedatavalidated"), this.dataInvalid = false, Ii.removeFromInvalidComponents(this), !this.__disabled) {
- if (this.dataValidationProgress = 0, this._prevStartIndex = void 0, this._prevEndIndex = void 0, this._startIndex = void 0, this._endIndex = void 0, this.dataFields.data && this.dataItem) {
- var t3 = this.dataItem.dataContext;
- this._data = t3[this.dataFields.data];
- }
- if (this._parseDataFrom === 0 && this.data.length > 0 && this.disposeData(), this.data.length > 0) {
- var e4 = this.preloader;
- ti(this.dataUsers.iterator(), function(t4) {
- t4._startIndex = void 0, t4._endIndex = void 0;
- });
- for (var i3 = 0, n3 = Date.now(), r3 = this._parseDataFrom, s2 = this.data.length, a2 = function() {
- var t4 = o3.data[r3];
- if (o3._usesData) {
- var s3 = o3.getDataItem(t4);
- o3.processDataItem(s3, t4);
- }
- if (o3.dataUsers.each(function(e5) {
- if (e5.data.length == 0) {
- var i4 = e5.getDataItem(t4);
- e5.processDataItem(i4, t4);
- }
- }), ++i3 == 100 && (i3 = 0, Date.now() - n3 > o3.parsingStepDuration && r3 < o3.data.length - 10))
- return o3._parseDataFrom = r3 + 1, e4 && (r3 / o3.data.length > 0.5 && !e4.visible || (e4.progress = r3 / o3.data.length)), o3.dataValidationProgress = r3 / o3.data.length, r3 = o3.data.length, o3.invalidateData(), { value: void 0 };
- }, o3 = this; r3 < s2; r3++) {
- var l2 = a2();
- if (typeof l2 == "object")
- return l2.value;
- }
- e4 && (e4.progress = 1), this.dataUsers.each(function(t4) {
- t4.hidden && t4.hide(0);
- });
- }
- this.dataValidationProgress = 1, this._parseDataFrom = 0, this.invalidateDataItems(), this._internalDefaultsApplied || this.applyInternalDefaults(), this.dispatch("datavalidated");
- }
- }, e3.prototype.validateDataItems = function() {
- ee(Ii.invalidDataItems, this), this.dataItemsInvalid = false, this.invalidateDataRange(), this.invalidate(), this.dispatch("dataitemsvalidated");
- }, Object.defineProperty(e3.prototype, "data", { get: function() {
- return this._data || (this._data = []), this._adapterO ? this._adapterO.apply("data", this._data) : this._data;
- }, set: function(t3) {
- this.setData(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setData = function(t3) {
- this.isDisposed() || (this._parseDataFrom = 0, this.disposeData(), this._data = t3, t3 && t3.length > 0 ? this.invalidateData() : (this.dispatchImmediately("beforedatavalidated"), this.dispatch("datavalidated")));
- }, e3.prototype.getDataSource = function(t3) {
- var e4 = this;
- return Z(this._dataSources[t3]) || (this._dataSources[t3] = new ao(), this._dataSources[t3].component = this, this.setDataSourceEvents(this._dataSources[t3], t3), this._dataSources[t3].adapter.add("dateFields", function(t4) {
- return e4.dataSourceDateFields(t4);
- }), this._dataSources[t3].adapter.add("numberFields", function(t4) {
- return e4.dataSourceNumberFields(t4);
- }), this.events.on("inited", function() {
- e4.loadData(t3);
- }, this, false)), this._dataSources[t3];
- }, Object.defineProperty(e3.prototype, "dataSource", { get: function() {
- return this._dataSources.data || this.getDataSource("data"), this._dataSources.data;
- }, set: function(t3) {
- var e4 = this;
- this._dataSources.data && this.removeDispose(this._dataSources.data), this._dataSources.data = t3, this._dataSources.data.component = this, this.events.on("inited", function() {
- e4.loadData("data");
- }, this, false), this.setDataSourceEvents(t3, "data");
- }, enumerable: true, configurable: true }), e3.prototype.loadData = function(t3) {
- this._dataSources[t3].load();
- }, e3.prototype.dataSourceDateFields = function(t3) {
- return t3;
- }, e3.prototype.dataSourceNumberFields = function(t3) {
- return t3;
- }, e3.prototype.populateDataSourceFields = function(t3, e4, i3) {
- return Ut(i3, function(i4) {
- e4[i4] && Xt(t3, e4[i4]) === -1 && t3.push(e4[i4]);
- }), t3;
- }, e3.prototype.setDataSourceEvents = function(t3, e4) {
- var i3 = this;
- t3.events.on("started", function(t4) {
- var e5 = i3.preloader;
- e5 && (e5.progress = 0);
- }, void 0, false), t3.events.on("loadstarted", function(t4) {
- var e5 = i3.preloader;
- e5 && (e5.progress = 0.25);
- }, void 0, false), t3.events.on("loadended", function(t4) {
- var e5 = i3.preloader;
- e5 && (e5.progress = 0.5);
- }, void 0, false), t3.events.on("parseended", function(t4) {
- var e5 = i3.preloader;
- e5 && (e5.progress = 0.75);
- }, void 0, false), t3.events.on("ended", function(t4) {
- var e5 = i3.preloader;
- e5 && (e5.progress = 1);
- }, void 0, false), t3.events.on("error", function(t4) {
- var e5 = i3.preloader;
- e5 && (e5.progress = 1), i3.openModal(t4.message);
- }, void 0, false), e4 && t3.events.on("done", function(n3) {
- var r3 = i3.preloader;
- r3 && (r3.progress = 1), e4 != "data" || it(n3.data) || (n3.data = [n3.data]), t3.incremental && e4 == "data" && i3.data.length ? i3.addData(n3.data, t3.keepCount ? n3.data.length : 0) : t3.updateCurrentData && e4 == "data" && i3.data.length ? (Ut(i3.data, function(t4, e5) {
- Z(n3.data[e5]) && Ne(t4, function(i4, r4) {
- Z(n3.data[e5][i4]) && (t4[i4] = n3.data[e5][i4]);
- });
- }), i3.invalidateRawData()) : i3[e4] = n3.data;
- });
- }, Object.defineProperty(e3.prototype, "responsive", { get: function() {
- return this._responsive || (this._responsive = new oo(), this._responsive.component = this), this._responsive;
- }, set: function(t3) {
- this._responsive = t3, this._responsive.component = this;
- }, enumerable: true, configurable: true }), e3.prototype.zoom = function(t3, e4, i3, n3) {
- var r3 = this;
- e4 === void 0 && (e4 = false), i3 === void 0 && (i3 = false);
- var s2 = t3.start, a2 = t3.end, o3 = t3.priority;
- if (t3.start == t3.end && (t3.start = t3.start - 0.5 / this.maxZoomFactor, t3.end = t3.end + 0.5 / this.maxZoomFactor), o3 == "end" && a2 == 1 && s2 != 0 && s2 < this.start && (o3 = "start"), o3 == "start" && s2 == 0 && a2 > this.end && (o3 = "end"), tt(n3) || (n3 = this.maxZoomDeclination), !tt(s2) || !tt(a2))
- return { start: this.start, end: this.end };
- if (this._finalStart != s2 || this._finalEnd != a2) {
- var l2 = this.maxZoomFactor / this.minZoomCount, h2 = this.maxZoomFactor / this.maxZoomCount;
- if (o3 == "start" ? (this.maxZoomCount > 0 && 1 / (a2 - s2) < h2 && (a2 = s2 + 1 / h2), 1 / (a2 - s2) > l2 && (a2 = s2 + 1 / l2), a2 > 1 && a2 - s2 < 1 / l2 && (s2 = a2 - 1 / l2)) : (this.maxZoomCount > 0 && 1 / (a2 - s2) < h2 && (s2 = a2 - 1 / h2), 1 / (a2 - s2) > l2 && (s2 = a2 - 1 / l2), s2 < 0 && a2 - s2 < 1 / l2 && (a2 = s2 + 1 / l2)), s2 < -n3 && (s2 = -n3), 1 / (a2 - s2) > l2 && (a2 = s2 + 1 / l2), a2 > 1 + n3 && (a2 = 1 + n3), 1 / (a2 - s2) > l2 && (s2 = a2 - 1 / l2), this._finalEnd = a2, this._finalStart = s2, this.skipRangeEvent = e4, this.dispatchImmediately("rangechangestarted"), this.rangeChangeDuration > 0 && !i3) {
- var p2 = this.rangeChangeAnimation;
- if (p2 && p2.progress < 1) {
- var u2 = p2.animationOptions;
- if (u2.length > 1) {
- if (u2[0].to == s2 && u2[1].to == a2)
- return { start: s2, end: a2 };
- p2.isDisposed() || p2.stop();
- }
- }
- this.rangeChangeAnimation && this.rangeChangeAnimation.kill(), p2 = this.animate([{ property: "start", to: s2 }, { property: "end", to: a2 }], this.rangeChangeDuration, this.rangeChangeEasing), this.rangeChangeAnimation = p2, p2 && !p2.isFinished() ? p2.events.on("animationended", function() {
- r3.dispatchImmediately("rangechangeended");
- }) : this.dispatchImmediately("rangechangeended");
- } else
- this.start = s2, this.end = a2, this.dispatch("rangechangeended");
- }
- return { start: s2, end: a2 };
- }, e3.prototype.zoomToIndexes = function(t3, e4, i3, n3) {
- if (tt(t3) && tt(e4)) {
- var r3 = t3 / this.dataItems.length, s2 = e4 / this.dataItems.length;
- this.zoom({ start: r3, end: s2 }, i3, n3);
- }
- }, Object.defineProperty(e3.prototype, "zoomFactor", { get: function() {
- return ut(1 / (this.end - this.start), 1, this.maxZoomFactor);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxZoomFactor", { get: function() {
- return this.getPropertyValue("maxZoomFactor");
- }, set: function(t3) {
- this.setPropertyValue("maxZoomFactor", t3) && (t3 == 1 && (this.maxZoomDeclination = 0), this.invalidateDataRange());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxZoomDeclination", { get: function() {
- return this.getPropertyValue("maxZoomDeclination");
- }, set: function(t3) {
- this.setPropertyValue("maxZoomDeclination", t3) && this.invalidateDataRange();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startIndex", { get: function() {
- return tt(this._startIndex) || (this._startIndex = 0), this._startIndex;
- }, set: function(t3) {
- this._startIndex = ut(Math.round(t3), 0, this.dataItems.length), this.start = this.indexToPosition(this._startIndex);
- }, enumerable: true, configurable: true }), e3.prototype.indexToPosition = function(t3) {
- return t3 / this.dataItems.length;
- }, Object.defineProperty(e3.prototype, "endIndex", { get: function() {
- var t3 = this.dataItems.length;
- return (!tt(this._endIndex) || this._endIndex > t3) && (this._endIndex = t3), this._endIndex;
- }, set: function(t3) {
- this._endIndex = ut(Math.round(t3), 0, this.dataItems.length), this.end = this.indexToPosition(this._endIndex);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "start", { get: function() {
- return this._adapterO ? this._adapterO.apply("start", this._start) : this._start;
- }, set: function(t3) {
- if (this._start != t3) {
- this._start = t3;
- var e4 = Math.max(0, Math.floor(this.dataItems.length * t3) || 0);
- this._startIndex = Math.min(e4, this.dataItems.length), this.invalidateDataRange(), this.invalidate(), this.dispatchImmediately("startchanged"), this.dispatch("startendchanged");
- }
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "end", { get: function() {
- return this._adapterO ? this._adapterO.apply("end", this._end) : this._end;
- }, set: function(t3) {
- this._end != t3 && (this._end = t3, this._endIndex = Math.min(this.dataItems.length, Math.ceil(this.dataItems.length * t3) || 0), this.invalidateDataRange(), this.invalidate(), this.dispatchImmediately("endchanged"), this.dispatch("startendchanged"));
- }, enumerable: true, configurable: true }), e3.prototype.removeFromInvalids = function() {
- t2.prototype.removeFromInvalids.call(this), Ii.removeFromInvalidComponents(this), ee(Ii.invalidDataItems, this), ee(Ii.invalidDataRange, this), ee(Ii.invalidRawDatas, this);
- }, Object.defineProperty(e3.prototype, "dataItems", { get: function() {
- if (this._currentDataSetId != "") {
- var t3 = this.dataSets.getKey(this._currentDataSetId);
- if (t3)
- return t3;
- }
- return this._dataItems;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dataSets", { get: function() {
- return this._dataSets || (this._dataSets = new Pi()), this._dataSets;
- }, enumerable: true, configurable: true }), e3.prototype.setDataSet = function(t3) {
- if (this._currentDataSetId != t3) {
- if (this.dataSets.getKey(t3))
- return this.dataItems.each(function(t4) {
- t4.__disabled = true;
- }), this._currentDataSetId = t3, this.invalidateDataRange(), this._prevStartIndex = void 0, this.dataItems.each(function(t4) {
- t4.__disabled = false;
- }), true;
- if (this._currentDataSetId != "")
- return this.dataItems.each(function(t4) {
- t4.__disabled = true;
- }), this._currentDataSetId = "", this.invalidateDataRange(), this._prevStartIndex = void 0, this.dataItems.each(function(t4) {
- t4.__disabled = false;
- }), true;
- }
- return false;
- }, Object.defineProperty(e3.prototype, "currentDataSetId", { get: function() {
- return this._currentDataSetId;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "mainDataSet", { get: function() {
- return this._dataItems;
- }, enumerable: true, configurable: true }), e3.prototype._updateDataItemIndexes = function(t3) {
- for (var e4 = this.mainDataSet.values, i3 = e4.length, n3 = t3; n3 < i3; ++n3)
- e4[n3]._index = n3;
- }, e3.prototype.handleDataItemAdded = function(t3) {
- t3.newValue.component = this, this._updateDataItemIndexes(t3.index), this.dataItemsInvalid || this.invalidateDataItems();
- }, e3.prototype.handleDataItemRemoved = function(t3) {
- this._updateDataItemIndexes(t3.index), this.dataItemsInvalid || this.invalidateDataItems();
- }, e3.prototype.bindDataField = function(t3, e4) {
- this.dataFields[t3] = e4, this.invalidateDataRange();
- }, e3.prototype.invalidateProcessedData = function() {
- this.resetProcessedRange(), this.invalidateDataRange();
- }, e3.prototype.resetProcessedRange = function() {
- this._prevEndIndex = null, this._prevStartIndex = null;
- }, Object.defineProperty(e3.prototype, "dataUsers", { get: function() {
- var t3 = this;
- return this._dataUsers || (this._dataUsers = new Fi(), this._disposers.push(new ye(function() {
- ti(t3._dataUsers.iterator(), function(t4) {
- t4.dispose();
- });
- }))), this._dataUsers;
- }, enumerable: true, configurable: true }), e3.prototype.clone = function() {
- var e4 = t2.prototype.clone.call(this);
- return e4.dataFields = Sn(this.dataFields, {}), e4;
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.data = e4.data, this.sequencedInterpolation = e4.sequencedInterpolation, this.sequencedInterpolationDelay = e4.sequencedInterpolationDelay, this.interpolationDuration = e4.interpolationDuration, this.interpolationEasing = e4.interpolationEasing;
- }, e3.prototype.reinit = function() {
- this._inited = false, this.deepInvalidate();
- }, e3.prototype.getExporting = function() {
- var e4 = t2.prototype.getExporting.call(this);
- return e4.adapter.has("data", this._exportData, -1, this) || (e4.adapter.add("data", this._exportData, -1, this), this.events.on("datavalidated", function(t3) {
- e4.handleDataUpdated();
- })), e4;
- }, e3.prototype._exportData = function(t3) {
- return t3.data = this.data, t3;
- }, e3.prototype.setDisabled = function(e4) {
- var i3 = t2.prototype.setDisabled.call(this, e4);
- return i3 && this.invalidateData(), i3;
- }, e3.prototype.setShowOnInit = function(e4) {
- e4 != this.getPropertyValue("showOnInit") && (!e4 || this.inited || this.hidden ? this._showOnInitDisposer2 && this.removeDispose(this._showOnInitDisposer2) : (this._showOnInitDisposer2 = this.events.once("dataitemsvalidated", this.hideInitially, this, false), this._disposers.push(this._showOnInitDisposer2))), t2.prototype.setShowOnInit.call(this, e4);
- }, e3.prototype.setBaseId = function(e4) {
- e4 != this._baseId && this.dataInvalid && (this.dataInvalid = false, Ii.removeFromInvalidComponents(this), this._baseId = e4, this.invalidateData()), t2.prototype.setBaseId.call(this, e4);
- }, Object.defineProperty(e3.prototype, "minZoomCount", { get: function() {
- return this.getPropertyValue("minZoomCount");
- }, set: function(t3) {
- this.setPropertyValue("minZoomCount", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxZoomCount", { get: function() {
- return this.getPropertyValue("maxZoomCount");
- }, set: function(t3) {
- this.setPropertyValue("maxZoomCount", t3);
- }, enumerable: true, configurable: true }), e3.prototype._systemCheckIfValidate = function() {
- return !(this.dataInvalid || this.dataProvider && this.dataProvider.dataInvalid);
- }, e3.prototype.asFunction = function(e4) {
- return e4 == "interpolationEasing" || e4 == "rangeChangeEasing" || t2.prototype.asIs.call(this, e4);
- }, e3;
- }($a);
- Ii.registeredClasses.Component = uo;
- var co = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.isOversized = false, e4.className = "Label", e4.fill = new Ys().getFor("text"), e4.wrap = false, e4.truncate = false, e4.fullWords = true, e4.ellipsis = "\u2026", e4.textAlign = "start", e4.textValign = "top", e4.layout = "absolute", e4.baseLineRatio = -0.27, e4._positionPrecision = 1, e4.events.on("maxsizechanged", function() {
- e4.inited && e4.handleMaxSize();
- }, e4, false), e4.events.once("validated", e4.handleValidate, e4, false), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.afterDraw = function() {
- t2.prototype.afterDraw.call(this), this.validatePosition();
- }, e3.prototype.setPaper = function(e4) {
- var i3 = t2.prototype.setPaper.call(this, e4);
- return i3 && this.hardInvalidate(), i3;
- }, e3.prototype.handleValidate = function() {
- !this.currentText && !this.text || this.bbox.width != 0 && this.bbox.height != 0 || Ii.events.once("exitframe", this.hardInvalidate, this);
- }, e3.prototype.handleMaxSize = function() {
- (this.bbox.width > this.availableWidth || this.bbox.width < this.availableWidth && (this.isOversized || this.truncate) || this.bbox.height > this.availableHeight || this.bbox.height < this.availableHeight && this.isOversized) && this.invalidate();
- }, e3.prototype.arrange = function() {
- }, e3.prototype.updateCurrentText = function() {
- var t3, e4;
- An(this.html) && this.paper.supportsForeignObject() ? (t3 = "html", e4 = this.html) : (t3 = "svg", e4 = this.text), et(e4) && (e4 = e4.toString()), Z(e4) && e4 !== "" && (e4 = this.populateString(e4, this.dataItem)), t3 == "html" ? this._adapterO && (e4 = this._adapterO.apply("htmlOutput", e4)) : this._adapterO && (e4 = this._adapterO.apply("textOutput", e4));
- var i3 = e4 != this.currentText || t3 != this._currentFormat;
- return this.currentText = e4, this._currentFormat = t3, i3;
- }, e3.prototype.hardInvalidate = function() {
- this._prevStatus = "", this.invalidate();
- }, e3.prototype.getLineBBox = function(t3) {
- var e4 = t3 && t3.element, i3 = e4 && e4.node;
- i3 && i3.parentNode && (t3.bbox = e4.getBBox());
- }, e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this.bbox.width, i3 = this.bbox.height, n3 = this.topParent;
- if (!n3 || n3.maxWidth && n3.maxHeight) {
- var r3 = gt(this.availableWidth - this.pixelPaddingLeft - this.pixelPaddingRight, 0), s2 = gt(this.availableHeight - this.pixelPaddingTop - this.pixelPaddingBottom, 0), a2 = s2 + "," + r3 + this.wrap + this.truncate + this.fullWords + this.rtl + this.ellipsis;
- if (this.updateCurrentText() || !this.inited || this._prevStatus != a2) {
- this._measuredWidth = 0, this._measuredHeight = 0, this.isOversized = false;
- var o3 = this._currentFormat, l2 = this.currentText;
- if (Z(l2) && l2 != "") {
- var h2 = l2.split("\n");
- this._prevStatus = a2, this.textAlign = this.textAlign;
- var p2 = this.group.getAttr("display");
- if (p2 == "none" && this.group.removeAttr("display"), this.textPathElement && this.textPathElement.removeChildren(), o3 === "svg") {
- this.element.removeAttr("display");
- var u2 = this.element;
- this.resetBBox();
- for (var d2 = 0, c2 = "", f2 = 0; f2 < h2.length; f2++) {
- var g2 = h2[f2];
- if (g2 != "") {
- var y2 = Va().chunk(g2, null, this.ignoreFormatting), m2 = 0, v2 = true, b2 = false, x2 = this.getLineInfo(f2);
- x2 ? (x2.text = "", x2.element.textContent = "") : (x2 = { text: "", element: this.getSVGLineElement("", 0), complex: false }, u2.add(x2.element)), x2.element.removeAttr("display"), x2.element.removeChildren(), this.textPathElement && x2.element.add(this.textPathElement);
- for (var _2 = 0; _2 < y2.length; _2++) {
- _2 && (x2.complex = true);
- var P2 = y2[_2];
- if (P2.type === "format")
- c2 = P2.text;
- else {
- if (b2)
- continue;
- if (x2.text = P2.text, x2.style = Va().translateStyleShortcuts(c2), this.textPathElement ? this.getSvgElement(x2.text, x2.style, this.textPathElement) : this.getSvgElement(x2.text, x2.style, x2.element), this.getLineBBox(x2), x2.bbox.width = Math.ceil(x2.bbox.width), m2 < x2.bbox.height && (m2 = x2.bbox.height), (this.wrap || this.truncate) && x2.bbox.width > r3) {
- this.isOversized = true;
- var w2 = x2.element.textContent, C2 = x2.bbox.width / w2.length, O2 = yt(Math.ceil((x2.bbox.width - r3) / C2), w2.length);
- if (this.truncate) {
- var S2 = false, I2 = x2.element.node;
- if (I2 && I2.childNodes)
- for (var D2 = x2.element.node.childNodes.length - 1; D2 >= 0; D2--) {
- var k2 = x2.element.node.childNodes[D2];
- if (S2 && x2.bbox.width <= r3 && (k2.textContent += " " + this.ellipsis, x2.bbox = x2.element.getBBox(), x2.bbox.width = Math.floor(x2.bbox.width), x2.bbox.width <= r3))
- break;
- S2 = false;
- var T2 = k2.textContent;
- for (w2 = x2.element.textContent, O2 = yt(Math.ceil((x2.bbox.width - r3) / C2), w2.length); x2.bbox.width > r3 && O2 <= w2.length && O2 > 0; )
- (F2 = gt(w2.length - O2 - this.ellipsis.length, 1)) <= 1 && (O2 = 0, D2 > 0 && (S2 = true, x2.element.node.removeChild(k2))), (T2 = Nn(T2, F2, this.ellipsis, this.fullWords, this.rtl)).length > F2 && this.fullWords && (T2 = Nn(T2, F2, this.ellipsis, false, this.rtl)), k2.textContent = T2, x2.bbox = x2.element.getBBox(), x2.bbox.width = Math.floor(x2.bbox.width), O2 = Math.ceil(1.1 * O2);
- b2 = true;
- }
- } else if (x2.element.node) {
- for (var A2 = x2.element.node.lastChild, V2 = void 0; x2.bbox.width > r3 && O2 <= w2.length && O2 > 0; ) {
- var F2 = gt(P2.text.length - O2, 1);
- if (v2 ? V2 = Hn(P2.text, F2, true, this.rtl) : ((V2 = Hn(P2.text, F2, true, this.rtl, false))[0].length > F2 || F2 === 1) && (x2.element.node.removeChild(A2), O2 = 0), O2 > 0) {
- var M2 = V2.shift();
- v2 && (M2 = Wn(M2)), A2.textContent = Va().cleanUp(M2);
- }
- x2.bbox = x2.element.getBBox(), x2.bbox.width = Math.floor(x2.bbox.width), O2++;
- }
- if (V2.length > 0) {
- var L2 = "";
- Z(V2) && (this.rtl ? L2 += V2.join("") + c2 : L2 += c2 + V2.join("").replace(/([\[\]]{1})/g, "$1$1"));
- for (var j2 = _2 + 1; j2 < y2.length; j2++)
- y2[j2].type == "value" ? L2 += y2[j2].text.replace(/([\[\]]{1})/g, "$1$1") : L2 += y2[j2].text;
- h2.splice(f2 + 1, 0, L2);
- }
- b2 = true;
- }
- }
- this.bbox.width < x2.bbox.width && (this.bbox.width = x2.bbox.width), this.bbox.height = d2 + m2, this.textPathElement ? x2.element.attr({ dy: -this.paddingBottom.toString() }) : x2.element.attr({ x: "0", y: d2 + m2, dy: lt(this.baseLineRatio * m2, 3).toString() }), v2 = false;
- }
- }
- var E2 = x2.element.node;
- E2 && (A2 = E2.lastChild) && (A2.textContent = this.rtl ? Yn(A2.textContent) : Xn(A2.textContent)), d2 += m2, this.addLineInfo(x2, f2);
- } else {
- var R2 = this.getSVGLineElement("", 0);
- R2.add(this.getSvgElement(".", Va().translateStyleShortcuts(c2))), u2.add(R2);
- var B2 = Math.ceil(R2.getBBox().height);
- B2 > 0 && (d2 += B2), u2.removeElement(R2);
- var H2 = this.getLineInfo(f2);
- H2 && (H2.text = "", H2.element.textContent = "");
- }
- }
- this.maybeHideOversized(), this.measureFailed = false, this.bbox.width != 0 && this.bbox.height != 0 || (this.measureFailed = true), this._measuredWidth = lt(gt(this.bbox.width, this.pixelWidth - this.pixelPaddingLeft - this.pixelPaddingRight)), this._measuredHeight = lt(gt(this.bbox.height, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom)), this.alignSVGText(), this.bbox.width = this._measuredWidth, this.bbox.height = this._measuredHeight, i3 == this._measuredHeight && e4 == this._measuredWidth || this.dispatch("transformed"), this.hideUnused(h2.length);
- } else {
- this.element.removeAttr("display"), this.resetBBox(), (u2 = this.element).removeChildren();
- var N2 = this.paper.foreignObject();
- u2.add(N2), this.maxWidth && N2.attr({ width: this.maxWidth - this.pixelPaddingLeft - this.pixelPaddingRight }), this.maxHeight && N2.attr({ height: this.maxHeight - this.pixelPaddingTop - this.pixelPaddingBottom });
- var W2 = this.getHTMLLineElement(l2);
- N2.node.appendChild(W2), W2.style.display = "inline-block";
- var X2 = W2.clientWidth, Y2 = W2.clientHeight;
- W2.style.display = "block", this._bbox = { x: 0, y: 0, width: X2, height: Y2 }, N2.attr({ width: X2 + 1, height: Y2 }), this.maybeHideOversized(), this._measuredWidth = gt(this.bbox.width, this.pixelWidth - this.pixelPaddingLeft - this.pixelPaddingRight), this._measuredHeight = gt(this.bbox.height, this.pixelHeight - this.pixelPaddingTop - this.pixelPaddingBottom), this.bbox.width = this._measuredWidth, this.bbox.height = this._measuredHeight, this.truncate && (W2.style.overflow = "hidden"), (X2 > r3 || Y2 > s2) && (this.isOversized = true);
- }
- this.setStyles(), this.updateCenter(), this.updateBackground(), p2 == "none" && this.group.attr({ display: "none" }), this.pathElement && this.paper.appendDef(this.pathElement);
- } else
- this.element.attr({ display: "none" });
- }
- } else
- n3.events.once("maxsizechanged", this.hardInvalidate, this, false);
- }, e3.prototype.maybeHideOversized = function() {
- this.hideOversized && (this.availableWidth < this.bbox.width || this.availableHeight < this.bbox.height ? (this.element.attr({ display: "none" }), this.isOversized = true) : (this.element.removeAttr("display"), this.isOversized = false));
- }, e3.prototype.alignSVGText = function() {
- var t3 = this.element, e4 = t3.node.children || t3.node.childNodes;
- if (e4 && (!e4 || e4.length != 0)) {
- var i3 = this._measuredWidth, n3 = this._measuredHeight;
- this.pixelPaddingLeft, this.pixelPaddingRight, this.pixelPaddingTop, this.pixelPaddingBottom, this.rtl ? t3.attr({ direction: "rtl" }) : t3.removeAttr("direction");
- for (var r3 = e4.length - 1; r3 >= 0; r3--) {
- var s2 = e4[r3];
- if (s2.setAttribute("text-anchor", this.textAlign), this.textPathElement)
- s2.removeAttribute("x"), s2.removeAttribute("y");
- else {
- switch (this.textAlign) {
- case "middle":
- s2.setAttribute("x", (i3 / 2).toString() + "px");
- break;
- case "end":
- this.rtl || s2.setAttribute("x", i3.toString());
- break;
- default:
- this.rtl ? s2.setAttribute("x", i3.toString()) : s2.removeAttribute("text-anchor");
- }
- var a2 = U(s2.getAttribute("y"));
- switch (this.textValign) {
- case "middle":
- s2.setAttribute("y", ((a2 || 0) + (n3 - this.bbox.height) / 2).toString());
- break;
- case "bottom":
- s2.setAttribute("y", ((a2 || 0) + n3 - this.bbox.height).toString());
- break;
- default:
- s2.setAttribute("y", (a2 || 0).toString());
- }
- }
- }
- }
- }, e3.prototype.getSVGLineElement = function(t3, e4) {
- var i3 = this.paper.addGroup("text");
- return i3.textContent = t3, i3.attr({ x: "0" }), Z(e4) && i3.attr({ y: e4.toString() }), (this.truncate || this.wrap) && i3.attr({ overflow: "hidden" }), i3;
- }, Object.defineProperty(e3.prototype, "rtl", { get: function() {
- return Z(this._rtl) ? this._rtl : !!this._topParent && this._topParent.rtl;
- }, set: function(t3) {
- t3 = z(t3), this._rtl = t3, this.element && this.alignSVGText();
- }, enumerable: true, configurable: true }), e3.prototype.resetBBox = function() {
- this._bbox = { x: 0, y: 0, width: 0, height: 0 };
- }, e3.prototype.getHTMLLineElement = function(t3) {
- var e4 = document.createElement("div");
- switch (e4.innerHTML = t3, this.textAlign) {
- case "middle":
- e4.style.textAlign = "center";
- break;
- case "end":
- e4.style.textAlign = "right";
- }
- return this.wrap ? e4.style.wordWrap = "break-word" : e4.style.whiteSpace = "nowrap", this.rtl && (e4.style.direction = "rtl"), Z(this.fill) && (e4.style.color = this.fill.toString()), e4;
- }, e3.prototype.setStyles = function() {
- var t3 = this.element;
- !this.selectable || this.draggable || this.resizable || this.swipeable ? t3.addStyle({ webkitUserSelect: "none", msUserSelect: "none" }) : this.selectable && (t3.removeStyle("webkitUserSelect"), t3.removeStyle("msUserSelect"));
- }, e3.prototype.hideUnused = function(t3) {
- this.initLineCache();
- var e4 = this.getCache("lineInfo");
- if (e4.length >= t3)
- for (var i3 = t3; i3 < e4.length; i3++) {
- var n3 = e4[i3];
- n3 && n3.element && n3.element.attr({ display: "none" });
- }
- }, Object.defineProperty(e3.prototype, "text", { get: function() {
- return this.getPropertyValue("text");
- }, set: function(t3) {
- this.setPropertyValue("text", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "path", { get: function() {
- return this.getPropertyValue("path");
- }, set: function(t3) {
- this.setPropertyValue("path", t3, true) && (this.pathElement && this.pathElement.dispose(), this.textPathElement && this.textPathElement.dispose(), this.pathElement = this.paper.add("path"), this.pathElement.attr({ d: t3 }), this.pathElement.attr({ id: "text-path-" + this.uid }), this._disposers.push(this.pathElement), this.textPathElement = this.paper.addGroup("textPath"), this.textPathElement.attrNS(bs, "xlink:href", "#text-path-" + this.uid), this.textPathElement.attr({ path: t3 }), this._disposers.push(this.textPathElement), this.hardInvalidate());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "locationOnPath", { get: function() {
- return this.getPropertyValue("locationOnPath");
- }, set: function(t3) {
- this.setPropertyValue("locationOnPath", t3), this.textPathElement && this.textPathElement.attr({ startOffset: 100 * t3 + "%" });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "baseLineRatio", { get: function() {
- return this.getPropertyValue("baseLineRatio");
- }, set: function(t3) {
- this.setPropertyValue("baseLineRatio", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "wrap", { get: function() {
- return this.getPropertyValue("wrap");
- }, set: function(t3) {
- this.resetBBox(), this.setPropertyValue("wrap", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "truncate", { get: function() {
- return this.getPropertyValue("truncate");
- }, set: function(t3) {
- this.resetBBox(), this.setPropertyValue("truncate", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fullWords", { get: function() {
- return this.getPropertyValue("fullWords");
- }, set: function(t3) {
- this.setPropertyValue("fullWords", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "ellipsis", { get: function() {
- return this.getPropertyValue("ellipsis");
- }, set: function(t3) {
- this.setPropertyValue("ellipsis", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "selectable", { get: function() {
- return this.getPropertyValue("selectable");
- }, set: function(t3) {
- this.setPropertyValue("selectable", t3, true), this.setStyles();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "textAlign", { get: function() {
- return this.getPropertyValue("textAlign");
- }, set: function(t3) {
- this.setPropertyValue("textAlign", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "textValign", { get: function() {
- return this.getPropertyValue("textValign");
- }, set: function(t3) {
- this.setPropertyValue("textValign", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "html", { get: function() {
- return this.getPropertyValue("html");
- }, set: function(t3) {
- this.setPropertyValue("html", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hideOversized", { get: function() {
- return this.getPropertyValue("hideOversized");
- }, set: function(t3) {
- this.setPropertyValue("hideOversized", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "ignoreFormatting", { get: function() {
- return this.getPropertyValue("ignoreFormatting");
- }, set: function(t3) {
- this.setPropertyValue("ignoreFormatting", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.measureElement = function() {
- }, e3.prototype.getLineInfo = function(t3) {
- this.initLineCache();
- var e4 = this.getCache("lineInfo");
- return e4.length > t3 ? e4[t3] : void 0;
- }, e3.prototype.addLineInfo = function(t3, e4) {
- this.initLineCache(), this.getCache("lineInfo")[e4] = t3;
- }, e3.prototype.initLineCache = function() {
- Z(this.getCache("lineInfo")) || this.setCache("lineInfo", [], 0);
- }, e3.prototype.setDataItem = function(e4) {
- this._sourceDataItemEvents && this._sourceDataItemEvents.dispose(), e4 && (this._sourceDataItemEvents = new me([e4.events.on("valuechanged", this.invalidate, this, false), e4.events.on("workingvaluechanged", this.invalidate, this, false), e4.events.on("calculatedvaluechanged", this.invalidate, this, false), e4.events.on("propertychanged", this.invalidate, this, false)])), t2.prototype.setDataItem.call(this, e4);
- }, Object.defineProperty(e3.prototype, "availableWidth", { get: function() {
- return Z(this.maxWidth) ? this.maxWidth : this.pixelWidth;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "availableHeight", { get: function() {
- return Z(this.maxHeight) ? this.maxHeight : this.pixelHeight;
- }, enumerable: true, configurable: true }), e3.prototype.getSvgElement = function(t3, e4, i3) {
- var n3 = this.paper.add("tspan");
- if (n3.textContent = t3, e4)
- if (ls.nonce && i3) {
- var r3 = "amcharts_element_style_" + btoa(e4).replace(/[^\w]*/g, "");
- n3.node.setAttribute("class", r3);
- var s2 = document.createElementNS(ms, "defs");
- i3.node.appendChild(s2);
- var a2 = document.createElement("style");
- a2.type = "text/css", a2.innerHTML = "." + r3 + " { " + e4 + "}", a2.setAttribute("nonce", ls.nonce), s2.appendChild(a2);
- } else
- n3.node.setAttribute("style", e4);
- return i3 && i3.add(n3), n3;
- }, e3.prototype.deepInvalidate = function() {
- t2.prototype.deepInvalidate.call(this), this.hardInvalidate();
- }, Object.defineProperty(e3.prototype, "readerTitle", { get: function() {
- var t3 = this.getPropertyValue("readerTitle");
- return t3 ? this.dataItem && (t3 = this.populateString(t3)) : t3 = this.populateString($n(An(this.html) ? this.html : this.text)), t3;
- }, set: function(t3) {
- t3 = G(t3), this.setPropertyValue("readerTitle", t3) && this.applyAccessibility();
- }, enumerable: true, configurable: true }), e3;
- }($a);
- Ii.registeredClasses.Label = co, lo.push({ relevant: ho.heightXS, state: function(t2, e3) {
- if (t2 instanceof co && t2.parent && t2.parent.isBaseSprite) {
- var i3 = t2.states.create(e3);
- return i3.properties.disabled = true, i3;
- }
- return null;
- } });
- var fo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "RoundedRectangle", e4.element = e4.paper.add("path"), e4.cornerRadius(3, 3, 3, 3), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this.innerWidth, i3 = this.innerHeight;
- if (tt(e4) && tt(i3)) {
- var n3 = yt(e4, i3) / 2, r3 = Vn(this.cornerRadiusTopLeft, n3), s2 = Vn(this.cornerRadiusTopRight, n3), a2 = Vn(this.cornerRadiusBottomRight, n3), o3 = Vn(this.cornerRadiusBottomLeft, n3), l2 = yt(Math.abs(e4 / 2), Math.abs(i3 / 2)), h2 = ut(r3, 0, l2), p2 = ut(s2, 0, l2), u2 = ut(a2, 0, l2), d2 = ut(o3, 0, l2), c2 = "M" + h2 + ",0 L" + (e4 - p2) + ",0 a" + p2 + "," + p2 + " 0 0 1 " + p2 + "," + p2 + " L" + e4 + "," + (i3 - u2) + " a" + u2 + "," + u2 + " 0 0 1 -" + u2 + "," + u2 + " L" + d2 + "," + i3 + " a" + d2 + "," + d2 + " 0 0 1 -" + d2 + ",-" + d2 + " L0," + h2 + " a" + h2 + "," + h2 + " 0 0 1 " + h2 + ",-" + h2 + " Z";
- this.path = c2;
- }
- }, e3.prototype.cornerRadius = function(t3, e4, i3, n3) {
- this.cornerRadiusTopLeft = t3, this.cornerRadiusTopRight = e4, this.cornerRadiusBottomLeft = i3, this.cornerRadiusBottomRight = n3;
- }, Object.defineProperty(e3.prototype, "cornerRadiusTopLeft", { get: function() {
- return this.getPropertyValue("cornerRadiusTopLeft");
- }, set: function(t3) {
- this.setPercentProperty("cornerRadiusTopLeft", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cornerRadiusTopRight", { get: function() {
- return this.getPropertyValue("cornerRadiusTopRight");
- }, set: function(t3) {
- this.setPercentProperty("cornerRadiusTopRight", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cornerRadiusBottomRight", { get: function() {
- return this.getPropertyValue("cornerRadiusBottomRight");
- }, set: function(t3) {
- this.setPercentProperty("cornerRadiusBottomRight", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cornerRadiusBottomLeft", { get: function() {
- return this.getPropertyValue("cornerRadiusBottomLeft");
- }, set: function(t3) {
- this.setPercentProperty("cornerRadiusBottomLeft", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.measureElement = function() {
- }, Object.defineProperty(e3.prototype, "bbox", { get: function() {
- return this.definedBBox ? this.definedBBox : this.isMeasured ? { x: 0, y: 0, width: this.innerWidth, height: this.innerHeight } : { x: 0, y: 0, width: 0, height: 0 };
- }, enumerable: true, configurable: true }), e3;
- }(Za);
- Ii.registeredClasses.RoundedRectangle = fo;
- var go = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "Button", e4.tooltipY = 0, e4.iconPosition = "left", e4.layout = "horizontal", e4.contentAlign = "center", e4.contentValign = "middle", e4.padding(8, 16, 8, 16), e4.setStateOnChildren = true;
- var i3 = new Ys(), n3 = e4.background;
- n3.fill = i3.getFor("secondaryButton"), n3.stroke = i3.getFor("secondaryButtonStroke"), n3.fillOpacity = 1, n3.strokeOpacity = 1, n3.cornerRadius(3, 3, 3, 3), e4.label = new co(), e4.label.fill = i3.getFor("secondaryButtonText"), e4.label.shouldClone = false;
- var r3 = n3.states.create("hover");
- r3.properties.fillOpacity = 1, r3.properties.fill = i3.getFor("secondaryButtonHover");
- var s2 = n3.states.create("down");
- return s2.transitionDuration = 100, s2.properties.fill = i3.getFor("secondaryButtonDown"), s2.properties.fillOpacity = 1, e4.role = "button", e4.focusable = true, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "icon", { get: function() {
- return this._icon;
- }, set: function(t3) {
- var e4 = this._icon;
- e4 && (e4.parent = void 0), t3 && (this._icon = t3, t3.parent = this, t3.interactionsEnabled = false, t3.shouldClone = false, this.iconPosition = this.iconPosition, this._disposers.push(t3));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "iconPosition", { get: function() {
- return this.getPropertyValue("iconPosition");
- }, set: function(t3) {
- this.setPropertyValue("iconPosition", t3), this.icon && (t3 == "left" ? this.icon.toBack() : this.icon.toFront());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "label", { get: function() {
- return this._label;
- }, set: function(t3) {
- this._label && this.removeDispose(this._label), this._label = t3, t3 && (t3.parent = this, t3.interactionsEnabled = false, this._disposers.push(this._label));
- }, enumerable: true, configurable: true }), e3.prototype.createBackground = function() {
- return new fo();
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), e4.label && this.label.copyFrom(e4.label), e4.icon && (this.icon = e4.icon.clone());
- }, e3;
- }($a);
- Ii.registeredClasses.Button = go;
- var yo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Circle", e4.element = e4.paper.add("circle"), e4.setPercentProperty("radius", V(100)), e4.setPropertyValue("horizontalCenter", "middle"), e4.setPropertyValue("verticalCenter", "middle"), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this), this.element.attr({ r: this.pixelRadius });
- }, Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelRadius", { get: function() {
- return Vn(this.radius, yt(this.innerWidth / 2, this.innerHeight / 2));
- }, enumerable: true, configurable: true }), e3.prototype.measureElement = function() {
- var t3 = this.pixelRadius;
- this._bbox = { x: -t3, y: -t3, width: 2 * t3, height: 2 * t3 };
- }, e3;
- }(Za);
- Ii.registeredClasses.Circle = yo;
- var mo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Ellipse", e4.element = e4.paper.add("ellipse"), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this), this.element.attr({ rx: this.radius }), this.element.attr({ ry: this.radiusY });
- }, Object.defineProperty(e3.prototype, "radiusY", { get: function() {
- return this.innerHeight / 2;
- }, set: function(t3) {
- this.height = 2 * t3, this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.innerWidth / 2;
- }, set: function(t3) {
- this.width = 2 * t3, this.invalidate();
- }, enumerable: true, configurable: true }), e3;
- }(yo);
- Ii.registeredClasses.Ellipse = mo;
- var vo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Image", e4.element = e4.paper.add("image"), e4.applyTheme(), e4.width = 50, e4.height = 50, e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- if (t2.prototype.draw.call(this), this.href) {
- var e4 = this.innerWidth, i3 = this.innerHeight;
- tt(this.widthRatio) && (e4 = i3 * this.widthRatio, this.width = e4), tt(this.heightRatio) && (i3 = e4 * this.heightRatio, this.height = i3), this.element.attr({ width: e4, height: i3 }), this.element.attrNS(bs, "xlink:href", this.href);
- }
- }, Object.defineProperty(e3.prototype, "href", { get: function() {
- return this.getPropertyValue("href");
- }, set: function(t3) {
- this.setPropertyValue("href", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "widthRatio", { get: function() {
- return this.getPropertyValue("widthRatio");
- }, set: function(t3) {
- this.setPropertyValue("widthRatio", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "heightRatio", { get: function() {
- return this.getPropertyValue("heightRatio");
- }, set: function(t3) {
- this.setPropertyValue("heightRatio", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "bbox", { get: function() {
- return { x: 0, y: 0, width: this.pixelWidth, height: this.pixelHeight };
- }, enumerable: true, configurable: true }), e3;
- }(Za);
- Ii.registeredClasses.Image = vo;
- var bo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Line", e4.element = e4.paper.add("line"), e4.fill = dn(), e4.x1 = 0, e4.y1 = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this), this.x1 == this.x2 || this.y1 == this.y2 ? this.pixelPerfect = true : this.pixelPerfect = false, this.x1 = this.x1, this.x2 = this.x2, this.y1 = this.y1, this.y2 = this.y2;
- }, Object.defineProperty(e3.prototype, "x1", { get: function() {
- return this.getPropertyValue("x1");
- }, set: function(t3) {
- tt(t3) || (t3 = 0);
- var e4 = 0;
- this.pixelPerfect && this.stroke instanceof Oa && (e4 = 1e-5), this.setPropertyValue("x1", t3, true), this.element.attr({ x1: t3 + e4 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "x2", { get: function() {
- var t3 = this.getPropertyValue("x2");
- return tt(t3) || (t3 = this.pixelWidth), t3;
- }, set: function(t3) {
- tt(t3) || (t3 = 0), this.setPropertyValue("x2", t3, true), this.element.attr({ x2: t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "y1", { get: function() {
- return this.getPropertyValue("y1");
- }, set: function(t3) {
- tt(t3) || (t3 = 0);
- var e4 = 0;
- this.pixelPerfect && this.stroke instanceof Oa && (e4 = 1e-5), this.setPropertyValue("y1", t3, true), this.element.attr({ y1: t3 + e4 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "y2", { get: function() {
- var t3 = this.getPropertyValue("y2");
- return tt(t3) || (t3 = this.pixelHeight), t3;
- }, set: function(t3) {
- tt(t3) || (t3 = 0), this.setPropertyValue("y2", t3, true), this.element.attr({ y2: t3 });
- }, enumerable: true, configurable: true }), e3.prototype.positionToPoint = function(t3) {
- var e4 = { x: this.x1, y: this.y1 }, i3 = { x: this.x2, y: this.y2 }, n3 = St(e4, i3, t3), r3 = Dt(e4, i3);
- return { x: n3.x, y: n3.y, angle: r3 };
- }, e3;
- }(Za);
- Ii.registeredClasses.Line = bo;
- var xo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PointedShape", e4.pointerBaseWidth = 15, e4.pointerLength = 10, e4.pointerY = 0, e4.pointerX = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this), tt(this.pointerX) || (this.pointerX = this.pixelWidth / 2), tt(this.pointerY) || (this.pointerY = this.pixelHeight + 10);
- }, Object.defineProperty(e3.prototype, "pointerBaseWidth", { get: function() {
- return this.getPropertyValue("pointerBaseWidth");
- }, set: function(t3) {
- this.setPropertyValue("pointerBaseWidth", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pointerLength", { get: function() {
- return this.getPropertyValue("pointerLength");
- }, set: function(t3) {
- this.setPropertyValue("pointerLength", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pointerX", { get: function() {
- return this.getPropertyValue("pointerX");
- }, set: function(t3) {
- this.setPropertyValue("pointerX", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pointerY", { get: function() {
- return this.getPropertyValue("pointerY");
- }, set: function(t3) {
- this.setPropertyValue("pointerY", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(Za), _o = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PointedRectangle", e4.element = e4.paper.add("path"), e4.cornerRadius = 6, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this.cornerRadius, i3 = this.innerWidth, n3 = this.innerHeight;
- if (i3 > 0 && n3 > 0) {
- var r3, s2, a2 = this.pointerX, o3 = this.pointerY, l2 = this.pointerBaseWidth / 2, h2 = yt(i3 / 2, n3 / 2), p2 = ut(e4, 0, h2), u2 = ut(e4, 0, h2), d2 = ut(e4, 0, h2), c2 = ut(e4, 0, h2), f2 = void 0, g2 = void 0, y2 = void 0, m2 = void 0, v2 = (a2 - 0) * (n3 - 0) - (o3 - 0) * (i3 - 0), b2 = (a2 - 0) * (0 - n3) - (o3 - n3) * (i3 - 0);
- f2 = v2 > 0 && b2 > 0 ? "M" + p2 + ",0 L" + ((r3 = ut(a2, p2 + l2, i3 - l2 - u2)) - l2) + ",0 L" + a2 + "," + (o3 = ut(o3, -1 / 0, 0)) + " L" + (r3 + l2) + ",0 L" + (i3 - u2) + ",0" : "M" + p2 + ",0 L" + (i3 - u2) + ",0", y2 = v2 < 0 && b2 < 0 ? " L" + (i3 - d2) + "," + n3 + " L" + ((r3 = ut(a2, c2 + l2, i3 - l2 - d2)) + l2) + "," + n3 + " L" + a2 + "," + (o3 = ut(o3, n3, 1 / 0)) + " L" + (r3 - l2) + "," + n3 + " L" + c2 + "," + n3 : " L" + c2 + "," + n3, m2 = v2 < 0 && b2 > 0 ? " L0," + (n3 - c2) + " L0," + ((s2 = ut(o3, p2 + l2, n3 - c2 - l2)) + l2) + " L" + (a2 = ut(a2, -1 / 0, 0)) + "," + o3 + " L0," + (s2 - l2) + " L0," + p2 : " L0," + p2, g2 = v2 > 0 && b2 < 0 ? " L" + i3 + "," + u2 + " L" + i3 + "," + ((s2 = ut(o3, u2 + l2, n3 - l2 - d2)) - l2) + " L" + (a2 = ut(a2, i3, 1 / 0)) + "," + o3 + " L" + i3 + "," + (s2 + l2) + " L" + i3 + "," + (n3 - d2) : " L" + i3 + "," + (n3 - d2);
- var x2 = " a" + u2 + "," + u2 + " 0 0 1 " + u2 + "," + u2, _2 = " a" + d2 + "," + d2 + " 0 0 1 -" + d2 + "," + d2, P2 = " a" + c2 + "," + c2 + " 0 0 1 -" + c2 + ",-" + c2, w2 = " a" + p2 + "," + p2 + " 0 0 1 " + p2 + ",-" + p2;
- this.path = f2 + x2 + g2 + _2 + y2 + P2 + m2 + w2;
- }
- }, Object.defineProperty(e3.prototype, "cornerRadius", { get: function() {
- return this.getPropertyValue("cornerRadius");
- }, set: function(t3) {
- this.setPropertyValue("cornerRadius", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(xo);
- function Po(t2) {
- var e3 = Co(t2[0]), i3 = { x: 0, y: 0 }, n3 = ls.minPolylineStep;
- tt(n3) || (n3 = 0.5);
- for (var r3 = 0, s2 = t2.length; r3 < s2; r3++) {
- var a2 = t2[r3];
- _t(a2, i3) > n3 && (e3 += Co(a2), i3 = a2);
- }
- return e3;
- }
- function wo(t2) {
- return " M" + lt(t2.x, 4) + "," + lt(t2.y, 4) + " ";
- }
- function Co(t2) {
- return " L" + lt(t2.x, 4) + "," + lt(t2.y, 4) + " ";
- }
- function Oo(t2, e3) {
- return " Q" + lt(e3.x, 4) + "," + lt(e3.y, 4) + " " + lt(t2.x, 4) + "," + lt(t2.y, 4);
- }
- function So(t2, e3, i3) {
- return " C" + lt(e3.x, 4) + "," + lt(e3.y, 4) + " " + lt(i3.x, 4) + "," + lt(i3.y, 4) + " " + lt(t2.x, 4) + "," + lt(t2.y, 4);
- }
- function Io() {
- return " Z";
- }
- function Do(t2, e3, i3, n3) {
- if (e3 == 0)
- return "";
- tt(n3) || (n3 = i3);
- var r3 = "", s2 = ",", a2 = Math.ceil(Math.abs(e3) / 180), o3 = 1;
- e3 < 0 && (o3 = 0);
- var l2 = 0, h2 = 0, p2 = -ft(t2) * i3, u2 = -dt(t2) * n3;
- if (e3 < 0.5 && i3 > 3e3)
- return Co({ x: f2 = lt(ft(c2 = t2 + e3) * i3, 4), y: g2 = lt(dt(c2) * n3, 4) });
- for (var d2 = 0; d2 < a2; d2++) {
- var c2, f2, g2;
- r3 += " a" + i3 + s2 + n3 + s2 + 0 + s2 + 0 + s2 + o3 + s2 + (f2 = lt(ft(c2 = t2 + e3 / a2 * (d2 + 1)) * i3 + p2 - l2, 4)) + s2 + (g2 = lt(dt(c2) * n3 + u2 - h2, 4)), l2 = f2, h2 = g2;
- }
- return r3;
- }
- function ko(t2, e3, i3, n3, r3, s2, a2) {
- if (e3 == 0)
- return "";
- if (tt(n3) || (n3 = 0), i3 == 0 && n3 <= 0)
- return "";
- if (i3 < n3) {
- var o3 = i3;
- i3 = n3, n3 = o3, tt(r3) && (r3 = r3 / n3 * i3);
- }
- (e3 = yt(e3, 360)) == 360 && (s2 = 0, a2 = 0);
- var l2 = t2 + e3, h2 = dt(yt(e3, 45) / 2), p2 = (r3 = tt(r3) ? r3 : i3) / i3 * n3, u2 = r3 / i3 * (s2 = s2 || 0), d2 = r3 / i3 * (a2 = tt(a2) ? a2 : s2);
- s2 = ut(s2, 0, (i3 - n3) / 2), u2 = ut(u2, 0, (r3 - p2) / 2), a2 = ut(a2, 0, (i3 - n3) / 2), d2 = ut(d2, 0, (r3 - p2) / 2), s2 = lt(ut(s2, 0, i3 * h2), 4), u2 = lt(ut(u2, 0, r3 * h2), 4), a2 = lt(ut(a2, 0, n3 * h2), 4), d2 = lt(ut(d2, 0, p2 * h2), 4);
- var c2 = Math.asin(s2 / i3 / 2) * at * 2, f2 = Math.asin(u2 / r3 / 2) * at * 2;
- n3 < a2 && (n3 = a2), p2 < d2 && (p2 = d2);
- var g2 = Math.asin(a2 / n3 / 2) * at * 2, y2 = Math.asin(d2 / p2 / 2) * at * 2;
- tt(g2) || (g2 = 0), tt(y2) || (y2 = 0);
- var m2 = t2 + e3 / 2, v2 = { x: lt(ft(m2) * n3, 4), y: dt(m2) * p2 }, b2 = { x: ft(t2) * (n3 + a2), y: dt(t2) * (p2 + d2) }, x2 = { x: ft(t2) * (i3 - s2), y: dt(t2) * (r3 - u2) }, _2 = { x: ft(l2) * (i3 - s2), y: dt(l2) * (r3 - u2) }, P2 = { x: ft(l2) * (n3 + a2), y: dt(l2) * (p2 + d2) }, w2 = { x: ft(t2 + c2) * i3, y: dt(t2 + f2) * r3 }, C2 = { x: ft(l2 - g2) * n3, y: dt(l2 - y2) * p2 };
- a2 += a2 * dt(g2 / 2), d2 += d2 * dt(y2 / 2), g2 > (l2 - t2) / 2 && (C2 = v2);
- var O2 = "";
- return e3 == 360 ? O2 = wo(x2) : (O2 = wo(b2), O2 += Co(x2), O2 += To(w2, s2, u2, true)), O2 += Do(t2 + c2, e3 - 2 * c2, i3, r3), tt(n3) && n3 != 0 ? (e3 == 360 && s2 == 0 ? O2 += wo(P2) : (O2 += To(_2, s2, u2, true), O2 += Co(P2), O2 += To(C2, a2, d2, true)), O2 += Do(l2 - g2, -(e3 - 2 * g2), n3, p2), (e3 < 360 || s2 > 0) && (O2 += To(b2, a2, d2, true)), O2 += Co(b2)) : (O2 += To(_2, s2, u2, true), e3 < 360 && (O2 += Co(b2))), O2;
- }
- function To(t2, e3, i3, n3, r3, s2) {
- if (e3 == 0)
- return "";
- var a2 = ",";
- return " A" + e3 + a2 + i3 + a2 + (s2 = s2 || 0) + a2 + +(r3 = Boolean(r3)) + a2 + +(n3 = Boolean(n3)) + a2 + lt(t2.x, 4) + a2 + lt(t2.y, 4);
- }
- function Ao(t2, e3, i3, n3) {
- return tt(i3) || (i3 = 0), tt(n3) || (n3 = 0), wo({ x: i3, y: n3 }) + Co({ x: i3 + t2, y: n3 }) + Co({ x: i3 + t2, y: n3 + e3 }) + Co({ x: i3, y: n3 + e3 }) + " Z";
- }
- function Vo(t2, e3) {
- var i3 = ",", n3 = " L";
- return e3 ? "M" + t2.x + i3 + t2.y + n3 + t2.x + i3 + (t2.y + t2.height) + n3 + (t2.x + t2.width) + i3 + (t2.y + t2.height) + n3 + (t2.x + t2.width) + i3 + t2.y + n3 + t2.x + i3 + t2.y : "M" + t2.x + i3 + t2.y + n3 + (t2.x + t2.width) + i3 + t2.y + n3 + (t2.x + t2.width) + i3 + (t2.y + t2.height) + n3 + t2.x + i3 + (t2.y + t2.height) + n3 + t2.x + i3 + t2.y;
- }
- function Fo(t2, e3) {
- var i3 = wa().add("path").node;
- if (i3.setAttribute("d", t2), i3.getPointAtLength && i3.getTotalLength) {
- for (var n3 = i3.getTotalLength(), r3 = [], s2 = 0; s2 < e3; s2++) {
- var a2 = i3.getPointAtLength(s2 / e3 * n3);
- r3.push({ x: a2.x, y: a2.y });
- }
- return r3;
- }
- i3.remove();
- }
- function Mo(t2, e3, i3, n3, r3, s2, a2, o3, l2) {
- tt(o3) || (o3 = 0), tt(o3) || (l2 = o3);
- for (var h2 = r3 + 0.01, p2 = o3 * st, u2 = []; h2 < i3 + a2; ) {
- var d2 = s2;
- if (d2 / 2 > h2 && (d2 = 2 * h2), (p2 += 2 * Math.asin(d2 / 2 / h2)) * at > l2 + (i3 - r3) / a2 * 360)
- break;
- var c2 = p2 * at, f2 = { x: t2 + h2 * Math.cos(p2), y: e3 + h2 * n3 / i3 * Math.sin(p2) };
- u2.push(f2), h2 = r3 + c2 / 360 * a2;
- }
- return u2.shift(), u2;
- }
- function Lo(t2) {
- if (!t2 || t2.length == 0)
- return "";
- var e3 = wo(t2[0]);
- if (t2 && t2.length > 0)
- for (var i3 = 1; i3 < t2.length; i3++)
- e3 += Co(t2[i3]);
- return e3;
- }
- var jo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._distance = 0, e4.className = "Polyline", e4.element = e4.paper.add("path"), e4.shapeRendering = "auto", e4.fill = dn(), e4.strokeOpacity = 1, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.makePath = function() {
- this._distance = 0;
- var t3 = this.segments;
- if (t3 && t3.length > 0) {
- for (var e4 = "", i3 = 0, n3 = t3.length; i3 < n3; i3++) {
- var r3 = t3[i3];
- if (r3.length > 0) {
- e4 += wo(r3[0]);
- for (var s2 = 1; s2 < r3.length; s2++) {
- var a2 = r3[s2];
- e4 += Co(a2), this._distance += _t(r3[s2 - 1], a2);
- }
- }
- }
- this.path = e4;
- }
- this._realSegments = t3;
- }, Object.defineProperty(e3.prototype, "segments", { get: function() {
- return this.getPropertyValue("segments");
- }, set: function(t3) {
- this.setPropertyValue("segments", t3), this.makePath();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "distance", { get: function() {
- return this._distance;
- }, enumerable: true, configurable: true }), e3.prototype.positionToPoint = function(t3) {
- var e4 = 0;
- t3 < 0 && (t3 = Math.abs(t3), e4 = 180);
- var i3 = this._realSegments;
- if (i3) {
- for (var n3 = this.distance, r3 = 0, s2 = 0, a2 = 0, o3 = void 0, l2 = void 0, h2 = 0; h2 < i3.length; h2++) {
- var p2 = i3[h2];
- if (p2.length > 1) {
- for (var u2 = 1; u2 < p2.length; u2++)
- if (s2 = r3 / n3, a2 = (r3 += _t(o3 = p2[u2 - 1], l2 = p2[u2])) / n3, s2 <= t3 && a2 > t3) {
- h2 = i3.length;
- break;
- }
- } else
- p2.length == 1 && (o3 = p2[0], l2 = p2[0], s2 = 0, a2 = 1);
- }
- if (o3 && l2) {
- var d2 = St(o3, l2, (t3 - s2) / (a2 - s2));
- return { x: d2.x, y: d2.y, angle: e4 + Dt(o3, l2) };
- }
- }
- return { x: 0, y: 0, angle: 0 };
- }, Object.defineProperty(e3.prototype, "realSegments", { get: function() {
- return this._realSegments;
- }, enumerable: true, configurable: true }), e3;
- }(Za);
- Ii.registeredClasses.Polyline = jo;
- var Eo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Polyarc", e4.controlPointDistance = 0.5, e4.controlPointPosition = 0.5, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.makePath = function() {
- this._distance = 0;
- var t3 = this.segments;
- if (t3 && t3.length > 0) {
- var e4 = "";
- this._realSegments = [];
- for (var i3 = 0, n3 = t3.length; i3 < n3; i3++) {
- var r3 = t3[i3], s2 = [];
- if (this._realSegments.push(s2), r3.length > 0) {
- e4 += wo(r3[0]);
- for (var a2 = 1; a2 < r3.length; a2++) {
- var o3 = r3[a2 - 1], l2 = r3[a2], h2 = _t(l2, o3), p2 = h2 * this.controlPointDistance, u2 = this.controlPointPosition, d2 = -Dt(o3, l2), c2 = { x: o3.x + (l2.x - o3.x) * u2 * 0.5 - p2 * dt(d2), y: o3.y + (l2.y - o3.y) * u2 * 0.5 - p2 * ft(d2) }, f2 = { x: o3.x + (l2.x - o3.x) * u2 * 1.5 - p2 * dt(d2), y: o3.y + (l2.y - o3.y) * u2 * 1.5 - p2 * ft(d2) };
- e4 += So(l2, c2, f2);
- var g2 = Math.ceil(h2), y2 = o3;
- if (g2 > 0)
- for (var m2 = 0; m2 <= g2; m2++) {
- var v2 = Ft(o3, l2, c2, f2, m2 / g2);
- s2.push(v2), this._distance += _t(y2, v2), y2 = v2;
- }
- else
- s2.push(o3);
- }
- }
- }
- this.path = e4;
- }
- }, Object.defineProperty(e3.prototype, "controlPointPosition", { get: function() {
- return this.getPropertyValue("controlPointPosition");
- }, set: function(t3) {
- this.setPropertyValue("controlPointPosition", t3), this.makePath();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "controlPointDistance", { get: function() {
- return this.getPropertyValue("controlPointDistance");
- }, set: function(t3) {
- this.setPropertyValue("controlPointDistance", t3), this.makePath();
- }, enumerable: true, configurable: true }), e3;
- }(jo);
- Ii.registeredClasses.Polyarc = Eo;
- var Ro = function(t2) {
- function e3(e4) {
- var i3 = t2.call(this) || this;
- return i3._bboxes = [], i3.morphDuration = 800, i3.morphEasing = zr, i3.morphToSingle = true, i3.scaleRatio = 1, i3.className = "Morpher", i3.morphable = e4, i3.applyTheme(), i3;
- }
- return C(e3, t2), e3.prototype.morphToPolygon = function(t3, e4, i3) {
- var n3 = this.morphable.currentPoints;
- if (n3 && t3) {
- this.sortPoints(n3), this.sortPoints(t3), this._morphFromPointsReal = [], this._morphToPointsReal = [], Z(e4) || (e4 = this.morphDuration), Z(i3) || (i3 = this.morphEasing), this._morphFromPointsReal = this.normalizePoints(t3, n3), this._morphToPointsReal = this.normalizePoints(n3, t3), this.morphable.currentPoints = this._morphFromPointsReal;
- var r3 = new ys(this, { property: "morphProgress", from: 0, to: 1 }, e4, i3);
- return this._disposers.push(r3), r3.start(), r3;
- }
- }, e3.prototype.normalizePoints = function(t3, e4) {
- for (var i3 = 0, n3 = t3.length; i3 < n3; i3++) {
- var r3 = t3[i3][0], s2 = t3[i3][1], a2 = q(Tt(r3)), o3 = a2.x + a2.width, l2 = a2.y + a2.height;
- if (e4[i3] || (e4[i3] = []), r3 && !e4[i3][0] && (e4[i3][0] = [{ x: o3, y: l2 }, { x: o3, y: l2 }]), e4[i3][0]) {
- e4[i3][0] = this.addPoints(e4[i3][0], r3.length);
- for (var h2 = 1 / 0, p2 = 0, u2 = 0; u2 < e4[i3][0].length; u2++) {
- var d2 = _t(e4[i3][0][u2], r3[0]);
- d2 < h2 && (p2 = u2, h2 = d2);
- }
- var c2 = e4[i3][0].slice(0, p2), f2 = e4[i3][0].slice(p2);
- e4[i3][0] = f2.concat(c2);
- }
- s2 && (e4[i3][1] || (e4[i3][1] = [{ x: o3, y: l2 }, { x: o3, y: l2 }]), e4[i3][1] = this.addPoints(e4[i3][1], s2.length));
- }
- return e4;
- }, e3.prototype.sortPoints = function(t3) {
- t3.sort(function(t4, e5) {
- var i4 = q(Tt(t4[0])), n4 = q(Tt(e5[0]));
- return i4.width * i4.height > n4.width * n4.height ? -1 : 1;
- });
- for (var e4 = [], i3 = 0, n3 = t3.length; i3 < n3; i3++) {
- var r3 = t3[i3][0];
- r3 && e4.push(q(Tt(r3)));
- }
- return At(e4);
- }, e3.prototype.morphToCircle = function(t3, e4, i3) {
- var n3 = this.morphable.points, r3 = this.sortPoints(n3);
- this._morphFromPointsReal = [], this._morphToPointsReal = [], Z(e4) || (e4 = this.morphDuration), Z(i3) || (i3 = this.morphEasing);
- for (var s2 = 0, a2 = n3.length; s2 < a2; s2++) {
- var o3 = n3[s2][0], l2 = n3[s2][1];
- if (this._morphFromPointsReal[s2] = [], this._morphToPointsReal[s2] = [], o3) {
- var h2 = o3, p2 = o3, u2 = q(Tt(p2));
- this.morphToSingle && (u2 = q(r3));
- var d2 = u2.x + u2.width / 2, c2 = u2.y + u2.height / 2, f2 = t3;
- tt(f2) || (f2 = Math.min(u2.width / 2, u2.height / 2)), h2 = [];
- var g2 = Dt({ x: d2, y: c2 }, o3[0]), y2 = 100;
- o3.length > y2 && (y2 = o3.length);
- for (var m2 = 360 / ((y2 = (p2 = this.addPoints(o3, y2)).length) - 1), v2 = 0; v2 < y2; v2++) {
- var b2 = m2 * v2 + g2, x2 = { x: d2 + f2 * ft(b2), y: c2 + f2 * dt(b2) };
- h2[v2] = x2;
- }
- if (l2 && l2.length > 0)
- for (var _2 = 0, P2 = l2.length; _2 < P2; _2++)
- h2.push({ x: d2, y: c2 });
- this._morphFromPointsReal[s2][0] = p2, this._morphToPointsReal[s2][0] = h2;
- }
- }
- this.morphable.currentPoints = this._morphFromPointsReal;
- var w2 = new ys(this, { property: "morphProgress", from: 0, to: 1 }, e4, i3);
- return this._disposers.push(w2), w2.start(), w2;
- }, e3.prototype.addPoints = function(t3, e4) {
- for (var i3 = Math.round(e4 / t3.length), n3 = [], r3 = 0, s2 = t3.length; r3 < s2; r3++) {
- var a2, o3 = t3[r3];
- a2 = r3 == t3.length - 1 ? t3[0] : t3[r3 + 1], n3.push(o3);
- for (var l2 = 1; l2 < i3; l2++) {
- var h2 = l2 / i3, p2 = { x: o3.x + (a2.x - o3.x) * h2, y: o3.y + (a2.y - o3.y) * h2 };
- n3.push(p2);
- }
- n3.length + t3.length - r3 == e4 && (i3 = 0);
- }
- if (n3.length < e4 && t3.length > 0) {
- var u2 = t3[t3.length - 1];
- for (l2 = n3.length; l2 < e4; l2++)
- n3.push({ x: u2.x, y: u2.y });
- }
- return n3;
- }, e3.prototype.morphToRectangle = function(t3, e4, i3, n3) {
- var r3 = this.morphable.points;
- this.sortPoints(r3), this._morphFromPointsReal = [], this._morphToPointsReal = [], Z(i3) || (i3 = this.morphDuration), Z(n3) || (n3 = this.morphEasing);
- for (var s2 = 0, a2 = r3.length; s2 < a2; s2++) {
- var o3 = r3[s2][0], l2 = r3[s2][1];
- if (this._morphFromPointsReal[s2] = [], this._morphToPointsReal[s2] = [], o3) {
- var h2 = o3, p2 = o3, u2 = this._bboxes[s2];
- this.morphToSingle;
- var d2 = u2.x, c2 = u2.y, f2 = t3, g2 = e4;
- if (tt(f2) || (f2 = u2.width), tt(g2) || (g2 = u2.height), h2 = [{ x: d2, y: c2 }, { x: d2 + f2, y: c2 }, { x: d2 + f2, y: c2 + g2 }, { x: d2, y: c2 + g2 }], h2 = this.addPoints(h2, o3.length), o3.length < 4)
- for (var y2 = o3.length; y2 < 4; y2++)
- h2.push({ x: o3[y2].x, y: o3[y2].y });
- if (l2 && l2.length > 0)
- for (var m2 = u2.x + u2.width / 2, v2 = u2.y + u2.height / 2, b2 = 0, x2 = l2.length; b2 < x2; b2++)
- h2.push({ x: m2, y: v2 });
- this._morphFromPointsReal[s2][0] = p2, this._morphToPointsReal[s2][0] = h2;
- }
- }
- this.morphable.currentPoints = this._morphFromPointsReal;
- var _2 = new ys(this, { property: "morphProgress", from: 0, to: 1 }, i3, n3);
- return this._disposers.push(_2), _2.start(), _2;
- }, Object.defineProperty(e3.prototype, "morphProgress", { get: function() {
- return this._morphProgress;
- }, set: function(t3) {
- this._morphProgress = t3;
- var e4 = [];
- if (t3 != null) {
- var i3 = this._morphFromPointsReal, n3 = this._morphToPointsReal;
- if (i3 != null && n3 != null)
- for (var r3 = 0, s2 = i3.length; r3 < s2; r3++) {
- var a2 = [];
- e4.push(a2);
- var o3 = i3[r3][0], l2 = i3[r3][1], h2 = n3[r3][0], p2 = n3[r3][1];
- if (o3 && o3.length > 0 && h2 && h2.length > 0) {
- for (var u2 = [], d2 = 0, c2 = o3.length; d2 < c2; d2++) {
- var f2 = o3[d2], g2 = h2[d2], y2 = { x: f2.x + (g2.x * this.scaleRatio - f2.x) * t3, y: f2.y + (g2.y * this.scaleRatio - f2.y) * t3 };
- u2.push(y2);
- }
- a2[0] = u2;
- }
- if (l2 && l2.length > 0 && p2 && p2.length > 0) {
- for (var m2 = [], v2 = 0, b2 = l2.length; v2 < b2; v2++)
- f2 = l2[v2], g2 = p2[v2], y2 = { x: f2.x + (g2.x * this.scaleRatio - f2.x) * t3, y: f2.y + (g2.y * this.scaleRatio - f2.y) * t3 }, m2.push(y2);
- a2[1] = m2;
- }
- }
- }
- this.morphable.currentPoints = e4;
- }, enumerable: true, configurable: true }), e3.prototype.morphBack = function(t3, e4) {
- this._morphToPointsReal = this._morphFromPointsReal, this._morphFromPointsReal = this.morphable.currentPoints, Z(t3) || (t3 = this.morphDuration), Z(e4) || (e4 = this.morphEasing);
- var i3 = new ys(this, { property: "morphProgress", from: 0, to: 1 }, t3, e4);
- return this._disposers.push(i3), i3.start(), i3;
- }, Object.defineProperty(e3.prototype, "animations", { get: function() {
- return this._animations || (this._animations = [], this._disposers.push(new gs(this._animations))), this._animations;
- }, enumerable: true, configurable: true }), e3;
- }(yn), Bo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Polygon", e4.element = e4.paper.add("path"), e4.shapeRendering = "auto", e4._currentPoints = [], e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "points", { get: function() {
- var t3 = this.getPropertyValue("points"), e4 = this.path;
- if (e4 && (!t3 || t3.length == 0)) {
- for (var i3 = e4.slice(1, e4.length - 1).split("ZM"), n3 = 0; n3 < i3.length; n3++) {
- var r3 = i3[n3];
- if (r3.length > 0) {
- var s2 = r3.split("M"), a2 = s2[0], o3 = s2[1];
- if (a2 && a2.length > 0) {
- var l2 = a2.split("L");
- if (l2.length > 0) {
- var h2 = [], p2 = [h2];
- t3.push(p2);
- for (var u2 = 0; u2 < l2.length; u2++) {
- var d2 = l2[u2].split(",");
- h2.push({ x: +d2[0], y: +d2[1] });
- }
- if (o3 && o3.length > 0) {
- var c2 = o3.split("L");
- if (c2.length > 0) {
- var f2 = [];
- for (p2.push(f2), u2 = c2.length - 1; u2 >= 0; u2--)
- d2 = c2[u2].split(","), f2.push({ x: +d2[0], y: +d2[1] });
- }
- }
- }
- }
- }
- }
- this.setPropertyValue("points", t3), this._currentPoints = t3;
- }
- return t3;
- }, set: function(t3) {
- this.setPropertyValue("points", t3, true), this._currentPoints = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "currentPoints", { get: function() {
- return this._currentPoints && this._currentPoints.length != 0 || !this.path || (this._currentPoints = this.points), this._currentPoints;
- }, set: function(t3) {
- this._currentPoints != t3 && (this._currentPoints = t3, this.draw());
- }, enumerable: true, configurable: true }), e3.prototype.draw = function() {
- var e4, i3, n3, r3, s2 = "", a2 = this._currentPoints;
- if (a2.length > 0) {
- for (var o3 = 0, l2 = a2.length; o3 < l2; o3++) {
- var h2 = a2[o3][0], p2 = a2[o3][1];
- if (h2 && h2.length > 0) {
- s2 += wo(d2 = h2[0]);
- for (var u2 = 0; u2 < h2.length; u2++)
- s2 += Co(d2 = h2[u2]), (!tt(i3) || i3 < d2.x) && (i3 = d2.x), (!tt(e4) || e4 > d2.x) && (e4 = d2.x), (!tt(n3) || n3 > d2.y) && (n3 = d2.y), (!tt(r3) || r3 < d2.y) && (r3 = d2.y);
- }
- if (p2 && p2.length > 0) {
- var d2;
- s2 += wo(d2 = p2[0]);
- for (var c2 = 0, f2 = p2.length; c2 < f2; c2++)
- s2 += Co(d2 = p2[c2]);
- }
- }
- s2 && (s2 += " Z"), this.bbox.x = e4, this.bbox.y = n3, this.bbox.width = i3 - e4, this.bbox.height = r3 - n3, t2.prototype.setPath.call(this, s2);
- }
- }, e3.prototype.setPath = function(e4) {
- return !!t2.prototype.setPath.call(this, e4) && (this.points = [], this._bbox = this.group.getBBox(), true);
- }, e3.prototype.measureElement = function() {
- }, Object.defineProperty(e3.prototype, "centerPoint", { get: function() {
- return { x: this.bbox.x + this.bbox.width / 2, y: this.bbox.y + this.bbox.height / 2 };
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "morpher", { get: function() {
- return this._morpher || (this._morpher = new Ro(this), this._disposers.push(this._morpher)), this._morpher;
- }, enumerable: true, configurable: true }), e3;
- }(Za);
- Ii.registeredClasses.Polygon = Bo;
- var Ho = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Polyspline", e4.tensionX = 0.5, e4.tensionY = 0.5, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.makePath = function() {
- this._distance = 0;
- var t3 = this.segments, e4 = this.tensionX, i3 = this.tensionY;
- if (this.allPoints = [], t3 && t3.length > 0) {
- var n3 = "";
- this._realSegments = [];
- for (var r3 = 0, s2 = t3.length; r3 < s2; r3++) {
- var a2 = t3[r3], o3 = [];
- if (this._realSegments.push(o3), a2.length > 0) {
- var l2 = a2[0], h2 = a2[a2.length - 1], p2 = false;
- lt(l2.x, 3) == lt(h2.x) && lt(l2.y) == lt(h2.y) && (p2 = true), n3 += wo(a2[0]);
- for (var u2 = 0; u2 < a2.length - 1; u2++) {
- var d2 = a2[u2 - 1], c2 = a2[u2], f2 = a2[u2 + 1], g2 = a2[u2 + 2];
- u2 === 0 ? d2 = a2[u2] : u2 == a2.length - 2 && (g2 = a2[u2 + 1]), g2 || (g2 = f2), u2 === 0 ? d2 = p2 ? a2[a2.length - 2] : a2[r3] : u2 == a2.length - 2 && (g2 = p2 ? a2[1] : a2[u2 + 1]);
- var y2 = Mt(d2, c2, f2, 0, e4, i3), m2 = Lt(0, c2, f2, g2, e4, i3);
- n3 += So(f2, y2, m2);
- var v2 = 1.2 * Math.ceil(Ct(c2, f2, y2, m2, 20)), b2 = c2;
- if (v2 > 0)
- for (var x2 = 0; x2 <= v2; x2++) {
- var _2 = Ft(c2, f2, y2, m2, x2 / v2);
- if (_2.x != b2.x || _2.y != b2.y) {
- o3.push(_2);
- var P2 = lt(Dt(b2, _2), 5);
- this._distance += _t(b2, _2), this.allPoints[Math.floor(this._distance)] = { x: _2.x, y: _2.y, angle: P2 }, b2 = _2;
- }
- }
- else
- o3.push(d2);
- }
- }
- var w2 = this.allPoints;
- if (w2.length > 1) {
- for (var C2 = 0; C2 < w2.length; C2++)
- if (!w2[C2]) {
- if (C2 > 1)
- w2[C2] = w2[C2 - 1];
- else
- for (var O2 = 1; O2 < w2.length; O2++)
- if (w2[O2]) {
- w2[C2] = w2[O2];
- break;
- }
- }
- }
- }
- this.path = n3;
- }
- }, e3.prototype.getClosestPointIndex = function(t3) {
- var e4, i3 = this.allPoints, n3 = 1 / 0;
- if (i3.length > 1)
- for (var r3 = 1; r3 < i3.length; r3++) {
- var s2 = _t(t3, i3[r3]);
- s2 < n3 && (e4 = r3, n3 = s2);
- }
- return e4;
- }, Object.defineProperty(e3.prototype, "tensionX", { get: function() {
- return this.getPropertyValue("tensionX");
- }, set: function(t3) {
- this.setPropertyValue("tensionX", t3), this.makePath();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tensionY", { get: function() {
- return this.getPropertyValue("tensionY");
- }, set: function(t3) {
- this.setPropertyValue("tensionY", t3, true), this.makePath();
- }, enumerable: true, configurable: true }), e3.prototype.positionToPoint = function(t3, e4) {
- var i3 = 0, n3 = this.allPoints, r3 = n3.length;
- if (tt(t3) || (t3 = 0), r3 > 1) {
- if (e4 && r3 > 3) {
- if (t3 < 0) {
- t3 < -0.01 && (t3 = -0.01);
- var s2 = n3[0], a2 = n3[1];
- return { x: o3 = s2.x - (s2.x - a2.x) * r3 * t3, y: l2 = s2.y - (s2.y - a2.y) * r3 * t3, angle: Dt(s2, a2) };
- }
- var o3, l2;
- if (t3 > 1)
- return t3 > 1.01 && (t3 = 1.01), s2 = n3[n3.length - 2], a2 = n3[n3.length - 3], { x: o3 = s2.x + (s2.x - a2.x) * r3 * (t3 - 1), y: l2 = s2.y + (s2.y - a2.y) * r3 * (t3 - 1), angle: Dt(s2, { x: o3, y: l2 }) };
- if (t3 == 1) {
- var h2 = n3[n3.length - 1];
- return { x: h2.x, y: h2.y, angle: h2.angle };
- }
- } else
- t3 < 0 && (t3 = Math.abs(t3), i3 = 180), t3 >= 1 && (t3 = 0.9999999999999);
- var p2;
- return { x: (p2 = n3[Math.floor(t3 * r3)]).x, y: p2.y, angle: p2.angle + i3 };
- }
- return r3 == 1 ? { x: (p2 = n3[0]).x, y: p2.y, angle: p2.angle } : { x: 0, y: 0, angle: 0 };
- }, e3;
- }(jo);
- Ii.registeredClasses.Polyspline = Ho;
- var No = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Slice", e4.setPropertyValue("cornerRadius", 0), e4.setPropertyValue("startAngle", 0), e4.setPercentProperty("innerRadius", 0), e4.setPercentProperty("radius", 0), e4.setPropertyValue("arc", 0), e4.setPropertyValue("shiftRadius", 0), e4.strokeOpacity = 1, e4.setPropertyValue("layout", "none"), e4.slice = e4.createChild(Za), e4.slice.isMeasured = false, e4._disposers.push(e4.slice), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this.radiusY;
- this.radius > 0 && e4 == 0 && (e4 = 0.01), this.slice.path = ko(this.startAngle, this.arc, this.radius, this.pixelInnerRadius, e4, this.cornerRadius, this.innerCornerRadius), this.slice.invalidate(), this.shiftRadius = this.shiftRadius, this.realFill instanceof Sa && this.updateGradient(this.realFill), this.realStroke instanceof Sa && this.updateGradient(this.realStroke);
- }, e3.prototype.updateGradient = function(t3) {
- t3.element.attr({ gradientUnits: "userSpaceOnUse" }), t3.element.attr({ r: this.radius }), t3.cx = 0, t3.cy = 0, t3.element.attr({ radius: this.radius });
- }, Object.defineProperty(e3.prototype, "bbox", { get: function() {
- return this.definedBBox ? this.definedBBox : this.isMeasured ? At([Bt(this.startAngle, this.startAngle + this.arc, this.pixelInnerRadius), Bt(this.startAngle, this.startAngle + this.arc, this.radius)]) : { x: 0, y: 0, width: 0, height: 0 };
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startAngle", { get: function() {
- return this.getPropertyValue("startAngle");
- }, set: function(t3) {
- this.setPropertyValue("startAngle", Et(t3), true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "arc", { get: function() {
- return this.getPropertyValue("arc");
- }, set: function(t3) {
- tt(t3) || (t3 = 0), this.setPropertyValue("arc", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radius", { get: function() {
- var t3 = this.getPropertyValue("radius");
- return tt(t3) || (t3 = 0), t3;
- }, set: function(t3) {
- this.setPropertyValue("radius", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radiusY", { get: function() {
- var t3 = this.getPropertyValue("radiusY");
- return tt(t3) || (t3 = this.radius), t3;
- }, set: function(t3) {
- this.setPropertyValue("radiusY", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- return this.getPropertyValue("innerRadius");
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelInnerRadius", { get: function() {
- return Vn(this.innerRadius, this.radius);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cornerRadius", { get: function() {
- return this.getPropertyValue("cornerRadius");
- }, set: function(t3) {
- this.setPropertyValue("cornerRadius", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerCornerRadius", { get: function() {
- return this.getPropertyValue("innerCornerRadius");
- }, set: function(t3) {
- this.setPropertyValue("innerCornerRadius", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "shiftRadius", { get: function() {
- return this.getPropertyValue("shiftRadius");
- }, set: function(t3) {
- this.setPropertyValue("shiftRadius", t3), t3 = this.getPropertyValue("shiftRadius"), this.dx = t3 * this.radius * this.ix, this.dy = t3 * this.radiusY * this.iy;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "ix", { get: function() {
- return ft(this.middleAngle);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "iy", { get: function() {
- return dt(this.middleAngle);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "middleAngle", { get: function() {
- return this.startAngle + this.arc / 2;
- }, enumerable: true, configurable: true }), e3.prototype.getTooltipX = function() {
- var t3 = this.getPropertyValue("tooltipX");
- if (tt(t3))
- return t3;
- var e4 = 0.5;
- t3 instanceof A && (e4 = t3.value);
- var i3 = Vn(this.innerRadius, this.radius);
- return this.ix * (i3 + (this.radius - i3) * e4);
- }, e3.prototype.getTooltipY = function() {
- var t3 = this.getPropertyValue("tooltipY");
- if (tt(t3))
- return t3;
- var e4 = 0.5;
- t3 instanceof A && (e4 = t3.value);
- var i3 = Vn(this.innerRadius, this.radius);
- return this.iy * (i3 + (this.radius - i3) * e4) + this.slice.dy;
- }, e3;
- }($a);
- Ii.registeredClasses.Slice = No;
- var Wo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "Preloader", e4.width = V(100), e4.height = V(100);
- var i3 = new Ys(), n3 = e4.createChild($a);
- n3.shouldClone = false;
- var r3 = n3.createChild(No);
- r3.shouldClone = false, r3.radius = 53, r3.arc = 360, r3.fill = i3.getFor("fill"), r3.fillOpacity = 0.8, r3.innerRadius = 42, r3.isMeasured = false, e4.backgroundSlice = r3;
- var s2 = n3.createChild(No);
- s2.shouldClone = false, s2.radius = 50, s2.innerRadius = 45, s2.fill = i3.getFor("alternativeBackground"), s2.fillOpacity = 0.2, s2.isMeasured = false, e4.progressSlice = s2;
- var a2 = n3.createChild(co);
- return a2.shouldClone = false, a2.horizontalCenter = "middle", a2.verticalCenter = "middle", a2.isMeasured = false, a2.fill = i3.getFor("text"), a2.align = "center", a2.valign = "middle", a2.textAlign = "middle", a2.fillOpacity = 0.4, e4.label = a2, e4.background.opacity = 1, e4.background.fill = i3.getFor("background"), e4.contentAlign = "center", e4.contentValign = "middle", e4.delay = 300, e4.states.create("hidden").properties.opacity = 0, e4.visible = false, e4.hide(0), e4.__disabled = true, e4._disposers.push(e4.backgroundSlice), e4._disposers.push(e4.progressSlice), e4._disposers.push(e4.label), e4._disposers.push(n3), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "progress", { get: function() {
- return this.getPropertyValue("progress");
- }, set: function(t3) {
- var e4 = this;
- this.__disabled = false, this.validateLayout(), this.setPropertyValue("progress", t3), this.progressSlice.arc = 360 * t3, this.label && (this.label.text = Math.round(100 * t3) + "%"), t3 >= 1 ? (this._started && (this._started = void 0), Ii.events.once("enterframe", function() {
- var t4 = e4.hide();
- t4 && !t4.isFinished() ? t4.events.once("animationended", function() {
- e4.__disabled = true;
- }) : e4.__disabled = true;
- }), this.interactionsEnabled = false, this.setPropertyValue("progress", 0)) : t3 > 0 && (this.delay ? this._started ? this._started + this.delay <= new Date().getTime() && (this.__disabled = false, this.show(), this.interactionsEnabled = true) : this._started = new Date().getTime() : (this.__disabled = false, this.show(), this.interactionsEnabled = true));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "delay", { get: function() {
- return this.getPropertyValue("delay");
- }, set: function(t3) {
- this.setPropertyValue("delay", t3);
- }, enumerable: true, configurable: true }), e3;
- }($a);
- Ii.registeredClasses.Preloader = Wo;
- var Xo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "ResizeButton", e4.orientation = "horizontal", e4.layout = "absolute", e4.horizontalCenter = "middle", e4.verticalCenter = "middle", e4.draggable = true, e4.padding(8, 8, 8, 8), e4.background.cornerRadius(20, 20, 20, 20);
- var i3 = new Za();
- i3.element = e4.paper.add("path");
- var n3 = wo({ x: -2, y: -6 });
- return n3 += Co({ x: -2, y: 6 }), n3 += wo({ x: 2, y: -6 }), n3 += Co({ x: 2, y: 6 }), i3.path = n3, i3.pixelPerfect = true, i3.padding(0, 4, 0, 4), i3.stroke = new Ys().getFor("alternativeText"), i3.strokeOpacity = 0.7, e4.icon = i3, e4.label.dispose(), e4.label = void 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "orientation", { set: function(t3) {
- var e4 = this.icon;
- e4 && (e4.rotation = t3 == "horizontal" ? 0 : -90);
- }, enumerable: true, configurable: true }), e3;
- }(go);
- Ii.registeredClasses.ResizeButton = Xo;
- var Yo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "CloseButton", e4.padding(8, 8, 8, 8), e4.showSystemTooltip = true, e4.width = 30, e4.height = 30;
- var i3 = new Ys();
- e4.cursorOverStyle = Ia.pointer;
- var n3 = e4.background;
- n3.cornerRadius(20, 20, 20, 20);
- var r3 = i3.getFor("background");
- n3.fill = r3, n3.stroke = i3.getFor("primaryButton"), n3.strokeOpacity = 1, n3.strokeWidth = 1;
- var s2 = i3.getFor("primaryButtonActive"), a2 = n3.states.getKey("hover");
- a2.properties.strokeWidth = 3, a2.properties.fill = r3;
- var o3 = n3.states.getKey("down");
- o3.properties.stroke = s2, o3.properties.fill = r3;
- var l2 = new Za();
- return l2.element = e4.paper.add("path"), l2.stroke = n3.stroke, e4.icon = l2, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.validate = function() {
- t2.prototype.validate.call(this);
- var e4 = this.pixelWidth / 3, i3 = this.pixelHeight / 3, n3 = wo({ x: -e4 / 2, y: -i3 / 2 });
- n3 += Co({ x: e4 / 2, y: i3 / 2 }), n3 += wo({ x: e4 / 2, y: -i3 / 2 }), n3 += Co({ x: -e4 / 2, y: i3 / 2 }), this.icon.path = n3, this.invalidateLayout();
- }, e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Close"));
- }, e3;
- }(go);
- Ii.registeredClasses.CloseButton = Yo;
- var zo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "SwitchButton", e4.tooltipY = 0, e4.layout = "horizontal", e4.contentAlign = "center", e4.contentValign = "middle", e4.padding(8, 16, 8, 16), e4.setStateOnChildren = true, e4.states.create("active");
- var i3 = new Ys(), n3 = new co();
- n3.fillOpacity = 0.3, n3.states.create("active").properties.fillOpacity = 1, n3.isActive = true, e4.leftLabel = n3;
- var r3 = new go(), s2 = new yo();
- r3.contentValign = "none", r3.padding(0, 0, 0, 0), s2.radius = 10, r3.icon = s2, r3.icon.valign = "middle", r3.label = void 0;
- var a2 = V(100);
- r3.background.cornerRadius(a2, a2, a2, a2), r3.width = 3.5 * s2.radius, r3.height = 2.1 * s2.radius, r3.marginLeft = 8, r3.marginRight = 8, r3.togglable = true, s2.dx = 0.7 * -s2.radius, s2.fill = i3.getFor("primaryButton"), s2.states.create("hover").properties.fill = i3.getFor("primaryButtonHover");
- var o3 = s2.states.create("active");
- o3.properties.fill = i3.getFor("primaryButtonActive"), o3.properties.dx = 0.7 * s2.radius, e4.switchButton = r3, e4.events.on("toggled", function() {
- e4.leftLabel.isActive = !e4.isActive, e4.rightLabel.isActive = e4.isActive;
- });
- var l2 = new co();
- return l2.fillOpacity = 0.3, l2.states.create("active").properties.fillOpacity = 1, e4.rightLabel = l2, e4.role = "button", e4.focusable = true, l2.valign = "middle", n3.valign = "middle", r3.valign = "middle", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "leftLabel", { get: function() {
- return this._leftLabel;
- }, set: function(t3) {
- this._leftLabel && this.removeDispose(this._leftLabel), this._leftLabel = t3, t3 && (t3.parent = this, t3.interactionsEnabled = false, t3.shouldClone = false, this._disposers.push(this._leftLabel));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "rightLabel", { get: function() {
- return this._rightLabel;
- }, set: function(t3) {
- this._rightLabel && this.removeDispose(this._rightLabel), this._rightLabel = t3, t3 && (t3.parent = this, t3.interactionsEnabled = false, t3.shouldClone = false, this._disposers.push(this._rightLabel));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "switch", { get: function() {
- return this._switchButton;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "switchButton", { get: function() {
- return this._switchButton;
- }, set: function(t3) {
- this._switchButton && this.removeDispose(this._switchButton), this._switchButton = t3, t3 && (t3.parent = this, t3.shouldClone = false, this._disposers.push(this._switchButton));
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), e4.leftLabel && this.leftLabel.copyFrom(e4.leftLabel), e4.rightLabel && this.rightLabel.copyFrom(e4.rightLabel), e4.switchButton && this.switchButton.copyFrom(e4.switchButton);
- }, e3;
- }($a);
- Ii.registeredClasses.SwitchButton = zo;
- var Uo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._previousStart = 0, e4._previousEnd = 1, e4._prevStart = 0, e4._prevEnd = 1, e4._isBusy = false, e4._skipRangeEvents = false, e4.updateWhileMoving = true, e4.className = "Scrollbar", e4.minHeight = 12, e4.minWidth = 12, e4.animationDuration = 0, e4.animationEasing = zr, e4.margin(10, 10, 10, 10);
- var i3 = new Ys(), n3 = e4.background;
- return n3.cornerRadius(10, 10, 10, 10), n3.fill = i3.getFor("fill"), n3.fillOpacity = 0.5, e4.showSystemTooltip = true, e4.startGrip = new Xo(), e4.endGrip = new Xo(), e4.events.on("transformed", function() {
- e4.updateThumb();
- }, e4, false), e4.start = 0, e4.end = 1, e4.role = "scrollbar", e4.thumb.role = "slider", e4.thumb.readerLive = "polite", e4.startGrip.role = "slider", e4.endGrip.role = "slider", e4.events.once("inited", function() {
- e4._previousStart = void 0, e4.dispatchRangeChange();
- }, void 0, false), e4.hideGrips = false, e4.orientation = "horizontal", e4.setSVGAttribute({ "aria-valuemin": "0" }), e4.setSVGAttribute({ "aria-valuemax": "100" }), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), this.orientation === "horizontal" ? (Z(this.readerTitle) || (this.readerTitle = this.language.translate("Use TAB to select grip buttons or left and right arrows to change selection")), Z(this.thumb.readerDescription) || (this.thumb.readerDescription = this.language.translate("Use left and right arrows to move selection")), Z(this.startGrip.readerDescription) || (this.startGrip.readerDescription = this.language.translate("Use left and right arrows to move left selection")), Z(this.endGrip.readerDescription) || (this.endGrip.readerDescription = this.language.translate("Use left and right arrows to move right selection")), this.readerOrientation = "horizontal") : (Z(this.readerTitle) || (this.readerTitle = this.language.translate("Use TAB select grip buttons or up and down arrows to change selection")), Z(this.thumb.readerDescription) || (this.thumb.readerDescription = this.language.translate("Use up and down arrows to move selection")), Z(this.startGrip.readerDescription) || (this.startGrip.readerDescription = this.language.translate("Use up and down arrows to move upper selection")), Z(this.endGrip.readerDescription) || (this.endGrip.readerDescription = this.language.translate("Use up and down arrows to move lower selection")), this.readerOrientation = "vertical"), this.readerControls = this.baseSprite.uidAttr();
- }, e3.prototype.validateLayout = function() {
- this.updateSize(), t2.prototype.validateLayout.call(this), this.updateExtremes();
- }, e3.prototype.processBackground = function() {
- t2.prototype.processBackground.call(this);
- var e4 = this.background;
- e4.clickable = true, e4.events.on("hit", this.handleBgHit, this, void 0);
- }, e3.prototype.handleBgHit = function(t3) {
- this.makeBusy();
- var e4 = t3.spritePoint;
- e4 = dr(e4, this.background, this);
- var i3 = this.thumb;
- if (this.orientation == "horizontal") {
- var n3 = e4.x - i3.pixelWidth / 2;
- n3 = ut(n3, 0, this.innerWidth - i3.pixelWidth), this._thumbAnimation = i3.animate({ property: "x", to: n3 }, this.animationDuration, this.animationEasing);
- } else {
- var r3 = e4.y - i3.pixelHeight / 2;
- r3 = ut(r3, 0, this.innerHeight - i3.pixelHeight), this._thumbAnimation = i3.animate({ property: "y", to: r3 }, this.animationDuration, this.animationEasing);
- }
- this.animationDuration > 0 ? this._thumbAnimation.events.on("animationended", this.makeUnbusy, this, false) : (this._thumb.validate(), this.makeUnbusy());
- }, e3.prototype.makeBusy = function() {
- this._isBusy = true, this._skipRangeEvents = false, this._unbusyTimeout && this.removeDispose(this._unbusyTimeout), this._unbusyTimeout = void 0, this.stopAnimations();
- }, e3.prototype.stopAnimations = function() {
- this._thumbAnimation && this._thumbAnimation.stop(true), this._zoomAnimation && this._zoomAnimation.stop(true);
- }, e3.prototype.makeUnbusy = function() {
- this._unbusyTimeout = this.setTimeout(this.makeUnbusyReal.bind(this), 1.1 * this.animationDuration);
- }, e3.prototype.makeUnbusyReal = function() {
- this._usingGrip = void 0, this._isBusy = false, this.updateWhileMoving || this.dispatchRangeChange();
- }, e3.prototype.dispatchRangeChange = function() {
- this._previousEnd == this.end && this._previousStart == this.start || (this._previousStart = this.start, this._previousEnd = this.end, this.dispatch("rangechanged"));
- }, e3.prototype.updateThumb = function(t3) {
- if (t3 === void 0 && (t3 = true), this.parent) {
- var e4 = this.thumb, i3 = this.start, n3 = this.end, r3 = this.startGrip, s2 = this.endGrip;
- if (this.orientation == "horizontal") {
- var a2 = this.innerWidth;
- e4.width = a2 * (n3 - i3), e4.maxX = a2 - e4.pixelWidth, e4.x = i3 * a2, r3.moveTo({ x: e4.pixelX, y: 0 }, void 0, void 0, true), s2.moveTo({ x: e4.pixelX + e4.pixelWidth, y: 0 }, void 0, void 0, true), r3.readerTitle = this.language.translate("From %1", void 0, this.adapter.apply("positionValue", { value: Math.round(100 * i3) + "%", position: i3 }).value), r3.readerValueNow = "" + Math.round(100 * i3), r3.readerValueText = r3.readerTitle, s2.readerTitle = this.language.translate("To %1", void 0, this.adapter.apply("positionValue", { value: Math.round(100 * n3) + "%", position: n3 }).value), s2.readerValueNow = "" + Math.round(100 * n3), s2.readerValueText = s2.readerTitle;
- } else {
- var o3 = this.innerHeight;
- e4.height = o3 * (n3 - i3), e4.maxY = o3 - e4.pixelHeight, e4.y = (1 - n3) * o3, r3.moveTo({ x: 0, y: e4.pixelY + e4.pixelHeight }, void 0, void 0, true), s2.moveTo({ x: 0, y: e4.pixelY }, void 0, void 0, true), r3.readerTitle = this.language.translate("To %1", void 0, this.adapter.apply("positionValue", { value: Math.round(100 * (1 - i3)) + "%", position: 1 - i3 }).value), r3.readerValueNow = "" + Math.round(100 * i3), r3.readerValueText = r3.readerTitle, s2.readerTitle = this.language.translate("From %1", void 0, this.adapter.apply("positionValue", { value: Math.round(100 * (1 - n3)) + "%", position: 1 - n3 }).value), s2.readerValueNow = "" + Math.round(100 * n3), s2.readerValueText = s2.readerTitle;
- }
- e4.readerTitle = this.language.translate("From %1 to %2", void 0, this.adapter.apply("positionValue", { value: Math.round(100 * i3) + "%", position: i3 }).value, this.adapter.apply("positionValue", { value: Math.round(100 * n3) + "%", position: n3 }).value), e4.readerValueNow = "" + Math.round(100 * i3), e4.readerValueText = e4.readerTitle, this.readerValueNow = "" + Math.round(100 * i3), this.readerValueText = e4.readerTitle, !this._skipRangeEvents && this.updateWhileMoving && t3 && this.dispatchRangeChange();
- }
- }, e3.prototype.updateExtremes = function() {
- var t3 = 0, e4 = 0, i3 = 0, n3 = 0;
- this.orientation == "horizontal" ? (i3 = this.innerWidth, e4 = n3 = this.innerHeight / 2) : (n3 = this.innerHeight, t3 = i3 = this.innerWidth / 2);
- var r3 = this.startGrip;
- r3.minX = t3, r3.maxX = i3, r3.minY = e4, r3.maxY = n3;
- var s2 = this.endGrip;
- s2.minX = t3, s2.maxX = i3, s2.minY = e4, s2.maxY = n3;
- var a2 = this.thumb;
- a2.minX = t3, a2.maxX = i3, a2.minY = e4, a2.maxY = n3;
- }, e3.prototype.updateSize = function() {
- var t3 = this.orientation, e4 = this.startGrip;
- e4 && (e4.orientation = t3), this.endGrip && (this.endGrip.orientation = t3);
- var i3 = this.thumb;
- i3 && (t3 == "horizontal" ? (tt(this._pixelWidth) || this.width instanceof A || (this.width = V(100)), Z(this.percentHeight) && (this.height = this.minHeight), i3.height = this.innerHeight, i3.verticalCenter = "middle", i3.horizontalCenter = "left") : (tt(this._pixelHeight) || this.height instanceof A || (this.height = V(100)), Z(this.percentWidth) && (this.width = this.minWidth), i3.width = this.innerWidth, i3.verticalCenter = "top", i3.horizontalCenter = "middle"));
- }, Object.defineProperty(e3.prototype, "isBusy", { get: function() {
- return this._isBusy;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "start", { get: function() {
- return Math.min(this.getPosition(this._start), this.getPosition(this._end));
- }, set: function(t3) {
- this._isBusy || (this.__start = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "__start", { get: function() {
- return this._start;
- }, set: function(t3) {
- this._start = this.getPosition(t3), this.updateThumb();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "end", { get: function() {
- return Math.max(this.getPosition(this._start), this.getPosition(this._end));
- }, set: function(t3) {
- this._isBusy || (this.__end = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "__end", { get: function() {
- return this._end;
- }, set: function(t3) {
- this._end = this.getPosition(t3), this.updateThumb();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "range", { get: function() {
- return { start: this.start, end: this.end, priority: this._usingGrip };
- }, enumerable: true, configurable: true }), e3.prototype.skipRangeEvents = function() {
- this._isBusy || (this._skipRangeEvents = true);
- }, e3.prototype.fixRange = function(t3) {
- t3.start == lt(this._start, 2) && t3.end == lt(this._end, 2) || (this._start = t3.start, this._end = t3.end, this._skipRangeEvents = true, this.updateThumb(), this._skipRangeEvents = false, this.thumb.validate(), this.thumb.background.validate());
- }, e3.prototype.getPosition = function(t3) {
- return ut(lt(t3, 4), 0, 1);
- }, Object.defineProperty(e3.prototype, "orientation", { get: function() {
- return this.getPropertyValue("orientation");
- }, set: function(t3) {
- this.setPropertyValue("orientation", t3) && (t3 === "horizontal" ? (this.startGrip.cursorOverStyle = Ia.horizontalResize, this.endGrip.cursorOverStyle = Ia.horizontalResize) : (this.startGrip.cursorOverStyle = Ia.verticalResize, this.endGrip.cursorOverStyle = Ia.verticalResize), this.updateByOrientation(), this.invalidate());
- }, enumerable: true, configurable: true }), e3.prototype.updateByOrientation = function() {
- }, Object.defineProperty(e3.prototype, "startGrip", { get: function() {
- return this._startGrip;
- }, set: function(t3) {
- this._startGrip && this.removeDispose(this._startGrip), this._startGrip = t3, this.processGrip(t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endGrip", { get: function() {
- return this._endGrip;
- }, set: function(t3) {
- this._endGrip && this.removeDispose(this._endGrip), this._endGrip = t3, this.processGrip(t3);
- }, enumerable: true, configurable: true }), e3.prototype.processGrip = function(t3) {
- t3.parent = this, t3.isMeasured = false, t3.focusable = true, t3.shouldClone = false, t3.zIndex = 100, t3.events.on("drag", this.handleGripDrag, this, false), t3.events.on("dragstop", this.makeUnbusy, this, false), t3.events.on("down", this.makeBusy, this, false), t3.events.on("up", this.makeUnbusy, this, false), this._disposers.push(t3);
- }, e3.prototype.handleGripDrag = function(t3) {
- this.makeBusy(), t3.target === this._startGrip ? this._usingGrip = "start" : this._usingGrip = "end", this.orientation == "horizontal" ? (this._start = this.startGrip.pixelX / this.innerWidth, this._end = this.endGrip.pixelX / this.innerWidth) : (this._start = 1 - this.startGrip.pixelY / this.innerHeight, this._end = 1 - this.endGrip.pixelY / this.innerHeight), this.updateThumb();
- }, Object.defineProperty(e3.prototype, "thumb", { get: function() {
- if (!this._thumb) {
- var t3 = new go();
- t3.background.cornerRadius(10, 10, 10, 10), t3.padding(0, 0, 0, 0), this.thumb = t3;
- }
- return this._thumb;
- }, set: function(t3) {
- var e4 = this;
- t3 && (this._thumb && this.removeDispose(this._thumb), this._thumb = t3, t3.parent = this, t3.isMeasured = false, t3.inert = true, t3.draggable = true, t3.clickable = true, t3.hoverable = true, t3.focusable = true, t3.shouldClone = false, t3.zIndex = 0, t3.cursorOverStyle = Ia.grab, t3.cursorDownStyle = Ia.grabbing, t3.events.on("dragstart", this.makeBusy, this, false), t3.events.on("dragstop", this.makeUnbusy, this, false), t3.events.on("positionchanged", this.handleThumbPosition, this, false), t3.events.on("sizechanged", this.handleThumbPosition, this, false), t3.events.on("doublehit", this.handleDoubleClick, this, false), this._disposers.push(ua().body.events.on("keyup", function(t4) {
- $s.isKey(t4.event, ["space", "enter"]) && e4.thumb.isFocused && (t4.event.preventDefault(), e4.handleDoubleClick());
- })), this._disposers.push(this._thumb));
- }, enumerable: true, configurable: true }), e3.prototype.handleDoubleClick = function() {
- this.makeBusy();
- var t3 = 0, e4 = 1;
- this.start != 0 || this.end != 1 ? (this._prevStart = this.start, this._prevEnd = this.end) : (t3 = this._prevStart, e4 = this._prevEnd);
- var i3 = this.animate([{ property: "__start", to: t3 }, { property: "__end", to: e4 }], this.animationDuration, this.animationEasing);
- i3 && !i3.isFinished() ? (i3.events.on("animationended", this.makeUnbusy, this, false), this._zoomAnimation = i3) : this.makeUnbusy();
- }, e3.prototype.handleThumbPosition = function() {
- var t3 = this.thumb;
- if (this.orientation == "horizontal") {
- var e4 = this.innerWidth, i3 = t3.innerWidth, n3 = t3.pixelX;
- this._start = n3 / e4, this._end = (n3 + i3) / e4, this.updateThumb();
- } else {
- var r3 = this.innerHeight, s2 = t3.innerHeight, a2 = t3.pixelY;
- this._start = 1 - (a2 + s2) / r3, this._end = 1 - a2 / r3, this.updateThumb();
- }
- }, e3.prototype.createBackground = function() {
- return new fo();
- }, Object.defineProperty(e3.prototype, "hideGrips", { get: function() {
- return this._hideGrips;
- }, set: function(t3) {
- var e4 = this;
- this._hideGrips = t3, this._overDisposer && this.removeDispose(this._overDisposer), this._outDisposer && this.removeDispose(this._outDisposer), t3 ? (this._overDisposer = this.events.on("over", function() {
- e4.startGrip.show(), e4.endGrip.show();
- }, void 0, false), this._outDisposer = this.events.on("out", function() {
- e4.startGrip.hide(), e4.endGrip.hide();
- }, void 0, false), this.startGrip.hide(), this.endGrip.hide()) : (this.startGrip.show(), this.endGrip.show());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "animationDuration", { get: function() {
- return this.getPropertyValue("animationDuration");
- }, set: function(t3) {
- this.setPropertyValue("animationDuration", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "animationEasing", { get: function() {
- return this.getPropertyValue("animationEasing");
- }, set: function(t3) {
- this.setPropertyValue("animationEasing", t3);
- }, enumerable: true, configurable: true }), e3.prototype.asFunction = function(e4) {
- return e4 == "animationEasing" || t2.prototype.asIs.call(this, e4);
- }, e3;
- }($a);
- Ii.registeredClasses.Scrollbar = Uo;
- var Go = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Slider", e4.thumb.opacity = 0, e4.thumb.interactionsEnabled = false, e4.endGrip.opacity = 0, e4.endGrip.interactionsEnabled = false, e4.startGrip.events.on("drag", function() {
- e4.endGrip.x = e4.startGrip.x, e4.endGrip.y = e4.startGrip.y;
- }), e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "__end", { get: function() {
- return this._start;
- }, set: function(t3) {
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "end", { get: function() {
- return this._start;
- }, set: function(t3) {
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "start", { get: function() {
- return this._start;
- }, set: function(t3) {
- this._isBusy || (this.__start = t3);
- }, enumerable: true, configurable: true }), e3;
- }(Uo);
- Ii.registeredClasses.Slider = Go;
- var Ko = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "TextLink", e4.selectable = true;
- var i3 = new Ys();
- return e4.fill = i3.getFor("primaryButton").brighten(0.3), e4.states.create("hover").properties.fill = i3.getFor("primaryButtonHover").brighten(0.3), e4.states.create("down").properties.fill = i3.getFor("primaryButtonDown").brighten(0.3), e4.cursorOverStyle = Ia.pointer, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(co);
- Ii.registeredClasses.TextLink = Ko;
- var Zo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.properties = {}, e4.isTemplate = false, e4._scale = 1, e4._nonScaling = true, e4.className = "Filter", e4.filterPrimitives = new Fi(), e4.properties.filterUnits = "objectBoundingBox", e4.filterPrimitives.events.on("inserted", function(t3) {
- e4._disposers.push(t3.newValue);
- }), e4.width = 120, e4.height = 120, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.appendPrimitives = function(t3) {
- ti(this.filterPrimitives.iterator(), function(e4) {
- t3.add(e4);
- });
- }, e3.prototype.animate = function(t3, e4, i3) {
- return new ys(this, t3, e4, i3).start();
- }, Object.defineProperty(e3.prototype, "width", { get: function() {
- return this.properties.width;
- }, set: function(t3) {
- this.properties.width = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "height", { get: function() {
- return this.properties.height;
- }, set: function(t3) {
- this.properties.height = t3;
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- var i3 = this;
- t2.prototype.copyFrom.call(this, e4), Ne(e4.properties, function(t3, e5) {
- i3[t3] = e5;
- });
- }, Object.defineProperty(e3.prototype, "paper", { get: function() {
- return this._paper ? this._paper : wa();
- }, set: function(t3) {
- this._paper != t3 && (this._paper = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "animations", { get: function() {
- return this._animations || (this._animations = [], this._disposers.push(new gs(this._animations))), this._animations;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "scale", { get: function() {
- return this._scale;
- }, set: function(t3) {
- this._scale = t3, this.updateScale();
- }, enumerable: true, configurable: true }), e3.prototype.updateScale = function() {
- }, Object.defineProperty(e3.prototype, "filterUnits", { get: function() {
- return this.properties.filterUnits;
- }, set: function(t3) {
- this.properties.filterUnits = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "nonScaling", { get: function() {
- return this._nonScaling;
- }, set: function(t3) {
- this._nonScaling = t3, t3 || (this._scale = 1), this.updateScale();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "sprite", { set: function(t3) {
- this.setSprite(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setSprite = function(t3) {
- this._sprite && this._sprite != t3 && this._sprite.filters.removeValue(this), this._sprite = t3;
- }, e3;
- }(yn), qo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "DropShadowFilter", e4.color = dn("#000"), e4.feGaussianBlur = e4.paper.add("feGaussianBlur"), e4.feGaussianBlur.attr({ result: "blurOut", in: "SourceGraphic" }), e4.filterPrimitives.push(e4.feGaussianBlur), e4.feOffset = e4.paper.add("feOffset"), e4.feOffset.attr({ result: "offsetBlur" }), e4.filterPrimitives.push(e4.feOffset), e4.feFlood = e4.paper.add("feFlood"), e4.feFlood.attr({ "flood-color": e4.color }), e4.filterPrimitives.push(e4.feFlood), e4.feComposite = e4.paper.add("feComposite"), e4.feComposite.attr({ in2: "offsetBlur", operator: "in" }), e4.filterPrimitives.push(e4.feComposite), e4.feMerge = e4.paper.addGroup("feMerge"), e4.feMerge.add(e4.paper.add("feMergeNode")), e4.feMerge.add(e4.paper.add("feMergeNode").attr({ in: "SourceGraphic" })), e4.filterPrimitives.push(e4.feMerge), e4.width = 200, e4.height = 200, e4.blur = 1.5, e4.dx = 3, e4.dy = 3, e4.opacity = 0.5, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "color", { get: function() {
- return this.properties.color;
- }, set: function(t3) {
- this.properties.color = t3, this.feFlood && this.feFlood.attr({ "flood-color": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "opacity", { get: function() {
- return this.properties.opacity;
- }, set: function(t3) {
- this.properties.opacity = t3, this.feFlood.attr({ "flood-opacity": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dx", { get: function() {
- return this.properties.dx;
- }, set: function(t3) {
- this.properties.dx = t3, this.feOffset.attr({ dx: t3 / this.scale });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dy", { get: function() {
- return this.properties.dy;
- }, set: function(t3) {
- this.properties.dy = t3, this.feOffset.attr({ dy: t3 / this.scale });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "blur", { get: function() {
- return this.properties.blur;
- }, set: function(t3) {
- this.properties.blur = t3, this.feGaussianBlur.attr({ stdDeviation: t3 / this.scale });
- }, enumerable: true, configurable: true }), e3.prototype.updateScale = function() {
- this.dx = this.dx, this.dy = this.dy, this.blur = this.blur;
- }, e3;
- }(Zo);
- Ii.registeredClasses.DropShadowFilter = qo;
- var $o = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._boundingRect = { x: -4e4, y: -4e4, width: 8e4, height: 8e4 }, e4._pointTo = { x: 0, y: 0 }, e4.fitPointerToBounds = false, e4._verticalOrientation = "up", e4.fixDoc = true, e4.className = "Tooltip", e4.isMeasured = false, e4.getFillFromObject = true, e4.margin(5, 5, 5, 5), e4.defaultState.transitionDuration = 1, e4.hiddenState.transitionDuration = 1;
- var i3 = e4.background;
- i3.interactionsEnabled = false, i3.fillOpacity = 0.9, i3.strokeWidth = 1, i3.strokeOpacity = 1, i3.stroke = dn("#ffffff"), i3.cornerRadius = 3, i3.pointerLength = 6, i3.pointerBaseWidth = 10;
- var n3 = new qo();
- n3.dy = 1, n3.dx = 1, n3.opacity = 0.5, i3.filters.push(n3), e4.autoTextColor = true;
- var r3 = e4.createChild(co);
- return r3.shouldClone = false, e4.label = r3, r3.padding(7, 12, 4, 12), r3.interactionsEnabled = false, r3.horizontalCenter = "middle", r3.fill = dn("#ffffff"), e4._disposers.push(r3), e4.label.events.on("sizechanged", e4.drawBackground, e4), e4.label.zIndex = 1, e4.pointerOrientation = "vertical", e4.animationDuration = 0, e4.animationEasing = zr, e4.setPropertyValue("showInViewport", false), e4.role = "tooltip", e4.visible = false, e4.opacity = 0, e4.x = 0, e4.y = 0, e4.events.on("visibilitychanged", e4.handleVisibility, e4), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.handleVisibility = function() {
- this.visible && this.label.invalidate();
- }, Object.defineProperty(e3.prototype, "getStrokeFromObject", { get: function() {
- return this.getPropertyValue("getStrokeFromObject");
- }, set: function(t3) {
- this.setPropertyValue("getStrokeFromObject", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "autoTextColor", { get: function() {
- return this.getPropertyValue("autoTextColor");
- }, set: function(t3) {
- this.setPropertyValue("autoTextColor", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "keepTargetHover", { get: function() {
- return this.getPropertyValue("keepTargetHover");
- }, set: function(t3) {
- var e4 = this;
- this.setPropertyValue("keepTargetHover", t3, true) && t3 && (this.hoverable = true, this.background.interactionsEnabled = true, this._disposers.push(this.events.on("over", function(t4) {
- e4.targetSprite && e4.targetSprite.hoverable && (e4.targetSprite.isHover = true);
- })), this._disposers.push(this.events.on("out", function(t4) {
- e4.targetSprite && e4.targetSprite.hoverable && (e4.targetSprite.isHover = false);
- })));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "showInViewport", { get: function() {
- return this.getPropertyValue("showInViewport");
- }, set: function(t3) {
- this.setPropertyValue("showInViewport", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "getFillFromObject", { get: function() {
- return this.getPropertyValue("getFillFromObject");
- }, set: function(t3) {
- this.setPropertyValue("getFillFromObject", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.createBackground = function() {
- return new _o();
- }, Object.defineProperty(e3.prototype, "pointerOrientation", { get: function() {
- return this.getPropertyValue("pointerOrientation");
- }, set: function(t3) {
- this.setPropertyValue("pointerOrientation", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "animationDuration", { get: function() {
- return this.getPropertyValue("animationDuration");
- }, set: function(t3) {
- this.setPropertyValue("animationDuration", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "animationEasing", { get: function() {
- return this.getPropertyValue("animationEasing");
- }, set: function(t3) {
- this.setPropertyValue("animationEasing", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "html", { get: function() {
- return this.label.html;
- }, set: function(t3) {
- this.label.html != t3 && (this.label.html = t3, this.invalidate());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "text", { get: function() {
- return this.label.text;
- }, set: function(t3) {
- this.label.text != t3 && (this.label.text = t3, this.invalidate());
- }, enumerable: true, configurable: true }), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this.label;
- e4.invalid && e4.validate();
- var i3, n3, r3 = this._pointTo.x, s2 = this._pointTo.y, a2 = this._boundingRect, o3 = e4.measuredWidth, l2 = e4.measuredHeight, h2 = this.background.pointerLength;
- if (this.ignoreBounds && (a2 = void 0), a2 && this.fixDoc && o3 > a2.width) {
- vr({ x: a2.x, y: a2.y }, this.parent);
- var p2 = vr({ x: a2.x + a2.width, y: a2.y + a2.height }, this.parent), u2 = document.body.offsetWidth;
- document.body.offsetHeight, p2.x > u2 / 2 ? a2.x = a2.width - o3 : a2.width = a2.x + o3;
- }
- var d2 = this.pointerOrientation;
- d2 == "horizontal" || d2 == "left" || d2 == "right" ? (n3 = -l2 / 2, i3 = d2 == "horizontal" ? a2 && r3 > a2.x + a2.width / 2 ? -o3 / 2 - h2 : o3 / 2 + h2 : d2 == "left" ? o3 / 2 + h2 : -o3 / 2 - h2) : (a2 && (i3 = ut(0, a2.x - r3 + o3 / 2, a2.x - r3 + a2.width - o3 / 2)), d2 == "vertical" ? a2 && s2 > a2.y + l2 + h2 ? (n3 = -l2 - h2, this._verticalOrientation = "up") : (n3 = h2, this._verticalOrientation = "down") : d2 == "down" ? (n3 = -l2 - h2, this._verticalOrientation = "up") : (n3 = h2, this._verticalOrientation = "down")), a2 && (n3 = ut(n3, a2.y - s2, a2.y + a2.height - l2 - s2)), e4.x = i3, e4.y = n3, this.drawBackground();
- }, e3.prototype.updateBackground = function() {
- this.group.addToBack(this.background.group);
- }, e3.prototype.drawBackground = function() {
- var t3 = this.label, e4 = this.background, i3 = t3.measuredWidth, n3 = t3.measuredHeight, r3 = this._boundingRect, s2 = i3, a2 = t3.pixelX - i3 / 2, o3 = n3, l2 = t3.pixelY, h2 = this._pointTo.x, p2 = this._pointTo.y, u2 = r3.x - h2, d2 = u2 + r3.width, c2 = r3.y - p2, f2 = c2 + r3.height;
- e4.x = a2, e4.y = l2, e4.width = s2, e4.height = o3, this.fitPointerToBounds ? (e4.pointerX = ut(-e4.x, u2 - e4.x, d2 - e4.x), e4.pointerY = ut(-e4.y, c2 - e4.y, f2 - e4.y)) : (e4.pointerX = -e4.x, e4.pointerY = -e4.y), e4.validate();
- }, e3.prototype.delayedPointTo = function(t3, e4) {
- var i3 = this;
- this._pointToDisposer && this._pointToDisposer.dispose(), this._pointToDisposer = Ii.events.once("exitframe", function() {
- i3.pointTo(t3, e4);
- }), this.addDisposer(this._pointToDisposer);
- }, e3.prototype.pointTo = function(t3, e4) {
- this._pointTo.x == t3.x && this._pointTo.y == t3.y || (this._pointTo = t3, this.invalidate(), !this.visible || e4 ? (this.moveTo(this._pointTo), this._animation && this._animation.kill()) : this.pixelX == 0 && this.pixelY == 0 ? this.moveTo(this._pointTo) : (this._animation && this._animation.kill(), this._animation = new ys(this, [{ property: "x", to: t3.x, from: this.pixelX }, { property: "y", to: t3.y, from: this.pixelY }], this.animationDuration, this.animationEasing).start()));
- }, e3.prototype.setBounds = function(t3) {
- var e4 = this._boundingRect;
- e4.x == t3.x && e4.y == t3.y && e4.width == t3.width && e4.height == t3.height || (this._boundingRect = t3, this.invalidate());
- }, Object.defineProperty(e3.prototype, "boundingContainer", { set: function(t3) {
- this._boundingContainer = t3, t3.events.on("sizechanged", this.updateBounds, this), t3.events.on("positionchanged", this.updateBounds, this);
- }, enumerable: true, configurable: true }), e3.prototype.updateBounds = function() {
- var t3 = this._boundingContainer, e4 = fr({ x: t3.pixelX, y: t3.pixelY, width: t3.maxWidth, height: t3.maxHeight }, t3);
- this.setBounds(e4);
- }, Object.defineProperty(e3.prototype, "ignoreBounds", { get: function() {
- return this.getPropertyValue("ignoreBounds");
- }, set: function(t3) {
- this.setPropertyValue("ignoreBounds", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "verticalOrientation", { get: function() {
- return this._verticalOrientation;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltip", { get: function() {
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.label.copyFrom(e4.label), e4._boundingRect && (this._boundingRect = e4._boundingRect);
- }, e3.prototype.asFunction = function(e4) {
- return e4 == "animationEasing" || t2.prototype.asIs.call(this, e4);
- }, e3;
- }($a);
- Ii.registeredClasses.Tooltip = $o;
- var Jo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Trapezoid", e4.element = e4.paper.add("path"), e4.topSide = V(100), e4.bottomSide = V(100), e4.leftSide = V(100), e4.rightSide = V(100), e4.isMeasured = false, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this.pixelWidth, i3 = this.pixelHeight, n3 = Vn(this.topSide, e4), r3 = Vn(this.bottomSide, e4), s2 = Vn(this.leftSide, i3), a2 = Vn(this.rightSide, i3), o3 = (e4 - n3) / 2, l2 = (i3 - s2) / 2, h2 = e4 - (e4 - n3) / 2, p2 = (i3 - a2) / 2, u2 = e4 - (e4 - r3) / 2, d2 = i3 - (i3 - a2) / 2, c2 = (e4 - r3) / 2, f2 = i3 - (i3 - s2) / 2, g2 = "", y2 = "", m2 = "", v2 = "";
- if (Z(this.horizontalNeck)) {
- var b2 = this.horizontalNeck.value;
- g2 = Co({ x: e4 * b2, y: Math.max(l2, p2) }), m2 = Co({ x: e4 * b2, y: Math.min(d2, f2) });
- }
- if (Z(this.verticalNeck)) {
- var x2 = this.verticalNeck.value;
- y2 = Co({ x: Math.min(h2, u2), y: i3 * x2 }), v2 = Co({ x: Math.max(o3, c2), y: i3 * x2 });
- }
- var _2 = wo({ x: o3, y: l2 }) + g2 + Co({ x: h2, y: p2 }) + y2 + Co({ x: u2, y: d2 }) + m2 + Co({ x: c2, y: f2 }) + v2;
- this.path = _2;
- }, Object.defineProperty(e3.prototype, "topSide", { get: function() {
- return this.getPropertyValue("topSide");
- }, set: function(t3) {
- this.setPercentProperty("topSide", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "bottomSide", { get: function() {
- return this.getPropertyValue("bottomSide");
- }, set: function(t3) {
- this.setPercentProperty("bottomSide", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "leftSide", { get: function() {
- return this.getPropertyValue("leftSide");
- }, set: function(t3) {
- this.setPercentProperty("leftSide", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "rightSide", { get: function() {
- return this.getPropertyValue("rightSide");
- }, set: function(t3) {
- this.setPercentProperty("rightSide", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "horizontalNeck", { get: function() {
- return this.getPropertyValue("horizontalNeck");
- }, set: function(t3) {
- this.setPropertyValue("horizontalNeck", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "verticalNeck", { get: function() {
- return this.getPropertyValue("verticalNeck");
- }, set: function(t3) {
- this.setPropertyValue("verticalNeck", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(Za);
- Ii.registeredClasses.Trapezoid = Jo;
- var Qo = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Triangle", e4.element = e4.paper.add("path"), e4.direction = "top", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4, i3 = this.pixelWidth, n3 = this.pixelHeight;
- switch (this.direction) {
- case "right":
- e4 = wo({ x: 0, y: 0 }) + Co({ x: i3, y: n3 / 2 }) + Co({ x: 0, y: n3 }) + " Z";
- break;
- case "left":
- e4 = wo({ x: i3, y: 0 }) + Co({ x: 0, y: n3 / 2 }) + Co({ x: i3, y: n3 }) + " Z";
- break;
- case "bottom":
- e4 = wo({ x: 0, y: 0 }) + Co({ x: i3, y: 0 }) + Co({ x: i3 / 2, y: n3 }) + " Z";
- break;
- case "top":
- e4 = wo({ x: i3 / 2, y: 0 }) + Co({ x: i3, y: n3 }) + Co({ x: 0, y: n3 }) + " Z";
- }
- this.path = e4;
- }, Object.defineProperty(e3.prototype, "direction", { get: function() {
- return this.getPropertyValue("direction");
- }, set: function(t3) {
- this.setPropertyValue("direction", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(Za);
- Ii.registeredClasses.Triangle = Qo;
- var tl = function() {
- function t2(t3, e3) {
- this._tensionX = t3, this._tensionY = e3;
- }
- return t2.prototype.smooth = function(t3) {
- for (var e3 = t3.length - 1; e3 > 0; e3--) {
- var i3 = t3[e3], n3 = t3[e3 - 1];
- Math.abs(i3.x - n3.x) < 0.1 && Math.abs(i3.y - n3.y) < 0.1 && t3.splice(e3 - 1, 1);
- }
- var r3 = this._tensionX, s2 = this._tensionY;
- if (t3.length < 3 || r3 >= 1 && s2 >= 1)
- return Po(t3);
- var a2 = t3[0], o3 = t3[t3.length - 1], l2 = false;
- lt(a2.x, 3) == lt(o3.x) && lt(a2.y) == lt(o3.y) && (l2 = true);
- for (var h2 = "", p2 = (e3 = 0, t3.length - 1); e3 < p2; e3++) {
- i3 = t3[e3 - 1], n3 = t3[e3];
- var u2 = t3[e3 + 1], d2 = t3[e3 + 2];
- e3 === 0 ? i3 = l2 ? t3[t3.length - 2] : t3[e3] : e3 == t3.length - 2 && (d2 = l2 ? t3[1] : t3[e3 + 1]), h2 += So(u2, Mt(i3, n3, u2, 0, r3, s2), Lt(0, n3, u2, d2, r3, s2));
- }
- return h2;
- }, t2;
- }();
- function el(t2, e3, i3, n3, r3, s2) {
- var a2 = t2.x, o3 = t2.y, l2 = e3.x, h2 = e3.y, p2 = _t(t2, e3);
- s2 && (i3 = p2 / Math.round(p2 / i3));
- var u2 = Ii.getCache(Rn(["wavedLine", t2.x, e3.x, t2.y, e3.y, i3, n3]));
- if (!u2) {
- if (p2 > 0) {
- var d2 = Math.atan2(h2 - o3, l2 - a2), c2 = Math.cos(d2), f2 = Math.sin(d2), g2 = i3 * c2, y2 = i3 * f2;
- if (i3 <= 1 || n3 <= 1)
- u2 = Co(e3);
- else {
- var m2 = Math.round(2 * p2 / i3), v2 = [], b2 = 1;
- l2 < a2 && (b2 *= -1), h2 < o3 && (b2 *= -1);
- for (var x2 = 0; x2 <= m2; x2++) {
- var _2 = a2 + x2 * g2 / 2 + (b2 *= -1) * n3 / 2 * f2, P2 = o3 + x2 * y2 / 2 - b2 * n3 / 2 * c2;
- v2.push({ x: _2, y: P2 });
- }
- u2 = new tl(r3, r3).smooth(v2);
- }
- } else
- u2 = "";
- Ii.setCache(Rn(["wavedLine", t2.x, e3.x, t2.y, e3.y, i3, n3]), u2);
- }
- return u2;
- }
- var il = function() {
- function t2(t3, e3) {
- this._reversed = t3, this._closed = e3.closed;
- }
- return t2.prototype._curve = function(t3, e3, i3, n3, r3, s2) {
- var a2 = (e3 - t3) / 3;
- return this._reversed ? So({ x: n3, y: e3 }, { x: i3 + a2 * r3, y: t3 + a2 }, { x: n3 - a2 * s2, y: e3 - a2 }) : So({ x: e3, y: n3 }, { x: t3 + a2, y: i3 + a2 * r3 }, { x: e3 - a2, y: n3 - a2 * s2 });
- }, t2.prototype.smooth = function(t3) {
- var e3 = this, i3 = NaN, n3 = NaN, r3 = NaN, s2 = NaN, a2 = NaN, o3 = 0, l2 = "";
- switch (Ut(t3, function(t4) {
- var h2 = t4.x, p2 = t4.y;
- if (e3._reversed) {
- var u2 = h2;
- h2 = p2, p2 = u2;
- }
- var d2 = NaN;
- if (h2 !== n3 || p2 !== s2) {
- switch (o3) {
- case 0:
- o3 = 1, e3._reversed ? l2 += Co({ x: p2, y: h2 }) : l2 += Co({ x: h2, y: p2 });
- break;
- case 1:
- o3 = 2;
- break;
- case 2:
- o3 = 3, l2 += e3._curve(i3, n3, r3, s2, rl(i3, n3, r3, s2, d2 = sl(i3, n3, r3, s2, h2, p2)), d2);
- break;
- default:
- l2 += e3._curve(i3, n3, r3, s2, a2, d2 = sl(i3, n3, r3, s2, h2, p2));
- }
- i3 = n3, n3 = h2, r3 = s2, s2 = p2, a2 = d2;
- }
- }), o3) {
- case 2:
- this._reversed ? l2 += Co({ x: s2, y: n3 }) : l2 += Co({ x: n3, y: s2 });
- break;
- case 3:
- l2 += this._curve(i3, n3, r3, s2, a2, rl(i3, n3, r3, s2, a2));
- }
- return this._closed && (l2 += " Z"), l2;
- }, t2;
- }();
- function nl(t2) {
- return t2 < 0 ? -1 : 1;
- }
- function rl(t2, e3, i3, n3, r3) {
- var s2 = e3 - t2;
- return s2 ? (3 * (n3 - i3) / s2 - r3) / 2 : r3;
- }
- function sl(t2, e3, i3, n3, r3, s2) {
- var a2 = e3 - t2, o3 = r3 - e3, l2 = (n3 - i3) / (a2 || o3 < 0 && -0), h2 = (s2 - n3) / (o3 || a2 < 0 && -0), p2 = (l2 * o3 + h2 * a2) / (a2 + o3);
- return (nl(l2) + nl(h2)) * Math.min(Math.abs(l2), Math.abs(h2), 0.5 * Math.abs(p2)) || 0;
- }
- var al = function(t2) {
- function e3(e4) {
- return t2.call(this, false, e4) || this;
- }
- return C(e3, t2), e3;
- }(il), ol = function(t2) {
- function e3(e4) {
- return t2.call(this, true, e4) || this;
- }
- return C(e3, t2), e3;
- }(il), ll = function() {
- function t2(t3) {
- this._closed = t3.closed;
- }
- return t2.prototype.smooth = function(t3) {
- var e3 = this, i3 = NaN, n3 = NaN, r3 = NaN, s2 = NaN, a2 = NaN, o3 = NaN, l2 = NaN, h2 = NaN, p2 = NaN, u2 = NaN, d2 = 0, c2 = "", f2 = function(t4, e4) {
- c2 += So({ x: (i3 + 4 * n3 + t4) / 6, y: (o3 + 4 * l2 + e4) / 6 }, { x: (2 * i3 + n3) / 3, y: (2 * o3 + l2) / 3 }, { x: (i3 + 2 * n3) / 3, y: (o3 + 2 * l2) / 3 });
- }, g2 = function(t4) {
- var g3 = t4.x, y2 = t4.y;
- switch (d2) {
- case 0:
- d2 = 1, e3._closed ? (r3 = g3, h2 = y2) : c2 += Co({ x: g3, y: y2 });
- break;
- case 1:
- d2 = 2, e3._closed && (s2 = g3, p2 = y2);
- break;
- case 2:
- if (d2 = 3, e3._closed) {
- a2 = g3, u2 = y2, c2 += wo({ x: (i3 + 4 * n3 + g3) / 6, y: (o3 + 4 * l2 + y2) / 6 });
- break;
- }
- c2 += Co({ x: (5 * i3 + n3) / 6, y: (5 * o3 + l2) / 6 });
- default:
- f2(g3, y2);
- }
- i3 = n3, n3 = g3, o3 = l2, l2 = y2;
- };
- if (Ut(t3, g2), this._closed)
- switch (d2) {
- case 1:
- c2 += wo({ x: r3, y: h2 }), c2 += " Z";
- break;
- case 2:
- c2 += wo({ x: (r3 + 2 * s2) / 3, y: (h2 + 2 * p2) / 3 }), c2 += Co({ x: (s2 + 2 * r3) / 3, y: (p2 + 2 * h2) / 3 }), c2 += " Z";
- break;
- case 3:
- g2({ x: r3, y: h2 }), g2({ x: s2, y: p2 }), g2({ x: a2, y: u2 });
- }
- else {
- switch (d2) {
- case 3:
- f2(n3, l2);
- case 2:
- c2 += Co({ x: n3, y: l2 });
- }
- c2 += " Z";
- }
- return c2;
- }, t2;
- }(), hl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "WavedCircle", e4.element = e4.paper.add("path"), e4.waveLength = 16, e4.waveHeight = 4, e4.fill = void 0, e4.fillOpacity = 0, e4.tension = 0.8, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- var t3 = "", e4 = this.pixelRadius;
- e4 > 0 && (t3 = wo((i3 = this.getPoints(e4))[0]) + new tl(this.tension, this.tension).smooth(i3));
- var i3, n3 = this.pixelInnerRadius;
- n3 > 0 && ((i3 = this.getPoints(n3)).reverse(), t3 += wo(i3[0]) + new tl(this.tension, this.tension).smooth(i3)), this.path = t3;
- }, e3.prototype.getPoints = function(t3) {
- for (var e4 = t3 * Math.PI * 2, i3 = this.waveHeight / 2, n3 = e4 / Math.round(e4 / this.waveLength), r3 = n3 / 2, s2 = [], a2 = e4 / n3, o3 = 0; o3 <= a2; o3++) {
- var l2 = o3 * n3 / e4 * 360, h2 = (o3 * n3 + r3) / e4 * 360;
- s2.push({ x: (t3 - i3) * ft(l2), y: (t3 - i3) * dt(l2) }), s2.push({ x: (t3 + i3) * ft(h2), y: (t3 + i3) * dt(h2) });
- }
- return s2.pop(), s2;
- }, Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- return this.getPropertyValue("innerRadius");
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, true, false, 10, false), this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelInnerRadius", { get: function() {
- return Vn(this.innerRadius, yt(this.innerWidth / 2, this.innerHeight / 2));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "waveLength", { get: function() {
- return this.getPropertyValue("waveLength");
- }, set: function(t3) {
- this.setPropertyValue("waveLength", t3), this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "waveHeight", { get: function() {
- return this.getPropertyValue("waveHeight");
- }, set: function(t3) {
- this.setPropertyValue("waveHeight", t3), this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tension", { get: function() {
- return this.getPropertyValue("tension");
- }, set: function(t3) {
- this.setPropertyValue("tension", t3), this.invalidate();
- }, enumerable: true, configurable: true }), e3;
- }(yo);
- Ii.registeredClasses.WavedCircle = hl;
- var pl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "WavedLine", e4.element = e4.paper.add("path"), e4.waveLength = 16, e4.waveHeight = 4, e4.tension = 0.8, e4.pixelPerfect = false, e4.fill = dn(), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- var t3 = { x: this.x1, y: this.y1 }, e4 = { x: this.x2, y: this.y2 };
- this.path = wo(t3) + el(t3, e4, this.waveLength, this.waveHeight, this.tension, true);
- }, Object.defineProperty(e3.prototype, "waveLength", { get: function() {
- return this.getPropertyValue("waveLength");
- }, set: function(t3) {
- this.setPropertyValue("waveLength", t3), this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "waveHeight", { get: function() {
- return this.getPropertyValue("waveHeight");
- }, set: function(t3) {
- this.setPropertyValue("waveHeight", t3), this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tension", { get: function() {
- return this.getPropertyValue("tension");
- }, set: function(t3) {
- this.setPropertyValue("tension", t3), this.invalidate();
- }, enumerable: true, configurable: true }), e3;
- }(bo), ul = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "WavedRectangle", e4.element = e4.paper.add("path"), e4.waveLength = 16, e4.waveHeight = 4, e4.tension = 0.8, e4.setPropertyValue("wavedLeft", true), e4.setPropertyValue("wavedRight", true), e4.setPropertyValue("wavedTop", true), e4.setPropertyValue("wavedBottom", true), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this.pixelWidth, i3 = this.pixelHeight;
- if (e4 > 0 && i3 > 0) {
- var n3 = { x: 0, y: 0 }, r3 = { x: e4, y: 0 }, s2 = { x: e4, y: i3 }, a2 = { x: 0, y: i3 }, o3 = Math.min(e4, this.waveLength), l2 = Math.min(i3, this.waveHeight), h2 = Math.min(i3, this.waveLength), p2 = Math.min(e4, this.waveHeight), u2 = "", d2 = "", c2 = "", f2 = "";
- this.wavedTop && (u2 = el(n3, r3, o3, l2, this.tension, true)), this.wavedRight && (d2 = el(r3, s2, h2, p2, this.tension, true)), this.wavedBottom && (c2 = el(s2, a2, o3, l2, this.tension, true)), this.wavedLeft && (f2 = el(a2, n3, h2, p2, this.tension, true)), this.path = wo(n3) + u2 + Co(r3) + d2 + Co(s2) + c2 + Co(a2) + f2 + "z";
- }
- }, Object.defineProperty(e3.prototype, "waveLength", { get: function() {
- return this.getPropertyValue("waveLength");
- }, set: function(t3) {
- this.setPropertyValue("waveLength", t3), this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "waveHeight", { get: function() {
- return this.getPropertyValue("waveHeight");
- }, set: function(t3) {
- this.setPropertyValue("waveHeight", t3), this.invalidate();
- }, enumerable: true, configurable: true }), e3.prototype.setWavedSides = function(t3, e4, i3, n3) {
- this.wavedTop = t3, this.wavedRight = e4, this.wavedBottom = i3, this.wavedLeft = n3;
- }, Object.defineProperty(e3.prototype, "tension", { get: function() {
- return this.getPropertyValue("tension");
- }, set: function(t3) {
- this.setPropertyValue("tension", t3), this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "wavedRight", { get: function() {
- return this.getPropertyValue("wavedRight");
- }, set: function(t3) {
- this.setPropertyValue("wavedRight", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "wavedLeft", { get: function() {
- return this.getPropertyValue("wavedLeft");
- }, set: function(t3) {
- this.setPropertyValue("wavedLeft", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "wavedTop", { get: function() {
- return this.getPropertyValue("wavedTop");
- }, set: function(t3) {
- this.setPropertyValue("wavedTop", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "wavedBottom", { get: function() {
- return this.getPropertyValue("wavedBottom");
- }, set: function(t3) {
- this.setPropertyValue("wavedBottom", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(qa), dl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "ZoomOutButton", e4.padding(9, 9, 9, 9), e4.showSystemTooltip = true;
- var i3 = new Ys(), n3 = e4.background;
- n3.cornerRadius(20, 20, 20, 20), n3.fill = i3.getFor("primaryButton"), n3.stroke = i3.getFor("primaryButtonStroke"), n3.strokeOpacity = 0, n3.states.getKey("hover").properties.fill = i3.getFor("primaryButtonHover"), n3.states.getKey("down").properties.fill = i3.getFor("primaryButtonActive");
- var r3 = new Za();
- r3.element = e4.paper.add("path");
- var s2 = wo({ x: 0, y: 0 });
- return s2 += Co({ x: 11, y: 0 }), r3.path = s2, r3.pixelPerfect = true, r3.padding(8, 3, 8, 3), r3.stroke = i3.getFor("primaryButtonText"), e4.icon = r3, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Zoom Out"));
- }, e3;
- }(go);
- Ii.registeredClasses.ZoomOutButton = dl;
- var cl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "PlayButton", e4.padding(12, 12, 12, 12), e4.showSystemTooltip = true;
- var i3 = new Ys(), n3 = e4.background;
- n3.cornerRadius(25, 25, 25, 25), n3.fill = i3.getFor("primaryButton"), n3.stroke = i3.getFor("primaryButtonStroke"), n3.strokeOpacity = 0, n3.states.getKey("hover").properties.fill = i3.getFor("primaryButtonHover"), n3.states.getKey("down").properties.fill = i3.getFor("primaryButtonActive");
- var r3 = new Qo();
- r3.direction = "right", r3.width = 9, r3.height = 11, r3.marginLeft = 1, r3.marginRight = 1, r3.horizontalCenter = "middle", r3.verticalCenter = "middle", r3.stroke = i3.getFor("primaryButtonText"), r3.fill = r3.stroke, e4.icon = r3;
- var s2 = new fo();
- s2.width = 11, s2.height = 11, s2.horizontalCenter = "middle", s2.verticalCenter = "middle", s2.cornerRadius(0, 0, 0, 0), s2.stroke = i3.getFor("primaryButtonText"), s2.fill = r3.stroke, e4.togglable = true;
- var a2 = e4.states.create("active");
- return a2.transitionDuration = 0, a2.properties.icon = s2, e4.defaultState.transitionDuration = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Play"));
- }, e3;
- }(go);
- Ii.registeredClasses.PlayButton = cl;
- var fl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ColorModifier", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.modify = function(t3) {
- return t3;
- }, e3;
- }(yn);
- Ii.registeredClasses.ColorModifier = fl;
- var gl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.lightnesses = [], e4.brightnesses = [], e4.opacities = [], e4.offsets = [], e4.className = "GradientModifier", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "lightnesses", { get: function() {
- return this._lightnesses;
- }, set: function(t3) {
- this._lightnesses = t3, this._brightnesses = [];
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "brightnesses", { get: function() {
- return this._brightnesses;
- }, set: function(t3) {
- this._brightnesses = t3, this._lightnesses = [];
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "opacities", { get: function() {
- return this._opacities;
- }, set: function(t3) {
- this._opacities = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "offsets", { get: function() {
- return this._offsets;
- }, set: function(t3) {
- this._offsets = t3;
- }, enumerable: true, configurable: true }), e3.prototype.modify = function(t3) {
- this.gradient.clear();
- var e4 = 0;
- this.opacities && (e4 = gt(e4, this.opacities.length)), this.lightnesses && (e4 = gt(e4, this.lightnesses.length)), this.brightnesses && (e4 = gt(e4, this.brightnesses.length));
- for (var i3, n3, r3 = 1, s2 = 0; s2 < e4; s2++) {
- var a2 = t3;
- this.opacities && tt(this.opacities[s2]) && (r3 = this.opacities[s2]), this.lightnesses && tt(this.lightnesses[s2]) && (i3 = this.lightnesses[s2], n3 = void 0), this.brightnesses && tt(this.brightnesses[s2]) && (n3 = this.brightnesses[s2], i3 = void 0), tt(n3) ? a2 = t3.brighten(this.brightnesses[s2]) : tt(i3) && (a2 = t3.lighten(this.lightnesses[s2]));
- var o3 = this.offsets[s2];
- this.gradient.addColor(a2, r3, o3);
- }
- return this.gradient;
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this._offsets = e4.offsets, this._brightnesses = e4.brightnesses, this._lightnesses = e4.lightnesses, this._opacities = e4.opacities;
- }, e3;
- }(fl);
- Ii.registeredClasses.GradientModifier = gl;
- var yl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "LinearGradientModifier", e4.gradient = new Oa(), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.gradient = e4.gradient.clone();
- }, e3;
- }(gl);
- Ii.registeredClasses.LinearGradientModifier = yl;
- var ml = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Cone", e4.angle = 30, e4.radius = V(100), e4.topRadius = V(100), e4.top = e4.createChild(mo), e4.top.shouldClone = false, e4.bottom = e4.createChild(mo), e4.bottom.shouldClone = false, e4.body = e4.createChild(Za), e4.body.shouldClone = false, e4.body.setElement(e4.paper.add("path")), e4.layout = "none", e4.bodyFillModifier = new yl(), e4.bodyFillModifier.lightnesses = [0, -0.25, 0], e4.body.fillModifier = e4.bodyFillModifier, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this), Ue(this, this.top, Ka), Ue(this, this.bottom, Ka), Ue(this, this.body, Ka);
- var e4, i3, n3, r3 = this.innerWidth, s2 = this.innerHeight, a2 = this.bottom, o3 = this.top, l2 = this.angle;
- this.orientation == "horizontal" ? (e4 = s2 / 2, a2.y = s2 / 2, o3.y = s2 / 2, o3.x = r3, i3 = (90 - l2) / 90, n3 = 0, this.bodyFillModifier.gradient.rotation = 90) : (i3 = 0, n3 = (90 - l2) / 90, e4 = r3 / 2, a2.y = s2, a2.x = r3 / 2, o3.x = r3 / 2, this.bodyFillModifier.gradient.rotation = 0);
- var h2, p2 = this.radius.value * e4, u2 = this.topRadius.value * e4;
- a2.radius = p2 - p2 * i3, a2.radiusY = p2 - p2 * n3, o3.radius = u2 - u2 * i3, o3.radiusY = u2 - u2 * n3, h2 = this.orientation == "horizontal" ? wo({ x: 0, y: s2 / 2 - a2.radiusY }) + Do(-90, -180, a2.radius, a2.radiusY) + Co({ x: r3, y: s2 / 2 + o3.radiusY }) + Do(90, 180, o3.radius, o3.radiusY) + " Z" : wo({ x: r3 / 2 - o3.radius, y: 0 }) + Do(180, -180, o3.radius, o3.radiusY) + Co({ x: r3 / 2 + a2.radius, y: s2 }) + Do(0, 180, a2.radius, a2.radiusY) + " Z", this.body.path = h2;
- }, Object.defineProperty(e3.prototype, "angle", { get: function() {
- return this.getPropertyValue("angle");
- }, set: function(t3) {
- this.setPropertyValue("angle", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPropertyValue("radius", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "topRadius", { get: function() {
- return this.getPropertyValue("topRadius");
- }, set: function(t3) {
- this.setPropertyValue("topRadius", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "orientation", { get: function() {
- return this.getPropertyValue("orientation");
- }, set: function(t3) {
- this.setPropertyValue("orientation", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }($a), vl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "LightenFilter", e4.feColorMatrix = e4.paper.add("feColorMatrix"), e4.feColorMatrix.attr({ type: "matrix" }), e4.filterPrimitives.push(e4.feColorMatrix), e4.lightness = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "lightness", { get: function() {
- return this.properties.lightness;
- }, set: function(t3) {
- this.properties.lightness = t3;
- var e4 = t3 + 1;
- this.feColorMatrix.attr({ values: e4 + " 0 0 0 0 0 " + e4 + " 0 0 0 0 0 " + e4 + " 0 0 0 0 0 1 0" });
- }, enumerable: true, configurable: true }), e3;
- }(Zo);
- Ii.registeredClasses.LightenFilter = vl;
- var bl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.angle = 30, e4.depth = 30, e4.className = "Rectangle3D", e4.layout = "none";
- var i3 = e4.createChild(Za);
- i3.shouldClone = false, i3.setElement(e4.paper.add("path")), i3.isMeasured = false, e4.sideBack = i3, e4._disposers.push(e4.sideBack);
- var n3 = e4.createChild(Za);
- n3.shouldClone = false, n3.setElement(e4.paper.add("path")), n3.isMeasured = false, e4.sideBottom = n3, e4._disposers.push(e4.sideBottom);
- var r3 = e4.createChild(Za);
- r3.shouldClone = false, r3.setElement(e4.paper.add("path")), r3.isMeasured = false, e4.sideLeft = r3, e4._disposers.push(e4.sideLeft);
- var s2 = e4.createChild(Za);
- s2.shouldClone = false, s2.setElement(e4.paper.add("path")), s2.isMeasured = false, e4.sideRight = s2, e4._disposers.push(e4.sideRight);
- var a2 = e4.createChild(Za);
- a2.shouldClone = false, a2.setElement(e4.paper.add("path")), a2.isMeasured = false, e4.sideTop = a2, e4._disposers.push(e4.sideTop);
- var o3 = e4.createChild(Za);
- return o3.shouldClone = false, o3.setElement(e4.paper.add("path")), o3.isMeasured = false, e4.sideFront = o3, e4._disposers.push(e4.sideFront), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this.innerWidth, i3 = this.innerHeight, n3 = this.depth, r3 = this.angle, s2 = dt(r3), a2 = ft(r3), o3 = { x: 0, y: 0 }, l2 = { x: e4, y: 0 }, h2 = { x: e4, y: i3 }, p2 = { x: 0, y: i3 }, u2 = { x: n3 * a2, y: -n3 * s2 }, d2 = { x: n3 * a2 + e4, y: -n3 * s2 }, c2 = { x: n3 * a2 + e4, y: -n3 * s2 + i3 }, f2 = { x: n3 * a2, y: -n3 * s2 + i3 };
- this.sideFront.path = wo(o3) + Co(l2) + Co(h2) + Co(p2) + " Z", this.sideBack.path = wo(u2) + Co(d2) + Co(c2) + Co(f2) + " Z", this.sideLeft.path = wo(o3) + Co(u2) + Co(f2) + Co(p2) + " Z", this.sideRight.path = wo(l2) + Co(d2) + Co(c2) + Co(h2) + " Z", this.sideBottom.path = wo(p2) + Co(f2) + Co(c2) + Co(h2) + " Z", this.sideTop.path = wo(o3) + Co(u2) + Co(d2) + Co(l2) + " Z";
- }, Object.defineProperty(e3.prototype, "depth", { get: function() {
- return this.getPropertyValue("depth");
- }, set: function(t3) {
- this.setPropertyValue("depth", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "angle", { get: function() {
- return this.getPropertyValue("angle");
- }, set: function(t3) {
- this.setPropertyValue("angle", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.setFill = function(e4) {
- var i3;
- if (t2.prototype.setFill.call(this, e4), et(e4) && !("r" in e4) || (e4 = gn(e4)), e4 instanceof un)
- i3 = e4.hex;
- else if (e4 instanceof Oa || e4 instanceof Sa)
- i3 = e4.stops.getIndex(0).color.hex;
- else {
- var n3 = new vl();
- n3.lightness = -0.2, this.sideBack.filters.push(n3);
- var r3 = n3.clone();
- r3.lightness = -0.4, this.sideLeft.filters.push(r3);
- var s2 = n3.clone();
- s2.lightness = -0.2, this.sideRight.filters.push(s2);
- var a2 = n3.clone();
- a2.lightness = -0.1, this.sideTop.filters.push(a2);
- var o3 = n3.clone();
- o3.lightness = -0.5, this.sideBottom.filters.push(o3);
- }
- i3 && (this.sideBack.fill = dn(i3).lighten(-0.2), this.sideLeft.fill = dn(i3).lighten(-0.4), this.sideRight.fill = dn(i3).lighten(-0.2), this.sideTop.fill = dn(i3).lighten(-0.1), this.sideBottom.fill = dn(i3).lighten(-0.5));
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.sideBack.copyFrom(e4.sideBack), this.sideLeft.copyFrom(e4.sideLeft), this.sideRight.copyFrom(e4.sideRight), this.sideTop.copyFrom(e4.sideTop), this.sideBottom.copyFrom(e4.sideBottom);
- }, e3;
- }($a), xl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "Slice3D", e4.layout = "none";
- var i3 = e4.createChild(Za);
- e4.edge = i3, i3.shouldClone = false, i3.isMeasured = false, i3.toBack(), e4.angle = 30, e4.depth = 20;
- var n3 = e4.createChild(Za);
- e4.sideA = n3, n3.shouldClone = false, n3.isMeasured = false;
- var r3 = e4.createChild(Za);
- return e4.sideB = r3, r3.shouldClone = false, r3.isMeasured = false, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.setFill = function(e4) {
- var i3;
- if (t2.prototype.setFill.call(this, e4), e4 instanceof un)
- i3 = e4.hex;
- else if (e4 instanceof Oa || e4 instanceof Sa)
- i3 = e4.stops.getIndex(0).color.hex;
- else {
- var n3 = new vl();
- n3.lightness = -0.25, this.edge.filters.push(n3), this.sideA.filters.push(n3.clone()), this.sideB.filters.push(n3.clone());
- }
- if (i3) {
- var r3 = dn(i3).lighten(-0.25);
- this.edge.fill = r3, this.sideA.fill = r3, this.sideB.fill = r3, this.edge.stroke = r3, this.sideA.stroke = r3, this.sideB.stroke = r3;
- }
- }, e3.prototype.draw = function() {
- if (this.cornerRadius = 0, this.innerCornerRadius = 0, t2.prototype.draw.call(this), this.arc !== 0 && this.radius > 0 && this.depth > 0) {
- this.sideB.show(0), this.sideA.show(0), this.edge.show(0);
- for (var e4 = this.startAngle, i3 = this.arc, n3 = this.pixelInnerRadius || 0, r3 = this.radiusY || 0, s2 = this.radius, a2 = e4 + i3, o3 = r3 / s2 * n3, l2 = { x: ft(e4) * n3, y: dt(e4) * o3 }, h2 = { x: ft(e4) * s2, y: dt(e4) * r3 }, p2 = { x: ft(a2) * s2, y: dt(a2) * r3 }, u2 = { x: ft(a2) * n3, y: dt(a2) * o3 }, d2 = this.depth, c2 = { x: l2.x, y: l2.y - d2 }, f2 = { x: h2.x, y: h2.y - d2 }, g2 = { x: p2.x, y: p2.y - d2 }, y2 = { x: u2.x, y: u2.y - d2 }, m2 = "", v2 = Math.ceil(i3 / 5), b2 = i3 / v2, x2 = e4, _2 = f2, P2 = 0; P2 < v2; P2++)
- if ((x2 += b2) > 0 && x2 < 180) {
- m2 += wo(_2);
- var w2 = { x: ft(x2) * s2, y: dt(x2) * r3 - d2 };
- m2 += Co({ x: _2.x, y: _2.y + d2 }), m2 += To({ x: w2.x, y: w2.y + d2 }, s2, r3, true), m2 += Co(w2), m2 += To(_2, s2, r3), m2 += "z", _2 = w2;
- } else
- m2 += wo(_2), m2 += To(w2 = { x: ft(x2) * s2, y: dt(x2) * r3 - d2 }, s2, r3, true), m2 += Co({ x: w2.x, y: w2.y + d2 }), m2 += To({ x: _2.x, y: _2.y + d2 }, s2, r3), m2 += Co(_2), m2 += "z", _2 = w2;
- for (_2 = c2, x2 = e4, P2 = 0; P2 < v2; P2++)
- (x2 += b2) > 0 && x2 < 180 ? (m2 += wo(_2), w2 = { x: ft(x2) * n3, y: dt(x2) * o3 - d2 }, m2 += Co({ x: _2.x, y: _2.y + d2 }), m2 += To({ x: w2.x, y: w2.y + d2 }, n3, o3, true), m2 += Co(w2), m2 += To(_2, n3, o3), m2 += "z", _2 = w2) : (m2 += wo(_2), m2 += To(w2 = { x: ft(x2) * n3, y: dt(x2) * o3 - d2 }, n3, o3, true), m2 += Co({ x: w2.x, y: w2.y + d2 }), m2 += To({ x: _2.x, y: _2.y + d2 }, n3, o3), m2 += Co(_2), m2 += "z", _2 = w2);
- this.edge.path = m2, this.sideA.path = wo(l2) + Co(h2) + Co(f2) + Co(c2) + " Z", this.sideB.path = wo(p2) + Co(u2) + Co(y2) + Co(g2) + " Z", this.startAngle < 90 ? this.sideA.toBack() : this.sideA.toFront(), this.startAngle + this.arc > 90 ? this.sideB.toBack() : this.sideB.toFront(), this.slice.dy = -d2;
- } else
- this.sideA.hide(0), this.sideB.hide(0), this.edge.hide(0);
- }, Object.defineProperty(e3.prototype, "depth", { get: function() {
- return this.getPropertyValue("depth");
- }, set: function(t3) {
- this.setPropertyValue("depth", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "angle", { get: function() {
- var t3 = this.getPropertyValue("angle");
- return tt(t3) || (t3 = 0), t3;
- }, set: function(t3) {
- this.setPropertyValue("angle", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radiusY", { get: function() {
- var t3 = this.getPropertyValue("radiusY");
- return tt(t3) || (t3 = this.radius - this.radius * this.angle / 90), t3;
- }, set: function(t3) {
- this.setPropertyValue("radiusY", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.edge.copyFrom(e4.edge), this.sideA.copyFrom(e4.sideA), this.sideB.copyFrom(e4.sideB);
- }, e3;
- }(No), _l = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "RadialGradientModifier", e4.gradient = new Sa(), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.gradient = e4.gradient.clone();
- }, e3;
- }(gl);
- Ii.registeredClasses.RadialGradientModifier = _l;
- var Pl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.properties.gap = 0, e4._line = e4.paper.add("path"), e4.addElement(e4._line), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- if (t2.prototype.draw.call(this), Math.round(this.rotation / 90) != this.rotation / 90 && (this.properties.shapeRendering = "auto"), this._line) {
- var e4 = this.width, i3 = this.height, n3 = "";
- if (this.gap)
- for (var r3 = this.gap + this.strokeWidth, s2 = this.height / r3, a2 = -s2 / 2; a2 < 1.5 * s2; a2++)
- Math.round(this.rotation / 90) != this.rotation / 90 ? (n3 += wo({ x: -e4, y: (a2 + 0.5) * r3 }) + Co({ x: 2 * e4, y: (a2 + 0.5) * r3 }), this.properties.rotationX = this.width / 2, this.properties.rotationY = this.height / 2) : n3 += wo({ x: -e4, y: a2 * r3 }) + Co({ x: 2 * e4, y: a2 * r3 });
- else
- Math.round(this.rotation / 90) != this.rotation / 90 ? (n3 = wo({ x: -e4, y: i3 / 2 }) + Co({ x: 2 * e4, y: i3 / 2 }), this.properties.rotationX = this.width / 2, this.properties.rotationY = this.height / 2) : n3 = wo({ x: 0, y: 0 }) + Co({ x: e4, y: 0 });
- this._line.attr({ d: n3 });
- }
- }, Object.defineProperty(e3.prototype, "gap", { get: function() {
- return this.properties.gap;
- }, set: function(t3) {
- this.properties.gap = t3, this.draw();
- }, enumerable: true, configurable: true }), e3;
- }(Ca);
- Ii.registeredClasses.LinePattern = Pl;
- var wl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.properties.radius = 2, e4._circle = e4.paper.add("circle"), e4.addElement(e4._circle), e4.shapeRendering = "auto", e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this), this._circle && this._circle.attr({ r: this.radius, cx: this.width / 2, cy: this.height / 2 });
- }, Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.properties.radius;
- }, set: function(t3) {
- this.properties.radius = t3, this.draw();
- }, enumerable: true, configurable: true }), e3;
- }(Ca);
- Ii.registeredClasses.CirclePattern = wl;
- var Cl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.rectHeight = 1, e4.rectWidth = 1, e4._rect = e4.paper.add("rect"), e4.addElement(e4._rect), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this), this.properties.rotationX = this.width / 2, this.properties.rotationY = this.height / 2, this._rect && this._rect.attr({ width: this.rectWidth, height: this.rectHeight, x: (this.width - this.rectWidth) / 2, y: (this.height - this.rectHeight) / 2 });
- }, Object.defineProperty(e3.prototype, "rectWidth", { get: function() {
- return this.properties.rectWidth;
- }, set: function(t3) {
- this.properties.rectWidth = t3, this.draw();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "rectHeight", { get: function() {
- return this.properties.rectHeight;
- }, set: function(t3) {
- this.properties.rectHeight = t3, this.draw();
- }, enumerable: true, configurable: true }), e3;
- }(Ca);
- Ii.registeredClasses.RectPattern = Cl;
- var Ol = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ColorizeFilter", e4.feColorMatrix = e4.paper.add("feColorMatrix"), e4.feColorMatrix.attr({ type: "matrix" }), e4.filterPrimitives.push(e4.feColorMatrix), e4.intensity = 1, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyFilter = function() {
- var t3, e4, i3, n3 = this.intensity, r3 = 1 - n3, s2 = this.color;
- s2 && s2.rgb ? (t3 = s2.rgb.r / 255 * n3, e4 = s2.rgb.g / 255 * n3, i3 = s2.rgb.b / 255 * n3) : (t3 = 0, e4 = 0, i3 = 0), this.feColorMatrix.attr({ values: r3 + " 0 0 0 " + t3 + " 0 " + r3 + " 0 0 " + e4 + " 0 0 " + r3 + " 0 " + i3 + " 0 0 0 1 0" });
- }, Object.defineProperty(e3.prototype, "color", { get: function() {
- return this.properties.color;
- }, set: function(t3) {
- this.properties.color = t3, this.applyFilter();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "intensity", { get: function() {
- return this.properties.intensity;
- }, set: function(t3) {
- this.properties.intensity = t3, this.applyFilter();
- }, enumerable: true, configurable: true }), e3;
- }(Zo);
- Ii.registeredClasses.ColorizeFilter = Ol;
- var Sl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "DesaturateFilter", e4.feColorMatrix = e4.paper.add("feColorMatrix"), e4.feColorMatrix.attr({ type: "saturate" }), e4.filterPrimitives.push(e4.feColorMatrix), e4.width = 120, e4.height = 120, e4.saturation = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "saturation", { get: function() {
- return this.properties.saturation;
- }, set: function(t3) {
- this.properties.saturation = t3, this.feColorMatrix.attr({ values: t3.toString() });
- }, enumerable: true, configurable: true }), e3;
- }(Zo);
- Ii.registeredClasses.DesaturateFilter = Sl;
- var Il = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "BlurFilter", e4.feGaussianBlur = e4.paper.add("feGaussianBlur"), e4.feGaussianBlur.attr({ result: "blurOut", in: "SourceGraphic" }), e4.filterPrimitives.push(e4.feGaussianBlur), e4.width = 200, e4.height = 200, e4.blur = 1.5, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "blur", { get: function() {
- return this.properties.blur;
- }, set: function(t3) {
- this.properties.blur = t3, this.feGaussianBlur.attr({ stdDeviation: t3 / this.scale });
- }, enumerable: true, configurable: true }), e3;
- }(Zo);
- Ii.registeredClasses.BlurFilter = Il;
- var Dl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "FocusFilter", e4.feFlood = e4.paper.add("feFlood"), e4.feFlood.attr({ "flood-color": new Ys().getFor("primaryButtonHover"), result: "base" }), e4.filterPrimitives.push(e4.feFlood), e4.feMorphology = e4.paper.add("feMorphology"), e4.feMorphology.attr({ result: "bigger", in: "SourceGraphic", operator: "dilate", radius: "2" }), e4.filterPrimitives.push(e4.feMorphology), e4.feColorMatrix = e4.paper.add("feColorMatrix"), e4.feColorMatrix.attr({ result: "mask", in: "bigger", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0" }), e4.filterPrimitives.push(e4.feColorMatrix), e4.feComposite = e4.paper.add("feComposite"), e4.feComposite.attr({ result: "drop", in: "base", in2: "mask", operator: "in" }), e4.filterPrimitives.push(e4.feComposite), e4.feBlend = e4.paper.add("feBlend"), e4.feBlend.attr({ in: "SourceGraphic", in2: "drop", mode: "normal" }), e4.filterPrimitives.push(e4.feBlend), e4.width = 130, e4.height = 130, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "stroke", { get: function() {
- return this.properties.stroke;
- }, set: function(t3) {
- this.properties.stroke = t3, this.feFlood.attr({ "flood-color": t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "strokeWidth", { get: function() {
- return this.properties.strokeWidth;
- }, set: function(t3) {
- this.properties.strokeWidth = t3, this.feMorphology.attr({ radius: t3 });
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "opacity", { get: function() {
- return this.properties.opacity;
- }, set: function(t3) {
- this.properties.opacity = t3, this.feColorMatrix.attr({ values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 " + t3 + " 0" });
- }, enumerable: true, configurable: true }), e3.prototype.setSprite = function(e4) {
- this._sprite && this._sprite != e4 && this._sprite.group.removeStyle("outline"), e4.group.addStyle({ outline: "none" }), t2.prototype.setSprite.call(this, e4);
- }, e3;
- }(Zo), kl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._list = [], e4._currentStep = 0, e4._startIndex = 0, e4._currentPass = 0, e4.baseColor = new un({ r: 103, g: 183, b: 220 }), e4.stepOptions = {}, e4.passOptions = { brighten: -0.2 }, e4.step = 1, e4.minColors = 20, e4.minLightness = 0.2, e4.maxLightness = 0.9, e4.shuffle = false, e4.wrap = true, e4.reuse = false, e4.saturation = 1, e4.className = "ColorSet", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "list", { get: function() {
- return this._list || this.generate(this.minColors), this._list;
- }, set: function(t3) {
- this._list = t3, this.reset();
- }, enumerable: true, configurable: true }), e3.prototype.getReusableColor = function(t3) {
- if (this._list.length == 0)
- return this.generate(1), this.list[0];
- var e4 = t3 - Math.floor(t3 / this._list.length) * this.list.length;
- return this.list[e4];
- }, e3.prototype.next = function() {
- var t3;
- return this.list.length <= this._currentStep ? this.reuse ? t3 = this.getReusableColor(this._currentStep) : (this.generate(gt(this.minColors, this._currentStep + 1)), t3 = this.list[this._currentStep]) : t3 = this.list[this._currentStep], this._currentStep += this.step, t3.saturate(this.saturation);
- }, e3.prototype.getIndex = function(t3) {
- var e4;
- return this.list.length <= t3 ? this.reuse ? e4 = this.getReusableColor(t3) : (this.generate(this.minColors), e4 = this.getIndex(t3)) : e4 = this.list[t3], e4.saturate(this.saturation);
- }, e3.prototype.reset = function() {
- this._currentStep = this._startIndex;
- }, Object.defineProperty(e3.prototype, "currentStep", { get: function() {
- return this._currentStep;
- }, set: function(t3) {
- this._currentStep = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startIndex", { get: function() {
- return this._startIndex;
- }, set: function(t3) {
- this._startIndex = t3, this.reset();
- }, enumerable: true, configurable: true }), e3.prototype.generate = function(t3) {
- var e4 = on(q(this.currentColor.rgb)), i3 = Z(this.stepOptions.hue) ? this.stepOptions.hue : 1 / t3, n3 = { brighten: 0, lighten: 0, hue: e4.h, lightness: e4.l, saturation: e4.s }, r3 = [], s2 = this.list.length == 0 ? 0 : 1;
- if (this.reuse)
- for (var a2 = s2; a2 <= t3; a2++)
- r3.push(on(q(this._list[a2].rgb)).h);
- else
- for (a2 = s2; a2 <= t3; a2++) {
- var o3 = e4.h + i3 * a2;
- this.wrap && o3 > 1 && (o3 -= 1), r3.push(o3);
- }
- for (this.shuffle && r3.sort(function(t4, e5) {
- return Math.random() - 0.5;
- }), a2 = 0; a2 < t3; a2++) {
- this.reuse ? e4 = on(q(this._list[a2].rgb)) : e4.h = r3.shift(), this.applyStepOptions(e4, n3, a2, this._currentPass);
- var l2 = dn(an(e4)), h2 = (this.stepOptions.brighten || 0) * a2 + (this.passOptions.brighten || 0) * this._currentPass;
- h2 != 0 && (h2 = this.wrap ? hr(h2, this.minLightness, this.maxLightness) : lr(h2, this.minLightness, this.maxLightness), l2 = l2.brighten(h2));
- var p2 = (this.stepOptions.lighten || 0) * a2 + (this.passOptions.lighten || 0) * this._currentPass;
- p2 != 0 && (p2 = this.wrap ? hr(p2, this.minLightness, this.maxLightness) : lr(p2, this.minLightness, this.maxLightness), l2 = l2.lighten(p2)), this._list.push(l2);
- }
- this._currentPass++;
- }, Object.defineProperty(e3.prototype, "currentColor", { get: function() {
- return this._list.length == 0 ? this.baseColor.saturate(this.saturation) : this._list[this._list.length - 1].saturate(this.saturation);
- }, enumerable: true, configurable: true }), e3.prototype.applyStepOptions = function(t3, e4, i3, n3) {
- t3.l = e4.lightness + (this.stepOptions.lightness || 0) * i3 + (this.passOptions.lightness || 0) * n3, this.wrap ? (t3.l > 1 ? t3.l = t3.l - Math.floor(t3.l) : t3.l < 0 && (t3.l = -(t3.l - Math.floor(t3.l))), t3.l = hr(t3.l, this.minLightness, this.maxLightness)) : (t3.l > 1 ? t3.l = 1 : t3.l < 0 && (t3.l = 0), t3.l = lr(t3.l, this.minLightness, this.maxLightness));
- }, e3.prototype.processConfig = function(e4) {
- if (e4) {
- if (Z(e4.list) && it(e4.list))
- for (var i3 = 0, n3 = e4.list.length; i3 < n3; i3++)
- e4.list[i3] instanceof un || (e4.list[i3] = dn(e4.list[i3]));
- !Z(e4.baseColor) || e4.baseColor instanceof un || (e4.baseColor = dn(e4.baseColor));
- }
- t2.prototype.processConfig.call(this, e4);
- }, e3;
- }(yn);
- Ii.registeredClasses.ColorSet = kl;
- var Tl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._list = [], e4._currentStep = 0, e4._startIndex = 0, e4._currentPass = 0, e4.baseColor = new un({ r: 103, g: 183, b: 220 }), e4.className = "PatternSet";
- var i3 = new Ys();
- return e4.list = [e4.getLinePattern(1e3, 45, 1, 6), e4.getRectPattern(10, 0, 4), e4.getLinePattern(1e3, -45, 1, 6), e4.getCirclePattern(11, 2, true), e4.getLinePattern(6, 90, 1), e4.getRectPattern(12, 45, 6, true), e4.getLinePattern(6, 0, 1), e4.getRectPattern(7, 0, 4), e4.getLinePattern(1e3, 45, 2, 3, "4,2"), e4.getCirclePattern(9, 3, false), e4.getLinePattern(1e3, -45, 2, 3, "4,2"), e4.getRectPattern(10, 45, Math.sqrt(50)), e4.getLinePattern(1e3, -45, 2, 1), e4.getRectPattern(10, 0, 9), e4.getLinePattern(1e3, 45, 2, 1), e4.getLinePattern(1e3, 0, 3, 1), e4.getRectPattern(10, 45, 10), e4.getLinePattern(1e3, 90, 3, 1)], e4.baseColor = i3.getFor("stroke"), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.getLinePattern = function(t3, e4, i3, n3, r3) {
- var s2 = new Pl();
- return s2.width = t3, s2.height = t3, s2.stroke = this.baseColor, s2.gap = n3, s2.strokeDasharray = r3, s2.strokeWidth = i3, s2.rotation = e4, s2;
- }, e3.prototype.getRectPattern = function(t3, e4, i3, n3) {
- var r3 = new Cl();
- return r3.width = t3, r3.height = t3, r3.rectWidth = i3, r3.rectHeight = i3, n3 ? (r3.stroke = this.baseColor, r3.strokeWidth = 1, r3.fillOpacity = 0) : (r3.fill = this.baseColor, r3.strokeWidth = 0), e4 != 0 && (r3.shapeRendering = "auto"), r3.rotation = e4, r3;
- }, e3.prototype.getCirclePattern = function(t3, e4, i3) {
- var n3 = new wl();
- return n3.width = t3, n3.height = t3, n3.shapeRendering = "auto", n3.radius = e4, i3 ? (n3.stroke = this.baseColor, n3.strokeWidth = 1, n3.fillOpacity = 0) : (n3.fill = this.baseColor, n3.strokeWidth = 0), n3;
- }, Object.defineProperty(e3.prototype, "list", { get: function() {
- return this._list;
- }, set: function(t3) {
- this._list = t3, this.reset();
- }, enumerable: true, configurable: true }), e3.prototype.next = function() {
- var t3 = this.getIndex(this.currentStep);
- return this._currentStep++, t3;
- }, e3.prototype.getIndex = function(t3) {
- for (; this.list.length <= t3; )
- this.generatePatterns();
- return this.list[t3].clone();
- }, e3.prototype.generatePatterns = function() {
- var t3 = this.list.length / (this._currentPass + 1);
- this._currentPass++;
- for (var e4 = 0; e4 < t3; e4++)
- this.list.push(this.list[e4].clone());
- }, e3.prototype.reset = function() {
- this._currentStep = this._startIndex;
- }, Object.defineProperty(e3.prototype, "currentStep", { get: function() {
- return this._currentStep;
- }, set: function(t3) {
- this._currentStep = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startIndex", { get: function() {
- return this._startIndex;
- }, set: function(t3) {
- this._startIndex = t3, this.reset();
- }, enumerable: true, configurable: true }), e3.prototype.processConfig = function(e4) {
- t2.prototype.processConfig.call(this, e4);
- }, e3;
- }(yn);
- Ii.registeredClasses.PatternSet = Tl;
- var Al = function() {
- function t2() {
- this._disposed = false, this._disposers = [];
- }
- return t2.prototype.init = function() {
- }, t2.prototype.isDisposed = function() {
- return this._disposed;
- }, t2.prototype.dispose = function() {
- if (!this._disposed) {
- this._disposed = true;
- var t3 = this._disposers;
- for (this._disposers = null; t3.length !== 0; )
- t3.shift().dispose();
- }
- }, t2;
- }(), Vl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "AmChartsLogo", e4.valign = "bottom", e4.opacity = 0.3, e4.defaultState.properties.opacity = 0.4, e4.url = "https://www.amcharts.com/", e4.urlTarget = "_blank", e4.showSystemTooltip = true, e4.readerTitle = "Chart created using amCharts library", e4.width = 66, e4.height = 21, e4.background.opacity = 0;
- var i3 = dn("#474758");
- new Ys().getFor("background").alternative.hex == "#ffffff" && (i3 = dn("#ffffff"));
- var n3 = new Oa();
- n3.addColor(i3), n3.addColor(i3, 1, 0.75), n3.addColor(dn("#3cabff"), 1, 0.755), n3.rotation = -10;
- var r3 = n3, s2 = e4.createChild(Ho);
- s2.shouldClone = false, s2.isMeasured = false, s2.segments = [[{ x: 15, y: 15 }, { x: 27, y: 15 }, { x: 36, y: 6 }, { x: 40.5, y: 10.5 }, { x: 45, y: 6 }, { x: 54, y: 15 }, { x: 60, y: 15 }]], s2.strokeWidth = 6 * 0.3, s2.tensionX = 0.8, s2.tensionY = 1, s2.stroke = dn("#3cabff");
- var a2 = e4.createChild(Ho);
- a2.shouldClone = false, a2.isMeasured = false, a2.segments = [[{ x: 6, y: 15 }, { x: 15, y: 15 }, { x: 27, y: 12 * 0.3 }, { x: 39.9, y: 15 }, { x: 51, y: 15 }, { x: 60, y: 15 }]], a2.strokeWidth = 6 * 0.3, a2.tensionX = 0.75, a2.tensionY = 1, a2.stroke = r3, e4._disposers.push(a2);
- var o3 = new Sl();
- e4.filters.push(o3);
- var l2 = new Sl();
- l2.saturation = 1;
- var h2 = e4.states.create("hover");
- return h2.properties.opacity = 1, h2.filters.push(l2), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }($a);
- function Fl(t2, e3) {
- var i3 = _s(t2), n3 = false;
- if (i3 || ((i3 = document.createElement("div")).style.width = "200px", i3.style.height = "200px", i3.style.top = "0", i3.style.left = "0", i3.style.visibility = "hidden", i3.style.position = "absolute", document.body.appendChild(i3), n3 = true), i3) {
- i3.innerHTML = "";
- var r3 = new xa(i3), s2 = new _a(r3.SVGContainer, "svg-" + (ba.length - 1)), a2 = new $a();
- a2.htmlContainer = i3, a2.svgContainer = r3, a2.width = V(100), a2.height = V(100), a2.background.fillOpacity = 0, a2.paper = s2, s2.append(a2.group), n3 && Rs(function() {
- a2.moveHtmlContainer(t2);
- }), a2.relativeWidth = 1, a2.relativeHeight = 1, r3.container = a2;
- var o3 = a2.createChild(e3);
- o3.topParent = a2;
- var l2 = o3.uid;
- Ii.invalidSprites[l2] = [], Ii.invalidDatas[l2] = [], Ii.invalidPositions[l2] = [], Ii.invalidLayouts[l2] = [], a2.baseId = l2, o3.isBaseSprite = true, o3.focusFilter = new Dl(), Ii.baseSprites.push(o3), Ii.baseSpritesByUid[l2] = o3, o3.maskRectangle = { x: 0, y: 0, width: Math.max(r3.width || 0, 0), height: Math.max(r3.height || 0, 0) }, a2.events.on("maxsizechanged", function(t3) {
- t3.previousWidth != 0 && t3.previousHeight != 0 || a2.deepInvalidate(), o3.maskRectangle && (o3.maskRectangle = { x: 0, y: 0, width: Math.max(r3.width || 0, 0), height: Math.max(r3.height || 0, 0) });
- });
- var h2 = null, p2 = function() {
- o3.isDisposed() ? h2 = null : Vs(o3.dom) == null ? (ls.autoDispose ? (a2.htmlContainer = void 0, r3.htmlElement = void 0, o3.dispose()) : fa("Chart was not disposed", o3.uid), h2 = null) : h2 = window.setTimeout(p2, 1e3);
- };
- p2(), o3.addDisposer(new ye(function() {
- h2 !== null && clearTimeout(h2), ee(Ii.baseSprites, o3), Ii.baseSpritesByUid[o3.uid] = void 0;
- })), o3.addDisposer(a2);
- var u2 = a2.createChild($a);
- u2.topParent = a2, u2.width = V(100), u2.height = V(100), u2.isMeasured = false, a2.tooltipContainer = u2, o3.tooltip = new $o(), o3.tooltip.hide(0), o3.tooltip.setBounds({ x: 0, y: 0, width: u2.maxWidth, height: u2.maxHeight }), u2.events.on("maxsizechanged", function() {
- q(o3.tooltip).setBounds({ x: 0, y: 0, width: u2.maxWidth, height: u2.maxHeight });
- }, void 0, false);
- var d2 = new Wo();
- if (d2.events.on("inited", function() {
- d2.__disabled = true;
- }, void 0, false), a2.preloader = d2, o3 instanceof $a && !o3.hasLicense()) {
- var c2 = u2.createChild(Vl);
- u2.events.on("maxsizechanged", function(t3) {
- u2.maxWidth <= 100 || u2.maxHeight <= 50 ? c2.hide() : (c2.isHidden || c2.isHiding) && c2.show();
- }, void 0, false), o3.logo = c2, c2.align = "left", c2.valign = "bottom";
- }
- if (o3.numberFormatter, a2.isStandaloneInstance = true, ls.onlyShowOnViewport)
- if (Ns(i3, ls.viewportTarget))
- ls.queue && Ll(o3);
- else {
- o3.__disabled = true, o3.tooltipContainer.__disabled = true;
- var f2 = [xs(window, "DOMContentLoaded", function() {
- El(o3);
- }), xs(window, "load", function() {
- El(o3);
- }), xs(window, "resize", function() {
- El(o3);
- }), xs(window, "scroll", function() {
- El(o3);
- })];
- if (ls.viewportTarget)
- for (var g2 = it(ls.viewportTarget) ? ls.viewportTarget : ls.viewportTarget ? [ls.viewportTarget] : [], y2 = 0; y2 < g2.length; y2++) {
- var m2 = g2[y2];
- f2.push(xs(m2, "resize", function() {
- El(o3);
- })), f2.push(xs(m2, "scroll", function() {
- El(o3);
- }));
- }
- var v2 = new me(f2);
- o3.addDisposer(v2), o3.vpDisposer = v2;
- }
- else
- ls.queue && Ll(o3);
- return o3;
- }
- throw Qa.log("html container not found"), new Error("html container not found");
- }
- function Ml() {
- for (; Ii.baseSprites.length !== 0; )
- Ii.baseSprites.pop().dispose();
- }
- function Ll(t2) {
- Ii.queue.indexOf(t2) == -1 && (t2.__disabled = true, t2.tooltipContainer.__disabled = true, t2.events.disableType("appeared"), Ii.queue.length == 0 && (Ii.events.once("exitframe", function() {
- Rl(t2);
- }), Qa.requestFrame()), t2.addDisposer(new ye(function() {
- jl(t2);
- })), Ii.queue.push(t2));
- }
- function jl(t2) {
- var e3 = Ii.queue.indexOf(t2);
- if (e3 >= 0) {
- Ii.queue.splice(Ii.queue.indexOf(t2), 1);
- var i3 = Ii.queue[e3];
- i3 && Rl(i3);
- }
- }
- function El(t2) {
- t2.__disabled && Ns(t2.htmlContainer, ls.viewportTarget) && (t2.vpDisposer && t2.vpDisposer.dispose(), Ll(t2));
- }
- function Rl(t2) {
- t2 && t2.tooltipContainer && (t2.__disabled = false, t2.tooltipContainer.__disabled = false, t2.events.enableType("appeared"), t2.dispatch("removedfromqueue"), t2.showOnInit && t2.events.on("appeared", function() {
- jl(t2);
- }), t2.vpDisposer && t2.vpDisposer.dispose(), t2 instanceof $a && t2.invalidateLabels(), t2.tooltipContainer && t2.tooltipContainer.invalidateLayout(), t2 instanceof uo ? (t2.invalidateData(), t2.reinit(), t2.events.once("datavalidated", function() {
- t2.showOnInit ? t2.appear() : jl(t2);
- })) : (t2.reinit(), t2.events.once("inited", function() {
- jl(t2);
- }), t2.showOnInit && t2.appear()));
- }
- function Bl(t2, e3) {
- var i3;
- Q(e3) && (Z(Ii.registeredClasses[e3]) ? e3 = Ii.registeredClasses[e3] : (e3 = Ii.registeredClasses.Container, i3 = new Error("Class [" + e3 + "] is not loaded.")));
- var n3 = Fl(t2, e3);
- return i3 && n3.raiseCriticalError(i3), n3;
- }
- function Hl(t2, e3, i3) {
- var n3, r3;
- Z(i3) || (i3 = t2.type, delete t2.type), Z(e3) || (e3 = t2.container, delete t2.container), Q(i3) && Z(Ii.registeredClasses[i3]) ? n3 = Ii.registeredClasses[i3] : typeof i3 != "function" ? (n3 = $a, r3 = new Error("Class [" + i3 + "] is not loaded.")) : n3 = i3;
- var s2 = Fl(e3, n3);
- return r3 ? s2.raiseCriticalError(r3) : s2.config = t2, s2;
- }
- function Nl(t2, e3) {
- for (var i3 = [], n3 = 2; n3 < arguments.length; n3++)
- i3[n3 - 2] = arguments[n3];
- return new Promise(function(n4, r3) {
- Ii.deferred.push({ scope: e3, callback: t2, args: i3, resolve: n4 }), Ii.deferred.length == 1 && Wl();
- });
- }
- function Wl() {
- var t2, e3 = Ii.deferred[0];
- if (e3) {
- var i3 = (t2 = e3.callback).call.apply(t2, T([e3.scope], e3.args));
- i3.events.on("ready", function() {
- e3.resolve(i3), Ii.deferred.shift(), ls.deferredDelay ? setTimeout(Wl, ls.deferredDelay) : Wl();
- });
- }
- }
- function Xl(t2) {
- Ii.themes.indexOf(t2) === -1 && Ii.themes.push(t2);
- }
- function Yl(t2) {
- ee(Ii.themes, t2);
- }
- function zl() {
- Ii.themes = [];
- }
- function Ul(t2) {
- ls.licenses.push(t2);
- }
- var Gl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "Grip";
- var i3 = new Ys();
- e4.layout = "absolute", e4.padding(10, 10, 10, 10), e4.margin(3, 3, 3, 3), e4.background.fillOpacity = 0.3, e4.background.cornerRadius(10, 10, 10, 10);
- var n3 = new Za();
- n3.element = e4.paper.add("path");
- var r3 = wo({ x: -6, y: 0 });
- return r3 += Co({ x: 6, y: 0 }), r3 += wo({ x: -8, y: -6 }), r3 += Co({ x: 0, y: -12 }), r3 += Co({ x: 8, y: -6 }), r3 += wo({ x: -8, y: 6 }), r3 += Co({ x: 0, y: 12 }), r3 += Co({ x: 8, y: 6 }), n3.path = r3, n3.strokeWidth = 2, n3.fillOpacity = 0, n3.pixelPerfect = true, n3.padding(0, 4, 0, 4), n3.stroke = i3.getFor("text"), n3.strokeOpacity = 0.7, n3.align = "center", n3.valign = "middle", e4.icon = n3, e4.label.dispose(), e4.label = void 0, e4.position = "right", e4.autoHideDelay = 3e3, e4.events.on("shown", function(t3) {
- e4._autoHideTimeout && e4._autoHideTimeout.dispose(), e4.autoHideDelay && (e4._autoHideTimeout = e4.setTimeout(function() {
- e4.hide();
- }, e4.autoHideDelay));
- }), e4.events.on("down", function(t3) {
- e4._autoHideTimeout && e4._autoHideTimeout.dispose();
- }), e4.events.on("out", function(t3) {
- e4.autoHideDelay && (e4._autoHideTimeout = e4.setTimeout(function() {
- e4.hide();
- }, e4.autoHideDelay));
- }), e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "position", { get: function() {
- return this.getPropertyValue("position");
- }, set: function(t3) {
- if (this.setPropertyValue("position", t3))
- switch (t3) {
- case "left":
- this.align = "left", this.valign = "middle", this.horizontalCenter = "left", this.verticalCenter = "middle", this.icon.rotation = 0, this.width = void 0, this.height = V(30);
- break;
- case "right":
- this.align = "right", this.valign = "middle", this.horizontalCenter = "right", this.verticalCenter = "middle", this.icon.rotation = 0, this.width = void 0, this.height = V(30);
- break;
- case "top":
- this.align = "center", this.valign = "top", this.horizontalCenter = "middle", this.verticalCenter = "top", this.icon.rotation = 90, this.width = V(30), this.height = void 0;
- break;
- case "bottom":
- this.align = "center", this.valign = "bottom", this.horizontalCenter = "middle", this.verticalCenter = "bottom", this.icon.rotation = 90, this.width = V(30), this.height = void 0;
- break;
- default:
- this.align = "center", this.valign = "middle", this.horizontalCenter = "middle", this.verticalCenter = "middle", this.icon.rotation = 90, this.width = V(30), this.height = void 0;
- }
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "autoHideDelay", { get: function() {
- return this.getPropertyValue("autoHideDelay");
- }, set: function(t3) {
- this.setPropertyValue("autoHideDelay", t3);
- }, enumerable: true, configurable: true }), e3;
- }(go);
- Ii.registeredClasses.Grip = Gl;
- var Kl = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ChartDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(po), Zl = function(t2) {
- function e3() {
- var i3 = t2.call(this) || this;
- if (i3._legend = new ve(), i3.constructor === e3)
- throw new Error("'Chart' cannot be instantiated directly. Please use a specific chart type.");
- i3.className = "Chart";
- var n3 = new co();
- i3.titles = new Mi(n3), i3._disposers.push(new Ai(i3.titles)), i3._disposers.push(n3), i3.width = V(100), i3.height = V(100), i3.layout = "vertical";
- var r3 = i3.createChild($a);
- r3.shouldClone = false, r3.layout = "vertical", r3.width = V(100), r3.height = V(100), i3.chartAndLegendContainer = r3;
- var s2 = r3.createChild($a);
- return s2.shouldClone = false, s2.width = V(100), s2.height = V(100), i3.chartContainer = s2, i3.showOnInit = true, i3._disposers.push(i3._legend), i3.titles.events.on("inserted", function(t3) {
- i3.processTitle(t3), i3.updateReaderTitleReferences();
- }, i3, false), i3.titles.events.on("removed", function(t3) {
- i3.updateReaderTitleReferences();
- }, i3, false), i3.role = "region", i3.defaultState.transitionDuration = 1, i3.applyTheme(), i3;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Chart"));
- }, e3.prototype.draw = function() {
- this.fixLayout(), t2.prototype.draw.call(this);
- }, e3.prototype.fixLayout = function() {
- var t3 = this.legend;
- if (t3) {
- var e4 = this.chartAndLegendContainer, i3 = this.chartContainer;
- switch (i3.x = void 0, i3.y = void 0, t3.position != "absolute" && (t3.x = void 0, t3.y = void 0), t3.position) {
- case "left":
- e4.layout = "horizontal", t3.toBack();
- break;
- case "right":
- e4.layout = "horizontal", t3.toFront();
- break;
- case "top":
- e4.layout = "vertical", t3.toBack();
- break;
- case "bottom":
- e4.layout = "vertical", t3.toFront();
- break;
- case "absolute":
- t3.isMeasured = false;
- }
- }
- }, e3.prototype.feedLegend = function() {
- }, e3.prototype.processTitle = function(t3) {
- var e4 = t3.newValue;
- return e4.parent = this, e4.toBack(), e4.shouldClone = false, e4.align = "center", e4.uidAttr(), e4;
- }, e3.prototype.updateReaderTitleReferences = function() {
- if (this.titles.length) {
- var t3 = [];
- ti(this.titles.iterator(), function(e4) {
- t3.push(e4.uid);
- }), this.setSVGAttribute({ "aria-labelledby": t3.join(" ") });
- } else
- this.removeSVGAttribute("aria-labelledby");
- }, Object.defineProperty(e3.prototype, "legend", { get: function() {
- return this._legend.get();
- }, set: function(t3) {
- this.setLegend(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setLegend = function(t3) {
- var e4 = this;
- this._legend.get() !== t3 && (t3 ? (t3.parent = this.chartAndLegendContainer, this._legend.set(t3, t3.events.on("propertychanged", function(t4) {
- t4.property == "position" && e4.fixLayout();
- }, void 0, false)), t3.addDisposer(new ye(function() {
- e4.legend = void 0;
- }))) : this._legend.reset(), this.feedLegend());
- }, e3.prototype.dispose = function() {
- this.legend && this.legend.dispose(), t2.prototype.dispose.call(this);
- }, e3.prototype.processConfig = function(e4) {
- e4 && Z(e4.legend) && !Z(e4.legend.type) && (e4.legend.type = "Legend"), t2.prototype.processConfig.call(this, e4);
- }, e3.prototype.copyFrom = function(e4) {
- this.titles.copyFrom(e4.titles), this.chartContainer.copyFrom(e4.chartContainer), e4.legend && (this.legend = e4.legend.clone(), this.legend.removeChildren()), t2.prototype.copyFrom.call(this, e4);
- }, Object.defineProperty(e3.prototype, "dragGrip", { get: function() {
- var t3 = this;
- if (!this._dragGrip) {
- var e4 = this.tooltipContainer.createChild(Gl);
- e4.align = "right", e4.valign = "middle", e4.hide(0), e4.events.on("down", function(e5) {
- e5.touch && (t3.interactionsEnabled = false);
- }), e4.events.on("up", function(e5) {
- t3.interactionsEnabled = true;
- }), this.events.on("down", function(t4) {
- t4.touch && e4.show();
- }), this._dragGrip = e4;
- }
- return this._dragGrip;
- }, set: function(t3) {
- this._dragGrip = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "focusable", { get: function() {
- return this.parent.focusable;
- }, set: function(t3) {
- this.parent.focusable = t3;
- }, enumerable: true, configurable: true }), e3;
- }(uo);
- Ii.registeredClasses.Chart = Zl, lo.push({ relevant: ho.widthXS, state: function(t2, e3) {
- if (t2 instanceof Zl) {
- var i3 = t2.states.create(e3);
- return t2.pixelPaddingLeft > 10 && (i3.properties.paddingLeft = 10), t2.pixelPaddingRight > 10 && (i3.properties.paddingRight = 10), i3;
- }
- return null;
- } }), lo.push({ relevant: ho.heightXS, state: function(t2, e3) {
- if (t2 instanceof Zl) {
- var i3 = t2.states.create(e3);
- return t2.pixelPaddingTop > 10 && (i3.properties.paddingTop = 10), t2.pixelPaddingBottom > 10 && (i3.properties.paddingBottom = 10), i3;
- }
- return null;
- } }), lo.push({ relevant: ho.widthXXS, state: function(t2, e3) {
- if (t2 instanceof Zl) {
- var i3 = t2.states.create(e3);
- return i3.properties.paddingLeft = 0, i3.properties.paddingRight = 0, i3;
- }
- return null;
- } }), lo.push({ relevant: ho.heightXXS, state: function(t2, e3) {
- if (t2 instanceof Zl) {
- var i3 = t2.states.create(e3);
- return i3.properties.paddingTop = 0, i3.properties.paddingBottom = 0, i3;
- }
- return null;
- } });
- var ql = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Bullet", e4.isMeasured = false, e4.tooltipX = 0, e4.tooltipY = 0, e4.layout = "none", e4.applyOnClones = true, e4.copyToLegendMarker = true, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "locationX", { get: function() {
- return this.getPropertyValue("locationX");
- }, set: function(t3) {
- if (this.setPropertyValue("locationX", t3)) {
- var e4 = this.dataItem;
- e4 && e4.component && e4.component.invalidate();
- }
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "locationY", { get: function() {
- return this.getPropertyValue("locationY");
- }, set: function(t3) {
- if (this.setPropertyValue("locationY", t3)) {
- var e4 = this.dataItem;
- e4 && e4.component && e4.component.invalidate();
- }
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "xField", { get: function() {
- return this.getPropertyValue("xField");
- }, set: function(t3) {
- this.setPropertyValue("xField", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "yField", { get: function() {
- return this.getPropertyValue("yField");
- }, set: function(t3) {
- this.setPropertyValue("yField", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "isDynamic", { get: function() {
- return this.getPropertyValue("isDynamic");
- }, set: function(t3) {
- this.setPropertyValue("isDynamic", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "copyToLegendMarker", { get: function() {
- return this.getPropertyValue("copyToLegendMarker");
- }, set: function(t3) {
- this.setPropertyValue("copyToLegendMarker", t3);
- }, enumerable: true, configurable: true }), e3;
- }($a);
- Ii.registeredClasses.Bullet = ql, lo.push({ relevant: ho.isXS, state: function(t2, e3) {
- if (t2 instanceof ql) {
- var i3 = t2.states.create(e3);
- return i3.properties.disabled = true, i3;
- }
- return null;
- } });
- var $l = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.childrenCreated = false, e4.className = "LegendDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "label", { get: function() {
- var t3 = this;
- if (!this._label) {
- var e4 = this.component.labels.create();
- this._label = e4, this.addSprite(e4), this._disposers.push(e4), e4.parent = this.itemContainer, this._disposers.push(new ye(function() {
- Z(t3.component) && t3.component.labels.removeValue(e4);
- }));
- }
- return this._label;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "color", { get: function() {
- return this.properties.color;
- }, set: function(t3) {
- this.setProperty("color", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "valueLabel", { get: function() {
- var t3 = this;
- if (!this._valueLabel) {
- var e4 = this.component.valueLabels.create();
- this._valueLabel = e4, this.addSprite(e4), this._disposers.push(e4), e4.parent = this.itemContainer, this._disposers.push(new ye(function() {
- Z(t3.component) && t3.component.valueLabels.removeValue(e4);
- }));
- }
- return this._valueLabel;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "itemContainer", { get: function() {
- var t3 = this;
- if (!this._itemContainer) {
- var e4 = this.component, i3 = e4.itemContainers.create();
- i3.parent = e4, this._itemContainer = i3, this.addSprite(i3), this._disposers.push(i3), i3.togglable && i3.events.on("toggled", function(t4) {
- e4.toggleDataItem(t4.target.dataItem);
- }, void 0, false), i3.focusable && (i3.events.on("hit", function(t4) {
- e4.focusedItem = void 0;
- }, void 0, false), i3.events.on("focus", function(t4) {
- e4.focusedItem = t4.target.dataItem;
- }, void 0, false), i3.events.on("blur", function(t4) {
- e4.focusedItem = void 0;
- }, void 0, false)), this._disposers.push(new ye(function() {
- Z(t3.component) && t3.component.itemContainers.removeValue(i3);
- })), this.dataContext.uidAttr && (i3.readerControls = this.dataContext.uidAttr(), i3.readerLabelledBy = this.dataContext.uidAttr());
- var n3 = this.dataContext;
- if ((n3 instanceof po || n3 instanceof Za) && !n3.isDisposed()) {
- var r3 = function(t4) {
- i3.readerChecked = t4.visible, i3.events.disableType("toggled"), i3.isActive = !t4.visible, i3.events.enableType("toggled");
- };
- n3.addDisposer(new ye(function() {
- t3.component && t3.component.dataItems.remove(t3);
- })), n3 instanceof Za ? (i3.addDisposer(n3.events.on("visibilitychanged", r3, void 0, false)), i3.addDisposer(n3.events.on("hidden", function(t4) {
- i3.readerChecked = false, i3.events.disableType("toggled"), i3.isActive = true, i3.events.enableType("toggled");
- }, void 0, false)), i3.addDisposer(n3.events.on("shown", function(t4) {
- i3.readerChecked = true, i3.events.disableType("toggled"), i3.isActive = false, i3.events.enableType("toggled");
- }, void 0, false))) : i3.addDisposer(n3.events.on("visibilitychanged", r3, void 0, false));
- }
- }
- return this._itemContainer;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "marker", { get: function() {
- var t3 = this;
- if (!this._marker) {
- var e4 = this.component.markers.create();
- this._marker = e4, e4.parent = this.itemContainer, this.addSprite(e4), this._disposers.push(e4), this._disposers.push(new ye(function() {
- Z(t3.component) && t3.component.markers.removeValue(e4);
- }));
- }
- return this._marker;
- }, enumerable: true, configurable: true }), e3;
- }(po), Jl = function() {
- this.createMarker = true;
- }, Ql = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "Legend", e4.layout = "grid", e4.setPropertyValue("useDefaultMarker", false), e4.setPropertyValue("scrollable", false), e4.setPropertyValue("contentAlign", "center");
- var i3 = new $a();
- i3.applyOnClones = true, i3.padding(8, 0, 8, 0), i3.margin(0, 10, 0, 10), i3.layout = "horizontal", i3.clickable = true, i3.focusable = true, i3.role = "switch", i3.togglable = true, i3.cursorOverStyle = Ia.pointer, i3.background.fillOpacity = 0, e4.itemContainers = new Mi(i3), e4._disposers.push(new Ai(e4.itemContainers)), e4._disposers.push(e4.itemContainers.template), e4._disposers.push(ua().body.events.on("keyup", function(t3) {
- if ($s.isKey(t3.event, "enter") && e4.focusedItem) {
- var i4 = e4.focusedItem, n4 = i4.itemContainer;
- n4.togglable ? e4.toggleDataItem(i4) : n4.clickable && n4.events.isEnabled("hit") && (n4.dispatchImmediately("hit", { event: t3 }), e4.focusedItem = i4);
- }
- }, e4));
- var n3 = new Ys(), r3 = new $a();
- r3.width = 23, r3.height = 23, r3.interactionsEnabled = false, r3.applyOnClones = true, r3.setStateOnChildren = true, r3.background.fillOpacity = 0, r3.background.strokeOpacity = 0, r3.propertyFields.fill = "fill", r3.valign = "middle";
- var s2 = n3.getFor("disabledBackground");
- r3.events.on("childadded", function(t3) {
- var e5 = t3.newValue.states.create("active");
- e5.properties.stroke = s2, e5.properties.fill = s2;
- }), e4.markers = new Mi(r3), e4._disposers.push(new Ai(e4.markers)), e4._disposers.push(e4.markers.template);
- var a2 = r3.createChild(fo);
- a2.width = V(100), a2.height = V(100), a2.applyOnClones = true, a2.propertyFields.fill = "fill", a2.strokeOpacity = 0;
- var o3 = new co();
- o3.text = "{name}", o3.margin(0, 5, 0, 5), o3.valign = "middle", o3.applyOnClones = true, o3.states.create("active").properties.fill = n3.getFor("disabledBackground"), e4.labels = new Mi(o3), e4._disposers.push(new Ai(e4.labels)), e4._disposers.push(e4.labels.template), o3.interactionsEnabled = false, o3.truncate = true, o3.fullWords = false;
- var l2 = new co();
- return l2.margin(0, 5, 0, 0), l2.valign = "middle", l2.width = 50, l2.align = "right", l2.textAlign = "end", l2.applyOnClones = true, l2.states.create("active").properties.fill = n3.getFor("disabledBackground"), l2.interactionsEnabled = false, e4.valueLabels = new Mi(l2), e4._disposers.push(new Ai(e4.valueLabels)), e4._disposers.push(e4.valueLabels.template), e4.position = "bottom", i3.states.create("active"), i3.setStateOnChildren = true, e4.role = "group", e4.events.on("layoutvalidated", e4.handleScrollbar, e4, false), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Legend"));
- }, e3.prototype.createDataItem = function() {
- return new $l();
- }, e3.prototype.validateDataElements = function() {
- this.scrollbar && (this.scrollbar.start = 0, this.scrollbar.end = 1), t2.prototype.validateDataElements.call(this);
- }, e3.prototype.validateDataElement = function(e4) {
- t2.prototype.validateDataElement.call(this, e4);
- var i3 = e4.itemContainer, n3 = e4.marker;
- e4.label;
- var r3 = e4.valueLabel;
- i3.readerChecked = e4.dataContext.visible, e4.dataContext.legendDataItem = e4;
- var s2 = e4.label.maxWidth;
- e4.label.width instanceof A || (e4.label.width = void 0), s2 > 0 && (e4.label.maxWidth = s2), r3.align == "right" && (r3.width = void 0);
- var a2 = e4.dataContext.legendSettings, o3 = e4.dataContext;
- !o3.createLegendMarker || this.useDefaultMarker && o3 instanceof Za ? this.markers.template.propertyFields.fill = void 0 : e4.childrenCreated || (o3.createLegendMarker(n3), e4.childrenCreated = true), o3.updateLegendValue && o3.updateLegendValue(), o3.component && o3.component.updateLegendValue && o3.component.updateLegendValue(o3), r3.invalid && r3.validate(), r3.text == "" || r3.text == null ? r3.__disabled = true : r3.__disabled = false, !a2 || a2.itemValueText == null && a2.valueText == null || (r3.__disabled = false);
- var l2 = e4.dataContext.visible;
- l2 === void 0 && (l2 = true), l2 = z(l2), e4.dataContext.visible = l2, i3.events.disableType("toggled"), i3.isActive = !l2, i3.isActive ? i3.setState("active", 0) : i3.setState("default", 0), i3.events.enableType("toggled");
- }, e3.prototype.afterDraw = function() {
- var e4 = this, i3 = this.getPropertyValue("maxWidth"), n3 = 0;
- this.labels.each(function(t3) {
- t3.invalid && (t3.maxWidth = void 0, t3.validate()), t3.measuredWidth + t3.pixelMarginLeft + t3.pixelMarginRight > n3 && (n3 = t3.measuredWidth + t3.pixelMarginLeft + t3.pixelMarginRight);
- });
- var r3 = 0;
- this.valueLabels.each(function(t3) {
- t3.invalid && t3.validate(), t3.measuredWidth + t3.pixelMarginLeft + t3.pixelMarginRight > r3 && (r3 = t3.measuredWidth + t3.pixelMarginLeft + t3.pixelMarginRight);
- });
- var s2 = 0;
- this.markers.each(function(t3) {
- t3.invalid && t3.validate(), t3.measuredWidth + t3.pixelMarginLeft + t3.pixelMarginRight > s2 && (s2 = t3.measuredWidth + t3.pixelMarginLeft + t3.pixelMarginRight);
- });
- var a2, o3 = this.itemContainers.template, l2 = o3.pixelMarginRight + o3.pixelMarginLeft, h2 = n3 + r3 + s2;
- tt(i3) ? ((i3 -= l2) > h2 && (i3 = h2), a2 = i3 - s2 - r3) : a2 = n3, this.labels.each(function(t3) {
- (e4.valueLabels.template.align == "right" || t3.measuredWidth > a2) && (t3.width instanceof A || (t3.width = Math.min(t3.maxWidth, a2 - t3.pixelMarginLeft - t3.pixelMarginRight), t3.maxWidth = t3.width));
- }), this.valueLabels.template.align == "right" && this.valueLabels.each(function(t3) {
- t3.width = r3 - t3.pixelMarginRight - t3.pixelMarginLeft;
- }), t2.prototype.afterDraw.call(this);
- }, e3.prototype.handleScrollbar = function() {
- var t3 = this.scrollbar;
- this.scrollable && t3 && (t3.height = this.measuredHeight, t3.x = this.measuredWidth - t3.pixelWidth - t3.pixelMarginLeft, this.contentHeight > this.measuredHeight ? (t3.visible = true, t3.thumb.height = t3.height * this.measuredHeight / this.contentHeight, this.paddingRight = t3.pixelWidth + t3.pixelMarginLeft + +t3.pixelMarginRight) : t3.visible = false, this.updateMasks());
- }, Object.defineProperty(e3.prototype, "position", { get: function() {
- return this.getPropertyValue("position");
- }, set: function(t3) {
- this.setPropertyValue("position", t3) && (t3 == "left" || t3 == "right" ? (this.margin(10, 5, 10, 10), this.valign = "middle", this.contentAlign = "none", this.valueLabels.template.align = "right", tt(this.maxColumns) || (this.maxColumns = 1), this.width = void 0, this.maxWidth = 220) : (this.maxColumns = void 0, this.width = V(100), this.valueLabels.template.align = "left"), this.invalidate());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "useDefaultMarker", { get: function() {
- return this.getPropertyValue("useDefaultMarker");
- }, set: function(t3) {
- this.setPropertyValue("useDefaultMarker", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "scrollable", { get: function() {
- return this.getPropertyValue("scrollable");
- }, set: function(t3) {
- if (this.setPropertyValue("scrollable", t3, true))
- if (t3) {
- var e4 = this.createChild(Uo);
- this.scrollbar = e4, e4.isMeasured = false, e4.orientation = "vertical", e4.endGrip.__disabled = true, e4.startGrip.__disabled = true, e4.visible = false, e4.marginLeft = 5, this._mouseWheelDisposer = this.events.on("wheel", this.handleWheel, this, false), this._disposers.push(this._mouseWheelDisposer), this._disposers.push(e4.events.on("rangechanged", this.updateMasks, this, false));
- } else
- this._mouseWheelDisposer && (this._mouseWheelDisposer.dispose(), this.scrollbar && (this.scrollbar.dispose(), this.scrollbar = void 0));
- }, enumerable: true, configurable: true }), e3.prototype.handleWheel = function(t3) {
- var e4 = t3.shift.y, i3 = this.scrollbar;
- if (i3) {
- var n3 = e4 / 1e3 * this.measuredHeight / this.contentHeight, r3 = i3.end - i3.start;
- e4 > 0 ? (i3.start = gt(0, i3.start - n3), i3.end = i3.start + r3) : (i3.end = yt(1, i3.end - n3), i3.start = i3.end - r3);
- }
- }, e3.prototype.updateMasks = function() {
- var t3 = this;
- this.scrollbar && this.itemContainers.each(function(e4) {
- e4.dy = -t3.scrollbar.thumb.pixelY * t3.contentHeight / t3.measuredHeight, e4.maskRectangle = { x: 0, y: -e4.dy, width: t3.measuredWidth, height: t3.measuredHeight };
- });
- }, e3.prototype.toggleDataItem = function(t3) {
- var e4 = t3.dataContext;
- !e4.visible || e4.isHiding || e4 instanceof Za && e4.isHidden ? (t3.color = t3.colorOrig, e4.appeared = true, t3.itemContainer.isActive = false, e4.hidden === true && (e4.hidden = false), e4.show ? e4.show() : e4.visible = true, this.svgContainer.readerAlert(this.language.translate("%1 shown", this.language.locale, t3.label.readerTitle))) : (t3.itemContainer.isActive = true, e4.appeared = true, e4.hide ? e4.hide() : e4.visible = false, this.svgContainer.readerAlert(this.language.translate("%1 hidden", this.language.locale, t3.label.readerTitle)), t3.color = new Ys().getFor("disabledBackground"));
- }, Object.defineProperty(e3.prototype, "preloader", { get: function() {
- }, enumerable: true, configurable: true }), e3.prototype.handleDataItemPropertyChange = function(t3, e4) {
- t3.valueLabel.invalidate(), t3.label.invalidate();
- }, e3;
- }(uo);
- Ii.registeredClasses.Legend = Ql, lo.push({ relevant: ho.widthXS, state: function(t2, e3) {
- if (t2 instanceof Ql && (t2.position == "left" || t2.position == "right")) {
- var i3 = t2.states.create(e3);
- return i3.properties.position = "bottom", i3;
- }
- return null;
- } }), lo.push({ relevant: ho.heightXS, state: function(t2, e3) {
- if (t2 instanceof Ql && (t2.position == "top" || t2.position == "bottom")) {
- var i3 = t2.states.create(e3);
- return i3.properties.position = "right", i3;
- }
- return null;
- } }), lo.push({ relevant: ho.isXS, state: function(t2, e3) {
- if (t2 instanceof Ql) {
- var i3 = t2.states.create(e3);
- return i3.properties.disabled = true, i3;
- }
- return null;
- } });
- var th = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "SeriesDataItem", e4.values.value = {}, e4.values.value = {}, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "bullets", { get: function() {
- return this._bullets || (this._bullets = new Pi(), this._disposers.push(new _i(this._bullets))), this._bullets;
- }, enumerable: true, configurable: true }), e3.prototype.dispose = function() {
- this.bullets.clear(), t2.prototype.dispose.call(this);
- }, Object.defineProperty(e3.prototype, "value", { get: function() {
- return this.values.value.value;
- }, set: function(t3) {
- this.setValue("value", t3);
- }, enumerable: true, configurable: true }), e3;
- }(po), eh = function(t2) {
- function e3() {
- var i3 = t2.call(this) || this;
- if (i3._ignoreMinMax = false, i3._showBullets = true, i3.legendSettings = new Jl(), i3._tmin = new Pi(), i3._tmax = new Pi(), i3._smin = new Pi(), i3._smax = new Pi(), i3.dataItemsByAxis = new Pi(), i3.skipFocusThreshold = 20, i3._itemReaderTextChanged = false, i3.calculatePercent = false, i3.usePercentHack = true, i3.autoDispose = true, i3.simplifiedProcessing = false, i3.constructor === e3)
- throw new Error("'Series' cannot be instantiated directly. Please use a specific series type.");
- i3.className = "Series", i3.isMeasured = false, i3.layout = "none", i3.shouldClone = false, i3.setPropertyValue("hidden", false), i3.axisRanges = new Fi(), i3.axisRanges.events.on("inserted", i3.processAxisRange, i3, false), i3.minBulletDistance = 0, i3.mainContainer = i3.createChild($a), i3.mainContainer.shouldClone = false, i3.mainContainer.mask = i3.createChild(Za), i3._disposers.push(i3.mainContainer);
- var n3 = i3.mainContainer.createChild($a);
- return i3._shouldBeReady.push(n3), n3.shouldClone = false, n3.layout = "none", n3.virtualParent = i3, i3._disposers.push(n3), i3.bulletsContainer = n3, i3.tooltip = new $o(), i3.tooltip.virtualParent = i3, i3._disposers.push(i3.tooltip), i3.hiddenState.transitionEasing = Yr, i3.dataItem = i3.createDataItem(), i3._disposers.push(i3.dataItem), i3.dataItem.component = i3, i3.role = "group", i3.applyTheme(), i3;
- }
- return C(e3, t2), e3.prototype.applyTheme = function() {
- t2.prototype.applyTheme.call(this), ls.autoSetClassName && this.bulletsContainer && (this.bulletsContainer.className = this.className + "-bullets", this.bulletsContainer.setClassName());
- }, e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Series"));
- }, e3.prototype.createDataItem = function() {
- return new th();
- }, Object.defineProperty(e3.prototype, "chart", { get: function() {
- return this._chart;
- }, set: function(t3) {
- this._chart = t3;
- }, enumerable: true, configurable: true }), e3.prototype.positionBullet = function(t3) {
- }, e3.prototype.processBullet = function(t3) {
- var e4 = this, i3 = t3.newValue;
- i3.isTemplate = true, this.events.once("datavalidated", function(t4) {
- e4.itemsFocusable() && (i3.focusable = true);
- }), this.invalidate();
- }, e3.prototype.removeBullet = function(t3) {
- var e4 = t3.oldValue;
- this.dataItems.each(function(t4) {
- var i3 = t4.bullets.getKey(e4.uid);
- i3 && i3.dispose();
- }), this.invalidate();
- }, e3.prototype.validateDataItems = function() {
- t2.prototype.validateDataItems.call(this), this.processValues(false);
- }, e3.prototype.getFirstValue = function(t3, e4) {
- for (var i3 = e4; i3 >= 0; i3--) {
- var n3 = this.dataItems.getIndex(i3).getActualWorkingValue(t3);
- if (tt(n3))
- return n3;
- }
- return null;
- }, e3.prototype.getAbsoluteFirstValue = function(t3) {
- for (var e4 = 0; e4 < this.dataItems.length; e4++) {
- var i3 = this.dataItems.getIndex(e4).values[t3].value;
- if (tt(i3))
- return i3;
- }
- return null;
- }, e3.prototype.rangeChangeUpdate = function() {
- t2.prototype.rangeChangeUpdate.call(this), this.processValues(true);
- }, e3.prototype.processValues = function(t3) {
- var e4 = this;
- if (!this.simplifiedProcessing) {
- var i3 = this.dataItems, n3 = {}, r3 = {}, s2 = {}, a2 = {}, o3 = {}, l2 = {}, h2 = {}, p2 = {}, u2 = {}, d2 = {}, c2 = gt(0, this.startIndex);
- c2 = yt(c2, this.dataItems.length);
- var f2 = yt(this.endIndex, this.dataItems.length);
- if (tt(c2) || (c2 = 0), tt(f2) || (f2 = this.dataItems.length), c2 > 0) {
- var g2 = i3.getIndex(c2 - 1);
- Ne(g2.values, function(t4, e5) {
- var i4 = g2.getActualWorkingValue(t4);
- tt(i4) && (p2[t4] = i4);
- });
- }
- for (var y2 = function(t4) {
- var f3 = i3.getIndex(t4);
- Ne(f3.values, function(t5, i4) {
- var g3 = f3.getActualWorkingValue(t5);
- if (tt(g3)) {
- tt(n3[t5]) || (n3[t5] = 0), n3[t5]++, tt(r3[t5]) || (r3[t5] = 0), r3[t5] += g3, tt(s2[t5]) || (s2[t5] = 0), s2[t5] += Math.abs(g3), tt(l2[t5]) || (l2[t5] = g3), h2[t5] = g3, tt(a2[t5]) ? a2[t5] > g3 && (a2[t5] = g3) : a2[t5] = g3, tt(o3[t5]) ? o3[t5] < g3 && (o3[t5] = g3) : o3[t5] = g3, tt(u2[t5]) || (u2[t5] = e4.getFirstValue(t5, c2)), tt(d2[t5]) || (d2[t5] = e4.getAbsoluteFirstValue(t5)), f3.setCalculatedValue(t5, g3 - u2[t5], "change"), f3.setCalculatedValue(t5, (g3 - u2[t5]) / u2[t5] * 100, "changePercent"), f3.setCalculatedValue(t5, g3 - d2[t5], "startChange"), f3.setCalculatedValue(t5, (g3 - d2[t5]) / d2[t5] * 100, "startChangePercent");
- var y3 = p2[t5];
- tt(y3) || (y3 = g3), f3.setCalculatedValue(t5, g3 - y3, "previousChange"), f3.setCalculatedValue(t5, (g3 - y3) / y3 * 100, "previousChangePercent"), p2[t5] = g3;
- }
- });
- }, m2 = c2; m2 < f2; m2++)
- y2(m2);
- if (this.calculatePercent) {
- var v2 = function(t4) {
- var n4 = i3.getIndex(t4);
- Ne(n4.values, function(t5) {
- var i4 = s2[t5], r4 = n4.getActualWorkingValue(t5);
- if (tt(r4))
- if (i4 > 0) {
- e4.usePercentHack && r4 == i4 && (i4 = n4.values[t5].value);
- var a3 = r4 / i4 * 100;
- n4.setCalculatedValue(t5, a3, "percent");
- } else
- n4.setCalculatedValue(t5, 0, "percent");
- });
- };
- for (m2 = c2; m2 < f2; m2++)
- v2(m2);
- }
- if (c2 > 0) {
- var b2 = i3.getIndex(c2 - 1);
- Ne(b2.values, function(t4) {
- var e5 = b2.values[t4].value;
- b2.setCalculatedValue(t4, e5 - l2[t4], "change"), b2.setCalculatedValue(t4, (e5 - l2[t4]) / l2[t4] * 100, "changePercent");
- });
- }
- var x2 = this.dataItem;
- Ne(x2.values, function(t4) {
- x2.setCalculatedValue(t4, r3[t4], "sum"), x2.setCalculatedValue(t4, s2[t4], "absoluteSum"), x2.setCalculatedValue(t4, r3[t4] / n3[t4], "average"), x2.setCalculatedValue(t4, l2[t4], "open"), x2.setCalculatedValue(t4, h2[t4], "close"), x2.setCalculatedValue(t4, a2[t4], "low"), x2.setCalculatedValue(t4, o3[t4], "high"), x2.setCalculatedValue(t4, n3[t4], "count");
- });
- }
- }, e3.prototype.validate = function() {
- Ir() && this.filters.clear(), ti(this.axisRanges.iterator(), function(t3) {
- t3.validate();
- }), t2.prototype.validate.call(this);
- var e4 = this.bulletsContainer;
- if (e4.fill = this.fill, e4.stroke = this.stroke, e4.x = this.pixelX, e4.y = this.pixelY, this.bulletsContainer.children.length > 0)
- if (this._showBullets) {
- for (var i3 = 0; i3 < this.startIndex; i3++)
- (n3 = this.dataItems.getIndex(i3)) && n3.bullets.each(function(t3, e5) {
- e5.__disabled = true;
- });
- for (i3 = this.dataItems.length - 1; i3 > this.endIndex; i3--) {
- var n3;
- (n3 = this.dataItems.getIndex(i3)) && n3.bullets.each(function(t3, e5) {
- e5.__disabled = true;
- });
- }
- } else
- this.bulletsContainer.children.each(function(t3) {
- t3.__disabled = true;
- });
- this.updateTooltipBounds();
- }, e3.prototype.updateTooltipBounds = function() {
- if (this.topParent) {
- var t3 = { x: 0, y: 0, width: this.topParent.maxWidth, height: this.topParent.maxHeight };
- this.tooltip.setBounds(t3);
- }
- }, e3.prototype.shouldCreateBullet = function(t3, e4) {
- return true;
- }, e3.prototype.validateDataElement = function(e4) {
- var i3 = this;
- t2.prototype.validateDataElement.call(this, e4), this._showBullets ? (this.isHidden || (this.bulletsContainer.visible = true), this.bullets.each(function(t3) {
- var n3 = e4.bullets.getKey(t3.uid);
- if (i3.shouldCreateBullet(e4, t3)) {
- if (!n3) {
- var r3 = t3.propertyFields.disabled, s2 = e4.dataContext;
- r3 && s2 && s2[r3] === false ? (t3.applyOnClones = false, t3.disabled = false, n3 = t3.clone(), t3.disabled = true, t3.applyOnClones = true) : n3 = t3.clone(), n3.shouldClone = false, e4.addSprite(n3), i3.visible && !i3.isHiding || n3.hide(0);
- }
- var a2 = n3.dataItem;
- if (a2 != e4) {
- a2 && a2.bullets.setKey(t3.uid, void 0);
- var o3 = i3.itemReaderText;
- n3 instanceof ql && (o3 || (o3 = "{" + n3.xField + "}: {" + n3.yField + "}"), n3.isDynamic && (e4.events.on("workingvaluechanged", n3.deepInvalidate, n3, false), i3.dataItem.events.on("workingvaluechanged", n3.deepInvalidate, n3, false)), n3.deepInvalidate()), n3.focusable && (n3.events.on("focus", function(t4) {
- n3.readerTitle = i3.populateString(o3, n3.dataItem);
- }, void 0, false), n3.events.on("blur", function(t4) {
- n3.readerTitle = "";
- }, void 0, false)), n3.hoverable && (n3.events.on("over", function(t4) {
- n3.readerTitle = i3.populateString(o3, n3.dataItem);
- }, void 0, false), n3.events.on("out", function(t4) {
- n3.readerTitle = "";
- }, void 0, false));
- }
- n3.parent = i3.bulletsContainer, e4.bullets.setKey(t3.uid, n3), n3.maxWidth = e4.itemWidth, n3.maxHeight = e4.itemHeight, n3.__disabled = false, i3.positionBullet(n3);
- } else
- n3 && (n3.__disabled = true);
- })) : this.bulletsContainer.visible = false;
- }, e3.prototype.handleDataItemWorkingValueChange = function(t3, e4) {
- this.dataRangeInvalid || this.invalidateProcessedData();
- }, Object.defineProperty(e3.prototype, "ignoreMinMax", { get: function() {
- return this._ignoreMinMax;
- }, set: function(t3) {
- this._ignoreMinMax = t3, this.invalidateDataItems();
- }, enumerable: true, configurable: true }), e3.prototype.createMask = function() {
- }, e3.prototype.processAxisRange = function(t3) {
- this.rangesContainer || (this.rangesContainer = this.createChild($a), this.rangesContainer.shouldClone = false, this.rangesContainer.isMeasured = false);
- var e4 = t3.newValue;
- e4 && (e4.contents.parent = this.rangesContainer, e4.isRange = true, e4.events.on("valuechanged", this.invalidateDataItems, this, false));
- }, e3.prototype.getAxisField = function(t3) {
- }, e3.prototype.showTooltipAtPosition = function(t3, e4) {
- }, Object.defineProperty(e3.prototype, "minBulletDistance", { get: function() {
- return this.getPropertyValue("minBulletDistance");
- }, set: function(t3) {
- this.setPropertyValue("minBulletDistance", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "bullets", { get: function() {
- return this._bullets || (this._bullets = new Mi(new ql()), this._bullets.template.virtualParent = this, this._bullets.events.on("inserted", this.processBullet, this, false), this._bullets.events.on("removed", this.removeBullet, this, false), this._disposers.push(new Ai(this._bullets)), this._disposers.push(this._bullets.template)), this._bullets;
- }, enumerable: true, configurable: true }), e3.prototype.createLegendMarker = function(t3) {
- }, Object.defineProperty(e3.prototype, "hiddenInLegend", { get: function() {
- return this.getPropertyValue("hiddenInLegend");
- }, set: function(t3) {
- this.setPropertyValue("hiddenInLegend", t3) && this.chart && this.chart.feedLegend();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "name", { get: function() {
- return this.getPropertyValue("name");
- }, set: function(t3) {
- this.setPropertyValue("name", t3);
- var e4 = this.legendDataItem;
- e4 && (e4.component.invalidate(), e4.component.invalidateRawData()), this.readerTitle = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "itemReaderText", { get: function() {
- var t3 = this._itemReaderText;
- return t3 || (this.tooltipText ? t3 = $n(this.tooltipText) : this.tooltipHTML && (t3 = $n(this.tooltipHTML))), this._adapterO ? this._adapterO.apply("itemReaderText", t3) : t3;
- }, set: function(t3) {
- this._itemReaderText = t3, this._itemReaderTextChanged = true;
- }, enumerable: true, configurable: true }), e3.prototype.itemsFocusable = function() {
- return !(this.dataItems.length >= this.skipFocusThreshold);
- }, Object.defineProperty(e3.prototype, "legendDataItem", { get: function() {
- return this._legendDataItem;
- }, set: function(t3) {
- this._legendDataItem = t3, this._legendDataItem.itemContainer.deepInvalidate();
- }, enumerable: true, configurable: true }), e3.prototype.updateLegendValue = function(t3, e4) {
- if (this.legendDataItem) {
- var i3 = this.legendSettings, n3 = this.legendDataItem, r3 = n3.label, s2 = n3.valueLabel;
- t3 && !t3.isDisposed() || e4 ? (s2 && (i3.itemValueText && (s2.text = i3.itemValueText), s2.dataItem = t3), r3 && (i3.itemLabelText && (r3.text = i3.itemLabelText), r3.dataItem = t3)) : (r3 && ((i3.labelText || i3.itemLabelText != null) && (r3.text = i3.labelText), r3.dataItem = this.dataItem), s2 && ((i3.valueText || i3.itemValueText != null) && (s2.text = i3.valueText), s2.dataItem = this.dataItem));
- }
- }, e3.prototype.copyFrom = function(e4) {
- this.bullets.copyFrom(e4.bullets), this.bulletsContainer.copyFrom(e4.bulletsContainer), this.calculatePercent = e4.calculatePercent, this.usePercentHack = e4.usePercentHack, this.simplifiedProcessing = e4.simplifiedProcessing, t2.prototype.copyFrom.call(this, e4);
- }, e3.prototype.raiseCriticalError = function(t3) {
- this._chart && this._chart.modal && (this._chart.modal.content = this._chart.adapter.apply("criticalError", t3).message, this._chart.modal.closable = false, ls.suppressErrors || this._chart.modal.open(), this._chart.disabled = true), ls.verbose && console.log(t3);
- }, e3.prototype.applyFilters = function() {
- var e4 = this;
- t2.prototype.applyFilters.call(this), this.bulletsContainer.filters.clear(), ti(this.filters.iterator(), function(t3) {
- e4.bulletsContainer.filters.push(t3.clone());
- });
- }, Object.defineProperty(e3.prototype, "heatRules", { get: function() {
- var t3 = this;
- return this._heatRules || (this._heatRules = new Fi(), this._heatRules.events.on("inserted", function(e4) {
- var i3 = e4.newValue, n3 = i3.target;
- if (n3) {
- var r3 = i3.dataField;
- Z(r3) || (r3 = "value");
- var s2 = t3.dataItem, a2 = i3.property, o3 = U(i3.minValue), l2 = U(i3.maxValue);
- tt(o3) || tt(l2) || t3.dataItem.events.on("calculatedvaluechanged", function(e5) {
- e5.property == r3 && ti(t3.dataItems.iterator(), function(t4) {
- var e6 = false;
- Ut(t4.sprites, function(t5) {
- if (t5.clonedFrom == n3) {
- var i4 = t5;
- i4[a2] = i4[a2], e6 = true;
- }
- }), e6 || Ut(t4.sprites, function(t5) {
- t5 instanceof $a && ti(t5.children.iterator(), function(t6) {
- if (t6.className == n3.className) {
- var e7 = t6;
- e7[a2] = e7[a2];
- } else
- t6 instanceof $a && t6.deepInvalidate();
- });
- });
- });
- }), t3.dataItems.template.events.on("workingvaluechanged", function(t4) {
- if (t4.property == r3) {
- var e5 = t4.target, i4 = false;
- Ut(e5.sprites, function(t5) {
- if (t5.clonedFrom == n3) {
- var e6 = t5;
- e6[a2] = e6[a2], i4 = true;
- }
- }), i4 || Ut(e5.sprites, function(t5) {
- t5 instanceof $a && ti(t5.children.iterator(), function(t6) {
- if (t6.className == n3.className) {
- var e6 = t6;
- e6[a2] = e6[a2];
- } else
- t6 instanceof $a && t6.deepInvalidate();
- });
- });
- }
- }), n3.adapter.add(a2, function(t4, e5, n4) {
- var a3 = U(i3.minValue), o4 = U(i3.maxValue), l3 = i3.min, h2 = i3.max;
- if (e5 instanceof Za) {
- var p2 = e5.propertyFields[n4];
- if (p2 && e5.dataItem) {
- var u2 = e5.dataItem.dataContext;
- if (u2 && Z(u2[p2]))
- return t4;
- }
- }
- var d2 = e5.dataItem;
- if (tt(a3) || (a3 = s2.values[r3].low), tt(o4) || (o4 = s2.values[r3].high), d2 && d2.values[r3]) {
- var c2 = d2.getActualWorkingValue(r3);
- if (Z(l3) && Z(h2) && tt(a3) && tt(o4) && tt(c2)) {
- var f2 = void 0;
- if (f2 = i3.logarithmic ? (Math.log(c2) * Math.LOG10E - Math.log(a3) * Math.LOG10E) / (Math.log(o4) * Math.LOG10E - Math.log(a3) * Math.LOG10E) : (c2 - a3) / (o4 - a3), !tt(c2) || tt(f2) && Math.abs(f2) != 1 / 0 || (f2 = 0.5), tt(l3))
- return l3 + (h2 - l3) * f2;
- if (l3 instanceof un)
- return new un(Qi(l3.rgb, h2.rgb, f2));
- }
- }
- return t4;
- });
- }
- })), this._heatRules;
- }, enumerable: true, configurable: true }), e3.prototype.processConfig = function(e4) {
- var i3;
- if (e4) {
- if (Z(e4.bullets) && it(e4.bullets))
- for (var n3 = 0, r3 = e4.bullets.length; n3 < r3; n3++) {
- var s2 = e4.bullets[n3];
- Z(s2.type) || (s2.type = "Bullet");
- }
- Z(e4.heatRules) && it(e4.heatRules) && (i3 = e4.heatRules, delete e4.heatRules);
- }
- if (t2.prototype.processConfig.call(this, e4), i3) {
- for (n3 = 0, r3 = i3.length; n3 < r3; n3++) {
- var a2 = i3[n3], o3 = this;
- if (Z(a2.target) && Q(a2.target))
- if (this.map.hasKey(a2.target))
- o3 = this.map.getKey(a2.target);
- else
- for (var l2 = a2.target.split("."), h2 = 0; h2 < l2.length; h2++)
- if (o3 instanceof Fi) {
- var p2 = o3.getIndex(U(l2[h2]));
- o3 = p2 || o3[l2[h2]];
- } else {
- var u2 = l2[h2].match(/^(.*)\[([0-9]+)\]/);
- o3 = u2 ? o3[u2[1]] instanceof Fi ? o3[u2[1]].getIndex(U(u2[2])) : o3[u2[1]][U(u2[2])] : o3[l2[h2]];
- }
- a2.target = o3, Z(a2.min) && (a2.min = this.maybeColorOrPercent(a2.min)), Z(a2.max) && (a2.max = this.maybeColorOrPercent(a2.max));
- }
- t2.prototype.processConfig.call(this, { heatRules: i3 });
- }
- }, e3.prototype.configOrder = function(e4, i3) {
- return e4 == i3 ? 0 : e4 == "heatRules" ? 1 : i3 == "heatRules" ? -1 : t2.prototype.configOrder.call(this, e4, i3);
- }, e3.prototype.setVisibility = function(e4) {
- t2.prototype.setVisibility.call(this, e4), this.bulletsContainer.visible = e4;
- }, e3;
- }(uo);
- Ii.registeredClasses.Series = eh, Ii.registeredClasses.SeriesDataItem = th;
- var ih = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "SerialChartDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Kl), nh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "SerialChart", e4.colors = new kl(), e4._usesData = false;
- var i3 = e4.chartContainer.createChild($a);
- i3.shouldClone = false, i3.width = V(100), i3.height = V(100), i3.isMeasured = false, i3.layout = "none", i3.zIndex = 2, e4.seriesContainer = i3;
- var n3 = e4.chartContainer.createChild($a);
- return n3.shouldClone = false, n3.width = V(100), n3.height = V(100), n3.isMeasured = false, n3.zIndex = 3, n3.layout = "none", e4.bulletsContainer = n3, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.dispose = function() {
- t2.prototype.dispose.call(this), this.colors && this.colors.dispose(), this.patterns && this.patterns.dispose();
- }, e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Serial chart"));
- }, Object.defineProperty(e3.prototype, "series", { get: function() {
- return this._series || (this._series = new Mi(this.createSeries()), this._series.events.on("inserted", this.handleSeriesAdded, this, false), this._series.events.on("removed", this.handleSeriesRemoved, this, false), this._disposers.push(new Ai(this._series, false)), this._disposers.push(this._series.template)), this._series;
- }, enumerable: true, configurable: true }), e3.prototype.handleSeriesRemoved = function(t3) {
- var e4 = t3.oldValue;
- this.dataUsers.removeValue(e4), this.dataUsers.each(function(t4) {
- t4.invalidateDataItems();
- }), e4.autoDispose ? e4.dispose() : (e4.parent = void 0, e4.bulletsContainer.parent = void 0);
- var i3 = this.legend;
- if (i3) {
- for (var n3 = this.legend.dataItems, r3 = n3.length - 1; r3 >= 0; r3--) {
- var s2 = n3.getIndex(r3);
- s2 && s2.dataContext == e4 && i3.dataItems.remove(s2);
- }
- for (r3 = i3.data.length - 1; r3 >= 0; r3--) {
- var a2 = i3.data[r3];
- a2 && a2 == e4 && ee(i3.data, a2);
- }
- }
- }, e3.prototype.handleSeriesAdded = function(t3) {
- var e4 = this, i3 = t3.newValue;
- i3.isDisposed() || (i3.chart = this, i3.parent = this.seriesContainer, i3.bulletsContainer.parent = this.bulletsContainer, this._dataUsers.moveValue(i3), i3.addDisposer(new ye(function() {
- e4.dataUsers.removeValue(i3);
- })), this.handleSeriesAdded2(i3), this.handleLegendSeriesAdded(i3));
- }, e3.prototype.handleLegendSeriesAdded = function(t3) {
- t3.hiddenInLegend || this.legend && this.legend.addData(t3);
- }, e3.prototype.handleSeriesAdded2 = function(t3) {
- var e4 = this;
- this.dataInvalid || this._disposers.push(Ii.events.once("exitframe", function() {
- t3.data && t3.data.length != 0 || (t3.data = e4.data, t3.showOnInit && (t3.reinit(), t3.setPropertyValue("showOnInit", false), t3.showOnInit = true), t3.isDisposed() || t3.events.once("datavalidated", function() {
- t3.data == e4.data && (t3._data = []);
- }));
- }));
- }, e3.prototype.feedLegend = function() {
- var t3 = this.legend;
- if (t3) {
- var e4 = [];
- ti(this.series.iterator(), function(t4) {
- t4.hiddenInLegend || e4.push(t4);
- }), t3.dataFields.name = "name", t3.data = e4;
- }
- }, e3.prototype.createSeries = function() {
- return new eh();
- }, Object.defineProperty(e3.prototype, "colors", { get: function() {
- return this.getPropertyValue("colors");
- }, set: function(t3) {
- this.setPropertyValue("colors", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "patterns", { get: function() {
- return this.getPropertyValue("patterns");
- }, set: function(t3) {
- this.setPropertyValue("patterns", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.series.copyFrom(e4.series);
- }, e3.prototype.appear = function() {
- t2.prototype.appear.call(this), this.series.each(function(t3) {
- t3.showOnInit && t3.inited && t3.appear();
- });
- }, e3;
- }(Zl);
- Ii.registeredClasses.SerialChart = nh;
- var rh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._axis = new ve(), e4.dataItems = new Fi(), e4.className = "AxisBreak", e4.breakSize = 0.01, e4.marginLeft = -5, e4.marginRight = -5, e4.marginTop = -5, e4.marginBottom = -5;
- var i3 = new Ys(), n3 = new pl();
- n3.fill = i3.getFor("background"), n3.stroke = dn(), n3.fillOpacity = 0.9, n3.zIndex = 0, e4._fillShape = n3;
- var r3 = new pl();
- r3.fill = dn(), r3.stroke = i3.getFor("grid"), r3.strokeOpacity = 0.3, r3.zIndex = 1, e4._startLine = r3;
- var s2 = new pl();
- return s2.fill = dn(), s2.stroke = dn("#000000"), s2.strokeOpacity = 0.3, s2.zIndex = 2, e4._endLine = s2, e4._disposers.push(e4._axis), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.dispose = function() {
- t2.prototype.dispose.call(this), this._fillShape && this._fillShape.dispose(), this._startLine && this._startLine.dispose(), this._endLine && this._endLine.dispose();
- }, Object.defineProperty(e3.prototype, "startLine", { get: function() {
- return this._startLine;
- }, set: function(t3) {
- this._startLine && this._startLine.dispose(), this._startLine = t3, this.addBreakSprite(t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endLine", { get: function() {
- return this._endLine;
- }, set: function(t3) {
- this._endLine && this._endLine.dispose(), this._endLine = t3, this.addBreakSprite(t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fillShape", { get: function() {
- return this._fillShape;
- }, set: function(t3) {
- this._fillShape && this._fillShape.dispose(), this._fillShape = t3, this.addBreakSprite(t3);
- }, enumerable: true, configurable: true }), e3.prototype.addBreakSprite = function(t3) {
- t3.parent = this, t3.isMeasured = false, this._disposers.push(t3);
- }, Object.defineProperty(e3.prototype, "axis", { get: function() {
- return this._axis.get();
- }, set: function(t3) {
- if (this._axis.get() !== t3) {
- this._axis.set(t3, t3.renderer.gridContainer.events.on("transformed", this.invalidate, this, false)), t3.renderer.createBreakSprites(this);
- var e4 = t3.axisBreaks.template;
- this.startLine.copyFrom(e4.startLine), this.endLine.copyFrom(e4.endLine), this.fillShape.copyFrom(e4.fillShape);
- }
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "breakSize", { get: function() {
- return this.getPropertyValue("breakSize");
- }, set: function(t3) {
- this.setPropertyValue("breakSize", t3) && this.axis && (this.axis.invalidate(), this.axis.invalidateSeries());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startPoint", { get: function() {
- var t3 = this.axis.renderer;
- if (t3)
- return t3.positionToPoint(this.startPosition);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endPoint", { get: function() {
- var t3 = this.axis.renderer;
- if (t3)
- return t3.positionToPoint(this.endPosition);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startPosition", { get: function() {
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endPosition", { get: function() {
- }, enumerable: true, configurable: true }), e3.prototype.draw = function() {
- t2.prototype.draw.call(this), this.axis && this.axis.renderer.updateBreakElement(this);
- }, Object.defineProperty(e3.prototype, "startValue", { get: function() {
- return this.getPropertyValue("startValue");
- }, set: function(t3) {
- this.setPropertyValue("startValue", t3) && this.axis && (this.axis.invalidate(), this.axis.invalidateSeries());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endValue", { get: function() {
- return this.getPropertyValue("endValue");
- }, set: function(t3) {
- this.setPropertyValue("endValue", t3) && this.axis && (this.axis.invalidate(), this.axis.invalidateSeries());
- }, enumerable: true, configurable: true }), e3;
- }($a);
- Ii.registeredClasses.AxisBreak = rh;
- var sh, ah = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "AxisDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "grid", { get: function() {
- if (!this._grid) {
- var t3 = this.component;
- if (t3) {
- var e4, i3 = void 0;
- if (this.isRange) {
- if ((i3 = t3.axisRanges.template.grid).disabled)
- return;
- e4 = i3.clone();
- } else {
- if ((i3 = t3.renderer.grid.template).disabled)
- return;
- e4 = t3.renderer.grid.create(), this._disposers.push(new ye(function() {
- t3.renderer.grid.removeValue(e4);
- }));
- }
- this.grid = e4, e4.shouldClone = false, this._disposers.push(e4), e4.axis = this.component;
- }
- }
- return this._grid;
- }, set: function(t3) {
- this._grid && this._grid != t3 && (ee(this.sprites, this._grid), this._grid.dataItem = void 0), t3 && (t3.dataItem && t3.dataItem != this && (ee(t3.dataItem.sprites, t3), t3.dataItem.grid = void 0), this.addSprite(t3)), this._grid = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tick", { get: function() {
- if (!this._tick) {
- var t3 = this.component;
- if (t3) {
- var e4, i3 = void 0;
- if (this.isRange) {
- if ((i3 = t3.axisRanges.template.tick).disabled)
- return;
- e4 = i3.clone();
- } else {
- if ((i3 = t3.renderer.ticks.template).disabled)
- return;
- e4 = t3.renderer.ticks.create(), this._disposers.push(new ye(function() {
- t3.renderer.ticks.removeValue(e4);
- }));
- }
- this.tick = e4, e4.axis = this.component, e4.shouldClone = false, this._disposers.push(e4);
- }
- }
- return this._tick;
- }, set: function(t3) {
- this._tick && this._tick != t3 && (ee(this.sprites, this._tick), this._tick.dataItem = void 0), t3 && (t3.dataItem && t3.dataItem != this && (ee(t3.dataItem.sprites, t3), t3.dataItem.tick = void 0), this.addSprite(t3)), this._tick = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "label", { get: function() {
- if (!this._label) {
- var t3 = this.component;
- if (t3) {
- var e4, i3 = void 0;
- if (this.isRange) {
- if ((i3 = t3.axisRanges.template.label).disabled)
- return;
- e4 = i3.clone();
- } else {
- if ((i3 = t3.renderer.labels.template).disabled)
- return;
- e4 = t3.renderer.labels.create(), this._disposers.push(new ye(function() {
- t3.renderer.labels.removeValue(e4);
- }));
- }
- this._disposers.push(e4), this.label = e4, e4.shouldClone = false, e4.axis = this.component, e4.virtualParent = t3;
- }
- }
- return this._label;
- }, set: function(t3) {
- this._label && this._label != t3 && (ee(this.sprites, this._label), this._label.dataItem = void 0), t3 && (t3.dataItem && t3.dataItem != this && (ee(t3.dataItem.sprites, t3), t3.dataItem.label = void 0), this.addSprite(t3)), this._label = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "axisFill", { get: function() {
- if (!this._axisFill) {
- var t3 = this.component;
- if (t3) {
- var e4, i3 = void 0;
- if (this.isRange) {
- if (i3 = t3.axisRanges.template.axisFill, !this.isTemplate && i3.disabled)
- return;
- e4 = i3.clone();
- } else {
- if ((i3 = t3.renderer.axisFills.template).disabled)
- return;
- e4 = t3.renderer.axisFills.create(), this._disposers.push(new ye(function() {
- t3.renderer.axisFills.removeValue(e4);
- }));
- }
- this.axisFill = e4, e4.shouldClone = false, this._disposers.push(e4);
- }
- }
- return this._axisFill;
- }, set: function(t3) {
- this._axisFill && this._axisFill != t3 && (ee(this.sprites, this._axisFill), this._axisFill.dataItem = void 0), t3 && (t3.dataItem && t3.dataItem != this && (ee(t3.dataItem.sprites, t3), t3.dataItem.axisFill = void 0), t3.axis = this.component, this.addSprite(t3)), this._axisFill = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "text", { get: function() {
- return this._text;
- }, set: function(t3) {
- this._text = t3, this._label && (this._label.text = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "mask", { get: function() {
- return this._mask;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "contents", { get: function() {
- if (!this._contents) {
- var t3 = new $a();
- this.addSprite(t3), t3.isMeasured = false, this._contents = t3;
- var e4 = this.component;
- if (e4) {
- var i3 = e4.renderer.createFill(this.component);
- i3.disabled = false, i3.axis = e4, this.addSprite(i3), this._mask = i3, t3.mask = i3;
- }
- }
- return this._contents;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "axisBreak", { get: function() {
- return this._axisBreak;
- }, set: function(t3) {
- this._axisBreak && this._axisBreak.dataItems.removeValue(this), t3 && t3.dataItems.push(this), this._axisBreak = t3;
- }, enumerable: true, configurable: true }), e3.prototype.validate = function() {
- this.component && this.component.validateDataElement(this);
- }, e3.prototype.appendChildren = function() {
- this.component && this.component.appendDataItem(this);
- }, e3.prototype.hasProperty = function(e4) {
- return e4 == "component" || t2.prototype.hasProperty.call(this, e4);
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.text = e4.text, e4.bullet && (this.bullet = e4.bullet.clone()), this.minPosition = e4.minPosition, this.maxPosition = e4.maxPosition;
- }, e3.prototype.setVisibility = function(e4, i3) {
- t2.prototype.setVisibility.call(this, e4, i3), this._contents && (this._contents.visible = e4);
- }, Object.defineProperty(e3.prototype, "bullet", { get: function() {
- return this._bullet;
- }, set: function(t3) {
- this._bullet && this._bullet != t3 && (ee(this.sprites, this._bullet), this._bullet.dataItem = void 0), this._bullet = t3, t3 && this.addSprite(t3);
- }, enumerable: true, configurable: true }), e3;
- }(po);
- !function(t2) {
- t2[t2.Start = 0] = "Start", t2[t2.Middle = 0.5] = "Middle", t2[t2.End = 1] = "End";
- }(sh || (sh = {}));
- var oh = function(t2) {
- function e3() {
- var i3 = t2.call(this) || this;
- if (i3._gridCount = 10, i3._series = new Fi(), i3.autoDispose = true, i3._axisItemCount = 0, i3.constructor === e3)
- throw new Error("'Axis' cannot be instantiated directly. Please use a specific axis type.");
- i3.hideTooltipWhileZooming = true, i3.minWidth = 1e-4, i3.minHeight = 1e-4, i3.className = "Axis", i3.shouldClone = false, i3.setPropertyValue("cursorTooltipEnabled", true), i3.toggleZoomOutButton = true, i3.zoomable = true;
- var n3 = new Ys();
- i3.title = new co(), i3.title.shouldClone = false, i3._disposers.push(i3.title), i3.setPropertyValue("startLocation", 0), i3.setPropertyValue("endLocation", 1), i3._dataItemsIterator = new mi(i3.dataItems, function() {
- return i3.dataItems.create();
- }), i3._dataItemsIterator.createNewItems = true;
- var r3 = new $o();
- i3._disposers.push(r3), r3.label.padding(5, 10, 5, 10), r3.background.pointerLength = 5, r3.fitPointerToBounds = true, r3.background.filters.clear(), r3.virtualParent = i3;
- var s2 = r3.background;
- return s2.cornerRadius = 0, s2.fill = n3.getFor("alternativeBackground"), s2.stroke = s2.fill, s2.strokeWidth = 1, s2.fillOpacity = 1, r3.label.fill = n3.getFor("alternativeText"), i3.tooltip = r3, i3.readerHidden = true, i3.events.on("rangechangestarted", function() {
- i3.series.each(function(t3) {
- t3.hideTooltipWhileZooming && (t3.tooltip.hide(), t3.tooltip.preventShow = true);
- }), i3.hideTooltipWhileZooming && (i3.tooltip.hide(), i3.tooltip.preventShow = true);
- }, void 0, false), i3.events.on("rangechangeended", function() {
- i3.series.each(function(t3) {
- t3.hideTooltipWhileZooming && (t3.tooltip.hide(), t3.tooltip.preventShow = false);
- }), i3.hideTooltipWhileZooming && (i3.tooltip.hide(), i3.tooltip.preventShow = false);
- }, void 0, false), i3.applyTheme(), i3;
- }
- return C(e3, t2), e3.prototype.fillRule = function(t3, e4) {
- tt(e4) || (e4 = t3.index), e4 / 2 == Math.round(e4 / 2) ? (t3.axisFill.__disabled = true, t3.axisFill.opacity = 0) : (t3.axisFill.opacity = 1, t3.axisFill.__disabled = false);
- }, e3.prototype.createDataItem = function() {
- return new ah();
- }, e3.prototype.invalidateLayout = function() {
- t2.prototype.invalidateLayout.call(this), ti(this.series.iterator(), function(t3) {
- t3.invalidateLayout();
- });
- }, e3.prototype.invalidateSeries = function() {
- ti(this.series.iterator(), function(t3) {
- t3.invalidate();
- });
- }, e3.prototype.validateDataElements = function() {
- this._axisItemCount = 0, this.ghostLabel && (this.renderer.updateLabelElement(this.ghostLabel, this.start, this.end), this.ghostLabel.validate());
- }, e3.prototype.updateGridCount = function() {
- if (this.renderer) {
- var t3 = this.axisLength / this.renderer.minGridDistance;
- t3 != this._gridCount && (this._gridCount = t3, this.clearCache());
- }
- }, e3.prototype.validateLayout = function() {
- this.axisFullLength = this.axisLength / (this.end - this.start), t2.prototype.validateLayout.call(this), this.updateGridCount();
- var e4 = this.renderer;
- e4 && (e4.updateAxisLine(), e4.updateTooltip(), e4.updateBaseGridElement()), this._prevLength != this.axisLength && (this.dispatchImmediately("lengthchanged"), this._prevLength = this.axisLength);
- }, e3.prototype.initRenderer = function() {
- }, e3.prototype.appendDataItem = function(t3) {
- var e4 = this.renderer, i3 = t3.tick;
- i3 && (i3.above ? i3.parent = e4.bulletsContainer : i3.parent = e4.gridContainer), t3.label && (t3.label.parent = e4);
- var n3 = t3.axisFill;
- n3 && (n3.above ? n3.parent = e4.bulletsContainer : n3.parent = e4.gridContainer);
- var r3 = t3.grid;
- r3 && (r3.above ? r3.parent = e4.bulletsContainer : r3.parent = e4.gridContainer), t3.bullet && (t3.bullet.parent = e4.bulletsContainer);
- }, e3.prototype.validate = function() {
- t2.prototype.validate.call(this), this.validateLayout(), this.renderer.updateGridContainer();
- }, e3.prototype.validateAxisRanges = function() {
- var t3 = this;
- ti(this.axisRanges.iterator(), function(e4) {
- t3.appendDataItem(e4), t3.validateDataElement(e4), e4.grid && e4.grid.validate(), e4.tick && e4.tick.validate(), e4.axisFill && e4.axisFill.validate(), e4.label && e4.label.validate();
- });
- }, e3.prototype.validateBreaks = function() {
- this._axisBreaks && ti(this._axisBreaks.iterator(), function(t3) {
- t3.invalidate();
- });
- }, e3.prototype.processBreak = function(t3) {
- var e4 = t3.newValue;
- e4.parent = this.renderer.breakContainer, e4.axis = this;
- }, e3.prototype.registerSeries = function(t3) {
- var e4 = this;
- return this.series.moveValue(t3), new me([new ye(function() {
- e4.series.removeValue(t3);
- }), this.events.on("lengthchanged", t3.invalidate, t3, false), this.events.on("lengthchanged", t3.createMask, t3, false), this.events.on("startchanged", t3.invalidate, t3, false), this.events.on("endchanged", t3.invalidate, t3, false)]);
- }, Object.defineProperty(e3.prototype, "renderer", { get: function() {
- return this._renderer;
- }, set: function(t3) {
- if (t3 != this._renderer) {
- this._renderer = t3, t3.chart = this.chart, t3.axis = this, t3.parent = this, this.title.parent = this, this.initRenderer(), this._disposers.push(t3.gridContainer.events.on("maxsizechanged", this.invalidate, this, false));
- var e4 = this.renderer.labels.create();
- this._disposers.push(e4), e4.dataItem = this.dataItems.template.clone(), e4.text = "L", e4.parent = this.renderer, e4.shouldClone = false, e4.fillOpacity = 0, e4.opacity = 0, e4.strokeOpacity = 0, e4.interactionsEnabled = false, e4.validate(), this.ghostLabel = e4, this.events.on("beforedatavalidated", function() {
- e4.text = "L";
- }, void 0, false);
- }
- }, enumerable: true, configurable: true }), e3.prototype.positionToAngle = function(t3) {
- return this.renderer.positionToAngle(t3);
- }, e3.prototype.pointToPosition = function(t3) {
- return this.renderer.pointToPosition(t3);
- }, e3.prototype.positionToCoordinate = function(t3) {
- return this.renderer.positionToCoordinate(t3);
- }, e3.prototype.getAnyRangePath = function(t3, e4) {
- return this.renderer.getPositionRangePath(t3, e4);
- }, e3.prototype.anyToPosition = function(t3) {
- return 0;
- }, e3.prototype.anyToPoint = function(t3) {
- return { x: 0, y: 0, angle: 0 };
- }, e3.prototype.getPositionRangePath = function(t3, e4) {
- return this.renderer ? this.renderer.getPositionRangePath(t3, e4) : "";
- }, Object.defineProperty(e3.prototype, "axisLength", { get: function() {
- return this.renderer ? this.renderer.axisLength : 0;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cursorTooltipEnabled", { get: function() {
- return this.getPropertyValue("cursorTooltipEnabled");
- }, set: function(t3) {
- this.setPropertyValue("cursorTooltipEnabled", t3) && (t3 && this.renderer ? this.renderer.updateTooltip() : this.tooltip && this.tooltip.hide(0));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "toggleZoomOutButton", { get: function() {
- return this.getPropertyValue("toggleZoomOutButton");
- }, set: function(t3) {
- this.setPropertyValue("toggleZoomOutButton", t3);
- }, enumerable: true, configurable: true }), e3.prototype.hideTooltip = function(e4) {
- t2.prototype.hideTooltip.call(this, e4), this._tooltipPosition = void 0;
- }, e3.prototype.showTooltipAtPosition = function(t3, e4) {
- var i3 = this._tooltip;
- if (!i3 || this.dataItems.length <= 0)
- this._tooltipPosition = void 0;
- else {
- if (e4 || (t3 = this.toAxisPosition(t3)), !tt(t3) || t3 < this.start || t3 > this.end)
- return i3.hide(0), void (this._tooltipPosition = void 0);
- var n3 = this.renderer;
- i3.parent || (i3.parent = this.tooltipContainer);
- var r3 = n3.tooltipLocation, s2 = this.getCellStartPosition(t3), a2 = this.getCellEndPosition(t3);
- if (this.tooltipPosition == "fixed" && (t3 = s2 + (a2 - s2) * r3), t3 = ut(t3, this.start, this.end), this._tooltipPosition != t3) {
- this._tooltipPosition = t3;
- var o3 = n3.tooltipLocation2, l2 = n3.positionToPoint(s2, o3), h2 = n3.positionToPoint(a2, o3);
- this.currentItemStartPoint = l2, this.currentItemEndPoint = h2, n3.fullWidthTooltip && (i3.width = h2.x - l2.x, i3.height = h2.y - l2.y);
- var p2 = ur(n3.positionToPoint(t3, o3), this.renderer.line);
- i3.text = this.getTooltipText(t3), i3.text && (i3.delayedPointTo(p2), i3.show());
- }
- this.cursorTooltipEnabled && !this.tooltip.disabled || i3.hide(0);
- }
- }, e3.prototype.toAxisPosition = function(t3) {
- if ((t3 = this.renderer.toAxisPosition(t3)) != null)
- return t3 *= this.end - this.start, this.renderer.inversed ? this.end - t3 : this.start + t3;
- }, e3.prototype.toGlobalPosition = function(t3) {
- return this.renderer.inversed ? t3 = this.end - t3 : t3 -= this.start, t3 / (this.end - this.start);
- }, e3.prototype.getTooltipText = function(t3) {
- }, e3.prototype.updateTooltip = function(t3, e4) {
- var i3 = this._tooltip;
- i3 && (i3.fixDoc = false, i3.pointerOrientation = t3, i3.setBounds(fr(e4, this.renderer.line)));
- }, e3.prototype.roundPosition = function(t3, e4, i3) {
- return t3;
- }, e3.prototype.getCellStartPosition = function(t3) {
- return t3;
- }, e3.prototype.getCellEndPosition = function(t3) {
- return t3;
- }, Object.defineProperty(e3.prototype, "axisRanges", { get: function() {
- if (!this._axisRanges) {
- var t3 = this.createDataItem();
- t3.isRange = true, t3.axisFill = this.renderer.axisFills.template.clone(), t3.grid = this.renderer.grid.template.clone(), t3.tick = this.renderer.ticks.template.clone(), t3.label = this.renderer.labels.template.clone(), t3.isTemplate = true, t3.component = this, t3.axisFill.disabled = false, t3.tick.disabled = false, t3.grid.disabled = false, t3.label.disabled = false, this._axisRanges = new Mi(t3), this._axisRanges.events.on("inserted", this.processAxisRange, this, false), this._disposers.push(new Ai(this._axisRanges)), this._disposers.push(this._axisRanges.template);
- }
- return this._axisRanges;
- }, enumerable: true, configurable: true }), e3.prototype.processAxisRange = function(t3) {
- var e4 = t3.newValue;
- e4.component = this, e4.isRange = true;
- }, Object.defineProperty(e3.prototype, "axisBreaks", { get: function() {
- return this._axisBreaks || (this._axisBreaks = new Ri(this.createAxisBreak(), function(t3, e4) {
- return Bi(t3.adjustedStartValue, e4.adjustedStartValue);
- }), this._axisBreaks.events.on("inserted", this.processBreak, this, false), this._disposers.push(new Ai(this._axisBreaks)), this._disposers.push(this._axisBreaks.template)), this._axisBreaks;
- }, enumerable: true, configurable: true }), e3.prototype.createAxisBreak = function() {
- return new rh();
- }, Object.defineProperty(e3.prototype, "series", { get: function() {
- return this._series || (this._series = new Fi()), this._series;
- }, enumerable: true, configurable: true }), e3.prototype.processSeriesDataItems = function() {
- }, e3.prototype.processSeriesDataItem = function(t3, e4) {
- }, e3.prototype.postProcessSeriesDataItems = function(t3) {
- }, e3.prototype.postProcessSeriesDataItem = function(t3) {
- }, e3.prototype.updateAxisBySeries = function() {
- }, e3.prototype.hideUnusedDataItems = function() {
- var t3 = this, e4 = this._dataItemsIterator;
- e4.createNewItems = false, ti(e4.iterator(), function(e5) {
- t3.validateDataElement(e5), e5.__disabled = true;
- }), e4.clear(), e4.createNewItems = true;
- }, e3.prototype.getSeriesDataItem = function(t3, e4, i3) {
- }, e3.prototype.getAngle = function(t3, e4, i3, n3, r3) {
- }, e3.prototype.getX = function(t3, e4, i3, n3, r3) {
- }, e3.prototype.getPositionX = function(t3, e4, i3, n3, r3) {
- }, e3.prototype.getY = function(t3, e4, i3, n3, r3) {
- }, e3.prototype.getPositionY = function(t3, e4, i3, n3, r3) {
- }, Object.defineProperty(e3.prototype, "basePoint", { get: function() {
- return { x: 0, y: 0 };
- }, enumerable: true, configurable: true }), e3.prototype.dataChangeUpdate = function() {
- }, e3.prototype.seriesDataChangeUpdate = function(t3) {
- }, e3.prototype.adjustDifference = function(t3, e4) {
- var i3 = e4 - t3;
- if (tt(i3))
- return this._axisBreaks && Qe(this._axisBreaks.iterator(), function(n3) {
- var r3 = n3.adjustedStartValue, s2 = n3.adjustedEndValue;
- if (tt(r3) && tt(s2)) {
- if (r3 > e4)
- return false;
- if (s2 >= t3 && tt(r3) && tt(s2)) {
- var a2 = n3.breakSize, o3 = xt({ start: r3, end: s2 }, { start: t3, end: e4 });
- o3 && (i3 -= (o3.end - o3.start) * (1 - a2));
- }
- return true;
- }
- }), i3;
- }, e3.prototype.isInBreak = function(t3) {
- if (this._axisBreaks)
- return li(this._axisBreaks.iterator(), function(e4) {
- return t3 >= e4.adjustedStartValue && t3 <= e4.adjustedEndValue;
- });
- }, e3.prototype.fixAxisBreaks = function() {
- var t3 = this;
- if (this._axisBreaks) {
- var e4 = this._axisBreaks;
- if (e4.length > 0) {
- Ut(Je(e4.iterator()), function(e5) {
- var i4 = yt(e5.startValue, e5.endValue), n4 = gt(e5.startValue, e5.endValue);
- e5.adjustedStartValue = i4, e5.adjustedEndValue = n4, t3._axisBreaks.update(e5);
- });
- var i3 = e4.first, n3 = Math.min(i3.startValue, i3.endValue);
- ti(e4.iterator(), function(t4) {
- var e5 = t4.adjustedStartValue, i4 = t4.adjustedEndValue;
- e5 < n3 && (e5 = n3, i4 < n3 && (i4 = n3)), t4.adjustedStartValue = e5, t4.adjustedEndValue = i4;
- });
- }
- }
- }, Object.defineProperty(e3.prototype, "startIndex", { get: function() {
- return 0;
- }, set: function(t3) {
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endIndex", { get: function() {
- return this.dataItems.length;
- }, set: function(t3) {
- }, enumerable: true, configurable: true }), e3.prototype.getPositionLabel = function(t3) {
- return Math.round(100 * t3) + "%x";
- }, Object.defineProperty(e3.prototype, "chart", { get: function() {
- return this._chart;
- }, set: function(t3) {
- this._chart = t3;
- }, enumerable: true, configurable: true }), e3.prototype.createSeriesRange = function(t3) {
- var e4 = this.axisRanges.create();
- return e4.component = this, e4.axisFill = this.renderer.axisFills.template.clone(), e4.axisFill.disabled = false, e4.axisFill.fillOpacity = 0, e4.grid = this.renderer.grid.template.clone(), e4.grid.disabled = true, e4.tick = this.renderer.ticks.template.clone(), e4.tick.disabled = true, e4.label = this.renderer.labels.template.clone(), e4.label.disabled = true, e4.addDisposer(new ye(function() {
- t3.axisRanges.removeValue(e4);
- })), t3.axisRanges.push(e4), e4;
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.renderer ? this.renderer.copyFrom(e4.renderer) : e4.renderer && (this.renderer = e4.renderer.clone(), this._disposers.push(this.renderer)), e4.title && (this.title ? this.title.copyFrom(e4.title) : (this.title = e4.title.clone(), this.title.parent = this), this._disposers.push(this.title));
- }, e3.prototype.resetIterators = function() {
- this._dataItemsIterator.reset();
- }, e3.prototype.processConfig = function(e4) {
- if (e4 && Z(e4.axisRanges) && it(e4.axisRanges))
- for (var i3 = 0, n3 = e4.axisRanges.length; i3 < n3; i3++) {
- var r3 = e4.axisRanges[i3];
- Z(r3.series) && Q(r3.series) && this.map.hasKey(r3.series) && (e4.axisRanges[i3] = this.createSeriesRange(this.map.getKey(r3.series)), delete r3.series, e4.axisRanges[i3].config = r3);
- }
- t2.prototype.processConfig.call(this, e4);
- }, e3.prototype.configOrder = function(e4, i3) {
- return e4 == i3 ? 0 : e4 == "title" ? 1 : i3 == "title" || e4 == "component" ? -1 : i3 == "component" ? 1 : t2.prototype.configOrder.call(this, e4, i3);
- }, Object.defineProperty(e3.prototype, "startLocation", { get: function() {
- return this.getPropertyValue("startLocation");
- }, set: function(t3) {
- this.setPropertyValue("startLocation", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endLocation", { get: function() {
- return this.getPropertyValue("endLocation");
- }, set: function(t3) {
- this.setPropertyValue("endLocation", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.setDisabled = function(e4) {
- var i3 = t2.prototype.setDisabled.call(this, e4);
- return this.renderer && (this.renderer.gridContainer.disabled = e4), i3;
- }, Object.defineProperty(e3.prototype, "title", { get: function() {
- return this._title;
- }, set: function(t3) {
- this._title && this._title != t3 && this._title.dispose(), t3 && (this._title = t3, t3.parent = this, t3.shouldClone = false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hideTooltipWhileZooming", { get: function() {
- return this.getPropertyValue("hideTooltipWhileZooming");
- }, set: function(t3) {
- this.setPropertyValue("hideTooltipWhileZooming", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "zoomable", { get: function() {
- return this.getPropertyValue("zoomable");
- }, set: function(t3) {
- this.setPropertyValue("zoomable", t3);
- }, enumerable: true, configurable: true }), e3;
- }(uo);
- Ii.registeredClasses.Axis = oh, Ii.registeredClasses.AxisDataItem = ah, lo.push({ relevant: ho.maybeXS, state: function(t2, e3) {
- if (t2 instanceof oh && t2.tooltip) {
- var i3 = t2.states.create(e3);
- return i3.properties.cursorTooltipEnabled = false, i3;
- }
- return null;
- } });
- var lh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "AxisLine", e4.element = e4.paper.add("path");
- var i3 = new Ys();
- return e4.stroke = i3.getFor("grid"), e4.strokeOpacity = 0.15, e4.pixelPerfect = true, e4.fill = dn(), e4.applyTheme(), e4.interactionsEnabled = false, e4;
- }
- return C(e3, t2), e3;
- }(Za);
- Ii.registeredClasses.AxisLine = lh;
- var hh = function(t2) {
- function e3(e4) {
- var i3 = t2.call(this) || this;
- i3.axis = e4, i3.element = i3.paper.add("path"), i3.className = "AxisFill", i3.isMeasured = false, i3.location = 0, i3.above = false;
- var n3 = new Ys();
- return i3.fill = n3.getFor("alternativeBackground"), i3.fillOpacity = 0, i3.applyTheme(), i3;
- }
- return C(e3, t2), e3.prototype.setDisabled = function(e4) {
- var i3 = t2.prototype.setDisabled.call(this, e4);
- return this.axis && this.axis.invalidateDataItems(), i3;
- }, e3.prototype.draw = function() {
- t2.prototype.draw.call(this), this.__disabled || this.disabled || this.axis && tt(this.startPosition) && tt(this.endPosition) && (this.fillPath = this.axis.getPositionRangePath(this.startPosition, this.endPosition), this.path = this.fillPath, this.isMeasured && this.measure());
- }, Object.defineProperty(e3.prototype, "startPosition", { get: function() {
- return this.getPropertyValue("startPosition");
- }, set: function(t3) {
- this.setPropertyValue("startPosition", t3), this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endPosition", { get: function() {
- return this.getPropertyValue("endPosition");
- }, set: function(t3) {
- this.setPropertyValue("endPosition", t3), this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "location", { get: function() {
- return this.getPropertyValue("location");
- }, set: function(t3) {
- this.setPropertyValue("location", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.setPath = function(t3) {
- return !!this.setPropertyValue("path", t3) && (this.element.attr({ d: t3 }), true);
- }, Object.defineProperty(e3.prototype, "above", { get: function() {
- return this.getPropertyValue("above");
- }, set: function(t3) {
- this.setPropertyValue("above", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(Za);
- Ii.registeredClasses.AxisFill = hh;
- var ph = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "Grid", e4.element = e4.paper.add("path"), e4.location = 0.5, e4.isMeasured = false, e4.above = false;
- var i3 = new Ys();
- return e4.stroke = i3.getFor("grid"), e4.pixelPerfect = true, e4.strokeOpacity = 0.15, e4.fill = dn(), e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "location", { get: function() {
- return this.getPropertyValue("location");
- }, set: function(t3) {
- this.setPropertyValue("location", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "above", { get: function() {
- return this.getPropertyValue("above");
- }, set: function(t3) {
- this.setPropertyValue("above", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.setDisabled = function(e4) {
- var i3 = t2.prototype.setDisabled.call(this, e4);
- return this.axis && this.axis.invalidateDataItems(), i3;
- }, e3;
- }(Za);
- Ii.registeredClasses.Grid = ph, lo.push({ relevant: ho.maybeXS, state: function(t2, e3) {
- if (t2 instanceof ph) {
- var i3 = t2.states.create(e3);
- return i3.properties.disabled = true, i3;
- }
- return null;
- } });
- var uh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "AxisLabel", e4.isMeasured = false, e4.padding(10, 10, 10, 10), e4.location = 0.5, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "location", { get: function() {
- return this.getPropertyValue("location");
- }, set: function(t3) {
- this.setPropertyValue("location", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "inside", { get: function() {
- return this.getPropertyValue("inside");
- }, set: function(t3) {
- this.setPropertyValue("inside", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.setDisabled = function(e4) {
- var i3 = t2.prototype.setDisabled.call(this, e4);
- return this.axis && this.axis.invalidateDataItems(), i3;
- }, e3;
- }(co);
- Ii.registeredClasses.AxisLabel = uh;
- var dh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "Tick";
- var i3 = new Ys();
- return e4.fillOpacity = 0, e4.length = 6, e4.strokeOpacity = 0.2, e4.stroke = i3.getFor("grid"), e4.isMeasured = false, e4.nonScalingStroke = true, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "length", { get: function() {
- return this.disabled ? 0 : this.getPropertyValue("length");
- }, set: function(t3) {
- this.setPropertyValue("length", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(Za);
- Ii.registeredClasses.Tick = dh;
- var ch = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "AxisTick", e4.element = e4.paper.add("path"), e4.location = 0.5, e4.above = false, e4.isMeasured = false, e4.pixelPerfect = true, e4.strokeOpacity = 0, e4.length = 5, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "location", { get: function() {
- return this.getPropertyValue("location");
- }, set: function(t3) {
- this.setPropertyValue("location", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "inside", { get: function() {
- return this.getPropertyValue("inside");
- }, set: function(t3) {
- this.setPropertyValue("inside", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "above", { get: function() {
- return this.getPropertyValue("above");
- }, set: function(t3) {
- this.setPropertyValue("above", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.setDisabled = function(e4) {
- var i3 = t2.prototype.setDisabled.call(this, e4);
- return this.axis && this.axis.invalidateDataItems(), i3;
- }, e3;
- }(dh);
- Ii.registeredClasses.AxisTick = ch;
- var fh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._chart = new ve(), e4.className = "AxisRenderer", e4.minGridDistance = 50, e4.inside = false, e4.inversed = false, e4.tooltipLocation = 0.5, e4.fullWidthTooltip = false, e4.cellStartLocation = 0, e4.cellEndLocation = 1, e4.minLabelPosition = 0, e4.maxLabelPosition = 1, e4.shouldClone = false;
- var i3 = e4.createChild($a);
- i3.shouldClone = false, i3.layout = "none", i3.virtualParent = e4, i3.width = V(100), i3.height = V(100), e4.gridContainer = i3, i3.events.on("maxsizechanged", function() {
- e4.inited && e4.invalidateAxisItems();
- }, e4, false);
- var n3 = e4.createChild($a);
- n3.shouldClone = false, n3.isMeasured = false, n3.layout = "none", n3.width = V(100), n3.height = V(100), e4.breakContainer = n3;
- var r3 = e4.createChild($a);
- r3.shouldClone = false, r3.isMeasured = false, r3.layout = "none", r3.width = V(100), r3.height = V(100), e4.bulletsContainer = r3, e4.line = e4.createChild(lh), e4.line.shouldClone = false, e4.line.strokeOpacity = 0;
- var s2 = e4.createChild(ph);
- s2.shouldClone = false, e4.baseGrid = s2;
- var a2 = e4._disposers;
- return a2.push(s2), a2.push(e4.line), a2.push(i3), a2.push(n3), a2.push(r3), a2.push(e4._chart), e4.ticks.template.disabled = true, e4.axisFills.template.disabled = true, e4.axisFills.template.interactionsEnabled = false, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "axis", { get: function() {
- return this._axis;
- }, set: function(t3) {
- this.setAxis(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setAxis = function(t3) {
- this._axis = t3, this.baseGrid.parent = t3, this.line.parent = t3, this.gridContainer.bind("opacity", t3);
- }, e3.prototype.processRenderer = function() {
- this.events.on("sizechanged", this.updateTooltip, this, false), this.events.on("positionchanged", this.updateTooltip, this, false), this.labels.template.inside = this.inside, this.ticks.template.inside = this.inside;
- }, e3.prototype.updateTooltip = function() {
- }, Object.defineProperty(e3.prototype, "axisLength", { get: function() {
- return 0;
- }, enumerable: true, configurable: true }), e3.prototype.positionItem = function(t3, e4) {
- t3 && t3.moveTo(e4);
- }, e3.prototype.positionToPoint = function(t3, e4) {
- return { x: 0, y: 0 };
- }, e3.prototype.positionToAngle = function(t3) {
- return 0;
- }, e3.prototype.positionToCoordinate = function(t3) {
- var e4 = this.axis, i3 = e4.axisFullLength;
- return e4.renderer.inversed ? (e4.end - t3) * i3 : (t3 - e4.start) * i3;
- }, e3.prototype.updateGridContainer = function() {
- }, e3.prototype.getHeight = function() {
- var t3 = this.gridContainer;
- return t3.parent ? t3.parent.pixelHeight : this.gridContainer.pixelHeight || 0;
- }, e3.prototype.getWidth = function() {
- var t3 = this.gridContainer;
- return t3.parent ? t3.parent.pixelWidth : this.gridContainer.pixelWidth || 0;
- }, e3.prototype.coordinateToPosition = function(t3, e4) {
- var i3 = this.axis, n3 = i3.axisFullLength;
- return lt(i3.renderer.inversed ? i3.end - t3 / n3 : t3 / n3 + i3.start, 5);
- }, e3.prototype.pointToPosition = function(t3) {
- return 0;
- }, e3.prototype.getPositionRangePath = function(t3, e4) {
- return "";
- }, e3.prototype.invalidateAxisItems = function() {
- var t3 = this.axis;
- t3 && t3.invalidateDataItems();
- }, e3.prototype.updateGridElement = function(t3, e4, i3) {
- }, e3.prototype.updateTickElement = function(t3, e4, i3) {
- }, e3.prototype.updateBullet = function(t3, e4, i3) {
- }, e3.prototype.updateLabelElement = function(t3, e4, i3, n3) {
- }, e3.prototype.updateFillElement = function(t3, e4, i3) {
- t3.startPosition = e4, t3.endPosition = i3;
- }, e3.prototype.updateAxisLine = function() {
- }, e3.prototype.updateBaseGridElement = function() {
- }, e3.prototype.updateBreakElement = function(t3) {
- this.positionItem(t3.startLine, t3.startPoint), this.toggleVisibility(t3.startLine, t3.startPosition, 0, 1), this.positionItem(t3.endLine, t3.endPoint), this.toggleVisibility(t3.endLine, t3.endPosition, 0, 1);
- }, Object.defineProperty(e3.prototype, "minGridDistance", { get: function() {
- return this.getPropertyValue("minGridDistance");
- }, set: function(t3) {
- this.setPropertyValue("minGridDistance", t3) && this.axis && this.axis.invalidateDataItems();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "chart", { get: function() {
- return this._chart.get();
- }, set: function(t3) {
- this._chart.set(t3, null);
- }, enumerable: true, configurable: true }), e3.prototype.toggleVisibility = function(t3, e4, i3, n3) {
- var r3 = this.axis, s2 = t3.dataItem;
- s2 && s2 instanceof ah && (tt(s2.minPosition) && (i3 = s2.minPosition), tt(s2.maxPosition) && (n3 = s2.maxPosition));
- var a2 = r3.start + (r3.end - r3.start) * (i3 - 1e-4), o3 = r3.start + (r3.end - r3.start) * (n3 + 1e-4);
- t3.disabled || (t3.__disabled = e4 < a2 || e4 > o3);
- }, e3.prototype.createBreakSprites = function(t3) {
- }, Object.defineProperty(e3.prototype, "axisFills", { get: function() {
- if (!this._axisFills) {
- var t3 = this.createFill(this.axis);
- this._axisFills = new Mi(t3), t3.applyOnClones = true, t3.events.on("enabled", this.invalidateAxisItems, this, false), this._disposers.push(new Ai(this._axisFills)), this._disposers.push(this._axisFills.template);
- }
- return this._axisFills;
- }, enumerable: true, configurable: true }), e3.prototype.createFill = function(t3) {
- return new hh(t3);
- }, Object.defineProperty(e3.prototype, "grid", { get: function() {
- if (!this._grid) {
- var t3 = this.createGrid();
- this._grid = new Mi(t3), t3.applyOnClones = true, t3.events.on("enabled", this.invalidateAxisItems, this, false), this._disposers.push(new Ai(this._grid)), this._disposers.push(this._grid.template);
- }
- return this._grid;
- }, enumerable: true, configurable: true }), e3.prototype.createGrid = function() {
- return new ph();
- }, Object.defineProperty(e3.prototype, "ticks", { get: function() {
- if (!this._ticks) {
- var t3 = this.createTick();
- t3.applyOnClones = true, t3.isMeasured = false, t3.events.on("enabled", this.invalidateAxisItems, this, false), this._ticks = new Mi(t3), this._disposers.push(new Ai(this._ticks)), this._disposers.push(this._ticks.template);
- }
- return this._ticks;
- }, enumerable: true, configurable: true }), e3.prototype.createTick = function() {
- return new ch();
- }, Object.defineProperty(e3.prototype, "labels", { get: function() {
- if (!this._labels) {
- var t3 = this.createLabel();
- this._labels = new Mi(t3), t3.applyOnClones = true, t3.events.on("enabled", this.invalidateAxisItems, this, false), this._disposers.push(new Ai(this._labels)), this._disposers.push(this._labels.template);
- }
- return this._labels;
- }, enumerable: true, configurable: true }), e3.prototype.createLabel = function() {
- return new uh();
- }, Object.defineProperty(e3.prototype, "inside", { get: function() {
- return this.getPropertyValue("inside");
- }, set: function(t3) {
- this.setPropertyValue("inside", t3) && this.axis && this.axis.invalidate(), t3 ? (this.width = 0, this.height = 0) : (this.width = void 0, this.height = void 0);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "opposite", { get: function() {
- return this.getPropertyValue("opposite");
- }, set: function(t3) {
- this.setPropertyValue("opposite", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fullWidthTooltip", { get: function() {
- return this.getPropertyValue("fullWidthTooltip");
- }, set: function(t3) {
- this.setPropertyValue("fullWidthTooltip", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipLocation", { get: function() {
- return this.getPropertyValue("tooltipLocation");
- }, set: function(t3) {
- this.setPropertyValue("tooltipLocation", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipLocation2", { get: function() {
- return this.getPropertyValue("tooltipLocation2");
- }, set: function(t3) {
- this.setPropertyValue("tooltipLocation2", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cellStartLocation", { get: function() {
- return this.getPropertyValue("cellStartLocation");
- }, set: function(t3) {
- this.setPropertyValue("cellStartLocation", t3) && this.axis && this.axis.invalidateSeries();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cellEndLocation", { get: function() {
- return this.getPropertyValue("cellEndLocation");
- }, set: function(t3) {
- this.setPropertyValue("cellEndLocation", t3) && this.axis && this.axis.invalidateSeries();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "inversed", { get: function() {
- return this.getPropertyValue("inversed");
- }, set: function(t3) {
- this.setPropertyValue("inversed", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "minLabelPosition", { get: function() {
- return this.getPropertyValue("minLabelPosition");
- }, set: function(t3) {
- this.setPropertyValue("minLabelPosition", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxLabelPosition", { get: function() {
- return this.getPropertyValue("maxLabelPosition");
- }, set: function(t3) {
- this.setPropertyValue("maxLabelPosition", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.grid.template.copyFrom(e4.grid.template), this.ticks.template.copyFrom(e4.ticks.template), this.labels.template.copyFrom(e4.labels.template), this.axisFills.template.copyFrom(e4.axisFills.template), this.line.copyFrom(e4.line), this.baseGrid.copyFrom(e4.baseGrid);
- }, e3.prototype.toAxisPosition = function(t3) {
- return t3;
- }, e3.prototype.setVisibility = function(e4) {
- t2.prototype.setVisibility.call(this, e4), this.bulletsContainer.visible = e4;
- }, e3;
- }($a);
- Ii.registeredClasses.AxisRenderer = fh;
- var gh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "AxisBullet", e4.location = 0.5, e4.isMeasured = false, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "location", { get: function() {
- return this.getPropertyValue("location");
- }, set: function(t3) {
- this.setPropertyValue("location", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.setDisabled = function(e4) {
- var i3 = t2.prototype.setDisabled.call(this, e4);
- return this.axis && this.axis.invalidateDataItems(), i3;
- }, e3;
- }($a);
- Ii.registeredClasses.AxisBullet = gh;
- var yh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "AxisRendererY", e4.minGridDistance = 40, e4.opposite = false, e4.height = V(100), e4.labels.template.verticalCenter = "middle", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.setAxis = function(e4) {
- t2.prototype.setAxis.call(this, e4), e4.layout = "horizontal";
- }, e3.prototype.updateGridContainer = function() {
- var t3 = this.axis;
- if (t3) {
- var e4 = this.gridContainer;
- e4.y = t3.pixelY, e4.height = t3.axisLength;
- }
- }, e3.prototype.toAxisPosition = function(t3) {
- var e4 = this.axis;
- if (e4) {
- var i3 = 1 - t3, n3 = e4.relativePositionSprite, r3 = e4.pixelY;
- if (n3 ? r3 = dr({ x: 0, y: this.pixelY }, this.parent, n3).y : n3 = e4.parent, n3)
- return 1 - (i3 - r3 / n3.innerHeight) / (e4.axisLength / n3.innerHeight);
- }
- return t3;
- }, e3.prototype.processRenderer = function() {
- t2.prototype.processRenderer.call(this);
- var e4 = this.axis;
- if (e4) {
- var i3 = e4.title;
- i3.valign = "middle", e4.height instanceof A || (e4.height = V(100)), this.opposite ? (i3.rotation = 90, this.line.toBack(), i3.toFront()) : (i3.rotation = -90, i3.toBack(), this.line.toFront());
- }
- }, e3.prototype.updateTooltip = function() {
- if (this.axis) {
- var t3 = 2e3, e4 = 0, i3 = t3, n3 = this.axisLength;
- this.opposite ? this.inside && (e4 = -2e3, i3 = t3) : this.inside || (e4 = -2e3, i3 = t3), this.axis.updateTooltip("horizontal", { x: e4, y: 0, width: i3, height: n3 });
- }
- }, Object.defineProperty(e3.prototype, "axisLength", { get: function() {
- var t3 = this.axis;
- return t3.measuredHeight - t3.pixelPaddingTop - t3.pixelPaddingBottom || 0;
- }, enumerable: true, configurable: true }), e3.prototype.positionToPoint = function(t3, e4) {
- return { x: 0, y: this.positionToCoordinate(t3) };
- }, e3.prototype.pointToPosition = function(t3) {
- return this.coordinateToPosition(t3.y, t3.x);
- }, e3.prototype.coordinateToPosition = function(t3, e4) {
- var i3 = this.axis, n3 = i3.axisFullLength;
- return lt(i3.renderer.inversed ? 1 - i3.start - t3 / n3 : t3 / n3 + (1 - i3.end), 5);
- }, e3.prototype.getPositionRangePath = function(t3, e4) {
- var i3 = ut(this.positionToCoordinate(t3), 0, this.axisLength), n3 = ut(this.positionToCoordinate(e4), 0, this.axisLength), r3 = Math.abs(n3 - i3), s2 = this.getWidth();
- return Vo({ x: 0, y: Math.min(i3, n3), width: s2, height: r3 }, true);
- }, e3.prototype.updateGridElement = function(t3, e4, i3) {
- e4 += (i3 - e4) * t3.location;
- var n3 = this.positionToPoint(e4);
- t3.path = wo({ x: 0, y: 0 }) + Co({ x: this.getWidth(), y: 0 }), this.positionItem(t3, n3), this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.updateTickElement = function(t3, e4, i3) {
- e4 += (i3 - e4) * t3.location;
- var n3 = this.positionToPoint(e4), r3 = t3.length;
- try {
- this.axis.title.measuredWidth;
- } catch (t4) {
- }
- n3.x = dr({ x: this.line.pixelX, y: 0 }, this.line.parent, this.gridContainer).x, this.opposite ? r3 *= t3.inside ? -1 : 1 : r3 *= t3.inside ? 1 : -1, t3.path = wo({ x: 0, y: 0 }) + Co({ x: r3, y: 0 }), this.positionItem(t3, n3), this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.updateAxisLine = function() {
- this.line.path = wo({ x: 0, y: 0 }) + Co({ x: 0, y: this.axisLength });
- }, e3.prototype.updateBaseGridElement = function() {
- t2.prototype.updateBaseGridElement.call(this);
- var e4 = this.axis, i3 = this.getWidth(), n3 = this.axisLength, r3 = e4.basePoint.y, s2 = this.baseGrid;
- if (r3 < -0.2 || r3 > n3 + 0.2)
- s2.hide(0);
- else {
- var a2 = dr({ x: 0, y: 0 }, this.gridContainer, s2.parent).x;
- s2.path = wo({ x: 0, y: 0 }) + Co({ x: i3, y: 0 }), s2.moveTo({ x: a2, y: r3 }), s2.show(0);
- }
- }, e3.prototype.updateLabelElement = function(t3, e4, i3, n3) {
- Z(n3) || (n3 = t3.location), e4 += (i3 - e4) * n3, t3.isMeasured = !t3.inside;
- var r3, s2 = this.positionToPoint(e4), a2 = 0, o3 = this.gridContainer.maxWidth;
- this.opposite ? (t3.inside ? (r3 = "right", t3.align == "left" && (a2 = -o3, r3 = "left"), t3.align == "center" && (a2 = -o3 / 2, r3 = "middle")) : r3 = "left", s2.x = 0 + a2) : (t3.inside ? (r3 = "left", t3.align == "right" && (a2 = o3, r3 = "right"), t3.align == "center" && (a2 = o3 / 2, r3 = "middle")) : r3 = "right", s2.x = this.measuredWidth + a2), t3.rotation == 0 && (t3.horizontalCenter = r3), this.positionItem(t3, s2), this.toggleVisibility(t3, e4, this.minLabelPosition, this.maxLabelPosition);
- }, e3.prototype.updateBreakElement = function(e4) {
- t2.prototype.updateBreakElement.call(this, e4);
- var i3 = e4.startLine, n3 = e4.endLine, r3 = e4.fillShape, s2 = e4.startPoint, a2 = e4.endPoint, o3 = e4.pixelMarginLeft, l2 = this.getWidth() - e4.pixelMarginLeft - e4.pixelMarginRight;
- s2.y = ut(s2.y, -1, this.axisLength + 1), a2.y = ut(a2.y, -1, this.axisLength + 1), s2.y == a2.y && (s2.y < 0 || s2.y > this.axisLength) ? e4.fillShape.__disabled = true : e4.fillShape.__disabled = false;
- var h2 = Math.abs(l2 - o3);
- i3.x = o3, i3.height = 0, i3.width = h2, n3.x = o3, n3.height = 0, n3.width = h2, r3.width = h2, r3.height = Math.abs(a2.y - s2.y), r3.x = o3, r3.y = a2.y;
- }, e3.prototype.createBreakSprites = function(t3) {
- t3.startLine = new pl(), t3.endLine = new pl();
- var e4 = new ul();
- e4.setWavedSides(true, false, true, false), t3.fillShape = e4;
- }, e3.prototype.positionToCoordinate = function(t3) {
- var e4 = this.axis, i3 = e4.axisFullLength;
- return e4.renderer.inversed ? (t3 - e4.start) * i3 : (e4.end - t3) * i3;
- }, e3.prototype.updateBullet = function(t3, e4, i3) {
- var n3 = 0.5;
- t3 instanceof gh && (n3 = t3.location), e4 += (i3 - e4) * n3;
- var r3 = this.positionToPoint(e4);
- r3.x = dr({ x: this.line.pixelX, y: 0 }, this.line.parent, this.gridContainer).x, this.positionItem(t3, r3), this.toggleVisibility(t3, e4, 0, 1);
- }, e3;
- }(fh);
- Ii.registeredClasses.AxisRendererY = yh, lo.push({ relevant: ho.widthS, state: function(t2, e3) {
- if (t2 instanceof yh) {
- var i3 = t2.states.create(e3);
- return i3.properties.inside = true, i3.properties.maxLabelPosition = 0.9, i3.properties.minLabelPosition = 0.1, i3;
- }
- return null;
- } }), lo.push({ relevant: ho.widthXS, state: function(t2, e3) {
- if (t2 instanceof yh) {
- var i3 = t2.states.create(e3);
- return i3.properties.disabled = true, i3;
- }
- return null;
- } });
- var mh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ValueAxisBreak", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "startPosition", { get: function() {
- if (this.axis)
- return this.axis.valueToPosition(this.adjustedStartValue);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endPosition", { get: function() {
- if (this.axis)
- return this.axis.valueToPosition(this.adjustedEndValue);
- }, enumerable: true, configurable: true }), e3;
- }(rh);
- Ii.registeredClasses.ValueAxisBreak = mh;
- var vh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ValueAxisDataItem", e4.values.value = {}, e4.values.endValue = {}, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "value", { get: function() {
- return this.values.value.value;
- }, set: function(t3) {
- this.setValue("value", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endValue", { get: function() {
- return this.values.endValue.value;
- }, set: function(t3) {
- this.setValue("endValue", t3);
- }, enumerable: true, configurable: true }), e3;
- }(ah), bh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._stepDecimalPlaces = 0, e4._prevStepDecimalPlaces = 0, e4._adjustLabelPrecision = true, e4._baseValue = 0, e4._adjustedStart = 0, e4._adjustedEnd = 1, e4._extremesChanged = false, e4._deltaMinMax = 1, e4._dsc = false, e4.calculateTotals = false, e4.className = "ValueAxis", e4.axisFieldName = "value", e4.setPropertyValue("maxZoomFactor", 1e3), e4.setPropertyValue("extraMin", 0), e4.setPropertyValue("extraMax", 0), e4.setPropertyValue("strictMinMax", false), e4.setPropertyValue("maxPrecision", Number.MAX_VALUE), e4.setPropertyValue("adjustLabelPrecision", true), e4.setPropertyValue("extraTooltipPrecision", 0), e4.keepSelection = false, e4.includeRangesInMinMax = false, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.fillRule = function(t3) {
- var e4 = t3.value, i3 = t3.component;
- t3.axisFill.disabled || (lt(e4 / i3.step / 2, 5) == Math.round(e4 / i3.step / 2) ? t3.axisFill.__disabled = true : t3.axisFill.__disabled = false);
- }, e3.prototype.createDataItem = function() {
- return new vh();
- }, e3.prototype.createAxisBreak = function() {
- return new mh();
- }, e3.prototype.dataChangeUpdate = function() {
- this.clearCache(), this.keepSelection ? (this._start != 0 && this.dispatchImmediately("startchanged"), this._end != 1 && this.dispatchImmediately("endchanged"), this._start == 0 && this._end == 1 || this.dispatchImmediately("startendchanged")) : this._start == 0 && this._end == 1 || (this._start = 0, this._end = 1, this.dispatchImmediately("startendchanged")), this._maxZoomed = this._maxDefined, this._minZoomed = this._minDefined, this._maxAdjusted = this._maxDefined, this._minAdjusted = this._minDefined;
- }, e3.prototype.processSeriesDataItems = function() {
- if (this.calculateTotals) {
- var t3 = this.series.getIndex(0), e4 = t3.startIndex;
- if (t3.dataItems.length > 0) {
- e4 > 0 && e4--;
- var i3 = t3.endIndex;
- i3 < t3.dataItems.length && i3++;
- for (var n3 = function(t4) {
- var e5 = {}, i4 = {};
- r3.series.each(function(n4) {
- if (!n4.excludeFromTotal) {
- var r4 = n4.dataItems.getIndex(t4);
- r4 && Ne(r4.values, function(t5) {
- var n5 = r4.values[t5].workingValue;
- tt(n5) && (tt(e5[t5]) ? e5[t5] += Math.abs(n5) : e5[t5] = Math.abs(n5), tt(i4[t5]) ? i4[t5] += n5 : i4[t5] = n5);
- });
- }
- }), r3.series.each(function(n4) {
- if (!n4.excludeFromTotal) {
- var r4 = n4.dataItems.getIndex(t4);
- r4 && Ne(r4.values, function(t5) {
- var n5 = r4.values[t5].workingValue;
- tt(n5) && (r4.setCalculatedValue(t5, e5[t5], "total"), r4.setCalculatedValue(t5, 100 * n5 / e5[t5], "totalPercent"), r4.setCalculatedValue(t5, i4[t5], "sum"));
- });
- }
- });
- }, r3 = this, s2 = e4; s2 < i3; ++s2)
- n3(s2);
- }
- }
- }, e3.prototype.validate = function() {
- this.axisLength <= 0 || (t2.prototype.validate.call(this), this.getMinMax(), tt(this._minAdjusted) || this.dataItems.each(function(t3) {
- t3.value = null;
- }), this.fixAxisBreaks(), this.calculateZoom(), this.validateAxisElements(), this.validateAxisRanges(), this.validateBreaks(), this.hideUnusedDataItems(), this.renderer.invalidateLayout());
- }, e3.prototype.calculateZoom = function() {
- if (tt(this.min) && tt(this.max)) {
- var t3 = this.positionToValue(this.start), e4 = this.positionToValue(this.end), i3 = this.adjustDifference(t3, e4), n3 = this.adjustMinMax(t3, e4, i3, this._gridCount, true), r3 = _r(n3.step);
- this._stepDecimalPlaces = r3, t3 = lt(t3, r3), e4 = lt(e4, r3);
- var s2 = (n3 = this.adjustMinMax(t3, e4, i3, this._gridCount, true)).step;
- if (this.syncWithAxis) {
- var a2 = this.getCache(t3 + "-" + e4);
- tt(a2) && (s2 = a2);
- } else
- t3 = n3.min, e4 = n3.max;
- (this._minZoomed != t3 || this._maxZoomed != e4 || this._step != s2 || this._dsc) && (this._dsc = false, this._minZoomed = t3, this._maxZoomed = e4, this._step = s2, this.dispatchImmediately("selectionextremeschanged"));
- }
- }, e3.prototype.fixSmallStep = function(t3) {
- return 1 + t3 == 1 ? (t3 *= 2, this.fixSmallStep(t3)) : t3;
- }, e3.prototype.validateAxisElements = function() {
- var t3 = this;
- if (tt(this.max) && tt(this.min)) {
- var e4 = this.minZoomed - 2 * this._step;
- this.logarithmic ? Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E > 1 ? e4 = Math.pow(10, Math.log(this.min) * Math.LOG10E) : (e4 = Math.floor(this.minZoomed / this._step) * this._step) == 0 && (e4 = this.minZoomed) : e4 = Math.floor(e4 / this._step) * this._step;
- var i3 = this._maxZoomed + this._step;
- this.resetIterators();
- var n3 = this._dataItemsIterator;
- if (this._step == 0)
- return;
- this._step = this.fixSmallStep(this._step);
- var r3 = 0, s2 = this._prevStepDecimalPlaces != this._stepDecimalPlaces;
- for (this._prevStepDecimalPlaces = this._stepDecimalPlaces; e4 <= i3; ) {
- if (!this.isInBreak(e4)) {
- var a2 = n3.find(function(t4) {
- return t4.value === e4;
- });
- a2.__disabled && (a2.__disabled = false), this.appendDataItem(a2), a2.axisBreak = void 0, (a2.value != e4 || s2) && (a2.value = e4, a2.text = this.formatLabel(e4), a2.label && a2.label.invalid && a2.label.validate(), a2.value >= this.min && a2.value <= this.max && a2.label && (this.axisLetter == "Y" && a2.label.measuredWidth > this.ghostLabel.measuredWidth || this.axisLetter == "X" && a2.label.measuredHeight > this.ghostLabel.measuredHeight) && (this.ghostLabel.text = a2.label.currentText, this.ghostLabel.validate())), this.validateDataElement(a2);
- }
- r3++;
- var o3 = e4;
- this.logarithmic && Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E > 1 ? e4 = Math.pow(10, Math.log(this.min) * Math.LOG10E + r3) : e4 += this._step;
- var l2 = Math.pow(10, Math.floor(Math.log(Math.abs(this._step)) * Math.LOG10E));
- if (l2 < 1) {
- var h2 = Math.round(Math.abs(Math.log(Math.abs(l2)) * Math.LOG10E)) + 2;
- if (h2 = Math.min(13, h2), o3 == (e4 = lt(e4, h2))) {
- e4 = i3;
- break;
- }
- }
- }
- var p2 = this._axisBreaks;
- if (p2) {
- var u2 = this.renderer;
- ti(p2.iterator(), function(e5) {
- if (e5.breakSize > 0 && _t(e5.startPoint, e5.endPoint) > u2.minGridDistance)
- for (var i4 = e5.adjustedMin; i4 <= e5.adjustedMax; ) {
- if (i4 >= e5.adjustedStartValue && i4 <= e5.adjustedEndValue) {
- var r4 = n3.find(function(t4) {
- return t4.value === i4;
- });
- r4.__disabled && (r4.__disabled = false), t3.appendDataItem(r4), r4.axisBreak = e5, r4.value != i4 && (r4.value = i4, r4.text = t3.formatLabel(i4), r4.label && r4.label.invalid && r4.label.validate()), t3.validateDataElement(r4);
- }
- i4 += e5.adjustedStep;
- }
- });
- }
- }
- }, e3.prototype.validateDataElement = function(e4) {
- t2.prototype.validateDataElement.call(this, e4), e4.itemIndex = this._axisItemCount, this._axisItemCount++;
- var i3 = this.renderer, n3 = e4.value, r3 = e4.endValue, s2 = this.valueToPosition(n3);
- e4.position = s2;
- var a2 = s2, o3 = this.valueToPosition(n3 + this._step);
- tt(r3) && (o3 = a2 = this.valueToPosition(r3)), e4.point = i3.positionToPoint(s2);
- var l2 = e4.tick;
- l2 && !l2.disabled && i3.updateTickElement(l2, s2, a2);
- var h2 = e4.grid;
- h2 && !h2.disabled && i3.updateGridElement(h2, s2, a2);
- var p2 = e4.label;
- p2 && !p2.disabled && i3.updateLabelElement(p2, s2, a2);
- var u2 = e4.axisFill;
- u2 && !u2.disabled && (i3.updateFillElement(u2, s2, o3), e4.isRange || this.fillRule(e4)), e4.bullet && i3.updateBullet(e4.bullet, s2, a2);
- var d2 = e4.mask;
- d2 && i3.updateFillElement(d2, s2, o3);
- }, e3.prototype.formatLabel = function(t3) {
- return this.adjustLabelPrecision && t3 != 0 ? this.numberFormatter.format(t3, void 0, this._stepDecimalPlaces) : this.numberFormatter.format(t3);
- }, Object.defineProperty(e3.prototype, "basePoint", { get: function() {
- var t3 = this.baseValue, e4 = this.valueToPosition(t3);
- return this.renderer.positionToPoint(e4);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "baseValue", { get: function() {
- var t3 = this._baseValue;
- return this.logarithmic && (t3 = this.min), this._adapterO ? this._adapterO.apply("baseValue", t3) : t3;
- }, set: function(t3) {
- this._baseValue = t3, this.invalidateLayout(), this.invalidateSeries();
- }, enumerable: true, configurable: true }), e3.prototype.anyToPosition = function(t3) {
- return this.valueToPosition(t3);
- }, e3.prototype.valueToPoint = function(t3) {
- var e4 = this.valueToPosition(t3), i3 = this.renderer.positionToPoint(e4), n3 = this.renderer.positionToAngle(e4);
- return { x: i3.x, y: i3.y, angle: n3 };
- }, e3.prototype.anyToPoint = function(t3) {
- return this.valueToPoint(t3);
- }, e3.prototype.valueToPosition = function(t3) {
- if (tt(t3)) {
- var e4 = this.min, i3 = this.max;
- if (tt(e4) && tt(i3)) {
- var n3 = this._difference, r3 = this._axisBreaks;
- r3 && r3.length > 0 && Qe(r3.iterator(), function(n4) {
- var r4 = n4.adjustedStartValue, s3 = n4.adjustedEndValue;
- if (tt(r4) && tt(s3)) {
- if (t3 < r4)
- return false;
- if (vt({ start: r4, end: s3 }, { start: e4, end: i3 })) {
- r4 = Math.max(r4, e4), s3 = Math.min(s3, i3);
- var a3 = n4.breakSize;
- t3 > s3 ? e4 += (s3 - r4) * (1 - a3) : t3 < r4 || (t3 = r4 + (t3 - r4) * a3);
- }
- }
- return true;
- });
- var s2 = void 0;
- if (this.logarithmic) {
- var a2 = this.treatZeroAs;
- tt(a2) && t3 <= a2 && (t3 = a2), s2 = (Math.log(t3) * Math.LOG10E - Math.log(this.min) * Math.LOG10E) / (Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E);
- } else
- s2 = (t3 - e4) / n3;
- return s2;
- }
- }
- return 0;
- }, e3.prototype.invalidateLabels = function() {
- t2.prototype.invalidateLabels.call(this), this.dataItems && (this.dataItems.each(function(t3) {
- t3.value = void 0;
- }), this.invalidate());
- }, e3.prototype.positionToValue = function(t3) {
- var e4 = this.min, i3 = this.max;
- if (tt(e4) && tt(i3)) {
- var n3 = i3 - e4, r3 = null, s2 = this._axisBreaks;
- return s2 && s2.length > 0 && Qe(s2.iterator(), function(s3) {
- var a2 = s3.startPosition, o3 = s3.endPosition, l2 = s3.adjustedStartValue, h2 = s3.adjustedEndValue;
- if (tt(l2) && tt(h2)) {
- if (l2 > i3)
- return false;
- if (vt({ start: l2, end: h2 }, { start: e4, end: i3 })) {
- l2 = gt(l2, e4), h2 = yt(h2, i3);
- var p2 = s3.breakSize;
- if (n3 -= (h2 - l2) * (1 - p2), t3 > o3)
- e4 += (h2 - l2) * (1 - p2);
- else if (!(t3 < a2))
- return r3 = l2 + (t3 - a2) / (o3 - a2) * (h2 - l2), false;
- }
- return true;
- }
- }), tt(r3) || (r3 = this.logarithmic ? Math.pow(Math.E, (t3 * (Math.log(this.max) * Math.LOG10E - Math.log(this.min) * Math.LOG10E) + Math.log(this.min) * Math.LOG10E) / Math.LOG10E) : t3 * n3 + e4), r3;
- }
- }, e3.prototype.xToValue = function(t3) {
- return this.positionToValue(this.pointToPosition({ x: t3, y: 0 }));
- }, e3.prototype.yToValue = function(t3) {
- return this.positionToValue(this.pointToPosition({ x: 0, y: t3 }));
- }, e3.prototype.pointToPosition = function(t3) {
- return this.renderer instanceof yh ? 1 - this.renderer.pointToPosition(t3) : this.renderer.pointToPosition(t3);
- }, e3.prototype.animateMinMax = function(t3, e4) {
- return this.animate([{ property: "_minAdjusted", from: this._minAdjusted, to: t3 }, { property: "_maxAdjusted", from: this._maxAdjusted, to: e4 }], this.rangeChangeDuration, this.rangeChangeEasing);
- }, e3.prototype.getMinMax = function() {
- var t3 = this;
- this.updateGridCount();
- var e4 = Number.POSITIVE_INFINITY, i3 = Number.NEGATIVE_INFINITY;
- if (tt(this._minDefined) && tt(this._maxDefined) || (this.series.each(function(n4) {
- if (!n4.ignoreMinMax) {
- var r4 = n4.min(t3);
- tt(r4) && r4 < e4 && (e4 = r4);
- var s3 = n4.max(t3);
- tt(s3) && s3 > i3 && (i3 = s3);
- }
- }), this.includeRangesInMinMax && this.axisRanges.each(function(t4) {
- if (!t4.ignoreMinMax) {
- var n4 = yt(t4.value, t4.endValue), r4 = gt(t4.value, t4.endValue);
- (n4 < e4 || !tt(e4)) && (e4 = n4), (r4 > i3 || !tt(i3)) && (i3 = r4);
- }
- })), this.logarithmic) {
- var n3 = this.treatZeroAs;
- tt(n3) && e4 <= 0 && (e4 = n3), e4 <= 0 && this.raiseCriticalError(new Error("Logarithmic value axis can not have values <= 0."), true);
- }
- if (e4 == 0 && i3 == 0 && (i3 = 0.9, e4 = -0.9), tt(this._minDefined) && (e4 = this._minDefined), tt(this._maxDefined) && (i3 = this._maxDefined), this._adapterO && (e4 = this._adapterO.apply("min", e4)), this._adapterO && (i3 = this._adapterO.apply("max", i3)), tt(e4) && tt(i3)) {
- this._minReal = e4, this._maxReal = i3, e4 == Number.POSITIVE_INFINITY && (e4 = void 0), i3 == Number.NEGATIVE_INFINITY && (i3 = void 0);
- var r3 = this.adjustDifference(e4, i3);
- if (e4 = this.fixMin(e4), (i3 = this.fixMax(i3)) - e4 <= 1 / Math.pow(10, 15)) {
- if (i3 - e4 != 0)
- this._deltaMinMax = (i3 - e4) / 2;
- else {
- var s2 = Math.log(Math.abs(i3)) * Math.LOG10E, a2 = Math.pow(10, Math.floor(s2));
- a2 /= 10, this._deltaMinMax = a2;
- }
- e4 -= this._deltaMinMax, i3 += this._deltaMinMax;
- }
- e4 -= (i3 - e4) * this.extraMin, i3 += (i3 - e4) * this.extraMax;
- var o3 = this.strictMinMax;
- tt(this._maxDefined) && (o3 = true);
- var l2 = this.adjustMinMax(e4, i3, r3, this._gridCount, o3);
- if (e4 = l2.min, r3 = (i3 = l2.max) - e4, l2 = this.adjustMinMax(e4, i3, i3 - e4, this._gridCount, true), e4 = l2.min, i3 = l2.max, this.strictMinMax && (e4 = tt(this._minDefined) ? this._minDefined : this._minReal, (i3 = tt(this._maxDefined) ? this._maxDefined : this._maxReal) - e4 <= 1e-8 && (e4 -= this._deltaMinMax, i3 += this._deltaMinMax), e4 -= (i3 - e4) * this.extraMin, i3 += (i3 - e4) * this.extraMax), this._adapterO && (e4 = this._adapterO.apply("min", e4)), this._adapterO && (i3 = this._adapterO.apply("max", i3)), this._step = l2.step, tt(e4) || tt(i3) || (this.start = 0, this.end = 1, this.renderer.labels.each(function(t4) {
- t4.dataItem.text = "";
- })), (this._minAdjusted != e4 || this._maxAdjusted != i3) && tt(e4) && tt(i3)) {
- var h2 = this._minMaxAnimation;
- if (this._extremesChanged && tt(this._minAdjusted) && tt(this._maxAdjusted) && this.inited) {
- if (h2 && !h2.isFinished() && this._finalMax == i3 && this._finalMin == e4)
- return;
- this._finalMin = e4, this._finalMax = i3, (h2 = this.animateMinMax(e4, i3)) && !h2.isFinished() ? (h2.events.on("animationprogress", this.validateDataItems, this), h2.events.on("animationended", function() {
- t3.series.each(function(t4) {
- t4.validate();
- }), t3.validateDataItems(), t3.handleSelectionExtremesChange();
- }), this._minMaxAnimation = h2) : this.series.each(function(t4) {
- t4.invalidate();
- }), this.validateDataItems(), this.dispatchImmediately("extremeschanged"), this.handleSelectionExtremesChange();
- } else {
- if (h2 && !h2.isFinished() && this._finalMax == i3 && this._finalMin == e4)
- return;
- this._minAdjusted = e4, this._maxAdjusted = i3, this._finalMin = e4, this._finalMax = i3, this.invalidateDataItems(), this.dispatchImmediately("extremeschanged");
- }
- }
- this._extremesChanged = false, this._difference = this.adjustDifference(e4, i3);
- }
- }, e3.prototype.fixMin = function(t3) {
- return t3;
- }, e3.prototype.fixMax = function(t3) {
- return t3;
- }, e3.prototype.adjustMinMax = function(t3, e4, i3, n3, r3) {
- n3 <= 1 && (n3 = 1), n3 = Math.round(n3);
- var s2 = t3, a2 = e4;
- i3 === 0 && (i3 = Math.abs(e4));
- var o3 = Math.log(Math.abs(i3)) * Math.LOG10E, l2 = Math.pow(10, Math.floor(o3)), h2 = l2 /= 10;
- r3 && (h2 = 0), this.logarithmic ? (t3 <= 0 && (t3 = this.baseValue), t3 == 1 / 0 && (t3 = 1), e4 == -1 / 0 && (e4 = 10), this.strictMinMax ? (t3 = this._minDefined > 0 ? this._minDefined : t3, this._maxDefined) : (t3 = Math.pow(10, Math.floor(Math.log(Math.abs(t3)) * Math.LOG10E)), e4 = Math.pow(10, Math.ceil(Math.log(Math.abs(e4)) * Math.LOG10E)))) : (r3 ? (t3 = Math.floor(t3 / l2) * l2, e4 = Math.ceil(e4 / l2) * l2) : (t3 = Math.ceil(t3 / l2) * l2 - h2, e4 = Math.floor(e4 / l2) * l2 + h2), t3 < 0 && s2 >= 0 && (t3 = 0), e4 > 0 && a2 <= 0 && (e4 = 0)), o3 = Math.log(Math.abs(i3)) * Math.LOG10E, l2 = Math.pow(10, Math.floor(o3)), l2 /= 10;
- var p2 = Math.ceil(i3 / n3 / l2) * l2, u2 = Math.pow(10, Math.floor(Math.log(Math.abs(p2)) * Math.LOG10E)), d2 = Math.ceil(p2 / u2);
- d2 > 5 ? d2 = 10 : d2 <= 5 && d2 > 2 && (d2 = 5), p2 = Math.ceil(p2 / (u2 * d2)) * u2 * d2, this.maxPrecision < Number.MAX_VALUE && p2 != ht(p2, this.maxPrecision) && (p2 = ht(p2, this.maxPrecision));
- var c2 = 0;
- if (u2 < 1 && (p2 = lt(p2, c2 = Math.round(Math.abs(Math.log(Math.abs(u2)) * Math.LOG10E)) + 1)), !this.logarithmic) {
- var f2 = Math.floor(t3 / p2);
- t3 = lt(p2 * f2, c2);
- var g2 = void 0;
- (g2 = r3 ? Math.floor(e4 / p2) : Math.ceil(e4 / p2)) == f2 && g2++, (e4 = lt(p2 * g2, c2)) < a2 && (e4 += p2), t3 > s2 && (t3 -= p2);
- }
- return { min: t3, max: e4, step: p2 };
- }, Object.defineProperty(e3.prototype, "min", { get: function() {
- var t3 = this._minAdjusted;
- return tt(t3) || (t3 = this._minDefined), t3;
- }, set: function(t3) {
- this._minDefined != t3 && (this._minDefined = t3, this.invalidate());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "minDefined", { get: function() {
- return this._minDefined;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxDefined", { get: function() {
- return this._maxDefined;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "extraMin", { get: function() {
- return this.getPropertyValue("extraMin");
- }, set: function(t3) {
- this.setPropertyValue("extraMin", t3) && this.invalidateDataItems();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "extraMax", { get: function() {
- return this.getPropertyValue("extraMax");
- }, set: function(t3) {
- this.setPropertyValue("extraMax", t3) && this.invalidateDataItems();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "step", { get: function() {
- return this._step;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "max", { get: function() {
- var t3 = this._maxAdjusted;
- return tt(t3) || (t3 = this._maxDefined), t3;
- }, set: function(t3) {
- this._maxDefined != t3 && (this._maxDefined = t3, this.invalidate());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "adjustLabelPrecision", { get: function() {
- return this.getPropertyValue("adjustLabelPrecision");
- }, set: function(t3) {
- this.setPropertyValue("adjustLabelPrecision", t3) && this.invalidate();
- }, enumerable: true, configurable: true }), e3.prototype.registerSeries = function(e4) {
- return new me([t2.prototype.registerSeries.call(this, e4), e4.events.on("extremeschanged", this.handleExtremesChange, this, false), e4.events.on("selectionextremeschanged", this.handleSelectionExtremesChange, this, false), this.events.on("extremeschanged", e4.invalidate, e4, false)]);
- }, e3.prototype.handleSelectionExtremesChange = function() {
- var t3, e4, i3 = this, n3 = true;
- if (ti(this.series.iterator(), function(r4) {
- if (!r4.ignoreMinMax && !r4.isHidden && !r4.outOfRange) {
- r4.visible && !r4.isHiding && (n3 = false);
- var s3 = r4.selectionMin(i3), a3 = r4.selectionMax(i3);
- tt(s3) && (!tt(t3) || s3 < t3) && (t3 = s3), tt(a3) && (!tt(e4) || a3 > e4) && (e4 = a3);
- }
- }), this.includeRangesInMinMax && this.axisRanges.each(function(i4) {
- if (!i4.ignoreMinMax) {
- var n4 = yt(i4.value, i4.endValue), r4 = gt(i4.value, i4.endValue);
- n4 < t3 && (t3 = n4), r4 > e4 && (e4 = r4);
- }
- }), tt(this._minDefined) ? t3 = this.strictMinMax ? this._minDefined : this.min : this.strictMinMax && (t3 = this._minReal), tt(this._maxDefined) ? e4 = this.strictMinMax ? this._maxDefined : this.max : this.strictMinMax && (e4 = this._maxReal), t3 == e4) {
- t3 -= this._deltaMinMax, e4 += this._deltaMinMax;
- var r3 = this.adjustMinMax(t3, e4, 0, this._gridCount, this.strictMinMax);
- t3 = r3.min, e4 = r3.max;
- }
- var s2 = this.adjustDifference(t3, e4), a2 = this.adjustMinMax(t3, e4, s2, this._gridCount);
- t3 = a2.min, e4 = a2.max, t3 -= (e4 - t3) * this.extraMin, e4 += (e4 - t3) * this.extraMax, t3 = ut(t3, this.min, this.max), e4 = ut(e4, this.min, this.max), s2 = this.adjustDifference(t3, e4), a2 = this.adjustMinMax(t3, e4, s2, this._gridCount, true), t3 = a2.min, e4 = a2.max, this.strictMinMax && (t3 = gt(t3, this._minDefined), e4 = yt(e4, this._maxDefined));
- var o3 = a2.step;
- this.syncWithAxis && (a2 = this.syncAxes(t3, e4, o3), t3 = a2.min, e4 = a2.max, this.invalidate()), o3 = a2.step, this._difference = this.adjustDifference(this.min, this.max);
- var l2 = this.valueToPosition(t3), h2 = this.valueToPosition(e4);
- n3 && !this.syncWithAxis && (l2 = 0, h2 = 1);
- var p2 = 0;
- this.syncWithAxis ? (p2 = 5, this.setCache(t3 + "-" + e4, o3)) : (this._step == o3 && this._minZoomed == t3 && this._maxZoomed == e4 || (this._dsc = true), this._step = o3, this._minZoomed = t3, this._maxZoomed = e4), this.keepSelection || this.zoom({ start: l2, end: h2 }, false, false, p2);
- }, Object.defineProperty(e3.prototype, "strictMinMax", { get: function() {
- return this.getPropertyValue("strictMinMax");
- }, set: function(t3) {
- this.setPropertyValue("strictMinMax", t3) && this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "logarithmic", { get: function() {
- return this.getPropertyValue("logarithmic");
- }, set: function(t3) {
- this.setPropertyValue("logarithmic", t3) && (this.invalidate(), this.series.each(function(t4) {
- t4.invalidateDataItems();
- }));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "keepSelection", { get: function() {
- return this.getPropertyValue("keepSelection");
- }, set: function(t3) {
- this.setPropertyValue("keepSelection", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "includeRangesInMinMax", { get: function() {
- return this.getPropertyValue("includeRangesInMinMax");
- }, set: function(t3) {
- this.setPropertyValue("includeRangesInMinMax", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxPrecision", { get: function() {
- return this.getPropertyValue("maxPrecision");
- }, set: function(t3) {
- this.setPropertyValue("maxPrecision", t3) && this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "extraTooltipPrecision", { get: function() {
- return this.getPropertyValue("extraTooltipPrecision");
- }, set: function(t3) {
- this.setPropertyValue("extraTooltipPrecision", t3) && this.invalidate();
- }, enumerable: true, configurable: true }), e3.prototype.handleExtremesChange = function() {
- var t3 = this;
- this._extremesChanged = true, this.getMinMax(), this.ghostLabel && this.dataItems.each(function(e4) {
- e4.label && e4.label.pixelWidth > 0 && (t3.ghostLabel.text = e4.label.currentText);
- });
- }, e3.prototype.getX = function(t3, e4, i3, n3, r3) {
- return this.renderer.positionToPoint(this.getPositionX(t3, e4, i3, n3, r3)).x;
- }, e3.prototype.getPositionX = function(t3, e4, i3, n3, r3) {
- var s2 = t3.getWorkingValue(e4);
- Z(n3) || (n3 = "valueX");
- var a2 = t3.getValue(n3, "stack");
- tt(s2) || (s2 = this.baseValue, this.logarithmic && a2 > 0 && (s2 = 0));
- var o3 = this.valueToPosition(s2 + a2);
- return r3 && (o3 = ut(o3, r3.start, r3.end)), o3;
- }, e3.prototype.getY = function(t3, e4, i3, n3, r3) {
- return this.renderer.positionToPoint(this.getPositionY(t3, e4, i3, n3, r3)).y;
- }, e3.prototype.getPositionY = function(t3, e4, i3, n3, r3) {
- var s2 = t3.getWorkingValue(e4);
- Z(n3) || (n3 = "valueY");
- var a2 = t3.getValue(n3, "stack");
- tt(s2) || (s2 = this.baseValue, this.logarithmic && a2 > 0 && (s2 = 0));
- var o3 = this.valueToPosition(s2 + a2);
- return r3 && (o3 = ut(o3, r3.start, r3.end)), o3;
- }, e3.prototype.getAngle = function(t3, e4, i3, n3, r3) {
- var s2 = t3.getWorkingValue(e4), a2 = t3.getValue(n3, "stack");
- tt(s2) || (s2 = this.baseValue);
- var o3 = this.valueToPosition(s2 + a2);
- return r3 && (o3 = ut(o3, r3.start, r3.end)), this.positionToAngle(o3);
- }, e3.prototype.getAnyRangePath = function(t3, e4, i3) {
- var n3 = this.valueToPosition(t3), r3 = this.valueToPosition(e4);
- return this.getPositionRangePath(n3, r3);
- }, e3.prototype.getTooltipText = function(t3) {
- var e4 = lt(this.positionToValue(t3), this._stepDecimalPlaces + this.extraTooltipPrecision), i3 = this.tooltip.numberFormatter.format(e4);
- return this._adapterO ? this._adapterO.apply("getTooltipText", i3) : i3;
- }, e3.prototype.zoomToValues = function(t3, e4, i3, n3) {
- var r3 = (t3 - this.min) / (this.max - this.min), s2 = (e4 - this.min) / (this.max - this.min);
- this.zoom({ start: r3, end: s2 }, i3, n3);
- }, Object.defineProperty(e3.prototype, "minZoomed", { get: function() {
- return this.syncWithAxis ? this._minZoomed : gt(this.min, this._minZoomed);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxZoomed", { get: function() {
- return this.syncWithAxis ? this._maxZoomed : yt(this.max, this._maxZoomed);
- }, enumerable: true, configurable: true }), e3.prototype.fixAxisBreaks = function() {
- var e4 = this;
- t2.prototype.fixAxisBreaks.call(this);
- var i3 = this._axisBreaks;
- i3 && i3.length > 0 && i3.each(function(t3) {
- var i4 = t3.adjustedStartValue, n3 = t3.adjustedEndValue, r3 = n3 - i4, s2 = Math.ceil(r3 * t3.breakSize) * e4._gridCount / (e4.max - e4.min), a2 = e4.adjustMinMax(i4, n3, r3, s2, true);
- t3.adjustedStep = a2.step, t3.adjustedMin = a2.min, t3.adjustedMax = a2.max;
- }), this._difference = this.adjustDifference(this.min, this.max);
- }, e3.prototype.getPositionLabel = function(t3) {
- var e4 = this.positionToValue(t3);
- return this.numberFormatter.format(e4);
- }, e3.prototype.showTooltipAt = function(t3) {
- this.showTooltipAtPosition(this.valueToPosition(t3));
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.min = e4.min, this.max = e4.max, this.calculateTotals = e4.calculateTotals, this._baseValue = e4.baseValue;
- }, Object.defineProperty(e3.prototype, "syncWithAxis", { get: function() {
- return this.getPropertyValue("syncWithAxis");
- }, set: function(t3) {
- var e4 = this;
- this.setPropertyValue("syncWithAxis", t3, true) && t3 && (this._disposers.push(t3.events.on("extremeschanged", this.handleSelectionExtremesChange, this, false)), this._disposers.push(t3.events.on("selectionextremeschanged", this.handleSelectionExtremesChange, this, false)), this._disposers.push(t3.events.on("startendchanged", this.handleSelectionExtremesChange, this, false)), this.events.on("shown", this.handleSelectionExtremesChange, this, false), this.events.on("maxsizechanged", function() {
- e4.clearCache(), e4._disposers.push(Ii.events.once("exitframe", function() {
- e4.handleSelectionExtremesChange();
- }));
- }, this, false));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "treatZeroAs", { get: function() {
- return this.getPropertyValue("treatZeroAs");
- }, set: function(t3) {
- this.setPropertyValue("treatZeroAs", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.syncAxes = function(t3, e4, i3) {
- var n3 = this.syncWithAxis;
- if (n3) {
- tt(t3) || (t3 = this.min), tt(e4) || (e4 = this.max), tt(i3) || (i3 = this._step);
- var r3 = Math.round((n3.maxZoomed - n3.minZoomed) / n3.step), s2 = Math.round((e4 - t3) / i3);
- if (tt(r3) && tt(s2))
- for (var a2 = false, o3 = 0, l2 = 0.01 * (e4 - t3), h2 = t3, p2 = e4, u2 = i3; a2 != 1; )
- if (a2 = this.checkSync(h2, p2, u2, r3), ++o3 > 1e3 && (a2 = true), a2)
- t3 = h2, e4 = p2, i3 = u2;
- else {
- o3 / 3 == Math.round(o3 / 3) ? (h2 = t3 - l2 * o3, t3 >= 0 && h2 < 0 && (h2 = 0)) : (p2 = e4 + l2 * o3) <= 0 && p2 > 0 && (p2 = 0);
- var d2 = this.adjustMinMax(h2, p2, p2 - h2, this._gridCount, true);
- h2 = d2.min, p2 = d2.max, u2 = d2.step;
- }
- }
- return { min: t3, max: e4, step: i3 };
- }, e3.prototype.checkSync = function(t3, e4, i3, n3) {
- for (var r3 = (e4 - t3) / i3, s2 = 1; s2 < n3; s2++)
- if (lt(r3 / s2, 1) == n3 || r3 * s2 == n3)
- return true;
- return false;
- }, e3.prototype.processConfig = function(e4) {
- e4 && Z(e4.syncWithAxis) && Q(e4.syncWithAxis) && (this.map.hasKey(e4.syncWithAxis) ? e4.syncWithAxis = this.map.getKey(e4.syncWithAxis) : (this.processingErrors.push('[ValueAxis] No axis with id "' + e4.syncWithAxis + '" found for `syncWithAxis`'), delete e4.xAxis)), t2.prototype.processConfig.call(this, e4);
- }, e3;
- }(oh);
- Ii.registeredClasses.ValueAxis = bh, Ii.registeredClasses.ValueAxisDataItem = vh;
- var xh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "DateAxisBreak", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "startDate", { get: function() {
- return this.getPropertyValue("startDate");
- }, set: function(t3) {
- this.setPropertyValue("startDate", t3) && (this.startValue = t3.getTime(), this.axis && (this.axis.invalidate(), this.axis.invalidateSeries()));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endDate", { get: function() {
- return this.getPropertyValue("endDate");
- }, set: function(t3) {
- this.setPropertyValue("endDate", t3) && (this.endValue = t3.getTime(), this.axis && (this.axis.invalidate(), this.axis.invalidateSeries()));
- }, enumerable: true, configurable: true }), e3;
- }(mh);
- Ii.registeredClasses.DateAxisBreak = xh;
- var _h = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "DateAxisDataItem", e4.applyTheme(), e4.values.date = {}, e4.values.endDate = {}, e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "date", { get: function() {
- return this.dates.date;
- }, set: function(t3) {
- this.setDate("date", t3), this.value = t3.getTime();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endDate", { get: function() {
- return this.dates.endDate;
- }, set: function(t3) {
- this.setDate("endDate", t3), this.endValue = t3.getTime();
- }, enumerable: true, configurable: true }), e3;
- }(vh), Ph = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._gapBreaks = false, e4.gridIntervals = new Fi(), e4.groupIntervals = new Fi(), e4.dateFormats = new Pi(), e4.periodChangeDateFormats = new Pi(), e4._baseIntervalReal = { timeUnit: "day", count: 1 }, e4._prevSeriesTime = {}, e4._minDifference = {}, e4._firstWeekDay = 1, e4.groupMin = {}, e4.groupMax = {}, e4.className = "DateAxis", e4.setPropertyValue("markUnitChange", true), e4.snapTooltip = true, e4.tooltipPosition = "pointer", e4.setPropertyValue("groupData", false), e4.groupCount = 200, e4.events.on("parentset", e4.getDFFormatter, e4, false), e4.gridIntervals.pushAll([{ timeUnit: "millisecond", count: 1 }, { timeUnit: "millisecond", count: 5 }, { timeUnit: "millisecond", count: 10 }, { timeUnit: "millisecond", count: 50 }, { timeUnit: "millisecond", count: 100 }, { timeUnit: "millisecond", count: 500 }, { timeUnit: "second", count: 1 }, { timeUnit: "second", count: 5 }, { timeUnit: "second", count: 10 }, { timeUnit: "second", count: 30 }, { timeUnit: "minute", count: 1 }, { timeUnit: "minute", count: 5 }, { timeUnit: "minute", count: 10 }, { timeUnit: "minute", count: 15 }, { timeUnit: "minute", count: 30 }, { timeUnit: "hour", count: 1 }, { timeUnit: "hour", count: 3 }, { timeUnit: "hour", count: 6 }, { timeUnit: "hour", count: 12 }, { timeUnit: "day", count: 1 }, { timeUnit: "day", count: 2 }, { timeUnit: "day", count: 3 }, { timeUnit: "day", count: 4 }, { timeUnit: "day", count: 5 }, { timeUnit: "week", count: 1 }, { timeUnit: "month", count: 1 }, { timeUnit: "month", count: 2 }, { timeUnit: "month", count: 3 }, { timeUnit: "month", count: 6 }, { timeUnit: "year", count: 1 }, { timeUnit: "year", count: 2 }, { timeUnit: "year", count: 5 }, { timeUnit: "year", count: 10 }, { timeUnit: "year", count: 50 }, { timeUnit: "year", count: 100 }, { timeUnit: "year", count: 200 }, { timeUnit: "year", count: 500 }, { timeUnit: "year", count: 1e3 }, { timeUnit: "year", count: 2e3 }, { timeUnit: "year", count: 5e3 }, { timeUnit: "year", count: 1e4 }, { timeUnit: "year", count: 1e5 }]), e4.groupIntervals.pushAll([{ timeUnit: "millisecond", count: 1 }, { timeUnit: "millisecond", count: 10 }, { timeUnit: "millisecond", count: 100 }, { timeUnit: "second", count: 1 }, { timeUnit: "second", count: 10 }, { timeUnit: "minute", count: 1 }, { timeUnit: "minute", count: 10 }, { timeUnit: "hour", count: 1 }, { timeUnit: "day", count: 1 }, { timeUnit: "week", count: 1 }, { timeUnit: "month", count: 1 }, { timeUnit: "year", count: 1 }]), e4.axisFieldName = "date", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.fillRule = function(t3) {
- var e4 = t3.value, i3 = t3.component, n3 = i3._gridInterval, r3 = ta(n3.timeUnit, n3.count);
- Math.round((e4 - i3.min) / r3) / 2 == Math.round(Math.round((e4 - i3.min) / r3) / 2) ? t3.axisFill.__disabled = true : t3.axisFill.__disabled = false;
- }, e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), this.dateFormats.hasKey("millisecond") || this.dateFormats.setKey("millisecond", this.language.translate("_date_millisecond")), this.dateFormats.hasKey("second") || this.dateFormats.setKey("second", this.language.translate("_date_second")), this.dateFormats.hasKey("minute") || this.dateFormats.setKey("minute", this.language.translate("_date_minute")), this.dateFormats.hasKey("hour") || this.dateFormats.setKey("hour", this.language.translate("_date_hour")), this.dateFormats.hasKey("day") || this.dateFormats.setKey("day", this.language.translate("_date_day")), this.dateFormats.hasKey("week") || this.dateFormats.setKey("week", this.language.translate("_date_day")), this.dateFormats.hasKey("month") || this.dateFormats.setKey("month", this.language.translate("_date_month")), this.dateFormats.hasKey("year") || this.dateFormats.setKey("year", this.language.translate("_date_year")), this.periodChangeDateFormats.hasKey("millisecond") || this.periodChangeDateFormats.setKey("millisecond", this.language.translate("_date_millisecond")), this.periodChangeDateFormats.hasKey("second") || this.periodChangeDateFormats.setKey("second", this.language.translate("_date_second")), this.periodChangeDateFormats.hasKey("minute") || this.periodChangeDateFormats.setKey("minute", this.language.translate("_date_minute")), this.periodChangeDateFormats.hasKey("hour") || this.periodChangeDateFormats.setKey("hour", this.language.translate("_date_day")), this.periodChangeDateFormats.hasKey("day") || this.periodChangeDateFormats.setKey("day", this.language.translate("_date_day")), this.periodChangeDateFormats.hasKey("week") || this.periodChangeDateFormats.setKey("week", this.language.translate("_date_day")), this.periodChangeDateFormats.hasKey("month") || this.periodChangeDateFormats.setKey("month", this.language.translate("_date_month") + " " + this.language.translate("_date_year"));
- }, e3.prototype.createDataItem = function() {
- return new _h();
- }, e3.prototype.createAxisBreak = function() {
- return new xh();
- }, e3.prototype.validateDataItems = function() {
- var e4 = this.start, i3 = this.end, n3 = this.baseDuration, r3 = (this.max - this.min) / n3;
- this._firstWeekDay = this.getFirstWeekDay(), this.getDFFormatter(), t2.prototype.validateDataItems.call(this);
- var s2 = ta(this.mainBaseInterval.timeUnit, this.mainBaseInterval.count);
- this.maxZoomFactor = Math.max(1, (this.max - this.min) / s2), this._deltaMinMax = this.baseDuration / 2, e4 += (i3 - e4) * (1 - r3 / ((this.max - this.min) / n3)), this.zoom({ start: e4, end: i3 }, false, true);
- }, e3.prototype.handleSelectionExtremesChange = function() {
- }, e3.prototype.calculateZoom = function() {
- var e4 = this;
- t2.prototype.calculateZoom.call(this);
- var i3 = this.adjustDifference(this._minZoomed, this._maxZoomed), n3 = false;
- if (this.groupData && Z(i3)) {
- var r3 = this.mainBaseInterval, s2 = i3 + (this.startLocation + (1 - this.endLocation)) * this.baseDuration, a2 = void 0;
- this.groupInterval ? a2 = O({}, this.groupInterval) : ta((a2 = this.chooseInterval(0, s2, this.groupCount, this.groupIntervals)).timeUnit, a2.count) < ta(r3.timeUnit, r3.count) && (a2 = O({}, r3)), this._groupInterval = a2;
- var o3 = a2.timeUnit + a2.count;
- this._currentDataSetId != o3 && (this._currentDataSetId = o3, this.dispatch("groupperiodchanged")), this.series.each(function(t3) {
- t3.baseAxis == e4 && t3.setDataSet(e4._currentDataSetId) && (n3 = true);
- });
- }
- var l2 = this.chooseInterval(0, i3, this._gridCount);
- ta(l2.timeUnit, l2.count) < this.baseDuration && (l2 = O({}, this.baseInterval)), this._gridInterval = l2, this._nextGridUnit = Qs(l2.timeUnit), this._intervalDuration = ta(l2.timeUnit, l2.count), this._gridDate = aa(new Date(this.minZoomed - ta(l2.timeUnit, l2.count)), l2.timeUnit, l2.count, this._firstWeekDay, this._df.utc, new Date(this.min), this._df.timezoneMinutes, this._df.timezone), ti(this.series.iterator(), function(t3) {
- if (t3.baseAxis == e4) {
- var i4 = t3.getAxisField(e4), r4 = aa(new Date(e4._minZoomed + 0.05 * e4.baseDuration), e4.baseInterval.timeUnit, e4.baseInterval.count, e4._firstWeekDay, e4._df.utc, void 0, e4._df.timezoneMinutes, e4._df.timezone).getTime(), s3 = r4.toString(), a3 = t3.dataItemsByAxis.getKey(e4.uid).getKey(s3 + t3.currentDataSetId), o4 = 0;
- e4.start != 0 && (o4 = a3 ? (a3 = e4.findFirst(a3, r4, i4)).index : t3.dataItems.findClosestIndex(e4._minZoomed, function(t4) {
- return t4[i4];
- }, "left"));
- var l3 = e4.baseInterval, h2 = sa(aa(new Date(e4._maxZoomed), l3.timeUnit, l3.count, e4._firstWeekDay, e4._df.utc, void 0, e4._df.timezoneMinutes, e4._df.timezone), l3.timeUnit, l3.count, e4._df.utc).getTime(), p2 = h2.toString(), u2 = t3.dataItemsByAxis.getKey(e4.uid).getKey(p2 + t3.currentDataSetId), d2 = t3.dataItems.length;
- e4.end != 1 && (u2 ? d2 = u2.index : (h2 -= 1, d2 = t3.dataItems.findClosestIndex(h2, function(t4) {
- return t4[i4];
- }, "right"), d2++)), t3.max(e4) < r4 ? (t3.startIndex = t3.dataItems.length, t3.endIndex = t3.dataItems.length, t3.outOfRange = true) : t3.min(e4) > h2 ? (t3.startIndex = 0, t3.endIndex = 0, t3.outOfRange = true) : (t3.outOfRange = false, t3.startIndex = o4, t3.endIndex = d2), !n3 && t3.dataRangeInvalid && t3.validateDataRange();
- }
- });
- }, e3.prototype.findFirst = function(t3, e4, i3) {
- var n3 = t3.index;
- if (n3 > 0) {
- var r3 = t3.component.dataItems.getIndex(n3 - 1), s2 = r3[i3];
- return !s2 || s2.getTime() < e4 ? t3 : this.findFirst(r3, e4, i3);
- }
- return t3;
- }, e3.prototype.validateData = function() {
- t2.prototype.validateData.call(this), tt(this.baseInterval.count) || (this.baseInterval.count = 1);
- }, Object.defineProperty(e3.prototype, "minDifference", { get: function() {
- var t3 = this, e4 = Number.MAX_VALUE;
- return this.series.each(function(i3) {
- e4 > t3._minDifference[i3.uid] && (e4 = t3._minDifference[i3.uid]);
- }), e4 != Number.MAX_VALUE && e4 != 0 || (e4 = ta("day")), e4;
- }, enumerable: true, configurable: true }), e3.prototype.seriesDataChangeUpdate = function(t3) {
- this._minDifference[t3.uid] = Number.MAX_VALUE;
- }, e3.prototype.postProcessSeriesDataItems = function(t3) {
- var e4 = this;
- this._firstWeekDay = this.getFirstWeekDay(), t3 ? this.seriesGroupUpdate(t3) : this.series.each(function(t4) {
- e4.seriesGroupUpdate(t4);
- }), this.addEmptyUnitsBreaks();
- }, e3.prototype.seriesGroupUpdate = function(t3) {
- var e4 = this;
- JSON.stringify(t3._baseInterval[this.uid]) != JSON.stringify(this.mainBaseInterval) && (t3._baseInterval[this.uid] = this.mainBaseInterval, t3.mainDataSet.each(function(t4) {
- e4.postProcessSeriesDataItem(t4);
- }), this.groupData && this.groupSeriesData(t3));
- }, e3.prototype.groupSeriesData = function(t3) {
- var e4 = this;
- if (t3.baseAxis == this && t3.dataItems.length > 0 && !t3.dataGrouped) {
- t3.bulletsContainer.removeChildren();
- var i3 = [], n3 = this.mainBaseInterval, r3 = ta(n3.timeUnit, n3.count);
- this.groupIntervals.each(function(t4) {
- var n4 = ta(t4.timeUnit, t4.count);
- (n4 > r3 && n4 < e4.max - e4.min || e4.groupInterval) && i3.push(t4);
- }), t3._dataSets && (t3._dataSets.each(function(t4, e5) {
- e5.each(function(t5) {
- t5.dispose();
- }), e5.clear();
- }), t3._dataSets.clear()), t3.dataGrouped = true, Ut(i3, function(i4) {
- var n4 = "date" + e4.axisLetter, r4 = i4.timeUnit + i4.count, s2 = new Ei(t3.mainDataSet.template.clone());
- t3.dataSets.setKey(r4, s2);
- var a2, o3, l2 = t3.mainDataSet, h2 = Number.NEGATIVE_INFINITY, p2 = 0, u2 = [];
- Ne(t3.dataFields, function(t4, e5) {
- var i5 = t4;
- i5 != n4 && i5.indexOf("Show") == -1 && u2.push(i5);
- }), l2.each(function(r5) {
- var l3 = r5.getDate(n4);
- if (l3) {
- var d2 = l3.getTime(), c2 = (o3 = aa(new Date(d2), i4.timeUnit, i4.count, e4._df.firstDayOfWeek, e4._df.utc, void 0, e4._df.timezoneMinutes, e4._df.timezone)).getTime();
- h2 < c2 ? (a2 && t3._adapterO && Ut(u2, function(e5) {
- a2.values[e5].value = t3._adapterO.apply("groupDataItem", { dataItem: a2, interval: i4, dataField: e5, date: o3, value: a2.values[e5].value }).value, a2.values[e5].workingValue = a2.values[e5].value;
- }), (a2 = s2.create()).dataContext = {}, a2.setWorkingLocation("dateX", t3.dataItems.template.locations.dateX, 0), a2.setWorkingLocation("openDateX", t3.dataItems.template.locations.openDateX, 0), a2.setWorkingLocation("dateY", t3.dataItems.template.locations.dateY, 0), a2.setWorkingLocation("openDateY", t3.dataItems.template.locations.openDateY, 0), a2.component = t3, a2.setDate(n4, o3), a2._index = p2, p2++, Ut(u2, function(e5) {
- var n5 = r5.values[e5];
- if (n5) {
- var s3 = n5.value;
- t3._adapterO && (s3 = t3._adapterO.apply("groupValue", { dataItem: r5, interval: i4, dataField: e5, date: o3, value: s3 }).value);
- var l4 = a2.values[e5];
- tt(s3) ? (l4.value = s3, l4.workingValue = s3, l4.open = s3, l4.close = s3, l4.low = s3, l4.high = s3, l4.sum = s3, l4.average = s3, l4.count = 1) : l4.count = 0;
- }
- }), e4.postProcessSeriesDataItem(a2, i4), Ne(t3.propertyFields, function(t4, e5) {
- var i5 = t4, n5 = r5.properties[t4];
- Z(n5) && (a2.hasProperties = true, a2.setProperty(i5, n5));
- }), a2.groupDataItems = [r5], h2 = c2) : a2 && (Ut(u2, function(e5) {
- var n5 = t3.groupFields[e5], s3 = r5.values[e5];
- if (s3) {
- var l4 = s3.value;
- if (t3._adapterO && (l4 = t3._adapterO.apply("groupValue", { dataItem: r5, interval: i4, dataField: e5, date: o3, value: l4 }).value), tt(l4)) {
- var h3 = a2.values[e5];
- tt(h3.open) || (h3.open = l4), h3.close = l4, (h3.low > l4 || !tt(h3.low)) && (h3.low = l4), (h3.high < l4 || !tt(h3.high)) && (h3.high = l4), tt(h3.sum) ? h3.sum += l4 : h3.sum = l4, h3.count++, h3.average = h3.sum / h3.count, tt(h3[n5]) && (h3.value = h3[n5], h3.workingValue = h3.value);
- }
- }
- }), Sn(r5.properties, a2.properties), Ne(t3.propertyFields, function(t4, e5) {
- var i5 = t4, n5 = r5.properties[t4];
- Z(n5) && (a2.hasProperties = true, a2.setProperty(i5, n5));
- }), a2.groupDataItems.push(r5));
- }
- a2 && Sn(r5.dataContext, a2.dataContext);
- }), a2 && t3._adapterO && Ut(u2, function(e5) {
- a2.values[e5].value = t3._adapterO.apply("groupDataItem", { dataItem: a2, interval: i4, dataField: e5, date: o3, value: a2.values[e5].value }).value, a2.values[e5].workingValue = a2.values[e5].value;
- });
- }), this.calculateZoom();
- }
- }, e3.prototype.getDFFormatter = function() {
- this._df = this.dateFormatter;
- }, e3.prototype.postProcessSeriesDataItem = function(t3, e4) {
- var i3 = this, n3 = "";
- e4 ? n3 = e4.timeUnit + e4.count : e4 = this.mainBaseInterval;
- var r3 = t3.component.dataItemsByAxis.getKey(this.uid);
- Ne(t3.dates, function(s2) {
- var a2 = t3.getDate(s2).getTime(), o3 = aa(new Date(a2), e4.timeUnit, e4.count, i3._firstWeekDay, i3._df.utc, void 0, i3._df.timezoneMinutes, i3._df.timezone).getTime(), l2 = sa(new Date(o3), e4.timeUnit, e4.count, i3._df.utc);
- t3.setCalculatedValue(s2, o3, "open"), t3.setCalculatedValue(s2, l2.getTime(), "close"), r3.setKey(o3 + n3, t3);
- });
- }, e3.prototype.addEmptyUnitsBreaks = function() {
- var t3 = this;
- if (this.skipEmptyPeriods && tt(this.min) && tt(this.max)) {
- var e4 = this.baseInterval.timeUnit, i3 = this.baseInterval.count;
- this._axisBreaks && this._axisBreaks.clear();
- for (var n3 = aa(new Date(this.min), e4, i3, this._firstWeekDay, this._df.utc, void 0, this._df.timezoneMinutes, this._df.timezone), r3 = void 0, s2 = function() {
- sa(n3, e4, i3, a2._df.utc);
- var s3 = n3.getTime(), o3 = s3.toString();
- pi(a2.series.iterator(), function(e5) {
- return !!e5.dataItemsByAxis.getKey(t3.uid).getKey(o3 + e5.currentDataSetId);
- }) ? r3 && (r3.endDate = new Date(s3 - 1), r3 = void 0) : r3 || ((r3 = a2.axisBreaks.create()).startDate = new Date(s3), a2._gapBreaks = true);
- }, a2 = this; n3.getTime() < this.max - this.baseDuration; )
- s2();
- }
- }, e3.prototype.fixAxisBreaks = function() {
- var e4 = this;
- t2.prototype.fixAxisBreaks.call(this);
- var i3 = this._axisBreaks;
- i3 && i3.length > 0 && i3.each(function(t3) {
- var i4 = Math.ceil(e4._gridCount * (Math.min(e4.end, t3.endPosition) - Math.max(e4.start, t3.startPosition)) / (e4.end - e4.start));
- t3.gridInterval = e4.chooseInterval(0, t3.adjustedEndValue - t3.adjustedStartValue, i4);
- var n3 = aa(new Date(t3.adjustedStartValue), t3.gridInterval.timeUnit, t3.gridInterval.count, e4._firstWeekDay, e4._df.utc, void 0, e4._df.timezoneMinutes, e4._df.timezone);
- n3.getTime() > t3.startDate.getTime() && sa(n3, t3.gridInterval.timeUnit, t3.gridInterval.count, e4._df.utc), t3.gridDate = n3;
- });
- }, e3.prototype.getFirstWeekDay = function() {
- return this._df ? this._df.firstDayOfWeek : 1;
- }, e3.prototype.getGridDate = function(t3, e4) {
- var i3 = this._gridInterval.timeUnit, n3 = this._gridInterval.count;
- aa(t3, i3, 1, this._firstWeekDay, this._df.utc, void 0, this._df.timezoneMinutes, this._df.timezone);
- var r3 = t3.getTime(), s2 = na(t3), a2 = sa(s2, i3, e4, this._df.utc).getTime(), o3 = this.isInBreak(a2);
- o3 && o3.endDate && (aa(s2 = new Date(o3.endDate.getTime()), i3, n3, this._firstWeekDay, this._df.utc, void 0, this._df.timezoneMinutes, this._df.timezone), s2.getTime() < o3.endDate.getTime() && sa(s2, i3, n3, this._df.utc), a2 = s2.getTime());
- var l2 = this.adjustDifference(r3, a2);
- return Math.round(l2 / ta(i3)) < n3 ? this.getGridDate(t3, e4 + n3) : s2;
- }, e3.prototype.getBreaklessDate = function(t3, e4, i3) {
- var n3 = new Date(t3.endValue);
- aa(n3, e4, i3, this._firstWeekDay, this._df.utc, void 0, this._df.timezoneMinutes, this._df.timezone), sa(n3, e4, i3, this._df.utc);
- var r3 = n3.getTime();
- return (t3 = this.isInBreak(r3)) ? this.getBreaklessDate(t3, e4, i3) : n3;
- }, e3.prototype.validateAxisElements = function() {
- var t3 = this;
- if (tt(this.max) && tt(this.min)) {
- this.calculateZoom();
- var e4 = this._gridDate.getTime(), i3 = this._gridInterval.timeUnit, n3 = this._gridInterval.count, r3 = na(this._gridDate), s2 = this._dataItemsIterator;
- this.resetIterators();
- for (var a2 = function() {
- var t4 = o3.getGridDate(na(r3), n3);
- e4 = t4.getTime();
- var a3 = na(t4);
- a3 = sa(a3, i3, n3, o3._df.utc);
- var l3 = o3.dateFormats.getKey(i3);
- o3.markUnitChange && r3 && ra(t4, r3, o3._nextGridUnit, o3._df.utc) && i3 !== "year" && (l3 = o3.periodChangeDateFormats.getKey(i3));
- var h2 = o3._df.format(t4, l3), p2 = s2.find(function(t5) {
- return t5.text === h2;
- });
- p2.__disabled && (p2.__disabled = false), o3.appendDataItem(p2), p2.axisBreak = void 0, p2.date = t4, p2.endDate = a3, p2.text = h2, o3.validateDataElement(p2), r3 = t4;
- }, o3 = this; e4 <= this._maxZoomed; )
- a2();
- var l2 = this.renderer;
- this._axisBreaks && ti(this._axisBreaks.iterator(), function(e5) {
- if (e5.breakSize > 0) {
- var i4 = e5.gridInterval.timeUnit, n4 = e5.gridInterval.count;
- if (_t(e5.startPoint, e5.endPoint) > 4 * l2.minGridDistance)
- for (var r4, a3 = e5.gridDate.getTime(), o4 = 0, h2 = function() {
- var l3 = na(e5.gridDate);
- if (a3 = sa(l3, i4, n4 * o4, t3._df.utc).getTime(), o4++, a3 > e5.adjustedStartValue && a3 < e5.adjustedEndValue) {
- var h3 = na(l3);
- h3 = sa(h3, i4, n4, t3._df.utc);
- var p2 = t3.dateFormats.getKey(i4);
- t3.markUnitChange && r4 && ra(l3, r4, t3._nextGridUnit, t3._df.utc) && i4 !== "year" && (p2 = t3.periodChangeDateFormats.getKey(i4));
- var u2 = t3._df.format(l3, p2), d2 = s2.find(function(t4) {
- return t4.text === u2;
- });
- d2.__disabled && (d2.__disabled = false), t3.appendDataItem(d2), d2.axisBreak = e5, e5.dataItems.moveValue(d2), d2.date = l3, d2.endDate = h3, d2.text = u2, r4 = l3, t3.validateDataElement(d2);
- }
- }; a3 <= e5.adjustedMax; )
- h2();
- }
- });
- }
- }, e3.prototype.validateDataElement = function(t3) {
- if (t3.itemIndex = this._axisItemCount, this._axisItemCount++, tt(this.max) && tt(this.min)) {
- var e4 = this.renderer, i3 = t3.value, n3 = t3.endValue;
- tt(n3) || (n3 = i3);
- var r3 = this.valueToPosition(i3), s2 = this.valueToPosition(n3), a2 = s2;
- !t3.isRange && this._gridInterval.count > this.baseInterval.count && (s2 = r3 + (s2 - r3) / (this._gridInterval.count / this.baseInterval.count)), t3.position = r3;
- var o3 = t3.tick;
- o3 && !o3.disabled && e4.updateTickElement(o3, r3, s2);
- var l2 = t3.grid;
- l2 && !l2.disabled && e4.updateGridElement(l2, r3, s2);
- var h2 = t3.axisFill;
- h2 && !h2.disabled && (e4.updateFillElement(h2, r3, a2), t3.isRange || this.fillRule(t3));
- var p2 = t3.mask;
- p2 && e4.updateFillElement(p2, r3, s2), t3.bullet && e4.updateBullet(t3.bullet, r3, s2);
- var u2 = t3.label;
- if (u2 && !u2.disabled) {
- var d2 = u2.location;
- d2 == 0 && (d2 = this._gridInterval.count != 1 || this._gridInterval.timeUnit == "week" || t3.isRange ? 0 : 0.5), e4.updateLabelElement(u2, r3, s2, d2);
- }
- }
- }, Object.defineProperty(e3.prototype, "baseDuration", { get: function() {
- return ta(this.baseInterval.timeUnit, this.baseInterval.count);
- }, enumerable: true, configurable: true }), e3.prototype.adjustMinMax = function(t3, e4) {
- return { min: t3, max: e4, step: this.baseDuration };
- }, e3.prototype.fixMin = function(t3) {
- var e4 = this.baseInterval, i3 = aa(new Date(t3), e4.timeUnit, e4.count, this._firstWeekDay, this._df.utc, void 0, this._df.timezoneMinutes, this._df.timezone).getTime();
- return i3 + (sa(new Date(i3), e4.timeUnit, e4.count, this._df.utc).getTime() - i3) * this.startLocation;
- }, e3.prototype.fixMax = function(t3) {
- var e4 = this.baseInterval, i3 = aa(new Date(t3), e4.timeUnit, e4.count, this._firstWeekDay, this._df.utc, void 0, this._df.timezoneMinutes, this._df.timezone).getTime();
- return i3 + (sa(new Date(i3), e4.timeUnit, e4.count, this._df.utc).getTime() - i3) * this.endLocation;
- }, e3.prototype.chooseInterval = function(t3, e4, i3, n3) {
- n3 || (n3 = this.gridIntervals);
- var r3 = n3.getIndex(t3), s2 = ta(r3.timeUnit, r3.count), a2 = n3.length - 1;
- if (t3 >= a2)
- return O({}, n3.getIndex(a2));
- var o3 = Math.ceil(e4 / s2);
- return e4 < s2 && t3 > 0 ? O({}, n3.getIndex(t3 - 1)) : o3 <= i3 ? O({}, n3.getIndex(t3)) : t3 + 1 < n3.length ? this.chooseInterval(t3 + 1, e4, i3, n3) : O({}, n3.getIndex(t3));
- }, e3.prototype.formatLabel = function(t3) {
- return this._df.format(t3);
- }, e3.prototype.dateToPosition = function(t3) {
- return this.valueToPosition(t3.getTime());
- }, e3.prototype.anyToPosition = function(t3) {
- return t3 instanceof Date ? this.dateToPosition(t3) : this.valueToPosition(t3);
- }, e3.prototype.dateToPoint = function(t3) {
- var e4 = this.dateToPosition(t3), i3 = this.renderer.positionToPoint(e4), n3 = this.renderer.positionToAngle(e4);
- return { x: i3.x, y: i3.y, angle: n3 };
- }, e3.prototype.anyToPoint = function(t3) {
- return t3 instanceof Date ? this.dateToPoint(t3) : this.valueToPoint(t3);
- }, e3.prototype.positionToDate = function(t3) {
- return new Date(this.positionToValue(t3));
- }, e3.prototype.getPositionX = function(t3, e4, i3, n3, r3) {
- var s2 = this.getTimeByLocation(t3, e4, i3);
- tt(s2) || (s2 = this.baseValue);
- var a2 = this.valueToPosition(s2);
- return r3 && (a2 = ut(a2, r3.start, r3.end)), a2;
- }, e3.prototype.getPositionY = function(t3, e4, i3, n3, r3) {
- var s2 = this.getTimeByLocation(t3, e4, i3), a2 = t3.getValue("valueX", "stack");
- tt(s2) || (s2 = this.baseValue);
- var o3 = this.valueToPosition(s2 + a2);
- return r3 && (o3 = ut(o3, r3.start, r3.end)), o3;
- }, e3.prototype.getAngle = function(t3, e4, i3, n3, r3) {
- var s2 = this.getTimeByLocation(t3, e4, i3), a2 = t3.getValue(n3, "stack");
- tt(s2) || (s2 = this.baseValue);
- var o3 = this.valueToPosition(s2 + a2);
- return r3 && (o3 = ut(o3, r3.start, r3.end)), this.positionToAngle(o3);
- }, e3.prototype.getTimeByLocation = function(t3, e4, i3) {
- if (Z(e4)) {
- tt(i3) || tt(i3 = t3.workingLocations[e4]) || (i3 = 0);
- var n3 = t3.values[e4].open, r3 = t3.values[e4].close, s2 = t3.values[e4].workingValue, a2 = t3.values[e4].value - s2;
- return r3 -= a2, tt(n3 -= a2) && tt(r3) ? n3 + (r3 - n3) * i3 : void 0;
- }
- }, e3.prototype.processSeriesDataItem = function(t3, e4) {
- var i3, n3 = t3.component, r3 = t3["date" + e4];
- if (tt(this.timezoneOffset) ? (r3.setTime(r3.getTime() + 6e4 * (r3.getTimezoneOffset() - this.timezoneOffset)), t3.setValue("date" + e4, r3.getTime(), 0)) : Z(this.timezone) && (r3 = oa(r3, this.timezone), t3.setValue("date" + e4, r3.getTime(), 0), t3["date" + e4] = r3), r3) {
- i3 = r3.getTime();
- var s2, a2 = t3["openDate" + e4], o3 = this._prevSeriesTime[n3.uid];
- if (a2 && (s2 = a2.getTime()), tt(s2)) {
- var l2 = Math.abs(i3 - s2);
- this._minDifference[n3.uid] > l2 && (this._minDifference[n3.uid] = l2);
- }
- var h2 = i3 - o3;
- h2 > 0 && this._minDifference[n3.uid] > h2 && (this._minDifference[n3.uid] = h2), this._prevSeriesTime[n3.uid] = i3, n3._baseInterval[this.uid] && this.postProcessSeriesDataItem(t3);
- }
- }, e3.prototype.updateAxisBySeries = function() {
- t2.prototype.updateAxisBySeries.call(this);
- var e4 = this.chooseInterval(0, this.minDifference, 1);
- this.minDifference >= ta("day", 27) && e4.timeUnit == "week" && (e4.timeUnit = "month", e4.count = 1), e4.timeUnit == "month" && (this.minDifference >= ta("day", 58) && e4.count == 1 && (e4.count = 2), this.minDifference >= ta("day", 87) && e4.count == 2 && (e4.count = 3), this.minDifference >= ta("day", 174) && e4.count == 5 && (e4.count = 6)), this.minDifference >= ta("hour", 23) && e4.timeUnit == "hour" && (e4.timeUnit = "day", e4.count = 1), this.minDifference >= ta("week", 1) - ta("hour", 1) && e4.timeUnit == "day" && (e4.timeUnit = "week", e4.count = 1), this.minDifference >= ta("year", 1) - ta("day", 1.01) && e4.timeUnit == "month" && (e4.timeUnit = "year", e4.count = 1), this._baseIntervalReal = e4, this._mainBaseInterval = e4;
- }, Object.defineProperty(e3.prototype, "baseInterval", { get: function() {
- return this._groupInterval ? this._groupInterval : this._baseInterval ? this._baseInterval : this._baseIntervalReal;
- }, set: function(t3) {
- JSON.stringify(this._baseInterval) != JSON.stringify(t3) && (this._baseInterval = t3, this._mainBaseInterval = t3, tt(t3.count) || (t3.count = 1), this.invalidate(), this.postProcessSeriesDataItems());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "mainBaseInterval", { get: function() {
- return this._baseInterval ? this._baseInterval : this._mainBaseInterval ? this._mainBaseInterval : this._baseIntervalReal;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "skipEmptyPeriods", { get: function() {
- return this.getPropertyValue("skipEmptyPeriods");
- }, set: function(t3) {
- if (t3) {
- var e4 = this.axisBreaks.template;
- e4.startLine.disabled = true, e4.endLine.disabled = true, e4.fillShape.disabled = true, e4.breakSize = 0;
- } else
- this._gapBreaks && (this.axisBreaks.clear(), this._gapBreaks = false);
- this.setPropertyValue("skipEmptyPeriods", t3) && (this.invalidate(), this.postProcessSeriesDataItems(), this.invalidateSeries());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipDateFormat", { get: function() {
- return this.getPropertyValue("tooltipDateFormat");
- }, set: function(t3) {
- this.setPropertyValue("tooltipDateFormat", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "markUnitChange", { get: function() {
- return this.getPropertyValue("markUnitChange");
- }, set: function(t3) {
- this.setPropertyValue("markUnitChange", t3) && this.invalidateData();
- }, enumerable: true, configurable: true }), e3.prototype.getTooltipText = function(t3) {
- var e4, i3 = this.positionToDate(t3);
- if (i3 = aa(i3, this.baseInterval.timeUnit, this.baseInterval.count, this._firstWeekDay, this._df.utc, new Date(this.min), this._df.timezoneMinutes, this._df.timezone), this.tooltipDate = i3, Z(this.tooltipDateFormat))
- e4 = this._df.format(i3, this.tooltipDateFormat, ["day", "month", "week", "year"].indexOf(this.baseInterval.timeUnit) == -1);
- else {
- var n3 = this.dateFormats.getKey(this.baseInterval.timeUnit);
- e4 = n3 ? this._df.format(i3, n3) : this.getPositionLabel(t3);
- }
- return this._adapterO ? this._adapterO.apply("getTooltipText", e4) : e4;
- }, e3.prototype.roundPosition = function(t3, e4, i3) {
- var n3 = this.baseInterval, r3 = n3.timeUnit, s2 = n3.count, a2 = this.positionToDate(t3);
- if (aa(a2, r3, s2, this._firstWeekDay, this._df.utc, void 0, this._df.timezoneMinutes, this._df.timezone), e4 > 0 && sa(a2, r3, e4 * s2, this._df.utc), i3 > 0 && i3 < 1 && a2.setTime(a2.getTime() + this.baseDuration * i3), this.isInBreak(a2.getTime()))
- for (; a2.getTime() < this.max && (sa(a2, r3, s2, this._df.utc), this.isInBreak(a2.getTime())); )
- ;
- return this.dateToPosition(a2);
- }, e3.prototype.getCellStartPosition = function(t3) {
- return this.roundPosition(t3, 0);
- }, e3.prototype.getCellEndPosition = function(t3) {
- return this.roundPosition(t3, 1);
- }, e3.prototype.getSeriesDataItem = function(t3, e4, i3) {
- var n3 = this.positionToValue(e4), r3 = n3 - (this.axisLetter == "Y" ? t3.dataItems.template.locations.dateY : t3.dataItems.template.locations.dateX) * this.baseDuration, s2 = aa(new Date(n3), this.baseInterval.timeUnit, this.baseInterval.count, this._firstWeekDay, this._df.utc, void 0, this._df.timezoneMinutes, this._df.timezone), a2 = aa(new Date(n3 + this.baseDuration), this.baseInterval.timeUnit, this.baseInterval.count, this._firstWeekDay, this._df.utc, void 0, this._df.timezoneMinutes, this._df.timezone);
- a2.getTime() > s2.getTime() && Math.abs(a2.getTime() - r3) < Math.abs(r3 - s2.getTime()) && (s2 = a2);
- var o3, l2 = t3.dataItemsByAxis.getKey(this.uid).getKey(s2.getTime() + t3.currentDataSetId);
- return !l2 && i3 && (o3 = this.axisLetter == "Y" ? "dateY" : "dateX", l2 = t3.dataItems.getIndex(t3.dataItems.findClosestIndex(s2.getTime(), function(t4) {
- return t4[o3] ? t4[o3].getTime() : -1 / 0;
- }, "any"))), l2;
- }, e3.prototype.getPositionLabel = function(t3) {
- var e4 = this.positionToDate(t3);
- return this._df.format(e4, this.getCurrentLabelFormat());
- }, e3.prototype.getCurrentLabelFormat = function() {
- return this.dateFormats.getKey(this._gridInterval ? this._gridInterval.timeUnit : "day");
- }, e3.prototype.initRenderer = function() {
- t2.prototype.initRenderer.call(this);
- var e4 = this.renderer;
- e4 && (e4.ticks.template.location = 0, e4.grid.template.location = 0, e4.labels.template.location = 0, e4.baseGrid.disabled = true);
- }, Object.defineProperty(e3.prototype, "basePoint", { get: function() {
- return { x: 0, y: 0 };
- }, enumerable: true, configurable: true }), e3.prototype.animateMinMax = function(t3, e4) {
- var i3 = this, n3 = this.animate([{ property: "_minAdjusted", from: this._minAdjusted, to: t3 }, { property: "_maxAdjusted", from: this._maxAdjusted, to: e4 }], this.rangeChangeDuration, this.rangeChangeEasing);
- return n3.events.on("animationprogress", function() {
- i3.dispatch("extremeschanged");
- }), n3;
- }, e3.prototype.handleExtremesChange = function() {
- if (t2.prototype.handleExtremesChange.call(this), this.groupData) {
- var e4 = this.baseInterval.timeUnit + this.baseInterval.count;
- this.groupMin[e4] = this._finalMin, this.groupMax[e4] = this._finalMax;
- }
- }, e3.prototype.zoomToDates = function(t3, e4, i3, n3, r3) {
- t3 = this._df.parse(t3), e4 = this._df.parse(e4), this.zoomToValues(t3.getTime(), e4.getTime(), i3, n3, r3);
- }, e3.prototype.zoomToValues = function(t3, e4, i3, n3, r3) {
- var s2 = this;
- if (this.groupData) {
- var a2 = this.adjustDifference(t3, e4), o3 = false;
- e4 == this.max && (o3 = true);
- var l2 = false;
- if (t3 == this.min && (l2 = true), Z(a2)) {
- var h2 = this.mainBaseInterval, p2 = this.chooseInterval(0, a2, this.groupCount, this.groupIntervals);
- (p2.timeUnit == h2.timeUnit && p2.count < h2.count || ta(p2.timeUnit, 1) < ta(h2.timeUnit, 1)) && (p2 = O({}, h2));
- var u2 = p2.timeUnit + p2.count, d2 = this.groupMin[u2], c2 = this.groupMax[u2];
- tt(d2) && tt(c2) || (d2 = Number.POSITIVE_INFINITY, c2 = Number.NEGATIVE_INFINITY, this.series.each(function(t4) {
- var e5 = t4.min(s2), i4 = t4.max(s2);
- if (t4._dataSets) {
- var n4 = t4._dataSets.getKey(p2.timeUnit + p2.count);
- if (n4) {
- var r4 = n4.getIndex(0), a3 = n4.getIndex(n4.length - 1);
- r4 && (t4.xAxis == s2 ? e5 = r4.dateX.getTime() : t4.yAxis == s2 && (e5 = r4.dateY.getTime())), a3 && (t4.xAxis == s2 ? i4 = a3.dateX.getTime() : t4.yAxis == s2 && (i4 = a3.dateY.getTime()));
- }
- }
- i4 = aa(sa(new Date(i4), p2.timeUnit, 1, s2._df.utc), p2.timeUnit, 1, s2._df.firstDayOfWeek, s2._df.utc, void 0, s2._df.timezoneMinutes, s2._df.timezone).getTime(), e5 < d2 && (d2 = e5), i4 > c2 && (c2 = i4);
- }), this.groupMin[u2] = d2, this.groupMax[u2] = c2), t3 = ut(t3, d2, c2), e4 = ut(e4, d2, c2), r3 && (o3 && (t3 = ut(t3 = e4 - a2, d2, c2)), l2 && (e4 = ut(e4 = t3 + a2, d2, c2))), f2 = (t3 - d2) / (c2 - d2), g2 = (e4 - d2) / (c2 - d2), this.zoom({ start: f2, end: g2 }, i3, n3);
- }
- } else {
- var f2 = this.valueToPosition(t3), g2 = this.valueToPosition(e4);
- this.zoom({ start: f2, end: g2 }, i3, n3);
- }
- }, e3.prototype.asIs = function(e4) {
- return e4 == "baseInterval" || t2.prototype.asIs.call(this, e4);
- }, e3.prototype.copyFrom = function(e4) {
- var i3 = this;
- t2.prototype.copyFrom.call(this, e4), this.dateFormats = e4.dateFormats, this.periodChangeDateFormats = e4.periodChangeDateFormats, this.groupIntervals.clear(), e4.groupIntervals.each(function(t3) {
- i3.groupIntervals.push(O({}, t3));
- }), this.gridIntervals.clear(), e4.gridIntervals.each(function(t3) {
- i3.gridIntervals.push(O({}, t3));
- }), e4._baseInterval && (this.baseInterval = e4._baseInterval);
- }, e3.prototype.showTooltipAtPosition = function(e4, i3) {
- var n3 = this;
- if (i3 || (e4 = this.toAxisPosition(e4)), this.snapTooltip) {
- var r3, s2 = this.positionToDate(e4).getTime();
- if (this.series.each(function(t3) {
- if (t3.baseAxis == n3) {
- var i4 = n3.getSeriesDataItem(t3, e4, true);
- if (i4) {
- var a3 = void 0;
- t3.xAxis == n3 && (a3 = i4.dateX), t3.yAxis == n3 && (a3 = i4.dateY), r3 ? Math.abs(r3.getTime() - s2) > Math.abs(a3.getTime() - s2) && (r3 = a3) : r3 = a3;
- }
- }
- }), r3) {
- var a2 = r3.getTime();
- r3 = aa(new Date(a2), this.baseInterval.timeUnit, this.baseInterval.count, this._firstWeekDay, this._df.utc, void 0, this._df.timezoneMinutes, this._df.timezone), a2 = r3.getTime();
- var o3 = this.renderer.tooltipLocation;
- o3 == 0 && (o3 = 1e-4), r3 = new Date(r3.getTime() + this.baseDuration * o3), e4 = this.dateToPosition(r3), this.chart.cursor && this.chart.cursor.snapToSeries || this.series.each(function(t3) {
- var e5 = t3.dataItemsByAxis.getKey(n3.uid).getKey(a2 + t3.currentDataSetId), i4 = t3.showTooltipAtDataItem(e5);
- i4 ? n3.chart._seriesPoints.push({ series: t3, point: i4 }) : (t3.tooltipText || t3.tooltipHTML) && t3.hideTooltip();
- });
- }
- }
- t2.prototype.showTooltipAtPosition.call(this, e4, true);
- }, Object.defineProperty(e3.prototype, "snapTooltip", { get: function() {
- return this.getPropertyValue("snapTooltip");
- }, set: function(t3) {
- this.setPropertyValue("snapTooltip", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "groupData", { get: function() {
- return this.getPropertyValue("groupData");
- }, set: function(t3) {
- var e4 = this;
- this.setPropertyValue("groupData", t3) && (this.series.each(function(i3) {
- i3.setDataSet(""), t3 && !i3.dataGrouped && i3.inited && (i3._baseInterval[e4.uid] = e4.mainBaseInterval, e4.groupSeriesData(i3));
- }), this._currentDataSetId = "", this._groupInterval = void 0, this.invalidate(), this.invalidateSeries());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "groupInterval", { get: function() {
- return this.getPropertyValue("groupInterval");
- }, set: function(t3) {
- this.setPropertyValue("groupInterval", t3) && (this.invalidate(), this.invalidateSeries());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "groupCount", { get: function() {
- return this.getPropertyValue("groupCount");
- }, set: function(t3) {
- this.setPropertyValue("groupCount", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "timezoneOffset", { get: function() {
- return this.getPropertyValue("timezoneOffset");
- }, set: function(t3) {
- this.setPropertyValue("timezoneOffset", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "timezone", { get: function() {
- return this.getPropertyValue("timezone");
- }, set: function(t3) {
- this.setPropertyValue("timezone", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "gridInterval", { get: function() {
- return this._gridInterval;
- }, enumerable: true, configurable: true }), e3.prototype.makeGap = function(t3, e4) {
- var i3 = t3.component;
- if (t3 && e4 && !i3.connect && tt(i3.autoGapCount) && i3.baseAxis == this) {
- var n3 = t3.dates["date" + this.axisLetter], r3 = e4.dates["date" + this.axisLetter];
- if (n3 && r3 && n3.getTime() - r3.getTime() > i3.autoGapCount * this.baseDuration)
- return true;
- }
- return false;
- }, Object.defineProperty(e3.prototype, "baseValue", { get: function() {
- return this.min;
- }, enumerable: true, configurable: true }), e3;
- }(bh);
- Ii.registeredClasses.DateAxis = Ph, Ii.registeredClasses.DateAxisDataItem = _h;
- var wh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "AxisRendererX", e4.minGridDistance = 120, e4.opposite = false, e4.rotation = 0, e4.width = V(100), e4.labels.template.horizontalCenter = "middle", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.setAxis = function(e4) {
- t2.prototype.setAxis.call(this, e4), e4.layout = "vertical";
- }, e3.prototype.updateGridContainer = function() {
- var t3 = this.axis;
- if (t3) {
- var e4 = this.gridContainer;
- e4.x = t3.pixelX, e4.width = t3.axisLength;
- }
- }, e3.prototype.processRenderer = function() {
- t2.prototype.processRenderer.call(this);
- var e4 = this.axis;
- if (e4) {
- e4.width instanceof A || (e4.width = V(100)), this.line;
- var i3 = e4.title;
- i3.rotation = 0, i3.align = "center", this.opposite ? (this.line.toFront(), i3.toBack()) : (i3.toFront(), this.toBack(), this.line.toBack());
- }
- }, e3.prototype.updateTooltip = function() {
- if (this.axis) {
- var t3 = 1e3, e4 = this.line.pixelX, i3 = this.line.pixelY, n3 = this.axisLength, r3 = t3;
- this.opposite ? this.inside || (i3 = -1e3, r3 = t3) : this.inside && (i3 = -1e3, r3 = t3), this.axis.updateTooltip("vertical", { x: e4, y: i3, width: n3, height: r3 });
- }
- }, e3.prototype.updateLabelElement = function(t3, e4, i3, n3) {
- Z(n3) || (n3 = t3.location), e4 += (i3 - e4) * n3;
- var r3 = this.positionToPoint(e4);
- t3.isMeasured = !t3.inside;
- var s2, a2 = 0, o3 = this.gridContainer.maxHeight;
- this.opposite ? (t3.inside ? (s2 = "top", t3.valign == "bottom" && (a2 = o3, s2 = "bottom"), t3.valign == "middle" && (a2 = o3 / 2, s2 = "middle")) : s2 = "bottom", r3.y = a2) : (t3.inside ? (s2 = "bottom", t3.valign == "top" && (a2 = -o3, s2 = "top"), t3.valign == "middle" && (a2 = -o3 / 2, s2 = "middle")) : s2 = "top", r3.y += a2), t3.rotation == 0 && (t3.verticalCenter = s2), this.positionItem(t3, r3), this.toggleVisibility(t3, e4, this.minLabelPosition, this.maxLabelPosition);
- }, Object.defineProperty(e3.prototype, "axisLength", { get: function() {
- var t3 = this.axis;
- return t3.measuredWidth - t3.pixelPaddingRight - t3.pixelPaddingLeft || 0;
- }, enumerable: true, configurable: true }), e3.prototype.positionToPoint = function(t3, e4) {
- return { x: this.positionToCoordinate(t3), y: 0 };
- }, e3.prototype.pointToPosition = function(t3) {
- return this.coordinateToPosition(t3.x, t3.y);
- }, e3.prototype.getPositionRangePath = function(t3, e4) {
- var i3 = ut(this.positionToCoordinate(t3), 0, this.axisLength), n3 = ut(this.positionToCoordinate(e4), 0, this.axisLength), r3 = Math.abs(n3 - i3), s2 = this.getHeight();
- return Vo({ x: Math.min(i3, n3), y: 0, width: r3, height: s2 }, true);
- }, e3.prototype.updateBreakElement = function(e4) {
- t2.prototype.updateBreakElement.call(this, e4);
- var i3 = e4.startLine, n3 = e4.endLine, r3 = e4.fillShape, s2 = e4.startPoint, a2 = e4.endPoint, o3 = e4.pixelMarginLeft, l2 = this.getHeight() - e4.pixelMarginTop - e4.pixelMarginBottom;
- s2.x = ut(s2.x, -1, this.axisLength + 1), a2.x = ut(a2.x, -1, this.axisLength + 1), s2.x == a2.x && (s2.x < 0 || s2.x > this.axisLength) ? e4.fillShape.__disabled = true : e4.fillShape.__disabled = false, i3.y = o3, i3.width = 0, i3.height = l2, n3.y = o3, n3.width = 0, n3.height = l2, r3.height = l2, r3.width = Math.abs(a2.x - s2.x), r3.y = o3, r3.x = s2.x;
- }, e3.prototype.updateGridElement = function(t3, e4, i3) {
- e4 += (i3 - e4) * t3.location;
- var n3 = this.positionToPoint(e4);
- t3.path = wo({ x: 0, y: 0 }) + Co({ x: 0, y: this.getHeight() }), this.positionItem(t3, n3), this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.updateTickElement = function(t3, e4, i3) {
- e4 += (i3 - e4) * t3.location;
- var n3 = this.positionToPoint(e4), r3 = t3.length;
- n3.y = dr({ x: 0, y: this.line.pixelY }, this.line.parent, this.gridContainer).y, this.opposite ? r3 *= t3.inside ? 1 : -1 : r3 *= t3.inside ? -1 : 1, t3.path = wo({ x: 0, y: 0 }) + Co({ x: 0, y: r3 }), this.positionItem(t3, n3), this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.updateAxisLine = function() {
- this.line.path = wo({ x: 0, y: 0 }) + Co({ x: this.axisLength, y: 0 });
- }, e3.prototype.updateBaseGridElement = function() {
- t2.prototype.updateBaseGridElement.call(this);
- var e4 = this.axis, i3 = this.getHeight(), n3 = this.axisLength, r3 = this.baseGrid, s2 = e4.basePoint.x;
- if (s2 < -0.2 || s2 > n3 + 0.2)
- r3.hide(0);
- else {
- var a2 = dr({ x: 0, y: 0 }, this.gridContainer, r3.parent).y;
- r3.path = wo({ x: 0, y: 0 }) + Co({ x: 0, y: i3 }), r3.moveTo({ x: s2, y: a2 }), r3.show(0);
- }
- }, e3.prototype.createBreakSprites = function(t3) {
- t3.startLine = new pl(), t3.endLine = new pl();
- var e4 = new ul();
- e4.setWavedSides(false, true, false, true), t3.fillShape = e4;
- }, e3.prototype.toAxisPosition = function(t3) {
- var e4 = t3, i3 = this.axis;
- if (i3) {
- var n3 = i3.relativePositionSprite, r3 = i3.pixelX;
- if (n3 ? r3 = dr({ x: this.pixelX, y: 0 }, this.parent, n3).x : n3 = i3.parent, n3)
- return (e4 - r3 / n3.innerWidth) / (i3.axisLength / n3.innerWidth);
- }
- return t3;
- }, e3.prototype.updateBullet = function(t3, e4, i3) {
- var n3 = 0.5;
- t3 instanceof gh && (n3 = t3.location), e4 += (i3 - e4) * n3;
- var r3 = this.positionToPoint(e4);
- r3.y = dr({ x: 0, y: this.line.pixelY }, this.line.parent, this.gridContainer).y, this.positionItem(t3, r3), this.toggleVisibility(t3, e4, 0, 1);
- }, e3;
- }(fh);
- Ii.registeredClasses.AxisRendererX = wh, lo.push({ relevant: ho.heightXS, state: function(t2, e3) {
- if (t2 instanceof wh) {
- var i3 = t2.states.create(e3);
- return i3.properties.inside = true, i3.properties.maxLabelPosition = 0.9, i3.properties.minLabelPosition = 0.1, i3;
- }
- return null;
- } }), lo.push({ relevant: ho.heightXXS, state: function(t2, e3) {
- if (t2 instanceof wh) {
- var i3 = t2.states.create(e3);
- return i3.properties.disabled = true, i3;
- }
- return null;
- } });
- var Ch = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "CategoryAxisBreak", e4.properties.startLocation = 0.5, e4.properties.endLocation = 0.5, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "startPosition", { get: function() {
- if (this.axis)
- return this.axis.indexToPosition(this.adjustedStartValue, this.startLocation);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endPosition", { get: function() {
- if (this.axis)
- return this.axis.indexToPosition(this.adjustedEndValue, this.endLocation);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startCategory", { get: function() {
- return this.getPropertyValue("startCategory");
- }, set: function(t3) {
- this.setPropertyValue("startCategory", t3) && this.axis && (this.axis.invalidateDataItems(), this.axis.invalidateSeries());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endCategory", { get: function() {
- return this.getPropertyValue("endCategory");
- }, set: function(t3) {
- this.setPropertyValue("endCategory", t3) && this.axis && (this.axis.invalidateDataItems(), this.axis.invalidateSeries());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startValue", { get: function() {
- var t3 = this.getPropertyValue("startCategory");
- return t3 ? this.axis.categoryToIndex(t3) : this.getPropertyValue("startValue");
- }, set: function(t3) {
- this.setPropertyValue("startValue", t3) && this.axis && (this.axis.invalidateDataItems(), this.axis.invalidateSeries());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endValue", { get: function() {
- var t3 = this.getPropertyValue("endCategory");
- return t3 ? this.axis.categoryToIndex(t3) : this.getPropertyValue("endValue");
- }, set: function(t3) {
- this.setPropertyValue("endValue", t3) && this.axis && (this.axis.invalidateDataItems(), this.axis.invalidateSeries());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startLocation", { get: function() {
- return this.getPropertyValue("startLocation");
- }, set: function(t3) {
- this.setPropertyValue("startLocation", t3) && this.axis && (this.axis.invalidateDataItems(), this.axis.invalidateSeries());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endLocation", { get: function() {
- return this.getPropertyValue("endLocation");
- }, set: function(t3) {
- this.setPropertyValue("endLocation", t3) && this.axis && (this.axis.invalidateDataItems(), this.axis.invalidateSeries());
- }, enumerable: true, configurable: true }), e3;
- }(rh);
- Ii.registeredClasses.CategoryAxisBreak = Ch;
- var Oh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.seriesDataItems = {}, e4.className = "CategoryAxisDataItem", e4.text = "{category}", e4.locations.category = 0, e4.locations.endCategory = 1, e4.deltaPosition = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "category", { get: function() {
- return this._adapterO && this._adapterO.isEnabled("category") ? this._adapterO.apply("category", this.properties.category) : this.properties.category;
- }, set: function(t3) {
- var e4 = this.properties.category;
- this.setProperty("category", t3), Z(e4) && e4 != t3 && this.component && this.component.validateDataElement(this);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endCategory", { get: function() {
- return this.properties.endCategory;
- }, set: function(t3) {
- this.setProperty("endCategory", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "deltaPosition", { get: function() {
- return this.properties.deltaCoordinate;
- }, set: function(t3) {
- t3 != this.properties.deltaCoordinate && (this.setProperty("deltaCoordinate", t3), this.component && (this.component.invalidateDataItems(), this.component.invalidateSeries()));
- }, enumerable: true, configurable: true }), e3;
- }(ah), Sh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.dataItemsByCategory = new Pi(), e4.className = "CategoryAxis", e4.axisFieldName = "category", e4._lastDataItem = e4.createDataItem(), e4._lastDataItem.component = e4, e4._disposers.push(e4._lastDataItem), e4.applyTheme();
- var i3 = e4.dataItemsByCategory;
- return e4.addDisposer(e4.mainDataSet.events.on("removed", function(t3) {
- i3.removeKey(t3.oldValue.category);
- })), e4;
- }
- return C(e3, t2), e3.prototype.createDataItem = function() {
- return new Oh();
- }, e3.prototype.createAxisBreak = function() {
- return new Ch();
- }, e3.prototype.processSeriesDataItem = function(e4, i3) {
- t2.prototype.processSeriesDataItem.call(this, e4, i3);
- var n3 = e4["category" + this.axisLetter];
- if (Z(n3)) {
- var r3 = this.dataItemsByCategory.getKey(n3);
- if (r3) {
- var s2 = e4.component.uid, a2 = r3.seriesDataItems[s2];
- a2 || (a2 = [], r3.seriesDataItems[s2] = a2), a2.push(e4);
- }
- } else
- e4.component.dataItems.remove(e4);
- }, e3.prototype.validateDataRange = function() {
- var i3 = this;
- t2.prototype.validateDataRange.call(this), ti(this._series.iterator(), function(t3) {
- if (t3.xAxis instanceof e3 && t3.yAxis instanceof e3)
- t3.invalidateDataRange();
- else {
- var n3 = i3.positionToIndex(i3.start), r3 = i3.positionToIndex(i3.end);
- r3 >= i3.dataItems.length && r3--;
- for (var s2 = t3.uid, a2 = void 0, o3 = void 0, l2 = n3; l2 <= r3; l2++) {
- var h2 = i3.dataItems.getIndex(l2);
- if (h2) {
- var p2 = h2.seriesDataItems[s2];
- if (p2)
- for (var u2 = 0; u2 < p2.length; u2++) {
- var d2 = p2[u2];
- if (d2) {
- var c2 = d2.index;
- (!tt(a2) || c2 < a2) && (a2 = c2), (!tt(o3) || c2 > o3) && (o3 = c2);
- }
- }
- }
- }
- tt(a2) ? t3.startIndex = a2 : t3.start = i3.start, tt(o3) ? t3.endIndex = o3 + 1 : t3.end = i3.end, i3._axisBreaks && i3._axisBreaks.length > 0 && t3.invalidateDataRange();
- }
- });
- }, e3.prototype.validate = function() {
- var e4 = this;
- t2.prototype.validate.call(this);
- var i3 = this.dataItems.length, n3 = ut(Math.floor(this.start * i3 - 1), 0, i3), r3 = ut(Math.ceil(this.end * i3), 0, i3);
- this.renderer.invalid && this.renderer.validate();
- var s2 = this.renderer.axisLength / Math.max(this.renderer.minGridDistance, 1 / Number.MAX_SAFE_INTEGER), a2 = Math.min(this.dataItems.length, Math.ceil((r3 - n3) / s2));
- if (this._startIndex = Math.floor(n3 / a2) * a2, this._endIndex = Math.ceil(this.end * i3), this.fixAxisBreaks(), this._startIndex == this._endIndex && this._endIndex++, this._frequency = a2, !(this.axisLength <= 0)) {
- this.maxZoomFactor = this.dataItems.length, this.dataItems.length <= 0 && (this.maxZoomFactor = 1), this.resetIterators(), n3 = gt(0, this._startIndex - this._frequency), r3 = yt(this.dataItems.length, this._endIndex + this._frequency);
- for (var o3 = 0, l2 = 0; l2 < n3; l2++)
- (p2 = this.dataItems.getIndex(l2)).__disabled = true;
- l2 = r3;
- for (var h2 = this.dataItems.length; l2 < h2; l2++)
- (p2 = this.dataItems.getIndex(l2)).__disabled = true;
- for (l2 = n3; l2 < r3; l2++)
- if (l2 < this.dataItems.length) {
- var p2 = this.dataItems.getIndex(l2);
- l2 / this._frequency == Math.round(l2 / this._frequency) ? (this.isInBreak(l2) || (this.appendDataItem(p2), this.validateDataElement(p2, o3)), o3++) : p2.__disabled = true;
- }
- this.appendDataItem(this._lastDataItem), this.validateDataElement(this._lastDataItem, o3 + 1, this.dataItems.length), this._axisBreaks && this._axisBreaks.each(function(t3) {
- var i4 = t3.adjustedStartValue, n4 = t3.adjustedEndValue;
- if (vt({ start: i4, end: n4 }, { start: e4._startIndex, end: e4._endIndex })) {
- for (var r4 = i4; r4 <= n4; r4++)
- (o4 = e4.dataItems.getIndex(r4)).__disabled = true;
- var s3 = ut(Math.ceil(e4._frequency / t3.breakSize), 1, n4 - i4), a3 = 0;
- if (t3.breakSize > 0)
- for (r4 = i4; r4 <= n4; r4 += s3) {
- var o4;
- (o4 = e4.dataItems.getIndex(r4)).__disabled = false, e4.appendDataItem(o4), e4.validateDataElement(o4, a3), a3++;
- }
- }
- }), this.validateBreaks(), this.validateAxisRanges(), this.ghostLabel.invalidate(), this.renderer.invalidateLayout();
- }
- }, e3.prototype.validateDataElement = function(e4, i3, n3) {
- t2.prototype.validateDataElement.call(this, e4), e4.itemIndex = this._axisItemCount, this._axisItemCount++;
- var r3 = this.renderer;
- tt(n3) || (n3 = this.categoryToIndex(e4.category));
- var s2 = this.categoryToIndex(e4.endCategory);
- tt(s2) || (s2 = n3);
- var a2, o3, l2, h2 = this.indexToPosition(n3, e4.locations.category), p2 = this.indexToPosition(s2, e4.locations.endCategory);
- e4.position = h2, e4.isRange && (a2 = s2, o3 = this.indexToPosition(n3, e4.locations.category), l2 = this.indexToPosition(a2, e4.locations.endCategory)), e4.point = r3.positionToPoint(h2);
- var u2 = e4.tick;
- u2 && !u2.disabled && r3.updateTickElement(u2, h2, p2);
- var d2 = e4.grid;
- d2 && !d2.disabled && r3.updateGridElement(d2, h2, p2);
- var c2 = e4.label;
- c2 && !c2.disabled && (e4.isRange && c2.text != null || (e4.text = e4.text), r3.updateLabelElement(c2, h2, p2), (r3 instanceof yh && e4.label.measuredWidth > this.ghostLabel.measuredWidth || r3 instanceof wh && e4.label.measuredHeight > this.ghostLabel.measuredHeight) && (e4.label.html ? this.ghostLabel.html = e4.label.currentText : this.ghostLabel.text = e4.label.currentText));
- var f2 = e4.axisFill;
- f2 && !f2.disabled && (e4.isRange || (a2 = n3 + this._frequency, o3 = this.indexToPosition(n3, f2.location), l2 = this.indexToPosition(a2, f2.location)), r3.updateFillElement(f2, o3, l2), e4.isRange || this.fillRule(e4, i3)), e4.bullet && r3.updateBullet(e4.bullet, h2, p2);
- var g2 = e4.mask;
- g2 && r3.updateFillElement(g2, o3, l2);
- }, e3.prototype.disposeData = function() {
- this.dataItemsByCategory.clear(), t2.prototype.disposeData.call(this);
- }, e3.prototype.processDataItem = function(e4, i3) {
- e4 && (t2.prototype.processDataItem.call(this, e4, i3), Z(e4.category) && this.dataItemsByCategory.setKey(e4.category, e4));
- }, e3.prototype.getDataItem = function(t3) {
- var e4 = t3[this.dataFields.category];
- if (Z(e4))
- return this.dataItemsByCategory.getKey(e4) || this.dataItems.create();
- }, e3.prototype.indexToPosition = function(t3, e4) {
- tt(e4) || (e4 = 0.5);
- var i3 = this.startIndex, n3 = this.endIndex, r3 = this.adjustDifference(i3, n3), s2 = this.startLocation;
- r3 -= s2, r3 -= 1 - this.endLocation, this._axisBreaks && Qe(this._axisBreaks.iterator(), function(e5) {
- var r4 = e5.adjustedStartValue, s3 = e5.adjustedEndValue;
- if (t3 < i3 || !tt(r4) || !tt(s3))
- return false;
- if (vt({ start: r4, end: s3 }, { start: i3, end: n3 })) {
- r4 = Math.max(i3, r4), s3 = Math.min(n3, s3);
- var a3 = e5.breakSize;
- t3 > s3 ? i3 += (s3 - r4) * (1 - a3) : t3 < r4 || (t3 = r4 + (t3 - r4) * a3);
- }
- return true;
- });
- var a2 = 0, o3 = this.dataItems.getIndex(t3);
- return o3 && (a2 = o3.deltaPosition), lt(a2 + (t3 + e4 - s2 - i3) / r3, 5);
- }, e3.prototype.categoryToPosition = function(t3, e4) {
- var i3 = this.categoryToIndex(t3);
- return this.indexToPosition(i3, e4);
- }, e3.prototype.categoryToPoint = function(t3, e4) {
- var i3 = this.categoryToPosition(t3, e4), n3 = this.renderer.positionToPoint(i3), r3 = this.renderer.positionToAngle(i3);
- return { x: n3.x, y: n3.y, angle: r3 };
- }, e3.prototype.anyToPoint = function(t3, e4) {
- return this.categoryToPoint(t3, e4);
- }, e3.prototype.anyToPosition = function(t3, e4) {
- return this.categoryToPosition(t3, e4);
- }, e3.prototype.categoryToIndex = function(t3) {
- if (Z(t3)) {
- var e4 = this.dataItemsByCategory.getKey(t3);
- if (e4)
- return e4.index;
- }
- }, e3.prototype.zoomToCategories = function(t3, e4) {
- this.zoomToIndexes(this.categoryToIndex(t3), this.categoryToIndex(e4) + 1);
- }, e3.prototype.getAnyRangePath = function(t3, e4, i3, n3) {
- var r3 = this.categoryToPosition(t3, i3), s2 = this.categoryToPosition(e4, n3);
- return this.getPositionRangePath(r3, s2);
- }, e3.prototype.roundPosition = function(t3, e4) {
- var i3 = this.positionToIndex(t3);
- return this.indexToPosition(i3, e4);
- }, e3.prototype.getFirstSeriesDataItem = function(t3, e4) {
- for (var i3 = 0; i3 < t3.dataItems.length; i3++) {
- var n3 = t3.dataItems.getIndex(i3);
- if (t3.xAxis == this && n3.categoryX == e4)
- return n3;
- if (t3.yAxis == this && n3.categoryY == e4)
- return n3;
- }
- }, e3.prototype.getLastSeriesDataItem = function(t3, e4) {
- for (var i3 = t3.dataItems.length - 1; i3 >= 0; i3--) {
- var n3 = t3.dataItems.getIndex(i3);
- if (t3.xAxis == this && n3.categoryX == e4)
- return n3;
- if (t3.yAxis == this && n3.categoryY == e4)
- return n3;
- }
- }, e3.prototype.getSeriesDataItemByCategory = function(t3, e4) {
- var i3, n3 = this;
- return e4.dataItems.each(function(r3) {
- e4.xAxis == n3 ? r3.categoryX == t3 && (i3 = r3) : e4.yAxis == n3 && r3.categoryY == t3 && (i3 = r3);
- }), i3;
- }, e3.prototype.getSeriesDataItem = function(t3, e4, i3) {
- var n3 = this;
- if (tt(e4)) {
- var r3 = this.positionToIndex(e4);
- r3 >= this.dataItems.length && r3--;
- var s2 = this.dataItems.getIndex(r3);
- if (s2) {
- var a2, o3 = s2.category, l2 = t3.dataItems.getIndex(r3);
- if (l2) {
- if (t3.xAxis == this && l2.categoryX == o3)
- return l2;
- if (t3.yAxis == this && l2.categoryY == o3)
- return l2;
- }
- return t3.dataItems.each(function(e5) {
- t3.xAxis == n3 && e5.categoryX == o3 && (a2 || (a2 = e5), Math.abs(r3 - a2.index) > Math.abs(r3 - e5.index) && (a2 = e5)), t3.yAxis == n3 && e5.categoryY == o3 && (a2 || (a2 = e5), Math.abs(r3 - a2.index) > Math.abs(r3 - e5.index) && (a2 = e5));
- }), a2;
- }
- }
- }, e3.prototype.getX = function(t3, e4, i3, n3, r3) {
- var s2 = this.getPositionX(t3, e4, i3, n3, r3);
- return M(s2) ? this.basePoint.x : this.renderer.positionToPoint(s2).x;
- }, e3.prototype.getPositionX = function(t3, e4, i3, n3, r3) {
- var s2;
- return Z(e4) && (s2 = this.categoryToPosition(t3.categories[e4], i3)), r3 && (s2 = ut(s2, r3.start, r3.end)), s2;
- }, e3.prototype.getY = function(t3, e4, i3, n3, r3) {
- var s2 = this.getPositionY(t3, e4, i3, n3, r3);
- return M(s2) ? this.basePoint.y : this.renderer.positionToPoint(s2).y;
- }, e3.prototype.getPositionY = function(t3, e4, i3, n3, r3) {
- var s2;
- return Z(e4) && (s2 = this.categoryToPosition(t3.categories[e4], i3)), r3 && (s2 = ut(s2, r3.start, r3.end)), s2;
- }, e3.prototype.getAngle = function(t3, e4, i3, n3, r3) {
- var s2 = this.categoryToPosition(t3.categories[e4], i3);
- return r3 && (s2 = ut(s2, r3.start, r3.end)), this.positionToAngle(s2);
- }, e3.prototype.getCellStartPosition = function(t3) {
- return this.roundPosition(t3, 0);
- }, e3.prototype.getCellEndPosition = function(t3) {
- return this.roundPosition(t3, 1);
- }, e3.prototype.getTooltipText = function(t3) {
- var e4 = this.dataItems.getIndex(this.positionToIndex(t3));
- if (e4)
- return this.tooltipDataItem = e4, this.tooltip.dataItem = e4, this.tooltipText ? this.tooltipText : this._adapterO ? this._adapterO.apply("getTooltipText", e4.category) : e4.category;
- }, e3.prototype.positionToIndex = function(t3) {
- (t3 = lt(t3, 10)) < 0 && (t3 = 0), t3 > 1 && (t3 = 1);
- var e4 = this.startIndex, i3 = this.endIndex, n3 = i3 - e4 - this.startLocation - (1 - this.endLocation);
- t3 += 1 / n3 * this.startLocation;
- var r3 = null;
- return this._axisBreaks && Qe(this._axisBreaks.iterator(), function(s2) {
- var a2 = s2.startPosition, o3 = s2.endPosition, l2 = s2.adjustedStartValue, h2 = s2.adjustedEndValue;
- l2 = gt(l2, e4), h2 = yt(h2, i3);
- var p2 = s2.breakSize;
- if (n3 -= (h2 - l2) * (1 - p2), t3 > o3)
- e4 += (h2 - l2) * (1 - p2);
- else if (!(t3 < a2)) {
- var u2 = (t3 - a2) / (o3 - a2);
- return r3 = l2 + Math.round(u2 * (h2 - l2)), false;
- }
- return true;
- }), tt(r3) || (r3 = Math.floor(t3 * n3 + e4)), r3 >= this.dataItems.length && (r3 = this.dataItems.length - 1), r3;
- }, e3.prototype.positionToCategory = function(t3) {
- return this.getPositionLabel(t3);
- }, e3.prototype.getPositionLabel = function(t3) {
- var e4 = this.dataItems.getIndex(this.positionToIndex(t3));
- if (e4)
- return e4.category;
- }, Object.defineProperty(e3.prototype, "basePoint", { get: function() {
- return this.renderer.positionToPoint(1);
- }, enumerable: true, configurable: true }), e3.prototype.initRenderer = function() {
- t2.prototype.initRenderer.call(this), this.renderer.baseGrid.disabled = true;
- }, Object.defineProperty(e3.prototype, "frequency", { get: function() {
- return this._frequency;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "sortBySeries", { get: function() {
- return this.getPropertyValue("sortBySeries");
- }, set: function(t3) {
- this.setPropertyValue("sortBySeries", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.processConfig = function(e4) {
- e4 && Z(e4.sortBySeries) && Q(e4.sortBySeries) && (this.map.hasKey(e4.sortBySeries) ? e4.sortBySeries = this.map.getKey(e4.sortBySeries) : (this.addDelayedMap("sortBySeries", e4.sortBySeries), delete e4.sortBySeries)), t2.prototype.processConfig.call(this, e4);
- }, e3;
- }(oh);
- Ii.registeredClasses.CategoryAxis = Sh, Ii.registeredClasses.CategoryAxisDataItem = Oh;
- var Ih = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "XYSeriesDataItem", e4.values.customValue = {}, e4.values.valueX = { stack: 0 }, e4.values.valueY = { stack: 0 }, e4.values.openValueX = {}, e4.values.openValueY = {}, e4.values.dateX = {}, e4.values.dateY = {}, e4.values.openDateX = {}, e4.values.openDateY = {}, e4.setLocation("dateX", 0.5, 0), e4.setLocation("dateY", 0.5, 0), e4.setLocation("categoryX", 0.5, 0), e4.setLocation("categoryY", 0.5, 0), e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "valueX", { get: function() {
- return this.values.valueX.value;
- }, set: function(t3) {
- this.setValue("valueX", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "customValue", { get: function() {
- return this.values.customValue.value;
- }, set: function(t3) {
- this.setValue("customValue", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "valueY", { get: function() {
- return this.values.valueY.value;
- }, set: function(t3) {
- this.setValue("valueY", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dateX", { get: function() {
- return this.getDate("dateX");
- }, set: function(t3) {
- this.setDate("dateX", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dateY", { get: function() {
- return this.getDate("dateY");
- }, set: function(t3) {
- this.setDate("dateY", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "categoryX", { get: function() {
- return this.categories.categoryX;
- }, set: function(t3) {
- this.setCategory("categoryX", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "categoryY", { get: function() {
- return this.categories.categoryY;
- }, set: function(t3) {
- this.setCategory("categoryY", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "openValueX", { get: function() {
- return this.values.openValueX.value;
- }, set: function(t3) {
- this.setValue("openValueX", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "openValueY", { get: function() {
- return this.values.openValueY.value;
- }, set: function(t3) {
- this.setValue("openValueY", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "openDateX", { get: function() {
- return this.getDate("openDateX");
- }, set: function(t3) {
- this.setDate("openDateX", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "openDateY", { get: function() {
- return this.getDate("openDateY");
- }, set: function(t3) {
- this.setDate("openDateY", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "openCategoryX", { get: function() {
- return this.categories.openCategoryX;
- }, set: function(t3) {
- this.setCategory("openCategoryX", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "openCategoryY", { get: function() {
- return this.categories.openCategoryY;
- }, set: function(t3) {
- this.setCategory("openCategoryY", t3);
- }, enumerable: true, configurable: true }), e3.prototype.getMin = function(t3, e4, i3) {
- var n3, r3 = this;
- return tt(i3) || (i3 = 0), Ut(t3, function(t4) {
- var s2;
- s2 = e4 ? r3.getWorkingValue(t4) : r3.getValue(t4), ((s2 += i3) < n3 || !tt(n3)) && (n3 = s2);
- }), n3;
- }, e3.prototype.getMax = function(t3, e4, i3) {
- var n3, r3 = this;
- return tt(i3) || (i3 = 0), Ut(t3, function(t4) {
- var s2;
- s2 = e4 ? r3.getWorkingValue(t4) : r3.getValue(t4), ((s2 += i3) > n3 || !tt(n3)) && (n3 = s2);
- }), n3;
- }, e3;
- }(th), Dh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.groupFields = {}, e4._xAxis = new ve(), e4._yAxis = new ve(), e4._xValueFields = [], e4._yValueFields = [], e4._baseInterval = {}, e4.dataGrouped = false, e4.usesShowFields = false, e4._dataSetChanged = false, e4._maxxX = 1e5, e4._maxxY = 1e5, e4._propertiesChanged = false, e4.outOfRange = false, e4.className = "XYSeries", e4.isMeasured = false, e4.groupFields.valueX = "close", e4.groupFields.valueY = "close", e4.groupFields.customValue = "close", e4.groupFields.openValueX = "open", e4.groupFields.openValueY = "open", e4.cursorTooltipEnabled = true, e4.cursorHoverEnabled = true, e4.excludeFromTotal = false, e4.mainContainer.mask = new Za(), e4.mainContainer.mask.setElement(e4.paper.add("path")), e4.stacked = false, e4.snapTooltip = false, e4._showBullets = false, e4.tooltip.pointerOrientation = "horizontal", e4.properties.stackToNegative = true, e4.hideTooltipWhileZooming = true, e4.setPropertyValue("maskBullets", true), e4.tooltip.events.on("hidden", function() {
- e4.returnBulletDefaultState();
- }, void 0, false), e4._disposers.push(e4._xAxis), e4._disposers.push(e4._yAxis), e4.observe(Ka, function() {
- e4.inited && (e4._propertiesChanged = true, e4.legendDataItem && (e4.legendDataItem.childrenCreated = false), e4.chart && e4.chart.legend && e4.chart.legend.invalidateDataItems(), e4.invalidate());
- }, void 0, false), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("X/Y Series"));
- }, e3.prototype.createDataItem = function() {
- return new Ih();
- }, e3.prototype.resetExtremes = function() {
- this._tmin.clear(), this._tmax.clear(), this._smin.clear(), this._smax.clear();
- }, e3.prototype.dataChangeUpdate = function() {
- this.dataGrouped = false, this._baseInterval = {}, this._currentDataSetId = "", this.resetExtremes(), this.xAxis && this.xAxis.seriesDataChangeUpdate(this), this.yAxis && this.yAxis.seriesDataChangeUpdate(this);
- }, e3.prototype.validateData = function() {
- this._baseInterval = {};
- var e4 = this.dataFields;
- if (e4.valueYShow || e4.openValueXShow || e4.openValueXShow || e4.openValueYShow ? this.usesShowFields = true : this.usesShowFields = false, this.defineFields(), this.data.length > 0 && this.dataChangeUpdate(), t2.prototype.validateData.call(this), this.updateItemReaderText(), this.chart && (!Z(this.dataFields[this._xField]) || !Z(this.dataFields[this._yField])))
- throw Error('Data fields for series "' + (this.name ? this.name : this.uid) + '" are not properly defined.');
- this.inited && this.isHidden && this.hide(0), this.dataGrouped = false;
- }, e3.prototype.processDataItem = function(e4, i3) {
- try {
- t2.prototype.processDataItem.call(this, e4, i3), this.xAxis.processSeriesDataItem(e4, "X"), this.yAxis.processSeriesDataItem(e4, "Y"), this.setInitialWorkingValues(e4);
- } catch (t3) {
- this._chart && this._chart.raiseCriticalError(t3);
- }
- }, e3.prototype.updateDataItem = function(e4) {
- t2.prototype.updateDataItem.call(this, e4), this.xAxis.processSeriesDataItem(e4, "X"), this.yAxis.processSeriesDataItem(e4, "Y");
- }, e3.prototype.setInitialWorkingValues = function(t3) {
- }, e3.prototype.disposeData = function() {
- t2.prototype.disposeData.call(this);
- var e4 = this.xAxis, i3 = this.yAxis;
- if (e4) {
- var n3 = this.dataItemsByAxis.getKey(e4.uid);
- n3 && n3.clear(), e4 instanceof Sh && this.clearCatAxis(e4);
- }
- if (i3) {
- var r3 = this.dataItemsByAxis.getKey(i3.uid);
- r3 && r3.clear(), i3 instanceof Sh && this.clearCatAxis(i3);
- }
- }, e3.prototype.clearCatAxis = function(t3) {
- var e4 = this.uid;
- t3.dataItems.each(function(t4) {
- t4.seriesDataItems[e4] && (t4.seriesDataItems[e4] = []);
- });
- }, e3.prototype.defineFields = function() {
- var t3 = this.xAxis, e4 = this.yAxis;
- if (t3 && e4) {
- var i3 = t3.axisFieldName, n3 = i3 + "X", r3 = "open" + En(i3) + "X", s2 = e4.axisFieldName, a2 = s2 + "Y", o3 = "open" + En(s2) + "Y";
- this._xField = n3, this._yField = a2, this.dataFields[r3] && (this._xOpenField = r3), this.dataFields[o3] && (this._yOpenField = o3), this.dataFields[o3] || this.baseAxis != e4 || (this._yOpenField = a2), this.dataFields[r3] || this.baseAxis != t3 || (this._xOpenField = n3), this.stacked && this.baseAxis == t3 && (this._xOpenField = n3), this.stacked && this.baseAxis == e4 && (this._yOpenField = a2), t3 instanceof Sh && e4 instanceof Sh && (this._yOpenField || (this._yOpenField = a2)), this._xValueFields = [], this._yValueFields = [], this.addValueField(t3, this._xValueFields, this._xField), this.addValueField(t3, this._xValueFields, this._xOpenField), this.addValueField(e4, this._yValueFields, this._yField), this.addValueField(e4, this._yValueFields, this._yOpenField);
- }
- }, e3.prototype.addValueField = function(t3, e4, i3) {
- t3 instanceof bh && Z(this.dataFields[i3]) && e4.indexOf(i3) == -1 && e4.push(i3);
- }, e3.prototype.setCategoryAxisField = function(t3, e4) {
- Z(this.dataFields[t3]) || (this.dataFields[t3] = e4.dataFields.category);
- }, e3.prototype.setDateAxisField = function(t3, e4) {
- Z(this.dataFields[t3]) || (this.dataFields[t3] = e4.dataFields.date);
- }, e3.prototype.afterDraw = function() {
- t2.prototype.afterDraw.call(this), this.createMask();
- }, e3.prototype.createMask = function() {
- if (this.mainContainer.mask) {
- var t3 = this.getMaskPath();
- ti(this.axisRanges.iterator(), function(e4) {
- e4.axisFill.fillPath && (e4.axisFill.validate(), t3 += e4.axisFill.fillPath);
- }), this.mainContainer.mask.path = t3;
- }
- }, e3.prototype.getMaskPath = function() {
- return this.xAxis && this.yAxis ? Vo({ x: 0, y: 0, width: this.xAxis.axisLength, height: this.yAxis.axisLength }) : "";
- }, e3.prototype.getAxisField = function(t3) {
- return t3 == this.xAxis ? this.xField : t3 == this.yAxis ? this.yField : void 0;
- }, e3.prototype.validateDataItems = function() {
- var e4 = this.chart;
- e4 && (this._maxxX = gt(1e5, 2 * e4.plotContainer.maxWidth), this._maxxY = gt(1e5, 2 * e4.plotContainer.maxHeight));
- var i3 = this.xAxis, n3 = this.yAxis;
- i3 && n3 && (i3.updateAxisBySeries(), n3.updateAxisBySeries()), t2.prototype.validateDataItems.call(this), i3 && n3 && (i3.postProcessSeriesDataItems(this), n3.postProcessSeriesDataItems(this));
- }, e3.prototype.validateDataRange = function() {
- var e4 = this.xAxis, i3 = this.yAxis;
- e4 && i3 && (e4.dataRangeInvalid && e4.validateDataRange(), i3.dataRangeInvalid && i3.validateDataRange()), t2.prototype.validateDataRange.call(this);
- }, e3.prototype.validate = function() {
- var e4 = this.xAxis, i3 = this.yAxis;
- if (e4 && i3) {
- e4.invalid && e4.validate(), i3.invalid && i3.validate(), this.y = i3.pixelY, this.x = e4.pixelX, this._showBullets = true;
- var n3 = this.minBulletDistance;
- tt(n3) && this.baseAxis.axisLength / (this.endIndex - this.startIndex) < n3 && (this._showBullets = false);
- }
- if (this.updateTooltip(), !(e4 instanceof Ph && e4.groupData && !this.dataGrouped || i3 instanceof Ph && i3.groupData && !this.dataGrouped)) {
- t2.prototype.validate.call(this);
- var r3 = this.chart, s2 = this.maskBullets;
- r3 && s2 && r3.className == "XYChart" && (r3.leftAxesContainer.layout != "vertical" && r3.rightAxesContainer.layout != "vertical" || (this.yAxis ? this.bulletsContainer.mask = this.yAxis.renderer.gridContainer : this.bulletsContainer.mask = void 0), r3.topAxesContainer.layout != "horizontal" && r3.bottomAxesContainer.layout != "horizontal" || (this.xAxis ? this.bulletsContainer.mask = this.xAxis.renderer.gridContainer : this.bulletsContainer.mask = void 0));
- }
- }, Object.defineProperty(e3.prototype, "xAxis", { get: function() {
- if (this.chart) {
- if (!this._xAxis.get()) {
- var t3 = this.chart.xAxes.getIndex(0);
- if (!t3)
- throw Error("There are no X axes on chart.");
- this.xAxis = t3;
- }
- return this._xAxis.get();
- }
- }, set: function(t3) {
- this.setXAxis(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setXAxis = function(t3) {
- var e4 = this._xAxis.get();
- e4 != t3 && (e4 && (this.dataItemsByAxis.removeKey(e4.uid), this._xAxis.dispose(), e4.series.removeValue(this)), this._xAxis.set(t3, t3.registerSeries(this)), this.dataItemsByAxis.setKey(t3.uid, new Pi()), this.invalidateData());
- }, Object.defineProperty(e3.prototype, "yAxis", { get: function() {
- if (this.chart) {
- if (!this._yAxis.get()) {
- var t3 = this.chart.yAxes.getIndex(0);
- if (!t3)
- throw Error("There are no Y axes on chart.");
- this.yAxis = t3;
- }
- return this._yAxis.get();
- }
- }, set: function(t3) {
- this.setYAxis(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setYAxis = function(t3) {
- var e4 = this._yAxis.get();
- e4 != t3 && (e4 && (this.dataItemsByAxis.removeKey(e4.uid), this._yAxis.dispose(), e4.series.removeValue(this)), this._yAxis.set(t3, t3.registerSeries(this)), t3.chart instanceof Ah && t3.chart.handleYAxisSet(this), this.dataItemsByAxis.setKey(t3.uid, new Pi()), this.invalidateData());
- }, Object.defineProperty(e3.prototype, "baseAxis", { get: function() {
- var t3 = this.xAxis, e4 = this.yAxis;
- return !this._baseAxis && t3 && e4 && (e4 instanceof Ph && (this._baseAxis = e4), t3 instanceof Ph && (this._baseAxis = t3), e4 instanceof Sh && (this._baseAxis = e4), t3 instanceof Sh && (this._baseAxis = t3), this._baseAxis || (this._baseAxis = t3)), this._baseAxis;
- }, set: function(t3) {
- this._baseAxis != t3 && (this._baseAxis = t3, this.invalidate());
- }, enumerable: true, configurable: true }), e3.prototype.addData = function(e4, i3, n3) {
- t2.prototype.addData.call(this, e4, i3, n3), this.scrollbarSeries && (this.scrollbarSeries.addData(e4, i3, true), this.scrollbarSeries._parseDataFrom = this._parseDataFrom);
- }, e3.prototype.setData = function(e4) {
- t2.prototype.setData.call(this, e4), this.scrollbarSeries && this.scrollbarSeries.setData(e4);
- }, e3.prototype.setDataSet = function(e4) {
- var i3 = t2.prototype.setDataSet.call(this, e4);
- if (i3) {
- this._dataSetChanged = true;
- var n3 = this.dataItems;
- if (this.resetExtremes(), n3 && n3.length > 0) {
- var r3 = this.xAxis, s2 = this.yAxis;
- this._prevStartIndex = void 0, this._prevEndIndex = void 0, this._startIndex = void 0, this._endIndex = void 0, this.appeared || this.processValues(false), r3 instanceof Ph && r3 == this.baseAxis && (this._tmin.setKey(r3.uid, n3.getIndex(0).dateX.getTime()), this._tmax.setKey(r3.uid, n3.getIndex(n3.length - 1).dateX.getTime()), this.dispatch("extremeschanged")), s2 instanceof Ph && s2 == this.baseAxis && (this._tmin.setKey(s2.uid, n3.getIndex(0).dateY.getTime()), this._tmax.setKey(s2.uid, n3.getIndex(n3.length - 1).dateY.getTime()), this.dispatch("extremeschanged"));
- }
- }
- return i3;
- }, e3.prototype.processValues = function(e4) {
- t2.prototype.processValues.call(this, e4);
- var i3 = this.xAxis, n3 = this.yAxis;
- if (i3 && n3) {
- var r3 = this.dataItems, s2 = 1 / 0, a2 = -1 / 0, o3 = 1 / 0, l2 = -1 / 0, h2 = this.startIndex, p2 = this.endIndex, u2 = h2, d2 = p2;
- e4 || (h2 = 0, p2 = this.dataItems.length);
- for (var c2 = h2; c2 < p2; c2++) {
- var f2 = r3.getIndex(c2);
- this.getStackValue(f2, e4);
- var g2 = f2.getValue("valueX", "stack"), y2 = f2.getValue("valueY", "stack");
- s2 = yt(f2.getMin(this._xValueFields, e4, g2), s2), o3 = yt(f2.getMin(this._yValueFields, e4, y2), o3), a2 = gt(f2.getMax(this._xValueFields, e4, g2), a2), l2 = gt(f2.getMax(this._yValueFields, e4, y2), l2), this.stacked && (this.baseAxis == i3 && (y2 < o3 && (o3 = y2), y2 > l2 && (l2 = y2)), this.baseAxis == n3 && (g2 < s2 && (s2 = g2), g2 > a2 && (a2 = g2)));
- }
- i3.processSeriesDataItems(), n3.processSeriesDataItems();
- var m2 = i3.uid, v2 = n3.uid;
- if (this.xAxis instanceof bh && (s2 == 1 / 0 || a2 == -1 / 0))
- return this._smin.setKey(m2, void 0), this._smax.setKey(m2, void 0), void this.dispatchImmediately("selectionextremeschanged");
- if (this.yAxis instanceof bh && (o3 == 1 / 0 || l2 == -1 / 0))
- return this._smin.setKey(v2, void 0), this._smax.setKey(v2, void 0), void this.dispatchImmediately("selectionextremeschanged");
- if (!e4 && (this._tmin.getKey(m2) != s2 || this._tmax.getKey(m2) != a2 || this._tmin.getKey(v2) != o3 || this._tmax.getKey(v2) != l2)) {
- this._tmin.setKey(m2, s2), this._tmax.setKey(m2, a2), this._tmin.setKey(v2, o3), this._tmax.setKey(v2, l2);
- var b2 = this.stackedSeries;
- b2 && (b2.isDisposed() ? this.stackedSeries = void 0 : b2.processValues(false)), this.dispatchImmediately("extremeschanged");
- }
- if (h2 != u2 || p2 != d2)
- for (s2 = 1 / 0, a2 = -1 / 0, o3 = 1 / 0, l2 = -1 / 0, c2 = u2; c2 < d2; c2++)
- f2 = r3.getIndex(c2), this.getStackValue(f2, e4), g2 = f2.getValue("valueX", "stack"), y2 = f2.getValue("valueY", "stack"), s2 = yt(f2.getMin(this._xValueFields, e4, g2), s2), o3 = yt(f2.getMin(this._yValueFields, e4, y2), o3), a2 = gt(f2.getMax(this._xValueFields, e4, g2), a2), l2 = gt(f2.getMax(this._yValueFields, e4, y2), l2), this.stacked && (this.baseAxis == i3 && (y2 < o3 && (o3 = y2), y2 > l2 && (l2 = y2)), this.baseAxis == n3 && (g2 < s2 && (s2 = g2), g2 > a2 && (a2 = g2)));
- if (this.xAxis instanceof bh && (s2 == 1 / 0 || a2 == -1 / 0))
- return this._smin.setKey(m2, void 0), this._smax.setKey(m2, void 0), void this.dispatchImmediately("selectionextremeschanged");
- if (this.yAxis instanceof bh && (o3 == 1 / 0 || l2 == -1 / 0))
- return this._smin.setKey(v2, void 0), this._smax.setKey(v2, void 0), void this.dispatchImmediately("selectionextremeschanged");
- if ((this._smin.getKey(m2) != s2 || this._smax.getKey(m2) != a2 || this._smin.getKey(v2) != o3 || this._smax.getKey(v2) != l2) && (this._smin.setKey(m2, s2), this._smax.setKey(m2, a2), this._smin.setKey(v2, o3), this._smax.setKey(v2, l2), this.appeared || this.start != 0 || this.end != 1 || this.dataItems != this.mainDataSet)) {
- var x2, _2, P2 = false;
- n3 instanceof bh && !(n3 instanceof Ph) && ((!tt(x2 = this._tmin.getKey(v2)) || (this.usesShowFields || this._dataSetChanged || i3 instanceof Ph && i3.groupData && this.isShowing) && o3 < x2 || this.stackedSeries && !this.isHidden) && (this._tmin.setKey(v2, o3), P2 = true), (!tt(_2 = this._tmax.getKey(v2)) || (this.usesShowFields || this._dataSetChanged || i3 instanceof Ph && i3.groupData && this.isShowing) && l2 > _2 || this.stackedSeries && !this.isHidden) && (this._tmax.setKey(v2, l2), P2 = true)), i3 instanceof bh && !(i3 instanceof Ph) && ((!tt(x2 = this._tmin.getKey(m2)) || (this.usesShowFields || this._dataSetChanged || n3 instanceof Ph && n3.groupData && this.isShowing) && s2 < x2 || this.stackedSeries && !this.isHidden) && (this._tmin.setKey(m2, s2), P2 = true), (!tt(_2 = this._tmax.getKey(m2)) || (this.usesShowFields || this._dataSetChanged || n3 instanceof Ph && n3.groupData && this.isShowing) && a2 > _2 || this.stackedSeries && !this.isHidden) && (this._tmax.setKey(m2, a2), P2 = true)), P2 && this.dispatchImmediately("extremeschanged"), this.start == 0 && this.end == 1 && (this._dataSetChanged = false), this.dispatchImmediately("selectionextremeschanged");
- }
- !e4 && this.stacked && this.processValues(true);
- }
- }, e3.prototype.hideTooltip = function(e4) {
- t2.prototype.hideTooltip.call(this, e4), this.returnBulletDefaultState(), this._prevTooltipDataItem = void 0;
- }, e3.prototype.showTooltipAtPosition = function(t3, e4) {
- var i3;
- if (this.visible && !this.isHiding && !this.isShowing) {
- var n3 = this._xAxis.get(), r3 = this._yAxis.get();
- n3 == this.baseAxis && (i3 = n3.getSeriesDataItem(this, n3.toAxisPosition(t3), this.snapTooltip)), r3 == this.baseAxis && (i3 = r3.getSeriesDataItem(this, r3.toAxisPosition(e4), this.snapTooltip));
- var s2 = this.showTooltipAtDataItem(i3);
- if (s2)
- return s2;
- if (!this.tooltipText && !this.tooltipHTML)
- return;
- }
- this.hideTooltip();
- }, e3.prototype.getAdjustedXLocation = function(t3, e4, i3) {
- return t3.locations[e4];
- }, e3.prototype.getAdjustedYLocation = function(t3, e4, i3) {
- return t3.locations[e4];
- }, e3.prototype.showTooltipAtDataItem = function(t3) {
- var e4, i3, n3 = this.chart.cursor;
- if (n3 && n3.hideSeriesTooltipsOnSelection && n3.selection.visible && n3.downPoint)
- this.hideTooltip();
- else if (this.returnBulletDefaultState(t3), t3 && t3.visible) {
- if (this.updateLegendValue(t3), this.cursorTooltipEnabled) {
- this.tooltipDataItem = t3;
- var r3 = this.tooltipXField, s2 = this.tooltipYField;
- if (Z(t3[r3]) && Z(t3[s2])) {
- var a2 = this.getPoint(t3, r3, s2, this.getAdjustedXLocation(t3, r3), this.getAdjustedYLocation(t3, s2));
- if (a2 && (this.chart.className != "XYChart" || !(a2.y < -1 || a2.y > this.yAxis.pixelHeight + 1 || a2.x < -1 || a2.x > this.xAxis.pixelWidth + 1))) {
- if (this.tooltipX = a2.x, this.tooltipY = a2.y, this._prevTooltipDataItem != t3 && (this.dispatchImmediately("tooltipshownat", { type: "tooltipshownat", target: this, dataItem: t3 }), this._prevTooltipDataItem = t3), this.cursorHoverEnabled)
- try {
- for (var o3 = D(t3.sprites), l2 = o3.next(); !l2.done; l2 = o3.next()) {
- var h2 = l2.value;
- !h2.parent.visible || h2.isHidden || h2.__disabled || h2.disabled || h2.isHiding || (h2.interactions.isRealHover || (h2.dispatchImmediately("over"), h2.interactions.isRealHover = true), h2.isHover = true);
- }
- } catch (t4) {
- e4 = { error: t4 };
- } finally {
- try {
- l2 && !l2.done && (i3 = o3.return) && i3.call(o3);
- } finally {
- if (e4)
- throw e4.error;
- }
- }
- return this.showTooltip() ? ur({ x: a2.x, y: a2.y }, this) : void 0;
- }
- }
- }
- } else
- this.updateLegendValue(t3, true);
- }, e3.prototype.returnBulletDefaultState = function(t3) {
- var e4, i3;
- if (this._prevTooltipDataItem && this._prevTooltipDataItem != t3)
- try {
- for (var n3 = D(this._prevTooltipDataItem.sprites), r3 = n3.next(); !r3.done; r3 = n3.next()) {
- var s2 = r3.value;
- if (s2.isDisposed())
- this._prevTooltipDataItem = void 0;
- else {
- var a2 = s2.interactions.isRealHover;
- s2.isHover = false, a2 && s2.dispatchImmediately("out");
- }
- }
- } catch (t4) {
- e4 = { error: t4 };
- } finally {
- try {
- r3 && !r3.done && (i3 = n3.return) && i3.call(n3);
- } finally {
- if (e4)
- throw e4.error;
- }
- }
- }, e3.prototype.shouldCreateBullet = function(t3, e4) {
- var i3 = e4.xField;
- Z(i3) || (i3 = this.xField);
- var n3 = e4.yField;
- if (Z(n3) || (n3 = this.yField), this.xAxis instanceof bh && !t3.hasValue([i3]) || this.yAxis instanceof bh && !t3.hasValue([n3]))
- return false;
- if (e4.disabled) {
- var r3 = e4.propertyFields.disabled, s2 = t3.dataContext;
- return !(!s2 || s2[r3] !== false);
- }
- return true;
- }, e3.prototype.updateTooltip = function() {
- this.hideTooltipWhileZooming || !this.tooltip || this.tooltip.isHidden || this.isHiding || this.isHidden || !this.tooltipDataItem || this.showTooltipAtDataItem(this.tooltipDataItem);
- }, e3.prototype.positionBullet = function(e4) {
- t2.prototype.positionBullet.call(this, e4);
- var i3 = e4.dataItem, n3 = e4.xField;
- Z(n3) || (n3 = this.xField);
- var r3 = e4.yField;
- Z(r3) || (r3 = this.yField);
- var s2 = this.xAxis, a2 = this.yAxis;
- if (s2 instanceof bh && !i3.hasValue([n3]) || a2 instanceof bh && !i3.hasValue([r3]))
- e4.visible = false;
- else {
- var o3 = this.getBulletLocationX(e4, n3), l2 = this.getBulletLocationY(e4, r3);
- if (this.getPoint(i3, n3, r3, o3, l2)) {
- var h2 = this.xOpenField, p2 = this.yOpenField, u2 = void 0, d2 = void 0;
- if (s2 instanceof Ph) {
- tt(o3) || (o3 = 0);
- var c2 = void 0, f2 = i3.getWorkingValue(n3);
- if (h2 ? c2 = i3.getWorkingValue(h2) : s2 == this.baseAxis && (c2 = s2.baseValue), tt(c2) || (c2 = f2), (c2 += _2 = i3.getValue("valueX", "stack")) == (f2 += _2)) {
- var g2 = s2.baseInterval, y2 = s2.dateFormatter;
- c2 = aa(new Date(c2), g2.timeUnit, g2.count, y2.firstDayOfWeek, y2.utc, void 0, y2.timezoneMinutes, y2.timezone).getTime(), f2 = sa(new Date(c2), g2.timeUnit, g2.count, y2.utc).getTime();
- }
- var m2 = void 0;
- m2 = s2 == this.baseAxis ? c2 + (f2 - c2) * o3 : c2 + (f2 - c2) * (1 - o3), u2 = s2.valueToPosition(m2);
- } else if (s2 instanceof bh)
- tt(o3) || (o3 = 0), c2 = void 0, f2 = i3.getWorkingValue(n3), c2 = h2 ? i3.getWorkingValue(h2) : s2.baseValue, m2 = (c2 += _2 = i3.getValue("valueX", "stack")) + ((f2 += _2) - c2) * (1 - o3), u2 = s2.valueToPosition(m2);
- else if (s2 instanceof Sh) {
- var v2 = this.getAdjustedXLocation(i3, n3, e4.locationX), b2 = this.getAdjustedXLocation(i3, h2, e4.locationX);
- u2 = s2.categoryToPosition(i3[n3], v2);
- var x2 = void 0;
- h2 && (x2 = s2.categoryToPosition(i3[h2], b2)), tt(x2) || (x2 = 1), u2 = x2 + (u2 - x2) * o3;
- }
- if (a2 instanceof Ph)
- tt(l2) || (l2 = 0), c2 = void 0, f2 = i3.getWorkingValue(r3), p2 ? c2 = i3.getWorkingValue(p2) : a2 == this.baseAxis && (c2 = a2.baseValue), tt(c2) || (c2 = f2), (c2 += _2 = i3.getValue("valueY", "stack")) == (f2 += _2) && (g2 = a2.baseInterval, y2 = a2.dateFormatter, c2 = aa(new Date(c2), g2.timeUnit, g2.count, y2.firstDayOfWeek, y2.utc, void 0, y2.timezoneMinutes, y2.timezone).getTime(), f2 = sa(new Date(c2), g2.timeUnit, g2.count, y2.utc).getTime()), m2 = void 0, m2 = a2 == this.baseAxis ? c2 + (f2 - c2) * l2 : c2 + (f2 - c2) * (1 - l2), d2 = a2.valueToPosition(m2);
- else if (a2 instanceof bh) {
- var _2;
- tt(l2) || (l2 = 0), c2 = void 0, f2 = i3.getWorkingValue(r3), c2 = p2 ? i3.getWorkingValue(p2) : a2.baseValue, m2 = (c2 += _2 = i3.getValue("valueY", "stack")) + ((f2 += _2) - c2) * (1 - l2), d2 = a2.valueToPosition(m2);
- } else if (a2 instanceof Sh) {
- d2 = a2.categoryToPosition(i3[r3], l2);
- var P2 = this.getAdjustedYLocation(i3, r3, e4.locationY), w2 = this.getAdjustedYLocation(i3, p2, e4.locationY);
- d2 = a2.categoryToPosition(i3[r3], P2);
- var C2 = void 0;
- p2 && (C2 = a2.categoryToPosition(i3[p2], w2)), tt(C2) || (C2 = 1), d2 = C2 + (d2 - C2) * l2;
- }
- e4.visible = true, this.positionBulletReal(e4, u2, d2);
- } else
- e4.visible = false;
- }
- }, e3.prototype.positionBulletReal = function(t3, e4, i3) {
- t3.x = this.xAxis.renderer.positionToPoint(e4, i3).x, t3.y = this.yAxis.renderer.positionToPoint(i3, e4).y;
- }, e3.prototype.getBulletLocationX = function(t3, e4) {
- var i3 = t3.locationX, n3 = t3.dataItem;
- return tt(i3) || (i3 = n3.workingLocations[e4]), i3;
- }, e3.prototype.getBulletLocationY = function(t3, e4) {
- var i3 = t3.locationY, n3 = t3.dataItem;
- return tt(i3) || (i3 = n3.workingLocations[e4]), i3;
- }, e3.prototype.updateStacking = function() {
- var t3 = this;
- this.invalidateDataItems(), this.chart && this.chart.series.each(function(e4) {
- e4.baseAxis == t3.baseAxis && (e4.stackedSeries = void 0, e4.invalidateDataItems(), e4.invalidateProcessedData());
- });
- }, Object.defineProperty(e3.prototype, "stacked", { get: function() {
- return this.getPropertyValue("stacked");
- }, set: function(t3) {
- if (this.setPropertyValue("stacked", t3, true)) {
- this.updateStacking();
- var e4, i3 = this.xAxis, n3 = this.yAxis;
- t3 || (i3 != this.baseAxis && i3 instanceof bh && (e4 = this.xField), n3 != this.baseAxis && n3 instanceof bh && (e4 = this.yField), e4 && this.dataItems.each(function(t4) {
- t4.setCalculatedValue(e4, 0, "stack");
- }));
- }
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "snapTooltip", { get: function() {
- return this.getPropertyValue("snapTooltip");
- }, set: function(t3) {
- this.setPropertyValue("snapTooltip", t3);
- }, enumerable: true, configurable: true }), e3.prototype.show = function(e4) {
- var i3, n3 = this;
- this.isHidden && (this.appeared && this.xAxis instanceof Ph && this.xAxis.groupData && (this._tmin.setKey(this.yAxis.uid, void 0), this._tmax.setKey(this.yAxis.uid, void 0)), this.appeared && this.yAxis instanceof Ph && this.yAxis.groupData && (this._tmin.setKey(this.xAxis.uid, void 0), this._tmax.setKey(this.xAxis.uid, void 0))), this.xAxis instanceof bh && this.xAxis != this.baseAxis && (i3 = this._xValueFields), this.yAxis instanceof bh && this.yAxis != this.baseAxis && (i3 = this._yValueFields);
- var r3, s2 = this.startIndex, a2 = this.endIndex, o3 = 0, l2 = this.defaultState.transitionDuration;
- tt(e4) && (l2 = e4), ls.animationsEnabled || (l2 = 0), ti(ai(this.dataItems.iterator()), function(t3) {
- var e5 = t3[0], h3 = t3[1], p2 = l2;
- (e5 < n3.startIndex - 10 || e5 > n3.endIndex + 10) && (p2 = 0, o3 = 0), n3.sequencedInterpolation && p2 > 0 && (o3 = n3.sequencedInterpolationDelay * e5 + l2 * (e5 - s2) / (a2 - s2)), r3 = h3.show(p2, o3, i3);
- }), this.dataSets.each(function(t3, e5) {
- e5 != n3.dataItems && e5.each(function(t4) {
- t4.events.disable(), t4.show(0, 0, i3), t4.events.enable();
- });
- }), this.mainDataSet != this.dataItems && this.mainDataSet.each(function(t3) {
- t3.events.disable(), t3.show(0, 0, i3), t3.events.enable();
- });
- var h2 = t2.prototype.show.call(this, e4);
- return r3 && !r3.isFinished() && (h2 = r3), this.hidden && (this.dispatchImmediately("selectionextremeschanged"), this.hidden = false), h2;
- }, e3.prototype.hide = function(e4) {
- var i3, n3, r3 = this, s2 = this.xAxis;
- s2 instanceof bh && s2 != this.baseAxis && (i3 = this._xValueFields, n3 = this.stacked || s2.minZoomed < s2.baseValue && s2.maxZoomed > s2.baseValue || this.stackedSeries ? s2.baseValue : s2.min);
- var a2 = this.yAxis;
- a2 instanceof bh && a2 != this.baseAxis && (i3 = this._yValueFields, n3 = this.stacked || a2.minZoomed < a2.baseValue && a2.maxZoomed > a2.baseValue || this.stackedSeries ? a2.baseValue : a2.min);
- var o3 = this.startIndex, l2 = this.endIndex, h2 = this.hiddenState.transitionDuration;
- tt(e4) && (h2 = e4), ls.animationsEnabled || (h2 = 0);
- var p2, u2 = 0;
- ti(ai(this.dataItems.iterator()), function(t3) {
- var e5 = t3[0], s3 = t3[1], a3 = h2;
- (e5 < r3.startIndex - 10 || e5 > r3.endIndex + 10) && (a3 = 0), a3 == 0 ? s3.hide(0, 0, n3, i3) : (r3.sequencedInterpolation && a3 > 0 && (u2 = r3.sequencedInterpolationDelay * e5 + h2 * (e5 - o3) / (l2 - o3)), p2 = s3.hide(a3, u2, n3, i3));
- }), this.dataSets.each(function(t3, e5) {
- e5 != r3.dataItems && e5.each(function(t4) {
- t4.events.disable(), t4.hide(0, 0, n3, i3), t4.events.enable();
- });
- }), this.mainDataSet != this.dataItems && this.mainDataSet.each(function(t3) {
- t3.events.disable(), t3.hide(0, 0, n3, i3), t3.events.enable();
- });
- var d2 = t2.prototype.hide.call(this, h2);
- return d2 && !d2.isFinished() && d2.delay(u2), p2 && !p2.isFinished() && (d2 = p2), this.validateDataElements(), d2;
- }, e3.prototype.handleDataItemWorkingValueChange = function(e4, i3) {
- t2.prototype.handleDataItemWorkingValueChange.call(this, e4, i3), ti(this.baseAxis.series.iterator(), function(t3) {
- (t3.stacked || t3.stackedSeries) && t3.invalidateProcessedData();
- });
- }, e3.prototype.getStackValue = function(t3, e4) {
- var i3 = this, n3 = this.xAxis, r3 = this.yAxis;
- if (this.stacked && n3 && r3) {
- var s2, a2 = this.chart, o3 = a2.series.indexOf(this);
- n3 != this.baseAxis && n3 instanceof bh && (s2 = this.xField), r3 != this.baseAxis && r3 instanceof bh && (s2 = this.yField), s2 && (t3.setCalculatedValue(s2, 0, "stack"), Qe(a2.series.range(0, o3).backwards().iterator(), function(a3) {
- if (a3.xAxis == n3 && a3.yAxis == r3 && a3.className == i3.className) {
- a3.stackedSeries = i3;
- var o4 = a3.dataItems.getIndex(t3.index);
- if (o4 && o4.hasValue(i3._xValueFields) && o4.hasValue(i3._yValueFields)) {
- var l2, h2 = t3.getValue(s2), p2 = o4.getValue(s2) + o4.getValue(s2, "stack");
- if (l2 = e4 ? o4.getWorkingValue(s2) + o4.getValue(s2, "stack") : o4.getValue(s2) + o4.getValue(s2, "stack"), !i3.stackToNegative)
- return t3.setCalculatedValue(s2, l2, "stack"), false;
- if (h2 >= 0 && p2 >= 0 || h2 < 0 && p2 < 0)
- return t3.setCalculatedValue(s2, l2, "stack"), false;
- if (!a3.stacked)
- return false;
- } else if (!a3.stacked)
- return false;
- }
- return true;
- }));
- }
- }, Object.defineProperty(e3.prototype, "stackToNegative", { get: function() {
- return this.getPropertyValue("stackToNegative");
- }, set: function(t3) {
- this.setPropertyValue("stackToNegative", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "xField", { get: function() {
- return this._xField;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "yField", { get: function() {
- return this._yField;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "xOpenField", { get: function() {
- return this._xOpenField;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "yOpenField", { get: function() {
- return this._yOpenField;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipXField", { get: function() {
- return this._tooltipXField ? this._tooltipXField : this._xField;
- }, set: function(t3) {
- this._tooltipXField = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipYField", { get: function() {
- return this._tooltipYField ? this._tooltipYField : this._yField;
- }, set: function(t3) {
- this._tooltipYField = t3;
- }, enumerable: true, configurable: true }), e3.prototype.min = function(t3) {
- return this._tmin.getKey(t3.uid);
- }, e3.prototype.max = function(t3) {
- return this._tmax.getKey(t3.uid);
- }, e3.prototype.selectionMin = function(t3) {
- return this._smin.getKey(t3.uid);
- }, e3.prototype.selectionMax = function(t3) {
- return this._smax.getKey(t3.uid);
- }, e3.prototype.processConfig = function(e4) {
- if (e4) {
- if (Z(e4.baseAxis) && Q(e4.baseAxis) && (this.map.hasKey(e4.baseAxis) ? e4.baseAxis = this.map.getKey(e4.baseAxis) : (this.processingErrors.push("[XYSeries (" + (this.name || "unnamed") + ')] No axis with id "' + e4.baseAxis + '" found for `baseAxis`.'), delete e4.baseAxis)), Z(e4.xAxis) && Q(e4.xAxis) && (this.map.hasKey(e4.xAxis) ? e4.xAxis = this.map.getKey(e4.xAxis) : (this.processingErrors.push("[XYSeries (" + (this.name || "unnamed") + ')] No axis with id "' + e4.xAxis + '" found for `xAxis`.'), delete e4.xAxis)), Z(e4.yAxis) && Q(e4.yAxis) && (this.map.hasKey(e4.yAxis) ? e4.yAxis = this.map.getKey(e4.yAxis) : (this.processingErrors.push("[XYSeries (" + (this.name || "unnamed") + ')] No axis with id "' + e4.yAxis + '" found for `yAxis`.'), delete e4.yAxis)), Z(e4.axisRanges) && it(e4.axisRanges))
- for (var i3 = 0, n3 = e4.axisRanges.length; i3 < n3; i3++) {
- var r3 = e4.axisRanges[i3];
- Z(r3.type) || (r3.type = "AxisDataItem"), Z(r3.axis) && Q(r3.axis) && this.map.hasKey(r3.axis) ? r3.component = this.map.getKey(r3.axis) : Z(r3.component) && Q(r3.component) && this.map.hasKey(r3.component) && (r3.component = this.map.getKey(r3.component));
- }
- Z(e4.dataFields) && et(e4.dataFields) || this.processingErrors.push("`dataFields` is not set for series [" + (this.name || "unnamed") + "]");
- }
- t2.prototype.processConfig.call(this, e4);
- }, e3.prototype.getPoint = function(t3, e4, i3, n3, r3, s2, a2) {
- if (this.xAxis && this.yAxis) {
- var o3 = this.xAxis.getX(t3, e4, n3), l2 = this.yAxis.getY(t3, i3, r3);
- return { x: o3 = ut(o3, -this._maxxX, this._maxxX), y: l2 = ut(l2, -this._maxxY, this._maxxY) };
- }
- }, e3.prototype.updateItemReaderText = function() {
- if (!this._itemReaderTextChanged) {
- var t3 = "";
- Ne(this.dataFields, function(e4, i3) {
- t3 += "{" + e4 + "} ";
- }), this.itemReaderText = t3, this._itemReaderTextChanged = false;
- }
- }, Object.defineProperty(e3.prototype, "cursorTooltipEnabled", { get: function() {
- return this.getPropertyValue("cursorTooltipEnabled");
- }, set: function(t3) {
- this.setPropertyValue("cursorTooltipEnabled", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cursorHoverEnabled", { get: function() {
- return this.getPropertyValue("cursorHoverEnabled");
- }, set: function(t3) {
- this.setPropertyValue("cursorHoverEnabled", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "excludeFromTotal", { get: function() {
- return this.getPropertyValue("excludeFromTotal");
- }, set: function(t3) {
- this.setPropertyValue("excludeFromTotal", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hideTooltipWhileZooming", { get: function() {
- return this.getPropertyValue("hideTooltipWhileZooming");
- }, set: function(t3) {
- this.setPropertyValue("hideTooltipWhileZooming", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maskBullets", { get: function() {
- return this.getPropertyValue("maskBullets");
- }, set: function(t3) {
- this.setPropertyValue("maskBullets", t3);
- var e4 = this.chart;
- e4 && (this.bulletsContainer.parent = t3 ? e4.bulletsContainer : e4.axisBulletsContainer);
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- this.groupFields = Sn(e4.groupFields, {}), t2.prototype.copyFrom.call(this, e4);
- }, e3.prototype.dispose = function() {
- this.scrollbarSeries && this.scrollbarSeries.dispose(), t2.prototype.dispose.call(this);
- }, e3;
- }(eh);
- Ii.registeredClasses.XYSeries = Dh, Ii.registeredClasses.XYSeriesDataItem = Ih;
- var kh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._chart = new ve(), e4.className = "XYChartScrollbar";
- var i3 = new Ys();
- e4.padding(0, 0, 0, 0);
- var n3 = e4.createChild(Ah);
- if (n3.shouldClone = false, n3.margin(0, 0, 0, 0), n3.padding(0, 0, 0, 0), n3.interactionsEnabled = false, e4._scrollbarChart = n3, !Ir()) {
- var r3 = new Sl();
- r3.filterUnits = "userSpaceOnUse", n3.plotContainer.filters.push(r3);
- }
- e4._disposers.push(e4._scrollbarChart), e4.minHeight = 60, e4.minWidth = 60;
- var s2 = e4.createChild(Za);
- s2.shouldClone = false, s2.setElement(e4.paper.add("path")), s2.fill = i3.getFor("background"), s2.fillOpacity = 0.8, s2.interactionsEnabled = false, s2.isMeasured = false, s2.toBack(), e4._unselectedOverlay = s2, e4._disposers.push(e4._unselectedOverlay), n3.toBack(), e4.background.cornerRadius(0, 0, 0, 0);
- var a2 = e4.thumb.background;
- a2.cornerRadius(0, 0, 0, 0), a2.fillOpacity = 0, a2.fill = i3.getFor("background");
- var o3 = a2.states.getKey("hover");
- o3 && (o3.properties.fillOpacity = 0.2);
- var l2 = a2.states.getKey("down");
- return l2 && (l2.properties.fillOpacity = 0.4), e4._disposers.push(e4._chart), e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "series", { get: function() {
- return this._series || (this._series = new Fi(), this._disposers.push(this._series.events.on("inserted", this.handleSeriesAdded, this, false)), this._disposers.push(this._series.events.on("removed", this.handleSeriesRemoved, this, false))), this._series;
- }, enumerable: true, configurable: true }), e3.prototype.handleSeriesAdded = function(t3) {
- var e4 = this, i3 = t3.newValue;
- if (i3.xAxis && i3.yAxis) {
- var n3 = this.scrollbarChart;
- n3.zoomOutButton.disabled = true, this.chart = i3.chart, n3.dateFormatter.inputDateFormat = this.chart.dateFormatter.inputDateFormat, n3.language.locale = this.chart.language.locale;
- var r3 = true, s2 = true;
- ti(this.series.iterator(), function(t4) {
- t4 != i3 && (t4.xAxis == i3.xAxis && e4.scrollbarChart.xAxes.length > 0 && (r3 = false), t4.yAxis == i3.yAxis && e4.scrollbarChart.yAxes.length > 0 && (s2 = false));
- }), i3.events.on("beforedisposed", function() {
- e4.series.removeValue(i3);
- });
- var a2 = new Ys(), o3 = i3.clone();
- if ((ls.onlyShowOnViewport || ls.queue) && this.addDisposer(this.chart.events.on("removedfromqueue", function() {
- n3.invalidateData();
- })), Ir() && (o3.stroke = dn("#aaaaaa"), o3.fill = o3.stroke, o3.propertyFields.fill = void 0, o3.propertyFields.stroke = void 0), i3.scrollbarSeries = o3, r3) {
- var l2 = i3.xAxis.clone();
- if (n3.xAxes.moveValue(l2), l2.title.disabled = true, l2.rangeChangeDuration = 0, (d2 = l2.renderer).ticks.template.disabled = true, d2.inside = true, d2.labels.template.inside = true, d2.line.strokeOpacity = 0, d2.minLabelPosition = 0.02, d2.maxLabelPosition = 0.98, d2.line.disabled = true, d2.axisFills.template.disabled = true, d2.baseGrid.disabled = true, d2.grid.template.strokeOpacity = 0.05, d2.minWidth = void 0, d2.minHeight = void 0, d2.padding(0, 0, 0, 0), d2.chart = n3, d2.margin(0, 0, 0, 0), l2.width = V(100), d2.labels.template.fillOpacity = 0.5, l2.maxZoomCount = void 0, l2.minZoomCount = void 0, l2 instanceof Ph) {
- var h2 = l2, p2 = i3.xAxis;
- h2.groupCount = 5 * p2.groupCount, h2.min = void 0, h2.max = void 0, this._disposers.push(h2.clonedFrom.events.on("extremeschanged", function() {
- tt(h2.clonedFrom.minDefined) && (h2.min = h2.clonedFrom.minDefined), tt(h2.clonedFrom.maxDefined) && (h2.max = h2.clonedFrom.maxDefined);
- }, void 0, false));
- } else if (l2 instanceof bh) {
- var u2 = l2;
- u2.min = void 0, u2.max = void 0, tt(u2.clonedFrom.minDefined) || (u2.min = void 0), tt(u2.clonedFrom.maxDefined) || (u2.max = void 0), this._disposers.push(u2.clonedFrom.events.on("extremeschanged", function() {
- tt(u2.clonedFrom.minDefined) && (u2.min = u2.clonedFrom.min), tt(u2.clonedFrom.maxDefined) && (u2.max = u2.clonedFrom.max);
- }, void 0, false));
- }
- o3.xAxis = l2;
- } else
- this.scrollbarChart.xAxes.each(function(t4) {
- t4.clonedFrom == i3.xAxis && (o3.xAxis = t4);
- });
- if (s2) {
- var d2, c2 = i3.yAxis.clone();
- if (n3.yAxes.moveValue(c2), c2.title.disabled = true, c2.rangeChangeDuration = 0, (d2 = c2.renderer).ticks.template.disabled = true, d2.inside = true, d2.labels.template.inside = true, d2.line.strokeOpacity = 0, d2.minLabelPosition = 0.02, d2.maxLabelPosition = 0.98, d2.line.disabled = true, d2.axisFills.template.disabled = true, d2.grid.template.stroke = a2.getFor("background"), d2.baseGrid.disabled = true, d2.grid.template.strokeOpacity = 0.05, d2.minWidth = void 0, d2.minHeight = void 0, d2.chart = n3, d2.padding(0, 0, 0, 0), d2.margin(0, 0, 0, 0), c2.height = V(100), d2.labels.template.fillOpacity = 0.5, o3.yAxis = c2, c2.maxZoomCount = void 0, c2.minZoomCount = void 0, c2 instanceof Ph) {
- var f2 = c2;
- f2.min = void 0, f2.max = void 0, p2 = i3.yAxis, c2.groupCount = 5 * p2.groupCount, this._disposers.push(f2.clonedFrom.events.on("extremeschanged", function() {
- tt(f2.clonedFrom.minDefined) && (f2.min = f2.clonedFrom.minDefined), tt(f2.clonedFrom.maxDefined) && (f2.max = f2.clonedFrom.maxDefined);
- }));
- } else if (c2 instanceof bh) {
- var g2 = c2;
- g2.min = void 0, g2.max = void 0, tt(g2.clonedFrom.minDefined) || (g2.min = void 0), tt(g2.clonedFrom.maxDefined) || (g2.max = void 0), this._disposers.push(g2.clonedFrom.events.on("extremeschanged", function() {
- tt(g2.clonedFrom.minDefined) && (g2.min = g2.clonedFrom.minDefined), tt(g2.clonedFrom.maxDefined) && (g2.max = g2.clonedFrom.maxDefined);
- }));
- }
- } else
- this.scrollbarChart.yAxes.each(function(t4) {
- t4.clonedFrom == i3.yAxis && (o3.yAxis = t4);
- });
- o3.rangeChangeDuration = 0, o3.interpolationDuration = 0, o3.defaultState.transitionDuration = 0, o3.showOnInit = false, this._disposers.push(o3.events.on("validated", this.zoomOutAxes, this, false)), this._disposers.push(i3.events.on("datavalidated", function() {
- o3.data != i3.data && (o3.data = i3.data);
- }, void 0, false)), o3.defaultState.properties.visible = true, n3.series.push(o3), this.updateByOrientation();
- }
- }, e3.prototype.updateByOrientation = function() {
- var t3 = this;
- this._scrollbarChart && (ti(this._scrollbarChart.xAxes.iterator(), function(e4) {
- var i3 = e4.renderer;
- t3.orientation == "vertical" ? (i3.grid.template.disabled = true, i3.labels.template.disabled = true, i3.minGridDistance = 10) : (i3.grid.template.disabled = false, i3.labels.template.disabled = false, i3.minGridDistance = e4.clonedFrom.renderer.minGridDistance);
- }), ti(this._scrollbarChart.yAxes.iterator(), function(e4) {
- var i3 = e4.renderer;
- t3.orientation == "horizontal" ? (i3.grid.template.disabled = true, i3.labels.template.disabled = true, i3.minGridDistance = 10) : (i3.grid.template.disabled = false, i3.labels.template.disabled = false, i3.minGridDistance = e4.clonedFrom.renderer.minGridDistance);
- }));
- }, e3.prototype.handleSeriesRemoved = function(t3) {
- var e4 = t3.oldValue, i3 = this.scrollbarChart;
- i3.series.each(function(t4) {
- t4 && t4.clonedFrom == e4 && i3.series.removeValue(t4);
- }), i3.series.length == 0 && (i3.xAxes.clear(), i3.yAxes.clear());
- try {
- e4.events.off("validated", this.zoomOutAxes, this);
- } catch (t4) {
- }
- }, Object.defineProperty(e3.prototype, "scrollbarChart", { get: function() {
- return this._scrollbarChart;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "chart", { get: function() {
- return this._chart.get();
- }, set: function(t3) {
- this._chart.get() !== t3 && (this._chart.set(t3, t3.events.on("datavalidated", this.handleDataChanged, this, false)), this.handleDataChanged(), this._scrollbarChart.dataProvider = t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "unselectedOverlay", { get: function() {
- return this._unselectedOverlay;
- }, enumerable: true, configurable: true }), e3.prototype.handleDataChanged = function() {
- this.chart.data != this.scrollbarChart.data ? this.scrollbarChart.data = this.chart.data : this.scrollbarChart.invalidateRawData();
- }, e3.prototype.zoomOutAxes = function() {
- var t3 = this.scrollbarChart;
- ti(t3.xAxes.iterator(), function(t4) {
- t4.zoom({ start: 0, end: 1 }, true, true);
- }), ti(t3.yAxes.iterator(), function(t4) {
- t4.zoom({ start: 0, end: 1 }, true, true);
- });
- }, e3.prototype.updateThumb = function(e4) {
- if (e4 === void 0 && (e4 = true), t2.prototype.updateThumb.call(this, e4), this._unselectedOverlay) {
- var i3 = this.thumb, n3 = i3.pixelX || 0, r3 = i3.pixelY || 0, s2 = i3.pixelWidth || 0, a2 = i3.pixelHeight || 0, o3 = "";
- this.orientation == "horizontal" ? (o3 = Vo({ x: -1, y: 0, width: n3, height: a2 }), o3 += Vo({ x: n3 + s2, y: 0, width: (this.pixelWidth || 0) - n3 - s2, height: a2 })) : (o3 = Vo({ x: 0, y: 0, width: s2, height: r3 }), o3 += Vo({ x: 0, y: r3 + a2, width: s2, height: (this.pixelHeight || 0) - r3 - a2 })), this._unselectedOverlay.path = o3;
- }
- }, e3.prototype.processConfig = function(e4) {
- if (e4 && Z(e4.series) && it(e4.series))
- for (var i3 = 0, n3 = e4.series.length; i3 < n3; i3++) {
- var r3 = e4.series[i3];
- if (Z(r3) && Q(r3)) {
- if (!this.map.hasKey(r3))
- throw Error("XYChartScrollbar error: Series with id `" + r3 + "` does not exist.");
- e4.series[i3] = this.map.getKey(r3);
- }
- }
- t2.prototype.processConfig.call(this, e4);
- }, e3;
- }(Uo);
- Ii.registeredClasses.XYChartScrollbar = kh;
- var Th = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "XYChartDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(ih), Ah = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._axisRendererX = wh, e4._axisRendererY = yh, e4._seriesPoints = [], e4.className = "XYChart", e4.maskBullets = true, e4.arrangeTooltips = true;
- var i3 = e4.chartContainer;
- i3.layout = "vertical", e4.padding(15, 15, 15, 15);
- var n3 = i3.createChild($a);
- n3.shouldClone = false, n3.layout = "vertical", n3.width = V(100), n3.zIndex = 1, e4.topAxesContainer = n3;
- var r3 = i3.createChild($a);
- r3.shouldClone = false, r3.layout = "horizontal", r3.width = V(100), r3.height = V(100), r3.zIndex = 0, e4.yAxesAndPlotContainer = r3;
- var s2 = i3.createChild($a);
- s2.shouldClone = false, s2.width = V(100), s2.layout = "vertical", s2.zIndex = 1, e4.bottomAxesContainer = s2;
- var a2 = r3.createChild($a);
- a2.shouldClone = false, a2.layout = "horizontal", a2.height = V(100), a2.contentAlign = "right", a2.events.on("transformed", e4.updateXAxesMargins, e4, false), a2.zIndex = 1, e4.leftAxesContainer = a2;
- var o3 = r3.createChild($a);
- o3.shouldClone = false, o3.height = V(100), o3.width = V(100), o3.background.fillOpacity = 0, e4.plotContainer = o3, e4.mouseWheelBehavior = "none", e4._cursorContainer = o3;
- var l2 = r3.createChild($a);
- l2.shouldClone = false, l2.layout = "horizontal", l2.height = V(100), l2.zIndex = 1, l2.events.on("transformed", e4.updateXAxesMargins, e4, false), e4.rightAxesContainer = l2, e4.seriesContainer.parent = o3, e4.bulletsContainer.parent = o3;
- var h2 = o3.createChild(dl);
- h2.shouldClone = false, h2.align = "right", h2.valign = "top", h2.zIndex = Number.MAX_SAFE_INTEGER, h2.marginTop = 5, h2.marginRight = 5, h2.hide(0), e4.zoomOutButton = h2;
- var p2 = e4.plotContainer.createChild($a);
- return p2.shouldClone = false, p2.width = V(100), p2.height = V(100), p2.isMeasured = false, p2.zIndex = 4, p2.layout = "none", e4.axisBulletsContainer = p2, e4._bulletMask = e4.plotContainer, e4.events.on("beforedatavalidated", function() {
- e4.series.each(function(t3) {
- t3.dataGrouped = false, t3._baseInterval = {};
- });
- }, e4, false), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), this.zoomOutButton.exportable = false, Z(this.readerTitle) || (this.readerTitle = this.language.translate("X/Y chart"));
- }, e3.prototype.draw = function() {
- t2.prototype.draw.call(this), this.seriesContainer.toFront(), this.bulletsContainer.toFront(), this.maskBullets && (this.bulletsContainer.mask = this._bulletMask), this.updateSeriesLegend();
- }, e3.prototype.updatePlotElements = function() {
- ti(this.series.iterator(), function(t3) {
- t3.invalidate();
- });
- }, e3.prototype.validateData = function() {
- this._parseDataFrom == 0 && (ti(this.xAxes.iterator(), function(t3) {
- t3.dataChangeUpdate();
- }), ti(this.yAxes.iterator(), function(t3) {
- t3.dataChangeUpdate();
- }), ti(this.series.iterator(), function(t3) {
- t3.dataChangeUpdate();
- })), t2.prototype.validateData.call(this);
- }, e3.prototype.updateXAxesMargins = function() {
- var t3 = this.leftAxesContainer.measuredWidth, e4 = this.rightAxesContainer.measuredWidth, i3 = this.bottomAxesContainer;
- i3.paddingLeft == t3 && i3.paddingRight == e4 || (i3.paddingLeft = t3, i3.paddingRight = e4);
- var n3 = this.topAxesContainer;
- n3.paddingLeft == t3 && n3.paddingRight == e4 || (n3.paddingLeft = t3, n3.paddingRight = e4);
- }, e3.prototype.reinit = function() {
- t2.prototype.reinit.call(this), this.series.each(function(t3) {
- t3.appeared = false;
- });
- }, e3.prototype.handleXAxisChange = function(t3) {
- this.updateXAxis(t3.target);
- }, e3.prototype.handleYAxisChange = function(t3) {
- this.updateYAxis(t3.target);
- }, e3.prototype.processXAxis = function(t3) {
- var e4 = t3.newValue;
- e4.chart = this, e4.renderer || (e4.renderer = new this._axisRendererX(), e4.renderer.observe(["opposite", "inside", "inversed", "minGridDistance"], this.handleXAxisChange, this, false)), e4.axisLetter = "X", e4.events.on("startendchanged", this.handleXAxisRangeChange, this, false), e4.dataProvider = this, this.updateXAxis(e4.renderer), this.processAxis(e4);
- }, e3.prototype.processYAxis = function(t3) {
- var e4 = t3.newValue;
- e4.chart = this, e4.renderer || (e4.renderer = new this._axisRendererY(), e4.renderer.observe(["opposite", "inside", "inversed", "minGridDistance"], this.handleYAxisChange, this, false)), e4.axisLetter = "Y", e4.events.on("startendchanged", this.handleYAxisRangeChange, this, false), e4.dataProvider = this, this.updateYAxis(e4.renderer), this.processAxis(e4);
- }, e3.prototype.handleXAxisRangeChange = function() {
- var t3 = this.getCommonAxisRange(this.xAxes);
- this.scrollbarX && this.zoomAxes(this.xAxes, t3, true), this.toggleZoomOutButton(), this.updateScrollbar(this.scrollbarX, t3);
- }, e3.prototype.toggleZoomOutButton = function() {
- if (this.zoomOutButton) {
- var t3 = false;
- Qe(this.xAxes.iterator(), function(e4) {
- if (e4.toggleZoomOutButton) {
- if (e4.maxZoomCount > 0) {
- var i3 = e4.maxZoomFactor / e4.maxZoomCount;
- if (lt(e4.end - e4.start, 3) < 1 / i3)
- return t3 = true, false;
- } else if (lt(e4.start, 3) > 0 || lt(e4.end, 3) < 1)
- return t3 = true, false;
- }
- return true;
- }), Qe(this.yAxes.iterator(), function(e4) {
- if (e4.toggleZoomOutButton) {
- if (e4.maxZoomCount > 0) {
- var i3 = e4.maxZoomFactor / e4.maxZoomCount;
- if (lt(e4.end - e4.start, 3) < 1 / i3)
- return t3 = true, false;
- } else if (lt(e4.start, 3) > 0 || lt(e4.end, 3) < 1)
- return t3 = true, false;
- return true;
- }
- }), this.seriesAppeared || (t3 = false), t3 ? this.zoomOutButton.show() : this.zoomOutButton.hide();
- }
- }, e3.prototype.seriesAppeared = function() {
- var t3 = false;
- return ti(this.series.iterator(), function(e4) {
- if (!e4.appeared)
- return t3 = false, false;
- }), t3;
- }, e3.prototype.handleYAxisRangeChange = function() {
- var t3 = this.getCommonAxisRange(this.yAxes);
- this.scrollbarY && this.zoomAxes(this.yAxes, t3, true), this.toggleZoomOutButton(), this.updateScrollbar(this.scrollbarY, t3);
- }, e3.prototype.updateScrollbar = function(t3, e4) {
- t3 && (t3.skipRangeEvents(), t3.start = e4.start, t3.end = e4.end);
- }, e3.prototype.getCommonAxisRange = function(t3) {
- var e4, i3;
- return t3.each(function(t4) {
- if (!t4.zoomable || t4 instanceof bh && t4.syncWithAxis)
- ;
- else {
- var n3 = t4.start, r3 = t4.end;
- t4.renderer.inversed && (n3 = 1 - t4.end, r3 = 1 - t4.start), (!tt(e4) || n3 < e4) && (e4 = n3), (!tt(i3) || r3 > i3) && (i3 = r3);
- }
- }), { start: e4, end: i3 };
- }, e3.prototype.updateXAxis = function(t3) {
- var e4 = t3.axis;
- t3.opposite ? (e4.parent = this.topAxesContainer, e4.toFront()) : (e4.parent = this.bottomAxesContainer, e4.toBack()), e4.renderer && e4.renderer.processRenderer();
- }, e3.prototype.updateYAxis = function(t3) {
- var e4 = t3.axis;
- t3.opposite ? (e4.parent = this.rightAxesContainer, e4.toBack()) : (e4.parent = this.leftAxesContainer, e4.toFront()), e4.renderer && e4.renderer.processRenderer();
- }, e3.prototype.processAxis = function(t3) {
- var e4 = this;
- t3 instanceof Sh && this._dataUsers.moveValue(t3);
- var i3 = t3.renderer;
- i3.gridContainer.parent = this.plotContainer, i3.gridContainer.toBack(), i3.breakContainer.parent = this.plotContainer, i3.breakContainer.toFront(), i3.breakContainer.zIndex = 10, t3.addDisposer(new ye(function() {
- e4.dataUsers.removeValue(t3);
- })), i3.bulletsContainer.parent = this.axisBulletsContainer, this._disposers.push(t3.events.on("positionchanged", function() {
- var n3 = dr({ x: 0, y: 0 }, t3, e4.axisBulletsContainer);
- t3.renderer instanceof yh && (i3.bulletsContainer.y = n3.y), t3.renderer instanceof wh && (i3.bulletsContainer.x = n3.x);
- }, void 0, false)), this.plotContainer.events.on("maxsizechanged", function() {
- e4.inited && (t3.invalidateDataItems(), e4.updateSeriesMasks());
- }, t3, false);
- }, e3.prototype.updateSeriesMasks = function() {
- Ir() && this.series.each(function(t3) {
- var e4 = t3.mainContainer.mask;
- t3.mainContainer.mask = void 0, t3.mainContainer.mask = e4;
- });
- }, e3.prototype.handleSeriesRemoved = function(e4) {
- var i3 = e4.oldValue;
- i3 && (i3.xAxis && (i3.xAxis.series.removeValue(i3), i3.xAxis.invalidateProcessedData()), i3.yAxis && (i3.yAxis.series.removeValue(i3), i3.yAxis.invalidateProcessedData()), this.series.each(function(t3) {
- t3.resetExtremes();
- })), t2.prototype.handleSeriesRemoved.call(this, e4);
- }, Object.defineProperty(e3.prototype, "xAxes", { get: function() {
- return this._xAxes || (this._xAxes = new Fi(), this._xAxes.events.on("inserted", this.processXAxis, this, false), this._xAxes.events.on("removed", this.handleAxisRemoval, this, false), this._disposers.push(new Ai(this._xAxes, false))), this._xAxes;
- }, enumerable: true, configurable: true }), e3.prototype.handleAxisRemoval = function(t3) {
- var e4 = t3.oldValue;
- this.dataUsers.removeValue(e4), e4.autoDispose && e4.dispose();
- }, Object.defineProperty(e3.prototype, "yAxes", { get: function() {
- return this._yAxes || (this._yAxes = new Fi(), this._yAxes.events.on("inserted", this.processYAxis, this, false), this._yAxes.events.on("removed", this.handleAxisRemoval, this, false), this._disposers.push(new Ai(this._yAxes, false))), this._yAxes;
- }, enumerable: true, configurable: true }), e3.prototype.handleSeriesAdded = function(e4) {
- try {
- t2.prototype.handleSeriesAdded.call(this, e4);
- var i3 = e4.newValue;
- this.xAxes.length != 0 && this.yAxes.length != 0 || (Ii.removeFromInvalidComponents(i3), i3.dataInvalid = false), i3.xAxis, i3.yAxis, i3.maskBullets = i3.maskBullets, i3.fill == null && (this.patterns ? (Z(i3.stroke) || (i3.stroke = this.colors.next()), i3.fill = this.patterns.next(), Z(i3.fillOpacity) && (i3.fill.backgroundOpacity = i3.fillOpacity), i3.stroke instanceof un && (i3.fill.stroke = i3.stroke, i3.fill.fill = i3.stroke)) : i3.fill = this.colors.next()), Z(i3.stroke) || (i3.stroke = i3.fill);
- } catch (t3) {
- this.raiseCriticalError(t3);
- }
- }, Object.defineProperty(e3.prototype, "cursor", { get: function() {
- return this._cursor;
- }, set: function(t3) {
- this._cursor != t3 && (this._cursor && this.removeDispose(this._cursor), this._cursor = t3, t3 && (this._disposers.push(t3), t3.chart = this, t3.shouldClone = false, t3.parent = this._cursorContainer, t3.events.on("cursorpositionchanged", this.handleCursorPositionChange, this, false), t3.events.on("zoomstarted", this.handleCursorZoomStart, this, false), t3.events.on("zoomended", this.handleCursorZoomEnd, this, false), t3.events.on("panstarted", this.handleCursorPanStart, this, false), t3.events.on("panning", this.handleCursorPanning, this, false), t3.events.on("panended", this.handleCursorPanEnd, this, false), t3.events.on("behaviorcanceled", this.handleCursorCanceled, this, false), t3.events.on("hidden", this.handleHideCursor, this, false), t3.zIndex = Number.MAX_SAFE_INTEGER - 1, this.tapToActivate && this.setTapToActivate(this.tapToActivate)));
- }, enumerable: true, configurable: true }), e3.prototype.handleCursorPositionChange = function() {
- var t3 = this.cursor;
- if (t3.visible && !t3.isHiding) {
- var e4 = this.cursor.xPosition, i3 = this.cursor.yPosition;
- this.showSeriesTooltip({ x: e4, y: i3 });
- var n3 = [], r3 = t3.snapToSeries;
- if (r3 && !t3.downPoint) {
- r3 instanceof Dh && (r3 = [r3]);
- var s2 = [];
- Ut(r3, function(t4) {
- if (!t4.isHidden && !t4.isHiding) {
- var r4 = t4.xAxis, a3 = t4.yAxis;
- r4 instanceof bh && !(r4 instanceof Ph) && a3 instanceof bh && !(a3 instanceof Ph) ? (t4.dataItems.each(function(t5) {
- s2.push(t5);
- }), ie(n3, t4.yAxis), ie(n3, t4.xAxis)) : (t4.baseAxis == t4.xAxis && (ie(n3, t4.yAxis), s2.push(r4.getSeriesDataItem(t4, r4.toAxisPosition(e4), true))), t4.baseAxis == t4.yAxis && (ie(n3, t4.xAxis), s2.push(a3.getSeriesDataItem(t4, a3.toAxisPosition(i3), true))));
- }
- });
- var a2 = this.getClosest(s2, e4, i3);
- a2 && (this.series.each(function(t4) {
- var e5 = a2.component;
- t4 != e5 && (t4.hideTooltip(), t4.xAxis != e5.xAxis && (t4.xAxis.hideTooltip(), n3.push(t4.xAxis)), t4.yAxis != e5.yAxis && (t4.yAxis.hideTooltip(), n3.push(t4.yAxis)));
- }), a2.component.showTooltipAtDataItem(a2), t3.handleSnap(a2.component));
- }
- this._seriesPoints = [], this._cursorXPosition != e4 && this.showAxisTooltip(this.xAxes, e4, n3), this._cursorYPosition != i3 && this.showAxisTooltip(this.yAxes, i3, n3), this.arrangeTooltips && this.sortSeriesTooltips(this._seriesPoints), this.legend && this.legend.afterDraw();
- }
- }, e3.prototype.getClosest = function(t3, e4, i3) {
- var n3, r3 = 1 / 0;
- return Kt(t3, function(t4) {
- if (t4) {
- var s2 = t4.component.xAxis, a2 = t4.component.yAxis, o3 = s2.positionToCoordinate(s2.toGlobalPosition(s2.toAxisPosition(e4))), l2 = a2.positionToCoordinate(a2.toGlobalPosition(a2.toAxisPosition(i3))), h2 = t4.component.xField, p2 = t4.component.yField;
- if (s2 instanceof bh && !tt(t4.getValue(h2)))
- return true;
- if (a2 instanceof bh && !tt(t4.getValue(p2)))
- return true;
- var u2 = s2.positionToCoordinate(s2.toGlobalPosition(s2.getPositionX(t4, h2, t4.locations[h2], "valueX"))), d2 = a2.positionToCoordinate(a2.toGlobalPosition(a2.getPositionY(t4, p2, t4.locations[p2], "valueY"))), c2 = Math.sqrt(Math.pow(o3 - u2, 2) + Math.pow(l2 - d2, 2));
- return c2 < r3 && (r3 = c2, n3 = t4), true;
- }
- }), n3;
- }, e3.prototype.handleHideCursor = function() {
- this.hideObjectTooltip(this.xAxes), this.hideObjectTooltip(this.yAxes), this.hideObjectTooltip(this.series), this._cursorXPosition = void 0, this._cursorYPosition = void 0, this.updateSeriesLegend();
- }, e3.prototype.updateSeriesLegend = function() {
- ti(this.series.iterator(), function(t3) {
- t3.updateLegendValue();
- });
- }, e3.prototype.hideObjectTooltip = function(t3) {
- ti(t3.iterator(), function(t4) {
- t4.cursorTooltipEnabled && t4.hideTooltip(0);
- });
- }, e3.prototype.showSeriesTooltip = function(t3) {
- var e4 = this;
- if (t3) {
- var i3 = [];
- this.series.each(function(n3) {
- if (n3.xAxis instanceof Ph && n3.xAxis.snapTooltip || n3.yAxis instanceof Ph && n3.yAxis.snapTooltip)
- ;
- else {
- var r3 = n3.showTooltipAtPosition(t3.x, t3.y);
- r3 && (n3.tooltip.setBounds(fr({ x: 0, y: 0, width: e4.pixelWidth, height: e4.pixelHeight }, e4)), i3.push({ series: n3, point: r3 }));
- }
- }), this.arrangeTooltips && this.sortSeriesTooltips(i3);
- } else
- this.series.each(function(t4) {
- t4.hideTooltip();
- });
- }, e3.prototype.sortSeriesTooltips = function(t3) {
- if (t3.length > 0) {
- var e4 = this.cursor;
- if (e4 && tt(e4.maxTooltipDistance)) {
- var i3, n3, r3 = ur({ x: e4.point.x, y: e4.point.y }, e4), s2 = 1 / 0;
- Ut(t3, function(t4) {
- var e5 = t4.series, a3 = t4.point;
- if (a3) {
- var o4 = { x: a3.x, y: a3.y }, l3 = Math.abs(_t(o4, r3));
- l3 < s2 && (n3 = o4, s2 = l3, i3 = e5);
- }
- });
- var a2 = [];
- i3 && (Ut(t3, function(t4) {
- if (Math.abs(_t(t4.point, n3)) <= Math.abs(e4.maxTooltipDistance))
- a2.push({ series: t4.series, point: t4.point });
- else {
- var i4 = t4.series.tooltipDataItem;
- i4 && Ut(i4.sprites, function(t5) {
- t5.isHover = false, t5.handleOutReal();
- }), t4.series.hideTooltip(0);
- }
- }), e4.maxTooltipDistance < 0 && (a2.length > 0 && Ut(a2, function(t4) {
- i3 != t4.series && t4.series.hideTooltip(0);
- }), a2 = [{ series: i3, point: n3 }])), t3 = a2;
- }
- var o3 = ur({ x: -0.5, y: -0.5 }, this.plotContainer), l2 = ur({ x: this.plotContainer.pixelWidth + 0.5, y: this.plotContainer.pixelHeight + 0.5 }, this.plotContainer), h2 = 0, p2 = [];
- Ut(t3, function(t4) {
- var e5 = t4.point;
- e5 && Nt(e5, { x: o3.x, y: o3.y, width: l2.x - o3.x, height: l2.y - o3.y }) && (p2.push({ point: e5, series: t4.series }), h2 += e5.y);
- }), t3 = p2;
- var u2 = this.series.getIndex(0), d2 = false;
- u2 && u2.yAxis && u2.yAxis.renderer.inversed && (d2 = true), d2 ? t3.sort(function(t4, e5) {
- return Bi(t4.point.y, e5.point.y);
- }) : (t3.sort(function(t4, e5) {
- return Bi(e5.point.y, t4.point.y);
- }), t3.reverse());
- var c2 = h2 / t3.length, f2 = yr({ x: 0, y: 0 }, this.svgContainer.SVGContainer).y;
- if (t3.length > 0) {
- var g2 = o3.y, y2 = l2.y;
- vr({ x: 0, y: g2 }, this);
- var m2 = false;
- if (c2 > g2 + (y2 - g2) / 2)
- for (var v2 = y2, b2 = t3.length - 1; b2 >= 0; b2--) {
- var x2 = (C2 = t3[b2].series).tooltip, _2 = t3[b2].point.y;
- if (x2.setBounds({ x: 0, y: -f2, width: this.pixelWidth, height: v2 + f2 }), x2.invalid && x2.validate(), x2.toBack(), (v2 = ur({ x: 0, y: x2.label.pixelY - x2.pixelY + _2 - x2.pixelMarginTop }, x2).y) < -f2) {
- m2 = true;
- break;
- }
- }
- if (c2 <= g2 + (y2 - g2) / 2 || m2)
- for (var P2 = g2, w2 = (b2 = 0, t3.length); b2 < w2; b2++) {
- var C2 = t3[b2].series;
- _2 = t3[b2].point.y, (x2 = C2.tooltip).setBounds({ x: 0, y: P2, width: this.pixelWidth, height: y2 }), x2.invalid && x2.validate(), x2.toBack(), P2 = ur({ x: 0, y: x2.label.pixelY + x2.label.measuredHeight - x2.pixelY + _2 + x2.pixelMarginBottom }, x2).y;
- }
- }
- }
- }, e3.prototype.showAxisTooltip = function(t3, e4, i3) {
- var n3 = this;
- ti(t3.iterator(), function(t4) {
- i3 && i3.indexOf(t4) != -1 || (n3.dataItems.length > 0 || t4.dataItems.length > 0) && t4.showTooltipAtPosition(e4);
- });
- }, e3.prototype.getUpdatedRange = function(t3, e4) {
- if (t3) {
- var i3, n3;
- t3.renderer.inversed ? (bt(e4), i3 = 1 - t3.end, n3 = 1 - t3.start) : (i3 = t3.start, n3 = t3.end);
- var r3 = n3 - i3;
- return { start: i3 + e4.start * r3, end: i3 + e4.end * r3 };
- }
- }, e3.prototype.handleCursorZoomEnd = function(t3) {
- var e4 = this.cursor, i3 = e4.behavior;
- if (i3 == "zoomX" || i3 == "zoomXY") {
- var n3 = e4.xRange;
- n3 && this.xAxes.length > 0 && ((n3 = this.getUpdatedRange(this.xAxes.getIndex(0), n3)).priority = "start", this.zoomAxes(this.xAxes, n3));
- }
- if (i3 == "zoomY" || i3 == "zoomXY") {
- var r3 = e4.yRange;
- r3 && this.yAxes.length > 0 && ((r3 = this.getUpdatedRange(this.yAxes.getIndex(0), r3)).priority = "start", this.zoomAxes(this.yAxes, r3));
- }
- this.handleHideCursor();
- }, e3.prototype.handleCursorPanStart = function(t3) {
- var e4 = this.xAxes.getIndex(0);
- e4 && (this._panStartXRange = { start: e4.start, end: e4.end }, e4.renderer.inversed && (this._panStartXRange = bt(this._panStartXRange)));
- var i3 = this.yAxes.getIndex(0);
- i3 && (this._panStartYRange = { start: i3.start, end: i3.end }, i3.renderer.inversed && (this._panStartYRange = bt(this._panStartYRange)));
- }, e3.prototype.handleCursorPanEnd = function(t3) {
- var e4 = this.cursor, i3 = e4.behavior;
- if (this._panEndXRange && (i3 == "panX" || i3 == "panXY")) {
- var n3 = this._panEndXRange, r3 = this._panStartXRange, s2 = 0;
- n3.start < 0 && (s2 = n3.start), r3.end > 1 ? n3.end > r3.end && (s2 = n3.end - r3.end) : n3.end > 1 && (s2 = n3.end - 1), this.zoomAxes(this.xAxes, { start: n3.start - s2, end: n3.end - s2 }, false, e4.snapOnPan), this._panEndXRange = void 0, this._panStartXRange = void 0;
- }
- !this._panEndYRange || i3 != "panY" && i3 != "panXY" || (s2 = 0, (n3 = this._panEndYRange).start < 0 && (s2 = n3.start), n3.end > 1 && (s2 = n3.end - 1), this.zoomAxes(this.yAxes, { start: n3.start - s2, end: n3.end - s2 }, false, e4.snapOnPan), this._panEndYRange = void 0, this._panStartYRange = void 0);
- }, e3.prototype.handleCursorCanceled = function() {
- this._panEndXRange = void 0, this._panStartXRange = void 0;
- }, e3.prototype.handleCursorPanning = function(t3) {
- var e4 = this.cursor, i3 = e4.behavior, n3 = e4.maxPanOut;
- if (this._panStartXRange && (i3 == "panX" || i3 == "panXY")) {
- var r3 = this._panStartXRange, s2 = e4.xRange, a2 = this.getCommonAxisRange(this.xAxes), o3 = r3.end - r3.start, l2 = s2.start * (a2.end - a2.start), h2 = Math.max(-n3, l2 + r3.start), p2 = Math.min(l2 + r3.end, 1 + n3);
- h2 <= 0 && (p2 = h2 + o3), p2 >= 1 && (h2 = p2 - o3);
- var u2 = { start: h2, end: p2 };
- this._panEndXRange = u2, this.zoomAxes(this.xAxes, u2, false, false, e4.maxPanOut);
- }
- !this._panStartYRange || i3 != "panY" && i3 != "panXY" || (r3 = this._panStartYRange, s2 = e4.yRange, a2 = this.getCommonAxisRange(this.yAxes), o3 = r3.end - r3.start, l2 = s2.start * (a2.end - a2.start), h2 = Math.max(-n3, l2 + r3.start), p2 = Math.min(l2 + r3.end, 1 + n3), h2 <= 0 && (p2 = h2 + o3), p2 >= 1 && (h2 = p2 - o3), u2 = { start: h2, end: p2 }, this._panEndYRange = u2, this.zoomAxes(this.yAxes, u2, false, false, e4.maxPanOut)), this.handleHideCursor();
- }, e3.prototype.handleYAxisSet = function(t3) {
- }, e3.prototype.handleCursorZoomStart = function(t3) {
- }, Object.defineProperty(e3.prototype, "scrollbarX", { get: function() {
- return this._scrollbarX;
- }, set: function(t3) {
- var e4 = this;
- this._scrollbarX && this.removeDispose(this._scrollbarX), this._scrollbarX = t3, t3 && (this._disposers.push(t3), t3.parent = this.topAxesContainer, t3.shouldClone = false, t3.startGrip.exportable = false, t3.endGrip.exportable = false, t3.toBack(), t3.orientation = "horizontal", t3.events.on("rangechanged", this.handleXScrollbarChange, this, false), this.events.on("datavalidated", function() {
- return t3.updateThumb(false);
- }, this, false), t3.adapter.add("positionValue", function(t4) {
- var i3 = e4.xAxes.getIndex(0);
- return i3 && (t4.value = i3.getPositionLabel(i3.renderer.inversed ? 1 - t4.position : t4.position)), t4;
- }));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "scrollbarY", { get: function() {
- return this._scrollbarY;
- }, set: function(t3) {
- var e4 = this;
- this._scrollbarY && this.removeDispose(this._scrollbarY), this._scrollbarY = t3, t3 && (this._disposers.push(t3), t3.parent = this.rightAxesContainer, t3.startGrip.exportable = false, t3.shouldClone = false, t3.endGrip.exportable = false, t3.toFront(), t3.orientation = "vertical", t3.events.on("rangechanged", this.handleYScrollbarChange, this, false), this.events.on("datavalidated", function() {
- return t3.updateThumb(false);
- }, this, false), t3.adapter.add("positionValue", function(t4) {
- var i3 = e4.yAxes.getIndex(0);
- return i3 && (t4.value = i3.getPositionLabel(t4.position)), t4;
- }));
- }, enumerable: true, configurable: true }), e3.prototype.handleXScrollbarChange = function(t3) {
- if (this.inited) {
- var e4 = t3.target, i3 = e4.range;
- i3.start == 0 && (i3.priority = "start"), i3.end == 1 && (i3.priority = "end"), i3 = this.zoomAxes(this.xAxes, i3), e4.fixRange(i3);
- }
- }, e3.prototype.handleYScrollbarChange = function(t3) {
- if (this.inited) {
- var e4 = t3.target, i3 = e4.range;
- i3.end == 1 && (i3.priority = "end"), i3.start == 0 && (i3.priority = "start"), i3 = this.zoomAxes(this.yAxes, i3), e4.fixRange(i3);
- }
- }, e3.prototype.zoomAxes = function(t3, e4, i3, n3, r3, s2) {
- var a2 = { start: 0, end: 1 };
- this.showSeriesTooltip();
- var o3 = e4;
- return this.dataInvalid || ti(t3.iterator(), function(t4) {
- var l2 = t4.maxZoomFactor;
- if (tt(t4.minZoomCount) && (l2 /= t4.minZoomCount), s2 && 1 / (e4.end - e4.start) >= l2)
- ;
- else if (t4.zoomable) {
- if (e4 = t4.renderer.inversed ? bt(o3) : o3, t4.hideTooltip(0), n3)
- if (t4 instanceof Sh) {
- var h2 = t4.getCellEndPosition(0) - t4.getCellStartPosition(0);
- e4.start = t4.roundPosition(e4.start + h2 / 2 - t4.startLocation * h2, t4.startLocation), e4.end = t4.roundPosition(e4.end - h2 / 2 + (1 - t4.endLocation) * h2, t4.endLocation);
- } else
- e4.start = t4.roundPosition(e4.start + 1e-4, 0, t4.startLocation), e4.end = t4.roundPosition(e4.end + 1e-4, 0, t4.endLocation);
- var p2 = t4.zoom(e4, i3, i3, r3);
- t4.renderer.inversed && (p2 = bt(p2)), a2 = p2;
- }
- }), a2;
- }, Object.defineProperty(e3.prototype, "maskBullets", { get: function() {
- return this.getPropertyValue("maskBullets");
- }, set: function(t3) {
- this.setPropertyValue("maskBullets", t3, true) && this.bulletsContainer && (this.bulletsContainer.mask = t3 ? this._bulletMask : void 0);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "arrangeTooltips", { get: function() {
- return this.getPropertyValue("arrangeTooltips");
- }, set: function(t3) {
- this.setPropertyValue("arrangeTooltips", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.handleWheel = function(t3) {
- var e4 = this.plotContainer, i3 = pr(gr(t3.point, this.htmlContainer, this.svgContainer.cssScale), e4), n3 = t3.shift.y;
- this.handleWheelReal(n3, this.mouseWheelBehavior, i3);
- }, e3.prototype.handleHorizontalWheel = function(t3) {
- var e4 = this.plotContainer, i3 = pr(gr(t3.point, this.htmlContainer, this.svgContainer.cssScale), e4);
- this.handleWheelReal(t3.shift.x, this.horizontalMouseWheelBehavior, i3);
- }, e3.prototype.handleWheelReal = function(t3, e4, i3) {
- if (t3 != 0) {
- var n3 = this.plotContainer, r3 = this.getCommonAxisRange(this.xAxes), s2 = this.getCommonAxisRange(this.yAxes), a2 = 0.1;
- if (e4 == "panX" || e4 == "panXY") {
- var o3 = r3.end - r3.start, l2 = Math.max(-0, r3.start + a2 * t3 / 100 * (r3.end - r3.start)), h2 = Math.min(r3.end + a2 * t3 / 100 * (r3.end - r3.start), 1);
- l2 <= 0 && (h2 = l2 + o3), h2 >= 1 && (l2 = h2 - o3), this.zoomAxes(this.xAxes, { start: l2, end: h2 });
- }
- if (e4 == "panY" || e4 == "panXY") {
- t3 *= -1;
- var p2 = s2.end - s2.start, u2 = Math.max(-0, s2.start + a2 * t3 / 100 * (s2.end - s2.start)), d2 = Math.min(s2.end + a2 * t3 / 100 * (s2.end - s2.start), 1);
- u2 <= 0 && (d2 = u2 + p2), d2 >= 1 && (u2 = d2 - p2), this.zoomAxes(this.yAxes, { start: u2, end: d2 });
- }
- if (e4 == "zoomX" || e4 == "zoomXY") {
- var c2 = i3.x / n3.maxWidth, f2 = this.xAxes.getIndex(0).toAxisPosition(c2);
- l2 = Math.max(-0, r3.start - a2 * (r3.end - r3.start) * t3 / 100 * c2), l2 = Math.min(l2, f2), h2 = Math.min(r3.end + a2 * (r3.end - r3.start) * t3 / 100 * (1 - c2), 1), h2 = Math.max(h2, f2), this.zoomAxes(this.xAxes, { start: l2, end: h2 }, void 0, void 0, void 0, true);
- }
- if (e4 == "zoomY" || e4 == "zoomXY") {
- var g2 = i3.y / n3.maxHeight, y2 = this.yAxes.getIndex(0).toAxisPosition(g2);
- u2 = Math.max(-0, s2.start - a2 * (s2.end - s2.start) * t3 / 100 * (1 - g2)), u2 = Math.min(u2, y2), d2 = Math.min(s2.end + a2 * t3 / 100 * g2 * (s2.end - s2.start), 1), d2 = Math.max(d2, y2), this.zoomAxes(this.yAxes, { start: u2, end: d2 }, void 0, void 0, void 0, true);
- }
- }
- }, Object.defineProperty(e3.prototype, "mouseWheelBehavior", { get: function() {
- return this.getPropertyValue("mouseWheelBehavior");
- }, set: function(t3) {
- this.setPropertyValue("mouseWheelBehavior", t3) && (t3 != "none" ? (this._mouseWheelDisposer = this.plotContainer.events.on("wheel", this.handleWheel, this, false), this._disposers.push(this._mouseWheelDisposer)) : this._mouseWheelDisposer && (this.plotContainer.wheelable = false, this.plotContainer.hoverable = false, this._mouseWheelDisposer.dispose()));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "horizontalMouseWheelBehavior", { get: function() {
- return this.getPropertyValue("horizontalMouseWheelBehavior");
- }, set: function(t3) {
- this.setPropertyValue("horizontalMouseWheelBehavior", t3) && (t3 != "none" ? (this._mouseWheelDisposer2 = this.plotContainer.events.on("wheel", this.handleHorizontalWheel, this, false), this._disposers.push(this._mouseWheelDisposer2)) : this._mouseWheelDisposer2 && (this.plotContainer.wheelable = false, this.plotContainer.hoverable = false, this._mouseWheelDisposer2.dispose()));
- }, enumerable: true, configurable: true }), e3.prototype.dataSourceDateFields = function(e4) {
- var i3 = this;
- return e4 = t2.prototype.dataSourceDateFields.call(this, e4), ti(this.series.iterator(), function(t3) {
- e4 = i3.populateDataSourceFields(e4, t3.dataFields, ["dateX", "dateY", "openDateX", "openDateY"]);
- }), e4;
- }, e3.prototype.dataSourceNumberFields = function(e4) {
- var i3 = this;
- return e4 = t2.prototype.dataSourceDateFields.call(this, e4), ti(this.series.iterator(), function(t3) {
- e4 = i3.populateDataSourceFields(e4, t3.dataFields, ["valueX", "valueY", "openValueX", "openValueY"]);
- }), e4;
- }, e3.prototype.processConfig = function(e4) {
- if (e4) {
- var i3 = [], n3 = [];
- if (Z(e4.xAxes) && it(e4.xAxes))
- for (var r3 = 0, s2 = e4.xAxes.length; r3 < s2; r3++) {
- if (!e4.xAxes[r3].type)
- throw Error("[XYChart error] No type set for xAxes[" + r3 + "].");
- if (Z(e4.xAxes[r3].axisRanges)) {
- for (var a2 = 0, o3 = e4.xAxes[r3].axisRanges.length; a2 < o3; a2++)
- Z((h2 = e4.xAxes[r3].axisRanges[a2]).date) && Q(h2.date) && (h2.date = this.dateFormatter.parse(h2.date)), Z(h2.endDate) && Q(h2.endDate) && (h2.endDate = this.dateFormatter.parse(h2.endDate));
- i3.push({ axisRanges: e4.xAxes[r3].axisRanges, index: r3 }), delete e4.xAxes[r3].axisRanges;
- }
- }
- if (Z(e4.yAxes) && it(e4.yAxes))
- for (r3 = 0, s2 = e4.yAxes.length; r3 < s2; r3++) {
- if (!e4.yAxes[r3].type)
- throw Error("[XYChart error] No type set for yAxes[" + r3 + "].");
- if (Z(e4.yAxes[r3].axisRanges)) {
- a2 = 0;
- for (var l2 = e4.yAxes[r3].axisRanges.length; a2 < l2; a2++) {
- var h2;
- Z((h2 = e4.yAxes[r3].axisRanges[a2]).date) && Q(h2.date) && (h2.date = this.dateFormatter.parse(h2.date)), Z(h2.endDate) && Q(h2.endDate) && (h2.endDate = this.dateFormatter.parse(h2.endDate));
- }
- n3.push({ axisRanges: e4.yAxes[r3].axisRanges, index: r3 }), delete e4.yAxes[r3].axisRanges;
- }
- }
- if (Z(e4.series) && it(e4.series))
- for (r3 = 0, s2 = e4.series.length; r3 < s2; r3++)
- e4.series[r3].type = e4.series[r3].type || "LineSeries";
- if (Z(e4.cursor) && !Z(e4.cursor.type) && (e4.cursor.type = "XYCursor"), Z(e4.scrollbarX) && !Z(e4.scrollbarX.type) && (e4.scrollbarX.type = "Scrollbar"), Z(e4.scrollbarY) && !Z(e4.scrollbarY.type) && (e4.scrollbarY.type = "Scrollbar"), t2.prototype.processConfig.call(this, e4), n3.length)
- for (r3 = 0, s2 = n3.length; r3 < s2; r3++)
- this.yAxes.getIndex(n3[r3].index).config = { axisRanges: n3[r3].axisRanges };
- if (i3.length)
- for (r3 = 0, s2 = i3.length; r3 < s2; r3++)
- this.xAxes.getIndex(i3[r3].index).config = { axisRanges: i3[r3].axisRanges };
- }
- }, e3.prototype.configOrder = function(e4, i3) {
- return e4 == i3 ? 0 : e4 == "scrollbarX" ? 1 : i3 == "scrollbarX" ? -1 : e4 == "scrollbarY" ? 1 : i3 == "scrollbarY" ? -1 : e4 == "cursor" ? 1 : i3 == "cursor" ? -1 : e4 == "series" ? 1 : i3 == "series" ? -1 : t2.prototype.configOrder.call(this, e4, i3);
- }, e3.prototype.createSeries = function() {
- return new Dh();
- }, Object.defineProperty(e3.prototype, "zoomOutButton", { get: function() {
- return this._zoomOutButton;
- }, set: function(t3) {
- var e4 = this;
- this._zoomOutButton = t3, t3 && t3.events.on("hit", function() {
- e4.zoomAxes(e4.xAxes, { start: 0, end: 1 }), e4.zoomAxes(e4.yAxes, { start: 0, end: 1 });
- }, void 0, false);
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- var i3 = this;
- e4.xAxes.each(function(t3) {
- var e5 = i3.xAxes.push(t3.clone());
- e5.chart = i3, e5.renderer.chart = i3;
- }), e4.yAxes.each(function(t3) {
- var e5 = i3.yAxes.push(t3.clone());
- e5.renderer.chart = i3, e5.chart = i3;
- }), t2.prototype.copyFrom.call(this, e4), e4.cursor && (this.cursor = e4.cursor.clone()), e4.scrollbarX && (this.scrollbarX = e4.scrollbarX.clone()), e4.scrollbarY && (this.scrollbarY = e4.scrollbarY.clone());
- }, e3.prototype.disposeData = function() {
- t2.prototype.disposeData.call(this);
- var e4 = this.scrollbarX;
- e4 && e4 instanceof kh && e4.scrollbarChart.disposeData();
- var i3 = this.scrollbarY;
- i3 && i3 instanceof kh && i3.scrollbarChart.disposeData(), this.xAxes.each(function(t3) {
- t3 instanceof Sh && t3.disposeData();
- }), this.yAxes.each(function(t3) {
- t3 instanceof Sh && t3.disposeData();
- });
- }, e3.prototype.addData = function(e4, i3) {
- this.scrollbarX instanceof kh && this.addScrollbarData(this.scrollbarX, i3), this.scrollbarY instanceof kh && this.addScrollbarData(this.scrollbarY, i3), t2.prototype.addData.call(this, e4, i3);
- }, e3.prototype.addScrollbarData = function(t3, e4) {
- var i3 = t3.scrollbarChart;
- i3._parseDataFrom = i3.data.length, i3.invalidateData();
- }, e3.prototype.removeScrollbarData = function(t3, e4) {
- var i3 = t3.scrollbarChart;
- if (tt(e4)) {
- for (; e4 > 0; ) {
- var n3 = this.dataItems.getIndex(0);
- n3 && i3.dataItems.remove(n3), i3.dataUsers.each(function(t4) {
- var e5 = t4.dataItems.getIndex(0);
- e5 && t4.dataItems.remove(e5);
- }), i3._parseDataFrom--, e4--;
- }
- i3.invalidateData();
- }
- }, e3.prototype.removeData = function(e4) {
- this.scrollbarX instanceof kh && this.removeScrollbarData(this.scrollbarX, e4), this.scrollbarY instanceof kh && this.removeScrollbarData(this.scrollbarY, e4), t2.prototype.removeData.call(this, e4);
- }, e3.prototype.setTapToActivate = function(e4) {
- t2.prototype.setTapToActivate.call(this, e4), this.cursor && (this.cursor.interactions.isTouchProtected = e4, this.plotContainer.interactions.isTouchProtected = e4);
- }, e3.prototype.handleTapToActivate = function() {
- t2.prototype.handleTapToActivate.call(this), this.cursor && (this.cursor.interactions.isTouchProtected = false, this.plotContainer.interactions.isTouchProtected = false);
- }, e3.prototype.handleTapToActivateDeactivation = function() {
- t2.prototype.handleTapToActivateDeactivation.call(this), this.cursor && (this.cursor.interactions.isTouchProtected = true, this.plotContainer.interactions.isTouchProtected = true);
- }, e3;
- }(nh);
- Ii.registeredClasses.XYChart = Ah, lo.push({ relevant: ho.maybeXS, state: function(t2, e3) {
- if (t2 instanceof Ah && t2.scrollbarX) {
- var i3 = t2.states.create(e3);
- return t2.scrollbarX.states.create(e3).properties.disabled = true, i3;
- }
- return null;
- } }), lo.push({ relevant: ho.maybeXS, state: function(t2, e3) {
- if (t2 instanceof Ah && t2.scrollbarY) {
- var i3 = t2.states.create(e3);
- return t2.scrollbarY.states.create(e3).properties.disabled = true, i3;
- }
- return null;
- } });
- var Vh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "LineSeriesSegment", e4.isMeasured = false, e4.interactionsEnabled = false, e4.layout = "none";
- var i3 = e4.createChild(Za);
- e4.fillSprite = i3, i3.shouldClone = false, i3.setElement(e4.paper.add("path")), i3.isMeasured = false, e4._disposers.push(i3);
- var n3 = e4.createChild(Za);
- return e4.strokeSprite = n3, n3.shouldClone = false, n3.fill = dn(), n3.setElement(e4.paper.add("path")), n3.isMeasured = false, e4._disposers.push(n3), e4;
- }
- return C(e3, t2), e3.prototype.drawSegment = function(t3, e4, i3, n3) {
- if (!this.disabled)
- if (t3.length > 0 && e4.length > 0 && tt(t3[0].x) && tt(t3[0].y)) {
- var r3 = wo({ x: t3[0].x - 0.2, y: t3[0].y - 0.2 }) + wo(t3[0]), s2 = this.series;
- s2.smoothing == "bezier" ? r3 += new tl(i3, n3).smooth(t3) : s2.smoothing == "monotoneX" ? r3 += new al({ closed: false }).smooth(t3) : s2.smoothing == "monotoneY" && (r3 += new ol({ closed: false }).smooth(t3)), this.strokeOpacity == 0 || this.strokeSprite.strokeOpacity == 0 || (this.strokeSprite.path = r3), (this.fillOpacity > 0 || this.fillSprite.fillOpacity > 0) && tt(e4[0].x) && tt(e4[0].y) && (r3 += Co(e4[0]), s2.smoothing == "bezier" ? r3 += new tl(i3, n3).smooth(e4) : s2.smoothing == "monotoneX" ? r3 += new al({ closed: false }).smooth(e4) : s2.smoothing == "monotoneY" && (r3 += new ol({ closed: false }).smooth(e4)), r3 += Co(t3[0]), r3 += " Z", this.fillSprite.path = r3);
- } else
- this.fillSprite.path = "", this.strokeSprite.path = "";
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4);
- var i3 = this.strokeSprite;
- Ue(e4, i3.properties, Ka), i3.events.copyFrom(e4.strokeSprite.events), i3.fillOpacity = 0;
- var n3 = this.fillSprite;
- Ue(e4, n3.properties, Ka), n3.events.copyFrom(e4.fillSprite.events), n3.strokeOpacity = 0;
- }, e3;
- }($a);
- Ii.registeredClasses.LineSeriesSegment = Vh;
- var Fh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "DurationAxisDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(vh), Mh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._baseUnit = "second", e4.className = "DurationAxis", e4.setPropertyValue("maxZoomFactor", 1e6), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.formatLabel = function(t3, e4) {
- return this.durationFormatter.format(t3, e4 || this.axisDurationFormat);
- }, e3.prototype.adjustMinMax = function(e4, i3, n3, r3, s2) {
- var a2, o3, l2, h2 = this.baseUnit;
- if (this.setPropertyValue("maxPrecision", 0), h2 == "millisecond" || h2 == "second" || h2 == "minute" || h2 == "hour") {
- r3 <= 1 && (r3 = 1), r3 = Math.round(r3);
- var p2 = e4, u2 = i3;
- n3 === 0 && (n3 = Math.abs(i3));
- var d2, c2 = [60, 30, 20, 15, 10, 2, 1], f2 = 1;
- h2 == "hour" && (c2 = [24, 12, 6, 4, 2, 1]);
- try {
- for (var g2 = D(c2), y2 = g2.next(); !y2.done; y2 = g2.next()) {
- var m2 = y2.value;
- if (n3 / m2 > r3) {
- f2 = m2;
- break;
- }
- }
- } catch (t3) {
- a2 = { error: t3 };
- } finally {
- try {
- y2 && !y2.done && (o3 = g2.return) && o3.call(g2);
- } finally {
- if (a2)
- throw a2.error;
- }
- }
- var v2 = Math.ceil((i3 - e4) / f2 / r3), b2 = Math.log(Math.abs(v2)) * Math.LOG10E, x2 = Math.pow(10, Math.floor(b2)) / 10;
- d2 = f2 * (v2 = mt(c2, v2 / x2) * x2), this.durationFormatter.getValueUnit(d2, this.baseUnit), e4 = Math.floor(e4 / d2) * d2, i3 = Math.ceil(i3 / d2) * d2, s2 && ((e4 -= d2) < 0 && p2 >= 0 && (e4 = 0), (i3 += d2) > 0 && u2 <= 0 && (i3 = 0)), l2 = { min: e4, max: i3, step: d2 };
- } else
- l2 = t2.prototype.adjustMinMax.call(this, e4, i3, n3, r3, s2);
- return this.axisDurationFormat = this.durationFormatter.getFormat(l2.step, l2.max, this.baseUnit), l2;
- }, Object.defineProperty(e3.prototype, "tooltipDurationFormat", { get: function() {
- return this._tooltipDurationFormat;
- }, set: function(t3) {
- this._tooltipDurationFormat = t3;
- }, enumerable: true, configurable: true }), e3.prototype.getTooltipText = function(t3) {
- var e4 = lt(this.positionToValue(t3), this._stepDecimalPlaces), i3 = this.formatLabel(e4, this.tooltipDurationFormat);
- return this._adapterO ? this._adapterO.apply("getTooltipText", i3) : i3;
- }, Object.defineProperty(e3.prototype, "baseUnit", { get: function() {
- return this._baseUnit;
- }, set: function(t3) {
- this._baseUnit != t3 && (this._baseUnit = t3, this.durationFormatter.baseUnit = t3, this.invalidate());
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.baseUnit = e4.baseUnit;
- }, e3;
- }(bh);
- Ii.registeredClasses.DurationAxis = Mh, Ii.registeredClasses.DurationAxisDataItem = Fh;
- var Lh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "LineSeriesDataItem", e4;
- }
- return C(e3, t2), e3;
- }(Ih), jh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.minDistance = 0.5, e4.segments = new Mi(e4.createSegment()), e4.segments.template.applyOnClones = true, e4._disposers.push(new Ai(e4.segments)), e4._disposers.push(e4.segments.template), e4._segmentsIterator = new mi(e4.segments, function() {
- return e4.segments.create();
- }), e4._segmentsIterator.createNewItems = true, e4.className = "LineSeries", e4.strokeOpacity = 1, e4.fillOpacity = 0, e4.connect = true, e4.tensionX = 1, e4.tensionY = 1, e4.autoGapCount = 1.1, e4.smoothing = "bezier", e4.segmentsContainer = e4.mainContainer.createChild($a), e4.segmentsContainer.isMeasured = false, e4.bulletsContainer.toFront(), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Line Series"));
- }, e3.prototype.createSegment = function() {
- return new Vh();
- }, e3.prototype.createDataItem = function() {
- return new Lh();
- }, e3.prototype.setInitialWorkingValues = function(t3) {
- var e4 = this._yAxis.get(), i3 = this._xAxis.get();
- if (this.appeared && this.visible) {
- var n3 = this.dataItems.getIndex(t3.index - 1);
- if (t3.component = this, this.baseAxis == i3 && e4 instanceof bh) {
- var r3 = e4.minZoomed;
- if (n3 && (r3 = n3.values.valueY.workingValue), t3.setWorkingValue("valueY", r3, 0), t3.setWorkingValue("valueY", t3.values.valueY.value), i3 instanceof Ph)
- t3.setWorkingLocation("dateX", t3.locations.dateX - 1, 0), t3.setWorkingLocation("dateX", t3.locations.dateX);
- else if (i3 instanceof Mh && n3) {
- var s2 = t3.valueX;
- t3.setWorkingValue("valueX", n3.valueX, 0), t3.setWorkingValue("valueX", s2);
- }
- }
- if (this.baseAxis == e4 && i3 instanceof bh) {
- var a2 = i3.minZoomed;
- n3 && (a2 = n3.values.valueX.workingValue), t3.setWorkingValue("valueX", a2, 0), t3.setWorkingValue("valueX", t3.values.valueX.value), e4 instanceof Ph ? (t3.setWorkingLocation("dateY", t3.locations.dateX - 1, 0), t3.setWorkingLocation("dateY", t3.locations.dateY)) : e4 instanceof Mh && n3 && (s2 = t3.valueY, t3.setWorkingValue("valueY", n3.valueY, 0), t3.setWorkingValue("valueY", s2));
- }
- } else
- this.baseAxis == i3 && e4 instanceof bh && (i3 instanceof Ph && t3.setWorkingLocation("dateX", t3.locations.dateX), i3 instanceof Sh && t3.setWorkingLocation("categoryX", t3.locations.categoryX)), this.baseAxis == e4 && i3 instanceof bh && (e4 instanceof Ph && t3.setWorkingLocation("dateY", t3.locations.dateY), e4 instanceof Sh && t3.setWorkingLocation("categoryY", t3.locations.categoryY));
- }, e3.prototype.updateLegendValue = function(e4, i3) {
- t2.prototype.updateLegendValue.call(this, e4, i3), e4 && e4.segment && (this.tooltipColorSource = e4.segment);
- }, e3.prototype.validate = function() {
- var e4 = this;
- t2.prototype.validate.call(this), this.xAxis && this.yAxis && (this._segmentsIterator.reset(), this.openSegmentWrapper(this._adjustedStartIndex), ti(this.axisRanges.iterator(), function(t3) {
- e4.openSegmentWrapper(e4._adjustedStartIndex, t3);
- }), ti(this._segmentsIterator.iterator(), function(t3) {
- t3.__disabled = true;
- }));
- }, e3.prototype.sliceData = function() {
- for (var t3 = this.startIndex, e4 = this.endIndex, i3 = this.startIndex - 1; i3 >= 0; i3--)
- if ((r3 = this.dataItems.getIndex(i3)) && r3.hasValue(this._xValueFields) && r3.hasValue(this._yValueFields)) {
- t3 = i3;
- break;
- }
- this._adjustedStartIndex = this.findAdjustedIndex(t3, ["stroke", "strokeWidth", "strokeDasharray", "strokeOpacity", "fill", "fillOpacity", "opacity"]), i3 = this.endIndex;
- for (var n3 = this.dataItems.length; i3 < n3; i3++) {
- var r3;
- if ((r3 = this.dataItems.getIndex(i3)) && r3.hasValue(this._xValueFields) && r3.hasValue(this._yValueFields)) {
- e4 = i3 + 1;
- break;
- }
- }
- this._workingStartIndex = t3, this._workingEndIndex = e4;
- }, e3.prototype.findAdjustedIndex = function(t3, e4) {
- var i3 = this, n3 = this.propertyFields, r3 = t3;
- return Ut(e4, function(e5) {
- if (Z(n3[e5]))
- for (var s2 = r3; s2 >= 0; s2--) {
- var a2 = i3.dataItems.getIndex(s2);
- if (a2 && Z(a2.properties[e5])) {
- t3 > s2 && (t3 = s2);
- break;
- }
- }
- }), t3;
- }, e3.prototype.openSegmentWrapper = function(t3, e4) {
- var i3 = { index: t3, axisRange: e4 };
- do {
- i3 = this.openSegment(i3.index, i3.axisRange);
- } while (i3);
- }, e3.prototype.getSegment = function() {
- var t3 = this._segmentsIterator.getFirst();
- return t3.series = this, t3.isDisposed() ? (this.segments.removeValue(t3), this.getSegment()) : t3;
- }, e3.prototype.openSegment = function(t3, e4) {
- var i3 = false, n3 = [];
- t3 = Math.min(t3, this.dataItems.length);
- var r3, s2 = Math.min(this._workingEndIndex, this.dataItems.length);
- this._workingEndIndex = Math.min(this._workingEndIndex, this.dataItems.length);
- var a2 = false, o3 = this.getSegment();
- o3.strokeDasharray = void 0, o3.__disabled = false, e4 ? (o3.parent = e4.contents, Ue(e4.contents, o3, Ka)) : (Ue(this, o3, Ka), o3.filters.clear(), o3.parent = this.segmentsContainer), this.group.node.removeAttribute("fill");
- for (var l2 = this.connect, h2 = false, p2 = t3; p2 < s2; p2++) {
- var u2 = this.dataItems.getIndex(p2);
- if (u2.segment = o3, u2.hasProperties && (p2 == t3 ? this.updateSegmentProperties(u2.properties, o3) : a2 = this.updateSegmentProperties(u2.properties, o3, true)), u2.hasValue(this._xValueFields) && u2.hasValue(this._yValueFields))
- this.addPoints(n3, u2, this.xField, this.yField), h2 = true;
- else {
- if (p2 == t3)
- continue;
- if (!l2 && h2) {
- r3 = p2;
- break;
- }
- }
- if (r3 = p2, this.baseAxis instanceof Ph) {
- var d2 = this.dataItems.getIndex(p2 + 1);
- if (d2 && this.baseAxis.makeGap(d2, u2)) {
- i3 = true;
- break;
- }
- }
- if (a2)
- break;
- }
- return this.closeSegment(o3, n3, t3, r3, e4, i3);
- }, e3.prototype.addPoints = function(t3, e4, i3, n3, r3) {
- var s2 = this.getPoint(e4, i3, n3, e4.workingLocations[i3], e4.workingLocations[n3]);
- r3 || (e4.point = s2), t3.push(s2);
- }, e3.prototype.closeSegment = function(t3, e4, i3, n3, r3, s2) {
- var a2 = [];
- if (this.dataFields[this._xOpenField] || this.dataFields[this._yOpenField] || this.stacked)
- for (var o3 = n3; o3 >= i3; o3--) {
- var l2 = this.dataItems.getIndex(o3);
- l2.hasValue(this._xValueFields) && l2.hasValue(this._yValueFields) && this.addPoints(a2, l2, this.xOpenField, this.yOpenField, true);
- }
- else {
- var h2 = this.baseAxis, p2 = e4.length, u2 = this.xAxis, d2 = this.yAxis;
- p2 > 0 && (h2 == u2 ? (a2.push({ x: e4[p2 - 1].x, y: d2.basePoint.y }), a2.push({ x: e4[0].x, y: d2.basePoint.y })) : (a2.push({ x: u2.basePoint.x, y: e4[p2 - 1].y }), a2.push({ x: u2.basePoint.x, y: e4[0].y })));
- }
- return this.drawSegment(t3, e4, a2), s2 && n3++, n3 < this._workingEndIndex - 1 ? { index: n3, axisRange: r3 } : null;
- }, e3.prototype.drawSegment = function(t3, e4, i3) {
- t3.drawSegment(e4, i3, this.tensionX, this.tensionY);
- }, e3.prototype.updateSegmentProperties = function(t3, e4, i3) {
- var n3 = false;
- return Ne(t3, function(t4, r3) {
- if (Z(r3)) {
- var s2 = e4[t4], a2 = void 0;
- s2 && (a2 = s2.toString ? s2.toString() : s2);
- var o3 = void 0;
- r3 && (o3 = r3.toString ? r3.toString() : r3), s2 == r3 || a2 != null && o3 != null && a2 == o3 || (i3 || (e4[t4] = r3), n3 = true);
- }
- }), n3;
- }, Object.defineProperty(e3.prototype, "connect", { get: function() {
- return this.getPropertyValue("connect");
- }, set: function(t3) {
- this.setPropertyValue("connect", t3) && this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tensionX", { get: function() {
- return this.getPropertyValue("tensionX");
- }, set: function(t3) {
- this.setPropertyValue("tensionX", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tensionY", { get: function() {
- return this.getPropertyValue("tensionY");
- }, set: function(t3) {
- this.setPropertyValue("tensionY", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.createLegendMarker = function(t3) {
- var e4 = this, i3 = t3.pixelWidth, n3 = t3.pixelHeight;
- t3.disposeChildren();
- var r3 = t3.createChild(bo);
- if (r3.shouldClone = false, Ue(this, r3, Ka), r3.x2 = i3, r3.y = n3 / 2, r3.y2 = 1e-5, r3.visible = true, this.fillOpacity > 0) {
- var s2 = t3.createChild(qa);
- Ue(this, s2, Ka), s2.width = i3, s2.height = n3, s2.y = 0, s2.strokeOpacity = 0, s2.visible = true, r3.y = 0;
- }
- var a2 = t3.dataItem;
- a2.color = this.stroke, a2.colorOrig = this.fill, Qe(this.bullets.iterator(), function(r4) {
- if (r4 instanceof ql && !r4.copyToLegendMarker)
- return false;
- var s3 = false;
- if (r4 instanceof $a && ti(r4.children.iterator(), function(t4) {
- if (t4 instanceof co)
- return s3 = true, true;
- }), !s3) {
- var a3 = r4.clone();
- return a3.parent = t3, a3.isMeasured = true, a3.tooltipText = void 0, a3.x = i3 / 2, e4.fillOpacity > 0 ? a3.y = 0 : a3.y = n3 / 2, a3.visible = true, Z(a3.fill) || (a3.fill = e4.fill), Z(a3.stroke) || (a3.stroke = e4.stroke), false;
- }
- });
- }, e3.prototype.disposeData = function() {
- t2.prototype.disposeData.call(this), this.segments.clear();
- }, Object.defineProperty(e3.prototype, "autoGapCount", { get: function() {
- return this.getPropertyValue("autoGapCount");
- }, set: function(t3) {
- this.setPropertyValue("autoGapCount", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "smoothing", { get: function() {
- return this.getPropertyValue("smoothing");
- }, set: function(t3) {
- this.setPropertyValue("smoothing", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(Dh);
- Ii.registeredClasses.LineSeries = jh, Ii.registeredClasses.LineSeriesDataItem = Lh;
- var Eh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "RadarSeriesDataItem", e4.setLocation("dateX", 0, 0), e4.setLocation("dateY", 0, 0), e4.setLocation("categoryX", 0, 0), e4.setLocation("categoryY", 0, 0), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Lh), Rh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "RadarSeries", e4.connectEnds = true, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.validate = function() {
- this.chart.invalid && this.chart.validate(), t2.prototype.validate.call(this);
- }, e3.prototype.createDataItem = function() {
- return new Eh();
- }, e3.prototype.getPoint = function(t3, e4, i3, n3, r3, s2, a2) {
- s2 || (s2 = "valueX"), a2 || (a2 = "valueY");
- var o3 = _t({ x: this.yAxis.getX(t3, i3, r3, a2), y: this.yAxis.getY(t3, i3, r3, a2) });
- o3 == 0 && (o3 = 1e-5);
- var l2 = this.xAxis.getAngle(t3, e4, n3, s2), h2 = this.chart.startAngle, p2 = this.chart.endAngle;
- return l2 < h2 || l2 > p2 ? void 0 : { x: o3 * ft(l2), y: o3 * dt(l2) };
- }, e3.prototype.addPoints = function(t3, e4, i3, n3, r3) {
- var s2 = this.getPoint(e4, i3, n3, e4.locations[i3], e4.locations[n3]);
- s2 && t3.push(s2);
- }, e3.prototype.getMaskPath = function() {
- var t3 = this.yAxis.renderer;
- return ko(t3.startAngle, t3.endAngle - t3.startAngle, t3.pixelRadius, t3.pixelInnerRadius);
- }, e3.prototype.drawSegment = function(e4, i3, n3) {
- var r3 = this.yAxis.renderer;
- this.connectEnds && Math.abs(r3.endAngle - r3.startAngle) == 360 && (this.dataFields[this._xOpenField] || this.dataFields[this._yOpenField] || this.stacked) && (i3.push(i3[0]), n3.length > 0 && n3.unshift(n3[n3.length - 1])), t2.prototype.drawSegment.call(this, e4, i3, n3);
- }, Object.defineProperty(e3.prototype, "connectEnds", { get: function() {
- return this.getPropertyValue("connectEnds");
- }, set: function(t3) {
- this.setPropertyValue("connectEnds", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.positionBulletReal = function(t3, e4, i3) {
- var n3 = this.xAxis, r3 = this.yAxis;
- (e4 < n3.start || e4 > n3.end || i3 < r3.start || i3 > r3.end) && (t3.visible = false), t3.moveTo(this.xAxis.renderer.positionToPoint(e4, i3));
- }, e3.prototype.setXAxis = function(e4) {
- t2.prototype.setXAxis.call(this, e4), this.updateRendererRefs();
- }, e3.prototype.setYAxis = function(e4) {
- t2.prototype.setYAxis.call(this, e4), this.updateRendererRefs();
- }, e3.prototype.updateRendererRefs = function() {
- var t3 = this.xAxis.renderer, e4 = this.yAxis.renderer;
- t3.axisRendererY = e4;
- }, e3;
- }(jh);
- Ii.registeredClasses.RadarSeries = Rh, Ii.registeredClasses.RadarSeriesDataItem = Eh;
- var Bh = function(t2) {
- function e3(e4) {
- var i3 = t2.call(this, e4) || this;
- return i3.className = "AxisFillCircular", i3.element = i3.paper.add("path"), i3.radius = V(100), i3.applyTheme(), i3;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- if (t2.prototype.draw.call(this), !this.__disabled && !this.disabled && this.axis) {
- var e4 = this.axis.renderer;
- this.fillPath = e4.getPositionRangePath(this.startPosition, this.endPosition, this.radius, Z(this.innerRadius) ? this.innerRadius : e4.innerRadius, this.cornerRadius), this.path = this.fillPath;
- }
- }, Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- return this.getPropertyValue("innerRadius");
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cornerRadius", { get: function() {
- return this.getPropertyValue("cornerRadius");
- }, set: function(t3) {
- this.setPropertyValue("cornerRadius", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(hh);
- Ii.registeredClasses.AxisFillCircular = Bh;
- var Hh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "GridCircular", e4.pixelPerfect = false, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- return this.getPropertyValue("innerRadius");
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), e3;
- }(ph);
- Ii.registeredClasses.GridCircular = Hh;
- var Nh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.fdx = 0, e4.fdy = 0, e4.className = "AxisLabelCircular", e4.padding(0, 0, 0, 0), e4.location = 0.5, e4.locationOnPath = 0.5, e4.radius = 0, e4.isMeasured = false, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "relativeRotation", { get: function() {
- return this.getPropertyValue("relativeRotation");
- }, set: function(t3) {
- if (this.setPropertyValue("relativeRotation", t3, true), !Z(t3)) {
- this.rotation = void 0;
- var e4 = this.dataItem;
- e4 && e4.component && e4.component.invalidateDataItems();
- }
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "bent", { get: function() {
- return this.getPropertyValue("bent");
- }, set: function(t3) {
- this.setPropertyValue("bent", t3, true), this.setPropertyValue("wrap", false), this.setPropertyValue("horizontalCenter", "none"), this.setPropertyValue("verticalCenter", "none"), t3 ? (this.setPropertyValue("dx", 0), this.setPropertyValue("dy", 0), this.setPropertyValue("x", 0), this.setPropertyValue("y", 0), this.setPropertyValue("rotation", 0), this.fdx = 0, this.fdy = 0, this.textAlign = "middle") : this.textPathElement && (this.textPathElement.dispose(), this.textPathElement = void 0);
- }, enumerable: true, configurable: true }), e3.prototype.pixelRadius = function(t3) {
- var e4 = 1;
- return this.inside && (e4 = -1), Vn(this.radius, t3) * e4;
- }, e3.prototype.pixelRadiusY = function(t3, e4) {
- var i3 = 1;
- this.inside && (i3 = -1);
- var n3 = this.radius;
- return tt(n3) ? Vn(n3 *= e4 / t3, t3) * i3 : Vn(n3, e4) * i3;
- }, e3.prototype.fixPosition = function(t3, e4, i3, n3, r3) {
- tt(i3) || (i3 = e4), tt(n3) || (n3 = 0), tt(r3) || (r3 = 0);
- var s2 = { x: e4 * ft(t3), y: i3 * dt(t3) };
- this.invalid && this.validate();
- var a2 = false, o3 = this.radius;
- (o3 instanceof A && o3.value < 0 || o3 < 0) && (a2 = true);
- var l2 = this.relativeRotation, h2 = this.pixelRadius(e4);
- if (this.bent) {
- var p2 = { x: (e4 + h2) * ft(t3 + 180), y: (i3 + h2 * i3 / e4) * dt(t3 + 180) };
- return this.path = wo(p2) + Do(t3 + 180, 360, e4 + h2, i3 + h2 * i3 / e4), void (this.textPathElement && this.textPathElement.attr({ startOffset: 100 * this.locationOnPath + "%" }));
- }
- if (tt(l2)) {
- this.horizontalCenter = "none", this.verticalCenter = "none", t3 = Rt(t3, -180, 180);
- var u2 = this.bbox.width, d2 = this.bbox.height, c2 = this.pixelPaddingBottom, f2 = this.pixelPaddingTop, g2 = this.pixelPaddingLeft, y2 = this.pixelPaddingRight;
- t3 > 90 || t3 < -90 ? l2 == -90 && (l2 = 90, u2 = 0) : (l2 == -90 && (d2 = -d2), l2 == 90 && (l2 = -90, u2 = -g2 - y2, d2 = -d2 - f2 - c2)), this.rotation = l2 + t3 + 90;
- var m2 = dt(l2) / 2, v2 = ft(l2) / 2, b2 = this.rotation;
- this.dx = d2 * m2 * dt(b2) - u2 * v2 * ft(b2), this.dy = -d2 * m2 * ft(b2) - u2 * v2 * dt(b2), this.inside ? t3 > 90 || t3 < -90 ? h2 -= (c2 + f2) * ft(l2) + (g2 + y2) * dt(l2) : h2 += (c2 + this.bbox.height + f2) * ft(l2) + (g2 + y2 + this.bbox.width) * dt(l2) : h2 += (d2 + c2 + f2) * ft(l2) + (u2 + g2 + y2) * dt(l2), s2.x += ft(t3) * h2, s2.y += dt(t3) * h2 * i3 / e4;
- } else
- this.horizontalCenter = "middle", this.verticalCenter = "middle", a2 ? (this.dx = 0, this.dy = 0, s2.x = (e4 + h2) * ft(t3), s2.y = (i3 + h2 * i3 / e4) * dt(t3)) : (this.dy = this._measuredHeight / 2 * dt(t3), this.dx = this._measuredWidth / 2 * ft(t3), s2.x += ft(t3) * h2, s2.y += dt(t3) * h2 * i3 / e4);
- s2.x += n3, s2.y += r3, this.fdx = this.dx, this.fdy = this.dy, this.moveTo(s2);
- }, e3;
- }(uh);
- Ii.registeredClasses.AxisLabelCircular = Nh;
- var Wh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.pixelRadiusReal = 0, e4.layout = "none", e4.className = "AxisRendererCircular", e4.isMeasured = false, e4.startAngle = -90, e4.endAngle = 270, e4.useChartAngles = true, e4.radius = V(100), e4.isMeasured = false, e4.grid.template.location = 0, e4.labels.template.location = 0, e4.labels.template.radius = 15, e4.ticks.template.location = 0, e4.ticks.template.pixelPerfect = false, e4.tooltipLocation = 0, e4.line.strokeOpacity = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.setAxis = function(e4) {
- var i3 = this;
- t2.prototype.setAxis.call(this, e4), e4.isMeasured = false;
- var n3 = e4.tooltip;
- n3.adapter.add("dx", function(t3, e5) {
- var n4 = pr({ x: e5.pixelX, y: e5.pixelY }, i3);
- return i3.pixelRadius * Math.cos(Math.atan2(n4.y, n4.x)) - n4.x;
- }), n3.adapter.add("dy", function(t3, e5) {
- var n4 = pr({ x: e5.pixelX, y: e5.pixelY }, i3);
- return i3.pixelRadius * Math.sin(Math.atan2(n4.y, n4.x)) - n4.y;
- });
- }, e3.prototype.validate = function() {
- this.chart && this.chart.invalid && this.chart.validate(), t2.prototype.validate.call(this);
- }, Object.defineProperty(e3.prototype, "axisLength", { get: function() {
- return 2 * Math.PI * this.pixelRadius;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, false, false, 10, false) && this.axis && this.axis.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelRadius", { get: function() {
- return Fn(this.radius, this.pixelRadiusReal) || 0;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- var t3 = this.chart, e4 = this.getPropertyValue("innerRadius");
- if (t3) {
- if (Z(e4)) {
- if (e4 instanceof A && t3) {
- var i3 = t3.mr, n3 = e4.value;
- e4 = V(100 * (n3 = Math.max(i3 * n3, i3 - Math.min(t3.plotContainer.innerHeight, t3.plotContainer.innerWidth)) / i3));
- }
- } else
- (e4 = t3.innerRadius) instanceof A && t3 && (e4 = V(e4.value * t3.innerRadiusModifyer * 100));
- return e4;
- }
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, false, false, 10, false) && this.axis && this.axis.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "useChartAngles", { get: function() {
- return this.getPropertyValue("useChartAngles");
- }, set: function(t3) {
- this.setPropertyValue("useChartAngles", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelInnerRadius", { get: function() {
- return Fn(this.innerRadius, this.pixelRadiusReal) || 0;
- }, enumerable: true, configurable: true }), e3.prototype.positionToPoint = function(t3, e4) {
- tt(e4) || (e4 = 1);
- var i3 = this.positionToCoordinate(t3), n3 = this.startAngle + (this.endAngle - this.startAngle) * i3 / this.axisLength, r3 = this.pixelRadius, s2 = this.pixelInnerRadius;
- if (this.axisRendererY) {
- var a2 = ut(this.axisRendererY.positionToCoordinate(e4), 0, 1 / 0);
- return a2 == 0 && (a2 = 1e-6), { x: a2 * ft(n3), y: a2 * dt(n3) };
- }
- return { x: ft(n3) * s2 + (r3 - s2) * ft(n3) * e4, y: dt(n3) * s2 + (r3 - s2) * dt(n3) * e4 };
- }, e3.prototype.positionToAngle = function(t3) {
- var e4 = this.axis, i3 = (this.endAngle - this.startAngle) / (e4.end - e4.start);
- return lt(e4.renderer.inversed ? this.startAngle + (e4.end - t3) * i3 : this.startAngle + (t3 - e4.start) * i3, 3);
- }, e3.prototype.angleToPosition = function(t3) {
- var e4 = this.axis, i3 = (this.endAngle - this.startAngle) / (e4.end - e4.start);
- return lt(e4.renderer.inversed ? e4.end - (t3 - this.startAngle) / i3 : (t3 - this.startAngle) / i3 + e4.start, 5);
- }, e3.prototype.updateAxisLine = function() {
- var t3 = this.pixelRadius, e4 = this.startAngle, i3 = yt(360, this.endAngle - e4);
- this.line.path = wo({ x: t3 * ft(e4), y: t3 * dt(e4) }) + Do(e4, i3, t3, t3);
- }, e3.prototype.updateGridElement = function(t3, e4, i3) {
- e4 += (i3 - e4) * t3.location;
- var n3 = this.positionToPoint(e4);
- if (tt(n3.x) && tt(n3.y) && t3.element) {
- var r3 = at * Math.atan2(n3.y, n3.x), s2 = Fn(Z(t3.radius) ? t3.radius : V(100), this.pixelRadius), a2 = Fn(t3.innerRadius, this.pixelRadius);
- t3.zIndex = 0;
- var o3 = Fn(tt(a2) ? a2 : this.innerRadius, this.pixelRadiusReal, true);
- tt(o3) || (o3 = 0), t3.path = wo({ x: o3 * ft(r3), y: o3 * dt(r3) }) + Co({ x: s2 * ft(r3), y: s2 * dt(r3) });
- }
- this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.updateTickElement = function(t3, e4, i3) {
- e4 += (i3 - e4) * t3.location;
- var n3 = this.positionToPoint(e4);
- if (t3.element) {
- var r3 = this.pixelRadius, s2 = at * Math.atan2(n3.y, n3.x), a2 = t3.length;
- t3.inside && (a2 = -a2), t3.zIndex = 1, t3.path = wo({ x: r3 * ft(s2), y: r3 * dt(s2) }) + Co({ x: (r3 + a2) * ft(s2), y: (r3 + a2) * dt(s2) });
- }
- this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.updateBullet = function(t3, e4, i3) {
- var n3 = 0.5;
- t3 instanceof gh && (n3 = t3.location), e4 += (i3 - e4) * n3;
- var r3 = this.positionToPoint(e4), s2 = this.pixelRadius, a2 = at * Math.atan2(r3.y, r3.x);
- r3 = { x: s2 * ft(a2), y: s2 * dt(a2) }, this.positionItem(t3, r3), this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.updateLabelElement = function(t3, e4, i3, n3) {
- Z(n3) || (n3 = t3.location), e4 += (i3 - e4) * n3, t3.fixPosition(this.positionToAngle(e4), this.pixelRadius), t3.zIndex = 2, this.toggleVisibility(t3, e4, this.minLabelPosition, this.maxLabelPosition);
- }, e3.prototype.fitsToBounds = function(t3) {
- return true;
- }, Object.defineProperty(e3.prototype, "startAngle", { get: function() {
- return this.getPropertyValue("startAngle");
- }, set: function(t3) {
- this.setPropertyValue("startAngle", t3) && (this.invalidateAxisItems(), this.axis && this.axis.invalidateSeries());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endAngle", { get: function() {
- return this.getPropertyValue("endAngle");
- }, set: function(t3) {
- this.setPropertyValue("endAngle", t3) && (this.invalidateAxisItems(), this.axis && this.axis.invalidateSeries());
- }, enumerable: true, configurable: true }), e3.prototype.getPositionRangePath = function(t3, e4, i3, n3, r3) {
- var s2 = "";
- if (tt(t3) && tt(e4)) {
- Z(i3) || (i3 = this.radius), t3 = gt(t3, this.axis.start), (e4 = yt(e4, this.axis.end)) < t3 && (e4 = t3);
- var a2 = Fn(i3, this.pixelRadius), o3 = Fn(n3, this.pixelRadius, true), l2 = this.positionToAngle(t3);
- s2 = ko(l2, this.positionToAngle(e4) - l2, a2, o3, a2, r3);
- }
- return s2;
- }, e3.prototype.createGrid = function() {
- return new Hh();
- }, e3.prototype.createFill = function(t3) {
- return new Bh(t3);
- }, e3.prototype.createLabel = function() {
- return new Nh();
- }, e3.prototype.pointToPosition = function(t3) {
- var e4 = Rt(Dt(t3), this.startAngle, this.endAngle);
- return this.coordinateToPosition((e4 - this.startAngle) / 360 * this.axisLength);
- }, e3;
- }(fh);
- Ii.registeredClasses.AxisRendererCircular = Wh;
- var Xh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._chart = new ve(), e4.pixelRadiusReal = 0, e4.className = "AxisRendererRadial", e4.isMeasured = false, e4.startAngle = -90, e4.endAngle = 270, e4.minGridDistance = 30, e4.gridType = "circles", e4.axisAngle = -90, e4.isMeasured = false, e4.layout = "none", e4.radius = V(100), e4.line.strokeOpacity = 0, e4.labels.template.horizontalCenter = "middle", e4._disposers.push(e4._chart), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.validate = function() {
- this.chart && this.chart.invalid && this.chart.validate(), t2.prototype.validate.call(this);
- }, Object.defineProperty(e3.prototype, "axisLength", { get: function() {
- return this.pixelRadius - this.pixelInnerRadius;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, false, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelRadius", { get: function() {
- return Fn(this.radius, this.pixelRadiusReal) || 0;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- var t3 = this.chart, e4 = this.getPropertyValue("innerRadius");
- if (t3)
- if (Z(e4)) {
- if (e4 instanceof A && t3) {
- var i3 = t3.mr, n3 = e4.value;
- e4 = V(100 * (n3 = Math.max(i3 * n3, i3 - Math.min(t3.plotContainer.innerHeight, t3.plotContainer.innerWidth)) / i3));
- }
- } else
- (e4 = t3.innerRadius) instanceof A && t3 && (e4 = V(e4.value * t3.innerRadiusModifyer * 100));
- return e4;
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, false, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelInnerRadius", { get: function() {
- return Fn(this.innerRadius, this.pixelRadiusReal) || 0;
- }, enumerable: true, configurable: true }), e3.prototype.positionToPoint = function(t3, e4) {
- var i3 = ut(this.positionToCoordinate(t3), 0, 1 / 0);
- return { x: i3 * ft(this.axisAngle), y: i3 * dt(this.axisAngle) };
- }, e3.prototype.updateAxisLine = function() {
- this.line.path = wo({ x: this.pixelInnerRadius * ft(this.axisAngle), y: this.pixelInnerRadius * dt(this.axisAngle) }) + Co({ x: this.pixelRadius * ft(this.axisAngle), y: this.pixelRadius * dt(this.axisAngle) });
- var t3 = this.axis.title;
- t3.valign = "none", t3.horizontalCenter = "middle", t3.verticalCenter = "bottom", t3.y = -this.axisLength / 2;
- var e4 = 90;
- this.opposite ? this.inside || (e4 = -90) : this.inside && (e4 = -90), t3.rotation = e4;
- }, e3.prototype.updateGridElement = function(t3, e4, i3) {
- e4 += (i3 - e4) * t3.location;
- var n3, r3 = _t(this.positionToPoint(e4)), s2 = this.startAngle, a2 = this.endAngle, o3 = this.chart;
- if (tt(r3) && t3.element && o3) {
- var l2 = o3.xAxes.getIndex(0), h2 = 0, p2 = o3.series.getIndex(0);
- if (p2 && (h2 = p2.dataItems.length), this.gridType == "polygons" && h2 > 0 && p2 && l2 && l2 instanceof Sh) {
- var u2 = l2.renderer.grid.template.location, d2 = l2.getAngle(p2.dataItems.getIndex(0), "categoryX", u2);
- n3 = wo({ x: r3 * ft(d2), y: r3 * dt(d2) });
- for (var c2 = 1; c2 < h2; c2++)
- n3 += Co({ x: r3 * ft(d2 = l2.getAngle(p2.dataItems.getIndex(c2), "categoryX", u2)), y: r3 * dt(d2) });
- n3 += Co({ x: r3 * ft(d2 = l2.getAngle(p2.dataItems.getIndex(h2 - 1), "categoryX", l2.renderer.cellEndLocation)), y: r3 * dt(d2) });
- } else
- n3 = wo({ x: r3 * ft(s2), y: r3 * dt(s2) }) + Do(s2, a2 - s2, r3, r3);
- t3.path = n3;
- }
- this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.updateLabelElement = function(t3, e4, i3, n3) {
- Z(n3) || (n3 = t3.location), e4 += (i3 - e4) * n3;
- var r3 = this.positionToPoint(e4);
- this.positionItem(t3, r3), this.toggleVisibility(t3, e4, this.minLabelPosition, this.maxLabelPosition);
- }, e3.prototype.updateBaseGridElement = function() {
- }, e3.prototype.fitsToBounds = function(t3) {
- return true;
- }, Object.defineProperty(e3.prototype, "startAngle", { get: function() {
- return this.getPropertyValue("startAngle");
- }, set: function(t3) {
- this.setPropertyValue("startAngle", t3) && this.invalidateAxisItems();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endAngle", { get: function() {
- return this.getPropertyValue("endAngle");
- }, set: function(t3) {
- this.setPropertyValue("endAngle", t3) && this.invalidateAxisItems();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "axisAngle", { get: function() {
- return this.getPropertyValue("axisAngle");
- }, set: function(t3) {
- this.setPropertyValue("axisAngle", Et(t3)), this.invalidateAxisItems();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "gridType", { get: function() {
- return this.chart.xAxes.getIndex(0) instanceof Sh ? this.getPropertyValue("gridType") : "circles";
- }, set: function(t3) {
- this.setPropertyValue("gridType", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.getPositionRangePath = function(t3, e4) {
- var i3, n3 = this.pixelInnerRadius, r3 = this.axisLength + n3, s2 = ut(this.positionToCoordinate(t3), n3, r3), a2 = ut(this.positionToCoordinate(e4), n3, r3), o3 = this.startAngle, l2 = this.endAngle - o3, h2 = this.chart, p2 = h2.xAxes.getIndex(0), u2 = h2.series.getIndex(0), d2 = 0;
- if (u2 && (d2 = u2.dataItems.length), this.gridType == "polygons" && d2 > 0 && u2 && p2 && p2 instanceof Sh) {
- var c2 = p2.renderer.grid.template.location, f2 = p2.getAngle(u2.dataItems.getIndex(0), "categoryX", c2);
- i3 = wo({ x: a2 * ft(f2), y: a2 * dt(f2) });
- for (var g2 = 1; g2 < d2; g2++)
- i3 += Co({ x: a2 * ft(f2 = p2.getAngle(u2.dataItems.getIndex(g2), "categoryX", c2)), y: a2 * dt(f2) });
- for (i3 += Co({ x: a2 * ft(f2 = p2.getAngle(u2.dataItems.getIndex(d2 - 1), "categoryX", p2.renderer.cellEndLocation)), y: a2 * dt(f2) }), i3 += wo({ x: s2 * ft(f2), y: s2 * dt(f2) }), g2 = d2 - 1; g2 >= 0; g2--)
- i3 += Co({ x: s2 * ft(f2 = p2.getAngle(u2.dataItems.getIndex(g2), "categoryX", c2)), y: s2 * dt(f2) });
- } else
- i3 = ko(o3, l2, a2, s2);
- return i3;
- }, e3.prototype.updateBreakElement = function(t3) {
- var e4 = t3.startLine, i3 = t3.endLine, n3 = t3.fillShape, r3 = t3.startPoint, s2 = t3.endPoint;
- e4.radius = Math.abs(r3.y), i3.radius = Math.abs(s2.y), n3.radius = Math.abs(s2.y), n3.innerRadius = Math.abs(r3.y);
- }, e3.prototype.createBreakSprites = function(t3) {
- t3.startLine = new hl(), t3.endLine = new hl(), t3.fillShape = new hl();
- }, e3.prototype.updateTooltip = function() {
- if (this.axis) {
- var t3 = this.axisAngle;
- t3 < 0 && (t3 += 360);
- var e4 = "vertical";
- (t3 > 45 && t3 < 135 || t3 > 225 && t3 < 315) && (e4 = "horizontal"), this.axis.updateTooltip(e4, { x: -4e3, y: -4e3, width: 8e3, height: 8e3 });
- }
- }, e3.prototype.updateTickElement = function(t3, e4, i3) {
- e4 += (i3 - e4) * t3.location;
- var n3 = this.positionToPoint(e4);
- if (t3.element) {
- var r3 = Et(this.axisAngle + 90);
- r3 / 90 != Math.round(r3 / 90) ? t3.pixelPerfect = false : t3.pixelPerfect = true;
- var s2 = -t3.length;
- t3.inside && (s2 *= -1), t3.path = wo({ x: 0, y: 0 }) + Co({ x: s2 * ft(r3), y: s2 * dt(r3) });
- }
- this.positionItem(t3, n3), this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.updateBullet = function(t3, e4, i3) {
- var n3 = 0.5;
- t3 instanceof gh && (n3 = t3.location), e4 += (i3 - e4) * n3;
- var r3 = this.positionToPoint(e4);
- this.positionItem(t3, r3), this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.positionToCoordinate = function(t3) {
- var e4 = this.axis, i3 = e4.axisFullLength, n3 = this.pixelInnerRadius;
- return lt(e4.renderer.inversed ? (e4.end - t3) * i3 + n3 : (t3 - e4.start) * i3 + n3, 1);
- }, e3.prototype.pointToPosition = function(t3) {
- var e4 = _t(t3) - this.pixelInnerRadius;
- return this.coordinateToPosition(e4);
- }, Object.defineProperty(e3.prototype, "chart", { get: function() {
- return this._chart.get();
- }, set: function(t3) {
- this._chart.set(t3, null);
- }, enumerable: true, configurable: true }), e3;
- }(yh);
- Ii.registeredClasses.AxisRendererRadial = Xh;
- var Yh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "RadarChartDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Th), zh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._axisRendererX = Wh, e4._axisRendererY = Xh, e4.innerRadiusModifyer = 1, e4.mr = 1, e4.className = "RadarChart", e4.startAngle = -90, e4.endAngle = 270, e4.radius = V(80), e4.innerRadius = 0;
- var i3 = e4.plotContainer.createChild($a);
- return i3.shouldClone = false, i3.layout = "absolute", i3.align = "center", i3.valign = "middle", e4.seriesContainer.parent = i3, e4.radarContainer = i3, e4.bulletsContainer.parent = i3, e4.axisBulletsContainer = i3, e4._cursorContainer = i3, e4.chartContainer.events.on("maxsizechanged", e4.invalidate, e4, false), e4._bulletMask = i3.createChild(yo), e4._bulletMask.shouldClone = false, e4._bulletMask.element = e4.paper.add("path"), e4._bulletMask.opacity = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Radar chart"));
- }, e3.prototype.processAxis = function(e4) {
- t2.prototype.processAxis.call(this, e4);
- var i3 = e4.renderer;
- i3.gridContainer.parent = i3, i3.breakContainer.parent = i3, e4.parent = this.radarContainer, i3.toBack();
- }, e3.prototype.handleXAxisRangeChange = function() {
- t2.prototype.handleXAxisRangeChange.call(this), ti(this.yAxes.iterator(), function(t3) {
- t3.invalidate();
- });
- }, e3.prototype.handleYAxisRangeChange = function() {
- t2.prototype.handleYAxisRangeChange.call(this), ti(this.xAxes.iterator(), function(t3) {
- t3.invalidate();
- });
- }, e3.prototype.processConfig = function(e4) {
- if (e4 && (Z(e4.cursor) && !Z(e4.cursor.type) && (e4.cursor.type = "RadarCursor"), Z(e4.series) && it(e4.series)))
- for (var i3 = 0, n3 = e4.series.length; i3 < n3; i3++)
- e4.series[i3].type = e4.series[i3].type || "RadarSeries";
- t2.prototype.processConfig.call(this, e4);
- }, e3.prototype.beforeDraw = function() {
- t2.prototype.beforeDraw.call(this);
- var e4 = this.plotContainer, i3 = Bt(this.startAngle, this.endAngle, 1), n3 = { x: 0, y: 0, width: 0, height: 0 }, r3 = e4.innerWidth / i3.width, s2 = e4.innerHeight / i3.height, a2 = this.innerRadius;
- if (a2 instanceof A) {
- var o3 = a2.value, l2 = Math.min(r3, s2);
- this.mr = l2, o3 = Math.max(l2 * o3, l2 - Math.min(e4.innerHeight, e4.innerWidth)) / l2, n3 = Bt(this.startAngle, this.endAngle, o3), this.innerRadiusModifyer = o3 / a2.value, a2 = V(100 * o3);
- }
- i3 = At([i3, n3]);
- var h2 = Math.min(e4.innerWidth / i3.width, e4.innerHeight / i3.height), p2 = 2 * Fn(this.radius, h2) || 0, u2 = p2 / 2, d2 = this.startAngle, c2 = this.endAngle;
- this._pixelInnerRadius = Fn(a2, u2), this._bulletMask.path = ko(d2, c2 - d2, u2, this._pixelInnerRadius), ti(this.xAxes.iterator(), function(t3) {
- t3.renderer.useChartAngles && (t3.renderer.startAngle = d2, t3.renderer.endAngle = c2), t3.width = p2, t3.height = p2, t3.renderer.pixelRadiusReal = u2;
- }), ti(this.yAxes.iterator(), function(t3) {
- t3.renderer.startAngle = d2, t3.renderer.endAngle = c2, t3.width = p2, t3.height = p2, t3.renderer.pixelRadiusReal = u2;
- });
- var f2 = this.cursor;
- f2 && (f2.width = p2, f2.height = p2, f2.startAngle = d2, f2.endAngle = c2), this.radarContainer.definedBBox = { x: u2 * i3.x, y: u2 * i3.y, width: u2 * i3.width, height: u2 * i3.height }, this.radarContainer.validatePosition();
- }, e3.prototype.createSeries = function() {
- return new Rh();
- }, Object.defineProperty(e3.prototype, "startAngle", { get: function() {
- return this.getPropertyValue("startAngle");
- }, set: function(t3) {
- this.setPropertyValue("startAngle", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endAngle", { get: function() {
- return this.getPropertyValue("endAngle");
- }, set: function(t3) {
- this.setPropertyValue("endAngle", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelInnerRadius", { get: function() {
- return this._pixelInnerRadius;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- return this.getPropertyValue("innerRadius");
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), e3.prototype.updateXAxis = function(t3) {
- t3 && t3.processRenderer();
- }, e3.prototype.updateYAxis = function(t3) {
- t3 && t3.processRenderer();
- }, e3;
- }(Ah);
- Ii.registeredClasses.RadarChart = zh;
- var Uh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._axis = new ve(), e4.className = "ClockHand";
- var i3 = new Ys();
- e4.fill = i3.getFor("alternativeBackground"), e4.stroke = e4.fill;
- var n3 = new yo();
- n3.radius = 5, e4.pin = n3, e4.isMeasured = false, e4.startWidth = 5, e4.endWidth = 1, e4.width = V(100), e4.height = V(100), e4.radius = V(100), e4.innerRadius = V(0);
- var r3 = new Jo();
- return e4.hand = r3, e4._disposers.push(e4._axis), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.validate = function() {
- t2.prototype.validate.call(this);
- var e4 = this.hand;
- e4.width = this.pixelWidth;
- var i3 = Math.max(this.startWidth, this.endWidth);
- if (e4.height = i3, e4.leftSide = V(this.startWidth / i3 * 100), e4.rightSide = V(this.endWidth / i3 * 100), this.axis) {
- var n3 = this.axis.renderer, r3 = Fn(this.innerRadius, n3.pixelRadius), s2 = Fn(this.radius, n3.pixelRadius);
- e4.x = r3, e4.y = -i3 / 2, e4.width = s2 - r3;
- }
- }, Object.defineProperty(e3.prototype, "pin", { get: function() {
- return this._pin;
- }, set: function(t3) {
- this._pin && this.removeDispose(this._pin), t3 && (this._pin = t3, t3.parent = this, this._disposers.push(t3));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hand", { get: function() {
- return this._hand;
- }, set: function(t3) {
- this._hand && this.removeDispose(this._hand), t3 && (this._hand = t3, t3.parent = this, this._disposers.push(t3));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- return this.getPropertyValue("innerRadius");
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startWidth", { get: function() {
- return this.getPropertyValue("startWidth");
- }, set: function(t3) {
- this.setPropertyValue("startWidth", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endWidth", { get: function() {
- return this.getPropertyValue("endWidth");
- }, set: function(t3) {
- this.setPropertyValue("endWidth", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "rotationDirection", { get: function() {
- return this.getPropertyValue("rotationDirection");
- }, set: function(t3) {
- this.setPropertyValue("rotationDirection", t3);
- }, enumerable: true, configurable: true }), e3.prototype.showValue = function(t3, e4, i3) {
- if (this._value = t3, t3 != null && (tt(e4) || (e4 = 0), this.axis)) {
- var n3 = this.axis.renderer.positionToAngle(this.axis.anyToPosition(t3)), r3 = this.rotation;
- this.rotationDirection == "clockWise" && n3 < r3 && (this.rotation = r3 - 360), this.rotationDirection == "counterClockWise" && n3 > r3 && (this.rotation = r3 + 360), this.animate({ property: "rotation", to: n3 }, e4, i3);
- }
- }, Object.defineProperty(e3.prototype, "currentPosition", { get: function() {
- if (this.axis)
- return this.axis.renderer.angleToPosition(this.rotation);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "value", { get: function() {
- return this._value;
- }, set: function(t3) {
- this.showValue(t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "axis", { get: function() {
- return this._axis.get();
- }, set: function(t3) {
- if (this.axis != t3 && this._axis.set(t3, new me([t3.events.on("datavalidated", this.updateValue, this, false), t3.events.on("datarangechanged", this.updateValue, this, false), t3.events.on("dataitemsvalidated", this.updateValue, this, false), t3.events.on("propertychanged", this.invalidate, this, false)])), t3) {
- var e4 = t3.chart;
- e4 && (this.rotation = e4.startAngle);
- }
- this.parent = t3.renderer, this.zIndex = 5;
- }, enumerable: true, configurable: true }), e3.prototype.updateValue = function() {
- this.value = this.value;
- }, e3.prototype.processConfig = function(e4) {
- e4 && Z(e4.axis) && Q(e4.axis) && this.map.hasKey(e4.axis) && (e4.axis = this.map.getKey(e4.axis)), t2.prototype.processConfig.call(this, e4);
- }, e3;
- }($a);
- Ii.registeredClasses.ClockHand = Uh;
- var Gh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "GaugeChartDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Yh), Kh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "GaugeChart", e4.startAngle = 180, e4.endAngle = 360, e4.hands = new Mi(new Uh()), e4.hands.events.on("inserted", e4.processHand, e4, false), e4._disposers.push(new Ai(e4.hands)), e4._disposers.push(e4.hands.template), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Gauge chart"));
- }, e3.prototype.processHand = function(t3) {
- var e4 = t3.newValue;
- e4.axis || (e4.axis = this.xAxes.getIndex(0));
- }, e3.prototype.configOrder = function(e4, i3) {
- return e4 == i3 ? 0 : e4 == "hands" ? 1 : i3 == "hands" ? -1 : t2.prototype.configOrder.call(this, e4, i3);
- }, e3;
- }(zh);
- Ii.registeredClasses.GaugeChart = Kh;
- var Zh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PercentSeriesDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.uidAttr = function() {
- return this.slice.uidAttr();
- }, e3.prototype.hide = function(e4, i3, n3, r3) {
- return r3 || (r3 = ["value"]), t2.prototype.hide.call(this, e4, i3, 0, r3);
- }, e3.prototype.setVisibility = function(e4, i3) {
- i3 || (e4 ? this.setWorkingValue("value", this.values.value.value, 0, 0) : this.setWorkingValue("value", 0, 0, 0)), t2.prototype.setVisibility.call(this, e4, i3);
- }, e3.prototype.show = function(e4, i3, n3) {
- return n3 || (n3 = ["value"]), t2.prototype.show.call(this, e4, i3, n3);
- }, Object.defineProperty(e3.prototype, "category", { get: function() {
- return this.properties.category;
- }, set: function(t3) {
- this.setProperty("category", t3);
- }, enumerable: true, configurable: true }), e3.prototype.createLegendMarker = function(t3) {
- this.component.createLegendMarker(t3, this);
- }, Object.defineProperty(e3.prototype, "legendDataItem", { get: function() {
- return this._legendDataItem;
- }, set: function(t3) {
- this._legendDataItem = t3, t3.label && (t3.label.dataItem = this), t3.valueLabel && (t3.valueLabel.dataItem = this);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tick", { get: function() {
- var t3 = this;
- if (!this._tick) {
- var e4 = this.component.ticks.create();
- this._tick = e4, this.addSprite(e4), this._disposers.push(e4), e4.parent = this.component.ticksContainer, this._disposers.push(new ye(function() {
- t3.component && t3.component.ticks.removeValue(e4);
- })), e4.visible = this.visible;
- }
- return this._tick;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "label", { get: function() {
- var t3 = this;
- if (!this._label) {
- var e4 = this.component.labels.create();
- this.addSprite(e4), this._label = e4, this._disposers.push(e4), e4.parent = this.component.labelsContainer, this._disposers.push(new ye(function() {
- t3.component && t3.component.labels.removeValue(e4);
- })), e4.visible = this.visible;
- }
- return this._label;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "slice", { get: function() {
- var t3 = this;
- if (!this._slice) {
- var e4 = this.component, i3 = e4.slices.create();
- this.addSprite(i3), this._slice = i3, this._disposers.push(i3), i3.parent = e4.slicesContainer, this._disposers.push(new ye(function() {
- e4.slices.removeValue(i3);
- })), i3.visible = this.visible, e4.itemsFocusable() ? (Z(this.component.role) || (this.component.role = "menu"), Z(i3.role) || (i3.role = "menuitem"), i3.focusable = true) : (Z(this.component.role) || (this.component.role = "list"), Z(i3.role) || (i3.role = "listitem"), i3.focusable = false), i3.focusable && (i3.events.on("focus", function(n3) {
- i3.readerTitle = e4.populateString(e4.itemReaderText, t3);
- }, void 0, false), i3.events.on("blur", function(t4) {
- i3.readerTitle = "";
- }, void 0, false)), i3.hoverable && (i3.events.on("over", function(n3) {
- i3.readerTitle = e4.populateString(e4.itemReaderText, t3);
- }, void 0, false), i3.events.on("out", function(t4) {
- i3.readerTitle = "";
- }, void 0, false));
- }
- return this._slice;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hiddenInLegend", { get: function() {
- return this.properties.hiddenInLegend;
- }, set: function(t3) {
- this.setProperty("hiddenInLegend", t3);
- }, enumerable: true, configurable: true }), e3;
- }(th), qh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "PercentSeries", e4._addAllDataItems = false, e4.colors = new kl(), e4.colors.step = 1, e4.isMeasured = true, e4.calculatePercent = true;
- var i3 = e4.createChild($a);
- i3.shouldClone = false, i3.isMeasured = false, e4.slicesContainer = i3;
- var n3 = e4.createChild($a);
- n3.shouldClone = false, n3.isMeasured = false, n3.layout = "none", e4.ticksContainer = n3;
- var r3 = e4.createChild($a);
- return r3.shouldClone = false, r3.isMeasured = false, r3.layout = "none", e4.labelsContainer = r3, e4.alignLabels = false, e4.bulletsContainer.toFront(), e4.skipFocusThreshold = 50, e4.defaultState.transitionEasing = Wr, e4.itemReaderText = "{category}: {value.percent.formatNumber('#.#')}%", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.createSlice = function() {
- return new Za();
- }, e3.prototype.createTick = function() {
- return new dh();
- }, e3.prototype.createLabel = function() {
- return new co();
- }, Object.defineProperty(e3.prototype, "slices", { get: function() {
- if (!this._slices) {
- var t3 = this.createSlice();
- t3.applyOnClones = true, this._disposers.push(t3), this.initSlice(t3), this._slices = new Mi(t3), this._disposers.push(new Ai(this._slices));
- }
- return this._slices;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "ticks", { get: function() {
- if (!this._ticks) {
- var t3 = this.createTick();
- t3.applyOnClones = true, this._disposers.push(t3), this.initTick(t3), this._ticks = new Mi(t3), this._disposers.push(new Ai(this._ticks));
- }
- return this._ticks;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "labels", { get: function() {
- if (!this._labels) {
- var t3 = this.createLabel();
- t3.applyOnClones = true, this._disposers.push(t3), this.initLabel(t3), this._labels = new Mi(t3), this._disposers.push(new Ai(this._labels));
- }
- return this._labels;
- }, enumerable: true, configurable: true }), e3.prototype.createDataItem = function() {
- return new Zh();
- }, e3.prototype.initSlice = function(t3) {
- }, e3.prototype.initLabel = function(t3) {
- t3.text = "{category}: {value.percent.formatNumber('#.0')}%", t3.isMeasured = false, t3.padding(5, 5, 5, 5);
- }, e3.prototype.initTick = function(t3) {
- }, e3.prototype.validateDataItems = function() {
- this.colors.reset(), this.patterns && this.patterns.reset(), t2.prototype.validateDataItems.call(this);
- }, e3.prototype.validateDataElement = function(e4) {
- var i3 = e4.slice;
- i3 && (i3.fill == null ? this.patterns ? (Z(i3.stroke) || (i3.stroke = this.colors.next()), i3.fill = this.patterns.next(), Z(i3.fillOpacity) && (i3.fill.backgroundOpacity = i3.fillOpacity), i3.stroke instanceof un && (i3.fill.stroke = i3.stroke, i3.fill.fill = i3.stroke)) : i3.fill = this.colors.next() : this.colors.currentStep += this.colors.step, i3.stroke == null && (i3.stroke = i3.fill)), t2.prototype.validateDataElement.call(this, e4), i3 && e4.bullets.each(function(t3, e5) {
- e5.fill == null && (e5.fill = i3.fill), e5.stroke == null && (e5.stroke = i3.stroke);
- }), this.updateLegendValue(e4);
- }, e3.prototype.validateData = function() {
- t2.prototype.validateData.call(this), this.chart && this.chart.feedLegend();
- }, e3.prototype.arrangeLabels = function(t3) {
- for (var e4 = 0, i3 = t3.length; e4 < i3; e4++) {
- var n3 = t3[e4].label;
- if (n3) {
- n3.invalid && n3.validate();
- var r3 = n3.measuredHeight;
- n3.visible || (r3 = 0), n3.pixelY - r3 / 2 < -this.maxHeight / 2 && (n3.y = -this.maxHeight / 2 + r3 / 2);
- var s2 = this.getNextLabel(e4 + 1, t3), a2 = n3.pixelY + r3;
- s2 && s2.y < a2 && (s2.y = a2);
- }
- }
- }, e3.prototype.arrangeLabels2 = function(t3) {
- for (var e4 = this.maxHeight / 2, i3 = t3.length - 1; i3 >= 0; i3--) {
- var n3 = t3[i3].label;
- if (n3) {
- n3.invalid && n3.validate();
- var r3 = n3.measuredHeight;
- n3.visible || (r3 = 0), i3 == t3.length - 1 && (e4 += r3 / 2), n3.pixelY + r3 > e4 && (n3.y = e4 - r3, e4 = n3.y);
- }
- }
- }, e3.prototype.getNextLabel = function(t3, e4) {
- if (e4.length >= t3) {
- var i3 = e4[t3];
- if (i3)
- return i3.label && i3.visible ? i3.label : this.getNextLabel(t3 + 1, e4);
- }
- }, Object.defineProperty(e3.prototype, "colors", { get: function() {
- return this.getPropertyValue("colors");
- }, set: function(t3) {
- this.setPropertyValue("colors", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "patterns", { get: function() {
- return this.getPropertyValue("patterns");
- }, set: function(t3) {
- this.setPropertyValue("patterns", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.createLegendMarker = function(t3, e4) {
- ti(t3.children.iterator(), function(i3) {
- var n3 = e4.slice;
- i3.defaultState.properties.fill = n3.fill, i3.defaultState.properties.stroke = n3.stroke, i3.defaultState.properties.fillOpacity = n3.fillOpacity, i3.defaultState.properties.strokeOpacity = n3.strokeOpacity, i3.fill = n3.fill, i3.stroke = n3.stroke, i3.fillOpacity = n3.fillOpacity, i3.strokeOpacity = n3.strokeOpacity, i3.fill == null && (i3.__disabled = true);
- var r3 = t3.dataItem;
- r3.color = n3.fill, r3.colorOrig = n3.fill, i3.addDisposer(n3.events.on("propertychanged", function(t4) {
- t4.property == "fill" && (i3.__disabled = false, i3.isActive || (i3.fill = n3.fill), i3.defaultState.properties.fill = n3.fill, r3.color = n3.fill, r3.colorOrig = n3.fill), t4.property == "stroke" && (i3.isActive || (i3.stroke = n3.stroke), i3.defaultState.properties.stroke = n3.stroke);
- }, void 0, false));
- });
- }, e3.prototype.handleSliceScale = function(t3) {
- var e4 = this, i3 = t3.target.dataItem;
- i3 && i3.bullets && ti(i3.bullets.iterator(), function(t4) {
- var i4 = t4[1];
- e4.positionBullet(i4);
- });
- }, e3.prototype.handleSliceMove = function(t3) {
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.slices.template.copyFrom(e4.slices.template), this.labels.template.copyFrom(e4.labels.template), this.ticks.template.copyFrom(e4.ticks.template), this.colors = e4.colors.clone();
- }, Object.defineProperty(e3.prototype, "alignLabels", { get: function() {
- return this.getPropertyValue("alignLabels");
- }, set: function(t3) {
- this.setAlignLabels(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setAlignLabels = function(t3) {
- this.setPropertyValue("alignLabels", t3, true);
- }, Object.defineProperty(e3.prototype, "ignoreZeroValues", { get: function() {
- return this.getPropertyValue("ignoreZeroValues");
- }, set: function(t3) {
- this.setPropertyValue("ignoreZeroValues", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.updateLegendValue = function(t3) {
- if (t3) {
- var e4 = t3.legendDataItem, i3 = t3.legendSettings;
- e4 && i3 && i3 && (i3.labelText && (e4.label.text = i3.labelText), i3.itemLabelText && (e4.label.text = i3.itemLabelText), i3.valueText && (e4.valueLabel.text = i3.valueText), i3.itemValueText && (e4.valueLabel.text = i3.itemValueText));
- }
- }, e3;
- }(eh);
- Ii.registeredClasses.PercentSeries = qh, Ii.registeredClasses.PercentSeriesDataItem = Zh, lo.push({ relevant: ho.maybeXS, state: function(t2, e3) {
- if (t2 instanceof qh) {
- var i3 = t2.states.create(e3);
- return t2.labels.template.states.create(e3).properties.disabled = true, t2.ticks.template.states.create(e3).properties.disabled = true, i3;
- }
- return null;
- } });
- var $h = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PercentChartDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(ih), Jh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PercentChart", e4.align = "none", e4.valign = "none", e4.chartContainer.minHeight = 50, e4.chartContainer.minWidth = 50, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.validateData = function() {
- t2.prototype.validateData.call(this), this.feedLegend();
- }, e3.prototype.feedLegend = function() {
- var t3 = this.legend;
- if (t3) {
- var e4 = [];
- ti(this.series.iterator(), function(t4) {
- t4.hiddenInLegend || ti(t4.dataItems.iterator(), function(i3) {
- i3.hiddenInLegend || (e4.push(i3), i3.legendSettings || (i3.legendSettings = t4.legendSettings));
- });
- }), t3.data = e4, t3.dataFields.name = "category";
- }
- }, e3.prototype.createSeries = function() {
- return new qh();
- }, e3.prototype.setLegend = function(e4) {
- t2.prototype.setLegend.call(this, e4), e4 && (e4.labels.template.text = "{category}", e4.valueLabels.template.text = "{value.percent.formatNumber('#.0')}%", e4.itemContainers.template.events.on("over", function(t3) {
- var e5 = t3.target.dataItem.dataContext;
- if (e5.visible && !e5.isHiding) {
- var i3 = e5.slice;
- i3.dispatchImmediately("over"), i3.isHover = true, i3.interactions.isRealHover = true;
- }
- }), e4.itemContainers.template.events.on("out", function(t3) {
- var e5 = t3.target.dataItem.dataContext.slice;
- e5.dispatchImmediately("out"), e5.isHover = false;
- }));
- }, e3;
- }(nh);
- Ii.registeredClasses.PercentChart = Jh, Ii.registeredClasses.PercentChartDataItem = $h;
- var Qh = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._label = new ve(), e4._slice = new ve(), e4.className = "PieTick", e4.element = e4.paper.add("polyline"), e4._disposers.push(e4._label), e4._disposers.push(e4._slice), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this.slice, i3 = this.label, n3 = e4.dataItem.component;
- if (e4 && e4.radius > 0 && i3 && i3.text) {
- var r3 = e4.dx + e4.slice.dx + e4.pixelX + e4.ix * e4.radius * e4.scale, s2 = e4.dy + e4.slice.dy + e4.pixelY + e4.iy * e4.radiusY * e4.scale, a2 = void 0, o3 = void 0, l2 = void 0, h2 = void 0;
- if (n3.alignLabels)
- a2 = i3.pixelX - this.length, o3 = i3.pixelY, l2 = i3.pixelX, h2 = o3, i3.horizontalCenter == "right" && (l2 = (a2 += 2 * this.length) - this.length);
- else {
- var p2 = i3.pixelRadius(e4.radius);
- l2 = a2 = r3 + p2 * e4.ix, h2 = o3 = s2 + p2 * e4.iy;
- }
- this.element.attr({ points: [r3, s2, a2, o3, l2, h2] });
- }
- }, Object.defineProperty(e3.prototype, "slice", { get: function() {
- return this._slice.get();
- }, set: function(t3) {
- this._slice.set(t3, new me([t3.events.on("transformed", this.invalidate, this), t3.events.on("validated", this.invalidate, this)]));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "label", { get: function() {
- return this._label.get();
- }, set: function(t3) {
- this._label.set(t3, t3.events.on("transformed", this.invalidate, this, false));
- }, enumerable: true, configurable: true }), e3;
- }(dh);
- Ii.registeredClasses.PieTick = Qh;
- var tp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PieSeriesDataItem", e4.values.radiusValue = {}, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "radiusValue", { get: function() {
- return this.values.radiusValue.value;
- }, set: function(t3) {
- this.setValue("radiusValue", t3);
- }, enumerable: true, configurable: true }), e3.prototype.hide = function(e4, i3, n3, r3) {
- return t2.prototype.hide.call(this, e4, i3, 0, ["value", "radiusValue"]);
- }, e3.prototype.show = function(e4, i3, n3) {
- return t2.prototype.show.call(this, e4, i3, ["value", "radiusValue"]);
- }, e3;
- }(Zh), ep = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PieSeries", e4.alignLabels = true, e4.layout = "none", e4.labels.template.radius = V(5), e4.addDisposer(e4.labels.template.events.on("enabled", e4.invalidate, e4, false)), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.createSlice = function() {
- return new No();
- }, e3.prototype.createTick = function() {
- return new Qh();
- }, e3.prototype.createLabel = function() {
- return new Nh();
- }, e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Pie Slice Series"));
- }, e3.prototype.createDataItem = function() {
- return new tp();
- }, e3.prototype.initSlice = function(t3) {
- t3.isMeasured = false, t3.defaultState.properties.scale = 1, t3.observe("scale", this.handleSliceScale, this), t3.observe(["dx", "dy", "x", "y", "shiftRadius"], this.handleSliceMove, this), t3.tooltipText = "{category}: {value.percent.formatNumber('#.#')}% ({value.value})", t3.states.create("hover").properties.scale = 1.05, t3.defaultState.properties.shiftRadius = 0, t3.togglable = true, t3.events.on("toggled", function(t4) {
- t4.target.hideTooltip(), t4.target.interactions.lastHitPointer && t4.target.interactions.lastHitPointer.touch && !t4.target.isActive && (t4.target.isHover = false);
- }), t3.states.create("active").properties.shiftRadius = 0.1;
- }, e3.prototype.validate = function() {
- this._leftItems = [], this._rightItems = [], this._currentStartAngle = this.startAngle, this._arcRect = Bt(this.startAngle, this.endAngle), this._maxRadiusPercent = 0;
- for (var e4 = this.startIndex; e4 < this.endIndex; e4++) {
- var i3 = this.dataItems.getIndex(e4).values.radiusValue.percent;
- i3 > this._maxRadiusPercent && (this._maxRadiusPercent = i3);
- }
- t2.prototype.validate.call(this), this.alignLabels && (this.startAngle > this.endAngle ? this._rightItems.reverse() : this._leftItems.reverse(), this._rightItems.sort(function(t3, e5) {
- var i4 = (t3.slice.middleAngle + 360) % 360, n3 = (e5.slice.middleAngle + 360) % 360;
- return i4 > 270 && (i4 -= 360), n3 > 270 && (n3 -= 360), i4 < n3 ? -1 : i4 > n3 ? 1 : 0;
- }), this._leftItems.sort(function(t3, e5) {
- var i4 = (t3.slice.middleAngle + 360) % 360, n3 = (e5.slice.middleAngle + 360) % 360;
- return i4 < n3 ? 1 : i4 > n3 ? -1 : 0;
- }), this.arrangeLabels(this._rightItems), this.arrangeLabels2(this._rightItems), this.arrangeLabels(this._leftItems), this.arrangeLabels2(this._leftItems));
- }, e3.prototype.validateDataElement = function(e4) {
- if (this.pixelRadius > 0) {
- !this.ignoreZeroValues || e4.value != 0 && e4.value != null ? e4.__disabled = false : e4.__disabled = true;
- var i3 = e4.slice;
- if (i3.radius = this.pixelRadius, tt(e4.radiusValue) && (i3.radius = this.pixelInnerRadius + (this.pixelRadius - this.pixelInnerRadius) * e4.values.radiusValue.percent / this._maxRadiusPercent), i3.innerRadius instanceof A || (i3.innerRadius = this.pixelInnerRadius), i3.startAngle = this._currentStartAngle, i3.arc = Math.abs(e4.values.value.percent) * (this.endAngle - this.startAngle) / 100, !this.labels.template.disabled) {
- var n3 = e4.label, r3 = e4.tick;
- r3.slice = i3, r3.label = n3;
- var s2 = (i3.middleAngle + 360) % 360, a2 = void 0;
- if (this.alignLabels) {
- var o3 = n3.pixelRadius(i3.radius), l2 = r3.length + o3;
- n3.dx = 0, n3.dy = 0, n3.verticalCenter = "middle";
- var h2 = this._arcRect;
- s2 > 270 || s2 <= 90 ? (l2 += (h2.width + h2.x) * this.pixelRadius, n3.horizontalCenter = "left", this._rightItems.push(e4)) : (l2 -= h2.x * this.pixelRadius, n3.horizontalCenter = "right", this._leftItems.push(e4), l2 *= -1);
- var p2 = i3.radius + r3.length + o3;
- a2 = { x: l2, y: i3.iy * p2 }, n3.moveTo(a2);
- } else {
- var u2 = i3.depth;
- tt(u2) || (u2 = 0), n3.fixPosition(i3.middleAngle, i3.radius, i3.radiusY, 0, -u2);
- }
- }
- this._currentStartAngle += i3.arc, t2.prototype.validateDataElement.call(this, e4);
- }
- }, Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, true, false, 10, false) && this.invalidateDataItems();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelRadius", { get: function() {
- return this._pixelRadius;
- }, set: function(t3) {
- this._pixelRadius != t3 && (this._pixelRadius = t3, this.invalidateDataItems());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelInnerRadius", { get: function() {
- return this._pixelInnerRadius;
- }, set: function(t3) {
- this._pixelInnerRadius != t3 && (this._pixelInnerRadius = t3, this.invalidateDataItems());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- return this.getPropertyValue("innerRadius");
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startAngle", { get: function() {
- var t3 = this.getPropertyValue("startAngle");
- return tt(t3) ? t3 : this._startAngleInternal;
- }, set: function(t3) {
- this.setPropertyValue("startAngle", Et(t3), true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endAngle", { get: function() {
- var t3 = this.getPropertyValue("endAngle");
- return tt(t3) ? t3 : this._endAngleInternal;
- }, set: function(t3) {
- this.setPropertyValue("endAngle", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.positionBullet = function(e4) {
- t2.prototype.positionBullet.call(this, e4);
- var i3 = e4.dataItem.slice, n3 = e4.locationX;
- tt(n3) || (n3 = 0.5);
- var r3 = e4.locationY;
- tt(r3) || (r3 = 1);
- var s2 = i3.startAngle + i3.arc * n3;
- e4.x = r3 * i3.radius * ft(s2), e4.y = r3 * i3.radiusY * dt(s2);
- }, e3.prototype.handleSliceMove = function(t3) {
- if (!this.alignLabels) {
- var e4 = t3.target, i3 = e4.dataItem;
- if (i3) {
- var n3 = i3.label;
- n3 && (n3.dx = n3.fdx + e4.dx + e4.pixelX, n3.dy = n3.fdy + e4.dy + e4.pixelY);
- }
- }
- }, Object.defineProperty(e3.prototype, "bbox", { get: function() {
- if (this.definedBBox)
- return this.definedBBox;
- var t3 = this.chart;
- return t3 ? Bt(t3.startAngle, t3.endAngle, this.pixelRadius) : Bt(this.startAngle, this.endAngle, this.pixelRadius);
- }, enumerable: true, configurable: true }), e3;
- }(qh);
- Ii.registeredClasses.PieSeries = ep, Ii.registeredClasses.PieSeriesDataItem = tp;
- var ip = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PieChartDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }($h), np = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "PieChart", e4.innerRadius = 0, e4.radius = V(80), e4.align = "none", e4.valign = "none", e4.startAngle = -90, e4.endAngle = 270;
- var i3 = e4.seriesContainer;
- return i3.isMeasured = true, i3.valign = "middle", i3.align = "center", i3.layout = "absolute", i3.width = void 0, i3.height = void 0, e4.chartContainer.minHeight = 50, e4.chartContainer.minWidth = 50, e4.chartContainer.events.on("maxsizechanged", e4.updateRadius, e4, false), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Pie chart"));
- }, e3.prototype.validateLayout = function() {
- t2.prototype.validateLayout.call(this), this.updateRadius();
- }, e3.prototype.handleSeriesAdded = function(e4) {
- t2.prototype.handleSeriesAdded.call(this, e4), this._chartPixelRadius = void 0, this.updateSeriesAngles();
- }, e3.prototype.updateSeriesAngles = function() {
- var t3 = this;
- this.series.each(function(e4) {
- e4._startAngleInternal = t3.startAngle, e4._endAngleInternal = t3.endAngle;
- });
- }, e3.prototype.updateRadius = function() {
- var t3 = this.chartContainer, e4 = Bt(this.startAngle, this.endAngle, 1), i3 = { x: 0, y: 0, width: 0, height: 0 }, n3 = this.innerRadius;
- n3 instanceof A && (i3 = Bt(this.startAngle, this.endAngle, n3.value)), e4 = At([e4, i3]);
- var r3 = Math.min(t3.innerWidth / e4.width, t3.innerHeight / e4.height);
- tt(r3) || (r3 = 0);
- var s2 = Fn(this.radius, r3), a2 = Fn(this.innerRadius, r3), o3 = (s2 - a2) / this.series.length;
- s2 == this._chartPixelRadius && a2 == this._chartPixelInnerRadius || (this._chartPixelRadius = s2, this._chartPixelInnerRadius = a2, ti(ai(this.series.iterator()), function(t4) {
- var e5 = t4[0], i4 = t4[1], n4 = a2 + Fn(i4.radius, s2 - a2), r4 = a2 + Fn(i4.innerRadius, s2 - a2);
- tt(n4) || (n4 = a2 + o3 * (e5 + 1)), tt(r4) || (r4 = a2 + o3 * e5), i4.pixelRadius = n4, i4.pixelInnerRadius = r4;
- }), this.seriesContainer.definedBBox = { x: s2 * e4.x, y: s2 * e4.y, width: s2 * e4.width, height: s2 * e4.height }, this.seriesContainer.invalidateLayout(), this.bulletsContainer.x = this.seriesContainer.x, this.bulletsContainer.y = this.seriesContainer.y);
- }, Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, true, false, 10, false) && this.invalidateLayout();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- return this.getPropertyValue("innerRadius");
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), e3.prototype.createSeries = function() {
- return new ep();
- }, Object.defineProperty(e3.prototype, "startAngle", { get: function() {
- return this.getPropertyValue("startAngle");
- }, set: function(t3) {
- this.setPropertyValue("startAngle", t3) && (this.updateRadius(), this.updateSeriesAngles());
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endAngle", { get: function() {
- return this.getPropertyValue("endAngle");
- }, set: function(t3) {
- this.setPropertyValue("endAngle", t3) && (this.updateRadius(), this.updateSeriesAngles());
- }, enumerable: true, configurable: true }), e3;
- }(Jh);
- Ii.registeredClasses.PieChart = np, Ii.registeredClasses.PieChartDataItem = ip;
- var rp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PieSeries3DDataItem", e4.values.depthValue = {}, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "depthValue", { get: function() {
- return this.values.depthValue.value;
- }, set: function(t3) {
- this.setValue("depthValue", t3);
- }, enumerable: true, configurable: true }), e3;
- }(tp), sp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PieSeries3D", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.createDataItem = function() {
- return new rp();
- }, e3.prototype.createSlice = function() {
- return new xl();
- }, e3.prototype.validateDataElement = function(e4) {
- var i3 = e4.slice, n3 = this.depth;
- tt(n3) || (n3 = this.chart.depth);
- var r3 = e4.values.depthValue.percent;
- tt(r3) || (r3 = 100), i3.depth = r3 * n3 / 100;
- var s2 = this.angle;
- tt(s2) || (s2 = this.chart.angle), i3.angle = s2, t2.prototype.validateDataElement.call(this, e4);
- }, e3.prototype.validate = function() {
- t2.prototype.validate.call(this);
- for (var e4 = this._workingStartIndex; e4 < this._workingEndIndex; e4++) {
- var i3 = this.dataItems.getIndex(e4).slice, n3 = i3.startAngle;
- n3 >= -90 && n3 < 90 ? i3.toFront() : n3 >= 90 && i3.toBack();
- }
- }, Object.defineProperty(e3.prototype, "depth", { get: function() {
- return this.getPropertyValue("depth");
- }, set: function(t3) {
- this.setPropertyValue("depth", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "angle", { get: function() {
- return this.getPropertyValue("angle");
- }, set: function(t3) {
- this.setPropertyValue("angle", t3);
- }, enumerable: true, configurable: true }), e3.prototype.positionBullet = function(e4) {
- t2.prototype.positionBullet.call(this, e4);
- var i3 = e4.dataItem.slice;
- e4.y = e4.pixelY - i3.depth;
- }, e3;
- }(ep);
- Ii.registeredClasses.PieSeries3D = sp, Ii.registeredClasses.PieSeries3DDataItem = rp;
- var ap = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PieChart3DDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(ip), op = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PieChart3D", e4.depth = 20, e4.angle = 10, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "depth", { get: function() {
- return this.getPropertyValue("depth");
- }, set: function(t3) {
- this.setPropertyValue("depth", t3) && this.invalidateDataUsers();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "angle", { get: function() {
- return this.getPropertyValue("angle");
- }, set: function(t3) {
- t3 = ut(t3, 0, 90), this.setPropertyValue("angle", t3) && this.invalidateDataUsers();
- }, enumerable: true, configurable: true }), e3.prototype.createSeries = function() {
- return new sp();
- }, e3;
- }(np);
- Ii.registeredClasses.PieChart3D = op;
- var lp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "SlicedChartDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }($h), hp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "SlicedChart", e4.seriesContainer.layout = "horizontal", e4.padding(15, 15, 15, 15), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Sliced chart"));
- }, e3.prototype.validate = function() {
- t2.prototype.validate.call(this);
- }, e3;
- }(Jh);
- Ii.registeredClasses.SlicedChart = hp, Ii.registeredClasses.SlicedChartDataItem = lp;
- var pp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.legendSettings = new Jl(), e4.className = "FlowDiagramNode", e4.isMeasured = false, new Ys(), e4.draggable = true, e4.inert = true, e4.setStateOnChildren = true, e4.events.on("positionchanged", e4.invalidateLinks, e4, false), e4.events.on("sizechanged", e4.invalidateLinks, e4, false), e4;
- }
- return C(e3, t2), e3.prototype.handleHit = function(t3) {
- this.isHidden || this.isHiding ? this.show() : this.hide();
- }, e3.prototype.show = function(e4) {
- var i3 = t2.prototype.show.call(this, e4);
- return this.outgoingDataItems.each(function(t3) {
- (!t3.toNode || t3.toNode && !t3.toNode.isHidden) && (t3.setWorkingValue("value", t3.getValue("value"), e4), t3.link.show());
- }), this.incomingDataItems.each(function(t3) {
- (!t3.fromNode || t3.fromNode && !t3.fromNode.isHidden) && (t3.setWorkingValue("value", t3.getValue("value"), e4), t3.link.show());
- }), i3;
- }, e3.prototype.hide = function(e4) {
- var i3 = t2.prototype.hide.call(this, e4);
- return this.outgoingDataItems.each(function(t3) {
- t3.setWorkingValue("value", 0, e4), t3.link.hide();
- }), this.incomingDataItems.each(function(t3) {
- t3.setWorkingValue("value", 0, e4), t3.link.hide();
- }), i3;
- }, e3.prototype.validate = function() {
- this.isDisposed() || (t2.prototype.validate.call(this), this.invalidateLinks());
- }, e3.prototype.invalidateLinks = function() {
- var t3 = this;
- this.outgoingDataItems.each(function(e4) {
- var i3 = e4.link;
- if (i3.colorMode == "fromNode" && (i3.fill = i3.dataItem.fromNode.color), i3.colorMode == "gradient") {
- i3.fill = i3.gradient, i3.stroke = i3.gradient;
- var n3 = i3.gradient.stops.getIndex(0);
- n3 && (n3.color = t3.color, i3.gradient.validate());
- }
- }), this.incomingDataItems.each(function(e4) {
- var i3 = e4.link;
- if (i3.colorMode == "toNode" && (i3.fill = i3.dataItem.toNode.color), i3.colorMode == "gradient") {
- i3.fill = i3.gradient, i3.stroke = i3.gradient;
- var n3 = i3.gradient.stops.getIndex(1);
- n3 && (n3.color = t3.color, i3.gradient.validate());
- }
- });
- }, Object.defineProperty(e3.prototype, "incomingDataItems", { get: function() {
- var t3 = this;
- if (!this._incomingDataItems) {
- var e4 = new Fi();
- e4.events.on("inserted", function() {
- t3.chart.sortBy == "name" ? t3._incomingSorted = ei(t3._incomingDataItems.iterator(), function(t4, e5) {
- return vi(t4.fromName, e5.fromName);
- }) : t3.chart.sortBy == "value" ? t3._incomingSorted = ei(t3._incomingDataItems.iterator(), function(t4, e5) {
- return Hi(Bi(t4.value, e5.value));
- }) : t3._incomingSorted = t3._incomingDataItems.iterator();
- }, void 0, false), this._incomingDataItems = e4;
- }
- return this._incomingDataItems;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "outgoingDataItems", { get: function() {
- var t3 = this;
- if (!this._outgoingDataItems) {
- var e4 = new Fi();
- e4.events.on("inserted", function() {
- t3.chart.sortBy == "name" ? t3._outgoingSorted = ei(t3._outgoingDataItems.iterator(), function(t4, e5) {
- return vi(t4.fromName, e5.fromName);
- }) : t3.chart.sortBy == "value" ? t3._outgoingSorted = ei(t3._outgoingDataItems.iterator(), function(t4, e5) {
- return Hi(Bi(t4.value, e5.value));
- }) : t3._outgoingSorted = t3._outgoingDataItems.iterator();
- }, void 0, false), this._outgoingDataItems = e4;
- }
- return this._outgoingDataItems;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "name", { get: function() {
- return this.getPropertyValue("name");
- }, set: function(t3) {
- this.setPropertyValue("name", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "total", { get: function() {
- return this.getPropertyValue("total");
- }, set: function(t3) {
- this.setPropertyValue("total", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "totalIncoming", { get: function() {
- return this.getPropertyValue("totalIncoming");
- }, set: function(t3) {
- this.setPropertyValue("totalIncoming", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "totalOutgoing", { get: function() {
- return this.getPropertyValue("totalOutgoing");
- }, set: function(t3) {
- this.setPropertyValue("totalOutgoing", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "color", { get: function() {
- return this.getPropertyValue("color");
- }, set: function(t3) {
- this.setColorProperty("color", t3), this._background && (this._background.fill = t3), this.fill = t3;
- }, enumerable: true, configurable: true }), e3.prototype.createLegendMarker = function(t3) {
- var e4 = t3.pixelWidth, i3 = t3.pixelHeight;
- t3.removeChildren();
- var n3 = t3.createChild(fo);
- n3.shouldClone = false, Ue(this, n3, Ka), n3.stroke = this.fill, n3.copyFrom(this), n3.padding(0, 0, 0, 0), n3.width = e4, n3.height = i3;
- var r3 = t3.dataItem;
- r3.color = n3.fill, r3.colorOrig = n3.fill;
- }, Object.defineProperty(e3.prototype, "legendDataItem", { get: function() {
- return this._legendDataItem;
- }, set: function(t3) {
- this._legendDataItem = t3, this._legendDataItem.itemContainer.deepInvalidate();
- }, enumerable: true, configurable: true }), e3;
- }($a);
- Ii.registeredClasses.FlowDiagramNode = pp;
- var up = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "FlowDiagramLink";
- var i3 = new Ys();
- return e4.maskBullets = false, e4.colorMode = "fromNode", e4.layout = "none", e4.isMeasured = false, e4.startAngle = 0, e4.endAngle = 0, e4.strokeOpacity = 0, e4.verticalCenter = "none", e4.horizontalCenter = "none", e4.tooltipText = "{fromName}\u2192{toName}:{value.value}", e4.tooltipLocation = 0.5, e4.link = e4.createChild(Za), e4.link.shouldClone = false, e4.link.setElement(e4.paper.add("path")), e4.link.isMeasured = false, e4.fillOpacity = 0.2, e4.fill = i3.getFor("alternativeBackground"), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.positionBullets = function() {
- var t3 = this;
- ti(this.bullets.iterator(), function(e4) {
- e4.parent = t3.bulletsContainer, e4.maxWidth = t3.maxWidth, e4.maxHeight = t3.maxHeight, t3.positionBullet(e4);
- });
- }, Object.defineProperty(e3.prototype, "bulletsContainer", { get: function() {
- if (!this._bulletsContainer) {
- var t3 = this.createChild($a);
- t3.shouldClone = false, t3.layout = "none", this._bulletsContainer = t3;
- }
- return this._bulletsContainer;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "bulletsMask", { get: function() {
- if (!this._bulletsMask) {
- var t3 = this.createChild(Za);
- t3.shouldClone = false, t3.setElement(this.paper.add("path")), t3.isMeasured = false, this._bulletsMask = t3;
- }
- return this._bulletsMask;
- }, enumerable: true, configurable: true }), e3.prototype.positionBullet = function(t3) {
- var e4 = t3.locationX;
- tt(e4) || (e4 = t3.locationY), tt(e4) || (e4 = 0.5);
- var i3 = this.middleLine.positionToPoint(e4);
- t3.moveTo(i3);
- var n3, r3 = t3.propertyFields.rotation;
- t3.dataItem && (n3 = t3.dataItem.dataContext[r3]), tt(n3) || (n3 = i3.angle), t3.rotation = n3;
- }, Object.defineProperty(e3.prototype, "startAngle", { get: function() {
- return this.getPropertyValue("startAngle");
- }, set: function(t3) {
- this.setPropertyValue("startAngle", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endAngle", { get: function() {
- return this.getPropertyValue("endAngle");
- }, set: function(t3) {
- this.setPropertyValue("endAngle", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "colorMode", { get: function() {
- return this.getPropertyValue("colorMode");
- }, set: function(t3) {
- if (t3 == "gradient") {
- var e4 = this.fill;
- this.gradient.stops.clear(), e4 instanceof un && (this.gradient.addColor(e4), this.gradient.addColor(e4)), this.fill = this.gradient, this.stroke = this.gradient;
- }
- this.setPropertyValue("colorMode", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maskBullets", { get: function() {
- return this.getPropertyValue("maskBullets");
- }, set: function(t3) {
- this.setPropertyValue("maskBullets", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tooltipLocation", { get: function() {
- return this.getPropertyValue("tooltipLocation");
- }, set: function(t3) {
- this.setPropertyValue("tooltipLocation", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.setFill = function(e4) {
- t2.prototype.setFill.call(this, e4);
- var i3 = this._gradient;
- i3 && e4 instanceof un && (i3.stops.clear(), i3.addColor(e4), i3.addColor(e4));
- }, e3.prototype.measureElement = function() {
- }, Object.defineProperty(e3.prototype, "bullets", { get: function() {
- var t3 = this;
- return this._bullets || (this._bullets = new Mi(new ql()), this._disposers.push(new Ai(this._bullets)), this._disposers.push(this._bullets.template), this._bullets.events.on("inserted", function(e4) {
- e4.newValue.events.on("propertychanged", function(e5) {
- e5.property != "locationX" && e5.property != "locationY" || t3.positionBullet(e5.target);
- }, void 0, false);
- }, void 0, false)), this._bullets;
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.bullets.copyFrom(e4.bullets);
- var i3 = this.middleLine;
- i3 && (i3 instanceof bo && e4.middleLine instanceof bo && i3.copyFrom(e4.middleLine), i3 instanceof jo && e4.middleLine instanceof jo && i3.copyFrom(e4.middleLine)), this.link.copyFrom(e4.link);
- }, e3.prototype.getTooltipX = function() {
- if (this.middleLine)
- return this.middleLine.positionToPoint(this.tooltipLocation).x;
- }, e3.prototype.getTooltipY = function() {
- if (this.middleLine)
- return this.middleLine.positionToPoint(this.tooltipLocation).y;
- }, Object.defineProperty(e3.prototype, "gradient", { get: function() {
- return this._gradient || (this._gradient = new Oa()), this._gradient;
- }, enumerable: true, configurable: true }), e3;
- }($a);
- Ii.registeredClasses.FlowDiagramLink = up;
- var dp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "FlowDiagramDataItem", e4.values.value = {}, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "fromName", { get: function() {
- return this.properties.fromName;
- }, set: function(t3) {
- this.setProperty("fromName", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "toName", { get: function() {
- return this.properties.toName;
- }, set: function(t3) {
- this.setProperty("toName", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "color", { get: function() {
- return this.properties.color;
- }, set: function(t3) {
- this.setProperty("color", gn(t3));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "value", { get: function() {
- return this.values.value.value;
- }, set: function(t3) {
- this.setValue("value", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "link", { get: function() {
- var t3 = this;
- if (!this._link) {
- var e4 = this.component.links.create();
- this._link = e4, this.addSprite(e4), this._disposers.push(new ye(function() {
- t3.component && t3.component.links.removeValue(e4);
- }));
- }
- return this._link;
- }, enumerable: true, configurable: true }), e3;
- }(Kl), cp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.colors = new kl(), e4.className = "FlowDiagram", e4.nodePadding = 20, e4.sortBy = "none", e4.sequencedInterpolation = true, e4.colors.step = 2, e4.minNodeSize = 0.02;
- var i3 = e4.chartContainer.createChild($a);
- i3.shouldClone = false, i3.layout = "none", i3.isMeasured = false, e4.linksContainer = i3;
- var n3 = e4.chartContainer.createChild($a);
- return n3.shouldClone = false, n3.layout = "none", n3.isMeasured = false, e4.nodesContainer = n3, e4.dataItem = e4.createDataItem(), e4.dataItem.component = e4, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.dispose = function() {
- t2.prototype.dispose.call(this), this.dataItem.dispose();
- }, e3.prototype.validateData = function() {
- var e4 = this;
- this._parseDataFrom == 0 && this.nodes.clear(), this.sortNodes(), this.colors.reset(), t2.prototype.validateData.call(this);
- var i3, n3, r3 = 0, s2 = 0;
- ti(this.dataItems.iterator(), function(t3) {
- var a3 = t3.fromName;
- a3 && ((o3 = e4.nodes.getKey(a3)) || ((o3 = e4.nodes.create(a3)).name = a3, o3.chart = e4, o3.dataItem = t3), t3.fromNode = o3, t3.fromNode.outgoingDataItems.push(t3));
- var o3, l2 = t3.toName;
- if (l2 && ((o3 = e4.nodes.getKey(l2)) || ((o3 = e4.nodes.create(l2)).name = l2, o3.chart = e4, o3.dataItem = t3), t3.toNode = o3, t3.toNode.incomingDataItems.push(t3)), !t3.fromNode) {
- var h2 = new yl();
- h2.opacities = [0, 1], t3.link.strokeModifier = h2;
- }
- if (!t3.toNode) {
- var p2 = new yl();
- p2.opacities = [1, 0], t3.link.strokeModifier = p2;
- }
- var u2 = t3.value;
- tt(u2) && (r3 += u2, s2++, (i3 > u2 || !tt(i3)) && (i3 = u2), (n3 < u2 || !tt(n3)) && (n3 = u2));
- });
- var a2 = "value";
- this.dataItem.setCalculatedValue(a2, n3, "high"), this.dataItem.setCalculatedValue(a2, i3, "low"), this.dataItem.setCalculatedValue(a2, r3, "sum"), this.dataItem.setCalculatedValue(a2, r3 / s2, "average"), this.dataItem.setCalculatedValue(a2, s2, "count"), ti(this.nodes.iterator(), function(t3) {
- var i4 = t3[1];
- i4.fill instanceof un && (i4.color = i4.fill), i4.color == null && (i4.color = e4.colors.next()), i4.dataItem.color != null && (i4.color = i4.dataItem.color), i4.dataItem.visible || i4.hide(0), e4.getNodeValue(i4);
- }), this.sortNodes(), this.feedLegend();
- }, e3.prototype.handleDataItemWorkingValueChange = function(t3, e4) {
- this.invalidate();
- }, e3.prototype.sortNodes = function() {
- this.sortBy == "name" ? this._sorted = this.nodes.sortedIterator() : this.sortBy == "value" ? this._sorted = ei(this.nodes.iterator(), function(t3, e4) {
- return Hi(Bi(t3[1].total, e4[1].total));
- }) : this._sorted = this.nodes.iterator();
- }, e3.prototype.getNodeValue = function(t3) {
- var e4 = 0, i3 = 0;
- ti(t3.incomingDataItems.iterator(), function(t4) {
- var i4 = t4.getWorkingValue("value");
- tt(i4) && (e4 += i4);
- }), ti(t3.outgoingDataItems.iterator(), function(t4) {
- var e5 = t4.getWorkingValue("value");
- tt(e5) && (i3 += e5);
- }), t3.total = e4 + i3, t3.totalIncoming = e4, t3.totalOutgoing = i3;
- }, e3.prototype.changeSorting = function() {
- this.sortNodes();
- }, e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Flow diagram"));
- }, e3.prototype.createDataItem = function() {
- return new dp();
- }, Object.defineProperty(e3.prototype, "nodePadding", { get: function() {
- return this.getPropertyValue("nodePadding");
- }, set: function(t3) {
- this.setPropertyValue("nodePadding", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "sortBy", { get: function() {
- return this.getPropertyValue("sortBy");
- }, set: function(t3) {
- this.setPropertyValue("sortBy", t3), this.changeSorting();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "minNodeSize", { get: function() {
- return this.getPropertyValue("minNodeSize");
- }, set: function(t3) {
- this.setPropertyValue("minNodeSize", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "nodes", { get: function() {
- if (!this._nodes) {
- var t3 = this.createNode();
- t3.events.on("hit", function(t4) {
- t4.target.handleHit(t4);
- }), this._nodes = new wi(t3), this._disposers.push(new _i(this._nodes));
- }
- return this._nodes;
- }, enumerable: true, configurable: true }), e3.prototype.createNode = function() {
- var t3 = new pp();
- return this._disposers.push(t3), t3;
- }, Object.defineProperty(e3.prototype, "links", { get: function() {
- return this._links || (this._links = new Mi(this.createLink()), this._disposers.push(new Ai(this._links))), this._links;
- }, enumerable: true, configurable: true }), e3.prototype.createLink = function() {
- var t3 = new up();
- return this._disposers.push(t3), t3;
- }, e3.prototype.feedLegend = function() {
- var t3 = this.legend;
- if (t3) {
- var e4 = [];
- this.nodes.each(function(t4, i3) {
- e4.push(i3);
- }), t3.data = e4, t3.dataFields.name = "name";
- }
- }, e3.prototype.disposeData = function() {
- t2.prototype.disposeData.call(this), this.nodes.clear();
- }, e3;
- }(Zl);
- Ii.registeredClasses.FlowDiagram = cp;
- var fp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "LabelBullet";
- var i3 = e4.createChild(co);
- return i3.shouldClone = false, i3.verticalCenter = "middle", i3.horizontalCenter = "middle", i3.truncate = true, i3.hideOversized = false, i3.maxWidth = 500, i3.maxHeight = 500, i3.stroke = dn(), i3.strokeOpacity = 0, i3.fill = new Ys().getFor("text"), e4.events.on("maxsizechanged", e4.handleMaxSize, e4, false), e4.label = i3, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.handleMaxSize = function() {
- this.label.maxWidth = this.maxWidth, this.label.maxHeight = this.maxHeight;
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.label.copyFrom(e4.label);
- }, e3;
- }(ql);
- Ii.registeredClasses.LabelBullet = fp;
- var gp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.nextInCoord = 0, e4.nextOutCoord = 0, e4.className = "SankeyNode", e4.width = 10, e4.height = 10;
- var i3 = e4.createChild(fp);
- i3.shouldClone = false, i3.locationX = 1, i3.locationY = 0.5, i3.label.text = "{name}", i3.width = 150, i3.height = 150, i3.label.horizontalCenter = "left", i3.label.padding(0, 5, 0, 5), e4.nameLabel = i3;
- var n3 = e4.createChild(fp);
- n3.shouldClone = false, n3.label.hideOversized = false, n3.locationX = 0.5, n3.locationY = 0.5, n3.width = 150, n3.height = 150, n3.label.horizontalCenter = "middle", e4.valueLabel = n3;
- var r3 = e4.hiddenState;
- return r3.properties.fill = new Ys().getFor("disabledBackground"), r3.properties.opacity = 0.5, r3.properties.visible = true, e4.background.hiddenState.copyFrom(r3), e4;
- }
- return C(e3, t2), e3.prototype.invalidateLinks = function() {
- var e4 = this;
- t2.prototype.invalidateLinks.call(this), this.nextInCoord = 0, this.nextOutCoord = 0;
- var i3 = this.chart;
- if (i3) {
- var n3 = i3.orientation;
- this._incomingSorted && ti(this._incomingSorted, function(t3) {
- var r3 = t3.link, s2 = t3.getWorkingValue("value");
- if (tt(s2)) {
- r3.parent = e4.chart.linksContainer;
- var a2 = void 0, o3 = void 0, l2 = void 0;
- if (n3 == "horizontal" ? (a2 = e4.pixelX + e4.dx, o3 = e4.nextInCoord + e4.pixelY + e4.dy, l2 = 0) : (o3 = e4.pixelY + e4.dy, a2 = e4.nextInCoord + e4.pixelX + e4.dx, l2 = 90), r3.endX = a2, r3.endY = o3, r3.startAngle = l2, r3.endAngle = l2, r3.gradient.rotation = l2, r3.linkWidth = s2 * i3.valueHeight, !t3.fromNode) {
- n3 == "horizontal" ? (r3.maxWidth = 200, r3.startX = e4.pixelX + e4.dx - r3.maxWidth, r3.startY = r3.endY) : (r3.maxHeight = 200, r3.startX = r3.endX, r3.startY = e4.pixelY + e4.dy - r3.maxHeight), r3.gradient, r3.fill = t3.toNode.color;
- var h2 = r3.gradient.stops.getIndex(0);
- h2 && (r3.colorMode == "gradient" && (h2.color = e4.color), h2.opacity = 0, r3.fill = r3.gradient, r3.stroke = r3.gradient, r3.gradient.validate());
- }
- e4.nextInCoord += r3.linkWidth;
- }
- }), this._outgoingSorted && ti(this._outgoingSorted, function(t3) {
- var i4 = t3.link;
- i4.parent = e4.chart.linksContainer;
- var r3 = t3.getWorkingValue("value");
- if (tt(r3)) {
- var s2 = void 0, a2 = void 0, o3 = void 0;
- if (n3 == "horizontal" ? (o3 = 0, s2 = e4.pixelX + e4.pixelWidth + e4.dx - 1, a2 = e4.nextOutCoord + e4.pixelY + e4.dy) : (o3 = 90, s2 = e4.nextOutCoord + e4.pixelX + e4.dx, a2 = e4.pixelY + e4.pixelHeight + e4.dy - 1), i4.startX = s2, i4.startY = a2, i4.startAngle = o3, i4.endAngle = o3, i4.gradient.rotation = o3, i4.linkWidth = r3 * e4.chart.valueHeight, !t3.toNode) {
- n3 == "horizontal" ? (i4.maxWidth = 200, i4.endX = e4.pixelX + i4.maxWidth + e4.dx, i4.endY = i4.startY) : (i4.maxHeight = 200, i4.endX = i4.startX, i4.endY = e4.pixelY + i4.maxHeight + e4.dy), i4.opacity = e4.opacity;
- var l2 = i4.gradient.stops.getIndex(1);
- l2 && (i4.colorMode == "gradient" && (l2.color = e4.color), l2.opacity = 0, i4.fill = i4.gradient, i4.stroke = i4.gradient, i4.gradient.validate());
- }
- e4.nextOutCoord += i4.linkWidth;
- }
- });
- }
- this.positionBullet(this.nameLabel), this.positionBullet(this.valueLabel);
- }, e3.prototype.positionBullet = function(t3) {
- t3 && (t3.x = this.measuredWidth * t3.locationX, t3.y = this.measuredHeight * t3.locationY);
- }, Object.defineProperty(e3.prototype, "level", { get: function() {
- return this.getPropertyValue("level");
- }, set: function(t3) {
- this.setPropertyValue("level", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.nameLabel.copyFrom(e4.nameLabel), this.valueLabel.copyFrom(e4.valueLabel);
- }, e3;
- }(pp);
- Ii.registeredClasses.SankeyNode = gp;
- var yp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "SankeyLink", new Ys(), e4.tension = 0.8, e4.controlPointDistance = 0.2, e4.startAngle = 0, e4.endAngle = 0, e4.linkWidth = 0, e4.startX = 0, e4.endX = 0, e4.startY = 0, e4.endY = 0, e4.middleLine = e4.createChild(Ho), e4.middleLine.shouldClone = false, e4.middleLine.strokeOpacity = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.makeBackwards = function() {
- this.states.getKey("backwards") != null && this.setState("backwards");
- }, e3.prototype.validate = function() {
- var e4, i3, n3, r3;
- if (t2.prototype.validate.call(this), !this.isTemplate) {
- var s2 = this.startX, a2 = this.startY, o3 = this.endX, l2 = this.endY;
- if (this.states.getKey("backwards") && this.setState("default"), this.dataItem) {
- var h2 = this.dataItem.component;
- h2 && (h2.orientation == "horizontal" ? o3 < s2 && (s2 = (e4 = k([o3, s2], 2))[0], o3 = e4[1], a2 = (i3 = k([l2, a2], 2))[0], l2 = i3[1], this.makeBackwards()) : l2 < a2 && (a2 = (n3 = k([l2, a2], 2))[0], l2 = n3[1], s2 = (r3 = k([o3, s2], 2))[0], o3 = r3[1], this.makeBackwards()));
- }
- tt(o3) || (o3 = s2), tt(l2) || (l2 = a2);
- var p2 = this.startAngle, u2 = this.endAngle, d2 = this.linkWidth, c2 = "", f2 = s2, g2 = a2, y2 = o3, m2 = l2, v2 = s2 + d2 * dt(p2), b2 = o3 + d2 * dt(u2), x2 = a2 + d2 * ft(p2), _2 = l2 + d2 * ft(u2), P2 = s2 + d2 / 2 * dt(p2), w2 = o3 + d2 / 2 * dt(u2), C2 = a2 + d2 / 2 * ft(p2), O2 = l2 + d2 / 2 * ft(u2);
- this.zIndex = this.zIndex || this.dataItem.index;
- var S2 = this.tension + (1 - this.tension) * dt(p2), I2 = this.tension + (1 - this.tension) * ft(p2);
- if (this.middleLine.tensionX = S2, this.middleLine.tensionY = I2, tt(d2) && tt(s2) && tt(o3) && tt(a2) && tt(l2)) {
- lt(f2, 3) == lt(y2, 3) && (y2 += 0.01), lt(g2, 3) == lt(m2, 3) && (m2 += 0.01), lt(v2, 3) == lt(b2, 3) && (b2 += 0.01), lt(x2, 3) == lt(_2, 3) && (_2 += 0.01);
- var D2 = Math.min(v2, b2, f2, y2), T2 = Math.min(x2, _2, g2, m2), A2 = Math.max(v2, b2, f2, y2), V2 = Math.max(x2, _2, g2, m2);
- this._bbox = { x: D2, y: T2, width: A2 - D2, height: V2 - T2 };
- var F2 = this.controlPointDistance, M2 = f2 + (y2 - f2) * F2 * ft(p2), L2 = g2 + (m2 - g2) * F2 * dt(p2), j2 = y2 - (y2 - f2) * F2 * ft(u2), E2 = m2 - (m2 - g2) * F2 * dt(u2), R2 = P2 + (w2 - P2) * F2 * ft(p2), B2 = C2 + (O2 - C2) * F2 * dt(p2), H2 = w2 - (w2 - P2) * F2 * ft(u2), N2 = O2 - (O2 - C2) * F2 * dt(u2), W2 = Dt({ x: M2, y: L2 }, { x: j2, y: E2 }), X2 = (d2 / ft(W2) - d2) / ct(W2) * ft(p2), Y2 = (d2 / dt(W2) - d2) * ct(W2) * dt(p2), z2 = -X2 / 2 + v2 + (b2 - v2) * F2 * ft(p2), U2 = -Y2 / 2 + x2 + (_2 - x2) * F2 * dt(p2), G2 = -X2 / 2 + b2 - (b2 - v2) * F2 * ft(u2), K2 = -Y2 / 2 + _2 - (_2 - x2) * F2 * dt(u2);
- this.middleLine.segments = [[{ x: P2, y: C2 }, { x: R2, y: B2 }, { x: H2, y: N2 }, { x: w2, y: O2 }]], M2 += X2 / 2, L2 += Y2 / 2, j2 += X2 / 2, E2 += Y2 / 2, c2 += wo({ x: f2, y: g2 }), c2 += new tl(S2, I2).smooth([{ x: f2, y: g2 }, { x: M2, y: L2 }, { x: j2, y: E2 }, { x: y2, y: m2 }]), c2 += Co({ x: b2, y: _2 }), c2 += new tl(S2, I2).smooth([{ x: b2, y: _2 }, { x: G2, y: K2 }, { x: z2, y: U2 }, { x: v2, y: x2 }]), c2 += " Z";
- }
- this.link.path = c2, this.maskBullets && (this.bulletsMask.path = c2, this.bulletsContainer.mask = this.bulletsMask), this.positionBullets();
- }
- }, Object.defineProperty(e3.prototype, "startX", { get: function() {
- return this.getPropertyValue("startX");
- }, set: function(t3) {
- this.setPropertyValue("startX", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endX", { get: function() {
- return this.getPropertyValue("endX");
- }, set: function(t3) {
- this.setPropertyValue("endX", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startY", { get: function() {
- return this.getPropertyValue("startY");
- }, set: function(t3) {
- this.setPropertyValue("startY", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endY", { get: function() {
- return this.getPropertyValue("endY");
- }, set: function(t3) {
- this.setPropertyValue("endY", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "linkWidth", { get: function() {
- return this.getPropertyValue("linkWidth");
- }, set: function(t3) {
- this.setPropertyValue("linkWidth", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "controlPointDistance", { get: function() {
- return this.getPropertyValue("controlPointDistance");
- }, set: function(t3) {
- this.setPropertyValue("controlPointDistance", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "tension", { get: function() {
- return this.getPropertyValue("tension");
- }, set: function(t3) {
- this.setPropertyValue("tension", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(up);
- Ii.registeredClasses.SankeyLink = yp;
- var mp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "SankeyDiagramDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(dp), vp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "SankeyDiagram", e4.orientation = "horizontal", e4.nodeAlign = "middle", e4.nodesContainer.width = V(100), e4.nodesContainer.height = V(100), e4.linksContainer.width = V(100), e4.linksContainer.height = V(100), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.validateData = function() {
- var e4 = this;
- this._valueHeight = void 0, t2.prototype.validateData.call(this), this._levelCount = 0, this.nodes.each(function(t3, e5) {
- e5.level = void 0;
- }), this.nodes.each(function(t3, i3) {
- i3.level = e4.getNodeLevel(i3, 0), e4._levelCount = gt(e4._levelCount, i3.level);
- });
- }, e3.prototype.getNodeLevel = function(t3, e4) {
- var i3 = this, n3 = [e4];
- return ti(t3.incomingDataItems.iterator(), function(t4) {
- t4.fromNode && (tt(t4.fromNode.level) ? n3.push(t4.fromNode.level + 1) : (i3._counter = 0, i3.checkLoop(t4.fromNode), i3._counter < i3.dataItems.length && n3.push(i3.getNodeLevel(t4.fromNode, e4 + 1))));
- }), Math.max.apply(Math, T(n3));
- }, e3.prototype.checkLoop = function(t3) {
- var e4 = this;
- this._counter++, this._counter > this.dataItems.length || ti(t3.incomingDataItems.iterator(), function(t4) {
- e4.checkLoop(t4.fromNode);
- });
- }, e3.prototype.calculateValueHeight = function() {
- var t3 = this;
- this._levelSum = {}, this._levelNodesCount = {}, this.maxSum = 0;
- var e4, i3, n3, r3 = this.dataItem.values.value.sum;
- ti(this._sorted, function(e5) {
- var i4 = e5[1];
- t3.getNodeValue(i4);
- }), this.nodes.each(function(e5, i4) {
- var n4 = i4.level, s3 = Math.max(i4.totalIncoming, i4.totalOutgoing);
- s3 / r3 < t3.minNodeSize && (s3 = r3 * t3.minNodeSize), tt(t3._levelSum[n4]) ? t3._levelSum[n4] += s3 : t3._levelSum[n4] = s3, tt(t3._levelNodesCount[n4]) ? t3._levelNodesCount[n4]++ : t3._levelNodesCount[n4] = 1;
- }), e4 = this.orientation == "horizontal" ? this.chartContainer.maxHeight - 1 : this.chartContainer.maxWidth - 1, Ne(this._levelSum, function(r4, s3) {
- var a3 = s3, o4 = t3._levelNodesCount[r4], l3 = (e4 - (o4 - 1) * t3.nodePadding) / a3;
- l3 == 1 / 0 && (l3 = 0), (n3 > l3 || !tt(n3)) && (n3 = l3, t3.maxSum = a3, i3 = U(r4));
- }), this._maxSumLevel = i3;
- var s2 = this._levelNodesCount[this._maxSumLevel], a2 = (e4 - (s2 - 1) * this.nodePadding) / this.maxSum;
- if (a2 == 1 / 0 && (a2 = 0), tt(this.valueHeight)) {
- var o3 = void 0;
- try {
- o3 = this._heightAnimation.animationOptions[0].to;
- } catch (t4) {
- }
- if (o3 != a2) {
- var l2 = this.interpolationDuration;
- try {
- l2 = this.nodes.template.states.getKey("active").transitionDuration;
- } catch (t4) {
- }
- this._heightAnimation = new ys(this, { property: "valueHeight", from: this.valueHeight, to: a2 }, l2, this.interpolationEasing).start(), this._disposers.push(this._heightAnimation);
- }
- } else
- this.valueHeight = a2;
- }, e3.prototype.validate = function() {
- var e4 = this;
- t2.prototype.validate.call(this), this.calculateValueHeight();
- var i3, n3 = this.nodesContainer, r3 = {}, s2 = this._levelNodesCount[this._maxSumLevel], a2 = this.dataItem.values.value.sum;
- i3 = this.orientation == "horizontal" ? this.chartContainer.maxHeight - 1 : this.chartContainer.maxWidth - 1, ti(this._sorted, function(t3) {
- var o3, l2, h2, p2 = t3[1], u2 = p2.level, d2 = 0, c2 = e4._levelNodesCount[u2];
- switch (e4.nodeAlign) {
- case "bottom":
- d2 = (e4.maxSum - e4._levelSum[u2]) * e4.valueHeight - (c2 - s2) * e4.nodePadding;
- break;
- case "middle":
- d2 = (e4.maxSum - e4._levelSum[u2]) * e4.valueHeight / 2 - (c2 - s2) * e4.nodePadding / 2;
- }
- if (e4.maxSum == 0)
- switch (e4.nodeAlign) {
- case "bottom":
- d2 = i3 - c2 * (e4.minNodeSize * i3 + e4.nodePadding);
- break;
- case "middle":
- d2 = i3 / 2 - c2 / 2 * (e4.minNodeSize * i3 + e4.nodePadding);
- }
- p2.parent = n3;
- var f2 = Math.max(p2.totalIncoming, p2.totalOutgoing);
- if (f2 / a2 < e4.minNodeSize && (f2 = a2 * e4.minNodeSize), e4.orientation == "horizontal") {
- l2 = (o3 = (e4.innerWidth - p2.pixelWidth) / e4._levelCount) * p2.level, h2 = r3[u2] || d2;
- var g2 = f2 * e4.valueHeight;
- a2 == 0 && g2 == 0 && (g2 = e4.minNodeSize * i3), p2.height = g2, p2.minX = l2, p2.maxX = l2, r3[u2] = h2 + g2 + e4.nodePadding;
- } else {
- o3 = (e4.innerHeight - p2.pixelHeight) / e4._levelCount, l2 = r3[u2] || d2, h2 = o3 * p2.level;
- var y2 = f2 * e4.valueHeight;
- a2 == 0 && y2 == 0 && (y2 = e4.minNodeSize * i3), p2.width = y2, p2.minY = h2, p2.maxY = h2, r3[u2] = l2 + y2 + e4.nodePadding;
- }
- p2.x = l2, p2.y = h2;
- });
- }, e3.prototype.showReal = function(e4) {
- var i3 = this;
- if (!this.preventShow) {
- if (this.interpolationDuration > 0) {
- var n3 = this.nodesContainer, r3 = 0;
- ti(this.links.iterator(), function(t3) {
- t3.hide(0);
- }), ti(this._sorted, function(t3) {
- var e5, s2 = t3[1];
- i3.orientation == "horizontal" ? (s2.dx = -(n3.pixelWidth - s2.pixelWidth) / Math.max(i3._levelCount, 1), e5 = "dx") : (s2.dy = -(n3.pixelHeight - s2.pixelHeight) / Math.max(i3._levelCount, 1), e5 = "dy");
- var a2 = 0, o3 = i3.interpolationDuration;
- i3.sequencedInterpolation && (a2 = i3.sequencedInterpolationDelay * r3 + o3 * r3 / $e(i3.nodes.iterator())), s2.opacity = 0, s2.invalidateLinks(), s2.animate([{ property: "opacity", from: 0, to: 1 }, { property: e5, to: 0 }], i3.interpolationDuration, i3.interpolationEasing).delay(a2), ti(s2.outgoingDataItems.iterator(), function(t4) {
- var e6 = t4.link.show(i3.interpolationDuration);
- e6 && !e6.isFinished() && e6.delay(a2);
- }), ti(s2.incomingDataItems.iterator(), function(t4) {
- if (!t4.fromNode) {
- var e6 = t4.link.show(i3.interpolationDuration);
- e6 && !e6.isFinished() && e6.delay(a2);
- }
- }), r3++;
- });
- }
- return t2.prototype.showReal.call(this);
- }
- }, e3.prototype.changeSorting = function() {
- var t3 = this;
- this.sortNodes();
- var e4 = {};
- ti(this._sorted, function(i3) {
- var n3, r3, s2 = i3[1], a2 = s2.level, o3 = (t3.maxSum - t3._levelSum[a2]) * t3.valueHeight / 2;
- t3.orientation == "horizontal" ? (n3 = "y", r3 = s2.pixelHeight) : (n3 = "x", r3 = s2.pixelWidth), s2.animate({ property: n3, to: e4[a2] || o3 }, t3.interpolationDuration, t3.interpolationEasing), e4[a2] = (e4[a2] || o3) + r3 + t3.nodePadding, s2.invalidateLinks();
- });
- }, e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Sankey diagram"));
- }, e3.prototype.createDataItem = function() {
- return new mp();
- }, Object.defineProperty(e3.prototype, "nodeAlign", { get: function() {
- return this.getPropertyValue("nodeAlign");
- }, set: function(t3) {
- this.setPropertyValue("nodeAlign", t3), this.changeSorting();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "orientation", { get: function() {
- return this.getPropertyValue("orientation");
- }, set: function(t3) {
- this.setPropertyValue("orientation", t3, true);
- var e4 = this.nodes.template.nameLabel;
- t3 == "vertical" ? (this.nodes.template.width = void 0, e4.label.horizontalCenter = "middle", e4.locationX = 0.5) : (this.nodes.template.height = void 0, e4.label.horizontalCenter = "left", e4.locationX = 1);
- }, enumerable: true, configurable: true }), e3.prototype.createNode = function() {
- var t3 = new gp();
- return this._disposers.push(t3), t3;
- }, e3.prototype.createLink = function() {
- var t3 = new yp();
- return this._disposers.push(t3), t3;
- }, Object.defineProperty(e3.prototype, "valueHeight", { get: function() {
- return this._valueHeight;
- }, set: function(t3) {
- t3 != this._valueHeight && (this._valueHeight = t3, this.invalidate());
- }, enumerable: true, configurable: true }), e3.prototype.disposeData = function() {
- t2.prototype.disposeData.call(this), this._sorted = this.nodes.iterator();
- }, e3;
- }(cp);
- Ii.registeredClasses.SankeyDiagram = vp;
- var bp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "ChordNode";
- var i3 = e4.createChild(Nh);
- i3.location = 0.5, i3.radius = 5, i3.text = "{name}", i3.zIndex = 1, i3.shouldClone = false, e4.label = i3, e4.layout = "none", e4.events.on("positionchanged", e4.updateRotation, e4, false), e4.isMeasured = false, e4.slice = e4.createChild(No), e4.slice.isMeasured = false;
- var n3 = e4.hiddenState;
- return n3.properties.fill = new Ys().getFor("disabledBackground"), n3.properties.opacity = 0.5, n3.properties.visible = true, e4.setStateOnChildren = false, e4.slice.hiddenState.properties.visible = true, e4.adapter.add("tooltipX", function(t3, e5) {
- return e5.slice.ix * (e5.slice.radius - (e5.slice.radius - e5.slice.pixelInnerRadius) / 2);
- }), e4.adapter.add("tooltipY", function(t3, e5) {
- return e5.slice.iy * (e5.slice.radius - (e5.slice.radius - e5.slice.pixelInnerRadius) / 2);
- }), e4;
- }
- return C(e3, t2), e3.prototype.invalidateLinks = function() {
- var e4 = this;
- t2.prototype.invalidateLinks.call(this);
- var i3 = this.label, n3 = this.slice, r3 = this.chart;
- if (r3 && n3) {
- var s2 = this.total, a2 = n3.arc, o3 = n3.startAngle;
- this.children.each(function(t3) {
- if (t3 instanceof ql) {
- var e5 = t3.locationX;
- tt(e5) || (e5 = 0.5);
- var i4 = t3.locationY;
- tt(i4) || (i4 = 1);
- var r4 = o3 + a2 * e5, s3 = i4 * n3.radius;
- t3.x = s3 * ft(r4), t3.y = s3 * dt(r4);
- }
- });
- var l2 = o3 + a2 * i3.location, h2 = o3 + (1 - s2 / this.adjustedTotal) * a2 * 0.5;
- M(h2) && (h2 = o3), i3.fixPosition(l2, n3.radius), this.nextAngle = h2, this._outgoingSorted && ti(this._outgoingSorted, function(t3) {
- var i4 = t3.link;
- i4.parent = e4.chart.linksContainer;
- var s3 = t3.getWorkingValue("value");
- if (tt(s3)) {
- if (r3.nonRibbon) {
- var l3 = i4.percentWidth;
- tt(l3) || (l3 = 5), l3 /= 100, i4.startAngle = o3 + a2 / 2 - a2 / 2 * l3, i4.arc = a2 * l3;
- } else
- i4.arc = s3 * r3.valueAngle, i4.startAngle = e4.nextAngle, e4.nextAngle += i4.arc;
- t3.toNode || (i4.endAngle = i4.startAngle), i4.radius = n3.pixelInnerRadius;
- }
- }), this._incomingSorted && ti(this._incomingSorted, function(t3) {
- var i4 = t3.link;
- if (i4.radius = n3.pixelInnerRadius, r3.nonRibbon) {
- var s3 = i4.percentWidth;
- tt(s3) || (s3 = 5), s3 /= 100, i4.endAngle = o3 + a2 / 2 - a2 / 2 * s3, i4.arc = a2 * s3;
- } else {
- i4.endAngle = e4.nextAngle;
- var l3 = t3.getWorkingValue("value");
- tt(l3) && (i4.arc = l3 * r3.valueAngle, e4.nextAngle += i4.arc);
- }
- t3.fromNode || (i4.startAngle = i4.endAngle);
- });
- }
- }, e3.prototype.updateRotation = function() {
- var t3 = this.slice, e4 = this.trueStartAngle + t3.arc / 2, i3 = t3.radius, n3 = i3 * ft(e4), r3 = i3 * dt(e4), s2 = Dt({ x: n3 + this.pixelX, y: r3 + this.pixelY });
- t3.startAngle = this.trueStartAngle + (s2 - e4), this.dx = -this.pixelX, this.dy = -this.pixelY;
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.label.copyFrom(e4.label), this.slice.copyFrom(e4.slice);
- }, e3;
- }(pp);
- Ii.registeredClasses.ChordNode = bp;
- var xp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "QuadraticCurve", e4.element = e4.paper.add("path"), e4.pixelPerfect = false, e4.fill = dn(), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- if (tt(this.x1 + this.x2 + this.y1 + this.y2 + this.cpx + this.cpy)) {
- var t3 = { x: this.x1, y: this.y1 }, e4 = { x: this.x2, y: this.y2 }, i3 = { x: this.cpx, y: this.cpy }, n3 = wo(t3) + Oo(e4, i3);
- this.path = n3;
- }
- }, Object.defineProperty(e3.prototype, "cpx", { get: function() {
- return this.getPropertyValue("cpx");
- }, set: function(t3) {
- this.setPropertyValue("cpx", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "cpy", { get: function() {
- return this.getPropertyValue("cpy");
- }, set: function(t3) {
- this.setPropertyValue("cpy", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.positionToPoint = function(t3) {
- var e4 = { x: this.x1, y: this.y1 }, i3 = { x: this.cpx, y: this.cpy }, n3 = { x: this.x2, y: this.y2 }, r3 = Vt(e4, n3, i3, t3), s2 = Vt(e4, n3, i3, t3 + 1e-3);
- return { x: r3.x, y: r3.y, angle: Dt(r3, s2) };
- }, e3;
- }(bo), _p = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ChordLink", e4.middleLine = e4.createChild(xp), e4.middleLine.shouldClone = false, e4.middleLine.strokeOpacity = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.validate = function() {
- if (t2.prototype.validate.call(this), !this.isTemplate) {
- var e4 = this.startAngle, i3 = this.endAngle, n3 = this.arc, r3 = this.radius, s2 = this.dataItem.fromNode, a2 = this.dataItem.toNode, o3 = 0, l2 = 0;
- s2 && (o3 = s2.pixelX + s2.dx, l2 = s2.pixelY + s2.dy);
- var h2 = 0, p2 = 0;
- if (a2 && (h2 = a2.pixelX + a2.dx, p2 = a2.pixelY + a2.dy), r3 > 0) {
- var u2 = r3 * ft(e4) + o3, d2 = r3 * dt(e4) + l2, c2 = r3 * ft(i3) + h2, f2 = r3 * dt(i3) + p2, g2 = { x: 0, y: 0 }, y2 = wo({ x: u2, y: d2 });
- y2 += Do(e4, n3, r3), y2 += Oo({ x: c2, y: f2 }, g2), y2 += Do(i3, n3, r3), y2 += Oo({ x: u2, y: d2 }, g2), this.link.path = n3 > 0 ? y2 : "", this.maskBullets && (this.bulletsMask.path = y2, this.bulletsContainer.mask = this.bulletsMask);
- var m2 = e4 + n3 / 2, v2 = i3 + n3 / 2, b2 = this.middleLine;
- b2.x1 = r3 * ft(m2) + o3, b2.y1 = r3 * dt(m2) + l2, b2.x2 = r3 * ft(v2) + h2, b2.y2 = r3 * dt(v2) + p2, b2.cpx = 0, b2.cpy = 0, b2.stroke = this.fill, this.positionBullets();
- }
- }
- }, Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPropertyValue("radius", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "arc", { get: function() {
- return this.getPropertyValue("arc");
- }, set: function(t3) {
- this.setPropertyValue("arc", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(up);
- Ii.registeredClasses.ChordLink = _p;
- var Pp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ChordDiagramDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(dp), wp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.valueAngle = 0, e4.className = "ChordDiagram", e4.startAngle = -90, e4.endAngle = 270, e4.radius = V(80), e4.innerRadius = -15, e4.nodePadding = 5;
- var i3 = e4.chartContainer.createChild($a);
- return i3.align = "center", i3.valign = "middle", i3.shouldClone = false, i3.layout = "absolute", e4.chordContainer = i3, e4.nodesContainer.parent = i3, e4.linksContainer.parent = i3, e4.chartContainer.events.on("maxsizechanged", e4.invalidate, e4, false), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.validate = function() {
- var e4 = this, i3 = this.chartContainer, n3 = this.endAngle, r3 = this.startAngle + this.nodePadding / 2, s2 = Bt(this.startAngle, this.endAngle, 1);
- s2 = At([s2, { x: 0, y: 0, width: 0, height: 0 }]);
- var a2 = Math.min(i3.innerWidth / s2.width, i3.innerHeight / s2.height);
- tt(a2) || (a2 = 0);
- var o3 = Fn(this.radius, a2), l2 = Fn(this.innerRadius, o3, true), h2 = this.dataItem.values.value.sum, p2 = 0, u2 = 0;
- ti(this._sorted, function(t3) {
- var i4 = t3[1];
- e4.getNodeValue(i4), p2++;
- var n4 = i4.total;
- i4.total / h2 < e4.minNodeSize && (n4 = h2 * e4.minNodeSize), u2 += n4;
- }), this.valueAngle = (n3 - this.startAngle - this.nodePadding * p2) / u2, ti(this._sorted, function(t3) {
- var i4 = t3[1], s3 = i4.slice;
- s3.radius = o3, s3.innerRadius = l2;
- var a3, u3 = i4.total;
- i4.total / h2 < e4.minNodeSize && (u3 = h2 * e4.minNodeSize), i4.adjustedTotal = u3, a3 = e4.nonRibbon ? (n3 - e4.startAngle) / p2 - e4.nodePadding : e4.valueAngle * u3, s3.arc = a3, s3.startAngle = r3, i4.trueStartAngle = r3, i4.parent = e4.nodesContainer, i4.validate(), r3 += a3 + e4.nodePadding;
- }), this.chordContainer.definedBBox = { x: o3 * s2.x, y: o3 * s2.y, width: o3 * s2.width, height: o3 * s2.height }, this.chordContainer.invalidateLayout(), t2.prototype.validate.call(this);
- }, e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Chord diagram"));
- }, e3.prototype.createDataItem = function() {
- return new Pp();
- }, Object.defineProperty(e3.prototype, "startAngle", { get: function() {
- return this.getPropertyValue("startAngle");
- }, set: function(t3) {
- this.setPropertyValue("startAngle", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endAngle", { get: function() {
- return this.getPropertyValue("endAngle");
- }, set: function(t3) {
- this.setPropertyValue("endAngle", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- return this.getPropertyValue("innerRadius");
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "nonRibbon", { get: function() {
- return this.getPropertyValue("nonRibbon");
- }, set: function(t3) {
- this.setPropertyValue("nonRibbon", t3, true), this.links.template.middleLine.strokeOpacity = 1, this.links.template.link.fillOpacity = 0;
- }, enumerable: true, configurable: true }), e3.prototype.createNode = function() {
- var t3 = new bp();
- return this._disposers.push(t3), t3;
- }, e3.prototype.createLink = function() {
- var t3 = new _p();
- return this._disposers.push(t3), t3;
- }, e3;
- }(cp);
- Ii.registeredClasses.ChordDiagram = wp;
- var Cp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Column", e4.width = V(80), e4.height = V(80), e4.events.disableType("transformed"), e4.applyOnClones = true, e4.strokeOpacity = 1, e4.layout = "none", e4.createAssets(), e4.events.on("childadded", e4.handleKidAdded, e4, false), e4;
- }
- return C(e3, t2), e3.prototype.handleKidAdded = function() {
- this.layout == "none" && (this.layout = "absolute");
- }, e3.prototype.createAssets = function() {
- this.column = this.createChild(fo), this.column.shouldClone = false, this.column.isMeasured = false, this.column.cornerRadius(0, 0, 0, 0), this._disposers.push(this.column);
- }, e3.prototype.validate = function() {
- t2.prototype.validate.call(this);
- var e4 = this.column;
- e4 && (e4.width = yt(this.pixelWidth, this.maxWidth), e4.height = yt(this.pixelHeight, this.maxHeight), e4.invalid && e4.validate());
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.column && this.column.copyFrom(e4.column);
- }, Object.defineProperty(e3.prototype, "bbox", { get: function() {
- return this.definedBBox ? this.definedBBox : this.column ? { x: 0, y: 0, width: this.column.measuredWidth, height: this.column.measuredHeight } : { x: 0, y: 0, width: yt(this.pixelWidth, this.maxWidth), height: yt(this.pixelHeight, this.maxHeight) };
- }, enumerable: true, configurable: true }), e3;
- }($a);
- Ii.registeredClasses.Column = Cp;
- var Op = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ColumnSeriesDataItem", e4.locations.dateX = 0.5, e4.locations.dateY = 0.5, e4.locations.categoryX = 0.5, e4.locations.categoryY = 0.5, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "column", { get: function() {
- return this._column;
- }, set: function(t3) {
- this.setColumn(t3);
- }, enumerable: true, configurable: true }), e3.prototype.setColumn = function(t3) {
- var e4 = this;
- if (this._column && t3 != this._column && ee(this.sprites, this._column), this._column = t3, t3) {
- var i3 = t3.dataItem;
- i3 && i3 != this && (i3.column = void 0), this.addSprite(t3), this._disposers.push(new ye(function() {
- e4.component && e4.component.columns.removeValue(t3);
- }));
- }
- }, Object.defineProperty(e3.prototype, "width", { get: function() {
- var t3 = this.properties.width;
- return this._adapterO && (t3 = this._adapterO.apply("width", t3)), t3;
- }, set: function(t3) {
- this.properties.width != t3 && (this.properties.width = t3, this.component && this.component.validateDataElement(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "height", { get: function() {
- var t3 = this.properties.height;
- return this._adapterO && (t3 = this._adapterO.apply("height", t3)), t3;
- }, set: function(t3) {
- this.properties.height != t3 && (this.properties.height = t3, this.component && this.component.validateDataElement(this));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "rangesColumns", { get: function() {
- return this._rangesColumns || (this._rangesColumns = new Pi()), this._rangesColumns;
- }, enumerable: true, configurable: true }), e3;
- }(Ih), Sp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._startLocation = 0, e4._endLocation = 1, e4.className = "ColumnSeries", e4.width = V(100), e4.height = V(100), e4.strokeOpacity = 0, e4.fillOpacity = 1, e4.clustered = true;
- var i3 = e4.mainContainer.createChild($a);
- return i3.shouldClone = false, i3.isMeasured = false, i3.layout = "none", e4._columnsContainer = i3, e4.columns.template.pixelPerfect = false, e4.tooltipColorSource = e4.columns.template, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "columnsContainer", { get: function() {
- return this._columnsContainer;
- }, enumerable: true, configurable: true }), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Column Series"));
- }, e3.prototype.createDataItem = function() {
- return new Op();
- }, e3.prototype.validate = function() {
- var i3 = this;
- if (this.group.node.removeAttribute("fill"), this.chart && this.xAxis && this.yAxis) {
- var n3, r3 = this.chart.series, s2 = 0, a2 = 0, o3 = [];
- ti(r3.iterator(), function(t3) {
- var n4;
- t3 instanceof e3 && i3.baseAxis == t3.baseAxis && (n4 = i3.baseAxis == i3.xAxis ? i3.chart.yAxes.indexOf(t3.yAxis) : i3.chart.xAxes.indexOf(t3.xAxis), o3.push({ series: t3, axis: n4 }));
- }), o3.sort(function(t3, e4) {
- return t3.axis - e4.axis;
- }), Ut(o3, function(t3) {
- var r4 = t3.series;
- r4 instanceof e3 && ((!r4.stacked && r4.clustered || n3 != t3.axis && r4.clustered) && s2++, r4 == i3 && (a2 = s2 - 1)), n3 = t3.axis;
- }), this.clustered || (a2 = 0, s2 = 1);
- var l2 = this.baseAxis.renderer, h2 = l2.cellStartLocation, p2 = l2.cellEndLocation;
- this._startLocation = h2 + a2 / s2 * (p2 - h2), this._endLocation = h2 + (a2 + 1) / s2 * (p2 - h2);
- var u2 = this.xAxis, d2 = this.yAxis;
- u2 instanceof Sh && d2 instanceof bh && u2.sortBySeries == this && this.sortCategoryAxis(u2, "valueY"), d2 instanceof Sh && u2 instanceof bh && d2.sortBySeries == this && this.sortCategoryAxis(d2, "valueX");
- }
- t2.prototype.validate.call(this);
- for (var c2 = 0; c2 < this.startIndex; c2++) {
- var f2 = this.dataItems.getIndex(c2);
- this.disableUnusedColumns(f2);
- }
- for (c2 = this.dataItems.length - 1; c2 > this.endIndex; c2--)
- f2 = this.dataItems.getIndex(c2), this.disableUnusedColumns(f2);
- this._propertiesChanged = false;
- }, e3.prototype.sortCategoryAxis = function(t3, e4) {
- var i3 = this;
- this.dataItems.values.sort(function(t4, i4) {
- return i4.values[e4].workingValue - t4.values[e4].workingValue;
- });
- var n3 = 0;
- this.dataItems.each(function(t4) {
- t4._index = n3, n3++;
- }), t3.dataItems.each(function(t4) {
- var e5 = t4.component, n4 = e5.categoryToPosition(t4.category) - t4.deltaPosition, r3 = e5.getSeriesDataItemByCategory(t4.category, i3);
- if (r3) {
- var s2 = i3.dataItems.indexOf(r3);
- t4._index = s2;
- var a2 = lt((s2 + 0.5) / i3.dataItems.length - n4, 3);
- t4.deltaAnimation && !t4.deltaAnimation.isDisposed() && t4.deltaAnimation.animationOptions[0].to == a2 || a2 != lt(t4.deltaPosition, 3) && (t4.deltaAnimation && t4.deltaAnimation.stop(), t4.deltaAnimation = t4.animate({ property: "deltaPosition", from: -a2, to: 0 }, e5.interpolationDuration, e5.interpolationEasing), i3._disposers.push(t4.deltaAnimation));
- }
- }), t3.dataItems.values.sort(function(t4, e5) {
- return t4.index - e5.index;
- });
- }, e3.prototype.validateDataElement = function(e4) {
- this.chart && this.xAxis && this.yAxis && (this.validateDataElementReal(e4), t2.prototype.validateDataElement.call(this, e4));
- }, e3.prototype.getStartLocation = function(t3) {
- var e4 = this._startLocation;
- return this.baseAxis == this.xAxis ? e4 += t3.locations[this.xOpenField] - 0.5 : e4 += t3.locations[this.yOpenField] - 0.5, e4;
- }, e3.prototype.getEndLocation = function(t3) {
- var e4 = this._endLocation;
- return this.baseAxis == this.xAxis ? e4 += t3.locations[this.xField] - 0.5 : e4 += t3.locations[this.yField] - 0.5, e4;
- }, e3.prototype.validateDataElementReal = function(t3) {
- var e4, i3, n3, r3, s2 = this, a2 = this.getStartLocation(t3), o3 = this.getEndLocation(t3), l2 = this.xField, h2 = this.xOpenField, p2 = this.yField, u2 = this.yOpenField, d2 = this.columns.template, c2 = d2.percentWidth, f2 = d2.percentHeight, g2 = d2.pixelWidth, y2 = d2.pixelHeight, m2 = d2.maxWidth, v2 = d2.maxHeight, b2 = d2.pixelPaddingLeft, x2 = d2.pixelPaddingRight, _2 = d2.pixelPaddingTop, P2 = d2.pixelPaddingBottom, w2 = false, C2 = t3.width;
- Z(C2) && (tt(C2) && (g2 = C2), C2 instanceof A && (c2 = 100 * C2.value));
- var O2 = t3.height;
- if (Z(O2) && (tt(O2) && (y2 = O2), O2 instanceof A && (f2 = 100 * O2.value)), this.xAxis instanceof Sh && this.yAxis instanceof Sh) {
- if (!t3.hasValue(this._xValueFields) || !t3.hasValue(this._yValueFields))
- return;
- a2 = 0, o3 = 1, M(c2) || (a2 += k2 = lt((o3 - a2) * (1 - c2 / 100) / 2, 5), o3 -= k2), e4 = this.xAxis.getX(t3, h2, a2), i3 = this.xAxis.getX(t3, l2, o3), M(c2) && (e4 += k2 = (i3 - e4 - g2) / 2, i3 -= k2), !M(m2) && m2 < Math.abs(i3 - e4) && (e4 += k2 = (i3 - e4 - m2) / 2, i3 -= k2), a2 = 0, o3 = 1, M(f2) || (a2 += k2 = lt((1 - f2 / 100) / 2, 5), o3 -= k2), n3 = this.yAxis.getY(t3, u2, a2), r3 = this.yAxis.getY(t3, p2, o3), M(f2) && (r3 += k2 = (r3 - n3 - y2) / 2, n3 -= k2), !M(v2) && v2 < Math.abs(r3 - n3) && (r3 += k2 = (r3 - n3 - v2) / 2, n3 -= k2), i3 = this.fixHorizontalCoordinate(i3), e4 = this.fixHorizontalCoordinate(e4), n3 = this.fixVerticalCoordinate(n3), r3 = this.fixVerticalCoordinate(r3);
- } else if (this.baseAxis == this.xAxis) {
- if (!t3.hasValue(this._yValueFields))
- return;
- M(c2) || (a2 += k2 = lt((o3 - a2) * (1 - c2 / 100) / 2, 5), o3 -= k2), e4 = this.xAxis.getX(t3, h2, a2), i3 = this.xAxis.getX(t3, l2, o3), M(c2) && (e4 += k2 = (i3 - e4 - g2) / 2, i3 -= k2), !M(m2) && m2 < Math.abs(i3 - e4) && (e4 += k2 = (i3 - e4 - m2) / 2, i3 -= k2);
- var S2 = t3.locations[u2], I2 = t3.locations[p2];
- this.yAxis instanceof bh && this.dataFields[this.yField] != this.dataFields[this.yOpenField] && (S2 = 0, I2 = 0), r3 = this.yAxis.getY(t3, u2, S2), n3 = this.yAxis.getY(t3, p2, I2);
- var D2 = Math.ceil(this.yAxis.axisLength);
- (n3 < 0 && r3 < 0 || n3 > D2 && r3 > D2) && (w2 = true), n3 = this.fixVerticalCoordinate(n3), r3 = this.fixVerticalCoordinate(r3), Math.abs(i3 - e4) - b2 - x2 == 0 && (w2 = true);
- } else {
- if (!t3.hasValue(this._xValueFields))
- return;
- var k2;
- M(f2) || (a2 += k2 = lt((o3 - a2) * (1 - f2 / 100) / 2, 5), o3 -= k2), n3 = this.yAxis.getY(t3, u2, a2), r3 = this.yAxis.getY(t3, p2, o3), M(f2) && (r3 -= k2 = (r3 - n3 - y2) / 2, n3 += k2), !M(v2) && v2 < Math.abs(r3 - n3) && (r3 -= k2 = (r3 - n3 - v2) / 2, n3 += k2);
- var T2 = t3.locations[l2], V2 = t3.locations[h2];
- this.xAxis instanceof bh && this.dataFields[this.xField] != this.dataFields[this.xOpenField] && (T2 = 0, V2 = 0), i3 = this.xAxis.getX(t3, l2, T2), e4 = this.xAxis.getX(t3, h2, V2), D2 = Math.ceil(this.xAxis.axisLength), (i3 < 0 && e4 < 0 || i3 > D2 && e4 > D2) && (w2 = true), i3 = this.fixHorizontalCoordinate(i3), e4 = this.fixHorizontalCoordinate(e4), Math.abs(n3 - r3) - _2 - P2 == 0 && (w2 = true);
- }
- var F2, L2 = Math.abs(i3 - e4), j2 = Math.abs(r3 - n3), E2 = Math.min(e4, i3), R2 = Math.min(n3, r3);
- w2 ? this.disableUnusedColumns(t3) : (t3.column ? (F2 = t3.column, this._propertiesChanged && (Ue(this, F2, Ka), Ue(this.columns.template, F2, Ka), Ut(Ka, function(t4) {
- F2[t4] = F2[t4];
- }))) : (Ue(this, F2 = this.columns.create(), Ka), Ue(this.columns.template, F2, Ka), t3.addSprite(F2), t3.column = F2, F2.paper = this.paper, this.itemsFocusable() ? (Z(this.role) || (this.role = "menu"), Z(F2.role) || (F2.role = "menuitem"), F2.focusable = true) : (Z(this.role) || (this.role = "list"), Z(F2.role) || (F2.role = "listitem"), F2.focusable = false), F2.focusable && (F2.events.on("focus", function(e5) {
- F2.readerTitle = s2.populateString(s2.itemReaderText, t3);
- }, void 0, false), F2.events.on("blur", function(t4) {
- F2.readerTitle = "";
- }, void 0, false)), F2.hoverable && (F2.events.on("over", function(e5) {
- F2.readerTitle = s2.populateString(s2.itemReaderText, t3);
- }, void 0, false), F2.events.on("out", function(t4) {
- F2.readerTitle = "";
- }, void 0, false)), F2.parent = this.columnsContainer, F2.virtualParent = this), F2.width = L2, F2.height = j2, F2.x = E2, F2.y = R2, F2.realX = e4, F2.realY = n3, F2.realWidth = i3 - e4, F2.realHeight = r3 - n3, this.setColumnStates(F2), F2.invalid && F2.validate(), F2.__disabled = false, ti(this.axisRanges.iterator(), function(e5) {
- var i4 = t3.rangesColumns.getKey(e5.uid);
- i4 || (i4 = s2.columns.create(), Ue(e5.contents, i4, Ka), t3.addSprite(i4), t3.rangesColumns.setKey(e5.uid, i4), i4.paper = s2.paper), i4.parent = e5.contents, i4.width = L2, i4.height = j2, i4.x = E2, i4.y = R2, s2.setColumnStates(i4), i4.invalid && i4.validate(), i4.__disabled = false;
- })), t3.itemWidth = L2, t3.itemHeight = j2;
- }, e3.prototype.disableUnusedColumns = function(t3) {
- t3 && (t3.column && (t3.column.width = 0, t3.column.height = 0, t3.column.__disabled = true), ti(this.axisRanges.iterator(), function(e4) {
- var i3 = t3.rangesColumns.getKey(e4.uid);
- i3 && (i3.width = 0, i3.height = 0, i3.__disabled = true);
- }));
- }, e3.prototype.setColumnStates = function(t3) {
- if (this._dropFromOpenState || this._dropFromPreviousState || this._riseFromOpenState || this._riseFromPreviousState) {
- var e4 = t3.dataItem;
- if (this.xAxis instanceof bh || this.yAxis instanceof bh) {
- var i3, n3 = void 0, r3 = void 0;
- this.baseAxis == this.yAxis ? (this.xOpenField && this.xField && this.xAxis instanceof bh && (i3 = e4.getValue(this.xOpenField), n3 = e4.getValue(this.xField)), r3 = e4.getValue(this.xAxis.axisFieldName + "X", "previousChange")) : (this.yOpenField && this.yField && this.yAxis instanceof bh && (i3 = e4.getValue(this.yOpenField), n3 = e4.getValue(this.yField)), r3 = e4.getValue(this.yAxis.axisFieldName + "Y", "previousChange")), n3 < i3 ? (e4.droppedFromOpen = true, t3.defaultState.copyFrom(this._dropFromOpenState), t3.setState(this._dropFromOpenState, 0)) : (e4.droppedFromOpen = false, t3.defaultState.copyFrom(this._riseFromOpenState), t3.setState(this._riseFromOpenState, 0)), r3 < 0 ? (e4.droppedFromPrevious = true, t3.defaultState.copyFrom(this._dropFromPreviousState), t3.setState(this._dropFromPreviousState, 0)) : (e4.droppedFromPrevious = false, t3.defaultState.copyFrom(this._riseFromPreviousState), t3.setState(this._riseFromPreviousState, 0));
- }
- }
- }, Object.defineProperty(e3.prototype, "columns", { get: function() {
- return this._columns || (this._columns = new Mi(this.createColumnTemplate()), this._disposers.push(new Ai(this._columns)), this._disposers.push(this._columns.template)), this._columns;
- }, enumerable: true, configurable: true }), e3.prototype.createColumnTemplate = function() {
- return new Cp();
- }, Object.defineProperty(e3.prototype, "clustered", { get: function() {
- return this.getPropertyValue("clustered");
- }, set: function(t3) {
- this.setPropertyValue("clustered", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dropFromOpenState", { get: function() {
- return this._dropFromOpenState || (this._dropFromOpenState = this.states.create("dropFromOpenState")), this._dropFromOpenState;
- }, set: function(t3) {
- this._dropFromOpenState = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dropFromPreviousState", { get: function() {
- return this._dropFromPreviousState || (this._dropFromPreviousState = this.states.create("dropFromPreviousState")), this._dropFromPreviousState;
- }, set: function(t3) {
- this._dropFromPreviousState = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "riseFromOpenState", { get: function() {
- return this._riseFromOpenState || (this._riseFromOpenState = this.states.create("riseFromOpenState")), this._riseFromOpenState;
- }, set: function(t3) {
- this._riseFromOpenState = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "riseFromPreviousState", { get: function() {
- return this._riseFromPreviousState || (this._riseFromPreviousState = this.states.create("riseFromPreviousState")), this._riseFromPreviousState;
- }, set: function(t3) {
- this._riseFromPreviousState = t3;
- }, enumerable: true, configurable: true }), e3.prototype.updateLegendValue = function(e4, i3) {
- var n3 = this;
- if (t2.prototype.updateLegendValue.call(this, e4, i3), this.legendDataItem) {
- var r3, s2, a2 = this.legendDataItem.marker;
- e4 && (r3 = e4.droppedFromOpen ? this._dropFromOpenState : this._riseFromOpenState, s2 = e4.droppedFromPrevious ? this._dropFromPreviousState : this._riseFromPreviousState), ti(a2.children.iterator(), function(t3) {
- e4 ? (t3.setState(s2), t3.setState(r3)) : (t3.setState(n3._riseFromPreviousState), t3.setState(n3._riseFromOpenState));
- });
- }
- }, e3.prototype.createLegendMarker = function(t3) {
- var e4 = t3.pixelWidth, i3 = t3.pixelHeight;
- t3.removeChildren();
- var n3 = t3.createChild(fo);
- n3.shouldClone = false, Ue(this, n3, Ka), n3.copyFrom(this.columns.template), n3.padding(0, 0, 0, 0), n3.width = e4, n3.height = i3;
- var r3 = t3.dataItem;
- r3.color = this.fill, r3.colorOrig = this.fill;
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.columns.template.copyFrom(e4.columns.template);
- }, e3.prototype.getBulletLocationX = function(e4, i3) {
- if (this.baseAxis == this.xAxis) {
- var n3 = e4.locationX;
- tt(n3) || (n3 = 0.5);
- var r3 = this.getEndLocation(e4.dataItem);
- return r3 - (r3 - this.getStartLocation(e4.dataItem)) * n3;
- }
- return t2.prototype.getBulletLocationX.call(this, e4, i3);
- }, e3.prototype.getBulletLocationY = function(e4, i3) {
- if (this.baseAxis == this.yAxis) {
- var n3 = e4.locationY;
- tt(n3) || (n3 = 0.5);
- var r3 = this.getEndLocation(e4.dataItem);
- return r3 - (r3 - this.getStartLocation(e4.dataItem)) * n3;
- }
- return t2.prototype.getBulletLocationY.call(this, e4, i3);
- }, e3.prototype.getAdjustedXLocation = function(t3, e4, i3) {
- return tt(i3) || (i3 = t3 ? t3.locations[e4] : 0.5), this._endLocation - (this._endLocation - this._startLocation) * (1 - i3);
- }, e3.prototype.getAdjustedYLocation = function(t3, e4, i3) {
- return tt(i3) || (i3 = t3 ? t3.locations[e4] : 0.5), this._endLocation - (this._endLocation - this._startLocation) * i3;
- }, e3.prototype.fixVerticalCoordinate = function(t3) {
- var e4 = this.columns.template.pixelPaddingBottom;
- return ut(t3, -this.columns.template.pixelPaddingTop, this.yAxis.axisLength + e4);
- }, e3.prototype.fixHorizontalCoordinate = function(t3) {
- var e4 = this.columns.template.pixelPaddingLeft, i3 = this.columns.template.pixelPaddingRight;
- return ut(t3, -e4, this.xAxis.axisLength + i3);
- }, e3.prototype.disposeData = function() {
- t2.prototype.disposeData.call(this), this.columns.clear();
- }, e3;
- }(Dh);
- Ii.registeredClasses.ColumnSeries = Sp, Ii.registeredClasses.ColumnSeriesDataItem = Op;
- var Ip = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "TreeMapSeriesDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "parentName", { get: function() {
- var t3 = this.treeMapDataItem;
- if (t3 && t3.parent)
- return t3.parent.name;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "value", { get: function() {
- var t3 = this.treeMapDataItem;
- if (t3)
- return t3.value;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "treeMapDataItem", { get: function() {
- return this._dataContext;
- }, enumerable: true, configurable: true }), e3.prototype.hide = function(e4, i3, n3, r3) {
- var s2 = this.treeMapDataItem;
- return s2 && s2.hide(e4), t2.prototype.hide.call(this, e4, i3, n3, r3);
- }, e3.prototype.show = function(e4, i3, n3) {
- var r3 = this.treeMapDataItem;
- return r3 && r3.show(e4, i3, n3), t2.prototype.show.call(this, e4, i3, n3);
- }, e3;
- }(Op), Dp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "TreeMapSeries", e4.applyTheme(), e4.fillOpacity = 1, e4.strokeOpacity = 1, e4.minBulletDistance = 0, e4.columns.template.tooltipText = "{parentName} {name}: {value}", e4.columns.template.configField = "config";
- var i3 = new Ys();
- return e4.stroke = i3.getFor("background"), e4.dataFields.openValueX = "x0", e4.dataFields.valueX = "x1", e4.dataFields.openValueY = "y0", e4.dataFields.valueY = "y1", e4.sequencedInterpolation = false, e4.showOnInit = false, e4.columns.template.pixelPerfect = false, e4;
- }
- return C(e3, t2), e3.prototype.processDataItem = function(e4, i3) {
- i3.seriesDataItem = e4, t2.prototype.processDataItem.call(this, e4, i3);
- }, e3.prototype.createDataItem = function() {
- return new Ip();
- }, e3.prototype.show = function(e4) {
- if (!this.preventShow) {
- var i3 = this.defaultState.transitionDuration;
- return tt(e4) && (i3 = e4), this.dataItems.each(function(t3) {
- t3.show(e4);
- }), t2.prototype.showReal.call(this, i3);
- }
- }, e3.prototype.hide = function(e4) {
- var i3 = this.defaultState.transitionDuration;
- tt(e4) && (i3 = e4);
- var n3 = t2.prototype.hideReal.call(this, i3);
- return this.dataItems.each(function(t3) {
- t3.hide(e4);
- }), n3;
- }, e3.prototype.processValues = function() {
- }, e3.prototype.getStartLocation = function(t3) {
- return 0;
- }, e3.prototype.getEndLocation = function(t3) {
- return 1;
- }, e3.prototype.dataChangeUpdate = function() {
- }, e3.prototype.processConfig = function(e4) {
- e4 && (Z(e4.dataFields) && et(e4.dataFields) || (e4.dataFields = {})), t2.prototype.processConfig.call(this, e4);
- }, e3.prototype.createLegendMarker = function(t3) {
- var e4 = t3.pixelWidth, i3 = t3.pixelHeight;
- t3.removeChildren();
- var n3 = t3.createChild(fo);
- n3.shouldClone = false, Ue(this, n3, Ka), n3.padding(0, 0, 0, 0), n3.width = e4, n3.height = i3;
- var r3 = t3.dataItem;
- r3.color = n3.fill, r3.colorOrig = n3.fill;
- }, e3.prototype.disableUnusedColumns = function(e4) {
- t2.prototype.disableUnusedColumns.call(this, e4), e4.column && (e4.column.__disabled = false);
- }, e3;
- }(Sp);
- Ii.registeredClasses.TreeMapSeries = Dp, Ii.registeredClasses.TreeMapSeriesDataItem = Ip;
- var kp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.rows = [], e4.className = "TreeMapDataItem", e4.values.value = { workingValue: 0 }, e4.values.x0 = {}, e4.values.y0 = {}, e4.values.x1 = {}, e4.values.y1 = {}, e4.hasChildren.children = true, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "legendDataItem", { get: function() {
- return this._legendDataItem;
- }, set: function(t3) {
- this._legendDataItem = t3, t3.label && (t3.label.dataItem = this), t3.valueLabel && (t3.valueLabel.dataItem = this);
- }, enumerable: true, configurable: true }), e3.prototype.getDuration = function() {
- return 0;
- }, Object.defineProperty(e3.prototype, "value", { get: function() {
- var t3 = 0;
- return this.children && this.children.length != 0 ? ti(this.children.iterator(), function(e4) {
- var i3 = e4.value;
- tt(i3) && (t3 += i3);
- }) : t3 = this.values.value.workingValue, t3;
- }, set: function(t3) {
- this.setValue("value", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "percent", { get: function() {
- return this.parent ? this.value / this.parent.value * 100 : 100;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "x0", { get: function() {
- return this.values.x0.value;
- }, set: function(t3) {
- this.setValue("x0", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "x1", { get: function() {
- return this.values.x1.value;
- }, set: function(t3) {
- this.setValue("x1", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "y0", { get: function() {
- return this.values.y0.value;
- }, set: function(t3) {
- this.setValue("y0", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "y1", { get: function() {
- return this.values.y1.value;
- }, set: function(t3) {
- this.setValue("y1", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "name", { get: function() {
- return this.properties.name;
- }, set: function(t3) {
- this.setProperty("name", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "children", { get: function() {
- return this.properties.children;
- }, set: function(t3) {
- this.setProperty("children", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "level", { get: function() {
- return this.parent ? this.parent.level + 1 : 0;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "color", { get: function() {
- var t3 = this.properties.color;
- return t3 == null && this.parent && (t3 = this.parent.color), t3 == null && this.component && (t3 = this.component.colors.getIndex(this.component.colors.step * this.index)), t3;
- }, set: function(t3) {
- this.setProperty("color", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fill", { get: function() {
- return this.color;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "series", { get: function() {
- return this._series;
- }, set: function(t3) {
- t3 != this._series && (this._series && (this.component.series.removeValue(this._series), this._series.dispose()), this._series = t3, this._disposers.push(t3));
- }, enumerable: true, configurable: true }), e3.prototype.hide = function(e4, i3, n3, r3) {
- this.setWorkingValue("value", 0), this.children && this.children.each(function(t3) {
- t3.hide(e4, i3, n3, r3);
- });
- var s2 = this.seriesDataItem;
- return s2 && s2.bullets.each(function(t3, e5) {
- e5.hide(), e5.preventShow = true;
- }), t2.prototype.hide.call(this, e4, i3, n3, r3);
- }, e3.prototype.show = function(e4, i3, n3) {
- this.setWorkingValue("value", this.values.value.value), this.children && this.children.each(function(t3) {
- t3.show(e4, i3, n3);
- });
- var r3 = this.seriesDataItem;
- return r3 && r3.bullets.each(function(t3, e5) {
- e5.preventShow = false;
- }), t2.prototype.show.call(this, e4, i3, n3);
- }, e3;
- }(Th), Tp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.layoutAlgorithm = e4.squarify, e4.zoomable = true, e4.className = "TreeMap", e4._usesData = true, e4.maxLevels = 2, e4.currentLevel = 0, e4.hideParentColumns = false, e4.colors = new kl(), e4.sorting = "descending";
- var i3 = e4.xAxes.push(new bh());
- i3.title.disabled = true, i3.strictMinMax = true;
- var n3 = i3.renderer;
- n3.inside = true, n3.labels.template.disabled = true, n3.ticks.template.disabled = true, n3.grid.template.disabled = true, n3.axisFills.template.disabled = true, n3.minGridDistance = 100, n3.line.disabled = true, n3.baseGrid.disabled = true;
- var r3 = e4.yAxes.push(new bh());
- r3.title.disabled = true, r3.strictMinMax = true;
- var s2 = r3.renderer;
- s2.inside = true, s2.labels.template.disabled = true, s2.ticks.template.disabled = true, s2.grid.template.disabled = true, s2.axisFills.template.disabled = true, s2.minGridDistance = 100, s2.line.disabled = true, s2.baseGrid.disabled = true, s2.inversed = true, e4.xAxis = i3, e4.yAxis = r3;
- var a2 = new Dp();
- return e4.seriesTemplates = new wi(a2), a2.virtualParent = e4, e4._disposers.push(new _i(e4.seriesTemplates)), e4._disposers.push(a2), e4.zoomOutButton.events.on("hit", function() {
- e4.zoomToChartDataItem(e4._homeDataItem);
- }, void 0, false), e4.seriesTemplates.events.on("insertKey", function(t3) {
- t3.newValue.isTemplate = true;
- }, void 0, false), e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "navigationBar", { get: function() {
- return this._navigationBar;
- }, set: function(t3) {
- var e4 = this;
- this._navigationBar != t3 && (this._navigationBar = t3, t3.parent = this, t3.toBack(), t3.links.template.events.on("hit", function(t4) {
- var i3 = t4.target.dataItem.dataContext;
- i3.isDisposed() || (e4.zoomToChartDataItem(i3), e4.createTreeSeries(i3));
- }, void 0, true), this._disposers.push(t3));
- }, enumerable: true, configurable: true }), e3.prototype.validateData = function() {
- this.series.clear(), this._tempSeries = [], t2.prototype.validateData.call(this), this._homeDataItem && this._homeDataItem.dispose();
- var e4 = this.dataItems.template.clone();
- this._homeDataItem = e4, ti(this.dataItems.iterator(), function(t3) {
- t3.parent = e4;
- }), e4.children = this.dataItems, e4.x0 = 0, e4.y0 = 0, e4.name = this._homeText;
- var i3 = 1e3, n3 = 10 * Math.round(i3 * this.pixelHeight / this.pixelWidth / 10) || 1e3;
- e4.x1 = i3, e4.y1 = n3, this.xAxis.min = 0, this.xAxis.max = i3, this.xAxis.getMinMax(), this.yAxis.min = 0, this.yAxis.max = n3, this.yAxis.getMinMax(), this.layoutItems(e4), this.createTreeSeries(e4), this.feedLegend();
- }, e3.prototype.layoutItems = function(t3, e4) {
- if (t3) {
- var i3 = t3.children;
- e4 || (e4 = this.sorting), e4 == "ascending" && i3.values.sort(function(t4, e5) {
- return t4.value - e5.value;
- }), e4 == "descending" && i3.values.sort(function(t4, e5) {
- return e5.value - t4.value;
- }), this._updateDataItemIndexes(0), this.layoutAlgorithm(t3);
- for (var n3 = 0, r3 = i3.length; n3 < r3; n3++) {
- var s2 = i3.getIndex(n3);
- s2.children && this.layoutItems(s2);
- }
- }
- }, e3.prototype.createTreeSeries = function(t3) {
- var e4 = this;
- this._tempSeries = [];
- for (var i3 = [t3], n3 = t3.parent; n3 != null; )
- this.initSeries(n3), i3.push(n3), n3 = n3.parent;
- i3.reverse(), this.navigationBar && (this.navigationBar.data = i3), this.createTreeSeriesReal(t3), Ut(this._tempSeries, function(t4) {
- e4.series.indexOf(t4) == -1 && e4.series.push(t4), t4.zIndex = t4.level;
- });
- }, e3.prototype.createTreeSeriesReal = function(t3) {
- if (t3.children && t3.level < this.currentLevel + this.maxLevels) {
- this.initSeries(t3);
- for (var e4 = 0; e4 < t3.children.length; e4++) {
- var i3 = t3.children.getIndex(e4);
- i3.children && this.createTreeSeriesReal(i3);
- }
- }
- }, e3.prototype.setData = function(e4) {
- this.currentLevel = 0, this.currentlyZoomed = void 0, this.xAxis.start = 0, this.xAxis.end = 1, this.yAxis.start = 0, this.yAxis.end = 1, t2.prototype.setData.call(this, e4);
- }, e3.prototype.seriesAppeared = function() {
- return true;
- }, e3.prototype.initSeries = function(t3) {
- var e4 = this;
- if (!t3.series) {
- var i3 = void 0, n3 = this.seriesTemplates.getKey(t3.level.toString());
- (i3 = n3 ? n3.clone() : this.series.create()).dataItem.dataContext = t3, i3.name = t3.name, i3.parentDataItem = t3, t3.series = i3;
- var r3 = t3.level;
- i3.level = r3;
- var s2 = t3.dataContext;
- s2 && (i3.config = s2.config), this.dataUsers.removeValue(i3), i3.data = t3.children.values, i3.fill = t3.color, i3.columnsContainer.hide(0), i3.bulletsContainer.hide(0), i3.columns.template.adapter.add("fill", function(t4, e5) {
- var i4 = e5.dataItem;
- if (i4) {
- var n4 = i4.treeMapDataItem;
- if (n4)
- return e5.fill = n4.color, e5.adapter.remove("fill"), n4.color;
- }
- }), this.zoomable && (t3.level > this.currentLevel || t3.children && t3.children.length > 0) && (i3.columns.template.cursorOverStyle = Ia.pointer, this.zoomable && i3.columns.template.events.on("hit", function(i4) {
- var n4 = i4.target.dataItem;
- t3.level > e4.currentLevel ? e4.zoomToChartDataItem(n4.treeMapDataItem.parent) : e4.zoomToSeriesDataItem(n4);
- }, this, void 0));
- }
- this._tempSeries.push(t3.series);
- }, e3.prototype.toggleBullets = function(t3) {
- var e4 = this;
- ti(this.series.iterator(), function(i3) {
- e4._tempSeries.indexOf(i3) == -1 ? (i3.columnsContainer.hide(), i3.bulletsContainer.hide(t3)) : (i3.columnsContainer.show(), i3.bulletsContainer.show(t3), i3.dataItems.each(function(t4) {
- t4.bullets.each(function(t5, e5) {
- e5.show();
- });
- }), i3.level < e4.currentLevel ? (e4.hideParentColumns && i3.columnsContainer.hide(), i3.bulletsContainer.hide(t3)) : i3.level == e4.currentLevel && e4.maxLevels > 1 && i3.dataItems.each(function(t4) {
- t4.treeMapDataItem.children && t4.bullets.each(function(t5, e5) {
- e5.hide();
- });
- }));
- });
- }, e3.prototype.zoomToSeriesDataItem = function(t3) {
- this.zoomToChartDataItem(t3.treeMapDataItem);
- }, e3.prototype.zoomToChartDataItem = function(t3) {
- var e4 = this;
- t3 || (t3 = this._homeDataItem);
- var i3 = this.zoomOutButton;
- if (i3 && (t3 != this._homeDataItem ? i3.show() : i3.hide()), t3 && t3.children) {
- this.xAxis.zoomToValues(t3.x0, t3.x1), this.yAxis.zoomToValues(t3.y0, t3.y1), this.currentLevel = t3.level, this.currentlyZoomed = t3, this.createTreeSeries(t3);
- var n3 = this.xAxis.rangeChangeAnimation || this.yAxis.rangeChangeAnimation;
- !n3 || n3.isDisposed() || n3.isFinished() ? this.toggleBullets() : (this._dataDisposers.push(n3), n3.events.once("animationended", function() {
- e4.toggleBullets();
- }));
- }
- }, e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("TreeMap chart"));
- }, e3.prototype.createDataItem = function() {
- return new kp();
- }, Object.defineProperty(e3.prototype, "maxLevels", { get: function() {
- return this.getPropertyValue("maxLevels");
- }, set: function(t3) {
- this.setPropertyValue("maxLevels", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "currentLevel", { get: function() {
- return this.getPropertyValue("currentLevel");
- }, set: function(t3) {
- this.setPropertyValue("currentLevel", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hideParentColumns", { get: function() {
- return this.getPropertyValue("hideParentColumns");
- }, set: function(t3) {
- this.setPropertyValue("hideParentColumns", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "sorting", { get: function() {
- return this.getPropertyValue("sorting");
- }, set: function(t3) {
- this.setPropertyValue("sorting", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.createSeries = function() {
- return new Dp();
- }, Object.defineProperty(e3.prototype, "homeText", { get: function() {
- return this._homeText;
- }, set: function(t3) {
- this._homeText = t3, this._homeDataItem && (this._homeDataItem.name = this._homeText);
- }, enumerable: true, configurable: true }), e3.prototype.processConfig = function(e4) {
- if (e4) {
- if (Z(e4.layoutAlgorithm) && Q(e4.layoutAlgorithm))
- switch (e4.layoutAlgorithm) {
- case "squarify":
- e4.layoutAlgorithm = this.squarify;
- break;
- case "binaryTree":
- e4.layoutAlgorithm = this.binaryTree;
- break;
- case "slice":
- e4.layoutAlgorithm = this.slice;
- break;
- case "dice":
- e4.layoutAlgorithm = this.dice;
- break;
- case "sliceDice":
- e4.layoutAlgorithm = this.sliceDice;
- break;
- default:
- delete e4.layoutAlgorithm;
- }
- Z(e4.navigationBar) && !Z(e4.navigationBar.type) && (e4.navigationBar.type = "NavigationBar"), t2.prototype.processConfig.call(this, e4);
- }
- }, e3.prototype.validateLayout = function() {
- t2.prototype.validateLayout.call(this), this.layoutItems(this.currentlyZoomed);
- }, e3.prototype.validateDataItems = function() {
- t2.prototype.validateDataItems.call(this), this.layoutItems(this._homeDataItem), ti(this.series.iterator(), function(t3) {
- t3.validateRawData();
- }), this.zoomToChartDataItem(this._homeDataItem);
- }, e3.prototype.binaryTree = function(t3) {
- var e4, i3, n3 = t3.children, r3 = n3.length, s2 = new Array(r3 + 1);
- for (s2[0] = i3 = e4 = 0; e4 < r3; ++e4)
- s2[e4 + 1] = i3 += n3.getIndex(e4).value;
- r3 > 0 && function t4(e5, i4, r4, a2, o3, l2, h2) {
- if (e5 >= i4 - 1)
- return (g2 = n3.getIndex(e5)).x0 = a2, g2.y0 = o3, g2.x1 = l2, void (g2.y1 = h2);
- for (var p2 = s2[e5], u2 = r4 / 2 + p2, d2 = e5 + 1, c2 = i4 - 1; d2 < c2; ) {
- var f2 = d2 + c2 >>> 1;
- s2[f2] < u2 ? d2 = f2 + 1 : c2 = f2;
- }
- u2 - s2[d2 - 1] < s2[d2] - u2 && e5 + 1 < d2 && --d2;
- var g2, y2 = s2[d2] - p2, m2 = r4 - y2;
- if (r4 == 0)
- return (g2 = n3.getIndex(e5)).x0 = a2, g2.y0 = o3, g2.x1 = l2, void (g2.y1 = h2);
- if (l2 - a2 > h2 - o3) {
- var v2 = (a2 * m2 + l2 * y2) / r4;
- t4(e5, d2, y2, a2, o3, v2, h2), t4(d2, i4, m2, v2, o3, l2, h2);
- } else {
- var b2 = (o3 * m2 + h2 * y2) / r4;
- t4(e5, d2, y2, a2, o3, l2, b2), t4(d2, i4, m2, a2, b2, l2, h2);
- }
- }(0, r3, t3.value, t3.x0, t3.y0, t3.x1, t3.y1);
- }, e3.prototype.slice = function(t3) {
- for (var e4, i3 = t3.x0, n3 = t3.x1, r3 = t3.y0, s2 = t3.y1, a2 = t3.children, o3 = -1, l2 = a2.length, h2 = t3.value && (s2 - r3) / t3.value; ++o3 < l2; )
- (e4 = a2.getIndex(o3)).x0 = i3, e4.x1 = n3, e4.y0 = r3, r3 += e4.value * h2, e4.y1 = r3;
- }, e3.prototype.dice = function(t3) {
- for (var e4, i3 = t3.x0, n3 = t3.x1, r3 = t3.y0, s2 = t3.y1, a2 = t3.children, o3 = -1, l2 = a2.length, h2 = t3.value && (n3 - i3) / t3.value; ++o3 < l2; )
- (e4 = a2.getIndex(o3)).y0 = r3, e4.y1 = s2, e4.x0 = i3, i3 += e4.value * h2, e4.x1 = i3;
- }, e3.prototype.sliceDice = function(t3) {
- 1 & t3.level ? this.slice(t3) : this.dice(t3);
- }, e3.prototype.squarify = function(t3) {
- for (var e4, i3, n3, r3, s2, a2, o3, l2, h2, p2, u2 = (1 + Math.sqrt(5)) / 2, d2 = t3.x0, c2 = t3.x1, f2 = t3.y0, g2 = t3.y1, y2 = t3.children, m2 = 0, v2 = 0, b2 = y2.length, x2 = t3.value; m2 < b2; ) {
- i3 = c2 - d2, n3 = g2 - f2;
- do {
- r3 = y2.getIndex(v2++).value;
- } while (!r3 && v2 < b2);
- for (s2 = a2 = r3, p2 = r3 * r3 * (h2 = Math.max(n3 / i3, i3 / n3) / (x2 * u2)), l2 = Math.max(a2 / p2, p2 / s2); v2 < b2; ++v2) {
- if (r3 += e4 = y2.getIndex(v2).value, e4 < s2 && (s2 = e4), e4 > a2 && (a2 = e4), p2 = r3 * r3 * h2, (o3 = Math.max(a2 / p2, p2 / s2)) > l2) {
- r3 -= e4;
- break;
- }
- l2 = o3;
- }
- var _2 = this.dataItems.template.clone();
- _2.value = r3, _2.dice = i3 < n3, _2.children = y2.slice(m2, v2), _2.x0 = d2, _2.y0 = f2, _2.x1 = c2, _2.y1 = g2, _2.dice ? (_2.y1 = x2 ? f2 += n3 * r3 / x2 : g2, this.dice(_2)) : (_2.x1 = x2 ? d2 += i3 * r3 / x2 : c2, this.slice(_2)), x2 -= r3, m2 = v2;
- }
- }, e3.prototype.handleSeriesAdded2 = function() {
- }, e3.prototype.handleDataItemValueChange = function(t3, e4) {
- e4 == "value" && this.invalidateDataItems();
- }, e3.prototype.handleDataItemWorkingValueChange = function(t3, e4) {
- e4 == "value" && this.invalidateDataItems();
- }, e3.prototype.getLegendLevel = function(t3) {
- if (t3 && t3.children) {
- if (t3.children.length > 1)
- return t3;
- if (t3.children.length == 1) {
- var e4 = t3.children.getIndex(0);
- return e4.children ? this.getLegendLevel(e4) : t3;
- }
- return t3;
- }
- }, e3.prototype.handleLegendSeriesAdded = function(t3) {
- }, Object.defineProperty(e3.prototype, "homeDataItem", { get: function() {
- return this._homeDataItem;
- }, enumerable: true, configurable: true }), e3.prototype.feedLegend = function() {
- var t3 = this.legend;
- if (t3) {
- t3.dataFields.name = "name";
- var e4 = this.getLegendLevel(this._homeDataItem);
- if (e4) {
- var i3 = [];
- e4.children.each(function(t4) {
- i3.push(t4);
- }), t3.data = i3;
- }
- }
- }, e3.prototype.disposeData = function() {
- t2.prototype.disposeData.call(this), this._homeDataItem = void 0, this.series.clear(), this.navigationBar && this.navigationBar.disposeData(), this.xAxis.disposeData(), this.yAxis.disposeData();
- }, e3.prototype.getExporting = function() {
- var e4 = this, i3 = t2.prototype.getExporting.call(this);
- return i3.adapter.add("formatDataFields", function(t3) {
- return t3.format != "csv" && t3.format != "xlsx" || Z(e4.dataFields.children) && delete t3.dataFields[e4.dataFields.children], t3;
- }), i3;
- }, e3;
- }(Ah);
- Ii.registeredClasses.TreeMap = Tp;
- var Ap = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._chart = new ve(), e4.className = "AxisRendererX3D", e4._disposers.push(e4._chart), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.updateGridElement = function(t3, e4, i3) {
- e4 += (i3 - e4) * t3.location;
- var n3 = this.positionToPoint(e4);
- if (t3.element) {
- var r3 = this.chart.dx3D || 0, s2 = this.chart.dy3D || 0, a2 = this.getHeight();
- t3.path = wo({ x: r3, y: s2 }) + Co({ x: r3, y: a2 + s2 }) + Co({ x: 0, y: a2 });
- }
- this.positionItem(t3, n3), this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.updateBaseGridElement = function() {
- t2.prototype.updateBaseGridElement.call(this);
- var e4 = this.getHeight(), i3 = this.chart.dx3D || 0, n3 = this.chart.dy3D || 0;
- this.baseGrid.path = wo({ x: i3, y: n3 }) + Co({ x: 0, y: 0 }) + Co({ x: 0, y: e4 });
- }, Object.defineProperty(e3.prototype, "chart", { get: function() {
- return this._chart.get();
- }, set: function(t3) {
- t3 && this._chart.set(t3, t3.events.on("propertychanged", this.handle3DChanged, this, false));
- }, enumerable: true, configurable: true }), e3.prototype.handle3DChanged = function(t3) {
- t3.property != "depth" && t3.property != "angle" || this.invalidate();
- }, e3;
- }(wh);
- Ii.registeredClasses.AxisRendererX3D = Ap;
- var Vp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._chart = new ve(), e4.className = "AxisRendererY3D", e4._disposers.push(e4._chart), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.updateGridElement = function(t3, e4, i3) {
- e4 += (i3 - e4) * t3.location;
- var n3 = this.positionToPoint(e4);
- if (t3.element) {
- var r3 = this.chart.dx3D || 0, s2 = this.chart.dy3D || 0, a2 = this.getWidth();
- t3.path = wo({ x: 0, y: 0 }) + Co({ x: r3, y: s2 }) + Co({ x: a2 + r3, y: s2 });
- }
- this.positionItem(t3, n3), this.toggleVisibility(t3, e4, 0, 1);
- }, e3.prototype.updateBaseGridElement = function() {
- t2.prototype.updateBaseGridElement.call(this);
- var e4 = this.chart.dx3D || 0, i3 = this.chart.dy3D || 0, n3 = this.getWidth();
- this.baseGrid.path = wo({ x: 0, y: 0 }) + Co({ x: n3, y: 0 }) + Co({ x: n3 + e4, y: i3 });
- }, Object.defineProperty(e3.prototype, "chart", { get: function() {
- return this._chart.get();
- }, set: function(t3) {
- t3 && this._chart.set(t3, t3.events.on("propertychanged", this.handle3DChanged, this, false));
- }, enumerable: true, configurable: true }), e3.prototype.handle3DChanged = function(t3) {
- t3.property != "depth" && t3.property != "angle" || this.invalidate();
- }, e3;
- }(yh), Fp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Column3D", e4;
- }
- return C(e3, t2), e3.prototype.createAssets = function() {
- this.column3D = this.createChild(bl), this.column3D.shouldClone = false, this.column3D.strokeOpacity = 0, this.column = this.column3D;
- }, e3.prototype.validate = function() {
- t2.prototype.validate.call(this), this.column3D && (this.column3D.width = this.pixelWidth, this.column3D.height = this.pixelHeight, this.column3D.invalid && this.column3D.validate());
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.column3D && this.column3D.copyFrom(e4.column3D);
- }, e3.prototype.setFill = function(e4) {
- t2.prototype.setFill.call(this, e4), this.column.fill = e4;
- }, e3;
- }(Cp);
- Ii.registeredClasses.Column3D = Fp;
- var Mp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ColumnSeries3DDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Op), Lp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ColumnSeries3D", e4.columns.template.column3D.applyOnClones = true, e4.columns.template.hiddenState.properties.visible = true, e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "columnsContainer", { get: function() {
- var t3 = this.chart;
- return t3 && t3.columnsContainer && t3.leftAxesContainer.layout != "vertical" && t3.rightAxesContainer.layout != "vertical" && t3.bottomAxesContainer.layout != "horizontal" && t3.topAxesContainer.layout != "horizontal" ? t3.columnsContainer : this._columnsContainer;
- }, enumerable: true, configurable: true }), e3.prototype.validateDataElementReal = function(e4) {
- t2.prototype.validateDataElementReal.call(this, e4), e4.column && (e4.column.dx = this.dx, e4.column.dy = this.dy, e4.column.visible = this.visible);
- }, e3.prototype.validateDataElements = function() {
- t2.prototype.validateDataElements.call(this), this.chart && this.chart.invalidateLayout();
- }, e3.prototype.createColumnTemplate = function() {
- return new Fp();
- }, Object.defineProperty(e3.prototype, "depth", { get: function() {
- return this.getPropertyValue("depth");
- }, set: function(t3) {
- this.setPropertyValue("depth", t3, true), this.columns.template.column3D.depth = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "angle", { get: function() {
- return this.getPropertyValue("angle");
- }, set: function(t3) {
- this.setPropertyValue("angle", t3), this.columns.template.column3D.angle = t3;
- }, enumerable: true, configurable: true }), e3;
- }(Sp);
- Ii.registeredClasses.ColumnSeries3D = Lp, Ii.registeredClasses.ColumnSeries3DDataItem = Mp;
- var jp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "XYChart3DDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Th), Ep = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._axisRendererX = Ap, e4._axisRendererY = Vp, e4.className = "XYChart3D", e4.depth = 30, e4.angle = 30;
- var i3 = e4.seriesContainer.createChild($a);
- return i3.shouldClone = false, i3.isMeasured = false, i3.layout = "none", e4.columnsContainer = i3, e4.columnsContainer.mask = e4.createChild(Za), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.updateSeriesMasks = function() {
- if (t2.prototype.updateSeriesMasks.call(this), Ir()) {
- var e4 = this.columnsContainer, i3 = e4.mask;
- e4.mask = void 0, e4.mask = i3;
- }
- }, Object.defineProperty(e3.prototype, "depth", { get: function() {
- return this.getPropertyValue("depth");
- }, set: function(t3) {
- this.setPropertyValue("depth", t3), this.fixLayout(), this.invalidateDataUsers();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "angle", { get: function() {
- return this.getPropertyValue("angle");
- }, set: function(t3) {
- this.setPropertyValue("angle", t3), this.fixLayout(), this.invalidateDataUsers();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dx3D", { get: function() {
- return ft(this.angle) * this.depth;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "dy3D", { get: function() {
- return -dt(this.angle) * this.depth;
- }, enumerable: true, configurable: true }), e3.prototype.validateLayout = function() {
- t2.prototype.validateLayout.call(this), this.fixColumns();
- }, e3.prototype.fixLayout = function() {
- this.chartContainer.paddingTop = -this.dy3D, this.chartContainer.paddingRight = this.dx3D, this.scrollbarX && (this.scrollbarX.dy = this.dy3D, this.scrollbarX.dx = this.dx3D), this.scrollbarY && (this.scrollbarY.dy = this.dy3D, this.scrollbarY.dx = this.dx3D), this.fixColumns(), t2.prototype.fixLayout.call(this);
- }, e3.prototype.fixColumns = function() {
- var t3 = this, e4 = 1, i3 = 0;
- ti(this.series.iterator(), function(t4) {
- t4 instanceof Lp && (!t4.clustered && i3 > 0 && e4++, t4.depthIndex = e4 - 1, i3++);
- });
- var n3 = 0;
- ti(this.series.iterator(), function(i4) {
- if (i4 instanceof Lp) {
- i4.depth = t3.depth / e4, i4.angle = t3.angle, i4.columnsContainer == t3.columnsContainer && (i4.dx = t3.depth / e4 * ft(t3.angle) * i4.depthIndex, i4.dy = -t3.depth / e4 * dt(t3.angle) * i4.depthIndex);
- var r3 = false;
- (i4.baseAxis == i4.xAxis && i4.xAxis.renderer.inversed || i4.baseAxis == i4.yAxis && i4.yAxis.renderer.inversed) && (r3 = true);
- var s2 = 1;
- i4.dataItems.each(function(t4) {
- var e5 = t4.column;
- e5 && (e5.zIndex = r3 ? 1e3 * (1e3 - s2) + n3 - 100 * i4.depthIndex : 1e3 * s2 + n3 - 100 * i4.depthIndex), s2++;
- }), r3 ? n3-- : n3++;
- }
- }), this.maskColumns();
- }, e3.prototype.processConfig = function(e4) {
- if (e4 && Z(e4.series) && it(e4.series))
- for (var i3 = 0, n3 = e4.series.length; i3 < n3; i3++)
- e4.series[i3].type = e4.series[i3].type || "ColumnSeries3D";
- t2.prototype.processConfig.call(this, e4);
- }, e3.prototype.maskColumns = function() {
- var t3 = this.plotContainer.pixelWidth, e4 = this.plotContainer.pixelHeight, i3 = this.dx3D, n3 = this.dy3D, r3 = wo({ x: 0, y: 0 }) + Co({ x: i3, y: n3 }) + Co({ x: t3 + i3, y: n3 }) + Co({ x: t3 + i3, y: e4 + n3 }) + Co({ x: t3, y: e4 }) + Co({ x: t3, y: e4 }) + Co({ x: 0, y: e4 }) + " Z", s2 = this.columnsContainer;
- s2 && s2.mask && (s2.mask.path = r3);
- }, e3;
- }(Ah);
- Ii.registeredClasses.XYChart3D = Ep;
- var Rp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "HeatLegend", e4.markerContainer = e4.createChild($a), e4.markerContainer.shouldClone = false, e4.markerCount = 1;
- var i3 = new fo();
- return i3.minHeight = 20, i3.minWidth = 20, i3.interactionsEnabled = false, i3.fillOpacity = 1, i3.cornerRadius(0, 0, 0, 0), e4.markerContainer.minHeight = 20, e4.markerContainer.minWidth = 20, e4.orientation = "horizontal", e4.markers = new Mi(i3), e4._disposers.push(new Ai(e4.markers)), e4._disposers.push(e4.markers.template), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.getMinFromRules = function(t3) {
- var e4, i3 = this.series;
- if (i3)
- return Qe(i3.heatRules.iterator(), function(i4) {
- return i4.property != t3 || (e4 = i4.min, false);
- }), e4;
- }, e3.prototype.getMaxFromRules = function(t3) {
- var e4, i3 = this.series;
- if (i3)
- return ti(i3.heatRules.iterator(), function(i4) {
- return i4.property != t3 || (e4 = i4.max, false);
- }), e4;
- }, e3.prototype.validate = function() {
- t2.prototype.validate.call(this), this.valueAxis.renderer.inversed = this.reverseOrder;
- var e4 = this.series, i3 = this.minColor, n3 = this.maxColor;
- if (Z(i3) || (i3 = gn(this.getMinFromRules("fill"))), Z(n3) || (n3 = gn(this.getMaxFromRules("fill"))), e4) {
- var r3 = e4.fill;
- !Z(i3) && r3 instanceof un && (i3 = r3), !Z(n3) && r3 instanceof un && (n3 = r3);
- }
- Z(n3) || (n3 = gn(this.getMaxFromRules("fill")));
- var s2 = U(this.getMinFromRules("fillOpacity"));
- tt(s2) || (s2 = 1);
- var a2 = U(this.getMaxFromRules("fillOpacity"));
- tt(a2) || (a2 = 1);
- var o3 = U(this.getMinFromRules("strokeOpacity"));
- tt(o3) || (o3 = 1);
- var l2 = U(this.getMaxFromRules("strokeOpacity"));
- tt(l2) || (l2 = 1);
- for (var h2 = gn(this.getMinFromRules("stroke")), p2 = gn(this.getMaxFromRules("stroke")), u2 = 0; u2 < this.markerCount; u2++) {
- var d2 = this.markers.getIndex(u2);
- if (d2 || ((d2 = this.markers.create()).parent = this.markerContainer, d2.height = V(100), d2.width = V(100)), this.markerCount == 1) {
- var c2 = new Oa();
- if (this.reverseOrder ? (c2.addColor(n3, a2), c2.addColor(i3, s2)) : (c2.addColor(i3, s2), c2.addColor(n3, a2)), this.orientation == "vertical" && (c2.rotation = -90), d2.fill = c2, Z(h2) && Z(p2)) {
- var f2 = new Oa();
- this.reverseOrder ? (f2.addColor(p2, l2), f2.addColor(h2, o3)) : (f2.addColor(h2, o3), f2.addColor(p2, l2)), this.orientation == "vertical" && (f2.rotation = -90), d2.stroke = f2;
- }
- } else {
- var g2 = u2;
- this.reverseOrder && (g2 = this.markerCount - u2 - 1);
- var y2 = new un(Qi(i3.rgb, n3.rgb, g2 / this.markerCount));
- d2.fill = y2;
- var m2 = s2 + (a2 - s2) * g2 / this.markerCount;
- if (d2.fillOpacity = m2, Z(h2) && Z(p2)) {
- var v2 = new un(Qi(h2.rgb, p2.rgb, g2 / this.markerCount));
- d2.stroke = v2;
- var b2 = o3 + (l2 - o3) * g2 / this.markerCount;
- d2.strokeOpacity = b2;
- }
- }
- }
- var x2 = this.valueAxis.renderer;
- this.markerCount > 1 && (this.orientation == "horizontal" ? x2.minGridDistance = this.measuredWidth / this.markerCount : x2.minGridDistance = this.measuredHeight / this.markerCount), this.valueAxis.invalidate(), u2 = this.markerCount;
- for (var _2 = this.markers.length; u2 < _2; u2++)
- this.markers.getIndex(u2).parent = void 0;
- }, Object.defineProperty(e3.prototype, "minColor", { get: function() {
- return this.getPropertyValue("minColor");
- }, set: function(t3) {
- t3 instanceof un || (t3 = gn(t3)), this.setColorProperty("minColor", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxColor", { get: function() {
- return this.getPropertyValue("maxColor");
- }, set: function(t3) {
- t3 instanceof un || (t3 = gn(t3)), this.setColorProperty("maxColor", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "markerCount", { get: function() {
- return this.getPropertyValue("markerCount");
- }, set: function(t3) {
- this.setPropertyValue("markerCount", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "minValue", { get: function() {
- return this.getPropertyValue("minValue");
- }, set: function(t3) {
- this.setPropertyValue("minValue", t3), this.valueAxis.min = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxValue", { get: function() {
- return this.getPropertyValue("maxValue");
- }, set: function(t3) {
- this.setPropertyValue("maxValue", t3), this.valueAxis.max = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "orientation", { get: function() {
- return this.getPropertyValue("orientation");
- }, set: function(t3) {
- this.setPropertyValue("orientation", t3, true);
- var e4 = this.markerContainer, i3 = this.valueAxis;
- t3 == "horizontal" ? (Z(this.width) || (this.width = 200), this.height = void 0, i3.width = V(100), i3.height = void 0, i3.tooltip.pointerOrientation = "vertical", this.layout = "vertical", e4.width = V(100), e4.height = void 0, i3.renderer instanceof wh || (i3.renderer = new wh())) : (Z(this.height) || (this.height = 200), this.width = void 0, this.layout = "horizontal", e4.width = void 0, e4.height = V(100), i3.height = V(100), i3.width = void 0, i3.tooltip.pointerOrientation = "horizontal", i3.renderer instanceof yh || (i3.renderer = new yh()), i3.renderer.inside = true, i3.renderer.labels.template.inside = true, this.markerContainer.reverseOrder = true);
- var n3 = i3.renderer;
- n3.grid.template.disabled = true, n3.axisFills.template.disabled = true, n3.baseGrid.disabled = true, n3.labels.template.padding(2, 3, 2, 3), n3.minHeight = void 0, n3.minWidth = void 0, this.markerContainer.layout = t3;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "valueAxis", { get: function() {
- return this._valueAxis || (this.valueAxis = this.createChild(bh), this.valueAxis.shouldClone = false), this._valueAxis;
- }, set: function(t3) {
- this._valueAxis = t3, t3.parent = this, t3.strictMinMax = true, this.orientation = this.orientation;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "series", { get: function() {
- return this._series;
- }, set: function(t3) {
- var e4 = this;
- this._series = t3;
- var i3 = "value";
- try {
- var n3 = t3.heatRules.getIndex(0).dataField;
- n3 && (i3 = n3);
- } catch (t4) {
- }
- this.updateMinMax(t3.dataItem.values[i3].low, t3.dataItem.values[i3].high), t3.dataItem.events.on("calculatedvaluechanged", function(n4) {
- e4.updateMinMax(t3.dataItem.values[i3].low, t3.dataItem.values[i3].high);
- }, void 0, false), t3.heatRules.events.on("inserted", this.invalidate, this, false), t3.heatRules.events.on("removed", this.invalidate, this, false);
- }, enumerable: true, configurable: true }), e3.prototype.updateMinMax = function(t3, e4) {
- var i3 = this.valueAxis;
- tt(this.minValue) || (i3.min = t3, i3.invalidate()), tt(this.maxValue) || (i3.max = e4, i3.invalidate());
- }, e3.prototype.processConfig = function(e4) {
- if (e4 && Z(e4.series) && Q(e4.series) && Q(e4.series))
- if (this.map.hasKey(e4.series))
- e4.series = this.map.getKey(e4.series);
- else {
- var i3 = e4.series, n3 = this.map.events.on("insertKey", function(t3) {
- t3.key == i3 && (this.series = t3.newValue, n3.dispose());
- }, this);
- this._disposers.push(n3), delete e4.series;
- }
- t2.prototype.processConfig.call(this, e4);
- }, e3;
- }($a);
- Ii.registeredClasses.HeatLegend = Rp;
- var Bp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "Candlestick", e4.layout = "none", e4;
- }
- return C(e3, t2), e3.prototype.createAssets = function() {
- t2.prototype.createAssets.call(this), this.lowLine = this.createChild(bo), this.lowLine.shouldClone = false, this.highLine = this.createChild(bo), this.highLine.shouldClone = false;
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.lowLine && this.lowLine.copyFrom(e4.lowLine), this.highLine && this.highLine.copyFrom(e4.highLine);
- }, e3;
- }(Cp);
- Ii.registeredClasses.Candlestick = Bp;
- var Hp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.values.lowValueX = {}, e4.values.lowValueY = {}, e4.values.highValueX = {}, e4.values.highValueY = {}, e4.className = "CandlestickSeriesDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "lowValueX", { get: function() {
- return this.values.lowValueX.value;
- }, set: function(t3) {
- this.setValue("lowValueX", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "lowValueY", { get: function() {
- return this.values.lowValueY.value;
- }, set: function(t3) {
- this.setValue("lowValueY", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "highValueX", { get: function() {
- return this.values.highValueX.value;
- }, set: function(t3) {
- this.setValue("highValueX", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "highValueY", { get: function() {
- return this.values.highValueY.value;
- }, set: function(t3) {
- this.setValue("highValueY", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "closeValueX", { get: function() {
- return this.values.valueX.value;
- }, set: function(t3) {
- this.setValue("valueX", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "closeValueY", { get: function() {
- return this.values.valueY.value;
- }, set: function(t3) {
- this.setValue("valueY", t3);
- }, enumerable: true, configurable: true }), e3;
- }(Op), Np = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "CandlestickSeries", e4.groupFields.lowValueX = "low", e4.groupFields.lowValueY = "low", e4.groupFields.highValueX = "high", e4.groupFields.highValueY = "high", e4.strokeOpacity = 1;
- var i3 = new Ys(), n3 = i3.getFor("positive"), r3 = i3.getFor("negative");
- return e4.dropFromOpenState.properties.fill = r3, e4.dropFromOpenState.properties.stroke = r3, e4.riseFromOpenState.properties.fill = n3, e4.riseFromOpenState.properties.stroke = n3, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Candlestick Series"));
- }, e3.prototype.createDataItem = function() {
- return new Hp();
- }, e3.prototype.validateDataElementReal = function(e4) {
- t2.prototype.validateDataElementReal.call(this, e4), this.validateCandlestick(e4);
- }, e3.prototype.validateCandlestick = function(t3) {
- var e4 = t3.column;
- if (e4) {
- var i3 = e4.lowLine, n3 = e4.highLine;
- if (this.baseAxis == this.xAxis) {
- var r3 = e4.pixelWidth / 2;
- i3.x = r3, n3.x = r3;
- var s2 = t3.getWorkingValue(this.yOpenField), a2 = t3.getWorkingValue(this.yField), o3 = this.yAxis.getY(t3, this.yOpenField), l2 = this.yAxis.getY(t3, this.yField), h2 = this.yAxis.getY(t3, this.yLowField), p2 = this.yAxis.getY(t3, this.yHighField), u2 = e4.pixelY;
- i3.y1 = h2 - u2, n3.y1 = p2 - u2, s2 < a2 ? (i3.y2 = o3 - u2, n3.y2 = l2 - u2) : (i3.y2 = l2 - u2, n3.y2 = o3 - u2);
- }
- if (this.baseAxis == this.yAxis) {
- var d2 = e4.pixelHeight / 2;
- i3.y = d2, n3.y = d2;
- var c2 = t3.getWorkingValue(this.xOpenField), f2 = t3.getWorkingValue(this.xField), g2 = this.xAxis.getX(t3, this.xOpenField), y2 = this.xAxis.getX(t3, this.xField), m2 = this.xAxis.getX(t3, this.xLowField), v2 = this.xAxis.getX(t3, this.xHighField), b2 = e4.pixelX;
- i3.x1 = m2 - b2, n3.x1 = v2 - b2, c2 < f2 ? (i3.x2 = g2 - b2, n3.x2 = y2 - b2) : (i3.x2 = y2 - b2, n3.x2 = g2 - b2);
- }
- ti(this.axisRanges.iterator(), function(e5) {
- var r4 = t3.rangesColumns.getKey(e5.uid);
- if (r4) {
- var s3 = r4.lowLine;
- s3.x = i3.x, s3.y = i3.y, s3.x1 = i3.x1, s3.x2 = i3.x2, s3.y1 = i3.y1, s3.y2 = i3.y2;
- var a3 = r4.highLine;
- a3.x = n3.x, a3.y = n3.y, a3.x1 = n3.x1, a3.x2 = n3.x2, a3.y1 = n3.y1, a3.y2 = n3.y2;
- }
- });
- }
- }, Object.defineProperty(e3.prototype, "xLowField", { get: function() {
- return this._xLowField;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "yLowField", { get: function() {
- return this._yLowField;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "xHighField", { get: function() {
- return this._xHighField;
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "yHighField", { get: function() {
- return this._yHighField;
- }, enumerable: true, configurable: true }), e3.prototype.defineFields = function() {
- t2.prototype.defineFields.call(this);
- var e4 = this.xAxis, i3 = this.yAxis;
- if (e4 && i3) {
- if (this.baseAxis == e4) {
- var n3 = En(i3.axisFieldName);
- this._yLowField = "low" + n3 + "Y", this._yHighField = "high" + n3 + "Y";
- }
- if (this.baseAxis == i3) {
- var r3 = En(e4.axisFieldName);
- this._xLowField = "low" + r3 + "X", this._xHighField = "high" + r3 + "X";
- }
- this.addValueField(e4, this._xValueFields, this._xLowField), this.addValueField(e4, this._xValueFields, this._xHighField), this.addValueField(i3, this._yValueFields, this._yLowField), this.addValueField(i3, this._yValueFields, this._yHighField);
- }
- }, e3.prototype.createLegendMarker = function(t3) {
- var e4 = t3.pixelWidth, i3 = t3.pixelHeight;
- t3.removeChildren();
- var n3, r3, s2 = t3.createChild(Bp);
- s2.shouldClone = false, s2.copyFrom(this.columns.template);
- var a2 = s2.lowLine, o3 = s2.highLine;
- this.baseAxis == this.yAxis ? (n3 = e4 / 3, r3 = i3, a2.y = i3 / 2, o3.y = i3 / 2, a2.x2 = e4 / 3, o3.x2 = e4 / 3, o3.x = e4 / 3 * 2, s2.column.x = e4 / 3) : (n3 = e4, r3 = i3 / 3, a2.x = e4 / 2, o3.x = e4 / 2, a2.y2 = i3 / 3, o3.y2 = i3 / 3, o3.y = i3 / 3 * 2, s2.column.y = i3 / 3), s2.width = n3, s2.height = r3, Ue(this, t3, Ka), Ue(this.columns.template, s2, Ka), s2.stroke = this.riseFromOpenState.properties.stroke, s2.fill = s2.stroke;
- var l2 = t3.dataItem;
- l2.color = s2.fill, l2.colorOrig = s2.fill;
- }, e3.prototype.createColumnTemplate = function() {
- return new Bp();
- }, e3;
- }(Sp);
- Ii.registeredClasses.CandlestickSeries = Np, Ii.registeredClasses.CandlestickSeriesDataItem = Hp;
- var Wp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "OHLC", e4.layout = "none", e4;
- }
- return C(e3, t2), e3.prototype.createAssets = function() {
- this.openLine = this.createChild(bo), this.openLine.shouldClone = false, this.highLowLine = this.createChild(bo), this.highLowLine.shouldClone = false, this.closeLine = this.createChild(bo), this.closeLine.shouldClone = false;
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.openLine && this.openLine.copyFrom(e4.openLine), this.highLowLine && this.highLowLine.copyFrom(e4.highLowLine), this.closeLine && this.closeLine.copyFrom(e4.closeLine);
- }, e3;
- }(Bp);
- Ii.registeredClasses.OHLC = Wp;
- var Xp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "OHLCSeriesDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Hp), Yp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "OHLCSeries", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("OHLC Series"));
- }, e3.prototype.createDataItem = function() {
- return new Xp();
- }, e3.prototype.validateCandlestick = function(t3) {
- var e4 = t3.column;
- if (e4) {
- var i3 = e4.openLine, n3 = e4.highLowLine, r3 = e4.closeLine;
- if (this.baseAxis == this.xAxis) {
- var s2 = e4.pixelWidth / 2;
- n3.x = s2, t3.getWorkingValue(this.yOpenField), t3.getWorkingValue(this.yField);
- var a2 = this.yAxis.getY(t3, this.yOpenField), o3 = this.yAxis.getY(t3, this.yField), l2 = this.yAxis.getY(t3, this.yLowField), h2 = this.yAxis.getY(t3, this.yHighField), p2 = e4.pixelY;
- i3.y1 = a2 - p2, i3.y2 = a2 - p2, i3.x1 = 0, i3.x2 = s2, r3.y1 = o3 - p2, r3.y2 = o3 - p2, r3.x1 = s2, r3.x2 = 2 * s2, n3.y1 = h2 - p2, n3.y2 = l2 - p2;
- }
- if (this.baseAxis == this.yAxis) {
- var u2 = e4.pixelHeight / 2;
- n3.y = u2, t3.getWorkingValue(this.xOpenField), t3.getWorkingValue(this.xField);
- var d2 = this.xAxis.getX(t3, this.xOpenField), c2 = this.xAxis.getX(t3, this.xField), f2 = this.xAxis.getX(t3, this.xLowField), g2 = this.xAxis.getX(t3, this.xHighField), y2 = e4.pixelX;
- i3.x1 = d2 - y2, i3.x2 = d2 - y2, i3.y1 = u2, i3.y2 = 2 * u2, r3.x1 = c2 - y2, r3.x2 = c2 - y2, r3.y1 = 0, r3.y2 = u2, n3.x1 = g2 - y2, n3.x2 = f2 - y2;
- }
- ti(this.axisRanges.iterator(), function(e5) {
- var s3 = t3.rangesColumns.getKey(e5.uid);
- if (s3) {
- var a3 = s3.openLine;
- a3.x = i3.x, a3.y = i3.y, a3.x1 = i3.x1, a3.x2 = i3.x2, a3.y1 = i3.y1, a3.y2 = i3.y2;
- var o4 = s3.closeLine;
- o4.x = r3.x, o4.y = r3.y, o4.x1 = r3.x1, o4.x2 = r3.x2, o4.y1 = r3.y1, o4.y2 = r3.y2;
- var l3 = s3.highLowLine;
- l3.x = n3.x, l3.y = n3.y, l3.x1 = n3.x1, l3.x2 = n3.x2, l3.y1 = n3.y1, l3.y2 = n3.y2;
- }
- });
- }
- }, e3.prototype.createLegendMarker = function(t3) {
- var e4 = t3.pixelWidth, i3 = t3.pixelHeight;
- t3.removeChildren();
- var n3, r3, s2 = t3.createChild(Wp);
- s2.shouldClone = false, s2.copyFrom(this.columns.template);
- var a2 = s2.openLine, o3 = s2.closeLine, l2 = s2.highLowLine;
- this.baseAxis == this.yAxis ? (n3 = e4 / 3, r3 = i3, l2.y = i3 / 2, l2.x2 = e4, a2.x = e4 / 3 * 2, a2.y2 = i3 / 2, o3.x = e4 / 3, o3.y2 = i3, o3.y1 = i3 / 2) : (n3 = e4, r3 = i3 / 3, l2.x = e4 / 2, l2.y2 = i3, a2.y = i3 / 3 * 2, a2.x2 = e4 / 2, o3.y = i3 / 3, o3.x2 = e4, o3.x1 = e4 / 2), s2.width = n3, s2.height = r3, Ue(this, t3, Ka), Ue(this.columns.template, s2, Ka), s2.stroke = this.riseFromOpenState.properties.stroke;
- var h2 = t3.dataItem;
- h2.color = s2.stroke, h2.colorOrig = s2.stroke;
- }, e3.prototype.createColumnTemplate = function() {
- return new Wp();
- }, e3;
- }(Np);
- Ii.registeredClasses.OHLCSeries = Yp, Ii.registeredClasses.OHLCSeriesDataItem = Xp;
- var zp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "StepLineSeriesSegment", e4;
- }
- return C(e3, t2), e3.prototype.drawSegment = function(t3, e4, i3, n3, r3, s2) {
- if (t3.length > 0 && e4.length > 0)
- if (r3) {
- var a2 = wo(t3[0]);
- if (t3.length > 0)
- for (var o3 = 1; o3 < t3.length; o3++) {
- var l2 = t3[o3];
- o3 / 2 == Math.round(o3 / 2) ? a2 += wo(l2) : a2 += Co(l2);
- }
- this.strokeSprite.path = a2, (this.fillOpacity > 0 || this.fillSprite.fillOpacity > 0) && (a2 = wo(t3[0]) + Po(t3), a2 += Co(e4[0]) + Po(e4), a2 += Co(t3[0]), a2 += " Z", this.fillSprite.path = a2);
- } else
- a2 = wo(t3[0]) + Po(t3), this.strokeSprite.path = a2, (this.fillOpacity > 0 || this.fillSprite.fillOpacity > 0) && (a2 += Co(e4[0]) + Po(e4), a2 += Co(t3[0]), a2 += " Z", this.fillSprite.path = a2);
- else
- this.strokeSprite.path = "", this.fillSprite.path = "";
- }, e3;
- }(Vh);
- Ii.registeredClasses.StepLineSeriesSegment = zp;
- var Up = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "StepLineSeriesDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Lh), Gp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "StepLineSeries", e4.applyTheme(), e4.startLocation = 0, e4.endLocation = 1, e4;
- }
- return C(e3, t2), e3.prototype.createDataItem = function() {
- return new Up();
- }, e3.prototype.addPoints = function(t3, e4, i3, n3, r3) {
- var s2, a2, o3, l2;
- this.baseAxis == this.xAxis && (s2 = this.startLocation, a2 = this.endLocation, o3 = this.getAdjustedXLocation(e4, this.yOpenField), l2 = this.getAdjustedXLocation(e4, this.yField)), this.baseAxis == this.yAxis && (o3 = this.startLocation, l2 = this.endLocation, s2 = this.getAdjustedXLocation(e4, this.xOpenField), a2 = this.getAdjustedXLocation(e4, this.xField));
- var h2 = this.xAxis.getX(e4, i3, s2), p2 = this.yAxis.getY(e4, n3, o3), u2 = this.xAxis.getX(e4, i3, a2), d2 = this.yAxis.getY(e4, n3, l2);
- if (h2 = ut(h2, -1e5, 1e5), p2 = ut(p2, -1e5, 1e5), u2 = ut(u2, -1e5, 1e5), d2 = ut(d2, -1e5, 1e5), !this.noRisers && t3.length > 1) {
- var c2 = t3[t3.length - 1];
- this.baseAxis == this.xAxis && (r3 ? t3.push({ x: c2.x, y: d2 }) : t3.push({ x: h2, y: c2.y })), this.baseAxis == this.yAxis && (r3 ? t3.push({ x: u2, y: c2.y }) : t3.push({ x: c2.x, y: p2 }));
- }
- var f2 = { x: h2, y: p2 }, g2 = { x: u2, y: d2 };
- r3 ? t3.push(g2, f2) : t3.push(f2, g2);
- }, e3.prototype.drawSegment = function(t3, e4, i3) {
- var n3 = false;
- this.yAxis == this.baseAxis && (n3 = true), t3.drawSegment(e4, i3, this.tensionX, this.tensionY, this.noRisers, n3);
- }, e3.prototype.createSegment = function() {
- return new zp();
- }, Object.defineProperty(e3.prototype, "noRisers", { get: function() {
- return this.getPropertyValue("noRisers");
- }, set: function(t3) {
- this.setPropertyValue("noRisers", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "startLocation", { get: function() {
- return this.getPropertyValue("startLocation");
- }, set: function(t3) {
- this.setPropertyValue("startLocation", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endLocation", { get: function() {
- return this.getPropertyValue("endLocation");
- }, set: function(t3) {
- this.setPropertyValue("endLocation", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(jh);
- Ii.registeredClasses.StepLineSeries = Gp, Ii.registeredClasses.StepLineSeriesDataItem = Up;
- var Kp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "RadarColumn", e4;
- }
- return C(e3, t2), e3.prototype.createAssets = function() {
- this.radarColumn = this.createChild(No), this.radarColumn.shouldClone = false, this.radarColumn.strokeOpacity = void 0, this.column = this.radarColumn;
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.radarColumn && this.radarColumn.copyFrom(e4.radarColumn);
- }, e3.prototype.getTooltipX = function() {
- var t3 = this.getPropertyValue("tooltipX");
- return tt(t3) ? t3 : this.radarColumn.getTooltipX();
- }, e3.prototype.getTooltipY = function() {
- var t3 = this.getPropertyValue("tooltipX");
- return tt(t3) ? t3 : this.radarColumn.getTooltipY();
- }, e3;
- }(Cp);
- Ii.registeredClasses.RadarColumn = Kp;
- var Zp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ColumnSeriesDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Op), qp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "RadarColumnSeries", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.createColumnTemplate = function() {
- return new Kp();
- }, e3.prototype.validate = function() {
- this.chart.invalid && this.chart.validate(), t2.prototype.validate.call(this);
- }, e3.prototype.disableUnusedColumns = function(t3) {
- t3 && (t3.column && (t3.column.__disabled = true), ti(this.axisRanges.iterator(), function(e4) {
- var i3 = t3.rangesColumns.getKey(e4.uid);
- i3 && (i3.__disabled = true);
- }));
- }, e3.prototype.validateDataElementReal = function(t3) {
- var e4, i3, n3, r3, s2 = this, a2 = this.chart.startAngle, o3 = this.chart.endAngle, l2 = this.yField, h2 = this.yOpenField, p2 = this.xField, u2 = this.xOpenField, d2 = this.getStartLocation(t3), c2 = this.getEndLocation(t3), f2 = (o3 - a2) / (this.dataItems.length * (this.end - this.start)), g2 = t3.column;
- g2 || (g2 = this.columns.create(), t3.column = g2, Ue(this, g2, Ka), Ue(this.columns.template, g2, Ka), t3.addSprite(g2), g2.paper = this.paper, this.setColumnStates(g2));
- var y2 = g2.width, m2 = 100;
- y2 instanceof A && (m2 = y2.percent);
- var v2 = lt((c2 - d2) * (1 - m2 / 100) / 2, 5);
- if (d2 += v2, c2 -= v2, this.xAxis instanceof Sh && this.yAxis instanceof Sh)
- n3 = _t({ x: this.yAxis.getX(t3, l2, 0, "valueY"), y: this.yAxis.getY(t3, l2, 0, "valueY") }), r3 = _t({ x: this.yAxis.getX(t3, h2, 1, "valueY"), y: this.yAxis.getY(t3, h2, 1, "valueY") }), e4 = this.xAxis.getAngle(t3, u2, 0, "valueX"), i3 = this.xAxis.getAngle(t3, p2, 1, "valueX"), a2 += d2 * f2, o3 -= (1 - c2) * f2;
- else if (this.baseAxis == this.xAxis)
- n3 = _t({ x: this.yAxis.getX(t3, l2, t3.locations[l2], "valueY"), y: this.yAxis.getY(t3, l2, t3.locations[l2], "valueY") }), r3 = _t({ x: this.yAxis.getX(t3, h2, t3.locations[h2], "valueY"), y: this.yAxis.getY(t3, h2, t3.locations[h2], "valueY") }), e4 = this.xAxis.getAngle(t3, u2, d2, "valueX"), i3 = this.xAxis.getAngle(t3, p2, c2, "valueX"), a2 += d2 * f2, o3 -= (1 - c2) * f2;
- else {
- if (n3 = _t({ x: this.yAxis.getX(t3, l2, d2, "valueY"), y: this.yAxis.getY(t3, l2, d2, "valueY") }), r3 = _t({ x: this.yAxis.getX(t3, h2, c2, "valueY"), y: this.yAxis.getY(t3, h2, c2, "valueY") }), tt(y2)) {
- var b2 = Math.abs(n3 - r3);
- if (b2 > y2) {
- var x2 = (b2 - y2) / 2;
- n3 += x2, r3 -= x2;
- }
- }
- e4 = this.xAxis.getAngle(t3, p2, t3.locations[p2], "valueX"), i3 = this.xAxis.getAngle(t3, u2, t3.locations[u2], "valueX");
- }
- if (i3 < e4) {
- var _2 = i3;
- i3 = e4, e4 = _2;
- }
- e4 = ut(e4, a2, o3), i3 = ut(i3, a2, o3);
- var P2 = g2.radarColumn;
- P2.startAngle = e4;
- var w2 = i3 - e4;
- w2 > 0 ? (P2.arc = w2, P2.radius = n3, P2.innerRadius = r3, g2.__disabled = false, g2.parent = this.columnsContainer, ti(this.axisRanges.iterator(), function(i4) {
- var a3 = t3.rangesColumns.getKey(i4.uid);
- a3 || (a3 = s2.columns.create(), Ke(s2.columns.template, a3, Ka), Ue(i4.contents, a3, Ka), a3.dataItem && ee(a3.dataItem.sprites, a3), t3.addSprite(a3), a3.paper = s2.paper, s2.setColumnStates(a3), t3.rangesColumns.setKey(i4.uid, a3));
- var o4 = a3.radarColumn;
- o4.startAngle = e4, o4.arc = w2, o4.radius = n3, o4.innerRadius = r3, o4.invalid && (o4.paper = s2.paper, o4.validate()), a3.__disabled = false, a3.parent = i4.contents;
- })) : this.disableUnusedColumns(t3);
- }, e3.prototype.getPoint = function(t3, e4, i3, n3, r3, s2, a2) {
- s2 || (s2 = "valueX"), a2 || (a2 = "valueY");
- var o3 = _t({ x: this.yAxis.getX(t3, i3, r3, a2), y: this.yAxis.getY(t3, i3, r3, a2) });
- o3 == 0 && (o3 = 1e-5);
- var l2 = this.xAxis.getAngle(t3, e4, n3, s2);
- return { x: o3 * ft(l2), y: o3 * dt(l2) };
- }, e3.prototype.getMaskPath = function() {
- var t3 = this.yAxis.renderer;
- return ko(t3.startAngle, t3.endAngle - t3.startAngle, t3.pixelRadius, t3.pixelInnerRadius);
- }, e3.prototype.positionBulletReal = function(t3, e4, i3) {
- var n3 = this.xAxis, r3 = this.yAxis;
- (e4 < n3.start || e4 > n3.end || i3 < r3.start || i3 > r3.end) && (t3.visible = false), t3.moveTo(this.xAxis.renderer.positionToPoint(e4, i3));
- }, e3.prototype.setXAxis = function(e4) {
- t2.prototype.setXAxis.call(this, e4), this.updateRendererRefs();
- }, e3.prototype.setYAxis = function(e4) {
- t2.prototype.setYAxis.call(this, e4), this.updateRendererRefs();
- }, e3.prototype.updateRendererRefs = function() {
- var t3 = this.xAxis.renderer, e4 = this.yAxis.renderer;
- t3.axisRendererY = e4;
- }, e3;
- }(Sp);
- Ii.registeredClasses.RadarColumnSeries = qp, Ii.registeredClasses.RadarColumnSeriesDataItem = Zp;
- var $p = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.slice = e4.createChild(Za), e4.slice.shouldClone = false, e4.slice.setElement(e4.paper.add("path")), e4.slice.isMeasured = false, e4.orientation = "vertical", e4.bottomWidth = V(100), e4.topWidth = V(100), e4.isMeasured = false, e4.width = 10, e4.height = 10, e4.expandDistance = 0, e4.className = "FunnelSlice", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this.pixelPaddingTop, i3 = this.pixelPaddingBottom, n3 = this.pixelPaddingRight, r3 = this.pixelPaddingLeft, s2 = this.pixelWidth - n3 - r3, a2 = this.pixelHeight - e4 - i3, o3 = this.expandDistance, l2 = "";
- if (this.orientation == "vertical") {
- var h2 = { x: (s2 - (m2 = Vn(this.topWidth, s2))) / 2 + r3, y: e4 }, p2 = { x: (s2 + m2) / 2 + r3, y: e4 }, u2 = { x: (s2 + (v2 = Vn(this.bottomWidth, s2))) / 2 + r3, y: e4 + a2 }, d2 = { x: (s2 - v2) / 2 + r3, y: e4 + a2 }, c2 = { x: p2.x + (u2.x - p2.x) / 2 + o3 * a2, y: p2.y + 0.5 * a2 }, f2 = { x: h2.x + (d2.x - h2.x) / 2 - o3 * a2, y: h2.y + 0.5 * a2 }, g2 = Co(u2), y2 = Co(h2);
- o3 != 0 && (g2 = Oo(u2, c2), y2 = Oo(h2, f2)), l2 = wo(h2) + Co(p2) + g2 + Co(d2) + y2, this.tickPoint = { x: p2.x + (u2.x - p2.x) / 2, y: p2.y + (u2.y - p2.y) / 2 };
- } else {
- var m2, v2, b2 = { x: r3, y: (a2 - (m2 = Vn(this.topWidth, a2))) / 2 + e4 }, x2 = { x: r3, y: (a2 + m2) / 2 + e4 }, _2 = { x: r3 + s2, y: (a2 - (v2 = Vn(this.bottomWidth, a2))) / 2 + e4 }, P2 = { x: r3 + s2, y: (a2 + v2) / 2 + e4 };
- c2 = { y: b2.y + (_2.y - b2.y) / 2 - o3 * s2, x: b2.x + 0.5 * s2 }, f2 = { y: x2.y + (P2.y - x2.y) / 2 + o3 * s2, x: x2.x + 0.5 * s2 }, g2 = Co(_2), y2 = Co(x2), o3 != 0 && (g2 = Oo(_2, c2), y2 = Oo(x2, f2)), l2 = wo(x2) + Co(b2) + g2 + Co(P2) + y2, this.tickPoint = { y: x2.y + (P2.y - x2.y) / 2, x: x2.x + (P2.x - x2.x) / 2 };
- }
- this.slice.path = l2, this.invalidateLayout();
- }, e3.prototype.getPoint = function(t3, e4) {
- var i3 = this.pixelPaddingTop, n3 = this.pixelPaddingBottom, r3 = this.pixelPaddingRight, s2 = this.pixelPaddingLeft, a2 = this.pixelWidth - r3 - s2, o3 = this.pixelHeight - i3 - n3;
- if (this.orientation == "vertical") {
- var l2 = { x: (a2 - (d2 = Vn(this.topWidth, a2))) / 2 + s2, y: i3 }, h2 = { x: (a2 + d2) / 2 + s2, y: i3 }, p2 = { x: (a2 + (c2 = Vn(this.bottomWidth, a2))) / 2 + s2, y: i3 + o3 }, u2 = l2.x + ((a2 - c2) / 2 + s2 - l2.x) * e4;
- return { x: u2 + (h2.x + (p2.x - h2.x) * e4 - u2) * t3, y: h2.y + (p2.y - h2.y) * e4 };
- }
- var d2, c2, f2 = s2, g2 = (o3 - (d2 = Vn(this.topWidth, o3))) / 2 + i3, y2 = (o3 + d2) / 2 + i3, m2 = s2 + a2, v2 = g2 + ((o3 - (c2 = Vn(this.bottomWidth, o3))) / 2 + i3 - g2) * t3;
- return { y: v2 + (y2 + ((o3 + c2) / 2 + i3 - y2) * t3 - v2) * e4, x: f2 + (m2 - f2) * t3 };
- }, Object.defineProperty(e3.prototype, "bottomWidth", { get: function() {
- return this.getPropertyValue("bottomWidth");
- }, set: function(t3) {
- this.setPercentProperty("bottomWidth", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "topWidth", { get: function() {
- return this.getPropertyValue("topWidth");
- }, set: function(t3) {
- this.setPercentProperty("topWidth", t3, true, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "orientation", { get: function() {
- return this.getPropertyValue("orientation");
- }, set: function(t3) {
- this.setPropertyValue("orientation", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "expandDistance", { get: function() {
- return this.getPropertyValue("expandDistance");
- }, set: function(t3) {
- this.setPropertyValue("expandDistance", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.slice && this.slice.copyFrom(e4.slice);
- }, e3;
- }($a);
- Ii.registeredClasses.FunnelSlice = $p;
- var Jp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._label = new ve(), e4._slice = new ve(), e4.className = "FunnelTick", e4.element = e4.paper.add("path"), e4._disposers.push(e4._label), e4._disposers.push(e4._slice), e4.setPropertyValue("locationX", 0), e4.setPropertyValue("locationY", 0), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4 = this.slice, i3 = e4.getPoint(this.locationX, this.locationY);
- if (i3) {
- var n3 = this.label, r3 = e4.dataItem.component, s2 = void 0, a2 = void 0, o3 = void 0;
- if (r3.orientation == "vertical") {
- var l2 = n3.pixelX, h2 = n3.pixelY;
- r3.labelsOpposite || (l2 += n3.maxRight), s2 = dr(i3, e4, this.parent), o3 = dr({ x: l2, y: h2 }, n3.parent, this.parent), a2 = { x: n3.parent.pixelX - this.length, y: o3.y }, r3.labelsOpposite || (a2.x = n3.parent.measuredWidth + this.length);
- } else
- l2 = n3.pixelX, h2 = n3.pixelY, r3.labelsOpposite || (h2 += n3.maxBottom), s2 = dr(i3, e4, this.parent), a2 = { x: (o3 = dr({ x: l2, y: h2 }, n3.parent, this.parent)).x, y: n3.parent.pixelY - this.length }, r3.labelsOpposite || (a2.y = n3.parent.measuredHeight + this.length);
- this.path = wo(s2) + Co(a2) + Co(o3);
- }
- }, Object.defineProperty(e3.prototype, "slice", { get: function() {
- return this._slice.get();
- }, set: function(t3) {
- this._slice.set(t3, new me([t3.events.on("transformed", this.invalidate, this, false), t3.events.on("validated", this.invalidate, this, false)]));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "label", { get: function() {
- return this._label.get();
- }, set: function(t3) {
- this._label.set(t3, t3.events.on("transformed", this.invalidate, this, false));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "locationX", { get: function() {
- return this.getPropertyValue("locationX");
- }, set: function(t3) {
- this.setPropertyValue("locationX", t3, false, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "locationY", { get: function() {
- return this.getPropertyValue("locationY");
- }, set: function(t3) {
- this.setPropertyValue("locationY", t3, false, true);
- }, enumerable: true, configurable: true }), e3;
- }(dh);
- Ii.registeredClasses.FunnelTick = Jp;
- var Qp = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "FunnelSeriesDataItem", e4.events.on("visibilitychanged", function() {
- e4.component && e4.component.invalidateDataItems();
- }, e4, false), e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "sliceLink", { get: function() {
- var t3 = this;
- if (!this._sliceLink) {
- var e4 = this.component.sliceLinks.create();
- this._sliceLink = e4, this._disposers.push(e4), e4.parent = this.component.slicesContainer, this._disposers.push(new ye(function() {
- t3.component && t3.component.sliceLinks.removeValue(e4);
- })), this.addSprite(e4), e4.visible = this.visible;
- }
- return this._sliceLink;
- }, enumerable: true, configurable: true }), e3;
- }(Zh), tu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4._nextY = 0, e4.className = "FunnelSeries", e4.orientation = "vertical", e4.width = V(100), e4.height = V(100), e4.slicesContainer.width = V(100), e4.slicesContainer.height = V(100), e4._disposers.push(e4.slicesContainer.events.on("maxsizechanged", e4.invalidateDataItems, e4, false)), e4.labelsOpposite = true, e4.labelsContainer.layout = "absolute", e4.bottomRatio = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.createSlice = function() {
- return new $p();
- }, e3.prototype.createTick = function() {
- return new Jp();
- }, e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Funnel Series"));
- }, e3.prototype.createDataItem = function() {
- return new Qp();
- }, e3.prototype.initSlice = function(t3) {
- t3.isMeasured = false, t3.defaultState.properties.scale = 1, t3.observe("scale", this.handleSliceScale, this), t3.observe(["dx", "dy", "x", "y"], this.handleSliceMove, this), t3.tooltipText = "{category}: {value.percent.formatNumber('#.#')}% ({value.value})", t3.states.create("hover").properties.expandDistance = 0.2;
- }, e3.prototype.initLabel = function(e4) {
- t2.prototype.initLabel.call(this, e4), e4.verticalCenter = "middle", e4.horizontalCenter = "middle", e4.isMeasured = true, e4.padding(5, 5, 5, 5);
- }, e3.prototype.validate = function() {
- t2.prototype.validate.call(this), this._nextY = 0;
- }, e3.prototype.validateDataElements = function() {
- var e4 = this, i3 = this.slicesContainer, n3 = this.labelsContainer, r3 = this.labels.template;
- this.alignLabels ? (r3.interactionsEnabled = true, i3.isMeasured = true, n3.isMeasured = true) : (r3.interactionsEnabled = false, i3.isMeasured = false, n3.isMeasured = false);
- var s2 = 0, a2 = 0;
- this.dataItems.each(function(t3) {
- Z(t3.value) && (a2++, t3.value > 0 ? s2 += Math.abs(t3.getWorkingValue("value") / t3.value) : e4.ignoreZeroValues || !t3.visible || t3.__disabled || t3.isHiding ? a2-- : s2 += 1);
- }), this._total = 1 / a2 * s2, this._count = a2, t2.prototype.validateDataElements.call(this), this.arrangeLabels();
- }, e3.prototype.getNextValue = function(t3) {
- var e4 = t3.index, i3 = t3.getWorkingValue("value");
- if (e4 < this.dataItems.length - 1) {
- var n3 = this.dataItems.getIndex(e4 + 1);
- if (i3 = n3.getWorkingValue("value"), !n3.visible || n3.isHiding || n3.__disabled || n3.value == 0 && this.ignoreZeroValues)
- return this.getNextValue(n3);
- }
- return i3;
- }, e3.prototype.formDataElement = function() {
- }, e3.prototype.validateDataElement = function(e4) {
- var i3 = this, n3 = e4.slice;
- n3.orientation = this.orientation;
- var r3 = e4.sliceLink;
- r3.orientation = this.orientation;
- var s2 = e4.tick, a2 = e4.label;
- s2.slice = n3, s2.label = a2, Z(e4.value) ? (this.decorateSlice(e4), Ut(e4.sprites, function(t3) {
- e4.value == 0 && i3.ignoreZeroValues ? t3.__disabled = true : t3.__disabled = false;
- })) : Ut(e4.sprites, function(t3) {
- t3.__disabled = true;
- }), e4.index == this.dataItems.length - 1 && (r3.disabled = true), t2.prototype.validateDataElement.call(this, e4), r3.fill = n3.fill;
- }, e3.prototype.decorateSlice = function(t3) {
- var e4 = t3.slice, i3 = t3.sliceLink, n3 = t3.label, r3 = t3.tick, s2 = this.slicesContainer.innerWidth, a2 = this.slicesContainer.innerHeight, o3 = this.getNextValue(t3), l2 = Math.abs(t3.getWorkingValue("value")), h2 = this.bottomRatio, p2 = 1;
- if (t3.value != 0 ? p2 = l2 / Math.abs(t3.value) : (t3.__disabled || t3.isHiding || !t3.visible) && (p2 = 1e-6), this.ignoreZeroValues && t3.value == 0)
- t3.__disabled = true;
- else if (t3.__disabled = false, this._nextY == 1 / 0 && (this._nextY = 0), this.orientation == "vertical") {
- var u2 = i3.pixelHeight * p2;
- a2 += u2, e4.topWidth = l2 / this.dataItem.values.value.high * s2, e4.bottomWidth = (l2 - (l2 - o3) * h2) / this.dataItem.values.value.high * s2, i3.topWidth = e4.bottomWidth, i3.bottomWidth = (l2 - (l2 - o3)) / this.dataItem.values.value.high * s2, e4.y = this._nextY, e4.height = Math.min(1e5, gt(0, a2 / this._count * p2 / this._total - u2)), e4.x = s2 / 2, this.alignLabels ? n3.x = void 0 : n3.x = e4.x, n3.y = e4.pixelY + e4.pixelHeight * r3.locationY, this._nextY += e4.pixelHeight + u2, i3.y = this._nextY - u2, i3.x = e4.x;
- } else {
- var d2 = i3.pixelWidth * p2;
- s2 += d2, e4.topWidth = l2 / this.dataItem.values.value.high * a2, e4.bottomWidth = (l2 - (l2 - o3) * h2) / this.dataItem.values.value.high * a2, i3.topWidth = e4.bottomWidth, i3.bottomWidth = (l2 - (l2 - o3)) / this.dataItem.values.value.high * a2, e4.x = this._nextY, e4.width = Math.min(1e5, s2 / this._count * p2 * 1 / this._total - d2), e4.y = a2 / 2, this.alignLabels ? n3.y = this.labelsContainer.measuredHeight : n3.y = e4.y, n3.x = e4.pixelX + e4.pixelWidth * r3.locationX, this._nextY += e4.pixelWidth + d2, i3.x = this._nextY - d2, i3.y = e4.y;
- }
- }, e3.prototype.getLastLabel = function(t3) {
- if (t3 > 0) {
- var e4 = this.labels.getIndex(t3);
- return e4.__disabled || !e4.visible ? this.getLastLabel(t3 - 1) : e4;
- }
- }, e3.prototype.arrangeLabels = function() {
- if (this.alignLabels) {
- var t3 = this.labels.length;
- if (t3 > 1) {
- var e4 = this.getLastLabel(t3 - 1);
- if (e4) {
- var i3 = e4.pixelY, n3 = e4.pixelX;
- if (t3 > 1) {
- for (var r3 = t3 - 2; r3 >= 0; r3--)
- (s2 = this.labels.getIndex(r3)).visible && !s2.__disabled && (s2.invalid && s2.validate(), this.orientation == "vertical" ? s2.pixelY + s2.measuredHeight > i3 && (s2.y = Math.min(1e6, i3 - s2.measuredHeight)) : s2.pixelX + s2.measuredWidth > n3 && (s2.x = Math.min(1e6, n3 - s2.measuredWidth)), i3 = s2.pixelY, n3 = s2.pixelX);
- for (i3 = 0, n3 = 0, r3 = 0; r3 < t3; r3++) {
- var s2;
- (s2 = this.labels.getIndex(r3)).visible && !s2.__disabled && (s2.invalid && s2.validate(), this.orientation == "vertical" ? s2.pixelY < i3 && (s2.y = Math.min(1e6, i3)) : s2.pixelX < n3 && (s2.x = Math.min(1e6, n3)), i3 += s2.measuredHeight, n3 += s2.measuredWidth);
- }
- }
- }
- }
- }
- }, e3.prototype.positionBullet = function(e4) {
- t2.prototype.positionBullet.call(this, e4);
- var i3 = e4.dataItem.slice, n3 = e4.locationX;
- tt(n3) || (n3 = 0.5);
- var r3 = e4.locationY;
- tt(r3) || (r3 = 1), e4.x = i3.pixelX + i3.measuredWidth * n3, e4.y = i3.pixelY + i3.measuredHeight * r3;
- }, Object.defineProperty(e3.prototype, "orientation", { get: function() {
- return this.getPropertyValue("orientation");
- }, set: function(t3) {
- this.setPropertyValue("orientation", t3) && (this.labelsOpposite = this.labelsOpposite, this.invalidate(), t3 == "vertical" ? (this.ticks.template.locationX = 1, this.ticks.template.locationY = 0.5, this.labels.template.rotation = 0, this.layout = "horizontal") : (this.ticks.template.locationX = 0.5, this.ticks.template.locationY = 1, this.labels.template.rotation = -90, this.layout = "vertical"));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "bottomRatio", { get: function() {
- return this.getPropertyValue("bottomRatio");
- }, set: function(t3) {
- this.setPropertyValue("bottomRatio", t3) && this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "sliceLinks", { get: function() {
- if (!this._sliceLinks) {
- var t3 = new $p();
- t3.applyOnClones = true, t3.fillOpacity = 0.5, t3.expandDistance = -0.3, t3.hiddenState.properties.opacity = 0, this._disposers.push(t3), this._sliceLinks = new Mi(t3), this._disposers.push(new Ai(this._sliceLinks));
- }
- return this._sliceLinks;
- }, enumerable: true, configurable: true }), e3.prototype.show = function(e4) {
- var i3 = this, n3 = this.startIndex, r3 = this.endIndex, s2 = this.defaultState.transitionDuration;
- tt(e4) && (s2 = e4), ls.animationsEnabled || (s2 = 0);
- var a2 = 0;
- return ti(ai(this.dataItems.iterator()), function(t3) {
- var e5 = t3[0], o3 = t3[1];
- i3.sequencedInterpolation && (a2 = i3.sequencedInterpolationDelay * e5 + s2 * (e5 - n3) / (r3 - n3)), o3.show(s2, a2, ["value"]);
- }), t2.prototype.show.call(this, e4);
- }, e3.prototype.hide = function(e4) {
- var i3 = this, n3 = ["value"], r3 = this.startIndex, s2 = this.endIndex, a2 = 0, o3 = this.hiddenState.transitionDuration;
- tt(e4) && (o3 = e4), ls.animationsEnabled || (o3 = 0), ti(ai(this.dataItems.iterator()), function(t3) {
- var e5 = t3[0], l3 = t3[1];
- i3.sequencedInterpolation && (a2 = i3.sequencedInterpolationDelay * e5 + o3 * (e5 - r3) / (s2 - r3)), l3.hide(o3, a2, 0, n3);
- });
- var l2 = t2.prototype.hide.call(this, e4);
- return l2 && !l2.isFinished() && l2.delay(a2), l2;
- }, e3.prototype.setAlignLabels = function(e4) {
- t2.prototype.setAlignLabels.call(this, e4), this.ticks.template.disabled = !e4;
- var i3 = this.labelsContainer;
- i3 && (e4 ? (i3.height = void 0, i3.width = void 0, i3.margin(10, 10, 10, 10)) : (i3.width = V(100), i3.height = V(100))), this.labelsOpposite = this.labelsOpposite;
- }, Object.defineProperty(e3.prototype, "labelsOpposite", { get: function() {
- return this.getPropertyValue("labelsOpposite");
- }, set: function(t3) {
- this.setPropertyValue("labelsOpposite", t3);
- var e4 = this.labels.template, i3 = "none", n3 = "none";
- this.alignLabels ? t3 ? (this.labelsContainer.toFront(), this.orientation == "vertical" ? (this.ticks.template.locationX = 1, e4.horizontalCenter = "left", i3 = "right") : (this.ticks.template.locationY = 1, e4.horizontalCenter = "right", n3 = "bottom")) : (this.labelsContainer.toBack(), this.orientation == "vertical" ? (this.ticks.template.locationX = 0, i3 = "left") : (n3 = "top", this.ticks.template.locationY = 0)) : this.orientation == "vertical" ? i3 = "center" : n3 = "middle", e4.align = i3, e4.valign = n3, this.validateLayout(), this.ticks.each(function(t4) {
- t4.invalidate();
- }), this.invalidateDataItems();
- }, enumerable: true, configurable: true }), e3;
- }(qh);
- Ii.registeredClasses.FunnelSeries = tu, Ii.registeredClasses.FunnelSeriesDataItem = Qp;
- var eu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PyramidSeriesDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Qp), iu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PyramidSeries", e4.topWidth = V(0), e4.bottomWidth = V(100), e4.pyramidHeight = V(100), e4.valueIs = "area", e4.sliceLinks.template.width = 0, e4.sliceLinks.template.height = 0, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Pyramid Series"));
- }, e3.prototype.createDataItem = function() {
- return new eu();
- }, e3.prototype.validate = function() {
- t2.prototype.validate.call(this), this._nextWidth = void 0;
- }, e3.prototype.getNextValue = function(t3) {
- var e4 = t3.index, i3 = t3.getWorkingValue("value");
- return e4 < this.dataItems.length - 1 && (i3 = this.dataItems.getIndex(e4 + 1).getWorkingValue("value")), i3 == 0 && (i3 = 1e-6), i3;
- }, e3.prototype.validateDataElements = function() {
- var e4 = this, i3 = this.slicesContainer.innerWidth, n3 = this.slicesContainer.innerHeight;
- if (this.dataItems.each(function(t3) {
- if (t3.value > 0) {
- var r4 = t3.getWorkingValue("value") / t3.value, s3 = t3.sliceLink;
- e4.orientation == "vertical" ? n3 -= s3.pixelHeight * r4 : i3 -= s3.pixelWidth * r4;
- }
- }), this._pyramidHeight = Vn(this.pyramidHeight, n3), this._pyramidWidth = Vn(this.pyramidHeight, i3), this.orientation == "vertical") {
- var r3 = (n3 - this._pyramidHeight) / 2;
- this.slicesContainer.y = r3, this.labelsContainer.y = r3, this.ticksContainer.y = r3;
- } else {
- var s2 = (i3 - this._pyramidWidth) / 2;
- this.slicesContainer.x = s2, this.labelsContainer.x = s2, this.ticksContainer.x = s2;
- }
- t2.prototype.validateDataElements.call(this);
- }, e3.prototype.decorateSlice = function(t3) {
- var e4 = this.dataItem.values.value.absoluteSum;
- if (e4 != 0) {
- var i3 = t3.slice, n3 = t3.sliceLink, r3 = t3.label, s2 = t3.tick;
- this.getNextValue(t3);
- var a2 = Math.abs(t3.getWorkingValue("value")), o3 = this._pyramidWidth, l2 = this._pyramidHeight, h2 = this.slicesContainer.innerWidth, p2 = this.slicesContainer.innerHeight, u2 = n3.pixelWidth, d2 = n3.pixelHeight;
- if (t3.value != 0 && t3.value != null || !this.ignoreZeroValues ? t3.__disabled = false : t3.__disabled = true, this.orientation == "vertical") {
- var c2 = Vn(this.topWidth, h2);
- tt(this._nextWidth) || (this._nextWidth = c2);
- var f2 = Vn(this.bottomWidth, h2), g2 = this._nextWidth, y2 = Math.atan2(l2, c2 - f2);
- (_2 = Math.tan(Math.PI / 2 - y2)) == 0 && (_2 = 1e-8);
- var m2 = void 0, v2 = void 0;
- if (this.valueIs == "area") {
- var b2 = (c2 + f2) / 2 * l2 * a2 / e4, x2 = Math.abs(g2 * g2 - 2 * b2 * _2);
- v2 = (m2 = (g2 - Math.sqrt(x2)) / _2) > 0 ? (2 * b2 - m2 * g2) / m2 : g2;
- } else
- v2 = g2 - (m2 = l2 * a2 / e4) * _2;
- i3.height = m2, i3.width = h2, i3.bottomWidth = v2, i3.topWidth = g2, n3.topWidth = i3.bottomWidth, n3.bottomWidth = i3.bottomWidth, i3.y = this._nextY, this.alignLabels ? r3.x = 0 : r3.x = h2 / 2, r3.y = i3.pixelY + i3.pixelHeight * s2.locationY + i3.dy, this._nextY += i3.pixelHeight + d2 * a2 / Math.max(Math.abs(t3.value), 1e-8), n3.y = this._nextY - d2, n3.x = h2 / 2;
- } else {
- var _2;
- c2 = Vn(this.topWidth, p2), tt(this._nextWidth) || (this._nextWidth = c2), f2 = Vn(this.bottomWidth, p2), g2 = this._nextWidth, y2 = Math.atan2(o3, c2 - f2), (_2 = Math.tan(Math.PI / 2 - y2)) == 0 && (_2 = 1e-8);
- var P2 = void 0;
- v2 = void 0, v2 = this.valueIs == "area" ? (2 * (b2 = (c2 + f2) / 2 * o3 * a2 / e4) - (P2 = (g2 - Math.sqrt(g2 * g2 - 2 * b2 * _2)) / _2) * g2) / P2 : g2 - (P2 = o3 * a2 / e4) * _2, i3.width = P2, i3.height = p2, i3.bottomWidth = v2, i3.topWidth = g2, n3.topWidth = i3.bottomWidth, n3.bottomWidth = i3.bottomWidth, i3.x = this._nextY, this.alignLabels ? r3.y = this.labelsContainer.measuredHeight : r3.y = p2 / 2, r3.x = i3.pixelX + i3.pixelWidth * s2.locationX + i3.dx, this._nextY += i3.pixelWidth + u2 * a2 / Math.max(Math.abs(t3.value), 1e-8), n3.x = this._nextY - u2, n3.y = p2 / 2;
- }
- this._nextWidth = i3.bottomWidth;
- }
- }, Object.defineProperty(e3.prototype, "topWidth", { get: function() {
- return this.getPropertyValue("topWidth");
- }, set: function(t3) {
- this.setPercentProperty("topWidth", t3, false, false, 10, false) && this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pyramidHeight", { get: function() {
- return this.getPropertyValue("pyramidHeight");
- }, set: function(t3) {
- this.setPercentProperty("pyramidHeight", t3, false, false, 10, false) && this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "bottomWidth", { get: function() {
- return this.getPropertyValue("bottomWidth");
- }, set: function(t3) {
- this.setPercentProperty("bottomWidth", t3, false, false, 10, false) && this.invalidate();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "valueIs", { get: function() {
- return this.getPropertyValue("valueIs");
- }, set: function(t3) {
- this.setPropertyValue("valueIs", t3) && this.invalidate();
- }, enumerable: true, configurable: true }), e3;
- }(tu);
- Ii.registeredClasses.PyramidSeries = iu, Ii.registeredClasses.PyramidSeriesDataItem = eu;
- var nu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PictorialStackedSeriesDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(eu), ru = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "PictorialStackedSeries", e4.topWidth = V(100), e4.bottomWidth = V(100), e4.valueIs = "height", e4.applyTheme(), e4.startLocation = 0, e4.endLocation = 1, e4.align = "center", e4.valign = "middle", e4._maskSprite = e4.slicesContainer.createChild(Za), e4._maskSprite.visible = false, e4._maskSprite.zIndex = 100, e4._maskSprite.shouldClone = false, e4;
- }
- return C(e3, t2), e3.prototype.validateDataElements = function() {
- var e4 = this.slicesContainer.maxWidth, i3 = this.slicesContainer.maxHeight, n3 = this._maskSprite, r3 = n3.measuredWidth / n3.scale, s2 = n3.measuredHeight / n3.scale, a2 = yt(i3 / s2, e4 / r3);
- a2 == 1 / 0 && (a2 = 1), a2 = gt(1e-3, a2);
- var o3, l2, h2 = this.startLocation, p2 = this.endLocation, u2 = yt(e4, r3 * a2), d2 = yt(i3, s2 * a2);
- n3.scale = a2, this.orientation == "vertical" ? (this.topWidth = u2 + 4, this.bottomWidth = u2 + 4, this.pyramidHeight = d2 * (p2 - h2), n3.x = e4 / 2, n3.y = d2 / 2) : (this.topWidth = d2 + 4, this.bottomWidth = d2 + 4, this.pyramidHeight = u2 * (p2 - h2), n3.valign = "middle", n3.x = u2 / 2, n3.y = i3 / 2), n3.verticalCenter = "middle", n3.horizontalCenter = "middle", t2.prototype.validateDataElements.call(this), this.orientation == "vertical" ? (this.valign == "bottom" && (o3 = i3 - d2), this.valign == "middle" && (o3 = (i3 - d2) / 2), this.valign == "top" && (o3 = 0), this.align == "left" && (l2 = -(e4 - u2) / 2), this.align == "center" && (l2 = 0), this.align == "right" && (l2 = (e4 - u2) / 2), this.slices.template.dy = h2 * d2, this.alignLabels && (this.slicesContainer.dx = l2)) : (this.valign == "bottom" && (o3 = (i3 - d2) / 2), this.valign == "middle" && (o3 = 0), this.valign == "top" && (o3 = -(i3 - d2) / 2), this.align == "left" && (l2 = 0), this.align == "center" && (l2 = (e4 - u2) / 2), this.align == "right" && (l2 = e4 - u2), this.slices.template.dx = h2 * u2, this.alignLabels && (this.slicesContainer.dy = o3)), this.slicesContainer.x = l2, this.labelsContainer.x = l2, this.ticksContainer.x = l2, this.slicesContainer.y = o3, this.labelsContainer.y = o3, this.ticksContainer.y = o3, u2 > 0 && d2 > 0 && (this.slicesContainer.mask = n3);
- }, e3.prototype.applyInternalDefaults = function() {
- t2.prototype.applyInternalDefaults.call(this), Z(this.readerTitle) || (this.readerTitle = this.language.translate("Pyramid Series"));
- }, e3.prototype.createDataItem = function() {
- return new nu();
- }, Object.defineProperty(e3.prototype, "maskSprite", { get: function() {
- return this._maskSprite;
- }, enumerable: true, configurable: true }), e3.prototype.initSlice = function(e4) {
- t2.prototype.initSlice.call(this, e4);
- var i3 = e4.states.getKey("hover");
- i3 && (i3.properties.expandDistance = 0);
- }, Object.defineProperty(e3.prototype, "startLocation", { get: function() {
- return this.getPropertyValue("startLocation");
- }, set: function(t3) {
- this.setPropertyValue("startLocation", t3) && this.invalidateDataItems();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endLocation", { get: function() {
- return this.getPropertyValue("endLocation");
- }, set: function(t3) {
- this.setPropertyValue("endLocation", t3) && this.invalidateDataItems();
- }, enumerable: true, configurable: true }), e3;
- }(iu);
- Ii.registeredClasses.PictorialStackedSeries = ru, Ii.registeredClasses.PictorialStackedSeriesDataItem = nu;
- var su = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ConeColumn", e4;
- }
- return C(e3, t2), e3.prototype.createAssets = function() {
- this.coneColumn = this.createChild(ml), this.coneColumn.shouldClone = false, this.column = this.coneColumn;
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.coneColumn && this.coneColumn.copyFrom(e4.coneColumn);
- }, e3;
- }(Cp);
- Ii.registeredClasses.ConeColumn = su;
- var au = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ConeSeriesDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Op), ou = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ConeSeries", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.createColumnTemplate = function() {
- return new su();
- }, e3.prototype.getMaskPath = function() {
- var t3 = 0, e4 = 0, i3 = this.columns.getIndex(0);
- if (i3)
- return this.baseAxis == this.xAxis ? e4 = i3.coneColumn.innerWidth / 2 + 1 : t3 = i3.coneColumn.innerHeight / 2 + 1, Vo({ x: -t3, y: 0, width: this.xAxis.axisLength + t3, height: this.yAxis.axisLength + e4 });
- }, e3.prototype.validateDataElementReal = function(e4) {
- if (t2.prototype.validateDataElementReal.call(this, e4), e4.column) {
- var i3 = e4.column.coneColumn;
- i3.fill = e4.column.fill, this.baseAxis == this.yAxis ? i3.orientation = "horizontal" : i3.orientation = "vertical";
- }
- }, e3;
- }(Sp);
- Ii.registeredClasses.ConeSeries = ou, Ii.registeredClasses.ConeSeriesDataItem = au;
- var lu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "CurvedColumn", e4;
- }
- return C(e3, t2), e3.prototype.createAssets = function() {
- this.curvedColumn = this.createChild(Za), this.curvedColumn.shouldClone = false, this.setPropertyValue("tension", 0.7), this.width = V(120), this.height = V(120), this.column = this.curvedColumn;
- }, e3.prototype.draw = function() {
- t2.prototype.draw.call(this);
- var e4, i3 = this.realWidth, n3 = this.realHeight, r3 = this.realX - this.pixelX, s2 = this.realY - this.pixelY;
- this.width;
- var a2 = 1, o3 = 1;
- this.orientation == "vertical" ? (a2 = this.tension, e4 = [{ x: 0, y: n3 + s2 }, { x: i3 / 2, y: s2 }, { x: i3, y: n3 + s2 }]) : (o3 = this.tension, e4 = [{ x: r3, y: n3 = Math.abs(n3) }, { x: r3 + i3, y: n3 / 2 }, { x: r3, y: 0 }]);
- var l2 = wo(e4[0]) + new tl(a2, o3).smooth(e4);
- this.column.path = l2;
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.curvedColumn && this.curvedColumn.copyFrom(e4.curvedColumn);
- }, Object.defineProperty(e3.prototype, "tension", { get: function() {
- return this.getPropertyValue("tension");
- }, set: function(t3) {
- this.setPropertyValue("tension", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "orientation", { get: function() {
- return this.getPropertyValue("orientation");
- }, set: function(t3) {
- this.setPropertyValue("orientation", t3, true);
- }, enumerable: true, configurable: true }), e3;
- }(Cp);
- Ii.registeredClasses.CurvedColumn = lu;
- var hu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "CurvedColumnSeriesDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3;
- }(Op), pu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "CurvedColumnSeries", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.createColumnTemplate = function() {
- return new lu();
- }, e3.prototype.validateDataElementReal = function(e4) {
- t2.prototype.validateDataElementReal.call(this, e4);
- var i3 = e4.column;
- (i3 = e4.column) && (e4.column.curvedColumn.fill = e4.column.fill, this.baseAxis == this.yAxis ? i3.orientation = "horizontal" : i3.orientation = "vertical");
- }, e3;
- }(Sp);
- Ii.registeredClasses.CurvedColumnSeries = pu, Ii.registeredClasses.CurvedColumnSeriesDataItem = hu;
- var uu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "CircleBullet";
- var i3 = e4.createChild(yo);
- return i3.shouldClone = false, i3.radius = 5, i3.isMeasured = false, e4.circle = i3, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.circle.copyFrom(e4.circle);
- }, e3;
- }(ql);
- Ii.registeredClasses.CircleBullet = uu;
- var du = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "ErrorBullet", e4.errorLine = e4.createChild(Za), e4.errorLine.shouldClone = false, e4.width = 20, e4.height = 20, e4.strokeOpacity = 1, e4.isDynamic = true, e4;
- }
- return C(e3, t2), e3.prototype.validatePosition = function() {
- t2.prototype.validatePosition.call(this);
- var e4 = this.pixelWidth / 2, i3 = this.pixelHeight / 2;
- this.errorLine.path = wo({ x: -e4, y: -i3 }) + Co({ x: e4, y: -i3 }) + wo({ x: 0, y: -i3 }) + Co({ x: 0, y: i3 }) + wo({ x: -e4, y: i3 }) + Co({ x: e4, y: i3 });
- }, e3.prototype.copyFrom = function(e4) {
- t2.prototype.copyFrom.call(this, e4), this.errorLine.copyFrom(e4.errorLine);
- }, e3;
- }(ql);
- Ii.registeredClasses.ErrorBullet = du;
- var cu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "NavigationBarDataItem", e4.applyTheme(), e4;
- }
- return C(e3, t2), Object.defineProperty(e3.prototype, "name", { get: function() {
- return this.properties.name;
- }, set: function(t3) {
- this.setProperty("name", t3);
- }, enumerable: true, configurable: true }), e3;
- }(po), fu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.className = "NavigationBar";
- var i3 = new Ys(), n3 = new Ko();
- n3.valign = "middle", n3.paddingTop = 8, n3.paddingBottom = 8, e4.paddingBottom = 2, e4.links = new Mi(n3), e4._disposers.push(new Ai(e4.links)), e4._disposers.push(n3), e4._linksIterator = new mi(e4.links, function() {
- return e4.links.create();
- }), e4._linksIterator.createNewItems = true;
- var r3 = new Qo();
- r3.direction = "right", r3.width = 8, r3.height = 12, r3.fill = i3.getFor("alternativeBackground"), r3.fillOpacity = 0.5, r3.valign = "middle", r3.marginLeft = 10, r3.marginRight = 10, e4.separators = new Mi(r3), e4._disposers.push(new Ai(e4.separators)), e4._disposers.push(r3);
- var s2 = new Ko();
- return e4.activeLink = s2, s2.copyFrom(n3), s2.valign = "middle", s2.fontWeight = "bold", e4.width = V(100), e4.layout = "grid", e4.dataFields.name = "name", e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.validateDataElements = function() {
- this.removeChildren(), this._linksIterator.reset(), t2.prototype.validateDataElements.call(this);
- }, e3.prototype.validateDataElement = function(e4) {
- var i3;
- if (t2.prototype.validateDataElement.call(this, e4), e4.index < this.dataItems.length - 1) {
- (i3 = this._linksIterator.getLast()).parent = this;
- var n3 = this.separators.create();
- n3.parent = this, n3.valign = "middle";
- } else
- (i3 = this.activeLink).events.copyFrom(this.links.template.events), i3.hide(0), i3.show(), i3.parent = this;
- i3.dataItem = e4, i3.text = e4.name, i3.validate();
- }, e3;
- }(uo);
- Ii.registeredClasses.NavigationBar = fu, Ii.registeredClasses.NavigationBarDataItem = cu;
- var gu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4.point = { x: 0, y: 0 }, e4._stick = "none", e4.className = "Cursor", e4.width = V(100), e4.height = V(100), e4.shouldClone = false, e4.hide(0), e4.trackable = true, e4.clickable = true, e4.isMeasured = false;
- var i3 = ua();
- return e4._disposers.push(i3.body.events.on("down", e4.handleCursorDown, e4)), e4._disposers.push(i3.body.events.on("up", e4.handleCursorUp, e4)), e4._disposers.push(i3.body.events.on("track", e4.handleCursorMove, e4)), e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.handleCursorMove = function(t3) {
- if (!(!this.interactionsEnabled || this.interactions.isTouchProtected && t3.touch)) {
- if ((this._generalBehavior == "zoom" || this._generalBehavior == "pan") && this.downPoint || ua().isLocalElement(t3.pointer, this.paper.svg, this.uid)) {
- var e4 = mr(t3.pointer.point, this);
- return this._stick == "hard" && this._stickPoint && (e4 = this._stickPoint), this._stick == "soft" && this._stickPoint && (this.fitsToBounds(e4) || (e4 = this._stickPoint)), this._adapterO && this._adapterO.apply("cursorPoint", e4), this.triggerMove(e4), e4;
- }
- this.isHidden && this.isHiding || this.hide();
- }
- }, e3.prototype.hideReal = function(e4) {
- if (this._stick != "hard" && this._stick != "soft" || !this._stickPoint)
- return t2.prototype.hideReal.call(this, e4);
- }, e3.prototype.triggerMove = function(t3, e4, i3) {
- t3.x = lt(t3.x, 1), t3.y = lt(t3.y, 1), e4 && (this._stick = e4), e4 != "hard" && e4 != "soft" || (this._stickPoint = t3), this.triggerMoveReal(t3, i3);
- }, e3.prototype.triggerMoveReal = function(t3, e4) {
- (this.point.x != t3.x || this.point.y != t3.y || e4) && (this.point = t3, this.invalidatePosition(), this.fitsToBounds(t3) ? this.show(0) : this.downPoint || this.hide(0), this.visible && (this.getPositions(), this.dispatch("cursorpositionchanged")));
- }, e3.prototype.triggerDown = function(t3) {
- this.triggerDownReal(t3);
- }, e3.prototype.triggerDownReal = function(t3) {
- switch (this._generalBehavior) {
- case "zoom":
- this.dispatchImmediately("zoomstarted");
- break;
- case "select":
- this.dispatchImmediately("selectstarted");
- break;
- case "pan":
- this.dispatchImmediately("panstarted"), ua().setGlobalStyle(Ia.grabbing);
- }
- }, e3.prototype.triggerUp = function(t3) {
- this.triggerUpReal(t3);
- }, e3.prototype.triggerUpReal = function(t3) {
- Qa.requestFrame(), this.updatePoint(this.upPoint);
- var e4 = ua();
- if (_t(this._upPointOrig, this._downPointOrig) > e4.getHitOption(this.interactions, "hitTolerance")) {
- switch (this._generalBehavior) {
- case "zoom":
- this.dispatch("zoomended");
- break;
- case "select":
- this.dispatch("selectended");
- break;
- case "pan":
- this.dispatch("panended"), e4.setGlobalStyle(Ia.default);
- }
- this.downPoint = void 0, this.updateSelection();
- }
- }, e3.prototype.updateSelection = function() {
- }, e3.prototype.getPositions = function() {
- this.xPosition = this.point.x / this.innerWidth, this.yPosition = 1 - this.point.y / this.innerHeight;
- }, e3.prototype.handleCursorDown = function(t3) {
- if (!(!this.interactionsEnabled || this.interactions.isTouchProtected && t3.touch) && ua().isLocalElement(t3.pointer, this.paper.svg, this.uid)) {
- Ss();
- var e4 = mr(t3.pointer.point, this);
- this._stick == "hard" && this._stickPoint && (e4 = this._stickPoint), this._adapterO && this._adapterO.apply("cursorPoint", e4), this.fitsToBounds(e4) && (this._downPointOrig = { x: e4.x, y: e4.y }, t3.event.cancelable && this.shouldPreventGestures(t3.touch) && this.fitsToBounds(e4) && t3.event.preventDefault(), this.triggerMove(e4), this.triggerDown(e4));
- }
- }, e3.prototype.shouldPreventGestures = function(t3) {
- return true;
- }, e3.prototype.updatePoint = function(t3) {
- }, e3.prototype.handleCursorUp = function(t3) {
- if (this.interactionsEnabled && (this.downPoint || ua().isLocalElement(t3.pointer, this.paper.svg, this.uid))) {
- var e4 = mr(t3.pointer.point, this);
- this._adapterO && this._adapterO.apply("cursorPoint", e4), this.downPoint && this.fitsToBounds(this.downPoint) && (this._stick == "hard" && this._stickPoint && (e4 = this._stickPoint), this._upPointOrig = { x: e4.x, y: e4.y }, this.triggerMove(e4), this.triggerUp(e4));
- }
- }, Object.defineProperty(e3.prototype, "chart", { get: function() {
- return this._chart;
- }, set: function(t3) {
- this._chart = t3, Z(this._chart.plotContainer) && ua().lockElement(this._chart.plotContainer.interactions);
- }, enumerable: true, configurable: true }), e3;
- }($a);
- Ii.registeredClasses.Cursor = gu;
- var yu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- e4._lineX = new ve(), e4._lineY = new ve(), e4._xAxis = new ve(), e4._yAxis = new ve(), e4._snapToDisposers = [], e4.className = "XYCursor", e4.behavior = "zoomX", e4.maxPanOut = 0.1;
- var i3 = new Ys();
- e4.snapOnPan = true;
- var n3 = e4.createChild(Za);
- n3.shouldClone = false, n3.fillOpacity = 0.2, n3.fill = i3.getFor("alternativeBackground"), n3.isMeasured = false, n3.visible = false, n3.interactionsEnabled = false, e4.selection = n3, e4._disposers.push(e4.selection);
- var r3 = e4.createChild(Za);
- r3.shouldClone = false, r3.stroke = i3.getFor("grid"), r3.fill = dn(), r3.strokeDasharray = "3,3", r3.isMeasured = false, r3.strokeOpacity = 0.4, r3.interactionsEnabled = false, r3.y = 0, e4.lineX = r3, e4._disposers.push(e4.lineX);
- var s2 = e4.createChild(Za);
- return s2.shouldClone = false, s2.stroke = i3.getFor("grid"), s2.fill = dn(), s2.strokeDasharray = "3,3", s2.isMeasured = false, s2.strokeOpacity = 0.4, s2.interactionsEnabled = false, s2.x = 0, e4.lineY = s2, e4._disposers.push(e4.lineY), e4.events.on("sizechanged", e4.updateSize, e4, false), e4._disposers.push(e4._lineX), e4._disposers.push(e4._lineY), e4._disposers.push(e4._xAxis), e4._disposers.push(e4._yAxis), e4.mask = e4, e4.hideSeriesTooltipsOnSelection = true, e4.applyTheme(), e4;
- }
- return C(e3, t2), e3.prototype.updateSize = function() {
- this.lineX && (this.lineX.path = wo({ x: 0, y: 0 }) + Co({ x: 0, y: this.innerHeight })), this.lineY && (this.lineY.path = wo({ x: 0, y: 0 }) + Co({ x: this.innerWidth, y: 0 }));
- }, e3.prototype.updateSelection = function() {
- if (this._usesSelection) {
- var t3 = this.downPoint, e4 = this.behavior;
- if (t3) {
- var i3 = this.point;
- this.lineX && (i3.x = this.lineX.pixelX), this.lineY && (i3.y = this.lineY.pixelY);
- var n3 = this.selection, r3 = Math.min(i3.x, t3.x), s2 = Math.min(i3.y, t3.y), a2 = lt(Math.abs(t3.x - i3.x), this._positionPrecision), o3 = lt(Math.abs(t3.y - i3.y), this._positionPrecision);
- switch (e4) {
- case "zoomX":
- case "selectX":
- s2 = 0, o3 = this.pixelHeight;
- break;
- case "zoomY":
- case "selectY":
- r3 = 0, a2 = this.pixelWidth;
- }
- n3.x = r3, n3.y = s2, n3.path = Ao(a2, o3), n3.validatePosition();
- } else
- this._generalBehavior != "select" && this.selection.hide();
- }
- }, e3.prototype.fixPoint = function(t3) {
- return t3.x = Math.max(0, t3.x), t3.y = Math.max(0, t3.y), t3.x = Math.min(this.pixelWidth, t3.x), t3.y = Math.min(this.pixelHeight, t3.y), t3;
- }, e3.prototype.triggerMoveReal = function(e4, i3) {
- t2.prototype.triggerMoveReal.call(this, e4, i3);
- var n3 = this.snapToSeries;
- if (n3 && !this.downPoint)
- if (n3 instanceof Dh)
- n3.isHidden && this.updateLinePositions(e4);
- else {
- var r3 = true;
- Ut(n3, function(t3) {
- t3.isHidden || (r3 = false);
- }), r3 && this.updateLinePositions(e4);
- }
- else
- this.updateLinePositions(e4);
- this.downPoint && _t(this.downPoint, e4) > 3 && this._generalBehavior == "pan" && (this.getPanningRanges(), this.dispatch("panning"));
- }, e3.prototype.updateLinePositions = function(t3) {
- t3 = this.fixPoint(this.point), this.lineX && this.lineX.visible && !this.xAxis && (this.lineX.x = t3.x), this.lineY && this.lineY.visible && !this.yAxis && (this.lineY.y = t3.y), this.updateSelection();
- }, e3.prototype.triggerDownReal = function(e4) {
- if (this.visible && !this.isHiding)
- if (this._generalBehavior == "select" && (this.selection.parent = this.parent), this.fitsToBounds(e4)) {
- this.downPoint = { x: e4.x, y: e4.y }, this.updatePoint(e4), this.point.x = this.downPoint.x, this.point.y = this.downPoint.y;
- var i3 = this.selection, n3 = this.downPoint.x, r3 = this.downPoint.y;
- this._usesSelection && (i3.x = n3, i3.y = r3, i3.path = "", i3.show()), t2.prototype.triggerDownReal.call(this, e4);
- } else
- this.downPoint = void 0;
- else
- this.downPoint = void 0;
- }, e3.prototype.updatePoint = function(t3) {
- this.lineX && (t3.x = this.lineX.pixelX), this.lineY && (t3.y = this.lineY.pixelY);
- }, e3.prototype.triggerUpReal = function(e4) {
- this.hasMoved() ? this.downPoint && (this.upPoint = e4, this.updatePoint(this.upPoint), this._generalBehavior != "pan" && this.getRanges(), this._generalBehavior != "select" && this.selection.hide(), t2.prototype.triggerUpReal.call(this, e4)) : (this._generalBehavior != "select" ? this.selection.hide(0) : (this.xRange = void 0, this.yRange = void 0, this.dispatchImmediately("selectended")), this._generalBehavior == "pan" && ua().setGlobalStyle(Ia.default), this.dispatchImmediately("behaviorcanceled")), this.downPoint = void 0, this.dispatch("cursorpositionchanged");
- }, e3.prototype.hasMoved = function() {
- return (this.behavior == "zoomX" || this.behavior == "panX" ? Pt(this._upPointOrig, this._downPointOrig) : this.behavior == "zoomY" || this.behavior == "panY" ? wt(this._upPointOrig, this._downPointOrig) : _t(this._upPointOrig, this._downPointOrig)) > ua().getHitOption(this.interactions, "hitTolerance");
- }, e3.prototype.getPanningRanges = function() {
- var t3 = lt(this.downPoint.x / this.innerWidth, 5), e4 = 1 - lt(this.downPoint.y / this.innerHeight, 5), i3 = t3 - lt(this.point.x / this.innerWidth, 5), n3 = e4 - (1 - lt(this.point.y / this.innerHeight, 5));
- this.xRange = { start: i3, end: 1 + i3 }, this.yRange = { start: n3, end: 1 + n3 }, this.behavior == "panX" && (this.yRange.start = 0, this.yRange.end = 1), this.behavior == "panY" && (this.xRange.start = 0, this.xRange.end = 1);
- }, e3.prototype.getRanges = function() {
- this.lineX && (this.upPoint.x = this.lineX.pixelX), this.lineY && (this.upPoint.y = this.lineY.pixelY), this.selection;
- var t3 = lt(this.downPoint.x / this.innerWidth, 5), e4 = lt(this.upPoint.x / this.innerWidth, 5), i3 = 1 - lt(this.downPoint.y / this.innerHeight, 5), n3 = 1 - lt(this.upPoint.y / this.innerHeight, 5);
- this.xRange = { start: yt(t3, e4), end: gt(t3, e4) }, this.yRange = { start: yt(i3, n3), end: gt(i3, n3) };
- }, Object.defineProperty(e3.prototype, "behavior", { get: function() {
- return this.getPropertyValue("behavior");
- }, set: function(t3) {
- this.setPropertyValue("behavior", t3, true), this._usesSelection = false, t3.indexOf("zoom") != -1 && (this._generalBehavior = "zoom", this._usesSelection = true), t3.indexOf("select") != -1 && (this._generalBehavior = "select", this._usesSelection = true), t3.indexOf("pan") != -1 && (this._generalBehavior = "pan", this._usesSelection = false);
- }, enumerable: true, configurable: true }), e3.prototype.shouldPreventGestures = function(t3) {
- return !(this.interactions.isTouchProtected && t3 || this.behavior == "none");
- }, Object.defineProperty(e3.prototype, "fullWidthLineX", { get: function() {
- return this.getPropertyValue("fullWidthLineX");
- }, set: function(t3) {
- this.setPropertyValue("fullWidthLineX", t3), t3 || this.updateSize();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "fullWidthLineY", { get: function() {
- return this.getPropertyValue("fullWidthLineY");
- }, set: function(t3) {
- this.setPropertyValue("fullWidthLineY", t3), t3 || this.updateSize();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "hideSeriesTooltipsOnSelection", { get: function() {
- return this.getPropertyValue("hideSeriesTooltipsOnSelection");
- }, set: function(t3) {
- this.setPropertyValue("hideSeriesTooltipsOnSelection", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxTooltipDistance", { get: function() {
- return this.getPropertyValue("maxTooltipDistance");
- }, set: function(t3) {
- this.setPropertyValue("maxTooltipDistance", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "maxPanOut", { get: function() {
- return this.getPropertyValue("maxPanOut");
- }, set: function(t3) {
- this.setPropertyValue("maxPanOut", t3);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "xAxis", { get: function() {
- return this._xAxis.get();
- }, set: function(t3) {
- var e4 = this;
- this._xAxis.get() != t3 && this._xAxis.set(t3, new me([t3.tooltip.events.on("positionchanged", this.handleXTooltipPosition, this, false), t3.events.on("rangechangestarted", function(t4) {
- e4.hide(0), e4.preventShow = true;
- }, void 0, false), t3.events.on("rangechangeended", function(t4) {
- e4.preventShow = false, e4.hide(0), e4.dispatch("cursorpositionchanged");
- }, void 0, false)]));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "yAxis", { get: function() {
- return this._yAxis.get();
- }, set: function(t3) {
- var e4 = this;
- this._yAxis.get() != t3 && this._yAxis.set(t3, new me([t3.tooltip.events.on("positionchanged", this.handleYTooltipPosition, this, false), t3.events.on("rangechangestarted", function(t4) {
- e4.hide(0), e4.__disabled = true;
- }, void 0, false), t3.events.on("rangechangeended", function(t4) {
- e4.__disabled = false, e4.hide(0), e4.dispatch("cursorpositionchanged");
- }, void 0, false)]));
- }, enumerable: true, configurable: true }), e3.prototype.handleXTooltipPosition = function(t3) {
- var e4 = this.xAxis.tooltip, i3 = pr({ x: e4.pixelX, y: e4.pixelY }, this), n3 = i3.x;
- if (i3.y = 1, this.lineX && (this.lineX.x = n3, this.fitsToBounds(i3) || this.hide()), this.xAxis && this.fullWidthLineX) {
- var r3 = this.xAxis.currentItemStartPoint, s2 = this.xAxis.currentItemEndPoint;
- if (r3 && s2) {
- this.lineX.x = n3;
- var a2 = s2.x - r3.x;
- this.lineX.path = Ao(a2, this.innerHeight, -a2 / 2);
- }
- }
- }, e3.prototype.handleYTooltipPosition = function(t3) {
- var e4 = this.yAxis.tooltip, i3 = pr({ x: e4.pixelX, y: e4.pixelY }, this), n3 = i3.y;
- if (i3.x = 1, this.lineY && (this.lineY.y = n3, this.fitsToBounds(i3) || this.hide()), this.yAxis && this.fullWidthLineY) {
- var r3 = this.yAxis.currentItemStartPoint, s2 = this.yAxis.currentItemEndPoint;
- if (r3 && s2) {
- this.lineY.y = n3;
- var a2 = s2.y - r3.y;
- this.lineY.path = Ao(this.innerWidth, a2, 0, -a2 / 2);
- }
- }
- }, Object.defineProperty(e3.prototype, "lineX", { get: function() {
- return this._lineX.get();
- }, set: function(t3) {
- t3 ? (t3.setElement(this.paper.add("path")), this._lineX.set(t3, t3.events.on("positionchanged", this.updateSelection, this, false)), t3.interactionsEnabled = false, t3.parent = this) : this._lineX.reset();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "lineY", { get: function() {
- return this._lineY.get();
- }, set: function(t3) {
- t3 ? (t3.setElement(this.paper.add("path")), this._lineY.set(t3, t3.events.on("positionchanged", this.updateSelection, this, false)), t3.parent = this, t3.interactionsEnabled = false) : this._lineY.reset();
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "selection", { get: function() {
- return this._selection;
- }, set: function(t3) {
- this._selection = t3, t3 && (t3.element = this.paper.add("path"), t3.parent = this);
- }, enumerable: true, configurable: true }), e3.prototype.processConfig = function(e4) {
- var i3 = this;
- if (e4 && (Z(e4.xAxis) && Q(e4.xAxis) && (this.map.hasKey(e4.xAxis) ? e4.xAxis = this.map.getKey(e4.xAxis) : (this.processingErrors.push('[XYCursor] No axis with id "' + e4.xAxis + '" found for `xAxis`'), delete e4.xAxis)), Z(e4.yAxis) && Q(e4.yAxis) && (this.map.hasKey(e4.yAxis) ? e4.yAxis = this.map.getKey(e4.yAxis) : (this.processingErrors.push('[XYCursor] No axis with id "' + e4.yAxis + '" found for `yAxis`'), delete e4.yAxis)), Z(e4.snapToSeries))) {
- var n3 = it(e4.snapToSeries) ? e4.snapToSeries : [e4.snapToSeries], r3 = false;
- Ut(n3, function(t3, e5) {
- Q(t3) && (i3.map.hasKey(t3) ? n3[e5] = i3.map.getKey(t3) : (i3.processingErrors.push('[XYCursor] No series with id "' + t3 + '" found for `series`'), r3 = true));
- }), r3 ? delete e4.snapToSeries : e4.snapToSeries = n3;
- }
- t2.prototype.processConfig.call(this, e4);
- }, Object.defineProperty(e3.prototype, "snapToSeries", { get: function() {
- return this.getPropertyValue("snapToSeries");
- }, set: function(t3) {
- var e4 = this;
- this.setPropertyValue("snapToSeries", t3) && (t3 instanceof Dh && (t3 = [t3]), this._snapToDisposers && Ut(this._snapToDisposers, function(t4) {
- t4.dispose();
- }), this._snapToDisposers = [], t3 && Ut(t3, function(t4) {
- e4._snapToDisposers.push(t4.events.on("tooltipshownat", function() {
- e4.handleSnap(t4);
- }, void 0, false));
- }));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "snapOnPan", { get: function() {
- return this.getPropertyValue("snapOnPan");
- }, set: function(t3) {
- this.setPropertyValue("snapOnPan", t3);
- }, enumerable: true, configurable: true }), e3.prototype.handleSnap = function(t3) {
- if (!this.downPoint) {
- var e4 = t3.getTooltipX() + t3.xAxis.pixelX, i3 = t3.getTooltipY() + t3.yAxis.pixelY, n3 = t3.xAxis, r3 = t3.yAxis;
- n3 && n3.renderer.opposite && (i3 -= this.pixelHeight), this.point = { x: e4, y: i3 }, this.getPositions();
- var s2 = e4, a2 = i3;
- e4 -= this.pixelWidth, r3 && r3.renderer.opposite && (e4 += this.pixelWidth);
- var o3 = t3.tooltip, l2 = o3.animationDuration, h2 = o3.animationEasing;
- n3 instanceof bh && !(n3 instanceof Ph) && r3 instanceof bh && !(r3 instanceof Ph) ? (t3.yAxis.showTooltipAtPosition(this.yPosition), t3.xAxis.showTooltipAtPosition(this.xPosition)) : (t3.baseAxis == t3.xAxis && t3.yAxis.showTooltipAtPosition(this.yPosition), t3.baseAxis == t3.yAxis && t3.xAxis.showTooltipAtPosition(this.xPosition)), this.lineY.x = e4, this.lineX.y = i3, this.xAxis || this.lineX.animate([{ property: "x", to: s2 }], l2, h2), this.yAxis || this.lineY.animate([{ property: "y", to: a2 }], l2, h2);
- }
- }, e3.prototype.dispose = function() {
- this.hide(0), t2.prototype.dispose.call(this);
- }, e3;
- }(gu);
- Ii.registeredClasses.XYCursor = yu;
- var mu = function(t2) {
- function e3() {
- var e4 = t2.call(this) || this;
- return e4.className = "RadarCursor", e4.radius = V(100), e4.innerRadius = V(0), e4.applyTheme(), e4.mask = void 0, e4;
- }
- return C(e3, t2), e3.prototype.fitsToBounds = function(t3) {
- var e4 = _t(t3);
- return e4 < this.truePixelRadius + 1 && e4 > this.pixelInnerRadius - 1;
- }, Object.defineProperty(e3.prototype, "startAngle", { get: function() {
- return this.getPropertyValue("startAngle");
- }, set: function(t3) {
- this.setPropertyValue("startAngle", t3, true);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "endAngle", { get: function() {
- return this.getPropertyValue("endAngle");
- }, set: function(t3) {
- this.setPropertyValue("endAngle", t3, true);
- }, enumerable: true, configurable: true }), e3.prototype.triggerMoveReal = function(e4, i3) {
- this.xAxis && (!this.xAxis || this.xAxis.cursorTooltipEnabled && !this.xAxis.tooltip.disabled) || this.updateLineX(this.point), this.yAxis && (!this.yAxis || this.yAxis.cursorTooltipEnabled && !this.yAxis.tooltip.disabled) || this.updateLineY(this.point), this.updateSelection(), t2.prototype.triggerMoveReal.call(this, e4, i3);
- }, e3.prototype.updateLineX = function(t3) {
- var e4 = this.pixelRadius, i3 = this.startAngle, n3 = this.endAngle, r3 = this.pixelInnerRadius;
- if (e4 > 0 && tt(i3) && tt(n3) && tt(r3)) {
- var s2 = Rt(Dt(t3), i3, n3), a2 = void 0;
- if (this.lineX && this.lineX.visible) {
- if (this.lineX.moveTo({ x: 0, y: 0 }), this.xAxis && this.fullWidthLineX) {
- var o3 = this.xAxis.currentItemStartPoint, l2 = this.xAxis.currentItemEndPoint;
- if (o3 && l2) {
- var h2 = Rt(Dt(o3), i3, n3), p2 = Rt(Dt(l2), i3, n3) - h2;
- i3 < n3 ? p2 < 0 && (p2 += 360) : p2 > 0 && (p2 -= 360), a2 = wo({ x: r3 * ft(s2 -= p2 / 2), y: r3 * dt(s2) }) + Co({ x: e4 * ft(s2), y: e4 * dt(s2) }) + Do(s2, p2, e4) + Co({ x: r3 * ft(s2 + p2), y: r3 * dt(s2 + p2) }) + Do(s2 + p2, -p2, r3);
- }
- }
- a2 || (a2 = wo({ x: r3 * ft(s2), y: r3 * dt(s2) }) + Co({ x: e4 * ft(s2), y: e4 * dt(s2) })), this.lineX.path = a2;
- }
- }
- }, e3.prototype.updateLineY = function(t3) {
- if (this.lineY && this.lineY.visible) {
- var e4 = this.startAngle, i3 = this.endAngle, n3 = this.truePixelRadius, r3 = ut(_t(t3), 0, this.truePixelRadius);
- if (tt(r3) && tt(e4)) {
- this.lineY.moveTo({ x: 0, y: 0 });
- var s2 = void 0, a2 = i3 - e4;
- if (this.yAxis && this.fullWidthLineY) {
- var o3 = this.yAxis.currentItemStartPoint, l2 = this.yAxis.currentItemEndPoint;
- if (o3 && l2) {
- var h2 = ut(_t(o3), 0, n3);
- s2 = wo({ x: (r3 = ut(_t(l2), 0, n3)) * ft(e4), y: r3 * dt(e4) }) + Do(e4, a2, r3), s2 += wo({ x: h2 * ft(i3), y: h2 * dt(i3) }) + Do(i3, -a2, h2);
- }
- }
- s2 || (s2 = wo({ x: r3 * ft(e4), y: r3 * dt(e4) }) + Do(e4, i3 - e4, r3)), this.lineY.path = s2;
- }
- }
- }, e3.prototype.updateSelection = function() {
- if (this._usesSelection) {
- var t3 = this.downPoint;
- if (t3) {
- var e4 = this.point, i3 = this.pixelRadius, n3 = this.truePixelRadius, r3 = this.pixelInnerRadius, s2 = Math.min(this.startAngle, this.endAngle), a2 = Math.max(this.startAngle, this.endAngle), o3 = Rt(Dt(t3), s2, a2), l2 = Rt(Dt(e4), s2, a2), h2 = _t(t3);
- if (h2 < n3) {
- var p2 = ut(_t(e4), 0, n3);
- this._prevAngle = l2;
- var u2 = wo({ x: 0, y: 0 }), d2 = dt(o3), c2 = ft(o3), f2 = dt(l2), g2 = ft(l2), y2 = this.behavior;
- y2 == "zoomX" || y2 == "selectX" ? u2 += Co({ x: i3 * c2, y: i3 * d2 }) + Do(o3, l2 - o3, i3) + Co({ x: r3 * g2, y: r3 * f2 }) + Do(l2, o3 - l2, r3) : y2 == "zoomY" || y2 == "selectY" ? u2 = wo({ x: p2 * ft(s2), y: p2 * dt(s2) }) + Do(s2, a2 - s2, p2) + Co({ x: h2 * ft(a2), y: h2 * dt(a2) }) + Do(a2, s2 - a2, h2) + " Z" : y2 == "zoomXY" && (u2 = wo({ x: p2 * ft(o3), y: p2 * dt(o3) }) + Do(o3, l2 - o3, p2) + Co({ x: h2 * ft(l2), y: h2 * dt(l2) }) + Do(l2, o3 - l2, h2) + " Z"), this.selection.path = u2;
- }
- this.selection.moveTo({ x: 0, y: 0 });
- }
- }
- }, e3.prototype.getPositions = function() {
- if (this.chart) {
- var t3 = this.pixelInnerRadius, e4 = this.truePixelRadius - t3, i3 = this.startAngle, n3 = this.endAngle, r3 = (Rt(Dt(this.point), i3, n3) - i3) / (n3 - i3);
- this.xPosition = r3, this.yPosition = ut((_t(this.point) - t3) / e4, 0, 1);
- }
- }, e3.prototype.updatePoint = function(t3) {
- }, e3.prototype.handleXTooltipPosition = function(t3) {
- if (this.xAxis.cursorTooltipEnabled) {
- var e4 = this.xAxis.tooltip;
- this.updateLineX(pr({ x: e4.pixelX, y: e4.pixelY }, this));
- }
- }, e3.prototype.handleYTooltipPosition = function(t3) {
- if (this.yAxis.cursorTooltipEnabled) {
- var e4 = this.yAxis.tooltip;
- this.updateLineY(pr({ x: e4.pixelX, y: e4.pixelY }, this));
- }
- }, e3.prototype.updateLinePositions = function(t3) {
- }, e3.prototype.getRanges = function() {
- var t3 = this.downPoint;
- if (t3) {
- var e4 = this.upPoint;
- if (this.chart) {
- var i3 = this.pixelRadius, n3 = this.startAngle, r3 = this.endAngle, s2 = Rt(Dt(t3), this.startAngle, this.endAngle), a2 = Rt(Dt(e4), this.startAngle, this.endAngle), o3 = ut(_t(t3), 0, i3), l2 = ut(_t(e4), 0, i3), h2 = 0, p2 = 1, u2 = 0, d2 = 1, c2 = this.behavior;
- if (c2 == "zoomX" || c2 == "selectX" || c2 == "zoomXY" || c2 == "selectXY") {
- var f2 = r3 - n3;
- h2 = lt((s2 - n3) / f2, 5), p2 = lt((a2 - n3) / f2, 5);
- }
- c2 != "zoomY" && c2 != "selectY" && c2 != "zoomXY" && c2 != "selectXY" || (u2 = lt(o3 / i3, 5), d2 = lt(l2 / i3, 5)), this.xRange = { start: Math.min(h2, p2), end: Math.max(h2, p2) }, this.yRange = { start: Math.min(u2, d2), end: Math.max(u2, d2) }, this.behavior == "selectX" || this.behavior == "selectY" || this.behavior == "selectXY" || this.selection.hide();
- }
- }
- }, e3.prototype.updateSize = function() {
- }, Object.defineProperty(e3.prototype, "radius", { get: function() {
- return this.getPropertyValue("radius");
- }, set: function(t3) {
- this.setPercentProperty("radius", t3, false, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelRadius", { get: function() {
- return Fn(this.radius, this.truePixelRadius);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "truePixelRadius", { get: function() {
- return Vn(V(100), yt(this.innerWidth / 2, this.innerHeight / 2));
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "innerRadius", { get: function() {
- return this.getPropertyValue("innerRadius");
- }, set: function(t3) {
- this.setPercentProperty("innerRadius", t3, false, false, 10, false);
- }, enumerable: true, configurable: true }), Object.defineProperty(e3.prototype, "pixelInnerRadius", { get: function() {
- var t3 = this.innerRadius;
- return t3 instanceof A && (t3 = V(100 * t3.value * this.chart.innerRadiusModifyer)), Fn(t3, this.truePixelRadius) || 0;
- }, enumerable: true, configurable: true }), e3.prototype.fixPoint = function(t3) {
- return t3;
- }, e3;
- }(yu);
- Ii.registeredClasses.RadarCursor = mu;
- const vu = function(t2) {
- Di(t2, "SpriteState") && (t2.transitionDuration = 400), Di(t2, "Component") && (t2.rangeChangeDuration = 500, t2.interpolationDuration = 500, t2.sequencedInterpolation = false, Di(t2, "SankeyDiagram") && (t2.sequencedInterpolation = true), Di(t2, "FunnelSeries") && (t2.sequencedInterpolation = true)), Di(t2, "Chart") && (t2.defaultState.transitionDuration = 2e3, t2.hiddenState.transitionDuration = 1e3), Di(t2, "Tooltip") && (t2.animationDuration = 400, t2.defaultState.transitionDuration = 400, t2.hiddenState.transitionDuration = 400), Di(t2, "Scrollbar") && (t2.animationDuration = 500), Di(t2, "Series") && (t2.defaultState.transitionDuration = 1e3, t2.hiddenState.transitionDuration = 700, t2.hiddenState.properties.opacity = 1, t2.showOnInit = true), Di(t2, "MapSeries") && (t2.hiddenState.properties.opacity = 0), Di(t2, "PercentSeries") && (t2.hiddenState.properties.opacity = 0), Di(t2, "FunnelSlice") && (t2.defaultState.transitionDuration = 800, t2.hiddenState.transitionDuration = 1e3, t2.hiddenState.properties.opacity = 1), Di(t2, "Slice") && (t2.defaultState.transitionDuration = 700, t2.hiddenState.transitionDuration = 1e3, t2.hiddenState.properties.opacity = 1), Di(t2, "Preloader") && (t2.hiddenState.transitionDuration = 2e3), Di(t2, "Column") && (t2.defaultState.transitionDuration = 700, t2.hiddenState.transitionDuration = 1e3, t2.hiddenState.properties.opacity = 1), Di(t2, "Column3D") && (t2.hiddenState.properties.opacity = 0);
- }, bu = function(t2) {
- Di(t2, "InterfaceColorSet") && (t2.setFor("stroke", dn("#000000")), t2.setFor("fill", dn("#2b2b2b")), t2.setFor("primaryButton", dn("#6794dc").lighten(-0.2)), t2.setFor("primaryButtonHover", dn("#6771dc").lighten(-0.2)), t2.setFor("primaryButtonDown", dn("#68dc75").lighten(-0.2)), t2.setFor("primaryButtonActive", dn("#68dc75").lighten(-0.2)), t2.setFor("primaryButtonText", dn("#FFFFFF")), t2.setFor("primaryButtonStroke", dn("#6794dc")), t2.setFor("secondaryButton", dn("#3b3b3b")), t2.setFor("secondaryButtonHover", dn("#3b3b3b").lighten(0.1)), t2.setFor("secondaryButtonDown", dn("#3b3b3b").lighten(0.15)), t2.setFor("secondaryButtonActive", dn("#3b3b3b").lighten(0.15)), t2.setFor("secondaryButtonText", dn("#bbbbbb")), t2.setFor("secondaryButtonStroke", dn("#3b3b3b").lighten(-0.2)), t2.setFor("grid", dn("#bbbbbb")), t2.setFor("background", dn("#000000")), t2.setFor("alternativeBackground", dn("#ffffff")), t2.setFor("text", dn("#ffffff")), t2.setFor("alternativeText", dn("#000000")), t2.setFor("disabledBackground", dn("#bbbbbb"))), Di(t2, "Scrollbar") && (t2.background.fillOpacity = 0.4, t2.thumb.background.fillOpacity = 0.5);
- };
- return ls.commercialLicense = true, o2;
- })();
- }, n.exports = i();
- var r = e({ __proto__: null, default: o(n.exports) }, [n.exports]);
- export {
- r as i
- };
- //# sourceMappingURL=chunks-SZQ34Y5K.js.map
|