설명 없음
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

outlook-win32-16.02.debug.js 364KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551
  1. /* Outlook specific API library */
  2. /* Version: 16.0.7524.3000 */
  3. /*
  4. Copyright (c) Microsoft Corporation. All rights reserved.
  5. */
  6. /*
  7. Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419.
  8. */
  9. var __extends=this && this.__extends || function(d, b)
  10. {
  11. for(var p in b)
  12. if(b.hasOwnProperty(p))
  13. d[p]=b[p];
  14. function __()
  15. {
  16. this.constructor=d
  17. }
  18. d.prototype=b===null ? Object.create(b) : (__.prototype=b.prototype,new __)
  19. };
  20. var OfficeExt;
  21. (function(OfficeExt)
  22. {
  23. var MicrosoftAjaxFactory=function()
  24. {
  25. function MicrosoftAjaxFactory(){}
  26. MicrosoftAjaxFactory.prototype.isMsAjaxLoaded=function()
  27. {
  28. if(typeof Sys !=="undefined" && typeof Type !=="undefined" && Sys.StringBuilder && typeof Sys.StringBuilder==="function" && Type.registerNamespace && typeof Type.registerNamespace==="function" && Type.registerClass && typeof Type.registerClass==="function" && typeof Function._validateParams==="function" && Sys.Serialization && Sys.Serialization.JavaScriptSerializer && typeof Sys.Serialization.JavaScriptSerializer.serialize==="function")
  29. return true;
  30. else
  31. return false
  32. };
  33. MicrosoftAjaxFactory.prototype.loadMsAjaxFull=function(callback)
  34. {
  35. var msAjaxCDNPath=(window.location.protocol.toLowerCase()==="https:" ? "https:" : "http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";
  36. OSF.OUtil.loadScript(msAjaxCDNPath,callback)
  37. };
  38. Object.defineProperty(MicrosoftAjaxFactory.prototype,"msAjaxError",{
  39. get: function()
  40. {
  41. if(this._msAjaxError==null && this.isMsAjaxLoaded())
  42. this._msAjaxError=Error;
  43. return this._msAjaxError
  44. },
  45. set: function(errorClass)
  46. {
  47. this._msAjaxError=errorClass
  48. },
  49. enumerable: true,
  50. configurable: true
  51. });
  52. Object.defineProperty(MicrosoftAjaxFactory.prototype,"msAjaxString",{
  53. get: function()
  54. {
  55. if(this._msAjaxString==null && this.isMsAjaxLoaded())
  56. this._msAjaxString=String;
  57. return this._msAjaxString
  58. },
  59. set: function(stringClass)
  60. {
  61. this._msAjaxString=stringClass
  62. },
  63. enumerable: true,
  64. configurable: true
  65. });
  66. Object.defineProperty(MicrosoftAjaxFactory.prototype,"msAjaxDebug",{
  67. get: function()
  68. {
  69. if(this._msAjaxDebug==null && this.isMsAjaxLoaded())
  70. this._msAjaxDebug=Sys.Debug;
  71. return this._msAjaxDebug
  72. },
  73. set: function(debugClass)
  74. {
  75. this._msAjaxDebug=debugClass
  76. },
  77. enumerable: true,
  78. configurable: true
  79. });
  80. return MicrosoftAjaxFactory
  81. }();
  82. OfficeExt.MicrosoftAjaxFactory=MicrosoftAjaxFactory
  83. })(OfficeExt || (OfficeExt={}));
  84. var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;
  85. var OSF=OSF || {};
  86. var OfficeExt;
  87. (function(OfficeExt)
  88. {
  89. var SafeStorage=function()
  90. {
  91. function SafeStorage(_internalStorage)
  92. {
  93. this._internalStorage=_internalStorage
  94. }
  95. SafeStorage.prototype.getItem=function(key)
  96. {
  97. try
  98. {
  99. return this._internalStorage && this._internalStorage.getItem(key)
  100. }
  101. catch(e)
  102. {
  103. return null
  104. }
  105. };
  106. SafeStorage.prototype.setItem=function(key, data)
  107. {
  108. try
  109. {
  110. this._internalStorage && this._internalStorage.setItem(key,data)
  111. }
  112. catch(e){}
  113. };
  114. SafeStorage.prototype.clear=function()
  115. {
  116. try
  117. {
  118. this._internalStorage && this._internalStorage.clear()
  119. }
  120. catch(e){}
  121. };
  122. SafeStorage.prototype.removeItem=function(key)
  123. {
  124. try
  125. {
  126. this._internalStorage && this._internalStorage.removeItem(key)
  127. }
  128. catch(e){}
  129. };
  130. SafeStorage.prototype.getKeysWithPrefix=function(keyPrefix)
  131. {
  132. var keyList=[];
  133. try
  134. {
  135. var len=this._internalStorage && this._internalStorage.length || 0;
  136. for(var i=0; i < len; i++)
  137. {
  138. var key=this._internalStorage.key(i);
  139. if(key.indexOf(keyPrefix)===0)
  140. keyList.push(key)
  141. }
  142. }
  143. catch(e){}
  144. return keyList
  145. };
  146. return SafeStorage
  147. }();
  148. OfficeExt.SafeStorage=SafeStorage
  149. })(OfficeExt || (OfficeExt={}));
  150. OSF.XdmFieldName={
  151. ConversationUrl: "ConversationUrl",
  152. AppId: "AppId"
  153. };
  154. OSF.WindowNameItemKeys={
  155. BaseFrameName: "baseFrameName",
  156. HostInfo: "hostInfo",
  157. XdmInfo: "xdmInfo",
  158. SerializerVersion: "serializerVersion",
  159. AppContext: "appContext"
  160. };
  161. OSF.OUtil=function()
  162. {
  163. var _uniqueId=-1;
  164. var _xdmInfoKey="&_xdm_Info=";
  165. var _serializerVersionKey="&_serializer_version=";
  166. var _xdmSessionKeyPrefix="_xdm_";
  167. var _serializerVersionKeyPrefix="_serializer_version=";
  168. var _fragmentSeparator="#";
  169. var _fragmentInfoDelimiter="&";
  170. var _classN="class";
  171. var _loadedScripts={};
  172. var _defaultScriptLoadingTimeout=3e4;
  173. var _safeSessionStorage=null;
  174. var _safeLocalStorage=null;
  175. var _rndentropy=(new Date).getTime();
  176. function _random()
  177. {
  178. var nextrand=2147483647 * Math.random();
  179. nextrand ^=_rndentropy ^ (new Date).getMilliseconds() << Math.floor(Math.random() * (31 - 10));
  180. return nextrand.toString(16)
  181. }
  182. function _getSessionStorage()
  183. {
  184. if(!_safeSessionStorage)
  185. {
  186. try
  187. {
  188. var sessionStorage=window.sessionStorage
  189. }
  190. catch(ex)
  191. {
  192. sessionStorage=null
  193. }
  194. _safeSessionStorage=new OfficeExt.SafeStorage(sessionStorage)
  195. }
  196. return _safeSessionStorage
  197. }
  198. function _reOrderTabbableElements(elements)
  199. {
  200. var bucket0=[];
  201. var bucketPositive=[];
  202. var i;
  203. var len=elements.length;
  204. var ele;
  205. for(i=0; i < len; i++)
  206. {
  207. ele=elements[i];
  208. if(ele.tabIndex)
  209. {
  210. if(ele.tabIndex > 0)
  211. bucketPositive.push(ele);
  212. else if(ele.tabIndex===0)
  213. bucket0.push(ele)
  214. }
  215. else
  216. bucket0.push(ele)
  217. }
  218. bucketPositive=bucketPositive.sort(function(left, right)
  219. {
  220. var diff=left.tabIndex - right.tabIndex;
  221. if(diff===0)
  222. diff=bucketPositive.indexOf(left) - bucketPositive.indexOf(right);
  223. return diff
  224. });
  225. return[].concat(bucketPositive,bucket0)
  226. }
  227. return{
  228. set_entropy: function OSF_OUtil$set_entropy(entropy)
  229. {
  230. if(typeof entropy=="string")
  231. for(var i=0; i < entropy.length; i+=4)
  232. {
  233. var temp=0;
  234. for(var j=0; j < 4 && i+j < entropy.length; j++)
  235. temp=(temp << 8)+entropy.charCodeAt(i+j);
  236. _rndentropy ^=temp
  237. }
  238. else if(typeof entropy=="number")
  239. _rndentropy ^=entropy;
  240. else
  241. _rndentropy ^=2147483647 * Math.random();
  242. _rndentropy &=2147483647
  243. },
  244. extend: function OSF_OUtil$extend(child, parent)
  245. {
  246. var F=function(){};
  247. F.prototype=parent.prototype;
  248. child.prototype=new F;
  249. child.prototype.constructor=child;
  250. child.uber=parent.prototype;
  251. if(parent.prototype.constructor===Object.prototype.constructor)
  252. parent.prototype.constructor=parent
  253. },
  254. setNamespace: function OSF_OUtil$setNamespace(name, parent)
  255. {
  256. if(parent && name && !parent[name])
  257. parent[name]={}
  258. },
  259. unsetNamespace: function OSF_OUtil$unsetNamespace(name, parent)
  260. {
  261. if(parent && name && parent[name])
  262. delete parent[name]
  263. },
  264. loadScript: function OSF_OUtil$loadScript(url, callback, timeoutInMs)
  265. {
  266. if(url && callback)
  267. {
  268. var doc=window.document;
  269. var _loadedScriptEntry=_loadedScripts[url];
  270. if(!_loadedScriptEntry)
  271. {
  272. var script=doc.createElement("script");
  273. script.type="text/javascript";
  274. _loadedScriptEntry={
  275. loaded: false,
  276. pendingCallbacks: [callback],
  277. timer: null
  278. };
  279. _loadedScripts[url]=_loadedScriptEntry;
  280. var onLoadCallback=function OSF_OUtil_loadScript$onLoadCallback()
  281. {
  282. if(_loadedScriptEntry.timer !=null)
  283. {
  284. clearTimeout(_loadedScriptEntry.timer);
  285. delete _loadedScriptEntry.timer
  286. }
  287. _loadedScriptEntry.loaded=true;
  288. var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length;
  289. for(var i=0; i < pendingCallbackCount; i++)
  290. {
  291. var currentCallback=_loadedScriptEntry.pendingCallbacks.shift();
  292. currentCallback()
  293. }
  294. };
  295. var onLoadError=function OSF_OUtil_loadScript$onLoadError()
  296. {
  297. delete _loadedScripts[url];
  298. if(_loadedScriptEntry.timer !=null)
  299. {
  300. clearTimeout(_loadedScriptEntry.timer);
  301. delete _loadedScriptEntry.timer
  302. }
  303. var pendingCallbackCount=_loadedScriptEntry.pendingCallbacks.length;
  304. for(var i=0; i < pendingCallbackCount; i++)
  305. {
  306. var currentCallback=_loadedScriptEntry.pendingCallbacks.shift();
  307. currentCallback()
  308. }
  309. };
  310. if(script.readyState)
  311. script.onreadystatechange=function()
  312. {
  313. if(script.readyState=="loaded" || script.readyState=="complete")
  314. {
  315. script.onreadystatechange=null;
  316. onLoadCallback()
  317. }
  318. };
  319. else
  320. script.onload=onLoadCallback;
  321. script.onerror=onLoadError;
  322. timeoutInMs=timeoutInMs || _defaultScriptLoadingTimeout;
  323. _loadedScriptEntry.timer=setTimeout(onLoadError,timeoutInMs);
  324. script.src=url;
  325. doc.getElementsByTagName("head")[0].appendChild(script)
  326. }
  327. else if(_loadedScriptEntry.loaded)
  328. callback();
  329. else
  330. _loadedScriptEntry.pendingCallbacks.push(callback)
  331. }
  332. },
  333. loadCSS: function OSF_OUtil$loadCSS(url)
  334. {
  335. if(url)
  336. {
  337. var doc=window.document;
  338. var link=doc.createElement("link");
  339. link.type="text/css";
  340. link.rel="stylesheet";
  341. link.href=url;
  342. doc.getElementsByTagName("head")[0].appendChild(link)
  343. }
  344. },
  345. parseEnum: function OSF_OUtil$parseEnum(str, enumObject)
  346. {
  347. var parsed=enumObject[str.trim()];
  348. if(typeof parsed=="undefined")
  349. {
  350. OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+str);
  351. throw OsfMsAjaxFactory.msAjaxError.argument("str");
  352. }
  353. return parsed
  354. },
  355. delayExecutionAndCache: function OSF_OUtil$delayExecutionAndCache()
  356. {
  357. var obj={calc: arguments[0]};
  358. return function()
  359. {
  360. if(obj.calc)
  361. {
  362. obj.val=obj.calc.apply(this,arguments);
  363. delete obj.calc
  364. }
  365. return obj.val
  366. }
  367. },
  368. getUniqueId: function OSF_OUtil$getUniqueId()
  369. {
  370. _uniqueId=_uniqueId+1;
  371. return _uniqueId.toString()
  372. },
  373. formatString: function OSF_OUtil$formatString()
  374. {
  375. var args=arguments;
  376. var source=args[0];
  377. return source.replace(/{(\d+)}/gm,function(match, number)
  378. {
  379. var index=parseInt(number,10)+1;
  380. return args[index]===undefined ? "{"+number+"}" : args[index]
  381. })
  382. },
  383. generateConversationId: function OSF_OUtil$generateConversationId()
  384. {
  385. return[_random(),_random(),(new Date).getTime().toString()].join("_")
  386. },
  387. getFrameName: function OSF_OUtil$getFrameName(cacheKey)
  388. {
  389. return _xdmSessionKeyPrefix+cacheKey+this.generateConversationId()
  390. },
  391. addXdmInfoAsHash: function OSF_OUtil$addXdmInfoAsHash(url, xdmInfoValue)
  392. {
  393. return OSF.OUtil.addInfoAsHash(url,_xdmInfoKey,xdmInfoValue,false)
  394. },
  395. addSerializerVersionAsHash: function OSF_OUtil$addSerializerVersionAsHash(url, serializerVersion)
  396. {
  397. return OSF.OUtil.addInfoAsHash(url,_serializerVersionKey,serializerVersion,true)
  398. },
  399. addInfoAsHash: function OSF_OUtil$addInfoAsHash(url, keyName, infoValue, encodeInfo)
  400. {
  401. url=url.trim() || "";
  402. var urlParts=url.split(_fragmentSeparator);
  403. var urlWithoutFragment=urlParts.shift();
  404. var fragment=urlParts.join(_fragmentSeparator);
  405. var newFragment;
  406. if(encodeInfo)
  407. newFragment=[keyName,encodeURIComponent(infoValue),fragment].join("");
  408. else
  409. newFragment=[fragment,keyName,infoValue].join("");
  410. return[urlWithoutFragment,_fragmentSeparator,newFragment].join("")
  411. },
  412. parseHostInfoFromWindowName: function OSF_OUtil$parseHostInfoFromWindowName(skipSessionStorage, windowName)
  413. {
  414. return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.HostInfo)
  415. },
  416. parseXdmInfo: function OSF_OUtil$parseXdmInfo(skipSessionStorage)
  417. {
  418. var xdmInfoValue=OSF.OUtil.parseXdmInfoWithGivenFragment(skipSessionStorage,window.location.hash);
  419. if(!xdmInfoValue)
  420. xdmInfoValue=OSF.OUtil.parseXdmInfoFromWindowName(skipSessionStorage,window.name);
  421. return xdmInfoValue
  422. },
  423. parseXdmInfoFromWindowName: function OSF_OUtil$parseXdmInfoFromWindowName(skipSessionStorage, windowName)
  424. {
  425. return OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.XdmInfo)
  426. },
  427. parseXdmInfoWithGivenFragment: function OSF_OUtil$parseXdmInfoWithGivenFragment(skipSessionStorage, fragment)
  428. {
  429. return OSF.OUtil.parseInfoWithGivenFragment(_xdmInfoKey,_xdmSessionKeyPrefix,false,skipSessionStorage,fragment)
  430. },
  431. parseSerializerVersion: function OSF_OUtil$parseSerializerVersion(skipSessionStorage)
  432. {
  433. var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(skipSessionStorage,window.location.hash);
  434. if(isNaN(serializerVersion))
  435. serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(skipSessionStorage,window.name);
  436. return serializerVersion
  437. },
  438. parseSerializerVersionFromWindowName: function OSF_OUtil$parseSerializerVersionFromWindowName(skipSessionStorage, windowName)
  439. {
  440. return parseInt(OSF.OUtil.parseInfoFromWindowName(skipSessionStorage,windowName,OSF.WindowNameItemKeys.SerializerVersion))
  441. },
  442. parseSerializerVersionWithGivenFragment: function OSF_OUtil$parseSerializerVersionWithGivenFragment(skipSessionStorage, fragment)
  443. {
  444. return parseInt(OSF.OUtil.parseInfoWithGivenFragment(_serializerVersionKey,_serializerVersionKeyPrefix,true,skipSessionStorage,fragment))
  445. },
  446. parseInfoFromWindowName: function OSF_OUtil$parseInfoFromWindowName(skipSessionStorage, windowName, infoKey)
  447. {
  448. try
  449. {
  450. var windowNameObj=JSON.parse(windowName);
  451. var infoValue=windowNameObj !=null ? windowNameObj[infoKey] : null;
  452. var osfSessionStorage=_getSessionStorage();
  453. if(!skipSessionStorage && osfSessionStorage && windowNameObj !=null)
  454. {
  455. var sessionKey=windowNameObj[OSF.WindowNameItemKeys.BaseFrameName]+infoKey;
  456. if(infoValue)
  457. osfSessionStorage.setItem(sessionKey,infoValue);
  458. else
  459. infoValue=osfSessionStorage.getItem(sessionKey)
  460. }
  461. return infoValue
  462. }
  463. catch(Exception)
  464. {
  465. return null
  466. }
  467. },
  468. parseInfoWithGivenFragment: function OSF_OUtil$parseInfoWithGivenFragment(infoKey, infoKeyPrefix, decodeInfo, skipSessionStorage, fragment)
  469. {
  470. var fragmentParts=fragment.split(infoKey);
  471. var infoValue=fragmentParts.length > 1 ? fragmentParts[fragmentParts.length - 1] : null;
  472. if(decodeInfo && infoValue !=null)
  473. {
  474. if(infoValue.indexOf(_fragmentInfoDelimiter) >=0)
  475. infoValue=infoValue.split(_fragmentInfoDelimiter)[0];
  476. infoValue=decodeURIComponent(infoValue)
  477. }
  478. var osfSessionStorage=_getSessionStorage();
  479. if(!skipSessionStorage && osfSessionStorage)
  480. {
  481. var sessionKeyStart=window.name.indexOf(infoKeyPrefix);
  482. if(sessionKeyStart > -1)
  483. {
  484. var sessionKeyEnd=window.name.indexOf(";",sessionKeyStart);
  485. if(sessionKeyEnd==-1)
  486. sessionKeyEnd=window.name.length;
  487. var sessionKey=window.name.substring(sessionKeyStart,sessionKeyEnd);
  488. if(infoValue)
  489. osfSessionStorage.setItem(sessionKey,infoValue);
  490. else
  491. infoValue=osfSessionStorage.getItem(sessionKey)
  492. }
  493. }
  494. return infoValue
  495. },
  496. getConversationId: function OSF_OUtil$getConversationId()
  497. {
  498. var searchString=window.location.search;
  499. var conversationId=null;
  500. if(searchString)
  501. {
  502. var index=searchString.indexOf("&");
  503. conversationId=index > 0 ? searchString.substring(1,index) : searchString.substr(1);
  504. if(conversationId && conversationId.charAt(conversationId.length - 1)==="=")
  505. {
  506. conversationId=conversationId.substring(0,conversationId.length - 1);
  507. if(conversationId)
  508. conversationId=decodeURIComponent(conversationId)
  509. }
  510. }
  511. return conversationId
  512. },
  513. getInfoItems: function OSF_OUtil$getInfoItems(strInfo)
  514. {
  515. var items=strInfo.split("$");
  516. if(typeof items[1]=="undefined")
  517. items=strInfo.split("|");
  518. if(typeof items[1]=="undefined")
  519. items=strInfo.split("%7C");
  520. return items
  521. },
  522. getXdmFieldValue: function OSF_OUtil$getXdmFieldValue(xdmFieldName, skipSessionStorage)
  523. {
  524. var fieldValue="";
  525. var xdmInfoValue=OSF.OUtil.parseXdmInfo(skipSessionStorage);
  526. if(xdmInfoValue)
  527. {
  528. var items=OSF.OUtil.getInfoItems(xdmInfoValue);
  529. if(items !=undefined && items.length >=3)
  530. switch(xdmFieldName)
  531. {
  532. case OSF.XdmFieldName.ConversationUrl:
  533. fieldValue=items[2];
  534. break;
  535. case OSF.XdmFieldName.AppId:
  536. fieldValue=items[1];
  537. break
  538. }
  539. }
  540. return fieldValue
  541. },
  542. validateParamObject: function OSF_OUtil$validateParamObject(params, expectedProperties, callback)
  543. {
  544. var e=Function._validateParams(arguments,[{
  545. name: "params",
  546. type: Object,
  547. mayBeNull: false
  548. },{
  549. name: "expectedProperties",
  550. type: Object,
  551. mayBeNull: false
  552. },{
  553. name: "callback",
  554. type: Function,
  555. mayBeNull: true
  556. }]);
  557. if(e)
  558. throw e;
  559. for(var p in expectedProperties)
  560. {
  561. e=Function._validateParameter(params[p],expectedProperties[p],p);
  562. if(e)
  563. throw e;
  564. }
  565. },
  566. writeProfilerMark: function OSF_OUtil$writeProfilerMark(text)
  567. {
  568. if(window.msWriteProfilerMark)
  569. {
  570. window.msWriteProfilerMark(text);
  571. OsfMsAjaxFactory.msAjaxDebug.trace(text)
  572. }
  573. },
  574. outputDebug: function OSF_OUtil$outputDebug(text)
  575. {
  576. if(typeof OsfMsAjaxFactory !=="undefined" && OsfMsAjaxFactory.msAjaxDebug && OsfMsAjaxFactory.msAjaxDebug.trace)
  577. OsfMsAjaxFactory.msAjaxDebug.trace(text)
  578. },
  579. defineNondefaultProperty: function OSF_OUtil$defineNondefaultProperty(obj, prop, descriptor, attributes)
  580. {
  581. descriptor=descriptor || {};
  582. for(var nd in attributes)
  583. {
  584. var attribute=attributes[nd];
  585. if(descriptor[attribute]==undefined)
  586. descriptor[attribute]=true
  587. }
  588. Object.defineProperty(obj,prop,descriptor);
  589. return obj
  590. },
  591. defineNondefaultProperties: function OSF_OUtil$defineNondefaultProperties(obj, descriptors, attributes)
  592. {
  593. descriptors=descriptors || {};
  594. for(var prop in descriptors)
  595. OSF.OUtil.defineNondefaultProperty(obj,prop,descriptors[prop],attributes);
  596. return obj
  597. },
  598. defineEnumerableProperty: function OSF_OUtil$defineEnumerableProperty(obj, prop, descriptor)
  599. {
  600. return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["enumerable"])
  601. },
  602. defineEnumerableProperties: function OSF_OUtil$defineEnumerableProperties(obj, descriptors)
  603. {
  604. return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["enumerable"])
  605. },
  606. defineMutableProperty: function OSF_OUtil$defineMutableProperty(obj, prop, descriptor)
  607. {
  608. return OSF.OUtil.defineNondefaultProperty(obj,prop,descriptor,["writable","enumerable","configurable"])
  609. },
  610. defineMutableProperties: function OSF_OUtil$defineMutableProperties(obj, descriptors)
  611. {
  612. return OSF.OUtil.defineNondefaultProperties(obj,descriptors,["writable","enumerable","configurable"])
  613. },
  614. finalizeProperties: function OSF_OUtil$finalizeProperties(obj, descriptor)
  615. {
  616. descriptor=descriptor || {};
  617. var props=Object.getOwnPropertyNames(obj);
  618. var propsLength=props.length;
  619. for(var i=0; i < propsLength; i++)
  620. {
  621. var prop=props[i];
  622. var desc=Object.getOwnPropertyDescriptor(obj,prop);
  623. if(!desc.get && !desc.set)
  624. desc.writable=descriptor.writable || false;
  625. desc.configurable=descriptor.configurable || false;
  626. desc.enumerable=descriptor.enumerable || true;
  627. Object.defineProperty(obj,prop,desc)
  628. }
  629. return obj
  630. },
  631. mapList: function OSF_OUtil$MapList(list, mapFunction)
  632. {
  633. var ret=[];
  634. if(list)
  635. for(var item in list)
  636. ret.push(mapFunction(list[item]));
  637. return ret
  638. },
  639. listContainsKey: function OSF_OUtil$listContainsKey(list, key)
  640. {
  641. for(var item in list)
  642. if(key==item)
  643. return true;
  644. return false
  645. },
  646. listContainsValue: function OSF_OUtil$listContainsElement(list, value)
  647. {
  648. for(var item in list)
  649. if(value==list[item])
  650. return true;
  651. return false
  652. },
  653. augmentList: function OSF_OUtil$augmentList(list, addenda)
  654. {
  655. var add=list.push ? function(key, value)
  656. {
  657. list.push(value)
  658. } : function(key, value)
  659. {
  660. list[key]=value
  661. };
  662. for(var key in addenda)
  663. add(key,addenda[key])
  664. },
  665. redefineList: function OSF_Outil$redefineList(oldList, newList)
  666. {
  667. for(var key1 in oldList)
  668. delete oldList[key1];
  669. for(var key2 in newList)
  670. oldList[key2]=newList[key2]
  671. },
  672. isArray: function OSF_OUtil$isArray(obj)
  673. {
  674. return Object.prototype.toString.apply(obj)==="[object Array]"
  675. },
  676. isFunction: function OSF_OUtil$isFunction(obj)
  677. {
  678. return Object.prototype.toString.apply(obj)==="[object Function]"
  679. },
  680. isDate: function OSF_OUtil$isDate(obj)
  681. {
  682. return Object.prototype.toString.apply(obj)==="[object Date]"
  683. },
  684. addEventListener: function OSF_OUtil$addEventListener(element, eventName, listener)
  685. {
  686. if(element.addEventListener)
  687. element.addEventListener(eventName,listener,false);
  688. else if(Sys.Browser.agent===Sys.Browser.InternetExplorer && element.attachEvent)
  689. element.attachEvent("on"+eventName,listener);
  690. else
  691. element["on"+eventName]=listener
  692. },
  693. removeEventListener: function OSF_OUtil$removeEventListener(element, eventName, listener)
  694. {
  695. if(element.removeEventListener)
  696. element.removeEventListener(eventName,listener,false);
  697. else if(Sys.Browser.agent===Sys.Browser.InternetExplorer && element.detachEvent)
  698. element.detachEvent("on"+eventName,listener);
  699. else
  700. element["on"+eventName]=null
  701. },
  702. getCookieValue: function OSF_OUtil$getCookieValue(cookieName)
  703. {
  704. var tmpCookieString=RegExp(cookieName+"[^;]+").exec(document.cookie);
  705. return tmpCookieString.toString().replace(/^[^=]+./,"")
  706. },
  707. xhrGet: function OSF_OUtil$xhrGet(url, onSuccess, onError)
  708. {
  709. var xmlhttp;
  710. try
  711. {
  712. xmlhttp=new XMLHttpRequest;
  713. xmlhttp.onreadystatechange=function()
  714. {
  715. if(xmlhttp.readyState==4)
  716. if(xmlhttp.status==200)
  717. onSuccess(xmlhttp.responseText);
  718. else
  719. onError(xmlhttp.status)
  720. };
  721. xmlhttp.open("GET",url,true);
  722. xmlhttp.send()
  723. }
  724. catch(ex)
  725. {
  726. onError(ex)
  727. }
  728. },
  729. xhrGetFull: function OSF_OUtil$xhrGetFull(url, oneDriveFileName, onSuccess, onError)
  730. {
  731. var xmlhttp;
  732. var requestedFileName=oneDriveFileName;
  733. try
  734. {
  735. xmlhttp=new XMLHttpRequest;
  736. xmlhttp.onreadystatechange=function()
  737. {
  738. if(xmlhttp.readyState==4)
  739. if(xmlhttp.status==200)
  740. onSuccess(xmlhttp,requestedFileName);
  741. else
  742. onError(xmlhttp.status)
  743. };
  744. xmlhttp.open("GET",url,true);
  745. xmlhttp.send()
  746. }
  747. catch(ex)
  748. {
  749. onError(ex)
  750. }
  751. },
  752. encodeBase64: function OSF_Outil$encodeBase64(input)
  753. {
  754. if(!input)
  755. return input;
  756. var codex="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/=";
  757. var output=[];
  758. var temp=[];
  759. var index=0;
  760. var c1,
  761. c2,
  762. c3,
  763. a,
  764. b,
  765. c;
  766. var i;
  767. var length=input.length;
  768. do
  769. {
  770. c1=input.charCodeAt(index++);
  771. c2=input.charCodeAt(index++);
  772. c3=input.charCodeAt(index++);
  773. i=0;
  774. a=c1 & 255;
  775. b=c1 >> 8;
  776. c=c2 & 255;
  777. temp[i++]=a >> 2;
  778. temp[i++]=(a & 3) << 4 | b >> 4;
  779. temp[i++]=(b & 15) << 2 | c >> 6;
  780. temp[i++]=c & 63;
  781. if(!isNaN(c2))
  782. {
  783. a=c2 >> 8;
  784. b=c3 & 255;
  785. c=c3 >> 8;
  786. temp[i++]=a >> 2;
  787. temp[i++]=(a & 3) << 4 | b >> 4;
  788. temp[i++]=(b & 15) << 2 | c >> 6;
  789. temp[i++]=c & 63
  790. }
  791. if(isNaN(c2))
  792. temp[i - 1]=64;
  793. else if(isNaN(c3))
  794. {
  795. temp[i - 2]=64;
  796. temp[i - 1]=64
  797. }
  798. for(var t=0; t < i; t++)
  799. output.push(codex.charAt(temp[t]))
  800. } while(index < length);
  801. return output.join("")
  802. },
  803. getSessionStorage: function OSF_Outil$getSessionStorage()
  804. {
  805. return _getSessionStorage()
  806. },
  807. getLocalStorage: function OSF_Outil$getLocalStorage()
  808. {
  809. if(!_safeLocalStorage)
  810. {
  811. try
  812. {
  813. var localStorage=window.localStorage
  814. }
  815. catch(ex)
  816. {
  817. localStorage=null
  818. }
  819. _safeLocalStorage=new OfficeExt.SafeStorage(localStorage)
  820. }
  821. return _safeLocalStorage
  822. },
  823. convertIntToCssHexColor: function OSF_Outil$convertIntToCssHexColor(val)
  824. {
  825. var hex="#"+(Number(val)+16777216).toString(16).slice(-6);
  826. return hex
  827. },
  828. attachClickHandler: function OSF_Outil$attachClickHandler(element, handler)
  829. {
  830. element.onclick=function(e)
  831. {
  832. handler()
  833. };
  834. element.ontouchend=function(e)
  835. {
  836. handler();
  837. e.preventDefault()
  838. }
  839. },
  840. getQueryStringParamValue: function OSF_Outil$getQueryStringParamValue(queryString, paramName)
  841. {
  842. var e=Function._validateParams(arguments,[{
  843. name: "queryString",
  844. type: String,
  845. mayBeNull: false
  846. },{
  847. name: "paramName",
  848. type: String,
  849. mayBeNull: false
  850. }]);
  851. if(e)
  852. {
  853. OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null.");
  854. return""
  855. }
  856. var queryExp=new RegExp("[\\?&]"+paramName+"=([^&#]*)","i");
  857. if(!queryExp.test(queryString))
  858. {
  859. OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found.");
  860. return""
  861. }
  862. return queryExp.exec(queryString)[1]
  863. },
  864. isiOS: function OSF_Outil$isiOS()
  865. {
  866. return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false
  867. },
  868. isChrome: function OSF_Outil$isChrome()
  869. {
  870. return window.navigator.userAgent.indexOf("Chrome") > 0 && !OSF.OUtil.isEdge()
  871. },
  872. isEdge: function OSF_Outil$isEdge()
  873. {
  874. return window.navigator.userAgent.indexOf("Edge") > 0
  875. },
  876. isIE: function OSF_Outil$isIE()
  877. {
  878. return window.navigator.userAgent.indexOf("Trident") > 0
  879. },
  880. isFirefox: function OSF_Outil$isFirefox()
  881. {
  882. return window.navigator.userAgent.indexOf("Firefox") > 0
  883. },
  884. shallowCopy: function OSF_Outil$shallowCopy(sourceObj)
  885. {
  886. var copyObj=sourceObj.constructor();
  887. for(var property in sourceObj)
  888. if(sourceObj.hasOwnProperty(property))
  889. copyObj[property]=sourceObj[property];
  890. return copyObj
  891. },
  892. createObject: function OSF_Outil$createObject(properties)
  893. {
  894. var obj=null;
  895. if(properties)
  896. {
  897. obj={};
  898. var len=properties.length;
  899. for(var i=0; i < len; i++)
  900. obj[properties[i].name]=properties[i].value
  901. }
  902. return obj
  903. },
  904. addClass: function OSF_OUtil$addClass(elmt, val)
  905. {
  906. if(!OSF.OUtil.hasClass(elmt,val))
  907. {
  908. var className=elmt.getAttribute(_classN);
  909. if(className)
  910. elmt.setAttribute(_classN,className+" "+val);
  911. else
  912. elmt.setAttribute(_classN,val)
  913. }
  914. },
  915. hasClass: function OSF_OUtil$hasClass(elmt, clsName)
  916. {
  917. var className=elmt.getAttribute(_classN);
  918. return className && className.match(new RegExp("(\\s|^)"+clsName+"(\\s|$)"))
  919. },
  920. focusToFirstTabbable: function OSF_OUtil$focusToFirstTabbable(all, backward)
  921. {
  922. var next;
  923. var focused=false;
  924. var candidate;
  925. var setFlag=function(e)
  926. {
  927. focused=true
  928. };
  929. var findNextPos=function(allLen, currPos, backward)
  930. {
  931. if(currPos < 0 || currPos > allLen)
  932. return-1;
  933. else if(currPos===0 && backward)
  934. return-1;
  935. else if(currPos===allLen - 1 && !backward)
  936. return-1;
  937. if(backward)
  938. return currPos - 1;
  939. else
  940. return currPos+1
  941. };
  942. all=_reOrderTabbableElements(all);
  943. next=backward ? all.length - 1 : 0;
  944. if(all.length===0)
  945. return null;
  946. while(!focused && next >=0 && next < all.length)
  947. {
  948. candidate=all[next];
  949. window.focus();
  950. candidate.addEventListener("focus",setFlag);
  951. candidate.focus();
  952. candidate.removeEventListener("focus",setFlag);
  953. next=findNextPos(all.length,next,backward);
  954. if(!focused && candidate===document.activeElement)
  955. focused=true
  956. }
  957. if(focused)
  958. return candidate;
  959. else
  960. return null
  961. },
  962. focusToNextTabbable: function OSF_OUtil$focusToNextTabbable(all, curr, shift)
  963. {
  964. var currPos;
  965. var next;
  966. var focused=false;
  967. var candidate;
  968. var setFlag=function(e)
  969. {
  970. focused=true
  971. };
  972. var findCurrPos=function(all, curr)
  973. {
  974. var i=0;
  975. for(; i < all.length; i++)
  976. if(all[i]===curr)
  977. return i;
  978. return-1
  979. };
  980. var findNextPos=function(allLen, currPos, shift)
  981. {
  982. if(currPos < 0 || currPos > allLen)
  983. return-1;
  984. else if(currPos===0 && shift)
  985. return-1;
  986. else if(currPos===allLen - 1 && !shift)
  987. return-1;
  988. if(shift)
  989. return currPos - 1;
  990. else
  991. return currPos+1
  992. };
  993. all=_reOrderTabbableElements(all);
  994. currPos=findCurrPos(all,curr);
  995. next=findNextPos(all.length,currPos,shift);
  996. if(next < 0)
  997. return null;
  998. while(!focused && next >=0 && next < all.length)
  999. {
  1000. candidate=all[next];
  1001. candidate.addEventListener("focus",setFlag);
  1002. candidate.focus();
  1003. candidate.removeEventListener("focus",setFlag);
  1004. next=findNextPos(all.length,next,shift);
  1005. if(!focused && candidate===document.activeElement)
  1006. focused=true
  1007. }
  1008. if(focused)
  1009. return candidate;
  1010. else
  1011. return null
  1012. }
  1013. }
  1014. }();
  1015. OSF.OUtil.Guid=function()
  1016. {
  1017. var hexCode=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];
  1018. return{generateNewGuid: function OSF_Outil_Guid$generateNewGuid()
  1019. {
  1020. var result="";
  1021. var tick=(new Date).getTime();
  1022. var index=0;
  1023. for(; index < 32 && tick > 0; index++)
  1024. {
  1025. if(index==8 || index==12 || index==16 || index==20)
  1026. result+="-";
  1027. result+=hexCode[tick % 16];
  1028. tick=Math.floor(tick / 16)
  1029. }
  1030. for(; index < 32; index++)
  1031. {
  1032. if(index==8 || index==12 || index==16 || index==20)
  1033. result+="-";
  1034. result+=hexCode[Math.floor(Math.random() * 16)]
  1035. }
  1036. return result
  1037. }}
  1038. }();
  1039. window.OSF=OSF;
  1040. OSF.OUtil.setNamespace("OSF",window);
  1041. OSF.AppName={
  1042. Unsupported: 0,
  1043. Excel: 1,
  1044. Word: 2,
  1045. PowerPoint: 4,
  1046. Outlook: 8,
  1047. ExcelWebApp: 16,
  1048. WordWebApp: 32,
  1049. OutlookWebApp: 64,
  1050. Project: 128,
  1051. AccessWebApp: 256,
  1052. PowerpointWebApp: 512,
  1053. ExcelIOS: 1024,
  1054. Sway: 2048,
  1055. WordIOS: 4096,
  1056. PowerPointIOS: 8192,
  1057. Access: 16384,
  1058. Lync: 32768,
  1059. OutlookIOS: 65536,
  1060. OneNoteWebApp: 131072,
  1061. OneNote: 262144,
  1062. ExcelWinRT: 524288,
  1063. WordWinRT: 1048576,
  1064. PowerpointWinRT: 2097152,
  1065. OutlookAndroid: 4194304,
  1066. OneNoteWinRT: 8388608,
  1067. ExcelAndroid: 8388609,
  1068. VisioWebApp: 8388610
  1069. };
  1070. OSF.InternalPerfMarker={
  1071. DataCoercionBegin: "Agave.HostCall.CoerceDataStart",
  1072. DataCoercionEnd: "Agave.HostCall.CoerceDataEnd"
  1073. };
  1074. OSF.HostCallPerfMarker={
  1075. IssueCall: "Agave.HostCall.IssueCall",
  1076. ReceiveResponse: "Agave.HostCall.ReceiveResponse",
  1077. RuntimeExceptionRaised: "Agave.HostCall.RuntimeExecptionRaised"
  1078. };
  1079. OSF.AgaveHostAction={
  1080. Select: 0,
  1081. UnSelect: 1,
  1082. CancelDialog: 2,
  1083. InsertAgave: 3,
  1084. CtrlF6In: 4,
  1085. CtrlF6Exit: 5,
  1086. CtrlF6ExitShift: 6,
  1087. SelectWithError: 7,
  1088. NotifyHostError: 8,
  1089. RefreshAddinCommands: 9,
  1090. PageIsReady: 10,
  1091. TabIn: 11,
  1092. TabInShift: 12,
  1093. TabExit: 13,
  1094. TabExitShift: 14,
  1095. EscExit: 15,
  1096. F2Exit: 16,
  1097. ExitNoFocusable: 17,
  1098. ExitNoFocusableShift: 18
  1099. };
  1100. OSF.SharedConstants={NotificationConversationIdSuffix: "_ntf"};
  1101. OSF.DialogMessageType={
  1102. DialogMessageReceived: 0,
  1103. DialogParentMessageReceived: 1,
  1104. DialogClosed: 12006
  1105. };
  1106. OSF.OfficeAppContext=function OSF_OfficeAppContext(id, appName, appVersion, appUILocale, dataLocale, docUrl, clientMode, settings, reason, osfControlType, eToken, correlationId, appInstanceId, touchEnabled, commerceAllowed, appMinorVersion, requirementMatrix, hostCustomMessage, hostFullVersion, clientWindowHeight, clientWindowWidth, addinName, appDomains, dialogRequirementMatrix)
  1107. {
  1108. this._id=id;
  1109. this._appName=appName;
  1110. this._appVersion=appVersion;
  1111. this._appUILocale=appUILocale;
  1112. this._dataLocale=dataLocale;
  1113. this._docUrl=docUrl;
  1114. this._clientMode=clientMode;
  1115. this._settings=settings;
  1116. this._reason=reason;
  1117. this._osfControlType=osfControlType;
  1118. this._eToken=eToken;
  1119. this._correlationId=correlationId;
  1120. this._appInstanceId=appInstanceId;
  1121. this._touchEnabled=touchEnabled;
  1122. this._commerceAllowed=commerceAllowed;
  1123. this._appMinorVersion=appMinorVersion;
  1124. this._requirementMatrix=requirementMatrix;
  1125. this._hostCustomMessage=hostCustomMessage;
  1126. this._hostFullVersion=hostFullVersion;
  1127. this._isDialog=false;
  1128. this._clientWindowHeight=clientWindowHeight;
  1129. this._clientWindowWidth=clientWindowWidth;
  1130. this._addinName=addinName;
  1131. this._appDomains=appDomains;
  1132. this._dialogRequirementMatrix=dialogRequirementMatrix;
  1133. this.get_id=function get_id()
  1134. {
  1135. return this._id
  1136. };
  1137. this.get_appName=function get_appName()
  1138. {
  1139. return this._appName
  1140. };
  1141. this.get_appVersion=function get_appVersion()
  1142. {
  1143. return this._appVersion
  1144. };
  1145. this.get_appUILocale=function get_appUILocale()
  1146. {
  1147. return this._appUILocale
  1148. };
  1149. this.get_dataLocale=function get_dataLocale()
  1150. {
  1151. return this._dataLocale
  1152. };
  1153. this.get_docUrl=function get_docUrl()
  1154. {
  1155. return this._docUrl
  1156. };
  1157. this.get_clientMode=function get_clientMode()
  1158. {
  1159. return this._clientMode
  1160. };
  1161. this.get_bindings=function get_bindings()
  1162. {
  1163. return this._bindings
  1164. };
  1165. this.get_settings=function get_settings()
  1166. {
  1167. return this._settings
  1168. };
  1169. this.get_reason=function get_reason()
  1170. {
  1171. return this._reason
  1172. };
  1173. this.get_osfControlType=function get_osfControlType()
  1174. {
  1175. return this._osfControlType
  1176. };
  1177. this.get_eToken=function get_eToken()
  1178. {
  1179. return this._eToken
  1180. };
  1181. this.get_correlationId=function get_correlationId()
  1182. {
  1183. return this._correlationId
  1184. };
  1185. this.get_appInstanceId=function get_appInstanceId()
  1186. {
  1187. return this._appInstanceId
  1188. };
  1189. this.get_touchEnabled=function get_touchEnabled()
  1190. {
  1191. return this._touchEnabled
  1192. };
  1193. this.get_commerceAllowed=function get_commerceAllowed()
  1194. {
  1195. return this._commerceAllowed
  1196. };
  1197. this.get_appMinorVersion=function get_appMinorVersion()
  1198. {
  1199. return this._appMinorVersion
  1200. };
  1201. this.get_requirementMatrix=function get_requirementMatrix()
  1202. {
  1203. return this._requirementMatrix
  1204. };
  1205. this.get_dialogRequirementMatrix=function get_dialogRequirementMatrix()
  1206. {
  1207. return this._dialogRequirementMatrix
  1208. };
  1209. this.get_hostCustomMessage=function get_hostCustomMessage()
  1210. {
  1211. return this._hostCustomMessage
  1212. };
  1213. this.get_hostFullVersion=function get_hostFullVersion()
  1214. {
  1215. return this._hostFullVersion
  1216. };
  1217. this.get_isDialog=function get_isDialog()
  1218. {
  1219. return this._isDialog
  1220. };
  1221. this.get_clientWindowHeight=function get_clientWindowHeight()
  1222. {
  1223. return this._clientWindowHeight
  1224. };
  1225. this.get_clientWindowWidth=function get_clientWindowWidth()
  1226. {
  1227. return this._clientWindowWidth
  1228. };
  1229. this.get_addinName=function get_addinName()
  1230. {
  1231. return this._addinName
  1232. };
  1233. this.get_appDomains=function get_appDomains()
  1234. {
  1235. return this._appDomains
  1236. }
  1237. };
  1238. OSF.OsfControlType={
  1239. DocumentLevel: 0,
  1240. ContainerLevel: 1
  1241. };
  1242. OSF.ClientMode={
  1243. ReadOnly: 0,
  1244. ReadWrite: 1
  1245. };
  1246. OSF.OUtil.setNamespace("Microsoft",window);
  1247. OSF.OUtil.setNamespace("Office",Microsoft);
  1248. OSF.OUtil.setNamespace("Client",Microsoft.Office);
  1249. OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);
  1250. Microsoft.Office.WebExtension.InitializationReason={
  1251. Inserted: "inserted",
  1252. DocumentOpened: "documentOpened"
  1253. };
  1254. Microsoft.Office.WebExtension.ValueFormat={
  1255. Unformatted: "unformatted",
  1256. Formatted: "formatted"
  1257. };
  1258. Microsoft.Office.WebExtension.FilterType={All: "all"};
  1259. Microsoft.Office.WebExtension.Parameters={
  1260. BindingType: "bindingType",
  1261. CoercionType: "coercionType",
  1262. ValueFormat: "valueFormat",
  1263. FilterType: "filterType",
  1264. Columns: "columns",
  1265. SampleData: "sampleData",
  1266. GoToType: "goToType",
  1267. SelectionMode: "selectionMode",
  1268. Id: "id",
  1269. PromptText: "promptText",
  1270. ItemName: "itemName",
  1271. FailOnCollision: "failOnCollision",
  1272. StartRow: "startRow",
  1273. StartColumn: "startColumn",
  1274. RowCount: "rowCount",
  1275. ColumnCount: "columnCount",
  1276. Callback: "callback",
  1277. AsyncContext: "asyncContext",
  1278. Data: "data",
  1279. Rows: "rows",
  1280. OverwriteIfStale: "overwriteIfStale",
  1281. FileType: "fileType",
  1282. EventType: "eventType",
  1283. Handler: "handler",
  1284. SliceSize: "sliceSize",
  1285. SliceIndex: "sliceIndex",
  1286. ActiveView: "activeView",
  1287. Status: "status",
  1288. Xml: "xml",
  1289. Namespace: "namespace",
  1290. Prefix: "prefix",
  1291. XPath: "xPath",
  1292. Text: "text",
  1293. ImageLeft: "imageLeft",
  1294. ImageTop: "imageTop",
  1295. ImageWidth: "imageWidth",
  1296. ImageHeight: "imageHeight",
  1297. TaskId: "taskId",
  1298. FieldId: "fieldId",
  1299. FieldValue: "fieldValue",
  1300. ServerUrl: "serverUrl",
  1301. ListName: "listName",
  1302. ResourceId: "resourceId",
  1303. ViewType: "viewType",
  1304. ViewName: "viewName",
  1305. GetRawValue: "getRawValue",
  1306. CellFormat: "cellFormat",
  1307. TableOptions: "tableOptions",
  1308. TaskIndex: "taskIndex",
  1309. ResourceIndex: "resourceIndex",
  1310. CustomFieldId: "customFieldId",
  1311. Url: "url",
  1312. MessageHandler: "messageHandler",
  1313. Width: "width",
  1314. Height: "height",
  1315. RequireHTTPs: "requireHTTPS",
  1316. MessageToParent: "messageToParent",
  1317. DisplayInIframe: "displayInIframe",
  1318. MessageContent: "messageContent"
  1319. };
  1320. OSF.OUtil.setNamespace("DDA",OSF);
  1321. OSF.DDA.DocumentMode={
  1322. ReadOnly: 1,
  1323. ReadWrite: 0
  1324. };
  1325. OSF.DDA.PropertyDescriptors={AsyncResultStatus: "AsyncResultStatus"};
  1326. OSF.DDA.EventDescriptors={};
  1327. OSF.DDA.ListDescriptors={};
  1328. OSF.DDA.UI={};
  1329. OSF.DDA.getXdmEventName=function OSF_DDA$GetXdmEventName(id, eventType)
  1330. {
  1331. if(eventType==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged || eventType==Microsoft.Office.WebExtension.EventType.BindingDataChanged || eventType==Microsoft.Office.WebExtension.EventType.DataNodeDeleted || eventType==Microsoft.Office.WebExtension.EventType.DataNodeInserted || eventType==Microsoft.Office.WebExtension.EventType.DataNodeReplaced)
  1332. return id+"_"+eventType;
  1333. else
  1334. return eventType
  1335. };
  1336. OSF.DDA.MethodDispId={
  1337. dispidMethodMin: 64,
  1338. dispidGetSelectedDataMethod: 64,
  1339. dispidSetSelectedDataMethod: 65,
  1340. dispidAddBindingFromSelectionMethod: 66,
  1341. dispidAddBindingFromPromptMethod: 67,
  1342. dispidGetBindingMethod: 68,
  1343. dispidReleaseBindingMethod: 69,
  1344. dispidGetBindingDataMethod: 70,
  1345. dispidSetBindingDataMethod: 71,
  1346. dispidAddRowsMethod: 72,
  1347. dispidClearAllRowsMethod: 73,
  1348. dispidGetAllBindingsMethod: 74,
  1349. dispidLoadSettingsMethod: 75,
  1350. dispidSaveSettingsMethod: 76,
  1351. dispidGetDocumentCopyMethod: 77,
  1352. dispidAddBindingFromNamedItemMethod: 78,
  1353. dispidAddColumnsMethod: 79,
  1354. dispidGetDocumentCopyChunkMethod: 80,
  1355. dispidReleaseDocumentCopyMethod: 81,
  1356. dispidNavigateToMethod: 82,
  1357. dispidGetActiveViewMethod: 83,
  1358. dispidGetDocumentThemeMethod: 84,
  1359. dispidGetOfficeThemeMethod: 85,
  1360. dispidGetFilePropertiesMethod: 86,
  1361. dispidClearFormatsMethod: 87,
  1362. dispidSetTableOptionsMethod: 88,
  1363. dispidSetFormatsMethod: 89,
  1364. dispidExecuteRichApiRequestMethod: 93,
  1365. dispidAppCommandInvocationCompletedMethod: 94,
  1366. dispidCloseContainerMethod: 97,
  1367. dispidGetSelectedTaskMethod: 110,
  1368. dispidGetSelectedResourceMethod: 111,
  1369. dispidGetTaskMethod: 112,
  1370. dispidGetResourceFieldMethod: 113,
  1371. dispidGetWSSUrlMethod: 114,
  1372. dispidGetTaskFieldMethod: 115,
  1373. dispidGetProjectFieldMethod: 116,
  1374. dispidGetSelectedViewMethod: 117,
  1375. dispidGetTaskByIndexMethod: 118,
  1376. dispidGetResourceByIndexMethod: 119,
  1377. dispidSetTaskFieldMethod: 120,
  1378. dispidSetResourceFieldMethod: 121,
  1379. dispidGetMaxTaskIndexMethod: 122,
  1380. dispidGetMaxResourceIndexMethod: 123,
  1381. dispidCreateTaskMethod: 124,
  1382. dispidAddDataPartMethod: 128,
  1383. dispidGetDataPartByIdMethod: 129,
  1384. dispidGetDataPartsByNamespaceMethod: 130,
  1385. dispidGetDataPartXmlMethod: 131,
  1386. dispidGetDataPartNodesMethod: 132,
  1387. dispidDeleteDataPartMethod: 133,
  1388. dispidGetDataNodeValueMethod: 134,
  1389. dispidGetDataNodeXmlMethod: 135,
  1390. dispidGetDataNodesMethod: 136,
  1391. dispidSetDataNodeValueMethod: 137,
  1392. dispidSetDataNodeXmlMethod: 138,
  1393. dispidAddDataNamespaceMethod: 139,
  1394. dispidGetDataUriByPrefixMethod: 140,
  1395. dispidGetDataPrefixByUriMethod: 141,
  1396. dispidGetDataNodeTextMethod: 142,
  1397. dispidSetDataNodeTextMethod: 143,
  1398. dispidMessageParentMethod: 144,
  1399. dispidSendMessageMethod: 145,
  1400. dispidMethodMax: 145
  1401. };
  1402. OSF.DDA.EventDispId={
  1403. dispidEventMin: 0,
  1404. dispidInitializeEvent: 0,
  1405. dispidSettingsChangedEvent: 1,
  1406. dispidDocumentSelectionChangedEvent: 2,
  1407. dispidBindingSelectionChangedEvent: 3,
  1408. dispidBindingDataChangedEvent: 4,
  1409. dispidDocumentOpenEvent: 5,
  1410. dispidDocumentCloseEvent: 6,
  1411. dispidActiveViewChangedEvent: 7,
  1412. dispidDocumentThemeChangedEvent: 8,
  1413. dispidOfficeThemeChangedEvent: 9,
  1414. dispidDialogMessageReceivedEvent: 10,
  1415. dispidDialogNotificationShownInAddinEvent: 11,
  1416. dispidDialogParentMessageReceivedEvent: 12,
  1417. dispidActivationStatusChangedEvent: 32,
  1418. dispidAppCommandInvokedEvent: 39,
  1419. dispidOlkItemSelectedChangedEvent: 46,
  1420. dispidTaskSelectionChangedEvent: 56,
  1421. dispidResourceSelectionChangedEvent: 57,
  1422. dispidViewSelectionChangedEvent: 58,
  1423. dispidDataNodeAddedEvent: 60,
  1424. dispidDataNodeReplacedEvent: 61,
  1425. dispidDataNodeDeletedEvent: 62,
  1426. dispidEventMax: 63
  1427. };
  1428. OSF.DDA.ErrorCodeManager=function()
  1429. {
  1430. var _errorMappings={};
  1431. return{
  1432. getErrorArgs: function OSF_DDA_ErrorCodeManager$getErrorArgs(errorCode)
  1433. {
  1434. var errorArgs=_errorMappings[errorCode];
  1435. if(!errorArgs)
  1436. errorArgs=_errorMappings[this.errorCodes.ooeInternalError];
  1437. else
  1438. {
  1439. if(!errorArgs.name)
  1440. errorArgs.name=_errorMappings[this.errorCodes.ooeInternalError].name;
  1441. if(!errorArgs.message)
  1442. errorArgs.message=_errorMappings[this.errorCodes.ooeInternalError].message
  1443. }
  1444. return errorArgs
  1445. },
  1446. addErrorMessage: function OSF_DDA_ErrorCodeManager$addErrorMessage(errorCode, errorNameMessage)
  1447. {
  1448. _errorMappings[errorCode]=errorNameMessage
  1449. },
  1450. errorCodes: {
  1451. ooeSuccess: 0,
  1452. ooeChunkResult: 1,
  1453. ooeCoercionTypeNotSupported: 1e3,
  1454. ooeGetSelectionNotMatchDataType: 1001,
  1455. ooeCoercionTypeNotMatchBinding: 1002,
  1456. ooeInvalidGetRowColumnCounts: 1003,
  1457. ooeSelectionNotSupportCoercionType: 1004,
  1458. ooeInvalidGetStartRowColumn: 1005,
  1459. ooeNonUniformPartialGetNotSupported: 1006,
  1460. ooeGetDataIsTooLarge: 1008,
  1461. ooeFileTypeNotSupported: 1009,
  1462. ooeGetDataParametersConflict: 1010,
  1463. ooeInvalidGetColumns: 1011,
  1464. ooeInvalidGetRows: 1012,
  1465. ooeInvalidReadForBlankRow: 1013,
  1466. ooeUnsupportedDataObject: 2e3,
  1467. ooeCannotWriteToSelection: 2001,
  1468. ooeDataNotMatchSelection: 2002,
  1469. ooeOverwriteWorksheetData: 2003,
  1470. ooeDataNotMatchBindingSize: 2004,
  1471. ooeInvalidSetStartRowColumn: 2005,
  1472. ooeInvalidDataFormat: 2006,
  1473. ooeDataNotMatchCoercionType: 2007,
  1474. ooeDataNotMatchBindingType: 2008,
  1475. ooeSetDataIsTooLarge: 2009,
  1476. ooeNonUniformPartialSetNotSupported: 2010,
  1477. ooeInvalidSetColumns: 2011,
  1478. ooeInvalidSetRows: 2012,
  1479. ooeSetDataParametersConflict: 2013,
  1480. ooeCellDataAmountBeyondLimits: 2014,
  1481. ooeSelectionCannotBound: 3e3,
  1482. ooeBindingNotExist: 3002,
  1483. ooeBindingToMultipleSelection: 3003,
  1484. ooeInvalidSelectionForBindingType: 3004,
  1485. ooeOperationNotSupportedOnThisBindingType: 3005,
  1486. ooeNamedItemNotFound: 3006,
  1487. ooeMultipleNamedItemFound: 3007,
  1488. ooeInvalidNamedItemForBindingType: 3008,
  1489. ooeUnknownBindingType: 3009,
  1490. ooeOperationNotSupportedOnMatrixData: 3010,
  1491. ooeInvalidColumnsForBinding: 3011,
  1492. ooeSettingNameNotExist: 4e3,
  1493. ooeSettingsCannotSave: 4001,
  1494. ooeSettingsAreStale: 4002,
  1495. ooeOperationNotSupported: 5e3,
  1496. ooeInternalError: 5001,
  1497. ooeDocumentReadOnly: 5002,
  1498. ooeEventHandlerNotExist: 5003,
  1499. ooeInvalidApiCallInContext: 5004,
  1500. ooeShuttingDown: 5005,
  1501. ooeUnsupportedEnumeration: 5007,
  1502. ooeIndexOutOfRange: 5008,
  1503. ooeBrowserAPINotSupported: 5009,
  1504. ooeInvalidParam: 5010,
  1505. ooeRequestTimeout: 5011,
  1506. ooeTooManyIncompleteRequests: 5100,
  1507. ooeRequestTokenUnavailable: 5101,
  1508. ooeActivityLimitReached: 5102,
  1509. ooeCustomXmlNodeNotFound: 6e3,
  1510. ooeCustomXmlError: 6100,
  1511. ooeCustomXmlExceedQuota: 6101,
  1512. ooeCustomXmlOutOfDate: 6102,
  1513. ooeNoCapability: 7e3,
  1514. ooeCannotNavTo: 7001,
  1515. ooeSpecifiedIdNotExist: 7002,
  1516. ooeNavOutOfBound: 7004,
  1517. ooeElementMissing: 8e3,
  1518. ooeProtectedError: 8001,
  1519. ooeInvalidCellsValue: 8010,
  1520. ooeInvalidTableOptionValue: 8011,
  1521. ooeInvalidFormatValue: 8012,
  1522. ooeRowIndexOutOfRange: 8020,
  1523. ooeColIndexOutOfRange: 8021,
  1524. ooeFormatValueOutOfRange: 8022,
  1525. ooeCellFormatAmountBeyondLimits: 8023,
  1526. ooeMemoryFileLimit: 11e3,
  1527. ooeNetworkProblemRetrieveFile: 11001,
  1528. ooeInvalidSliceSize: 11002,
  1529. ooeInvalidCallback: 11101,
  1530. ooeInvalidWidth: 12e3,
  1531. ooeInvalidHeight: 12001,
  1532. ooeNavigationError: 12002,
  1533. ooeInvalidScheme: 12003,
  1534. ooeAppDomains: 12004,
  1535. ooeRequireHTTPS: 12005,
  1536. ooeWebDialogClosed: 12006,
  1537. ooeDialogAlreadyOpened: 12007,
  1538. ooeEndUserAllow: 12008,
  1539. ooeEndUserIgnore: 12009,
  1540. ooeNotUILessDialog: 12010,
  1541. ooeCrossZone: 12011
  1542. },
  1543. initializeErrorMessages: function OSF_DDA_ErrorCodeManager$initializeErrorMessages(stringNS)
  1544. {
  1545. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={
  1546. name: stringNS.L_InvalidCoercion,
  1547. message: stringNS.L_CoercionTypeNotSupported
  1548. };
  1549. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={
  1550. name: stringNS.L_DataReadError,
  1551. message: stringNS.L_GetSelectionNotSupported
  1552. };
  1553. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={
  1554. name: stringNS.L_InvalidCoercion,
  1555. message: stringNS.L_CoercionTypeNotMatchBinding
  1556. };
  1557. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={
  1558. name: stringNS.L_DataReadError,
  1559. message: stringNS.L_InvalidGetRowColumnCounts
  1560. };
  1561. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={
  1562. name: stringNS.L_DataReadError,
  1563. message: stringNS.L_SelectionNotSupportCoercionType
  1564. };
  1565. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={
  1566. name: stringNS.L_DataReadError,
  1567. message: stringNS.L_InvalidGetStartRowColumn
  1568. };
  1569. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={
  1570. name: stringNS.L_DataReadError,
  1571. message: stringNS.L_NonUniformPartialGetNotSupported
  1572. };
  1573. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={
  1574. name: stringNS.L_DataReadError,
  1575. message: stringNS.L_GetDataIsTooLarge
  1576. };
  1577. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={
  1578. name: stringNS.L_DataReadError,
  1579. message: stringNS.L_FileTypeNotSupported
  1580. };
  1581. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={
  1582. name: stringNS.L_DataReadError,
  1583. message: stringNS.L_GetDataParametersConflict
  1584. };
  1585. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={
  1586. name: stringNS.L_DataReadError,
  1587. message: stringNS.L_InvalidGetColumns
  1588. };
  1589. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={
  1590. name: stringNS.L_DataReadError,
  1591. message: stringNS.L_InvalidGetRows
  1592. };
  1593. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={
  1594. name: stringNS.L_DataReadError,
  1595. message: stringNS.L_InvalidReadForBlankRow
  1596. };
  1597. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={
  1598. name: stringNS.L_DataWriteError,
  1599. message: stringNS.L_UnsupportedDataObject
  1600. };
  1601. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={
  1602. name: stringNS.L_DataWriteError,
  1603. message: stringNS.L_CannotWriteToSelection
  1604. };
  1605. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={
  1606. name: stringNS.L_DataWriteError,
  1607. message: stringNS.L_DataNotMatchSelection
  1608. };
  1609. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={
  1610. name: stringNS.L_DataWriteError,
  1611. message: stringNS.L_OverwriteWorksheetData
  1612. };
  1613. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={
  1614. name: stringNS.L_DataWriteError,
  1615. message: stringNS.L_DataNotMatchBindingSize
  1616. };
  1617. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={
  1618. name: stringNS.L_DataWriteError,
  1619. message: stringNS.L_InvalidSetStartRowColumn
  1620. };
  1621. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={
  1622. name: stringNS.L_InvalidFormat,
  1623. message: stringNS.L_InvalidDataFormat
  1624. };
  1625. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={
  1626. name: stringNS.L_InvalidDataObject,
  1627. message: stringNS.L_DataNotMatchCoercionType
  1628. };
  1629. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={
  1630. name: stringNS.L_InvalidDataObject,
  1631. message: stringNS.L_DataNotMatchBindingType
  1632. };
  1633. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={
  1634. name: stringNS.L_DataWriteError,
  1635. message: stringNS.L_SetDataIsTooLarge
  1636. };
  1637. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={
  1638. name: stringNS.L_DataWriteError,
  1639. message: stringNS.L_NonUniformPartialSetNotSupported
  1640. };
  1641. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={
  1642. name: stringNS.L_DataWriteError,
  1643. message: stringNS.L_InvalidSetColumns
  1644. };
  1645. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={
  1646. name: stringNS.L_DataWriteError,
  1647. message: stringNS.L_InvalidSetRows
  1648. };
  1649. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={
  1650. name: stringNS.L_DataWriteError,
  1651. message: stringNS.L_SetDataParametersConflict
  1652. };
  1653. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={
  1654. name: stringNS.L_BindingCreationError,
  1655. message: stringNS.L_SelectionCannotBound
  1656. };
  1657. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={
  1658. name: stringNS.L_InvalidBindingError,
  1659. message: stringNS.L_BindingNotExist
  1660. };
  1661. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={
  1662. name: stringNS.L_BindingCreationError,
  1663. message: stringNS.L_BindingToMultipleSelection
  1664. };
  1665. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={
  1666. name: stringNS.L_BindingCreationError,
  1667. message: stringNS.L_InvalidSelectionForBindingType
  1668. };
  1669. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={
  1670. name: stringNS.L_InvalidBindingOperation,
  1671. message: stringNS.L_OperationNotSupportedOnThisBindingType
  1672. };
  1673. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={
  1674. name: stringNS.L_BindingCreationError,
  1675. message: stringNS.L_NamedItemNotFound
  1676. };
  1677. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={
  1678. name: stringNS.L_BindingCreationError,
  1679. message: stringNS.L_MultipleNamedItemFound
  1680. };
  1681. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={
  1682. name: stringNS.L_BindingCreationError,
  1683. message: stringNS.L_InvalidNamedItemForBindingType
  1684. };
  1685. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={
  1686. name: stringNS.L_InvalidBinding,
  1687. message: stringNS.L_UnknownBindingType
  1688. };
  1689. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={
  1690. name: stringNS.L_InvalidBindingOperation,
  1691. message: stringNS.L_OperationNotSupportedOnMatrixData
  1692. };
  1693. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={
  1694. name: stringNS.L_InvalidBinding,
  1695. message: stringNS.L_InvalidColumnsForBinding
  1696. };
  1697. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={
  1698. name: stringNS.L_ReadSettingsError,
  1699. message: stringNS.L_SettingNameNotExist
  1700. };
  1701. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={
  1702. name: stringNS.L_SaveSettingsError,
  1703. message: stringNS.L_SettingsCannotSave
  1704. };
  1705. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={
  1706. name: stringNS.L_SettingsStaleError,
  1707. message: stringNS.L_SettingsAreStale
  1708. };
  1709. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={
  1710. name: stringNS.L_HostError,
  1711. message: stringNS.L_OperationNotSupported
  1712. };
  1713. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={
  1714. name: stringNS.L_InternalError,
  1715. message: stringNS.L_InternalErrorDescription
  1716. };
  1717. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={
  1718. name: stringNS.L_PermissionDenied,
  1719. message: stringNS.L_DocumentReadOnly
  1720. };
  1721. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={
  1722. name: stringNS.L_EventRegistrationError,
  1723. message: stringNS.L_EventHandlerNotExist
  1724. };
  1725. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={
  1726. name: stringNS.L_InvalidAPICall,
  1727. message: stringNS.L_InvalidApiCallInContext
  1728. };
  1729. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={
  1730. name: stringNS.L_ShuttingDown,
  1731. message: stringNS.L_ShuttingDown
  1732. };
  1733. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={
  1734. name: stringNS.L_UnsupportedEnumeration,
  1735. message: stringNS.L_UnsupportedEnumerationMessage
  1736. };
  1737. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={
  1738. name: stringNS.L_IndexOutOfRange,
  1739. message: stringNS.L_IndexOutOfRange
  1740. };
  1741. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={
  1742. name: stringNS.L_APINotSupported,
  1743. message: stringNS.L_BrowserAPINotSupported
  1744. };
  1745. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={
  1746. name: stringNS.L_APICallFailed,
  1747. message: stringNS.L_RequestTimeout
  1748. };
  1749. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={
  1750. name: stringNS.L_APICallFailed,
  1751. message: stringNS.L_TooManyIncompleteRequests
  1752. };
  1753. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={
  1754. name: stringNS.L_APICallFailed,
  1755. message: stringNS.L_RequestTokenUnavailable
  1756. };
  1757. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={
  1758. name: stringNS.L_APICallFailed,
  1759. message: stringNS.L_ActivityLimitReached
  1760. };
  1761. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={
  1762. name: stringNS.L_InvalidNode,
  1763. message: stringNS.L_CustomXmlNodeNotFound
  1764. };
  1765. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={
  1766. name: stringNS.L_CustomXmlError,
  1767. message: stringNS.L_CustomXmlError
  1768. };
  1769. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={
  1770. name: stringNS.L_CustomXmlExceedQuotaName,
  1771. message: stringNS.L_CustomXmlExceedQuotaMessage
  1772. };
  1773. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={
  1774. name: stringNS.L_CustomXmlOutOfDateName,
  1775. message: stringNS.L_CustomXmlOutOfDateMessage
  1776. };
  1777. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={
  1778. name: stringNS.L_PermissionDenied,
  1779. message: stringNS.L_NoCapability
  1780. };
  1781. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={
  1782. name: stringNS.L_CannotNavigateTo,
  1783. message: stringNS.L_CannotNavigateTo
  1784. };
  1785. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={
  1786. name: stringNS.L_SpecifiedIdNotExist,
  1787. message: stringNS.L_SpecifiedIdNotExist
  1788. };
  1789. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={
  1790. name: stringNS.L_NavOutOfBound,
  1791. message: stringNS.L_NavOutOfBound
  1792. };
  1793. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={
  1794. name: stringNS.L_DataWriteReminder,
  1795. message: stringNS.L_CellDataAmountBeyondLimits
  1796. };
  1797. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={
  1798. name: stringNS.L_MissingParameter,
  1799. message: stringNS.L_ElementMissing
  1800. };
  1801. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={
  1802. name: stringNS.L_PermissionDenied,
  1803. message: stringNS.L_NoCapability
  1804. };
  1805. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={
  1806. name: stringNS.L_InvalidValue,
  1807. message: stringNS.L_InvalidCellsValue
  1808. };
  1809. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={
  1810. name: stringNS.L_InvalidValue,
  1811. message: stringNS.L_InvalidTableOptionValue
  1812. };
  1813. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={
  1814. name: stringNS.L_InvalidValue,
  1815. message: stringNS.L_InvalidFormatValue
  1816. };
  1817. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={
  1818. name: stringNS.L_OutOfRange,
  1819. message: stringNS.L_RowIndexOutOfRange
  1820. };
  1821. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={
  1822. name: stringNS.L_OutOfRange,
  1823. message: stringNS.L_ColIndexOutOfRange
  1824. };
  1825. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={
  1826. name: stringNS.L_OutOfRange,
  1827. message: stringNS.L_FormatValueOutOfRange
  1828. };
  1829. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={
  1830. name: stringNS.L_FormattingReminder,
  1831. message: stringNS.L_CellFormatAmountBeyondLimits
  1832. };
  1833. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={
  1834. name: stringNS.L_MemoryLimit,
  1835. message: stringNS.L_CloseFileBeforeRetrieve
  1836. };
  1837. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={
  1838. name: stringNS.L_NetworkProblem,
  1839. message: stringNS.L_NetworkProblemRetrieveFile
  1840. };
  1841. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={
  1842. name: stringNS.L_InvalidValue,
  1843. message: stringNS.L_SliceSizeNotSupported
  1844. };
  1845. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={
  1846. name: stringNS.L_DisplayDialogError,
  1847. message: stringNS.L_DialogAlreadyOpened
  1848. };
  1849. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={
  1850. name: stringNS.L_IndexOutOfRange,
  1851. message: stringNS.L_IndexOutOfRange
  1852. };
  1853. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={
  1854. name: stringNS.L_IndexOutOfRange,
  1855. message: stringNS.L_IndexOutOfRange
  1856. };
  1857. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={
  1858. name: stringNS.L_DisplayDialogError,
  1859. message: stringNS.L_NetworkProblem
  1860. };
  1861. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={
  1862. name: stringNS.L_DialogNavigateError,
  1863. message: stringNS.L_DialogAddressNotTrusted
  1864. };
  1865. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={
  1866. name: stringNS.L_DisplayDialogError,
  1867. message: stringNS.L_DialogAddressNotTrusted
  1868. };
  1869. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={
  1870. name: stringNS.L_DisplayDialogError,
  1871. message: stringNS.L_DialogAddressNotTrusted
  1872. };
  1873. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={
  1874. name: stringNS.L_DisplayDialogError,
  1875. message: stringNS.L_UserClickIgnore
  1876. };
  1877. _errorMappings[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={
  1878. name: stringNS.L_DisplayDialogError,
  1879. message: stringNS.L_NewWindowCrossZoneErrorString
  1880. }
  1881. }
  1882. }
  1883. }();
  1884. var OfficeExt;
  1885. (function(OfficeExt)
  1886. {
  1887. var Requirement;
  1888. (function(Requirement)
  1889. {
  1890. var RequirementMatrix=function()
  1891. {
  1892. function RequirementMatrix(_setMap)
  1893. {
  1894. this.isSetSupported=function _isSetSupported(name, minVersion)
  1895. {
  1896. if(name==undefined)
  1897. return false;
  1898. if(minVersion==undefined)
  1899. minVersion=0;
  1900. var setSupportArray=this._setMap;
  1901. var sets=setSupportArray._sets;
  1902. if(sets.hasOwnProperty(name.toLowerCase()))
  1903. {
  1904. var setMaxVersion=sets[name.toLowerCase()];
  1905. return setMaxVersion > 0 && setMaxVersion >=minVersion
  1906. }
  1907. else
  1908. return false
  1909. };
  1910. this._setMap=_setMap;
  1911. this.isSetSupported=this.isSetSupported.bind(this)
  1912. }
  1913. return RequirementMatrix
  1914. }();
  1915. Requirement.RequirementMatrix=RequirementMatrix;
  1916. var DefaultSetRequirement=function()
  1917. {
  1918. function DefaultSetRequirement(setMap)
  1919. {
  1920. this._addSetMap=function DefaultSetRequirement_addSetMap(addedSet)
  1921. {
  1922. for(var name in addedSet)
  1923. this._sets[name]=addedSet[name]
  1924. };
  1925. this._sets=setMap
  1926. }
  1927. return DefaultSetRequirement
  1928. }();
  1929. Requirement.DefaultSetRequirement=DefaultSetRequirement;
  1930. var DefaultDialogSetRequirement=function(_super)
  1931. {
  1932. __extends(DefaultDialogSetRequirement,_super);
  1933. function DefaultDialogSetRequirement()
  1934. {
  1935. _super.call(this,{dialogapi: 1.1})
  1936. }
  1937. return DefaultDialogSetRequirement
  1938. }(DefaultSetRequirement);
  1939. Requirement.DefaultDialogSetRequirement=DefaultDialogSetRequirement;
  1940. var ExcelClientDefaultSetRequirement=function(_super)
  1941. {
  1942. __extends(ExcelClientDefaultSetRequirement,_super);
  1943. function ExcelClientDefaultSetRequirement()
  1944. {
  1945. _super.call(this,{
  1946. bindingevents: 1.1,
  1947. documentevents: 1.1,
  1948. excelapi: 1.1,
  1949. matrixbindings: 1.1,
  1950. matrixcoercion: 1.1,
  1951. selection: 1.1,
  1952. settings: 1.1,
  1953. tablebindings: 1.1,
  1954. tablecoercion: 1.1,
  1955. textbindings: 1.1,
  1956. textcoercion: 1.1
  1957. })
  1958. }
  1959. return ExcelClientDefaultSetRequirement
  1960. }(DefaultSetRequirement);
  1961. Requirement.ExcelClientDefaultSetRequirement=ExcelClientDefaultSetRequirement;
  1962. var ExcelClientV1DefaultSetRequirement=function(_super)
  1963. {
  1964. __extends(ExcelClientV1DefaultSetRequirement,_super);
  1965. function ExcelClientV1DefaultSetRequirement()
  1966. {
  1967. _super.call(this);
  1968. this._addSetMap({imagecoercion: 1.1})
  1969. }
  1970. return ExcelClientV1DefaultSetRequirement
  1971. }(ExcelClientDefaultSetRequirement);
  1972. Requirement.ExcelClientV1DefaultSetRequirement=ExcelClientV1DefaultSetRequirement;
  1973. var OutlookClientDefaultSetRequirement=function(_super)
  1974. {
  1975. __extends(OutlookClientDefaultSetRequirement,_super);
  1976. function OutlookClientDefaultSetRequirement()
  1977. {
  1978. _super.call(this,{mailbox: 1.3})
  1979. }
  1980. return OutlookClientDefaultSetRequirement
  1981. }(DefaultSetRequirement);
  1982. Requirement.OutlookClientDefaultSetRequirement=OutlookClientDefaultSetRequirement;
  1983. var WordClientDefaultSetRequirement=function(_super)
  1984. {
  1985. __extends(WordClientDefaultSetRequirement,_super);
  1986. function WordClientDefaultSetRequirement()
  1987. {
  1988. _super.call(this,{
  1989. bindingevents: 1.1,
  1990. compressedfile: 1.1,
  1991. customxmlparts: 1.1,
  1992. documentevents: 1.1,
  1993. file: 1.1,
  1994. htmlcoercion: 1.1,
  1995. matrixbindings: 1.1,
  1996. matrixcoercion: 1.1,
  1997. ooxmlcoercion: 1.1,
  1998. pdffile: 1.1,
  1999. selection: 1.1,
  2000. settings: 1.1,
  2001. tablebindings: 1.1,
  2002. tablecoercion: 1.1,
  2003. textbindings: 1.1,
  2004. textcoercion: 1.1,
  2005. textfile: 1.1,
  2006. wordapi: 1.1
  2007. })
  2008. }
  2009. return WordClientDefaultSetRequirement
  2010. }(DefaultSetRequirement);
  2011. Requirement.WordClientDefaultSetRequirement=WordClientDefaultSetRequirement;
  2012. var WordClientV1DefaultSetRequirement=function(_super)
  2013. {
  2014. __extends(WordClientV1DefaultSetRequirement,_super);
  2015. function WordClientV1DefaultSetRequirement()
  2016. {
  2017. _super.call(this);
  2018. this._addSetMap({
  2019. customxmlparts: 1.2,
  2020. wordapi: 1.2,
  2021. imagecoercion: 1.1
  2022. })
  2023. }
  2024. return WordClientV1DefaultSetRequirement
  2025. }(WordClientDefaultSetRequirement);
  2026. Requirement.WordClientV1DefaultSetRequirement=WordClientV1DefaultSetRequirement;
  2027. var PowerpointClientDefaultSetRequirement=function(_super)
  2028. {
  2029. __extends(PowerpointClientDefaultSetRequirement,_super);
  2030. function PowerpointClientDefaultSetRequirement()
  2031. {
  2032. _super.call(this,{
  2033. activeview: 1.1,
  2034. compressedfile: 1.1,
  2035. documentevents: 1.1,
  2036. file: 1.1,
  2037. pdffile: 1.1,
  2038. selection: 1.1,
  2039. settings: 1.1,
  2040. textcoercion: 1.1
  2041. })
  2042. }
  2043. return PowerpointClientDefaultSetRequirement
  2044. }(DefaultSetRequirement);
  2045. Requirement.PowerpointClientDefaultSetRequirement=PowerpointClientDefaultSetRequirement;
  2046. var PowerpointClientV1DefaultSetRequirement=function(_super)
  2047. {
  2048. __extends(PowerpointClientV1DefaultSetRequirement,_super);
  2049. function PowerpointClientV1DefaultSetRequirement()
  2050. {
  2051. _super.call(this);
  2052. this._addSetMap({imagecoercion: 1.1})
  2053. }
  2054. return PowerpointClientV1DefaultSetRequirement
  2055. }(PowerpointClientDefaultSetRequirement);
  2056. Requirement.PowerpointClientV1DefaultSetRequirement=PowerpointClientV1DefaultSetRequirement;
  2057. var ProjectClientDefaultSetRequirement=function(_super)
  2058. {
  2059. __extends(ProjectClientDefaultSetRequirement,_super);
  2060. function ProjectClientDefaultSetRequirement()
  2061. {
  2062. _super.call(this,{
  2063. selection: 1.1,
  2064. textcoercion: 1.1
  2065. })
  2066. }
  2067. return ProjectClientDefaultSetRequirement
  2068. }(DefaultSetRequirement);
  2069. Requirement.ProjectClientDefaultSetRequirement=ProjectClientDefaultSetRequirement;
  2070. var ExcelWebDefaultSetRequirement=function(_super)
  2071. {
  2072. __extends(ExcelWebDefaultSetRequirement,_super);
  2073. function ExcelWebDefaultSetRequirement()
  2074. {
  2075. _super.call(this,{
  2076. bindingevents: 1.1,
  2077. documentevents: 1.1,
  2078. matrixbindings: 1.1,
  2079. matrixcoercion: 1.1,
  2080. selection: 1.1,
  2081. settings: 1.1,
  2082. tablebindings: 1.1,
  2083. tablecoercion: 1.1,
  2084. textbindings: 1.1,
  2085. textcoercion: 1.1,
  2086. file: 1.1
  2087. })
  2088. }
  2089. return ExcelWebDefaultSetRequirement
  2090. }(DefaultSetRequirement);
  2091. Requirement.ExcelWebDefaultSetRequirement=ExcelWebDefaultSetRequirement;
  2092. var WordWebDefaultSetRequirement=function(_super)
  2093. {
  2094. __extends(WordWebDefaultSetRequirement,_super);
  2095. function WordWebDefaultSetRequirement()
  2096. {
  2097. _super.call(this,{
  2098. compressedfile: 1.1,
  2099. documentevents: 1.1,
  2100. file: 1.1,
  2101. imagecoercion: 1.1,
  2102. matrixcoercion: 1.1,
  2103. ooxmlcoercion: 1.1,
  2104. pdffile: 1.1,
  2105. selection: 1.1,
  2106. settings: 1.1,
  2107. tablecoercion: 1.1,
  2108. textcoercion: 1.1,
  2109. textfile: 1.1
  2110. })
  2111. }
  2112. return WordWebDefaultSetRequirement
  2113. }(DefaultSetRequirement);
  2114. Requirement.WordWebDefaultSetRequirement=WordWebDefaultSetRequirement;
  2115. var PowerpointWebDefaultSetRequirement=function(_super)
  2116. {
  2117. __extends(PowerpointWebDefaultSetRequirement,_super);
  2118. function PowerpointWebDefaultSetRequirement()
  2119. {
  2120. _super.call(this,{
  2121. activeview: 1.1,
  2122. settings: 1.1
  2123. })
  2124. }
  2125. return PowerpointWebDefaultSetRequirement
  2126. }(DefaultSetRequirement);
  2127. Requirement.PowerpointWebDefaultSetRequirement=PowerpointWebDefaultSetRequirement;
  2128. var OutlookWebDefaultSetRequirement=function(_super)
  2129. {
  2130. __extends(OutlookWebDefaultSetRequirement,_super);
  2131. function OutlookWebDefaultSetRequirement()
  2132. {
  2133. _super.call(this,{mailbox: 1.3})
  2134. }
  2135. return OutlookWebDefaultSetRequirement
  2136. }(DefaultSetRequirement);
  2137. Requirement.OutlookWebDefaultSetRequirement=OutlookWebDefaultSetRequirement;
  2138. var SwayWebDefaultSetRequirement=function(_super)
  2139. {
  2140. __extends(SwayWebDefaultSetRequirement,_super);
  2141. function SwayWebDefaultSetRequirement()
  2142. {
  2143. _super.call(this,{
  2144. activeview: 1.1,
  2145. documentevents: 1.1,
  2146. selection: 1.1,
  2147. settings: 1.1,
  2148. textcoercion: 1.1
  2149. })
  2150. }
  2151. return SwayWebDefaultSetRequirement
  2152. }(DefaultSetRequirement);
  2153. Requirement.SwayWebDefaultSetRequirement=SwayWebDefaultSetRequirement;
  2154. var AccessWebDefaultSetRequirement=function(_super)
  2155. {
  2156. __extends(AccessWebDefaultSetRequirement,_super);
  2157. function AccessWebDefaultSetRequirement()
  2158. {
  2159. _super.call(this,{
  2160. bindingevents: 1.1,
  2161. partialtablebindings: 1.1,
  2162. settings: 1.1,
  2163. tablebindings: 1.1,
  2164. tablecoercion: 1.1
  2165. })
  2166. }
  2167. return AccessWebDefaultSetRequirement
  2168. }(DefaultSetRequirement);
  2169. Requirement.AccessWebDefaultSetRequirement=AccessWebDefaultSetRequirement;
  2170. var ExcelIOSDefaultSetRequirement=function(_super)
  2171. {
  2172. __extends(ExcelIOSDefaultSetRequirement,_super);
  2173. function ExcelIOSDefaultSetRequirement()
  2174. {
  2175. _super.call(this,{
  2176. bindingevents: 1.1,
  2177. documentevents: 1.1,
  2178. matrixbindings: 1.1,
  2179. matrixcoercion: 1.1,
  2180. selection: 1.1,
  2181. settings: 1.1,
  2182. tablebindings: 1.1,
  2183. tablecoercion: 1.1,
  2184. textbindings: 1.1,
  2185. textcoercion: 1.1
  2186. })
  2187. }
  2188. return ExcelIOSDefaultSetRequirement
  2189. }(DefaultSetRequirement);
  2190. Requirement.ExcelIOSDefaultSetRequirement=ExcelIOSDefaultSetRequirement;
  2191. var WordIOSDefaultSetRequirement=function(_super)
  2192. {
  2193. __extends(WordIOSDefaultSetRequirement,_super);
  2194. function WordIOSDefaultSetRequirement()
  2195. {
  2196. _super.call(this,{
  2197. bindingevents: 1.1,
  2198. compressedfile: 1.1,
  2199. customxmlparts: 1.1,
  2200. documentevents: 1.1,
  2201. file: 1.1,
  2202. htmlcoercion: 1.1,
  2203. matrixbindings: 1.1,
  2204. matrixcoercion: 1.1,
  2205. ooxmlcoercion: 1.1,
  2206. pdffile: 1.1,
  2207. selection: 1.1,
  2208. settings: 1.1,
  2209. tablebindings: 1.1,
  2210. tablecoercion: 1.1,
  2211. textbindings: 1.1,
  2212. textcoercion: 1.1,
  2213. textfile: 1.1
  2214. })
  2215. }
  2216. return WordIOSDefaultSetRequirement
  2217. }(DefaultSetRequirement);
  2218. Requirement.WordIOSDefaultSetRequirement=WordIOSDefaultSetRequirement;
  2219. var WordIOSV1DefaultSetRequirement=function(_super)
  2220. {
  2221. __extends(WordIOSV1DefaultSetRequirement,_super);
  2222. function WordIOSV1DefaultSetRequirement()
  2223. {
  2224. _super.call(this);
  2225. this._addSetMap({
  2226. customxmlparts: 1.2,
  2227. wordapi: 1.2
  2228. })
  2229. }
  2230. return WordIOSV1DefaultSetRequirement
  2231. }(WordIOSDefaultSetRequirement);
  2232. Requirement.WordIOSV1DefaultSetRequirement=WordIOSV1DefaultSetRequirement;
  2233. var PowerpointIOSDefaultSetRequirement=function(_super)
  2234. {
  2235. __extends(PowerpointIOSDefaultSetRequirement,_super);
  2236. function PowerpointIOSDefaultSetRequirement()
  2237. {
  2238. _super.call(this,{
  2239. activeview: 1.1,
  2240. compressedfile: 1.1,
  2241. documentevents: 1.1,
  2242. file: 1.1,
  2243. pdffile: 1.1,
  2244. selection: 1.1,
  2245. settings: 1.1,
  2246. textcoercion: 1.1
  2247. })
  2248. }
  2249. return PowerpointIOSDefaultSetRequirement
  2250. }(DefaultSetRequirement);
  2251. Requirement.PowerpointIOSDefaultSetRequirement=PowerpointIOSDefaultSetRequirement;
  2252. var OutlookIOSDefaultSetRequirement=function(_super)
  2253. {
  2254. __extends(OutlookIOSDefaultSetRequirement,_super);
  2255. function OutlookIOSDefaultSetRequirement()
  2256. {
  2257. _super.call(this,{mailbox: 1.1})
  2258. }
  2259. return OutlookIOSDefaultSetRequirement
  2260. }(DefaultSetRequirement);
  2261. Requirement.OutlookIOSDefaultSetRequirement=OutlookIOSDefaultSetRequirement;
  2262. var RequirementsMatrixFactory=function()
  2263. {
  2264. function RequirementsMatrixFactory(){}
  2265. RequirementsMatrixFactory.initializeOsfDda=function()
  2266. {
  2267. OSF.OUtil.setNamespace("Requirement",OSF.DDA)
  2268. };
  2269. RequirementsMatrixFactory.getDefaultRequirementMatrix=function(appContext)
  2270. {
  2271. this.initializeDefaultSetMatrix();
  2272. var defaultRequirementMatrix=undefined;
  2273. var clientRequirement=appContext.get_requirementMatrix();
  2274. if(clientRequirement !=undefined && clientRequirement.length > 0 && typeof JSON !=="undefined")
  2275. {
  2276. var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase());
  2277. defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem))
  2278. }
  2279. else
  2280. {
  2281. var appLocator=RequirementsMatrixFactory.getClientFullVersionString(appContext);
  2282. if(RequirementsMatrixFactory.DefaultSetArrayMatrix !=undefined && RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator] !=undefined)
  2283. defaultRequirementMatrix=new RequirementMatrix(RequirementsMatrixFactory.DefaultSetArrayMatrix[appLocator]);
  2284. else
  2285. defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement({}))
  2286. }
  2287. return defaultRequirementMatrix
  2288. };
  2289. RequirementsMatrixFactory.getDefaultDialogRequirementMatrix=function(appContext)
  2290. {
  2291. var defaultRequirementMatrix=undefined;
  2292. var clientRequirement=appContext.get_dialogRequirementMatrix();
  2293. if(clientRequirement !=undefined && clientRequirement.length > 0 && typeof JSON !=="undefined")
  2294. {
  2295. var matrixItem=JSON.parse(appContext.get_requirementMatrix().toLowerCase());
  2296. defaultRequirementMatrix=new RequirementMatrix(new DefaultSetRequirement(matrixItem))
  2297. }
  2298. else
  2299. defaultRequirementMatrix=new RequirementMatrix(new DefaultDialogSetRequirement);
  2300. return defaultRequirementMatrix
  2301. };
  2302. RequirementsMatrixFactory.getClientFullVersionString=function(appContext)
  2303. {
  2304. var appMinorVersion=appContext.get_appMinorVersion();
  2305. var appMinorVersionString="";
  2306. var appFullVersion="";
  2307. var appName=appContext.get_appName();
  2308. var isIOSClient=appName==1024 || appName==4096 || appName==8192 || appName==65536;
  2309. if(isIOSClient && appContext.get_appVersion()==1)
  2310. if(appName==4096 && appMinorVersion >=15)
  2311. appFullVersion="16.00.01";
  2312. else
  2313. appFullVersion="16.00";
  2314. else if(appContext.get_appName()==64)
  2315. appFullVersion=appContext.get_appVersion();
  2316. else
  2317. {
  2318. if(appMinorVersion < 10)
  2319. appMinorVersionString="0"+appMinorVersion;
  2320. else
  2321. appMinorVersionString=""+appMinorVersion;
  2322. appFullVersion=appContext.get_appVersion()+"."+appMinorVersionString
  2323. }
  2324. return appContext.get_appName()+"-"+appFullVersion
  2325. };
  2326. RequirementsMatrixFactory.initializeDefaultSetMatrix=function()
  2327. {
  2328. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1600]=new ExcelClientDefaultSetRequirement;
  2329. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1600]=new WordClientDefaultSetRequirement;
  2330. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1600]=new PowerpointClientDefaultSetRequirement;
  2331. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_RCLIENT_1601]=new ExcelClientV1DefaultSetRequirement;
  2332. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_RCLIENT_1601]=new WordClientV1DefaultSetRequirement;
  2333. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_RCLIENT_1601]=new PowerpointClientV1DefaultSetRequirement;
  2334. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_RCLIENT_1600]=new OutlookClientDefaultSetRequirement;
  2335. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_WAC_1600]=new ExcelWebDefaultSetRequirement;
  2336. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_WAC_1600]=new WordWebDefaultSetRequirement;
  2337. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1600]=new OutlookWebDefaultSetRequirement;
  2338. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_WAC_1601]=new OutlookWebDefaultSetRequirement;
  2339. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Project_RCLIENT_1600]=new ProjectClientDefaultSetRequirement;
  2340. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Access_WAC_1600]=new AccessWebDefaultSetRequirement;
  2341. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_WAC_1600]=new PowerpointWebDefaultSetRequirement;
  2342. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Excel_IOS_1600]=new ExcelIOSDefaultSetRequirement;
  2343. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.SWAY_WAC_1600]=new SwayWebDefaultSetRequirement;
  2344. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_1600]=new WordIOSDefaultSetRequirement;
  2345. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Word_IOS_16001]=new WordIOSV1DefaultSetRequirement;
  2346. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.PowerPoint_IOS_1600]=new PowerpointIOSDefaultSetRequirement;
  2347. RequirementsMatrixFactory.DefaultSetArrayMatrix[RequirementsMatrixFactory.Outlook_IOS_1600]=new OutlookIOSDefaultSetRequirement
  2348. };
  2349. RequirementsMatrixFactory.Excel_RCLIENT_1600="1-16.00";
  2350. RequirementsMatrixFactory.Excel_RCLIENT_1601="1-16.01";
  2351. RequirementsMatrixFactory.Word_RCLIENT_1600="2-16.00";
  2352. RequirementsMatrixFactory.Word_RCLIENT_1601="2-16.01";
  2353. RequirementsMatrixFactory.PowerPoint_RCLIENT_1600="4-16.00";
  2354. RequirementsMatrixFactory.PowerPoint_RCLIENT_1601="4-16.01";
  2355. RequirementsMatrixFactory.Outlook_RCLIENT_1600="8-16.00";
  2356. RequirementsMatrixFactory.Excel_WAC_1600="16-16.00";
  2357. RequirementsMatrixFactory.Word_WAC_1600="32-16.00";
  2358. RequirementsMatrixFactory.Outlook_WAC_1600="64-16.00";
  2359. RequirementsMatrixFactory.Outlook_WAC_1601="64-16.01";
  2360. RequirementsMatrixFactory.Project_RCLIENT_1600="128-16.00";
  2361. RequirementsMatrixFactory.Access_WAC_1600="256-16.00";
  2362. RequirementsMatrixFactory.PowerPoint_WAC_1600="512-16.00";
  2363. RequirementsMatrixFactory.Excel_IOS_1600="1024-16.00";
  2364. RequirementsMatrixFactory.SWAY_WAC_1600="2048-16.00";
  2365. RequirementsMatrixFactory.Word_IOS_1600="4096-16.00";
  2366. RequirementsMatrixFactory.Word_IOS_16001="4096-16.00.01";
  2367. RequirementsMatrixFactory.PowerPoint_IOS_1600="8192-16.00";
  2368. RequirementsMatrixFactory.Outlook_IOS_1600="65536-16.00";
  2369. RequirementsMatrixFactory.DefaultSetArrayMatrix={};
  2370. return RequirementsMatrixFactory
  2371. }();
  2372. Requirement.RequirementsMatrixFactory=RequirementsMatrixFactory
  2373. })(Requirement=OfficeExt.Requirement || (OfficeExt.Requirement={}))
  2374. })(OfficeExt || (OfficeExt={}));
  2375. OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();
  2376. Microsoft.Office.WebExtension.ApplicationMode={
  2377. WebEditor: "webEditor",
  2378. WebViewer: "webViewer",
  2379. Client: "client"
  2380. };
  2381. Microsoft.Office.WebExtension.DocumentMode={
  2382. ReadOnly: "readOnly",
  2383. ReadWrite: "readWrite"
  2384. };
  2385. OSF.NamespaceManager=function OSF_NamespaceManager()
  2386. {
  2387. var _userOffice;
  2388. var _useShortcut=false;
  2389. return{
  2390. enableShortcut: function OSF_NamespaceManager$enableShortcut()
  2391. {
  2392. if(!_useShortcut)
  2393. {
  2394. if(window.Office)
  2395. _userOffice=window.Office;
  2396. else
  2397. OSF.OUtil.setNamespace("Office",window);
  2398. window.Office=Microsoft.Office.WebExtension;
  2399. _useShortcut=true
  2400. }
  2401. },
  2402. disableShortcut: function OSF_NamespaceManager$disableShortcut()
  2403. {
  2404. if(_useShortcut)
  2405. {
  2406. if(_userOffice)
  2407. window.Office=_userOffice;
  2408. else
  2409. OSF.OUtil.unsetNamespace("Office",window);
  2410. _useShortcut=false
  2411. }
  2412. }
  2413. }
  2414. }();
  2415. OSF.NamespaceManager.enableShortcut();
  2416. Microsoft.Office.WebExtension.useShortNamespace=function Microsoft_Office_WebExtension_useShortNamespace(useShortcut)
  2417. {
  2418. if(useShortcut)
  2419. OSF.NamespaceManager.enableShortcut();
  2420. else
  2421. OSF.NamespaceManager.disableShortcut()
  2422. };
  2423. Microsoft.Office.WebExtension.select=function Microsoft_Office_WebExtension_select(str, errorCallback)
  2424. {
  2425. var promise;
  2426. if(str && typeof str=="string")
  2427. {
  2428. var index=str.indexOf("#");
  2429. if(index !=-1)
  2430. {
  2431. var op=str.substring(0,index);
  2432. var target=str.substring(index+1);
  2433. switch(op)
  2434. {
  2435. case"binding":
  2436. case"bindings":
  2437. if(target)
  2438. promise=new OSF.DDA.BindingPromise(target);
  2439. break
  2440. }
  2441. }
  2442. }
  2443. if(!promise)
  2444. {
  2445. if(errorCallback)
  2446. {
  2447. var callbackType=typeof errorCallback;
  2448. if(callbackType=="function")
  2449. {
  2450. var callArgs={};
  2451. callArgs[Microsoft.Office.WebExtension.Parameters.Callback]=errorCallback;
  2452. OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))
  2453. }
  2454. else
  2455. throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,callbackType);
  2456. }
  2457. }
  2458. else
  2459. {
  2460. promise.onFail=errorCallback;
  2461. return promise
  2462. }
  2463. };
  2464. OSF.DDA.Context=function OSF_DDA_Context(officeAppContext, document, license, appOM, getOfficeTheme)
  2465. {
  2466. OSF.OUtil.defineEnumerableProperties(this,{
  2467. contentLanguage: {value: officeAppContext.get_dataLocale()},
  2468. displayLanguage: {value: officeAppContext.get_appUILocale()},
  2469. touchEnabled: {value: officeAppContext.get_touchEnabled()},
  2470. commerceAllowed: {value: officeAppContext.get_commerceAllowed()}
  2471. });
  2472. if(license)
  2473. OSF.OUtil.defineEnumerableProperty(this,"license",{value: license});
  2474. if(officeAppContext.ui)
  2475. OSF.OUtil.defineEnumerableProperty(this,"ui",{value: officeAppContext.ui});
  2476. if(officeAppContext.get_isDialog())
  2477. {
  2478. var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(officeAppContext);
  2479. OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements})
  2480. }
  2481. else
  2482. {
  2483. if(document)
  2484. OSF.OUtil.defineEnumerableProperty(this,"document",{value: document});
  2485. if(appOM)
  2486. {
  2487. var displayName=appOM.displayName || "appOM";
  2488. delete appOM.displayName;
  2489. OSF.OUtil.defineEnumerableProperty(this,displayName,{value: appOM})
  2490. }
  2491. if(getOfficeTheme)
  2492. OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get: function()
  2493. {
  2494. return getOfficeTheme()
  2495. }});
  2496. var requirements=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(officeAppContext);
  2497. OSF.OUtil.defineEnumerableProperty(this,"requirements",{value: requirements})
  2498. }
  2499. };
  2500. OSF.DDA.OutlookContext=function OSF_DDA_OutlookContext(appContext, settings, license, appOM, getOfficeTheme)
  2501. {
  2502. OSF.DDA.OutlookContext.uber.constructor.call(this,appContext,null,license,appOM,getOfficeTheme);
  2503. if(settings)
  2504. OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value: settings})
  2505. };
  2506. OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);
  2507. OSF.DDA.OutlookAppOm=function OSF_DDA_OutlookAppOm(appContext, window, appReady){};
  2508. OSF.DDA.Document=function OSF_DDA_Document(officeAppContext, settings)
  2509. {
  2510. var mode;
  2511. switch(officeAppContext.get_clientMode())
  2512. {
  2513. case OSF.ClientMode.ReadOnly:
  2514. mode=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;
  2515. break;
  2516. case OSF.ClientMode.ReadWrite:
  2517. mode=Microsoft.Office.WebExtension.DocumentMode.ReadWrite;
  2518. break
  2519. }
  2520. if(settings)
  2521. OSF.OUtil.defineEnumerableProperty(this,"settings",{value: settings});
  2522. OSF.OUtil.defineMutableProperties(this,{
  2523. mode: {value: mode},
  2524. url: {value: officeAppContext.get_docUrl()}
  2525. })
  2526. };
  2527. OSF.DDA.JsomDocument=function OSF_DDA_JsomDocument(officeAppContext, bindingFacade, settings)
  2528. {
  2529. OSF.DDA.JsomDocument.uber.constructor.call(this,officeAppContext,settings);
  2530. if(bindingFacade)
  2531. OSF.OUtil.defineEnumerableProperty(this,"bindings",{get: function OSF_DDA_Document$GetBindings()
  2532. {
  2533. return bindingFacade
  2534. }});
  2535. var am=OSF.DDA.AsyncMethodNames;
  2536. OSF.DDA.DispIdHost.addAsyncMethods(this,[am.GetSelectedDataAsync,am.SetSelectedDataAsync]);
  2537. OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))
  2538. };
  2539. OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);
  2540. OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{get: function Microsoft_Office_WebExtension$GetContext()
  2541. {
  2542. var context;
  2543. if(OSF && OSF._OfficeAppFactory)
  2544. context=OSF._OfficeAppFactory.getContext();
  2545. return context
  2546. }});
  2547. OSF.DDA.License=function OSF_DDA_License(eToken)
  2548. {
  2549. OSF.OUtil.defineEnumerableProperty(this,"value",{value: eToken})
  2550. };
  2551. OSF.DDA.ApiMethodCall=function OSF_DDA_ApiMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName)
  2552. {
  2553. var requiredCount=requiredParameters.length;
  2554. var getInvalidParameterString=OSF.OUtil.delayExecutionAndCache(function()
  2555. {
  2556. return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,displayName)
  2557. });
  2558. this.verifyArguments=function OSF_DDA_ApiMethodCall$VerifyArguments(params, args)
  2559. {
  2560. for(var name in params)
  2561. {
  2562. var param=params[name];
  2563. var arg=args[name];
  2564. if(param["enum"])
  2565. switch(typeof arg)
  2566. {
  2567. case"string":
  2568. if(OSF.OUtil.listContainsValue(param["enum"],arg))
  2569. break;
  2570. case"undefined":
  2571. throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;
  2572. default:
  2573. throw getInvalidParameterString();
  2574. }
  2575. if(param["types"])
  2576. if(!OSF.OUtil.listContainsValue(param["types"],typeof arg))
  2577. throw getInvalidParameterString();
  2578. }
  2579. };
  2580. this.extractRequiredArguments=function OSF_DDA_ApiMethodCall$ExtractRequiredArguments(userArgs, caller, stateInfo)
  2581. {
  2582. if(userArgs.length < requiredCount)
  2583. throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments);
  2584. var requiredArgs=[];
  2585. var index;
  2586. for(index=0; index < requiredCount; index++)
  2587. requiredArgs.push(userArgs[index]);
  2588. this.verifyArguments(requiredParameters,requiredArgs);
  2589. var ret={};
  2590. for(index=0; index < requiredCount; index++)
  2591. {
  2592. var param=requiredParameters[index];
  2593. var arg=requiredArgs[index];
  2594. if(param.verify)
  2595. {
  2596. var isValid=param.verify(arg,caller,stateInfo);
  2597. if(!isValid)
  2598. throw getInvalidParameterString();
  2599. }
  2600. ret[param.name]=arg
  2601. }
  2602. return ret
  2603. },this.fillOptions=function OSF_DDA_ApiMethodCall$FillOptions(options, requiredArgs, caller, stateInfo)
  2604. {
  2605. options=options || {};
  2606. for(var optionName in supportedOptions)
  2607. if(!OSF.OUtil.listContainsKey(options,optionName))
  2608. {
  2609. var value=undefined;
  2610. var option=supportedOptions[optionName];
  2611. if(option.calculate && requiredArgs)
  2612. value=option.calculate(requiredArgs,caller,stateInfo);
  2613. if(!value && option.defaultValue !==undefined)
  2614. value=option.defaultValue;
  2615. options[optionName]=value
  2616. }
  2617. return options
  2618. };
  2619. this.constructCallArgs=function OSF_DAA_ApiMethodCall$ConstructCallArgs(required, options, caller, stateInfo)
  2620. {
  2621. var callArgs={};
  2622. for(var r in required)
  2623. callArgs[r]=required[r];
  2624. for(var o in options)
  2625. callArgs[o]=options[o];
  2626. for(var s in privateStateCallbacks)
  2627. callArgs[s]=privateStateCallbacks[s](caller,stateInfo);
  2628. if(checkCallArgs)
  2629. callArgs=checkCallArgs(callArgs,caller,stateInfo);
  2630. return callArgs
  2631. }
  2632. };
  2633. OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA);
  2634. OSF.DDA.AsyncResultEnum.Properties={
  2635. Context: "Context",
  2636. Value: "Value",
  2637. Status: "Status",
  2638. Error: "Error"
  2639. };
  2640. Microsoft.Office.WebExtension.AsyncResultStatus={
  2641. Succeeded: "succeeded",
  2642. Failed: "failed"
  2643. };
  2644. OSF.DDA.AsyncResultEnum.ErrorCode={
  2645. Success: 0,
  2646. Failed: 1
  2647. };
  2648. OSF.DDA.AsyncResultEnum.ErrorProperties={
  2649. Name: "Name",
  2650. Message: "Message",
  2651. Code: "Code"
  2652. };
  2653. OSF.DDA.AsyncMethodNames={};
  2654. OSF.DDA.AsyncMethodNames.addNames=function(methodNames)
  2655. {
  2656. for(var entry in methodNames)
  2657. {
  2658. var am={};
  2659. OSF.OUtil.defineEnumerableProperties(am,{
  2660. id: {value: entry},
  2661. displayName: {value: methodNames[entry]}
  2662. });
  2663. OSF.DDA.AsyncMethodNames[entry]=am
  2664. }
  2665. };
  2666. OSF.DDA.AsyncMethodCall=function OSF_DDA_AsyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, onSucceeded, onFailed, checkCallArgs, displayName)
  2667. {
  2668. var requiredCount=requiredParameters.length;
  2669. var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName);
  2670. function OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo)
  2671. {
  2672. if(userArgs.length > requiredCount+2)
  2673. throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);
  2674. var options,
  2675. parameterCallback;
  2676. for(var i=userArgs.length - 1; i >=requiredCount; i--)
  2677. {
  2678. var argument=userArgs[i];
  2679. switch(typeof argument)
  2680. {
  2681. case"object":
  2682. if(options)
  2683. throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);
  2684. else
  2685. options=argument;
  2686. break;
  2687. case"function":
  2688. if(parameterCallback)
  2689. throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);
  2690. else
  2691. parameterCallback=argument;
  2692. break;
  2693. default:
  2694. throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);
  2695. break
  2696. }
  2697. }
  2698. options=apiMethods.fillOptions(options,requiredArgs,caller,stateInfo);
  2699. if(parameterCallback)
  2700. if(options[Microsoft.Office.WebExtension.Parameters.Callback])
  2701. throw Strings.OfficeOM.L_RedundantCallbackSpecification;
  2702. else
  2703. options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback;
  2704. apiMethods.verifyArguments(supportedOptions,options);
  2705. return options
  2706. }
  2707. this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo)
  2708. {
  2709. var required=apiMethods.extractRequiredArguments(userArgs,caller,stateInfo);
  2710. var options=OSF_DAA_AsyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo);
  2711. var callArgs=apiMethods.constructCallArgs(required,options,caller,stateInfo);
  2712. return callArgs
  2713. };
  2714. this.processResponse=function OSF_DAA_AsyncMethodCall$ProcessResponse(status, response, caller, callArgs)
  2715. {
  2716. var payload;
  2717. if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  2718. if(onSucceeded)
  2719. payload=onSucceeded(response,caller,callArgs);
  2720. else
  2721. payload=response;
  2722. else if(onFailed)
  2723. payload=onFailed(status,response);
  2724. else
  2725. payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status);
  2726. return payload
  2727. };
  2728. this.getCallArgs=function(suppliedArgs)
  2729. {
  2730. var options,
  2731. parameterCallback;
  2732. for(var i=suppliedArgs.length - 1; i >=requiredCount; i--)
  2733. {
  2734. var argument=suppliedArgs[i];
  2735. switch(typeof argument)
  2736. {
  2737. case"object":
  2738. options=argument;
  2739. break;
  2740. case"function":
  2741. parameterCallback=argument;
  2742. break
  2743. }
  2744. }
  2745. options=options || {};
  2746. if(parameterCallback)
  2747. options[Microsoft.Office.WebExtension.Parameters.Callback]=parameterCallback;
  2748. return options
  2749. }
  2750. };
  2751. OSF.DDA.AsyncMethodCallFactory=function()
  2752. {
  2753. return{manufacture: function(params)
  2754. {
  2755. var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : [];
  2756. var privateStateCallbacks=params.privateStateCallbacks ? OSF.OUtil.createObject(params.privateStateCallbacks) : [];
  2757. return new OSF.DDA.AsyncMethodCall(params.requiredArguments || [],supportedOptions,privateStateCallbacks,params.onSucceeded,params.onFailed,params.checkCallArgs,params.method.displayName)
  2758. }}
  2759. }();
  2760. OSF.DDA.AsyncMethodCalls={};
  2761. OSF.DDA.AsyncMethodCalls.define=function(callDefinition)
  2762. {
  2763. OSF.DDA.AsyncMethodCalls[callDefinition.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(callDefinition)
  2764. };
  2765. OSF.DDA.Error=function OSF_DDA_Error(name, message, code)
  2766. {
  2767. OSF.OUtil.defineEnumerableProperties(this,{
  2768. name: {value: name},
  2769. message: {value: message},
  2770. code: {value: code}
  2771. })
  2772. };
  2773. OSF.DDA.AsyncResult=function OSF_DDA_AsyncResult(initArgs, errorArgs)
  2774. {
  2775. OSF.OUtil.defineEnumerableProperties(this,{
  2776. value: {value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Value]},
  2777. status: {value: errorArgs ? Microsoft.Office.WebExtension.AsyncResultStatus.Failed : Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}
  2778. });
  2779. if(initArgs[OSF.DDA.AsyncResultEnum.Properties.Context])
  2780. OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value: initArgs[OSF.DDA.AsyncResultEnum.Properties.Context]});
  2781. if(errorArgs)
  2782. OSF.OUtil.defineEnumerableProperty(this,"error",{value: new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})
  2783. };
  2784. OSF.DDA.issueAsyncResult=function OSF_DDA$IssueAsyncResult(callArgs, status, payload)
  2785. {
  2786. var callback=callArgs[Microsoft.Office.WebExtension.Parameters.Callback];
  2787. if(callback)
  2788. {
  2789. var asyncInitArgs={};
  2790. asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Context]=callArgs[Microsoft.Office.WebExtension.Parameters.AsyncContext];
  2791. var errorArgs;
  2792. if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  2793. asyncInitArgs[OSF.DDA.AsyncResultEnum.Properties.Value]=payload;
  2794. else
  2795. {
  2796. errorArgs={};
  2797. payload=payload || OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);
  2798. errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  2799. errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload;
  2800. errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload
  2801. }
  2802. callback(new OSF.DDA.AsyncResult(asyncInitArgs,errorArgs))
  2803. }
  2804. };
  2805. OSF.DDA.SyncMethodNames={};
  2806. OSF.DDA.SyncMethodNames.addNames=function(methodNames)
  2807. {
  2808. for(var entry in methodNames)
  2809. {
  2810. var am={};
  2811. OSF.OUtil.defineEnumerableProperties(am,{
  2812. id: {value: entry},
  2813. displayName: {value: methodNames[entry]}
  2814. });
  2815. OSF.DDA.SyncMethodNames[entry]=am
  2816. }
  2817. };
  2818. OSF.DDA.SyncMethodCall=function OSF_DDA_SyncMethodCall(requiredParameters, supportedOptions, privateStateCallbacks, checkCallArgs, displayName)
  2819. {
  2820. var requiredCount=requiredParameters.length;
  2821. var apiMethods=new OSF.DDA.ApiMethodCall(requiredParameters,supportedOptions,privateStateCallbacks,checkCallArgs,displayName);
  2822. function OSF_DAA_SyncMethodCall$ExtractOptions(userArgs, requiredArgs, caller, stateInfo)
  2823. {
  2824. if(userArgs.length > requiredCount+1)
  2825. throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);
  2826. var options,
  2827. parameterCallback;
  2828. for(var i=userArgs.length - 1; i >=requiredCount; i--)
  2829. {
  2830. var argument=userArgs[i];
  2831. switch(typeof argument)
  2832. {
  2833. case"object":
  2834. if(options)
  2835. throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);
  2836. else
  2837. options=argument;
  2838. break;
  2839. default:
  2840. throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);
  2841. break
  2842. }
  2843. }
  2844. options=apiMethods.fillOptions(options,requiredArgs,caller,stateInfo);
  2845. apiMethods.verifyArguments(supportedOptions,options);
  2846. return options
  2847. }
  2848. this.verifyAndExtractCall=function OSF_DAA_AsyncMethodCall$VerifyAndExtractCall(userArgs, caller, stateInfo)
  2849. {
  2850. var required=apiMethods.extractRequiredArguments(userArgs,caller,stateInfo);
  2851. var options=OSF_DAA_SyncMethodCall$ExtractOptions(userArgs,required,caller,stateInfo);
  2852. var callArgs=apiMethods.constructCallArgs(required,options,caller,stateInfo);
  2853. return callArgs
  2854. }
  2855. };
  2856. OSF.DDA.SyncMethodCallFactory=function()
  2857. {
  2858. return{manufacture: function(params)
  2859. {
  2860. var supportedOptions=params.supportedOptions ? OSF.OUtil.createObject(params.supportedOptions) : [];
  2861. return new OSF.DDA.SyncMethodCall(params.requiredArguments || [],supportedOptions,params.privateStateCallbacks,params.checkCallArgs,params.method.displayName)
  2862. }}
  2863. }();
  2864. OSF.DDA.SyncMethodCalls={};
  2865. OSF.DDA.SyncMethodCalls.define=function(callDefinition)
  2866. {
  2867. OSF.DDA.SyncMethodCalls[callDefinition.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(callDefinition)
  2868. };
  2869. OSF.DDA.ListType=function()
  2870. {
  2871. var listTypes={};
  2872. return{
  2873. setListType: function OSF_DDA_ListType$AddListType(t, prop)
  2874. {
  2875. listTypes[t]=prop
  2876. },
  2877. isListType: function OSF_DDA_ListType$IsListType(t)
  2878. {
  2879. return OSF.OUtil.listContainsKey(listTypes,t)
  2880. },
  2881. getDescriptor: function OSF_DDA_ListType$getDescriptor(t)
  2882. {
  2883. return listTypes[t]
  2884. }
  2885. }
  2886. }();
  2887. OSF.DDA.HostParameterMap=function(specialProcessor, mappings)
  2888. {
  2889. var toHostMap="toHost";
  2890. var fromHostMap="fromHost";
  2891. var sourceData="sourceData";
  2892. var self="self";
  2893. var dynamicTypes={};
  2894. dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]={
  2895. toHost: function(data)
  2896. {
  2897. if(data !=null && data.rows !==undefined)
  2898. {
  2899. var tableData={};
  2900. tableData[OSF.DDA.TableDataProperties.TableRows]=data.rows;
  2901. tableData[OSF.DDA.TableDataProperties.TableHeaders]=data.headers;
  2902. data=tableData
  2903. }
  2904. return data
  2905. },
  2906. fromHost: function(args)
  2907. {
  2908. return args
  2909. }
  2910. };
  2911. dynamicTypes[Microsoft.Office.WebExtension.Parameters.SampleData]=dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data];
  2912. function mapValues(preimageSet, mapping)
  2913. {
  2914. var ret=preimageSet ? {} : undefined;
  2915. for(var entry in preimageSet)
  2916. {
  2917. var preimage=preimageSet[entry];
  2918. var image;
  2919. if(OSF.DDA.ListType.isListType(entry))
  2920. {
  2921. image=[];
  2922. for(var subEntry in preimage)
  2923. image.push(mapValues(preimage[subEntry],mapping))
  2924. }
  2925. else if(OSF.OUtil.listContainsKey(dynamicTypes,entry))
  2926. image=dynamicTypes[entry][mapping](preimage);
  2927. else if(mapping==fromHostMap && specialProcessor.preserveNesting(entry))
  2928. image=mapValues(preimage,mapping);
  2929. else
  2930. {
  2931. var maps=mappings[entry];
  2932. if(maps)
  2933. {
  2934. var map=maps[mapping];
  2935. if(map)
  2936. {
  2937. image=map[preimage];
  2938. if(image===undefined)
  2939. image=preimage
  2940. }
  2941. }
  2942. else
  2943. image=preimage
  2944. }
  2945. ret[entry]=image
  2946. }
  2947. return ret
  2948. }
  2949. function generateArguments(imageSet, parameters)
  2950. {
  2951. var ret;
  2952. for(var param in parameters)
  2953. {
  2954. var arg;
  2955. if(specialProcessor.isComplexType(param))
  2956. arg=generateArguments(imageSet,mappings[param][toHostMap]);
  2957. else
  2958. arg=imageSet[param];
  2959. if(arg !=undefined)
  2960. {
  2961. if(!ret)
  2962. ret={};
  2963. var index=parameters[param];
  2964. if(index==self)
  2965. index=param;
  2966. ret[index]=specialProcessor.pack(param,arg)
  2967. }
  2968. }
  2969. return ret
  2970. }
  2971. function extractArguments(source, parameters, extracted)
  2972. {
  2973. if(!extracted)
  2974. extracted={};
  2975. for(var param in parameters)
  2976. {
  2977. var index=parameters[param];
  2978. var value;
  2979. if(index==self)
  2980. value=source;
  2981. else if(index==sourceData)
  2982. {
  2983. extracted[param]=source.toArray();
  2984. continue
  2985. }
  2986. else
  2987. value=source[index];
  2988. if(value===null || value===undefined)
  2989. extracted[param]=undefined;
  2990. else
  2991. {
  2992. value=specialProcessor.unpack(param,value);
  2993. var map;
  2994. if(specialProcessor.isComplexType(param))
  2995. {
  2996. map=mappings[param][fromHostMap];
  2997. if(specialProcessor.preserveNesting(param))
  2998. extracted[param]=extractArguments(value,map);
  2999. else
  3000. extractArguments(value,map,extracted)
  3001. }
  3002. else if(OSF.DDA.ListType.isListType(param))
  3003. {
  3004. map={};
  3005. var entryDescriptor=OSF.DDA.ListType.getDescriptor(param);
  3006. map[entryDescriptor]=self;
  3007. var extractedValues=new Array(value.length);
  3008. for(var item in value)
  3009. extractedValues[item]=extractArguments(value[item],map);
  3010. extracted[param]=extractedValues
  3011. }
  3012. else
  3013. extracted[param]=value
  3014. }
  3015. }
  3016. return extracted
  3017. }
  3018. function applyMap(mapName, preimage, mapping)
  3019. {
  3020. var parameters=mappings[mapName][mapping];
  3021. var image;
  3022. if(mapping=="toHost")
  3023. {
  3024. var imageSet=mapValues(preimage,mapping);
  3025. image=generateArguments(imageSet,parameters)
  3026. }
  3027. else if(mapping=="fromHost")
  3028. {
  3029. var argumentSet=extractArguments(preimage,parameters);
  3030. image=mapValues(argumentSet,mapping)
  3031. }
  3032. return image
  3033. }
  3034. if(!mappings)
  3035. mappings={};
  3036. this.addMapping=function(mapName, description)
  3037. {
  3038. var toHost,
  3039. fromHost;
  3040. if(description.map)
  3041. {
  3042. toHost=description.map;
  3043. fromHost={};
  3044. for(var preimage in toHost)
  3045. {
  3046. var image=toHost[preimage];
  3047. if(image==self)
  3048. image=preimage;
  3049. fromHost[image]=preimage
  3050. }
  3051. }
  3052. else
  3053. {
  3054. toHost=description.toHost;
  3055. fromHost=description.fromHost
  3056. }
  3057. var pair=mappings[mapName];
  3058. if(pair)
  3059. {
  3060. var currMap=pair[toHostMap];
  3061. for(var th in currMap)
  3062. toHost[th]=currMap[th];
  3063. currMap=pair[fromHostMap];
  3064. for(var fh in currMap)
  3065. fromHost[fh]=currMap[fh]
  3066. }
  3067. else
  3068. pair=mappings[mapName]={};
  3069. pair[toHostMap]=toHost;
  3070. pair[fromHostMap]=fromHost
  3071. };
  3072. this.toHost=function(mapName, preimage)
  3073. {
  3074. return applyMap(mapName,preimage,toHostMap)
  3075. };
  3076. this.fromHost=function(mapName, image)
  3077. {
  3078. return applyMap(mapName,image,fromHostMap)
  3079. };
  3080. this.self=self;
  3081. this.sourceData=sourceData;
  3082. this.addComplexType=function(ct)
  3083. {
  3084. specialProcessor.addComplexType(ct)
  3085. };
  3086. this.getDynamicType=function(dt)
  3087. {
  3088. return specialProcessor.getDynamicType(dt)
  3089. };
  3090. this.setDynamicType=function(dt, handler)
  3091. {
  3092. specialProcessor.setDynamicType(dt,handler)
  3093. };
  3094. this.dynamicTypes=dynamicTypes;
  3095. this.doMapValues=function(preimageSet, mapping)
  3096. {
  3097. return mapValues(preimageSet,mapping)
  3098. }
  3099. };
  3100. OSF.DDA.SpecialProcessor=function(complexTypes, dynamicTypes)
  3101. {
  3102. this.addComplexType=function OSF_DDA_SpecialProcessor$addComplexType(ct)
  3103. {
  3104. complexTypes.push(ct)
  3105. };
  3106. this.getDynamicType=function OSF_DDA_SpecialProcessor$getDynamicType(dt)
  3107. {
  3108. return dynamicTypes[dt]
  3109. };
  3110. this.setDynamicType=function OSF_DDA_SpecialProcessor$setDynamicType(dt, handler)
  3111. {
  3112. dynamicTypes[dt]=handler
  3113. };
  3114. this.isComplexType=function OSF_DDA_SpecialProcessor$isComplexType(t)
  3115. {
  3116. return OSF.OUtil.listContainsValue(complexTypes,t)
  3117. };
  3118. this.isDynamicType=function OSF_DDA_SpecialProcessor$isDynamicType(p)
  3119. {
  3120. return OSF.OUtil.listContainsKey(dynamicTypes,p)
  3121. };
  3122. this.preserveNesting=function OSF_DDA_SpecialProcessor$preserveNesting(p)
  3123. {
  3124. var pn=[];
  3125. if(OSF.DDA.PropertyDescriptors)
  3126. pn.push(OSF.DDA.PropertyDescriptors.Subset);
  3127. if(OSF.DDA.DataNodeEventProperties)
  3128. pn=pn.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode]);
  3129. return OSF.OUtil.listContainsValue(pn,p)
  3130. };
  3131. this.pack=function OSF_DDA_SpecialProcessor$pack(param, arg)
  3132. {
  3133. var value;
  3134. if(this.isDynamicType(param))
  3135. value=dynamicTypes[param].toHost(arg);
  3136. else
  3137. value=arg;
  3138. return value
  3139. };
  3140. this.unpack=function OSF_DDA_SpecialProcessor$unpack(param, arg)
  3141. {
  3142. var value;
  3143. if(this.isDynamicType(param))
  3144. value=dynamicTypes[param].fromHost(arg);
  3145. else
  3146. value=arg;
  3147. return value
  3148. }
  3149. };
  3150. OSF.DDA.getDecoratedParameterMap=function(specialProcessor, initialDefs)
  3151. {
  3152. var parameterMap=new OSF.DDA.HostParameterMap(specialProcessor);
  3153. var self=parameterMap.self;
  3154. function createObject(properties)
  3155. {
  3156. var obj=null;
  3157. if(properties)
  3158. {
  3159. obj={};
  3160. var len=properties.length;
  3161. for(var i=0; i < len; i++)
  3162. obj[properties[i].name]=properties[i].value
  3163. }
  3164. return obj
  3165. }
  3166. parameterMap.define=function define(definition)
  3167. {
  3168. var args={};
  3169. var toHost=createObject(definition.toHost);
  3170. if(definition.invertible)
  3171. args.map=toHost;
  3172. else if(definition.canonical)
  3173. args.toHost=args.fromHost=toHost;
  3174. else
  3175. {
  3176. args.toHost=toHost;
  3177. args.fromHost=createObject(definition.fromHost)
  3178. }
  3179. parameterMap.addMapping(definition.type,args);
  3180. if(definition.isComplexType)
  3181. parameterMap.addComplexType(definition.type)
  3182. };
  3183. for(var id in initialDefs)
  3184. parameterMap.define(initialDefs[id]);
  3185. return parameterMap
  3186. };
  3187. OSF.OUtil.setNamespace("DispIdHost",OSF.DDA);
  3188. OSF.DDA.DispIdHost.Methods={
  3189. InvokeMethod: "invokeMethod",
  3190. AddEventHandler: "addEventHandler",
  3191. RemoveEventHandler: "removeEventHandler",
  3192. OpenDialog: "openDialog",
  3193. CloseDialog: "closeDialog",
  3194. MessageParent: "messageParent",
  3195. SendMessage: "sendMessage"
  3196. };
  3197. OSF.DDA.DispIdHost.Delegates={
  3198. ExecuteAsync: "executeAsync",
  3199. RegisterEventAsync: "registerEventAsync",
  3200. UnregisterEventAsync: "unregisterEventAsync",
  3201. ParameterMap: "parameterMap",
  3202. OpenDialog: "openDialog",
  3203. CloseDialog: "closeDialog",
  3204. MessageParent: "messageParent",
  3205. SendMessage: "sendMessage"
  3206. };
  3207. OSF.DDA.DispIdHost.Facade=function OSF_DDA_DispIdHost_Facade(getDelegateMethods, parameterMap)
  3208. {
  3209. var dispIdMap={};
  3210. var jsom=OSF.DDA.AsyncMethodNames;
  3211. var did=OSF.DDA.MethodDispId;
  3212. var methodMap={
  3213. GoToByIdAsync: did.dispidNavigateToMethod,
  3214. GetSelectedDataAsync: did.dispidGetSelectedDataMethod,
  3215. SetSelectedDataAsync: did.dispidSetSelectedDataMethod,
  3216. GetDocumentCopyChunkAsync: did.dispidGetDocumentCopyChunkMethod,
  3217. ReleaseDocumentCopyAsync: did.dispidReleaseDocumentCopyMethod,
  3218. GetDocumentCopyAsync: did.dispidGetDocumentCopyMethod,
  3219. AddFromSelectionAsync: did.dispidAddBindingFromSelectionMethod,
  3220. AddFromPromptAsync: did.dispidAddBindingFromPromptMethod,
  3221. AddFromNamedItemAsync: did.dispidAddBindingFromNamedItemMethod,
  3222. GetAllAsync: did.dispidGetAllBindingsMethod,
  3223. GetByIdAsync: did.dispidGetBindingMethod,
  3224. ReleaseByIdAsync: did.dispidReleaseBindingMethod,
  3225. GetDataAsync: did.dispidGetBindingDataMethod,
  3226. SetDataAsync: did.dispidSetBindingDataMethod,
  3227. AddRowsAsync: did.dispidAddRowsMethod,
  3228. AddColumnsAsync: did.dispidAddColumnsMethod,
  3229. DeleteAllDataValuesAsync: did.dispidClearAllRowsMethod,
  3230. RefreshAsync: did.dispidLoadSettingsMethod,
  3231. SaveAsync: did.dispidSaveSettingsMethod,
  3232. GetActiveViewAsync: did.dispidGetActiveViewMethod,
  3233. GetFilePropertiesAsync: did.dispidGetFilePropertiesMethod,
  3234. GetOfficeThemeAsync: did.dispidGetOfficeThemeMethod,
  3235. GetDocumentThemeAsync: did.dispidGetDocumentThemeMethod,
  3236. ClearFormatsAsync: did.dispidClearFormatsMethod,
  3237. SetTableOptionsAsync: did.dispidSetTableOptionsMethod,
  3238. SetFormatsAsync: did.dispidSetFormatsMethod,
  3239. ExecuteRichApiRequestAsync: did.dispidExecuteRichApiRequestMethod,
  3240. AppCommandInvocationCompletedAsync: did.dispidAppCommandInvocationCompletedMethod,
  3241. CloseContainerAsync: did.dispidCloseContainerMethod,
  3242. AddDataPartAsync: did.dispidAddDataPartMethod,
  3243. GetDataPartByIdAsync: did.dispidGetDataPartByIdMethod,
  3244. GetDataPartsByNameSpaceAsync: did.dispidGetDataPartsByNamespaceMethod,
  3245. GetPartXmlAsync: did.dispidGetDataPartXmlMethod,
  3246. GetPartNodesAsync: did.dispidGetDataPartNodesMethod,
  3247. DeleteDataPartAsync: did.dispidDeleteDataPartMethod,
  3248. GetNodeValueAsync: did.dispidGetDataNodeValueMethod,
  3249. GetNodeXmlAsync: did.dispidGetDataNodeXmlMethod,
  3250. GetRelativeNodesAsync: did.dispidGetDataNodesMethod,
  3251. SetNodeValueAsync: did.dispidSetDataNodeValueMethod,
  3252. SetNodeXmlAsync: did.dispidSetDataNodeXmlMethod,
  3253. AddDataPartNamespaceAsync: did.dispidAddDataNamespaceMethod,
  3254. GetDataPartNamespaceAsync: did.dispidGetDataUriByPrefixMethod,
  3255. GetDataPartPrefixAsync: did.dispidGetDataPrefixByUriMethod,
  3256. GetNodeTextAsync: did.dispidGetDataNodeTextMethod,
  3257. SetNodeTextAsync: did.dispidSetDataNodeTextMethod,
  3258. GetSelectedTask: did.dispidGetSelectedTaskMethod,
  3259. GetTask: did.dispidGetTaskMethod,
  3260. GetWSSUrl: did.dispidGetWSSUrlMethod,
  3261. GetTaskField: did.dispidGetTaskFieldMethod,
  3262. GetSelectedResource: did.dispidGetSelectedResourceMethod,
  3263. GetResourceField: did.dispidGetResourceFieldMethod,
  3264. GetProjectField: did.dispidGetProjectFieldMethod,
  3265. GetSelectedView: did.dispidGetSelectedViewMethod,
  3266. GetTaskByIndex: did.dispidGetTaskByIndexMethod,
  3267. GetResourceByIndex: did.dispidGetResourceByIndexMethod,
  3268. SetTaskField: did.dispidSetTaskFieldMethod,
  3269. SetResourceField: did.dispidSetResourceFieldMethod,
  3270. GetMaxTaskIndex: did.dispidGetMaxTaskIndexMethod,
  3271. GetMaxResourceIndex: did.dispidGetMaxResourceIndexMethod,
  3272. CreateTask: did.dispidCreateTaskMethod
  3273. };
  3274. for(var method in methodMap)
  3275. if(jsom[method])
  3276. dispIdMap[jsom[method].id]=methodMap[method];
  3277. jsom=OSF.DDA.SyncMethodNames;
  3278. did=OSF.DDA.MethodDispId;
  3279. var asyncMethodMap={
  3280. MessageParent: did.dispidMessageParentMethod,
  3281. SendMessage: did.dispidSendMessageMethod
  3282. };
  3283. for(var method in asyncMethodMap)
  3284. if(jsom[method])
  3285. dispIdMap[jsom[method].id]=asyncMethodMap[method];
  3286. jsom=Microsoft.Office.WebExtension.EventType;
  3287. did=OSF.DDA.EventDispId;
  3288. var eventMap={
  3289. SettingsChanged: did.dispidSettingsChangedEvent,
  3290. DocumentSelectionChanged: did.dispidDocumentSelectionChangedEvent,
  3291. BindingSelectionChanged: did.dispidBindingSelectionChangedEvent,
  3292. BindingDataChanged: did.dispidBindingDataChangedEvent,
  3293. ActiveViewChanged: did.dispidActiveViewChangedEvent,
  3294. OfficeThemeChanged: did.dispidOfficeThemeChangedEvent,
  3295. DocumentThemeChanged: did.dispidDocumentThemeChangedEvent,
  3296. AppCommandInvoked: did.dispidAppCommandInvokedEvent,
  3297. DialogMessageReceived: did.dispidDialogMessageReceivedEvent,
  3298. DialogParentMessageReceived: did.dispidDialogParentMessageReceivedEvent,
  3299. ItemChanged: did.dispidOlkItemSelectedChangedEvent,
  3300. TaskSelectionChanged: did.dispidTaskSelectionChangedEvent,
  3301. ResourceSelectionChanged: did.dispidResourceSelectionChangedEvent,
  3302. ViewSelectionChanged: did.dispidViewSelectionChangedEvent,
  3303. DataNodeInserted: did.dispidDataNodeAddedEvent,
  3304. DataNodeReplaced: did.dispidDataNodeReplacedEvent,
  3305. DataNodeDeleted: did.dispidDataNodeDeletedEvent
  3306. };
  3307. for(var event in eventMap)
  3308. if(jsom[event])
  3309. dispIdMap[jsom[event]]=eventMap[event];
  3310. function onException(ex, asyncMethodCall, suppliedArgs, callArgs)
  3311. {
  3312. if(typeof ex=="number")
  3313. {
  3314. if(!callArgs)
  3315. callArgs=asyncMethodCall.getCallArgs(suppliedArgs);
  3316. OSF.DDA.issueAsyncResult(callArgs,ex,OSF.DDA.ErrorCodeManager.getErrorArgs(ex))
  3317. }
  3318. else
  3319. throw ex;
  3320. }
  3321. this[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function OSF_DDA_DispIdHost_Facade$InvokeMethod(method, suppliedArguments, caller, privateState)
  3322. {
  3323. var callArgs;
  3324. try
  3325. {
  3326. var methodName=method.id;
  3327. var asyncMethodCall=OSF.DDA.AsyncMethodCalls[methodName];
  3328. callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,privateState);
  3329. var dispId=dispIdMap[methodName];
  3330. var delegate=getDelegateMethods(methodName);
  3331. var richApiInExcelMethodSubstitution=null;
  3332. if(window.Excel && window.Office.context.requirements.isSetSupported("RedirectV1Api"))
  3333. window.Excel._RedirectV1APIs=true;
  3334. if(window.Excel && window.Excel._RedirectV1APIs && (richApiInExcelMethodSubstitution=window.Excel._V1APIMap[methodName]))
  3335. {
  3336. if(richApiInExcelMethodSubstitution.preprocess)
  3337. callArgs=richApiInExcelMethodSubstitution.preprocess(callArgs);
  3338. var ctx=new window.Excel.RequestContext;
  3339. var result=richApiInExcelMethodSubstitution.call(ctx,callArgs);
  3340. ctx.sync().then(function()
  3341. {
  3342. var response=result.value;
  3343. var status=response.status;
  3344. delete response["status"];
  3345. delete response["@odata.type"];
  3346. if(richApiInExcelMethodSubstitution.postprocess)
  3347. response=richApiInExcelMethodSubstitution.postprocess(response,callArgs);
  3348. if(status !=0)
  3349. response=OSF.DDA.ErrorCodeManager.getErrorArgs(status);
  3350. OSF.DDA.issueAsyncResult(callArgs,status,response)
  3351. })["catch"](function(error)
  3352. {
  3353. OSF.DDA.issueAsyncResult(callArgs,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null)
  3354. })
  3355. }
  3356. else
  3357. {
  3358. var hostCallArgs;
  3359. if(parameterMap.toHost)
  3360. hostCallArgs=parameterMap.toHost(dispId,callArgs);
  3361. else
  3362. hostCallArgs=callArgs;
  3363. delegate[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({
  3364. dispId: dispId,
  3365. hostCallArgs: hostCallArgs,
  3366. onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling(){},
  3367. onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving(){},
  3368. onComplete: function(status, hostResponseArgs)
  3369. {
  3370. var responseArgs;
  3371. if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  3372. if(parameterMap.fromHost)
  3373. responseArgs=parameterMap.fromHost(dispId,hostResponseArgs);
  3374. else
  3375. responseArgs=hostResponseArgs;
  3376. else
  3377. responseArgs=hostResponseArgs;
  3378. var payload=asyncMethodCall.processResponse(status,responseArgs,caller,callArgs);
  3379. OSF.DDA.issueAsyncResult(callArgs,status,payload)
  3380. }
  3381. })
  3382. }
  3383. }
  3384. catch(ex)
  3385. {
  3386. onException(ex,asyncMethodCall,suppliedArguments,callArgs)
  3387. }
  3388. };
  3389. this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function OSF_DDA_DispIdHost_Facade$AddEventHandler(suppliedArguments, eventDispatch, caller)
  3390. {
  3391. var callArgs;
  3392. var eventType,
  3393. handler;
  3394. function onEnsureRegistration(status)
  3395. {
  3396. if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  3397. {
  3398. var added=eventDispatch.addEventHandler(eventType,handler);
  3399. if(!added)
  3400. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed
  3401. }
  3402. var error;
  3403. if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  3404. error=OSF.DDA.ErrorCodeManager.getErrorArgs(status);
  3405. OSF.DDA.issueAsyncResult(callArgs,status,error)
  3406. }
  3407. try
  3408. {
  3409. var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id];
  3410. callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch);
  3411. eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType];
  3412. handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler];
  3413. if(eventDispatch.getEventHandlerCount(eventType)==0)
  3414. {
  3415. var dispId=dispIdMap[eventType];
  3416. var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];
  3417. invoker({
  3418. eventType: eventType,
  3419. dispId: dispId,
  3420. targetId: caller.id || "",
  3421. onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling()
  3422. {
  3423. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)
  3424. },
  3425. onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving()
  3426. {
  3427. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)
  3428. },
  3429. onComplete: onEnsureRegistration,
  3430. onEvent: function handleEvent(hostArgs)
  3431. {
  3432. var args=parameterMap.fromHost(dispId,hostArgs);
  3433. eventDispatch.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(eventType,caller,args))
  3434. }
  3435. })
  3436. }
  3437. else
  3438. onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  3439. }
  3440. catch(ex)
  3441. {
  3442. onException(ex,asyncMethodCall,suppliedArguments,callArgs)
  3443. }
  3444. };
  3445. this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function OSF_DDA_DispIdHost_Facade$RemoveEventHandler(suppliedArguments, eventDispatch, caller)
  3446. {
  3447. var callArgs;
  3448. var eventType,
  3449. handler;
  3450. function onEnsureRegistration(status)
  3451. {
  3452. var error;
  3453. if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  3454. error=OSF.DDA.ErrorCodeManager.getErrorArgs(status);
  3455. OSF.DDA.issueAsyncResult(callArgs,status,error)
  3456. }
  3457. try
  3458. {
  3459. var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];
  3460. callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch);
  3461. eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType];
  3462. handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler];
  3463. var status,
  3464. removeSuccess;
  3465. if(handler===null)
  3466. {
  3467. removeSuccess=eventDispatch.clearEventHandlers(eventType);
  3468. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess
  3469. }
  3470. else
  3471. {
  3472. removeSuccess=eventDispatch.removeEventHandler(eventType,handler);
  3473. status=removeSuccess ? OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess : OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist
  3474. }
  3475. if(removeSuccess && eventDispatch.getEventHandlerCount(eventType)==0)
  3476. {
  3477. var dispId=dispIdMap[eventType];
  3478. var invoker=getDelegateMethods(eventType)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];
  3479. invoker({
  3480. eventType: eventType,
  3481. dispId: dispId,
  3482. targetId: caller.id || "",
  3483. onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling()
  3484. {
  3485. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)
  3486. },
  3487. onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving()
  3488. {
  3489. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)
  3490. },
  3491. onComplete: onEnsureRegistration
  3492. })
  3493. }
  3494. else
  3495. onEnsureRegistration(status)
  3496. }
  3497. catch(ex)
  3498. {
  3499. onException(ex,asyncMethodCall,suppliedArguments,callArgs)
  3500. }
  3501. };
  3502. this[OSF.DDA.DispIdHost.Methods.OpenDialog]=function OSF_DDA_DispIdHost_Facade$OpenDialog(suppliedArguments, eventDispatch, caller)
  3503. {
  3504. var callArgs;
  3505. var targetId;
  3506. var dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;
  3507. var dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived;
  3508. function onEnsureRegistration(status)
  3509. {
  3510. var payload;
  3511. if(status !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  3512. payload=OSF.DDA.ErrorCodeManager.getErrorArgs(status);
  3513. else
  3514. {
  3515. var onSucceedArgs={};
  3516. onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Id]=targetId;
  3517. onSucceedArgs[Microsoft.Office.WebExtension.Parameters.Data]=eventDispatch;
  3518. var payload=asyncMethodCall.processResponse(status,onSucceedArgs,caller,callArgs);
  3519. OSF.DialogShownStatus.hasDialogShown=true;
  3520. eventDispatch.clearEventHandlers(dialogMessageEvent);
  3521. eventDispatch.clearEventHandlers(dialogOtherEvent)
  3522. }
  3523. OSF.DDA.issueAsyncResult(callArgs,status,payload)
  3524. }
  3525. try
  3526. {
  3527. if(dialogMessageEvent==undefined || dialogOtherEvent==undefined)
  3528. onEnsureRegistration(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported);
  3529. if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync==null)
  3530. {
  3531. onEnsureRegistration(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);
  3532. return
  3533. }
  3534. var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id];
  3535. callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch);
  3536. var dispId=dispIdMap[dialogMessageEvent];
  3537. var delegateMethods=getDelegateMethods(dialogMessageEvent);
  3538. var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] !=undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];
  3539. targetId=JSON.stringify(callArgs);
  3540. invoker({
  3541. eventType: dialogMessageEvent,
  3542. dispId: dispId,
  3543. targetId: targetId,
  3544. onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling()
  3545. {
  3546. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)
  3547. },
  3548. onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving()
  3549. {
  3550. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)
  3551. },
  3552. onComplete: onEnsureRegistration,
  3553. onEvent: function handleEvent(hostArgs)
  3554. {
  3555. var args=parameterMap.fromHost(dispId,hostArgs);
  3556. var event=OSF.DDA.OMFactory.manufactureEventArgs(dialogMessageEvent,caller,args);
  3557. if(event.type==dialogOtherEvent)
  3558. {
  3559. var payload=OSF.DDA.ErrorCodeManager.getErrorArgs(event.error);
  3560. var errorArgs={};
  3561. errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  3562. errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=payload.name || payload;
  3563. errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=payload.message || payload;
  3564. event.error=new OSF.DDA.Error(errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])
  3565. }
  3566. eventDispatch.fireOrQueueEvent(event);
  3567. if(args[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed)
  3568. {
  3569. eventDispatch.clearEventHandlers(dialogMessageEvent);
  3570. eventDispatch.clearEventHandlers(dialogOtherEvent);
  3571. eventDispatch.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived);
  3572. OSF.DialogShownStatus.hasDialogShown=false
  3573. }
  3574. }
  3575. })
  3576. }
  3577. catch(ex)
  3578. {
  3579. onException(ex,asyncMethodCall,suppliedArguments,callArgs)
  3580. }
  3581. };
  3582. this[OSF.DDA.DispIdHost.Methods.CloseDialog]=function OSF_DDA_DispIdHost_Facade$CloseDialog(suppliedArguments, targetId, eventDispatch, caller)
  3583. {
  3584. var callArgs;
  3585. var dialogMessageEvent,
  3586. dialogOtherEvent;
  3587. var closeStatus=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;
  3588. function closeCallback(status)
  3589. {
  3590. closeStatus=status;
  3591. OSF.DialogShownStatus.hasDialogShown=false
  3592. }
  3593. try
  3594. {
  3595. var asyncMethodCall=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id];
  3596. callArgs=asyncMethodCall.verifyAndExtractCall(suppliedArguments,caller,eventDispatch);
  3597. dialogMessageEvent=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;
  3598. dialogOtherEvent=Microsoft.Office.WebExtension.EventType.DialogEventReceived;
  3599. eventDispatch.clearEventHandlers(dialogMessageEvent);
  3600. eventDispatch.clearEventHandlers(dialogOtherEvent);
  3601. var dispId=dispIdMap[dialogMessageEvent];
  3602. var delegateMethods=getDelegateMethods(dialogMessageEvent);
  3603. var invoker=delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] !=undefined ? delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog] : delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];
  3604. invoker({
  3605. eventType: dialogMessageEvent,
  3606. dispId: dispId,
  3607. targetId: targetId,
  3608. onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling()
  3609. {
  3610. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)
  3611. },
  3612. onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving()
  3613. {
  3614. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)
  3615. },
  3616. onComplete: closeCallback
  3617. })
  3618. }
  3619. catch(ex)
  3620. {
  3621. onException(ex,asyncMethodCall,suppliedArguments,callArgs)
  3622. }
  3623. if(closeStatus !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  3624. throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,closeStatus);
  3625. };
  3626. this[OSF.DDA.DispIdHost.Methods.MessageParent]=function OSF_DDA_DispIdHost_Facade$MessageParent(suppliedArguments, caller)
  3627. {
  3628. var stateInfo={};
  3629. var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id];
  3630. var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo);
  3631. var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.MessageParent.id);
  3632. var invoker=delegate[OSF.DDA.DispIdHost.Delegates.MessageParent];
  3633. var dispId=dispIdMap[OSF.DDA.SyncMethodNames.MessageParent.id];
  3634. return invoker({
  3635. dispId: dispId,
  3636. hostCallArgs: callArgs,
  3637. onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling()
  3638. {
  3639. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)
  3640. },
  3641. onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving()
  3642. {
  3643. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)
  3644. }
  3645. })
  3646. };
  3647. this[OSF.DDA.DispIdHost.Methods.SendMessage]=function OSF_DDA_DispIdHost_Facade$SendMessage(suppliedArguments, eventDispatch, caller)
  3648. {
  3649. var stateInfo={};
  3650. var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id];
  3651. var callArgs=syncMethodCall.verifyAndExtractCall(suppliedArguments,caller,stateInfo);
  3652. var delegate=getDelegateMethods(OSF.DDA.SyncMethodNames.SendMessage.id);
  3653. var invoker=delegate[OSF.DDA.DispIdHost.Delegates.SendMessage];
  3654. var dispId=dispIdMap[OSF.DDA.SyncMethodNames.SendMessage.id];
  3655. return invoker({
  3656. dispId: dispId,
  3657. hostCallArgs: callArgs,
  3658. onCalling: function OSF_DDA_DispIdFacade$Execute_onCalling()
  3659. {
  3660. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)
  3661. },
  3662. onReceiving: function OSF_DDA_DispIdFacade$Execute_onReceiving()
  3663. {
  3664. OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)
  3665. }
  3666. })
  3667. }
  3668. };
  3669. OSF.DDA.DispIdHost.addAsyncMethods=function OSF_DDA_DispIdHost$AddAsyncMethods(target, asyncMethodNames, privateState)
  3670. {
  3671. for(var entry in asyncMethodNames)
  3672. {
  3673. var method=asyncMethodNames[entry];
  3674. var name=method.displayName;
  3675. if(!target[name])
  3676. OSF.OUtil.defineEnumerableProperty(target,name,{value: function(asyncMethod)
  3677. {
  3678. return function()
  3679. {
  3680. var invokeMethod=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod];
  3681. invokeMethod(asyncMethod,arguments,target,privateState)
  3682. }
  3683. }(method)})
  3684. }
  3685. };
  3686. OSF.DDA.DispIdHost.addEventSupport=function OSF_DDA_DispIdHost$AddEventSupport(target, eventDispatch)
  3687. {
  3688. var add=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName;
  3689. var remove=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;
  3690. if(!target[add])
  3691. OSF.OUtil.defineEnumerableProperty(target,add,{value: function()
  3692. {
  3693. var addEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler];
  3694. addEventHandler(arguments,eventDispatch,target)
  3695. }});
  3696. if(!target[remove])
  3697. OSF.OUtil.defineEnumerableProperty(target,remove,{value: function()
  3698. {
  3699. var removeEventHandler=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler];
  3700. removeEventHandler(arguments,eventDispatch,target)
  3701. }})
  3702. };
  3703. OSF.OUtil.setNamespace("SafeArray",OSF.DDA);
  3704. OSF.DDA.SafeArray.Response={
  3705. Status: 0,
  3706. Payload: 1
  3707. };
  3708. OSF.DDA.SafeArray.UniqueArguments={
  3709. Offset: "offset",
  3710. Run: "run",
  3711. BindingSpecificData: "bindingSpecificData",
  3712. MergedCellGuid: "{66e7831f-81b2-42e2-823c-89e872d541b3}"
  3713. };
  3714. OSF.OUtil.setNamespace("Delegate",OSF.DDA.SafeArray);
  3715. OSF.DDA.SafeArray.Delegate._onException=function OSF_DDA_SafeArray_Delegate$OnException(ex, args)
  3716. {
  3717. var status;
  3718. var statusNumber=ex.number;
  3719. if(statusNumber)
  3720. switch(statusNumber)
  3721. {
  3722. case-2146828218:
  3723. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;
  3724. break;
  3725. case-2147467259:
  3726. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened;
  3727. break;
  3728. case-2146828283:
  3729. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam;
  3730. break;
  3731. case-2147209089:
  3732. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidParam;
  3733. break;
  3734. case-2146827850:
  3735. default:
  3736. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  3737. break
  3738. }
  3739. if(args.onComplete)
  3740. args.onComplete(status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)
  3741. };
  3742. OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod=function OSF_DDA_SafeArray_Delegate$OnExceptionSyncMethod(ex, args)
  3743. {
  3744. var status;
  3745. var number=ex.number;
  3746. if(number)
  3747. switch(number)
  3748. {
  3749. case-2146828218:
  3750. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;
  3751. break;
  3752. case-2146827850:
  3753. default:
  3754. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  3755. break
  3756. }
  3757. return status || OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError
  3758. };
  3759. OSF.DDA.SafeArray.Delegate.SpecialProcessor=function OSF_DDA_SafeArray_Delegate_SpecialProcessor()
  3760. {
  3761. function _2DVBArrayToJaggedArray(vbArr)
  3762. {
  3763. var ret;
  3764. try
  3765. {
  3766. var rows=vbArr.ubound(1);
  3767. var cols=vbArr.ubound(2);
  3768. vbArr=vbArr.toArray();
  3769. if(rows==1 && cols==1)
  3770. ret=[vbArr];
  3771. else
  3772. {
  3773. ret=[];
  3774. for(var row=0; row < rows; row++)
  3775. {
  3776. var rowArr=[];
  3777. for(var col=0; col < cols; col++)
  3778. {
  3779. var datum=vbArr[row * cols+col];
  3780. if(datum !=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid)
  3781. rowArr.push(datum)
  3782. }
  3783. if(rowArr.length > 0)
  3784. ret.push(rowArr)
  3785. }
  3786. }
  3787. }
  3788. catch(ex){}
  3789. return ret
  3790. }
  3791. var complexTypes=[];
  3792. var dynamicTypes={};
  3793. dynamicTypes[Microsoft.Office.WebExtension.Parameters.Data]=function()
  3794. {
  3795. var tableRows=0;
  3796. var tableHeaders=1;
  3797. return{
  3798. toHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$toHost(data)
  3799. {
  3800. if(OSF.DDA.TableDataProperties && typeof data !="string" && data[OSF.DDA.TableDataProperties.TableRows] !==undefined)
  3801. {
  3802. var tableData=[];
  3803. tableData[tableRows]=data[OSF.DDA.TableDataProperties.TableRows];
  3804. tableData[tableHeaders]=data[OSF.DDA.TableDataProperties.TableHeaders];
  3805. data=tableData
  3806. }
  3807. return data
  3808. },
  3809. fromHost: function OSF_DDA_SafeArray_Delegate_SpecialProcessor_Data$fromHost(hostArgs)
  3810. {
  3811. var ret;
  3812. if(hostArgs.toArray)
  3813. {
  3814. var dimensions=hostArgs.dimensions();
  3815. if(dimensions===2)
  3816. ret=_2DVBArrayToJaggedArray(hostArgs);
  3817. else
  3818. {
  3819. var array=hostArgs.toArray();
  3820. if(array.length===2 && (array[0] !=null && array[0].toArray || array[1] !=null && array[1].toArray))
  3821. {
  3822. ret={};
  3823. ret[OSF.DDA.TableDataProperties.TableRows]=_2DVBArrayToJaggedArray(array[tableRows]);
  3824. ret[OSF.DDA.TableDataProperties.TableHeaders]=_2DVBArrayToJaggedArray(array[tableHeaders])
  3825. }
  3826. else
  3827. ret=array
  3828. }
  3829. }
  3830. else
  3831. ret=hostArgs;
  3832. return ret
  3833. }
  3834. }
  3835. }();
  3836. OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,complexTypes,dynamicTypes);
  3837. this.unpack=function OSF_DDA_SafeArray_Delegate_SpecialProcessor$unpack(param, arg)
  3838. {
  3839. var value;
  3840. if(this.isComplexType(param) || OSF.DDA.ListType.isListType(param))
  3841. {
  3842. var toArraySupported=(arg || typeof arg==="unknown") && arg.toArray;
  3843. value=toArraySupported ? arg.toArray() : arg || {}
  3844. }
  3845. else if(this.isDynamicType(param))
  3846. value=dynamicTypes[param].fromHost(arg);
  3847. else
  3848. value=arg;
  3849. return value
  3850. }
  3851. };
  3852. OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);
  3853. OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{
  3854. type: Microsoft.Office.WebExtension.Parameters.ValueFormat,
  3855. toHost: [{
  3856. name: Microsoft.Office.WebExtension.ValueFormat.Unformatted,
  3857. value: 0
  3858. },{
  3859. name: Microsoft.Office.WebExtension.ValueFormat.Formatted,
  3860. value: 1
  3861. }]
  3862. },{
  3863. type: Microsoft.Office.WebExtension.Parameters.FilterType,
  3864. toHost: [{
  3865. name: Microsoft.Office.WebExtension.FilterType.All,
  3866. value: 0
  3867. }]
  3868. }]);
  3869. OSF.DDA.SafeArray.Delegate.ParameterMap.define({
  3870. type: OSF.DDA.PropertyDescriptors.AsyncResultStatus,
  3871. fromHost: [{
  3872. name: Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,
  3873. value: 0
  3874. },{
  3875. name: Microsoft.Office.WebExtension.AsyncResultStatus.Failed,
  3876. value: 1
  3877. }]
  3878. });
  3879. OSF.DDA.SafeArray.Delegate.executeAsync=function OSF_DDA_SafeArray_Delegate$ExecuteAsync(args)
  3880. {
  3881. function toArray(args)
  3882. {
  3883. var arrArgs=args;
  3884. if(OSF.OUtil.isArray(args))
  3885. {
  3886. var len=arrArgs.length;
  3887. for(var i=0; i < len; i++)
  3888. arrArgs[i]=toArray(arrArgs[i])
  3889. }
  3890. else if(OSF.OUtil.isDate(args))
  3891. arrArgs=args.getVarDate();
  3892. else if(typeof args==="object" && !OSF.OUtil.isArray(args))
  3893. {
  3894. arrArgs=[];
  3895. for(var index in args)
  3896. if(!OSF.OUtil.isFunction(args[index]))
  3897. arrArgs[index]=toArray(args[index])
  3898. }
  3899. return arrArgs
  3900. }
  3901. function fromSafeArray(value)
  3902. {
  3903. var ret=value;
  3904. if(value !=null && value.toArray)
  3905. {
  3906. var arrayResult=value.toArray();
  3907. ret=new Array(arrayResult.length);
  3908. for(var i=0; i < arrayResult.length; i++)
  3909. ret[i]=fromSafeArray(arrayResult[i])
  3910. }
  3911. return ret
  3912. }
  3913. try
  3914. {
  3915. if(args.onCalling)
  3916. args.onCalling();
  3917. var startTime=(new Date).getTime();
  3918. OSF.ClientHostController.execute(args.dispId,toArray(args.hostCallArgs),function OSF_DDA_SafeArrayFacade$Execute_OnResponse(hostResponseArgs, resultCode)
  3919. {
  3920. var result=hostResponseArgs.toArray();
  3921. var status=result[OSF.DDA.SafeArray.Response.Status];
  3922. if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeChunkResult)
  3923. {
  3924. var payload=result[OSF.DDA.SafeArray.Response.Payload];
  3925. payload=fromSafeArray(payload);
  3926. if(payload !=null)
  3927. {
  3928. if(!args._chunkResultData)
  3929. args._chunkResultData=new Array;
  3930. args._chunkResultData[payload[0]]=payload[1]
  3931. }
  3932. return false
  3933. }
  3934. if(args.onReceiving)
  3935. args.onReceiving();
  3936. if(args.onComplete)
  3937. {
  3938. var payload;
  3939. if(status==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  3940. {
  3941. if(result.length > 2)
  3942. {
  3943. payload=[];
  3944. for(var i=1; i < result.length; i++)
  3945. payload[i - 1]=result[i]
  3946. }
  3947. else
  3948. payload=result[OSF.DDA.SafeArray.Response.Payload];
  3949. if(args._chunkResultData)
  3950. {
  3951. payload=fromSafeArray(payload);
  3952. if(payload !=null)
  3953. {
  3954. var expectedChunkCount=payload[payload.length - 1];
  3955. if(args._chunkResultData.length==expectedChunkCount)
  3956. payload[payload.length - 1]=args._chunkResultData;
  3957. else
  3958. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError
  3959. }
  3960. }
  3961. }
  3962. else
  3963. payload=result[OSF.DDA.SafeArray.Response.Payload];
  3964. args.onComplete(status,payload)
  3965. }
  3966. if(OSF.AppTelemetry)
  3967. OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),status);
  3968. return true
  3969. })
  3970. }
  3971. catch(ex)
  3972. {
  3973. OSF.DDA.SafeArray.Delegate._onException(ex,args)
  3974. }
  3975. };
  3976. OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function OSF_DDA_SafeArrayDelegate$GetOnAfterRegisterEvent(register, args)
  3977. {
  3978. var startTime=(new Date).getTime();
  3979. return function OSF_DDA_SafeArrayDelegate$OnAfterRegisterEvent(hostResponseArgs)
  3980. {
  3981. if(args.onReceiving)
  3982. args.onReceiving();
  3983. var status=hostResponseArgs.toArray ? hostResponseArgs.toArray()[OSF.DDA.SafeArray.Response.Status] : hostResponseArgs;
  3984. if(args.onComplete)
  3985. args.onComplete(status);
  3986. if(OSF.AppTelemetry)
  3987. OSF.AppTelemetry.onRegisterDone(register,args.dispId,Math.abs((new Date).getTime() - startTime),status)
  3988. }
  3989. };
  3990. OSF.DDA.SafeArray.Delegate.registerEventAsync=function OSF_DDA_SafeArray_Delegate$RegisterEventAsync(args)
  3991. {
  3992. if(args.onCalling)
  3993. args.onCalling();
  3994. var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args);
  3995. try
  3996. {
  3997. OSF.ClientHostController.registerEvent(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload)
  3998. {
  3999. if(args.onEvent)
  4000. args.onEvent(payload);
  4001. if(OSF.AppTelemetry)
  4002. OSF.AppTelemetry.onEventDone(args.dispId)
  4003. },callback)
  4004. }
  4005. catch(ex)
  4006. {
  4007. OSF.DDA.SafeArray.Delegate._onException(ex,args)
  4008. }
  4009. };
  4010. OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function OSF_DDA_SafeArray_Delegate$UnregisterEventAsync(args)
  4011. {
  4012. if(args.onCalling)
  4013. args.onCalling();
  4014. var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args);
  4015. try
  4016. {
  4017. OSF.ClientHostController.unregisterEvent(args.dispId,args.targetId,callback)
  4018. }
  4019. catch(ex)
  4020. {
  4021. OSF.DDA.SafeArray.Delegate._onException(ex,args)
  4022. }
  4023. };
  4024. OSF.ClientMode={
  4025. ReadWrite: 0,
  4026. ReadOnly: 1
  4027. };
  4028. OSF.DDA.RichInitializationReason={
  4029. 1: Microsoft.Office.WebExtension.InitializationReason.Inserted,
  4030. 2: Microsoft.Office.WebExtension.InitializationReason.DocumentOpened
  4031. };
  4032. OSF.InitializationHelper=function OSF_InitializationHelper(hostInfo, webAppState, context, settings, hostFacade)
  4033. {
  4034. this._hostInfo=hostInfo;
  4035. this._webAppState=webAppState;
  4036. this._context=context;
  4037. this._settings=settings;
  4038. this._hostFacade=hostFacade;
  4039. this._initializeSettings=this.initializeSettings
  4040. };
  4041. OSF.InitializationHelper.prototype.deserializeSettings=function OSF_InitializationHelper$deserializeSettings(serializedSettings, refreshSupported)
  4042. {
  4043. var settings;
  4044. var osfSessionStorage=OSF.OUtil.getSessionStorage();
  4045. if(osfSessionStorage)
  4046. {
  4047. var storageSettings=osfSessionStorage.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());
  4048. if(storageSettings)
  4049. serializedSettings=JSON.parse(storageSettings);
  4050. else
  4051. {
  4052. storageSettings=JSON.stringify(serializedSettings);
  4053. osfSessionStorage.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),storageSettings)
  4054. }
  4055. }
  4056. var deserializedSettings=OSF.DDA.SettingsManager.deserializeSettings(serializedSettings);
  4057. if(refreshSupported)
  4058. settings=new OSF.DDA.RefreshableSettings(deserializedSettings);
  4059. else
  4060. settings=new OSF.DDA.Settings(deserializedSettings);
  4061. return settings
  4062. };
  4063. OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function OSF_InitializationHelper$saveAndSetDialogInfo(hostInfoValue){};
  4064. OSF.InitializationHelper.prototype.setAgaveHostCommunication=function OSF_InitializationHelper$setAgaveHostCommunication(){};
  4065. OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function OSF_InitializationHelper$prepareRightBeforeWebExtensionInitialize(appContext)
  4066. {
  4067. this.prepareApiSurface(appContext);
  4068. Microsoft.Office.WebExtension.initialize(this.getInitializationReason(appContext))
  4069. };
  4070. OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_InitializationHelper$prepareApiSurfaceAndInitialize(appContext)
  4071. {
  4072. var license=new OSF.DDA.License(appContext.get_eToken());
  4073. var getOfficeThemeHandler=OSF.DDA.OfficeTheme && OSF.DDA.OfficeTheme.getOfficeTheme ? OSF.DDA.OfficeTheme.getOfficeTheme : null;
  4074. if(appContext.get_isDialog())
  4075. {
  4076. if(OSF.DDA.UI.ChildUI)
  4077. appContext.ui=new OSF.DDA.UI.ChildUI
  4078. }
  4079. else if(OSF.DDA.UI.ParentUI)
  4080. {
  4081. appContext.ui=new OSF.DDA.UI.ParentUI;
  4082. if(OfficeExt.Container)
  4083. OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync])
  4084. }
  4085. OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(appContext,appContext.doc,license,null,getOfficeThemeHandler));
  4086. var getDelegateMethods,
  4087. parameterMap;
  4088. getDelegateMethods=OSF.DDA.DispIdHost.getClientDelegateMethods;
  4089. parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap;
  4090. OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(getDelegateMethods,parameterMap))
  4091. };
  4092. OSF.InitializationHelper.prototype.getInitializationReason=function(appContext)
  4093. {
  4094. return OSF.DDA.RichInitializationReason[appContext.get_reason()]
  4095. };
  4096. OSF.DDA.DispIdHost.getClientDelegateMethods=function(actionId)
  4097. {
  4098. var delegateMethods={};
  4099. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync;
  4100. delegateMethods[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync;
  4101. delegateMethods[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync;
  4102. delegateMethods[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.SafeArray.Delegate.openDialog;
  4103. delegateMethods[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.SafeArray.Delegate.closeDialog;
  4104. delegateMethods[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.SafeArray.Delegate.messageParent;
  4105. if(OSF.DDA.AsyncMethodNames.RefreshAsync && actionId==OSF.DDA.AsyncMethodNames.RefreshAsync.id)
  4106. {
  4107. var readSerializedSettings=function(hostCallArgs, onCalling, onReceiving)
  4108. {
  4109. return OSF.DDA.ClientSettingsManager.read(onCalling,onReceiving)
  4110. };
  4111. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(readSerializedSettings)
  4112. }
  4113. if(OSF.DDA.AsyncMethodNames.SaveAsync && actionId==OSF.DDA.AsyncMethodNames.SaveAsync.id)
  4114. {
  4115. var writeSerializedSettings=function(hostCallArgs, onCalling, onReceiving)
  4116. {
  4117. return OSF.DDA.ClientSettingsManager.write(hostCallArgs[OSF.DDA.SettingsManager.SerializedSettings],hostCallArgs[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],onCalling,onReceiving)
  4118. };
  4119. delegateMethods[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(writeSerializedSettings)
  4120. }
  4121. return delegateMethods
  4122. };
  4123. var OfficeExt;
  4124. (function(OfficeExt)
  4125. {
  4126. var RichClientHostController=function()
  4127. {
  4128. function RichClientHostController(){}
  4129. RichClientHostController.prototype.execute=function(id, params, callback)
  4130. {
  4131. window.external.Execute(id,params,callback)
  4132. };
  4133. RichClientHostController.prototype.registerEvent=function(id, targetId, handler, callback)
  4134. {
  4135. window.external.RegisterEvent(id,targetId,handler,callback)
  4136. };
  4137. RichClientHostController.prototype.unregisterEvent=function(id, targetId, callback)
  4138. {
  4139. window.external.UnregisterEvent(id,targetId,callback)
  4140. };
  4141. return RichClientHostController
  4142. }();
  4143. OfficeExt.RichClientHostController=RichClientHostController
  4144. })(OfficeExt || (OfficeExt={}));
  4145. var OfficeExt;
  4146. (function(OfficeExt)
  4147. {
  4148. var Win32RichClientHostController=function(_super)
  4149. {
  4150. __extends(Win32RichClientHostController,_super);
  4151. function Win32RichClientHostController()
  4152. {
  4153. _super.apply(this,arguments)
  4154. }
  4155. Win32RichClientHostController.prototype.messageParent=function(params)
  4156. {
  4157. var message=params[Microsoft.Office.WebExtension.Parameters.MessageToParent];
  4158. window.external.MessageParent(message)
  4159. };
  4160. Win32RichClientHostController.prototype.openDialog=function(id, targetId, handler, callback)
  4161. {
  4162. this.registerEvent(id,targetId,handler,callback)
  4163. };
  4164. Win32RichClientHostController.prototype.closeDialog=function(id, targetId, callback)
  4165. {
  4166. this.unregisterEvent(id,targetId,callback)
  4167. };
  4168. return Win32RichClientHostController
  4169. }(OfficeExt.RichClientHostController);
  4170. OfficeExt.Win32RichClientHostController=Win32RichClientHostController
  4171. })(OfficeExt || (OfficeExt={}));
  4172. OSF.ClientHostController=new OfficeExt.Win32RichClientHostController;
  4173. var OfficeExt;
  4174. (function(OfficeExt)
  4175. {
  4176. var OfficeTheme;
  4177. (function(OfficeTheme)
  4178. {
  4179. var OfficeThemeManager=function()
  4180. {
  4181. function OfficeThemeManager()
  4182. {
  4183. this._osfOfficeTheme=null;
  4184. this._osfOfficeThemeTimeStamp=null
  4185. }
  4186. OfficeThemeManager.prototype.getOfficeTheme=function()
  4187. {
  4188. if(OSF.DDA._OsfControlContext)
  4189. {
  4190. if(this._osfOfficeTheme && this._osfOfficeThemeTimeStamp && (new Date).getTime() - this._osfOfficeThemeTimeStamp < OfficeThemeManager._osfOfficeThemeCacheValidPeriod)
  4191. {
  4192. if(OSF.AppTelemetry)
  4193. OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",0)
  4194. }
  4195. else
  4196. {
  4197. var startTime=(new Date).getTime();
  4198. var osfOfficeTheme=OSF.DDA._OsfControlContext.GetOfficeThemeInfo();
  4199. var endTime=(new Date).getTime();
  4200. if(OSF.AppTelemetry)
  4201. OSF.AppTelemetry.onPropertyDone("GetOfficeThemeInfo",Math.abs(endTime - startTime));
  4202. this._osfOfficeTheme=JSON.parse(osfOfficeTheme);
  4203. for(var color in this._osfOfficeTheme)
  4204. this._osfOfficeTheme[color]=OSF.OUtil.convertIntToCssHexColor(this._osfOfficeTheme[color]);
  4205. this._osfOfficeThemeTimeStamp=endTime
  4206. }
  4207. return this._osfOfficeTheme
  4208. }
  4209. };
  4210. OfficeThemeManager.instance=function()
  4211. {
  4212. if(OfficeThemeManager._instance==null)
  4213. OfficeThemeManager._instance=new OfficeThemeManager;
  4214. return OfficeThemeManager._instance
  4215. };
  4216. OfficeThemeManager._osfOfficeThemeCacheValidPeriod=5e3;
  4217. OfficeThemeManager._instance=null;
  4218. return OfficeThemeManager
  4219. }();
  4220. OfficeTheme.OfficeThemeManager=OfficeThemeManager;
  4221. OSF.OUtil.setNamespace("OfficeTheme",OSF.DDA);
  4222. OSF.DDA.OfficeTheme.getOfficeTheme=OfficeExt.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme
  4223. })(OfficeTheme=OfficeExt.OfficeTheme || (OfficeExt.OfficeTheme={}))
  4224. })(OfficeExt || (OfficeExt={}));
  4225. OSF.DDA.ClientSettingsManager={
  4226. getSettingsExecuteMethod: function OSF_DDA_ClientSettingsManager$getSettingsExecuteMethod(hostDelegateMethod)
  4227. {
  4228. return function(args)
  4229. {
  4230. var status,
  4231. response;
  4232. try
  4233. {
  4234. response=hostDelegateMethod(args.hostCallArgs,args.onCalling,args.onReceiving);
  4235. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess
  4236. }
  4237. catch(ex)
  4238. {
  4239. status=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;
  4240. response={
  4241. name: Strings.OfficeOM.L_InternalError,
  4242. message: ex
  4243. }
  4244. }
  4245. if(args.onComplete)
  4246. args.onComplete(status,response)
  4247. }
  4248. },
  4249. read: function OSF_DDA_ClientSettingsManager$read(onCalling, onReceiving)
  4250. {
  4251. var keys=[];
  4252. var values=[];
  4253. if(onCalling)
  4254. onCalling();
  4255. OSF.DDA._OsfControlContext.GetSettings().Read(keys,values);
  4256. if(onReceiving)
  4257. onReceiving();
  4258. var serializedSettings={};
  4259. for(var index=0; index < keys.length; index++)
  4260. serializedSettings[keys[index]]=values[index];
  4261. return serializedSettings
  4262. },
  4263. write: function OSF_DDA_ClientSettingsManager$write(serializedSettings, overwriteIfStale, onCalling, onReceiving)
  4264. {
  4265. var keys=[];
  4266. var values=[];
  4267. for(var key in serializedSettings)
  4268. {
  4269. keys.push(key);
  4270. values.push(serializedSettings[key])
  4271. }
  4272. if(onCalling)
  4273. onCalling();
  4274. OSF.DDA._OsfControlContext.GetSettings().Write(keys,values);
  4275. if(onReceiving)
  4276. onReceiving()
  4277. }
  4278. };
  4279. OSF.InitializationHelper.prototype.initializeSettings=function OSF_InitializationHelper$initializeSettings(refreshSupported)
  4280. {
  4281. var serializedSettings=OSF.DDA.ClientSettingsManager.read();
  4282. var settings=this.deserializeSettings(serializedSettings,refreshSupported);
  4283. return settings
  4284. };
  4285. OSF.InitializationHelper.prototype.getAppContext=function OSF_InitializationHelper$getAppContext(wnd, gotAppContext)
  4286. {
  4287. var returnedContext;
  4288. var context;
  4289. var warningText="Warning: Office.js is loaded outside of Office client";
  4290. try
  4291. {
  4292. if(window.external && typeof window.external.GetContext !=="undefined")
  4293. context=OSF.DDA._OsfControlContext=window.external.GetContext();
  4294. else
  4295. {
  4296. OsfMsAjaxFactory.msAjaxDebug.trace(warningText);
  4297. return
  4298. }
  4299. }
  4300. catch(e)
  4301. {
  4302. OsfMsAjaxFactory.msAjaxDebug.trace(warningText);
  4303. return
  4304. }
  4305. var appType=context.GetAppType();
  4306. var id=context.GetSolutionRef();
  4307. var version=context.GetAppVersionMajor();
  4308. var minorVersion=context.GetAppVersionMinor();
  4309. var UILocale=context.GetAppUILocale();
  4310. var dataLocale=context.GetAppDataLocale();
  4311. var docUrl=context.GetDocUrl();
  4312. var clientMode=context.GetAppCapabilities();
  4313. var reason=context.GetActivationMode();
  4314. var osfControlType=context.GetControlIntegrationLevel();
  4315. var settings=[];
  4316. var eToken;
  4317. try
  4318. {
  4319. eToken=context.GetSolutionToken()
  4320. }
  4321. catch(ex){}
  4322. var correlationId;
  4323. if(typeof context.GetCorrelationId !=="undefined")
  4324. correlationId=context.GetCorrelationId();
  4325. var appInstanceId;
  4326. if(typeof context.GetInstanceId !=="undefined")
  4327. appInstanceId=context.GetInstanceId();
  4328. var touchEnabled;
  4329. if(typeof context.GetTouchEnabled !=="undefined")
  4330. touchEnabled=context.GetTouchEnabled();
  4331. var commerceAllowed;
  4332. if(typeof context.GetCommerceAllowed !=="undefined")
  4333. commerceAllowed=context.GetCommerceAllowed();
  4334. var requirementMatrix;
  4335. if(typeof context.GetSupportedMatrix !=="undefined")
  4336. requirementMatrix=context.GetSupportedMatrix();
  4337. var hostCustomMessage;
  4338. if(typeof context.GetHostCustomMessage !=="undefined")
  4339. hostCustomMessage=context.GetHostCustomMessage();
  4340. var hostFullVersion;
  4341. if(typeof context.GetHostFullVersion !=="undefined")
  4342. hostFullVersion=context.GetHostFullVersion();
  4343. var dialogRequirementMatrix;
  4344. if(typeof context.GetDialogRequirementMatrix !="undefined")
  4345. dialogRequirementMatrix=context.GetDialogRequirementMatrix();
  4346. eToken=eToken ? eToken.toString() : "";
  4347. returnedContext=new OSF.OfficeAppContext(id,appType,version,UILocale,dataLocale,docUrl,clientMode,settings,reason,osfControlType,eToken,correlationId,appInstanceId,touchEnabled,commerceAllowed,minorVersion,requirementMatrix,hostCustomMessage,hostFullVersion,undefined,undefined,undefined,dialogRequirementMatrix);
  4348. if(OSF.AppTelemetry)
  4349. OSF.AppTelemetry.initialize(returnedContext);
  4350. gotAppContext(returnedContext)
  4351. };
  4352. (function()
  4353. {
  4354. var checkScriptOverride=function OSF$checkScriptOverride()
  4355. {
  4356. var postScriptOverrideCheckAction=function OSF$postScriptOverrideCheckAction(customizedScriptPath)
  4357. {
  4358. if(customizedScriptPath)
  4359. OSF.OUtil.loadScript(customizedScriptPath,function()
  4360. {
  4361. OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:"+customizedScriptPath)
  4362. })
  4363. };
  4364. var conversationID,
  4365. webAppUrl,
  4366. items;
  4367. var clientEndPoint=null;
  4368. var xdmInfoValue=OSF.OUtil.parseXdmInfo();
  4369. if(xdmInfoValue)
  4370. {
  4371. items=OSF.OUtil.getInfoItems(xdmInfoValue);
  4372. if(items && items.length >=3)
  4373. {
  4374. conversationID=items[0];
  4375. webAppUrl=items[2];
  4376. var serializerVersion=OSF.OUtil.parseSerializerVersionWithGivenFragment(false,OSF._OfficeAppFactory.getWindowLocationHash());
  4377. if(isNaN(serializerVersion) && OSF._OfficeAppFactory.getWindowName)
  4378. serializerVersion=OSF.OUtil.parseSerializerVersionFromWindowName(false,OSF._OfficeAppFactory.getWindowName());
  4379. clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(conversationID,window.parent,webAppUrl,serializerVersion)
  4380. }
  4381. }
  4382. var customizedScriptPath=null;
  4383. if(!clientEndPoint)
  4384. {
  4385. try
  4386. {
  4387. if(window.external && typeof window.external.getCustomizedScriptPath !=="undefined")
  4388. customizedScriptPath=window.external.getCustomizedScriptPath()
  4389. }
  4390. catch(ex)
  4391. {
  4392. OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")
  4393. }
  4394. postScriptOverrideCheckAction(customizedScriptPath)
  4395. }
  4396. else
  4397. try
  4398. {
  4399. clientEndPoint.invoke("getCustomizedScriptPathAsync",function OSF$getCustomizedScriptPathAsyncCallback(errorCode, scriptPath)
  4400. {
  4401. postScriptOverrideCheckAction(errorCode===0 ? scriptPath : null)
  4402. },{__timeout__: 1e3})
  4403. }
  4404. catch(ex)
  4405. {
  4406. OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")
  4407. }
  4408. };
  4409. var requiresMsAjax=true;
  4410. if(requiresMsAjax && !OsfMsAjaxFactory.isMsAjaxLoaded())
  4411. if(!(OSF._OfficeAppFactory && OSF._OfficeAppFactory && OSF._OfficeAppFactory.getLoadScriptHelper && OSF._OfficeAppFactory.getLoadScriptHelper().isScriptLoading(OSF.ConstantNames.MicrosoftAjaxId)))
  4412. OsfMsAjaxFactory.loadMsAjaxFull(function OSF$loadMSAjaxCallback()
  4413. {
  4414. if(OsfMsAjaxFactory.isMsAjaxLoaded())
  4415. checkScriptOverride();
  4416. else
  4417. throw"Not able to load MicrosoftAjax.js.";
  4418. });
  4419. else
  4420. OSF._OfficeAppFactory.getLoadScriptHelper().waitForScripts([OSF.ConstantNames.MicrosoftAjaxId],checkScriptOverride);
  4421. else
  4422. checkScriptOverride()
  4423. })();
  4424. Microsoft.Office.WebExtension.EventType={};
  4425. OSF.EventDispatch=function OSF_EventDispatch(eventTypes)
  4426. {
  4427. this._eventHandlers={};
  4428. this._queuedEventsArgs={};
  4429. for(var entry in eventTypes)
  4430. {
  4431. var eventType=eventTypes[entry];
  4432. this._eventHandlers[eventType]=[];
  4433. this._queuedEventsArgs[eventType]=[]
  4434. }
  4435. };
  4436. OSF.EventDispatch.prototype={
  4437. getSupportedEvents: function OSF_EventDispatch$getSupportedEvents()
  4438. {
  4439. var events=[];
  4440. for(var eventName in this._eventHandlers)
  4441. events.push(eventName);
  4442. return events
  4443. },
  4444. supportsEvent: function OSF_EventDispatch$supportsEvent(event)
  4445. {
  4446. var isSupported=false;
  4447. for(var eventName in this._eventHandlers)
  4448. if(event==eventName)
  4449. {
  4450. isSupported=true;
  4451. break
  4452. }
  4453. return isSupported
  4454. },
  4455. hasEventHandler: function OSF_EventDispatch$hasEventHandler(eventType, handler)
  4456. {
  4457. var handlers=this._eventHandlers[eventType];
  4458. if(handlers && handlers.length > 0)
  4459. for(var h in handlers)
  4460. if(handlers[h]===handler)
  4461. return true;
  4462. return false
  4463. },
  4464. addEventHandler: function OSF_EventDispatch$addEventHandler(eventType, handler)
  4465. {
  4466. if(typeof handler !="function")
  4467. return false;
  4468. var handlers=this._eventHandlers[eventType];
  4469. if(handlers && !this.hasEventHandler(eventType,handler))
  4470. {
  4471. handlers.push(handler);
  4472. return true
  4473. }
  4474. else
  4475. return false
  4476. },
  4477. addEventHandlerAndFireQueuedEvent: function OSF_EventDispatch$addEventHandlerAndFireQueuedEvent(eventType, handler)
  4478. {
  4479. var handlers=this._eventHandlers[eventType];
  4480. var isFirstHandler=handlers.length==0;
  4481. var succeed=this.addEventHandler(eventType,handler);
  4482. if(isFirstHandler && succeed)
  4483. this.fireQueuedEvent(eventType);
  4484. return succeed
  4485. },
  4486. removeEventHandler: function OSF_EventDispatch$removeEventHandler(eventType, handler)
  4487. {
  4488. var handlers=this._eventHandlers[eventType];
  4489. if(handlers && handlers.length > 0)
  4490. for(var index=0; index < handlers.length; index++)
  4491. if(handlers[index]===handler)
  4492. {
  4493. handlers.splice(index,1);
  4494. return true
  4495. }
  4496. return false
  4497. },
  4498. clearEventHandlers: function OSF_EventDispatch$clearEventHandlers(eventType)
  4499. {
  4500. if(typeof this._eventHandlers[eventType] !="undefined" && this._eventHandlers[eventType].length > 0)
  4501. {
  4502. this._eventHandlers[eventType]=[];
  4503. return true
  4504. }
  4505. return false
  4506. },
  4507. getEventHandlerCount: function OSF_EventDispatch$getEventHandlerCount(eventType)
  4508. {
  4509. return this._eventHandlers[eventType] !=undefined ? this._eventHandlers[eventType].length : -1
  4510. },
  4511. fireEvent: function OSF_EventDispatch$fireEvent(eventArgs)
  4512. {
  4513. if(eventArgs.type==undefined)
  4514. return false;
  4515. var eventType=eventArgs.type;
  4516. if(eventType && this._eventHandlers[eventType])
  4517. {
  4518. var eventHandlers=this._eventHandlers[eventType];
  4519. for(var handler in eventHandlers)
  4520. eventHandlers[handler](eventArgs);
  4521. return true
  4522. }
  4523. else
  4524. return false
  4525. },
  4526. fireOrQueueEvent: function OSF_EventDispatch$fireOrQueueEvent(eventArgs)
  4527. {
  4528. var eventType=eventArgs.type;
  4529. if(eventType && this._eventHandlers[eventType])
  4530. {
  4531. var eventHandlers=this._eventHandlers[eventType];
  4532. var queuedEvents=this._queuedEventsArgs[eventType];
  4533. if(eventHandlers.length==0)
  4534. queuedEvents.push(eventArgs);
  4535. else
  4536. this.fireEvent(eventArgs);
  4537. return true
  4538. }
  4539. else
  4540. return false
  4541. },
  4542. fireQueuedEvent: function OSF_EventDispatch$queueEvent(eventType)
  4543. {
  4544. if(eventType && this._eventHandlers[eventType])
  4545. {
  4546. var eventHandlers=this._eventHandlers[eventType];
  4547. var queuedEvents=this._queuedEventsArgs[eventType];
  4548. if(eventHandlers.length > 0)
  4549. {
  4550. var eventHandler=eventHandlers[0];
  4551. while(queuedEvents.length > 0)
  4552. {
  4553. var eventArgs=queuedEvents.shift();
  4554. eventHandler(eventArgs)
  4555. }
  4556. return true
  4557. }
  4558. }
  4559. return false
  4560. }
  4561. };
  4562. OSF.DDA.OMFactory=OSF.DDA.OMFactory || {};
  4563. OSF.DDA.OMFactory.manufactureEventArgs=function OSF_DDA_OMFactory$manufactureEventArgs(eventType, target, eventProperties)
  4564. {
  4565. var args;
  4566. switch(eventType)
  4567. {
  4568. case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:
  4569. args=new OSF.DDA.DocumentSelectionChangedEventArgs(target);
  4570. break;
  4571. case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:
  4572. args=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(eventProperties,target.document),eventProperties[OSF.DDA.PropertyDescriptors.Subset]);
  4573. break;
  4574. case Microsoft.Office.WebExtension.EventType.BindingDataChanged:
  4575. args=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(eventProperties,target.document));
  4576. break;
  4577. case Microsoft.Office.WebExtension.EventType.SettingsChanged:
  4578. args=new OSF.DDA.SettingsChangedEventArgs(target);
  4579. break;
  4580. case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:
  4581. args=new OSF.DDA.ActiveViewChangedEventArgs(eventProperties);
  4582. break;
  4583. case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:
  4584. args=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(eventProperties);
  4585. break;
  4586. case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:
  4587. args=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(eventProperties);
  4588. break;
  4589. case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:
  4590. args=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(eventProperties);
  4591. break;
  4592. case Microsoft.Office.WebExtension.EventType.DataNodeInserted:
  4593. args=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]);
  4594. break;
  4595. case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:
  4596. args=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NewNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]);
  4597. break;
  4598. case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:
  4599. args=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(eventProperties[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),eventProperties[OSF.DDA.DataNodeEventProperties.InUndoRedo]);
  4600. break;
  4601. case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:
  4602. args=new OSF.DDA.TaskSelectionChangedEventArgs(target);
  4603. break;
  4604. case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:
  4605. args=new OSF.DDA.ResourceSelectionChangedEventArgs(target);
  4606. break;
  4607. case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:
  4608. args=new OSF.DDA.ViewSelectionChangedEventArgs(target);
  4609. break;
  4610. case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:
  4611. args=new OSF.DDA.DialogEventArgs(eventProperties);
  4612. break;
  4613. case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:
  4614. args=new OSF.DDA.DialogParentEventArgs(eventProperties);
  4615. break;
  4616. case Microsoft.Office.WebExtension.EventType.ItemChanged:
  4617. if(OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlook" || OSF._OfficeAppFactory.getHostInfo()["hostType"]=="outlookwebapp")
  4618. {
  4619. args=new OSF.DDA.OlkItemSelectedChangedEventArgs(eventProperties);
  4620. target.initialize(args["initialData"]);
  4621. target.setCurrentItemNumber(args["itemNumber"].itemNumber)
  4622. }
  4623. else
  4624. throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType));
  4625. break;
  4626. default:
  4627. throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,eventType));
  4628. }
  4629. return args
  4630. };
  4631. OSF.DDA.AsyncMethodNames.addNames({
  4632. AddHandlerAsync: "addHandlerAsync",
  4633. RemoveHandlerAsync: "removeHandlerAsync"
  4634. });
  4635. OSF.DDA.AsyncMethodCalls.define({
  4636. method: OSF.DDA.AsyncMethodNames.AddHandlerAsync,
  4637. requiredArguments: [{
  4638. name: Microsoft.Office.WebExtension.Parameters.EventType,
  4639. "enum": Microsoft.Office.WebExtension.EventType,
  4640. verify: function(eventType, caller, eventDispatch)
  4641. {
  4642. return eventDispatch.supportsEvent(eventType)
  4643. }
  4644. },{
  4645. name: Microsoft.Office.WebExtension.Parameters.Handler,
  4646. types: ["function"]
  4647. }],
  4648. supportedOptions: [],
  4649. privateStateCallbacks: []
  4650. });
  4651. OSF.DDA.AsyncMethodCalls.define({
  4652. method: OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,
  4653. requiredArguments: [{
  4654. name: Microsoft.Office.WebExtension.Parameters.EventType,
  4655. "enum": Microsoft.Office.WebExtension.EventType,
  4656. verify: function(eventType, caller, eventDispatch)
  4657. {
  4658. return eventDispatch.supportsEvent(eventType)
  4659. }
  4660. }],
  4661. supportedOptions: [{
  4662. name: Microsoft.Office.WebExtension.Parameters.Handler,
  4663. value: {
  4664. types: ["function","object"],
  4665. defaultValue: null
  4666. }
  4667. }],
  4668. privateStateCallbacks: []
  4669. });
  4670. OSF.DialogShownStatus={
  4671. hasDialogShown: false,
  4672. isWindowDialog: false
  4673. };
  4674. OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent: "DialogMessageReceivedEvent"});
  4675. OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{
  4676. DialogMessageReceived: "dialogMessageReceived",
  4677. DialogEventReceived: "dialogEventReceived"
  4678. });
  4679. OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{
  4680. MessageType: "messageType",
  4681. MessageContent: "messageContent"
  4682. });
  4683. OSF.DDA.DialogEventType={};
  4684. OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{
  4685. DialogClosed: "dialogClosed",
  4686. NavigationFailed: "naviationFailed"
  4687. });
  4688. OSF.DDA.AsyncMethodNames.addNames({
  4689. DisplayDialogAsync: "displayDialogAsync",
  4690. CloseAsync: "close"
  4691. });
  4692. OSF.DDA.SyncMethodNames.addNames({
  4693. MessageParent: "messageParent",
  4694. AddMessageHandler: "addEventHandler",
  4695. SendMessage: "sendMessage"
  4696. });
  4697. OSF.DDA.UI.ParentUI=function OSF_DDA_ParentUI()
  4698. {
  4699. var eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]);
  4700. var openDialogName=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName;
  4701. var target=this;
  4702. if(!target[openDialogName])
  4703. OSF.OUtil.defineEnumerableProperty(target,openDialogName,{value: function()
  4704. {
  4705. var openDialog=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];
  4706. openDialog(arguments,eventDispatch,target)
  4707. }});
  4708. OSF.OUtil.finalizeProperties(this)
  4709. };
  4710. OSF.DDA.UI.ChildUI=function OSF_DDA_ChildUI()
  4711. {
  4712. var messageParentName=OSF.DDA.SyncMethodNames.MessageParent.displayName;
  4713. var target=this;
  4714. if(!target[messageParentName])
  4715. OSF.OUtil.defineEnumerableProperty(target,messageParentName,{value: function()
  4716. {
  4717. var messageParent=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];
  4718. return messageParent(arguments,target)
  4719. }});
  4720. var addEventHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;
  4721. if(!target[addEventHandler] && typeof OSF.DialogParentMessageEventDispatch !="undefined")
  4722. OSF.DDA.DispIdHost.addEventSupport(target,OSF.DialogParentMessageEventDispatch);
  4723. OSF.OUtil.finalizeProperties(this)
  4724. };
  4725. OSF.DialogHandler=function OSF_DialogHandler(){};
  4726. OSF.DDA.DialogEventArgs=function OSF_DDA_DialogEventArgs(message)
  4727. {
  4728. if(message[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)
  4729. OSF.OUtil.defineEnumerableProperties(this,{
  4730. type: {value: Microsoft.Office.WebExtension.EventType.DialogMessageReceived},
  4731. message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]}
  4732. });
  4733. else
  4734. OSF.OUtil.defineEnumerableProperties(this,{
  4735. type: {value: Microsoft.Office.WebExtension.EventType.DialogEventReceived},
  4736. error: {value: message[OSF.DDA.PropertyDescriptors.MessageType]}
  4737. })
  4738. };
  4739. OSF.DDA.DialogParentEventArgs=function OSF_DDA_DialogParentEventArgs(message)
  4740. {
  4741. if(message[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogParentMessageReceived)
  4742. OSF.OUtil.defineEnumerableProperties(this,{
  4743. type: {value: Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},
  4744. message: {value: message[OSF.DDA.PropertyDescriptors.MessageContent]}
  4745. });
  4746. else
  4747. OSF.OUtil.defineEnumerableProperties(this,{
  4748. type: {value: Microsoft.Office.WebExtension.EventType.DialogParentEventReceived},
  4749. error: {value: message[OSF.DDA.PropertyDescriptors.MessageType]}
  4750. })
  4751. };
  4752. OSF.DDA.AsyncMethodCalls.define({
  4753. method: OSF.DDA.AsyncMethodNames.DisplayDialogAsync,
  4754. requiredArguments: [{
  4755. name: Microsoft.Office.WebExtension.Parameters.Url,
  4756. types: ["string"]
  4757. }],
  4758. supportedOptions: [{
  4759. name: Microsoft.Office.WebExtension.Parameters.Width,
  4760. value: {
  4761. types: ["number"],
  4762. defaultValue: 99
  4763. }
  4764. },{
  4765. name: Microsoft.Office.WebExtension.Parameters.Height,
  4766. value: {
  4767. types: ["number"],
  4768. defaultValue: 99
  4769. }
  4770. },{
  4771. name: Microsoft.Office.WebExtension.Parameters.RequireHTTPs,
  4772. value: {
  4773. types: ["boolean"],
  4774. defaultValue: true
  4775. }
  4776. },{
  4777. name: Microsoft.Office.WebExtension.Parameters.DisplayInIframe,
  4778. value: {
  4779. types: ["boolean"],
  4780. defaultValue: false
  4781. }
  4782. }],
  4783. privateStateCallbacks: [],
  4784. onSucceeded: function(args, caller, callArgs)
  4785. {
  4786. var targetId=args[Microsoft.Office.WebExtension.Parameters.Id];
  4787. var eventDispatch=args[Microsoft.Office.WebExtension.Parameters.Data];
  4788. var dialog=new OSF.DialogHandler;
  4789. var closeDialog=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;
  4790. OSF.OUtil.defineEnumerableProperty(dialog,closeDialog,{value: function()
  4791. {
  4792. var closeDialogfunction=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];
  4793. closeDialogfunction(arguments,targetId,eventDispatch,dialog)
  4794. }});
  4795. var addHandler=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;
  4796. OSF.OUtil.defineEnumerableProperty(dialog,addHandler,{value: function()
  4797. {
  4798. var syncMethodCall=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id];
  4799. var callArgs=syncMethodCall.verifyAndExtractCall(arguments,dialog,eventDispatch);
  4800. var eventType=callArgs[Microsoft.Office.WebExtension.Parameters.EventType];
  4801. var handler=callArgs[Microsoft.Office.WebExtension.Parameters.Handler];
  4802. return eventDispatch.addEventHandlerAndFireQueuedEvent(eventType,handler)
  4803. }});
  4804. var sendMessage=OSF.DDA.SyncMethodNames.SendMessage.displayName;
  4805. OSF.OUtil.defineEnumerableProperty(dialog,sendMessage,{value: function()
  4806. {
  4807. var execute=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];
  4808. return execute(arguments,eventDispatch,dialog)
  4809. }});
  4810. return dialog
  4811. },
  4812. checkCallArgs: function(callArgs, caller, stateInfo)
  4813. {
  4814. if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] <=0)
  4815. callArgs[Microsoft.Office.WebExtension.Parameters.Width]=1;
  4816. if(callArgs[Microsoft.Office.WebExtension.Parameters.Width] > 100)
  4817. callArgs[Microsoft.Office.WebExtension.Parameters.Width]=99;
  4818. if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] <=0)
  4819. callArgs[Microsoft.Office.WebExtension.Parameters.Height]=1;
  4820. if(callArgs[Microsoft.Office.WebExtension.Parameters.Height] > 100)
  4821. callArgs[Microsoft.Office.WebExtension.Parameters.Height]=99;
  4822. if(!callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs])
  4823. callArgs[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=true;
  4824. return callArgs
  4825. }
  4826. });
  4827. OSF.DDA.AsyncMethodCalls.define({
  4828. method: OSF.DDA.AsyncMethodNames.CloseAsync,
  4829. requiredArguments: [],
  4830. supportedOptions: [],
  4831. privateStateCallbacks: []
  4832. });
  4833. OSF.DDA.SyncMethodCalls.define({
  4834. method: OSF.DDA.SyncMethodNames.MessageParent,
  4835. requiredArguments: [{
  4836. name: Microsoft.Office.WebExtension.Parameters.MessageToParent,
  4837. types: ["string","number","boolean"]
  4838. }],
  4839. supportedOptions: []
  4840. });
  4841. OSF.DDA.SyncMethodCalls.define({
  4842. method: OSF.DDA.SyncMethodNames.AddMessageHandler,
  4843. requiredArguments: [{
  4844. name: Microsoft.Office.WebExtension.Parameters.EventType,
  4845. "enum": Microsoft.Office.WebExtension.EventType,
  4846. verify: function(eventType, caller, eventDispatch)
  4847. {
  4848. return eventDispatch.supportsEvent(eventType)
  4849. }
  4850. },{
  4851. name: Microsoft.Office.WebExtension.Parameters.Handler,
  4852. types: ["function"]
  4853. }],
  4854. supportedOptions: []
  4855. });
  4856. OSF.DDA.SyncMethodCalls.define({
  4857. method: OSF.DDA.SyncMethodNames.SendMessage,
  4858. requiredArguments: [{
  4859. name: Microsoft.Office.WebExtension.Parameters.MessageContent,
  4860. types: ["string"]
  4861. }],
  4862. supportedOptions: [],
  4863. privateStateCallbacks: []
  4864. });
  4865. OSF.DDA.SafeArray.Delegate.openDialog=function OSF_DDA_SafeArray_Delegate$OpenDialog(args)
  4866. {
  4867. try
  4868. {
  4869. if(args.onCalling)
  4870. args.onCalling();
  4871. var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,args);
  4872. OSF.ClientHostController.openDialog(args.dispId,args.targetId,function OSF_DDA_SafeArrayDelegate$RegisterEventAsync_OnEvent(eventDispId, payload)
  4873. {
  4874. if(args.onEvent)
  4875. args.onEvent(payload);
  4876. if(OSF.AppTelemetry)
  4877. OSF.AppTelemetry.onEventDone(args.dispId)
  4878. },callback)
  4879. }
  4880. catch(ex)
  4881. {
  4882. OSF.DDA.SafeArray.Delegate._onException(ex,args)
  4883. }
  4884. };
  4885. OSF.DDA.SafeArray.Delegate.closeDialog=function OSF_DDA_SafeArray_Delegate$CloseDialog(args)
  4886. {
  4887. if(args.onCalling)
  4888. args.onCalling();
  4889. var callback=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,args);
  4890. try
  4891. {
  4892. OSF.ClientHostController.closeDialog(args.dispId,args.targetId,callback)
  4893. }
  4894. catch(ex)
  4895. {
  4896. OSF.DDA.SafeArray.Delegate._onException(ex,args)
  4897. }
  4898. };
  4899. OSF.DDA.SafeArray.Delegate.messageParent=function OSF_DDA_SafeArray_Delegate$MessageParent(args)
  4900. {
  4901. try
  4902. {
  4903. if(args.onCalling)
  4904. args.onCalling();
  4905. var startTime=(new Date).getTime();
  4906. var result=OSF.ClientHostController.messageParent(args.hostCallArgs);
  4907. if(args.onReceiving)
  4908. args.onReceiving();
  4909. if(OSF.AppTelemetry)
  4910. OSF.AppTelemetry.onMethodDone(args.dispId,args.hostCallArgs,Math.abs((new Date).getTime() - startTime),result);
  4911. return result
  4912. }
  4913. catch(ex)
  4914. {
  4915. return OSF.DDA.SafeArray.Delegate._onExceptionSyncMethod(ex)
  4916. }
  4917. };
  4918. OSF.DDA.SafeArray.Delegate.ParameterMap.define({
  4919. type: OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,
  4920. fromHost: [{
  4921. name: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,
  4922. value: OSF.DDA.SafeArray.Delegate.ParameterMap.self
  4923. }],
  4924. isComplexType: true
  4925. });
  4926. OSF.DDA.SafeArray.Delegate.ParameterMap.define({
  4927. type: OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,
  4928. fromHost: [{
  4929. name: OSF.DDA.PropertyDescriptors.MessageType,
  4930. value: 0
  4931. },{
  4932. name: OSF.DDA.PropertyDescriptors.MessageContent,
  4933. value: 1
  4934. }],
  4935. isComplexType: true
  4936. });
  4937. OSF.DDA.SafeArray.Delegate.ParameterMap.define({
  4938. type: OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,
  4939. fromHost: [{
  4940. name: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,
  4941. value: OSF.DDA.SafeArray.Delegate.ParameterMap.self
  4942. }],
  4943. isComplexType: true
  4944. });
  4945. OSF.DDA.SafeArray.Delegate.ParameterMap.define({
  4946. type: OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,
  4947. fromHost: [{
  4948. name: OSF.DDA.PropertyDescriptors.MessageType,
  4949. value: 0
  4950. },{
  4951. name: OSF.DDA.PropertyDescriptors.MessageContent,
  4952. value: 1
  4953. }],
  4954. isComplexType: true
  4955. });
  4956. OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ItemChanged: "olkItemSelectedChanged"});
  4957. OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{OlkItemSelectedData: "OlkItemSelectedData"});
  4958. OSF.DDA.OlkItemSelectedChangedEventArgs=function OSF_DDA_OlkItemSelectedChangedEventArgs(eventData)
  4959. {
  4960. var initialDataSource=eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][0];
  4961. if(initialDataSource==="")
  4962. initialDataSource=null;
  4963. OSF.OUtil.defineEnumerableProperties(this,{
  4964. type: {value: Microsoft.Office.WebExtension.EventType.ItemChanged},
  4965. initialData: {value: JSON.parse(initialDataSource)},
  4966. itemNumber: {value: JSON.parse(eventData[OSF.DDA.EventDescriptors.OlkItemSelectedData][1])}
  4967. })
  4968. };
  4969. OSF.DDA.SafeArray.Delegate.ParameterMap.define({
  4970. type: OSF.DDA.EventDispId.dispidOlkItemSelectedChangedEvent,
  4971. fromHost: [{
  4972. name: OSF.DDA.EventDescriptors.OlkItemSelectedData,
  4973. value: OSF.DDA.SafeArray.Delegate.ParameterMap.sourceData
  4974. }],
  4975. isComplexType: true
  4976. });
  4977. var OSFLog;
  4978. (function(OSFLog)
  4979. {
  4980. var BaseUsageData=function()
  4981. {
  4982. function BaseUsageData(table)
  4983. {
  4984. this._table=table;
  4985. this._fields={}
  4986. }
  4987. Object.defineProperty(BaseUsageData.prototype,"Fields",{
  4988. get: function()
  4989. {
  4990. return this._fields
  4991. },
  4992. enumerable: true,
  4993. configurable: true
  4994. });
  4995. Object.defineProperty(BaseUsageData.prototype,"Table",{
  4996. get: function()
  4997. {
  4998. return this._table
  4999. },
  5000. enumerable: true,
  5001. configurable: true
  5002. });
  5003. BaseUsageData.prototype.SerializeFields=function(){};
  5004. BaseUsageData.prototype.SetSerializedField=function(key, value)
  5005. {
  5006. if(typeof value !=="undefined" && value !==null)
  5007. this._serializedFields[key]=value.toString()
  5008. };
  5009. BaseUsageData.prototype.SerializeRow=function()
  5010. {
  5011. this._serializedFields={};
  5012. this.SetSerializedField("Table",this._table);
  5013. this.SerializeFields();
  5014. return JSON.stringify(this._serializedFields)
  5015. };
  5016. return BaseUsageData
  5017. }();
  5018. OSFLog.BaseUsageData=BaseUsageData;
  5019. var AppActivatedUsageData=function(_super)
  5020. {
  5021. __extends(AppActivatedUsageData,_super);
  5022. function AppActivatedUsageData()
  5023. {
  5024. _super.call(this,"AppActivated")
  5025. }
  5026. Object.defineProperty(AppActivatedUsageData.prototype,"CorrelationId",{
  5027. get: function()
  5028. {
  5029. return this.Fields["CorrelationId"]
  5030. },
  5031. set: function(value)
  5032. {
  5033. this.Fields["CorrelationId"]=value
  5034. },
  5035. enumerable: true,
  5036. configurable: true
  5037. });
  5038. Object.defineProperty(AppActivatedUsageData.prototype,"SessionId",{
  5039. get: function()
  5040. {
  5041. return this.Fields["SessionId"]
  5042. },
  5043. set: function(value)
  5044. {
  5045. this.Fields["SessionId"]=value
  5046. },
  5047. enumerable: true,
  5048. configurable: true
  5049. });
  5050. Object.defineProperty(AppActivatedUsageData.prototype,"AppId",{
  5051. get: function()
  5052. {
  5053. return this.Fields["AppId"]
  5054. },
  5055. set: function(value)
  5056. {
  5057. this.Fields["AppId"]=value
  5058. },
  5059. enumerable: true,
  5060. configurable: true
  5061. });
  5062. Object.defineProperty(AppActivatedUsageData.prototype,"AppInstanceId",{
  5063. get: function()
  5064. {
  5065. return this.Fields["AppInstanceId"]
  5066. },
  5067. set: function(value)
  5068. {
  5069. this.Fields["AppInstanceId"]=value
  5070. },
  5071. enumerable: true,
  5072. configurable: true
  5073. });
  5074. Object.defineProperty(AppActivatedUsageData.prototype,"AppURL",{
  5075. get: function()
  5076. {
  5077. return this.Fields["AppURL"]
  5078. },
  5079. set: function(value)
  5080. {
  5081. this.Fields["AppURL"]=value
  5082. },
  5083. enumerable: true,
  5084. configurable: true
  5085. });
  5086. Object.defineProperty(AppActivatedUsageData.prototype,"AssetId",{
  5087. get: function()
  5088. {
  5089. return this.Fields["AssetId"]
  5090. },
  5091. set: function(value)
  5092. {
  5093. this.Fields["AssetId"]=value
  5094. },
  5095. enumerable: true,
  5096. configurable: true
  5097. });
  5098. Object.defineProperty(AppActivatedUsageData.prototype,"Browser",{
  5099. get: function()
  5100. {
  5101. return this.Fields["Browser"]
  5102. },
  5103. set: function(value)
  5104. {
  5105. this.Fields["Browser"]=value
  5106. },
  5107. enumerable: true,
  5108. configurable: true
  5109. });
  5110. Object.defineProperty(AppActivatedUsageData.prototype,"UserId",{
  5111. get: function()
  5112. {
  5113. return this.Fields["UserId"]
  5114. },
  5115. set: function(value)
  5116. {
  5117. this.Fields["UserId"]=value
  5118. },
  5119. enumerable: true,
  5120. configurable: true
  5121. });
  5122. Object.defineProperty(AppActivatedUsageData.prototype,"Host",{
  5123. get: function()
  5124. {
  5125. return this.Fields["Host"]
  5126. },
  5127. set: function(value)
  5128. {
  5129. this.Fields["Host"]=value
  5130. },
  5131. enumerable: true,
  5132. configurable: true
  5133. });
  5134. Object.defineProperty(AppActivatedUsageData.prototype,"HostVersion",{
  5135. get: function()
  5136. {
  5137. return this.Fields["HostVersion"]
  5138. },
  5139. set: function(value)
  5140. {
  5141. this.Fields["HostVersion"]=value
  5142. },
  5143. enumerable: true,
  5144. configurable: true
  5145. });
  5146. Object.defineProperty(AppActivatedUsageData.prototype,"ClientId",{
  5147. get: function()
  5148. {
  5149. return this.Fields["ClientId"]
  5150. },
  5151. set: function(value)
  5152. {
  5153. this.Fields["ClientId"]=value
  5154. },
  5155. enumerable: true,
  5156. configurable: true
  5157. });
  5158. Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeWidth",{
  5159. get: function()
  5160. {
  5161. return this.Fields["AppSizeWidth"]
  5162. },
  5163. set: function(value)
  5164. {
  5165. this.Fields["AppSizeWidth"]=value
  5166. },
  5167. enumerable: true,
  5168. configurable: true
  5169. });
  5170. Object.defineProperty(AppActivatedUsageData.prototype,"AppSizeHeight",{
  5171. get: function()
  5172. {
  5173. return this.Fields["AppSizeHeight"]
  5174. },
  5175. set: function(value)
  5176. {
  5177. this.Fields["AppSizeHeight"]=value
  5178. },
  5179. enumerable: true,
  5180. configurable: true
  5181. });
  5182. Object.defineProperty(AppActivatedUsageData.prototype,"Message",{
  5183. get: function()
  5184. {
  5185. return this.Fields["Message"]
  5186. },
  5187. set: function(value)
  5188. {
  5189. this.Fields["Message"]=value
  5190. },
  5191. enumerable: true,
  5192. configurable: true
  5193. });
  5194. Object.defineProperty(AppActivatedUsageData.prototype,"DocUrl",{
  5195. get: function()
  5196. {
  5197. return this.Fields["DocUrl"]
  5198. },
  5199. set: function(value)
  5200. {
  5201. this.Fields["DocUrl"]=value
  5202. },
  5203. enumerable: true,
  5204. configurable: true
  5205. });
  5206. Object.defineProperty(AppActivatedUsageData.prototype,"OfficeJSVersion",{
  5207. get: function()
  5208. {
  5209. return this.Fields["OfficeJSVersion"]
  5210. },
  5211. set: function(value)
  5212. {
  5213. this.Fields["OfficeJSVersion"]=value
  5214. },
  5215. enumerable: true,
  5216. configurable: true
  5217. });
  5218. Object.defineProperty(AppActivatedUsageData.prototype,"HostJSVersion",{
  5219. get: function()
  5220. {
  5221. return this.Fields["HostJSVersion"]
  5222. },
  5223. set: function(value)
  5224. {
  5225. this.Fields["HostJSVersion"]=value
  5226. },
  5227. enumerable: true,
  5228. configurable: true
  5229. });
  5230. AppActivatedUsageData.prototype.SerializeFields=function()
  5231. {
  5232. this.SetSerializedField("CorrelationId",this.CorrelationId);
  5233. this.SetSerializedField("SessionId",this.SessionId);
  5234. this.SetSerializedField("AppId",this.AppId);
  5235. this.SetSerializedField("AppInstanceId",this.AppInstanceId);
  5236. this.SetSerializedField("AppURL",this.AppURL);
  5237. this.SetSerializedField("AssetId",this.AssetId);
  5238. this.SetSerializedField("Browser",this.Browser);
  5239. this.SetSerializedField("UserId",this.UserId);
  5240. this.SetSerializedField("Host",this.Host);
  5241. this.SetSerializedField("HostVersion",this.HostVersion);
  5242. this.SetSerializedField("ClientId",this.ClientId);
  5243. this.SetSerializedField("AppSizeWidth",this.AppSizeWidth);
  5244. this.SetSerializedField("AppSizeHeight",this.AppSizeHeight);
  5245. this.SetSerializedField("Message",this.Message);
  5246. this.SetSerializedField("DocUrl",this.DocUrl);
  5247. this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion);
  5248. this.SetSerializedField("HostJSVersion",this.HostJSVersion)
  5249. };
  5250. return AppActivatedUsageData
  5251. }(BaseUsageData);
  5252. OSFLog.AppActivatedUsageData=AppActivatedUsageData;
  5253. var ScriptLoadUsageData=function(_super)
  5254. {
  5255. __extends(ScriptLoadUsageData,_super);
  5256. function ScriptLoadUsageData()
  5257. {
  5258. _super.call(this,"ScriptLoad")
  5259. }
  5260. Object.defineProperty(ScriptLoadUsageData.prototype,"CorrelationId",{
  5261. get: function()
  5262. {
  5263. return this.Fields["CorrelationId"]
  5264. },
  5265. set: function(value)
  5266. {
  5267. this.Fields["CorrelationId"]=value
  5268. },
  5269. enumerable: true,
  5270. configurable: true
  5271. });
  5272. Object.defineProperty(ScriptLoadUsageData.prototype,"SessionId",{
  5273. get: function()
  5274. {
  5275. return this.Fields["SessionId"]
  5276. },
  5277. set: function(value)
  5278. {
  5279. this.Fields["SessionId"]=value
  5280. },
  5281. enumerable: true,
  5282. configurable: true
  5283. });
  5284. Object.defineProperty(ScriptLoadUsageData.prototype,"ScriptId",{
  5285. get: function()
  5286. {
  5287. return this.Fields["ScriptId"]
  5288. },
  5289. set: function(value)
  5290. {
  5291. this.Fields["ScriptId"]=value
  5292. },
  5293. enumerable: true,
  5294. configurable: true
  5295. });
  5296. Object.defineProperty(ScriptLoadUsageData.prototype,"StartTime",{
  5297. get: function()
  5298. {
  5299. return this.Fields["StartTime"]
  5300. },
  5301. set: function(value)
  5302. {
  5303. this.Fields["StartTime"]=value
  5304. },
  5305. enumerable: true,
  5306. configurable: true
  5307. });
  5308. Object.defineProperty(ScriptLoadUsageData.prototype,"ResponseTime",{
  5309. get: function()
  5310. {
  5311. return this.Fields["ResponseTime"]
  5312. },
  5313. set: function(value)
  5314. {
  5315. this.Fields["ResponseTime"]=value
  5316. },
  5317. enumerable: true,
  5318. configurable: true
  5319. });
  5320. ScriptLoadUsageData.prototype.SerializeFields=function()
  5321. {
  5322. this.SetSerializedField("CorrelationId",this.CorrelationId);
  5323. this.SetSerializedField("SessionId",this.SessionId);
  5324. this.SetSerializedField("ScriptId",this.ScriptId);
  5325. this.SetSerializedField("StartTime",this.StartTime);
  5326. this.SetSerializedField("ResponseTime",this.ResponseTime)
  5327. };
  5328. return ScriptLoadUsageData
  5329. }(BaseUsageData);
  5330. OSFLog.ScriptLoadUsageData=ScriptLoadUsageData;
  5331. var AppClosedUsageData=function(_super)
  5332. {
  5333. __extends(AppClosedUsageData,_super);
  5334. function AppClosedUsageData()
  5335. {
  5336. _super.call(this,"AppClosed")
  5337. }
  5338. Object.defineProperty(AppClosedUsageData.prototype,"CorrelationId",{
  5339. get: function()
  5340. {
  5341. return this.Fields["CorrelationId"]
  5342. },
  5343. set: function(value)
  5344. {
  5345. this.Fields["CorrelationId"]=value
  5346. },
  5347. enumerable: true,
  5348. configurable: true
  5349. });
  5350. Object.defineProperty(AppClosedUsageData.prototype,"SessionId",{
  5351. get: function()
  5352. {
  5353. return this.Fields["SessionId"]
  5354. },
  5355. set: function(value)
  5356. {
  5357. this.Fields["SessionId"]=value
  5358. },
  5359. enumerable: true,
  5360. configurable: true
  5361. });
  5362. Object.defineProperty(AppClosedUsageData.prototype,"FocusTime",{
  5363. get: function()
  5364. {
  5365. return this.Fields["FocusTime"]
  5366. },
  5367. set: function(value)
  5368. {
  5369. this.Fields["FocusTime"]=value
  5370. },
  5371. enumerable: true,
  5372. configurable: true
  5373. });
  5374. Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalWidth",{
  5375. get: function()
  5376. {
  5377. return this.Fields["AppSizeFinalWidth"]
  5378. },
  5379. set: function(value)
  5380. {
  5381. this.Fields["AppSizeFinalWidth"]=value
  5382. },
  5383. enumerable: true,
  5384. configurable: true
  5385. });
  5386. Object.defineProperty(AppClosedUsageData.prototype,"AppSizeFinalHeight",{
  5387. get: function()
  5388. {
  5389. return this.Fields["AppSizeFinalHeight"]
  5390. },
  5391. set: function(value)
  5392. {
  5393. this.Fields["AppSizeFinalHeight"]=value
  5394. },
  5395. enumerable: true,
  5396. configurable: true
  5397. });
  5398. Object.defineProperty(AppClosedUsageData.prototype,"OpenTime",{
  5399. get: function()
  5400. {
  5401. return this.Fields["OpenTime"]
  5402. },
  5403. set: function(value)
  5404. {
  5405. this.Fields["OpenTime"]=value
  5406. },
  5407. enumerable: true,
  5408. configurable: true
  5409. });
  5410. Object.defineProperty(AppClosedUsageData.prototype,"CloseMethod",{
  5411. get: function()
  5412. {
  5413. return this.Fields["CloseMethod"]
  5414. },
  5415. set: function(value)
  5416. {
  5417. this.Fields["CloseMethod"]=value
  5418. },
  5419. enumerable: true,
  5420. configurable: true
  5421. });
  5422. AppClosedUsageData.prototype.SerializeFields=function()
  5423. {
  5424. this.SetSerializedField("CorrelationId",this.CorrelationId);
  5425. this.SetSerializedField("SessionId",this.SessionId);
  5426. this.SetSerializedField("FocusTime",this.FocusTime);
  5427. this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth);
  5428. this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight);
  5429. this.SetSerializedField("OpenTime",this.OpenTime);
  5430. this.SetSerializedField("CloseMethod",this.CloseMethod)
  5431. };
  5432. return AppClosedUsageData
  5433. }(BaseUsageData);
  5434. OSFLog.AppClosedUsageData=AppClosedUsageData;
  5435. var APIUsageUsageData=function(_super)
  5436. {
  5437. __extends(APIUsageUsageData,_super);
  5438. function APIUsageUsageData()
  5439. {
  5440. _super.call(this,"APIUsage")
  5441. }
  5442. Object.defineProperty(APIUsageUsageData.prototype,"CorrelationId",{
  5443. get: function()
  5444. {
  5445. return this.Fields["CorrelationId"]
  5446. },
  5447. set: function(value)
  5448. {
  5449. this.Fields["CorrelationId"]=value
  5450. },
  5451. enumerable: true,
  5452. configurable: true
  5453. });
  5454. Object.defineProperty(APIUsageUsageData.prototype,"SessionId",{
  5455. get: function()
  5456. {
  5457. return this.Fields["SessionId"]
  5458. },
  5459. set: function(value)
  5460. {
  5461. this.Fields["SessionId"]=value
  5462. },
  5463. enumerable: true,
  5464. configurable: true
  5465. });
  5466. Object.defineProperty(APIUsageUsageData.prototype,"APIType",{
  5467. get: function()
  5468. {
  5469. return this.Fields["APIType"]
  5470. },
  5471. set: function(value)
  5472. {
  5473. this.Fields["APIType"]=value
  5474. },
  5475. enumerable: true,
  5476. configurable: true
  5477. });
  5478. Object.defineProperty(APIUsageUsageData.prototype,"APIID",{
  5479. get: function()
  5480. {
  5481. return this.Fields["APIID"]
  5482. },
  5483. set: function(value)
  5484. {
  5485. this.Fields["APIID"]=value
  5486. },
  5487. enumerable: true,
  5488. configurable: true
  5489. });
  5490. Object.defineProperty(APIUsageUsageData.prototype,"Parameters",{
  5491. get: function()
  5492. {
  5493. return this.Fields["Parameters"]
  5494. },
  5495. set: function(value)
  5496. {
  5497. this.Fields["Parameters"]=value
  5498. },
  5499. enumerable: true,
  5500. configurable: true
  5501. });
  5502. Object.defineProperty(APIUsageUsageData.prototype,"ResponseTime",{
  5503. get: function()
  5504. {
  5505. return this.Fields["ResponseTime"]
  5506. },
  5507. set: function(value)
  5508. {
  5509. this.Fields["ResponseTime"]=value
  5510. },
  5511. enumerable: true,
  5512. configurable: true
  5513. });
  5514. Object.defineProperty(APIUsageUsageData.prototype,"ErrorType",{
  5515. get: function()
  5516. {
  5517. return this.Fields["ErrorType"]
  5518. },
  5519. set: function(value)
  5520. {
  5521. this.Fields["ErrorType"]=value
  5522. },
  5523. enumerable: true,
  5524. configurable: true
  5525. });
  5526. APIUsageUsageData.prototype.SerializeFields=function()
  5527. {
  5528. this.SetSerializedField("CorrelationId",this.CorrelationId);
  5529. this.SetSerializedField("SessionId",this.SessionId);
  5530. this.SetSerializedField("APIType",this.APIType);
  5531. this.SetSerializedField("APIID",this.APIID);
  5532. this.SetSerializedField("Parameters",this.Parameters);
  5533. this.SetSerializedField("ResponseTime",this.ResponseTime);
  5534. this.SetSerializedField("ErrorType",this.ErrorType)
  5535. };
  5536. return APIUsageUsageData
  5537. }(BaseUsageData);
  5538. OSFLog.APIUsageUsageData=APIUsageUsageData;
  5539. var AppInitializationUsageData=function(_super)
  5540. {
  5541. __extends(AppInitializationUsageData,_super);
  5542. function AppInitializationUsageData()
  5543. {
  5544. _super.call(this,"AppInitialization")
  5545. }
  5546. Object.defineProperty(AppInitializationUsageData.prototype,"CorrelationId",{
  5547. get: function()
  5548. {
  5549. return this.Fields["CorrelationId"]
  5550. },
  5551. set: function(value)
  5552. {
  5553. this.Fields["CorrelationId"]=value
  5554. },
  5555. enumerable: true,
  5556. configurable: true
  5557. });
  5558. Object.defineProperty(AppInitializationUsageData.prototype,"SessionId",{
  5559. get: function()
  5560. {
  5561. return this.Fields["SessionId"]
  5562. },
  5563. set: function(value)
  5564. {
  5565. this.Fields["SessionId"]=value
  5566. },
  5567. enumerable: true,
  5568. configurable: true
  5569. });
  5570. Object.defineProperty(AppInitializationUsageData.prototype,"SuccessCode",{
  5571. get: function()
  5572. {
  5573. return this.Fields["SuccessCode"]
  5574. },
  5575. set: function(value)
  5576. {
  5577. this.Fields["SuccessCode"]=value
  5578. },
  5579. enumerable: true,
  5580. configurable: true
  5581. });
  5582. Object.defineProperty(AppInitializationUsageData.prototype,"Message",{
  5583. get: function()
  5584. {
  5585. return this.Fields["Message"]
  5586. },
  5587. set: function(value)
  5588. {
  5589. this.Fields["Message"]=value
  5590. },
  5591. enumerable: true,
  5592. configurable: true
  5593. });
  5594. AppInitializationUsageData.prototype.SerializeFields=function()
  5595. {
  5596. this.SetSerializedField("CorrelationId",this.CorrelationId);
  5597. this.SetSerializedField("SessionId",this.SessionId);
  5598. this.SetSerializedField("SuccessCode",this.SuccessCode);
  5599. this.SetSerializedField("Message",this.Message)
  5600. };
  5601. return AppInitializationUsageData
  5602. }(BaseUsageData);
  5603. OSFLog.AppInitializationUsageData=AppInitializationUsageData
  5604. })(OSFLog || (OSFLog={}));
  5605. var Logger;
  5606. (function(Logger)
  5607. {
  5608. "use strict";
  5609. (function(TraceLevel)
  5610. {
  5611. TraceLevel[TraceLevel["info"]=0]="info";
  5612. TraceLevel[TraceLevel["warning"]=1]="warning";
  5613. TraceLevel[TraceLevel["error"]=2]="error"
  5614. })(Logger.TraceLevel || (Logger.TraceLevel={}));
  5615. var TraceLevel=Logger.TraceLevel;
  5616. (function(SendFlag)
  5617. {
  5618. SendFlag[SendFlag["none"]=0]="none";
  5619. SendFlag[SendFlag["flush"]=1]="flush"
  5620. })(Logger.SendFlag || (Logger.SendFlag={}));
  5621. var SendFlag=Logger.SendFlag;
  5622. function allowUploadingData()
  5623. {
  5624. if(OSF.Logger && OSF.Logger.ulsEndpoint)
  5625. OSF.Logger.ulsEndpoint.loadProxyFrame()
  5626. }
  5627. Logger.allowUploadingData=allowUploadingData;
  5628. function sendLog(traceLevel, message, flag)
  5629. {
  5630. if(OSF.Logger && OSF.Logger.ulsEndpoint)
  5631. {
  5632. var jsonObj={
  5633. traceLevel: traceLevel,
  5634. message: message,
  5635. flag: flag,
  5636. internalLog: true
  5637. };
  5638. var logs=JSON.stringify(jsonObj);
  5639. OSF.Logger.ulsEndpoint.writeLog(logs)
  5640. }
  5641. }
  5642. Logger.sendLog=sendLog;
  5643. function creatULSEndpoint()
  5644. {
  5645. try
  5646. {
  5647. return new ULSEndpointProxy
  5648. }
  5649. catch(e)
  5650. {
  5651. return null
  5652. }
  5653. }
  5654. var ULSEndpointProxy=function()
  5655. {
  5656. function ULSEndpointProxy()
  5657. {
  5658. var _this=this;
  5659. this.proxyFrame=null;
  5660. this.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";
  5661. this.buffer=[];
  5662. this.proxyFrameReady=false;
  5663. OSF.OUtil.addEventListener(window,"message",function(e)
  5664. {
  5665. return _this.tellProxyFrameReady(e)
  5666. });
  5667. setTimeout(function()
  5668. {
  5669. _this.loadProxyFrame()
  5670. },3e3)
  5671. }
  5672. ULSEndpointProxy.prototype.writeLog=function(log)
  5673. {
  5674. if(this.proxyFrameReady===true)
  5675. this.proxyFrame.contentWindow.postMessage(log,ULSEndpointProxy.telemetryOrigin);
  5676. else if(this.buffer.length < 128)
  5677. this.buffer.push(log)
  5678. };
  5679. ULSEndpointProxy.prototype.loadProxyFrame=function()
  5680. {
  5681. if(this.proxyFrame==null)
  5682. {
  5683. this.proxyFrame=document.createElement("iframe");
  5684. this.proxyFrame.setAttribute("style","display:none");
  5685. this.proxyFrame.setAttribute("src",this.telemetryEndPoint);
  5686. document.head.appendChild(this.proxyFrame)
  5687. }
  5688. };
  5689. ULSEndpointProxy.prototype.tellProxyFrameReady=function(e)
  5690. {
  5691. var _this=this;
  5692. if(e.data==="ProxyFrameReadyToLog")
  5693. {
  5694. this.proxyFrameReady=true;
  5695. for(var i=0; i < this.buffer.length; i++)
  5696. this.writeLog(this.buffer[i]);
  5697. this.buffer.length=0;
  5698. OSF.OUtil.removeEventListener(window,"message",function(e)
  5699. {
  5700. return _this.tellProxyFrameReady(e)
  5701. })
  5702. }
  5703. else if(e.data==="ProxyFrameReadyToInit")
  5704. {
  5705. var initJson={
  5706. appName: "Office APPs",
  5707. sessionId: OSF.OUtil.Guid.generateNewGuid()
  5708. };
  5709. var initStr=JSON.stringify(initJson);
  5710. this.proxyFrame.contentWindow.postMessage(initStr,ULSEndpointProxy.telemetryOrigin)
  5711. }
  5712. };
  5713. ULSEndpointProxy.telemetryOrigin="https://telemetryservice.firstpartyapps.oaspapps.com";
  5714. return ULSEndpointProxy
  5715. }();
  5716. if(!OSF.Logger)
  5717. OSF.Logger=Logger;
  5718. Logger.ulsEndpoint=creatULSEndpoint()
  5719. })(Logger || (Logger={}));
  5720. var OSFAppTelemetry;
  5721. (function(OSFAppTelemetry)
  5722. {
  5723. "use strict";
  5724. var appInfo;
  5725. var sessionId=OSF.OUtil.Guid.generateNewGuid();
  5726. var osfControlAppCorrelationId="";
  5727. var omexDomainRegex=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i");
  5728. var AppInfo=function()
  5729. {
  5730. function AppInfo(){}
  5731. return AppInfo
  5732. }();
  5733. var Event=function()
  5734. {
  5735. function Event(name, handler)
  5736. {
  5737. this.name=name;
  5738. this.handler=handler
  5739. }
  5740. return Event
  5741. }();
  5742. var AppStorage=function()
  5743. {
  5744. function AppStorage()
  5745. {
  5746. this.clientIDKey="Office API client";
  5747. this.logIdSetKey="Office App Log Id Set"
  5748. }
  5749. AppStorage.prototype.getClientId=function()
  5750. {
  5751. var clientId=this.getValue(this.clientIDKey);
  5752. if(!clientId || clientId.length <=0 || clientId.length > 40)
  5753. {
  5754. clientId=OSF.OUtil.Guid.generateNewGuid();
  5755. this.setValue(this.clientIDKey,clientId)
  5756. }
  5757. return clientId
  5758. };
  5759. AppStorage.prototype.saveLog=function(logId, log)
  5760. {
  5761. var logIdSet=this.getValue(this.logIdSetKey);
  5762. logIdSet=(logIdSet && logIdSet.length > 0 ? logIdSet+";" : "")+logId;
  5763. this.setValue(this.logIdSetKey,logIdSet);
  5764. this.setValue(logId,log)
  5765. };
  5766. AppStorage.prototype.enumerateLog=function(callback, clean)
  5767. {
  5768. var logIdSet=this.getValue(this.logIdSetKey);
  5769. if(logIdSet)
  5770. {
  5771. var ids=logIdSet.split(";");
  5772. for(var id in ids)
  5773. {
  5774. var logId=ids[id];
  5775. var log=this.getValue(logId);
  5776. if(log)
  5777. {
  5778. if(callback)
  5779. callback(logId,log);
  5780. if(clean)
  5781. this.remove(logId)
  5782. }
  5783. }
  5784. if(clean)
  5785. this.remove(this.logIdSetKey)
  5786. }
  5787. };
  5788. AppStorage.prototype.getValue=function(key)
  5789. {
  5790. var osfLocalStorage=OSF.OUtil.getLocalStorage();
  5791. var value="";
  5792. if(osfLocalStorage)
  5793. value=osfLocalStorage.getItem(key);
  5794. return value
  5795. };
  5796. AppStorage.prototype.setValue=function(key, value)
  5797. {
  5798. var osfLocalStorage=OSF.OUtil.getLocalStorage();
  5799. if(osfLocalStorage)
  5800. osfLocalStorage.setItem(key,value)
  5801. };
  5802. AppStorage.prototype.remove=function(key)
  5803. {
  5804. var osfLocalStorage=OSF.OUtil.getLocalStorage();
  5805. if(osfLocalStorage)
  5806. try
  5807. {
  5808. osfLocalStorage.removeItem(key)
  5809. }
  5810. catch(ex){}
  5811. };
  5812. return AppStorage
  5813. }();
  5814. var AppLogger=function()
  5815. {
  5816. function AppLogger(){}
  5817. AppLogger.prototype.LogData=function(data)
  5818. {
  5819. if(!OSF.Logger)
  5820. return;
  5821. OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,data.SerializeRow(),OSF.Logger.SendFlag.none)
  5822. };
  5823. AppLogger.prototype.LogRawData=function(log)
  5824. {
  5825. if(!OSF.Logger)
  5826. return;
  5827. OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,log,OSF.Logger.SendFlag.none)
  5828. };
  5829. return AppLogger
  5830. }();
  5831. function initialize(context)
  5832. {
  5833. if(!OSF.Logger)
  5834. return;
  5835. if(appInfo)
  5836. return;
  5837. appInfo=new AppInfo;
  5838. if(context.get_hostFullVersion())
  5839. appInfo.hostVersion=context.get_hostFullVersion();
  5840. else
  5841. appInfo.hostVersion=context.get_appVersion();
  5842. appInfo.appId=context.get_id();
  5843. appInfo.host=context.get_appName();
  5844. appInfo.browser=window.navigator.userAgent;
  5845. appInfo.correlationId=context.get_correlationId();
  5846. appInfo.clientId=(new AppStorage).getClientId();
  5847. appInfo.appInstanceId=context.get_appInstanceId();
  5848. if(appInfo.appInstanceId)
  5849. appInfo.appInstanceId=appInfo.appInstanceId.replace(/[{}]/g,"").toLowerCase();
  5850. appInfo.message=context.get_hostCustomMessage();
  5851. appInfo.officeJSVersion=OSF.ConstantNames.FileVersion;
  5852. appInfo.hostJSVersion="16.0.7524.3000";
  5853. var docUrl=context.get_docUrl();
  5854. appInfo.docUrl=omexDomainRegex.test(docUrl) ? docUrl : "";
  5855. var url=location.href;
  5856. if(url)
  5857. url=url.split("?")[0].split("#")[0];
  5858. appInfo.appURL=url;
  5859. (function getUserIdAndAssetIdFromToken(token, appInfo)
  5860. {
  5861. var xmlContent;
  5862. var parser;
  5863. var xmlDoc;
  5864. appInfo.assetId="";
  5865. appInfo.userId="";
  5866. try
  5867. {
  5868. xmlContent=decodeURIComponent(token);
  5869. parser=new DOMParser;
  5870. xmlDoc=parser.parseFromString(xmlContent,"text/xml");
  5871. var cidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("cid");
  5872. var oidNode=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("oid");
  5873. if(cidNode && cidNode.nodeValue)
  5874. appInfo.userId=cidNode.nodeValue;
  5875. else if(oidNode && oidNode.nodeValue)
  5876. appInfo.userId=oidNode.nodeValue;
  5877. appInfo.assetId=xmlDoc.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue
  5878. }
  5879. catch(e){}
  5880. finally
  5881. {
  5882. xmlContent=null;
  5883. xmlDoc=null;
  5884. parser=null
  5885. }
  5886. })(context.get_eToken(),appInfo);
  5887. (function handleLifecycle()
  5888. {
  5889. var startTime=new Date;
  5890. var lastFocus=null;
  5891. var focusTime=0;
  5892. var finished=false;
  5893. var adjustFocusTime=function()
  5894. {
  5895. if(document.hasFocus())
  5896. {
  5897. if(lastFocus==null)
  5898. lastFocus=new Date
  5899. }
  5900. else if(lastFocus)
  5901. {
  5902. focusTime+=Math.abs((new Date).getTime() - lastFocus.getTime());
  5903. lastFocus=null
  5904. }
  5905. };
  5906. var eventList=[];
  5907. eventList.push(new Event("focus",adjustFocusTime));
  5908. eventList.push(new Event("blur",adjustFocusTime));
  5909. eventList.push(new Event("focusout",adjustFocusTime));
  5910. eventList.push(new Event("focusin",adjustFocusTime));
  5911. var exitFunction=function()
  5912. {
  5913. for(var i=0; i < eventList.length; i++)
  5914. OSF.OUtil.removeEventListener(window,eventList[i].name,eventList[i].handler);
  5915. eventList.length=0;
  5916. if(!finished)
  5917. {
  5918. if(document.hasFocus() && lastFocus)
  5919. {
  5920. focusTime+=Math.abs((new Date).getTime() - lastFocus.getTime());
  5921. lastFocus=null
  5922. }
  5923. OSFAppTelemetry.onAppClosed(Math.abs((new Date).getTime() - startTime.getTime()),focusTime);
  5924. finished=true
  5925. }
  5926. };
  5927. eventList.push(new Event("beforeunload",exitFunction));
  5928. eventList.push(new Event("unload",exitFunction));
  5929. for(var i=0; i < eventList.length; i++)
  5930. OSF.OUtil.addEventListener(window,eventList[i].name,eventList[i].handler);
  5931. adjustFocusTime()
  5932. })();
  5933. OSFAppTelemetry.onAppActivated()
  5934. }
  5935. OSFAppTelemetry.initialize=initialize;
  5936. function onAppActivated()
  5937. {
  5938. if(!appInfo)
  5939. return;
  5940. (new AppStorage).enumerateLog(function(id, log)
  5941. {
  5942. return(new AppLogger).LogRawData(log)
  5943. },true);
  5944. var data=new OSFLog.AppActivatedUsageData;
  5945. data.SessionId=sessionId;
  5946. data.AppId=appInfo.appId;
  5947. data.AssetId=appInfo.assetId;
  5948. data.AppURL=appInfo.appURL;
  5949. data.UserId=appInfo.userId;
  5950. data.ClientId=appInfo.clientId;
  5951. data.Browser=appInfo.browser;
  5952. data.Host=appInfo.host;
  5953. data.HostVersion=appInfo.hostVersion;
  5954. data.CorrelationId=appInfo.correlationId;
  5955. data.AppSizeWidth=window.innerWidth;
  5956. data.AppSizeHeight=window.innerHeight;
  5957. data.AppInstanceId=appInfo.appInstanceId;
  5958. data.Message=appInfo.message;
  5959. data.DocUrl=appInfo.docUrl;
  5960. data.OfficeJSVersion=appInfo.officeJSVersion;
  5961. data.HostJSVersion=appInfo.hostJSVersion;
  5962. (new AppLogger).LogData(data);
  5963. setTimeout(function()
  5964. {
  5965. if(!OSF.Logger)
  5966. return;
  5967. OSF.Logger.allowUploadingData()
  5968. },100)
  5969. }
  5970. OSFAppTelemetry.onAppActivated=onAppActivated;
  5971. function onScriptDone(scriptId, msStartTime, msResponseTime, appCorrelationId)
  5972. {
  5973. var data=new OSFLog.ScriptLoadUsageData;
  5974. data.CorrelationId=appCorrelationId;
  5975. data.SessionId=sessionId;
  5976. data.ScriptId=scriptId;
  5977. data.StartTime=msStartTime;
  5978. data.ResponseTime=msResponseTime;
  5979. (new AppLogger).LogData(data)
  5980. }
  5981. OSFAppTelemetry.onScriptDone=onScriptDone;
  5982. function onCallDone(apiType, id, parameters, msResponseTime, errorType)
  5983. {
  5984. if(!appInfo)
  5985. return;
  5986. var data=new OSFLog.APIUsageUsageData;
  5987. data.CorrelationId=osfControlAppCorrelationId;
  5988. data.SessionId=sessionId;
  5989. data.APIType=apiType;
  5990. data.APIID=id;
  5991. data.Parameters=parameters;
  5992. data.ResponseTime=msResponseTime;
  5993. data.ErrorType=errorType;
  5994. (new AppLogger).LogData(data)
  5995. }
  5996. OSFAppTelemetry.onCallDone=onCallDone;
  5997. function onMethodDone(id, args, msResponseTime, errorType)
  5998. {
  5999. var parameters=null;
  6000. if(args)
  6001. if(typeof args=="number")
  6002. parameters=String(args);
  6003. else if(typeof args==="object")
  6004. for(var index in args)
  6005. {
  6006. if(parameters !==null)
  6007. parameters+=",";
  6008. else
  6009. parameters="";
  6010. if(typeof args[index]=="number")
  6011. parameters+=String(args[index])
  6012. }
  6013. else
  6014. parameters="";
  6015. OSF.AppTelemetry.onCallDone("method",id,parameters,msResponseTime,errorType)
  6016. }
  6017. OSFAppTelemetry.onMethodDone=onMethodDone;
  6018. function onPropertyDone(propertyName, msResponseTime)
  6019. {
  6020. OSF.AppTelemetry.onCallDone("property",-1,propertyName,msResponseTime)
  6021. }
  6022. OSFAppTelemetry.onPropertyDone=onPropertyDone;
  6023. function onEventDone(id, errorType)
  6024. {
  6025. OSF.AppTelemetry.onCallDone("event",id,null,0,errorType)
  6026. }
  6027. OSFAppTelemetry.onEventDone=onEventDone;
  6028. function onRegisterDone(register, id, msResponseTime, errorType)
  6029. {
  6030. OSF.AppTelemetry.onCallDone(register ? "registerevent" : "unregisterevent",id,null,msResponseTime,errorType)
  6031. }
  6032. OSFAppTelemetry.onRegisterDone=onRegisterDone;
  6033. function onAppClosed(openTime, focusTime)
  6034. {
  6035. if(!appInfo)
  6036. return;
  6037. var data=new OSFLog.AppClosedUsageData;
  6038. data.CorrelationId=osfControlAppCorrelationId;
  6039. data.SessionId=sessionId;
  6040. data.FocusTime=focusTime;
  6041. data.OpenTime=openTime;
  6042. data.AppSizeFinalWidth=window.innerWidth;
  6043. data.AppSizeFinalHeight=window.innerHeight;
  6044. (new AppStorage).saveLog(sessionId,data.SerializeRow())
  6045. }
  6046. OSFAppTelemetry.onAppClosed=onAppClosed;
  6047. function setOsfControlAppCorrelationId(correlationId)
  6048. {
  6049. osfControlAppCorrelationId=correlationId
  6050. }
  6051. OSFAppTelemetry.setOsfControlAppCorrelationId=setOsfControlAppCorrelationId;
  6052. function doAppInitializationLogging(isException, message)
  6053. {
  6054. var data=new OSFLog.AppInitializationUsageData;
  6055. data.CorrelationId=osfControlAppCorrelationId;
  6056. data.SessionId=sessionId;
  6057. data.SuccessCode=isException ? 1 : 0;
  6058. data.Message=message;
  6059. (new AppLogger).LogData(data)
  6060. }
  6061. OSFAppTelemetry.doAppInitializationLogging=doAppInitializationLogging;
  6062. function logAppCommonMessage(message)
  6063. {
  6064. doAppInitializationLogging(false,message)
  6065. }
  6066. OSFAppTelemetry.logAppCommonMessage=logAppCommonMessage;
  6067. function logAppException(errorMessage)
  6068. {
  6069. doAppInitializationLogging(true,errorMessage)
  6070. }
  6071. OSFAppTelemetry.logAppException=logAppException;
  6072. OSF.AppTelemetry=OSFAppTelemetry
  6073. })(OSFAppTelemetry || (OSFAppTelemetry={}));
  6074. var OfficeExt;
  6075. (function(OfficeExt)
  6076. {
  6077. var AppCommand;
  6078. (function(AppCommand)
  6079. {
  6080. var AppCommandManager=function()
  6081. {
  6082. function AppCommandManager()
  6083. {
  6084. var _this=this;
  6085. this._pseudoDocument=null;
  6086. this._eventDispatch=null;
  6087. this._processAppCommandInvocation=function(args)
  6088. {
  6089. var verifyResult=_this._verifyManifestCallback(args.callbackName);
  6090. if(verifyResult.errorCode !=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)
  6091. {
  6092. _this._invokeAppCommandCompletedMethod(args.appCommandId,verifyResult.errorCode,"");
  6093. return
  6094. }
  6095. var eventObj=_this._constructEventObjectForCallback(args);
  6096. if(eventObj)
  6097. window.setTimeout(function()
  6098. {
  6099. verifyResult.callback(eventObj)
  6100. },0);
  6101. else
  6102. _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")
  6103. }
  6104. }
  6105. AppCommandManager.initializeOsfDda=function()
  6106. {
  6107. OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync: "appCommandInvocationCompletedAsync"});
  6108. OSF.DDA.AsyncMethodCalls.define({
  6109. method: OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,
  6110. requiredArguments: [{
  6111. name: Microsoft.Office.WebExtension.Parameters.Id,
  6112. types: ["string"]
  6113. },{
  6114. name: Microsoft.Office.WebExtension.Parameters.Status,
  6115. types: ["number"]
  6116. },{
  6117. name: Microsoft.Office.WebExtension.Parameters.Data,
  6118. types: ["string"]
  6119. }]
  6120. });
  6121. OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent: "AppCommandInvokedEvent"});
  6122. OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked: "appCommandInvoked"});
  6123. OSF.OUtil.setNamespace("AppCommand",OSF.DDA);
  6124. OSF.DDA.AppCommand.AppCommandInvokedEventArgs=OfficeExt.AppCommand.AppCommandInvokedEventArgs
  6125. };
  6126. AppCommandManager.prototype.initializeAndChangeOnce=function(callback)
  6127. {
  6128. AppCommand.registerDdaFacade();
  6129. this._pseudoDocument={};
  6130. OSF.DDA.DispIdHost.addAsyncMethods(this._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,]);
  6131. this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked,]);
  6132. var onRegisterCompleted=function(result)
  6133. {
  6134. if(callback)
  6135. if(result.status=="succeeded")
  6136. callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);
  6137. else
  6138. callback(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)
  6139. };
  6140. OSF.DDA.DispIdHost.addEventSupport(this._pseudoDocument,this._eventDispatch);
  6141. this._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,this._processAppCommandInvocation,onRegisterCompleted)
  6142. };
  6143. AppCommandManager.prototype._verifyManifestCallback=function(callbackName)
  6144. {
  6145. var defaultResult={
  6146. callback: null,
  6147. errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback
  6148. };
  6149. callbackName=callbackName.trim();
  6150. try
  6151. {
  6152. var callList=callbackName.split(".");
  6153. var parentObject=window;
  6154. for(var i=0; i < callList.length - 1; i++)
  6155. if(parentObject[callList[i]] && (typeof parentObject[callList[i]]=="object" || typeof parentObject[callList[i]]=="function"))
  6156. parentObject=parentObject[callList[i]];
  6157. else
  6158. return defaultResult;
  6159. var callbackFunc=parentObject[callList[callList.length - 1]];
  6160. if(typeof callbackFunc !="function")
  6161. return defaultResult
  6162. }
  6163. catch(e)
  6164. {
  6165. return defaultResult
  6166. }
  6167. return{
  6168. callback: callbackFunc,
  6169. errorCode: OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess
  6170. }
  6171. };
  6172. AppCommandManager.prototype._invokeAppCommandCompletedMethod=function(appCommandId, resultCode, data)
  6173. {
  6174. this._pseudoDocument.appCommandInvocationCompletedAsync(appCommandId,resultCode,data)
  6175. };
  6176. AppCommandManager.prototype._constructEventObjectForCallback=function(args)
  6177. {
  6178. var _this=this;
  6179. var eventObj=new AppCommandCallbackEventArgs;
  6180. try
  6181. {
  6182. var jsonData=JSON.parse(args.eventObjStr);
  6183. this._translateEventObjectInternal(jsonData,eventObj);
  6184. Object.defineProperty(eventObj,"completed",{
  6185. value: function(completedContext)
  6186. {
  6187. eventObj.completedContext=completedContext;
  6188. var jsonString=JSON.stringify(eventObj);
  6189. _this._invokeAppCommandCompletedMethod(args.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,jsonString)
  6190. },
  6191. enumerable: true
  6192. })
  6193. }
  6194. catch(e)
  6195. {
  6196. eventObj=null
  6197. }
  6198. return eventObj
  6199. };
  6200. AppCommandManager.prototype._translateEventObjectInternal=function(input, output)
  6201. {
  6202. for(var key in input)
  6203. {
  6204. if(!input.hasOwnProperty(key))
  6205. continue;
  6206. var inputChild=input[key];
  6207. if(typeof inputChild=="object" && inputChild !=null)
  6208. {
  6209. OSF.OUtil.defineEnumerableProperty(output,key,{value: {}});
  6210. this._translateEventObjectInternal(inputChild,output[key])
  6211. }
  6212. else
  6213. Object.defineProperty(output,key,{
  6214. value: inputChild,
  6215. enumerable: true,
  6216. writable: true
  6217. })
  6218. }
  6219. };
  6220. AppCommandManager.prototype._constructObjectByTemplate=function(template, input)
  6221. {
  6222. var output={};
  6223. if(!template || !input)
  6224. return output;
  6225. for(var key in template)
  6226. if(template.hasOwnProperty(key))
  6227. {
  6228. output[key]=null;
  6229. if(input[key] !=null)
  6230. {
  6231. var templateChild=template[key];
  6232. var inputChild=input[key];
  6233. var inputChildType=typeof inputChild;
  6234. if(typeof templateChild=="object" && templateChild !=null)
  6235. output[key]=this._constructObjectByTemplate(templateChild,inputChild);
  6236. else if(inputChildType=="number" || inputChildType=="string" || inputChildType=="boolean")
  6237. output[key]=inputChild
  6238. }
  6239. }
  6240. return output
  6241. };
  6242. AppCommandManager.instance=function()
  6243. {
  6244. if(AppCommandManager._instance==null)
  6245. AppCommandManager._instance=new AppCommandManager;
  6246. return AppCommandManager._instance
  6247. };
  6248. AppCommandManager._instance=null;
  6249. return AppCommandManager
  6250. }();
  6251. AppCommand.AppCommandManager=AppCommandManager;
  6252. var AppCommandInvokedEventArgs=function()
  6253. {
  6254. function AppCommandInvokedEventArgs(appCommandId, callbackName, eventObjStr)
  6255. {
  6256. this.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked;
  6257. this.appCommandId=appCommandId;
  6258. this.callbackName=callbackName;
  6259. this.eventObjStr=eventObjStr
  6260. }
  6261. AppCommandInvokedEventArgs.create=function(eventProperties)
  6262. {
  6263. return new AppCommandInvokedEventArgs(eventProperties[AppCommand.AppCommandInvokedEventEnums.AppCommandId],eventProperties[AppCommand.AppCommandInvokedEventEnums.CallbackName],eventProperties[AppCommand.AppCommandInvokedEventEnums.EventObjStr])
  6264. };
  6265. return AppCommandInvokedEventArgs
  6266. }();
  6267. AppCommand.AppCommandInvokedEventArgs=AppCommandInvokedEventArgs;
  6268. var AppCommandCallbackEventArgs=function()
  6269. {
  6270. function AppCommandCallbackEventArgs(){}
  6271. return AppCommandCallbackEventArgs
  6272. }();
  6273. AppCommand.AppCommandCallbackEventArgs=AppCommandCallbackEventArgs;
  6274. AppCommand.AppCommandInvokedEventEnums={
  6275. AppCommandId: "appCommandId",
  6276. CallbackName: "callbackName",
  6277. EventObjStr: "eventObjStr"
  6278. }
  6279. })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={}))
  6280. })(OfficeExt || (OfficeExt={}));
  6281. OfficeExt.AppCommand.AppCommandManager.initializeOsfDda();
  6282. var OfficeExt;
  6283. (function(OfficeExt)
  6284. {
  6285. var AppCommand;
  6286. (function(AppCommand)
  6287. {
  6288. function registerDdaFacade()
  6289. {
  6290. if(OSF.DDA.SafeArray)
  6291. {
  6292. var parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap;
  6293. parameterMap.define({
  6294. type: OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod,
  6295. toHost: [{
  6296. name: Microsoft.Office.WebExtension.Parameters.Id,
  6297. value: 0
  6298. },{
  6299. name: Microsoft.Office.WebExtension.Parameters.Status,
  6300. value: 1
  6301. },{
  6302. name: Microsoft.Office.WebExtension.Parameters.Data,
  6303. value: 2
  6304. }]
  6305. });
  6306. parameterMap.define({
  6307. type: OSF.DDA.EventDispId.dispidAppCommandInvokedEvent,
  6308. fromHost: [{
  6309. name: OSF.DDA.EventDescriptors.AppCommandInvokedEvent,
  6310. value: parameterMap.self
  6311. }],
  6312. isComplexType: true
  6313. });
  6314. parameterMap.define({
  6315. type: OSF.DDA.EventDescriptors.AppCommandInvokedEvent,
  6316. fromHost: [{
  6317. name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.AppCommandId,
  6318. value: 0
  6319. },{
  6320. name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.CallbackName,
  6321. value: 1
  6322. },{
  6323. name: OfficeExt.AppCommand.AppCommandInvokedEventEnums.EventObjStr,
  6324. value: 2
  6325. },],
  6326. isComplexType: true
  6327. })
  6328. }
  6329. }
  6330. AppCommand.registerDdaFacade=registerDdaFacade
  6331. })(AppCommand=OfficeExt.AppCommand || (OfficeExt.AppCommand={}))
  6332. })(OfficeExt || (OfficeExt={}));
  6333. OSF.DDA.AsyncMethodNames.addNames({CloseContainerAsync: "closeContainer"});
  6334. var OfficeExt;
  6335. (function(OfficeExt)
  6336. {
  6337. var Container=function()
  6338. {
  6339. function Container(parameters){}
  6340. return Container
  6341. }();
  6342. OfficeExt.Container=Container
  6343. })(OfficeExt || (OfficeExt={}));
  6344. OSF.DDA.AsyncMethodCalls.define({
  6345. method: OSF.DDA.AsyncMethodNames.CloseContainerAsync,
  6346. requiredArguments: [],
  6347. supportedOptions: [],
  6348. privateStateCallbacks: []
  6349. });
  6350. OSF.DDA.SafeArray.Delegate.ParameterMap.define({
  6351. type: OSF.DDA.MethodDispId.dispidCloseContainerMethod,
  6352. fromHost: [],
  6353. toHost: []
  6354. });
  6355. var OfficeJsClient_OutlookWin32;
  6356. (function(OfficeJsClient_OutlookWin32)
  6357. {
  6358. function prepareApiSurface(appContext)
  6359. {
  6360. if(appContext.get_isDialog())
  6361. appContext.ui=new OSF.DDA.UI.ChildUI;
  6362. else
  6363. {
  6364. appContext.ui=new OSF.DDA.UI.ParentUI;
  6365. OSF.DDA.DispIdHost.addAsyncMethods(appContext.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync])
  6366. }
  6367. }
  6368. OfficeJsClient_OutlookWin32.prepareApiSurface=prepareApiSurface;
  6369. function prepareRightAfterWebExtensionInitialize()
  6370. {
  6371. var appCommandHandler=OfficeExt.AppCommand.AppCommandManager.instance();
  6372. appCommandHandler.initializeAndChangeOnce()
  6373. }
  6374. OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize=prepareRightAfterWebExtensionInitialize
  6375. })(OfficeJsClient_OutlookWin32 || (OfficeJsClient_OutlookWin32={}));
  6376. OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function OSF_InitializationHelper$prepareRightAfterWebExtensionInitialize()
  6377. {
  6378. OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize()
  6379. };
  6380. OSF.InitializationHelper.prototype.prepareApiSurface=function OSF_InitializationHelper$prepareApiSurface(appContext)
  6381. {
  6382. var license=new OSF.DDA.License(appContext.get_eToken());
  6383. if(appContext.get_appName()==OSF.AppName.OutlookWebApp)
  6384. {
  6385. OSF.WebApp._UpdateLinksForHostAndXdmInfo();
  6386. this.initWebDialog(appContext);
  6387. OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM));
  6388. OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap))
  6389. }
  6390. else
  6391. {
  6392. OfficeJsClient_OutlookWin32.prepareApiSurface(appContext);
  6393. OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(appContext,this._settings,license,appContext.appOM,OSF.DDA.Theming ? OSF.DDA.Theming.getOfficeTheme : null,appContext.ui));
  6394. OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap))
  6395. }
  6396. };
  6397. OSF.DDA.SettingsManager={
  6398. SerializedSettings: "serializedSettings",
  6399. DateJSONPrefix: "Date(",
  6400. DataJSONSuffix: ")",
  6401. serializeSettings: function OSF_DDA_SettingsManager$serializeSettings(settingsCollection)
  6402. {
  6403. var ret={};
  6404. for(var key in settingsCollection)
  6405. {
  6406. var value=settingsCollection[key];
  6407. try
  6408. {
  6409. if(JSON)
  6410. value=JSON.stringify(value,function dateReplacer(k, v)
  6411. {
  6412. return OSF.OUtil.isDate(this[k]) ? OSF.DDA.SettingsManager.DateJSONPrefix+this[k].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix : v
  6413. });
  6414. else
  6415. value=Sys.Serialization.JavaScriptSerializer.serialize(value);
  6416. ret[key]=value
  6417. }
  6418. catch(ex){}
  6419. }
  6420. return ret
  6421. },
  6422. deserializeSettings: function OSF_DDA_SettingsManager$deserializeSettings(serializedSettings)
  6423. {
  6424. var ret={};
  6425. serializedSettings=serializedSettings || {};
  6426. for(var key in serializedSettings)
  6427. {
  6428. var value=serializedSettings[key];
  6429. try
  6430. {
  6431. if(JSON)
  6432. value=JSON.parse(value,function dateReviver(k, v)
  6433. {
  6434. var d;
  6435. if(typeof v==="string" && v && v.length > 6 && v.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix && v.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix)
  6436. {
  6437. d=new Date(parseInt(v.slice(5,-1)));
  6438. if(d)
  6439. return d
  6440. }
  6441. return v
  6442. });
  6443. else
  6444. value=Sys.Serialization.JavaScriptSerializer.deserialize(value,true);
  6445. ret[key]=value
  6446. }
  6447. catch(ex){}
  6448. }
  6449. return ret
  6450. }
  6451. };
  6452. OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function OSF_InitializationHelper$loadAppSpecificScriptAndCreateOM(appContext, appReady, basePath)
  6453. {
  6454. Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");
  6455. Microsoft.Office.WebExtension.MailboxEnums.EntityType={
  6456. MeetingSuggestion: "meetingSuggestion",
  6457. TaskSuggestion: "taskSuggestion",
  6458. Address: "address",
  6459. EmailAddress: "emailAddress",
  6460. Url: "url",
  6461. PhoneNumber: "phoneNumber",
  6462. Contact: "contact",
  6463. FlightReservations: "flightReservations",
  6464. ParcelDeliveries: "parcelDeliveries"
  6465. };
  6466. Microsoft.Office.WebExtension.MailboxEnums.ItemType={
  6467. Message: "message",
  6468. Appointment: "appointment"
  6469. };
  6470. Microsoft.Office.WebExtension.MailboxEnums.ResponseType={
  6471. None: "none",
  6472. Organizer: "organizer",
  6473. Tentative: "tentative",
  6474. Accepted: "accepted",
  6475. Declined: "declined"
  6476. };
  6477. Microsoft.Office.WebExtension.MailboxEnums.RecipientType={
  6478. Other: "other",
  6479. DistributionList: "distributionList",
  6480. User: "user",
  6481. ExternalUser: "externalUser"
  6482. };
  6483. Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={
  6484. File: "file",
  6485. Item: "item",
  6486. Cloud: "cloud"
  6487. };
  6488. Microsoft.Office.WebExtension.MailboxEnums.BodyType={
  6489. Text: "text",
  6490. Html: "html"
  6491. };
  6492. Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={
  6493. ProgressIndicator: "progressIndicator",
  6494. InformationalMessage: "informationalMessage",
  6495. ErrorMessage: "errorMessage"
  6496. };
  6497. Microsoft.Office.WebExtension.CoercionType={
  6498. Text: "text",
  6499. Html: "html"
  6500. };
  6501. Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={
  6502. Office365: "office365",
  6503. OutlookCom: "outlookCom",
  6504. Enterprise: "enterprise"
  6505. };
  6506. Microsoft.Office.WebExtension.MailboxEnums.RestVersion={
  6507. v1_0: "v1.0",
  6508. v2_0: "v2.0",
  6509. Beta: "beta"
  6510. };
  6511. Microsoft.Office.WebExtension.MailboxEnums.ModuleType={Addins: "addins"};
  6512. Type.registerNamespace("OSF.DDA");
  6513. var OSF=window["OSF"] || {};
  6514. OSF.DDA=OSF.DDA || {};
  6515. window["OSF"]["DDA"]["OutlookAppOm"]=OSF.DDA.OutlookAppOm=function(officeAppContext, targetWindow, appReadyCallback)
  6516. {
  6517. this.$$d_navigateToModuleAsync=Function.createDelegate(this,this.navigateToModuleAsync);
  6518. this.$$d_displayPersonaCardAsync=Function.createDelegate(this,this.displayPersonaCardAsync);
  6519. this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);
  6520. this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);
  6521. this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);
  6522. this.$$d__getRestUrl$p$0=Function.createDelegate(this,this._getRestUrl$p$0);
  6523. this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);
  6524. this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);
  6525. this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);
  6526. this.$$d_getItem=Function.createDelegate(this,this.getItem);
  6527. this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);
  6528. this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);
  6529. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=this;
  6530. this._officeAppContext$p$0=officeAppContext;
  6531. this._appReadyCallback$p$0=appReadyCallback;
  6532. var $$t_4=this;
  6533. var stringLoadedCallback=function()
  6534. {
  6535. if(appReadyCallback)
  6536. if(!$$t_4._officeAppContext$p$0["get_isDialog"]())
  6537. $$t_4.invokeHostMethod(1,null,$$t_4.$$d__getInitialDataResponseHandler$p$0);
  6538. else
  6539. window.setTimeout($$t_4.$$d__callAppReadyCallback$p$0,0)
  6540. };
  6541. if(this._areStringsLoaded$p$0())
  6542. stringLoadedCallback();
  6543. else
  6544. this._loadLocalizedScript$p$0(stringLoadedCallback)
  6545. };
  6546. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i=function(currentPermissionLevel)
  6547. {
  6548. if(!currentPermissionLevel)
  6549. throw Error.create(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeeded_Text"]);
  6550. };
  6551. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i=function(value, minValue, maxValue, argumentName)
  6552. {
  6553. if(value < minValue || value > maxValue)
  6554. throw Error.argumentOutOfRange(argumentName);
  6555. };
  6556. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p=function(module)
  6557. {
  6558. if($h.ScriptHelpers.isNullOrUndefined(module))
  6559. throw Error.argumentNull("module");
  6560. else if(module==="")
  6561. throw Error.argument("module","module cannot be empty.");
  6562. if(module !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"])
  6563. throw Error.notImplemented(String.format("API not supported for module '{0}'",module));
  6564. };
  6565. window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p=function(data)
  6566. {
  6567. var htmlBody="";
  6568. if("htmlBody" in data)
  6569. {
  6570. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p(data["htmlBody"]);
  6571. htmlBody=data["htmlBody"]
  6572. }
  6573. return htmlBody
  6574. };
  6575. window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p=function(data)
  6576. {
  6577. var attachments=[];
  6578. if("attachments" in data)
  6579. {
  6580. attachments=data["attachments"];
  6581. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p(attachments)
  6582. }
  6583. return attachments
  6584. };
  6585. window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p=function(data)
  6586. {
  6587. var args=[];
  6588. if("options" in data)
  6589. args[0]=data["options"];
  6590. if("callback" in data)
  6591. args[args["length"]]=data["callback"];
  6592. return args
  6593. };
  6594. window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p=function(attachments)
  6595. {
  6596. var attachmentsData=new Array(0);
  6597. if(Array["isInstanceOfType"](attachments))
  6598. for(var i=0; i < attachments["length"]; i++)
  6599. if(Object["isInstanceOfType"](attachments[i]))
  6600. {
  6601. var attachment=attachments[i];
  6602. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p(attachment);
  6603. attachmentsData[i]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p(attachment)
  6604. }
  6605. else
  6606. throw Error.argument("attachments");
  6607. return attachmentsData
  6608. };
  6609. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidHtmlBody$p=function(htmlBody)
  6610. {
  6611. if(!String["isInstanceOfType"](htmlBody))
  6612. throw Error.argument("htmlBody");
  6613. if($h.ScriptHelpers.isNullOrUndefined(htmlBody))
  6614. throw Error.argument("htmlBody");
  6615. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody")
  6616. };
  6617. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentsArray$p=function(attachments)
  6618. {
  6619. if(!Array["isInstanceOfType"](attachments))
  6620. throw Error.argument("attachments");
  6621. };
  6622. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachment$p=function(attachment)
  6623. {
  6624. if(!Object["isInstanceOfType"](attachment))
  6625. throw Error.argument("attachments");
  6626. if(!("type" in attachment) || !("name" in attachment))
  6627. throw Error.argument("attachments");
  6628. if(!("url" in attachment || "itemId" in attachment))
  6629. throw Error.argument("attachments");
  6630. };
  6631. window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentData$p=function(attachment)
  6632. {
  6633. var attachmentData=null;
  6634. if(attachment["type"]==="file")
  6635. {
  6636. var url=attachment["url"];
  6637. var name=attachment["name"];
  6638. var isInline=$h.ScriptHelpers.isValueTrue(attachment["isInline"]);
  6639. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p(url,name);
  6640. attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p(url,name,isInline)
  6641. }
  6642. else if(attachment["type"]==="item")
  6643. {
  6644. var itemId=window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(attachment["itemId"]);
  6645. var name=attachment["name"];
  6646. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p(itemId,name);
  6647. attachmentData=window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p(itemId,name)
  6648. }
  6649. else
  6650. throw Error.argument("attachments");
  6651. return attachmentData
  6652. };
  6653. window["OSF"]["DDA"]["OutlookAppOm"]._createFileAttachmentData$p=function(url, name, isInline)
  6654. {
  6655. return["file",name,url,isInline]
  6656. };
  6657. window["OSF"]["DDA"]["OutlookAppOm"]._createItemAttachmentData$p=function(itemId, name)
  6658. {
  6659. return["item",name,itemId]
  6660. };
  6661. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentUrlOrName$p=function(url, name)
  6662. {
  6663. if(!String["isInstanceOfType"](url) || !String["isInstanceOfType"](name))
  6664. throw Error.argument("attachments");
  6665. if(url.length > 2048)
  6666. throw Error.argumentOutOfRange("attachments",url.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentUrlTooLong_Text"]);
  6667. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name)
  6668. };
  6669. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentItemIdOrName$p=function(itemId, name)
  6670. {
  6671. if(!String["isInstanceOfType"](itemId) || !String["isInstanceOfType"](name))
  6672. throw Error.argument("attachments");
  6673. if(itemId.length > 200)
  6674. throw Error.argumentOutOfRange("attachments",itemId.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentItemIdTooLong_Text"]);
  6675. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p(name)
  6676. };
  6677. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidAttachmentName$p=function(name)
  6678. {
  6679. if(name.length > 255)
  6680. throw Error.argumentOutOfRange("attachments",name.length,window["_u"]["ExtensibilityStrings"]["l_AttachmentNameTooLong_Text"]);
  6681. };
  6682. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p=function(restVersion)
  6683. {
  6684. if(!restVersion)
  6685. throw Error.argumentNull("restVersion");
  6686. if(restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v2_0"] && restVersion !==window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["Beta"])
  6687. throw Error.argument("restVersion");
  6688. };
  6689. window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost=function(itemId)
  6690. {
  6691. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0 && window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._initialData$p$0.get__isRestIdSupported$i$0())
  6692. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToRestId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"]);
  6693. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToEwsId"](itemId,window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RestVersion"]["v1_0"])
  6694. };
  6695. window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"]=function(dispid, data)
  6696. {
  6697. return data
  6698. };
  6699. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p=function(value, expectedType, argumentName)
  6700. {
  6701. if(Object["getType"](value) !==expectedType)
  6702. throw Error.argumentType(argumentName);
  6703. };
  6704. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p=function(value, minLength, maxLength, name)
  6705. {
  6706. if($h.ScriptHelpers.isNullOrUndefined(value))
  6707. return;
  6708. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(value,String,name);
  6709. var stringValue=value;
  6710. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(stringValue.length,minLength,maxLength,name)
  6711. };
  6712. window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(array)
  6713. {
  6714. return array ? array["join"](";") : null
  6715. };
  6716. window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p=function(recipients)
  6717. {
  6718. if(!recipients)
  6719. return null;
  6720. var results=new Array(recipients["length"]);
  6721. for(var i=0; i < recipients["length"]; i++)
  6722. results[i]=[recipients[i]["address"],recipients[i]["name"]];
  6723. return results
  6724. };
  6725. window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p=function(emailset, name)
  6726. {
  6727. if($h.ScriptHelpers.isNullOrUndefined(emailset))
  6728. return null;
  6729. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(emailset,Array,name);
  6730. var originalAttendees=emailset;
  6731. var updatedAttendees=null;
  6732. var normalizationNeeded=false;
  6733. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(originalAttendees["length"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p,String.format("{0}.length",name));
  6734. for(var i=0; i < originalAttendees["length"]; i++)
  6735. if($h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i]))
  6736. {
  6737. normalizationNeeded=true;
  6738. break
  6739. }
  6740. if(normalizationNeeded)
  6741. updatedAttendees=[];
  6742. for(var i=0; i < originalAttendees["length"]; i++)
  6743. if(normalizationNeeded)
  6744. {
  6745. updatedAttendees[i]=$h.EmailAddressDetails["isInstanceOfType"](originalAttendees[i]) ? originalAttendees[i]["emailAddress"] : originalAttendees[i];
  6746. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(updatedAttendees[i],String,String.format("{0}[{1}]",name,i))
  6747. }
  6748. else
  6749. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(originalAttendees[i],String,String.format("{0}[{1}]",name,i));
  6750. return updatedAttendees
  6751. };
  6752. OSF.DDA.OutlookAppOm.prototype={
  6753. _initialData$p$0: null,
  6754. _item$p$0: null,
  6755. _userProfile$p$0: null,
  6756. _diagnostics$p$0: null,
  6757. _officeAppContext$p$0: null,
  6758. _appReadyCallback$p$0: null,
  6759. _clientEndPoint$p$0: null,
  6760. _hostItemType$p$0: 0,
  6761. _additionalOutlookParams$p$0: null,
  6762. get_clientEndPoint: function()
  6763. {
  6764. if(!this._clientEndPoint$p$0)
  6765. this._clientEndPoint$p$0=OSF._OfficeAppFactory["getClientEndPoint"]();
  6766. return this._clientEndPoint$p$0
  6767. },
  6768. set_clientEndPoint: function(value)
  6769. {
  6770. this._clientEndPoint$p$0=value;
  6771. return value
  6772. },
  6773. get_initialData: function()
  6774. {
  6775. return this._initialData$p$0
  6776. },
  6777. get__appName$i$0: function()
  6778. {
  6779. return this._officeAppContext$p$0["get_appName"]()
  6780. },
  6781. get_additionalOutlookParams: function()
  6782. {
  6783. return this._additionalOutlookParams$p$0
  6784. },
  6785. windowOpenOverrideHandler: function(url, targetName, features, replace)
  6786. {
  6787. this.invokeHostMethod(403,{launchUrl: url},null)
  6788. },
  6789. createAsyncResult: function(value, errorCode, detailedErrorCode, userContext, errorMessage)
  6790. {
  6791. var initArgs={};
  6792. var errorArgs=null;
  6793. initArgs[OSF.DDA.AsyncResultEnum.Properties["Value"]]=value;
  6794. initArgs[OSF.DDA.AsyncResultEnum.Properties["Context"]]=userContext;
  6795. if(0 !==errorCode)
  6796. {
  6797. errorArgs={};
  6798. var errorProperties=$h.OutlookErrorManager.getErrorArgs(detailedErrorCode);
  6799. errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Name"]]=errorProperties["name"];
  6800. errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Message"]]=!errorMessage ? errorProperties["message"] : errorMessage;
  6801. errorArgs[OSF.DDA.AsyncResultEnum.ErrorProperties["Code"]]=detailedErrorCode
  6802. }
  6803. return new OSF.DDA.AsyncResult(initArgs,errorArgs)
  6804. },
  6805. _throwOnMethodCallForInsufficientPermission$i$0: function(requiredPermissionLevel, methodName)
  6806. {
  6807. if(this._initialData$p$0._permissionLevel$p$0 < requiredPermissionLevel)
  6808. throw Error.create(String.format(window["_u"]["ExtensibilityStrings"]["l_ElevatedPermissionNeededForMethod_Text"],methodName));
  6809. },
  6810. _displayReplyForm$i$0: function(obj)
  6811. {
  6812. this._displayReplyFormHelper$p$0(obj,false)
  6813. },
  6814. _displayReplyAllForm$i$0: function(obj)
  6815. {
  6816. this._displayReplyFormHelper$p$0(obj,true)
  6817. },
  6818. get_itemNumber: function()
  6819. {
  6820. return this._additionalOutlookParams$p$0._itemNumber$p$0
  6821. },
  6822. _displayReplyFormHelper$p$0: function(obj, isReplyAll)
  6823. {
  6824. if(String["isInstanceOfType"](obj))
  6825. this._doDisplayReplyForm$p$0(obj,isReplyAll);
  6826. else if(Object["isInstanceOfType"](obj) && Object.getTypeName(obj)==="Object")
  6827. this._doDisplayReplyFormWithAttachments$p$0(obj,isReplyAll);
  6828. else
  6829. throw Error.argumentType();
  6830. },
  6831. _doDisplayReplyForm$p$0: function(htmlBody, isReplyAll)
  6832. {
  6833. if(!$h.ScriptHelpers.isNullOrUndefined(htmlBody))
  6834. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(htmlBody.length,0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody");
  6835. this.invokeHostMethod(isReplyAll ? 11 : 10,{htmlBody: htmlBody},null)
  6836. },
  6837. _doDisplayReplyFormWithAttachments$p$0: function(data, isReplyAll)
  6838. {
  6839. var htmlBody=window["OSF"]["DDA"]["OutlookAppOm"]._getHtmlBody$p(data);
  6840. var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(data);
  6841. var parameters=$h.CommonParameters.parse(window["OSF"]["DDA"]["OutlookAppOm"]._getOptionsAndCallback$p(data),false);
  6842. var $$t_6=this;
  6843. this._standardInvokeHostMethod$i$0(isReplyAll ? 31 : 30,{
  6844. htmlBody: htmlBody,
  6845. attachments: window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments)
  6846. },function(rawInput)
  6847. {
  6848. return rawInput
  6849. },parameters._asyncContext$p$0,parameters._callback$p$0)
  6850. },
  6851. _standardInvokeHostMethod$i$0: function(dispid, data, format, userContext, callback)
  6852. {
  6853. var $$t_B=this;
  6854. this.invokeHostMethod(dispid,data,function(resultCode, response)
  6855. {
  6856. if(callback)
  6857. {
  6858. var asyncResult=null;
  6859. if(Object["isInstanceOfType"](response))
  6860. {
  6861. var responseDictionary=response;
  6862. if("error" in responseDictionary || "data" in responseDictionary || "errorCode" in responseDictionary)
  6863. if(!responseDictionary["error"])
  6864. {
  6865. var formattedData=format ? format(responseDictionary["data"]) : responseDictionary["data"];
  6866. asyncResult=$$t_B.createAsyncResult(formattedData,0,0,userContext,null)
  6867. }
  6868. else
  6869. {
  6870. var errorCode=responseDictionary["errorCode"];
  6871. asyncResult=$$t_B.createAsyncResult(null,1,errorCode,userContext,null)
  6872. }
  6873. }
  6874. if(!asyncResult && resultCode)
  6875. asyncResult=$$t_B.createAsyncResult(null,1,9002,userContext,null);
  6876. callback(asyncResult)
  6877. }
  6878. })
  6879. },
  6880. invokeHostMethod: function(dispid, data, responseCallback)
  6881. {
  6882. if(64===this._officeAppContext$p$0["get_appName"]())
  6883. {
  6884. var args={ApiParams: data};
  6885. args["MethodData"]={
  6886. ControlId: OSF._OfficeAppFactory["getId"](),
  6887. DispatchId: dispid
  6888. };
  6889. args=window["OSF"]["DDA"]["OutlookAppOm"]["addAdditionalArgs"](dispid,args);
  6890. if(dispid===1)
  6891. this.get_clientEndPoint()["invoke"]("GetInitialData",responseCallback,args);
  6892. else
  6893. this.get_clientEndPoint()["invoke"]("ExecuteMethod",responseCallback,args)
  6894. }
  6895. else if(!this._isOwaOnlyMethod$p$0(dispid))
  6896. {
  6897. var executeParameters=this.convertToOutlookParameters(dispid,data);
  6898. var $$t_B=this;
  6899. OSF.ClientHostController["execute"](dispid,executeParameters,function(nativeData, resultCode)
  6900. {
  6901. if(responseCallback)
  6902. {
  6903. var responseData=nativeData.toArray();
  6904. var rawData=window["JSON"]["parse"](responseData[0]);
  6905. if(Object["isInstanceOfType"](rawData))
  6906. {
  6907. var deserializedData=rawData;
  6908. if(responseData["length"] > 1 && responseData[1])
  6909. {
  6910. deserializedData["error"]=true;
  6911. deserializedData["errorCode"]=responseData[1]
  6912. }
  6913. else
  6914. deserializedData["error"]=false;
  6915. responseCallback(resultCode,deserializedData)
  6916. }
  6917. else if(Number["isInstanceOfType"](rawData))
  6918. {
  6919. var returnDict={};
  6920. returnDict["error"]=true;
  6921. returnDict["errorCode"]=rawData;
  6922. responseCallback(resultCode,returnDict)
  6923. }
  6924. else
  6925. throw Error.notImplemented("Return data type from host must be Dictionary or int");
  6926. }
  6927. })
  6928. }
  6929. else if(responseCallback)
  6930. responseCallback(-2,null)
  6931. },
  6932. _dictionaryToDate$i$0: function(input)
  6933. {
  6934. var retValue=new Date(input["year"],input["month"],input["date"],input["hours"],input["minutes"],input["seconds"],!input["milliseconds"] ? 0 : input["milliseconds"]);
  6935. if(window["isNaN"](retValue["getTime"]()))
  6936. throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]);
  6937. return retValue
  6938. },
  6939. _dateToDictionary$i$0: function(input)
  6940. {
  6941. var retValue={};
  6942. retValue["month"]=input["getMonth"]();
  6943. retValue["date"]=input["getDate"]();
  6944. retValue["year"]=input["getFullYear"]();
  6945. retValue["hours"]=input["getHours"]();
  6946. retValue["minutes"]=input["getMinutes"]();
  6947. retValue["seconds"]=input["getSeconds"]();
  6948. retValue["milliseconds"]=input["getMilliseconds"]();
  6949. return retValue
  6950. },
  6951. _isOwaOnlyMethod$p$0: function(dispId)
  6952. {
  6953. switch(dispId)
  6954. {
  6955. case 402:
  6956. case 401:
  6957. case 400:
  6958. case 403:
  6959. return true;
  6960. default:
  6961. return false
  6962. }
  6963. },
  6964. isOutlook16OrGreater: function()
  6965. {
  6966. var hostVersion=this._initialData$p$0.get__hostVersion$i$0();
  6967. var endIndex=0;
  6968. var majorVersionNumber=0;
  6969. if(hostVersion)
  6970. {
  6971. endIndex=hostVersion.indexOf(".");
  6972. majorVersionNumber=window["parseInt"](hostVersion.substring(0,endIndex))
  6973. }
  6974. return majorVersionNumber >=16
  6975. },
  6976. convertToOutlookParameters: function(dispid, data)
  6977. {
  6978. var executeParameters=null;
  6979. var optionalParameters={};
  6980. switch(dispid)
  6981. {
  6982. case 1:
  6983. case 2:
  6984. case 3:
  6985. case 14:
  6986. case 18:
  6987. case 26:
  6988. case 32:
  6989. case 41:
  6990. case 34:
  6991. break;
  6992. case 12:
  6993. optionalParameters["isRest"]=data["isRest"];
  6994. break;
  6995. case 4:
  6996. var jsonProperty=window["JSON"]["stringify"](data["customProperties"]);
  6997. executeParameters=[jsonProperty];
  6998. break;
  6999. case 5:
  7000. executeParameters=[data["body"]];
  7001. break;
  7002. case 8:
  7003. case 9:
  7004. executeParameters=[data["itemId"]];
  7005. break;
  7006. case 7:
  7007. executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["requiredAttendees"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["optionalAttendees"]),data["start"],data["end"],data["location"],window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["resources"]),data["subject"],data["body"]];
  7008. break;
  7009. case 44:
  7010. executeParameters=[window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["toRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["ccRecipients"]),window["OSF"]["DDA"]["OutlookAppOm"]._convertRecipientArrayParameterForOutlookForDisplayApi$p(data["bccRecipients"]),data["subject"],data["htmlBody"],data["attachments"]];
  7011. break;
  7012. case 43:
  7013. executeParameters=[data["ewsIdOrEmail"]];
  7014. break;
  7015. case 45:
  7016. executeParameters=[data["module"],data["queryString"]];
  7017. break;
  7018. case 40:
  7019. executeParameters=[data["extensionId"],data["consentState"]];
  7020. break;
  7021. case 11:
  7022. case 10:
  7023. executeParameters=[data["htmlBody"]];
  7024. break;
  7025. case 31:
  7026. case 30:
  7027. executeParameters=[data["htmlBody"],data["attachments"]];
  7028. break;
  7029. case 23:
  7030. case 13:
  7031. case 38:
  7032. case 29:
  7033. executeParameters=[data["data"],data["coercionType"]];
  7034. break;
  7035. case 37:
  7036. case 28:
  7037. executeParameters=[data["coercionType"]];
  7038. break;
  7039. case 17:
  7040. executeParameters=[data["subject"]];
  7041. break;
  7042. case 15:
  7043. executeParameters=[data["recipientField"]];
  7044. break;
  7045. case 22:
  7046. case 21:
  7047. executeParameters=[data["recipientField"],window["OSF"]["DDA"]["OutlookAppOm"]._convertComposeEmailDictionaryParameterForSetApi$p(data["recipientArray"])];
  7048. break;
  7049. case 19:
  7050. executeParameters=[data["itemId"],data["name"]];
  7051. break;
  7052. case 16:
  7053. executeParameters=[data["uri"],data["name"],data["isInline"]];
  7054. break;
  7055. case 20:
  7056. executeParameters=[data["attachmentIndex"]];
  7057. break;
  7058. case 25:
  7059. executeParameters=[data["TimeProperty"],data["time"]];
  7060. break;
  7061. case 24:
  7062. executeParameters=[data["TimeProperty"]];
  7063. break;
  7064. case 27:
  7065. executeParameters=[data["location"]];
  7066. break;
  7067. case 33:
  7068. case 35:
  7069. executeParameters=[data["key"],data["type"],data["persistent"],data["message"],data["icon"]];
  7070. break;
  7071. case 36:
  7072. executeParameters=[data["key"]];
  7073. break;
  7074. default:
  7075. Sys.Debug.fail("Unexpected method dispid");
  7076. break
  7077. }
  7078. if(dispid !==1)
  7079. {
  7080. var $$t_5;
  7081. this._additionalOutlookParams$p$0.updateOutlookExecuteParameters($$t_5={val: executeParameters},optionalParameters),executeParameters=$$t_5["val"]
  7082. }
  7083. return executeParameters
  7084. },
  7085. _displayNewAppointmentFormApi$p$0: function(parameters)
  7086. {
  7087. var normalizedRequiredAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["requiredAttendees"],"requiredAttendees");
  7088. var normalizedOptionalAttendees=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["optionalAttendees"],"optionalAttendees");
  7089. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["location"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p,"location");
  7090. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["body"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"body");
  7091. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject");
  7092. if(!$h.ScriptHelpers.isNullOrUndefined(parameters["start"]))
  7093. {
  7094. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["start"],Date,"start");
  7095. var startDateTime=parameters["start"];
  7096. parameters["start"]=startDateTime["getTime"]();
  7097. if(!$h.ScriptHelpers.isNullOrUndefined(parameters["end"]))
  7098. {
  7099. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnArgumentType$p(parameters["end"],Date,"end");
  7100. var endDateTime=parameters["end"];
  7101. if(endDateTime < startDateTime)
  7102. throw Error.argumentOutOfRange("end",endDateTime,window["_u"]["ExtensibilityStrings"]["l_InvalidEventDates_Text"]);
  7103. parameters["end"]=endDateTime["getTime"]()
  7104. }
  7105. }
  7106. var updatedParameters=null;
  7107. if(normalizedRequiredAttendees || normalizedOptionalAttendees)
  7108. {
  7109. updatedParameters={};
  7110. var $$dict_7=parameters;
  7111. for(var $$key_8 in $$dict_7)
  7112. {
  7113. var entry={
  7114. key: $$key_8,
  7115. value: $$dict_7[$$key_8]
  7116. };
  7117. updatedParameters[entry["key"]]=entry["value"]
  7118. }
  7119. if(normalizedRequiredAttendees)
  7120. updatedParameters["requiredAttendees"]=normalizedRequiredAttendees;
  7121. if(normalizedOptionalAttendees)
  7122. updatedParameters["optionalAttendees"]=normalizedOptionalAttendees
  7123. }
  7124. this.invokeHostMethod(7,updatedParameters || parameters,null)
  7125. },
  7126. displayNewMessageFormApi: function(parameters)
  7127. {
  7128. var updatedParameters={};
  7129. if(parameters)
  7130. {
  7131. var normalizedToRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["toRecipients"],"toRecipients");
  7132. var normalizedCcRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["ccRecipients"],"ccRecipients");
  7133. var normalizedBccRecipients=window["OSF"]["DDA"]["OutlookAppOm"]._validateAndNormalizeRecipientEmails$p(parameters["bccRecipients"],"bccRecipients");
  7134. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["htmlBody"],0,window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength,"htmlBody");
  7135. window["OSF"]["DDA"]["OutlookAppOm"]._validateOptionalStringParameter$p(parameters["subject"],0,window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p,"subject");
  7136. var attachments=window["OSF"]["DDA"]["OutlookAppOm"]._getAttachments$p(parameters);
  7137. var $$dict_7=parameters;
  7138. for(var $$key_8 in $$dict_7)
  7139. {
  7140. var entry={
  7141. key: $$key_8,
  7142. value: $$dict_7[$$key_8]
  7143. };
  7144. updatedParameters[entry["key"]]=entry["value"]
  7145. }
  7146. if(normalizedToRecipients)
  7147. updatedParameters["toRecipients"]=normalizedToRecipients;
  7148. if(normalizedCcRecipients)
  7149. updatedParameters["ccRecipients"]=normalizedCcRecipients;
  7150. if(normalizedBccRecipients)
  7151. updatedParameters["bccRecipients"]=normalizedBccRecipients;
  7152. if(attachments)
  7153. updatedParameters["attachments"]=window["OSF"]["DDA"]["OutlookAppOm"]._createAttachmentsDataForHost$p(attachments)
  7154. }
  7155. this.invokeHostMethod(44,updatedParameters || parameters,null)
  7156. },
  7157. displayPersonaCardAsync: function(ewsIdOrEmail)
  7158. {
  7159. var args=[];
  7160. for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3)
  7161. args[$$pai_3 - 1]=arguments[$$pai_3];
  7162. if($h.ScriptHelpers.isNullOrUndefined(ewsIdOrEmail))
  7163. throw Error.argumentNull("ewsIdOrEmail");
  7164. else if(ewsIdOrEmail==="")
  7165. throw Error.argument("ewsIdOrEmail","ewsIdOrEmail cannot be empty.");
  7166. var parameters=$h.CommonParameters.parse(args,false);
  7167. this._standardInvokeHostMethod$i$0(43,{ewsIdOrEmail: ewsIdOrEmail.trim()},null,parameters._asyncContext$p$0,parameters._callback$p$0)
  7168. },
  7169. navigateToModuleAsync: function(module)
  7170. {
  7171. var args=[];
  7172. for(var $$pai_5=1; $$pai_5 < arguments["length"];++$$pai_5)
  7173. args[$$pai_5 - 1]=arguments[$$pai_5];
  7174. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidModule$p(module);
  7175. var parameters=$h.CommonParameters.parse(args,false);
  7176. var updatedParameters={};
  7177. if(module===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ModuleType"]["Addins"])
  7178. {
  7179. var queryString="";
  7180. if(parameters._options$p$0 && parameters._options$p$0["queryString"])
  7181. queryString=parameters._options$p$0["queryString"];
  7182. updatedParameters["queryString"]=queryString
  7183. }
  7184. updatedParameters["module"]=module;
  7185. this._standardInvokeHostMethod$i$0(45,updatedParameters,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  7186. },
  7187. _initializeMethods$p$0: function()
  7188. {
  7189. var currentInstance=this;
  7190. if($h.Item["isInstanceOfType"](this._item$p$0) || this._hostItemType$p$0===6)
  7191. {
  7192. currentInstance["displayNewAppointmentForm"]=this.$$d__displayNewAppointmentFormApi$p$0;
  7193. currentInstance["displayNewMessageForm"]=this.$$d_displayNewMessageFormApi;
  7194. currentInstance["displayPersonaCardAsync"]=this.$$d_displayPersonaCardAsync;
  7195. currentInstance["navigateToModuleAsync"]=this.$$d_navigateToModuleAsync
  7196. }
  7197. },
  7198. _getInitialDataResponseHandler$p$0: function(resultCode, data)
  7199. {
  7200. if(resultCode)
  7201. return;
  7202. this["initialize"](data);
  7203. this["displayName"]="mailbox";
  7204. window.setTimeout(this.$$d__callAppReadyCallback$p$0,0)
  7205. },
  7206. _callAppReadyCallback$p$0: function()
  7207. {
  7208. this._appReadyCallback$p$0()
  7209. },
  7210. _invokeGetTokenMethodAsync$p$0: function(outlookDispid, data, methodName, callback, userContext)
  7211. {
  7212. if($h.ScriptHelpers.isNullOrUndefined(callback))
  7213. throw Error.argumentNull("callback");
  7214. var $$t_9=this;
  7215. this.invokeHostMethod(outlookDispid,data,function(resultCode, response)
  7216. {
  7217. var asyncResult;
  7218. if(resultCode)
  7219. asyncResult=$$t_9.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode));
  7220. else
  7221. {
  7222. var responseDictionary=response;
  7223. if(responseDictionary["wasSuccessful"])
  7224. asyncResult=$$t_9.createAsyncResult(responseDictionary["token"],0,0,userContext,null);
  7225. else
  7226. asyncResult=$$t_9.createAsyncResult(null,1,responseDictionary["errorCode"],userContext,responseDictionary["errorMessage"])
  7227. }
  7228. callback(asyncResult)
  7229. })
  7230. },
  7231. getItem: function()
  7232. {
  7233. return this._item$p$0
  7234. },
  7235. _getUserProfile$p$0: function()
  7236. {
  7237. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0);
  7238. return this._userProfile$p$0
  7239. },
  7240. _getDiagnostics$p$0: function()
  7241. {
  7242. return this._diagnostics$p$0
  7243. },
  7244. _getEwsUrl$p$0: function()
  7245. {
  7246. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0);
  7247. return this._initialData$p$0.get__ewsUrl$i$0()
  7248. },
  7249. _getRestUrl$p$0: function()
  7250. {
  7251. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._initialData$p$0._permissionLevel$p$0);
  7252. if(!this._initialData$p$0.get__restUrl$i$0())
  7253. return null;
  7254. return this._initialData$p$0.get__restUrl$i$0()
  7255. },
  7256. _findOffset$p$0: function(value)
  7257. {
  7258. var ranges=this._initialData$p$0.get__timeZoneOffsets$i$0();
  7259. for(var r=0; r < ranges["length"]; r++)
  7260. {
  7261. var range=ranges[r];
  7262. var start=window["parseInt"](range["start"]);
  7263. var end=window["parseInt"](range["end"]);
  7264. if(value["getTime"]() - start >=0 && value["getTime"]() - end < 0)
  7265. return window["parseInt"](range["offset"])
  7266. }
  7267. throw Error.format(window["_u"]["ExtensibilityStrings"]["l_InvalidDate_Text"]);
  7268. },
  7269. _areStringsLoaded$p$0: function()
  7270. {
  7271. var stringsLoaded=false;
  7272. try
  7273. {
  7274. stringsLoaded=!$h.ScriptHelpers.isNullOrUndefined(window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"])
  7275. }
  7276. catch($$e_1){}
  7277. return stringsLoaded
  7278. },
  7279. _loadLocalizedScript$p$0: function(stringLoadedCallback)
  7280. {
  7281. var url=null;
  7282. var baseUrl="";
  7283. var scripts=document.getElementsByTagName("script");
  7284. for(var i=scripts.length - 1; i >=0; i--)
  7285. {
  7286. var filename=null;
  7287. var attributes=scripts[i].attributes;
  7288. if(attributes)
  7289. {
  7290. var attribute=attributes.getNamedItem("src");
  7291. if(attribute)
  7292. filename=attribute.value;
  7293. if(filename)
  7294. {
  7295. var debug=false;
  7296. filename=filename.toLowerCase();
  7297. var officeIndex=filename.indexOf("office_strings.js");
  7298. if(officeIndex < 0)
  7299. {
  7300. officeIndex=filename.indexOf("office_strings.debug.js");
  7301. debug=true
  7302. }
  7303. if(officeIndex > 0 && officeIndex < filename.length)
  7304. {
  7305. url=filename.replace(debug ? "office_strings.debug.js" : "office_strings.js","outlook_strings.js");
  7306. var languageUrl=filename.substring(0,officeIndex);
  7307. var lastIndexOfSlash=languageUrl.lastIndexOf("/",languageUrl.length - 2);
  7308. if(lastIndexOfSlash===-1)
  7309. lastIndexOfSlash=languageUrl.lastIndexOf("\\",languageUrl.length - 2);
  7310. if(lastIndexOfSlash !==-1 && languageUrl.length > lastIndexOfSlash+1)
  7311. baseUrl=languageUrl.substring(0,lastIndexOfSlash+1);
  7312. break
  7313. }
  7314. }
  7315. }
  7316. }
  7317. if(url)
  7318. {
  7319. var head=document.getElementsByTagName("head")[0];
  7320. var scriptElement=null;
  7321. var $$t_H=this;
  7322. var scriptElementCallback=function()
  7323. {
  7324. if(stringLoadedCallback && (!scriptElement.readyState || scriptElement.readyState && (scriptElement.readyState==="loaded" || scriptElement.readyState==="complete")))
  7325. {
  7326. scriptElement.onload=null;
  7327. scriptElement.onreadystatechange=null;
  7328. stringLoadedCallback()
  7329. }
  7330. };
  7331. var $$t_I=this;
  7332. var failureCallback=function()
  7333. {
  7334. if(!$$t_I._areStringsLoaded$p$0())
  7335. {
  7336. var fallbackUrl=baseUrl+"en-us/"+"outlook_strings.js";
  7337. scriptElement.onload=null;
  7338. scriptElement.onreadystatechange=null;
  7339. scriptElement=$$t_I._createScriptElement$p$0(fallbackUrl);
  7340. scriptElement.onload=scriptElementCallback;
  7341. scriptElement.onreadystatechange=scriptElementCallback;
  7342. head.appendChild(scriptElement)
  7343. }
  7344. };
  7345. scriptElement=this._createScriptElement$p$0(url);
  7346. scriptElement.onload=scriptElementCallback;
  7347. scriptElement.onreadystatechange=scriptElementCallback;
  7348. window.setTimeout(failureCallback,2e3);
  7349. head.appendChild(scriptElement)
  7350. }
  7351. },
  7352. _createScriptElement$p$0: function(url)
  7353. {
  7354. var scriptElement=document.createElement("script");
  7355. scriptElement.type="text/javascript";
  7356. scriptElement.src=url;
  7357. return scriptElement
  7358. }
  7359. };
  7360. OSF.DDA.OutlookAppOm.prototype.initialize=function(initialData)
  7361. {
  7362. if(!initialData)
  7363. {
  7364. if(!this._additionalOutlookParams$p$0)
  7365. this._additionalOutlookParams$p$0=new $h.AdditionalGlobalParameters(true);
  7366. this._additionalOutlookParams$p$0.setCurrentItemNumber(0,true);
  7367. this._initialData$p$0=null;
  7368. this._item$p$0=null;
  7369. return
  7370. }
  7371. var ItemTypeKey="itemType";
  7372. this._initialData$p$0=new $h.InitialData(initialData);
  7373. this._hostItemType$p$0=initialData[ItemTypeKey];
  7374. if(1===initialData[ItemTypeKey])
  7375. this._item$p$0=new $h.Message(this._initialData$p$0);
  7376. else if(3===initialData[ItemTypeKey])
  7377. this._item$p$0=new $h.MeetingRequest(this._initialData$p$0);
  7378. else if(2===initialData[ItemTypeKey])
  7379. this._item$p$0=new $h.Appointment(this._initialData$p$0);
  7380. else if(4===initialData[ItemTypeKey])
  7381. this._item$p$0=new $h.MessageCompose(this._initialData$p$0);
  7382. else if(5===initialData[ItemTypeKey])
  7383. this._item$p$0=new $h.AppointmentCompose(this._initialData$p$0);
  7384. else if(6===initialData[ItemTypeKey]);
  7385. else
  7386. Sys.Debug.trace("Unexpected item type was received from the host.");
  7387. this._userProfile$p$0=new $h.UserProfile(this._initialData$p$0);
  7388. this._diagnostics$p$0=new $h.Diagnostics(this._initialData$p$0,this._officeAppContext$p$0["get_appName"]());
  7389. var supportsAdditionalParameters=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0() !==8 || this.isOutlook16OrGreater();
  7390. this._additionalOutlookParams$p$0=new $h.AdditionalGlobalParameters(supportsAdditionalParameters);
  7391. if("itemNumber" in initialData)
  7392. this["setCurrentItemNumber"](initialData["itemNumber"]);
  7393. this._initializeMethods$p$0();
  7394. $h.InitialData._defineReadOnlyProperty$i(this,"item",this.$$d_getItem);
  7395. $h.InitialData._defineReadOnlyProperty$i(this,"userProfile",this.$$d__getUserProfile$p$0);
  7396. $h.InitialData._defineReadOnlyProperty$i(this,"diagnostics",this.$$d__getDiagnostics$p$0);
  7397. $h.InitialData._defineReadOnlyProperty$i(this,"ewsUrl",this.$$d__getEwsUrl$p$0);
  7398. $h.InitialData._defineReadOnlyProperty$i(this,"restUrl",this.$$d__getRestUrl$p$0);
  7399. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64)
  7400. if(this._initialData$p$0.get__overrideWindowOpen$i$0())
  7401. window.open=this.$$d_windowOpenOverrideHandler
  7402. };
  7403. OSF.DDA.OutlookAppOm.prototype.makeEwsRequestAsync=function(data)
  7404. {
  7405. var args=[];
  7406. for(var $$pai_5=1; $$pai_5 < arguments["length"];++$$pai_5)
  7407. args[$$pai_5 - 1]=arguments[$$pai_5];
  7408. if($h.ScriptHelpers.isNullOrUndefined(data))
  7409. throw Error.argumentNull("data");
  7410. if(data.length > window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p)
  7411. throw Error.argument("data",window["_u"]["ExtensibilityStrings"]["l_EwsRequestOversized_Text"]);
  7412. this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");
  7413. var parameters=$h.CommonParameters.parse(args,true,true);
  7414. var ewsRequest=new $h.EwsRequest(parameters._asyncContext$p$0);
  7415. var $$t_4=this;
  7416. ewsRequest.onreadystatechange=function()
  7417. {
  7418. if(4===ewsRequest.get__requestState$i$1())
  7419. parameters._callback$p$0(ewsRequest._asyncResult$p$0)
  7420. };
  7421. ewsRequest.send(data)
  7422. };
  7423. OSF.DDA.OutlookAppOm.prototype.recordDataPoint=function(data)
  7424. {
  7425. if($h.ScriptHelpers.isNullOrUndefined(data))
  7426. throw Error.argumentNull("data");
  7427. this.invokeHostMethod(402,data,null)
  7428. };
  7429. OSF.DDA.OutlookAppOm.prototype.recordTrace=function(data)
  7430. {
  7431. if($h.ScriptHelpers.isNullOrUndefined(data))
  7432. throw Error.argumentNull("data");
  7433. this.invokeHostMethod(401,data,null)
  7434. };
  7435. OSF.DDA.OutlookAppOm.prototype.trackCtq=function(data)
  7436. {
  7437. if($h.ScriptHelpers.isNullOrUndefined(data))
  7438. throw Error.argumentNull("data");
  7439. this.invokeHostMethod(400,data,null)
  7440. };
  7441. OSF.DDA.OutlookAppOm.prototype.convertToLocalClientTime=function(timeValue)
  7442. {
  7443. var date=new Date(timeValue["getTime"]());
  7444. var offset=date["getTimezoneOffset"]() * -1;
  7445. if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0())
  7446. {
  7447. date["setUTCMinutes"](date["getUTCMinutes"]() - offset);
  7448. offset=this._findOffset$p$0(date);
  7449. date["setUTCMinutes"](date["getUTCMinutes"]()+offset)
  7450. }
  7451. var retValue=this._dateToDictionary$i$0(date);
  7452. retValue["timezoneOffset"]=offset;
  7453. return retValue
  7454. };
  7455. OSF.DDA.OutlookAppOm.prototype.convertToUtcClientTime=function(input)
  7456. {
  7457. var retValue=this._dictionaryToDate$i$0(input);
  7458. if(this._initialData$p$0 && this._initialData$p$0.get__timeZoneOffsets$i$0())
  7459. {
  7460. var offset=this._findOffset$p$0(retValue);
  7461. retValue["setUTCMinutes"](retValue["getUTCMinutes"]() - offset);
  7462. offset=!input["timezoneOffset"] ? retValue["getTimezoneOffset"]() * -1 : input["timezoneOffset"];
  7463. retValue["setUTCMinutes"](retValue["getUTCMinutes"]()+offset)
  7464. }
  7465. return retValue
  7466. };
  7467. OSF.DDA.OutlookAppOm.prototype.convertToRestId=function(itemId, restVersion)
  7468. {
  7469. if(!itemId)
  7470. throw Error.argumentNull("itemId");
  7471. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion);
  7472. return itemId.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_")
  7473. };
  7474. OSF.DDA.OutlookAppOm.prototype.convertToEwsId=function(itemId, restVersion)
  7475. {
  7476. if(!itemId)
  7477. throw Error.argumentNull("itemId");
  7478. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnInvalidRestVersion$p(restVersion);
  7479. return itemId.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+")
  7480. };
  7481. OSF.DDA.OutlookAppOm.prototype.getUserIdentityTokenAsync=function()
  7482. {
  7483. var args=[];
  7484. for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2)
  7485. args[$$pai_2]=arguments[$$pai_2];
  7486. this._throwOnMethodCallForInsufficientPermission$i$0(1,"getUserIdentityTokenAsync");
  7487. var parameters=$h.CommonParameters.parse(args,true,true);
  7488. this._invokeGetTokenMethodAsync$p$0(2,null,"GetUserIdentityToken",parameters._callback$p$0,parameters._asyncContext$p$0)
  7489. };
  7490. OSF.DDA.OutlookAppOm.prototype.getCallbackTokenAsync=function()
  7491. {
  7492. var args=[];
  7493. for(var $$pai_7=0; $$pai_7 < arguments["length"];++$$pai_7)
  7494. args[$$pai_7]=arguments[$$pai_7];
  7495. this._throwOnMethodCallForInsufficientPermission$i$0(1,"getCallbackTokenAsync");
  7496. var parameters=$h.CommonParameters.parse(args,true,true);
  7497. var options={};
  7498. if(parameters._options$p$0)
  7499. for(var $$arr_3=Object["keys"](parameters._options$p$0), $$len_4=$$arr_3.length, $$idx_5=0; $$idx_5 < $$len_4;++$$idx_5)
  7500. {
  7501. var key=$$arr_3[$$idx_5];
  7502. options[key]=parameters._options$p$0[key]
  7503. }
  7504. if(!("isRest" in options))
  7505. options["isRest"]=false;
  7506. this._invokeGetTokenMethodAsync$p$0(12,options,"GetCallbackToken",parameters._callback$p$0,parameters._asyncContext$p$0)
  7507. };
  7508. OSF.DDA.OutlookAppOm.prototype.displayMessageForm=function(itemId)
  7509. {
  7510. if($h.ScriptHelpers.isNullOrUndefined(itemId))
  7511. throw Error.argumentNull("itemId");
  7512. this.invokeHostMethod(8,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null)
  7513. };
  7514. OSF.DDA.OutlookAppOm.prototype.displayAppointmentForm=function(itemId)
  7515. {
  7516. if($h.ScriptHelpers.isNullOrUndefined(itemId))
  7517. throw Error.argumentNull("itemId");
  7518. this.invokeHostMethod(9,{itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId)},null)
  7519. };
  7520. OSF.DDA.OutlookAppOm.prototype.RegisterConsentAsync=function(consentState)
  7521. {
  7522. if(consentState !==2 && consentState !==1 && consentState)
  7523. throw Error.argumentOutOfRange("consentState");
  7524. var parameters={};
  7525. parameters["consentState"]=consentState["toString"]();
  7526. parameters["extensionId"]=this["GetExtensionId"]();
  7527. this.invokeHostMethod(40,parameters,null)
  7528. };
  7529. OSF.DDA.OutlookAppOm.prototype.CloseApp=function()
  7530. {
  7531. this.invokeHostMethod(42,null,null)
  7532. };
  7533. OSF.DDA.OutlookAppOm.prototype.GetIsRead=function()
  7534. {
  7535. return this._initialData$p$0.get__isRead$i$0()
  7536. };
  7537. OSF.DDA.OutlookAppOm.prototype.GetEndNodeUrl=function()
  7538. {
  7539. return this._initialData$p$0.get__endNodeUrl$i$0()
  7540. };
  7541. OSF.DDA.OutlookAppOm.prototype.GetConsentMetadata=function()
  7542. {
  7543. return this._initialData$p$0.get__consentMetadata$i$0()
  7544. };
  7545. OSF.DDA.OutlookAppOm.prototype.GetEntryPointUrl=function()
  7546. {
  7547. return this._initialData$p$0.get__entryPointUrl$i$0()
  7548. };
  7549. OSF.DDA.OutlookAppOm.prototype.GetMarketplaceContentMarket=function()
  7550. {
  7551. return this._initialData$p$0.get__marketplaceContentMarket$i$0()
  7552. };
  7553. OSF.DDA.OutlookAppOm.prototype.GetMarketplaceAssetId=function()
  7554. {
  7555. return this._initialData$p$0.get__marketplaceAssetId$i$0()
  7556. };
  7557. OSF.DDA.OutlookAppOm.prototype.GetExtensionId=function()
  7558. {
  7559. return this._initialData$p$0.get__extensionId$i$0()
  7560. };
  7561. OSF.DDA.OutlookAppOm.prototype.setCurrentItemNumber=function(itemNumber)
  7562. {
  7563. this._additionalOutlookParams$p$0.setCurrentItemNumber(itemNumber,false)
  7564. };
  7565. window["OSF"]["DDA"]["Settings"]=OSF.DDA.Settings=function(data)
  7566. {
  7567. this._rawData$p$0=data
  7568. };
  7569. window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p=function(rawSettings)
  7570. {
  7571. if(!rawSettings)
  7572. return{};
  7573. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===8 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===65536 || window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===4194304)
  7574. {
  7575. var outlookSettings=rawSettings["SettingsKey"];
  7576. if(outlookSettings)
  7577. return OSF.DDA.SettingsManager["deserializeSettings"](outlookSettings)
  7578. }
  7579. return rawSettings
  7580. };
  7581. OSF.DDA.Settings.prototype={
  7582. _rawData$p$0: null,
  7583. _settingsData$p$0: null,
  7584. get__data$p$0: function()
  7585. {
  7586. if(!this._settingsData$p$0)
  7587. {
  7588. this._settingsData$p$0=window["OSF"]["DDA"]["Settings"]._convertFromRawSettings$p(this._rawData$p$0);
  7589. this._rawData$p$0=null
  7590. }
  7591. return this._settingsData$p$0
  7592. },
  7593. _saveSettingsForOutlook$p$0: function(callback, userContext)
  7594. {
  7595. var storedException=null;
  7596. try
  7597. {
  7598. var serializedSettings=OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0());
  7599. var jsonSettings=window["JSON"]["stringify"](serializedSettings);
  7600. var settingsObjectToSave={SettingsKey: jsonSettings};
  7601. OSF.DDA.ClientSettingsManager["write"](settingsObjectToSave)
  7602. }
  7603. catch(ex)
  7604. {
  7605. storedException=ex
  7606. }
  7607. if(callback)
  7608. {
  7609. var asyncResult;
  7610. if(storedException)
  7611. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,storedException["message"]);
  7612. else
  7613. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null);
  7614. callback(asyncResult)
  7615. }
  7616. },
  7617. _saveSettingsForOwa$p$0: function(callback, userContext)
  7618. {
  7619. var serializedSettings=OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0());
  7620. var $$t_7=this;
  7621. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(404,[serializedSettings],function(resultCode, response)
  7622. {
  7623. if(callback)
  7624. {
  7625. var asyncResult;
  7626. if(resultCode)
  7627. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9017,userContext,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode));
  7628. else
  7629. {
  7630. var responseDictionary=response;
  7631. if(!responseDictionary["error"])
  7632. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,0,0,userContext,null);
  7633. else
  7634. asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,userContext,responseDictionary["errorMessage"])
  7635. }
  7636. callback(asyncResult)
  7637. }
  7638. })
  7639. }
  7640. };
  7641. OSF.DDA.Settings.prototype.get=function(name)
  7642. {
  7643. return this.get__data$p$0()[name]
  7644. };
  7645. OSF.DDA.Settings.prototype.set=function(name, value)
  7646. {
  7647. this.get__data$p$0()[name]=value
  7648. };
  7649. OSF.DDA.Settings.prototype.remove=function(name)
  7650. {
  7651. delete this.get__data$p$0()[name]
  7652. };
  7653. OSF.DDA.Settings.prototype.saveAsync=function()
  7654. {
  7655. var args=[];
  7656. for(var $$pai_4=0; $$pai_4 < arguments["length"];++$$pai_4)
  7657. args[$$pai_4]=arguments[$$pai_4];
  7658. var commonParameters=$h.CommonParameters.parse(args,false);
  7659. if(window["JSON"]["stringify"](OSF.DDA.SettingsManager["serializeSettings"](this.get__data$p$0())).length > 32768)
  7660. {
  7661. var asyncResult=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,9019,commonParameters._asyncContext$p$0,"");
  7662. var $$t_3=this;
  7663. window.setTimeout(function()
  7664. {
  7665. commonParameters._callback$p$0(asyncResult)
  7666. },0);
  7667. return
  7668. }
  7669. if(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.get__appName$i$0()===64)
  7670. this._saveSettingsForOwa$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0);
  7671. else
  7672. this._saveSettingsForOutlook$p$0(commonParameters._callback$p$0,commonParameters._asyncContext$p$0)
  7673. };
  7674. Type.registerNamespace("$h");
  7675. var $h=window["$h"] || {};
  7676. Type.registerNamespace("Office.cast");
  7677. var Office=window["Office"] || {};
  7678. Office.cast=Office.cast || {};
  7679. $h.AdditionalGlobalParameters=function(supported)
  7680. {
  7681. this._parameterBlobSupported$p$0=supported;
  7682. this._itemNumber$p$0=0
  7683. };
  7684. $h.AdditionalGlobalParameters.prototype={
  7685. _parameterBlobSupported$p$0: false,
  7686. _itemNumber$p$0: 0,
  7687. setCurrentItemNumber: function(itemNumber, force)
  7688. {
  7689. if(force)
  7690. this._itemNumber$p$0=itemNumber;
  7691. else if(itemNumber > 0)
  7692. this._itemNumber$p$0=itemNumber
  7693. },
  7694. get_itemNumber: function()
  7695. {
  7696. return this._itemNumber$p$0
  7697. },
  7698. updateOutlookExecuteParameters: function(executeParameters, additionalApiParameters)
  7699. {
  7700. if(this._parameterBlobSupported$p$0)
  7701. {
  7702. if(this._itemNumber$p$0 > 0)
  7703. additionalApiParameters["itemNumber"]=this._itemNumber$p$0["toString"]();
  7704. if(!Object["keys"](additionalApiParameters)["length"])
  7705. return;
  7706. if(!executeParameters["val"])
  7707. executeParameters["val"]=[];
  7708. executeParameters["val"]["push"](window["JSON"]["stringify"](additionalApiParameters))
  7709. }
  7710. }
  7711. };
  7712. $h.Appointment=function(dataDictionary)
  7713. {
  7714. this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);
  7715. this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);
  7716. this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);
  7717. this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);
  7718. this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);
  7719. this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);
  7720. this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);
  7721. this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);
  7722. this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);
  7723. $h.Appointment["initializeBase"](this,[dataDictionary]);
  7724. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);
  7725. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);
  7726. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);
  7727. $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);
  7728. $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);
  7729. $h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);
  7730. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);
  7731. $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);
  7732. $h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)
  7733. };
  7734. $h.Appointment.prototype={
  7735. getItemType: function()
  7736. {
  7737. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"]
  7738. },
  7739. _getStart$p$2: function()
  7740. {
  7741. return this._data$p$0.get__start$i$0()
  7742. },
  7743. _getEnd$p$2: function()
  7744. {
  7745. return this._data$p$0.get__end$i$0()
  7746. },
  7747. _getLocation$p$2: function()
  7748. {
  7749. return this._data$p$0.get__location$i$0()
  7750. },
  7751. _getOptionalAttendees$p$2: function()
  7752. {
  7753. return this._data$p$0.get__cc$i$0()
  7754. },
  7755. _getRequiredAttendees$p$2: function()
  7756. {
  7757. return this._data$p$0.get__to$i$0()
  7758. },
  7759. _getResources$p$2: function()
  7760. {
  7761. return this._data$p$0.get__resources$i$0()
  7762. },
  7763. _getSubject$p$2: function()
  7764. {
  7765. return this._data$p$0.get__subject$i$0()
  7766. },
  7767. _getNormalizedSubject$p$2: function()
  7768. {
  7769. return this._data$p$0.get__normalizedSubject$i$0()
  7770. },
  7771. _getOrganizer$p$2: function()
  7772. {
  7773. return this._data$p$0.get__organizer$i$0()
  7774. }
  7775. };
  7776. $h.Appointment.prototype.getEntities=function()
  7777. {
  7778. return this._data$p$0._getEntities$i$0()
  7779. };
  7780. $h.Appointment.prototype.getEntitiesByType=function(entityType)
  7781. {
  7782. return this._data$p$0._getEntitiesByType$i$0(entityType)
  7783. };
  7784. $h.Appointment.prototype.getSelectedEntities=function()
  7785. {
  7786. return this._data$p$0._getSelectedEntities$i$0()
  7787. };
  7788. $h.Appointment.prototype.getRegExMatches=function()
  7789. {
  7790. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");
  7791. return this._data$p$0._getRegExMatches$i$0()
  7792. };
  7793. $h.Appointment.prototype.getFilteredEntitiesByName=function(name)
  7794. {
  7795. return this._data$p$0._getFilteredEntitiesByName$i$0(name)
  7796. };
  7797. $h.Appointment.prototype.getRegExMatchesByName=function(name)
  7798. {
  7799. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");
  7800. return this._data$p$0._getRegExMatchesByName$i$0(name)
  7801. };
  7802. $h.Appointment.prototype.getSelectedRegExMatches=function()
  7803. {
  7804. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches");
  7805. return this._data$p$0._getSelectedRegExMatches$i$0()
  7806. };
  7807. $h.Appointment.prototype.displayReplyForm=function(obj)
  7808. {
  7809. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj)
  7810. };
  7811. $h.Appointment.prototype.displayReplyAllForm=function(obj)
  7812. {
  7813. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj)
  7814. };
  7815. $h.AppointmentCompose=function(data)
  7816. {
  7817. this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);
  7818. this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);
  7819. this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);
  7820. this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);
  7821. this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);
  7822. $h.AppointmentCompose["initializeBase"](this,[data]);
  7823. $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);
  7824. $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);
  7825. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);
  7826. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);
  7827. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)
  7828. };
  7829. $h.AppointmentCompose.prototype={
  7830. _requiredAttendees$p$2: null,
  7831. _optionalAttendees$p$2: null,
  7832. _start$p$2: null,
  7833. _end$p$2: null,
  7834. _location$p$2: null,
  7835. getItemType: function()
  7836. {
  7837. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Appointment"]
  7838. },
  7839. _getRequiredAttendees$p$2: function()
  7840. {
  7841. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  7842. if(!this._requiredAttendees$p$2)
  7843. this._requiredAttendees$p$2=new $h.ComposeRecipient(0,"requiredAttendees");
  7844. return this._requiredAttendees$p$2
  7845. },
  7846. _getOptionalAttendees$p$2: function()
  7847. {
  7848. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  7849. if(!this._optionalAttendees$p$2)
  7850. this._optionalAttendees$p$2=new $h.ComposeRecipient(1,"optionalAttendees");
  7851. return this._optionalAttendees$p$2
  7852. },
  7853. _getStart$p$2: function()
  7854. {
  7855. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  7856. if(!this._start$p$2)
  7857. this._start$p$2=new $h.ComposeTime(1);
  7858. return this._start$p$2
  7859. },
  7860. _getEnd$p$2: function()
  7861. {
  7862. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  7863. if(!this._end$p$2)
  7864. this._end$p$2=new $h.ComposeTime(2);
  7865. return this._end$p$2
  7866. },
  7867. _getLocation$p$2: function()
  7868. {
  7869. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  7870. if(!this._location$p$2)
  7871. this._location$p$2=new $h.ComposeLocation;
  7872. return this._location$p$2
  7873. }
  7874. };
  7875. $h.AttachmentConstants=function(){};
  7876. $h.AttachmentDetails=function(data)
  7877. {
  7878. this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);
  7879. this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);
  7880. this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);
  7881. this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);
  7882. this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);
  7883. this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);
  7884. this._data$p$0=data;
  7885. $h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);
  7886. $h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);
  7887. $h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);
  7888. $h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);
  7889. $h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);
  7890. $h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)
  7891. };
  7892. $h.AttachmentDetails.prototype={
  7893. _data$p$0: null,
  7894. _getId$p$0: function()
  7895. {
  7896. return this._data$p$0["id"]
  7897. },
  7898. _getName$p$0: function()
  7899. {
  7900. return this._data$p$0["name"]
  7901. },
  7902. _getContentType$p$0: function()
  7903. {
  7904. return this._data$p$0["contentType"]
  7905. },
  7906. _getSize$p$0: function()
  7907. {
  7908. return this._data$p$0["size"]
  7909. },
  7910. _getAttachmentType$p$0: function()
  7911. {
  7912. var response=this._data$p$0["attachmentType"];
  7913. return response < $h.AttachmentDetails._attachmentTypeMap$p["length"] ? $h.AttachmentDetails._attachmentTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"]
  7914. },
  7915. _getIsInline$p$0: function()
  7916. {
  7917. return this._data$p$0["isInline"]
  7918. }
  7919. };
  7920. $h.Body=function(){};
  7921. $h.Body._tryMapToHostCoercionType$i=function(coercionType, hostCoercionType)
  7922. {
  7923. hostCoercionType["val"]=undefined;
  7924. if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"])
  7925. hostCoercionType["val"]=3;
  7926. else if(coercionType===window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"])
  7927. hostCoercionType["val"]=0;
  7928. else
  7929. return false;
  7930. return true
  7931. };
  7932. $h.Body.prototype.getAsync=function(coercionType)
  7933. {
  7934. var args=[];
  7935. for(var $$pai_7=1; $$pai_7 < arguments["length"];++$$pai_7)
  7936. args[$$pai_7 - 1]=arguments[$$pai_7];
  7937. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getAsync");
  7938. var commonParameters=$h.CommonParameters.parse(args,true);
  7939. var hostCoercionType;
  7940. var $$t_5,
  7941. $$t_6;
  7942. if(!($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6))
  7943. throw Error.argument("coercionType");
  7944. var dataToHost={coercionType: hostCoercionType};
  7945. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(37,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  7946. };
  7947. $h.ComposeBody=function()
  7948. {
  7949. $h.ComposeBody["initializeBase"](this)
  7950. };
  7951. $h.ComposeBody._createParameterDictionaryToHost$i=function(data, parameters)
  7952. {
  7953. var dataToHost={data: data};
  7954. if(parameters._options$p$0 && parameters._options$p$0["hasOwnProperty"]("coercionType") && !$h.ScriptHelpers.isNull(parameters._options$p$0["coercionType"]))
  7955. {
  7956. var hostCoercionType;
  7957. var $$t_4,
  7958. $$t_5;
  7959. if(!($$t_5=$h.Body._tryMapToHostCoercionType$i(parameters._options$p$0["coercionType"],$$t_4={val: hostCoercionType}),hostCoercionType=$$t_4["val"],$$t_5))
  7960. {
  7961. if(parameters._callback$p$0)
  7962. parameters._callback$p$0(window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(null,1,1e3,parameters._asyncContext$p$0,null));
  7963. return null
  7964. }
  7965. dataToHost["coercionType"]=hostCoercionType
  7966. }
  7967. else
  7968. dataToHost["coercionType"]=0;
  7969. return dataToHost
  7970. };
  7971. $h.ComposeBody.prototype.getTypeAsync=function()
  7972. {
  7973. var args=[];
  7974. for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2)
  7975. args[$$pai_2]=arguments[$$pai_2];
  7976. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"body.getTypeAsync");
  7977. var parameters=$h.CommonParameters.parse(args,true);
  7978. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(14,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  7979. };
  7980. $h.ComposeBody.prototype.setSelectedDataAsync=function(data)
  7981. {
  7982. var args=[];
  7983. for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4)
  7984. args[$$pai_4 - 1]=arguments[$$pai_4];
  7985. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setSelectedDataAsync");
  7986. var parameters=$h.CommonParameters.parse(args,false);
  7987. if(!String["isInstanceOfType"](data))
  7988. throw Error.argumentType("data",Object["getType"](data),String);
  7989. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data");
  7990. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  7991. if(!dataToHost)
  7992. return;
  7993. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(13,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  7994. };
  7995. $h.ComposeBody.prototype.prependAsync=function(data)
  7996. {
  7997. var args=[];
  7998. for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4)
  7999. args[$$pai_4 - 1]=arguments[$$pai_4];
  8000. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.prependAsync");
  8001. var parameters=$h.CommonParameters.parse(args,false);
  8002. if(!String["isInstanceOfType"](data))
  8003. throw Error.argumentType("data",Object["getType"](data),String);
  8004. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data");
  8005. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  8006. if(!dataToHost)
  8007. return;
  8008. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(23,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  8009. };
  8010. $h.ComposeBody.prototype.setAsync=function(data)
  8011. {
  8012. var args=[];
  8013. for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4)
  8014. args[$$pai_4 - 1]=arguments[$$pai_4];
  8015. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"body.setAsync");
  8016. var parameters=$h.CommonParameters.parse(args,false);
  8017. if(!String["isInstanceOfType"](data))
  8018. throw Error.argumentType("data",Object["getType"](data),String);
  8019. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data");
  8020. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  8021. if(!dataToHost)
  8022. return;
  8023. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(38,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  8024. };
  8025. $h.ComposeItem=function(data)
  8026. {
  8027. this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1);
  8028. this.$$d__getSubject$p$1=Function.createDelegate(this,this._getSubject$p$1);
  8029. $h.ComposeItem["initializeBase"](this,[data]);
  8030. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$1);
  8031. $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1)
  8032. };
  8033. $h.ComposeItem.prototype={
  8034. _subject$p$1: null,
  8035. _body$p$1: null,
  8036. _getBody$p$1: function()
  8037. {
  8038. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  8039. if(!this._body$p$1)
  8040. this._body$p$1=new $h.ComposeBody;
  8041. return this._body$p$1
  8042. },
  8043. _getSubject$p$1: function()
  8044. {
  8045. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  8046. if(!this._subject$p$1)
  8047. this._subject$p$1=new $h.ComposeSubject;
  8048. return this._subject$p$1
  8049. }
  8050. };
  8051. $h.ComposeItem.prototype.addFileAttachmentAsync=function(uri, attachmentName)
  8052. {
  8053. var args=[];
  8054. for(var $$pai_6=2; $$pai_6 < arguments["length"];++$$pai_6)
  8055. args[$$pai_6 - 2]=arguments[$$pai_6];
  8056. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addFileAttachmentAsync");
  8057. if(!$h.ScriptHelpers.isNonEmptyString(uri))
  8058. throw Error.argument("uri");
  8059. if(!$h.ScriptHelpers.isNonEmptyString(attachmentName))
  8060. throw Error.argument("attachmentName");
  8061. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(uri.length,0,2048,"uri");
  8062. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName");
  8063. var commonParameters=$h.CommonParameters.parse(args,false);
  8064. var isInline=false;
  8065. if(!$h.ScriptHelpers.isNull(commonParameters._options$p$0))
  8066. isInline=$h.ScriptHelpers.isValueTrue(commonParameters._options$p$0["isInline"]);
  8067. var parameters={
  8068. uri: uri,
  8069. name: attachmentName,
  8070. isInline: isInline,
  8071. __timeout__: 6e5
  8072. };
  8073. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(16,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  8074. };
  8075. $h.ComposeItem.prototype.addItemAttachmentAsync=function(itemId, attachmentName)
  8076. {
  8077. var args=[];
  8078. for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5)
  8079. args[$$pai_5 - 2]=arguments[$$pai_5];
  8080. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"addItemAttachmentAsync");
  8081. if(!$h.ScriptHelpers.isNonEmptyString(itemId))
  8082. throw Error.argument("itemId");
  8083. if(!$h.ScriptHelpers.isNonEmptyString(attachmentName))
  8084. throw Error.argument("attachmentName");
  8085. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(itemId.length,0,200,"itemId");
  8086. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentName.length,0,255,"attachmentName");
  8087. var commonParameters=$h.CommonParameters.parse(args,false);
  8088. var parameters={
  8089. itemId: window["OSF"]["DDA"]["OutlookAppOm"].getItemIdBasedOnHost(itemId),
  8090. name: attachmentName,
  8091. __timeout__: 6e5
  8092. };
  8093. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(19,parameters,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  8094. };
  8095. $h.ComposeItem.prototype.removeAttachmentAsync=function(attachmentId)
  8096. {
  8097. var args=[];
  8098. for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3)
  8099. args[$$pai_3 - 1]=arguments[$$pai_3];
  8100. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"removeAttachmentAsync");
  8101. if(!$h.ScriptHelpers.isNonEmptyString(attachmentId))
  8102. throw Error.argument("attachmentId");
  8103. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(attachmentId.length,0,200,"attachmentId");
  8104. var commonParameters=$h.CommonParameters.parse(args,false);
  8105. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(20,{attachmentIndex: attachmentId},null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  8106. };
  8107. $h.ComposeItem.prototype.getSelectedDataAsync=function(coercionType)
  8108. {
  8109. var args=[];
  8110. for(var $$pai_7=1; $$pai_7 < arguments["length"];++$$pai_7)
  8111. args[$$pai_7 - 1]=arguments[$$pai_7];
  8112. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedDataAsync");
  8113. var commonParameters=$h.CommonParameters.parse(args,true);
  8114. var hostCoercionType;
  8115. var $$t_5,
  8116. $$t_6;
  8117. if(coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Html"] && coercionType !==window["Microsoft"]["Office"]["WebExtension"]["CoercionType"]["Text"] || !($$t_6=$h.Body._tryMapToHostCoercionType$i(coercionType,$$t_5={val: hostCoercionType}),hostCoercionType=$$t_5["val"],$$t_6))
  8118. throw Error.argument("coercionType");
  8119. var dataToHost={coercionType: hostCoercionType};
  8120. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(28,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  8121. };
  8122. $h.ComposeItem.prototype.setSelectedDataAsync=function(data)
  8123. {
  8124. var args=[];
  8125. for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4)
  8126. args[$$pai_4 - 1]=arguments[$$pai_4];
  8127. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"setSelectedDataAsync");
  8128. var parameters=$h.CommonParameters.parse(args,false);
  8129. if(!String["isInstanceOfType"](data))
  8130. throw Error.argumentType("data",Object["getType"](data),String);
  8131. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,1e6,"data");
  8132. var dataToHost=$h.ComposeBody._createParameterDictionaryToHost$i(data,parameters);
  8133. if(!dataToHost)
  8134. return;
  8135. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(29,dataToHost,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  8136. };
  8137. $h.ComposeItem.prototype.close=function()
  8138. {
  8139. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(41,null,null,null,null)
  8140. };
  8141. $h.ComposeItem.prototype.saveAsync=function()
  8142. {
  8143. var args=[];
  8144. for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2)
  8145. args[$$pai_2]=arguments[$$pai_2];
  8146. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"saveAsync");
  8147. var parameters=$h.CommonParameters.parse(args,false);
  8148. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(32,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  8149. };
  8150. $h.ComposeRecipient=function(type, propertyName)
  8151. {
  8152. this._type$p$0=type;
  8153. this._propertyName$p$0=propertyName
  8154. };
  8155. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p=function(displayName, emailAddress)
  8156. {
  8157. if(!displayName && !emailAddress)
  8158. throw Error.argument("recipients");
  8159. if(displayName && displayName.length > 255)
  8160. throw Error.argumentOutOfRange("recipients",displayName.length,window["_u"]["ExtensibilityStrings"]["l_DisplayNameTooLong_Text"]);
  8161. if(emailAddress && emailAddress.length > 571)
  8162. throw Error.argumentOutOfRange("recipients",emailAddress.length,window["_u"]["ExtensibilityStrings"]["l_EmailAddressTooLong_Text"]);
  8163. };
  8164. $h.ComposeRecipient._getAsyncFormatter$p=function(rawInput)
  8165. {
  8166. var input=rawInput;
  8167. var output=[];
  8168. for(var i=0; i < input["length"]; i++)
  8169. {
  8170. var email=new $h.EmailAddressDetails(input[i]);
  8171. output[i]=email
  8172. }
  8173. return output
  8174. };
  8175. $h.ComposeRecipient._createEmailDictionaryForHost$p=function(address, name)
  8176. {
  8177. return{
  8178. address: address,
  8179. name: name
  8180. }
  8181. };
  8182. $h.ComposeRecipient.prototype={
  8183. _propertyName$p$0: null,
  8184. _type$p$0: 0,
  8185. setAddHelper: function(recipients, args, isSet)
  8186. {
  8187. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(recipients["length"],0,100,"recipients");
  8188. var parameters=$h.CommonParameters.parse(args,false);
  8189. var recipientData=[];
  8190. if(Array["isInstanceOfType"](recipients))
  8191. for(var i=0; i < recipients["length"]; i++)
  8192. if(String["isInstanceOfType"](recipients[i]))
  8193. {
  8194. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(recipients[i],recipients[i]);
  8195. recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(recipients[i],recipients[i])
  8196. }
  8197. else if($h.EmailAddressDetails["isInstanceOfType"](recipients[i]))
  8198. {
  8199. var address=recipients[i];
  8200. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(address["displayName"],address["emailAddress"]);
  8201. recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(address["emailAddress"],address["displayName"])
  8202. }
  8203. else if(Object["isInstanceOfType"](recipients[i]))
  8204. {
  8205. var input=recipients[i];
  8206. var emailAddress=input["emailAddress"];
  8207. var displayName=input["displayName"];
  8208. $h.ComposeRecipient._throwOnInvalidDisplayNameOrEmail$p(displayName,emailAddress);
  8209. recipientData[i]=$h.ComposeRecipient._createEmailDictionaryForHost$p(emailAddress,displayName)
  8210. }
  8211. else
  8212. throw Error.argument("recipients");
  8213. else
  8214. throw Error.argument("recipients");
  8215. var $$t_B=this;
  8216. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(isSet ? 21 : 22,{
  8217. recipientField: this._type$p$0,
  8218. recipientArray: recipientData
  8219. },function(rawInput)
  8220. {
  8221. return rawInput
  8222. },parameters._asyncContext$p$0,parameters._callback$p$0)
  8223. }
  8224. };
  8225. $h.ComposeRecipient.prototype.getAsync=function()
  8226. {
  8227. var args=[];
  8228. for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2)
  8229. args[$$pai_2]=arguments[$$pai_2];
  8230. var parameters=$h.CommonParameters.parse(args,true);
  8231. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._propertyName$p$0+".getAsync");
  8232. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(15,{recipientField: this._type$p$0},$h.ComposeRecipient._getAsyncFormatter$p,parameters._asyncContext$p$0,parameters._callback$p$0)
  8233. };
  8234. $h.ComposeRecipient.prototype.setAsync=function(recipients)
  8235. {
  8236. var args=[];
  8237. for(var $$pai_2=1; $$pai_2 < arguments["length"];++$$pai_2)
  8238. args[$$pai_2 - 1]=arguments[$$pai_2];
  8239. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".setAsync");
  8240. this.setAddHelper(recipients,args,true)
  8241. };
  8242. $h.ComposeRecipient.prototype.addAsync=function(recipients)
  8243. {
  8244. var args=[];
  8245. for(var $$pai_2=1; $$pai_2 < arguments["length"];++$$pai_2)
  8246. args[$$pai_2 - 1]=arguments[$$pai_2];
  8247. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._propertyName$p$0+".addAsync");
  8248. this.setAddHelper(recipients,args,false)
  8249. };
  8250. $h.ComposeRecipient.RecipientField=function(){};
  8251. $h.ComposeRecipient.RecipientField.prototype={
  8252. to: 0,
  8253. cc: 1,
  8254. bcc: 2,
  8255. requiredAttendees: 0,
  8256. optionalAttendees: 1
  8257. };
  8258. $h.ComposeRecipient.RecipientField["registerEnum"]("$h.0",false);
  8259. $h.ComposeLocation=function(){};
  8260. $h.ComposeLocation.prototype.getAsync=function()
  8261. {
  8262. var args=[];
  8263. for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2)
  8264. args[$$pai_2]=arguments[$$pai_2];
  8265. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"location.getAsync");
  8266. var parameters=$h.CommonParameters.parse(args,true);
  8267. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(26,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  8268. };
  8269. $h.ComposeLocation.prototype.setAsync=function(location)
  8270. {
  8271. var args=[];
  8272. for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3)
  8273. args[$$pai_3 - 1]=arguments[$$pai_3];
  8274. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"location.setAsync");
  8275. var parameters=$h.CommonParameters.parse(args,false);
  8276. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(location.length,0,255,"location");
  8277. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(27,{location: location},null,parameters._asyncContext$p$0,parameters._callback$p$0)
  8278. };
  8279. $h.ComposeSubject=function(){};
  8280. $h.ComposeSubject.prototype.getAsync=function()
  8281. {
  8282. var args=[];
  8283. for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2)
  8284. args[$$pai_2]=arguments[$$pai_2];
  8285. var parameters=$h.CommonParameters.parse(args,true);
  8286. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"subject.getAsync");
  8287. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(18,null,null,parameters._asyncContext$p$0,parameters._callback$p$0)
  8288. };
  8289. $h.ComposeSubject.prototype.setAsync=function(data)
  8290. {
  8291. var args=[];
  8292. for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3)
  8293. args[$$pai_3 - 1]=arguments[$$pai_3];
  8294. var parameters=$h.CommonParameters.parse(args,false);
  8295. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,"subject.setAsync");
  8296. if(!String["isInstanceOfType"](data))
  8297. throw Error.argument("data");
  8298. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(data.length,0,255,"data");
  8299. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(17,{subject: data},null,parameters._asyncContext$p$0,parameters._callback$p$0)
  8300. };
  8301. $h.ComposeTime=function(type)
  8302. {
  8303. this.$$d__ticksToDateFormatter$p$0=Function.createDelegate(this,this._ticksToDateFormatter$p$0);
  8304. this._timeType$p$0=type
  8305. };
  8306. $h.ComposeTime.prototype={
  8307. _timeType$p$0: 0,
  8308. _ticksToDateFormatter$p$0: function(rawInput)
  8309. {
  8310. var ticks=rawInput;
  8311. return new Date(ticks)
  8312. },
  8313. _getPropertyName$p$0: function()
  8314. {
  8315. return this._timeType$p$0===1 ? "start" : "end"
  8316. }
  8317. };
  8318. $h.ComposeTime.prototype.getAsync=function()
  8319. {
  8320. var args=[];
  8321. for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2)
  8322. args[$$pai_2]=arguments[$$pai_2];
  8323. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,this._getPropertyName$p$0()+".getAsync");
  8324. var parameters=$h.CommonParameters.parse(args,true);
  8325. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(24,{TimeProperty: this._timeType$p$0},this.$$d__ticksToDateFormatter$p$0,parameters._asyncContext$p$0,parameters._callback$p$0)
  8326. };
  8327. $h.ComposeTime.prototype.setAsync=function(dateTime)
  8328. {
  8329. var args=[];
  8330. for(var $$pai_3=1; $$pai_3 < arguments["length"];++$$pai_3)
  8331. args[$$pai_3 - 1]=arguments[$$pai_3];
  8332. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(2,this._getPropertyName$p$0()+".setAsync");
  8333. if(!Date["isInstanceOfType"](dateTime))
  8334. throw Error.argumentType("dateTime",Object["getType"](dateTime),Date);
  8335. if(window["isNaN"](dateTime["getTime"]()))
  8336. throw Error.argument("dateTime");
  8337. if(dateTime["getTime"]() < -864e13 || dateTime["getTime"]() > 864e13)
  8338. throw Error.argumentOutOfRange("dateTime");
  8339. var parameters=$h.CommonParameters.parse(args,false);
  8340. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(25,{
  8341. TimeProperty: this._timeType$p$0,
  8342. time: dateTime["getTime"]()
  8343. },null,parameters._asyncContext$p$0,parameters._callback$p$0)
  8344. };
  8345. $h.ComposeTime.TimeType=function(){};
  8346. $h.ComposeTime.TimeType.prototype={
  8347. start: 1,
  8348. end: 2
  8349. };
  8350. $h.ComposeTime.TimeType["registerEnum"]("$h.1",false);
  8351. $h.Contact=function(data)
  8352. {
  8353. this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);
  8354. this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);
  8355. this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);
  8356. this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);
  8357. this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);
  8358. this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);
  8359. this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);
  8360. this._data$p$0=data;
  8361. $h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);
  8362. $h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);
  8363. $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);
  8364. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);
  8365. $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);
  8366. $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);
  8367. $h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)
  8368. };
  8369. $h.Contact.prototype={
  8370. _data$p$0: null,
  8371. _phoneNumbers$p$0: null,
  8372. _getPersonName$p$0: function()
  8373. {
  8374. return this._data$p$0["PersonName"]
  8375. },
  8376. _getBusinessName$p$0: function()
  8377. {
  8378. return this._data$p$0["BusinessName"]
  8379. },
  8380. _getAddresses$p$0: function()
  8381. {
  8382. return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")
  8383. },
  8384. _getEmailAddresses$p$0: function()
  8385. {
  8386. return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")
  8387. },
  8388. _getUrls$p$0: function()
  8389. {
  8390. return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")
  8391. },
  8392. _getPhoneNumbers$p$0: function()
  8393. {
  8394. if(!this._phoneNumbers$p$0)
  8395. {
  8396. var $$t_1=this;
  8397. this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(data)
  8398. {
  8399. return new $h.PhoneNumber(data)
  8400. })
  8401. }
  8402. return this._phoneNumbers$p$0
  8403. },
  8404. _getContactString$p$0: function()
  8405. {
  8406. return this._data$p$0["ContactString"]
  8407. }
  8408. };
  8409. $h.CustomProperties=function(data)
  8410. {
  8411. if($h.ScriptHelpers.isNullOrUndefined(data))
  8412. throw Error.argumentNull("data");
  8413. if(Array["isInstanceOfType"](data))
  8414. {
  8415. var customPropertiesArray=data;
  8416. if(customPropertiesArray["length"] > 0)
  8417. this._data$p$0=customPropertiesArray[0];
  8418. else
  8419. throw Error.argument("data");
  8420. }
  8421. else
  8422. this._data$p$0=data
  8423. };
  8424. $h.CustomProperties.prototype={_data$p$0: null};
  8425. $h.CustomProperties.prototype.get=function(name)
  8426. {
  8427. var value=this._data$p$0[name];
  8428. if(typeof value==="string")
  8429. {
  8430. var valueString=value;
  8431. if(valueString.length > 6 && valueString.startsWith("Date(") && valueString.endsWith(")"))
  8432. {
  8433. var ticksString=valueString.substring(5,valueString.length - 1);
  8434. var ticks=window["parseInt"](ticksString);
  8435. if(!window["isNaN"](ticks))
  8436. {
  8437. var dateTimeValue=new Date(ticks);
  8438. if(dateTimeValue)
  8439. value=dateTimeValue
  8440. }
  8441. }
  8442. }
  8443. return value
  8444. };
  8445. $h.CustomProperties.prototype.set=function(name, value)
  8446. {
  8447. if(window["OSF"]["OUtil"]["isDate"](value))
  8448. value="Date("+value["getTime"]()+")";
  8449. this._data$p$0[name]=value
  8450. };
  8451. $h.CustomProperties.prototype.remove=function(name)
  8452. {
  8453. delete this._data$p$0[name]
  8454. };
  8455. $h.CustomProperties.prototype.saveAsync=function()
  8456. {
  8457. var args=[];
  8458. for(var $$pai_4=0; $$pai_4 < arguments["length"];++$$pai_4)
  8459. args[$$pai_4]=arguments[$$pai_4];
  8460. var MaxCustomPropertiesLength=2500;
  8461. if(window["JSON"]["stringify"](this._data$p$0).length > MaxCustomPropertiesLength)
  8462. throw Error.argument();
  8463. var parameters=$h.CommonParameters.parse(args,false,true);
  8464. var saveCustomProperties=new $h.SaveDictionaryRequest(parameters._callback$p$0,parameters._asyncContext$p$0);
  8465. saveCustomProperties._sendRequest$i$0(4,"SaveCustomProperties",{customProperties: this._data$p$0})
  8466. };
  8467. $h.Diagnostics=function(data, appName)
  8468. {
  8469. this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);
  8470. this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);
  8471. this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);
  8472. this._data$p$0=data;
  8473. this._appName$p$0=appName;
  8474. $h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);
  8475. $h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);
  8476. if(64===this._appName$p$0)
  8477. $h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)
  8478. };
  8479. $h.Diagnostics.prototype={
  8480. _data$p$0: null,
  8481. _appName$p$0: 0,
  8482. _getHostName$p$0: function()
  8483. {
  8484. switch(this._appName$p$0)
  8485. {
  8486. case 8:
  8487. return"Outlook";
  8488. case 64:
  8489. return"OutlookWebApp";
  8490. case 65536:
  8491. return"OutlookIOS";
  8492. case 4194304:
  8493. return"OutlookAndroid";
  8494. default:
  8495. return null
  8496. }
  8497. },
  8498. _getHostVersion$p$0: function()
  8499. {
  8500. return this._data$p$0.get__hostVersion$i$0()
  8501. },
  8502. _getOwaView$p$0: function()
  8503. {
  8504. return this._data$p$0.get__owaView$i$0()
  8505. }
  8506. };
  8507. $h.EmailAddressDetails=function(data)
  8508. {
  8509. this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);
  8510. this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);
  8511. this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);
  8512. this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);
  8513. this._data$p$0=data;
  8514. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);
  8515. $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);
  8516. if($h.ScriptHelpers.dictionaryContainsKey(data,"appointmentResponse"))
  8517. $h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);
  8518. if($h.ScriptHelpers.dictionaryContainsKey(data,"recipientType"))
  8519. $h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)
  8520. };
  8521. $h.EmailAddressDetails._createFromEmailUserDictionary$i=function(data)
  8522. {
  8523. var emailAddressDetailsDictionary={};
  8524. var displayName=data["Name"];
  8525. var emailAddress=data["UserId"];
  8526. emailAddressDetailsDictionary["name"]=displayName || $h.EmailAddressDetails._emptyString$p;
  8527. emailAddressDetailsDictionary["address"]=emailAddress || $h.EmailAddressDetails._emptyString$p;
  8528. return new $h.EmailAddressDetails(emailAddressDetailsDictionary)
  8529. };
  8530. $h.EmailAddressDetails.prototype={
  8531. _data$p$0: null,
  8532. _getEmailAddress$p$0: function()
  8533. {
  8534. return this._data$p$0["address"]
  8535. },
  8536. _getDisplayName$p$0: function()
  8537. {
  8538. return this._data$p$0["name"]
  8539. },
  8540. _getAppointmentResponse$p$0: function()
  8541. {
  8542. var response=this._data$p$0["appointmentResponse"];
  8543. return response < $h.EmailAddressDetails._responseTypeMap$p["length"] ? $h.EmailAddressDetails._responseTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"]
  8544. },
  8545. _getRecipientType$p$0: function()
  8546. {
  8547. var response=this._data$p$0["recipientType"];
  8548. return response < $h.EmailAddressDetails._recipientTypeMap$p["length"] ? $h.EmailAddressDetails._recipientTypeMap$p[response] : window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"]
  8549. }
  8550. };
  8551. $h.EmailAddressDetails.prototype.toJSON=function()
  8552. {
  8553. var result={};
  8554. result["emailAddress"]=this._getEmailAddress$p$0();
  8555. result["displayName"]=this._getDisplayName$p$0();
  8556. if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse"))
  8557. result["appointmentResponse"]=this._getAppointmentResponse$p$0();
  8558. if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType"))
  8559. result["recipientType"]=this._getRecipientType$p$0();
  8560. return result
  8561. };
  8562. $h.Entities=function(data, filteredEntitiesData, timeSent, permissionLevel)
  8563. {
  8564. this.$$d__createMeetingSuggestion$p$0=Function.createDelegate(this,this._createMeetingSuggestion$p$0);
  8565. this.$$d__getParcelDeliveries$p$0=Function.createDelegate(this,this._getParcelDeliveries$p$0);
  8566. this.$$d__getFlightReservations$p$0=Function.createDelegate(this,this._getFlightReservations$p$0);
  8567. this.$$d__getContacts$p$0=Function.createDelegate(this,this._getContacts$p$0);
  8568. this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);
  8569. this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);
  8570. this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);
  8571. this.$$d__getMeetingSuggestions$p$0=Function.createDelegate(this,this._getMeetingSuggestions$p$0);
  8572. this.$$d__getTaskSuggestions$p$0=Function.createDelegate(this,this._getTaskSuggestions$p$0);
  8573. this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);
  8574. this._data$p$0=data || {};
  8575. this._filteredData$p$0=filteredEntitiesData || {};
  8576. this._dateTimeSent$p$0=timeSent;
  8577. $h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);
  8578. $h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0);
  8579. $h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0);
  8580. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);
  8581. $h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);
  8582. $h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);
  8583. $h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0);
  8584. $h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0);
  8585. $h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0);
  8586. this._permissionLevel$p$0=permissionLevel
  8587. };
  8588. $h.Entities._getExtractedObjects$i=function(T, data, name, creator, removeDuplicates, stringPropertyName)
  8589. {
  8590. var results=null;
  8591. var extractedObjects=data[name];
  8592. if(!extractedObjects)
  8593. return new Array(0);
  8594. if(removeDuplicates)
  8595. extractedObjects=$h.Entities._removeDuplicate$p(Object,extractedObjects,$h.Entities._entityDictionaryEquals$p,stringPropertyName);
  8596. results=new Array(extractedObjects["length"]);
  8597. var count=0;
  8598. for(var $$arr_9=extractedObjects, $$len_A=$$arr_9.length, $$idx_B=0; $$idx_B < $$len_A;++$$idx_B)
  8599. {
  8600. var extractedObject=$$arr_9[$$idx_B];
  8601. if(creator)
  8602. results[count++]=creator(extractedObject);
  8603. else
  8604. results[count++]=extractedObject
  8605. }
  8606. return results
  8607. };
  8608. $h.Entities._getExtractedStringProperty$i=function(data, name, removeDuplicate)
  8609. {
  8610. var extractedProperties=data[name];
  8611. if(!extractedProperties)
  8612. return new Array(0);
  8613. if(removeDuplicate)
  8614. extractedProperties=$h.Entities._removeDuplicate$p(String,extractedProperties,$h.Entities._stringEquals$p,null);
  8615. return extractedProperties
  8616. };
  8617. $h.Entities._createContact$p=function(data)
  8618. {
  8619. return new $h.Contact(data)
  8620. };
  8621. $h.Entities._createTaskSuggestion$p=function(data)
  8622. {
  8623. return new $h.TaskSuggestion(data)
  8624. };
  8625. $h.Entities._createPhoneNumber$p=function(data)
  8626. {
  8627. return new $h.PhoneNumber(data)
  8628. };
  8629. $h.Entities._entityDictionaryEquals$p=function(dictionary1, dictionary2, entityPropertyIdentifier)
  8630. {
  8631. if(dictionary1===dictionary2)
  8632. return true;
  8633. if(!dictionary1 || !dictionary2)
  8634. return false;
  8635. if(dictionary1[entityPropertyIdentifier]===dictionary2[entityPropertyIdentifier])
  8636. return true;
  8637. return false
  8638. };
  8639. $h.Entities._stringEquals$p=function(string1, string2, entityProperty)
  8640. {
  8641. return string1===string2
  8642. };
  8643. $h.Entities._removeDuplicate$p=function(T, array, entityEquals, entityPropertyIdentifier)
  8644. {
  8645. for(var matchIndex1=array["length"] - 1; matchIndex1 >=0; matchIndex1--)
  8646. {
  8647. var removeMatch=false;
  8648. for(var matchIndex2=matchIndex1 - 1; matchIndex2 >=0; matchIndex2--)
  8649. if(entityEquals(array[matchIndex1],array[matchIndex2],entityPropertyIdentifier))
  8650. {
  8651. removeMatch=true;
  8652. break
  8653. }
  8654. if(removeMatch)
  8655. Array.removeAt(array,matchIndex1)
  8656. }
  8657. return array
  8658. };
  8659. $h.Entities.prototype={
  8660. _dateTimeSent$p$0: null,
  8661. _data$p$0: null,
  8662. _filteredData$p$0: null,
  8663. _filteredEntitiesCache$p$0: null,
  8664. _permissionLevel$p$0: 0,
  8665. _taskSuggestions$p$0: null,
  8666. _meetingSuggestions$p$0: null,
  8667. _phoneNumbers$p$0: null,
  8668. _contacts$p$0: null,
  8669. _addresses$p$0: null,
  8670. _emailAddresses$p$0: null,
  8671. _urls$p$0: null,
  8672. _flightReservations$p$0: null,
  8673. _parcelDeliveries$p$0: null,
  8674. _getByType$i$0: function(entityType)
  8675. {
  8676. if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["MeetingSuggestion"])
  8677. return this._getMeetingSuggestions$p$0();
  8678. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["TaskSuggestion"])
  8679. return this._getTaskSuggestions$p$0();
  8680. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Address"])
  8681. return this._getAddresses$p$0();
  8682. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["PhoneNumber"])
  8683. return this._getPhoneNumbers$p$0();
  8684. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["EmailAddress"])
  8685. return this._getEmailAddresses$p$0();
  8686. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Url"])
  8687. return this._getUrls$p$0();
  8688. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["Contact"])
  8689. return this._getContacts$p$0();
  8690. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["FlightReservations"])
  8691. return this._getFlightReservations$p$0();
  8692. else if(entityType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["EntityType"]["ParcelDeliveries"])
  8693. return this._getParcelDeliveries$p$0();
  8694. return null
  8695. },
  8696. _getFilteredEntitiesByName$i$0: function(name)
  8697. {
  8698. if(!this._filteredEntitiesCache$p$0)
  8699. this._filteredEntitiesCache$p$0={};
  8700. if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,name))
  8701. {
  8702. var found=false;
  8703. for(var i=0; i < $h.Entities._allEntityKeys$p["length"]; i++)
  8704. {
  8705. var entityTypeKey=$h.Entities._allEntityKeys$p[i];
  8706. var perEntityTypeDictionary=this._filteredData$p$0[entityTypeKey];
  8707. if(!perEntityTypeDictionary)
  8708. continue;
  8709. if($h.ScriptHelpers.dictionaryContainsKey(perEntityTypeDictionary,name))
  8710. {
  8711. switch(entityTypeKey)
  8712. {
  8713. case"EmailAddresses":
  8714. case"Urls":
  8715. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name);
  8716. break;
  8717. case"Addresses":
  8718. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedStringProperty$i(perEntityTypeDictionary,name,true);
  8719. break;
  8720. case"PhoneNumbers":
  8721. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.PhoneNumber,perEntityTypeDictionary,name,$h.Entities._createPhoneNumber$p,false,null);
  8722. break;
  8723. case"TaskSuggestions":
  8724. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,perEntityTypeDictionary,name,$h.Entities._createTaskSuggestion$p,true,"TaskString");
  8725. break;
  8726. case"MeetingSuggestions":
  8727. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,perEntityTypeDictionary,name,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString");
  8728. break;
  8729. case"Contacts":
  8730. this._filteredEntitiesCache$p$0[name]=$h.Entities._getExtractedObjects$i($h.Contact,perEntityTypeDictionary,name,$h.Entities._createContact$p,true,"ContactString");
  8731. break
  8732. }
  8733. found=true;
  8734. break
  8735. }
  8736. }
  8737. if(!found)
  8738. this._filteredEntitiesCache$p$0[name]=null
  8739. }
  8740. return this._filteredEntitiesCache$p$0[name]
  8741. },
  8742. _createMeetingSuggestion$p$0: function(data)
  8743. {
  8744. return new $h.MeetingSuggestion(data,this._dateTimeSent$p$0)
  8745. },
  8746. _getAddresses$p$0: function()
  8747. {
  8748. if(!this._addresses$p$0)
  8749. this._addresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true);
  8750. return this._addresses$p$0
  8751. },
  8752. _getEmailAddresses$p$0: function()
  8753. {
  8754. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  8755. if(!this._emailAddresses$p$0)
  8756. this._emailAddresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false);
  8757. return this._emailAddresses$p$0
  8758. },
  8759. _getUrls$p$0: function()
  8760. {
  8761. if(!this._urls$p$0)
  8762. this._urls$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false);
  8763. return this._urls$p$0
  8764. },
  8765. _getPhoneNumbers$p$0: function()
  8766. {
  8767. if(!this._phoneNumbers$p$0)
  8768. this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p);
  8769. return this._phoneNumbers$p$0
  8770. },
  8771. _getTaskSuggestions$p$0: function()
  8772. {
  8773. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  8774. if(!this._taskSuggestions$p$0)
  8775. this._taskSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString");
  8776. return this._taskSuggestions$p$0
  8777. },
  8778. _getMeetingSuggestions$p$0: function()
  8779. {
  8780. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  8781. if(!this._meetingSuggestions$p$0)
  8782. this._meetingSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString");
  8783. return this._meetingSuggestions$p$0
  8784. },
  8785. _getContacts$p$0: function()
  8786. {
  8787. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  8788. if(!this._contacts$p$0)
  8789. this._contacts$p$0=$h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString");
  8790. return this._contacts$p$0
  8791. },
  8792. _getParcelDeliveries$p$0: function()
  8793. {
  8794. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  8795. if(!this._parcelDeliveries$p$0)
  8796. this._parcelDeliveries$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null);
  8797. return this._parcelDeliveries$p$0
  8798. },
  8799. _getFlightReservations$p$0: function()
  8800. {
  8801. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);
  8802. if(!this._flightReservations$p$0)
  8803. this._flightReservations$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null);
  8804. return this._flightReservations$p$0
  8805. }
  8806. };
  8807. $h.ReplyConstants=function(){};
  8808. $h.AsyncConstants=function(){};
  8809. window["Office"]["cast"]["item"]=Office.cast.item=function(){};
  8810. window["Office"]["cast"]["item"]["toItemRead"]=function(item)
  8811. {
  8812. if($h.Item["isInstanceOfType"](item))
  8813. return item;
  8814. throw Error.argumentType();
  8815. };
  8816. window["Office"]["cast"]["item"]["toItemCompose"]=function(item)
  8817. {
  8818. if($h.ComposeItem["isInstanceOfType"](item))
  8819. return item;
  8820. throw Error.argumentType();
  8821. };
  8822. window["Office"]["cast"]["item"]["toMessage"]=function(item)
  8823. {
  8824. return window["Office"]["cast"]["item"]["toMessageRead"](item)
  8825. };
  8826. window["Office"]["cast"]["item"]["toMessageRead"]=function(item)
  8827. {
  8828. if($h.Message["isInstanceOfType"](item))
  8829. return item;
  8830. throw Error.argumentType();
  8831. };
  8832. window["Office"]["cast"]["item"]["toMessageCompose"]=function(item)
  8833. {
  8834. if($h.MessageCompose["isInstanceOfType"](item))
  8835. return item;
  8836. throw Error.argumentType();
  8837. };
  8838. window["Office"]["cast"]["item"]["toMeetingRequest"]=function(item)
  8839. {
  8840. if($h.MeetingRequest["isInstanceOfType"](item))
  8841. return item;
  8842. throw Error.argumentType();
  8843. };
  8844. window["Office"]["cast"]["item"]["toAppointment"]=function(item)
  8845. {
  8846. return window["Office"]["cast"]["item"]["toAppointmentRead"](item)
  8847. };
  8848. window["Office"]["cast"]["item"]["toAppointmentRead"]=function(item)
  8849. {
  8850. if($h.Appointment["isInstanceOfType"](item))
  8851. return item;
  8852. throw Error.argumentType();
  8853. };
  8854. window["Office"]["cast"]["item"]["toAppointmentCompose"]=function(item)
  8855. {
  8856. if($h.AppointmentCompose["isInstanceOfType"](item))
  8857. return item;
  8858. throw Error.argumentType();
  8859. };
  8860. $h.Item=function(data)
  8861. {
  8862. this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1);
  8863. this.$$d__getAttachments$p$1=Function.createDelegate(this,this._getAttachments$p$1);
  8864. this.$$d__getItemClass$p$1=Function.createDelegate(this,this._getItemClass$p$1);
  8865. this.$$d__getItemId$p$1=Function.createDelegate(this,this._getItemId$p$1);
  8866. this.$$d__getDateTimeModified$p$1=Function.createDelegate(this,this._getDateTimeModified$p$1);
  8867. this.$$d__getDateTimeCreated$p$1=Function.createDelegate(this,this._getDateTimeCreated$p$1);
  8868. $h.Item["initializeBase"](this,[data]);
  8869. $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1);
  8870. $h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1);
  8871. $h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1);
  8872. $h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1);
  8873. $h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1);
  8874. $h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1)
  8875. };
  8876. $h.Item.prototype={
  8877. _body$p$1: null,
  8878. _getItemId$p$1: function()
  8879. {
  8880. return this._data$p$0.get__itemId$i$0()
  8881. },
  8882. _getItemClass$p$1: function()
  8883. {
  8884. return this._data$p$0.get__itemClass$i$0()
  8885. },
  8886. _getDateTimeCreated$p$1: function()
  8887. {
  8888. return this._data$p$0.get__dateTimeCreated$i$0()
  8889. },
  8890. _getDateTimeModified$p$1: function()
  8891. {
  8892. return this._data$p$0.get__dateTimeModified$i$0()
  8893. },
  8894. _getAttachments$p$1: function()
  8895. {
  8896. return this._data$p$0.get__attachments$i$0()
  8897. },
  8898. _getBody$p$1: function()
  8899. {
  8900. if(!this._body$p$1)
  8901. this._body$p$1=new $h.Body;
  8902. return this._body$p$1
  8903. }
  8904. };
  8905. $h.ItemBase=function(data)
  8906. {
  8907. this.$$d__createCustomProperties$i$0=Function.createDelegate(this,this._createCustomProperties$i$0);
  8908. this.$$d__getNotificationMessages$p$0=Function.createDelegate(this,this._getNotificationMessages$p$0);
  8909. this.$$d_getItemType=Function.createDelegate(this,this.getItemType);
  8910. this._data$p$0=data;
  8911. $h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType);
  8912. $h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0)
  8913. };
  8914. $h.ItemBase.prototype={
  8915. _data$p$0: null,
  8916. _notificationMessages$p$0: null,
  8917. get_data: function()
  8918. {
  8919. return this._data$p$0
  8920. },
  8921. _createCustomProperties$i$0: function(data)
  8922. {
  8923. return new $h.CustomProperties(data)
  8924. },
  8925. _getNotificationMessages$p$0: function()
  8926. {
  8927. if(!this._notificationMessages$p$0)
  8928. this._notificationMessages$p$0=new $h.NotificationMessages;
  8929. return this._notificationMessages$p$0
  8930. }
  8931. };
  8932. $h.ItemBase.prototype.loadCustomPropertiesAsync=function()
  8933. {
  8934. var args=[];
  8935. for(var $$pai_3=0; $$pai_3 < arguments["length"];++$$pai_3)
  8936. args[$$pai_3]=arguments[$$pai_3];
  8937. var parameters=$h.CommonParameters.parse(args,true,true);
  8938. var loadCustomProperties=new $h._loadDictionaryRequest(this.$$d__createCustomProperties$i$0,"customProperties",parameters._callback$p$0,parameters._asyncContext$p$0);
  8939. loadCustomProperties._sendRequest$i$0(3,"LoadCustomProperties",{})
  8940. };
  8941. $h.MeetingRequest=function(data)
  8942. {
  8943. this.$$d__getRequiredAttendees$p$3=Function.createDelegate(this,this._getRequiredAttendees$p$3);
  8944. this.$$d__getOptionalAttendees$p$3=Function.createDelegate(this,this._getOptionalAttendees$p$3);
  8945. this.$$d__getLocation$p$3=Function.createDelegate(this,this._getLocation$p$3);
  8946. this.$$d__getEnd$p$3=Function.createDelegate(this,this._getEnd$p$3);
  8947. this.$$d__getStart$p$3=Function.createDelegate(this,this._getStart$p$3);
  8948. $h.MeetingRequest["initializeBase"](this,[data]);
  8949. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$3);
  8950. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$3);
  8951. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$3);
  8952. $h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$3);
  8953. $h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$3)
  8954. };
  8955. $h.MeetingRequest.prototype={
  8956. _getStart$p$3: function()
  8957. {
  8958. return this._data$p$0.get__start$i$0()
  8959. },
  8960. _getEnd$p$3: function()
  8961. {
  8962. return this._data$p$0.get__end$i$0()
  8963. },
  8964. _getLocation$p$3: function()
  8965. {
  8966. return this._data$p$0.get__location$i$0()
  8967. },
  8968. _getOptionalAttendees$p$3: function()
  8969. {
  8970. return this._data$p$0.get__cc$i$0()
  8971. },
  8972. _getRequiredAttendees$p$3: function()
  8973. {
  8974. return this._data$p$0.get__to$i$0()
  8975. }
  8976. };
  8977. $h.MeetingSuggestion=function(data, dateTimeSent)
  8978. {
  8979. this.$$d__getEndTime$p$0=Function.createDelegate(this,this._getEndTime$p$0);
  8980. this.$$d__getStartTime$p$0=Function.createDelegate(this,this._getStartTime$p$0);
  8981. this.$$d__getSubject$p$0=Function.createDelegate(this,this._getSubject$p$0);
  8982. this.$$d__getLocation$p$0=Function.createDelegate(this,this._getLocation$p$0);
  8983. this.$$d__getAttendees$p$0=Function.createDelegate(this,this._getAttendees$p$0);
  8984. this.$$d__getMeetingString$p$0=Function.createDelegate(this,this._getMeetingString$p$0);
  8985. this._data$p$0=data;
  8986. this._dateTimeSent$p$0=dateTimeSent;
  8987. $h.InitialData._defineReadOnlyProperty$i(this,"meetingString",this.$$d__getMeetingString$p$0);
  8988. $h.InitialData._defineReadOnlyProperty$i(this,"attendees",this.$$d__getAttendees$p$0);
  8989. $h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$0);
  8990. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$0);
  8991. $h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStartTime$p$0);
  8992. $h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEndTime$p$0)
  8993. };
  8994. $h.MeetingSuggestion.prototype={
  8995. _dateTimeSent$p$0: null,
  8996. _data$p$0: null,
  8997. _attendees$p$0: null,
  8998. _getMeetingString$p$0: function()
  8999. {
  9000. return this._data$p$0["MeetingString"]
  9001. },
  9002. _getLocation$p$0: function()
  9003. {
  9004. return this._data$p$0["Location"]
  9005. },
  9006. _getSubject$p$0: function()
  9007. {
  9008. return this._data$p$0["Subject"]
  9009. },
  9010. _getStartTime$p$0: function()
  9011. {
  9012. var time=this._createDateTimeFromParameter$p$0("StartTime");
  9013. var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0);
  9014. if(resolvedTime["getTime"]() !==time["getTime"]())
  9015. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime));
  9016. return time
  9017. },
  9018. _getEndTime$p$0: function()
  9019. {
  9020. var time=this._createDateTimeFromParameter$p$0("EndTime");
  9021. var resolvedTime=$h.MeetingSuggestionTimeDecoder.resolve(time,this._dateTimeSent$p$0);
  9022. if(resolvedTime["getTime"]() !==time["getTime"]())
  9023. return window["OSF"]["DDA"]["OutlookAppOm"]._instance$p["convertToUtcClientTime"](window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._dateToDictionary$i$0(resolvedTime));
  9024. return time
  9025. },
  9026. _createDateTimeFromParameter$p$0: function(keyName)
  9027. {
  9028. var dateTimeString=this._data$p$0[keyName];
  9029. if(!dateTimeString)
  9030. return null;
  9031. return new Date(dateTimeString)
  9032. },
  9033. _getAttendees$p$0: function()
  9034. {
  9035. if(!this._attendees$p$0)
  9036. {
  9037. var $$t_1=this;
  9038. this._attendees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Attendees",function(data)
  9039. {
  9040. return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data)
  9041. })
  9042. }
  9043. return this._attendees$p$0
  9044. }
  9045. };
  9046. $h.MeetingSuggestionTimeDecoder=function(){};
  9047. $h.MeetingSuggestionTimeDecoder.resolve=function(inTime, sentTime)
  9048. {
  9049. if(!sentTime)
  9050. return inTime;
  9051. try
  9052. {
  9053. var tod;
  9054. var outDate;
  9055. var extractedDate;
  9056. var sentDate=new Date(sentTime["getFullYear"](),sentTime["getMonth"](),sentTime["getDate"](),0,0,0,0);
  9057. var $$t_7,
  9058. $$t_8,
  9059. $$t_9;
  9060. if(!($$t_9=$h.MeetingSuggestionTimeDecoder._decode$p(inTime,$$t_7={val: extractedDate},$$t_8={val: tod}),extractedDate=$$t_7["val"],tod=$$t_8["val"],$$t_9))
  9061. return inTime;
  9062. else
  9063. {
  9064. if($h._preciseDate["isInstanceOfType"](extractedDate))
  9065. outDate=$h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p(sentDate,extractedDate);
  9066. else if($h._relativeDate["isInstanceOfType"](extractedDate))
  9067. outDate=$h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p(sentDate,extractedDate);
  9068. else
  9069. outDate=sentDate;
  9070. if(window["isNaN"](outDate["getTime"]()))
  9071. return sentTime;
  9072. outDate["setMilliseconds"](outDate["getMilliseconds"]()+tod);
  9073. return outDate
  9074. }
  9075. }
  9076. catch($$e_6)
  9077. {
  9078. return sentTime
  9079. }
  9080. };
  9081. $h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i=function(value)
  9082. {
  9083. return null===value || value===undefined
  9084. };
  9085. $h.MeetingSuggestionTimeDecoder._resolvePreciseDate$p=function(sentDate, precise)
  9086. {
  9087. var year=precise._year$i$1;
  9088. var month=!precise._month$i$1 ? sentDate["getMonth"]() : precise._month$i$1 - 1;
  9089. var day=precise._day$i$1;
  9090. if(!day)
  9091. return sentDate;
  9092. var candidate;
  9093. if($h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year))
  9094. {
  9095. candidate=new Date(sentDate["getFullYear"](),month,day);
  9096. if(candidate["getTime"]() < sentDate["getTime"]())
  9097. candidate=new Date(sentDate["getFullYear"]()+1,month,day)
  9098. }
  9099. else
  9100. candidate=new Date(year < 50 ? 2e3+year : 1900+year,month,day);
  9101. if(candidate["getMonth"]() !==month)
  9102. return sentDate;
  9103. return candidate
  9104. };
  9105. $h.MeetingSuggestionTimeDecoder._resolveRelativeDate$p=function(sentDate, relative)
  9106. {
  9107. var date;
  9108. switch(relative._unit$i$1)
  9109. {
  9110. case 0:
  9111. date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]());
  9112. date["setDate"](date["getDate"]()+relative._offset$i$1);
  9113. return date;
  9114. case 5:
  9115. return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p(sentDate,relative._offset$i$1,relative._tag$i$1);
  9116. case 2:
  9117. var days=1;
  9118. switch(relative._modifier$i$1)
  9119. {
  9120. case 1:
  9121. break;
  9122. case 2:
  9123. days=16;
  9124. break;
  9125. default:
  9126. if(!relative._offset$i$1)
  9127. days=sentDate["getDate"]();
  9128. break
  9129. }
  9130. date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),days);
  9131. date["setMonth"](date["getMonth"]()+relative._offset$i$1);
  9132. if(date["getTime"]() < sentDate["getTime"]())
  9133. date["setDate"](date["getDate"]()+sentDate["getDate"]() - 1);
  9134. return date;
  9135. case 1:
  9136. date=new Date(sentDate["getFullYear"](),sentDate["getMonth"](),sentDate["getDate"]());
  9137. date["setDate"](sentDate["getDate"]()+7 * relative._offset$i$1);
  9138. if(relative._modifier$i$1===1 || !relative._modifier$i$1)
  9139. {
  9140. date["setDate"](date["getDate"]()+1 - date["getDay"]());
  9141. if(date["getTime"]() < sentDate["getTime"]())
  9142. return sentDate;
  9143. return date
  9144. }
  9145. else if(relative._modifier$i$1===2)
  9146. {
  9147. date["setDate"](date["getDate"]()+5 - date["getDay"]());
  9148. return date
  9149. }
  9150. break;
  9151. case 4:
  9152. return $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p(sentDate,relative);
  9153. case 3:
  9154. if(relative._offset$i$1 > 0)
  9155. return new Date(sentDate["getFullYear"]()+relative._offset$i$1,0,1);
  9156. break;
  9157. default:
  9158. break
  9159. }
  9160. return sentDate
  9161. };
  9162. $h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(sentDate, offset, tag)
  9163. {
  9164. if(offset > -5 && offset < 5)
  9165. {
  9166. var dayOfWeek=(tag+6) % 7+1;
  9167. var days=7 * offset+(dayOfWeek - sentDate["getDay"]());
  9168. sentDate["setDate"](sentDate["getDate"]()+days);
  9169. return sentDate
  9170. }
  9171. else
  9172. {
  9173. var days=(tag - sentDate["getDay"]()) % 7;
  9174. if(days < 0)
  9175. days+=7;
  9176. sentDate["setDate"](sentDate["getDate"]()+days);
  9177. return sentDate
  9178. }
  9179. };
  9180. $h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(sentDate, relative)
  9181. {
  9182. var date;
  9183. var firstDay;
  9184. var newDate;
  9185. date=sentDate;
  9186. if(relative._tag$i$1 <=0 || relative._tag$i$1 > 12 || relative._offset$i$1 <=0 || relative._offset$i$1 > 5)
  9187. return sentDate;
  9188. var monthOffset=(12+relative._tag$i$1 - date["getMonth"]() - 1) % 12;
  9189. firstDay=new Date(date["getFullYear"](),date["getMonth"]()+monthOffset,1);
  9190. if(relative._modifier$i$1===1)
  9191. if(relative._offset$i$1===1 && firstDay["getDay"]() !==6 && firstDay["getDay"]())
  9192. return firstDay;
  9193. else
  9194. {
  9195. newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),firstDay["getDate"]());
  9196. newDate["setDate"](newDate["getDate"]()+(7+(1 - firstDay["getDay"]())) % 7);
  9197. if(firstDay["getDay"]() !==6 && firstDay["getDay"]() && firstDay["getDay"]() !==1)
  9198. newDate["setDate"](newDate["getDate"]() - 7);
  9199. newDate["setDate"](newDate["getDate"]()+7 * (relative._offset$i$1 - 1));
  9200. if(newDate["getMonth"]()+1 !==relative._tag$i$1)
  9201. return sentDate;
  9202. return newDate
  9203. }
  9204. else
  9205. {
  9206. newDate=new Date(firstDay["getFullYear"](),firstDay["getMonth"](),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(firstDay["getMonth"](),firstDay["getFullYear"]()));
  9207. var offset=1 - newDate["getDay"]();
  9208. if(offset > 0)
  9209. offset=offset - 7;
  9210. newDate["setDate"](newDate["getDate"]()+offset);
  9211. newDate["setDate"](newDate["getDate"]()+7 * (1 - relative._offset$i$1));
  9212. if(newDate["getMonth"]()+1 !==relative._tag$i$1)
  9213. if(firstDay["getDay"]() !==6 && firstDay["getDay"]())
  9214. return firstDay;
  9215. else
  9216. return sentDate;
  9217. else
  9218. return newDate
  9219. }
  9220. };
  9221. $h.MeetingSuggestionTimeDecoder._decode$p=function(inDate, date, time)
  9222. {
  9223. var DateValueMask=32767;
  9224. date["val"]=null;
  9225. time["val"]=0;
  9226. if(!inDate)
  9227. return false;
  9228. time["val"]=$h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(inDate);
  9229. var inDateAtMidnight=inDate["getTime"]() - time["val"];
  9230. var value=(inDateAtMidnight - $h.MeetingSuggestionTimeDecoder._baseDate$p["getTime"]()) / 864e5;
  9231. if(value < 0)
  9232. return false;
  9233. else if(value >=262144)
  9234. return false;
  9235. else
  9236. {
  9237. var type=value >> 15;
  9238. value=value & DateValueMask;
  9239. switch(type)
  9240. {
  9241. case 0:
  9242. return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(value,date);
  9243. case 1:
  9244. return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(value,date);
  9245. default:
  9246. return false
  9247. }
  9248. }
  9249. };
  9250. $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(value, date)
  9251. {
  9252. var c_SubTypeMask=7;
  9253. var c_MonthMask=15;
  9254. var c_DayMask=31;
  9255. var c_YearMask=127;
  9256. var year=null;
  9257. var month=0;
  9258. var day=0;
  9259. date["val"]=null;
  9260. var subType=value >> 12 & c_SubTypeMask;
  9261. if((subType & 4)===4)
  9262. {
  9263. year=value >> 5 & c_YearMask;
  9264. if((subType & 2)===2)
  9265. {
  9266. if((subType & 1)===1)
  9267. return false;
  9268. month=value >> 1 & c_MonthMask
  9269. }
  9270. }
  9271. else
  9272. {
  9273. if((subType & 2)===2)
  9274. month=value >> 8 & c_MonthMask;
  9275. if((subType & 1)===1)
  9276. day=value >> 3 & c_DayMask
  9277. }
  9278. date["val"]=new $h._preciseDate(day,month,year);
  9279. return true
  9280. };
  9281. $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(value, date)
  9282. {
  9283. var TagMask=15;
  9284. var OffsetMask=63;
  9285. var UnitMask=7;
  9286. var ModifierMask=3;
  9287. var tag=value & TagMask;
  9288. value >>=4;
  9289. var offset=$h.MeetingSuggestionTimeDecoder._fromComplement$p(value & OffsetMask,6);
  9290. value >>=6;
  9291. var unit=value & UnitMask;
  9292. value >>=3;
  9293. var modifier=value & ModifierMask;
  9294. try
  9295. {
  9296. date["val"]=new $h._relativeDate(modifier,offset,unit,tag);
  9297. return true
  9298. }
  9299. catch($$e_A)
  9300. {
  9301. date["val"]=null;
  9302. return false
  9303. }
  9304. };
  9305. $h.MeetingSuggestionTimeDecoder._fromComplement$p=function(value, n)
  9306. {
  9307. var signed=1 << n - 1;
  9308. var mask=(1 << n) - 1;
  9309. if((value & signed)===signed)
  9310. return-((value ^ mask)+1);
  9311. else
  9312. return value
  9313. };
  9314. $h.MeetingSuggestionTimeDecoder._daysInMonth$p=function(month, year)
  9315. {
  9316. return 32 - new Date(year,month,32)["getDate"]()
  9317. };
  9318. $h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p=function(inputTime)
  9319. {
  9320. var timeOfDay=0;
  9321. timeOfDay+=inputTime["getUTCHours"]() * 3600;
  9322. timeOfDay+=inputTime["getUTCMinutes"]() * 60;
  9323. timeOfDay+=inputTime["getUTCSeconds"]();
  9324. timeOfDay *=1e3;
  9325. timeOfDay+=inputTime["getUTCMilliseconds"]();
  9326. return timeOfDay
  9327. };
  9328. $h._extractedDate=function(){};
  9329. $h._preciseDate=function(day, month, year)
  9330. {
  9331. $h._preciseDate["initializeBase"](this);
  9332. if(day < 0 || day > 31)
  9333. throw Error.argumentOutOfRange("day");
  9334. if(month < 0 || month > 12)
  9335. throw Error.argumentOutOfRange("month");
  9336. this._day$i$1=day;
  9337. this._month$i$1=month;
  9338. if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(year))
  9339. {
  9340. if(!month && day)
  9341. throw Error.argument("Invalid arguments");
  9342. if(year < 0 || year > 2099)
  9343. throw Error.argumentOutOfRange("year");
  9344. this._year$i$1=year % 100
  9345. }
  9346. else if(!this._month$i$1 && !this._day$i$1)
  9347. throw Error.argument("Invalid datetime");
  9348. };
  9349. $h._preciseDate.prototype={
  9350. _day$i$1: 0,
  9351. _month$i$1: 0,
  9352. _year$i$1: null
  9353. };
  9354. $h._relativeDate=function(modifier, offset, unit, tag)
  9355. {
  9356. $h._relativeDate["initializeBase"](this);
  9357. if(offset < -32 || offset > 31)
  9358. throw Error.argumentOutOfRange("offset");
  9359. if(tag < 0 || tag > 15)
  9360. throw Error.argumentOutOfRange("tag");
  9361. if(!unit && offset < 0)
  9362. throw Error.argument("unit & offset do not form a valid date");
  9363. this._modifier$i$1=modifier;
  9364. this._offset$i$1=offset;
  9365. this._unit$i$1=unit;
  9366. this._tag$i$1=tag
  9367. };
  9368. $h._relativeDate.prototype={
  9369. _modifier$i$1: 0,
  9370. _offset$i$1: 0,
  9371. _unit$i$1: 0,
  9372. _tag$i$1: 0
  9373. };
  9374. $h.Message=function(dataDictionary)
  9375. {
  9376. this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2);
  9377. this.$$d__getInternetMessageId$p$2=Function.createDelegate(this,this._getInternetMessageId$p$2);
  9378. this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2);
  9379. this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2);
  9380. this.$$d__getFrom$p$2=Function.createDelegate(this,this._getFrom$p$2);
  9381. this.$$d__getSender$p$2=Function.createDelegate(this,this._getSender$p$2);
  9382. this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);
  9383. this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);
  9384. $h.Message["initializeBase"](this,[dataDictionary]);
  9385. $h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);
  9386. $h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);
  9387. $h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2);
  9388. $h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2);
  9389. $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2);
  9390. $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2);
  9391. $h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2);
  9392. $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2)
  9393. };
  9394. $h.Message.prototype={
  9395. getItemType: function()
  9396. {
  9397. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"]
  9398. },
  9399. _getSubject$p$2: function()
  9400. {
  9401. return this._data$p$0.get__subject$i$0()
  9402. },
  9403. _getNormalizedSubject$p$2: function()
  9404. {
  9405. return this._data$p$0.get__normalizedSubject$i$0()
  9406. },
  9407. _getSender$p$2: function()
  9408. {
  9409. return this._data$p$0.get__sender$i$0()
  9410. },
  9411. _getFrom$p$2: function()
  9412. {
  9413. return this._data$p$0.get__from$i$0()
  9414. },
  9415. _getTo$p$2: function()
  9416. {
  9417. return this._data$p$0.get__to$i$0()
  9418. },
  9419. _getCc$p$2: function()
  9420. {
  9421. return this._data$p$0.get__cc$i$0()
  9422. },
  9423. _getInternetMessageId$p$2: function()
  9424. {
  9425. return this._data$p$0.get__internetMessageId$i$0()
  9426. },
  9427. _getConversationId$p$2: function()
  9428. {
  9429. return this._data$p$0.get__conversationId$i$0()
  9430. }
  9431. };
  9432. $h.Message.prototype.getEntities=function()
  9433. {
  9434. return this._data$p$0._getEntities$i$0()
  9435. };
  9436. $h.Message.prototype.getEntitiesByType=function(entityType)
  9437. {
  9438. return this._data$p$0._getEntitiesByType$i$0(entityType)
  9439. };
  9440. $h.Message.prototype.getFilteredEntitiesByName=function(name)
  9441. {
  9442. return this._data$p$0._getFilteredEntitiesByName$i$0(name)
  9443. };
  9444. $h.Message.prototype.getSelectedEntities=function()
  9445. {
  9446. return this._data$p$0._getSelectedEntities$i$0()
  9447. };
  9448. $h.Message.prototype.getRegExMatches=function()
  9449. {
  9450. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");
  9451. return this._data$p$0._getRegExMatches$i$0()
  9452. };
  9453. $h.Message.prototype.getRegExMatchesByName=function(name)
  9454. {
  9455. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");
  9456. return this._data$p$0._getRegExMatchesByName$i$0(name)
  9457. };
  9458. $h.Message.prototype.getSelectedRegExMatches=function()
  9459. {
  9460. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getSelectedRegExMatches");
  9461. return this._data$p$0._getSelectedRegExMatches$i$0()
  9462. };
  9463. $h.Message.prototype.displayReplyForm=function(obj)
  9464. {
  9465. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyForm$i$0(obj)
  9466. };
  9467. $h.Message.prototype.displayReplyAllForm=function(obj)
  9468. {
  9469. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._displayReplyAllForm$i$0(obj)
  9470. };
  9471. $h.MessageCompose=function(data)
  9472. {
  9473. this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2);
  9474. this.$$d__getBcc$p$2=Function.createDelegate(this,this._getBcc$p$2);
  9475. this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2);
  9476. this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2);
  9477. $h.MessageCompose["initializeBase"](this,[data]);
  9478. $h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2);
  9479. $h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2);
  9480. $h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2);
  9481. $h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2)
  9482. };
  9483. $h.MessageCompose.prototype={
  9484. _to$p$2: null,
  9485. _cc$p$2: null,
  9486. _bcc$p$2: null,
  9487. getItemType: function()
  9488. {
  9489. return window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemType"]["Message"]
  9490. },
  9491. _getTo$p$2: function()
  9492. {
  9493. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  9494. if(!this._to$p$2)
  9495. this._to$p$2=new $h.ComposeRecipient(0,"to");
  9496. return this._to$p$2
  9497. },
  9498. _getCc$p$2: function()
  9499. {
  9500. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  9501. if(!this._cc$p$2)
  9502. this._cc$p$2=new $h.ComposeRecipient(1,"cc");
  9503. return this._cc$p$2
  9504. },
  9505. _getBcc$p$2: function()
  9506. {
  9507. this._data$p$0._throwOnRestrictedPermissionLevel$i$0();
  9508. if(!this._bcc$p$2)
  9509. this._bcc$p$2=new $h.ComposeRecipient(2,"bcc");
  9510. return this._bcc$p$2
  9511. },
  9512. _getConversationId$p$2: function()
  9513. {
  9514. return this._data$p$0.get__conversationId$i$0()
  9515. }
  9516. };
  9517. $h.NotificationMessages=function(){};
  9518. $h.NotificationMessages._mapToHostItemNotificationMessageType$p=function(dataToHost)
  9519. {
  9520. var notificationType;
  9521. var hostItemNotificationMessageType;
  9522. notificationType=dataToHost["type"];
  9523. if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ProgressIndicator"])
  9524. hostItemNotificationMessageType=1;
  9525. else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"])
  9526. hostItemNotificationMessageType=0;
  9527. else if(notificationType===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["ErrorMessage"])
  9528. hostItemNotificationMessageType=2;
  9529. else
  9530. throw Error.argument("type");
  9531. dataToHost["type"]=hostItemNotificationMessageType
  9532. };
  9533. $h.NotificationMessages._validateKey$p=function(key)
  9534. {
  9535. if(!$h.ScriptHelpers.isNonEmptyString(key))
  9536. throw Error.argument("key");
  9537. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(key.length,0,32,"key")
  9538. };
  9539. $h.NotificationMessages._validateDictionary$p=function(dictionary)
  9540. {
  9541. if(!$h.ScriptHelpers.isNonEmptyString(dictionary["type"]))
  9542. throw Error.argument("type");
  9543. if(dictionary["type"]===window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ItemNotificationMessageType"]["InformationalMessage"])
  9544. {
  9545. if(!$h.ScriptHelpers.isNonEmptyString(dictionary["icon"]))
  9546. throw Error.argument("icon");
  9547. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["icon"].length,0,32,"icon");
  9548. if($h.ScriptHelpers.isUndefined(dictionary["persistent"]))
  9549. throw Error.argument("persistent");
  9550. if(!Boolean["isInstanceOfType"](dictionary["persistent"]))
  9551. throw Error.argumentType("persistent",Object["getType"](dictionary["persistent"]),Boolean);
  9552. }
  9553. else
  9554. {
  9555. if(!$h.ScriptHelpers.isUndefined(dictionary["icon"]))
  9556. throw Error.argument("icon");
  9557. if(!$h.ScriptHelpers.isUndefined(dictionary["persistent"]))
  9558. throw Error.argument("persistent");
  9559. }
  9560. if(!$h.ScriptHelpers.isNonEmptyString(dictionary["message"]))
  9561. throw Error.argument("message");
  9562. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnOutOfRange$i(dictionary["message"].length,0,150,"message")
  9563. };
  9564. $h.NotificationMessages.prototype.addAsync=function(key, dictionary)
  9565. {
  9566. var args=[];
  9567. for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5)
  9568. args[$$pai_5 - 2]=arguments[$$pai_5];
  9569. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.addAsync");
  9570. var commonParameters=$h.CommonParameters.parse(args,false);
  9571. $h.NotificationMessages._validateKey$p(key);
  9572. $h.NotificationMessages._validateDictionary$p(dictionary);
  9573. var dataToHost={};
  9574. dataToHost=$h.ScriptHelpers.deepClone(dictionary);
  9575. dataToHost["key"]=key;
  9576. $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost);
  9577. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(33,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  9578. };
  9579. $h.NotificationMessages.prototype.getAllAsync=function()
  9580. {
  9581. var args=[];
  9582. for(var $$pai_2=0; $$pai_2 < arguments["length"];++$$pai_2)
  9583. args[$$pai_2]=arguments[$$pai_2];
  9584. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.getAllAsync");
  9585. var commonParameters=$h.CommonParameters.parse(args,true);
  9586. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(34,null,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  9587. };
  9588. $h.NotificationMessages.prototype.replaceAsync=function(key, dictionary)
  9589. {
  9590. var args=[];
  9591. for(var $$pai_5=2; $$pai_5 < arguments["length"];++$$pai_5)
  9592. args[$$pai_5 - 2]=arguments[$$pai_5];
  9593. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.replaceAsync");
  9594. var commonParameters=$h.CommonParameters.parse(args,false);
  9595. $h.NotificationMessages._validateKey$p(key);
  9596. $h.NotificationMessages._validateDictionary$p(dictionary);
  9597. var dataToHost={};
  9598. dataToHost=$h.ScriptHelpers.deepClone(dictionary);
  9599. dataToHost["key"]=key;
  9600. $h.NotificationMessages._mapToHostItemNotificationMessageType$p(dataToHost);
  9601. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(35,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  9602. };
  9603. $h.NotificationMessages.prototype.removeAsync=function(key)
  9604. {
  9605. var args=[];
  9606. for(var $$pai_4=1; $$pai_4 < arguments["length"];++$$pai_4)
  9607. args[$$pai_4 - 1]=arguments[$$pai_4];
  9608. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._throwOnMethodCallForInsufficientPermission$i$0(0,"NotificationMessages.removeAsync");
  9609. var commonParameters=$h.CommonParameters.parse(args,false);
  9610. $h.NotificationMessages._validateKey$p(key);
  9611. var dataToHost={key: key};
  9612. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p._standardInvokeHostMethod$i$0(36,dataToHost,null,commonParameters._asyncContext$p$0,commonParameters._callback$p$0)
  9613. };
  9614. $h.OutlookErrorManager=function(){};
  9615. $h.OutlookErrorManager.getErrorArgs=function(errorCode)
  9616. {
  9617. if(!$h.OutlookErrorManager._isInitialized$p)
  9618. $h.OutlookErrorManager._initialize$p();
  9619. return OSF.DDA.ErrorCodeManager["getErrorArgs"](errorCode)
  9620. };
  9621. $h.OutlookErrorManager._initialize$p=function()
  9622. {
  9623. $h.OutlookErrorManager._addErrorMessage$p(9e3,"AttachmentSizeExceeded",window["_u"]["ExtensibilityStrings"]["l_AttachmentExceededSize_Text"]);
  9624. $h.OutlookErrorManager._addErrorMessage$p(9001,"NumberOfAttachmentsExceeded",window["_u"]["ExtensibilityStrings"]["l_ExceededMaxNumberOfAttachments_Text"]);
  9625. $h.OutlookErrorManager._addErrorMessage$p(9002,"InternalFormatError",window["_u"]["ExtensibilityStrings"]["l_InternalFormatError_Text"]);
  9626. $h.OutlookErrorManager._addErrorMessage$p(9003,"InvalidAttachmentId",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentId_Text"]);
  9627. $h.OutlookErrorManager._addErrorMessage$p(9004,"InvalidAttachmentPath",window["_u"]["ExtensibilityStrings"]["l_InvalidAttachmentPath_Text"]);
  9628. $h.OutlookErrorManager._addErrorMessage$p(9005,"CannotAddAttachmentBeforeUpgrade",window["_u"]["ExtensibilityStrings"]["l_CannotAddAttachmentBeforeUpgrade_Text"]);
  9629. $h.OutlookErrorManager._addErrorMessage$p(9006,"AttachmentDeletedBeforeUploadCompletes",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeletedBeforeUploadCompletes_Text"]);
  9630. $h.OutlookErrorManager._addErrorMessage$p(9007,"AttachmentUploadGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentUploadGeneralFailure_Text"]);
  9631. $h.OutlookErrorManager._addErrorMessage$p(9008,"AttachmentToDeleteDoesNotExist",window["_u"]["ExtensibilityStrings"]["l_DeleteAttachmentDoesNotExist_Text"]);
  9632. $h.OutlookErrorManager._addErrorMessage$p(9009,"AttachmentDeleteGeneralFailure",window["_u"]["ExtensibilityStrings"]["l_AttachmentDeleteGeneralFailure_Text"]);
  9633. $h.OutlookErrorManager._addErrorMessage$p(9010,"InvalidEndTime",window["_u"]["ExtensibilityStrings"]["l_InvalidEndTime_Text"]);
  9634. $h.OutlookErrorManager._addErrorMessage$p(9011,"HtmlSanitizationFailure",window["_u"]["ExtensibilityStrings"]["l_HtmlSanitizationFailure_Text"]);
  9635. $h.OutlookErrorManager._addErrorMessage$p(9012,"NumberOfRecipientsExceeded",String.format(window["_u"]["ExtensibilityStrings"]["l_NumberOfRecipientsExceeded_Text"],500));
  9636. $h.OutlookErrorManager._addErrorMessage$p(9013,"NoValidRecipientsProvided",window["_u"]["ExtensibilityStrings"]["l_NoValidRecipientsProvided_Text"]);
  9637. $h.OutlookErrorManager._addErrorMessage$p(9014,"CursorPositionChanged",window["_u"]["ExtensibilityStrings"]["l_CursorPositionChanged_Text"]);
  9638. $h.OutlookErrorManager._addErrorMessage$p(9016,"InvalidSelection",window["_u"]["ExtensibilityStrings"]["l_InvalidSelection_Text"]);
  9639. $h.OutlookErrorManager._addErrorMessage$p(9017,"AccessRestricted","");
  9640. $h.OutlookErrorManager._addErrorMessage$p(9018,"GenericTokenError","");
  9641. $h.OutlookErrorManager._addErrorMessage$p(9019,"GenericSettingsError","");
  9642. $h.OutlookErrorManager._addErrorMessage$p(9020,"GenericResponseError","");
  9643. $h.OutlookErrorManager._addErrorMessage$p(9021,"SaveError",window["_u"]["ExtensibilityStrings"]["l_SaveError_Text"]);
  9644. $h.OutlookErrorManager._addErrorMessage$p(9022,"MessageInDifferentStoreError",window["_u"]["ExtensibilityStrings"]["l_MessageInDifferentStoreError_Text"]);
  9645. $h.OutlookErrorManager._addErrorMessage$p(9023,"DuplicateNotificationKey",window["_u"]["ExtensibilityStrings"]["l_DuplicateNotificationKey_Text"]);
  9646. $h.OutlookErrorManager._addErrorMessage$p(9024,"NotificationKeyNotFound",window["_u"]["ExtensibilityStrings"]["l_NotificationKeyNotFound_Text"]);
  9647. $h.OutlookErrorManager._addErrorMessage$p(9025,"NumberOfNotificationsExceeded",window["_u"]["ExtensibilityStrings"]["l_NumberOfNotificationsExceeded_Text"]);
  9648. $h.OutlookErrorManager._addErrorMessage$p(9026,"PersistedNotificationArrayReadError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArrayReadError_Text"]);
  9649. $h.OutlookErrorManager._addErrorMessage$p(9027,"PersistedNotificationArraySaveError",window["_u"]["ExtensibilityStrings"]["l_PersistedNotificationArraySaveError_Text"]);
  9650. $h.OutlookErrorManager._addErrorMessage$p(9028,"CannotPersistPropertyInUnsavedDraftError",window["_u"]["ExtensibilityStrings"]["l_CannotPersistPropertyInUnsavedDraftError_Text"]);
  9651. $h.OutlookErrorManager._addErrorMessage$p(9029,"CanOnlyGetTokenForSavedItem",window["_u"]["ExtensibilityStrings"]["l_CallSaveAsyncBeforeToken_Text"]);
  9652. $h.OutlookErrorManager._isInitialized$p=true
  9653. };
  9654. $h.OutlookErrorManager._addErrorMessage$p=function(errorCode, errorName, errorMessage)
  9655. {
  9656. OSF.DDA.ErrorCodeManager["addErrorMessage"](errorCode,{
  9657. name: errorName,
  9658. message: errorMessage
  9659. })
  9660. };
  9661. $h.OutlookErrorManager.OutlookErrorCodes=function(){};
  9662. $h.OutlookErrorManager.OsfDdaErrorCodes=function(){};
  9663. $h.PhoneNumber=function(data)
  9664. {
  9665. this.$$d__getPhoneType$p$0=Function.createDelegate(this,this._getPhoneType$p$0);
  9666. this.$$d__getOriginalPhoneString$p$0=Function.createDelegate(this,this._getOriginalPhoneString$p$0);
  9667. this.$$d__getPhoneString$p$0=Function.createDelegate(this,this._getPhoneString$p$0);
  9668. this._data$p$0=data;
  9669. $h.InitialData._defineReadOnlyProperty$i(this,"phoneString",this.$$d__getPhoneString$p$0);
  9670. $h.InitialData._defineReadOnlyProperty$i(this,"originalPhoneString",this.$$d__getOriginalPhoneString$p$0);
  9671. $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getPhoneType$p$0)
  9672. };
  9673. $h.PhoneNumber.prototype={
  9674. _data$p$0: null,
  9675. _getPhoneString$p$0: function()
  9676. {
  9677. return this._data$p$0["PhoneString"]
  9678. },
  9679. _getOriginalPhoneString$p$0: function()
  9680. {
  9681. return this._data$p$0["OriginalPhoneString"]
  9682. },
  9683. _getPhoneType$p$0: function()
  9684. {
  9685. return this._data$p$0["Type"]
  9686. }
  9687. };
  9688. $h.TaskSuggestion=function(data)
  9689. {
  9690. this.$$d__getAssignees$p$0=Function.createDelegate(this,this._getAssignees$p$0);
  9691. this.$$d__getTaskString$p$0=Function.createDelegate(this,this._getTaskString$p$0);
  9692. this._data$p$0=data;
  9693. $h.InitialData._defineReadOnlyProperty$i(this,"taskString",this.$$d__getTaskString$p$0);
  9694. $h.InitialData._defineReadOnlyProperty$i(this,"assignees",this.$$d__getAssignees$p$0)
  9695. };
  9696. $h.TaskSuggestion.prototype={
  9697. _data$p$0: null,
  9698. _assignees$p$0: null,
  9699. _getTaskString$p$0: function()
  9700. {
  9701. return this._data$p$0["TaskString"]
  9702. },
  9703. _getAssignees$p$0: function()
  9704. {
  9705. if(!this._assignees$p$0)
  9706. {
  9707. var $$t_1=this;
  9708. this._assignees$p$0=$h.Entities._getExtractedObjects$i($h.EmailAddressDetails,this._data$p$0,"Assignees",function(data)
  9709. {
  9710. return $h.EmailAddressDetails._createFromEmailUserDictionary$i(data)
  9711. })
  9712. }
  9713. return this._assignees$p$0
  9714. }
  9715. };
  9716. $h.UserProfile=function(data)
  9717. {
  9718. this.$$d__getUserProfileType$p$0=Function.createDelegate(this,this._getUserProfileType$p$0);
  9719. this.$$d__getTimeZone$p$0=Function.createDelegate(this,this._getTimeZone$p$0);
  9720. this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);
  9721. this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);
  9722. this._data$p$0=data;
  9723. $h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);
  9724. $h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);
  9725. $h.InitialData._defineReadOnlyProperty$i(this,"timeZone",this.$$d__getTimeZone$p$0);
  9726. $h.InitialData._defineReadOnlyProperty$i(this,"type",this.$$d__getUserProfileType$p$0)
  9727. };
  9728. $h.UserProfile.prototype={
  9729. _data$p$0: null,
  9730. _getUserProfileType$p$0: function()
  9731. {
  9732. return this._data$p$0.get__userProfileType$i$0()
  9733. },
  9734. _getDisplayName$p$0: function()
  9735. {
  9736. return this._data$p$0.get__userDisplayName$i$0()
  9737. },
  9738. _getEmailAddress$p$0: function()
  9739. {
  9740. return this._data$p$0.get__userEmailAddress$i$0()
  9741. },
  9742. _getTimeZone$p$0: function()
  9743. {
  9744. return this._data$p$0.get__userTimeZone$i$0()
  9745. }
  9746. };
  9747. $h.OutlookDispid=function(){};
  9748. $h.OutlookDispid.prototype={
  9749. owaOnlyMethod: 0,
  9750. getInitialData: 1,
  9751. getUserIdentityToken: 2,
  9752. loadCustomProperties: 3,
  9753. saveCustomProperties: 4,
  9754. ewsRequest: 5,
  9755. displayNewAppointmentForm: 7,
  9756. displayMessageForm: 8,
  9757. displayAppointmentForm: 9,
  9758. displayReplyForm: 10,
  9759. displayReplyAllForm: 11,
  9760. getCallbackToken: 12,
  9761. bodySetSelectedDataAsync: 13,
  9762. getBodyTypeAsync: 14,
  9763. getRecipientsAsync: 15,
  9764. addFileAttachmentAsync: 16,
  9765. setSubjectAsync: 17,
  9766. getSubjectAsync: 18,
  9767. addItemAttachmentAsync: 19,
  9768. removeAttachmentAsync: 20,
  9769. setRecipientsAsync: 21,
  9770. addRecipientsAsync: 22,
  9771. bodyPrependAsync: 23,
  9772. getTimeAsync: 24,
  9773. setTimeAsync: 25,
  9774. getLocationAsync: 26,
  9775. setLocationAsync: 27,
  9776. getSelectedDataAsync: 28,
  9777. setSelectedDataAsync: 29,
  9778. displayReplyFormWithAttachments: 30,
  9779. displayReplyAllFormWithAttachments: 31,
  9780. saveAsync: 32,
  9781. addNotficationMessageAsync: 33,
  9782. getAllNotficationMessagesAsync: 34,
  9783. replaceNotficationMessageAsync: 35,
  9784. removeNotficationMessageAsync: 36,
  9785. getBodyAsync: 37,
  9786. setBodyAsync: 38,
  9787. appCommands1: 39,
  9788. registerConsentAsync: 40,
  9789. close: 41,
  9790. closeApp: 42,
  9791. displayPersonaCardAsync: 43,
  9792. displayNewMessageForm: 44,
  9793. navigateToModuleAsync: 45,
  9794. eventCompleted: 94,
  9795. closeContainer: 97,
  9796. messageParent: 144,
  9797. trackCtq: 400,
  9798. recordTrace: 401,
  9799. recordDataPoint: 402,
  9800. windowOpenOverrideHandler: 403,
  9801. saveSettingsRequest: 404
  9802. };
  9803. $h.OutlookDispid["registerEnum"]("$h.2",false);
  9804. $h.RequestState=function(){};
  9805. $h.RequestState.prototype={
  9806. unsent: 0,
  9807. opened: 1,
  9808. headersReceived: 2,
  9809. loading: 3,
  9810. done: 4
  9811. };
  9812. $h.RequestState["registerEnum"]("$h.3",false);
  9813. $h.CommonParameters=function(options, callback, asyncContext)
  9814. {
  9815. this._options$p$0=options;
  9816. this._callback$p$0=callback;
  9817. this._asyncContext$p$0=asyncContext
  9818. };
  9819. $h.CommonParameters.parse=function(args, isCallbackRequired, tryLegacy)
  9820. {
  9821. var legacyParameters;
  9822. var $$t_8,
  9823. $$t_9;
  9824. if(tryLegacy && ($$t_9=$h.CommonParameters._tryParseLegacy$p(args,$$t_8={val: legacyParameters}),legacyParameters=$$t_8["val"],$$t_9))
  9825. return legacyParameters;
  9826. var argsLength=args["length"];
  9827. var options=null;
  9828. var callback=null;
  9829. var asyncContext=null;
  9830. if(argsLength===1)
  9831. if(Function["isInstanceOfType"](args[0]))
  9832. callback=args[0];
  9833. else if(Object["isInstanceOfType"](args[0]))
  9834. options=args[0];
  9835. else
  9836. throw Error.argumentType();
  9837. else if(argsLength===2)
  9838. {
  9839. if(!Object["isInstanceOfType"](args[0]))
  9840. throw Error.argument("options");
  9841. if(!Function["isInstanceOfType"](args[1]))
  9842. throw Error.argument("callback");
  9843. options=args[0];
  9844. callback=args[1]
  9845. }
  9846. else if(argsLength)
  9847. throw Error.parameterCount(window["_u"]["ExtensibilityStrings"]["l_ParametersNotAsExpected_Text"]);
  9848. if(isCallbackRequired && !callback)
  9849. throw Error.argumentNull("callback");
  9850. if(options && !$h.ScriptHelpers.isNullOrUndefined(options["asyncContext"]))
  9851. asyncContext=options["asyncContext"];
  9852. return new $h.CommonParameters(options,callback,asyncContext)
  9853. };
  9854. $h.CommonParameters._tryParseLegacy$p=function(args, commonParameters)
  9855. {
  9856. commonParameters["val"]=null;
  9857. var argsLength=args["length"];
  9858. var callback=null;
  9859. var userContext=null;
  9860. if(!argsLength || argsLength > 2)
  9861. return false;
  9862. if(!Function["isInstanceOfType"](args[0]))
  9863. return false;
  9864. callback=args[0];
  9865. if(argsLength > 1)
  9866. userContext=args[1];
  9867. commonParameters["val"]=new $h.CommonParameters(null,callback,userContext);
  9868. return true
  9869. };
  9870. $h.CommonParameters.prototype={
  9871. _options$p$0: null,
  9872. _callback$p$0: null,
  9873. _asyncContext$p$0: null,
  9874. get_options: function()
  9875. {
  9876. return this._options$p$0
  9877. },
  9878. get_callback: function()
  9879. {
  9880. return this._callback$p$0
  9881. },
  9882. get_asyncContext: function()
  9883. {
  9884. return this._asyncContext$p$0
  9885. }
  9886. };
  9887. $h.EwsRequest=function(userContext)
  9888. {
  9889. $h.EwsRequest["initializeBase"](this,[userContext])
  9890. };
  9891. $h.EwsRequest.prototype={
  9892. readyState: 1,
  9893. status: 0,
  9894. statusText: null,
  9895. onreadystatechange: null,
  9896. responseText: null,
  9897. get__statusCode$i$1: function()
  9898. {
  9899. return this.status
  9900. },
  9901. set__statusCode$i$1: function(value)
  9902. {
  9903. this.status=value;
  9904. return value
  9905. },
  9906. get__statusDescription$i$1: function()
  9907. {
  9908. return this.statusText
  9909. },
  9910. set__statusDescription$i$1: function(value)
  9911. {
  9912. this.statusText=value;
  9913. return value
  9914. },
  9915. get__requestState$i$1: function()
  9916. {
  9917. return this.readyState
  9918. },
  9919. set__requestState$i$1: function(value)
  9920. {
  9921. this.readyState=value;
  9922. return value
  9923. },
  9924. get_hasOnReadyStateChangeCallback: function()
  9925. {
  9926. return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)
  9927. },
  9928. get__response$i$1: function()
  9929. {
  9930. return this.responseText
  9931. },
  9932. set__response$i$1: function(value)
  9933. {
  9934. this.responseText=value;
  9935. return value
  9936. },
  9937. send: function(data)
  9938. {
  9939. this._checkSendConditions$i$1();
  9940. if($h.ScriptHelpers.isNullOrUndefined(data))
  9941. this._throwInvalidStateException$i$1();
  9942. this._sendRequest$i$0(5,"EwsRequest",{body: data})
  9943. },
  9944. _callOnReadyStateChangeCallback$i$1: function()
  9945. {
  9946. if(!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange))
  9947. this.onreadystatechange()
  9948. },
  9949. _parseExtraResponseData$i$1: function(response){},
  9950. executeExtraFailedResponseSteps: function(){}
  9951. };
  9952. $h.InitialData=function(data)
  9953. {
  9954. this._data$p$0=data;
  9955. this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()
  9956. };
  9957. $h.InitialData._defineReadOnlyProperty$i=function(o, methodName, getter)
  9958. {
  9959. var propertyDescriptor={
  9960. get: getter,
  9961. configurable: false
  9962. };
  9963. window["Object"]["defineProperty"](o,methodName,propertyDescriptor)
  9964. };
  9965. $h.InitialData.prototype={
  9966. _toRecipients$p$0: null,
  9967. _ccRecipients$p$0: null,
  9968. _attachments$p$0: null,
  9969. _resources$p$0: null,
  9970. _entities$p$0: null,
  9971. _selectedEntities$p$0: null,
  9972. _data$p$0: null,
  9973. _permissionLevel$p$0: 0,
  9974. get__isRestIdSupported$i$0: function()
  9975. {
  9976. return this._data$p$0["isRestIdSupported"]
  9977. },
  9978. get__itemId$i$0: function()
  9979. {
  9980. return this._data$p$0["id"]
  9981. },
  9982. get__itemClass$i$0: function()
  9983. {
  9984. return this._data$p$0["itemClass"]
  9985. },
  9986. get__dateTimeCreated$i$0: function()
  9987. {
  9988. return new Date(this._data$p$0["dateTimeCreated"])
  9989. },
  9990. get__dateTimeModified$i$0: function()
  9991. {
  9992. return new Date(this._data$p$0["dateTimeModified"])
  9993. },
  9994. get__dateTimeSent$i$0: function()
  9995. {
  9996. return new Date(this._data$p$0["dateTimeSent"])
  9997. },
  9998. get__subject$i$0: function()
  9999. {
  10000. this._throwOnRestrictedPermissionLevel$i$0();
  10001. return this._data$p$0["subject"]
  10002. },
  10003. get__normalizedSubject$i$0: function()
  10004. {
  10005. this._throwOnRestrictedPermissionLevel$i$0();
  10006. return this._data$p$0["normalizedSubject"]
  10007. },
  10008. get__internetMessageId$i$0: function()
  10009. {
  10010. return this._data$p$0["internetMessageId"]
  10011. },
  10012. get__conversationId$i$0: function()
  10013. {
  10014. return this._data$p$0["conversationId"]
  10015. },
  10016. get__sender$i$0: function()
  10017. {
  10018. this._throwOnRestrictedPermissionLevel$i$0();
  10019. var sender=this._data$p$0["sender"];
  10020. return $h.ScriptHelpers.isNullOrUndefined(sender) ? null : new $h.EmailAddressDetails(sender)
  10021. },
  10022. get__from$i$0: function()
  10023. {
  10024. this._throwOnRestrictedPermissionLevel$i$0();
  10025. var from=this._data$p$0["from"];
  10026. return $h.ScriptHelpers.isNullOrUndefined(from) ? null : new $h.EmailAddressDetails(from)
  10027. },
  10028. get__to$i$0: function()
  10029. {
  10030. this._throwOnRestrictedPermissionLevel$i$0();
  10031. if(null===this._toRecipients$p$0)
  10032. this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to");
  10033. return this._toRecipients$p$0
  10034. },
  10035. get__cc$i$0: function()
  10036. {
  10037. this._throwOnRestrictedPermissionLevel$i$0();
  10038. if(null===this._ccRecipients$p$0)
  10039. this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc");
  10040. return this._ccRecipients$p$0
  10041. },
  10042. get__attachments$i$0: function()
  10043. {
  10044. this._throwOnRestrictedPermissionLevel$i$0();
  10045. if(null===this._attachments$p$0)
  10046. this._attachments$p$0=this._createAttachmentDetails$p$0();
  10047. return this._attachments$p$0
  10048. },
  10049. get__ewsUrl$i$0: function()
  10050. {
  10051. return this._data$p$0["ewsUrl"]
  10052. },
  10053. get__restUrl$i$0: function()
  10054. {
  10055. return this._data$p$0["restUrl"]
  10056. },
  10057. get__marketplaceAssetId$i$0: function()
  10058. {
  10059. return this._data$p$0["marketplaceAssetId"]
  10060. },
  10061. get__extensionId$i$0: function()
  10062. {
  10063. return this._data$p$0["extensionId"]
  10064. },
  10065. get__marketplaceContentMarket$i$0: function()
  10066. {
  10067. return this._data$p$0["marketplaceContentMarket"]
  10068. },
  10069. get__consentMetadata$i$0: function()
  10070. {
  10071. return this._data$p$0["consentMetadata"]
  10072. },
  10073. get__isRead$i$0: function()
  10074. {
  10075. return this._data$p$0["isRead"]
  10076. },
  10077. get__endNodeUrl$i$0: function()
  10078. {
  10079. return this._data$p$0["endNodeUrl"]
  10080. },
  10081. get__entryPointUrl$i$0: function()
  10082. {
  10083. return this._data$p$0["entryPointUrl"]
  10084. },
  10085. get__start$i$0: function()
  10086. {
  10087. return new Date(this._data$p$0["start"])
  10088. },
  10089. get__end$i$0: function()
  10090. {
  10091. return new Date(this._data$p$0["end"])
  10092. },
  10093. get__location$i$0: function()
  10094. {
  10095. return this._data$p$0["location"]
  10096. },
  10097. get__userProfileType$i$0: function()
  10098. {
  10099. return this._data$p$0["userProfileType"]
  10100. },
  10101. get__resources$i$0: function()
  10102. {
  10103. this._throwOnRestrictedPermissionLevel$i$0();
  10104. if(null===this._resources$p$0)
  10105. this._resources$p$0=this._createEmailAddressDetails$p$0("resources");
  10106. return this._resources$p$0
  10107. },
  10108. get__organizer$i$0: function()
  10109. {
  10110. this._throwOnRestrictedPermissionLevel$i$0();
  10111. var organizer=this._data$p$0["organizer"];
  10112. return $h.ScriptHelpers.isNullOrUndefined(organizer) ? null : new $h.EmailAddressDetails(organizer)
  10113. },
  10114. get__userDisplayName$i$0: function()
  10115. {
  10116. return this._data$p$0["userDisplayName"]
  10117. },
  10118. get__userEmailAddress$i$0: function()
  10119. {
  10120. return this._data$p$0["userEmailAddress"]
  10121. },
  10122. get__userTimeZone$i$0: function()
  10123. {
  10124. return this._data$p$0["userTimeZone"]
  10125. },
  10126. get__timeZoneOffsets$i$0: function()
  10127. {
  10128. return this._data$p$0["timeZoneOffsets"]
  10129. },
  10130. get__hostVersion$i$0: function()
  10131. {
  10132. return this._data$p$0["hostVersion"]
  10133. },
  10134. get__owaView$i$0: function()
  10135. {
  10136. return this._data$p$0["owaView"]
  10137. },
  10138. get__overrideWindowOpen$i$0: function()
  10139. {
  10140. return this._data$p$0["overrideWindowOpen"]
  10141. },
  10142. _getEntities$i$0: function()
  10143. {
  10144. if(!this._entities$p$0)
  10145. this._entities$p$0=new $h.Entities(this._data$p$0["entities"],this._data$p$0["filteredEntities"],this.get__dateTimeSent$i$0(),this._permissionLevel$p$0);
  10146. return this._entities$p$0
  10147. },
  10148. _getSelectedEntities$i$0: function()
  10149. {
  10150. if(!this._selectedEntities$p$0)
  10151. this._selectedEntities$p$0=new $h.Entities(this._data$p$0["selectedEntities"],null,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0);
  10152. return this._selectedEntities$p$0
  10153. },
  10154. _getEntitiesByType$i$0: function(entityType)
  10155. {
  10156. var entites=this._getEntities$i$0();
  10157. return entites._getByType$i$0(entityType)
  10158. },
  10159. _getFilteredEntitiesByName$i$0: function(name)
  10160. {
  10161. var entities=this._getEntities$i$0();
  10162. return entities._getFilteredEntitiesByName$i$0(name)
  10163. },
  10164. _getRegExMatches$i$0: function()
  10165. {
  10166. if(!this._data$p$0["regExMatches"])
  10167. return null;
  10168. return this._data$p$0["regExMatches"]
  10169. },
  10170. _getSelectedRegExMatches$i$0: function()
  10171. {
  10172. if(!this._data$p$0["selectedRegExMatches"])
  10173. return null;
  10174. return this._data$p$0["selectedRegExMatches"]
  10175. },
  10176. _getRegExMatchesByName$i$0: function(regexName)
  10177. {
  10178. var regexMatches=this._getRegExMatches$i$0();
  10179. if(!regexMatches || !regexMatches[regexName])
  10180. return null;
  10181. return regexMatches[regexName]
  10182. },
  10183. _throwOnRestrictedPermissionLevel$i$0: function()
  10184. {
  10185. window["OSF"]["DDA"]["OutlookAppOm"]._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)
  10186. },
  10187. _createEmailAddressDetails$p$0: function(key)
  10188. {
  10189. var to=this._data$p$0[key];
  10190. if($h.ScriptHelpers.isNullOrUndefined(to))
  10191. return[];
  10192. var recipients=[];
  10193. for(var i=0; i < to["length"]; i++)
  10194. if(!$h.ScriptHelpers.isNullOrUndefined(to[i]))
  10195. recipients[i]=new $h.EmailAddressDetails(to[i]);
  10196. return recipients
  10197. },
  10198. _createAttachmentDetails$p$0: function()
  10199. {
  10200. var attachments=this._data$p$0["attachments"];
  10201. if($h.ScriptHelpers.isNullOrUndefined(attachments))
  10202. return[];
  10203. var attachmentDetails=[];
  10204. for(var i=0; i < attachments["length"]; i++)
  10205. if(!$h.ScriptHelpers.isNullOrUndefined(attachments[i]))
  10206. attachmentDetails[i]=new $h.AttachmentDetails(attachments[i]);
  10207. return attachmentDetails
  10208. },
  10209. _calculatePermissionLevel$p$0: function()
  10210. {
  10211. var HostReadItem=1;
  10212. var HostReadWriteMailbox=2;
  10213. var HostReadWriteItem=3;
  10214. var permissionLevelFromHost=this._data$p$0["permissionLevel"];
  10215. if($h.ScriptHelpers.isUndefined(this._permissionLevel$p$0))
  10216. return 0;
  10217. switch(permissionLevelFromHost)
  10218. {
  10219. case HostReadItem:
  10220. return 1;
  10221. case HostReadWriteItem:
  10222. return 2;
  10223. case HostReadWriteMailbox:
  10224. return 3;
  10225. default:
  10226. return 0
  10227. }
  10228. }
  10229. };
  10230. $h._loadDictionaryRequest=function(createResultObject, dictionaryName, callback, userContext)
  10231. {
  10232. $h._loadDictionaryRequest["initializeBase"](this,[userContext]);
  10233. this._createResultObject$p$1=createResultObject;
  10234. this._dictionaryName$p$1=dictionaryName;
  10235. this._callback$p$1=callback
  10236. };
  10237. $h._loadDictionaryRequest.prototype={
  10238. _dictionaryName$p$1: null,
  10239. _createResultObject$p$1: null,
  10240. _callback$p$1: null,
  10241. handleResponse: function(response)
  10242. {
  10243. if(response["wasSuccessful"])
  10244. {
  10245. var value=response[this._dictionaryName$p$1];
  10246. var responseData=window["JSON"]["parse"](value);
  10247. this.createAsyncResult(this._createResultObject$p$1(responseData),0,0,null)
  10248. }
  10249. else
  10250. this.createAsyncResult(null,1,9020,response["errorMessage"]);
  10251. this._callback$p$1(this._asyncResult$p$0)
  10252. }
  10253. };
  10254. $h.ProxyRequestBase=function(userContext)
  10255. {
  10256. $h.ProxyRequestBase["initializeBase"](this,[userContext])
  10257. };
  10258. $h.ProxyRequestBase.prototype={
  10259. handleResponse: function(response)
  10260. {
  10261. if(!response["wasProxySuccessful"])
  10262. {
  10263. this.set__statusCode$i$1(500);
  10264. this.set__statusDescription$i$1("Error");
  10265. var errorMessage=response["errorMessage"];
  10266. this.set__response$i$1(errorMessage);
  10267. this.createAsyncResult(null,1,9020,errorMessage)
  10268. }
  10269. else
  10270. {
  10271. this.set__statusCode$i$1(response["statusCode"]);
  10272. this.set__statusDescription$i$1(response["statusDescription"]);
  10273. this.set__response$i$1(response["body"]);
  10274. this.createAsyncResult(this.get__response$i$1(),0,0,null)
  10275. }
  10276. this._parseExtraResponseData$i$1(response);
  10277. this._cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1()
  10278. },
  10279. _throwInvalidStateException$i$1: function()
  10280. {
  10281. throw Error.create("DOMException",{
  10282. code: 11,
  10283. message: "INVALID_STATE_ERR"
  10284. });
  10285. },
  10286. _cycleReadyStateFromHeadersReceivedToLoadingToDone$i$1: function()
  10287. {
  10288. var $$t_0=this;
  10289. this._changeReadyState$i$1(2,function()
  10290. {
  10291. $$t_0._changeReadyState$i$1(3,function()
  10292. {
  10293. $$t_0._changeReadyState$i$1(4,null)
  10294. })
  10295. })
  10296. },
  10297. _changeReadyState$i$1: function(state, nextStep)
  10298. {
  10299. this.set__requestState$i$1(state);
  10300. var $$t_2=this;
  10301. window.setTimeout(function()
  10302. {
  10303. try
  10304. {
  10305. $$t_2._callOnReadyStateChangeCallback$i$1()
  10306. }
  10307. finally
  10308. {
  10309. if(!$h.ScriptHelpers.isNullOrUndefined(nextStep))
  10310. nextStep()
  10311. }
  10312. },0)
  10313. },
  10314. _checkSendConditions$i$1: function()
  10315. {
  10316. if(this.get__requestState$i$1() !==1)
  10317. this._throwInvalidStateException$i$1();
  10318. if(this._isSent$p$0)
  10319. this._throwInvalidStateException$i$1()
  10320. }
  10321. };
  10322. $h.RequestBase=function(userContext)
  10323. {
  10324. this._userContext$p$0=userContext
  10325. };
  10326. $h.RequestBase.prototype={
  10327. _isSent$p$0: false,
  10328. _asyncResult$p$0: null,
  10329. _userContext$p$0: null,
  10330. get_asyncResult: function()
  10331. {
  10332. return this._asyncResult$p$0
  10333. },
  10334. _sendRequest$i$0: function(dispid, methodName, dataToSend)
  10335. {
  10336. this._isSent$p$0=true;
  10337. var $$t_5=this;
  10338. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.invokeHostMethod(dispid,dataToSend,function(resultCode, response)
  10339. {
  10340. if(resultCode)
  10341. $$t_5.createAsyncResult(null,1,9017,String.format(window["_u"]["ExtensibilityStrings"]["l_InternalProtocolError_Text"],resultCode));
  10342. else
  10343. $$t_5.handleResponse(response)
  10344. })
  10345. },
  10346. createAsyncResult: function(value, errorCode, detailedErrorCode, errorDescription)
  10347. {
  10348. this._asyncResult$p$0=window["OSF"]["DDA"]["OutlookAppOm"]._instance$p.createAsyncResult(value,errorCode,detailedErrorCode,this._userContext$p$0,errorDescription)
  10349. }
  10350. };
  10351. $h.SaveDictionaryRequest=function(callback, userContext)
  10352. {
  10353. $h.SaveDictionaryRequest["initializeBase"](this,[userContext]);
  10354. if(!$h.ScriptHelpers.isNullOrUndefined(callback))
  10355. this._callback$p$1=callback
  10356. };
  10357. $h.SaveDictionaryRequest.prototype={
  10358. _callback$p$1: null,
  10359. handleResponse: function(response)
  10360. {
  10361. if(response["wasSuccessful"])
  10362. this.createAsyncResult(null,0,0,null);
  10363. else
  10364. this.createAsyncResult(null,1,9020,response["errorMessage"]);
  10365. if(!$h.ScriptHelpers.isNullOrUndefined(this._callback$p$1))
  10366. this._callback$p$1(this._asyncResult$p$0)
  10367. }
  10368. };
  10369. $h.ScriptHelpers=function(){};
  10370. $h.ScriptHelpers.isNull=function(value)
  10371. {
  10372. return null===value
  10373. };
  10374. $h.ScriptHelpers.isNullOrUndefined=function(value)
  10375. {
  10376. return $h.ScriptHelpers.isNull(value) || $h.ScriptHelpers.isUndefined(value)
  10377. };
  10378. $h.ScriptHelpers.isUndefined=function(value)
  10379. {
  10380. return value===undefined
  10381. };
  10382. $h.ScriptHelpers.dictionaryContainsKey=function(obj, keyName)
  10383. {
  10384. return Object["isInstanceOfType"](obj) ? keyName in obj : false
  10385. };
  10386. $h.ScriptHelpers.isNonEmptyString=function(value)
  10387. {
  10388. if(!value)
  10389. return false;
  10390. return String["isInstanceOfType"](value)
  10391. };
  10392. $h.ScriptHelpers.deepClone=function(obj)
  10393. {
  10394. return window["JSON"]["parse"](window["JSON"]["stringify"](obj))
  10395. };
  10396. $h.ScriptHelpers.isValueTrue=function(value)
  10397. {
  10398. if(!$h.ScriptHelpers.isNullOrUndefined(value))
  10399. return value["toString"]().toLowerCase()==="true";
  10400. return false
  10401. };
  10402. window["OSF"]["DDA"]["OutlookAppOm"]["registerClass"]("OSF.DDA.OutlookAppOm");
  10403. window["OSF"]["DDA"]["Settings"]["registerClass"]("OSF.DDA.Settings");
  10404. $h.AdditionalGlobalParameters["registerClass"]("$h.4");
  10405. $h.ItemBase["registerClass"]("$h.5");
  10406. $h.Item["registerClass"]("$h.6",$h.ItemBase);
  10407. $h.Appointment["registerClass"]("$h.7",$h.Item);
  10408. $h.ComposeItem["registerClass"]("$h.8",$h.ItemBase);
  10409. $h.AppointmentCompose["registerClass"]("$h.9",$h.ComposeItem);
  10410. $h.AttachmentDetails["registerClass"]("$h.A");
  10411. $h.Body["registerClass"]("$h.B");
  10412. $h.ComposeBody["registerClass"]("$h.C",$h.Body);
  10413. $h.ComposeRecipient["registerClass"]("$h.D");
  10414. $h.ComposeLocation["registerClass"]("$h.E");
  10415. $h.ComposeSubject["registerClass"]("$h.F");
  10416. $h.ComposeTime["registerClass"]("$h.G");
  10417. $h.Contact["registerClass"]("$h.H");
  10418. $h.CustomProperties["registerClass"]("$h.I");
  10419. $h.Diagnostics["registerClass"]("$h.J");
  10420. $h.EmailAddressDetails["registerClass"]("$h.K");
  10421. $h.Entities["registerClass"]("$h.L");
  10422. $h.Message["registerClass"]("$h.M",$h.Item);
  10423. $h.MeetingRequest["registerClass"]("$h.N",$h.Message);
  10424. $h.MeetingSuggestion["registerClass"]("$h.O");
  10425. $h._extractedDate["registerClass"]("$h.P");
  10426. $h._preciseDate["registerClass"]("$h.Q",$h._extractedDate);
  10427. $h._relativeDate["registerClass"]("$h.R",$h._extractedDate);
  10428. $h.MessageCompose["registerClass"]("$h.S",$h.ComposeItem);
  10429. $h.NotificationMessages["registerClass"]("$h.T");
  10430. $h.PhoneNumber["registerClass"]("$h.U");
  10431. $h.TaskSuggestion["registerClass"]("$h.V");
  10432. $h.UserProfile["registerClass"]("$h.W");
  10433. $h.CommonParameters["registerClass"]("$h.X");
  10434. $h.RequestBase["registerClass"]("$h.Y");
  10435. $h.ProxyRequestBase["registerClass"]("$h.Z",$h.RequestBase);
  10436. $h.EwsRequest["registerClass"]("$h.a",$h.ProxyRequestBase);
  10437. $h.InitialData["registerClass"]("$h.b");
  10438. $h._loadDictionaryRequest["registerClass"]("$h.c",$h.RequestBase);
  10439. $h.SaveDictionaryRequest["registerClass"]("$h.d",$h.RequestBase);
  10440. window["OSF"]["DDA"]["OutlookAppOm"].asyncMethodTimeoutKeyName="__timeout__";
  10441. window["OSF"]["DDA"]["OutlookAppOm"].ewsIdOrEmailParamName="ewsIdOrEmail";
  10442. window["OSF"]["DDA"]["OutlookAppOm"].moduleParamName="module";
  10443. window["OSF"]["DDA"]["OutlookAppOm"].queryStringParamName="queryString";
  10444. window["OSF"]["DDA"]["OutlookAppOm"]._maxRecipients$p=100;
  10445. window["OSF"]["DDA"]["OutlookAppOm"]._maxSubjectLength$p=255;
  10446. window["OSF"]["DDA"]["OutlookAppOm"].maxBodyLength=32768;
  10447. window["OSF"]["DDA"]["OutlookAppOm"]._maxLocationLength$p=255;
  10448. window["OSF"]["DDA"]["OutlookAppOm"]._maxEwsRequestSize$p=1e6;
  10449. window["OSF"]["DDA"]["OutlookAppOm"].executeMethodName="ExecuteMethod";
  10450. window["OSF"]["DDA"]["OutlookAppOm"].getInitialDataMethodName="GetInitialData";
  10451. window["OSF"]["DDA"]["OutlookAppOm"].itemIdParameterName="itemId";
  10452. window["OSF"]["DDA"]["OutlookAppOm"].restVersionParameterName="restVersion";
  10453. window["OSF"]["DDA"]["OutlookAppOm"]._instance$p=null;
  10454. $h.AdditionalGlobalParameters.itemNumberKey="itemNumber";
  10455. $h.AttachmentConstants.maxAttachmentNameLength=255;
  10456. $h.AttachmentConstants.maxUrlLength=2048;
  10457. $h.AttachmentConstants.maxItemIdLength=200;
  10458. $h.AttachmentConstants.maxRemoveIdLength=200;
  10459. $h.AttachmentConstants.attachmentParameterName="attachments";
  10460. $h.AttachmentConstants.attachmentTypeParameterName="type";
  10461. $h.AttachmentConstants.attachmentUrlParameterName="url";
  10462. $h.AttachmentConstants.attachmentItemIdParameterName="itemId";
  10463. $h.AttachmentConstants.attachmentNameParameterName="name";
  10464. $h.AttachmentConstants.attachmentIsInlineParameterName="isInline";
  10465. $h.AttachmentConstants.attachmentTypeFileName="file";
  10466. $h.AttachmentConstants.attachmentTypeItemName="item";
  10467. $h.AttachmentDetails._attachmentTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["File"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Item"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["AttachmentType"]["Cloud"]];
  10468. $h.Body.coercionTypeParameterName="coercionType";
  10469. $h.ComposeRecipient.displayNameLengthLimit=255;
  10470. $h.ComposeRecipient.maxSmtpLength=571;
  10471. $h.ComposeRecipient.recipientsLimit=100;
  10472. $h.ComposeRecipient.totalRecipientsLimit=500;
  10473. $h.ComposeRecipient.addressParameterName="address";
  10474. $h.ComposeRecipient.nameParameterName="name";
  10475. $h.ComposeLocation.locationKey="location";
  10476. $h.ComposeLocation.maximumLocationLength=255;
  10477. $h.ComposeSubject.maximumSubjectLength=255;
  10478. $h.ComposeTime.timeTypeName="TimeProperty";
  10479. $h.ComposeTime.timeDataName="time";
  10480. $h.Diagnostics.outlookAppName="Outlook";
  10481. $h.Diagnostics.outlookWebAppName="OutlookWebApp";
  10482. $h.Diagnostics.outlookIOSAppName="OutlookIOS";
  10483. $h.Diagnostics.outlookAndroidAppName="OutlookAndroid";
  10484. $h.EmailAddressDetails._emptyString$p="";
  10485. $h.EmailAddressDetails._responseTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["None"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Organizer"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Tentative"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Accepted"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["ResponseType"]["Declined"]];
  10486. $h.EmailAddressDetails._recipientTypeMap$p=[window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["Other"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["DistributionList"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["User"],window["Microsoft"]["Office"]["WebExtension"]["MailboxEnums"]["RecipientType"]["ExternalUser"]];
  10487. $h.Entities._allEntityKeys$p=["Addresses","EmailAddresses","Urls","PhoneNumbers","TaskSuggestions","MeetingSuggestions","Contacts","FlightReservations","ParcelDeliveries"];
  10488. $h.ReplyConstants.htmlBodyKeyName="htmlBody";
  10489. $h.AsyncConstants.optionsKeyName="options";
  10490. $h.AsyncConstants.callbackKeyName="callback";
  10491. $h.AsyncConstants.asyncResultKeyName="asyncResult";
  10492. $h.MeetingSuggestionTimeDecoder._baseDate$p=new Date("0001-01-01T00:00:00Z");
  10493. $h.NotificationMessages.maximumKeyLength=32;
  10494. $h.NotificationMessages.maximumIconLength=32;
  10495. $h.NotificationMessages.maximumMessageLength=150;
  10496. $h.NotificationMessages.notificationsKeyParameterName="key";
  10497. $h.NotificationMessages.notificationsTypeParameterName="type";
  10498. $h.NotificationMessages.notificationsIconParameterName="icon";
  10499. $h.NotificationMessages.notificationsMessageParameterName="message";
  10500. $h.NotificationMessages.notificationsPersistentParameterName="persistent";
  10501. $h.OutlookErrorManager.errorNameKey="name";
  10502. $h.OutlookErrorManager.errorMessageKey="message";
  10503. $h.OutlookErrorManager._isInitialized$p=false;
  10504. $h.OutlookErrorManager.OutlookErrorCodes.attachmentSizeExceeded=9e3;
  10505. $h.OutlookErrorManager.OutlookErrorCodes.numberOfAttachmentsExceeded=9001;
  10506. $h.OutlookErrorManager.OutlookErrorCodes.internalFormatError=9002;
  10507. $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentId=9003;
  10508. $h.OutlookErrorManager.OutlookErrorCodes.invalidAttachmentPath=9004;
  10509. $h.OutlookErrorManager.OutlookErrorCodes.cannotAddAttachmentBeforeUpgrade=9005;
  10510. $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeletedBeforeUploadCompletes=9006;
  10511. $h.OutlookErrorManager.OutlookErrorCodes.attachmentUploadGeneralFailure=9007;
  10512. $h.OutlookErrorManager.OutlookErrorCodes.attachmentToDeleteDoesNotExist=9008;
  10513. $h.OutlookErrorManager.OutlookErrorCodes.attachmentDeleteGeneralFailure=9009;
  10514. $h.OutlookErrorManager.OutlookErrorCodes.invalidEndTime=9010;
  10515. $h.OutlookErrorManager.OutlookErrorCodes.htmlSanitizationFailure=9011;
  10516. $h.OutlookErrorManager.OutlookErrorCodes.numberOfRecipientsExceeded=9012;
  10517. $h.OutlookErrorManager.OutlookErrorCodes.noValidRecipientsProvided=9013;
  10518. $h.OutlookErrorManager.OutlookErrorCodes.cursorPositionChanged=9014;
  10519. $h.OutlookErrorManager.OutlookErrorCodes.invalidSelection=9016;
  10520. $h.OutlookErrorManager.OutlookErrorCodes.accessRestricted=9017;
  10521. $h.OutlookErrorManager.OutlookErrorCodes.genericTokenError=9018;
  10522. $h.OutlookErrorManager.OutlookErrorCodes.genericSettingsError=9019;
  10523. $h.OutlookErrorManager.OutlookErrorCodes.genericResponseError=9020;
  10524. $h.OutlookErrorManager.OutlookErrorCodes.saveError=9021;
  10525. $h.OutlookErrorManager.OutlookErrorCodes.messageInDifferentStoreError=9022;
  10526. $h.OutlookErrorManager.OutlookErrorCodes.duplicateNotificationKey=9023;
  10527. $h.OutlookErrorManager.OutlookErrorCodes.notificationKeyNotFound=9024;
  10528. $h.OutlookErrorManager.OutlookErrorCodes.numberOfNotificationsExceeded=9025;
  10529. $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArrayReadError=9026;
  10530. $h.OutlookErrorManager.OutlookErrorCodes.persistedNotificationArraySaveError=9027;
  10531. $h.OutlookErrorManager.OutlookErrorCodes.cannotPersistPropertyInUnsavedDraftError=9028;
  10532. $h.OutlookErrorManager.OutlookErrorCodes.callSaveAsyncBeforeToken=9029;
  10533. $h.OutlookErrorManager.OutlookErrorCodes.ooeInvalidDataFormat=2006;
  10534. $h.OutlookErrorManager.OsfDdaErrorCodes.ooeCoercionTypeNotSupported=1e3;
  10535. $h.CommonParameters.asyncContextKeyName="asyncContext";
  10536. $h.InitialData.userProfileTypeKey="userProfileType";
  10537. $h.ScriptHelpers.emptyString="";
  10538. OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);
  10539. if(appContext.get_appName()==OSF.AppName.OutlookWebApp || appContext.get_appName()==OSF.AppName.OutlookIOS || appContext.get_appName()==OSF.AppName.OutlookAndroid)
  10540. this._settings=this._initializeSettings(appContext,false);
  10541. else
  10542. this._settings=this._initializeSettings(false);
  10543. appContext.appOM=new OSF.DDA.OutlookAppOm(appContext,this._webAppState.wnd,appReady);
  10544. if(appContext.get_appName()==OSF.AppName.Outlook || appContext.get_appName()==OSF.AppName.OutlookWebApp)
  10545. OSF.DDA.DispIdHost.addEventSupport(appContext.appOM,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.ItemChanged]))
  10546. }