@vc-shell/framework 1.1.43 → 1.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/core/plugins/modularity/loader.ts +120 -74
- package/core/services/app-bar-mobile-buttons-service.ts +1 -1
- package/dist/core/plugins/modularity/loader.d.ts.map +1 -1
- package/dist/core/services/app-bar-mobile-buttons-service.d.ts +1 -1
- package/dist/core/services/app-bar-mobile-buttons-service.d.ts.map +1 -1
- package/dist/framework.js +33347 -295
- package/dist/index.css +1 -9
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/locales/de.json +0 -84
- package/dist/locales/en.json +0 -84
- package/dist/shared/components/blade-navigation/components/vc-blade-navigation/_internal/vc-mobile-back-button.vue.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts +1 -1
- package/dist/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.d.ts.map +1 -1
- package/dist/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeRouteResolver.d.ts.map +1 -1
- package/dist/shared/components/change-password-button/change-password-button.vue.d.ts.map +1 -1
- package/dist/shared/components/logout-button/logout-button.vue.d.ts.map +1 -1
- package/dist/shared/components/settings-menu-item/settings-menu-item.vue.d.ts.map +1 -1
- package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -2
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts +6 -6
- package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-hint/vc-hint.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/icons/MenuBurgerIcon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/icons/index.d.ts +0 -26
- package/dist/ui/components/atoms/vc-icon/icons/index.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-bootstrap-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-fontawesome-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts +0 -5
- package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-material-icon.vue.d.ts +0 -20
- package/dist/ui/components/atoms/vc-icon/vc-material-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue.d.ts +36 -0
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue.d.ts +17 -0
- package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue.d.ts.map +1 -0
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts +16 -2381
- package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-form/vc-form.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
- package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts +1 -1
- package/dist/ui/components/molecules/vc-pagination/vc-pagination.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/MenuSidebar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-gallery/vc-gallery.vue.d.ts +2 -2
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
- package/dist/ui/components/organisms/vc-table/_internal/vc-table-header/vc-table-header.vue.d.ts.map +1 -1
- package/dist/vendor-boolbase-Cp9L0GAZ.js +25 -0
- package/dist/vendor-cheerio-HN9zIPZn.js +3135 -0
- package/dist/vendor-cheerio-select-5Ry0HvBq.js +306 -0
- package/dist/vendor-core-js-l0sNRNKZ.js +1 -0
- package/dist/vendor-css-select-DRIZ9kfZ.js +966 -0
- package/dist/vendor-css-what-DuPJ1HEF.js +448 -0
- package/dist/vendor-cypress-signalr-mock-BKdBJpdt.js +778 -0
- package/dist/vendor-date-fns-515YWkk-.js +6724 -0
- package/dist/vendor-dom-serializer-nQMsqjYW.js +286 -0
- package/dist/vendor-dom7-CJLPMwy5.js +941 -0
- package/dist/vendor-domelementtype-CjSzQey5.js +53 -0
- package/dist/vendor-domhandler-9z8cS16a.js +484 -0
- package/dist/vendor-dompurify-CRFzu7ib.js +1336 -0
- package/dist/vendor-domutils-Bc-Opz-v.js +981 -0
- package/dist/vendor-entities-Bfsx4xOQ.js +636 -0
- package/dist/vendor-floating-ui-core-wV8u8QP4.js +511 -0
- package/dist/vendor-floating-ui-dom-DDnRPs17.js +706 -0
- package/dist/vendor-floating-ui-utils-OMIFy1QU.js +296 -0
- package/dist/vendor-floating-ui-vue-D-tCDAMm.js +167 -0
- package/dist/vendor-fontsource-plus-jakarta-sans.css +1 -0
- package/dist/vendor-headlessui-vue-CY9FRgTb.js +83 -0
- package/dist/vendor-htmlparser2-B1dhFPOs.js +1426 -0
- package/dist/vendor-iconify-vue-DfRGgyNu.js +1840 -0
- package/dist/vendor-intlify-core-base-BuknsFQe.js +1876 -0
- package/dist/vendor-intlify-message-compiler-CuOQDWx1.js +1508 -0
- package/dist/vendor-intlify-shared-Cz4YRMuC.js +241 -0
- package/dist/vendor-iso-639-1-BJCk9DvE.js +819 -0
- package/dist/vendor-linkify-it-CKUf4vsc.js +830 -0
- package/dist/vendor-linkifyjs-BfyGgbCh.js +1756 -0
- package/dist/vendor-lodash-es-BySUOlwf.js +18333 -0
- package/dist/vendor-markdown-it-D-apazHa.js +6000 -0
- package/dist/vendor-markdown-it-task-lists-rxMVH6Ku.js +131 -0
- package/dist/vendor-mdurl-BNh2CCgT.js +537 -0
- package/dist/vendor-microsoft-applicationinsights-analytics-js-kG3lLg8X.js +1275 -0
- package/dist/vendor-microsoft-applicationinsights-cfgsync-js-C0uQkiQq.js +591 -0
- package/dist/vendor-microsoft-applicationinsights-channel-js-Dyd_PXA3.js +2153 -0
- package/dist/vendor-microsoft-applicationinsights-common-CfmP1_Qr.js +2470 -0
- package/dist/vendor-microsoft-applicationinsights-core-js-Cq4YSEvZ.js +6589 -0
- package/dist/vendor-microsoft-applicationinsights-dependencies-js-C56OBFr4.js +1510 -0
- package/dist/vendor-microsoft-applicationinsights-properties-js-CBJTBawx.js +761 -0
- package/dist/vendor-microsoft-applicationinsights-shims-CX8sJgar.js +70 -0
- package/dist/vendor-microsoft-applicationinsights-web-pim2ri-g.js +667 -0
- package/dist/vendor-microsoft-dynamicproto-js-CFBBUu9p.js +520 -0
- package/dist/vendor-microsoft-signalr-dUnlRsGm.js +3339 -0
- package/dist/vendor-moment-Mki5YqAR.js +5679 -0
- package/dist/vendor-nevware21-ts-async-CLMApQ9E.js +395 -0
- package/dist/vendor-nevware21-ts-utils-e8v8Jty3.js +1160 -0
- package/dist/vendor-normalize-css.css +1 -0
- package/dist/vendor-nth-check-Bx8TxtJt.js +157 -0
- package/dist/vendor-orderedmap-dGG6uMFJ.js +137 -0
- package/dist/vendor-parse5-Bt2NhSzR.js +8432 -0
- package/dist/vendor-parse5-htmlparser2-tree-adapter-BUUtKzf8.js +216 -0
- package/dist/vendor-popperjs-core-Cr2byIky.js +1790 -0
- package/dist/vendor-prettier-B4PaeWRQ.js +98 -0
- package/dist/vendor-prosemirror-commands-BH9lWGpW.js +561 -0
- package/dist/vendor-prosemirror-dropcursor-CeyPcxrA.js +146 -0
- package/dist/vendor-prosemirror-gapcursor-U8UoUJII.js +236 -0
- package/dist/vendor-prosemirror-history-BDaJkvNx.js +414 -0
- package/dist/vendor-prosemirror-keymap-BbWvIWmH.js +128 -0
- package/dist/vendor-prosemirror-markdown-gB0PXBbz.js +866 -0
- package/dist/vendor-prosemirror-model-BZu3WVcD.js +3463 -0
- package/dist/vendor-prosemirror-schema-list-Bl9NpKA7.js +158 -0
- package/dist/vendor-prosemirror-state-BvL9Pxph.js +1003 -0
- package/dist/vendor-prosemirror-tables-17qAnviK.js +2159 -0
- package/dist/vendor-prosemirror-transform-CE9VV3qg.js +2156 -0
- package/dist/vendor-prosemirror-view-CU2WTHT7.js +5811 -0
- package/dist/vendor-punycode-js-iAs5RxMf.js +441 -0
- package/dist/vendor-rope-sequence-BdXDKoGt.js +207 -0
- package/dist/vendor-semver-CVLMK-S4.js +2702 -0
- package/dist/vendor-ssr-window-s6OpKa3O.js +150 -0
- package/dist/vendor-swiper-CdiyNHVt.js +5679 -0
- package/dist/vendor-swiper.css +1 -0
- package/dist/vendor-tanstack-virtual-core-l0sNRNKZ.js +1 -0
- package/dist/vendor-tanstack-vue-virtual-l0sNRNKZ.js +1 -0
- package/dist/vendor-tippy-js-DWFe2TfK.js +1647 -0
- package/dist/vendor-tiptap-core-NfwGfaQk.js +4910 -0
- package/dist/vendor-tiptap-extension-blockquote-jmWBTtsI.js +57 -0
- package/dist/vendor-tiptap-extension-bold-p5frh4ak.js +97 -0
- package/dist/vendor-tiptap-extension-bubble-menu-KUhZSfrs.js +218 -0
- package/dist/vendor-tiptap-extension-bullet-list-COmZRoSB.js +73 -0
- package/dist/vendor-tiptap-extension-code-block-DyTARZss.js +221 -0
- package/dist/vendor-tiptap-extension-code-jVv6CXpX.js +75 -0
- package/dist/vendor-tiptap-extension-document-DssuotYs.js +13 -0
- package/dist/vendor-tiptap-extension-dropcursor-BoO0Qv91.js +26 -0
- package/dist/vendor-tiptap-extension-floating-menu-CrO8CN5w.js +165 -0
- package/dist/vendor-tiptap-extension-gapcursor-KpsWEoMD.js +30 -0
- package/dist/vendor-tiptap-extension-hard-break-ldOzhSvf.js +68 -0
- package/dist/vendor-tiptap-extension-heading-CKz2llX0.js +77 -0
- package/dist/vendor-tiptap-extension-history-DeKZ2VQ9.js +48 -0
- package/dist/vendor-tiptap-extension-horizontal-rule-CAjWRyDS.js +92 -0
- package/dist/vendor-tiptap-extension-image-ZagcEYuk.js +76 -0
- package/dist/vendor-tiptap-extension-italic-CM4xdznY.js +96 -0
- package/dist/vendor-tiptap-extension-link-Z-AMC4Ri.js +414 -0
- package/dist/vendor-tiptap-extension-list-item-BJi5QpXc.js +37 -0
- package/dist/vendor-tiptap-extension-ordered-list-C_TMrfBE.js +97 -0
- package/dist/vendor-tiptap-extension-paragraph-CQw0E0Au.js +39 -0
- package/dist/vendor-tiptap-extension-placeholder-BBNVKfa_.js +66 -0
- package/dist/vendor-tiptap-extension-strike-DUyMYX1Z.js +79 -0
- package/dist/vendor-tiptap-extension-table-cell-CoDIMPA5.js +47 -0
- package/dist/vendor-tiptap-extension-table-header-DvbGHnmw.js +47 -0
- package/dist/vendor-tiptap-extension-table-row-D1uqN5Aj.js +26 -0
- package/dist/vendor-tiptap-extension-table-tKS4MOM4.js +354 -0
- package/dist/vendor-tiptap-extension-text-DtRBhKB2.js +12 -0
- package/dist/vendor-tiptap-extension-underline-DqaSFp_P.js +50 -0
- package/dist/vendor-tiptap-markdown-7-PCADTU.js +1017 -0
- package/dist/vendor-tiptap-pm-l0sNRNKZ.js +1 -0
- package/dist/vendor-tiptap-starter-kit-CDSV_Zuu.js +88 -0
- package/dist/vendor-tiptap-vue-3-DZg2fjq_.js +268 -0
- package/dist/vendor-truncate-html-3qQY0Djo.js +196 -0
- package/dist/vendor-uc-micro-jjt6LQ65.js +23 -0
- package/dist/vendor-vee-validate-i18n-v_gHjRmD.js +154 -0
- package/dist/vendor-vee-validate-rules-DzV3VY3N.js +536 -0
- package/dist/vendor-vue-currency-input-DGAkEFBO.js +545 -0
- package/dist/vendor-vue-demi-l0sNRNKZ.js +1 -0
- package/dist/vendor-vue-devtools-api-DXYR8qBG.js +169 -0
- package/dist/vendor-vue-i18n-Co752uk3.js +1897 -0
- package/dist/vendor-vue3-application-insights-CYWFCr_J.js +119 -0
- package/dist/vendor-vue3-touch-events-BJEAiSa3.js +416 -0
- package/dist/vendor-vuepic-vue-datepicker-BSWXRSiu.js +5019 -0
- package/dist/vendor-vuepic-vue-datepicker.css +1 -0
- package/dist/vendor-vueuse-components-l1bL12mE.js +339 -0
- package/dist/vendor-vueuse-core-DGcJOmwG.js +7743 -0
- package/dist/vendor-vueuse-shared-_mOXsFuM.js +1568 -0
- package/dist/vendor-w3c-keyname-BOm2dtJm.js +121 -0
- package/package.json +22 -11
- package/shared/components/blade-navigation/components/vc-blade-navigation/_internal/vc-mobile-back-button.vue +3 -3
- package/shared/components/blade-navigation/components/vc-blade-view/vc-blade-view.ts +2 -1
- package/shared/components/blade-navigation/composables/useBladeNavigation/internal/bladeRouteResolver.ts +1 -0
- package/shared/components/change-password-button/change-password-button.vue +1 -2
- package/shared/components/logout-button/logout-button.vue +1 -2
- package/shared/components/notifications/components/notification-container/index.ts +1 -1
- package/shared/components/notifications/core/notification.ts +1 -1
- package/shared/components/settings-menu-item/settings-menu-item.vue +1 -0
- package/shared/components/sidebar/sidebar.vue +2 -2
- package/shared/modules/dynamic/pages/dynamic-blade-list.vue +2 -1
- package/ui/components/atoms/vc-hint/vc-hint.vue +2 -0
- package/ui/components/atoms/vc-icon/composables/use-icon.ts +1 -1
- package/ui/components/atoms/vc-icon/icons/MenuBurgerIcon.vue +18 -14
- package/ui/components/atoms/vc-icon/icons/index.ts +1 -27
- package/ui/components/atoms/vc-icon/vc-bootstrap-icon.vue +7 -11
- package/ui/components/atoms/vc-icon/vc-fontawesome-icon.vue +37 -31
- package/ui/components/atoms/vc-icon/vc-icon-examples.vue +1 -1
- package/ui/components/atoms/vc-icon/vc-icon.stories.ts +4 -5
- package/ui/components/atoms/vc-icon/vc-icon.vue +33 -163
- package/ui/components/atoms/vc-icon/vc-lucide-icon.vue +22 -70
- package/ui/components/atoms/vc-icon/vc-material-icon.vue +28 -59
- package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +2 -3
- package/ui/components/molecules/vc-editor/_internal/vc-editor-button.vue +103 -0
- package/ui/components/molecules/vc-editor/_internal/vc-editor-toolbar.vue +252 -0
- package/ui/components/molecules/vc-editor/vc-editor.stories.ts +1 -4
- package/ui/components/molecules/vc-editor/vc-editor.vue +666 -360
- package/ui/components/molecules/vc-form/vc-form.vue +7 -5
- package/ui/components/molecules/vc-input/vc-input.vue +1 -1
- package/ui/components/molecules/vc-pagination/vc-pagination.vue +4 -17
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/AppBarMobileActions.vue +1 -1
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/_internal/MenuSidebar.vue +1 -3
- package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +1 -4
- package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +1 -3
- package/ui/components/organisms/vc-app/vc-app.backupsb.ts +214 -214
- package/ui/components/organisms/vc-app/vc-app.vue +3 -5
- package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +3 -10
- package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-buttons/mobile/vc-blade-toolbar-mobile.vue +1 -1
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue +2 -2
- package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue +2 -2
- package/ui/components/organisms/vc-blade/vc-blade.vue +4 -5
- package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +1 -3
- package/ui/components/organisms/vc-table/_internal/vc-table-header/vc-table-header.vue +1 -2
- package/ui/components/organisms/vc-table/composables/useTableState.ts +5 -5
- package/dist/apl-B2DGVGxc.js +0 -76
- package/dist/asciiarmor-2LVJmxlE.js +0 -34
- package/dist/asn1-jKiBa2Ya.js +0 -95
- package/dist/asterisk-DS281yxp.js +0 -271
- package/dist/brainfuck-C_p9pTT8.js +0 -34
- package/dist/clike-DGTaUp48.js +0 -620
- package/dist/clojure-CCKyeQKf.js +0 -800
- package/dist/cmake-CuaCgAKt.js +0 -28
- package/dist/cobol-BlTKFDRj.js +0 -72
- package/dist/coffeescript-BVCvwO8I.js +0 -179
- package/dist/commonlisp-D_kxz07b.js +0 -75
- package/dist/crystal-D309uH6_.js +0 -217
- package/dist/css-BkF-NPzE.js +0 -1553
- package/dist/cypher-BMq4Fwjl.js +0 -68
- package/dist/d-BZcgY6La.js +0 -127
- package/dist/diff-Cg9d_RX2.js +0 -18
- package/dist/dockerfile-DIy8NleC.js +0 -194
- package/dist/dtd-CtLokQ-U.js +0 -84
- package/dist/dylan-QYeExnWK.js +0 -234
- package/dist/ebnf-DUPDuY4r.js +0 -78
- package/dist/ecl-CiXN-g_D.js +0 -121
- package/dist/eiffel-yQhjl4T1.js +0 -110
- package/dist/elm-CNT9vbN0.js +0 -108
- package/dist/erlang-CFOYdy9e.js +0 -487
- package/dist/factor-DDOC7X6P.js +0 -65
- package/dist/fcl-CPC2WYrI.js +0 -103
- package/dist/forth-BmxRyE9S.js +0 -60
- package/dist/fortran-9bvPyrOW.js +0 -442
- package/dist/gas-cpmYfFX2.js +0 -183
- package/dist/gherkin-CJuwpceU.js +0 -34
- package/dist/groovy-DZeT_VM-.js +0 -146
- package/dist/haskell-Bvt3Qq1t.js +0 -375
- package/dist/haxe-70NVW1pR.js +0 -359
- package/dist/http-D9LttvKF.js +0 -44
- package/dist/idl-B6TRFYjl.js +0 -947
- package/dist/index-4DWvmoYg.js +0 -71
- package/dist/index-52o7mJaX.js +0 -156
- package/dist/index-B0KatioT.js +0 -98
- package/dist/index-BP3W8zuk.js +0 -268
- package/dist/index-BykT5L1A.js +0 -148134
- package/dist/index-CfXo9hsG.js +0 -75
- package/dist/index-Ch37pBUt.js +0 -308
- package/dist/index-D2KGkAYT.js +0 -93
- package/dist/index-D83zQom_.js +0 -58
- package/dist/index-DuQrVLbu.js +0 -134
- package/dist/index-_fdMid5h.js +0 -288
- package/dist/index-a1wO-owY.js +0 -545
- package/dist/index-crMpNSFe.js +0 -611
- package/dist/index-dmBRpHHY.js +0 -137
- package/dist/index-kBdB14Fz.js +0 -341
- package/dist/index-uBhy41le.js +0 -249
- package/dist/index-zZrijNsr.js +0 -299
- package/dist/javascript-C2yteZeJ.js +0 -691
- package/dist/jinja2-DnB6dQmV.js +0 -154
- package/dist/julia-DpvXAuO6.js +0 -241
- package/dist/livescript-CanGTf8u.js +0 -272
- package/dist/lua-XplVlWi_.js +0 -217
- package/dist/mathematica-jaRHnSxC.js +0 -35
- package/dist/mbox-BctzC1hL.js +0 -76
- package/dist/mirc-CFBPAOaF.js +0 -72
- package/dist/mllike-BSnXJBGA.js +0 -272
- package/dist/modelica-vUgVs--1.js +0 -93
- package/dist/mscgen-Cpl0NYLN.js +0 -104
- package/dist/mumps-CQoS1kWX.js +0 -25
- package/dist/nginx-zDPm3Z74.js +0 -89
- package/dist/nsis-fePjrhq7.js +0 -62
- package/dist/ntriples-CsNjv2QF.js +0 -79
- package/dist/octave-C8PmmSRH.js +0 -143
- package/dist/oz-Ce8aN8oE.js +0 -151
- package/dist/pascal-De0D6mP7.js +0 -77
- package/dist/perl-B4bSCe1C.js +0 -915
- package/dist/pig-D24Z8EXi.js +0 -54
- package/dist/powershell-DkYVfTzP.js +0 -249
- package/dist/properties-Dn9wna3M.js +0 -26
- package/dist/protobuf-BPIjwpzm.js +0 -49
- package/dist/pug-CwAQJzGR.js +0 -248
- package/dist/puppet-nyd4dhjf.js +0 -45
- package/dist/python-BkR3uSy8.js +0 -313
- package/dist/q-DXjKs-tC.js +0 -83
- package/dist/r-LKEuhEGI.js +0 -104
- package/dist/rpm-IznJm2Xc.js +0 -57
- package/dist/ruby-CcYfvIk6.js +0 -228
- package/dist/sas-7E8yHoCW.js +0 -105
- package/dist/scheme-DjibxsNh.js +0 -124
- package/dist/shared/modules/dynamic/components/fields/storybook/common/args.d.ts +0 -113
- package/dist/shared/modules/dynamic/components/fields/storybook/common/args.d.ts.map +0 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/common/templates.d.ts +0 -3
- package/dist/shared/modules/dynamic/components/fields/storybook/common/templates.d.ts.map +0 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts +0 -102
- package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts.map +0 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceHighlighter.d.ts +0 -4
- package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceHighlighter.d.ts.map +0 -1
- package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceTransform.d.ts +0 -3
- package/dist/shared/modules/dynamic/components/fields/storybook/utils/sourceTransform.d.ts.map +0 -1
- package/dist/shell-C0C2sNA_.js +0 -182
- package/dist/sieve-Bwz7vjP5.js +0 -72
- package/dist/simple-mode-B0dvCdAA.js +0 -89
- package/dist/smalltalk-Bhddl2pB.js +0 -48
- package/dist/solr-BNlsLglM.js +0 -41
- package/dist/sparql-FarWu_Gb.js +0 -197
- package/dist/spreadsheet-C-cy4P5N.js +0 -49
- package/dist/sql-CfG5lQ3l.js +0 -282
- package/dist/stex-Du4h4KAU.js +0 -129
- package/dist/stylus-CAdqWld3.js +0 -250
- package/dist/swift-DSxqR9R6.js +0 -230
- package/dist/tcl-xfoLljhY.js +0 -81
- package/dist/textile-D1AWE-pc.js +0 -295
- package/dist/tiddlywiki-5wqsXtSk.js +0 -155
- package/dist/tiki-__Kn3CeS.js +0 -181
- package/dist/toml-BHiuTcfn.js +0 -49
- package/dist/troff-D2UO-fKf.js +0 -35
- package/dist/ttcn-Bsa4sfRm.js +0 -123
- package/dist/ttcn-cfg-Bac_acMi.js +0 -88
- package/dist/turtle-xwJUxoPV.js +0 -80
- package/dist/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/BellIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/BellIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/GridDotsIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/GridDotsIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/LogoutIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/LogoutIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/OffersIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/OffersIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/OrdersIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/OrdersIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/PeopleIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/PeopleIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ProductsIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ProductsIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ProfileIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ProfileIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/SearchIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/SearchIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/ShoppingCardIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/ShoppingCardIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/VendorSwitchIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/VendorSwitchIcon.vue.d.ts.map +0 -1
- package/dist/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue.d.ts +0 -7
- package/dist/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue.d.ts.map +0 -1
- package/dist/vb-c2kQGd6-.js +0 -74
- package/dist/vbscript-1f_Dhg5H.js +0 -324
- package/dist/velocity-DJd0pTTC.js +0 -96
- package/dist/verilog-CiS1jyi5.js +0 -262
- package/dist/vhdl-T9HkrbI2.js +0 -106
- package/dist/webidl-CjfDENEo.js +0 -155
- package/dist/xquery-BUQdORAS.js +0 -422
- package/dist/yacas-C0absKBh.js +0 -73
- package/dist/z80-Pki2zAjW.js +0 -61
- package/shared/modules/dynamic/components/fields/storybook/Button.stories.ts +0 -186
- package/shared/modules/dynamic/components/fields/storybook/Card.stories.ts +0 -175
- package/shared/modules/dynamic/components/fields/storybook/Checkbox.stories.ts +0 -185
- package/shared/modules/dynamic/components/fields/storybook/ContentField.stories.ts +0 -245
- package/shared/modules/dynamic/components/fields/storybook/EditorField.stories.ts +0 -192
- package/shared/modules/dynamic/components/fields/storybook/Fieldset.stories.ts +0 -347
- package/shared/modules/dynamic/components/fields/storybook/GalleryField.stories.ts +0 -239
- package/shared/modules/dynamic/components/fields/storybook/ImageField.stories.ts +0 -186
- package/shared/modules/dynamic/components/fields/storybook/InputCurrency.stories.ts +0 -281
- package/shared/modules/dynamic/components/fields/storybook/InputField.stories.ts +0 -312
- package/shared/modules/dynamic/components/fields/storybook/MultivalueField.stories.ts +0 -361
- package/shared/modules/dynamic/components/fields/storybook/RadioButtonGroup.stories.ts +0 -224
- package/shared/modules/dynamic/components/fields/storybook/RatingField.stories.ts +0 -131
- package/shared/modules/dynamic/components/fields/storybook/SelectField.stories.ts +0 -666
- package/shared/modules/dynamic/components/fields/storybook/StatusField.stories.ts +0 -202
- package/shared/modules/dynamic/components/fields/storybook/SwitchField.stories.ts +0 -178
- package/shared/modules/dynamic/components/fields/storybook/TextareaField.stories.ts +0 -203
- package/shared/modules/dynamic/components/fields/storybook/VideoField.stories.ts +0 -92
- package/shared/modules/dynamic/components/fields/storybook/common/args.ts +0 -130
- package/shared/modules/dynamic/components/fields/storybook/common/templates.ts +0 -8
- package/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.ts +0 -54
- package/shared/modules/dynamic/components/fields/storybook/utils/sourceHighlighter.ts +0 -16
- package/shared/modules/dynamic/components/fields/storybook/utils/sourceTransform.ts +0 -41
- package/ui/components/atoms/vc-icon/icons/AppWindowIcon.vue +0 -15
- package/ui/components/atoms/vc-icon/icons/ArrowLeftIcon.vue +0 -20
- package/ui/components/atoms/vc-icon/icons/ArrowRightIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/BellIcon.vue +0 -14
- package/ui/components/atoms/vc-icon/icons/ChevronDownIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/ChevronLeftIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/ChevronRightIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/ChevronUpIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/CircleDotsIcon.vue +0 -16
- package/ui/components/atoms/vc-icon/icons/CrossSignIcon.vue +0 -20
- package/ui/components/atoms/vc-icon/icons/DoubleArrowLeftIcon.vue +0 -14
- package/ui/components/atoms/vc-icon/icons/DoubleArrowRightIcon.vue +0 -14
- package/ui/components/atoms/vc-icon/icons/FulfillmentCentersIcon.vue +0 -27
- package/ui/components/atoms/vc-icon/icons/GridDotsIcon.vue +0 -22
- package/ui/components/atoms/vc-icon/icons/LogoutIcon.vue +0 -13
- package/ui/components/atoms/vc-icon/icons/MinusSignIcon.vue +0 -14
- package/ui/components/atoms/vc-icon/icons/OffersIcon.vue +0 -23
- package/ui/components/atoms/vc-icon/icons/OrdersIcon.vue +0 -19
- package/ui/components/atoms/vc-icon/icons/PeopleIcon.vue +0 -21
- package/ui/components/atoms/vc-icon/icons/PlusSignIcon.vue +0 -20
- package/ui/components/atoms/vc-icon/icons/ProductsIcon.vue +0 -23
- package/ui/components/atoms/vc-icon/icons/ProfileIcon.vue +0 -18
- package/ui/components/atoms/vc-icon/icons/SearchIcon.vue +0 -14
- package/ui/components/atoms/vc-icon/icons/SettingsBoltIcon.vue +0 -21
- package/ui/components/atoms/vc-icon/icons/ShoppingCardIcon.vue +0 -16
- package/ui/components/atoms/vc-icon/icons/VendorSwitchIcon.vue +0 -26
- package/ui/components/atoms/vc-icon/icons/VertDotsIcon.vue +0 -19
|
@@ -0,0 +1,1275 @@
|
|
|
1
|
+
import { d as dynamicProto } from './vendor-microsoft-dynamicproto-js-CFBBUu9p.js';
|
|
2
|
+
import { d as dateTimeUtilsDuration, m as msToTimeSpan, u as utlCanUseSessionStorage, a as utlGetSessionStorage, b as utlSetSessionStorage, c as utlRemoveSessionStorage, A as AnalyticsPluginIdentifier, e as createTelemetryItem, E as Event$1, T as Trace, M as Metric, P as PageView, f as PageViewPerformance, g as Exception, s as strNotSpecified, i as isCrossOriginError, R as RemoteDependencyData, h as utlEnableStorage, j as utlDisableStorage, k as utlSetStoragePrefix, l as createDomEvent, n as dataSanitizeString, o as PropertiesPluginIdentifier, p as createDistributedTraceContextFromTrace } from './vendor-microsoft-applicationinsights-common-CfmP1_Qr.js';
|
|
3
|
+
import { i as isNullOrUndefined, g as getDocument, a as getPerformance, b as isUndefined, c as isWebWorker, d as arrForEach, e as dumpObj, s as scheduleTimeout, m as mathFloor, f as getNavigator, h as strIndexOf, t as throwError, u as utcNow, o as objDefine, j as isError, k as getWindow, l as hasWindow, n as objDeepFreeze, p as hasHistory, q as getHistory, r as isFunction, v as isArray, w as isString } from './vendor-nevware21-ts-utils-e8v8Jty3.js';
|
|
4
|
+
import { g as getLocation, _ as _throwInternal, a as getExceptionName, s as safeGetLogger, b as _warnToConsole, c as getJSON, h as hasJSON, d as safeGetCookieMgr, m as mergeEvtNamespace, e as createUniqueNamespace, f as eventOff, o as onConfigChange, i as createProcessTelemetryContext, I as InstrumentEvent, j as eventOn, k as findAllScripts, l as cfgDfBoolean, n as cfgDfValidate, p as cfgDfString, q as cfgDfMerge, r as cfgDfSet, t as generateW3CId, B as BaseTelemetryPlugin } from './vendor-microsoft-applicationinsights-core-js-Cq4YSEvZ.js';
|
|
5
|
+
import { _ as __extendsFn, a as __assignFn, s as strShimUndefined } from './vendor-microsoft-applicationinsights-shims-CX8sJgar.js';
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Application Insights JavaScript SDK - Web Analytics, 3.3.9
|
|
9
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
// @skip-file-minify
|
|
14
|
+
// ##############################################################
|
|
15
|
+
// AUTO GENERATED FILE: This file is Auto Generated during build.
|
|
16
|
+
// ##############################################################
|
|
17
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
18
|
+
// Note: DON'T Export these const from the package as we are still targeting ES5 which can result in a mutable variables that someone could change!!!
|
|
19
|
+
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
20
|
+
var _DYN_TO_STRING = "toString"; // Count: 4
|
|
21
|
+
var _DYN_IS_STORAGE_USE_DISAB0 = "isStorageUseDisabled"; // Count: 3
|
|
22
|
+
var _DYN__ADD_HOOK = "_addHook"; // Count: 6
|
|
23
|
+
var _DYN_CORE = "core"; // Count: 7
|
|
24
|
+
var _DYN_DATA_TYPE = "dataType"; // Count: 8
|
|
25
|
+
var _DYN_ENVELOPE_TYPE = "envelopeType"; // Count: 7
|
|
26
|
+
var _DYN_DIAG_LOG = "diagLog"; // Count: 13
|
|
27
|
+
var _DYN_TRACK = "track"; // Count: 7
|
|
28
|
+
var _DYN_TRACK_PAGE_VIEW = "trackPageView"; // Count: 4
|
|
29
|
+
var _DYN_TRACK_PREVIOUS_PAGE_1 = "trackPreviousPageVisit"; // Count: 3
|
|
30
|
+
var _DYN_SEND_PAGE_VIEW_INTER2 = "sendPageViewInternal"; // Count: 7
|
|
31
|
+
var _DYN_START_TIME = "startTime"; // Count: 6
|
|
32
|
+
var _DYN_PROPERTIES = "properties"; // Count: 5
|
|
33
|
+
var _DYN_DURATION = "duration"; // Count: 12
|
|
34
|
+
var _DYN_SEND_PAGE_VIEW_PERFO3 = "sendPageViewPerformanceInternal"; // Count: 3
|
|
35
|
+
var _DYN_POPULATE_PAGE_VIEW_P4 = "populatePageViewPerformanceEvent"; // Count: 3
|
|
36
|
+
var _DYN_HREF = "href"; // Count: 6
|
|
37
|
+
var _DYN_SEND_EXCEPTION_INTER5 = "sendExceptionInternal"; // Count: 2
|
|
38
|
+
var _DYN_ERROR = "error"; // Count: 5
|
|
39
|
+
var _DYN_LINE_NUMBER = "lineNumber"; // Count: 4
|
|
40
|
+
var _DYN_COLUMN_NUMBER = "columnNumber"; // Count: 5
|
|
41
|
+
var _DYN__CREATE_AUTO_EXCEPTI6 = "CreateAutoException"; // Count: 3
|
|
42
|
+
var _DYN_ADD_TELEMETRY_INITIA7 = "addTelemetryInitializer"; // Count: 4
|
|
43
|
+
var _DYN_OVERRIDE_PAGE_VIEW_D8 = "overridePageViewDuration"; // Count: 2
|
|
44
|
+
var _DYN_AUTO_EXCEPTION_INSTR9 = "autoExceptionInstrumented"; // Count: 3
|
|
45
|
+
var _DYN_AUTO_TRACK_PAGE_VISI10 = "autoTrackPageVisitTime"; // Count: 2
|
|
46
|
+
var _DYN_IS_BROWSER_LINK_TRAC11 = "isBrowserLinkTrackingEnabled"; // Count: 2
|
|
47
|
+
var _DYN_LENGTH = "length"; // Count: 5
|
|
48
|
+
var _DYN_ENABLE_AUTO_ROUTE_TR12 = "enableAutoRouteTracking"; // Count: 2
|
|
49
|
+
var _DYN_ENABLE_UNHANDLED_PRO13 = "enableUnhandledPromiseRejectionTracking"; // Count: 2
|
|
50
|
+
var _DYN_AUTO_UNHANDLED_PROMI14 = "autoUnhandledPromiseInstrumented"; // Count: 3
|
|
51
|
+
var _DYN_GET_ENTRIES_BY_TYPE = "getEntriesByType"; // Count: 5
|
|
52
|
+
var _DYN_IS_PERFORMANCE_TIMIN15 = "isPerformanceTimingSupported"; // Count: 2
|
|
53
|
+
var _DYN_GET_PERFORMANCE_TIMI16 = "getPerformanceTiming"; // Count: 2
|
|
54
|
+
var _DYN_NAVIGATION_START = "navigationStart"; // Count: 4
|
|
55
|
+
var _DYN_SHOULD_COLLECT_DURAT17 = "shouldCollectDuration"; // Count: 3
|
|
56
|
+
var _DYN_IS_PERFORMANCE_TIMIN18 = "isPerformanceTimingDataReady"; // Count: 2
|
|
57
|
+
var _DYN_RESPONSE_START = "responseStart"; // Count: 5
|
|
58
|
+
var _DYN_REQUEST_START = "requestStart"; // Count: 3
|
|
59
|
+
var _DYN_LOAD_EVENT_END = "loadEventEnd"; // Count: 4
|
|
60
|
+
var _DYN_RESPONSE_END = "responseEnd"; // Count: 5
|
|
61
|
+
var _DYN_CONNECT_END = "connectEnd"; // Count: 4
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
* Application Insights JavaScript SDK - Web Analytics, 3.3.9
|
|
65
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Class encapsulates sending page views and page view performance telemetry.
|
|
70
|
+
*/
|
|
71
|
+
var PageViewManager = /** @class */ (function () {
|
|
72
|
+
function PageViewManager(appInsights, overridePageViewDuration, core, pageViewPerformanceManager) {
|
|
73
|
+
dynamicProto(PageViewManager, this, function (_self) {
|
|
74
|
+
var queueTimer = null;
|
|
75
|
+
var itemQueue = [];
|
|
76
|
+
var pageViewPerformanceSent = false;
|
|
77
|
+
var firstPageViewSent = false;
|
|
78
|
+
var _logger;
|
|
79
|
+
if (core) {
|
|
80
|
+
_logger = core.logger;
|
|
81
|
+
}
|
|
82
|
+
function _flushChannels(isAsync) {
|
|
83
|
+
if (core) {
|
|
84
|
+
core.flush(isAsync, function () {
|
|
85
|
+
// Event flushed, callback added to prevent promise creation
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function _startTimer() {
|
|
90
|
+
if (!queueTimer) {
|
|
91
|
+
queueTimer = scheduleTimeout((function () {
|
|
92
|
+
queueTimer = null;
|
|
93
|
+
var allItems = itemQueue.slice(0);
|
|
94
|
+
var doFlush = false;
|
|
95
|
+
itemQueue = [];
|
|
96
|
+
arrForEach(allItems, function (item) {
|
|
97
|
+
if (!item()) {
|
|
98
|
+
// Not processed so rescheduled
|
|
99
|
+
itemQueue.push(item);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
doFlush = true;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
if (itemQueue[_DYN_LENGTH /* @min:%2elength */] > 0) {
|
|
106
|
+
_startTimer();
|
|
107
|
+
}
|
|
108
|
+
if (doFlush) {
|
|
109
|
+
// We process at least one item so flush the queue
|
|
110
|
+
_flushChannels(true);
|
|
111
|
+
}
|
|
112
|
+
}), 100);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function _addQueue(cb) {
|
|
116
|
+
itemQueue.push(cb);
|
|
117
|
+
_startTimer();
|
|
118
|
+
}
|
|
119
|
+
_self[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */] = function (pageView, customProperties) {
|
|
120
|
+
var name = pageView.name;
|
|
121
|
+
if (isNullOrUndefined(name) || typeof name !== "string") {
|
|
122
|
+
var doc = getDocument();
|
|
123
|
+
name = pageView.name = doc && doc.title || "";
|
|
124
|
+
}
|
|
125
|
+
var uri = pageView.uri;
|
|
126
|
+
if (isNullOrUndefined(uri) || typeof uri !== "string") {
|
|
127
|
+
var location_1 = getLocation();
|
|
128
|
+
uri = pageView.uri = location_1 && location_1[_DYN_HREF /* @min:%2ehref */] || "";
|
|
129
|
+
}
|
|
130
|
+
if (!firstPageViewSent) {
|
|
131
|
+
var perf = getPerformance();
|
|
132
|
+
// Access the performance timing object
|
|
133
|
+
var navigationEntries = (perf && perf[_DYN_GET_ENTRIES_BY_TYPE /* @min:%2egetEntriesByType */] && perf[_DYN_GET_ENTRIES_BY_TYPE /* @min:%2egetEntriesByType */]("navigation"));
|
|
134
|
+
// Edge Case the navigation Entries may return an empty array and the timeOrigin is not supported on IE
|
|
135
|
+
if (navigationEntries && navigationEntries[0] && !isUndefined(perf.timeOrigin)) {
|
|
136
|
+
// Get the value of loadEventStart
|
|
137
|
+
var loadEventStart = navigationEntries[0].loadEventStart;
|
|
138
|
+
pageView[_DYN_START_TIME /* @min:%2estartTime */] = new Date(perf.timeOrigin + loadEventStart);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
// calculate the start time manually
|
|
142
|
+
var duration_1 = ((customProperties || pageView[_DYN_PROPERTIES /* @min:%2eproperties */] || {})[_DYN_DURATION /* @min:%2eduration */] || 0);
|
|
143
|
+
pageView[_DYN_START_TIME /* @min:%2estartTime */] = new Date(new Date().getTime() - duration_1);
|
|
144
|
+
}
|
|
145
|
+
firstPageViewSent = true;
|
|
146
|
+
}
|
|
147
|
+
// case 1a. if performance timing is not supported by the browser, send the page view telemetry with the duration provided by the user. If the user
|
|
148
|
+
// do not provide the duration, set duration to undefined
|
|
149
|
+
// Also this is case 4
|
|
150
|
+
if (!pageViewPerformanceManager[_DYN_IS_PERFORMANCE_TIMIN15 /* @min:%2eisPerformanceTimingSupported */]()) {
|
|
151
|
+
appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);
|
|
152
|
+
_flushChannels(true);
|
|
153
|
+
if (!isWebWorker()) {
|
|
154
|
+
// no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)
|
|
155
|
+
_throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 25 /* _eInternalMessageId.NavigationTimingNotSupported */, "trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");
|
|
156
|
+
}
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
var pageViewSent = false;
|
|
160
|
+
var customDuration;
|
|
161
|
+
// if the performance timing is supported by the browser, calculate the custom duration
|
|
162
|
+
var start = pageViewPerformanceManager[_DYN_GET_PERFORMANCE_TIMI16 /* @min:%2egetPerformanceTiming */]()[_DYN_NAVIGATION_START /* @min:%2enavigationStart */];
|
|
163
|
+
if (start > 0) {
|
|
164
|
+
customDuration = dateTimeUtilsDuration(start, +new Date);
|
|
165
|
+
if (!pageViewPerformanceManager[_DYN_SHOULD_COLLECT_DURAT17 /* @min:%2eshouldCollectDuration */](customDuration)) {
|
|
166
|
+
customDuration = undefined;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// if the user has provided duration, send a page view telemetry with the provided duration. Otherwise, if
|
|
170
|
+
// overridePageViewDuration is set to true, send a page view telemetry with the custom duration calculated earlier
|
|
171
|
+
var duration;
|
|
172
|
+
if (!isNullOrUndefined(customProperties) &&
|
|
173
|
+
!isNullOrUndefined(customProperties[_DYN_DURATION /* @min:%2eduration */])) {
|
|
174
|
+
duration = customProperties[_DYN_DURATION /* @min:%2eduration */];
|
|
175
|
+
}
|
|
176
|
+
if (overridePageViewDuration || !isNaN(duration)) {
|
|
177
|
+
if (isNaN(duration)) {
|
|
178
|
+
// case 3
|
|
179
|
+
if (!customProperties) {
|
|
180
|
+
customProperties = {};
|
|
181
|
+
}
|
|
182
|
+
customProperties[_DYN_DURATION /* @min:%2eduration */] = customDuration;
|
|
183
|
+
}
|
|
184
|
+
// case 2
|
|
185
|
+
appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);
|
|
186
|
+
_flushChannels(true);
|
|
187
|
+
pageViewSent = true;
|
|
188
|
+
}
|
|
189
|
+
// now try to send the page view performance telemetry
|
|
190
|
+
var maxDurationLimit = 60000;
|
|
191
|
+
if (!customProperties) {
|
|
192
|
+
customProperties = {};
|
|
193
|
+
}
|
|
194
|
+
// Queue the event for processing
|
|
195
|
+
_addQueue(function () {
|
|
196
|
+
var processed = false;
|
|
197
|
+
try {
|
|
198
|
+
if (pageViewPerformanceManager[_DYN_IS_PERFORMANCE_TIMIN18 /* @min:%2eisPerformanceTimingDataReady */]()) {
|
|
199
|
+
processed = true;
|
|
200
|
+
var pageViewPerformance = {
|
|
201
|
+
name: name,
|
|
202
|
+
uri: uri
|
|
203
|
+
};
|
|
204
|
+
pageViewPerformanceManager[_DYN_POPULATE_PAGE_VIEW_P4 /* @min:%2epopulatePageViewPerformanceEvent */](pageViewPerformance);
|
|
205
|
+
if (!pageViewPerformance.isValid && !pageViewSent) {
|
|
206
|
+
// If navigation timing gives invalid numbers, then go back to "override page view duration" mode.
|
|
207
|
+
// That's the best value we can get that makes sense.
|
|
208
|
+
customProperties[_DYN_DURATION /* @min:%2eduration */] = customDuration;
|
|
209
|
+
appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
if (!pageViewSent) {
|
|
213
|
+
customProperties[_DYN_DURATION /* @min:%2eduration */] = pageViewPerformance.durationMs;
|
|
214
|
+
appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);
|
|
215
|
+
}
|
|
216
|
+
if (!pageViewPerformanceSent) {
|
|
217
|
+
appInsights[_DYN_SEND_PAGE_VIEW_PERFO3 /* @min:%2esendPageViewPerformanceInternal */](pageViewPerformance, customProperties);
|
|
218
|
+
pageViewPerformanceSent = true;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else if (start > 0 && dateTimeUtilsDuration(start, +new Date) > maxDurationLimit) {
|
|
223
|
+
// if performance timings are not ready but we exceeded the maximum duration limit, just log a page view telemetry
|
|
224
|
+
// with the maximum duration limit. Otherwise, keep waiting until performance timings are ready
|
|
225
|
+
processed = true;
|
|
226
|
+
if (!pageViewSent) {
|
|
227
|
+
customProperties[_DYN_DURATION /* @min:%2eduration */] = maxDurationLimit;
|
|
228
|
+
appInsights[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageView, customProperties);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
catch (e) {
|
|
233
|
+
_throwInternal(_logger, 1 /* eLoggingSeverity.CRITICAL */, 38 /* _eInternalMessageId.TrackPVFailedCalc */, "trackPageView failed on page load calculation: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
234
|
+
}
|
|
235
|
+
return processed;
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
_self.teardown = function (unloadCtx, unloadState) {
|
|
239
|
+
if (queueTimer) {
|
|
240
|
+
queueTimer.cancel();
|
|
241
|
+
queueTimer = null;
|
|
242
|
+
var allItems = itemQueue.slice(0);
|
|
243
|
+
itemQueue = [];
|
|
244
|
+
arrForEach(allItems, function (item) {
|
|
245
|
+
if (item()) ;
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
// Removed Stub for PageViewManager.prototype.trackPageView.
|
|
252
|
+
// Removed Stub for PageViewManager.prototype.teardown.
|
|
253
|
+
// This is a workaround for an IE bug when using dynamicProto() with classes that don't have any
|
|
254
|
+
// non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.
|
|
255
|
+
PageViewManager.__ieDyn=1;
|
|
256
|
+
|
|
257
|
+
return PageViewManager;
|
|
258
|
+
}());
|
|
259
|
+
|
|
260
|
+
/*
|
|
261
|
+
* Application Insights JavaScript SDK - Web Analytics, 3.3.9
|
|
262
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
263
|
+
*/
|
|
264
|
+
|
|
265
|
+
var MAX_DURATION_ALLOWED = 3600000; // 1h
|
|
266
|
+
var botAgentNames = ["googlebot", "adsbot-google", "apis-google", "mediapartners-google"];
|
|
267
|
+
function _isPerformanceTimingSupported() {
|
|
268
|
+
var perf = getPerformance();
|
|
269
|
+
return perf && !!perf.timing;
|
|
270
|
+
}
|
|
271
|
+
function _isPerformanceNavigationTimingSupported() {
|
|
272
|
+
var perf = getPerformance();
|
|
273
|
+
return perf && perf.getEntriesByType && perf.getEntriesByType("navigation")[_DYN_LENGTH /* @min:%2elength */] > 0;
|
|
274
|
+
}
|
|
275
|
+
function _isPerformanceTimingDataReady() {
|
|
276
|
+
var perf = getPerformance();
|
|
277
|
+
var timing = perf ? perf.timing : 0;
|
|
278
|
+
return timing
|
|
279
|
+
&& timing.domainLookupStart > 0
|
|
280
|
+
&& timing[_DYN_NAVIGATION_START /* @min:%2enavigationStart */] > 0
|
|
281
|
+
&& timing[_DYN_RESPONSE_START /* @min:%2eresponseStart */] > 0
|
|
282
|
+
&& timing[_DYN_REQUEST_START /* @min:%2erequestStart */] > 0
|
|
283
|
+
&& timing[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */] > 0
|
|
284
|
+
&& timing[_DYN_RESPONSE_END /* @min:%2eresponseEnd */] > 0
|
|
285
|
+
&& timing[_DYN_CONNECT_END /* @min:%2econnectEnd */] > 0
|
|
286
|
+
&& timing.domLoading > 0;
|
|
287
|
+
}
|
|
288
|
+
function _getPerformanceTiming() {
|
|
289
|
+
if (_isPerformanceTimingSupported()) {
|
|
290
|
+
return getPerformance().timing;
|
|
291
|
+
}
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
function _getPerformanceNavigationTiming() {
|
|
295
|
+
if (_isPerformanceNavigationTimingSupported()) {
|
|
296
|
+
return getPerformance()[_DYN_GET_ENTRIES_BY_TYPE /* @min:%2egetEntriesByType */]("navigation")[0];
|
|
297
|
+
}
|
|
298
|
+
return null;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* This method tells if given durations should be excluded from collection.
|
|
302
|
+
*/
|
|
303
|
+
function _shouldCollectDuration() {
|
|
304
|
+
var durations = [];
|
|
305
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
306
|
+
durations[_i] = arguments[_i];
|
|
307
|
+
}
|
|
308
|
+
var _navigator = getNavigator() || {};
|
|
309
|
+
// a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en
|
|
310
|
+
var userAgent = _navigator.userAgent;
|
|
311
|
+
var isGoogleBot = false;
|
|
312
|
+
if (userAgent) {
|
|
313
|
+
for (var i = 0; i < botAgentNames[_DYN_LENGTH /* @min:%2elength */]; i++) {
|
|
314
|
+
isGoogleBot = isGoogleBot || strIndexOf(userAgent.toLowerCase(), botAgentNames[i]) !== -1;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
if (isGoogleBot) {
|
|
318
|
+
// Don't report durations for GoogleBot, it is returning invalid values in performance.timing API.
|
|
319
|
+
return false;
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
// for other page views, don't report if it's outside of a reasonable range
|
|
323
|
+
for (var i = 0; i < durations[_DYN_LENGTH /* @min:%2elength */]; i++) {
|
|
324
|
+
if (durations[i] < 0 || durations[i] >= MAX_DURATION_ALLOWED) {
|
|
325
|
+
return false;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return true;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Class encapsulates sending page view performance telemetry.
|
|
333
|
+
*/
|
|
334
|
+
var PageViewPerformanceManager = /** @class */ (function () {
|
|
335
|
+
function PageViewPerformanceManager(core) {
|
|
336
|
+
var _logger = safeGetLogger(core);
|
|
337
|
+
dynamicProto(PageViewPerformanceManager, this, function (_self) {
|
|
338
|
+
_self[_DYN_POPULATE_PAGE_VIEW_P4 /* @min:%2epopulatePageViewPerformanceEvent */] = function (pageViewPerformance) {
|
|
339
|
+
pageViewPerformance.isValid = false;
|
|
340
|
+
/*
|
|
341
|
+
* http://www.w3.org/TR/navigation-timing/#processing-model
|
|
342
|
+
* |-navigationStart
|
|
343
|
+
* | |-connectEnd
|
|
344
|
+
* | ||-requestStart
|
|
345
|
+
* | || |-responseStart
|
|
346
|
+
* | || | |-responseEnd
|
|
347
|
+
* | || | |
|
|
348
|
+
* | || | | |-loadEventEnd
|
|
349
|
+
* |---network---||---request---|---response---|---dom---|
|
|
350
|
+
* |--------------------------total----------------------|
|
|
351
|
+
*
|
|
352
|
+
* total = The difference between the load event of the current document is completed and the first recorded timestamp of the performance entry : https://developer.mozilla.org/en-US/docs/Web/Performance/Navigation_and_resource_timings#duration
|
|
353
|
+
* network = Redirect time + App Cache + DNS lookup time + TCP connection time
|
|
354
|
+
* request = Request time : https://developer.mozilla.org/en-US/docs/Web/Performance/Navigation_and_resource_timings#request_time
|
|
355
|
+
* response = Response time
|
|
356
|
+
* dom = Document load time : https://html.spec.whatwg.org/multipage/dom.html#document-load-timing-info
|
|
357
|
+
* = Document processing time : https://developers.google.com/web/fundamentals/performance/navigation-and-resource-timing/#document_processing
|
|
358
|
+
* + Loading time : https://developers.google.com/web/fundamentals/performance/navigation-and-resource-timing/#loading
|
|
359
|
+
*/
|
|
360
|
+
var navigationTiming = _getPerformanceNavigationTiming();
|
|
361
|
+
var timing = _getPerformanceTiming();
|
|
362
|
+
var total = 0;
|
|
363
|
+
var network = 0;
|
|
364
|
+
var request = 0;
|
|
365
|
+
var response = 0;
|
|
366
|
+
var dom = 0;
|
|
367
|
+
if (navigationTiming || timing) {
|
|
368
|
+
if (navigationTiming) {
|
|
369
|
+
total = navigationTiming[_DYN_DURATION /* @min:%2eduration */];
|
|
370
|
+
/**
|
|
371
|
+
* support both cases:
|
|
372
|
+
* - startTime is always zero: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming
|
|
373
|
+
* - for older browsers where the startTime is not zero
|
|
374
|
+
*/
|
|
375
|
+
network = navigationTiming[_DYN_START_TIME /* @min:%2estartTime */] === 0 ? navigationTiming[_DYN_CONNECT_END /* @min:%2econnectEnd */] : dateTimeUtilsDuration(navigationTiming[_DYN_START_TIME /* @min:%2estartTime */], navigationTiming[_DYN_CONNECT_END /* @min:%2econnectEnd */]);
|
|
376
|
+
request = dateTimeUtilsDuration(navigationTiming.requestStart, navigationTiming[_DYN_RESPONSE_START /* @min:%2eresponseStart */]);
|
|
377
|
+
response = dateTimeUtilsDuration(navigationTiming[_DYN_RESPONSE_START /* @min:%2eresponseStart */], navigationTiming[_DYN_RESPONSE_END /* @min:%2eresponseEnd */]);
|
|
378
|
+
dom = dateTimeUtilsDuration(navigationTiming.responseEnd, navigationTiming[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */]);
|
|
379
|
+
}
|
|
380
|
+
else {
|
|
381
|
+
total = dateTimeUtilsDuration(timing[_DYN_NAVIGATION_START /* @min:%2enavigationStart */], timing[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */]);
|
|
382
|
+
network = dateTimeUtilsDuration(timing[_DYN_NAVIGATION_START /* @min:%2enavigationStart */], timing[_DYN_CONNECT_END /* @min:%2econnectEnd */]);
|
|
383
|
+
request = dateTimeUtilsDuration(timing.requestStart, timing[_DYN_RESPONSE_START /* @min:%2eresponseStart */]);
|
|
384
|
+
response = dateTimeUtilsDuration(timing[_DYN_RESPONSE_START /* @min:%2eresponseStart */], timing[_DYN_RESPONSE_END /* @min:%2eresponseEnd */]);
|
|
385
|
+
dom = dateTimeUtilsDuration(timing.responseEnd, timing[_DYN_LOAD_EVENT_END /* @min:%2eloadEventEnd */]);
|
|
386
|
+
}
|
|
387
|
+
if (total === 0) {
|
|
388
|
+
_throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 10 /* _eInternalMessageId.ErrorPVCalc */, "error calculating page view performance.", { total: total, network: network, request: request, response: response, dom: dom });
|
|
389
|
+
}
|
|
390
|
+
else if (!_self[_DYN_SHOULD_COLLECT_DURAT17 /* @min:%2eshouldCollectDuration */](total, network, request, response, dom)) {
|
|
391
|
+
_throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 45 /* _eInternalMessageId.InvalidDurationValue */, "Invalid page load duration value. Browser perf data won't be sent.", { total: total, network: network, request: request, response: response, dom: dom });
|
|
392
|
+
}
|
|
393
|
+
else if (total < mathFloor(network) + mathFloor(request) + mathFloor(response) + mathFloor(dom)) {
|
|
394
|
+
// some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT
|
|
395
|
+
// in this case, don't report client performance from this page
|
|
396
|
+
_throwInternal(_logger, 2 /* eLoggingSeverity.WARNING */, 8 /* _eInternalMessageId.ClientPerformanceMathError */, "client performance math error.", { total: total, network: network, request: request, response: response, dom: dom });
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
pageViewPerformance.durationMs = total;
|
|
400
|
+
// // convert to timespans
|
|
401
|
+
pageViewPerformance.perfTotal = pageViewPerformance[_DYN_DURATION /* @min:%2eduration */] = msToTimeSpan(total);
|
|
402
|
+
pageViewPerformance.networkConnect = msToTimeSpan(network);
|
|
403
|
+
pageViewPerformance.sentRequest = msToTimeSpan(request);
|
|
404
|
+
pageViewPerformance.receivedResponse = msToTimeSpan(response);
|
|
405
|
+
pageViewPerformance.domProcessing = msToTimeSpan(dom);
|
|
406
|
+
pageViewPerformance.isValid = true;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
_self[_DYN_GET_PERFORMANCE_TIMI16 /* @min:%2egetPerformanceTiming */] = _getPerformanceTiming;
|
|
411
|
+
_self[_DYN_IS_PERFORMANCE_TIMIN15 /* @min:%2eisPerformanceTimingSupported */] = _isPerformanceTimingSupported;
|
|
412
|
+
_self[_DYN_IS_PERFORMANCE_TIMIN18 /* @min:%2eisPerformanceTimingDataReady */] = _isPerformanceTimingDataReady;
|
|
413
|
+
_self[_DYN_SHOULD_COLLECT_DURAT17 /* @min:%2eshouldCollectDuration */] = _shouldCollectDuration;
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
// Removed Stub for PageViewPerformanceManager.prototype.populatePageViewPerformanceEvent.
|
|
417
|
+
// Removed Stub for PageViewPerformanceManager.prototype.getPerformanceTiming.
|
|
418
|
+
// Removed Stub for PageViewPerformanceManager.prototype.isPerformanceTimingSupported.
|
|
419
|
+
// Removed Stub for PageViewPerformanceManager.prototype.isPerformanceTimingDataReady.
|
|
420
|
+
// Removed Stub for PageViewPerformanceManager.prototype.shouldCollectDuration.
|
|
421
|
+
// This is a workaround for an IE bug when using dynamicProto() with classes that don't have any
|
|
422
|
+
// non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.
|
|
423
|
+
PageViewPerformanceManager.__ieDyn=1;
|
|
424
|
+
|
|
425
|
+
return PageViewPerformanceManager;
|
|
426
|
+
}());
|
|
427
|
+
|
|
428
|
+
/*
|
|
429
|
+
* Application Insights JavaScript SDK - Web Analytics, 3.3.9
|
|
430
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
431
|
+
*/
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Used to track page visit durations
|
|
435
|
+
*/
|
|
436
|
+
var PageVisitTimeManager = /** @class */ (function () {
|
|
437
|
+
/**
|
|
438
|
+
* Creates a new instance of PageVisitTimeManager
|
|
439
|
+
* @param pageVisitTimeTrackingHandler - Delegate that will be called to send telemetry data to AI (when trackPreviousPageVisit is called)
|
|
440
|
+
* @returns {}
|
|
441
|
+
*/
|
|
442
|
+
function PageVisitTimeManager(logger, pageVisitTimeTrackingHandler) {
|
|
443
|
+
var prevPageVisitDataKeyName = "prevPageVisitData";
|
|
444
|
+
dynamicProto(PageVisitTimeManager, this, function (_self) {
|
|
445
|
+
_self[_DYN_TRACK_PREVIOUS_PAGE_1 /* @min:%2etrackPreviousPageVisit */] = function (currentPageName, currentPageUrl) {
|
|
446
|
+
try {
|
|
447
|
+
// Restart timer for new page view
|
|
448
|
+
var prevPageVisitTimeData = restartPageVisitTimer(currentPageName, currentPageUrl);
|
|
449
|
+
// If there was a page already being timed, track the visit time for it now.
|
|
450
|
+
if (prevPageVisitTimeData) {
|
|
451
|
+
pageVisitTimeTrackingHandler(prevPageVisitTimeData.pageName, prevPageVisitTimeData.pageUrl, prevPageVisitTimeData.pageVisitTime);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
catch (e) {
|
|
455
|
+
_warnToConsole(logger, "Auto track page visit time failed, metric will not be collected: " + dumpObj(e));
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* Stops timing of current page (if exists) and starts timing for duration of visit to pageName
|
|
460
|
+
* @param pageName - Name of page to begin timing visit duration
|
|
461
|
+
* @returns {PageVisitData} Page visit data (including duration) of pageName from last call to start or restart, if exists. Null if not.
|
|
462
|
+
*/
|
|
463
|
+
function restartPageVisitTimer(pageName, pageUrl) {
|
|
464
|
+
var prevPageVisitData = null;
|
|
465
|
+
try {
|
|
466
|
+
prevPageVisitData = stopPageVisitTimer();
|
|
467
|
+
if (utlCanUseSessionStorage()) {
|
|
468
|
+
if (utlGetSessionStorage(logger, prevPageVisitDataKeyName) != null) {
|
|
469
|
+
throwError("Cannot call startPageVisit consecutively without first calling stopPageVisit");
|
|
470
|
+
}
|
|
471
|
+
var currPageVisitDataStr = getJSON().stringify(new PageVisitData(pageName, pageUrl));
|
|
472
|
+
utlSetSessionStorage(logger, prevPageVisitDataKeyName, currPageVisitDataStr);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
catch (e) {
|
|
476
|
+
_warnToConsole(logger, "Call to restart failed: " + dumpObj(e));
|
|
477
|
+
prevPageVisitData = null;
|
|
478
|
+
}
|
|
479
|
+
return prevPageVisitData;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Stops timing of current page, if exists.
|
|
483
|
+
* @returns {PageVisitData} Page visit data (including duration) of pageName from call to start, if exists. Null if not.
|
|
484
|
+
*/
|
|
485
|
+
function stopPageVisitTimer() {
|
|
486
|
+
var prevPageVisitData = null;
|
|
487
|
+
try {
|
|
488
|
+
if (utlCanUseSessionStorage()) {
|
|
489
|
+
// Define end time of page's visit
|
|
490
|
+
var pageVisitEndTime = utcNow();
|
|
491
|
+
// Try to retrieve page name and start time from session storage
|
|
492
|
+
var pageVisitDataJsonStr = utlGetSessionStorage(logger, prevPageVisitDataKeyName);
|
|
493
|
+
if (pageVisitDataJsonStr && hasJSON()) {
|
|
494
|
+
// if previous page data exists, set end time of visit
|
|
495
|
+
prevPageVisitData = getJSON().parse(pageVisitDataJsonStr);
|
|
496
|
+
prevPageVisitData.pageVisitTime = pageVisitEndTime - prevPageVisitData.pageVisitStartTime;
|
|
497
|
+
// Remove data from storage since we already used it
|
|
498
|
+
utlRemoveSessionStorage(logger, prevPageVisitDataKeyName);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
catch (e) {
|
|
503
|
+
_warnToConsole(logger, "Stop page visit timer failed: " + dumpObj(e));
|
|
504
|
+
prevPageVisitData = null;
|
|
505
|
+
}
|
|
506
|
+
return prevPageVisitData;
|
|
507
|
+
}
|
|
508
|
+
// For backward compatibility
|
|
509
|
+
objDefine(_self, "_logger", { g: function () { return logger; } });
|
|
510
|
+
objDefine(_self, "pageVisitTimeTrackingHandler", { g: function () { return pageVisitTimeTrackingHandler; } });
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
// Removed Stub for PageVisitTimeManager.prototype.trackPreviousPageVisit.
|
|
514
|
+
// This is a workaround for an IE bug when using dynamicProto() with classes that don't have any
|
|
515
|
+
// non-dynamic functions or static properties/functions when using uglify-js to minify the resulting code.
|
|
516
|
+
PageVisitTimeManager.__ieDyn=1;
|
|
517
|
+
|
|
518
|
+
return PageVisitTimeManager;
|
|
519
|
+
}());
|
|
520
|
+
var PageVisitData = /** @class */ (function () {
|
|
521
|
+
function PageVisitData(pageName, pageUrl) {
|
|
522
|
+
this.pageVisitStartTime = utcNow();
|
|
523
|
+
this.pageName = pageName;
|
|
524
|
+
this.pageUrl = pageUrl;
|
|
525
|
+
}
|
|
526
|
+
return PageVisitData;
|
|
527
|
+
}());
|
|
528
|
+
|
|
529
|
+
/*
|
|
530
|
+
* Application Insights JavaScript SDK - Web Analytics, 3.3.9
|
|
531
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
532
|
+
*/
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Used to record timed events and page views.
|
|
536
|
+
*/
|
|
537
|
+
var Timing = /** @class */ (function () {
|
|
538
|
+
function Timing(logger, name) {
|
|
539
|
+
var _self = this;
|
|
540
|
+
var _events = {};
|
|
541
|
+
_self.start = function (name) {
|
|
542
|
+
if (typeof _events[name] !== "undefined") {
|
|
543
|
+
_throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 62 /* _eInternalMessageId.StartCalledMoreThanOnce */, "start was called more than once for this event without calling stop.", { name: name, key: name }, true);
|
|
544
|
+
}
|
|
545
|
+
_events[name] = +new Date;
|
|
546
|
+
};
|
|
547
|
+
_self.stop = function (name, url, properties, measurements) {
|
|
548
|
+
var start = _events[name];
|
|
549
|
+
if (isNaN(start)) {
|
|
550
|
+
_throwInternal(logger, 2 /* eLoggingSeverity.WARNING */, 63 /* _eInternalMessageId.StopCalledWithoutStart */, "stop was called without a corresponding start.", { name: name, key: name }, true);
|
|
551
|
+
}
|
|
552
|
+
else {
|
|
553
|
+
var end = +new Date;
|
|
554
|
+
var duration = dateTimeUtilsDuration(start, end);
|
|
555
|
+
_self.action(name, url, duration, properties, measurements);
|
|
556
|
+
}
|
|
557
|
+
delete _events[name];
|
|
558
|
+
_events[name] = undefined;
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
return Timing;
|
|
562
|
+
}());
|
|
563
|
+
|
|
564
|
+
/*
|
|
565
|
+
* Application Insights JavaScript SDK - Web Analytics, 3.3.9
|
|
566
|
+
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
567
|
+
*/
|
|
568
|
+
/**
|
|
569
|
+
* ApplicationInsights.ts
|
|
570
|
+
* @copyright Microsoft 2018
|
|
571
|
+
*/
|
|
572
|
+
var _a;
|
|
573
|
+
var strEvent = "event";
|
|
574
|
+
function _dispatchEvent(target, evnt) {
|
|
575
|
+
if (target && target.dispatchEvent && evnt) {
|
|
576
|
+
target.dispatchEvent(evnt);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
function _getReason(error) {
|
|
580
|
+
if (error && error.reason) {
|
|
581
|
+
var reason = error.reason;
|
|
582
|
+
if (!isString(reason) && isFunction(reason[_DYN_TO_STRING /* @min:%2etoString */])) {
|
|
583
|
+
return reason[_DYN_TO_STRING /* @min:%2etoString */]();
|
|
584
|
+
}
|
|
585
|
+
return dumpObj(reason);
|
|
586
|
+
}
|
|
587
|
+
// Pass the original object down which will eventually get evaluated for any message or description
|
|
588
|
+
return error || "";
|
|
589
|
+
}
|
|
590
|
+
var MinMilliSeconds = 60000;
|
|
591
|
+
var defaultValues = objDeepFreeze((_a = {
|
|
592
|
+
sessionRenewalMs: cfgDfSet(_chkConfigMilliseconds, 30 * 60 * 1000),
|
|
593
|
+
sessionExpirationMs: cfgDfSet(_chkConfigMilliseconds, 24 * 60 * 60 * 1000),
|
|
594
|
+
disableExceptionTracking: cfgDfBoolean()
|
|
595
|
+
},
|
|
596
|
+
_a[_DYN_AUTO_TRACK_PAGE_VISI10 /* @min:autoTrackPageVisitTime */] = cfgDfBoolean(),
|
|
597
|
+
_a[_DYN_OVERRIDE_PAGE_VIEW_D8 /* @min:overridePageViewDuration */] = cfgDfBoolean(),
|
|
598
|
+
_a[_DYN_ENABLE_UNHANDLED_PRO13 /* @min:enableUnhandledPromiseRejectionTracking */] = cfgDfBoolean(),
|
|
599
|
+
_a[_DYN_AUTO_UNHANDLED_PROMI14 /* @min:autoUnhandledPromiseInstrumented */] = false,
|
|
600
|
+
_a.samplingPercentage = cfgDfValidate(_chkSampling, 100),
|
|
601
|
+
_a[_DYN_IS_STORAGE_USE_DISAB0 /* @min:isStorageUseDisabled */] = cfgDfBoolean(),
|
|
602
|
+
_a[_DYN_IS_BROWSER_LINK_TRAC11 /* @min:isBrowserLinkTrackingEnabled */] = cfgDfBoolean(),
|
|
603
|
+
_a[_DYN_ENABLE_AUTO_ROUTE_TR12 /* @min:enableAutoRouteTracking */] = cfgDfBoolean(),
|
|
604
|
+
_a.namePrefix = cfgDfString(),
|
|
605
|
+
_a.enableDebug = cfgDfBoolean(),
|
|
606
|
+
_a.disableFlushOnBeforeUnload = cfgDfBoolean(),
|
|
607
|
+
_a.disableFlushOnUnload = cfgDfBoolean(false, "disableFlushOnBeforeUnload"),
|
|
608
|
+
_a.expCfg = cfgDfMerge({ inclScripts: false, expLog: undefined, maxLogs: 50 }),
|
|
609
|
+
_a));
|
|
610
|
+
function _chkConfigMilliseconds(value, defValue) {
|
|
611
|
+
value = value || defValue;
|
|
612
|
+
if (value < MinMilliSeconds) {
|
|
613
|
+
value = MinMilliSeconds;
|
|
614
|
+
}
|
|
615
|
+
return +value;
|
|
616
|
+
}
|
|
617
|
+
function _chkSampling(value) {
|
|
618
|
+
return !isNaN(value) && value > 0 && value <= 100;
|
|
619
|
+
}
|
|
620
|
+
function _updateStorageUsage(extConfig) {
|
|
621
|
+
// Not resetting the storage usage as someone may have manually called utlDisableStorage, so this will only
|
|
622
|
+
// reset based if the configuration option is provided
|
|
623
|
+
if (!isUndefined(extConfig[_DYN_IS_STORAGE_USE_DISAB0 /* @min:%2eisStorageUseDisabled */])) {
|
|
624
|
+
if (extConfig[_DYN_IS_STORAGE_USE_DISAB0 /* @min:%2eisStorageUseDisabled */]) {
|
|
625
|
+
utlDisableStorage();
|
|
626
|
+
}
|
|
627
|
+
else {
|
|
628
|
+
utlEnableStorage();
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
var AnalyticsPlugin = /** @class */ (function (_super) {
|
|
633
|
+
__extendsFn(AnalyticsPlugin, _super);
|
|
634
|
+
function AnalyticsPlugin() {
|
|
635
|
+
var _this = _super.call(this) || this;
|
|
636
|
+
_this.identifier = AnalyticsPluginIdentifier; // do not change name or priority
|
|
637
|
+
_this.priority = 180; // take from reserved priority range 100- 200
|
|
638
|
+
_this.autoRoutePVDelay = 500; // ms; Time to wait after a route change before triggering a pageview to allow DOM changes to take place
|
|
639
|
+
var _eventTracking;
|
|
640
|
+
var _pageTracking;
|
|
641
|
+
var _pageViewManager;
|
|
642
|
+
var _pageViewPerformanceManager;
|
|
643
|
+
var _pageVisitTimeManager;
|
|
644
|
+
var _preInitTelemetryInitializers;
|
|
645
|
+
var _isBrowserLinkTrackingEnabled;
|
|
646
|
+
var _browserLinkInitializerAdded;
|
|
647
|
+
var _enableAutoRouteTracking;
|
|
648
|
+
var _historyListenerAdded;
|
|
649
|
+
var _disableExceptionTracking;
|
|
650
|
+
var _autoExceptionInstrumented;
|
|
651
|
+
var _enableUnhandledPromiseRejectionTracking;
|
|
652
|
+
var _autoUnhandledPromiseInstrumented;
|
|
653
|
+
var _extConfig;
|
|
654
|
+
var _autoTrackPageVisitTime;
|
|
655
|
+
var _expCfg;
|
|
656
|
+
// array with max length of 2 that store current url and previous url for SPA page route change trackPageview use.
|
|
657
|
+
var _prevUri; // Assigned in the constructor
|
|
658
|
+
var _currUri;
|
|
659
|
+
var _evtNamespace;
|
|
660
|
+
// For testing error hooks only
|
|
661
|
+
var _errorHookCnt;
|
|
662
|
+
dynamicProto(AnalyticsPlugin, _this, function (_self, _base) {
|
|
663
|
+
var _addHook = _base[_DYN__ADD_HOOK /* @min:%2e_addHook */];
|
|
664
|
+
_initDefaults();
|
|
665
|
+
_self.getCookieMgr = function () {
|
|
666
|
+
return safeGetCookieMgr(_self[_DYN_CORE /* @min:%2ecore */]);
|
|
667
|
+
};
|
|
668
|
+
_self.processTelemetry = function (env, itemCtx) {
|
|
669
|
+
_self.processNext(env, itemCtx);
|
|
670
|
+
};
|
|
671
|
+
_self.trackEvent = function (event, customProperties) {
|
|
672
|
+
try {
|
|
673
|
+
var telemetryItem = createTelemetryItem(event, Event$1[_DYN_DATA_TYPE /* @min:%2edataType */], Event$1[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);
|
|
674
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
675
|
+
}
|
|
676
|
+
catch (e) {
|
|
677
|
+
_throwInternal(2 /* eLoggingSeverity.WARNING */, 39 /* _eInternalMessageId.TrackTraceFailed */, "trackTrace failed, trace will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
/**
|
|
681
|
+
* Start timing an extended event. Call `stopTrackEvent` to log the event when it ends.
|
|
682
|
+
* @param name - A string that identifies this event uniquely within the document.
|
|
683
|
+
*/
|
|
684
|
+
_self.startTrackEvent = function (name) {
|
|
685
|
+
try {
|
|
686
|
+
_eventTracking.start(name);
|
|
687
|
+
}
|
|
688
|
+
catch (e) {
|
|
689
|
+
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 29 /* _eInternalMessageId.StartTrackEventFailed */, "startTrackEvent failed, event will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
/**
|
|
693
|
+
* Log an extended event that you started timing with `startTrackEvent`.
|
|
694
|
+
* @param name - The string you used to identify this event in `startTrackEvent`.
|
|
695
|
+
* @param properties - map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.
|
|
696
|
+
* @param measurements - map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.
|
|
697
|
+
*/
|
|
698
|
+
_self.stopTrackEvent = function (name, properties, measurements) {
|
|
699
|
+
try {
|
|
700
|
+
_eventTracking.stop(name, undefined, properties, measurements);
|
|
701
|
+
}
|
|
702
|
+
catch (e) {
|
|
703
|
+
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 30 /* _eInternalMessageId.StopTrackEventFailed */, "stopTrackEvent failed, event will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
/**
|
|
707
|
+
* @description Log a diagnostic message
|
|
708
|
+
* @param trace - the trace message
|
|
709
|
+
* @param customProperties - Additional custom properties to include in the event
|
|
710
|
+
*/
|
|
711
|
+
_self.trackTrace = function (trace, customProperties) {
|
|
712
|
+
try {
|
|
713
|
+
var telemetryItem = createTelemetryItem(trace, Trace[_DYN_DATA_TYPE /* @min:%2edataType */], Trace[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);
|
|
714
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
715
|
+
}
|
|
716
|
+
catch (e) {
|
|
717
|
+
_throwInternal(2 /* eLoggingSeverity.WARNING */, 39 /* _eInternalMessageId.TrackTraceFailed */, "trackTrace failed, trace will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
/**
|
|
721
|
+
* @description Log a numeric value that is not associated with a specific event. Typically
|
|
722
|
+
* used to send regular reports of performance indicators. To send single measurement, just
|
|
723
|
+
* use the name and average fields of {@link IMetricTelemetry}. If you take measurements
|
|
724
|
+
* frequently, you can reduce the telemetry bandwidth by aggregating multiple measurements
|
|
725
|
+
* and sending the resulting average at intervals
|
|
726
|
+
* @param metric - input object argument. Only name and average are mandatory.
|
|
727
|
+
* @param } customProperties additional data used to filter metrics in the
|
|
728
|
+
* portal. Defaults to empty.
|
|
729
|
+
*/
|
|
730
|
+
_self.trackMetric = function (metric, customProperties) {
|
|
731
|
+
try {
|
|
732
|
+
var telemetryItem = createTelemetryItem(metric, Metric[_DYN_DATA_TYPE /* @min:%2edataType */], Metric[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties);
|
|
733
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
734
|
+
}
|
|
735
|
+
catch (e) {
|
|
736
|
+
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 36 /* _eInternalMessageId.TrackMetricFailed */, "trackMetric failed, metric will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
737
|
+
}
|
|
738
|
+
};
|
|
739
|
+
/**
|
|
740
|
+
* Logs that a page or other item was viewed.
|
|
741
|
+
* @param IPageViewTelemetry - The string you used as the name in startTrackPage. Defaults to the document title.
|
|
742
|
+
* @param customProperties - Additional data used to filter events and metrics. Defaults to empty.
|
|
743
|
+
* If a user wants to provide duration for pageLoad, it'll have to be in pageView.properties.duration
|
|
744
|
+
*/
|
|
745
|
+
_self[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */] = function (pageView, customProperties) {
|
|
746
|
+
try {
|
|
747
|
+
var inPv = pageView || {};
|
|
748
|
+
_pageViewManager[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */](inPv, __assignFn(__assignFn(__assignFn({}, inPv.properties), inPv.measurements), customProperties));
|
|
749
|
+
if (_autoTrackPageVisitTime) {
|
|
750
|
+
_pageVisitTimeManager[_DYN_TRACK_PREVIOUS_PAGE_1 /* @min:%2etrackPreviousPageVisit */](inPv.name, inPv.uri);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
catch (e) {
|
|
754
|
+
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 37 /* _eInternalMessageId.TrackPVFailed */, "trackPageView failed, page view will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
/**
|
|
758
|
+
* Create a page view telemetry item and send it to the SDK pipeline through the core.track API
|
|
759
|
+
* @param pageView - Page view item to be sent
|
|
760
|
+
* @param properties - Custom properties (Part C) that a user can add to the telemetry item
|
|
761
|
+
* @param systemProperties - System level properties (Part A) that a user can add to the telemetry item
|
|
762
|
+
*/
|
|
763
|
+
_self[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */] = function (pageView, properties, systemProperties) {
|
|
764
|
+
var doc = getDocument();
|
|
765
|
+
if (doc) {
|
|
766
|
+
pageView.refUri = pageView.refUri === undefined ? doc.referrer : pageView.refUri;
|
|
767
|
+
}
|
|
768
|
+
if (isNullOrUndefined(pageView[_DYN_START_TIME /* @min:%2estartTime */])) {
|
|
769
|
+
// calculate the start time manually
|
|
770
|
+
var duration = ((properties || pageView[_DYN_PROPERTIES /* @min:%2eproperties */] || {})[_DYN_DURATION /* @min:%2eduration */] || 0);
|
|
771
|
+
pageView[_DYN_START_TIME /* @min:%2estartTime */] = new Date(new Date().getTime() - duration);
|
|
772
|
+
}
|
|
773
|
+
var telemetryItem = createTelemetryItem(pageView, PageView[_DYN_DATA_TYPE /* @min:%2edataType */], PageView[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties, systemProperties);
|
|
774
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
775
|
+
};
|
|
776
|
+
/**
|
|
777
|
+
* @ignore INTERNAL ONLY
|
|
778
|
+
* @param pageViewPerformance
|
|
779
|
+
* @param properties
|
|
780
|
+
*/
|
|
781
|
+
_self[_DYN_SEND_PAGE_VIEW_PERFO3 /* @min:%2esendPageViewPerformanceInternal */] = function (pageViewPerformance, properties, systemProperties) {
|
|
782
|
+
var telemetryItem = createTelemetryItem(pageViewPerformance, PageViewPerformance[_DYN_DATA_TYPE /* @min:%2edataType */], PageViewPerformance[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties, systemProperties);
|
|
783
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
784
|
+
};
|
|
785
|
+
/**
|
|
786
|
+
* Send browser performance metrics.
|
|
787
|
+
* @param pageViewPerformance
|
|
788
|
+
* @param customProperties
|
|
789
|
+
*/
|
|
790
|
+
_self.trackPageViewPerformance = function (pageViewPerformance, customProperties) {
|
|
791
|
+
var inPvp = pageViewPerformance || {};
|
|
792
|
+
try {
|
|
793
|
+
_pageViewPerformanceManager[_DYN_POPULATE_PAGE_VIEW_P4 /* @min:%2epopulatePageViewPerformanceEvent */](inPvp);
|
|
794
|
+
_self[_DYN_SEND_PAGE_VIEW_PERFO3 /* @min:%2esendPageViewPerformanceInternal */](inPvp, customProperties);
|
|
795
|
+
}
|
|
796
|
+
catch (e) {
|
|
797
|
+
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 37 /* _eInternalMessageId.TrackPVFailed */, "trackPageViewPerformance failed, page view will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
/**
|
|
801
|
+
* Starts the timer for tracking a page load time. Use this instead of `trackPageView` if you want to control when the page view timer starts and stops,
|
|
802
|
+
* but don't want to calculate the duration yourself. This method doesn't send any telemetry. Call `stopTrackPage` to log the end of the page view
|
|
803
|
+
* and send the event.
|
|
804
|
+
* @param name - A string that idenfities this item, unique within this HTML document. Defaults to the document title.
|
|
805
|
+
*/
|
|
806
|
+
_self.startTrackPage = function (name) {
|
|
807
|
+
try {
|
|
808
|
+
if (typeof name !== "string") {
|
|
809
|
+
var doc = getDocument();
|
|
810
|
+
name = doc && doc.title || "";
|
|
811
|
+
}
|
|
812
|
+
_pageTracking.start(name);
|
|
813
|
+
}
|
|
814
|
+
catch (e) {
|
|
815
|
+
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 31 /* _eInternalMessageId.StartTrackFailed */, "startTrackPage failed, page view may not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
/**
|
|
819
|
+
* Stops the timer that was started by calling `startTrackPage` and sends the pageview load time telemetry with the specified properties and measurements.
|
|
820
|
+
* The duration of the page view will be the time between calling `startTrackPage` and `stopTrackPage`.
|
|
821
|
+
* @param name - The string you used as the name in startTrackPage. Defaults to the document title.
|
|
822
|
+
* @param url - String - a relative or absolute URL that identifies the page or other item. Defaults to the window location.
|
|
823
|
+
* @param properties - map[string, string] - additional data used to filter pages and metrics in the portal. Defaults to empty.
|
|
824
|
+
* @param measurements - map[string, number] - metrics associated with this page, displayed in Metrics Explorer on the portal. Defaults to empty.
|
|
825
|
+
*/
|
|
826
|
+
_self.stopTrackPage = function (name, url, properties, measurement) {
|
|
827
|
+
try {
|
|
828
|
+
if (typeof name !== "string") {
|
|
829
|
+
var doc = getDocument();
|
|
830
|
+
name = doc && doc.title || "";
|
|
831
|
+
}
|
|
832
|
+
if (typeof url !== "string") {
|
|
833
|
+
var loc = getLocation();
|
|
834
|
+
url = loc && loc[_DYN_HREF /* @min:%2ehref */] || "";
|
|
835
|
+
}
|
|
836
|
+
_pageTracking.stop(name, url, properties, measurement);
|
|
837
|
+
if (_autoTrackPageVisitTime) {
|
|
838
|
+
_pageVisitTimeManager[_DYN_TRACK_PREVIOUS_PAGE_1 /* @min:%2etrackPreviousPageVisit */](name, url);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
catch (e) {
|
|
842
|
+
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 32 /* _eInternalMessageId.StopTrackFailed */, "stopTrackPage failed, page view will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
/**
|
|
846
|
+
* @ignore INTERNAL ONLY
|
|
847
|
+
* @param exception
|
|
848
|
+
* @param properties
|
|
849
|
+
* @param systemProperties
|
|
850
|
+
*/
|
|
851
|
+
_self[_DYN_SEND_EXCEPTION_INTER5 /* @min:%2esendExceptionInternal */] = function (exception, customProperties, systemProperties) {
|
|
852
|
+
// Adding additional edge cases to handle
|
|
853
|
+
// - Not passing anything (null / undefined)
|
|
854
|
+
var theError = (exception && (exception.exception || exception[_DYN_ERROR /* @min:%2eerror */])) ||
|
|
855
|
+
// - Handle someone calling trackException based of v1 API where the exception was the Error
|
|
856
|
+
isError(exception) && exception ||
|
|
857
|
+
// - Handles no error being defined and instead of creating a new Error() instance attempt to map so any stacktrace
|
|
858
|
+
// is preserved and does not list ApplicationInsights code as the source
|
|
859
|
+
{ name: (exception && typeof exception), message: exception || strNotSpecified };
|
|
860
|
+
// If no exception object was passed assign to an empty object to avoid internal exceptions
|
|
861
|
+
exception = exception || {};
|
|
862
|
+
var exceptionPartB = new Exception(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), theError, exception[_DYN_PROPERTIES /* @min:%2eproperties */] || customProperties, exception.measurements, exception.severityLevel, exception.id).toInterface();
|
|
863
|
+
var doc = getDocument();
|
|
864
|
+
if (doc && (_expCfg === null || _expCfg === void 0 ? void 0 : _expCfg.inclScripts)) {
|
|
865
|
+
var scriptsInfo = findAllScripts(doc);
|
|
866
|
+
exceptionPartB[_DYN_PROPERTIES /* @min:%2eproperties */]["exceptionScripts"] = JSON.stringify(scriptsInfo);
|
|
867
|
+
}
|
|
868
|
+
if (_expCfg === null || _expCfg === void 0 ? void 0 : _expCfg.expLog) {
|
|
869
|
+
var logs = _expCfg.expLog();
|
|
870
|
+
if (logs && logs.logs && isArray(logs.logs)) {
|
|
871
|
+
exceptionPartB[_DYN_PROPERTIES /* @min:%2eproperties */]["exceptionLog"] = logs.logs.slice(0, _expCfg.maxLogs).join("\n");
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
var telemetryItem = createTelemetryItem(exceptionPartB, Exception[_DYN_DATA_TYPE /* @min:%2edataType */], Exception[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), customProperties, systemProperties);
|
|
875
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
876
|
+
};
|
|
877
|
+
/**
|
|
878
|
+
* Log an exception you have caught.
|
|
879
|
+
*
|
|
880
|
+
* @param exception - Object which contains exception to be sent
|
|
881
|
+
* @param } customProperties Additional data used to filter pages and metrics in the portal. Defaults to empty.
|
|
882
|
+
*
|
|
883
|
+
* Any property of type double will be considered a measurement, and will be treated by Application Insights as a metric.
|
|
884
|
+
*/
|
|
885
|
+
_self.trackException = function (exception, customProperties) {
|
|
886
|
+
if (exception && !exception.exception && exception[_DYN_ERROR /* @min:%2eerror */]) {
|
|
887
|
+
exception.exception = exception[_DYN_ERROR /* @min:%2eerror */];
|
|
888
|
+
}
|
|
889
|
+
try {
|
|
890
|
+
_self[_DYN_SEND_EXCEPTION_INTER5 /* @min:%2esendExceptionInternal */](exception, customProperties);
|
|
891
|
+
}
|
|
892
|
+
catch (e) {
|
|
893
|
+
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 35 /* _eInternalMessageId.TrackExceptionFailed */, "trackException failed, exception will not be collected: " + getExceptionName(e), { exception: dumpObj(e) });
|
|
894
|
+
}
|
|
895
|
+
};
|
|
896
|
+
/**
|
|
897
|
+
* @description Custom error handler for Application Insights Analytics
|
|
898
|
+
* @param exception
|
|
899
|
+
*/
|
|
900
|
+
_self._onerror = function (exception) {
|
|
901
|
+
var error = exception && exception[_DYN_ERROR /* @min:%2eerror */];
|
|
902
|
+
var evt = exception && exception.evt;
|
|
903
|
+
try {
|
|
904
|
+
if (!evt) {
|
|
905
|
+
var _window = getWindow();
|
|
906
|
+
if (_window) {
|
|
907
|
+
evt = _window[strEvent];
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
var url = (exception && exception.url) || (getDocument() || {}).URL;
|
|
911
|
+
// If no error source is provided assume the default window.onerror handler
|
|
912
|
+
var errorSrc = exception.errorSrc || "window.onerror@" + url + ":" + (exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0) + ":" + (exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0);
|
|
913
|
+
var properties = {
|
|
914
|
+
errorSrc: errorSrc,
|
|
915
|
+
url: url,
|
|
916
|
+
lineNumber: exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0,
|
|
917
|
+
columnNumber: exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0,
|
|
918
|
+
message: exception.message
|
|
919
|
+
};
|
|
920
|
+
if (isCrossOriginError(exception.message, exception.url, exception.lineNumber, exception.columnNumber, exception[_DYN_ERROR /* @min:%2eerror */])) {
|
|
921
|
+
_sendCORSException(Exception[_DYN__CREATE_AUTO_EXCEPTI6 /* @min:%2eCreateAutoException */]("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.", url, exception[_DYN_LINE_NUMBER /* @min:%2elineNumber */] || 0, exception[_DYN_COLUMN_NUMBER /* @min:%2ecolumnNumber */] || 0, error, evt, null, errorSrc), properties);
|
|
922
|
+
}
|
|
923
|
+
else {
|
|
924
|
+
if (!exception.errorSrc) {
|
|
925
|
+
exception.errorSrc = errorSrc;
|
|
926
|
+
}
|
|
927
|
+
_self.trackException({ exception: exception, severityLevel: 3 /* eSeverityLevel.Error */ }, properties);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
catch (e) {
|
|
931
|
+
var errorString = error ? (error.name + ", " + error.message) : "null";
|
|
932
|
+
_throwInternal(1 /* eLoggingSeverity.CRITICAL */, 11 /* _eInternalMessageId.ExceptionWhileLoggingError */, "_onError threw exception while logging error, error will not be collected: "
|
|
933
|
+
+ getExceptionName(e), { exception: dumpObj(e), errorString: errorString });
|
|
934
|
+
}
|
|
935
|
+
};
|
|
936
|
+
_self[_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */] = function (telemetryInitializer) {
|
|
937
|
+
if (_self[_DYN_CORE /* @min:%2ecore */]) {
|
|
938
|
+
// Just add to the core
|
|
939
|
+
return _self[_DYN_CORE /* @min:%2ecore */][_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */](telemetryInitializer);
|
|
940
|
+
}
|
|
941
|
+
// Handle "pre-initialization" telemetry initializers (for backward compatibility)
|
|
942
|
+
if (!_preInitTelemetryInitializers) {
|
|
943
|
+
_preInitTelemetryInitializers = [];
|
|
944
|
+
}
|
|
945
|
+
_preInitTelemetryInitializers.push(telemetryInitializer);
|
|
946
|
+
};
|
|
947
|
+
_self.initialize = function (config, core, extensions, pluginChain) {
|
|
948
|
+
if (_self.isInitialized()) {
|
|
949
|
+
return;
|
|
950
|
+
}
|
|
951
|
+
if (isNullOrUndefined(core)) {
|
|
952
|
+
throwError("Error initializing");
|
|
953
|
+
}
|
|
954
|
+
_base.initialize(config, core, extensions, pluginChain);
|
|
955
|
+
try {
|
|
956
|
+
_evtNamespace = mergeEvtNamespace(createUniqueNamespace(_self.identifier), core.evtNamespace && core.evtNamespace());
|
|
957
|
+
if (_preInitTelemetryInitializers) {
|
|
958
|
+
arrForEach(_preInitTelemetryInitializers, function (initializer) {
|
|
959
|
+
core[_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */](initializer);
|
|
960
|
+
});
|
|
961
|
+
_preInitTelemetryInitializers = null;
|
|
962
|
+
}
|
|
963
|
+
_populateDefaults(config);
|
|
964
|
+
_pageViewPerformanceManager = new PageViewPerformanceManager(_self[_DYN_CORE /* @min:%2ecore */]);
|
|
965
|
+
_pageViewManager = new PageViewManager(_self, _extConfig.overridePageViewDuration, _self[_DYN_CORE /* @min:%2ecore */], _pageViewPerformanceManager);
|
|
966
|
+
_pageVisitTimeManager = new PageVisitTimeManager(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), function (pageName, pageUrl, pageVisitTime) { return trackPageVisitTime(pageName, pageUrl, pageVisitTime); });
|
|
967
|
+
_eventTracking = new Timing(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), "trackEvent");
|
|
968
|
+
_eventTracking.action =
|
|
969
|
+
function (name, url, duration, properties, measurements) {
|
|
970
|
+
if (!properties) {
|
|
971
|
+
properties = {};
|
|
972
|
+
}
|
|
973
|
+
if (!measurements) {
|
|
974
|
+
measurements = {};
|
|
975
|
+
}
|
|
976
|
+
properties.duration = duration[_DYN_TO_STRING /* @min:%2etoString */]();
|
|
977
|
+
_self.trackEvent({ name: name, properties: properties, measurements: measurements });
|
|
978
|
+
};
|
|
979
|
+
// initialize page view timing
|
|
980
|
+
_pageTracking = new Timing(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), "trackPageView");
|
|
981
|
+
_pageTracking.action = function (name, url, duration, properties, measurements) {
|
|
982
|
+
// duration must be a custom property in order for the collector to extract it
|
|
983
|
+
if (isNullOrUndefined(properties)) {
|
|
984
|
+
properties = {};
|
|
985
|
+
}
|
|
986
|
+
properties.duration = duration[_DYN_TO_STRING /* @min:%2etoString */]();
|
|
987
|
+
var pageViewItem = {
|
|
988
|
+
name: name,
|
|
989
|
+
uri: url,
|
|
990
|
+
properties: properties,
|
|
991
|
+
measurements: measurements
|
|
992
|
+
};
|
|
993
|
+
_self[_DYN_SEND_PAGE_VIEW_INTER2 /* @min:%2esendPageViewInternal */](pageViewItem, properties);
|
|
994
|
+
};
|
|
995
|
+
if (hasWindow()) {
|
|
996
|
+
_updateExceptionTracking();
|
|
997
|
+
_updateLocationChange();
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
catch (e) {
|
|
1001
|
+
// resetting the initialized state because of failure
|
|
1002
|
+
_self.setInitialized(false);
|
|
1003
|
+
throw e;
|
|
1004
|
+
}
|
|
1005
|
+
};
|
|
1006
|
+
_self._doTeardown = function (unloadCtx, unloadState) {
|
|
1007
|
+
_pageViewManager && _pageViewManager.teardown(unloadCtx, unloadState);
|
|
1008
|
+
// Just register to remove all events associated with this namespace
|
|
1009
|
+
eventOff(window, null, null, _evtNamespace);
|
|
1010
|
+
_initDefaults();
|
|
1011
|
+
};
|
|
1012
|
+
_self["_getDbgPlgTargets"] = function () {
|
|
1013
|
+
return [_errorHookCnt, _autoExceptionInstrumented];
|
|
1014
|
+
};
|
|
1015
|
+
function _populateDefaults(config) {
|
|
1016
|
+
// it is used for 1DS as well, so config type should be IConfiguration only
|
|
1017
|
+
var identifier = _self.identifier;
|
|
1018
|
+
var core = _self[_DYN_CORE /* @min:%2ecore */];
|
|
1019
|
+
_self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(config, function () {
|
|
1020
|
+
var ctx = createProcessTelemetryContext(null, config, core);
|
|
1021
|
+
_extConfig = ctx.getExtCfg(identifier, defaultValues);
|
|
1022
|
+
// make sure auto exception is instrumented only once and it won't be overriden by the following config changes
|
|
1023
|
+
_autoExceptionInstrumented = _autoExceptionInstrumented || config[_DYN_AUTO_EXCEPTION_INSTR9 /* @min:%2eautoExceptionInstrumented */] || _extConfig[_DYN_AUTO_EXCEPTION_INSTR9 /* @min:%2eautoExceptionInstrumented */];
|
|
1024
|
+
_expCfg = _extConfig.expCfg;
|
|
1025
|
+
_autoTrackPageVisitTime = _extConfig[_DYN_AUTO_TRACK_PAGE_VISI10 /* @min:%2eautoTrackPageVisitTime */];
|
|
1026
|
+
if (config.storagePrefix) {
|
|
1027
|
+
utlSetStoragePrefix(config.storagePrefix);
|
|
1028
|
+
}
|
|
1029
|
+
_updateStorageUsage(_extConfig);
|
|
1030
|
+
// _updateBrowserLinkTracking
|
|
1031
|
+
_isBrowserLinkTrackingEnabled = _extConfig[_DYN_IS_BROWSER_LINK_TRAC11 /* @min:%2eisBrowserLinkTrackingEnabled */];
|
|
1032
|
+
_addDefaultTelemetryInitializers();
|
|
1033
|
+
}));
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Log a page visit time
|
|
1037
|
+
* @param pageName - Name of page
|
|
1038
|
+
* @param pageVisitDuration - Duration of visit to the page in milliseconds
|
|
1039
|
+
*/
|
|
1040
|
+
function trackPageVisitTime(pageName, pageUrl, pageVisitTime) {
|
|
1041
|
+
var properties = { PageName: pageName, PageUrl: pageUrl };
|
|
1042
|
+
_self.trackMetric({
|
|
1043
|
+
name: "PageVisitTime",
|
|
1044
|
+
average: pageVisitTime,
|
|
1045
|
+
max: pageVisitTime,
|
|
1046
|
+
min: pageVisitTime,
|
|
1047
|
+
sampleCount: 1
|
|
1048
|
+
}, properties);
|
|
1049
|
+
}
|
|
1050
|
+
function _addDefaultTelemetryInitializers() {
|
|
1051
|
+
if (!_browserLinkInitializerAdded && _isBrowserLinkTrackingEnabled) {
|
|
1052
|
+
var browserLinkPaths_1 = ["/browserLinkSignalR/", "/__browserLink/"];
|
|
1053
|
+
var dropBrowserLinkRequests = function (envelope) {
|
|
1054
|
+
if (_isBrowserLinkTrackingEnabled && envelope.baseType === RemoteDependencyData[_DYN_DATA_TYPE /* @min:%2edataType */]) {
|
|
1055
|
+
var remoteData = envelope.baseData;
|
|
1056
|
+
if (remoteData) {
|
|
1057
|
+
for (var i = 0; i < browserLinkPaths_1[_DYN_LENGTH /* @min:%2elength */]; i++) {
|
|
1058
|
+
if (remoteData.target && strIndexOf(remoteData.target, browserLinkPaths_1[i]) >= 0) {
|
|
1059
|
+
return false;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
return true;
|
|
1065
|
+
};
|
|
1066
|
+
_self[_DYN__ADD_HOOK /* @min:%2e_addHook */](_self[_DYN_ADD_TELEMETRY_INITIA7 /* @min:%2eaddTelemetryInitializer */](dropBrowserLinkRequests));
|
|
1067
|
+
_browserLinkInitializerAdded = true;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
function _sendCORSException(exception, properties) {
|
|
1071
|
+
var telemetryItem = createTelemetryItem(exception, Exception[_DYN_DATA_TYPE /* @min:%2edataType */], Exception[_DYN_ENVELOPE_TYPE /* @min:%2eenvelopeType */], _self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), properties);
|
|
1072
|
+
_self[_DYN_CORE /* @min:%2ecore */][_DYN_TRACK /* @min:%2etrack */](telemetryItem);
|
|
1073
|
+
}
|
|
1074
|
+
function _updateExceptionTracking() {
|
|
1075
|
+
var _window = getWindow();
|
|
1076
|
+
var locn = getLocation(true);
|
|
1077
|
+
_self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extConfig, function () {
|
|
1078
|
+
_disableExceptionTracking = _extConfig.disableExceptionTracking;
|
|
1079
|
+
if (!_disableExceptionTracking && !_autoExceptionInstrumented && !_extConfig[_DYN_AUTO_EXCEPTION_INSTR9 /* @min:%2eautoExceptionInstrumented */]) {
|
|
1080
|
+
// We want to enable exception auto collection and it has not been done so yet
|
|
1081
|
+
_addHook(InstrumentEvent(_window, "onerror", {
|
|
1082
|
+
ns: _evtNamespace,
|
|
1083
|
+
rsp: function (callDetails, message, url, lineNumber, columnNumber, error) {
|
|
1084
|
+
if (!_disableExceptionTracking && callDetails.rslt !== true) {
|
|
1085
|
+
_self._onerror(Exception[_DYN__CREATE_AUTO_EXCEPTI6 /* @min:%2eCreateAutoException */](message, url, lineNumber, columnNumber, error, callDetails.evt));
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}, false));
|
|
1089
|
+
_errorHookCnt++;
|
|
1090
|
+
_autoExceptionInstrumented = true;
|
|
1091
|
+
}
|
|
1092
|
+
}));
|
|
1093
|
+
_addUnhandledPromiseRejectionTracking(_window, locn);
|
|
1094
|
+
}
|
|
1095
|
+
function _updateLocationChange() {
|
|
1096
|
+
var win = getWindow();
|
|
1097
|
+
var locn = getLocation(true);
|
|
1098
|
+
_self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extConfig, function () {
|
|
1099
|
+
_enableAutoRouteTracking = _extConfig[_DYN_ENABLE_AUTO_ROUTE_TR12 /* @min:%2eenableAutoRouteTracking */] === true;
|
|
1100
|
+
/**
|
|
1101
|
+
* Create a custom "locationchange" event which is triggered each time the history object is changed
|
|
1102
|
+
*/
|
|
1103
|
+
if (win && _enableAutoRouteTracking && !_historyListenerAdded && hasHistory()) {
|
|
1104
|
+
var _history = getHistory();
|
|
1105
|
+
if (isFunction(_history.pushState) && isFunction(_history.replaceState) && typeof Event !== strShimUndefined) {
|
|
1106
|
+
_addHistoryListener(win, _history, locn);
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
}));
|
|
1110
|
+
}
|
|
1111
|
+
function _getDistributedTraceCtx() {
|
|
1112
|
+
var distributedTraceCtx = null;
|
|
1113
|
+
if (_self[_DYN_CORE /* @min:%2ecore */] && _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx) {
|
|
1114
|
+
distributedTraceCtx = _self[_DYN_CORE /* @min:%2ecore */].getTraceCtx(false);
|
|
1115
|
+
}
|
|
1116
|
+
if (!distributedTraceCtx) {
|
|
1117
|
+
// Fallback when using an older Core and PropertiesPlugin
|
|
1118
|
+
var properties = _self[_DYN_CORE /* @min:%2ecore */].getPlugin(PropertiesPluginIdentifier);
|
|
1119
|
+
if (properties) {
|
|
1120
|
+
var context = properties.plugin.context;
|
|
1121
|
+
if (context) {
|
|
1122
|
+
distributedTraceCtx = createDistributedTraceContextFromTrace(context.telemetryTrace);
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
return distributedTraceCtx;
|
|
1127
|
+
}
|
|
1128
|
+
/**
|
|
1129
|
+
* Create a custom "locationchange" event which is triggered each time the history object is changed
|
|
1130
|
+
*/
|
|
1131
|
+
function _addHistoryListener(win, history, locn) {
|
|
1132
|
+
if (_historyListenerAdded) {
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
// Name Prefix is only referenced during the initial initialization and cannot be changed afterwards
|
|
1136
|
+
var namePrefix = _extConfig.namePrefix || "";
|
|
1137
|
+
function _popstateHandler() {
|
|
1138
|
+
if (_enableAutoRouteTracking) {
|
|
1139
|
+
_dispatchEvent(win, createDomEvent(namePrefix + "locationchange"));
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
function _locationChangeHandler() {
|
|
1143
|
+
// We always track the changes (if the handler is installed) to handle the feature being disabled between location changes
|
|
1144
|
+
if (_currUri) {
|
|
1145
|
+
_prevUri = _currUri;
|
|
1146
|
+
_currUri = locn && locn[_DYN_HREF /* @min:%2ehref */] || "";
|
|
1147
|
+
}
|
|
1148
|
+
else {
|
|
1149
|
+
_currUri = locn && locn[_DYN_HREF /* @min:%2ehref */] || "";
|
|
1150
|
+
}
|
|
1151
|
+
if (_enableAutoRouteTracking) {
|
|
1152
|
+
var distributedTraceCtx = _getDistributedTraceCtx();
|
|
1153
|
+
if (distributedTraceCtx) {
|
|
1154
|
+
distributedTraceCtx.setTraceId(generateW3CId());
|
|
1155
|
+
var traceLocationName = "_unknown_";
|
|
1156
|
+
if (locn && locn.pathname) {
|
|
1157
|
+
traceLocationName = locn.pathname + (locn.hash || "");
|
|
1158
|
+
}
|
|
1159
|
+
// This populates the ai.operation.name which has a maximum size of 1024 so we need to sanitize it
|
|
1160
|
+
distributedTraceCtx.setName(dataSanitizeString(_self[_DYN_DIAG_LOG /* @min:%2ediagLog */](), traceLocationName));
|
|
1161
|
+
}
|
|
1162
|
+
scheduleTimeout((function (uri) {
|
|
1163
|
+
// todo: override start time so that it is not affected by autoRoutePVDelay
|
|
1164
|
+
_self[_DYN_TRACK_PAGE_VIEW /* @min:%2etrackPageView */]({ refUri: uri, properties: { duration: 0 } }); // SPA route change loading durations are undefined, so send 0
|
|
1165
|
+
}).bind(_self, _prevUri), _self.autoRoutePVDelay);
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
_addHook(InstrumentEvent(history, "pushState", {
|
|
1169
|
+
ns: _evtNamespace,
|
|
1170
|
+
rsp: function () {
|
|
1171
|
+
if (_enableAutoRouteTracking) {
|
|
1172
|
+
_dispatchEvent(win, createDomEvent(namePrefix + "pushState"));
|
|
1173
|
+
_dispatchEvent(win, createDomEvent(namePrefix + "locationchange"));
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
}, true));
|
|
1177
|
+
_addHook(InstrumentEvent(history, "replaceState", {
|
|
1178
|
+
ns: _evtNamespace,
|
|
1179
|
+
rsp: function () {
|
|
1180
|
+
if (_enableAutoRouteTracking) {
|
|
1181
|
+
_dispatchEvent(win, createDomEvent(namePrefix + "replaceState"));
|
|
1182
|
+
_dispatchEvent(win, createDomEvent(namePrefix + "locationchange"));
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
}, true));
|
|
1186
|
+
eventOn(win, namePrefix + "popstate", _popstateHandler, _evtNamespace);
|
|
1187
|
+
eventOn(win, namePrefix + "locationchange", _locationChangeHandler, _evtNamespace);
|
|
1188
|
+
_historyListenerAdded = true;
|
|
1189
|
+
}
|
|
1190
|
+
function _addUnhandledPromiseRejectionTracking(_window, _location) {
|
|
1191
|
+
_self[_DYN__ADD_HOOK /* @min:%2e_addHook */](onConfigChange(_extConfig, function () {
|
|
1192
|
+
_enableUnhandledPromiseRejectionTracking = _extConfig[_DYN_ENABLE_UNHANDLED_PRO13 /* @min:%2eenableUnhandledPromiseRejectionTracking */] === true;
|
|
1193
|
+
_autoExceptionInstrumented = _autoExceptionInstrumented || _extConfig[_DYN_AUTO_UNHANDLED_PROMI14 /* @min:%2eautoUnhandledPromiseInstrumented */];
|
|
1194
|
+
if (_enableUnhandledPromiseRejectionTracking && !_autoUnhandledPromiseInstrumented) {
|
|
1195
|
+
// We want to enable exception auto collection and it has not been done so yet
|
|
1196
|
+
_addHook(InstrumentEvent(_window, "onunhandledrejection", {
|
|
1197
|
+
ns: _evtNamespace,
|
|
1198
|
+
rsp: function (callDetails, error) {
|
|
1199
|
+
if (_enableUnhandledPromiseRejectionTracking && callDetails.rslt !== true) { // handled could be typeof function
|
|
1200
|
+
_self._onerror(Exception[_DYN__CREATE_AUTO_EXCEPTI6 /* @min:%2eCreateAutoException */](_getReason(error), _location ? _location[_DYN_HREF /* @min:%2ehref */] : "", 0, 0, error, callDetails.evt));
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
}, false));
|
|
1204
|
+
_errorHookCnt++;
|
|
1205
|
+
_extConfig[_DYN_AUTO_UNHANDLED_PROMI14 /* @min:%2eautoUnhandledPromiseInstrumented */] = _autoUnhandledPromiseInstrumented = true;
|
|
1206
|
+
}
|
|
1207
|
+
}));
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* This method will throw exceptions in debug mode or attempt to log the error as a console warning.
|
|
1211
|
+
* @param severity - The severity of the log message
|
|
1212
|
+
* @param msgId - The log message.
|
|
1213
|
+
*/
|
|
1214
|
+
function _throwInternal(severity, msgId, msg, properties, isUserAct) {
|
|
1215
|
+
_self[_DYN_DIAG_LOG /* @min:%2ediagLog */]().throwInternal(severity, msgId, msg, properties, isUserAct);
|
|
1216
|
+
}
|
|
1217
|
+
function _initDefaults() {
|
|
1218
|
+
_eventTracking = null;
|
|
1219
|
+
_pageTracking = null;
|
|
1220
|
+
_pageViewManager = null;
|
|
1221
|
+
_pageViewPerformanceManager = null;
|
|
1222
|
+
_pageVisitTimeManager = null;
|
|
1223
|
+
_preInitTelemetryInitializers = null;
|
|
1224
|
+
_isBrowserLinkTrackingEnabled = false;
|
|
1225
|
+
_browserLinkInitializerAdded = false;
|
|
1226
|
+
_enableAutoRouteTracking = false;
|
|
1227
|
+
_historyListenerAdded = false;
|
|
1228
|
+
_disableExceptionTracking = false;
|
|
1229
|
+
_autoExceptionInstrumented = false;
|
|
1230
|
+
_enableUnhandledPromiseRejectionTracking = false;
|
|
1231
|
+
_autoUnhandledPromiseInstrumented = false;
|
|
1232
|
+
_autoTrackPageVisitTime = false;
|
|
1233
|
+
// array with max length of 2 that store current url and previous url for SPA page route change trackPageview use.
|
|
1234
|
+
var location = getLocation(true);
|
|
1235
|
+
_prevUri = location && location[_DYN_HREF /* @min:%2ehref */] || "";
|
|
1236
|
+
_currUri = null;
|
|
1237
|
+
_evtNamespace = null;
|
|
1238
|
+
_extConfig = null;
|
|
1239
|
+
_errorHookCnt = 0;
|
|
1240
|
+
// Define _self.config
|
|
1241
|
+
objDefine(_self, "config", {
|
|
1242
|
+
g: function () { return _extConfig; }
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
// For backward compatibility
|
|
1246
|
+
objDefine(_self, "_pageViewManager", { g: function () { return _pageViewManager; } });
|
|
1247
|
+
objDefine(_self, "_pageViewPerformanceManager", { g: function () { return _pageViewPerformanceManager; } });
|
|
1248
|
+
objDefine(_self, "_pageVisitTimeManager", { g: function () { return _pageVisitTimeManager; } });
|
|
1249
|
+
objDefine(_self, "_evtNamespace", { g: function () { return "." + _evtNamespace; } });
|
|
1250
|
+
});
|
|
1251
|
+
return _this;
|
|
1252
|
+
}
|
|
1253
|
+
// Removed Stub for AnalyticsPlugin.prototype.getCookieMgr.
|
|
1254
|
+
// Removed Stub for AnalyticsPlugin.prototype.processTelemetry.
|
|
1255
|
+
// Removed Stub for AnalyticsPlugin.prototype.trackEvent.
|
|
1256
|
+
// Removed Stub for AnalyticsPlugin.prototype.startTrackEvent.
|
|
1257
|
+
// Removed Stub for AnalyticsPlugin.prototype.stopTrackEvent.
|
|
1258
|
+
// Removed Stub for AnalyticsPlugin.prototype.trackTrace.
|
|
1259
|
+
// Removed Stub for AnalyticsPlugin.prototype.trackMetric.
|
|
1260
|
+
// Removed Stub for AnalyticsPlugin.prototype.trackPageView.
|
|
1261
|
+
// Removed Stub for AnalyticsPlugin.prototype.sendPageViewInternal.
|
|
1262
|
+
// Removed Stub for AnalyticsPlugin.prototype.sendPageViewPerformanceInternal.
|
|
1263
|
+
// Removed Stub for AnalyticsPlugin.prototype.trackPageViewPerformance.
|
|
1264
|
+
// Removed Stub for AnalyticsPlugin.prototype.startTrackPage.
|
|
1265
|
+
// Removed Stub for AnalyticsPlugin.prototype.stopTrackPage.
|
|
1266
|
+
// Removed Stub for AnalyticsPlugin.prototype.sendExceptionInternal.
|
|
1267
|
+
// Removed Stub for AnalyticsPlugin.prototype.trackException.
|
|
1268
|
+
// Removed Stub for AnalyticsPlugin.prototype._onerror.
|
|
1269
|
+
// Removed Stub for AnalyticsPlugin.prototype.addTelemetryInitializer.
|
|
1270
|
+
// Removed Stub for AnalyticsPlugin.prototype.initialize.
|
|
1271
|
+
AnalyticsPlugin.Version = '3.3.9'; // Not currently used anywhere
|
|
1272
|
+
return AnalyticsPlugin;
|
|
1273
|
+
}(BaseTelemetryPlugin));
|
|
1274
|
+
|
|
1275
|
+
export { AnalyticsPlugin as A };
|