@mapcomponents/react-maplibre 0.1.34 → 0.1.37
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/.babelrc +3 -0
- package/.github/workflows/storybook.yml +1 -1
- package/.storybook/.babelrc +26 -0
- package/.storybook/main.js +15 -1
- package/.storybook/mapcomponents_logo.png +0 -0
- package/CHANGELOG.md +16 -1
- package/config/env.js +106 -0
- package/config/getHttpsConfig.js +66 -0
- package/config/jest/babelTransform.js +29 -0
- package/config/jest/cssTransform.js +14 -0
- package/config/jest/fileTransform.js +40 -0
- package/config/modules.js +134 -0
- package/config/paths.js +75 -0
- package/config/pnpTs.js +35 -0
- package/config/webpack.config.js +757 -0
- package/config/webpackDevServer.config.js +130 -0
- package/coverage/clover.xml +822 -900
- package/coverage/coverage-final.json +23 -24
- package/coverage/lcov-report/index.html +135 -150
- package/coverage/lcov-report/src/components/MapLibreMap/{MapLibreMap.js.html → MapLibreMap.tsx.html} +77 -68
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +6 -6
- package/coverage/lcov-report/src/components/MlCreatePdfButton/{MlCreatePdfButton.js.html → MlCreatePdfButton.tsx.html} +40 -43
- package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +10 -10
- package/coverage/lcov-report/src/components/MlFeatureEditor/{MlFeatureEditor.js.html → MlFeatureEditor.tsx.html} +145 -85
- package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +21 -21
- package/coverage/lcov-report/src/components/{MlImageMarkerLayer/MlImageMarkerLayer.js.html → MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html} +141 -111
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +20 -20
- package/coverage/lcov-report/src/components/MlFollowGps/{MlFollowGps.js.html → MlFollowGps.tsx.html} +177 -138
- package/coverage/lcov-report/src/components/MlFollowGps/index.html +15 -15
- package/coverage/lcov-report/src/components/MlGPXViewer/{MlGPXViewer.js.html → MlGPXViewer.tsx.html} +134 -80
- package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/index.html +16 -16
- package/coverage/lcov-report/src/components/{MlLayer/MlLayer.js.html → MlGeoJsonLayer/MlGeoJsonLayer.tsx.html} +151 -154
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +19 -19
- package/coverage/lcov-report/src/components/{MlFillExtrusionLayer/MlFillExtrusionLayer.js.html → MlImageMarkerLayer/MlImageMarkerLayer.tsx.html} +151 -223
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +16 -16
- package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +229 -0
- package/coverage/lcov-report/src/components/MlLayer/index.html +21 -21
- package/coverage/lcov-report/src/components/MlLayerMagnify/{MlLayerMagnify.js.html → MlLayerMagnify.tsx.html} +134 -77
- package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +20 -20
- package/coverage/lcov-report/src/components/MlLayerSwipe/{MlLayerSwipe.js.html → MlLayerSwipe.tsx.html} +83 -41
- package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +2 -2
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +3 -15
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/{MlMarker.js.html → MlMarker.tsx.html} +89 -137
- package/coverage/lcov-report/src/components/MlMarker/index.html +10 -10
- package/coverage/lcov-report/src/components/MlNavigationCompass/{MlNavigationCompass.js.html → MlNavigationCompass.tsx.html} +76 -25
- package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +17 -17
- package/coverage/lcov-report/src/components/MlNavigationTools/{MlNavigationTools.js.html → MlNavigationTools.tsx.html} +67 -52
- package/coverage/lcov-report/src/components/MlNavigationTools/index.html +10 -10
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/MlScaleReference.js.html +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/index.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/MlShareMapState.js.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +3 -3
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +5 -5
- package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/{MlTransitionGeoJsonLayer.js.html → MlTransitionGeoJsonLayer.tsx.html} +127 -118
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +11 -11
- package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/{MlVectorTileLayer.js.html → MlVectorTileLayer.tsx.html} +59 -11
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +2 -2
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/{MlWmsLayer.js.html → MlWmsLayer.tsx.html} +56 -11
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +2 -2
- package/coverage/lcov-report/src/components/MlWmsLoader/{MlWmsLoader.js.html → MlWmsLoader.tsx.html} +102 -78
- package/coverage/lcov-report/src/components/MlWmsLoader/index.html +8 -8
- package/coverage/lcov-report/src/hooks/index.html +44 -29
- package/coverage/lcov-report/src/{components/MlGeoJsonLayer/MlGeoJsonLayer.js.html → hooks/useLayer.ts.html} +328 -184
- package/coverage/lcov-report/src/hooks/{useMap.js.html → useMap.ts.html} +140 -50
- package/coverage/lcov-report/src/hooks/{useMapState.js.html → useMapState.ts.html} +166 -61
- package/coverage/lcov-report/src/hooks/useWms.js.html +1 -1
- package/coverage/lcov-report/src/index.html +15 -15
- package/coverage/lcov-report/src/{i18n.js.html → index.ts.html} +50 -32
- package/coverage/lcov.info +1540 -1669
- package/dist/index.esm.css +195 -0
- package/dist/index.esm.js +42894 -4862
- package/dist/index.esm.js.map +1 -1
- package/docs-build/0.d0c23b79.iframe.bundle.js +2 -0
- package/docs-build/0.d0c23b79.iframe.bundle.js.map +1 -0
- package/docs-build/0.fd1aa3ea21956d993519.manager.bundle.js +1 -0
- package/docs-build/1.34075652.iframe.bundle.js +10 -0
- package/docs-build/1.34075652.iframe.bundle.js.map +1 -0
- package/docs-build/16.ca488dae.iframe.bundle.js +2 -0
- package/docs-build/16.ca488dae.iframe.bundle.js.map +1 -0
- package/docs-build/17.e40eac7f.iframe.bundle.js +17 -0
- package/docs-build/17.e40eac7f.iframe.bundle.js.map +1 -0
- package/docs-build/18.62af0912.iframe.bundle.js +14 -0
- package/docs-build/18.62af0912.iframe.bundle.js.map +1 -0
- package/docs-build/19.0a217189.iframe.bundle.js +2 -0
- package/docs-build/19.0a217189.iframe.bundle.js.map +1 -0
- package/docs-build/2.f15ae19a.iframe.bundle.js +2 -0
- package/docs-build/2.f15ae19a.iframe.bundle.js.map +1 -0
- package/docs-build/20.4c43e27c.iframe.bundle.js +4 -0
- package/docs-build/20.4c43e27c.iframe.bundle.js.map +1 -0
- package/docs-build/21.19c21085.iframe.bundle.js +22 -0
- package/docs-build/21.19c21085.iframe.bundle.js.map +1 -0
- package/docs-build/3.5dd9e88b.iframe.bundle.js +2 -0
- package/docs-build/3.5dd9e88b.iframe.bundle.js.map +1 -0
- package/docs-build/4.f741dafe1833630ec8bf.manager.bundle.js +2 -0
- package/docs-build/4.f741dafe1833630ec8bf.manager.bundle.js.LICENSE.txt +8 -0
- package/docs-build/5.d4de191e7daeefb036ca.manager.bundle.js +1 -0
- package/docs-build/6.2b178c5444648ee5c0fa.manager.bundle.js +2 -0
- package/docs-build/6.2b178c5444648ee5c0fa.manager.bundle.js.LICENSE.txt +12 -0
- package/docs-build/7.7c16aea8ec7ea6e91994.manager.bundle.js +1 -0
- package/docs-build/8.52fa838fdf937b29676a.manager.bundle.js +1 -0
- package/docs-build/assets/dop.png +0 -0
- package/docs-build/assets/historic.png +0 -0
- package/docs-build/assets/marker.png +0 -0
- package/docs-build/assets/osm.png +0 -0
- package/docs-build/assets/sample.gpx +716 -0
- package/docs-build/{.gitkeep → catalogue/.gitkeep} +0 -0
- package/docs-build/catalogue/mc_meta.json +1 -0
- package/docs-build/favicon.ico +0 -0
- package/docs-build/iframe.html +348 -0
- package/docs-build/index.html +59 -0
- package/docs-build/logo.png +0 -0
- package/docs-build/main.8a7ec710ea1c16b5e13f.manager.bundle.js +1 -0
- package/docs-build/main~24120820.ba6665a8.iframe.bundle.js +2 -0
- package/docs-build/main~24120820.ba6665a8.iframe.bundle.js.map +1 -0
- package/docs-build/manifest.json +25 -0
- package/docs-build/robots.txt +3 -0
- package/docs-build/runtime~main.67aa1de2d72f40a81164.manager.bundle.js +1 -0
- package/docs-build/static/media/mapcomponents_logo.98b01a05.png +0 -0
- package/docs-build/static/media/wg-marker.bf3eeb2d.png +0 -0
- package/docs-build/stories.json +331 -0
- package/docs-build/thumbnails/MapLibreMap.png +0 -0
- package/docs-build/thumbnails/MlCameraFollowPath.png +0 -0
- package/docs-build/thumbnails/MlCreatePdfButton.png +0 -0
- package/docs-build/thumbnails/MlDeckGlLayer.png +0 -0
- package/docs-build/thumbnails/MlDeckGlTerrainLayer.png +0 -0
- package/docs-build/thumbnails/MlDemoDashboard.png +0 -0
- package/docs-build/thumbnails/MlFeatureEditor.png +0 -0
- package/docs-build/thumbnails/MlFillExtrusionLayer.png +0 -0
- package/docs-build/thumbnails/MlFollowGps.png +0 -0
- package/docs-build/thumbnails/MlGPXViewer.png +0 -0
- package/docs-build/thumbnails/MlGeoJsonLayer.png +0 -0
- package/docs-build/thumbnails/MlHillshadeLayer.png +0 -0
- package/docs-build/thumbnails/MlIconLayer.png +0 -0
- package/docs-build/thumbnails/MlLaermkarte.png +0 -0
- package/docs-build/thumbnails/MlLayerMagnify.png +0 -0
- package/docs-build/thumbnails/MlLayerSwipe.png +0 -0
- package/docs-build/thumbnails/MlMapDrawTools.png +0 -0
- package/docs-build/thumbnails/MlMobilerImker.png +0 -0
- package/docs-build/thumbnails/MlNavigationCompass.png +0 -0
- package/docs-build/thumbnails/MlNavigationTools.png +0 -0
- package/docs-build/thumbnails/MlOsmLayer.png +0 -0
- package/docs-build/thumbnails/MlScaleReference.png +0 -0
- package/docs-build/thumbnails/MlSpatialElevationProfile.png +0 -0
- package/docs-build/thumbnails/MlThreeJsLayer.png +0 -0
- package/docs-build/thumbnails/MlTransitionGeoJsonLayer.png +0 -0
- package/docs-build/thumbnails/MlVectorTileLayer.png +0 -0
- package/docs-build/thumbnails/MlWanderApp.png +0 -0
- package/docs-build/thumbnails/MlWmsLayer.png +0 -0
- package/docs-build/thumbnails/MlWmsLoader.png +0 -0
- package/docs-build/vendors~main.351900838c49e9200954.manager.bundle.js +2 -0
- package/docs-build/vendors~main.351900838c49e9200954.manager.bundle.js.LICENSE.txt +101 -0
- package/docs-build/vendors~main~0ad7406a.a6abfed7.iframe.bundle.js +8 -0
- package/docs-build/vendors~main~0ad7406a.a6abfed7.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~0f485567.1d7a15b7.iframe.bundle.js +2 -0
- package/docs-build/vendors~main~0f485567.1d7a15b7.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~41a6ab2c.525ecc56.iframe.bundle.js +2 -0
- package/docs-build/vendors~main~41a6ab2c.525ecc56.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~52589227.1d1558cd.iframe.bundle.js +8 -0
- package/docs-build/vendors~main~52589227.1d1558cd.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~73914085.227c6747.iframe.bundle.js +293 -0
- package/docs-build/vendors~main~73914085.227c6747.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~9c5b28f6.f02cc741.iframe.bundle.js +7 -0
- package/docs-build/vendors~main~9c5b28f6.f02cc741.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~b5906859.4083ac60.iframe.bundle.js +21 -0
- package/docs-build/vendors~main~b5906859.4083ac60.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~b8f44717.7a612c34.iframe.bundle.js +89 -0
- package/docs-build/vendors~main~b8f44717.7a612c34.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~b9cf3951.45da142d.iframe.bundle.js +68 -0
- package/docs-build/vendors~main~b9cf3951.45da142d.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~d939e436.92c27fbf.iframe.bundle.js +2 -0
- package/docs-build/vendors~main~d939e436.92c27fbf.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~dab50aa4.b0d58038.iframe.bundle.js +107 -0
- package/docs-build/vendors~main~dab50aa4.b0d58038.iframe.bundle.js.map +1 -0
- package/package.json +131 -113
- package/public/favicon.ico +0 -0
- package/public/logo.png +0 -0
- package/rollup.config.js +26 -3
- package/scripts/start.js +166 -0
- package/scripts/test.js +53 -0
- package/src/components/MapLibreMap/MapLibreMap.stories.js +14 -5
- package/src/components/MapLibreMap/MapLibreMap.test.js +1 -1
- package/src/components/MapLibreMap/{MapLibreMap.js → MapLibreMap.tsx} +40 -37
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.test.js +3 -3
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +636 -0
- package/src/components/MlComponentTemplate/MlComponentTemplate.stories.js +0 -2
- package/src/components/MlComponentTemplate/MlComponentTemplate.tsx +42 -0
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.stories.js +0 -5
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx +51 -0
- package/src/components/MlCreatePdfButton/lib/{createPdf.js → createPdf.ts} +26 -23
- package/src/components/MlCreatePdfButton/lib/{nominatimMap.js → nominatimMap.ts} +3 -3
- package/src/components/MlFeatureEditor/MlFeatureEditor.tsx +139 -0
- package/src/components/MlFeatureEditor/custom-direct-select-mode.js +12 -8
- package/src/components/MlFeatureEditor/custom-polygon-mode.js +9 -5
- package/src/components/MlFeatureEditor/custom-select-mode.js +11 -7
- package/src/components/MlFeatureEditor/lib/LICENSE.md +18 -0
- package/src/components/MlFeatureEditor/lib/common_selectors.js +4 -0
- package/src/components/MlFeatureEditor/lib/constants.js +4 -0
- package/src/components/MlFeatureEditor/lib/constrain_feature_movement.js +4 -0
- package/src/components/MlFeatureEditor/lib/create_midpoint.js +4 -0
- package/src/components/MlFeatureEditor/lib/create_supplementary_points.js +4 -0
- package/src/components/MlFeatureEditor/lib/create_vertex.js +4 -0
- package/src/components/MlFeatureEditor/lib/double_click_zoom.js +4 -0
- package/src/components/MlFeatureEditor/lib/euclidean_distance.js +4 -0
- package/src/components/MlFeatureEditor/lib/features_at.js +4 -0
- package/src/components/MlFeatureEditor/lib/get_features_and_set_cursor.js +4 -0
- package/src/components/MlFeatureEditor/lib/is_click.js +4 -0
- package/src/components/MlFeatureEditor/lib/is_event_at_coordinates.js +4 -0
- package/src/components/MlFeatureEditor/lib/is_tap.js +4 -0
- package/src/components/MlFeatureEditor/lib/map_event_to_bounding_box.js +4 -0
- package/src/components/MlFeatureEditor/lib/mode_handler.js +4 -0
- package/src/components/MlFeatureEditor/lib/mouse_event_point.js +4 -0
- package/src/components/MlFeatureEditor/lib/move_features.js +4 -0
- package/src/components/MlFeatureEditor/lib/sort_features.js +4 -0
- package/src/components/MlFeatureEditor/lib/string_set.js +4 -0
- package/src/components/MlFeatureEditor/lib/string_sets_are_equal.js +4 -0
- package/src/components/MlFeatureEditor/lib/theme.js +4 -0
- package/src/components/MlFeatureEditor/lib/to_dense_array.js +4 -0
- package/src/components/MlFeatureEditor/lib/utils.js +4 -0
- package/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.stories.js +6 -11
- package/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx +85 -0
- package/src/components/MlFollowGps/MlFollowGps.stories.js +0 -2
- package/src/components/MlFollowGps/{MlFollowGps.js → MlFollowGps.tsx} +99 -86
- package/src/components/MlGPXViewer/{MlGPXViewer.js → MlGPXViewer.tsx} +68 -50
- package/src/components/MlGPXViewer/util/GeoJsonContext.ts +13 -0
- package/src/components/MlGPXViewer/util/{GeoJsonProvider.js → GeoJsonProvider.tsx} +3 -7
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.js +8 -3
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx +106 -0
- package/src/components/MlGeoJsonLayer/util/{getDefaultLayerTypeByGeometry.js → getDefaultLayerTypeByGeometry.ts} +6 -1
- package/src/components/MlGeoJsonLayer/util/{getDefaultPaintPropsByType.js → getDefaultPaintPropsByType.ts} +1 -1
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.js +1 -4
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx +129 -0
- package/src/components/MlLayer/MlLayer.stories.js +0 -2
- package/src/components/MlLayer/MlLayer.tsx +48 -0
- package/src/components/MlLayerMagnify/MlLayerMagnify.stories.js +3 -3
- package/src/components/MlLayerMagnify/{MlLayerMagnify.js → MlLayerMagnify.tsx} +62 -43
- package/src/components/MlLayerSwipe/MlLayerSwipe.stories.js +0 -2
- package/src/components/MlLayerSwipe/{MlLayerSwipe.js → MlLayerSwipe.tsx} +38 -24
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.js +0 -4
- package/src/components/MlMarker/MlMarker.tsx +140 -0
- package/src/components/MlNavigationCompass/{MlNavigationCompass.js → MlNavigationCompass.tsx} +27 -10
- package/src/components/MlNavigationTools/{MlNavigationTools.js → MlNavigationTools.tsx} +37 -32
- package/src/components/MlTransitionGeoJsonLayer/{MlTransitionGeoJsonLayer.js → MlTransitionGeoJsonLayer.tsx} +76 -73
- package/src/components/MlVectorTileLayer/{MlVectorTileLayer.js → MlVectorTileLayer.tsx} +23 -7
- package/src/components/MlWmsLayer/{MlWmsLayer.js → MlWmsLayer.tsx} +22 -7
- package/src/components/MlWmsLoader/{MlWmsLoader.js → MlWmsLoader.tsx} +55 -47
- package/src/custom.d.tsx +26 -0
- package/src/hooks/useLayer.ts +221 -0
- package/src/hooks/{useMap.js → useMap.ts} +48 -17
- package/src/hooks/{useMapState.js → useMapState.ts} +42 -7
- package/src/{index.js → index.ts} +15 -8
- package/tsconfig.json +18 -24
- package/.env +0 -1
- package/.storybook/main.bck.js +0 -56
- package/babel.config.json +0 -4
- package/coverage/lcov-report/src/translations/english.js.html +0 -94
- package/coverage/lcov-report/src/translations/german.js.html +0 -94
- package/coverage/lcov-report/src/translations/index.html +0 -131
- package/jest.config.json +0 -16
- package/jsdoc.json +0 -21
- package/public/assets/3D/posttower.gltf +0 -103
- package/public/assets/3D/posttower_simple.gltf +0 -103
- package/public/assets/3D/posttower_wh.gltf.glb +0 -0
- package/public/bee.png +0 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.js +0 -528
- package/src/components/MlComponentTemplate/MlComponentTemplate.js +0 -39
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.js +0 -52
- package/src/components/MlFeatureEditor/MlFeatureEditor.js +0 -119
- package/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.js +0 -153
- package/src/components/MlGPXViewer/util/GeoJsonContext.js +0 -6
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.js +0 -173
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.js +0 -75
- package/src/components/MlLayer/MlLayer.js +0 -107
- package/src/components/MlLayerMagnify/utils/compareMagnify.js +0 -173
- package/src/components/MlLayerSwipe/utils/swipeCompare.js +0 -220
- package/src/components/MlMarker/MlMarker.js +0 -156
- package/src/components/index.js +0 -6
- package/src/i18n.js +0 -28
- package/src/react-app-env.d.ts +0 -1
- package/src/stories/IntroductionCore.stories.mdx +0 -3
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/src/stories/components/ComponentTeaser.js +0 -64
- package/src/translations/english.js +0 -4
- package/src/translations/german.js +0 -4
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[9],[,,,,,,,function(t,e,r){(function(e){var r;r="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=r}).call(this,r(74))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";r.d(e,"a",(function(){return Y})),r.d(e,"b",(function(){return gt})),r.d(e,"c",(function(){return f})),r.d(e,"d",(function(){return mt})),r.d(e,"e",(function(){return vt})),r.d(e,"f",(function(){return p}));var n=r(1),i=r(149),o=(r(210),r(291)),a=r(114),s=r(207),u=r(5),c={}.constructor;function l(t){if(null==t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(l);if(t.constructor!==c)return t;var e={};for(var r in t)e[r]=l(t[r]);return e}function f(t,e,r){void 0===t&&(t="unnamed");var n=r.jss,i=l(e),o=n.plugins.onCreateRule(t,i,r);return o||(t[0],null)}var h=function(t,e){for(var r="",n=0;n<t.length&&"!important"!==t[n];n++)r&&(r+=e),r+=t[n];return r},p=function(t,e){if(void 0===e&&(e=!1),!Array.isArray(t))return t;var r="";if(Array.isArray(t[0]))for(var n=0;n<t.length&&"!important"!==t[n];n++)r&&(r+=", "),r+=h(t[n]," ");else r=h(t,", ");return e||"!important"!==t[t.length-1]||(r+=" !important"),r};function d(t){return t&&!1===t.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function g(t,e){for(var r="",n=0;n<e;n++)r+=" ";return r+t}function v(t,e,r){void 0===r&&(r={});var n="";if(!e)return n;var i=r.indent,o=void 0===i?0:i,a=e.fallbacks;!1===r.format&&(o=-1/0);var s=d(r),u=s.linebreak,c=s.space;if(t&&o++,a)if(Array.isArray(a))for(var l=0;l<a.length;l++){var f=a[l];for(var h in f){var v=f[h];null!=v&&(n&&(n+=u),n+=g(h+":"+c+p(v)+";",o))}}else for(var m in a){var b=a[m];null!=b&&(n&&(n+=u),n+=g(m+":"+c+p(b)+";",o))}for(var y in e){var w=e[y];null!=w&&"fallbacks"!==y&&(n&&(n+=u),n+=g(y+":"+c+p(w)+";",o))}return(n||r.allowEmpty)&&t?(n&&(n=""+u+n+u),g(""+t+c+"{"+n,--o)+g("}",o)):n}var m=/([[\].#*$><+~=|^:(),"'`\s])/g,b="undefined"!=typeof CSS&&CSS.escape,y=function(t){return b?b(t):t.replace(m,"\\$1")},w=function(){function t(t,e,r){this.type="style",this.isProcessed=!1;var n=r.sheet,i=r.Renderer;this.key=t,this.options=r,this.style=e,n?this.renderer=n.renderer:i&&(this.renderer=new i)}return t.prototype.prop=function(t,e,r){if(void 0===e)return this.style[t];var n=!!r&&r.force;if(!n&&this.style[t]===e)return this;var i=e;r&&!1===r.process||(i=this.options.jss.plugins.onChangeValue(e,t,this));var o=null==i||!1===i,a=t in this.style;if(o&&!a&&!n)return this;var s=o&&a;if(s?delete this.style[t]:this.style[t]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,t):this.renderer.setProperty(this.renderable,t,i),this;var u=this.options.sheet;return u&&u.attached,this},t}(),x=function(t){function e(e,r,n){var i;i=t.call(this,e,r,n)||this;var o=n.selector,a=n.scoped,u=n.sheet,c=n.generateId;return o?i.selectorText=o:!1!==a&&(i.id=c(Object(s.a)(Object(s.a)(i)),u),i.selectorText="."+y(i.id)),i}Object(a.a)(e,t);var r=e.prototype;return r.applyTo=function(t){var e=this.renderer;if(e){var r=this.toJSON();for(var n in r)e.setProperty(t,n,r[n])}return this},r.toJSON=function(){var t={};for(var e in this.style){var r=this.style[e];"object"!=typeof r?t[e]=r:Array.isArray(r)&&(t[e]=p(r))}return t},r.toString=function(t){var e=this.options.sheet,r=!!e&&e.options.link?Object(n.a)({},t,{allowEmpty:!0}):t;return v(this.selectorText,this.style,r)},Object(o.a)(e,[{key:"selector",set:function(t){if(t!==this.selectorText){this.selectorText=t;var e=this.renderer,r=this.renderable;if(r&&e)e.setSelector(r,t)||e.replaceRule(r,this)}},get:function(){return this.selectorText}}]),e}(w),A={onCreateRule:function(t,e,r){return"@"===t[0]||r.parent&&"keyframes"===r.parent.type?null:new x(t,e,r)}},N={indent:1,children:!0},L=/@([\w-]+)/,S=function(){function t(t,e,r){this.type="conditional",this.isProcessed=!1,this.key=t;var i=t.match(L);for(var o in this.at=i?i[1]:"unknown",this.query=r.name||"@"+this.at,this.options=r,this.rules=new Y(Object(n.a)({},r,{parent:this})),e)this.rules.add(o,e[o]);this.rules.process()}var e=t.prototype;return e.getRule=function(t){return this.rules.get(t)},e.indexOf=function(t){return this.rules.indexOf(t)},e.addRule=function(t,e,r){var n=this.rules.add(t,e,r);return n?(this.options.jss.plugins.onProcessRule(n),n):null},e.replaceRule=function(t,e,r){var n=this.rules.replace(t,e,r);return n&&this.options.jss.plugins.onProcessRule(n),n},e.toString=function(t){void 0===t&&(t=N);var e=d(t).linebreak;if(null==t.indent&&(t.indent=N.indent),null==t.children&&(t.children=N.children),!1===t.children)return this.query+" {}";var r=this.rules.toString(t);return r?this.query+" {"+e+r+e+"}":""},t}(),_=/@media|@supports\s+/,P={onCreateRule:function(t,e,r){return _.test(t)?new S(t,e,r):null}},k={indent:1,children:!0},j=/@keyframes\s+([\w-]+)/,O=function(){function t(t,e,r){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=t.match(j);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=r;var o=r.scoped,a=r.sheet,s=r.generateId;for(var u in this.id=!1===o?this.name:y(s(this,a)),this.rules=new Y(Object(n.a)({},r,{parent:this})),e)this.rules.add(u,e[u],Object(n.a)({},r,{parent:this}));this.rules.process()}return t.prototype.toString=function(t){void 0===t&&(t=k);var e=d(t).linebreak;if(null==t.indent&&(t.indent=k.indent),null==t.children&&(t.children=k.children),!1===t.children)return this.at+" "+this.id+" {}";var r=this.rules.toString(t);return r&&(r=""+e+r+e),this.at+" "+this.id+" {"+r+"}"},t}(),I=/@keyframes\s+/,C=/\$([\w-]+)/g,F=function(t,e){return"string"==typeof t?t.replace(C,(function(t,r){return r in e?e[r]:t})):t},R=function(t,e,r){var n=t[e],i=F(n,r);i!==n&&(t[e]=i)},E={onCreateRule:function(t,e,r){return"string"==typeof t&&I.test(t)?new O(t,e,r):null},onProcessStyle:function(t,e,r){return"style"===e.type&&r?("animation-name"in t&&R(t,"animation-name",r.keyframes),"animation"in t&&R(t,"animation",r.keyframes),t):t},onChangeValue:function(t,e,r){var n=r.options.sheet;if(!n)return t;switch(e){case"animation":case"animation-name":return F(t,n.keyframes);default:return t}}},M=function(t){function e(){return t.apply(this,arguments)||this}return Object(a.a)(e,t),e.prototype.toString=function(t){var e=this.options.sheet,r=!!e&&e.options.link?Object(n.a)({},t,{allowEmpty:!0}):t;return v(this.key,this.style,r)},e}(w),B={onCreateRule:function(t,e,r){return r.parent&&"keyframes"===r.parent.type?new M(t,e,r):null}},q=function(){function t(t,e,r){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=t,this.style=e,this.options=r}return t.prototype.toString=function(t){var e=d(t).linebreak;if(Array.isArray(this.style)){for(var r="",n=0;n<this.style.length;n++)r+=v(this.at,this.style[n]),this.style[n+1]&&(r+=e);return r}return v(this.at,this.style,t)},t}(),T=/@font-face/,D={onCreateRule:function(t,e,r){return T.test(t)?new q(t,e,r):null}},z=function(){function t(t,e,r){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=t,this.style=e,this.options=r}return t.prototype.toString=function(t){return v(this.key,this.style,t)},t}(),U={onCreateRule:function(t,e,r){return"@viewport"===t||"@-ms-viewport"===t?new z(t,e,r):null}},H=function(){function t(t,e,r){this.type="simple",this.isProcessed=!1,this.key=t,this.value=e,this.options=r}return t.prototype.toString=function(t){if(Array.isArray(this.value)){for(var e="",r=0;r<this.value.length;r++)e+=this.key+" "+this.value[r]+";",this.value[r+1]&&(e+="\n");return e}return this.key+" "+this.value+";"},t}(),V={"@charset":!0,"@import":!0,"@namespace":!0},W=[A,P,E,B,D,U,{onCreateRule:function(t,e,r){return t in V?new H(t,e,r):null}}],G={process:!0},J={force:!0,process:!0},Y=function(){function t(t){this.map={},this.raw={},this.index=[],this.counter=0,this.options=t,this.classes=t.classes,this.keyframes=t.keyframes}var e=t.prototype;return e.add=function(t,e,r){var i=this.options,o=i.parent,a=i.sheet,s=i.jss,u=i.Renderer,c=i.generateId,l=i.scoped,h=Object(n.a)({classes:this.classes,parent:o,sheet:a,jss:s,Renderer:u,generateId:c,scoped:l,name:t,keyframes:this.keyframes,selector:void 0},r),p=t;t in this.raw&&(p=t+"-d"+this.counter++),this.raw[p]=e,p in this.classes&&(h.selector="."+y(this.classes[p]));var d=f(p,e,h);if(!d)return null;this.register(d);var g=void 0===h.index?this.index.length:h.index;return this.index.splice(g,0,d),d},e.replace=function(t,e,r){var i=this.get(t),o=this.index.indexOf(i);i&&this.remove(i);var a=r;return-1!==o&&(a=Object(n.a)({},r,{index:o})),this.add(t,e,a)},e.get=function(t){return this.map[t]},e.remove=function(t){this.unregister(t),delete this.raw[t.key],this.index.splice(this.index.indexOf(t),1)},e.indexOf=function(t){return this.index.indexOf(t)},e.process=function(){var t=this.options.jss.plugins;this.index.slice(0).forEach(t.onProcessRule,t)},e.register=function(t){this.map[t.key]=t,t instanceof x?(this.map[t.selector]=t,t.id&&(this.classes[t.key]=t.id)):t instanceof O&&this.keyframes&&(this.keyframes[t.name]=t.id)},e.unregister=function(t){delete this.map[t.key],t instanceof x?(delete this.map[t.selector],delete this.classes[t.key]):t instanceof O&&delete this.keyframes[t.name]},e.update=function(){var t,e,r;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],r=arguments.length<=2?void 0:arguments[2]):(e=arguments.length<=0?void 0:arguments[0],r=arguments.length<=1?void 0:arguments[1],t=null),t)this.updateOne(this.get(t),e,r);else for(var n=0;n<this.index.length;n++)this.updateOne(this.index[n],e,r)},e.updateOne=function(e,r,n){void 0===n&&(n=G);var i=this.options,o=i.jss.plugins,a=i.sheet;if(e.rules instanceof t)e.rules.update(r,n);else{var s=e.style;if(o.onUpdate(r,e,a,n),n.process&&s&&s!==e.style){for(var u in o.onProcessStyle(e.style,e,a),e.style){var c=e.style[u];c!==s[u]&&e.prop(u,c,J)}for(var l in s){var f=e.style[l],h=s[l];null==f&&f!==h&&e.prop(l,null,J)}}}},e.toString=function(t){for(var e="",r=this.options.sheet,n=!!r&&r.options.link,i=d(t).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(t);(a||n)&&(e&&(e+=i),e+=a)}return e},t}(),X=function(){function t(t,e){for(var r in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Object(n.a)({},e,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),e.Renderer&&(this.renderer=new e.Renderer(this)),this.rules=new Y(this.options),t)this.rules.add(r,t[r]);this.rules.process()}var e=t.prototype;return e.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(t,e,r){var n=this.queue;this.attached&&!n&&(this.queue=[]);var i=this.rules.add(t,e,r);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(n?n.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},e.replaceRule=function(t,e,r){var n=this.rules.get(t);if(!n)return this.addRule(t,e,r);var i=this.rules.replace(t,e,r);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?n.renderable&&this.renderer.replaceRule(n.renderable,i):this.renderer.deleteRule(n)),i):i:(this.deployed=!1,i)},e.insertRule=function(t){this.renderer&&this.renderer.insertRule(t)},e.addRules=function(t,e){var r=[];for(var n in t){var i=this.addRule(n,t[n],e);i&&r.push(i)}return r},e.getRule=function(t){return this.rules.get(t)},e.deleteRule=function(t){var e="object"==typeof t?t:this.rules.get(t);return!(!e||this.attached&&!e.renderable)&&(this.rules.remove(e),!(this.attached&&e.renderable&&this.renderer)||this.renderer.deleteRule(e.renderable))},e.indexOf=function(t){return this.rules.indexOf(t)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var t;return(t=this.rules).update.apply(t,arguments),this},e.updateOne=function(t,e,r){return this.rules.updateOne(t,e,r),this},e.toString=function(t){return this.rules.toString(t)},t}(),$=function(){function t(){this.plugins={internal:[],external:[]},this.registry={}}var e=t.prototype;return e.onCreateRule=function(t,e,r){for(var n=0;n<this.registry.onCreateRule.length;n++){var i=this.registry.onCreateRule[n](t,e,r);if(i)return i}return null},e.onProcessRule=function(t){if(!t.isProcessed){for(var e=t.options.sheet,r=0;r<this.registry.onProcessRule.length;r++)this.registry.onProcessRule[r](t,e);t.style&&this.onProcessStyle(t.style,t,e),t.isProcessed=!0}},e.onProcessStyle=function(t,e,r){for(var n=0;n<this.registry.onProcessStyle.length;n++)e.style=this.registry.onProcessStyle[n](e.style,e,r)},e.onProcessSheet=function(t){for(var e=0;e<this.registry.onProcessSheet.length;e++)this.registry.onProcessSheet[e](t)},e.onUpdate=function(t,e,r,n){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](t,e,r,n)},e.onChangeValue=function(t,e,r){for(var n=t,i=0;i<this.registry.onChangeValue.length;i++)n=this.registry.onChangeValue[i](n,e,r);return n},e.use=function(t,e){void 0===e&&(e={queue:"external"});var r=this.plugins[e.queue];-1===r.indexOf(t)&&(r.push(t),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(t,e){for(var r in e)r in t&&t[r].push(e[r]);return t}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},t}(),K=new(function(){function t(){this.registry=[]}var e=t.prototype;return e.add=function(t){var e=this.registry,r=t.options.index;if(-1===e.indexOf(t))if(0===e.length||r>=this.index)e.push(t);else for(var n=0;n<e.length;n++)if(e[n].options.index>r)return void e.splice(n,0,t)},e.reset=function(){this.registry=[]},e.remove=function(t){var e=this.registry.indexOf(t);this.registry.splice(e,1)},e.toString=function(t){for(var e=void 0===t?{}:t,r=e.attached,n=Object(u.a)(e,["attached"]),i=d(n).linebreak,o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=r&&s.attached!==r||(o&&(o+=i),o+=s.toString(n))}return o},Object(o.a)(t,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),t}()),Z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),Q="2f1acc6c3a606b082e5eef5e54414ffb";null==Z[Q]&&(Z[Q]=0);var tt=Z[Q]++,et=function(t){void 0===t&&(t={});var e=0;return function(r,n){e+=1;var i="",o="";return n&&(n.options.classNamePrefix&&(o=n.options.classNamePrefix),null!=n.options.jss.id&&(i=String(n.options.jss.id))),t.minify?""+(o||"c")+tt+i+e:o+r.key+"-"+tt+(i?"-"+i:"")+"-"+e}},rt=function(t){var e;return function(){return e||(e=t()),e}},nt=function(t,e){try{return t.attributeStyleMap?t.attributeStyleMap.get(e):t.style.getPropertyValue(e)}catch(t){return""}},it=function(t,e,r){try{var n=r;if(Array.isArray(r)&&(n=p(r,!0),"!important"===r[r.length-1]))return t.style.setProperty(e,n,"important"),!0;t.attributeStyleMap?t.attributeStyleMap.set(e,n):t.style.setProperty(e,n)}catch(t){return!1}return!0},ot=function(t,e){try{t.attributeStyleMap?t.attributeStyleMap.delete(e):t.style.removeProperty(e)}catch(t){}},at=function(t,e){return t.selectorText=e,t.selectorText===e},st=rt((function(){return document.querySelector("head")}));function ut(t){var e=K.registry;if(e.length>0){var r=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(n.attached&&n.options.index>e.index&&n.options.insertionPoint===e.insertionPoint)return n}return null}(e,t);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if((r=function(t,e){for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.attached&&n.options.insertionPoint===e.insertionPoint)return n}return null}(e,t))&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=t.insertionPoint;if(n&&"string"==typeof n){var i=function(t){for(var e=st(),r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];if(8===n.nodeType&&n.nodeValue.trim()===t)return n}return null}(n);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var ct=rt((function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null})),lt=function(t,e,r){try{"insertRule"in t?t.insertRule(e,r):"appendRule"in t&&t.appendRule(e)}catch(t){return!1}return t.cssRules[r]},ft=function(t,e){var r=t.cssRules.length;return void 0===e||e>r?r:e},ht=function(){function t(t){this.getPropertyValue=nt,this.setProperty=it,this.removeProperty=ot,this.setSelector=at,this.hasInsertedRules=!1,this.cssRules=[],t&&K.add(t),this.sheet=t;var e,r=this.sheet?this.sheet.options:{},n=r.media,i=r.meta,o=r.element;this.element=o||((e=document.createElement("style")).textContent="\n",e),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),i&&this.element.setAttribute("data-meta",i);var a=ct();a&&this.element.setAttribute("nonce",a)}var e=t.prototype;return e.attach=function(){if(!this.element.parentNode&&this.sheet){!function(t,e){var r=e.insertionPoint,n=ut(e);if(!1!==n&&n.parent)n.parent.insertBefore(t,n.node);else if(r&&"number"==typeof r.nodeType){var i=r,o=i.parentNode;o&&o.insertBefore(t,i.nextSibling)}else st().appendChild(t)}(this.element,this.sheet.options);var t=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&t&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var t=this.element.parentNode;t&&t.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},e.deploy=function(){var t=this.sheet;t&&(t.options.link?this.insertRules(t.rules):this.element.textContent="\n"+t.toString()+"\n")},e.insertRules=function(t,e){for(var r=0;r<t.index.length;r++)this.insertRule(t.index[r],r,e)},e.insertRule=function(t,e,r){if(void 0===r&&(r=this.element.sheet),t.rules){var n=t,i=r;if("conditional"===t.type||"keyframes"===t.type){var o=ft(r,e);if(!1===(i=lt(r,n.toString({children:!1}),o)))return!1;this.refCssRule(t,o,i)}return this.insertRules(n.rules,i),i}var a=t.toString();if(!a)return!1;var s=ft(r,e),u=lt(r,a,s);return!1!==u&&(this.hasInsertedRules=!0,this.refCssRule(t,s,u),u)},e.refCssRule=function(t,e,r){t.renderable=r,t.options.parent instanceof X&&this.cssRules.splice(e,0,r)},e.deleteRule=function(t){var e=this.element.sheet,r=this.indexOf(t);return-1!==r&&(e.deleteRule(r),this.cssRules.splice(r,1),!0)},e.indexOf=function(t){return this.cssRules.indexOf(t)},e.replaceRule=function(t,e){var r=this.indexOf(t);return-1!==r&&(this.element.sheet.deleteRule(r),this.cssRules.splice(r,1),this.insertRule(e,r))},e.getRules=function(){return this.element.sheet.cssRules},t}(),pt=0,dt=function(){function t(t){this.id=pt++,this.version="10.9.0",this.plugins=new $,this.options={id:{minify:!1},createGenerateId:et,Renderer:i.a?ht:null,plugins:[]},this.generateId=et({minify:!1});for(var e=0;e<W.length;e++)this.plugins.use(W[e],{queue:"internal"});this.setup(t)}var e=t.prototype;return e.setup=function(t){return void 0===t&&(t={}),t.createGenerateId&&(this.options.createGenerateId=t.createGenerateId),t.id&&(this.options.id=Object(n.a)({},this.options.id,t.id)),(t.createGenerateId||t.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=t.insertionPoint&&(this.options.insertionPoint=t.insertionPoint),"Renderer"in t&&(this.options.Renderer=t.Renderer),t.plugins&&this.use.apply(this,t.plugins),this},e.createStyleSheet=function(t,e){void 0===e&&(e={});var r=e.index;"number"!=typeof r&&(r=0===K.index?0:K.index+1);var i=new X(t,Object(n.a)({},e,{jss:this,generateId:e.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:r}));return this.plugins.onProcessSheet(i),i},e.removeStyleSheet=function(t){return t.detach(),K.remove(t),this},e.createRule=function(t,e,r){if(void 0===e&&(e={}),void 0===r&&(r={}),"object"==typeof t)return this.createRule(void 0,t,e);var i=Object(n.a)({},r,{name:t,jss:this,Renderer:this.options.Renderer});i.generateId||(i.generateId=this.generateId),i.classes||(i.classes={}),i.keyframes||(i.keyframes={});var o=f(t,e,i);return o&&this.plugins.onProcessRule(o),o},e.use=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.forEach((function(e){t.plugins.use(e)})),this},t}(),gt=function(t){return new dt(t)},vt="object"==typeof CSS&&null!=CSS&&"number"in CSS;function mt(t){var e=null;for(var r in t){var n=t[r],i=typeof n;if("function"===i)e||(e={}),e[r]=n;else if("object"===i&&null!==n&&!Array.isArray(n)){var o=mt(n);o&&(e||(e={}),e[r]=o)}}return e}
|
|
2
|
+
/**
|
|
3
|
+
* A better abstraction over CSS.
|
|
4
|
+
*
|
|
5
|
+
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
|
|
6
|
+
* @website https://github.com/cssinjs/jss
|
|
7
|
+
* @license MIT
|
|
8
|
+
*/gt()},,,,,,,,,,function(t,e,r){var n=r(142),i=r(387),o=r(137),a=Function.prototype,s=Object.prototype,u=a.toString,c=s.hasOwnProperty,l=u.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=n(t))return!1;var e=i(t);if(null===e)return!0;var r=c.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==l}},,,,,function(t,e,r){var n=r(388),i=r(863),o=r(475);t.exports=function(t,e){var r={};return e=o(e,3),i(t,(function(t,i,o){n(r,i,e(t,i,o))})),r}},,,,,,,,function(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(309);t.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},,,,function(t,e){var r=Array.isArray;t.exports=r},,,,,,,,,,,,function(t,e,r){var n=r(446),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},,,,,,,,,,,,,,,function(t,e,r){"use strict";var n=r(310);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},,,,,,,,,,,,,,,function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},,,,,function(t,e,r){var n=r(182),i=r(803),o=r(804),a=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},function(t,e,r){var n=r(841),i=r(844);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},,,,,,function(t,e,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i="object"===("undefined"==typeof window?"undefined":n(window))&&"object"===("undefined"==typeof document?"undefined":n(document))&&9===document.nodeType;e.a=i},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){var n=r(107).Symbol;t.exports=n},,,,,,,,,,,,,,,,,,function(t,e,r){var n=r(297);t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},,,,function(t,e,r){var n=r(142),i=r(181);t.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";var n=r(309);t.exports=function(){return n()&&!!Symbol.toStringTag}},,,,,,,,,,,,,,,,,,function(t,e,r){var n=r(802);t.exports=function(t){return null==t?"":n(t)}},,,,,,function(t,e,r){var n=r(95),i=r(352),o=r(835),a=r(256);t.exports=function(t,e){return n(t)?t:i(t,e)?[t]:o(a(t))}},function(t,e,r){var n=r(143)(Object,"create");t.exports=n},function(t,e,r){var n=r(849),i=r(850),o=r(851),a=r(852),s=r(853);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,r){var n=r(354);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e,r){var n=r(855);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){var n=r(472),i=r(870),o=r(474);t.exports=function(t){return o(t)?n(t):i(t)}},,function(t,e,r){var n=r(142),i=r(137);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==n(t)}},,,,,,,,,,,,function(t,e,r){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},,,,,function(t,e,r){"use strict";var n=String.prototype.valueOf,i=Object.prototype.toString,o=r(238)();t.exports=function(t){return"string"==typeof t||"object"==typeof t&&(o?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object String]"===i.call(t))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){var n=r(262),i=r(200);t.exports=function(t,e){for(var r=0,o=(e=n(e,t)).length;null!=t&&r<o;)t=t[i(e[r++])];return r&&r==o?t:void 0}},function(t,e,r){var n=r(95),i=r(297),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,r){var n=r(838),i=r(854),o=r(856),a=r(857),s=r(858);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(143)(r(107),"Map");t.exports=n},,function(t,e,r){var n=r(867),i=r(137),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e){var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&r.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},,function(t,e,r){"use strict";var n=r(969),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return n.isMemo(t)?a:s[t.$$typeof]||i}s[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[n.Memo]=a;var c=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(d){var i=p(r);i&&i!==d&&t(e,i,n)}var a=l(r);f&&(a=a.concat(f(r)));for(var s=u(e),g=u(r),v=0;v<a.length;++v){var m=a[v];if(!(o[m]||n&&n[m]||g&&g[m]||s&&s[m])){var b=h(r,m);try{c(e,m,b)}catch(t){}}}}return e}},function(t,e,r){"use strict";var n=Object.prototype.toString;if(r(91)()){var i=Symbol.prototype.toString,o=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&o.test(i.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},function(t,e,r){"use strict";var n,i,o,a,s=r(44),u=r(238)();if(u){n=s("Object.prototype.hasOwnProperty"),i=s("RegExp.prototype.exec"),o={};var c=function(){throw o};a={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=c)}var l=s("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=u?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!(e&&n(e,"value")))return!1;try{i(t,a)}catch(t){return t===o}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},function(t,e,r){var n=r(797),i=r(809),o=n((function(t,e,r){return t+(r?" ":"")+i(e)}));t.exports=o},function(t,e,r){var n=r(351);t.exports=function(t,e,r){var i=null==t?void 0:n(t,e);return void 0===i?r:i}},,,function(t,e,r){var n=r(902),i=r(904)((function(t,e){return null==t?{}:n(t,e)}));t.exports=i},,,,,,,,,,,,,,,,,,function(t,e,r){var n=r(470)(Object.getPrototypeOf,Object);t.exports=n},function(t,e,r){var n=r(471);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){(function(t){var n=r(107),i=r(868),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,r(299)(t))},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(264),i=r(874),o=r(875),a=r(876),s=r(877),u=r(878);function c(t){var e=this.__data__=new n(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e,r){var n=r(886),i=r(479),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),n(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=s},,,,,,,,,,function(t,e,r){"use strict";var n,i,o=Function.prototype.toString,a="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof a&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw i}}),i={},a((function(){throw 42}),null,n)}catch(t){t!==i&&(a=null)}else a=null;var s=/^\s*class\b/,u=function(t){try{var e=o.call(t);return s.test(e)}catch(t){return!1}},c=Object.prototype.toString,l="function"==typeof Symbol&&!!Symbol.toStringTag,f="object"==typeof document&&void 0===document.all&&void 0!==document.all?document.all:{};t.exports=a?function(t){if(t===f)return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;try{a(t,null,n)}catch(t){if(t!==i)return!1}return!u(t)}:function(t){if(t===f)return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if("function"==typeof t&&!t.prototype)return!0;if(l)return function(t){try{return!u(t)&&(o.call(t),!0)}catch(t){return!1}}(t);if(u(t))return!1;var e=c.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(this,r(74))},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},function(t,e){var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return r.test(t)}},,,,,,,,,,,,,,,,,,,function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},,,function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(143),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,r){var n=r(866),i=r(357),o=r(95),a=r(389),s=r(358),u=r(473),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),l=!r&&i(t),f=!r&&!l&&a(t),h=!r&&!l&&!f&&u(t),p=r||l||f||h,d=p?n(t.length,String):[],g=d.length;for(var v in t)!e&&!c.call(t,v)||p&&("length"==v||f&&("offset"==v||"parent"==v)||h&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,g))||d.push(v);return d}},function(t,e,r){var n=r(869),i=r(590),o=r(591),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},function(t,e,r){var n=r(204),i=r(359);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},function(t,e,r){var n=r(872),i=r(891),o=r(483),a=r(95),s=r(894);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):n(t):s(t)}},function(t,e,r){var n=r(879),i=r(137);t.exports=function t(e,r,o,a,s){return e===r||(null==e||null==r||!i(e)&&!i(r)?e!=e&&r!=r:n(e,r,o,a,t,s))}},function(t,e,r){var n=r(598),i=r(882),o=r(599);t.exports=function(t,e,r,a,s,u){var c=1&r,l=t.length,f=e.length;if(l!=f&&!(c&&f>l))return!1;var h=u.get(t),p=u.get(e);if(h&&p)return h==e&&p==t;var d=-1,g=!0,v=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++d<l;){var m=t[d],b=e[d];if(a)var y=c?a(b,m,d,e,t,u):a(m,b,d,t,e,u);if(void 0!==y){if(y)continue;g=!1;break}if(v){if(!i(e,(function(t,e){if(!o(v,e)&&(m===t||s(m,t,r,a,u)))return v.push(e)}))){g=!1;break}}else if(m!==b&&!s(m,b,r,a,u)){g=!1;break}}return u.delete(t),u.delete(e),g}},function(t,e,r){var n=r(360),i=r(95);t.exports=function(t,e,r){var o=e(t);return i(t)?o:n(o,r(t))}},function(t,e){t.exports=function(){return[]}},function(t,e,r){var n=r(181);t.exports=function(t){return t==t&&!n(t)}},function(t,e){t.exports=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}},function(t,e,r){var n=r(892),i=r(893);t.exports=function(t,e){return null!=t&&i(t,e,n)}},function(t,e){t.exports=function(t){return t}},,,,,function(t,e,r){var n=r(351),i=r(903),o=r(262);t.exports=function(t,e,r){for(var a=-1,s=e.length,u={};++a<s;){var c=e[a],l=n(t,c);r(l,c)&&i(u,o(c,t),l)}return u}},function(t,e,r){var n=r(447),i=r(475),o=r(488),a=r(603);t.exports=function(t,e){if(null==t)return{};var r=n(a(t),(function(t){return[t]}));return e=i(e),o(t,r,(function(t,r){return e(t,r[0])}))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){t.exports=function(t){if(!t)return!1;var e=r.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var r=Object.prototype.toString},,,,,,,,,function(t,e,r){"use strict";t.exports=r(933)},,,function(t,e,r){var n=r(142),i=r(95),o=r(137);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==n(t)}},,,,,,,,,,,function(t,e,r){"use strict";(function(t){var n=r(41),i=r.n(n),o=r(219),a=function(){return"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this}();function s(){a.console&&"function"==typeof a.console.log&&a.console.log.apply(a.console,arguments)}var u={log:s,warn:function(t){a.console&&("function"==typeof a.console.warn?a.console.warn.apply(a.console,arguments):s.call(null,arguments))},error:function(t){a.console&&("function"==typeof a.console.error?a.console.error.apply(a.console,arguments):s(t))}};function c(t,e,r){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){d(n.response,e,r)},n.onerror=function(){u.error("could not download file")},n.send()}function l(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function f(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(r){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var h,p,d=a.saveAs||("object"!==("undefined"==typeof window?"undefined":i()(window))||window!==a?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,e,r){var n=a.URL||a.webkitURL,i=document.createElement("a");e=e||t.name||"download",i.download=e,i.rel="noopener","string"==typeof t?(i.href=t,i.origin!==location.origin?l(i.href)?c(t,e,r):f(i,i.target="_blank"):f(i)):(i.href=n.createObjectURL(t),setTimeout((function(){n.revokeObjectURL(i.href)}),4e4),setTimeout((function(){f(i)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,e,r){if(e=e||t.name||"download","string"==typeof t)if(l(t))c(t,e,r);else{var n=document.createElement("a");n.href=t,n.target="_blank",setTimeout((function(){f(n)}))}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!==i()(e)&&(u.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,r),e)}:function(t,e,r,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),"string"==typeof t)return c(t,e,r);var o="application/octet-stream"===t.type,s=/constructor/i.test(a.HTMLElement)||a.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||o&&s)&&"object"===("undefined"==typeof FileReader?"undefined":i()(FileReader))){var l=new FileReader;l.onloadend=function(){var t=l.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=t:location=t,n=null},l.readAsDataURL(t)}else{var f=a.URL||a.webkitURL,h=f.createObjectURL(t);n?n.location=h:location.href=h,n=null,setTimeout((function(){f.revokeObjectURL(h)}),4e4)}});
|
|
9
|
+
/**
|
|
10
|
+
* A class to parse color values
|
|
11
|
+
* @author Stoyan Stefanov <sstoo@gmail.com>
|
|
12
|
+
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
|
13
|
+
* @license Use it if you like it
|
|
14
|
+
*/function g(t){var e;t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var r=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],n=0;n<r.length;n++){var i=r[n].re,o=r[n].process,a=i.exec(t);a&&(e=o(a),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),r=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==r.length&&(r="0"+r),"#"+t+e+r
|
|
15
|
+
/**
|
|
16
|
+
* @license
|
|
17
|
+
* Joseph Myers does not specify a particular license for his work.
|
|
18
|
+
*
|
|
19
|
+
* Author: Joseph Myers
|
|
20
|
+
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
|
21
|
+
*
|
|
22
|
+
* Modified by: Owen Leong
|
|
23
|
+
*/}}function v(t,e){var r=t[0],n=t[1],i=t[2],o=t[3];r=b(r,n,i,o,e[0],7,-680876936),o=b(o,r,n,i,e[1],12,-389564586),i=b(i,o,r,n,e[2],17,606105819),n=b(n,i,o,r,e[3],22,-1044525330),r=b(r,n,i,o,e[4],7,-176418897),o=b(o,r,n,i,e[5],12,1200080426),i=b(i,o,r,n,e[6],17,-1473231341),n=b(n,i,o,r,e[7],22,-45705983),r=b(r,n,i,o,e[8],7,1770035416),o=b(o,r,n,i,e[9],12,-1958414417),i=b(i,o,r,n,e[10],17,-42063),n=b(n,i,o,r,e[11],22,-1990404162),r=b(r,n,i,o,e[12],7,1804603682),o=b(o,r,n,i,e[13],12,-40341101),i=b(i,o,r,n,e[14],17,-1502002290),r=y(r,n=b(n,i,o,r,e[15],22,1236535329),i,o,e[1],5,-165796510),o=y(o,r,n,i,e[6],9,-1069501632),i=y(i,o,r,n,e[11],14,643717713),n=y(n,i,o,r,e[0],20,-373897302),r=y(r,n,i,o,e[5],5,-701558691),o=y(o,r,n,i,e[10],9,38016083),i=y(i,o,r,n,e[15],14,-660478335),n=y(n,i,o,r,e[4],20,-405537848),r=y(r,n,i,o,e[9],5,568446438),o=y(o,r,n,i,e[14],9,-1019803690),i=y(i,o,r,n,e[3],14,-187363961),n=y(n,i,o,r,e[8],20,1163531501),r=y(r,n,i,o,e[13],5,-1444681467),o=y(o,r,n,i,e[2],9,-51403784),i=y(i,o,r,n,e[7],14,1735328473),r=w(r,n=y(n,i,o,r,e[12],20,-1926607734),i,o,e[5],4,-378558),o=w(o,r,n,i,e[8],11,-2022574463),i=w(i,o,r,n,e[11],16,1839030562),n=w(n,i,o,r,e[14],23,-35309556),r=w(r,n,i,o,e[1],4,-1530992060),o=w(o,r,n,i,e[4],11,1272893353),i=w(i,o,r,n,e[7],16,-155497632),n=w(n,i,o,r,e[10],23,-1094730640),r=w(r,n,i,o,e[13],4,681279174),o=w(o,r,n,i,e[0],11,-358537222),i=w(i,o,r,n,e[3],16,-722521979),n=w(n,i,o,r,e[6],23,76029189),r=w(r,n,i,o,e[9],4,-640364487),o=w(o,r,n,i,e[12],11,-421815835),i=w(i,o,r,n,e[15],16,530742520),r=x(r,n=w(n,i,o,r,e[2],23,-995338651),i,o,e[0],6,-198630844),o=x(o,r,n,i,e[7],10,1126891415),i=x(i,o,r,n,e[14],15,-1416354905),n=x(n,i,o,r,e[5],21,-57434055),r=x(r,n,i,o,e[12],6,1700485571),o=x(o,r,n,i,e[3],10,-1894986606),i=x(i,o,r,n,e[10],15,-1051523),n=x(n,i,o,r,e[1],21,-2054922799),r=x(r,n,i,o,e[8],6,1873313359),o=x(o,r,n,i,e[15],10,-30611744),i=x(i,o,r,n,e[6],15,-1560198380),n=x(n,i,o,r,e[13],21,1309151649),r=x(r,n,i,o,e[4],6,-145523070),o=x(o,r,n,i,e[11],10,-1120210379),i=x(i,o,r,n,e[2],15,718787259),n=x(n,i,o,r,e[9],21,-343485551),t[0]=j(r,t[0]),t[1]=j(n,t[1]),t[2]=j(i,t[2]),t[3]=j(o,t[3])}function m(t,e,r,n,i,o){return e=j(j(e,t),j(n,o)),j(e<<i|e>>>32-i,r)}function b(t,e,r,n,i,o,a){return m(e&r|~e&n,t,e,i,o,a)}function y(t,e,r,n,i,o,a){return m(e&n|r&~n,t,e,i,o,a)}function w(t,e,r,n,i,o,a){return m(e^r^n,t,e,i,o,a)}function x(t,e,r,n,i,o,a){return m(r^(e|~n),t,e,i,o,a)}function A(t){var e,r=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)v(n,N(t.substring(e-64,e)));t=t.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(v(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*r,v(n,i),n}function N(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return r}h=a.atob.bind(a),p=a.btoa.bind(a);var L="0123456789abcdef".split("");function S(t){for(var e="",r=0;r<4;r++)e+=L[t>>8*r+4&15]+L[t>>8*r&15];return e}function _(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function P(t){return A(t).map(_).join("")}var k="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e<t.length;e++)t[e]=S(t[e]);return t.join("")}(A("hello"));function j(t,e){if(k){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}return t+e&4294967295}
|
|
24
|
+
/**
|
|
25
|
+
* @license
|
|
26
|
+
* FPDF is released under a permissive license: there is no usage restriction.
|
|
27
|
+
* You may embed it freely in your application (commercial or not), with or
|
|
28
|
+
* without modifications.
|
|
29
|
+
*
|
|
30
|
+
* Reference: http://www.fpdf.org/en/script/script37.php
|
|
31
|
+
*/function O(t,e){var r,n,i,o;if(t!==r){for(var a=(i=t,o=1+(256/t.length>>0),new Array(o+1).join(i)),s=[],u=0;u<256;u++)s[u]=u;var c=0;for(u=0;u<256;u++){var l=s[u];c=(c+l+a.charCodeAt(u))%256,s[u]=s[c],s[c]=l}r=t,n=s}else s=n;var f=e.length,h=0,p=0,d="";for(u=0;u<f;u++)p=(p+(l=s[h=(h+1)%256]))%256,s[h]=s[p],s[p]=l,a=s[(s[h]+s[p])%256],d+=String.fromCharCode(e.charCodeAt(u)^a);return d}
|
|
32
|
+
/**
|
|
33
|
+
* @license
|
|
34
|
+
* Licensed under the MIT License.
|
|
35
|
+
* http://opensource.org/licenses/mit-license
|
|
36
|
+
* Author: Owen Leong (@owenl131)
|
|
37
|
+
* Date: 15 Oct 2020
|
|
38
|
+
* References:
|
|
39
|
+
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
|
40
|
+
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
|
41
|
+
* http://www.fpdf.org/en/script/script37.php
|
|
42
|
+
*/var I={print:4,modify:8,copy:16,"annot-forms":32};function C(t,e,r,n){this.v=1,this.r=2;var i=192;t.forEach((function(t){if(void 0!==I.perm)throw new Error("Invalid permission: "+t);i+=I[t]})),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";var o=(e+this.padding).substr(0,32),a=(r+this.padding).substr(0,32);this.O=this.processOwnerPassword(o,a),this.P=-(1+(255^i)),this.encryptionKey=P(o+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=O(this.encryptionKey,this.padding)}function F(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",r=t.length,n=0;n<r;n++){var i=t.charCodeAt(n);e+=i<33||35===i||37===i||40===i||41===i||47===i||60===i||62===i||91===i||93===i||123===i||125===i||i>126?"#"+("0"+i.toString(16)).slice(-2):t[n]}return e}function R(t){if("object"!==i()(t))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,r,n){if(n=n||!1,"string"!=typeof t||"function"!=typeof r||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var i=Math.random().toString(35);return e[t][i]=[r,!!n],i},this.unsubscribe=function(t){for(var r in e)if(e[r][t])return delete e[r][t],0===Object.keys(e[r]).length&&delete e[r],!0;return!1},this.publish=function(r){if(e.hasOwnProperty(r)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var o in e[r]){var s=e[r][o];try{s[0].apply(t,n)}catch(r){a.console&&u.error("jsPDF PubSub Error",r.message,r)}s[1]&&i.push(o)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function E(t){if(!(this instanceof E))return new E(t);var e="opacity,stroke-opacity".split(",");for(var r in t)t.hasOwnProperty(r)&&e.indexOf(r)>=0&&(this[r]=t[r]);this.id="",this.objectNumber=-1}function M(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function B(t,e,r,n,i){if(!(this instanceof B))return new B(t,e,r,n,i);this.type="axial"===t?2:3,this.coords=e,this.colors=r,M.call(this,n,i)}function q(t,e,r,n,i){if(!(this instanceof q))return new q(t,e,r,n,i);this.boundingBox=t,this.xStep=e,this.yStep=r,this.stream="",this.cloneIndex=0,M.call(this,n,i)}function T(t){var e,r="string"==typeof arguments[0]?arguments[0]:"p",n=arguments[1],o=arguments[2],s=arguments[3],c=[],l=1,f=16,h="S",v=null;"object"===i()(t=t||{})&&(r=t.orientation,n=t.unit||n,o=t.format||o,s=t.compress||t.compressPdf||s,null!==(v=t.encryption||null)&&(v.userPassword=v.userPassword||"",v.ownerPassword=v.ownerPassword||"",v.userPermissions=v.userPermissions||[]),l="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(e=t.precision),void 0!==t.floatPrecision&&(f=t.floatPrecision),h=t.defaultPathOperation||"S"),c=t.filters||(!0===s?["FlateEncode"]:c),n=n||"mm",r=(""+(r||"P")).toLowerCase();var m=t.putOnlyUsedFonts||!1,b={},y={internal:{},__private__:{}};y.__private__.PubSub=R;var w="1.3",x=y.__private__.getPdfVersion=function(){return w};y.__private__.setPdfVersion=function(t){w=t};var A={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};y.__private__.getPageFormats=function(){return A};var N=y.__private__.getPageFormat=function(t){return A[t]};o=o||"a4";var L={COMPAT:"compat",ADVANCED:"advanced"},S=L.COMPAT;function _(){this.saveGraphicsState(),ft(new Wt(_t,0,0,-_t,0,Tr()*_t).toString()+" cm"),this.setFontSize(this.getFontSize()/_t),h="n",S=L.ADVANCED}function P(){this.restoreGraphicsState(),h="S",S=L.COMPAT}var k=y.__private__.combineFontStyleAndFontWeight=function(t,e){if("bold"==t&&"normal"==e||"bold"==t&&400==e||"normal"==t&&"italic"==e||"bold"==t&&"italic"==e)throw new Error("Invalid Combination of fontweight and fontstyle");return e&&(t=400==e||"normal"===e?"italic"===t?"italic":"normal":700!=e&&"bold"!==e||"normal"!==t?(700==e?"bold":e)+""+t:"bold"),t};y.advancedAPI=function(t){var e=S===L.COMPAT;return e&&_.call(this),"function"!=typeof t||(t(this),e&&P.call(this)),this},y.compatAPI=function(t){var e=S===L.ADVANCED;return e&&P.call(this),"function"!=typeof t||(t(this),e&&_.call(this)),this},y.isAdvancedAPI=function(){return S===L.ADVANCED};var j,O=function(t){if(S!==L.ADVANCED)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},I=y.roundToPrecision=y.__private__.roundToPrecision=function(t,r){var n=e||r;if(isNaN(t)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};j=y.hpf=y.__private__.hpf="number"==typeof f?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return I(t,f)}:"smart"===f?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return I(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return I(t,16)};var M=y.f2=y.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return I(t,2)},D=y.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return I(t,3)},z=y.scale=y.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return S===L.COMPAT?t*_t:S===L.ADVANCED?t:void 0},U=function(t){return S===L.COMPAT?Tr()-t:S===L.ADVANCED?t:void 0},H=function(t){return z(U(t))};y.__private__.setPrecision=y.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(e=parseInt(t,10))};var V,W="00000000000000000000000000000000",G=y.__private__.getFileId=function(){return W},J=y.__private__.setFileId=function(t){return W=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():W.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==v&&(Je=new C(v.userPermissions,v.userPassword,v.ownerPassword,W)),W};y.setFileId=function(t){return J(t),this},y.getFileId=function(){return G()};var Y=y.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),r=e<0?"+":"-",n=Math.floor(Math.abs(e/60)),i=Math.abs(e%60),o=[r,Q(n),"'",Q(i),"'"].join("");return["D:",t.getFullYear(),Q(t.getMonth()+1),Q(t.getDate()),Q(t.getHours()),Q(t.getMinutes()),Q(t.getSeconds()),o].join("")},X=y.__private__.convertPDFDateToDate=function(t){var e=parseInt(t.substr(2,4),10),r=parseInt(t.substr(6,2),10)-1,n=parseInt(t.substr(8,2),10),i=parseInt(t.substr(10,2),10),o=parseInt(t.substr(12,2),10),a=parseInt(t.substr(14,2),10);return new Date(e,r,n,i,o,a,0)},$=y.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=Y(t);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");e=t}return V=e},K=y.__private__.getCreationDate=function(t){var e=V;return"jsDate"===t&&(e=X(V)),e};y.setCreationDate=function(t){return $(t),this},y.getCreationDate=function(t){return K(t)};var Z,Q=y.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},tt=y.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},et=0,rt=[],nt=[],it=0,ot=[],at=[],st=!1,ut=nt,ct=function(){et=0,it=0,nt=[],rt=[],ot=[],Qt=$t(),te=$t()};y.__private__.setCustomOutputDestination=function(t){st=!0,ut=t};var lt=function(t){st||(ut=t)};y.__private__.resetCustomOutputDestination=function(){st=!1,ut=nt};var ft=y.__private__.out=function(t){return t=t.toString(),it+=t.length+1,ut.push(t),ut},ht=y.__private__.write=function(t){return ft(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},pt=y.__private__.getArrayBuffer=function(t){for(var e=t.length,r=new ArrayBuffer(e),n=new Uint8Array(r);e--;)n[e]=t.charCodeAt(e);return r},dt=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];y.__private__.getStandardFonts=function(){return dt};var gt=t.fontSize||16;y.__private__.setFontSize=y.setFontSize=function(t){return gt=S===L.ADVANCED?t/_t:t,this};var vt,mt=y.__private__.getFontSize=y.getFontSize=function(){return S===L.COMPAT?gt:gt*_t},bt=t.R2L||!1;y.__private__.setR2L=y.setR2L=function(t){return bt=t,this},y.__private__.getR2L=y.getR2L=function(){return bt};var yt,wt=y.__private__.setZoomMode=function(t){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))vt=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');vt=t}else vt=parseInt(t,10)};y.__private__.getZoomMode=function(){return vt};var xt,At=y.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');yt=t};y.__private__.getPageMode=function(){return yt};var Nt=y.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');xt=t};y.__private__.getLayoutMode=function(){return xt},y.__private__.setDisplayMode=y.setDisplayMode=function(t,e,r){return wt(t),Nt(e),At(r),this};var Lt={title:"",subject:"",author:"",keywords:"",creator:""};y.__private__.getDocumentProperty=function(t){if(-1===Object.keys(Lt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Lt[t]},y.__private__.getDocumentProperties=function(){return Lt},y.__private__.setDocumentProperties=y.setProperties=y.setDocumentProperties=function(t){for(var e in Lt)Lt.hasOwnProperty(e)&&t[e]&&(Lt[e]=t[e]);return this},y.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(Lt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Lt[t]=e};var St,_t,Pt,kt,jt,Ot={},It={},Ct=[],Ft={},Rt={},Et={},Mt={},Bt=null,qt=0,Tt=[],Dt=new R(y),zt=t.hotfixes||[],Ut={},Ht={},Vt=[],Wt=function t(e,r,n,i,o,a){if(!(this instanceof t))return new t(e,r,n,i,o,a);isNaN(e)&&(e=1),isNaN(r)&&(r=0),isNaN(n)&&(n=0),isNaN(i)&&(i=1),isNaN(o)&&(o=0),isNaN(a)&&(a=0),this._matrix=[e,r,n,i,o,a]};Object.defineProperty(Wt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Wt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Wt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Wt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Wt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Wt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Wt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Wt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Wt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Wt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Wt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Wt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Wt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Wt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Wt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Wt.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Wt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(j).join(t)},Wt.prototype.multiply=function(t){var e=t.sx*this.sx+t.shy*this.shx,r=t.sx*this.shy+t.shy*this.sy,n=t.shx*this.sx+t.sy*this.shx,i=t.shx*this.shy+t.sy*this.sy,o=t.tx*this.sx+t.ty*this.shx+this.tx,a=t.tx*this.shy+t.ty*this.sy+this.ty;return new Wt(e,r,n,i,o,a)},Wt.prototype.decompose=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,o=this.ty,a=Math.sqrt(t*t+e*e),s=(t/=a)*r+(e/=a)*n;r-=t*s,n-=e*s;var u=Math.sqrt(r*r+n*n);return s/=u,t*(n/=u)<e*(r/=u)&&(t=-t,e=-e,s=-s,a=-a),{scale:new Wt(a,0,0,u,0,0),translate:new Wt(1,0,0,1,i,o),rotate:new Wt(t,e,-e,t,0,0),skew:new Wt(1,0,s,1,0,0)}},Wt.prototype.toString=function(t){return this.join(" ")},Wt.prototype.inversed=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,o=this.ty,a=1/(t*n-e*r),s=n*a,u=-e*a,c=-r*a,l=t*a;return new Wt(s,u,c,l,-s*i-c*o,-u*i-l*o)},Wt.prototype.applyToPoint=function(t){var e=t.x*this.sx+t.y*this.shx+this.tx,r=t.x*this.shy+t.y*this.sy+this.ty;return new Ir(e,r)},Wt.prototype.applyToRectangle=function(t){var e=this.applyToPoint(t),r=this.applyToPoint(new Ir(t.x+t.w,t.y+t.h));return new Cr(e.x,e.y,r.x-e.x,r.y-e.y)},Wt.prototype.clone=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,o=this.ty;return new Wt(t,e,r,n,i,o)},y.Matrix=Wt;var Gt=y.matrixMult=function(t,e){return e.multiply(t)},Jt=new Wt(1,0,0,1,0,0);y.unitMatrix=y.identityMatrix=Jt;var Yt=function(t,e){if(!Rt[t]){var r=(e instanceof B?"Sh":"P")+(Object.keys(Ft).length+1).toString(10);e.id=r,Rt[t]=r,Ft[r]=e,Dt.publish("addPattern",e)}};y.ShadingPattern=B,y.TilingPattern=q,y.addShadingPattern=function(t,e){return O("addShadingPattern()"),Yt(t,e),this},y.beginTilingPattern=function(t){O("beginTilingPattern()"),Rr(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},y.endTilingPattern=function(t,e){O("endTilingPattern()"),e.stream=at[Z].join("\n"),Yt(t,e),Dt.publish("endTilingPattern",e),Vt.pop().restore()};var Xt=y.__private__.newObject=function(){var t=$t();return Kt(t,!0),t},$t=y.__private__.newObjectDeferred=function(){return et++,rt[et]=function(){return it},et},Kt=function(t,e){return e="boolean"==typeof e&&e,rt[t]=it,e&&ft(t+" 0 obj"),t},Zt=y.__private__.newAdditionalObject=function(){var t={objId:$t(),content:""};return ot.push(t),t},Qt=$t(),te=$t(),ee=y.__private__.decodeColorString=function(t){var e=t.split(" ");if(2!==e.length||"g"!==e[1]&&"G"!==e[1])5!==e.length||"k"!==e[4]&&"K"!==e[4]||(e=[(1-e[0])*(1-e[3]),(1-e[1])*(1-e[3]),(1-e[2])*(1-e[3]),"r"]);else{var r=parseFloat(e[0]);e=[r,r,r,"r"]}for(var n="#",i=0;i<3;i++)n+=("0"+Math.floor(255*parseFloat(e[i])).toString(16)).slice(-2);return n},re=y.__private__.encodeColorString=function(t){var e;"string"==typeof t&&(t={ch1:t});var r=t.ch1,n=t.ch2,o=t.ch3,a=t.ch4,s="draw"===t.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof r&&"#"!==r.charAt(0)){var u=new g(r);if(u.ok)r=u.toHex();else if(!/^\d*\.?\d*$/.test(r))throw new Error('Invalid color "'+r+'" passed to jsPDF.encodeColorString.')}if("string"==typeof r&&/^#[0-9A-Fa-f]{3}$/.test(r)&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),"string"==typeof r&&/^#[0-9A-Fa-f]{6}$/.test(r)){var c=parseInt(r.substr(1),16);r=c>>16&255,n=c>>8&255,o=255&c}if(void 0===n||void 0===a&&r===n&&n===o)if("string"==typeof r)e=r+" "+s[0];else switch(t.precision){case 2:e=M(r/255)+" "+s[0];break;case 3:default:e=D(r/255)+" "+s[0]}else if(void 0===a||"object"===i()(a)){if(a&&!isNaN(a.a)&&0===a.a)return["1.","1.","1.",s[1]].join(" ");if("string"==typeof r)e=[r,n,o,s[1]].join(" ");else switch(t.precision){case 2:e=[M(r/255),M(n/255),M(o/255),s[1]].join(" ");break;default:case 3:e=[D(r/255),D(n/255),D(o/255),s[1]].join(" ")}}else if("string"==typeof r)e=[r,n,o,a,s[2]].join(" ");else switch(t.precision){case 2:e=[M(r),M(n),M(o),M(a),s[2]].join(" ");break;case 3:default:e=[D(r),D(n),D(o),D(a),s[2]].join(" ")}return e},ne=y.__private__.getFilters=function(){return c},ie=y.__private__.putStream=function(t){var e=(t=t||{}).data||"",r=t.filters||ne(),n=t.alreadyAppliedFilters||[],i=t.addLength1||!1,o=e.length,a=t.objectId,s=function(t){return t};if(null!==v&&void 0===a)throw new Error("ObjectId must be passed to putStream for file encryption");null!==v&&(s=Je.encryptor(a,0));var u={};!0===r&&(r=["FlateEncode"]);var c=t.additionalKeyValues||[],l=(u=void 0!==T.API.processDataByFilters?T.API.processDataByFilters(e,r):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==u.data.length&&(c.push({key:"Length",value:u.data.length}),!0===i&&c.push({key:"Length1",value:o})),0!=l.length)if(l.split("/").length-1==1)c.push({key:"Filter",value:l});else{c.push({key:"Filter",value:"["+l+"]"});for(var f=0;f<c.length;f+=1)if("DecodeParms"===c[f].key){for(var h=[],p=0;p<u.reverseChain.split("/").length-1;p+=1)h.push("null");h.push(c[f].value),c[f].value="["+h.join(" ")+"]"}}ft("<<");for(var d=0;d<c.length;d++)ft("/"+c[d].key+" "+c[d].value);ft(">>"),0!==u.data.length&&(ft("stream"),ft(s(u.data)),ft("endstream"))},oe=y.__private__.putPage=function(t){var e=t.number,r=t.data,n=t.objId,i=t.contentsObjId;Kt(n,!0),ft("<</Type /Page"),ft("/Parent "+t.rootDictionaryObjId+" 0 R"),ft("/Resources "+t.resourceDictionaryObjId+" 0 R"),ft("/MediaBox ["+parseFloat(j(t.mediaBox.bottomLeftX))+" "+parseFloat(j(t.mediaBox.bottomLeftY))+" "+j(t.mediaBox.topRightX)+" "+j(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&ft("/CropBox ["+j(t.cropBox.bottomLeftX)+" "+j(t.cropBox.bottomLeftY)+" "+j(t.cropBox.topRightX)+" "+j(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&ft("/BleedBox ["+j(t.bleedBox.bottomLeftX)+" "+j(t.bleedBox.bottomLeftY)+" "+j(t.bleedBox.topRightX)+" "+j(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&ft("/TrimBox ["+j(t.trimBox.bottomLeftX)+" "+j(t.trimBox.bottomLeftY)+" "+j(t.trimBox.topRightX)+" "+j(t.trimBox.topRightY)+"]"),null!==t.artBox&&ft("/ArtBox ["+j(t.artBox.bottomLeftX)+" "+j(t.artBox.bottomLeftY)+" "+j(t.artBox.topRightX)+" "+j(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&ft("/UserUnit "+t.userUnit),Dt.publish("putPage",{objId:n,pageContext:Tt[e],pageNumber:e,page:r}),ft("/Contents "+i+" 0 R"),ft(">>"),ft("endobj");var o=r.join("\n");return S===L.ADVANCED&&(o+="\nQ"),Kt(i,!0),ie({data:o,filters:ne(),objectId:i}),ft("endobj"),n},ae=y.__private__.putPages=function(){var t,e,r=[];for(t=1;t<=qt;t++)Tt[t].objId=$t(),Tt[t].contentsObjId=$t();for(t=1;t<=qt;t++)r.push(oe({number:t,data:at[t],objId:Tt[t].objId,contentsObjId:Tt[t].contentsObjId,mediaBox:Tt[t].mediaBox,cropBox:Tt[t].cropBox,bleedBox:Tt[t].bleedBox,trimBox:Tt[t].trimBox,artBox:Tt[t].artBox,userUnit:Tt[t].userUnit,rootDictionaryObjId:Qt,resourceDictionaryObjId:te}));Kt(Qt,!0),ft("<</Type /Pages");var n="/Kids [";for(e=0;e<qt;e++)n+=r[e]+" 0 R ";ft(n+"]"),ft("/Count "+qt),ft(">>"),ft("endobj"),Dt.publish("postPutPages")},se=function(t){Dt.publish("putFont",{font:t,out:ft,newObject:Xt,putStream:ie}),!0!==t.isAlreadyPutted&&(t.objectNumber=Xt(),ft("<<"),ft("/Type /Font"),ft("/BaseFont /"+F(t.postScriptName)),ft("/Subtype /Type1"),"string"==typeof t.encoding&&ft("/Encoding /"+t.encoding),ft("/FirstChar 32"),ft("/LastChar 255"),ft(">>"),ft("endobj"))},ue=function(){for(var t in Ot)Ot.hasOwnProperty(t)&&(!1===m||!0===m&&b.hasOwnProperty(t))&&se(Ot[t])},ce=function(t){t.objectNumber=Xt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[j(t.x),j(t.y),j(t.x+t.width),j(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var r=t.pages[1].join("\n");ie({data:r,additionalKeyValues:e,objectId:t.objectNumber}),ft("endobj")},le=function(){for(var t in Ut)Ut.hasOwnProperty(t)&&ce(Ut[t])},fe=function(t,e){var r,n=[],i=1/(e-1);for(r=0;r<1;r+=i)n.push(r);if(n.push(1),0!=t[0].offset){var o={offset:0,color:t[0].color};t.unshift(o)}if(1!=t[t.length-1].offset){var a={offset:1,color:t[t.length-1].color};t.push(a)}for(var s="",u=0,c=0;c<n.length;c++){for(r=n[c];r>t[u+1].offset;)u++;var l=t[u].offset,f=(r-l)/(t[u+1].offset-l),h=t[u].color,p=t[u+1].color;s+=tt(Math.round((1-f)*h[0]+f*p[0]).toString(16))+tt(Math.round((1-f)*h[1]+f*p[1]).toString(16))+tt(Math.round((1-f)*h[2]+f*p[2]).toString(16))}return s.trim()},he=function(t,e){e||(e=21);var r=Xt(),n=fe(t.colors,e),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+e+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ie({data:n,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:r}),ft("endobj"),t.objectNumber=Xt(),ft("<< /ShadingType "+t.type),ft("/ColorSpace /DeviceRGB");var o="/Coords ["+j(parseFloat(t.coords[0]))+" "+j(parseFloat(t.coords[1]))+" ";2===t.type?o+=j(parseFloat(t.coords[2]))+" "+j(parseFloat(t.coords[3])):o+=j(parseFloat(t.coords[2]))+" "+j(parseFloat(t.coords[3]))+" "+j(parseFloat(t.coords[4]))+" "+j(parseFloat(t.coords[5])),ft(o+="]"),t.matrix&&ft("/Matrix ["+t.matrix.toString()+"]"),ft("/Function "+r+" 0 R"),ft("/Extend [true true]"),ft(">>"),ft("endobj")},pe=function(t,e){var r=$t(),n=Xt();e.push({resourcesOid:r,objectOid:n}),t.objectNumber=n;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+t.boundingBox.map(j).join(" ")+"]"}),i.push({key:"XStep",value:j(t.xStep)}),i.push({key:"YStep",value:j(t.yStep)}),i.push({key:"Resources",value:r+" 0 R"}),t.matrix&&i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),ie({data:t.stream,additionalKeyValues:i,objectId:t.objectNumber}),ft("endobj")},de=function(t){var e;for(e in Ft)Ft.hasOwnProperty(e)&&(Ft[e]instanceof B?he(Ft[e]):Ft[e]instanceof q&&pe(Ft[e],t))},ge=function(t){for(var e in t.objectNumber=Xt(),ft("<<"),t)switch(e){case"opacity":ft("/ca "+M(t[e]));break;case"stroke-opacity":ft("/CA "+M(t[e]))}ft(">>"),ft("endobj")},ve=function(){var t;for(t in Et)Et.hasOwnProperty(t)&&ge(Et[t])},me=function(){for(var t in ft("/XObject <<"),Ut)Ut.hasOwnProperty(t)&&Ut[t].objectNumber>=0&&ft("/"+t+" "+Ut[t].objectNumber+" 0 R");Dt.publish("putXobjectDict"),ft(">>")},be=function(){Je.oid=Xt(),ft("<<"),ft("/Filter /Standard"),ft("/V "+Je.v),ft("/R "+Je.r),ft("/U <"+Je.toHexString(Je.U)+">"),ft("/O <"+Je.toHexString(Je.O)+">"),ft("/P "+Je.P),ft(">>"),ft("endobj")},ye=function(){for(var t in ft("/Font <<"),Ot)Ot.hasOwnProperty(t)&&(!1===m||!0===m&&b.hasOwnProperty(t))&&ft("/"+t+" "+Ot[t].objectNumber+" 0 R");ft(">>")},we=function(){if(Object.keys(Ft).length>0){for(var t in ft("/Shading <<"),Ft)Ft.hasOwnProperty(t)&&Ft[t]instanceof B&&Ft[t].objectNumber>=0&&ft("/"+t+" "+Ft[t].objectNumber+" 0 R");Dt.publish("putShadingPatternDict"),ft(">>")}},xe=function(t){if(Object.keys(Ft).length>0){for(var e in ft("/Pattern <<"),Ft)Ft.hasOwnProperty(e)&&Ft[e]instanceof y.TilingPattern&&Ft[e].objectNumber>=0&&Ft[e].objectNumber<t&&ft("/"+e+" "+Ft[e].objectNumber+" 0 R");Dt.publish("putTilingPatternDict"),ft(">>")}},Ae=function(){if(Object.keys(Et).length>0){var t;for(t in ft("/ExtGState <<"),Et)Et.hasOwnProperty(t)&&Et[t].objectNumber>=0&&ft("/"+t+" "+Et[t].objectNumber+" 0 R");Dt.publish("putGStateDict"),ft(">>")}},Ne=function(t){Kt(t.resourcesOid,!0),ft("<<"),ft("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),ye(),we(),xe(t.objectOid),Ae(),me(),ft(">>"),ft("endobj")},Le=function(){var t=[];ue(),ve(),le(),de(t),Dt.publish("putResources"),t.forEach(Ne),Ne({resourcesOid:te,objectOid:Number.MAX_SAFE_INTEGER}),Dt.publish("postPutResources")},Se=function(){Dt.publish("putAdditionalObjects");for(var t=0;t<ot.length;t++){var e=ot[t];Kt(e.objId,!0),ft(e.content),ft("endobj")}Dt.publish("postPutAdditionalObjects")},_e=function(t){It[t.fontName]=It[t.fontName]||{},It[t.fontName][t.fontStyle]=t.id},Pe=function(t,e,r,n,i){var o={id:"F"+(Object.keys(Ot).length+1).toString(10),postScriptName:t,fontName:e,fontStyle:r,encoding:n,isStandardFont:i||!1,metadata:{}};return Dt.publish("addFont",{font:o,instance:this}),Ot[o.id]=o,_e(o),o.id},ke=function(t){for(var e=0,r=dt.length;e<r;e++){var n=Pe.call(this,t[e][0],t[e][1],t[e][2],dt[e][3],!0);!1===m&&(b[n]=!0);var i=t[e][0].split("-");_e({id:n,fontName:i[0],fontStyle:i[1]||""})}Dt.publish("addFonts",{fonts:Ot,dictionary:It})},je=function(t){return t.foo=function(){try{return t.apply(this,arguments)}catch(t){var e=t.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);var r="Error in function "+e.split("\n")[0].split("<")[0]+": "+t.message;if(!a.console)throw new Error(r);a.console.error(r,t),a.alert&&alert(r)}},t.foo.bar=t,t.foo},Oe=function(t,e){var r,n,i,o,a,s,u,c,l;if(i=(e=e||{}).sourceEncoding||"Unicode",a=e.outputEncoding,(e.autoencode||a)&&Ot[St].metadata&&Ot[St].metadata[i]&&Ot[St].metadata[i].encoding&&(o=Ot[St].metadata[i].encoding,!a&&Ot[St].encoding&&(a=Ot[St].encoding),!a&&o.codePages&&(a=o.codePages[0]),"string"==typeof a&&(a=o[a]),a)){for(u=!1,s=[],r=0,n=t.length;r<n;r++)(c=a[t.charCodeAt(r)])?s.push(String.fromCharCode(c)):s.push(t[r]),s[r].charCodeAt(0)>>8&&(u=!0);t=s.join("")}for(r=t.length;void 0===u&&0!==r;)t.charCodeAt(r-1)>>8&&(u=!0),r--;if(!u)return t;for(s=e.noBOM?[]:[254,255],r=0,n=t.length;r<n;r++){if((l=(c=t.charCodeAt(r))>>8)>>8)throw new Error("Character at position "+r+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(l),s.push(c-(l<<8))}return String.fromCharCode.apply(void 0,s)},Ie=y.__private__.pdfEscape=y.pdfEscape=function(t,e){return Oe(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ce=y.__private__.beginPage=function(t){at[++qt]=[],Tt[qt]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},Ee(qt),lt(at[Z])},Fe=function(t,e){var n,i,a;switch(r=e||r,"string"==typeof t&&(n=N(t.toLowerCase()),Array.isArray(n)&&(i=n[0],a=n[1])),Array.isArray(t)&&(i=t[0]*_t,a=t[1]*_t),isNaN(i)&&(i=o[0],a=o[1]),(i>14400||a>14400)&&(u.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),i=Math.min(14400,i),a=Math.min(14400,a)),o=[i,a],r.substr(0,1)){case"l":a>i&&(o=[a,i]);break;case"p":i>a&&(o=[a,i])}Ce(o),dr(hr),ft(Ar),0!==kr&&ft(kr+" J"),0!==jr&&ft(jr+" j"),Dt.publish("addPage",{pageNumber:qt})},Re=function(t){t>0&&t<=qt&&(at.splice(t,1),Tt.splice(t,1),qt--,Z>qt&&(Z=qt),this.setPage(Z))},Ee=function(t){t>0&&t<=qt&&(Z=t)},Me=y.__private__.getNumberOfPages=y.getNumberOfPages=function(){return at.length-1},Be=function(t,e,r){var n,i=void 0;return r=r||{},t=void 0!==t?t:Ot[St].fontName,e=void 0!==e?e:Ot[St].fontStyle,n=t.toLowerCase(),void 0!==It[n]&&void 0!==It[n][e]?i=It[n][e]:void 0!==It[t]&&void 0!==It[t][e]?i=It[t][e]:!1===r.disableWarning&&u.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),i||r.noFallback||null==(i=It.times[e])&&(i=It.times.normal),i},qe=y.__private__.putInfo=function(){var t=Xt(),e=function(t){return t};for(var r in null!==v&&(e=Je.encryptor(t,0)),ft("<<"),ft("/Producer ("+Ie(e("jsPDF "+T.version))+")"),Lt)Lt.hasOwnProperty(r)&&Lt[r]&&ft("/"+r.substr(0,1).toUpperCase()+r.substr(1)+" ("+Ie(e(Lt[r]))+")");ft("/CreationDate ("+Ie(e(V))+")"),ft(">>"),ft("endobj")},Te=y.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||Qt;switch(Xt(),ft("<<"),ft("/Type /Catalog"),ft("/Pages "+e+" 0 R"),vt||(vt="fullwidth"),vt){case"fullwidth":ft("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ft("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ft("/OpenAction [3 0 R /Fit]");break;case"original":ft("/OpenAction [3 0 R /XYZ null null 1]");break;default:var r=""+vt;"%"===r.substr(r.length-1)&&(vt=parseInt(vt)/100),"number"==typeof vt&&ft("/OpenAction [3 0 R /XYZ null null "+M(vt)+"]")}switch(xt||(xt="continuous"),xt){case"continuous":ft("/PageLayout /OneColumn");break;case"single":ft("/PageLayout /SinglePage");break;case"two":case"twoleft":ft("/PageLayout /TwoColumnLeft");break;case"tworight":ft("/PageLayout /TwoColumnRight")}yt&&ft("/PageMode /"+yt),Dt.publish("putCatalog"),ft(">>"),ft("endobj")},De=y.__private__.putTrailer=function(){ft("trailer"),ft("<<"),ft("/Size "+(et+1)),ft("/Root "+et+" 0 R"),ft("/Info "+(et-1)+" 0 R"),null!==v&&ft("/Encrypt "+Je.oid+" 0 R"),ft("/ID [ <"+W+"> <"+W+"> ]"),ft(">>")},ze=y.__private__.putHeader=function(){ft("%PDF-"+w),ft("%ºß¬à")},Ue=y.__private__.putXRef=function(){var t="0000000000";ft("xref"),ft("0 "+(et+1)),ft("0000000000 65535 f ");for(var e=1;e<=et;e++)"function"==typeof rt[e]?ft((t+rt[e]()).slice(-10)+" 00000 n "):void 0!==rt[e]?ft((t+rt[e]).slice(-10)+" 00000 n "):ft("0000000000 00000 n ")},He=y.__private__.buildDocument=function(){ct(),lt(nt),Dt.publish("buildDocument"),ze(),ae(),Se(),Le(),null!==v&&be(),qe(),Te();var t=it;return Ue(),De(),ft("startxref"),ft(""+t),ft("%%EOF"),lt(at[Z]),nt.join("\n")},Ve=y.__private__.getBlob=function(t){return new Blob([pt(t)],{type:"application/pdf"})},We=y.output=y.__private__.output=je((function(t,e){switch("string"==typeof(e=e||{})?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return He();case"save":y.save(e.filename);break;case"arraybuffer":return pt(He());case"blob":return Ve(He());case"bloburi":case"bloburl":if(void 0!==a.URL&&"function"==typeof a.URL.createObjectURL)return a.URL&&a.URL.createObjectURL(Ve(He()))||void 0;u.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var r="",n=He();try{r=p(n)}catch(t){r=p(unescape(encodeURIComponent(n)))}return"data:application/pdf;filename="+e.filename+";base64,"+r;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(a)){var i="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",o=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';e.pdfObjectUrl&&(i=e.pdfObjectUrl,o="");var s='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+i+'"'+o+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(e)+");<\/script></body></html>",c=a.open();return null!==c&&c.document.write(s),c}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(a)){var l='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(e.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+e.filename+'" width="500px" height="400px" /></body></html>',f=a.open();if(null!==f){f.document.write(l);var h=this;f.document.documentElement.querySelector("#pdfViewer").onload=function(){f.document.title=e.filename,f.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(h.output("bloburl"))}}return f}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(a))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var d='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",e)+'"></iframe></body></html>',g=a.open();if(null!==g&&(g.document.write(d),g.document.title=e.filename),g||"undefined"==typeof safari)return g;break;case"datauri":case"dataurl":return a.document.location.href=this.output("datauristring",e);default:return null}})),Ge=function(t){return!0===Array.isArray(zt)&&zt.indexOf(t)>-1};switch(n){case"pt":_t=1;break;case"mm":_t=72/25.4;break;case"cm":_t=72/2.54;break;case"in":_t=72;break;case"px":_t=1==Ge("px_scaling")?.75:96/72;break;case"pc":case"em":_t=12;break;case"ex":_t=6;break;default:if("number"!=typeof n)throw new Error("Invalid unit: "+n);_t=n}var Je=null;$(),J();var Ye=function(t){return null!==v?Je.encryptor(t,0):function(t){return t}},Xe=y.__private__.getPageInfo=y.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Tt[t].objId,pageNumber:t,pageContext:Tt[t]}},$e=y.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var e in Tt)if(Tt[e].objId===t)break;return Xe(e)},Ke=y.__private__.getCurrentPageInfo=y.getCurrentPageInfo=function(){return{objId:Tt[Z].objId,pageNumber:Z,pageContext:Tt[Z]}};y.addPage=function(){return Fe.apply(this,arguments),this},y.setPage=function(){return Ee.apply(this,arguments),lt.call(this,at[Z]),this},y.insertPage=function(t){return this.addPage(),this.movePage(Z,t),this},y.movePage=function(t,e){var r,n;if(t>e){r=at[t],n=Tt[t];for(var i=t;i>e;i--)at[i]=at[i-1],Tt[i]=Tt[i-1];at[e]=r,Tt[e]=n,this.setPage(e)}else if(t<e){r=at[t],n=Tt[t];for(var o=t;o<e;o++)at[o]=at[o+1],Tt[o]=Tt[o+1];at[e]=r,Tt[e]=n,this.setPage(e)}return this},y.deletePage=function(){return Re.apply(this,arguments),this},y.__private__.text=y.text=function(t,e,r,n,o){var a,s,u,c,l,f,h,p,d,g=(n=n||{}).scope||this;if("number"==typeof t&&"number"==typeof e&&("string"==typeof r||Array.isArray(r))){var v=r;r=e,e=t,t=v}if(arguments[3]instanceof Wt==0?(u=arguments[4],c=arguments[5],"object"===i()(h=arguments[3])&&null!==h||("string"==typeof u&&(c=u,u=null),"string"==typeof h&&(c=h,h=null),"number"==typeof h&&(u=h,h=null),n={flags:h,angle:u,align:c})):(O("The transform parameter of text() with a Matrix value"),d=o),isNaN(e)||isNaN(r)||null==t)throw new Error("Invalid arguments passed to jsPDF.text");if(0===t.length)return g;var m="",y=!1,w="number"==typeof n.lineHeightFactor?n.lineHeightFactor:fr,x=g.internal.scaleFactor;function A(t){return t=t.split("\t").join(Array(n.TabLen||9).join(" ")),Ie(t,h)}function N(t){for(var e,r=t.concat(),n=[],i=r.length;i--;)"string"==typeof(e=r.shift())?n.push(e):Array.isArray(t)&&(1===e.length||void 0===e[1]&&void 0===e[2])?n.push(e[0]):n.push([e[0],e[1],e[2]]);return n}function _(t,e){var r;if("string"==typeof t)r=e(t)[0];else if(Array.isArray(t)){for(var n,i,o=t.concat(),a=[],s=o.length;s--;)"string"==typeof(n=o.shift())?a.push(e(n)[0]):Array.isArray(n)&&"string"==typeof n[0]&&(i=e(n[0],n[1],n[2]),a.push([i[0],i[1],i[2]]));r=a}return r}var P=!1,k=!0;if("string"==typeof t)P=!0;else if(Array.isArray(t)){var I=t.concat();s=[];for(var C,F=I.length;F--;)("string"!=typeof(C=I.shift())||Array.isArray(C)&&"string"!=typeof C[0])&&(k=!1);P=k}if(!1===P)throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');"string"==typeof t&&(t=t.match(/[\r?\n]/)?t.split(/\r\n|\r|\n/g):[t]);var R=gt/g.internal.scaleFactor,E=R*(w-1);switch(n.baseline){case"bottom":r-=E;break;case"top":r+=R-E;break;case"hanging":r+=R-2*E;break;case"middle":r+=R/2-E}if((f=n.maxWidth||0)>0&&("string"==typeof t?t=g.splitTextToSize(t,f):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,e){return t.concat(g.splitTextToSize(e,f))}),[]))),a={text:t,x:e,y:r,options:n,mutex:{pdfEscape:Ie,activeFontKey:St,fonts:Ot,activeFontSize:gt}},Dt.publish("preProcessText",a),t=a.text,u=(n=a.options).angle,d instanceof Wt==0&&u&&"number"==typeof u){u*=Math.PI/180,0===n.rotationDirection&&(u=-u),S===L.ADVANCED&&(u=-u);var M=Math.cos(u),B=Math.sin(u);d=new Wt(M,B,-B,M,0,0)}else u&&u instanceof Wt&&(d=u);S!==L.ADVANCED||d||(d=Jt),void 0!==(l=n.charSpace||_r)&&(m+=j(z(l))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(p=n.horizontalScale)&&(m+=j(100*p)+" Tz\n"),n.lang;var q=-1,T=void 0!==n.renderingMode?n.renderingMode:n.stroke,D=g.internal.getCurrentPageInfo().pageContext;switch(T){case 0:case!1:case"fill":q=0;break;case 1:case!0:case"stroke":q=1;break;case 2:case"fillThenStroke":q=2;break;case 3:case"invisible":q=3;break;case 4:case"fillAndAddForClipping":q=4;break;case 5:case"strokeAndAddPathForClipping":q=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":q=6;break;case 7:case"addToPathForClipping":q=7}var U=void 0!==D.usedRenderingMode?D.usedRenderingMode:-1;-1!==q?m+=q+" Tr\n":-1!==U&&(m+="0 Tr\n"),-1!==q&&(D.usedRenderingMode=q),c=n.align||"left";var H,V=gt*w,W=g.internal.pageSize.getWidth(),G=Ot[St];l=n.charSpace||_r,f=n.maxWidth||0,h=Object.assign({autoencode:!0,noBOM:!0},n.flags);var J=[];if("[object Array]"===Object.prototype.toString.call(t)){var Y;s=N(t),"left"!==c&&(H=s.map((function(t){return g.getStringUnitWidth(t,{font:G,charSpace:l,fontSize:gt,doKerning:!1})*gt/x})));var X,$=0;if("right"===c){e-=H[0],t=[],F=s.length;for(var K=0;K<F;K++)0===K?(X=br(e),Y=yr(r)):(X=z($-H[K]),Y=-V),t.push([s[K],X,Y]),$=H[K]}else if("center"===c){e-=H[0]/2,t=[],F=s.length;for(var Z=0;Z<F;Z++)0===Z?(X=br(e),Y=yr(r)):(X=z(($-H[Z])/2),Y=-V),t.push([s[Z],X,Y]),$=H[Z]}else if("left"===c){t=[],F=s.length;for(var Q=0;Q<F;Q++)t.push(s[Q])}else{if("justify"!==c)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');t=[],F=s.length,f=0!==f?f:W;for(var tt=0;tt<F;tt++)Y=0===tt?yr(r):-V,X=0===tt?br(e):0,tt<F-1?J.push(j(z((f-H[tt])/(s[tt].split(" ").length-1)))):J.push(0),t.push([s[tt],X,Y])}}var et="boolean"==typeof n.R2L?n.R2L:bt;!0===et&&(t=_(t,(function(t,e,r){return[t.split("").reverse().join(""),e,r]}))),a={text:t,x:e,y:r,options:n,mutex:{pdfEscape:Ie,activeFontKey:St,fonts:Ot,activeFontSize:gt}},Dt.publish("postProcessText",a),t=a.text,y=a.mutex.isHex||!1;var rt=Ot[St].encoding;"WinAnsiEncoding"!==rt&&"StandardEncoding"!==rt||(t=_(t,(function(t,e,r){return[A(t),e,r]}))),s=N(t),t=[];for(var nt,it,ot,at=0,st=1,ut=Array.isArray(s[0])?st:at,ct="",lt=function(t,e,r){var i="";return r instanceof Wt?(r="number"==typeof n.angle?Gt(r,new Wt(1,0,0,1,t,e)):Gt(new Wt(1,0,0,1,t,e),r),S===L.ADVANCED&&(r=Gt(new Wt(1,0,0,-1,0,0),r)),i=r.join(" ")+" Tm\n"):i=j(t)+" "+j(e)+" Td\n",i},ht=0;ht<s.length;ht++){switch(ct="",ut){case st:ot=(y?"<":"(")+s[ht][0]+(y?">":")"),nt=parseFloat(s[ht][1]),it=parseFloat(s[ht][2]);break;case at:ot=(y?"<":"(")+s[ht]+(y?">":")"),nt=br(e),it=yr(r)}void 0!==J&&void 0!==J[ht]&&(ct=J[ht]+" Tw\n"),0===ht?t.push(ct+lt(nt,it,d)+ot):ut===at?t.push(ct+ot):ut===st&&t.push(ct+lt(nt,it,d)+ot)}t=ut===at?t.join(" Tj\nT* "):t.join(" Tj\n"),t+=" Tj\n";var pt="BT\n/";return pt+=St+" "+gt+" Tf\n",pt+=j(gt*w)+" TL\n",pt+=Lr+"\n",pt+=m,pt+=t,ft(pt+="ET"),b[St]=!0,g};var Ze=y.__private__.clip=y.clip=function(t){return ft("evenodd"===t?"W*":"W"),this};y.clipEvenOdd=function(){return Ze("evenodd")},y.__private__.discardPath=y.discardPath=function(){return ft("n"),this};var Qe=y.__private__.isValidStyle=function(t){var e=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(t)&&(e=!0),e};y.__private__.setDefaultPathOperation=y.setDefaultPathOperation=function(t){return Qe(t)&&(h=t),this};var tr=y.__private__.getStyle=y.getStyle=function(t){var e=h;switch(t){case"D":case"S":e="S";break;case"F":e="f";break;case"FD":case"DF":e="B";break;case"f":case"f*":case"B":case"B*":e=t}return e},er=y.close=function(){return ft("h"),this};y.stroke=function(){return ft("S"),this},y.fill=function(t){return rr("f",t),this},y.fillEvenOdd=function(t){return rr("f*",t),this},y.fillStroke=function(t){return rr("B",t),this},y.fillStrokeEvenOdd=function(t){return rr("B*",t),this};var rr=function(t,e){"object"===i()(e)?or(e,t):ft(t)},nr=function(t){null===t||S===L.ADVANCED&&void 0===t||(t=tr(t),ft(t))};function ir(t,e,r,n,i){var o=new q(e||this.boundingBox,r||this.xStep,n||this.yStep,this.gState,i||this.matrix);o.stream=this.stream;var a=t+"$$"+this.cloneIndex+++"$$";return Yt(a,o),o}var or=function(t,e){var r=Rt[t.key],n=Ft[r];if(n instanceof B)ft("q"),ft(ar(e)),n.gState&&y.setGState(n.gState),ft(t.matrix.toString()+" cm"),ft("/"+r+" sh"),ft("Q");else if(n instanceof q){var i=new Wt(1,0,0,-1,0,Tr());t.matrix&&(i=i.multiply(t.matrix||Jt),r=ir.call(n,t.key,t.boundingBox,t.xStep,t.yStep,i).id),ft("q"),ft("/Pattern cs"),ft("/"+r+" scn"),n.gState&&y.setGState(n.gState),ft(e),ft("Q")}},ar=function(t){switch(t){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},sr=y.moveTo=function(t,e){return ft(j(z(t))+" "+j(H(e))+" m"),this},ur=y.lineTo=function(t,e){return ft(j(z(t))+" "+j(H(e))+" l"),this},cr=y.curveTo=function(t,e,r,n,i,o){return ft([j(z(t)),j(H(e)),j(z(r)),j(H(n)),j(z(i)),j(H(o)),"c"].join(" ")),this};y.__private__.line=y.line=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Qe(i))throw new Error("Invalid arguments passed to jsPDF.line");return S===L.COMPAT?this.lines([[r-t,n-e]],t,e,[1,1],i||"S"):this.lines([[r-t,n-e]],t,e,[1,1]).stroke()},y.__private__.lines=y.lines=function(t,e,r,n,i,o){var a,s,u,c,l,f,h,p,d,g,v,m;if("number"==typeof t&&(m=r,r=e,e=t,t=m),n=n||[1,1],o=o||!1,isNaN(e)||isNaN(r)||!Array.isArray(t)||!Array.isArray(n)||!Qe(i)||"boolean"!=typeof o)throw new Error("Invalid arguments passed to jsPDF.lines");for(sr(e,r),a=n[0],s=n[1],c=t.length,g=e,v=r,u=0;u<c;u++)2===(l=t[u]).length?(g=l[0]*a+g,v=l[1]*s+v,ur(g,v)):(f=l[0]*a+g,h=l[1]*s+v,p=l[2]*a+g,d=l[3]*s+v,g=l[4]*a+g,v=l[5]*s+v,cr(f,h,p,d,g,v));return o&&er(),nr(i),this},y.path=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r.c;switch(r.op){case"m":sr(n[0],n[1]);break;case"l":ur(n[0],n[1]);break;case"c":cr.apply(this,n);break;case"h":er()}}return this},y.__private__.rect=y.rect=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Qe(i))throw new Error("Invalid arguments passed to jsPDF.rect");return S===L.COMPAT&&(n=-n),ft([j(z(t)),j(H(e)),j(z(r)),j(z(n)),"re"].join(" ")),nr(i),this},y.__private__.triangle=y.triangle=function(t,e,r,n,i,o,a){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(o)||!Qe(a))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[r-t,n-e],[i-r,o-n],[t-i,e-o]],t,e,[1,1],a,!0),this},y.__private__.roundedRect=y.roundedRect=function(t,e,r,n,i,o,a){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(o)||!Qe(a))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var s=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*r),o=Math.min(o,.5*n),this.lines([[r-2*i,0],[i*s,0,i,o-o*s,i,o],[0,n-2*o],[0,o*s,-i*s,o,-i,o],[2*i-r,0],[-i*s,0,-i,-o*s,-i,-o],[0,2*o-n],[0,-o*s,i*s,-o,i,-o]],t+i,e,[1,1],a,!0),this},y.__private__.ellipse=y.ellipse=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Qe(i))throw new Error("Invalid arguments passed to jsPDF.ellipse");var o=4/3*(Math.SQRT2-1)*r,a=4/3*(Math.SQRT2-1)*n;return sr(t+r,e),cr(t+r,e-a,t+o,e-n,t,e-n),cr(t-o,e-n,t-r,e-a,t-r,e),cr(t-r,e+a,t-o,e+n,t,e+n),cr(t+o,e+n,t+r,e+a,t+r,e),nr(i),this},y.__private__.circle=y.circle=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||!Qe(n))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,e,r,r,n)},y.setFont=function(t,e,r){return r&&(e=k(e,r)),St=Be(t,e,{disableWarning:!1}),this};var lr=y.__private__.getFont=y.getFont=function(){return Ot[Be.apply(y,arguments)]};y.__private__.getFontList=y.getFontList=function(){var t,e,r={};for(t in It)if(It.hasOwnProperty(t))for(e in r[t]=[],It[t])It[t].hasOwnProperty(e)&&r[t].push(e);return r},y.addFont=function(t,e,r,n,i){var o=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==o.indexOf(arguments[3])?i=arguments[3]:arguments[3]&&-1==o.indexOf(arguments[3])&&(r=k(r,n)),i=i||"Identity-H",Pe.call(this,t,e,r,i)};var fr,hr=t.lineWidth||.200025,pr=y.__private__.getLineWidth=y.getLineWidth=function(){return hr},dr=y.__private__.setLineWidth=y.setLineWidth=function(t){return hr=t,ft(j(z(t))+" w"),this};y.__private__.setLineDash=T.API.setLineDash=T.API.setLineDashPattern=function(t,e){if(t=t||[],e=e||0,isNaN(e)||!Array.isArray(t))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return t=t.map((function(t){return j(z(t))})).join(" "),e=j(z(e)),ft("["+t+"] "+e+" d"),this};var gr=y.__private__.getLineHeight=y.getLineHeight=function(){return gt*fr};y.__private__.getLineHeight=y.getLineHeight=function(){return gt*fr};var vr=y.__private__.setLineHeightFactor=y.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(fr=t),this},mr=y.__private__.getLineHeightFactor=y.getLineHeightFactor=function(){return fr};vr(t.lineHeight);var br=y.__private__.getHorizontalCoordinate=function(t){return z(t)},yr=y.__private__.getVerticalCoordinate=function(t){return S===L.ADVANCED?t:Tt[Z].mediaBox.topRightY-Tt[Z].mediaBox.bottomLeftY-z(t)},wr=y.__private__.getHorizontalCoordinateString=y.getHorizontalCoordinateString=function(t){return j(br(t))},xr=y.__private__.getVerticalCoordinateString=y.getVerticalCoordinateString=function(t){return j(yr(t))},Ar=t.strokeColor||"0 G";y.__private__.getStrokeColor=y.getDrawColor=function(){return ee(Ar)},y.__private__.setStrokeColor=y.setDrawColor=function(t,e,r,n){return Ar=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"draw",precision:2}),ft(Ar),this};var Nr=t.fillColor||"0 g";y.__private__.getFillColor=y.getFillColor=function(){return ee(Nr)},y.__private__.setFillColor=y.setFillColor=function(t,e,r,n){return Nr=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"fill",precision:2}),ft(Nr),this};var Lr=t.textColor||"0 g",Sr=y.__private__.getTextColor=y.getTextColor=function(){return ee(Lr)};y.__private__.setTextColor=y.setTextColor=function(t,e,r,n){return Lr=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"text",precision:3}),this};var _r=t.charSpace,Pr=y.__private__.getCharSpace=y.getCharSpace=function(){return parseFloat(_r||0)};y.__private__.setCharSpace=y.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return _r=t,this};var kr=0;y.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},y.__private__.setLineCap=y.setLineCap=function(t){var e=y.CapJoinStyles[t];if(void 0===e)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return kr=e,ft(e+" J"),this};var jr=0;y.__private__.setLineJoin=y.setLineJoin=function(t){var e=y.CapJoinStyles[t];if(void 0===e)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return jr=e,ft(e+" j"),this},y.__private__.setLineMiterLimit=y.__private__.setMiterLimit=y.setLineMiterLimit=y.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return ft(j(z(t))+" M"),this},y.GState=E,y.setGState=function(t){(t="string"==typeof t?Et[Mt[t]]:Or(null,t)).equals(Bt)||(ft("/"+t.id+" gs"),Bt=t)};var Or=function(t,e){if(!t||!Mt[t]){var r=!1;for(var n in Et)if(Et.hasOwnProperty(n)&&Et[n].equals(e)){r=!0;break}if(r)e=Et[n];else{var i="GS"+(Object.keys(Et).length+1).toString(10);Et[i]=e,e.id=i}return t&&(Mt[t]=e.id),Dt.publish("addGState",e),e}};y.addGState=function(t,e){return Or(t,e),this},y.saveGraphicsState=function(){return ft("q"),Ct.push({key:St,size:gt,color:Lr}),this},y.restoreGraphicsState=function(){ft("Q");var t=Ct.pop();return St=t.key,gt=t.size,Lr=t.color,Bt=null,this},y.setCurrentTransformationMatrix=function(t){return ft(t.toString()+" cm"),this},y.comment=function(t){return ft("#"+t),this};var Ir=function(t,e){var r=t||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return r},set:function(t){isNaN(t)||(r=parseFloat(t))}});var n=e||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return n},set:function(t){isNaN(t)||(n=parseFloat(t))}});var i="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return i},set:function(t){i=t.toString()}}),this},Cr=function(t,e,r,n){Ir.call(this,t,e),this.type="rect";var i=r||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return i},set:function(t){isNaN(t)||(i=parseFloat(t))}});var o=n||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return o},set:function(t){isNaN(t)||(o=parseFloat(t))}}),this},Fr=function(){this.page=qt,this.currentPage=Z,this.pages=at.slice(0),this.pagesContext=Tt.slice(0),this.x=Pt,this.y=kt,this.matrix=jt,this.width=Br(Z),this.height=Tr(Z),this.outputDestination=ut,this.id="",this.objectNumber=-1};Fr.prototype.restore=function(){qt=this.page,Z=this.currentPage,Tt=this.pagesContext,at=this.pages,Pt=this.x,kt=this.y,jt=this.matrix,qr(Z,this.width),Dr(Z,this.height),ut=this.outputDestination};var Rr=function(t,e,r,n,i){Vt.push(new Fr),qt=Z=0,at=[],Pt=t,kt=e,jt=i,Ce([r,n])},Er=function(t){if(Ht[t])Vt.pop().restore();else{var e=new Fr,r="Xo"+(Object.keys(Ut).length+1).toString(10);e.id=r,Ht[t]=r,Ut[r]=e,Dt.publish("addFormObject",e),Vt.pop().restore()}};for(var Mr in y.beginFormObject=function(t,e,r,n,i){return Rr(t,e,r,n,i),this},y.endFormObject=function(t){return Er(t),this},y.doFormObject=function(t,e){var r=Ut[Ht[t]];return ft("q"),ft(e.toString()+" cm"),ft("/"+r.id+" Do"),ft("Q"),this},y.getFormObject=function(t){var e=Ut[Ht[t]];return{x:e.x,y:e.y,width:e.width,height:e.height,matrix:e.matrix}},y.save=function(t,e){return t=t||"generated.pdf",(e=e||{}).returnPromise=e.returnPromise||!1,!1===e.returnPromise?(d(Ve(He()),t),"function"==typeof d.unload&&a.setTimeout&&setTimeout(d.unload,911),this):new Promise((function(e,r){try{var n=d(Ve(He()),t);"function"==typeof d.unload&&a.setTimeout&&setTimeout(d.unload,911),e(n)}catch(t){r(t.message)}}))},T.API)T.API.hasOwnProperty(Mr)&&("events"===Mr&&T.API.events.length?function(t,e){var r,n,i;for(i=e.length-1;-1!==i;i--)r=e[i][0],n=e[i][1],t.subscribe.apply(t,[r].concat("function"==typeof n?[n]:n))}(Dt,T.API.events):y[Mr]=T.API[Mr]);var Br=y.getPageWidth=function(t){return(Tt[t=t||Z].mediaBox.topRightX-Tt[t].mediaBox.bottomLeftX)/_t},qr=y.setPageWidth=function(t,e){Tt[t].mediaBox.topRightX=e*_t+Tt[t].mediaBox.bottomLeftX},Tr=y.getPageHeight=function(t){return(Tt[t=t||Z].mediaBox.topRightY-Tt[t].mediaBox.bottomLeftY)/_t},Dr=y.setPageHeight=function(t,e){Tt[t].mediaBox.topRightY=e*_t+Tt[t].mediaBox.bottomLeftY};return y.internal={pdfEscape:Ie,getStyle:tr,getFont:lr,getFontSize:mt,getCharSpace:Pr,getTextColor:Sr,getLineHeight:gr,getLineHeightFactor:mr,getLineWidth:pr,write:ht,getHorizontalCoordinate:br,getVerticalCoordinate:yr,getCoordinateString:wr,getVerticalCoordinateString:xr,collections:{},newObject:Xt,newAdditionalObject:Zt,newObjectDeferred:$t,newObjectDeferredBegin:Kt,getFilters:ne,putStream:ie,events:Dt,scaleFactor:_t,pageSize:{getWidth:function(){return Br(Z)},setWidth:function(t){qr(Z,t)},getHeight:function(){return Tr(Z)},setHeight:function(t){Dr(Z,t)}},encryptionOptions:v,encryption:Je,getEncryptor:Ye,output:We,getNumberOfPages:Me,pages:at,out:ft,f2:M,f3:D,getPageInfo:Xe,getPageInfoByObjId:$e,getCurrentPageInfo:Ke,getPDFVersion:x,Point:Ir,Rectangle:Cr,Matrix:Wt,hasHotfix:Ge},Object.defineProperty(y.internal.pageSize,"width",{get:function(){return Br(Z)},set:function(t){qr(Z,t)},enumerable:!0,configurable:!0}),Object.defineProperty(y.internal.pageSize,"height",{get:function(){return Tr(Z)},set:function(t){Dr(Z,t)},enumerable:!0,configurable:!0}),ke.call(y,dt),St="F1",Fe(o,r),Dt.publish("initialized"),y}C.prototype.lsbFirstWord=function(t){return String.fromCharCode(t>>0&255,t>>8&255,t>>16&255,t>>24&255)},C.prototype.toHexString=function(t){return t.split("").map((function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)})).join("")},C.prototype.hexToBytes=function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(String.fromCharCode(parseInt(t.substr(r,2),16)));return e.join("")},C.prototype.processOwnerPassword=function(t,e){return O(P(e).substr(0,5),t)},C.prototype.encryptor=function(t,e){var r=P(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(t){return O(r,t)}},E.prototype.equals=function(t){var e,r="id,objectNumber,equals";if(!t||i()(t)!==i()(this))return!1;var n=0;for(e in this)if(!(r.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!t.hasOwnProperty(e))return!1;if(this[e]!==t[e])return!1;n++}for(e in t)t.hasOwnProperty(e)&&r.indexOf(e)<0&&n--;return 0===n},T.API={events:[]},T.version="2.5.1";var D=T.API,z=1,U=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},H=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},V=function(t){return t.toFixed(2)},W=function(t){return t.toFixed(5)};D.__acroform__={};var G=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},J=function(t){return t*z},Y=function(t){var e=new ft,r=St.internal.getHeight(t)||0,n=St.internal.getWidth(t)||0;return e.BBox=[0,0,Number(V(n)),Number(V(r))],e},X=D.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<e},$=D.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<e)},K=D.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(t&1<<e)?0:1},Z=D.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return K(t,e-1)},Q=D.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return X(t,e-1)},tt=D.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return $(t,e-1)},et=D.__acroform__.calculateCoordinates=function(t,e){var r=e.internal.getHorizontalCoordinate,n=e.internal.getVerticalCoordinate,i=t[0],o=t[1],a=t[2],s=t[3],u={};return u.lowerLeft_X=r(i)||0,u.lowerLeft_Y=n(o+s)||0,u.upperRight_X=r(i+a)||0,u.upperRight_Y=n(o)||0,[Number(V(u.lowerLeft_X)),Number(V(u.lowerLeft_Y)),Number(V(u.upperRight_X)),Number(V(u.upperRight_Y))]},rt=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],r=t._V||t.DV,n=nt(t,r),i=t.scope.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(t.scope.__private__.encodeColorString(t.color)),e.push("/"+i+" "+V(n.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(n.text),e.push("ET"),e.push("Q"),e.push("EMC");var o=Y(t);return o.scope=t.scope,o.stream=e.join("\n"),o}},nt=function(t,e){var r=0===t.fontSize?t.maxFontSize:t.fontSize,n={text:"",fontSize:""},i=(e=")"==(e="("==e.substr(0,1)?e.substr(1):e).substr(e.length-1)?e.substr(0,e.length-1):e).split(" ");i=t.multiline?i.map((function(t){return t.split("\n")})):i.map((function(t){return[t]}));var o=r,a=St.internal.getHeight(t)||0;a=a<0?-a:a;var s=St.internal.getWidth(t)||0;s=s<0?-s:s;var u=function(e,r,n){if(e+1<i.length){var o=r+" "+i[e+1][0];return it(o,t,n).width<=s-4}return!1};o++;t:for(;o>0;){e="",o--;var c,l,f=it("3",t,o).height,h=t.multiline?a-o:(a-f)/2,p=h+=2,d=0,g=0,v=0;if(o<=0){e="(...) Tj\n",e+="% Width of Text: "+it(e,t,o=12).width+", FieldWidth:"+s+"\n";break}for(var m="",b=0,y=0;y<i.length;y++)if(i.hasOwnProperty(y)){var w=!1;if(1!==i[y].length&&v!==i[y].length-1){if((f+2)*(b+2)+2>a)continue t;m+=i[y][v],w=!0,g=y,y--}else{m=" "==(m+=i[y][v]+" ").substr(m.length-1)?m.substr(0,m.length-1):m;var x=parseInt(y),A=u(x,m,o),N=y>=i.length-1;if(A&&!N){m+=" ",v=0;continue}if(A||N){if(N)g=x;else if(t.multiline&&(f+2)*(b+2)+2>a)continue t}else{if(!t.multiline)continue t;if((f+2)*(b+2)+2>a)continue t;g=x}}for(var L="",S=d;S<=g;S++){var _=i[S];if(t.multiline){if(S===g){L+=_[v]+" ",v=(v+1)%_.length;continue}if(S===d){L+=_[_.length-1]+" ";continue}}L+=_[0]+" "}switch(L=" "==L.substr(L.length-1)?L.substr(0,L.length-1):L,l=it(L,t,o).width,t.textAlign){case"right":c=s-l-2;break;case"center":c=(s-l)/2;break;case"left":default:c=2}e+=V(c)+" "+V(p)+" Td\n",e+="("+U(L)+") Tj\n",e+=-V(c)+" 0 Td\n",p=-(o+2),l=0,d=w?g:g+1,b++,m=""}break}return n.text=e,n.fontSize=o,n},it=function(t,e,r){var n=e.scope.internal.getFont(e.fontName,e.fontStyle),i=e.scope.getStringUnitWidth(t,{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r);return{height:e.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(r),charSpace:0})*parseFloat(r)*1.5,width:i}},ot={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},at=function(t,e){var r={type:"reference",object:t};void 0===e.internal.getPageInfo(t.page).pageContext.annotations.find((function(t){return t.type===r.type&&t.object===r.object}))&&e.internal.getPageInfo(t.page).pageContext.annotations.push(r)},st=function(t,e){if(e.scope=t,void 0!==t.internal&&(void 0===t.internal.acroformPlugin||!1===t.internal.acroformPlugin.isInitialized)){if(pt.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(ot)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");z=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new ht,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",(function(){var e;(e=t).internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})),t.internal.events.subscribe("buildDocument",(function(){!function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var e=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];n.objId=void 0,n.hasAnnotation&&at(n,t)}}(t)})),t.internal.events.subscribe("putCatalog",(function(){!function(t){if(void 0===t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(t)})),t.internal.events.subscribe("postPutPages",(function(e){!function(t,e){var r=!t;for(var n in t||(e.internal.newObjectDeferredBegin(e.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),e.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||e.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(t.hasOwnProperty(n)){var o=t[n],a=[],s=o.Rect;if(o.Rect&&(o.Rect=et(o.Rect,e)),e.internal.newObjectDeferredBegin(o.objId,!0),o.DA=St.createDefaultAppearanceStream(o),"object"===i()(o)&&"function"==typeof o.getKeyValueListForStream&&(a=o.getKeyValueListForStream()),o.Rect=s,o.hasAppearanceStream&&!o.appearanceStreamContent){var u=rt(o);a.push({key:"AP",value:"<</N "+u+">>"}),e.internal.acroformPlugin.xForms.push(u)}if(o.appearanceStreamContent){var c="";for(var l in o.appearanceStreamContent)if(o.appearanceStreamContent.hasOwnProperty(l)){var f=o.appearanceStreamContent[l];if(c+="/"+l+" ",c+="<<",Object.keys(f).length>=1||Array.isArray(f)){for(var n in f)if(f.hasOwnProperty(n)){var h=f[n];"function"==typeof h&&(h=h.call(e,o)),c+="/"+n+" "+h+" ",e.internal.acroformPlugin.xForms.indexOf(h)>=0||e.internal.acroformPlugin.xForms.push(h)}}else"function"==typeof(h=f)&&(h=h.call(e,o)),c+="/"+n+" "+h,e.internal.acroformPlugin.xForms.indexOf(h)>=0||e.internal.acroformPlugin.xForms.push(h);c+=">>"}a.push({key:"AP",value:"<<\n"+c+">>"})}e.internal.putStream({additionalKeyValues:a,objectId:o.objId}),e.internal.out("endobj")}r&&function(t,e){for(var r in t)if(t.hasOwnProperty(r)){var n=r,o=t[r];e.internal.newObjectDeferredBegin(o.objId,!0),"object"===i()(o)&&"function"==typeof o.putStream&&o.putStream(),delete t[n]}}(e.internal.acroformPlugin.xForms,e)}(e,t)})),t.internal.acroformPlugin.isInitialized=!0}},ut=D.__acroform__.arrayToPdfArray=function(t,e,r){var n=function(t){return t};if(Array.isArray(t)){for(var o="[",a=0;a<t.length;a++)switch(0!==a&&(o+=" "),i()(t[a])){case"boolean":case"number":case"object":o+=t[a].toString();break;case"string":"/"!==t[a].substr(0,1)?(void 0!==e&&r&&(n=r.internal.getEncryptor(e)),o+="("+U(n(t[a].toString()))+")"):o+=t[a].toString()}return o+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},ct=function(t,e,r){var n=function(t){return t};return void 0!==e&&r&&(n=r.internal.getEncryptor(e)),(t=t||"").toString(),"("+U(n(t))+")"},lt=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};lt.prototype.toString=function(){return this.objId+" 0 R"},lt.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},lt.prototype.getKeyValueListForStream=function(){var t=[],e=Object.getOwnPropertyNames(this).filter((function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"scope"!=t&&"objId"!=t&&"_"!=t.substring(0,1)}));for(var r in e)if(!1===Object.getOwnPropertyDescriptor(this,e[r]).configurable){var n=e[r],i=this[n];i&&(Array.isArray(i)?t.push({key:n,value:ut(i,this.objId,this.scope)}):i instanceof lt?(i.scope=this.scope,t.push({key:n,value:i.objId+" 0 R"})):"function"!=typeof i&&t.push({key:n,value:i}))}return t};var ft=function(){lt.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var t,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){t=e.trim()},get:function(){return t||null}})};G(ft,lt);var ht=function(){lt.call(this);var t,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+U(e(t))+")"}},set:function(e){t=e}})};G(ht,lt);var pt=function t(){lt.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute F supplied.');e=t}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(e,3))},set:function(t){!0===Boolean(t)?this.F=Q(e,3):this.F=tt(e,3)}});var r=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');r=t}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==n.length)return n},set:function(t){n=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(t){n[0]=t}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(t){n[1]=t}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(t){n[2]=t}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(t){n[3]=t}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=t;break;default:throw new Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var o=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!o||o.length<1){if(this instanceof xt)return;o="FieldObject"+t.FieldNum++}var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+U(e(o))+")"},set:function(t){o=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return o},set:function(t){o=t}});var a="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return a},set:function(t){a=t}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(t){s=t}});var u=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return u},set:function(t){u=t}});var c=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===c?50/z:c},set:function(t){c=t}});var l="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return l},set:function(t){l=t}});var f="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!f||this instanceof xt||this instanceof Nt))return ct(f,this.objId,this.scope)},set:function(t){t=t.toString(),f=t}});var h=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof bt==0?ct(h,this.objId,this.scope):h},set:function(t){t=t.toString(),h=this instanceof bt==0?"("===t.substr(0,1)?H(t.substr(1,t.length-2)):H(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof bt==1?H(h.substr(1,h.length-1)):h},set:function(t){t=t.toString(),h=this instanceof bt==1?"/"+t:t}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(t){this.V=t}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof bt==0?ct(p,this.objId,this.scope):p},set:function(t){t=t.toString(),p=this instanceof bt==0?"("===t.substr(0,1)?H(t.substr(1,t.length-2)):H(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof bt==1?H(p.substr(1,p.length-1)):p},set:function(t){t=t.toString(),p=this instanceof bt==1?"/"+t:t}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var d,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return g},set:function(t){t=Boolean(t),g=t}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(d)return d},set:function(t){d=t}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,1):this.Ff=tt(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,2):this.Ff=tt(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,3):this.Ff=tt(this.Ff,3)}});var v=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==v)return v},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');v=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(v){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:!0,enumerable:!0,set:function(t){switch(t){case"right":case 2:v=2;break;case"center":case 1:v=1;break;case"left":case 0:default:v=0}}})};G(pt,lt);var dt=function(){pt.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){t=e}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return ut(e,this.objId,this.scope)},set:function(t){var r,n;n=[],"string"==typeof(r=t)&&(n=function(t,e,r){r||(r=1);for(var n,i=[];n=e.exec(t);)i.push(n[r]);return i}(r,/\((.*?)\)/g)),e=n}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,r){for(r=r||!1,t=(t=t||"").toString();-1!==e.indexOf(t)&&(e.splice(e.indexOf(t),1),!1!==r););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,18):this.Ff=tt(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=Q(this.Ff,19):this.Ff=tt(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=Q(this.Ff,20),e.sort()):this.Ff=tt(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,22):this.Ff=tt(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,23):this.Ff=tt(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,27):this.Ff=tt(this.Ff,27)}}),this.hasAppearanceStream=!1};G(dt,pt);var gt=function(){dt.call(this),this.fontName="helvetica",this.combo=!1};G(gt,dt);var vt=function(){gt.call(this),this.combo=!0};G(vt,gt);var mt=function(){vt.call(this),this.edit=!0};G(mt,vt);var bt=function(){pt.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,15):this.Ff=tt(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,16):this.Ff=tt(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,17):this.Ff=tt(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,26):this.Ff=tt(this.Ff,26)}});var t,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(e).length){var r,n=[];for(r in n.push("<<"),e)n.push("/"+r+" ("+U(t(e[r]))+")");return n.push(">>"),n.join("\n")}},set:function(t){"object"===i()(t)&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){"string"==typeof t&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(e){t="/"+e}})};G(bt,pt);var yt=function(){bt.call(this),this.pushButton=!0};G(yt,bt);var wt=function(){bt.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=void 0!==e?e:[]}})};G(wt,bt);var xt=function(){var t,e;pt.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(t){e=t}});var r,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};this.scope&&(t=this.scope.internal.getEncryptor(this.objId));var e,r=[];for(e in r.push("<<"),n)r.push("/"+e+" ("+U(t(n[e]))+")");return r.push(">>"),r.join("\n")},set:function(t){"object"===i()(t)&&(n=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(t){"string"==typeof t&&(n.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+t}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=St.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};G(xt,pt),wt.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var r=this.Kids[e];r.appearanceStreamContent=t.createAppearanceStream(r.optionName),r.caption=t.getCA()}},wt.prototype.createOption=function(t){var e=new xt;return e.Parent=this,e.optionName=t,this.Kids.push(e),_t.call(this.scope,e),e};var At=function(){bt.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=St.CheckBox.createAppearanceStream()};G(At,bt);var Nt=function(){pt.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,13):this.Ff=tt(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,21):this.Ff=tt(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,23):this.Ff=tt(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,24):this.Ff=tt(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,25):this.Ff=tt(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,26):this.Ff=tt(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};G(Nt,pt);var Lt=function(){Nt.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(Z(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=Q(this.Ff,14):this.Ff=tt(this.Ff,14)}}),this.password=!0};G(Lt,Nt);var St={CheckBox:{createAppearanceStream:function(){return{N:{On:St.CheckBox.YesNormal},D:{On:St.CheckBox.YesPushDown,Off:St.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=Y(t);e.scope=t.scope;var r=[],n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color),o=nt(t,t.caption);return r.push("0.749023 g"),r.push("0 0 "+V(St.internal.getWidth(t))+" "+V(St.internal.getHeight(t))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+V(o.fontSize)+" Tf "+i),r.push("BT"),r.push(o.text),r.push("ET"),r.push("Q"),r.push("EMC"),e.stream=r.join("\n"),e},YesNormal:function(t){var e=Y(t);e.scope=t.scope;var r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),i=[],o=St.internal.getHeight(t),a=St.internal.getWidth(t),s=nt(t,t.caption);return i.push("1 g"),i.push("0 0 "+V(a)+" "+V(o)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+V(a-1)+" "+V(o-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+r+" "+V(s.fontSize)+" Tf "+n),i.push(s.text),i.push("ET"),i.push("Q"),e.stream=i.join("\n"),e},OffPushDown:function(t){var e=Y(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+V(St.internal.getWidth(t))+" "+V(St.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:St.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=St.RadioButton.Circle.YesNormal,e.D[t]=St.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=Y(t);e.scope=t.scope;var r=[],n=St.internal.getWidth(t)<=St.internal.getHeight(t)?St.internal.getWidth(t)/4:St.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=St.internal.Bezier_C,o=Number((n*i).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+W(St.internal.getWidth(t)/2)+" "+W(St.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),r.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),r.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),r.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e},YesPushDown:function(t){var e=Y(t);e.scope=t.scope;var r=[],n=St.internal.getWidth(t)<=St.internal.getHeight(t)?St.internal.getWidth(t)/4:St.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),o=Number((i*St.internal.Bezier_C).toFixed(5)),a=Number((n*St.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+W(St.internal.getWidth(t)/2)+" "+W(St.internal.getHeight(t)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),r.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),r.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),r.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),r.push("f"),r.push("Q"),r.push("0 g"),r.push("q"),r.push("1 0 0 1 "+W(St.internal.getWidth(t)/2)+" "+W(St.internal.getHeight(t)/2)+" cm"),r.push(n+" 0 m"),r.push(n+" "+a+" "+a+" "+n+" 0 "+n+" c"),r.push("-"+a+" "+n+" -"+n+" "+a+" -"+n+" 0 c"),r.push("-"+n+" -"+a+" -"+a+" -"+n+" 0 -"+n+" c"),r.push(a+" -"+n+" "+n+" -"+a+" "+n+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e},OffPushDown:function(t){var e=Y(t);e.scope=t.scope;var r=[],n=St.internal.getWidth(t)<=St.internal.getHeight(t)?St.internal.getWidth(t)/4:St.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),o=Number((i*St.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+W(St.internal.getWidth(t)/2)+" "+W(St.internal.getHeight(t)/2)+" cm"),r.push(i+" 0 m"),r.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),r.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),r.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),r.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),r.push("f"),r.push("Q"),e.stream=r.join("\n"),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:St.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=St.RadioButton.Cross.YesNormal,e.D[t]=St.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=Y(t);e.scope=t.scope;var r=[],n=St.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+V(St.internal.getWidth(t)-2)+" "+V(St.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(V(n.x1.x)+" "+V(n.x1.y)+" m"),r.push(V(n.x2.x)+" "+V(n.x2.y)+" l"),r.push(V(n.x4.x)+" "+V(n.x4.y)+" m"),r.push(V(n.x3.x)+" "+V(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join("\n"),e},YesPushDown:function(t){var e=Y(t);e.scope=t.scope;var r=St.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+V(St.internal.getWidth(t))+" "+V(St.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+V(St.internal.getWidth(t)-2)+" "+V(St.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(V(r.x1.x)+" "+V(r.x1.y)+" m"),n.push(V(r.x2.x)+" "+V(r.x2.y)+" l"),n.push(V(r.x4.x)+" "+V(r.x4.y)+" m"),n.push(V(r.x3.x)+" "+V(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=Y(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+V(St.internal.getWidth(t))+" "+V(St.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join("\n"),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+r}};St.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=St.internal.getWidth(t),r=St.internal.getHeight(t),n=Math.min(e,r);return{x1:{x:(e-n)/2,y:(r-n)/2+n},x2:{x:(e-n)/2+n,y:(r-n)/2},x3:{x:(e-n)/2,y:(r-n)/2},x4:{x:(e-n)/2+n,y:(r-n)/2+n}}}},St.internal.getWidth=function(t){var e=0;return"object"===i()(t)&&(e=J(t.Rect[2])),e},St.internal.getHeight=function(t){var e=0;return"object"===i()(t)&&(e=J(t.Rect[3])),e};var _t=D.addField=function(t){if(st(this,t),!(t instanceof pt))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};D.AcroFormChoiceField=dt,D.AcroFormListBox=gt,D.AcroFormComboBox=vt,D.AcroFormEditBox=mt,D.AcroFormButton=bt,D.AcroFormPushButton=yt,D.AcroFormRadioButton=wt,D.AcroFormCheckBox=At,D.AcroFormTextField=Nt,D.AcroFormPasswordField=Lt,D.AcroFormAppearance=St,D.AcroForm={ChoiceField:dt,ListBox:gt,ComboBox:vt,EditBox:mt,Button:bt,PushButton:yt,RadioButton:wt,CheckBox:At,TextField:Nt,PasswordField:Lt,Appearance:St},T.AcroForm={ChoiceField:dt,ListBox:gt,ComboBox:vt,EditBox:mt,Button:bt,PushButton:yt,RadioButton:wt,CheckBox:At,TextField:Nt,PasswordField:Lt,Appearance:St};var Pt,kt;T.AcroForm;function jt(t){return t.reduce((function(t,e,r){return t[e]=r,t}),{})}!function(t){t.__addimage__={};var e="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},n=t.__addimage__.getImageFileTypeByImageData=function(t,n){var i,o,a,s,u,c=e;if("RGBA"===(n=n||e)||void 0!==t.data&&t.data instanceof Uint8ClampedArray&&"height"in t&&"width"in t)return"RGBA";if(L(t))for(u in r)for(a=r[u],i=0;i<a.length;i+=1){for(s=!0,o=0;o<a[i].length;o+=1)if(void 0!==a[i][o]&&a[i][o]!==t[o]){s=!1;break}if(!0===s){c=u;break}}else for(u in r)for(a=r[u],i=0;i<a.length;i+=1){for(s=!0,o=0;o<a[i].length;o+=1)if(void 0!==a[i][o]&&a[i][o]!==t.charCodeAt(o)){s=!1;break}if(!0===s){c=u;break}}return c===e&&n!==e&&(c=n),c},o=function t(e){for(var r=this.internal.write,n=this.internal.putStream,i=(0,this.internal.getFilters)();-1!==i.indexOf("FlateEncode");)i.splice(i.indexOf("FlateEncode"),1);e.objectId=this.internal.newObject();var o=[];if(o.push({key:"Type",value:"/XObject"}),o.push({key:"Subtype",value:"/Image"}),o.push({key:"Width",value:e.width}),o.push({key:"Height",value:e.height}),e.colorSpace===b.INDEXED?o.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(e.palette.length/3-1)+" "+("sMask"in e&&void 0!==e.sMask?e.objectId+2:e.objectId+1)+" 0 R]"}):(o.push({key:"ColorSpace",value:"/"+e.colorSpace}),e.colorSpace===b.DEVICE_CMYK&&o.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),o.push({key:"BitsPerComponent",value:e.bitsPerComponent}),"decodeParameters"in e&&void 0!==e.decodeParameters&&o.push({key:"DecodeParms",value:"<<"+e.decodeParameters+">>"}),"transparency"in e&&Array.isArray(e.transparency)){for(var a="",s=0,u=e.transparency.length;s<u;s++)a+=e.transparency[s]+" "+e.transparency[s]+" ";o.push({key:"Mask",value:"["+a+"]"})}void 0!==e.sMask&&o.push({key:"SMask",value:e.objectId+1+" 0 R"});var c=void 0!==e.filter?["/"+e.filter]:void 0;if(n({data:e.data,additionalKeyValues:o,alreadyAppliedFilters:c,objectId:e.objectId}),r("endobj"),"sMask"in e&&void 0!==e.sMask){var l="/Predictor "+e.predictor+" /Colors 1 /BitsPerComponent "+e.bitsPerComponent+" /Columns "+e.width,f={width:e.width,height:e.height,colorSpace:"DeviceGray",bitsPerComponent:e.bitsPerComponent,decodeParameters:l,data:e.sMask};"filter"in e&&(f.filter=e.filter),t.call(this,f)}if(e.colorSpace===b.INDEXED){var h=this.internal.newObject();n({data:_(new Uint8Array(e.palette)),objectId:h}),r("endobj")}},a=function(){var t=this.internal.collections.addImage_images;for(var e in t)o.call(this,t[e])},s=function(){var t,e=this.internal.collections.addImage_images,r=this.internal.write;for(var n in e)r("/I"+(t=e[n]).index,t.objectId,"0","R")},u=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",s))},c=function(){var t=this.internal.collections.addImage_images;return u.call(this),t},l=function(){return Object.keys(this.internal.collections.addImage_images).length},f=function(e){return"function"==typeof t["process"+e.toUpperCase()]},p=function(t){return"object"===i()(t)&&1===t.nodeType},d=function(e,r){if("IMG"===e.nodeName&&e.hasAttribute("src")){var n=""+e.getAttribute("src");if(0===n.indexOf("data:image/"))return h(unescape(n).split("base64,").pop());var i=t.loadFile(n,!0);if(void 0!==i)return i}if("CANVAS"===e.nodeName){if(0===e.width||0===e.height)throw new Error("Given canvas must have data. Canvas width: "+e.width+", height: "+e.height);var o;switch(r){case"PNG":o="image/png";break;case"WEBP":o="image/webp";break;case"JPEG":case"JPG":default:o="image/jpeg"}return h(e.toDataURL(o,1).split("base64,").pop())}},g=function(t){var e=this.internal.collections.addImage_images;if(e)for(var r in e)if(t===e[r].alias)return e[r]},v=function(t,e,r){return t||e||(t=-96,e=-96),t<0&&(t=-1*r.width*72/t/this.internal.scaleFactor),e<0&&(e=-1*r.height*72/e/this.internal.scaleFactor),0===t&&(t=e*r.width/r.height),0===e&&(e=t*r.height/r.width),[t,e]},m=function(t,e,r,n,i,o){var a=v.call(this,r,n,i),s=this.internal.getCoordinateString,u=this.internal.getVerticalCoordinateString,l=c.call(this);if(r=a[0],n=a[1],l[i.index]=i,o){o*=Math.PI/180;var f=Math.cos(o),h=Math.sin(o),p=function(t){return t.toFixed(4)},d=[p(f),p(h),p(-1*h),p(f),0,0,"cm"]}this.internal.write("q"),o?(this.internal.write([1,"0","0",1,s(t),u(e+n),"cm"].join(" ")),this.internal.write(d.join(" ")),this.internal.write([s(r),"0","0",s(n),"0","0","cm"].join(" "))):this.internal.write([s(r),"0","0",s(n),s(t),u(e+n),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+i.index+" Do"),this.internal.write("Q")},b=t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var y=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},w=t.__addimage__.sHashCode=function(t){var e,r,n=0;if("string"==typeof t)for(r=t.length,e=0;e<r;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;else if(L(t))for(r=t.byteLength/2,e=0;e<r;e++)n=(n<<5)-n+t[e],n|=0;return n},x=t.__addimage__.validateStringAsBase64=function(t){(t=t||"").toString().trim();var e=!0;return 0===t.length&&(e=!1),t.length%4!=0&&(e=!1),!1===/^[A-Za-z0-9+/]+$/.test(t.substr(0,t.length-2))&&(e=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(t.substr(-2))&&(e=!1),e},A=t.__addimage__.extractImageFromDataUrl=function(t){var e=(t=t||"").split("base64,"),r=null;if(2===e.length){var n=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(e[0]);Array.isArray(n)&&(r={mimeType:n[1],charset:n[2],data:e[1]})}return r},N=t.__addimage__.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array};t.__addimage__.isArrayBuffer=function(t){return N()&&t instanceof ArrayBuffer};var L=t.__addimage__.isArrayBufferView=function(t){return N()&&"undefined"!=typeof Uint32Array&&(t instanceof Int8Array||t instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)},S=t.__addimage__.binaryStringToUint8Array=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++)r[n]=t.charCodeAt(n);return r},_=t.__addimage__.arrayBufferToBinaryString=function(t){for(var e="",r=L(t)?t:new Uint8Array(t),n=0;n<r.length;n+=8192)e+=String.fromCharCode.apply(null,r.subarray(n,n+8192));return e};t.addImage=function(){var t,r,n,o,a,s,c,l,f;if("number"==typeof arguments[1]?(r=e,n=arguments[1],o=arguments[2],a=arguments[3],s=arguments[4],c=arguments[5],l=arguments[6],f=arguments[7]):(r=arguments[1],n=arguments[2],o=arguments[3],a=arguments[4],s=arguments[5],c=arguments[6],l=arguments[7],f=arguments[8]),"object"===i()(t=arguments[0])&&!p(t)&&"imageData"in t){var h=t;t=h.imageData,r=h.format||r||e,n=h.x||n||0,o=h.y||o||0,a=h.w||h.width||a,s=h.h||h.height||s,c=h.alias||c,l=h.compression||l,f=h.rotation||h.angle||f}var d=this.internal.getFilters();if(void 0===l&&-1!==d.indexOf("FlateEncode")&&(l="SLOW"),isNaN(n)||isNaN(o))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var g=P.call(this,t,r,c,l);return m.call(this,n,o,a,s,g,f),this};var P=function(r,i,o,a){var s,u,c;if("string"==typeof r&&n(r)===e){r=unescape(r);var h=k(r,!1);(""!==h||void 0!==(h=t.loadFile(r,!0)))&&(r=h)}if(p(r)&&(r=d(r,i)),i=n(r,i),!f(i))throw new Error("addImage does not support files of type '"+i+"', please ensure that a plugin for '"+i+"' support is added.");if((null==(c=o)||0===c.length)&&(o=function(t){return"string"==typeof t||L(t)?w(t):L(t.data)?w(t.data):null}(r)),(s=g.call(this,o))||(N()&&(r instanceof Uint8Array||"RGBA"===i||(u=r,r=S(r))),s=this["process"+i.toUpperCase()](r,l.call(this),o,function(e){return e&&"string"==typeof e&&(e=e.toUpperCase()),e in t.image_compression?e:y.NONE}(a),u)),!s)throw new Error("An unknown error occurred whilst processing the image.");return s},k=t.__addimage__.convertBase64ToBinaryString=function(t,e){var r;e="boolean"!=typeof e||e;var n,i="";if("string"==typeof t){n=null!==(r=A(t))?r.data:t;try{i=h(n)}catch(t){if(e)throw x(n)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return i};t.getImageProperties=function(r){var i,o,a="";if(p(r)&&(r=d(r)),"string"==typeof r&&n(r)===e&&(""===(a=k(r,!1))&&(a=t.loadFile(r)||""),r=a),o=n(r),!f(o))throw new Error("addImage does not support files of type '"+o+"', please ensure that a plugin for '"+o+"' support is added.");if(!N()||r instanceof Uint8Array||(r=S(r)),!(i=this["process"+o.toUpperCase()](r)))throw new Error("An unknown error occurred whilst processing the image");return i.fileType=o,i}}(T.API),
|
|
43
|
+
/**
|
|
44
|
+
* @license
|
|
45
|
+
* Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
|
|
46
|
+
*
|
|
47
|
+
* Licensed under the MIT License.
|
|
48
|
+
* http://opensource.org/licenses/mit-license
|
|
49
|
+
*/
|
|
50
|
+
Pt=T.API,kt=function(t){if(void 0!==t&&""!=t)return!0},T.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),Pt.events.push(["putPage",function(t){for(var e,r,n,i=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,a=this.internal.getPageInfoByObjId(t.objId),s=t.pageContext.annotations,u=!1,c=0;c<s.length&&!u;c++)switch((e=s[c]).type){case"link":(kt(e.options.url)||kt(e.options.pageNumber))&&(u=!0);break;case"reference":case"text":case"freetext":u=!0}if(0!=u){this.internal.write("/Annots [");for(var l=0;l<s.length;l++){e=s[l];var f=this.internal.pdfEscape,h=this.internal.getEncryptor(t.objId);switch(e.type){case"reference":this.internal.write(" "+e.object.objId+" 0 R ");break;case"text":var p=this.internal.newAdditionalObject(),d=this.internal.newAdditionalObject(),g=this.internal.getEncryptor(p.objId),v=e.title||"Note";n="<</Type /Annot /Subtype /Text "+(r="/Rect ["+i(e.bounds.x)+" "+o(e.bounds.y+e.bounds.h)+" "+i(e.bounds.x+e.bounds.w)+" "+o(e.bounds.y)+"] ")+"/Contents ("+f(g(e.contents))+")",n+=" /Popup "+d.objId+" 0 R",n+=" /P "+a.objId+" 0 R",n+=" /T ("+f(g(v))+") >>",p.content=n;var m=p.objId+" 0 R";n="<</Type /Annot /Subtype /Popup "+(r="/Rect ["+i(e.bounds.x+30)+" "+o(e.bounds.y+e.bounds.h)+" "+i(e.bounds.x+e.bounds.w+30)+" "+o(e.bounds.y)+"] ")+" /Parent "+m,e.open&&(n+=" /Open true"),n+=" >>",d.content=n,this.internal.write(p.objId,"0 R",d.objId,"0 R");break;case"freetext":r="/Rect ["+i(e.bounds.x)+" "+o(e.bounds.y)+" "+i(e.bounds.x+e.bounds.w)+" "+o(e.bounds.y+e.bounds.h)+"] ";var b=e.color||"#000000";n="<</Type /Annot /Subtype /FreeText "+r+"/Contents ("+f(h(e.contents))+")",n+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+b+")",n+=" /Border [0 0 0]",n+=" >>",this.internal.write(n);break;case"link":if(e.options.name){var y=this.annotations._nameMap[e.options.name];e.options.pageNumber=y.page,e.options.top=y.y}else e.options.top||(e.options.top=0);if(r="/Rect ["+e.finalBounds.x+" "+e.finalBounds.y+" "+e.finalBounds.w+" "+e.finalBounds.h+"] ",n="",e.options.url)n="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /A <</S /URI /URI ("+f(h(e.options.url))+") >>";else if(e.options.pageNumber)switch(n="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(e.options.pageNumber).objId+" 0 R",e.options.magFactor=e.options.magFactor||"XYZ",e.options.magFactor){case"Fit":n+=" /Fit]";break;case"FitH":n+=" /FitH "+e.options.top+"]";break;case"FitV":e.options.left=e.options.left||0,n+=" /FitV "+e.options.left+"]";break;case"XYZ":default:var w=o(e.options.top);e.options.left=e.options.left||0,void 0===e.options.zoom&&(e.options.zoom=0),n+=" /XYZ "+e.options.left+" "+w+" "+e.options.zoom+"]"}""!=n&&(n+=" >>",this.internal.write(n))}}this.internal.write("]")}}]),Pt.createAnnotation=function(t){var e=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":e.pageContext.annotations.push(t)}},Pt.link=function(t,e,r,n,i){var o=this.internal.getCurrentPageInfo(),a=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;o.pageContext.annotations.push({finalBounds:{x:a(t),y:s(e),w:a(t+r),h:s(e+n)},options:i,type:"link"})},Pt.textWithLink=function(t,e,r,n){var i,o,a=this.getTextWidth(t),s=this.internal.getLineHeight()/this.internal.scaleFactor;if(void 0!==n.maxWidth){o=n.maxWidth;var u=this.splitTextToSize(t,o).length;i=Math.ceil(s*u)}else o=a,i=s;return this.text(t,e,r,n),r+=.2*s,"center"===n.align&&(e-=a/2),"right"===n.align&&(e-=a),this.link(e,r-s,o,i,n),a},Pt.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor},
|
|
51
|
+
/**
|
|
52
|
+
* @license
|
|
53
|
+
* Copyright (c) 2017 Aras Abbasi
|
|
54
|
+
*
|
|
55
|
+
* Licensed under the MIT License.
|
|
56
|
+
* http://opensource.org/licenses/mit-license
|
|
57
|
+
*/
|
|
58
|
+
function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},r={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];t.__arabicParser__={};var o=t.__arabicParser__.isInArabicSubstitutionA=function(t){return void 0!==e[t.charCodeAt(0)]},a=t.__arabicParser__.isArabicLetter=function(t){return"string"==typeof t&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(t)},s=t.__arabicParser__.isArabicEndLetter=function(t){return a(t)&&o(t)&&e[t.charCodeAt(0)].length<=2},u=t.__arabicParser__.isArabicAlfLetter=function(t){return a(t)&&i.indexOf(t.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(t){return a(t)&&o(t)&&e[t.charCodeAt(0)].length>=1};var c=t.__arabicParser__.arabicLetterHasFinalForm=function(t){return a(t)&&o(t)&&e[t.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(t){return a(t)&&o(t)&&e[t.charCodeAt(0)].length>=3};var l=t.__arabicParser__.arabicLetterHasMedialForm=function(t){return a(t)&&o(t)&&4==e[t.charCodeAt(0)].length},f=t.__arabicParser__.resolveLigatures=function(t){var e=0,n=r,i="",o=0;for(e=0;e<t.length;e+=1)void 0!==n[t.charCodeAt(e)]?(o++,"number"==typeof(n=n[t.charCodeAt(e)])&&(i+=String.fromCharCode(n),n=r,o=0),e===t.length-1&&(n=r,i+=t.charAt(e-(o-1)),e-=o-1,o=0)):(n=r,i+=t.charAt(e-o),e-=o,o=0);return i};t.__arabicParser__.isArabicDiacritic=function(t){return void 0!==t&&void 0!==n[t.charCodeAt(0)]};var h=t.__arabicParser__.getCorrectForm=function(t,e,r){return a(t)?!1===o(t)?-1:!c(t)||!a(e)&&!a(r)||!a(r)&&s(e)||s(t)&&!a(e)||s(t)&&u(e)||s(t)&&s(e)?0:l(t)&&a(e)&&!s(e)&&a(r)&&c(r)?3:s(t)||!a(r)?1:2:-1},p=function(t){var r=0,n=0,i=0,o="",s="",u="",c=(t=t||"").split("\\s+"),l=[];for(r=0;r<c.length;r+=1){for(l.push(""),n=0;n<c[r].length;n+=1)o=c[r][n],s=c[r][n-1],u=c[r][n+1],a(o)?(i=h(o,s,u),l[r]+=-1!==i?String.fromCharCode(e[o.charCodeAt(0)][i]):o):l[r]+=o;l[r]=f(l[r])}return l.join(" ")},d=t.__arabicParser__.processArabic=t.processArabic=function(){var t,e="string"==typeof arguments[0]?arguments[0]:arguments[0].text,r=[];if(Array.isArray(e)){var n=0;for(r=[],n=0;n<e.length;n+=1)Array.isArray(e[n])?r.push([p(e[n][0]),e[n][1],e[n][2]]):r.push([p(e[n])]);t=r}else t=p(e);return"string"==typeof arguments[0]?t:(arguments[0].text=t,arguments[0])};t.events.push(["preProcessText",d])}(T.API),T.API.autoPrint=function(t){var e;switch((t=t||{}).variant=t.variant||"non-conform",t.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",(function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){this.internal.out("/OpenAction "+e+" 0 R")}))}return this},
|
|
59
|
+
/**
|
|
60
|
+
* @license
|
|
61
|
+
* Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
|
|
62
|
+
*
|
|
63
|
+
* Licensed under the MIT License.
|
|
64
|
+
* http://opensource.org/licenses/mit-license
|
|
65
|
+
*/
|
|
66
|
+
function(t){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(e){t=e}});var e=150;Object.defineProperty(this,"width",{get:function(){return e},set:function(t){e=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=e+1)}});var r=300;Object.defineProperty(this,"height",{get:function(){return r},set:function(t){r=isNaN(t)||!1===Number.isInteger(t)||t<0?300:t,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=r+1)}});var n=[];Object.defineProperty(this,"childNodes",{get:function(){return n},set:function(t){n=t}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(t){i=t}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,e){var r;if("2d"!==(t=t||"2d"))return null;for(r in e)this.pdf.context2d.hasOwnProperty(r)&&(this.pdf.context2d[r]=e[r]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(T.API),function(t){var e={left:0,top:0,bottom:0,right:0},r=!1,n=function(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),o.call(this))},o=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var t=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var e=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var r=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return r},set:function(t){r=t}});var n=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return n},set:function(t){n=t}});var i=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return i},set:function(t){i=t}});var o=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return o},set:function(t){o=t}});var a=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return a},set:function(t){a=t}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(t){return n.call(this),this.internal.__cell__.headerFunction="function"==typeof t?t:void 0,this},t.getTextDimensions=function(t,e){n.call(this);var r=(e=e||{}).fontSize||this.getFontSize(),i=e.font||this.getFont(),o=e.scaleFactor||this.internal.scaleFactor,a=0,s=0,u=0,c=this;if(!Array.isArray(t)&&"string"!=typeof t){if("number"!=typeof t)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");t=String(t)}var l=e.maxWidth;l>0?"string"==typeof t?t=this.splitTextToSize(t,l):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,e){return t.concat(c.splitTextToSize(e,l))}),[])):t=Array.isArray(t)?t:[t];for(var f=0;f<t.length;f++)a<(u=this.getStringUnitWidth(t[f],{font:i})*r)&&(a=u);return 0!==a&&(s=t.length),{w:a/=o,h:Math.max((s*r*this.getLineHeightFactor()-r*(this.getLineHeightFactor()-1))/o,0)}},t.cellAddPage=function(){n.call(this),this.addPage();var t=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new a(t.left,t.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var s=t.cell=function(){var t;t=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),n.call(this);var i=this.internal.__cell__.lastCell,o=this.internal.__cell__.padding,s=this.internal.__cell__.margins||e,u=this.internal.__cell__.tableHeaderRow,c=this.internal.__cell__.printHeaders;return void 0!==i.lineNumber&&(i.lineNumber===t.lineNumber?(t.x=(i.x||0)+(i.width||0),t.y=i.y||0):i.y+i.height+t.height+s.bottom>this.getPageHeight()?(this.cellAddPage(),t.y=s.top,c&&u&&(this.printHeaderRow(t.lineNumber,!0),t.y+=u[0].height)):t.y=i.y+i.height||t.y),void 0!==t.text[0]&&(this.rect(t.x,t.y,t.width,t.height,!0===r?"FD":void 0),"right"===t.align?this.text(t.text,t.x+t.width-o,t.y+o,{align:"right",baseline:"top"}):"center"===t.align?this.text(t.text,t.x+t.width/2,t.y+o,{align:"center",baseline:"top",maxWidth:t.width-o-o}):this.text(t.text,t.x+o,t.y+o,{align:"left",baseline:"top",maxWidth:t.width-o-o})),this.internal.__cell__.lastCell=t,this};t.table=function(t,r,c,l,f){if(n.call(this),!c)throw new Error("No data for PDF table.");var h,p,d,g,v=[],m=[],b=[],y={},w={},x=[],A=[],N=(f=f||{}).autoSize||!1,L=!1!==f.printHeaders,S=f.css&&void 0!==f.css["font-size"]?16*f.css["font-size"]:f.fontSize||12,_=f.margins||Object.assign({width:this.getPageWidth()},e),P="number"==typeof f.padding?f.padding:3,k=f.headerBackgroundColor||"#c8c8c8",j=f.headerTextColor||"#000";if(o.call(this),this.internal.__cell__.printHeaders=L,this.internal.__cell__.margins=_,this.internal.__cell__.table_font_size=S,this.internal.__cell__.padding=P,this.internal.__cell__.headerBackgroundColor=k,this.internal.__cell__.headerTextColor=j,this.setFontSize(S),null==l)m=v=Object.keys(c[0]),b=v.map((function(){return"left"}));else if(Array.isArray(l)&&"object"===i()(l[0]))for(v=l.map((function(t){return t.name})),m=l.map((function(t){return t.prompt||t.name||""})),b=l.map((function(t){return t.align||"left"})),h=0;h<l.length;h+=1)w[l[h].name]=l[h].width*(19.049976/25.4);else Array.isArray(l)&&"string"==typeof l[0]&&(m=v=l,b=v.map((function(){return"left"})));if(N||Array.isArray(l)&&"string"==typeof l[0])for(h=0;h<v.length;h+=1){for(y[g=v[h]]=c.map((function(t){return t[g]})),this.setFont(void 0,"bold"),x.push(this.getTextDimensions(m[h],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=y[g],this.setFont(void 0,"normal"),d=0;d<p.length;d+=1)x.push(this.getTextDimensions(p[d],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);w[g]=Math.max.apply(null,x)+P+P,x=[]}if(L){var O={};for(h=0;h<v.length;h+=1)O[v[h]]={},O[v[h]].text=m[h],O[v[h]].align=b[h];var I=u.call(this,O,w);A=v.map((function(e){return new a(t,r,w[e],I,O[e].text,void 0,O[e].align)})),this.setTableHeaderRow(A),this.printHeaderRow(1,!1)}var C=l.reduce((function(t,e){return t[e.name]=e.align,t}),{});for(h=0;h<c.length;h+=1){"rowStart"in f&&f.rowStart instanceof Function&&f.rowStart({row:h,data:c[h]},this);var F=u.call(this,c[h],w);for(d=0;d<v.length;d+=1){var R=c[h][v[d]];"cellStart"in f&&f.cellStart instanceof Function&&f.cellStart({row:h,col:d,data:R},this),s.call(this,new a(t,r,w[v[d]],F,R,h+2,C[v[d]]))}}return this.internal.__cell__.table_x=t,this.internal.__cell__.table_y=r,this};var u=function(t,e){var r=this.internal.__cell__.padding,n=this.internal.__cell__.table_font_size,i=this.internal.scaleFactor;return Object.keys(t).map((function(n){var i=t[n];return this.splitTextToSize(i.hasOwnProperty("text")?i.text:i,e[n]-r-r)}),this).map((function(t){return this.getLineHeightFactor()*t.length*n/i+r+r}),this).reduce((function(t,e){return Math.max(t,e)}),0)};t.setTableHeaderRow=function(t){n.call(this),this.internal.__cell__.tableHeaderRow=t},t.printHeaderRow=function(t,e){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var i;if(r=!0,"function"==typeof this.internal.__cell__.headerFunction){var o=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(o[0],o[1],o[2],o[3],void 0,-1)}this.setFont(void 0,"bold");for(var u=[],c=0;c<this.internal.__cell__.tableHeaderRow.length;c+=1){i=this.internal.__cell__.tableHeaderRow[c].clone(),e&&(i.y=this.internal.__cell__.margins.top||0,u.push(i)),i.lineNumber=t;var l=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),s.call(this,i),this.setTextColor(l)}u.length>0&&this.setTableHeaderRow(u),this.setFont(void 0,"normal"),r=!1}}(T.API);var Ot={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},It=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Ct=jt(It),Ft=[100,200,300,400,500,600,700,800,900],Rt=jt(Ft);function Et(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),r=function(t){return Ot[t=t||"normal"]?t:"normal"}(t.style),n=function(t){if(!t)return 400;if("number"==typeof t)return t>=100&&t<=900&&t%100==0?t:400;if(/^\d00$/.test(t))return parseInt(t);switch(t){case"bold":return 700;case"normal":default:return 400}}(t.weight),i=function(t){return"number"==typeof Ct[t=t||"normal"]?t:"normal"}(t.stretch);return{family:e,style:r,weight:n,stretch:i,src:t.src||[],ref:t.ref||{name:e,style:[i,r,n].join(" ")}}}function Mt(t,e,r,n){var i;for(i=r;i>=0&&i<e.length;i+=n)if(t[e[i]])return t[e[i]];for(i=r;i>=0&&i<e.length;i-=n)if(t[e[i]])return t[e[i]]}var Bt={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},qt={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Tt(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function Dt(t){return t.trimLeft()}function zt(t,e){for(var r=0;r<t.length;){if(t.charAt(r)===e)return[t.substring(0,r),t.substring(r+1)];r+=1}return null}function Ut(t){var e=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return null===e?null:[e[0],t.substring(e[0].length)]}var Ht,Vt,Wt,Gt=["times"];!function(t){var e,r,n,o,a,s,c,l,f,h=function(t){return t=t||{},this.isStrokeTransparent=t.isStrokeTransparent||!1,this.strokeOpacity=t.strokeOpacity||1,this.strokeStyle=t.strokeStyle||"#000000",this.fillStyle=t.fillStyle||"#000000",this.isFillTransparent=t.isFillTransparent||!1,this.fillOpacity=t.fillOpacity||1,this.font=t.font||"10px sans-serif",this.textBaseline=t.textBaseline||"alphabetic",this.textAlign=t.textAlign||"left",this.lineWidth=t.lineWidth||1,this.lineJoin=t.lineJoin||"miter",this.lineCap=t.lineCap||"butt",this.path=t.path||[],this.transform=void 0!==t.transform?t.transform.clone():new l,this.globalCompositeOperation=t.globalCompositeOperation||"normal",this.globalAlpha=t.globalAlpha||1,this.clip_path=t.clip_path||[],this.currentPoint=t.currentPoint||new s,this.miterLimit=t.miterLimit||10,this.lastPoint=t.lastPoint||new s,this.lineDashOffset=t.lineDashOffset||0,this.lineDash=t.lineDash||[],this.margin=t.margin||[0,0,0,0],this.prevPageLastElemOffset=t.prevPageLastElemOffset||0,this.ignoreClearRect="boolean"!=typeof t.ignoreClearRect||t.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new p(this),e=this.internal.f2,r=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,s=this.internal.Point,c=this.internal.Rectangle,l=this.internal.Matrix,f=new h}]);var p=function(t){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var e=t;Object.defineProperty(this,"pdf",{get:function(){return e}});var r=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return r},set:function(t){r=Boolean(t)}});var n=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return n},set:function(t){n=Boolean(t)}});var i=0;Object.defineProperty(this,"posX",{get:function(){return i},set:function(t){isNaN(t)||(i=t)}});var o=0;Object.defineProperty(this,"posY",{get:function(){return o},set:function(t){isNaN(t)||(o=t)}}),Object.defineProperty(this,"margin",{get:function(){return f.margin},set:function(t){var e;"number"==typeof t?e=[t,t,t,t]:((e=new Array(4))[0]=t[0],e[1]=t.length>=2?t[1]:e[0],e[2]=t.length>=3?t[2]:e[0],e[3]=t.length>=4?t[3]:e[1]),f.margin=e}});var a=!1;Object.defineProperty(this,"autoPaging",{get:function(){return a},set:function(t){a=t}});var s=0;Object.defineProperty(this,"lastBreak",{get:function(){return s},set:function(t){s=t}});var u=[];Object.defineProperty(this,"pageBreaks",{get:function(){return u},set:function(t){u=t}}),Object.defineProperty(this,"ctx",{get:function(){return f},set:function(t){t instanceof h&&(f=t)}}),Object.defineProperty(this,"path",{get:function(){return f.path},set:function(t){f.path=t}});var c=[];Object.defineProperty(this,"ctxStack",{get:function(){return c},set:function(t){c=t}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(t){var e;e=d(t),this.ctx.fillStyle=e.style,this.ctx.isFillTransparent=0===e.a,this.ctx.fillOpacity=e.a,this.pdf.setFillColor(e.r,e.g,e.b,{a:e.a}),this.pdf.setTextColor(e.r,e.g,e.b,{a:e.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(t){var e=d(t);this.ctx.strokeStyle=e.style,this.ctx.isStrokeTransparent=0===e.a,this.ctx.strokeOpacity=e.a,0===e.a?this.pdf.setDrawColor(255,255,255):(e.a,this.pdf.setDrawColor(e.r,e.g,e.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(t){-1!==["butt","round","square"].indexOf(t)&&(this.ctx.lineCap=t,this.pdf.setLineCap(t))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(t){isNaN(t)||(this.ctx.lineWidth=t,this.pdf.setLineWidth(t))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(t){-1!==["bevel","round","miter"].indexOf(t)&&(this.ctx.lineJoin=t,this.pdf.setLineJoin(t))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(t){isNaN(t)||(this.ctx.miterLimit=t,this.pdf.setMiterLimit(t))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(t){this.ctx.textBaseline=t}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(t){-1!==["right","end","center","left","start"].indexOf(t)&&(this.ctx.textAlign=t)}});var l=null;function p(t,e){if(null===l){var r=function(t){var e=[];return Object.keys(t).forEach((function(r){t[r].forEach((function(t){var n=null;switch(t){case"bold":n={family:r,weight:"bold"};break;case"italic":n={family:r,style:"italic"};break;case"bolditalic":n={family:r,weight:"bold",style:"italic"};break;case"":case"normal":n={family:r}}null!==n&&(n.ref={name:r,style:t},e.push(n))}))})),e}(t.getFontList());l=function(t){for(var e={},r=0;r<t.length;++r){var n=Et(t[r]),i=n.family,o=n.stretch,a=n.style,s=n.weight;e[i]=e[i]||{},e[i][o]=e[i][o]||{},e[i][o][a]=e[i][o][a]||{},e[i][o][a][s]=n}return e}(r.concat(e))}return l}var g=null;Object.defineProperty(this,"fontFaces",{get:function(){return g},set:function(t){l=null,g=t}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(t){var e;if(this.ctx.font=t,null!==(e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(t))){var r=e[1],n=(e[2],e[3]),i=e[4],o=(e[5],e[6]),a=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2];i="px"===a?Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor):"em"===a?Math.floor(parseFloat(i)*this.pdf.getFontSize()):Math.floor(parseFloat(i)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(i);var s=function(t){var e,r,n=[],i=t.trim();if(""===i)return Gt;if(i in qt)return[qt[i]];for(;""!==i;){switch(r=null,e=(i=Dt(i)).charAt(0)){case'"':case"'":r=zt(i.substring(1),e);break;default:r=Ut(i)}if(null===r)return Gt;if(n.push(r[0]),""!==(i=Dt(r[1]))&&","!==i.charAt(0))return Gt;i=i.replace(/^,/,"")}return n}(o);if(this.fontFaces){var u=function(t,e,r){for(var n=(r=r||{}).defaultFontFamily||"times",i=Object.assign({},Bt,r.genericFontFamilies||{}),o=null,a=null,s=0;s<e.length;++s)if(i[(o=Et(e[s])).family]&&(o.family=i[o.family]),t.hasOwnProperty(o.family)){a=t[o.family];break}if(!(a=a||t[n]))throw new Error("Could not find a font-family for the rule '"+Tt(o)+"' and default family '"+n+"'.");if(a=function(t,e){if(e[t])return e[t];var r=Ct[t],n=r<=Ct.normal?-1:1,i=Mt(e,It,r,n);if(!i)throw new Error("Could not find a matching font-stretch value for "+t);return i}(o.stretch,a),a=function(t,e){if(e[t])return e[t];for(var r=Ot[t],n=0;n<r.length;++n)if(e[r[n]])return e[r[n]];throw new Error("Could not find a matching font-style for "+t)}(o.style,a),!(a=function(t,e){if(e[t])return e[t];if(400===t&&e[500])return e[500];if(500===t&&e[400])return e[400];var r=Rt[t],n=Mt(e,Ft,r,t<400?-1:1);if(!n)throw new Error("Could not find a matching font-weight for value "+t);return n}(o.weight,a)))throw new Error("Failed to resolve a font for the rule '"+Tt(o)+"'.");return a}(p(this.pdf,this.fontFaces),s.map((function(t){return{family:t,stretch:"normal",weight:n,style:r}})));this.pdf.setFont(u.ref.name,u.ref.style)}else{var c="";("bold"===n||parseInt(n,10)>=700||"bold"===r)&&(c="bold"),"italic"===r&&(c+="italic"),0===c.length&&(c="normal");for(var l="",f={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},h=0;h<s.length;h++){if(void 0!==this.pdf.internal.getFont(s[h],c,{noFallback:!0,disableWarning:!0})){l=s[h];break}if("bolditalic"===c&&void 0!==this.pdf.internal.getFont(s[h],"bold",{noFallback:!0,disableWarning:!0}))l=s[h],c="bold";else if(void 0!==this.pdf.internal.getFont(s[h],"normal",{noFallback:!0,disableWarning:!0})){l=s[h],c="normal";break}}if(""===l)for(var d=0;d<s.length;d++)if(f[s[d]]){l=f[s[d]];break}l=""===l?"Times":l,this.pdf.setFont(l,c)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(t){this.ctx.globalCompositeOperation=t}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(t){this.ctx.globalAlpha=t}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(t){this.ctx.lineDashOffset=t,D.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(t){this.ctx.lineDash=t,D.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(t){this.ctx.ignoreClearRect=Boolean(t)}})};p.prototype.setLineDash=function(t){this.lineDash=t},p.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},p.prototype.fill=function(){N.call(this,"fill",!1)},p.prototype.stroke=function(){N.call(this,"stroke",!1)},p.prototype.beginPath=function(){this.path=[{type:"begin"}]},p.prototype.moveTo=function(t,e){if(isNaN(t)||isNaN(e))throw u.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var r=this.ctx.transform.applyToPoint(new s(t,e));this.path.push({type:"mt",x:r.x,y:r.y}),this.ctx.lastPoint=new s(t,e)},p.prototype.closePath=function(){var t=new s(0,0),e=0;for(e=this.path.length-1;-1!==e;e--)if("begin"===this.path[e].type&&"object"===i()(this.path[e+1])&&"number"==typeof this.path[e+1].x){t=new s(this.path[e+1].x,this.path[e+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new s(t.x,t.y)},p.prototype.lineTo=function(t,e){if(isNaN(t)||isNaN(e))throw u.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var r=this.ctx.transform.applyToPoint(new s(t,e));this.path.push({type:"lt",x:r.x,y:r.y}),this.ctx.lastPoint=new s(r.x,r.y)},p.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),N.call(this,null,!0)},p.prototype.quadraticCurveTo=function(t,e,r,n){if(isNaN(r)||isNaN(n)||isNaN(t)||isNaN(e))throw u.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var i=this.ctx.transform.applyToPoint(new s(r,n)),o=this.ctx.transform.applyToPoint(new s(t,e));this.path.push({type:"qct",x1:o.x,y1:o.y,x:i.x,y:i.y}),this.ctx.lastPoint=new s(i.x,i.y)},p.prototype.bezierCurveTo=function(t,e,r,n,i,o){if(isNaN(i)||isNaN(o)||isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw u.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var a=this.ctx.transform.applyToPoint(new s(i,o)),c=this.ctx.transform.applyToPoint(new s(t,e)),l=this.ctx.transform.applyToPoint(new s(r,n));this.path.push({type:"bct",x1:c.x,y1:c.y,x2:l.x,y2:l.y,x:a.x,y:a.y}),this.ctx.lastPoint=new s(a.x,a.y)},p.prototype.arc=function(t,e,r,n,i,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i))throw u.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(o=Boolean(o),!this.ctx.transform.isIdentity){var a=this.ctx.transform.applyToPoint(new s(t,e));t=a.x,e=a.y;var c=this.ctx.transform.applyToPoint(new s(0,r)),l=this.ctx.transform.applyToPoint(new s(0,0));r=Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2))}Math.abs(i-n)>=2*Math.PI&&(n=0,i=2*Math.PI),this.path.push({type:"arc",x:t,y:e,radius:r,startAngle:n,endAngle:i,counterclockwise:o})},p.prototype.arcTo=function(t,e,r,n,i){throw new Error("arcTo not implemented.")},p.prototype.rect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw u.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.lineTo(t+r,e),this.lineTo(t,e)},p.prototype.fillRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw u.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!v.call(this)){var i={};"butt"!==this.lineCap&&(i.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(i.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,e,r,n),this.fill(),i.hasOwnProperty("lineCap")&&(this.lineCap=i.lineCap),i.hasOwnProperty("lineJoin")&&(this.lineJoin=i.lineJoin)}},p.prototype.strokeRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw u.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");m.call(this)||(this.beginPath(),this.rect(t,e,r,n),this.stroke())},p.prototype.clearRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw u.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(t,e,r,n))},p.prototype.save=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,r=0;r<this.pdf.internal.getNumberOfPages();r++)this.pdf.setPage(r+1),this.pdf.internal.out("q");if(this.pdf.setPage(e),t){this.ctx.fontSize=this.pdf.internal.getFontSize();var n=new h(this.ctx);this.ctxStack.push(this.ctx),this.ctx=n}},p.prototype.restore=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,r=0;r<this.pdf.internal.getNumberOfPages();r++)this.pdf.setPage(r+1),this.pdf.internal.out("Q");this.pdf.setPage(e),t&&0!==this.ctxStack.length&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},p.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var d=function(t){var e,r,n,i;if(!0===t.isCanvasGradient&&(t=t.getColor()),!t)return{r:0,g:0,b:0,a:0,style:t};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(t))e=0,r=0,n=0,i=0;else{var o=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(t);if(null!==o)e=parseInt(o[1]),r=parseInt(o[2]),n=parseInt(o[3]),i=1;else if(null!==(o=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(t)))e=parseInt(o[1]),r=parseInt(o[2]),n=parseInt(o[3]),i=parseFloat(o[4]);else{if(i=1,"string"==typeof t&&"#"!==t.charAt(0)){var a=new g(t);t=a.ok?a.toHex():"#000000"}4===t.length?(e=t.substring(1,2),e+=e,r=t.substring(2,3),r+=r,n=t.substring(3,4),n+=n):(e=t.substring(1,3),r=t.substring(3,5),n=t.substring(5,7)),e=parseInt(e,16),r=parseInt(r,16),n=parseInt(n,16)}}return{r:e,g:r,b:n,a:i,style:t}},v=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},m=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};p.prototype.fillText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw u.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(n=isNaN(n)?void 0:n,!v.call(this)){var i=B(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;I.call(this,{text:t,x:e,y:r,scale:o,angle:i,align:this.textAlign,maxWidth:n})}},p.prototype.strokeText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw u.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!m.call(this)){n=isNaN(n)?void 0:n;var i=B(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;I.call(this,{text:t,x:e,y:r,scale:o,renderingMode:"stroke",angle:i,align:this.textAlign,maxWidth:n})}},p.prototype.measureText=function(t){if("string"!=typeof t)throw u.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var e=this.pdf,r=this.pdf.internal.scaleFactor,n=e.internal.getFontSize(),i=e.getStringUnitWidth(t)*n/e.internal.scaleFactor,o=function(t){var e=(t=t||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return e}}),this};return new o({width:i*=Math.round(96*r/72*1e4)/1e4})},p.prototype.scale=function(t,e){if(isNaN(t)||isNaN(e))throw u.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var r=new l(t,0,0,e,0,0);this.ctx.transform=this.ctx.transform.multiply(r)},p.prototype.rotate=function(t){if(isNaN(t))throw u.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var e=new l(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0);this.ctx.transform=this.ctx.transform.multiply(e)},p.prototype.translate=function(t,e){if(isNaN(t)||isNaN(e))throw u.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var r=new l(1,0,0,1,t,e);this.ctx.transform=this.ctx.transform.multiply(r)},p.prototype.transform=function(t,e,r,n,i,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(o))throw u.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var a=new l(t,e,r,n,i,o);this.ctx.transform=this.ctx.transform.multiply(a)},p.prototype.setTransform=function(t,e,r,n,i,o){t=isNaN(t)?1:t,e=isNaN(e)?0:e,r=isNaN(r)?0:r,n=isNaN(n)?1:n,i=isNaN(i)?0:i,o=isNaN(o)?0:o,this.ctx.transform=new l(t,e,r,n,i,o)};var b=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};p.prototype.drawImage=function(t,e,r,n,i,o,a,s,u){var f=this.pdf.getImageProperties(t),h=1,p=1,d=1,g=1;void 0!==n&&void 0!==s&&(d=s/n,g=u/i,h=f.width/n*s/n,p=f.height/i*u/i),void 0===o&&(o=e,a=r,e=0,r=0),void 0!==n&&void 0===s&&(s=n,u=i),void 0===n&&void 0===s&&(s=f.width,u=f.height);for(var v,m=this.ctx.transform.decompose(),w=B(m.rotate.shx),N=new l,S=(N=(N=(N=N.multiply(m.translate)).multiply(m.skew)).multiply(m.scale)).applyToRectangle(new c(o-e*d,a-r*g,n*h,i*p)),_=y.call(this,S),P=[],k=0;k<_.length;k+=1)-1===P.indexOf(_[k])&&P.push(_[k]);if(A(P),this.autoPaging)for(var j=P[0],O=P[P.length-1],I=j;I<O+1;I++){this.pdf.setPage(I);var C=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],F=1===I?this.posY+this.margin[0]:this.margin[0],R=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],E=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],M=1===I?0:R+(I-2)*E;if(0!==this.ctx.clip_path.length){var q=this.path;v=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=x(v,this.posX+this.margin[3],-M+F+this.ctx.prevPageLastElemOffset),L.call(this,"fill",!0),this.path=q}var T=JSON.parse(JSON.stringify(S));T=x([T],this.posX+this.margin[3],-M+F+this.ctx.prevPageLastElemOffset)[0];var D=(I>j||I<O)&&b.call(this);D&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],C,E,null).clip().discardPath()),this.pdf.addImage(t,"JPEG",T.x,T.y,T.w,T.h,null,null,w),D&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(t,"JPEG",S.x,S.y,S.w,S.h,null,null,w)};var y=function(t,e,r){var n=[];e=e||this.pdf.internal.pageSize.width,r=r||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var i=this.posY+this.ctx.prevPageLastElemOffset;switch(t.type){default:case"mt":case"lt":n.push(Math.floor((t.y+i)/r)+1);break;case"arc":n.push(Math.floor((t.y+i-t.radius)/r)+1),n.push(Math.floor((t.y+i+t.radius)/r)+1);break;case"qct":var o=q(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x,t.y);n.push(Math.floor((o.y+i)/r)+1),n.push(Math.floor((o.y+o.h+i)/r)+1);break;case"bct":var a=T(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x2,t.y2,t.x,t.y);n.push(Math.floor((a.y+i)/r)+1),n.push(Math.floor((a.y+a.h+i)/r)+1);break;case"rect":n.push(Math.floor((t.y+i)/r)+1),n.push(Math.floor((t.y+t.h+i)/r)+1)}for(var s=0;s<n.length;s+=1)for(;this.pdf.internal.getNumberOfPages()<n[s];)w.call(this);return n},w=function(){var t=this.fillStyle,e=this.strokeStyle,r=this.font,n=this.lineCap,i=this.lineWidth,o=this.lineJoin;this.pdf.addPage(),this.fillStyle=t,this.strokeStyle=e,this.font=r,this.lineCap=n,this.lineWidth=i,this.lineJoin=o},x=function(t,e,r){for(var n=0;n<t.length;n++)switch(t[n].type){case"bct":t[n].x2+=e,t[n].y2+=r;case"qct":t[n].x1+=e,t[n].y1+=r;case"mt":case"lt":case"arc":default:t[n].x+=e,t[n].y+=r}return t},A=function(t){return t.sort((function(t,e){return t-e}))},N=function(t,e){for(var r,n,i=this.fillStyle,o=this.strokeStyle,a=this.lineCap,s=this.lineWidth,u=Math.abs(s*this.ctx.transform.scaleX),c=this.lineJoin,l=JSON.parse(JSON.stringify(this.path)),f=JSON.parse(JSON.stringify(this.path)),h=[],p=0;p<f.length;p++)if(void 0!==f[p].x)for(var d=y.call(this,f[p]),g=0;g<d.length;g+=1)-1===h.indexOf(d[g])&&h.push(d[g]);for(var v=0;v<h.length;v++)for(;this.pdf.internal.getNumberOfPages()<h[v];)w.call(this);if(A(h),this.autoPaging)for(var m=h[0],N=h[h.length-1],S=m;S<N+1;S++){this.pdf.setPage(S),this.fillStyle=i,this.strokeStyle=o,this.lineCap=a,this.lineWidth=u,this.lineJoin=c;var _=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],P=1===S?this.posY+this.margin[0]:this.margin[0],k=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],j=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],O=1===S?0:k+(S-2)*j;if(0!==this.ctx.clip_path.length){var I=this.path;r=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=x(r,this.posX+this.margin[3],-O+P+this.ctx.prevPageLastElemOffset),L.call(this,t,!0),this.path=I}if(n=JSON.parse(JSON.stringify(l)),this.path=x(n,this.posX+this.margin[3],-O+P+this.ctx.prevPageLastElemOffset),!1===e||0===S){var C=(S>m||S<N)&&b.call(this);C&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],_,j,null).clip().discardPath()),L.call(this,t,e),C&&this.pdf.restoreGraphicsState()}this.lineWidth=s}else this.lineWidth=u,L.call(this,t,e),this.lineWidth=s;this.path=l},L=function(t,e){if(("stroke"!==t||e||!m.call(this))&&("stroke"===t||e||!v.call(this))){for(var r,n,i=[],o=this.path,a=0;a<o.length;a++){var s=o[a];switch(s.type){case"begin":i.push({begin:!0});break;case"close":i.push({close:!0});break;case"mt":i.push({start:s,deltas:[],abs:[]});break;case"lt":var u=i.length;if(o[a-1]&&!isNaN(o[a-1].x)&&(r=[s.x-o[a-1].x,s.y-o[a-1].y],u>0))for(;u>=0;u--)if(!0!==i[u-1].close&&!0!==i[u-1].begin){i[u-1].deltas.push(r),i[u-1].abs.push(s);break}break;case"bct":r=[s.x1-o[a-1].x,s.y1-o[a-1].y,s.x2-o[a-1].x,s.y2-o[a-1].y,s.x-o[a-1].x,s.y-o[a-1].y],i[i.length-1].deltas.push(r);break;case"qct":var c=o[a-1].x+2/3*(s.x1-o[a-1].x),l=o[a-1].y+2/3*(s.y1-o[a-1].y),f=s.x+2/3*(s.x1-s.x),h=s.y+2/3*(s.y1-s.y),p=s.x,d=s.y;r=[c-o[a-1].x,l-o[a-1].y,f-o[a-1].x,h-o[a-1].y,p-o[a-1].x,d-o[a-1].y],i[i.length-1].deltas.push(r);break;case"arc":i.push({deltas:[],abs:[],arc:!0}),Array.isArray(i[i.length-1].abs)&&i[i.length-1].abs.push(s)}}n=e?null:"stroke"===t?"stroke":"fill";for(var g=!1,b=0;b<i.length;b++)if(i[b].arc)for(var y=i[b].abs,w=0;w<y.length;w++){var x=y[w];"arc"===x.type?P.call(this,x.x,x.y,x.radius,x.startAngle,x.endAngle,x.counterclockwise,void 0,e,!g):C.call(this,x.x,x.y),g=!0}else if(!0===i[b].close)this.pdf.internal.out("h"),g=!1;else if(!0!==i[b].begin){var A=i[b].start.x,N=i[b].start.y;F.call(this,i[b].deltas,A,N),g=!0}n&&k.call(this,n),e&&j.call(this)}},S=function(t){var e=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,r=e*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return t-r;case"top":return t+e-r;case"hanging":return t+e-2*r;case"middle":return t+e/2-r;case"ideographic":return t;case"alphabetic":default:return t}},_=function(t){return t+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};p.prototype.createLinearGradient=function(){var t=function(){};return t.colorStops=[],t.addColorStop=function(t,e){this.colorStops.push([t,e])},t.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},t.isCanvasGradient=!0,t},p.prototype.createPattern=function(){return this.createLinearGradient()},p.prototype.createRadialGradient=function(){return this.createLinearGradient()};var P=function(t,e,r,n,i,o,a,s,u){for(var c=E.call(this,r,n,i,o),l=0;l<c.length;l++){var f=c[l];0===l&&(u?O.call(this,f.x1+t,f.y1+e):C.call(this,f.x1+t,f.y1+e)),R.call(this,t,e,f.x2,f.y2,f.x3,f.y3,f.x4,f.y4)}s?j.call(this):k.call(this,a)},k=function(t){switch(t){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},j=function(){this.pdf.clip(),this.pdf.discardPath()},O=function(t,e){this.pdf.internal.out(r(t)+" "+n(e)+" m")},I=function(t){var e;switch(t.align){case"right":case"end":e="right";break;case"center":e="center";break;case"left":case"start":default:e="left"}var r=this.pdf.getTextDimensions(t.text),n=S.call(this,t.y),i=_.call(this,n)-r.h,o=this.ctx.transform.applyToPoint(new s(t.x,n)),a=this.ctx.transform.decompose(),u=new l;u=(u=(u=u.multiply(a.translate)).multiply(a.skew)).multiply(a.scale);for(var f,h,p,d=this.ctx.transform.applyToRectangle(new c(t.x,n,r.w,r.h)),g=u.applyToRectangle(new c(t.x,i,r.w,r.h)),v=y.call(this,g),m=[],w=0;w<v.length;w+=1)-1===m.indexOf(v[w])&&m.push(v[w]);if(A(m),this.autoPaging)for(var N=m[0],P=m[m.length-1],k=N;k<P+1;k++){this.pdf.setPage(k);var j=1===k?this.posY+this.margin[0]:this.margin[0],O=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],I=this.pdf.internal.pageSize.height-this.margin[2],C=I-this.margin[0],F=this.pdf.internal.pageSize.width-this.margin[1],R=F-this.margin[3],E=1===k?0:O+(k-2)*C;if(0!==this.ctx.clip_path.length){var M=this.path;f=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=x(f,this.posX+this.margin[3],-1*E+j),L.call(this,"fill",!0),this.path=M}var B=x([JSON.parse(JSON.stringify(g))],this.posX+this.margin[3],-E+j+this.ctx.prevPageLastElemOffset)[0];t.scale>=.01&&(h=this.pdf.internal.getFontSize(),this.pdf.setFontSize(h*t.scale),p=this.lineWidth,this.lineWidth=p*t.scale);var q="text"!==this.autoPaging;if(q||B.y+B.h<=I){if(q||B.y>=j&&B.x<=F){var T=q?t.text:this.pdf.splitTextToSize(t.text,t.maxWidth||F-B.x)[0],D=x([JSON.parse(JSON.stringify(d))],this.posX+this.margin[3],-E+j+this.ctx.prevPageLastElemOffset)[0],z=q&&(k>N||k<P)&&b.call(this);z&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],R,C,null).clip().discardPath()),this.pdf.text(T,D.x,D.y,{angle:t.angle,align:e,renderingMode:t.renderingMode}),z&&this.pdf.restoreGraphicsState()}}else B.y<I&&(this.ctx.prevPageLastElemOffset+=I-B.y);t.scale>=.01&&(this.pdf.setFontSize(h),this.lineWidth=p)}else t.scale>=.01&&(h=this.pdf.internal.getFontSize(),this.pdf.setFontSize(h*t.scale),p=this.lineWidth,this.lineWidth=p*t.scale),this.pdf.text(t.text,o.x+this.posX,o.y+this.posY,{angle:t.angle,align:e,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),t.scale>=.01&&(this.pdf.setFontSize(h),this.lineWidth=p)},C=function(t,e,i,o){i=i||0,o=o||0,this.pdf.internal.out(r(t+i)+" "+n(e+o)+" l")},F=function(t,e,r){return this.pdf.lines(t,e,r,null,null)},R=function(t,r,n,i,s,u,c,l){this.pdf.internal.out([e(o(n+t)),e(a(i+r)),e(o(s+t)),e(a(u+r)),e(o(c+t)),e(a(l+r)),"c"].join(" "))},E=function(t,e,r,n){for(var i=2*Math.PI,o=Math.PI/2;e>r;)e-=i;var a=Math.abs(r-e);a<i&&n&&(a=i-a);for(var s=[],u=n?-1:1,c=e;a>1e-5;){var l=c+u*Math.min(a,o);s.push(M.call(this,t,c,l)),a-=Math.abs(l-c),c=l}return s},M=function(t,e,r){var n=(r-e)/2,i=t*Math.cos(n),o=t*Math.sin(n),a=i,s=-o,u=a*a+s*s,c=u+a*i+s*o,l=4/3*(Math.sqrt(2*u*c)-c)/(a*o-s*i),f=a-l*s,h=s+l*a,p=f,d=-h,g=n+e,v=Math.cos(g),m=Math.sin(g);return{x1:t*Math.cos(e),y1:t*Math.sin(e),x2:f*v-h*m,y2:f*m+h*v,x3:p*v-d*m,y3:p*m+d*v,x4:t*Math.cos(r),y4:t*Math.sin(r)}},B=function(t){return 180*t/Math.PI},q=function(t,e,r,n,i,o){var a=t+.5*(r-t),s=e+.5*(n-e),u=i+.5*(r-i),l=o+.5*(n-o),f=Math.min(t,i,a,u),h=Math.max(t,i,a,u),p=Math.min(e,o,s,l),d=Math.max(e,o,s,l);return new c(f,p,h-f,d-p)},T=function(t,e,r,n,i,o,a,s){var u,l,f,h,p,d,g,v,m,b,y,w,x,A,N=r-t,L=n-e,S=i-r,_=o-n,P=a-i,k=s-o;for(l=0;l<41;l++)m=(g=(f=t+(u=l/40)*N)+u*((p=r+u*S)-f))+u*(p+u*(i+u*P-p)-g),b=(v=(h=e+u*L)+u*((d=n+u*_)-h))+u*(d+u*(o+u*k-d)-v),0==l?(y=m,w=b,x=m,A=b):(y=Math.min(y,m),w=Math.min(w,b),x=Math.max(x,m),A=Math.max(A,b));return new c(Math.round(y),Math.round(w),Math.round(x-y),Math.round(A-w))},D=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var t,e,r=(t=this.ctx.lineDash,e=this.ctx.lineDashOffset,JSON.stringify({lineDash:t,lineDashOffset:e}));this.prevLineDash!==r&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=r)}}}(T.API),
|
|
67
|
+
/**
|
|
68
|
+
* @license
|
|
69
|
+
* jsPDF filters PlugIn
|
|
70
|
+
* Copyright (c) 2014 Aras Abbasi
|
|
71
|
+
*
|
|
72
|
+
* Licensed under the MIT License.
|
|
73
|
+
* http://opensource.org/licenses/mit-license
|
|
74
|
+
*/
|
|
75
|
+
function(t){var e=function(t){var e,r,n,i,o,a,s,u,c,l;for(/[^\x00-\xFF]/.test(t),r=[],n=0,i=(t+=e="\0\0\0\0".slice(t.length%4||4)).length;i>n;n+=4)0!==(o=(t.charCodeAt(n)<<24)+(t.charCodeAt(n+1)<<16)+(t.charCodeAt(n+2)<<8)+t.charCodeAt(n+3))?(a=(o=((o=((o=((o=(o-(l=o%85))/85)-(c=o%85))/85)-(u=o%85))/85)-(s=o%85))/85)%85,r.push(a+33,s+33,u+33,c+33,l+33)):r.push(122);return function(t,e){for(var r=e;r>0;r--)t.pop()}(r,e.length),String.fromCharCode.apply(String,r)+"~>"},r=function(t){var e,r,n,i,o,a=String,s="length",u=255,c="charCodeAt",l="slice",f="replace";for(t[l](-2),t=t[l](0,-2)[f](/\s/g,"")[f]("z","!!!!!"),n=[],i=0,o=(t+=e="uuuuu"[l](t[s]%5||5))[s];o>i;i+=5)r=52200625*(t[c](i)-33)+614125*(t[c](i+1)-33)+7225*(t[c](i+2)-33)+85*(t[c](i+3)-33)+(t[c](i+4)-33),n.push(u&r>>24,u&r>>16,u&r>>8,u&r);return function(t,e){for(var r=e;r>0;r--)t.pop()}(n,e[s]),a.fromCharCode.apply(a,n)},n=function(t){var e=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(t=t.replace(/\s/g,"")).indexOf(">")&&(t=t.substr(0,t.indexOf(">"))),t.length%2&&(t+="0"),!1===e.test(t))return"";for(var r="",n=0;n<t.length;n+=2)r+=String.fromCharCode("0x"+(t[n]+t[n+1]));return r},i=function(t){for(var e=new Uint8Array(t.length),r=t.length;r--;)e[r]=t.charCodeAt(r);return(e=Object(o.b)(e)).reduce((function(t,e){return t+String.fromCharCode(e)}),"")};t.processDataByFilters=function(t,o){var a=0,s=t||"",u=[];for("string"==typeof(o=o||[])&&(o=[o]),a=0;a<o.length;a+=1)switch(o[a]){case"ASCII85Decode":case"/ASCII85Decode":s=r(s),u.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":s=e(s),u.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":s=n(s),u.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":s=s.split("").map((function(t){return("0"+t.charCodeAt().toString(16)).slice(-2)})).join("")+">",u.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":s=i(s),u.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[a]+'" is not implemented')}return{data:s,reverseChain:u.reverse().join(" ")}}}(T.API),
|
|
76
|
+
/**
|
|
77
|
+
* @license
|
|
78
|
+
* jsPDF fileloading PlugIn
|
|
79
|
+
* Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
|
|
80
|
+
*
|
|
81
|
+
* Licensed under the MIT License.
|
|
82
|
+
* http://opensource.org/licenses/mit-license
|
|
83
|
+
*/
|
|
84
|
+
function(t){t.loadFile=function(t,e,r){return function(t,e,r){e=!1!==e,r="function"==typeof r?r:function(){};var n=void 0;try{n=function(t,e,r){var n=new XMLHttpRequest,i=0,o=function(t){var e=t.length,r=[],n=String.fromCharCode;for(i=0;i<e;i+=1)r.push(n(255&t.charCodeAt(i)));return r.join("")};if(n.open("GET",t,!e),n.overrideMimeType("text/plain; charset=x-user-defined"),!1===e&&(n.onload=function(){200===n.status?r(o(this.responseText)):r(void 0)}),n.send(null),e&&200===n.status)return o(n.responseText)}(t,e,r)}catch(t){}return n}(t,e,r)},t.loadImageFile=t.loadFile}(T.API),function(t){function e(){return(a.html2canvas?Promise.resolve(a.html2canvas):r.e(21).then(r.t.bind(null,1058,7))).catch((function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))})).then((function(t){return t.default?t.default:t}))}function n(){return(a.DOMPurify?Promise.resolve(a.DOMPurify):r.e(20).then(r.t.bind(null,1059,7))).catch((function(t){return Promise.reject(new Error("Could not load dompurify: "+t))})).then((function(t){return t.default?t.default:t}))}var o=function(t){var e=i()(t);return"undefined"===e?"undefined":"string"===e||t instanceof String?"string":"number"===e||t instanceof Number?"number":"function"===e||t instanceof Function?"function":t&&t.constructor===Array?"array":t&&1===t.nodeType?"element":"object"===e?"object":"unknown"},s=function(t,e){var r=document.createElement(t);for(var n in e.className&&(r.className=e.className),e.innerHTML&&e.dompurify&&(r.innerHTML=e.dompurify.sanitize(e.innerHTML)),e.style)r.style[n]=e.style[n];return r},u=function t(e){var r=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),n=t.convert(Promise.resolve(),r);return(n=n.setProgress(1,t,1,[t])).set(e)};(u.prototype=Object.create(Promise.prototype)).constructor=u,u.convert=function(t,e){return t.__proto__=e||u.prototype,t},u.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},u.prototype.from=function(t,e){return this.then((function(){switch(e=e||function(t){switch(o(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(t)){case"string":return this.then(n).then((function(e){return this.set({src:s("div",{innerHTML:t,dompurify:e})})}));case"element":return this.set({src:t});case"canvas":return this.set({canvas:t});case"img":return this.set({img:t});default:return this.error("Unknown source type.")}}))},u.prototype.to=function(t){switch(t){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},u.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then((function(){var t={position:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},e=function t(e,r){for(var n=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),i=e.firstChild;i;i=i.nextSibling)!0!==r&&1===i.nodeType&&"SCRIPT"===i.nodeName||n.appendChild(t(i,r));return 1===e.nodeType&&("CANVAS"===e.nodeName?(n.width=e.width,n.height=e.height,n.getContext("2d").drawImage(e,0,0)):"TEXTAREA"!==e.nodeName&&"SELECT"!==e.nodeName||(n.value=e.value),n.addEventListener("load",(function(){n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft}),!0)),n}(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===e.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=s("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=s("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(e),this.prop.container.firstChild.appendChild(s("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"}))},u.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(e).then((function(t){var e=Object.assign({},this.opt.html2canvas);return delete e.onrendered,t(this.prop.container,e)})).then((function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},u.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(e).then((function(t){var e=this.opt.jsPDF,r=this.opt.fontFaces,n="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,i=Object.assign({async:!0,allowTaint:!0,scale:n,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete i.onrendered,e.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,e.context2d.posX=this.opt.x,e.context2d.posY=this.opt.y,e.context2d.margin=this.opt.margin,e.context2d.fontFaces=r,r)for(var o=0;o<r.length;++o){var a=r[o],s=a.src.find((function(t){return"truetype"===t.format}));s&&e.addFont(s.url,a.ref.name,a.ref.style)}return i.windowHeight=i.windowHeight||0,i.windowHeight=0==i.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,e.context2d.save(!0),t(this.prop.container,i)})).then((function(t){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)}))},u.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then((function(){var t=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=t}))},u.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then((function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF}))},u.prototype.output=function(t,e,r){return"img"===(r=r||"pdf").toLowerCase()||"image"===r.toLowerCase()?this.outputImg(t,e):this.outputPdf(t,e)},u.prototype.outputPdf=function(t,e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(t,e)}))},u.prototype.outputImg=function(t){return this.thenList([function(){return this.prop.img||this.toImg()}]).then((function(){switch(t){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+t+'" is not supported.'}}))},u.prototype.save=function(t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(t?{filename:t}:null).then((function(){this.prop.pdf.save(this.opt.filename)}))},u.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){this.prop.callback(this.prop.pdf)}))},u.prototype.set=function(t){if("object"!==o(t))return this;var e=Object.keys(t||{}).map((function(e){if(e in u.template.prop)return function(){this.prop[e]=t[e]};switch(e){case"margin":return this.setMargin.bind(this,t.margin);case"jsPDF":return function(){return this.opt.jsPDF=t.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,t.pageSize);default:return function(){this.opt[e]=t[e]}}}),this);return this.then((function(){return this.thenList(e)}))},u.prototype.get=function(t,e){return this.then((function(){var r=t in u.template.prop?this.prop[t]:this.opt[t];return e?e(r):r}))},u.prototype.setMargin=function(t){return this.then((function(){switch(o(t)){case"number":t=[t,t,t,t];case"array":if(2===t.length&&(t=[t[0],t[1],t[0],t[1]]),4===t.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=t})).then(this.setPageSize)},u.prototype.setPageSize=function(t){function e(t,e){return Math.floor(t*e/72*96)}return this.then((function(){(t=t||T.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(t.inner={width:t.width-this.opt.margin[1]-this.opt.margin[3],height:t.height-this.opt.margin[0]-this.opt.margin[2]},t.inner.px={width:e(t.inner.width,t.k),height:e(t.inner.height,t.k)},t.inner.ratio=t.inner.height/t.inner.width),this.prop.pageSize=t}))},u.prototype.setProgress=function(t,e,r,n){return null!=t&&(this.progress.val=t),null!=e&&(this.progress.state=e),null!=r&&(this.progress.n=r),null!=n&&(this.progress.stack=n),this.progress.ratio=this.progress.val/this.progress.state,this},u.prototype.updateProgress=function(t,e,r,n){return this.setProgress(t?this.progress.val+t:null,e||null,r?this.progress.n+r:null,n?this.progress.stack.concat(n):null)},u.prototype.then=function(t,e){var r=this;return this.thenCore(t,e,(function(t,e){return r.updateProgress(null,null,1,[t]),Promise.prototype.then.call(this,(function(e){return r.updateProgress(null,t),e})).then(t,e).then((function(t){return r.updateProgress(1),t}))}))},u.prototype.thenCore=function(t,e,r){r=r||Promise.prototype.then,t&&(t=t.bind(this)),e&&(e=e.bind(this));var n=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?this:u.convert(Object.assign({},this),Promise.prototype),i=r.call(n,t,e);return u.convert(i,this.__proto__)},u.prototype.thenExternal=function(t,e){return Promise.prototype.then.call(this,t,e)},u.prototype.thenList=function(t){var e=this;return t.forEach((function(t){e=e.thenCore(t)})),e},u.prototype.catch=function(t){t&&(t=t.bind(this));var e=Promise.prototype.catch.call(this,t);return u.convert(e,this)},u.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},u.prototype.error=function(t){return this.then((function(){throw new Error(t)}))},u.prototype.using=u.prototype.set,u.prototype.saveAs=u.prototype.save,u.prototype.export=u.prototype.output,u.prototype.run=u.prototype.then,T.getPageSize=function(t,e,r){if("object"===i()(t)){var n=t;t=n.orientation,e=n.unit||e,r=n.format||r}e=e||"mm",r=r||"a4",t=(""+(t||"P")).toLowerCase();var o,a=(""+r).toLowerCase(),s={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(e){case"pt":o=1;break;case"mm":o=72/25.4;break;case"cm":o=72/2.54;break;case"in":o=72;break;case"px":o=.75;break;case"pc":case"em":o=12;break;case"ex":o=6;break;default:throw"Invalid unit: "+e}var u,c=0,l=0;if(s.hasOwnProperty(a))c=s[a][1]/o,l=s[a][0]/o;else try{c=r[1],l=r[0]}catch(t){throw new Error("Invalid format: "+r)}if("p"===t||"portrait"===t)t="p",l>c&&(u=l,l=c,c=u);else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;t="l",c>l&&(u=l,l=c,c=u)}return{width:l,height:c,unit:e,k:o,orientation:t}},t.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this,e.fontFaces=e.fontFaces?e.fontFaces.map(Et):null;var r=new u(e);return e.worker?r:r.from(t).doCallback()}}(T.API),T.API.addJS=function(t){return Wt=t,this.internal.events.subscribe("postPutResources",(function(){Ht=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Ht+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Vt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Wt+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==Ht&&void 0!==Vt&&this.internal.out("/Names <</JavaScript "+Ht+" 0 R>>")})),this
|
|
85
|
+
/**
|
|
86
|
+
* @license
|
|
87
|
+
* Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
|
|
88
|
+
*
|
|
89
|
+
* Licensed under the MIT License.
|
|
90
|
+
* http://opensource.org/licenses/mit-license
|
|
91
|
+
*/},function(t){var e;t.events.push(["postPutResources",function(){var t=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=t.outline.render().split(/\r\n/),i=0;i<n.length;i++){var o=n[i],a=r.exec(o);if(null!=a){var s=a[1];t.internal.newObjectDeferredBegin(s,!1)}t.internal.write(o)}if(this.outline.createNamedDestinations){var u=this.internal.pages.length,c=[];for(i=0;i<u;i++){var l=t.internal.newObject();c.push(l);var f=t.internal.getPageInfo(i+1);t.internal.write("<< /D["+f.objId+" 0 R /XYZ null null null]>> endobj")}var h=t.internal.newObject();for(t.internal.write("<< /Names [ "),i=0;i<c.length;i++)t.internal.write("(page_"+(i+1)+")"+c[i]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+h+" 0 R"),t.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+e+" 0 R"))}]),t.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(t,e,r){var n={title:e,options:r,children:[]};return null==t&&(t=this.root),t.children.push(n),n},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(e){e.id=t.internal.newObjectDeferred();for(var r=0;r<e.children.length;r++)this.genIds_r(e.children[r])},t.outline.renderRoot=function(t){this.objStart(t),this.line("/Type /Outlines"),t.children.length>0&&(this.line("/First "+this.makeRef(t.children[0])),this.line("/Last "+this.makeRef(t.children[t.children.length-1]))),this.line("/Count "+this.count_r({count:0},t)),this.objEnd()},t.outline.renderItems=function(e){for(var r=this.ctx.pdf.internal.getVerticalCoordinateString,n=0;n<e.children.length;n++){var i=e.children[n];this.objStart(i),this.line("/Title "+this.makeString(i.title)),this.line("/Parent "+this.makeRef(e)),n>0&&this.line("/Prev "+this.makeRef(e.children[n-1])),n<e.children.length-1&&this.line("/Next "+this.makeRef(e.children[n+1])),i.children.length>0&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1])));var o=this.count=this.count_r({count:0},i);if(o>0&&this.line("/Count "+o),i.options&&i.options.pageNumber){var a=t.internal.getPageInfo(i.options.pageNumber);this.line("/Dest ["+a.objId+" 0 R /XYZ 0 "+r(0)+" 0]")}this.objEnd()}for(var s=0;s<e.children.length;s++)this.renderItems(e.children[s])},t.outline.line=function(t){this.ctx.val+=t+"\r\n"},t.outline.makeRef=function(t){return t.id+" 0 R"},t.outline.makeString=function(e){return"("+t.internal.pdfEscape(e)+")"},t.outline.objStart=function(t){this.ctx.val+="\r\n"+t.id+" 0 obj\r\n<<\r\n"},t.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},t.outline.count_r=function(t,e){for(var r=0;r<e.children.length;r++)t.count++,this.count_r(t,e.children[r]);return t.count}}])}(T.API),
|
|
92
|
+
/**
|
|
93
|
+
* @license
|
|
94
|
+
*
|
|
95
|
+
* Licensed under the MIT License.
|
|
96
|
+
* http://opensource.org/licenses/mit-license
|
|
97
|
+
*/
|
|
98
|
+
function(t){var e=[192,193,194,195,196,197,198,199];t.processJPEG=function(t,r,n,i,o,a){var s,u=this.decode.DCT_DECODE,c=null;if("string"==typeof t||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=o||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,(s=function(t){for(var r,n=256*t.charCodeAt(4)+t.charCodeAt(5),i=t.length,o={width:0,height:0,numcomponents:1},a=4;a<i;a+=2){if(a+=n,-1!==e.indexOf(t.charCodeAt(a+1))){r=256*t.charCodeAt(a+5)+t.charCodeAt(a+6),o={width:256*t.charCodeAt(a+7)+t.charCodeAt(a+8),height:r,numcomponents:t.charCodeAt(a+9)};break}n=256*t.charCodeAt(a+2)+t.charCodeAt(a+3)}return o}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t)).numcomponents){case 1:a=this.color_spaces.DEVICE_GRAY;break;case 4:a=this.color_spaces.DEVICE_CMYK;break;case 3:a=this.color_spaces.DEVICE_RGB}c={data:t,width:s.width,height:s.height,colorSpace:a,bitsPerComponent:8,filter:u,index:r,alias:n}}return c}}(T.API);var Jt,Yt,Xt,$t,Kt,Zt=function(){var t,e,r;function n(t){var e,r,n,i,o,a,s,u,c,l,f,h,p,d;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},a=null;;){switch(e=this.readUInt32(),c=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":a&&this.animation.frames.push(a),this.pos+=4,a={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},o=this.readUInt16(),i=this.readUInt16()||100,a.delay=1e3*o/i,a.disposeOp=this.data[this.pos++],a.blendOp=this.data[this.pos++],a.data=[];break;case"IDAT":case"fdAT":for("fdAT"===c&&(this.pos+=4,e-=4),t=(null!=a?a.data:void 0)||this.imgData,h=0;0<=e?h<e:h>e;0<=e?++h:--h)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(n=this.palette.length/3,this.transparency.indexed=this.read(e),this.transparency.indexed.length>n)throw new Error("More transparent colors than palette size");if((l=n-this.transparency.indexed.length)>0)for(p=0;0<=l?p<l:p>l;0<=l?++p:--p)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":s=(f=this.read(e)).indexOf(0),u=String.fromCharCode.apply(String,f.slice(0,s)),this.text[u]=String.fromCharCode.apply(String,f.slice(s+1));break;case"IEND":return a&&this.animation.frames.push(a),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(d=this.colorType)||6===d,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}n.prototype.read=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)r.push(this.data[this.pos++]);return r},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(t){var e=this.pixelBitlength/8,r=new Uint8Array(this.width*this.height*e),n=0,i=this;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);function a(o,a,s,u){var c,l,f,h,p,d,g,v,m,b,y,w,x,A,N,L,S,_,P,k,j,O=Math.ceil((i.width-o)/s),I=Math.ceil((i.height-a)/u),C=i.width==O&&i.height==I;for(A=e*O,w=C?r:new Uint8Array(A*I),d=t.length,x=0,l=0;x<I&&n<d;){switch(t[n++]){case 0:for(h=S=0;S<A;h=S+=1)w[l++]=t[n++];break;case 1:for(h=_=0;_<A;h=_+=1)c=t[n++],p=h<e?0:w[l-e],w[l++]=(c+p)%256;break;case 2:for(h=P=0;P<A;h=P+=1)c=t[n++],f=(h-h%e)/e,N=x&&w[(x-1)*A+f*e+h%e],w[l++]=(N+c)%256;break;case 3:for(h=k=0;k<A;h=k+=1)c=t[n++],f=(h-h%e)/e,p=h<e?0:w[l-e],N=x&&w[(x-1)*A+f*e+h%e],w[l++]=(c+Math.floor((p+N)/2))%256;break;case 4:for(h=j=0;j<A;h=j+=1)c=t[n++],f=(h-h%e)/e,p=h<e?0:w[l-e],0===x?N=L=0:(N=w[(x-1)*A+f*e+h%e],L=f&&w[(x-1)*A+(f-1)*e+h%e]),g=p+N-L,v=Math.abs(g-p),b=Math.abs(g-N),y=Math.abs(g-L),m=v<=b&&v<=y?p:b<=y?N:L,w[l++]=(c+m)%256;break;default:throw new Error("Invalid filter algorithm: "+t[n-1])}if(!C){var F=((a+x*u)*i.width+o)*e,R=x*A;for(h=0;h<O;h+=1){for(var E=0;E<e;E+=1)r[F++]=w[R++];F+=(s-1)*e}}x++}}return t=Object(o.a)(t),1==i.interlaceMethod?(a(0,0,8,8),a(4,0,8,8),a(0,4,4,8),a(2,0,4,4),a(0,2,2,4),a(1,0,2,2),a(0,1,1,2)):a(0,0,1,1),r},n.prototype.decodePalette=function(){var t,e,r,n,i,o,a,s,u;for(r=this.palette,o=this.transparency.indexed||[],i=new Uint8Array((o.length||0)+r.length),n=0,t=0,e=a=0,s=r.length;a<s;e=a+=3)i[n++]=r[e],i[n++]=r[e+1],i[n++]=r[e+2],i[n++]=null!=(u=o[t++])?u:255;return i},n.prototype.copyToImageData=function(t,e){var r,n,i,o,a,s,u,c,l,f,h;if(n=this.colors,l=null,r=this.hasAlphaChannel,this.palette.length&&(l=null!=(h=this._decodedPalette)?h:this._decodedPalette=this.decodePalette(),n=4,r=!0),c=(i=t.data||t).length,a=l||e,o=s=0,1===n)for(;o<c;)u=l?4*e[o/4]:s,f=a[u++],i[o++]=f,i[o++]=f,i[o++]=f,i[o++]=r?a[u++]:255,s=u;else for(;o<c;)u=l?4*e[o/4]:s,i[o++]=a[u++],i[o++]=a[u++],i[o++]=a[u++],i[o++]=r?a[u++]:255,s=u},n.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t};var i=function(){if("[object Window]"===Object.prototype.toString.call(a)){try{e=a.document.createElement("canvas"),r=e.getContext("2d")}catch(t){return!1}return!0}return!1};return i(),t=function(t){var n;if(!0===i())return r.width=t.width,r.height=t.height,r.clearRect(0,0,t.width,t.height),r.putImageData(t,0,0),(n=new Image).src=e.toDataURL(),n;throw new Error("This method requires a Browser with Canvas-capability.")},n.prototype.decodeFrames=function(e){var r,n,i,o,a,s,u,c;if(this.animation){for(c=[],n=a=0,s=(u=this.animation.frames).length;a<s;n=++a)r=u[n],i=e.createImageData(r.width,r.height),o=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(i,o),r.imageData=i,c.push(r.image=t(i));return c}},n.prototype.renderFrame=function(t,e){var r,n,i;return r=(n=this.animation.frames)[e],i=n[e-1],0===e&&t.clearRect(0,0,this.width,this.height),1===(null!=i?i.disposeOp:void 0)?t.clearRect(i.xOffset,i.yOffset,i.width,i.height):2===(null!=i?i.disposeOp:void 0)&&t.putImageData(i.imageData,i.xOffset,i.yOffset),0===r.blendOp&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},n.prototype.animate=function(t){var e,r,n,i,o,a,s=this;return r=0,a=this.animation,i=a.numFrames,n=a.frames,o=a.numPlays,(e=function(){var a,u;if(a=r++%i,u=n[a],s.renderFrame(t,a),i>1&&r/i<o)return s.animation._timeout=setTimeout(e,u.delay)})()},n.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},n.prototype.render=function(t){var e,r;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(r=e.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),e.putImageData(r,0,0))},n}();
|
|
99
|
+
/**
|
|
100
|
+
* @license
|
|
101
|
+
*
|
|
102
|
+
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
|
|
103
|
+
*
|
|
104
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
105
|
+
* a copy of this software and associated documentation files (the
|
|
106
|
+
* "Software"), to deal in the Software without restriction, including
|
|
107
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
108
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
109
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
110
|
+
* the following conditions:
|
|
111
|
+
*
|
|
112
|
+
* The above copyright notice and this permission notice shall be
|
|
113
|
+
* included in all copies or substantial portions of the Software.
|
|
114
|
+
*
|
|
115
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
116
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
117
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
118
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
119
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
120
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
121
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
122
|
+
* ====================================================================
|
|
123
|
+
*/
|
|
124
|
+
/**
|
|
125
|
+
* @license
|
|
126
|
+
* (c) Dean McNamee <dean@gmail.com>, 2013.
|
|
127
|
+
*
|
|
128
|
+
* https://github.com/deanm/omggif
|
|
129
|
+
*
|
|
130
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
131
|
+
* of this software and associated documentation files (the "Software"), to
|
|
132
|
+
* deal in the Software without restriction, including without limitation the
|
|
133
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
134
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
|
135
|
+
* furnished to do so, subject to the following conditions:
|
|
136
|
+
*
|
|
137
|
+
* The above copyright notice and this permission notice shall be included in
|
|
138
|
+
* all copies or substantial portions of the Software.
|
|
139
|
+
*
|
|
140
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
141
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
142
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
143
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
144
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
145
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
146
|
+
* IN THE SOFTWARE.
|
|
147
|
+
*
|
|
148
|
+
* omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
|
|
149
|
+
* including animation and compression. It does not rely on any specific
|
|
150
|
+
* underlying system, so should run in the browser, Node, or Plask.
|
|
151
|
+
*/function Qt(t){var e=0;if(71!==t[e++]||73!==t[e++]||70!==t[e++]||56!==t[e++]||56!=(t[e++]+1&253)||97!==t[e++])throw new Error("Invalid GIF 87a/89a header.");var r=t[e++]|t[e++]<<8,n=t[e++]|t[e++]<<8,i=t[e++],o=i>>7,a=1<<1+(7&i);t[e++],t[e++];var s=null,u=null;o&&(s=e,u=a,e+=3*a);var c=!0,l=[],f=0,h=null,p=0,d=null;for(this.width=r,this.height=n;c&&e<t.length;)switch(t[e++]){case 33:switch(t[e++]){case 255:if(11!==t[e]||78==t[e+1]&&69==t[e+2]&&84==t[e+3]&&83==t[e+4]&&67==t[e+5]&&65==t[e+6]&&80==t[e+7]&&69==t[e+8]&&50==t[e+9]&&46==t[e+10]&&48==t[e+11]&&3==t[e+12]&&1==t[e+13]&&0==t[e+16])e+=14,d=t[e++]|t[e++]<<8,e++;else for(e+=12;;){if(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}break;case 249:if(4!==t[e++]||0!==t[e+4])throw new Error("Invalid graphics extension block.");var g=t[e++];f=t[e++]|t[e++]<<8,h=t[e++],0==(1&g)&&(h=null),p=g>>2&7,e++;break;case 254:for(;;){if(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}break;default:throw new Error("Unknown graphic control label: 0x"+t[e-1].toString(16))}break;case 44:var v=t[e++]|t[e++]<<8,m=t[e++]|t[e++]<<8,b=t[e++]|t[e++]<<8,y=t[e++]|t[e++]<<8,w=t[e++],x=w>>6&1,A=1<<1+(7&w),N=s,L=u,S=!1;w>>7&&(S=!0,N=e,L=A,e+=3*A);var _=e;for(e++;;){var P;if(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}l.push({x:v,y:m,width:b,height:y,has_local_palette:S,palette_offset:N,palette_size:L,data_offset:_,data_length:e-_,transparent_index:h,interlaced:!!x,delay:f,disposal:p});break;case 59:c=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return l.length},this.loopCount=function(){return d},this.frameInfo=function(t){if(t<0||t>=l.length)throw new Error("Frame index out of range.");return l[t]},this.decodeAndBlitFrameBGRA=function(e,n){var i=this.frameInfo(e),o=i.width*i.height,a=new Uint8Array(o);te(t,i.data_offset,a,o);var s=i.palette_offset,u=i.transparent_index;null===u&&(u=256);var c=i.width,l=r-c,f=c,h=4*(i.y*r+i.x),p=4*((i.y+i.height)*r+i.x),d=h,g=4*l;!0===i.interlaced&&(g+=4*r*7);for(var v=8,m=0,b=a.length;m<b;++m){var y=a[m];if(0===f&&(f=c,(d+=g)>=p&&(g=4*l+4*r*(v-1),d=h+(c+l)*(v<<1),v>>=1)),y===u)d+=4;else{var w=t[s+3*y],x=t[s+3*y+1],A=t[s+3*y+2];n[d++]=A,n[d++]=x,n[d++]=w,n[d++]=255}--f}},this.decodeAndBlitFrameRGBA=function(e,n){var i=this.frameInfo(e),o=i.width*i.height,a=new Uint8Array(o);te(t,i.data_offset,a,o);var s=i.palette_offset,u=i.transparent_index;null===u&&(u=256);var c=i.width,l=r-c,f=c,h=4*(i.y*r+i.x),p=4*((i.y+i.height)*r+i.x),d=h,g=4*l;!0===i.interlaced&&(g+=4*r*7);for(var v=8,m=0,b=a.length;m<b;++m){var y=a[m];if(0===f&&(f=c,(d+=g)>=p&&(g=4*l+4*r*(v-1),d=h+(c+l)*(v<<1),v>>=1)),y===u)d+=4;else{var w=t[s+3*y],x=t[s+3*y+1],A=t[s+3*y+2];n[d++]=w,n[d++]=x,n[d++]=A,n[d++]=255}--f}}}function te(t,e,r,n){for(var i=t[e++],o=1<<i,a=o+1,s=a+1,c=i+1,l=(1<<c)-1,f=0,h=0,p=0,d=t[e++],g=new Int32Array(4096),v=null;;){for(;f<16&&0!==d;)h|=t[e++]<<f,f+=8,1===d?d=t[e++]:--d;if(f<c)break;var m=h&l;if(h>>=c,f-=c,m!==o){if(m===a)break;for(var b=m<s?m:v,y=0,w=b;w>o;)w=g[w]>>8,++y;var x=w;if(p+y+(b!==m?1:0)>n)return void u.log("Warning, gif stream longer than expected.");r[p++]=x;var A=p+=y;for(b!==m&&(r[p++]=x),w=b;y--;)w=g[w],r[--A]=255&w,w>>=8;null!==v&&s<4096&&(g[s++]=v<<8|x,s>=l+1&&c<12&&(++c,l=l<<1|1)),v=m}else s=a+1,l=(1<<(c=i+1))-1,v=null}return p!==n&&u.log("Warning, gif stream shorter than expected."),r}
|
|
152
|
+
/**
|
|
153
|
+
* @license
|
|
154
|
+
Copyright (c) 2008, Adobe Systems Incorporated
|
|
155
|
+
All rights reserved.
|
|
156
|
+
|
|
157
|
+
Redistribution and use in source and binary forms, with or without
|
|
158
|
+
modification, are permitted provided that the following conditions are
|
|
159
|
+
met:
|
|
160
|
+
|
|
161
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
162
|
+
this list of conditions and the following disclaimer.
|
|
163
|
+
|
|
164
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
165
|
+
notice, this list of conditions and the following disclaimer in the
|
|
166
|
+
documentation and/or other materials provided with the distribution.
|
|
167
|
+
|
|
168
|
+
* Neither the name of Adobe Systems Incorporated nor the names of its
|
|
169
|
+
contributors may be used to endorse or promote products derived from
|
|
170
|
+
this software without specific prior written permission.
|
|
171
|
+
|
|
172
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
|
173
|
+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
174
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
175
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
176
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
177
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
178
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
179
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
180
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
181
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
182
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
183
|
+
*/function ee(t){var e,r,n,i,o,a=Math.floor,s=new Array(64),u=new Array(64),c=new Array(64),l=new Array(64),f=new Array(65535),h=new Array(65535),p=new Array(64),d=new Array(64),g=[],v=0,m=7,b=new Array(64),y=new Array(64),w=new Array(64),x=new Array(256),A=new Array(2048),N=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],L=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],S=[0,1,2,3,4,5,6,7,8,9,10,11],_=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],P=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],k=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],O=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],I=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function C(t,e){for(var r=0,n=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=t[o];a++)i[e[n]]=[],i[e[n]][0]=r,i[e[n]][1]=o,n++,r++;r*=2}return i}function F(t){for(var e=t[0],r=t[1]-1;r>=0;)e&1<<r&&(v|=1<<m),r--,--m<0&&(255==v?(R(255),R(0)):R(v),m=7,v=0)}function R(t){g.push(t)}function E(t){R(t>>8&255),R(255&t)}function M(t,e,r,n,i){for(var o,a=i[0],s=i[240],u=function(t,e){var r,n,i,o,a,s,u,c,l,f,h=0;for(l=0;l<8;++l){r=t[h],n=t[h+1],i=t[h+2],o=t[h+3],a=t[h+4],s=t[h+5],u=t[h+6];var d=r+(c=t[h+7]),g=r-c,v=n+u,m=n-u,b=i+s,y=i-s,w=o+a,x=o-a,A=d+w,N=d-w,L=v+b,S=v-b;t[h]=A+L,t[h+4]=A-L;var _=.707106781*(S+N);t[h+2]=N+_,t[h+6]=N-_;var P=.382683433*((A=x+y)-(S=m+g)),k=.5411961*A+P,j=1.306562965*S+P,O=.707106781*(L=y+m),I=g+O,C=g-O;t[h+5]=C+k,t[h+3]=C-k,t[h+1]=I+j,t[h+7]=I-j,h+=8}for(h=0,l=0;l<8;++l){r=t[h],n=t[h+8],i=t[h+16],o=t[h+24],a=t[h+32],s=t[h+40],u=t[h+48];var F=r+(c=t[h+56]),R=r-c,E=n+u,M=n-u,B=i+s,q=i-s,T=o+a,D=o-a,z=F+T,U=F-T,H=E+B,V=E-B;t[h]=z+H,t[h+32]=z-H;var W=.707106781*(V+U);t[h+16]=U+W,t[h+48]=U-W;var G=.382683433*((z=D+q)-(V=M+R)),J=.5411961*z+G,Y=1.306562965*V+G,X=.707106781*(H=q+M),$=R+X,K=R-X;t[h+40]=K+J,t[h+24]=K-J,t[h+8]=$+Y,t[h+56]=$-Y,h++}for(l=0;l<64;++l)f=t[l]*e[l],p[l]=f>0?f+.5|0:f-.5|0;return p}(t,e),c=0;c<64;++c)d[N[c]]=u[c];var l=d[0]-r;r=d[0],0==l?F(n[0]):(F(n[h[o=32767+l]]),F(f[o]));for(var g=63;g>0&&0==d[g];)g--;if(0==g)return F(a),r;for(var v,m=1;m<=g;){for(var b=m;0==d[m]&&m<=g;)++m;var y=m-b;if(y>=16){v=y>>4;for(var w=1;w<=v;++w)F(s);y&=15}o=32767+d[m],F(i[(y<<4)+h[o]]),F(f[o]),m++}return 63!=g&&F(a),r}function B(t){t=Math.min(Math.max(t,1),100),o!=t&&(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],r=0;r<64;r++){var n=a((e[r]*t+50)/100);n=Math.min(Math.max(n,1),255),s[N[r]]=n}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],o=0;o<64;o++){var f=a((i[o]*t+50)/100);f=Math.min(Math.max(f,1),255),u[N[o]]=f}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],p=0,d=0;d<8;d++)for(var g=0;g<8;g++)c[p]=1/(s[N[p]]*h[d]*h[g]*8),l[p]=1/(u[N[p]]*h[d]*h[g]*8),p++}(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),o=t)}this.encode=function(t,o){o&&B(o),g=new Array,v=0,m=7,E(65496),E(65504),E(16),R(74),R(70),R(73),R(70),R(0),R(1),R(1),R(0),E(1),E(1),R(0),R(0),function(){E(65499),E(132),R(0);for(var t=0;t<64;t++)R(s[t]);R(1);for(var e=0;e<64;e++)R(u[e])}(),function(t,e){E(65472),E(17),R(8),E(e),E(t),R(3),R(1),R(17),R(0),R(2),R(17),R(1),R(3),R(17),R(1)}(t.width,t.height),function(){E(65476),E(418),R(0);for(var t=0;t<16;t++)R(L[t+1]);for(var e=0;e<=11;e++)R(S[e]);R(16);for(var r=0;r<16;r++)R(_[r+1]);for(var n=0;n<=161;n++)R(P[n]);R(1);for(var i=0;i<16;i++)R(k[i+1]);for(var o=0;o<=11;o++)R(j[o]);R(17);for(var a=0;a<16;a++)R(O[a+1]);for(var s=0;s<=161;s++)R(I[s])}(),E(65498),E(12),R(3),R(1),R(0),R(2),R(17),R(3),R(17),R(0),R(63),R(0);var a=0,f=0,h=0;v=0,m=7,this.encode.displayName="_encode_";for(var p,d,x,N,C,q,T,D,z,U=t.data,H=t.width,V=t.height,W=4*H,G=0;G<V;){for(p=0;p<W;){for(C=W*G+p,T=-1,D=0,z=0;z<64;z++)q=C+(D=z>>3)*W+(T=4*(7&z)),G+D>=V&&(q-=W*(G+1+D-V)),p+T>=W&&(q-=p+T-W+4),d=U[q++],x=U[q++],N=U[q++],b[z]=(A[d]+A[x+256>>0]+A[N+512>>0]>>16)-128,y[z]=(A[d+768>>0]+A[x+1024>>0]+A[N+1280>>0]>>16)-128,w[z]=(A[d+1280>>0]+A[x+1536>>0]+A[N+1792>>0]>>16)-128;a=M(b,c,a,e,n),f=M(y,l,f,r,i),h=M(w,l,h,r,i),p+=32}G+=8}if(m>=0){var J=[];J[1]=m+1,J[0]=(1<<m+1)-1,F(J)}return E(65497),new Uint8Array(g)},t=t||50,function(){for(var t=String.fromCharCode,e=0;e<256;e++)x[e]=t(e)}(),e=C(L,S),r=C(k,j),n=C(_,P),i=C(O,I),function(){for(var t=1,e=2,r=1;r<=15;r++){for(var n=t;n<e;n++)h[32767+n]=r,f[32767+n]=[],f[32767+n][1]=r,f[32767+n][0]=n;for(var i=-(e-1);i<=-t;i++)h[32767+i]=r,f[32767+i]=[],f[32767+i][1]=r,f[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)A[t]=19595*t,A[t+256>>0]=38470*t,A[t+512>>0]=7471*t+32768,A[t+768>>0]=-11059*t,A[t+1024>>0]=-21709*t,A[t+1280>>0]=32768*t+8421375,A[t+1536>>0]=-27439*t,A[t+1792>>0]=-5329*t}(),B(t)}
|
|
184
|
+
/**
|
|
185
|
+
* @license
|
|
186
|
+
* Copyright (c) 2017 Aras Abbasi
|
|
187
|
+
*
|
|
188
|
+
* Licensed under the MIT License.
|
|
189
|
+
* http://opensource.org/licenses/mit-license
|
|
190
|
+
*/function re(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function ne(t){function e(t){if(!t)throw Error("assert :P")}function r(t,e,r){for(var n=0;4>n;n++)if(t[e+n]!=r.charCodeAt(n))return!0;return!1}function n(t,e,r,n,i){for(var o=0;o<i;o++)t[e+o]=r[n+o]}function i(t,e,r,n){for(var i=0;i<n;i++)t[e+i]=r}function o(t){return new Int32Array(t)}function a(t,e){for(var r=[],n=0;n<t;n++)r.push(new e);return r}function s(t,e){var r=[];return function t(r,n,i){for(var o=i[n],a=0;a<o&&(r.push(i.length>n+1?[]:new e),!(i.length<n+1));a++)t(r[a],n+1,i)}(r,0,t),r}var u=function(){var t=this;function u(t,e){for(var r=1<<e-1>>>0;t&r;)r>>>=1;return r?(t&r-1)+r:t}function c(t,r,n,i,o){e(!(i%n));do{t[r+(i-=n)]=o}while(0<i)}function l(t,r,n,i,a){if(e(2328>=a),512>=a)var s=o(512);else if(null==(s=o(a)))return 0;return function(t,r,n,i,a,s){var l,h,p=r,d=1<<n,g=o(16),v=o(16);for(e(0!=a),e(null!=i),e(null!=t),e(0<n),h=0;h<a;++h){if(15<i[h])return 0;++g[i[h]]}if(g[0]==a)return 0;for(v[1]=0,l=1;15>l;++l){if(g[l]>1<<l)return 0;v[l+1]=v[l]+g[l]}for(h=0;h<a;++h)l=i[h],0<i[h]&&(s[v[l]++]=h);if(1==v[15])return(i=new f).g=0,i.value=s[0],c(t,p,1,d,i),d;var m,b=-1,y=d-1,w=0,x=1,A=1,N=1<<n;for(h=0,l=1,a=2;l<=n;++l,a<<=1){if(x+=A<<=1,0>(A-=g[l]))return 0;for(;0<g[l];--g[l])(i=new f).g=l,i.value=s[h++],c(t,p+w,a,N,i),w=u(w,l)}for(l=n+1,a=2;15>=l;++l,a<<=1){if(x+=A<<=1,0>(A-=g[l]))return 0;for(;0<g[l];--g[l]){if(i=new f,(w&y)!=b){for(p+=N,m=1<<(b=l)-n;15>b&&!(0>=(m-=g[b]));)++b,m<<=1;d+=N=1<<(m=b-n),t[r+(b=w&y)].g=m+n,t[r+b].value=p-r-b}i.g=l-n,i.value=s[h++],c(t,p+(w>>n),a,N,i),w=u(w,l)}}return x!=2*v[15]-1?0:d}(t,r,n,i,a,s)}function f(){this.value=this.g=0}function h(){this.value=this.g=0}function p(){this.G=a(5,f),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=a(qr,h)}function d(t,r,n,i){e(null!=t),e(null!=r),e(2147483648>i),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=r,t.pa=n,t.Jd=r,t.Yc=n+i,t.Zc=4<=i?n+i-4+1:n,_(t)}function g(t,e){for(var r=0;0<e--;)r|=k(t,128)<<e;return r}function v(t,e){var r=g(t,e);return P(t)?-r:r}function m(t,r,n,i){var o,a=0;for(e(null!=t),e(null!=r),e(4294967288>i),t.Sb=i,t.Ra=0,t.u=0,t.h=0,4<i&&(i=4),o=0;o<i;++o)a+=r[n+o]<<8*o;t.Ra=a,t.bb=i,t.oa=r,t.pa=n}function b(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<zr-8>>>0,++t.bb,t.u-=8;N(t)&&(t.h=1,t.u=0)}function y(t,r){if(e(0<=r),!t.h&&r<=Dr){var n=A(t)&Tr[r];return t.u+=r,b(t),n}return t.h=1,t.u=0}function w(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function x(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function A(t){return t.Ra>>>(t.u&zr-1)>>>0}function N(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>zr}function L(t,e){t.u=e,t.h=N(t)}function S(t){t.u>=Ur&&(e(t.u>=Ur),b(t))}function _(t){e(null!=t&&null!=t.oa),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(e(null!=t&&null!=t.oa),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function P(t){return g(t,1)}function k(t,e){var r=t.Ca;0>t.b&&_(t);var n=t.b,i=r*e>>>8,o=(t.I>>>n>i)+0;for(o?(r-=i,t.I-=i+1<<n>>>0):r=i+1,n=r,i=0;256<=n;)i+=8,n>>=8;return n=7^i+Hr[n],t.b-=n,t.Ca=(r<<n)-1,o}function j(t,e,r){t[e+0]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=r>>0&255}function O(t,e){return t[e+0]<<0|t[e+1]<<8}function I(t,e){return O(t,e)|t[e+2]<<16}function C(t,e){return O(t,e)|O(t,e+2)<<16}function F(t,r){var n=1<<r;return e(null!=t),e(0<r),t.X=o(n),null==t.X?0:(t.Mb=32-r,t.Xa=r,1)}function R(t,r){e(null!=t),e(null!=r),e(t.Xa==r.Xa),n(r.X,0,t.X,0,1<<r.Xa)}function E(){this.X=[],this.Xa=this.Mb=0}function M(t,r,n,i){e(null!=n),e(null!=i);var o=n[0],a=i[0];return 0==o&&(o=(t*a+r/2)/r),0==a&&(a=(r*o+t/2)/t),0>=o||0>=a?0:(n[0]=o,i[0]=a,1)}function B(t,e){return t+(1<<e)-1>>>e}function q(t,e){return((4278255360&t)+(4278255360&e)>>>0&4278255360)+((16711935&t)+(16711935&e)>>>0&16711935)>>>0}function T(e,r){t[r]=function(r,n,i,o,a,s,u){var c;for(c=0;c<a;++c){var l=t[e](s[u+c-1],i,o+c);s[u+c]=q(r[n+c],l)}}}function D(){this.ud=this.hd=this.jd=0}function z(t,e){return((4278124286&(t^e))>>>1)+(t&e)>>>0}function U(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function H(t,e){return U(t+(t-e+.5>>1))}function V(t,e,r){return Math.abs(e-r)-Math.abs(t-r)}function W(t,e,r,n,i,o,a){for(n=o[a-1],r=0;r<i;++r)o[a+r]=n=q(t[e+r],n)}function G(t,e,r,n,i){var o;for(o=0;o<r;++o){var a=t[e+o],s=a>>8&255,u=16711935&(u=(u=16711935&a)+((s<<16)+s));n[i+o]=(4278255360&a)+u>>>0}}function J(t,e){e.jd=t>>0&255,e.hd=t>>8&255,e.ud=t>>16&255}function Y(t,e,r,n,i,o){var a;for(a=0;a<n;++a){var s=e[r+a],u=s>>>8,c=s,l=255&(l=(l=s>>>16)+((t.jd<<24>>24)*(u<<24>>24)>>>5));c=255&(c=(c+=(t.hd<<24>>24)*(u<<24>>24)>>>5)+((t.ud<<24>>24)*(l<<24>>24)>>>5)),i[o+a]=(4278255360&s)+(l<<16)+c}}function X(e,r,n,i,o){t[r]=function(t,e,r,n,a,s,u,c,l){for(n=u;n<c;++n)for(u=0;u<l;++u)a[s++]=o(r[i(t[e++])])},t[e]=function(e,r,a,s,u,c,l){var f=8>>e.b,h=e.Ea,p=e.K[0],d=e.w;if(8>f)for(e=(1<<e.b)-1,d=(1<<f)-1;r<a;++r){var g,v=0;for(g=0;g<h;++g)g&e||(v=i(s[u++])),c[l++]=o(p[v&d]),v>>=f}else t["VP8LMapColor"+n](s,u,p,d,c,l,r,a,h)}}function $(t,e,r,n,i){for(r=e+r;e<r;){var o=t[e++];n[i++]=o>>16&255,n[i++]=o>>8&255,n[i++]=o>>0&255}}function K(t,e,r,n,i){for(r=e+r;e<r;){var o=t[e++];n[i++]=o>>16&255,n[i++]=o>>8&255,n[i++]=o>>0&255,n[i++]=o>>24&255}}function Z(t,e,r,n,i){for(r=e+r;e<r;){var o=(a=t[e++])>>16&240|a>>12&15,a=a>>0&240|a>>28&15;n[i++]=o,n[i++]=a}}function Q(t,e,r,n,i){for(r=e+r;e<r;){var o=(a=t[e++])>>16&248|a>>13&7,a=a>>5&224|a>>3&31;n[i++]=o,n[i++]=a}}function tt(t,e,r,n,i){for(r=e+r;e<r;){var o=t[e++];n[i++]=o>>0&255,n[i++]=o>>8&255,n[i++]=o>>16&255}}function et(t,e,r,i,o,a){if(0==a)for(r=e+r;e<r;)j(i,((a=t[e++])[0]>>24|a[1]>>8&65280|a[2]<<8&16711680|a[3]<<24)>>>0),o+=32;else n(i,o,t,e,r)}function rt(e,r){t[r][0]=t[e+"0"],t[r][1]=t[e+"1"],t[r][2]=t[e+"2"],t[r][3]=t[e+"3"],t[r][4]=t[e+"4"],t[r][5]=t[e+"5"],t[r][6]=t[e+"6"],t[r][7]=t[e+"7"],t[r][8]=t[e+"8"],t[r][9]=t[e+"9"],t[r][10]=t[e+"10"],t[r][11]=t[e+"11"],t[r][12]=t[e+"12"],t[r][13]=t[e+"13"],t[r][14]=t[e+"0"],t[r][15]=t[e+"0"]}function nt(t){return t==Hn||t==Vn||t==Wn||t==Gn}function it(){this.eb=[],this.size=this.A=this.fb=0}function ot(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function at(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new it,this.f.kb=new ot,this.sd=null}function st(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ut(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ct(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function lt(t,e){var r=t.T,i=e.ba.f.RGBA,o=i.eb,a=i.fb+t.ka*i.A,s=mi[e.ba.S],u=t.y,c=t.O,l=t.f,f=t.N,h=t.ea,p=t.W,d=e.cc,g=e.dc,v=e.Mc,m=e.Nc,b=t.ka,y=t.ka+t.T,w=t.U,x=w+1>>1;for(0==b?s(u,c,null,null,l,f,h,p,l,f,h,p,o,a,null,null,w):(s(e.ec,e.fc,u,c,d,g,v,m,l,f,h,p,o,a-i.A,o,a,w),++r);b+2<y;b+=2)d=l,g=f,v=h,m=p,f+=t.Rc,p+=t.Rc,a+=2*i.A,s(u,(c+=2*t.fa)-t.fa,u,c,d,g,v,m,l,f,h,p,o,a-i.A,o,a,w);return c+=t.fa,t.j+y<t.o?(n(e.ec,e.fc,u,c,w),n(e.cc,e.dc,l,f,x),n(e.Mc,e.Nc,h,p,x),r--):1&y||s(u,c,null,null,l,f,h,p,l,f,h,p,o,a+i.A,null,null,w),r}function ft(t,r,n){var i=t.F,o=[t.J];if(null!=i){var a=t.U,s=r.ba.S,u=s==Dn||s==Wn;r=r.ba.f.RGBA;var c=[0],l=t.ka;c[0]=t.T,t.Kb&&(0==l?--c[0]:(--l,o[0]-=t.width),t.j+t.ka+t.T==t.o&&(c[0]=t.o-t.j-l));var f=r.eb;l=r.fb+l*r.A,t=Sn(i,o[0],t.width,a,c,f,l+(u?0:3),r.A),e(n==c),t&&nt(s)&&Nn(f,l,u,a,c,r.A)}return 0}function ht(t){var e=t.ma,r=e.ba.S,n=11>r,i=r==Bn||r==Tn||r==Dn||r==zn||12==r||nt(r);if(e.memory=null,e.Ib=null,e.Jb=null,e.Nd=null,!Er(e.Oa,t,i?11:12))return 0;if(i&&nt(r)&&br(),t.da)alert("todo:use_scaling");else{if(n){if(e.Ib=ct,t.Kb){if(r=t.U+1>>1,e.memory=o(t.U+2*r),null==e.memory)return 0;e.ec=e.memory,e.fc=0,e.cc=e.ec,e.dc=e.fc+t.U,e.Mc=e.cc,e.Nc=e.dc+r,e.Ib=lt,br()}}else alert("todo:EmitYUV");i&&(e.Jb=ft,n&&vr())}if(n&&!Ii){for(t=0;256>t;++t)Ci[t]=89858*(t-128)+_i>>Si,Ei[t]=-22014*(t-128)+_i,Ri[t]=-45773*(t-128),Fi[t]=113618*(t-128)+_i>>Si;for(t=Pi;t<ki;++t)e=76283*(t-16)+_i>>Si,Mi[t-Pi]=Wt(e,255),Bi[t-Pi]=Wt(e+8>>4,15);Ii=1}return 1}function pt(t){var r=t.ma,n=t.U,i=t.T;return e(!(1&t.ka)),0>=n||0>=i?0:(n=r.Ib(t,r),null!=r.Jb&&r.Jb(t,r,n),r.Dc+=n,1)}function dt(t){t.ma.memory=null}function gt(t,e,r,n){return 47!=y(t,8)?0:(e[0]=y(t,14)+1,r[0]=y(t,14)+1,n[0]=y(t,1),0!=y(t,3)?0:!t.h)}function vt(t,e){if(4>t)return t+1;var r=t-2>>1;return(2+(1&t)<<r)+y(e,r)+1}function mt(t,e){return 120<e?e-120:1<=(r=((r=Zn[e-1])>>4)*t+(8-(15&r)))?r:1;var r}function bt(t,e,r){var n=A(r),i=t[e+=255&n].g-8;return 0<i&&(L(r,r.u+8),n=A(r),e+=t[e].value,e+=n&(1<<i)-1),L(r,r.u+t[e].g),t[e].value}function yt(t,r,n){return n.g+=t.g,n.value+=t.value<<r>>>0,e(8>=n.g),t.g}function wt(t,r,n){var i=t.xc;return e((r=0==i?0:t.vc[t.md*(n>>i)+(r>>i)])<t.Wb),t.Ya[r]}function xt(t,r,i,o){var a=t.ab,s=t.c*r,u=t.C;r=u+r;var c=i,l=o;for(o=t.Ta,i=t.Ua;0<a--;){var f=t.gc[a],h=u,p=r,d=c,g=l,v=(l=o,c=i,f.Ea);switch(e(h<p),e(p<=f.nc),f.hc){case 2:Gr(d,g,(p-h)*v,l,c);break;case 0:var m=h,b=p,y=l,w=c,x=(_=f).Ea;0==m&&(Vr(d,g,null,null,1,y,w),W(d,g+1,0,0,x-1,y,w+1),g+=x,w+=x,++m);for(var A=1<<_.b,N=A-1,L=B(x,_.b),S=_.K,_=_.w+(m>>_.b)*L;m<b;){var P=S,k=_,j=1;for(Wr(d,g,y,w-x,1,y,w);j<x;){var O=(j&~N)+A;O>x&&(O=x),(0,Kr[P[k++]>>8&15])(d,g+ +j,y,w+j-x,O-j,y,w+j),j=O}g+=x,w+=x,++m&N||(_+=L)}p!=f.nc&&n(l,c-v,l,c+(p-h-1)*v,v);break;case 1:for(v=d,b=g,x=(d=f.Ea)-(w=d&~(y=(g=1<<f.b)-1)),m=B(d,f.b),A=f.K,f=f.w+(h>>f.b)*m;h<p;){for(N=A,L=f,S=new D,_=b+w,P=b+d;b<_;)J(N[L++],S),Zr(S,v,b,g,l,c),b+=g,c+=g;b<P&&(J(N[L++],S),Zr(S,v,b,x,l,c),b+=x,c+=x),++h&y||(f+=m)}break;case 3:if(d==l&&g==c&&0<f.b){for(b=l,d=v=c+(p-h)*v-(w=(p-h)*B(f.Ea,f.b)),g=l,y=c,m=[],w=(x=w)-1;0<=w;--w)m[w]=g[y+w];for(w=x-1;0<=w;--w)b[d+w]=m[w];Jr(f,h,p,l,v,l,c)}else Jr(f,h,p,d,g,l,c)}c=o,l=i}l!=i&&n(o,i,c,l,s)}function At(t,r){var n=t.V,i=t.Ba+t.c*t.C,o=r-t.C;if(e(r<=t.l.o),e(16>=o),0<o){var a=t.l,s=t.Ta,u=t.Ua,c=a.width;if(xt(t,o,n,i),o=u=[u],e((n=t.C)<(i=r)),e(a.v<a.va),i>a.o&&(i=a.o),n<a.j){var l=a.j-n;n=a.j,o[0]+=l*c}if(n>=i?n=0:(o[0]+=4*a.v,a.ka=n-a.j,a.U=a.va-a.v,a.T=i-n,n=1),n){if(u=u[0],11>(n=t.ca).S){var f=n.f.RGBA,h=(i=n.S,o=a.U,a=a.T,l=f.eb,f.A),p=a;for(f=f.fb+t.Ma*f.A;0<p--;){var d=s,g=u,v=o,m=l,b=f;switch(i){case Mn:Qr(d,g,v,m,b);break;case Bn:tn(d,g,v,m,b);break;case Hn:tn(d,g,v,m,b),Nn(m,b,0,v,1,0);break;case qn:nn(d,g,v,m,b);break;case Tn:et(d,g,v,m,b,1);break;case Vn:et(d,g,v,m,b,1),Nn(m,b,0,v,1,0);break;case Dn:et(d,g,v,m,b,0);break;case Wn:et(d,g,v,m,b,0),Nn(m,b,1,v,1,0);break;case zn:en(d,g,v,m,b);break;case Gn:en(d,g,v,m,b),Ln(m,b,v,1,0);break;case Un:rn(d,g,v,m,b);break;default:e(0)}u+=c,f+=h}t.Ma+=a}else alert("todo:EmitRescaledRowsYUVA");e(t.Ma<=n.height)}}t.C=r,e(t.C<=t.i)}function Nt(t){var e;if(0<t.ua)return 0;for(e=0;e<t.Wb;++e){var r=t.Ya[e].G,n=t.Ya[e].H;if(0<r[1][n[1]+0].g||0<r[2][n[2]+0].g||0<r[3][n[3]+0].g)return 0}return 1}function Lt(t,r,n,i,o,a){if(0!=t.Z){var s=t.qd,u=t.rd;for(e(null!=vi[t.Z]);r<n;++r)vi[t.Z](s,u,i,o,i,o,a),s=i,u=o,o+=a;t.qd=s,t.rd=u}}function St(t,r){var n=t.l.ma,i=0==n.Z||1==n.Z?t.l.j:t.C;if(i=t.C<i?i:t.C,e(r<=t.l.o),r>i){var o=t.l.width,a=n.ca,s=n.tb+o*i,u=t.V,c=t.Ba+t.c*i,l=t.gc;e(1==t.ab),e(3==l[0].hc),Xr(l[0],i,r,u,c,a,s),Lt(n,i,r,a,s,o)}t.C=t.Ma=r}function _t(t,r,n,i,o,a,s){var u=t.$/i,c=t.$%i,l=t.m,f=t.s,h=n+t.$,p=h;o=n+i*o;var d=n+i*a,g=280+f.ua,v=t.Pb?u:16777216,m=0<f.ua?f.Wa:null,b=f.wc,y=h<d?wt(f,c,u):null;e(t.C<a),e(d<=o);var w=!1;t:for(;;){for(;w||h<d;){var x=0;if(u>=v){var _=h-n;e((v=t).Pb),v.wd=v.m,v.xd=_,0<v.s.ua&&R(v.s.Wa,v.s.vb),v=u+ti}if(c&b||(y=wt(f,c,u)),e(null!=y),y.Qb&&(r[h]=y.qb,w=!0),!w)if(S(l),y.jc){x=l,_=r;var P=h,k=y.pd[A(x)&qr-1];e(y.jc),256>k.g?(L(x,x.u+k.g),_[P]=k.value,x=0):(L(x,x.u+k.g-256),e(256<=k.value),x=k.value),0==x&&(w=!0)}else x=bt(y.G[0],y.H[0],l);if(l.h)break;if(w||256>x){if(!w)if(y.nd)r[h]=(y.qb|x<<8)>>>0;else{if(S(l),w=bt(y.G[1],y.H[1],l),S(l),_=bt(y.G[2],y.H[2],l),P=bt(y.G[3],y.H[3],l),l.h)break;r[h]=(P<<24|w<<16|x<<8|_)>>>0}if(w=!1,++h,++c>=i&&(c=0,++u,null!=s&&u<=a&&!(u%16)&&s(t,u),null!=m))for(;p<h;)x=r[p++],m.X[(506832829*x&4294967295)>>>m.Mb]=x}else if(280>x){if(x=vt(x-256,l),_=bt(y.G[4],y.H[4],l),S(l),_=mt(i,_=vt(_,l)),l.h)break;if(h-n<_||o-h<x)break t;for(P=0;P<x;++P)r[h+P]=r[h+P-_];for(h+=x,c+=x;c>=i;)c-=i,++u,null!=s&&u<=a&&!(u%16)&&s(t,u);if(e(h<=o),c&b&&(y=wt(f,c,u)),null!=m)for(;p<h;)x=r[p++],m.X[(506832829*x&4294967295)>>>m.Mb]=x}else{if(!(x<g))break t;for(w=x-280,e(null!=m);p<h;)x=r[p++],m.X[(506832829*x&4294967295)>>>m.Mb]=x;x=h,e(!(w>>>(_=m).Xa)),r[x]=_.X[w],w=!0}w||e(l.h==N(l))}if(t.Pb&&l.h&&h<o)e(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&R(t.s.vb,t.s.Wa);else{if(l.h)break t;null!=s&&s(t,u>a?a:u),t.a=0,t.$=h-n}return 1}return t.a=3,0}function Pt(t){e(null!=t),t.vc=null,t.yc=null,t.Ya=null;var r=t.Wa;null!=r&&(r.X=null),t.vb=null,e(null!=t)}function kt(){var e=new ar;return null==e?null:(e.a=0,e.xb=gi,rt("Predictor","VP8LPredictors"),rt("Predictor","VP8LPredictors_C"),rt("PredictorAdd","VP8LPredictorsAdd"),rt("PredictorAdd","VP8LPredictorsAdd_C"),Gr=G,Zr=Y,Qr=$,tn=K,en=Z,rn=Q,nn=tt,t.VP8LMapColor32b=Yr,t.VP8LMapColor8b=$r,e)}function jt(t,r,n,s,u){var c=1,h=[t],d=[r],g=s.m,v=s.s,m=null,b=0;t:for(;;){if(n)for(;c&&y(g,1);){var w=h,x=d,N=s,_=1,P=N.m,k=N.gc[N.ab],j=y(P,2);if(N.Oc&1<<j)c=0;else{switch(N.Oc|=1<<j,k.hc=j,k.Ea=w[0],k.nc=x[0],k.K=[null],++N.ab,e(4>=N.ab),j){case 0:case 1:k.b=y(P,3)+2,_=jt(B(k.Ea,k.b),B(k.nc,k.b),0,N,k.K),k.K=k.K[0];break;case 3:var O,I=y(P,8)+1,C=16<I?0:4<I?1:2<I?2:3;if(w[0]=B(k.Ea,C),k.b=C,O=_=jt(I,1,0,N,k.K)){var R,E=I,M=k,T=1<<(8>>M.b),D=o(T);if(null==D)O=0;else{var z=M.K[0],U=M.w;for(D[0]=M.K[0][0],R=1;R<1*E;++R)D[R]=q(z[U+R],D[R-1]);for(;R<4*T;++R)D[R]=0;M.K[0]=null,M.K[0]=D,O=1}}_=O;break;case 2:break;default:e(0)}c=_}}if(h=h[0],d=d[0],c&&y(g,1)&&!(c=1<=(b=y(g,4))&&11>=b)){s.a=3;break t}var H;if(H=c)e:{var V,W,G,J=s,Y=h,X=d,$=b,K=n,Z=J.m,Q=J.s,tt=[null],et=1,rt=0,nt=Qn[$];r:for(;;){if(K&&y(Z,1)){var it=y(Z,3)+2,ot=B(Y,it),at=B(X,it),st=ot*at;if(!jt(ot,at,0,J,tt))break r;for(tt=tt[0],Q.xc=it,V=0;V<st;++V){var ut=tt[V]>>8&65535;tt[V]=ut,ut>=et&&(et=ut+1)}}if(Z.h)break r;for(W=0;5>W;++W){var ct=Xn[W];!W&&0<$&&(ct+=1<<$),rt<ct&&(rt=ct)}var lt=a(et*nt,f),ft=et,ht=a(ft,p);if(null==ht)var pt=null;else e(65536>=ft),pt=ht;var dt=o(rt);if(null==pt||null==dt||null==lt){J.a=1;break r}var gt=lt;for(V=G=0;V<et;++V){var vt=pt[V],mt=vt.G,bt=vt.H,wt=0,xt=1,At=0;for(W=0;5>W;++W){ct=Xn[W],mt[W]=gt,bt[W]=G,!W&&0<$&&(ct+=1<<$);n:{var Nt,Lt=ct,St=J,kt=dt,Ot=gt,It=G,Ct=0,Ft=St.m,Rt=y(Ft,1);if(i(kt,0,0,Lt),Rt){var Et=y(Ft,1)+1,Mt=y(Ft,1),Bt=y(Ft,0==Mt?1:8);kt[Bt]=1,2==Et&&(kt[Bt=y(Ft,8)]=1);var qt=1}else{var Tt=o(19),Dt=y(Ft,4)+4;if(19<Dt){St.a=3;var zt=0;break n}for(Nt=0;Nt<Dt;++Nt)Tt[Kn[Nt]]=y(Ft,3);var Ut=void 0,Ht=void 0,Vt=St,Wt=Tt,Gt=Lt,Jt=kt,Yt=0,Xt=Vt.m,$t=8,Kt=a(128,f);i:for(;l(Kt,0,7,Wt,19);){if(y(Xt,1)){var Zt=2+2*y(Xt,3);if((Ut=2+y(Xt,Zt))>Gt)break i}else Ut=Gt;for(Ht=0;Ht<Gt&&Ut--;){S(Xt);var Qt=Kt[0+(127&A(Xt))];L(Xt,Xt.u+Qt.g);var te=Qt.value;if(16>te)Jt[Ht++]=te,0!=te&&($t=te);else{var ee=16==te,re=te-16,ne=Yn[re],ie=y(Xt,Jn[re])+ne;if(Ht+ie>Gt)break i;for(var oe=ee?$t:0;0<ie--;)Jt[Ht++]=oe}}Yt=1;break i}Yt||(Vt.a=3),qt=Yt}(qt=qt&&!Ft.h)&&(Ct=l(Ot,It,8,kt,Lt)),qt&&0!=Ct?zt=Ct:(St.a=3,zt=0)}if(0==zt)break r;if(xt&&1==$n[W]&&(xt=0==gt[G].g),wt+=gt[G].g,G+=zt,3>=W){var ae,se=dt[0];for(ae=1;ae<ct;++ae)dt[ae]>se&&(se=dt[ae]);At+=se}}if(vt.nd=xt,vt.Qb=0,xt&&(vt.qb=(mt[3][bt[3]+0].value<<24|mt[1][bt[1]+0].value<<16|mt[2][bt[2]+0].value)>>>0,0==wt&&256>mt[0][bt[0]+0].value&&(vt.Qb=1,vt.qb+=mt[0][bt[0]+0].value<<8)),vt.jc=!vt.Qb&&6>At,vt.jc){var ue,ce=vt;for(ue=0;ue<qr;++ue){var le=ue,fe=ce.pd[le],he=ce.G[0][ce.H[0]+le];256<=he.value?(fe.g=he.g+256,fe.value=he.value):(fe.g=0,fe.value=0,le>>=yt(he,8,fe),le>>=yt(ce.G[1][ce.H[1]+le],16,fe),le>>=yt(ce.G[2][ce.H[2]+le],0,fe),yt(ce.G[3][ce.H[3]+le],24,fe))}}}Q.vc=tt,Q.Wb=et,Q.Ya=pt,Q.yc=lt,H=1;break e}H=0}if(!(c=H)){s.a=3;break t}if(0<b){if(v.ua=1<<b,!F(v.Wa,b)){s.a=1,c=0;break t}}else v.ua=0;var pe=s,de=h,ge=d,ve=pe.s,me=ve.xc;if(pe.c=de,pe.i=ge,ve.md=B(de,me),ve.wc=0==me?-1:(1<<me)-1,n){s.xb=di;break t}if(null==(m=o(h*d))){s.a=1,c=0;break t}c=(c=_t(s,m,0,h,d,d,null))&&!g.h;break t}return c?(null!=u?u[0]=m:(e(null==m),e(n)),s.$=0,n||Pt(v)):Pt(v),c}function Ot(t,r){var n=t.c*t.i,i=n+r+16*r;return e(t.c<=r),t.V=o(i),null==t.V?(t.Ta=null,t.Ua=0,t.a=1,0):(t.Ta=t.V,t.Ua=t.Ba+n+r,1)}function It(t,r){var n=t.C,i=r-n,o=t.V,a=t.Ba+t.c*n;for(e(r<=t.l.o);0<i;){var s=16<i?16:i,u=t.l.ma,c=t.l.width,l=c*s,f=u.ca,h=u.tb+c*n,p=t.Ta,d=t.Ua;xt(t,s,o,a),_n(p,d,f,h,l),Lt(u,n,n+s,f,h,c),i-=s,o+=s*t.c,n+=s}e(n==r),t.C=t.Ma=r}function Ct(){this.ub=this.yd=this.td=this.Rb=0}function Ft(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Rt(){this.Fb=this.Bb=this.Cb=0,this.Zb=o(4),this.Lb=o(4)}function Et(){this.Yb=function(){var t=[];return function t(e,r,n){for(var i=n[r],o=0;o<i&&(e.push(n.length>r+1?[]:0),!(n.length<r+1));o++)t(e[o],r+1,n)}(t,0,[3,11]),t}()}function Mt(){this.jb=o(3),this.Wc=s([4,8],Et),this.Xc=s([4,17],Et)}function Bt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new o(4),this.od=new o(4)}function qt(){this.ld=this.La=this.dd=this.tc=0}function Tt(){this.Na=this.la=0}function Dt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function zt(){this.ad=o(384),this.Za=0,this.Ob=o(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Ut(){this.uc=this.M=this.Nb=0,this.wa=Array(new qt),this.Y=0,this.ya=Array(new zt),this.aa=0,this.l=new Gt}function Ht(){this.y=o(16),this.f=o(8),this.ea=o(8)}function Vt(){this.cb=this.a=0,this.sc="",this.m=new w,this.Od=new Ct,this.Kc=new Ft,this.ed=new Bt,this.Qa=new Rt,this.Ic=this.$c=this.Aa=0,this.D=new Ut,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=a(8,w),this.ia=0,this.pb=a(4,Dt),this.Pa=new Mt,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ht),this.Hd=0,this.rb=Array(new Tt),this.sb=0,this.wa=Array(new qt),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new zt),this.L=this.aa=0,this.gd=s([4,2],qt),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Wt(t,e){return 0>t?0:t>e?e:t}function Gt(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Jt(){var t=new Vt;return null!=t&&(t.a=0,t.sc="OK",t.cb=0,t.Xb=0,ni||(ni=Kt)),t}function Yt(t,e,r){return 0==t.a&&(t.a=e,t.sc=r,t.cb=0),0}function Xt(t,e,r){return 3<=r&&157==t[e+0]&&1==t[e+1]&&42==t[e+2]}function $t(t,r){if(null==t)return 0;if(t.a=0,t.sc="OK",null==r)return Yt(t,2,"null VP8Io passed to VP8GetHeaders()");var n=r.data,o=r.w,a=r.ha;if(4>a)return Yt(t,7,"Truncated header.");var s=n[o+0]|n[o+1]<<8|n[o+2]<<16,u=t.Od;if(u.Rb=!(1&s),u.td=s>>1&7,u.yd=s>>4&1,u.ub=s>>5,3<u.td)return Yt(t,3,"Incorrect keyframe parameters.");if(!u.yd)return Yt(t,4,"Frame not displayable.");o+=3,a-=3;var c=t.Kc;if(u.Rb){if(7>a)return Yt(t,7,"cannot parse picture header");if(!Xt(n,o,a))return Yt(t,3,"Bad code word");c.c=16383&(n[o+4]<<8|n[o+3]),c.Td=n[o+4]>>6,c.i=16383&(n[o+6]<<8|n[o+5]),c.Ud=n[o+6]>>6,o+=7,a-=7,t.za=c.c+15>>4,t.Ub=c.i+15>>4,r.width=c.c,r.height=c.i,r.Da=0,r.j=0,r.v=0,r.va=r.width,r.o=r.height,r.da=0,r.ib=r.width,r.hb=r.height,r.U=r.width,r.T=r.height,i((s=t.Pa).jb,0,255,s.jb.length),e(null!=(s=t.Qa)),s.Cb=0,s.Bb=0,s.Fb=1,i(s.Zb,0,0,s.Zb.length),i(s.Lb,0,0,s.Lb)}if(u.ub>a)return Yt(t,7,"bad partition length");d(s=t.m,n,o,u.ub),o+=u.ub,a-=u.ub,u.Rb&&(c.Ld=P(s),c.Kd=P(s)),c=t.Qa;var l,f=t.Pa;if(e(null!=s),e(null!=c),c.Cb=P(s),c.Cb){if(c.Bb=P(s),P(s)){for(c.Fb=P(s),l=0;4>l;++l)c.Zb[l]=P(s)?v(s,7):0;for(l=0;4>l;++l)c.Lb[l]=P(s)?v(s,6):0}if(c.Bb)for(l=0;3>l;++l)f.jb[l]=P(s)?g(s,8):255}else c.Bb=0;if(s.Ka)return Yt(t,3,"cannot parse segment header");if((c=t.ed).zd=P(s),c.Tb=g(s,6),c.wb=g(s,3),c.Pc=P(s),c.Pc&&P(s)){for(f=0;4>f;++f)P(s)&&(c.vd[f]=v(s,6));for(f=0;4>f;++f)P(s)&&(c.od[f]=v(s,6))}if(t.L=0==c.Tb?0:c.zd?1:2,s.Ka)return Yt(t,3,"cannot parse filter header");var h=a;if(a=l=o,o=l+h,c=h,t.Xb=(1<<g(t.m,2))-1,h<3*(f=t.Xb))n=7;else{for(l+=3*f,c-=3*f,h=0;h<f;++h){var p=n[a+0]|n[a+1]<<8|n[a+2]<<16;p>c&&(p=c),d(t.Jc[+h],n,l,p),l+=p,c-=p,a+=3}d(t.Jc[+f],n,l,c),n=l<o?0:5}if(0!=n)return Yt(t,n,"cannot parse partitions");for(n=g(l=t.m,7),a=P(l)?v(l,4):0,o=P(l)?v(l,4):0,c=P(l)?v(l,4):0,f=P(l)?v(l,4):0,l=P(l)?v(l,4):0,h=t.Qa,p=0;4>p;++p){if(h.Cb){var m=h.Zb[p];h.Fb||(m+=n)}else{if(0<p){t.pb[p]=t.pb[0];continue}m=n}var b=t.pb[p];b.Sc[0]=ei[Wt(m+a,127)],b.Sc[1]=ri[Wt(m+0,127)],b.Eb[0]=2*ei[Wt(m+o,127)],b.Eb[1]=101581*ri[Wt(m+c,127)]>>16,8>b.Eb[1]&&(b.Eb[1]=8),b.Qc[0]=ei[Wt(m+f,117)],b.Qc[1]=ri[Wt(m+l,127)],b.lc=m+l}if(!u.Rb)return Yt(t,4,"Not a key frame.");for(P(s),u=t.Pa,n=0;4>n;++n){for(a=0;8>a;++a)for(o=0;3>o;++o)for(c=0;11>c;++c)f=k(s,ci[n][a][o][c])?g(s,8):si[n][a][o][c],u.Wc[n][a].Yb[o][c]=f;for(a=0;17>a;++a)u.Xc[n][a]=u.Wc[n][li[a]]}return t.kc=P(s),t.kc&&(t.Bd=g(s,8)),t.cb=1}function Kt(t,e,r,n,i,o,a){var s=e[i].Yb[r];for(r=0;16>i;++i){if(!k(t,s[r+0]))return i;for(;!k(t,s[r+1]);)if(s=e[++i].Yb[0],r=0,16==i)return 16;var u=e[i+1].Yb;if(k(t,s[r+2])){var c=t,l=0;if(k(c,(h=s)[(f=r)+3]))if(k(c,h[f+6])){for(s=0,f=2*(l=k(c,h[f+8]))+(h=k(c,h[f+9+l])),l=0,h=ii[f];h[s];++s)l+=l+k(c,h[s]);l+=3+(8<<f)}else k(c,h[f+7])?(l=7+2*k(c,165),l+=k(c,145)):l=5+k(c,159);else l=k(c,h[f+4])?3+k(c,h[f+5]):2;s=u[2]}else l=1,s=u[1];u=a+oi[i],0>(c=t).b&&_(c);var f,h=c.b,p=(f=c.Ca>>1)-(c.I>>h)>>31;--c.b,c.Ca+=p,c.Ca|=1,c.I-=(f+1&p)<<h,o[u]=((l^p)-p)*n[(0<i)+0]}return 16}function Zt(t){var e=t.rb[t.sb-1];e.la=0,e.Na=0,i(t.zc,0,0,t.zc.length),t.ja=0}function Qt(t,r){if(null==t)return 0;if(null==r)return Yt(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!$t(t,r))return 0;if(e(t.cb),null==r.ac||r.ac(r)){r.ob&&(t.L=0);var s=Ti[t.L];if(2==t.L?(t.yb=0,t.zb=0):(t.yb=r.v-s>>4,t.zb=r.j-s>>4,0>t.yb&&(t.yb=0),0>t.zb&&(t.zb=0)),t.Va=r.o+15+s>>4,t.Hb=r.va+15+s>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0<t.L){var u=t.ed;for(s=0;4>s;++s){var c;if(t.Qa.Cb){var l=t.Qa.Lb[s];t.Qa.Fb||(l+=u.Tb)}else l=u.Tb;for(c=0;1>=c;++c){var f=t.gd[s][c],h=l;if(u.Pc&&(h+=u.vd[0],c&&(h+=u.od[0])),0<(h=0>h?0:63<h?63:h)){var p=h;0<u.wb&&(p=4<u.wb?p>>2:p>>1)>9-u.wb&&(p=9-u.wb),1>p&&(p=1),f.dd=p,f.tc=2*h+p,f.ld=40<=h?2:15<=h?1:0}else f.tc=0;f.La=c}}}s=0}else Yt(t,6,"Frame setup failed"),s=t.a;if(s=0==s){if(s){t.$c=0,0<t.Aa||(t.Ic=zi);t:{s=t.Ic,u=4*(p=t.za);var d=32*p,g=p+1,v=0<t.L?p*(0<t.Aa?2:1):0,m=(2==t.Aa?2:1)*p;if((f=u+832+(c=3*(16*s+Ti[t.L])/2*d)+(l=null!=t.Fa&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=f)s=0;else{if(f>t.Vb){if(t.Vb=0,t.Ec=o(f),t.Fc=0,null==t.Ec){s=Yt(t,1,"no memory during frame initialization.");break t}t.Vb=f}f=t.Ec,h=t.Fc,t.Ac=f,t.Bc=h,h+=u,t.Gd=a(d,Ht),t.Hd=0,t.rb=a(g+1,Tt),t.sb=1,t.wa=v?a(v,qt):null,t.Y=0,t.D.Nb=0,t.D.wa=t.wa,t.D.Y=t.Y,0<t.Aa&&(t.D.Y+=p),e(!0),t.oc=f,t.pc=h,h+=832,t.ya=a(m,zt),t.aa=0,t.D.ya=t.ya,t.D.aa=t.aa,2==t.Aa&&(t.D.aa+=p),t.R=16*p,t.B=8*p,p=(d=Ti[t.L])*t.R,d=d/2*t.B,t.sa=f,t.ta=h+p,t.qa=t.sa,t.ra=t.ta+16*s*t.R+d,t.Ha=t.qa,t.Ia=t.ra+8*s*t.B+d,t.$c=0,h+=c,t.mb=l?f:null,t.nb=l?h:null,e(h+l<=t.Fc+t.Vb),Zt(t),i(t.Ac,t.Bc,0,u),s=1}}if(s){if(r.ka=0,r.y=t.sa,r.O=t.ta,r.f=t.qa,r.N=t.ra,r.ea=t.Ha,r.Vd=t.Ia,r.fa=t.R,r.Rc=t.B,r.F=null,r.J=0,!In){for(s=-255;255>=s;++s)Pn[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)kn[1020+s]=-128>s?-128:127<s?127:s;for(s=-112;112>=s;++s)jn[112+s]=-16>s?-16:15<s?15:s;for(s=-255;510>=s;++s)On[255+s]=0>s?0:255<s?255:s;In=1}on=ce,an=oe,un=ae,cn=se,ln=ue,sn=ie,fn=Ye,hn=Xe,pn=Ze,dn=Qe,gn=$e,vn=Ke,mn=tr,bn=er,yn=Ue,wn=He,xn=Ve,An=We,hi[0]=Le,hi[1]=fe,hi[2]=Ae,hi[3]=Ne,hi[4]=Se,hi[5]=Pe,hi[6]=_e,hi[7]=ke,hi[8]=Oe,hi[9]=je,fi[0]=me,fi[1]=pe,fi[2]=de,fi[3]=ge,fi[4]=be,fi[5]=ye,fi[6]=we,pi[0]=Re,pi[1]=he,pi[2]=Ie,pi[3]=Ce,pi[4]=Me,pi[5]=Ee,pi[6]=Be,s=1}else s=0}s&&(s=function(t,r){for(t.M=0;t.M<t.Va;++t.M){var a,s=t.Jc[t.M&t.Xb],u=t.m,c=t;for(a=0;a<c.za;++a){var l=u,f=c,h=f.Ac,p=f.Bc+4*a,d=f.zc,g=f.ya[f.aa+a];if(f.Qa.Bb?g.$b=k(l,f.Pa.jb[0])?2+k(l,f.Pa.jb[2]):k(l,f.Pa.jb[1]):g.$b=0,f.kc&&(g.Ad=k(l,f.Bd)),g.Za=!k(l,145)+0,g.Za){var v=g.Ob,m=0;for(f=0;4>f;++f){var b,y=d[0+f];for(b=0;4>b;++b){y=ui[h[p+b]][y];for(var w=ai[k(l,y[0])];0<w;)w=ai[2*w+k(l,y[w])];y=-w,h[p+b]=y}n(v,m,h,p,4),m+=4,d[0+f]=y}}else y=k(l,156)?k(l,128)?1:3:k(l,163)?2:0,g.Ob[0]=y,i(h,p,y,4),i(d,0,y,4);g.Dd=k(l,142)?k(l,114)?k(l,183)?1:3:2:0}if(c.m.Ka)return Yt(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(c=s,l=(u=t).rb[u.sb-1],h=u.rb[u.sb+u.ja],a=u.ya[u.aa+u.ja],p=u.kc?a.Ad:0)l.la=h.la=0,a.Za||(l.Na=h.Na=0),a.Hc=0,a.Gc=0,a.ia=0;else{var x,A;if(l=h,h=c,p=u.Pa.Xc,d=u.ya[u.aa+u.ja],g=u.pb[d.$b],f=d.ad,v=0,m=u.rb[u.sb-1],y=b=0,i(f,v,0,384),d.Za)var N=0,L=p[3];else{w=o(16);var S=l.Na+m.Na;if(S=ni(h,p[1],S,g.Eb,0,w,0),l.Na=m.Na=(0<S)+0,1<S)on(w,0,f,v);else{var _=w[0]+3>>3;for(w=0;256>w;w+=16)f[v+w]=_}N=1,L=p[0]}var P=15&l.la,j=15&m.la;for(w=0;4>w;++w){var O=1&j;for(_=A=0;4>_;++_)P=P>>1|(O=(S=ni(h,L,S=O+(1&P),g.Sc,N,f,v))>N)<<7,A=A<<2|(3<S?3:1<S?2:0!=f[v+0]),v+=16;P>>=4,j=j>>1|O<<7,b=(b<<8|A)>>>0}for(L=P,N=j>>4,x=0;4>x;x+=2){for(A=0,P=l.la>>4+x,j=m.la>>4+x,w=0;2>w;++w){for(O=1&j,_=0;2>_;++_)S=O+(1&P),P=P>>1|(O=0<(S=ni(h,p[2],S,g.Qc,0,f,v)))<<3,A=A<<2|(3<S?3:1<S?2:0!=f[v+0]),v+=16;P>>=2,j=j>>1|O<<5}y|=A<<4*x,L|=P<<4<<x,N|=(240&j)<<x}l.la=L,m.la=N,d.Hc=b,d.Gc=y,d.ia=43690&y?0:g.ia,p=!(b|y)}if(0<u.L&&(u.wa[u.Y+u.ja]=u.gd[a.$b][a.Za],u.wa[u.Y+u.ja].La|=!p),c.Ka)return Yt(t,7,"Premature end-of-file encountered.")}if(Zt(t),u=r,c=1,a=(s=t).D,l=0<s.L&&s.M>=s.zb&&s.M<=s.Va,0==s.Aa)t:{if(a.M=s.M,a.uc=l,Fr(s,a),c=1,a=(A=s.D).Nb,l=(y=Ti[s.L])*s.R,h=y/2*s.B,w=16*a*s.R,_=8*a*s.B,p=s.sa,d=s.ta-l+w,g=s.qa,f=s.ra-h+_,v=s.Ha,m=s.Ia-h+_,j=0==(P=A.M),b=P>=s.Va-1,2==s.Aa&&Fr(s,A),A.uc)for(O=(S=s).D.M,e(S.D.uc),A=S.yb;A<S.Hb;++A){N=A,L=O;var I=(C=(z=S).D).Nb;x=z.R;var C=C.wa[C.Y+N],F=z.sa,R=z.ta+16*I*x+16*N,E=C.dd,M=C.tc;if(0!=M)if(e(3<=M),1==z.L)0<N&&wn(F,R,x,M+4),C.La&&An(F,R,x,M),0<L&&yn(F,R,x,M+4),C.La&&xn(F,R,x,M);else{var B=z.B,q=z.qa,T=z.ra+8*I*B+8*N,D=z.Ha,z=z.Ia+8*I*B+8*N;I=C.ld,0<N&&(hn(F,R,x,M+4,E,I),dn(q,T,D,z,B,M+4,E,I)),C.La&&(vn(F,R,x,M,E,I),bn(q,T,D,z,B,M,E,I)),0<L&&(fn(F,R,x,M+4,E,I),pn(q,T,D,z,B,M+4,E,I)),C.La&&(gn(F,R,x,M,E,I),mn(q,T,D,z,B,M,E,I))}}if(s.ia&&alert("todo:DitherRow"),null!=u.put){if(A=16*P,P=16*(P+1),j?(u.y=s.sa,u.O=s.ta+w,u.f=s.qa,u.N=s.ra+_,u.ea=s.Ha,u.W=s.Ia+_):(A-=y,u.y=p,u.O=d,u.f=g,u.N=f,u.ea=v,u.W=m),b||(P-=y),P>u.o&&(P=u.o),u.F=null,u.J=null,null!=s.Fa&&0<s.Fa.length&&A<P&&(u.J=fr(s,u,A,P-A),u.F=s.mb,null==u.F&&0==u.F.length)){c=Yt(s,3,"Could not decode alpha data.");break t}A<u.j&&(y=u.j-A,A=u.j,e(!(1&y)),u.O+=s.R*y,u.N+=s.B*(y>>1),u.W+=s.B*(y>>1),null!=u.F&&(u.J+=u.width*y)),A<P&&(u.O+=u.v,u.N+=u.v>>1,u.W+=u.v>>1,null!=u.F&&(u.J+=u.v),u.ka=A-u.j,u.U=u.va-u.v,u.T=P-A,c=u.put(u))}a+1!=s.Ic||b||(n(s.sa,s.ta-l,p,d+16*s.R,l),n(s.qa,s.ra-h,g,f+8*s.B,h),n(s.Ha,s.Ia-h,v,m+8*s.B,h))}if(!c)return Yt(t,6,"Output aborted.")}return 1}(t,r)),null!=r.bc&&r.bc(r),s&=1}return s?(t.cb=0,s):0}function te(t,e,r,n,i){i=t[e+r+32*n]+(i>>3),t[e+r+32*n]=-256&i?0>i?0:255:i}function ee(t,e,r,n,i,o){te(t,e,0,r,n+i),te(t,e,1,r,n+o),te(t,e,2,r,n-o),te(t,e,3,r,n-i)}function re(t){return(20091*t>>16)+t}function ne(t,e,r,n){var i,a=0,s=o(16);for(i=0;4>i;++i){var u=t[e+0]+t[e+8],c=t[e+0]-t[e+8],l=(35468*t[e+4]>>16)-re(t[e+12]),f=re(t[e+4])+(35468*t[e+12]>>16);s[a+0]=u+f,s[a+1]=c+l,s[a+2]=c-l,s[a+3]=u-f,a+=4,e++}for(i=a=0;4>i;++i)u=(t=s[a+0]+4)+s[a+8],c=t-s[a+8],l=(35468*s[a+4]>>16)-re(s[a+12]),te(r,n,0,0,u+(f=re(s[a+4])+(35468*s[a+12]>>16))),te(r,n,1,0,c+l),te(r,n,2,0,c-l),te(r,n,3,0,u-f),a++,n+=32}function ie(t,e,r,n){var i=t[e+0]+4,o=35468*t[e+4]>>16,a=re(t[e+4]),s=35468*t[e+1]>>16;ee(r,n,0,i+a,t=re(t[e+1]),s),ee(r,n,1,i+o,t,s),ee(r,n,2,i-o,t,s),ee(r,n,3,i-a,t,s)}function oe(t,e,r,n,i){ne(t,e,r,n),i&&ne(t,e+16,r,n+4)}function ae(t,e,r,n){an(t,e+0,r,n,1),an(t,e+32,r,n+128,1)}function se(t,e,r,n){var i;for(t=t[e+0]+4,i=0;4>i;++i)for(e=0;4>e;++e)te(r,n,e,i,t)}function ue(t,e,r,n){t[e+0]&&cn(t,e+0,r,n),t[e+16]&&cn(t,e+16,r,n+4),t[e+32]&&cn(t,e+32,r,n+128),t[e+48]&&cn(t,e+48,r,n+128+4)}function ce(t,e,r,n){var i,a=o(16);for(i=0;4>i;++i){var s=t[e+0+i]+t[e+12+i],u=t[e+4+i]+t[e+8+i],c=t[e+4+i]-t[e+8+i],l=t[e+0+i]-t[e+12+i];a[0+i]=s+u,a[8+i]=s-u,a[4+i]=l+c,a[12+i]=l-c}for(i=0;4>i;++i)s=(t=a[0+4*i]+3)+a[3+4*i],u=a[1+4*i]+a[2+4*i],c=a[1+4*i]-a[2+4*i],l=t-a[3+4*i],r[n+0]=s+u>>3,r[n+16]=l+c>>3,r[n+32]=s-u>>3,r[n+48]=l-c>>3,n+=64}function le(t,e,r){var n,i=e-32,o=Rn,a=255-t[i-1];for(n=0;n<r;++n){var s,u=o,c=a+t[e-1];for(s=0;s<r;++s)t[e+s]=u[c+t[i+s]];e+=32}}function fe(t,e){le(t,e,4)}function he(t,e){le(t,e,8)}function pe(t,e){le(t,e,16)}function de(t,e){var r;for(r=0;16>r;++r)n(t,e+32*r,t,e-32,16)}function ge(t,e){var r;for(r=16;0<r;--r)i(t,e,t[e-1],16),e+=32}function ve(t,e,r){var n;for(n=0;16>n;++n)i(e,r+32*n,t,16)}function me(t,e){var r,n=16;for(r=0;16>r;++r)n+=t[e-1+32*r]+t[e+r-32];ve(n>>5,t,e)}function be(t,e){var r,n=8;for(r=0;16>r;++r)n+=t[e-1+32*r];ve(n>>4,t,e)}function ye(t,e){var r,n=8;for(r=0;16>r;++r)n+=t[e+r-32];ve(n>>4,t,e)}function we(t,e){ve(128,t,e)}function xe(t,e,r){return t+2*e+r+2>>2}function Ae(t,e){var r,i=e-32;for(i=new Uint8Array([xe(t[i-1],t[i+0],t[i+1]),xe(t[i+0],t[i+1],t[i+2]),xe(t[i+1],t[i+2],t[i+3]),xe(t[i+2],t[i+3],t[i+4])]),r=0;4>r;++r)n(t,e+32*r,i,0,i.length)}function Ne(t,e){var r=t[e-1],n=t[e-1+32],i=t[e-1+64],o=t[e-1+96];j(t,e+0,16843009*xe(t[e-1-32],r,n)),j(t,e+32,16843009*xe(r,n,i)),j(t,e+64,16843009*xe(n,i,o)),j(t,e+96,16843009*xe(i,o,o))}function Le(t,e){var r,n=4;for(r=0;4>r;++r)n+=t[e+r-32]+t[e-1+32*r];for(n>>=3,r=0;4>r;++r)i(t,e+32*r,n,4)}function Se(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],o=t[e-1-32],a=t[e+0-32],s=t[e+1-32],u=t[e+2-32],c=t[e+3-32];t[e+0+96]=xe(n,i,t[e-1+96]),t[e+1+96]=t[e+0+64]=xe(r,n,i),t[e+2+96]=t[e+1+64]=t[e+0+32]=xe(o,r,n),t[e+3+96]=t[e+2+64]=t[e+1+32]=t[e+0+0]=xe(a,o,r),t[e+3+64]=t[e+2+32]=t[e+1+0]=xe(s,a,o),t[e+3+32]=t[e+2+0]=xe(u,s,a),t[e+3+0]=xe(c,u,s)}function _e(t,e){var r=t[e+1-32],n=t[e+2-32],i=t[e+3-32],o=t[e+4-32],a=t[e+5-32],s=t[e+6-32],u=t[e+7-32];t[e+0+0]=xe(t[e+0-32],r,n),t[e+1+0]=t[e+0+32]=xe(r,n,i),t[e+2+0]=t[e+1+32]=t[e+0+64]=xe(n,i,o),t[e+3+0]=t[e+2+32]=t[e+1+64]=t[e+0+96]=xe(i,o,a),t[e+3+32]=t[e+2+64]=t[e+1+96]=xe(o,a,s),t[e+3+64]=t[e+2+96]=xe(a,s,u),t[e+3+96]=xe(s,u,u)}function Pe(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],o=t[e-1-32],a=t[e+0-32],s=t[e+1-32],u=t[e+2-32],c=t[e+3-32];t[e+0+0]=t[e+1+64]=o+a+1>>1,t[e+1+0]=t[e+2+64]=a+s+1>>1,t[e+2+0]=t[e+3+64]=s+u+1>>1,t[e+3+0]=u+c+1>>1,t[e+0+96]=xe(i,n,r),t[e+0+64]=xe(n,r,o),t[e+0+32]=t[e+1+96]=xe(r,o,a),t[e+1+32]=t[e+2+96]=xe(o,a,s),t[e+2+32]=t[e+3+96]=xe(a,s,u),t[e+3+32]=xe(s,u,c)}function ke(t,e){var r=t[e+0-32],n=t[e+1-32],i=t[e+2-32],o=t[e+3-32],a=t[e+4-32],s=t[e+5-32],u=t[e+6-32],c=t[e+7-32];t[e+0+0]=r+n+1>>1,t[e+1+0]=t[e+0+64]=n+i+1>>1,t[e+2+0]=t[e+1+64]=i+o+1>>1,t[e+3+0]=t[e+2+64]=o+a+1>>1,t[e+0+32]=xe(r,n,i),t[e+1+32]=t[e+0+96]=xe(n,i,o),t[e+2+32]=t[e+1+96]=xe(i,o,a),t[e+3+32]=t[e+2+96]=xe(o,a,s),t[e+3+64]=xe(a,s,u),t[e+3+96]=xe(s,u,c)}function je(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],o=t[e-1+96];t[e+0+0]=r+n+1>>1,t[e+2+0]=t[e+0+32]=n+i+1>>1,t[e+2+32]=t[e+0+64]=i+o+1>>1,t[e+1+0]=xe(r,n,i),t[e+3+0]=t[e+1+32]=xe(n,i,o),t[e+3+32]=t[e+1+64]=xe(i,o,o),t[e+3+64]=t[e+2+64]=t[e+0+96]=t[e+1+96]=t[e+2+96]=t[e+3+96]=o}function Oe(t,e){var r=t[e-1+0],n=t[e-1+32],i=t[e-1+64],o=t[e-1+96],a=t[e-1-32],s=t[e+0-32],u=t[e+1-32],c=t[e+2-32];t[e+0+0]=t[e+2+32]=r+a+1>>1,t[e+0+32]=t[e+2+64]=n+r+1>>1,t[e+0+64]=t[e+2+96]=i+n+1>>1,t[e+0+96]=o+i+1>>1,t[e+3+0]=xe(s,u,c),t[e+2+0]=xe(a,s,u),t[e+1+0]=t[e+3+32]=xe(r,a,s),t[e+1+32]=t[e+3+64]=xe(n,r,a),t[e+1+64]=t[e+3+96]=xe(i,n,r),t[e+1+96]=xe(o,i,n)}function Ie(t,e){var r;for(r=0;8>r;++r)n(t,e+32*r,t,e-32,8)}function Ce(t,e){var r;for(r=0;8>r;++r)i(t,e,t[e-1],8),e+=32}function Fe(t,e,r){var n;for(n=0;8>n;++n)i(e,r+32*n,t,8)}function Re(t,e){var r,n=8;for(r=0;8>r;++r)n+=t[e+r-32]+t[e-1+32*r];Fe(n>>4,t,e)}function Ee(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e+r-32];Fe(n>>3,t,e)}function Me(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e-1+32*r];Fe(n>>3,t,e)}function Be(t,e){Fe(128,t,e)}function qe(t,e,r){var n=t[e-r],i=t[e+0],o=3*(i-n)+Cn[1020+t[e-2*r]-t[e+r]],a=Fn[112+(o+4>>3)];t[e-r]=Rn[255+n+Fn[112+(o+3>>3)]],t[e+0]=Rn[255+i-a]}function Te(t,e,r,n){var i=t[e+0],o=t[e+r];return En[255+t[e-2*r]-t[e-r]]>n||En[255+o-i]>n}function De(t,e,r,n){return 4*En[255+t[e-r]-t[e+0]]+En[255+t[e-2*r]-t[e+r]]<=n}function ze(t,e,r,n,i){var o=t[e-3*r],a=t[e-2*r],s=t[e-r],u=t[e+0],c=t[e+r],l=t[e+2*r],f=t[e+3*r];return 4*En[255+s-u]+En[255+a-c]>n?0:En[255+t[e-4*r]-o]<=i&&En[255+o-a]<=i&&En[255+a-s]<=i&&En[255+f-l]<=i&&En[255+l-c]<=i&&En[255+c-u]<=i}function Ue(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)De(t,e+n,r,i)&&qe(t,e+n,r)}function He(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)De(t,e+n*r,1,i)&&qe(t,e+n*r,1)}function Ve(t,e,r,n){var i;for(i=3;0<i;--i)Ue(t,e+=4*r,r,n)}function We(t,e,r,n){var i;for(i=3;0<i;--i)He(t,e+=4,r,n)}function Ge(t,e,r,n,i,o,a,s){for(o=2*o+1;0<i--;){if(ze(t,e,r,o,a))if(Te(t,e,r,s))qe(t,e,r);else{var u=t,c=e,l=r,f=u[c-2*l],h=u[c-l],p=u[c+0],d=u[c+l],g=u[c+2*l],v=27*(b=Cn[1020+3*(p-h)+Cn[1020+f-d]])+63>>7,m=18*b+63>>7,b=9*b+63>>7;u[c-3*l]=Rn[255+u[c-3*l]+b],u[c-2*l]=Rn[255+f+m],u[c-l]=Rn[255+h+v],u[c+0]=Rn[255+p-v],u[c+l]=Rn[255+d-m],u[c+2*l]=Rn[255+g-b]}e+=n}}function Je(t,e,r,n,i,o,a,s){for(o=2*o+1;0<i--;){if(ze(t,e,r,o,a))if(Te(t,e,r,s))qe(t,e,r);else{var u=t,c=e,l=r,f=u[c-l],h=u[c+0],p=u[c+l],d=Fn[112+(4+(g=3*(h-f))>>3)],g=Fn[112+(g+3>>3)],v=d+1>>1;u[c-2*l]=Rn[255+u[c-2*l]+v],u[c-l]=Rn[255+f+g],u[c+0]=Rn[255+h-d],u[c+l]=Rn[255+p-v]}e+=n}}function Ye(t,e,r,n,i,o){Ge(t,e,r,1,16,n,i,o)}function Xe(t,e,r,n,i,o){Ge(t,e,1,r,16,n,i,o)}function $e(t,e,r,n,i,o){var a;for(a=3;0<a;--a)Je(t,e+=4*r,r,1,16,n,i,o)}function Ke(t,e,r,n,i,o){var a;for(a=3;0<a;--a)Je(t,e+=4,1,r,16,n,i,o)}function Ze(t,e,r,n,i,o,a,s){Ge(t,e,i,1,8,o,a,s),Ge(r,n,i,1,8,o,a,s)}function Qe(t,e,r,n,i,o,a,s){Ge(t,e,1,i,8,o,a,s),Ge(r,n,1,i,8,o,a,s)}function tr(t,e,r,n,i,o,a,s){Je(t,e+4*i,i,1,8,o,a,s),Je(r,n+4*i,i,1,8,o,a,s)}function er(t,e,r,n,i,o,a,s){Je(t,e+4,1,i,8,o,a,s),Je(r,n+4,1,i,8,o,a,s)}function rr(){this.ba=new at,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new ut,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function nr(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function ir(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function or(){this.ua=0,this.Wa=new E,this.vb=new E,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new p,this.yc=new f}function ar(){this.xb=this.a=0,this.l=new Gt,this.ca=new at,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new x,this.Pb=0,this.wd=new x,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new or,this.ab=0,this.gc=a(4,ir),this.Oc=0}function sr(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Gt,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ur(t,e,r,n,i,o,a){for(t=null==t?0:t[e+0],e=0;e<a;++e)i[o+e]=t+r[n+e]&255,t=i[o+e]}function cr(t,e,r,n,i,o,a){var s;if(null==t)ur(null,null,r,n,i,o,a);else for(s=0;s<a;++s)i[o+s]=t[e+s]+r[n+s]&255}function lr(t,e,r,n,i,o,a){if(null==t)ur(null,null,r,n,i,o,a);else{var s,u=t[e+0],c=u,l=u;for(s=0;s<a;++s)c=l+(u=t[e+s])-c,l=r[n+s]+(-256&c?0>c?0:255:c)&255,c=u,i[o+s]=l}}function fr(t,r,i,a){var s=r.width,u=r.o;if(e(null!=t&&null!=r),0>i||0>=a||i+a>u)return null;if(!t.Cc){if(null==t.ga){var c;if(t.ga=new sr,(c=null==t.ga)||(c=r.width*r.o,e(0==t.Gb.length),t.Gb=o(c),t.Uc=0,null==t.Gb?c=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,c=1),c=!c),!c){c=t.ga;var l=t.Fa,f=t.P,h=t.qc,p=t.mb,d=t.nb,g=f+1,v=h-1,b=c.l;if(e(null!=l&&null!=p&&null!=r),vi[0]=null,vi[1]=ur,vi[2]=cr,vi[3]=lr,c.ca=p,c.tb=d,c.c=r.width,c.i=r.height,e(0<c.c&&0<c.i),1>=h)r=0;else if(c.$a=l[f+0]>>0&3,c.Z=l[f+0]>>2&3,c.Lc=l[f+0]>>4&3,f=l[f+0]>>6&3,0>c.$a||1<c.$a||4<=c.Z||1<c.Lc||f)r=0;else if(b.put=pt,b.ac=ht,b.bc=dt,b.ma=c,b.width=r.width,b.height=r.height,b.Da=r.Da,b.v=r.v,b.va=r.va,b.j=r.j,b.o=r.o,c.$a)t:{e(1==c.$a),r=kt();e:for(;;){if(null==r){r=0;break t}if(e(null!=c),c.mc=r,r.c=c.c,r.i=c.i,r.l=c.l,r.l.ma=c,r.l.width=c.c,r.l.height=c.i,r.a=0,m(r.m,l,g,v),!jt(c.c,c.i,1,r,null))break e;if(1==r.ab&&3==r.gc[0].hc&&Nt(r.s)?(c.ic=1,l=r.c*r.i,r.Ta=null,r.Ua=0,r.V=o(l),r.Ba=0,null==r.V?(r.a=1,r=0):r=1):(c.ic=0,r=Ot(r,c.c)),!r)break e;r=1;break t}c.mc=null,r=0}else r=v>=c.c*c.i;c=!r}if(c)return null;1!=t.ga.Lc?t.Ga=0:a=u-i}e(null!=t.ga),e(i+a<=u);t:{if(r=(l=t.ga).c,u=l.l.o,0==l.$a){if(g=t.rc,v=t.Vc,b=t.Fa,f=t.P+1+i*r,h=t.mb,p=t.nb+i*r,e(f<=t.P+t.qc),0!=l.Z)for(e(null!=vi[l.Z]),c=0;c<a;++c)vi[l.Z](g,v,b,f,h,p,r),g=h,v=p,p+=r,f+=r;else for(c=0;c<a;++c)n(h,p,b,f,r),g=h,v=p,p+=r,f+=r;t.rc=g,t.Vc=v}else{if(e(null!=l.mc),r=i+a,e(null!=(c=l.mc)),e(r<=c.i),c.C>=r)r=1;else if(l.ic||vr(),l.ic){l=c.V,g=c.Ba,v=c.c;var y=c.i,w=(b=1,f=c.$/v,h=c.$%v,p=c.m,d=c.s,c.$),x=v*y,A=v*r,L=d.wc,_=w<A?wt(d,h,f):null;e(w<=x),e(r<=y),e(Nt(d));e:for(;;){for(;!p.h&&w<A;){if(h&L||(_=wt(d,h,f)),e(null!=_),S(p),256>(y=bt(_.G[0],_.H[0],p)))l[g+w]=y,++w,++h>=v&&(h=0,++f<=r&&!(f%16)&&St(c,f));else{if(!(280>y)){b=0;break e}y=vt(y-256,p);var P,k=bt(_.G[4],_.H[4],p);if(S(p),!(w>=(k=mt(v,k=vt(k,p)))&&x-w>=y)){b=0;break e}for(P=0;P<y;++P)l[g+w+P]=l[g+w+P-k];for(w+=y,h+=y;h>=v;)h-=v,++f<=r&&!(f%16)&&St(c,f);w<A&&h&L&&(_=wt(d,h,f))}e(p.h==N(p))}St(c,f>r?r:f);break e}!b||p.h&&w<x?(b=0,c.a=p.h?5:3):c.$=w,r=b}else r=_t(c,c.V,c.Ba,c.c,c.i,r,It);if(!r){a=0;break t}}i+a>=u&&(t.Cc=1),a=1}if(!a)return null;if(t.Cc&&(null!=(a=t.ga)&&(a.mc=null),t.ga=null,0<t.Ga))return alert("todo:WebPDequantizeLevels"),null}return t.nb+i*s}function hr(t,e,r,n,i,o){for(;0<i--;){var a,s=t,u=e+(r?1:0),c=t,l=e+(r?0:3);for(a=0;a<n;++a){var f=c[l+4*a];255!=f&&(f*=32897,s[u+4*a+0]=s[u+4*a+0]*f>>23,s[u+4*a+1]=s[u+4*a+1]*f>>23,s[u+4*a+2]=s[u+4*a+2]*f>>23)}e+=o}}function pr(t,e,r,n,i){for(;0<n--;){var o;for(o=0;o<r;++o){var a=t[e+2*o+0],s=15&(c=t[e+2*o+1]),u=4369*s,c=(240&c|c>>4)*u>>16;t[e+2*o+0]=(240&a|a>>4)*u>>16&240|(15&a|a<<4)*u>>16>>4&15,t[e+2*o+1]=240&c|s}e+=i}}function dr(t,e,r,n,i,o,a,s){var u,c,l=255;for(c=0;c<i;++c){for(u=0;u<n;++u){var f=t[e+u];o[a+4*u]=f,l&=f}e+=r,a+=s}return 255!=l}function gr(t,e,r,n,i){var o;for(o=0;o<i;++o)r[n+o]=t[e+o]>>8}function vr(){Nn=hr,Ln=pr,Sn=dr,_n=gr}function mr(r,n,i){t[r]=function(t,r,o,a,s,u,c,l,f,h,p,d,g,v,m,b,y){var w,x=y-1>>1,A=s[u+0]|c[l+0]<<16,N=f[h+0]|p[d+0]<<16;e(null!=t);var L=3*A+N+131074>>2;for(n(t[r+0],255&L,L>>16,g,v),null!=o&&(L=3*N+A+131074>>2,n(o[a+0],255&L,L>>16,m,b)),w=1;w<=x;++w){var S=s[u+w]|c[l+w]<<16,_=f[h+w]|p[d+w]<<16,P=A+S+N+_+524296,k=P+2*(S+N)>>3;L=k+A>>1,A=(P=P+2*(A+_)>>3)+S>>1,n(t[r+2*w-1],255&L,L>>16,g,v+(2*w-1)*i),n(t[r+2*w-0],255&A,A>>16,g,v+(2*w-0)*i),null!=o&&(L=P+N>>1,A=k+_>>1,n(o[a+2*w-1],255&L,L>>16,m,b+(2*w-1)*i),n(o[a+2*w+0],255&A,A>>16,m,b+(2*w+0)*i)),A=S,N=_}1&y||(L=3*A+N+131074>>2,n(t[r+y-1],255&L,L>>16,g,v+(y-1)*i),null!=o&&(L=3*N+A+131074>>2,n(o[a+y-1],255&L,L>>16,m,b+(y-1)*i)))}}function br(){mi[Mn]=bi,mi[Bn]=wi,mi[qn]=yi,mi[Tn]=xi,mi[Dn]=Ai,mi[zn]=Ni,mi[Un]=Li,mi[Hn]=wi,mi[Vn]=xi,mi[Wn]=Ai,mi[Gn]=Ni}function yr(t){return t&~Oi?0>t?0:255:t>>ji}function wr(t,e){return yr((19077*t>>8)+(26149*e>>8)-14234)}function xr(t,e,r){return yr((19077*t>>8)-(6419*e>>8)-(13320*r>>8)+8708)}function Ar(t,e){return yr((19077*t>>8)+(33050*e>>8)-17685)}function Nr(t,e,r,n,i){n[i+0]=wr(t,r),n[i+1]=xr(t,e,r),n[i+2]=Ar(t,e)}function Lr(t,e,r,n,i){n[i+0]=Ar(t,e),n[i+1]=xr(t,e,r),n[i+2]=wr(t,r)}function Sr(t,e,r,n,i){var o=xr(t,e,r);e=o<<3&224|Ar(t,e)>>3,n[i+0]=248&wr(t,r)|o>>5,n[i+1]=e}function _r(t,e,r,n,i){var o=240&Ar(t,e)|15;n[i+0]=240&wr(t,r)|xr(t,e,r)>>4,n[i+1]=o}function Pr(t,e,r,n,i){n[i+0]=255,Nr(t,e,r,n,i+1)}function kr(t,e,r,n,i){Lr(t,e,r,n,i),n[i+3]=255}function jr(t,e,r,n,i){Nr(t,e,r,n,i),n[i+3]=255}function Wt(t,e){return 0>t?0:t>e?e:t}function Or(e,r,n){t[e]=function(t,e,i,o,a,s,u,c,l){for(var f=c+(-2&l)*n;c!=f;)r(t[e+0],i[o+0],a[s+0],u,c),r(t[e+1],i[o+0],a[s+0],u,c+n),e+=2,++o,++s,c+=2*n;1&l&&r(t[e+0],i[o+0],a[s+0],u,c)}}function Ir(t,e,r){return 0==r?0==t?0==e?6:5:0==e?4:0:r}function Cr(t,e,r,n,i){switch(t>>>30){case 3:an(e,r,n,i,0);break;case 2:sn(e,r,n,i);break;case 1:cn(e,r,n,i)}}function Fr(t,e){var r,o,a=e.M,s=e.Nb,u=t.oc,c=t.pc+40,l=t.oc,f=t.pc+584,h=t.oc,p=t.pc+600;for(r=0;16>r;++r)u[c+32*r-1]=129;for(r=0;8>r;++r)l[f+32*r-1]=129,h[p+32*r-1]=129;for(0<a?u[c-1-32]=l[f-1-32]=h[p-1-32]=129:(i(u,c-32-1,127,21),i(l,f-32-1,127,9),i(h,p-32-1,127,9)),o=0;o<t.za;++o){var d=e.ya[e.aa+o];if(0<o){for(r=-1;16>r;++r)n(u,c+32*r-4,u,c+32*r+12,4);for(r=-1;8>r;++r)n(l,f+32*r-4,l,f+32*r+4,4),n(h,p+32*r-4,h,p+32*r+4,4)}var g=t.Gd,v=t.Hd+o,m=d.ad,b=d.Hc;if(0<a&&(n(u,c-32,g[v].y,0,16),n(l,f-32,g[v].f,0,8),n(h,p-32,g[v].ea,0,8)),d.Za){var y=u,w=c-32+16;for(0<a&&(o>=t.za-1?i(y,w,g[v].y[15],4):n(y,w,g[v+1].y,0,4)),r=0;4>r;r++)y[w+128+r]=y[w+256+r]=y[w+384+r]=y[w+0+r];for(r=0;16>r;++r,b<<=2)y=u,w=c+qi[r],hi[d.Ob[r]](y,w),Cr(b,m,16*+r,y,w)}else if(y=Ir(o,a,d.Ob[0]),fi[y](u,c),0!=b)for(r=0;16>r;++r,b<<=2)Cr(b,m,16*+r,u,c+qi[r]);for(r=d.Gc,y=Ir(o,a,d.Dd),pi[y](l,f),pi[y](h,p),b=m,y=l,w=f,255&(d=r>>0)&&(170&d?un(b,256,y,w):ln(b,256,y,w)),d=h,b=p,255&(r>>=8)&&(170&r?un(m,320,d,b):ln(m,320,d,b)),a<t.Ub-1&&(n(g[v].y,0,u,c+480,16),n(g[v].f,0,l,f+224,8),n(g[v].ea,0,h,p+224,8)),r=8*s*t.B,g=t.sa,v=t.ta+16*o+16*s*t.R,m=t.qa,d=t.ra+8*o+r,b=t.Ha,y=t.Ia+8*o+r,r=0;16>r;++r)n(g,v+r*t.R,u,c+32*r,16);for(r=0;8>r;++r)n(m,d+r*t.B,l,f+32*r,8),n(b,y+r*t.B,h,p+32*r,8)}}function Rr(t,n,i,o,a,s,u,c,l){var f=[0],h=[0],p=0,d=null!=l?l.kd:0,g=null!=l?l:new nr;if(null==t||12>i)return 7;g.data=t,g.w=n,g.ha=i,n=[n],i=[i],g.gb=[g.gb];t:{var v=n,b=i,y=g.gb;if(e(null!=t),e(null!=b),e(null!=y),y[0]=0,12<=b[0]&&!r(t,v[0],"RIFF")){if(r(t,v[0]+8,"WEBP")){y=3;break t}var w=C(t,v[0]+4);if(12>w||4294967286<w){y=3;break t}if(d&&w>b[0]-8){y=7;break t}y[0]=w,v[0]+=12,b[0]-=12}y=0}if(0!=y)return y;for(w=0<g.gb[0],i=i[0];;){t:{var A=t;b=n,y=i;var N=f,L=h,S=v=[0];if((k=p=[p])[0]=0,8>y[0])y=7;else{if(!r(A,b[0],"VP8X")){if(10!=C(A,b[0]+4)){y=3;break t}if(18>y[0]){y=7;break t}var _=C(A,b[0]+8),P=1+I(A,b[0]+12);if(2147483648<=P*(A=1+I(A,b[0]+15))){y=3;break t}null!=S&&(S[0]=_),null!=N&&(N[0]=P),null!=L&&(L[0]=A),b[0]+=18,y[0]-=18,k[0]=1}y=0}}if(p=p[0],v=v[0],0!=y)return y;if(b=!!(2&v),!w&&p)return 3;if(null!=s&&(s[0]=!!(16&v)),null!=u&&(u[0]=b),null!=c&&(c[0]=0),u=f[0],v=h[0],p&&b&&null==l){y=0;break}if(4>i){y=7;break}if(w&&p||!w&&!p&&!r(t,n[0],"ALPH")){i=[i],g.na=[g.na],g.P=[g.P],g.Sa=[g.Sa];t:{_=t,y=n,w=i;var k=g.gb;N=g.na,L=g.P,S=g.Sa,P=22,e(null!=_),e(null!=w),A=y[0];var j=w[0];for(e(null!=N),e(null!=S),N[0]=null,L[0]=null,S[0]=0;;){if(y[0]=A,w[0]=j,8>j){y=7;break t}var O=C(_,A+4);if(4294967286<O){y=3;break t}var F=8+O+1&-2;if(P+=F,0<k&&P>k){y=3;break t}if(!r(_,A,"VP8 ")||!r(_,A,"VP8L")){y=0;break t}if(j[0]<F){y=7;break t}r(_,A,"ALPH")||(N[0]=_,L[0]=A+8,S[0]=O),A+=F,j-=F}}if(i=i[0],g.na=g.na[0],g.P=g.P[0],g.Sa=g.Sa[0],0!=y)break}i=[i],g.Ja=[g.Ja],g.xa=[g.xa];t:if(k=t,y=n,w=i,N=g.gb[0],L=g.Ja,S=g.xa,_=y[0],A=!r(k,_,"VP8 "),P=!r(k,_,"VP8L"),e(null!=k),e(null!=w),e(null!=L),e(null!=S),8>w[0])y=7;else{if(A||P){if(k=C(k,_+4),12<=N&&k>N-12){y=3;break t}if(d&&k>w[0]-8){y=7;break t}L[0]=k,y[0]+=8,w[0]-=8,S[0]=P}else S[0]=5<=w[0]&&47==k[_+0]&&!(k[_+4]>>5),L[0]=w[0];y=0}if(i=i[0],g.Ja=g.Ja[0],g.xa=g.xa[0],n=n[0],0!=y)break;if(4294967286<g.Ja)return 3;if(null==c||b||(c[0]=g.xa?2:1),u=[u],v=[v],g.xa){if(5>i){y=7;break}c=u,d=v,b=s,null==t||5>i?t=0:5<=i&&47==t[n+0]&&!(t[n+4]>>5)?(w=[0],k=[0],N=[0],m(L=new x,t,n,i),gt(L,w,k,N)?(null!=c&&(c[0]=w[0]),null!=d&&(d[0]=k[0]),null!=b&&(b[0]=N[0]),t=1):t=0):t=0}else{if(10>i){y=7;break}c=v,null==t||10>i||!Xt(t,n+3,i-3)?t=0:(d=t[n+0]|t[n+1]<<8|t[n+2]<<16,b=16383&(t[n+7]<<8|t[n+6]),t=16383&(t[n+9]<<8|t[n+8]),1&d||3<(d>>1&7)||!(d>>4&1)||d>>5>=g.Ja||!b||!t?t=0:(u&&(u[0]=b),c&&(c[0]=t),t=1))}if(!t)return 3;if(u=u[0],v=v[0],p&&(f[0]!=u||h[0]!=v))return 3;null!=l&&(l[0]=g,l.offset=n-l.w,e(4294967286>n-l.w),e(l.offset==l.ha-i));break}return 0==y||7==y&&p&&null==l?(null!=s&&(s[0]|=null!=g.na&&0<g.na.length),null!=o&&(o[0]=u),null!=a&&(a[0]=v),0):y}function Er(t,e,r){var n=e.width,i=e.height,o=0,a=0,s=n,u=i;if(e.Da=null!=t&&0<t.Da,e.Da&&(s=t.cd,u=t.bd,o=t.v,a=t.j,11>r||(o&=-2,a&=-2),0>o||0>a||0>=s||0>=u||o+s>n||a+u>i))return 0;if(e.v=o,e.j=a,e.va=o+s,e.o=a+u,e.U=s,e.T=u,e.da=null!=t&&0<t.da,e.da){if(!M(s,u,r=[t.ib],o=[t.hb]))return 0;e.ib=r[0],e.hb=o[0]}return e.ob=null!=t&&t.ob,e.Kb=null==t||!t.Sd,e.da&&(e.ob=e.ib<3*n/4&&e.hb<3*i/4,e.Kb=0),1}function Mr(t){if(null==t)return 2;if(11>t.S){var e=t.f.RGBA;e.fb+=(t.height-1)*e.A,e.A=-e.A}else e=t.f.kb,t=t.height,e.O+=(t-1)*e.fa,e.fa=-e.fa,e.N+=(t-1>>1)*e.Ab,e.Ab=-e.Ab,e.W+=(t-1>>1)*e.Db,e.Db=-e.Db,null!=e.F&&(e.J+=(t-1)*e.lb,e.lb=-e.lb);return 0}function Br(t,e,r,n){if(null==n||0>=t||0>=e)return 2;if(null!=r){if(r.Da){var i=r.cd,a=r.bd,s=-2&r.v,u=-2&r.j;if(0>s||0>u||0>=i||0>=a||s+i>t||u+a>e)return 2;t=i,e=a}if(r.da){if(!M(t,e,i=[r.ib],a=[r.hb]))return 2;t=i[0],e=a[0]}}n.width=t,n.height=e;t:{var c=n.width,l=n.height;if(t=n.S,0>=c||0>=l||!(t>=Mn&&13>t))t=2;else{if(0>=n.Rd&&null==n.sd){s=a=i=e=0;var f=(u=c*Ui[t])*l;if(11>t||(a=(l+1)/2*(e=(c+1)/2),12==t&&(s=(i=c)*l)),null==(l=o(f+2*a+s))){t=1;break t}n.sd=l,11>t?((c=n.f.RGBA).eb=l,c.fb=0,c.A=u,c.size=f):((c=n.f.kb).y=l,c.O=0,c.fa=u,c.Fd=f,c.f=l,c.N=0+f,c.Ab=e,c.Cd=a,c.ea=l,c.W=0+f+a,c.Db=e,c.Ed=a,12==t&&(c.F=l,c.J=0+f+2*a),c.Tc=s,c.lb=i)}if(e=1,i=n.S,a=n.width,s=n.height,i>=Mn&&13>i)if(11>i)t=n.f.RGBA,e&=(u=Math.abs(t.A))*(s-1)+a<=t.size,e&=u>=a*Ui[i],e&=null!=t.eb;else{t=n.f.kb,u=(a+1)/2,f=(s+1)/2,c=Math.abs(t.fa),l=Math.abs(t.Ab);var h=Math.abs(t.Db),p=Math.abs(t.lb),d=p*(s-1)+a;e&=c*(s-1)+a<=t.Fd,e&=l*(f-1)+u<=t.Cd,e=(e&=h*(f-1)+u<=t.Ed)&c>=a&l>=u&h>=u,e&=null!=t.y,e&=null!=t.f,e&=null!=t.ea,12==i&&(e&=p>=a,e&=d<=t.Tc,e&=null!=t.F)}else e=0;t=e?0:2}}return 0!=t||null!=r&&r.fd&&(t=Mr(n)),t}var qr=64,Tr=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Dr=24,zr=32,Ur=8,Hr=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];T("Predictor0","PredictorAdd0"),t.Predictor0=function(){return 4278190080},t.Predictor1=function(t){return t},t.Predictor2=function(t,e,r){return e[r+0]},t.Predictor3=function(t,e,r){return e[r+1]},t.Predictor4=function(t,e,r){return e[r-1]},t.Predictor5=function(t,e,r){return z(z(t,e[r+1]),e[r+0])},t.Predictor6=function(t,e,r){return z(t,e[r-1])},t.Predictor7=function(t,e,r){return z(t,e[r+0])},t.Predictor8=function(t,e,r){return z(e[r-1],e[r+0])},t.Predictor9=function(t,e,r){return z(e[r+0],e[r+1])},t.Predictor10=function(t,e,r){return z(z(t,e[r-1]),z(e[r+0],e[r+1]))},t.Predictor11=function(t,e,r){var n=e[r+0];return 0>=V(n>>24&255,t>>24&255,(e=e[r-1])>>24&255)+V(n>>16&255,t>>16&255,e>>16&255)+V(n>>8&255,t>>8&255,e>>8&255)+V(255&n,255&t,255&e)?n:t},t.Predictor12=function(t,e,r){var n=e[r+0];return(U((t>>24&255)+(n>>24&255)-((e=e[r-1])>>24&255))<<24|U((t>>16&255)+(n>>16&255)-(e>>16&255))<<16|U((t>>8&255)+(n>>8&255)-(e>>8&255))<<8|U((255&t)+(255&n)-(255&e)))>>>0},t.Predictor13=function(t,e,r){var n=e[r-1];return(H((t=z(t,e[r+0]))>>24&255,n>>24&255)<<24|H(t>>16&255,n>>16&255)<<16|H(t>>8&255,n>>8&255)<<8|H(t>>0&255,n>>0&255))>>>0};var Vr=t.PredictorAdd0;t.PredictorAdd1=W,T("Predictor2","PredictorAdd2"),T("Predictor3","PredictorAdd3"),T("Predictor4","PredictorAdd4"),T("Predictor5","PredictorAdd5"),T("Predictor6","PredictorAdd6"),T("Predictor7","PredictorAdd7"),T("Predictor8","PredictorAdd8"),T("Predictor9","PredictorAdd9"),T("Predictor10","PredictorAdd10"),T("Predictor11","PredictorAdd11"),T("Predictor12","PredictorAdd12"),T("Predictor13","PredictorAdd13");var Wr=t.PredictorAdd2;X("ColorIndexInverseTransform","MapARGB","32b",(function(t){return t>>8&255}),(function(t){return t})),X("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(t){return t}),(function(t){return t>>8&255}));var Gr,Jr=t.ColorIndexInverseTransform,Yr=t.MapARGB,Xr=t.VP8LColorIndexInverseTransformAlpha,$r=t.MapAlpha,Kr=t.VP8LPredictorsAdd=[];Kr.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var Zr,Qr,tn,en,rn,nn,on,an,sn,un,cn,ln,fn,hn,pn,dn,gn,vn,mn,bn,yn,wn,xn,An,Nn,Ln,Sn,_n,Pn=o(511),kn=o(2041),jn=o(225),On=o(767),In=0,Cn=kn,Fn=jn,Rn=On,En=Pn,Mn=0,Bn=1,qn=2,Tn=3,Dn=4,zn=5,Un=6,Hn=7,Vn=8,Wn=9,Gn=10,Jn=[2,3,7],Yn=[3,3,11],Xn=[280,256,256,256,40],$n=[0,1,1,1,0],Kn=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Zn=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Qn=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],ti=8,ei=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],ri=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ni=null,ii=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],oi=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],ai=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],si=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],ui=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],ci=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],li=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],fi=[],hi=[],pi=[],di=1,gi=2,vi=[],mi=[];mr("UpsampleRgbLinePair",Nr,3),mr("UpsampleBgrLinePair",Lr,3),mr("UpsampleRgbaLinePair",jr,4),mr("UpsampleBgraLinePair",kr,4),mr("UpsampleArgbLinePair",Pr,4),mr("UpsampleRgba4444LinePair",_r,2),mr("UpsampleRgb565LinePair",Sr,2);var bi=t.UpsampleRgbLinePair,yi=t.UpsampleBgrLinePair,wi=t.UpsampleRgbaLinePair,xi=t.UpsampleBgraLinePair,Ai=t.UpsampleArgbLinePair,Ni=t.UpsampleRgba4444LinePair,Li=t.UpsampleRgb565LinePair,Si=16,_i=1<<Si-1,Pi=-227,ki=482,ji=6,Oi=(256<<ji)-1,Ii=0,Ci=o(256),Fi=o(256),Ri=o(256),Ei=o(256),Mi=o(ki-Pi),Bi=o(ki-Pi);Or("YuvToRgbRow",Nr,3),Or("YuvToBgrRow",Lr,3),Or("YuvToRgbaRow",jr,4),Or("YuvToBgraRow",kr,4),Or("YuvToArgbRow",Pr,4),Or("YuvToRgba4444Row",_r,2),Or("YuvToRgb565Row",Sr,2);var qi=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ti=[0,2,8],Di=[8,7,6,4,4,2,2,2,1,1,1,1],zi=1;this.WebPDecodeRGBA=function(t,r,n,i,o){var a=Bn,s=new rr,u=new at;s.ba=u,u.S=a,u.width=[u.width],u.height=[u.height];var c=u.width,l=u.height,f=new st;if(null==f||null==t)var h=2;else e(null!=f),h=Rr(t,r,n,f.width,f.height,f.Pd,f.Qd,f.format,null);if(0!=h?c=0:(null!=c&&(c[0]=f.width[0]),null!=l&&(l[0]=f.height[0]),c=1),c){u.width=u.width[0],u.height=u.height[0],null!=i&&(i[0]=u.width),null!=o&&(o[0]=u.height);t:{if(i=new Gt,(o=new nr).data=t,o.w=r,o.ha=n,o.kd=1,r=[0],e(null!=o),(0==(t=Rr(o.data,o.w,o.ha,null,null,null,r,null,o))||7==t)&&r[0]&&(t=4),0==(r=t)){if(e(null!=s),i.data=o.data,i.w=o.w+o.offset,i.ha=o.ha-o.offset,i.put=pt,i.ac=ht,i.bc=dt,i.ma=s,o.xa){if(null==(t=kt())){s=1;break t}if(function(t,r){var n=[0],i=[0],o=[0];e:for(;;){if(null==t)return 0;if(null==r)return t.a=2,0;if(t.l=r,t.a=0,m(t.m,r.data,r.w,r.ha),!gt(t.m,n,i,o)){t.a=3;break e}if(t.xb=gi,r.width=n[0],r.height=i[0],!jt(n[0],i[0],1,t,null))break e;return 1}return e(0!=t.a),0}(t,i)){if(i=0==(r=Br(i.width,i.height,s.Oa,s.ba))){e:{i=t;r:for(;;){if(null==i){i=0;break e}if(e(null!=i.s.yc),e(null!=i.s.Ya),e(0<i.s.Wb),e(null!=(n=i.l)),e(null!=(o=n.ma)),0!=i.xb){if(i.ca=o.ba,i.tb=o.tb,e(null!=i.ca),!Er(o.Oa,n,Tn)){i.a=2;break r}if(!Ot(i,n.width))break r;if(n.da)break r;if((n.da||nt(i.ca.S))&&vr(),11>i.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=i.ca.f.kb.F&&vr()),i.Pb&&0<i.s.ua&&null==i.s.vb.X&&!F(i.s.vb,i.s.Wa.Xa)){i.a=1;break r}i.xb=0}if(!_t(i,i.V,i.Ba,i.c,i.i,n.o,At))break r;o.Dc=i.Ma,i=1;break e}e(0!=i.a),i=0}i=!i}i&&(r=t.a)}else r=t.a}else{if(null==(t=new Jt)){s=1;break t}if(t.Fa=o.na,t.P=o.P,t.qc=o.Sa,$t(t,i)){if(0==(r=Br(i.width,i.height,s.Oa,s.ba))){if(t.Aa=0,n=s.Oa,e(null!=(o=t)),null!=n){if(0<(c=0>(c=n.Md)?0:100<c?255:255*c/100)){for(l=f=0;4>l;++l)12>(h=o.pb[l]).lc&&(h.ia=c*Di[0>h.lc?0:h.lc]>>3),f|=h.ia;f&&(alert("todo:VP8InitRandom"),o.ia=1)}o.Ga=n.Id,100<o.Ga?o.Ga=100:0>o.Ga&&(o.Ga=0)}Qt(t,i)||(r=t.a)}}else r=t.a}0==r&&null!=s.Oa&&s.Oa.fd&&(r=Mr(s.ba))}s=r}a=0!=s?null:11>a?u.f.RGBA.eb:u.f.kb.y}else a=null;return a};var Ui=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function c(t,e){for(var r="",n=0;n<4;n++)r+=String.fromCharCode(t[e++]);return r}function l(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16)>>>0}function f(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}new u;var h=[0],p=[0],d=[],g=new u,v=t,m=function(t,e){var r={},n=0,i=!1,o=0,a=0;if(r.frames=[],!
|
|
191
|
+
/** @license
|
|
192
|
+
* Copyright (c) 2017 Dominik Homberger
|
|
193
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
194
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
195
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
196
|
+
https://webpjs.appspot.com
|
|
197
|
+
WebPRiffParser dominikhlbg@gmail.com
|
|
198
|
+
*/
|
|
199
|
+
function(t,e,r,n){for(var i=0;i<4;i++)if(t[e+i]!="RIFF".charCodeAt(i))return!0;return!1}(t,e)){var s,u;for(f(t,e+=4),e+=8;e<t.length;){var h=c(t,e),p=f(t,e+=4);e+=4;var d=p+(1&p);switch(h){case"VP8 ":case"VP8L":void 0===r.frames[n]&&(r.frames[n]={}),(m=r.frames[n]).src_off=i?a:e-8,m.src_size=o+p+8,n++,i&&(i=!1,o=0,a=0);break;case"VP8X":(m=r.header={}).feature_flags=t[e];var g=e+4;m.canvas_width=1+l(t,g),g+=3,m.canvas_height=1+l(t,g),g+=3;break;case"ALPH":i=!0,o=d+8,a=e-8;break;case"ANIM":(m=r.header).bgcolor=f(t,e),g=e+4,m.loop_count=(s=t)[(u=g)+0]<<0|s[u+1]<<8,g+=2;break;case"ANMF":var v,m;(m=r.frames[n]={}).offset_x=2*l(t,e),e+=3,m.offset_y=2*l(t,e),e+=3,m.width=1+l(t,e),e+=3,m.height=1+l(t,e),e+=3,m.duration=l(t,e),e+=3,v=t[e++],m.dispose=1&v,m.blend=v>>1&1}"ANMF"!=h&&(e+=d)}return r}}(v,0);m.response=v,m.rgbaoutput=!0,m.dataurl=!1;var b=m.header?m.header:null,y=m.frames?m.frames:null;if(b){b.loop_counter=b.loop_count,h=[b.canvas_height],p=[b.canvas_width];for(var w=0;w<y.length&&0!=y[w].blend;w++);}var x=y[0],A=g.WebPDecodeRGBA(v,x.src_off,x.src_size,p,h);x.rgba=A,x.imgwidth=p[0],x.imgheight=h[0];for(var N=0;N<p[0]*h[0]*4;N++)d[N]=A[N];return this.width=p,this.height=h,this.data=d,this}!function(t){var e=function(e,n,c,l){var f=4,h=a;switch(l){case t.image_compression.FAST:f=1,h=i;break;case t.image_compression.MEDIUM:f=6,h=s;break;case t.image_compression.SLOW:f=9,h=u}e=r(e,n,c,h);var p=Object(o.b)(e,{level:f});return t.__addimage__.arrayBufferToBinaryString(p)},r=function(t,e,r,n){for(var i,o,a,s=t.length/e,u=new Uint8Array(t.length+s),c=l(),h=0;h<s;h+=1){if(a=h*e,i=t.subarray(a,a+e),n)u.set(n(i,r,o),a+h);else{for(var p,d=c.length,g=[];p<d;p+=1)g[p]=c[p](i,r,o);var v=f(g.concat());u.set(g[v],a+h)}o=i}return u},n=function(t){var e=Array.apply([],t);return e.unshift(0),e},i=function(t,e){var r,n=[],i=t.length;n[0]=1;for(var o=0;o<i;o+=1)r=t[o-e]||0,n[o+1]=t[o]-r+256&255;return n},a=function(t,e,r){var n,i=[],o=t.length;i[0]=2;for(var a=0;a<o;a+=1)n=r&&r[a]||0,i[a+1]=t[a]-n+256&255;return i},s=function(t,e,r){var n,i,o=[],a=t.length;o[0]=3;for(var s=0;s<a;s+=1)n=t[s-e]||0,i=r&&r[s]||0,o[s+1]=t[s]+256-(n+i>>>1)&255;return o},u=function(t,e,r){var n,i,o,a,s=[],u=t.length;s[0]=4;for(var l=0;l<u;l+=1)n=t[l-e]||0,i=r&&r[l]||0,o=r&&r[l-e]||0,a=c(n,i,o),s[l+1]=t[l]-a+256&255;return s},c=function(t,e,r){if(t===e&&e===r)return t;var n=Math.abs(e-r),i=Math.abs(t-r),o=Math.abs(t+e-r-r);return n<=i&&n<=o?t:i<=o?e:r},l=function(){return[n,i,a,s,u]},f=function(t){var e=t.map((function(t){return t.reduce((function(t,e){return t+Math.abs(e)}),0)}));return e.indexOf(Math.min.apply(null,e))};t.processPNG=function(r,n,i,a){var s,u,c,l,f,h,p,d,g,v,m,b,y,w,x,A=this.decode.FLATE_DECODE,N="";if(this.__addimage__.isArrayBuffer(r)&&(r=new Uint8Array(r)),this.__addimage__.isArrayBufferView(r)){if(r=(c=new Zt(r)).imgData,u=c.bits,s=c.colorSpace,f=c.colors,-1!==[4,6].indexOf(c.colorType)){if(8===c.bits){g=(d=32==c.pixelBitlength?new Uint32Array(c.decodePixels().buffer):16==c.pixelBitlength?new Uint16Array(c.decodePixels().buffer):new Uint8Array(c.decodePixels().buffer)).length,m=new Uint8Array(g*c.colors),v=new Uint8Array(g);var L,S=c.pixelBitlength-c.bits;for(w=0,x=0;w<g;w++){for(y=d[w],L=0;L<S;)m[x++]=y>>>L&255,L+=c.bits;v[w]=y>>>L&255}}if(16===c.bits){g=(d=new Uint32Array(c.decodePixels().buffer)).length,m=new Uint8Array(g*(32/c.pixelBitlength)*c.colors),v=new Uint8Array(g*(32/c.pixelBitlength)),b=c.colors>1,w=0,x=0;for(var _=0;w<g;)y=d[w++],m[x++]=y>>>0&255,b&&(m[x++]=y>>>16&255,y=d[w++],m[x++]=y>>>0&255),v[_++]=y>>>16&255;u=8}a!==t.image_compression.NONE&&"function"==typeof o.b?(r=e(m,c.width*c.colors,c.colors,a),p=e(v,c.width,1,a)):(r=m,p=v,A=void 0)}if(3===c.colorType&&(s=this.color_spaces.INDEXED,h=c.palette,c.transparency.indexed)){var P=c.transparency.indexed,k=0;for(w=0,g=P.length;w<g;++w)k+=P[w];if((k/=255)==g-1&&-1!==P.indexOf(0))l=[P.indexOf(0)];else if(k!==g){for(d=c.decodePixels(),v=new Uint8Array(d.length),w=0,g=d.length;w<g;w++)v[w]=P[d[w]];p=e(v,c.width,1)}}var j=function(e){var r;switch(e){case t.image_compression.FAST:r=11;break;case t.image_compression.MEDIUM:r=13;break;case t.image_compression.SLOW:r=14;break;default:r=12}return r}(a);return A===this.decode.FLATE_DECODE&&(N="/Predictor "+j+" "),N+="/Colors "+f+" /BitsPerComponent "+u+" /Columns "+c.width,(this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r))&&(r=this.__addimage__.arrayBufferToBinaryString(r)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:i,data:r,index:n,filter:A,decodeParameters:N,transparency:l,palette:h,sMask:p,predictor:j,width:c.width,height:c.height,bitsPerComponent:u,colorSpace:s}}}}(T.API),function(t){t.processGIF89A=function(e,r,n,i){var o=new Qt(e),a=o.width,s=o.height,u=[];o.decodeAndBlitFrameRGBA(0,u);var c={data:u,width:a,height:s},l=new ee(100).encode(c,100);return t.processJPEG.call(this,l,r,n,i)},t.processGIF87A=t.processGIF89A}(T.API),re.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var r=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:i,green:n,blue:r,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},re.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[t]()}catch(t){u.log("bit decode error:"+t)}},re.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),r=e%4;for(t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i<e;i++)for(var o=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var u=this.palette[o>>7-s&1];this.data[a+4*s]=u.blue,this.data[a+4*s+1]=u.green,this.data[a+4*s+2]=u.red,this.data[a+4*s+3]=255}0!==r&&(this.pos+=4-r)}},re.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<t;i++){var o=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+2*i*4,s=o>>4,u=15&o,c=this.palette[s];if(this.data[a]=c.blue,this.data[a+1]=c.green,this.data[a+2]=c.red,this.data[a+3]=255,2*i+1>=this.width)break;c=this.palette[u],this.data[a+4]=c.blue,this.data[a+4+1]=c.green,this.data[a+4+2]=c.red,this.data[a+4+3]=255}0!==e&&(this.pos+=4-e)}},re.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+4*n;if(i<this.palette.length){var a=this.palette[i];this.data[o]=a.red,this.data[o+1]=a.green,this.data[o+2]=a.blue,this.data[o+3]=255}else this.data[o]=255,this.data[o+1]=255,this.data[o+2]=255,this.data[o+3]=255}0!==t&&(this.pos+=4-t)}},re.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(o&e)/e*255|0,s=(o>>5&e)/e*255|0,u=(o>>10&e)/e*255|0,c=o>>15?255:0,l=n*this.width*4+4*i;this.data[l]=u,this.data[l+1]=s,this.data[l+2]=a,this.data[l+3]=c}this.pos+=t}},re.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),r=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,o=0;o<this.width;o++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(a&e)/e*255|0,u=(a>>5&r)/r*255|0,c=(a>>11)/e*255|0,l=i*this.width*4+4*o;this.data[l]=c,this.data[l+1]=u,this.data[l+2]=s,this.data[l+3]=255}this.pos+=t}},re.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=e*this.width*4+4*r;this.data[a]=o,this.data[a+1]=i,this.data[a+2]=n,this.data[a+3]=255}this.pos+=this.width%4}},re.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*r;this.data[s]=o,this.data[s+1]=i,this.data[s+2]=n,this.data[s+3]=a}},re.prototype.getData=function(){return this.data},
|
|
200
|
+
/**
|
|
201
|
+
* @license
|
|
202
|
+
* Copyright (c) 2018 Aras Abbasi
|
|
203
|
+
*
|
|
204
|
+
* Licensed under the MIT License.
|
|
205
|
+
* http://opensource.org/licenses/mit-license
|
|
206
|
+
*/
|
|
207
|
+
function(t){t.processBMP=function(e,r,n,i){var o=new re(e,!1),a=o.width,s=o.height,u={data:o.getData(),width:a,height:s},c=new ee(100).encode(u,100);return t.processJPEG.call(this,c,r,n,i)}}(T.API),ne.prototype.getData=function(){return this.data},
|
|
208
|
+
/**
|
|
209
|
+
* @license
|
|
210
|
+
* Copyright (c) 2019 Aras Abbasi
|
|
211
|
+
*
|
|
212
|
+
* Licensed under the MIT License.
|
|
213
|
+
* http://opensource.org/licenses/mit-license
|
|
214
|
+
*/
|
|
215
|
+
function(t){t.processWEBP=function(e,r,n,i){var o=new ne(e,!1),a=o.width,s=o.height,u={data:o.getData(),width:a,height:s},c=new ee(100).encode(u,100);return t.processJPEG.call(this,c,r,n,i)}}(T.API),T.API.processRGBA=function(t,e,r){for(var n=t.data,i=n.length,o=new Uint8Array(i/4*3),a=new Uint8Array(i/4),s=0,u=0,c=0;c<i;c+=4){var l=n[c],f=n[c+1],h=n[c+2],p=n[c+3];o[s++]=l,o[s++]=f,o[s++]=h,a[u++]=p}var d=this.__addimage__.arrayBufferToBinaryString(o);return{alpha:this.__addimage__.arrayBufferToBinaryString(a),data:d,index:e,alias:r,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},T.API.setLanguage=function(t){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]&&(this.internal.languageSettings.languageCode=t,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")})),this.internal.languageSettings.isSubscribed=!0)),this},Jt=T.API,Yt=Jt.getCharWidthsArray=function(t,e){var r,n,o=(e=e||{}).font||this.internal.getFont(),a=e.fontSize||this.internal.getFontSize(),s=e.charSpace||this.internal.getCharSpace(),u=e.widths?e.widths:o.metadata.Unicode.widths,c=u.fof?u.fof:1,l=e.kerning?e.kerning:o.metadata.Unicode.kerning,f=l.fof?l.fof:1,h=!1!==e.doKerning,p=0,d=t.length,g=0,v=u[0]||c,m=[];for(r=0;r<d;r++)n=t.charCodeAt(r),"function"==typeof o.metadata.widthOfString?m.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(n))+s*(1e3/a)||0)/1e3):(p=h&&"object"===i()(l[n])&&!isNaN(parseInt(l[n][g],10))?l[n][g]/f:0,m.push((u[n]||v)/c+p)),g=n;return m},Xt=Jt.getStringUnitWidth=function(t,e){var r=(e=e||{}).fontSize||this.internal.getFontSize(),n=e.font||this.internal.getFont(),i=e.charSpace||this.internal.getCharSpace();return Jt.processArabic&&(t=Jt.processArabic(t)),"function"==typeof n.metadata.widthOfString?n.metadata.widthOfString(t,r,i)/r:Yt.apply(this,arguments).reduce((function(t,e){return t+e}),0)},$t=function(t,e,r,n){for(var i=[],o=0,a=t.length,s=0;o!==a&&s+e[o]<r;)s+=e[o],o++;i.push(t.slice(0,o));var u=o;for(s=0;o!==a;)s+e[o]>n&&(i.push(t.slice(u,o)),s=0,u=o),s+=e[o],o++;return u!==o&&i.push(t.slice(u,o)),i},Kt=function(t,e,r){r||(r={});var n,i,o,a,s,u,c,l=[],f=[l],h=r.textIndent||0,p=0,d=0,g=t.split(" "),v=Yt.apply(this,[" ",r])[0];if(u=-1===r.lineIndent?g[0].length+2:r.lineIndent||0){var m=Array(u).join(" "),b=[];g.map((function(t){(t=t.split(/\s*\n/)).length>1?b=b.concat(t.map((function(t,e){return(e&&t.length?"\n":"")+t}))):b.push(t[0])})),g=b,u=Xt.apply(this,[m,r])}for(o=0,a=g.length;o<a;o++){var y=0;if(n=g[o],u&&"\n"==n[0]&&(n=n.substr(1),y=1),h+p+(d=(i=Yt.apply(this,[n,r])).reduce((function(t,e){return t+e}),0))>e||y){if(d>e){for(s=$t.apply(this,[n,i,e-(h+p),e]),l.push(s.shift()),l=[s.pop()];s.length;)f.push([s.shift()]);d=i.slice(n.length-(l[0]?l[0].length:0)).reduce((function(t,e){return t+e}),0)}else l=[n];f.push(l),h=d+u,p=v}else l.push(n),h+=p+d,p=v}return c=u?function(t,e){return(e?m:"")+t.join(" ")}:function(t){return t.join(" ")},f.map(c)},Jt.splitTextToSize=function(t,e,r){var n,i=(r=r||{}).fontSize||this.internal.getFontSize(),o=function(t){if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var e=this.internal.getFont(t.fontName,t.fontStyle);return e.metadata.Unicode?{widths:e.metadata.Unicode.widths||{0:1},kerning:e.metadata.Unicode.kerning||{}}:{font:e.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,r);n=Array.isArray(t)?t:String(t).split(/\r?\n/);var a=1*this.internal.scaleFactor*e/i;o.textIndent=r.textIndent?1*r.textIndent*this.internal.scaleFactor/i:0,o.lineIndent=r.lineIndent;var s,u,c=[];for(s=0,u=n.length;s<u;s++)c=c.concat(Kt.apply(this,[n[s],a,o]));return c},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="klmnopqrstuvwxyz",r={},n={},o=0;o<e.length;o++)r[e[o]]="0123456789abcdef"[o],n["0123456789abcdef"[o]]=e[o];var a=function(t){return"0x"+parseInt(t,10).toString(16)},s=t.__fontmetrics__.compress=function(t){var e,r,o,u,c=["{"];for(var l in t){if(e=t[l],isNaN(parseInt(l,10))?r="'"+l+"'":(l=parseInt(l,10),r=(r=a(l).slice(2)).slice(0,-1)+n[r.slice(-1)]),"number"==typeof e)e<0?(o=a(e).slice(3),u="-"):(o=a(e).slice(2),u=""),o=u+o.slice(0,-1)+n[o.slice(-1)];else{if("object"!==i()(e))throw new Error("Don't know what to do with value type "+i()(e)+".");o=s(e)}c.push(r+o)}return c.push("}"),c.join("")},u=t.__fontmetrics__.uncompress=function(t){if("string"!=typeof t)throw new Error("Invalid argument passed to uncompress.");for(var e,n,i,o,a={},s=1,u=a,c=[],l="",f="",h=t.length-1,p=1;p<h;p+=1)"'"==(o=t[p])?e?(i=e.join(""),e=void 0):e=[]:e?e.push(o):"{"==o?(c.push([u,i]),u={},i=void 0):"}"==o?((n=c.pop())[0][n[1]]=u,i=void 0,u=n[0]):"-"==o?s=-1:void 0===i?r.hasOwnProperty(o)?(l+=r[o],i=parseInt(l,16)*s,s=1,l=""):l+=o:r.hasOwnProperty(o)?(f+=r[o],u[i]=parseInt(f,16)*s,s=1,i=void 0,f=""):f+=o;return a},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},l={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},f={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(t){var e=t.font,r=f.Unicode[e.postScriptName];r&&(e.metadata.Unicode={},e.metadata.Unicode.widths=r.widths,e.metadata.Unicode.kerning=r.kerning);var n=l.Unicode[e.postScriptName];n&&(e.metadata.Unicode.encoding=n,e.encoding=n.codePages[0])}])}(T.API),
|
|
216
|
+
/**
|
|
217
|
+
* @license
|
|
218
|
+
* Licensed under the MIT License.
|
|
219
|
+
* http://opensource.org/licenses/mit-license
|
|
220
|
+
*/
|
|
221
|
+
function(t){var e=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++)r[n]=t.charCodeAt(n);return r};t.API.events.push(["addFont",function(r){var n=void 0,i=r.font,o=r.instance;if(!i.isStandardFont){if(void 0===o)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if("string"!=typeof(n=!1===o.existsFileInVFS(i.postScriptName)?o.loadFile(i.postScriptName):o.getFileFromVFS(i.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");!function(r,n){n=/^\x00\x01\x00\x00/.test(n)?e(n):e(h(n)),r.metadata=t.API.TTFFont.open(n),r.metadata.Unicode=r.metadata.Unicode||{encoding:{},kerning:{},widths:[]},r.metadata.glyIdsUsed=[0]}(i,n)}}])}(T),
|
|
222
|
+
/** @license
|
|
223
|
+
* Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems
|
|
224
|
+
*
|
|
225
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
226
|
+
* a copy of this software and associated documentation files (the
|
|
227
|
+
* "Software"), to deal in the Software without restriction, including
|
|
228
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
229
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
230
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
231
|
+
* the following conditions:
|
|
232
|
+
*
|
|
233
|
+
* The above copyright notice and this permission notice shall be
|
|
234
|
+
* included in all copies or substantial portions of the Software.
|
|
235
|
+
*
|
|
236
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
237
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
238
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
239
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
240
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
241
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
242
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
243
|
+
* ====================================================================
|
|
244
|
+
*/
|
|
245
|
+
function(t){function e(){return(a.canvg?Promise.resolve(a.canvg):r.e(17).then(r.bind(null,1060))).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}T.API.addSvgAsImage=function(t,r,n,i,o,a,s,c){if(isNaN(r)||isNaN(n))throw u.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw u.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=i,l.height=o;var f=l.getContext("2d");f.fillStyle="#fff",f.fillRect(0,0,l.width,l.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},p=this;return e().then((function(e){return e.fromString(f,t,h)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(h)})).then((function(){p.addImage(l.toDataURL("image/jpeg",1),r,n,i,o,s,c)}))}}(),T.API.putTotalPages=function(t){var e,r=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),r=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),r=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,r);return this},T.API.viewerPreferences=function(t,e){var r;t=t||{},e=e||!1;var n,o,a,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},u=Object.keys(s),c=[],l=0,f=0,h=0;function p(t,e){var r,n=!1;for(r=0;r<t.length;r+=1)t[r]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,"reset"===t||!0===e){var d=u.length;for(h=0;h<d;h+=1)r[u[h]].value=r[u[h]].defaultValue,r[u[h]].explicitSet=!1}if("object"===i()(t))for(o in t)if(a=t[o],p(u,o)&&void 0!==a){if("boolean"===r[o].type&&"boolean"==typeof a)r[o].value=a;else if("name"===r[o].type&&p(r[o].valueSet,a))r[o].value=a;else if("integer"===r[o].type&&Number.isInteger(a))r[o].value=a;else if("array"===r[o].type){for(l=0;l<a.length;l+=1)if(n=!0,1===a[l].length&&"number"==typeof a[l][0])c.push(String(a[l]-1));else if(a[l].length>1){for(f=0;f<a[l].length;f+=1)"number"!=typeof a[l][f]&&(n=!1);!0===n&&c.push([a[l][0]-1,a[l][1]-1].join(" "))}r[o].value="["+c.join(" ")+"]"}else r[o].value=r[o].defaultValue;r[o].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in r)!0===r[t].explicitSet&&("name"===r[t].type?e.push("/"+t+" /"+r[t].value):e.push("/"+t+" "+r[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this
|
|
246
|
+
/** ====================================================================
|
|
247
|
+
* @license
|
|
248
|
+
* jsPDF XMP metadata plugin
|
|
249
|
+
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
|
|
250
|
+
*
|
|
251
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
252
|
+
* a copy of this software and associated documentation files (the
|
|
253
|
+
* "Software"), to deal in the Software without restriction, including
|
|
254
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
255
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
256
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
257
|
+
* the following conditions:
|
|
258
|
+
*
|
|
259
|
+
* The above copyright notice and this permission notice shall be
|
|
260
|
+
* included in all copies or substantial portions of the Software.
|
|
261
|
+
*
|
|
262
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
263
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
264
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
265
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
266
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
267
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
268
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
269
|
+
* ====================================================================
|
|
270
|
+
*/},function(t){var e=function(){var t='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',e=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),r=unescape(encodeURIComponent(t)),n=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),i=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),o=unescape(encodeURIComponent("</x:xmpmeta>")),a=r.length+n.length+i.length+e.length+o.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+a+" >>"),this.internal.write("stream"),this.internal.write(e+r+n+i+o),this.internal.write("endstream"),this.internal.write("endobj")},r=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};t.addMetadata=function(t,n){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:t,namespaceuri:n||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",r),this.internal.events.subscribe("postPutResources",e)),this}}(T.API),function(t){var e=t.API,r=e.pdfEscape16=function(t,e){for(var r,n=e.metadata.Unicode.widths,i=["","0","00","000","0000"],o=[""],a=0,s=t.length;a<s;++a){if(r=e.metadata.characterToGlyph(t.charCodeAt(a)),e.metadata.glyIdsUsed.push(r),e.metadata.toUnicode[r]=t.charCodeAt(a),-1==n.indexOf(r)&&(n.push(r),n.push([parseInt(e.metadata.widthOfGlyph(r),10)])),"0"==r)return o.join("");r=r.toString(16),o.push(i[4-r.length],r)}return o.join("")},n=function(t){var e,r,n,i,o,a,s;for(o="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",n=[],a=0,s=(r=Object.keys(t).sort((function(t,e){return t-e}))).length;a<s;a++)e=r[a],n.length>=100&&(o+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar",n=[]),void 0!==t[e]&&null!==t[e]&&"function"==typeof t[e].toString&&(i=("0000"+t[e].toString(16)).slice(-4),e=("0000"+(+e).toString(16)).slice(-4),n.push("<"+e+"><"+i+">"));return n.length&&(o+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar\n"),o+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};e.events.push(["putFont",function(e){!function(e){var r=e.font,i=e.out,o=e.newObject,a=e.putStream;if(r.metadata instanceof t.API.TTFFont&&"Identity-H"===r.encoding){for(var s=r.metadata.Unicode.widths,u=r.metadata.subset.encode(r.metadata.glyIdsUsed,1),c="",l=0;l<u.length;l++)c+=String.fromCharCode(u[l]);var f=o();a({data:c,addLength1:!0,objectId:f}),i("endobj");var h=o();a({data:n(r.metadata.toUnicode),addLength1:!0,objectId:h}),i("endobj");var p=o();i("<<"),i("/Type /FontDescriptor"),i("/FontName /"+F(r.fontName)),i("/FontFile2 "+f+" 0 R"),i("/FontBBox "+t.API.PDFObject.convert(r.metadata.bbox)),i("/Flags "+r.metadata.flags),i("/StemV "+r.metadata.stemV),i("/ItalicAngle "+r.metadata.italicAngle),i("/Ascent "+r.metadata.ascender),i("/Descent "+r.metadata.decender),i("/CapHeight "+r.metadata.capHeight),i(">>"),i("endobj");var d=o();i("<<"),i("/Type /Font"),i("/BaseFont /"+F(r.fontName)),i("/FontDescriptor "+p+" 0 R"),i("/W "+t.API.PDFObject.convert(s)),i("/CIDToGIDMap /Identity"),i("/DW 1000"),i("/Subtype /CIDFontType2"),i("/CIDSystemInfo"),i("<<"),i("/Supplement 0"),i("/Registry (Adobe)"),i("/Ordering ("+r.encoding+")"),i(">>"),i(">>"),i("endobj"),r.objectNumber=o(),i("<<"),i("/Type /Font"),i("/Subtype /Type0"),i("/ToUnicode "+h+" 0 R"),i("/BaseFont /"+F(r.fontName)),i("/Encoding /"+r.encoding),i("/DescendantFonts ["+d+" 0 R]"),i(">>"),i("endobj"),r.isAlreadyPutted=!0}}(e)}]),e.events.push(["putFont",function(e){!function(e){var r=e.font,i=e.out,o=e.newObject,a=e.putStream;if(r.metadata instanceof t.API.TTFFont&&"WinAnsiEncoding"===r.encoding){for(var s=r.metadata.rawData,u="",c=0;c<s.length;c++)u+=String.fromCharCode(s[c]);var l=o();a({data:u,addLength1:!0,objectId:l}),i("endobj");var f=o();a({data:n(r.metadata.toUnicode),addLength1:!0,objectId:f}),i("endobj");var h=o();i("<<"),i("/Descent "+r.metadata.decender),i("/CapHeight "+r.metadata.capHeight),i("/StemV "+r.metadata.stemV),i("/Type /FontDescriptor"),i("/FontFile2 "+l+" 0 R"),i("/Flags 96"),i("/FontBBox "+t.API.PDFObject.convert(r.metadata.bbox)),i("/FontName /"+F(r.fontName)),i("/ItalicAngle "+r.metadata.italicAngle),i("/Ascent "+r.metadata.ascender),i(">>"),i("endobj"),r.objectNumber=o();for(var p=0;p<r.metadata.hmtx.widths.length;p++)r.metadata.hmtx.widths[p]=parseInt(r.metadata.hmtx.widths[p]*(1e3/r.metadata.head.unitsPerEm));i("<</Subtype/TrueType/Type/Font/ToUnicode "+f+" 0 R/BaseFont/"+F(r.fontName)+"/FontDescriptor "+h+" 0 R/Encoding/"+r.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(r.metadata.hmtx.widths)+">>"),i("endobj"),r.isAlreadyPutted=!0}}(e)}]);var i=function(t){var e,n=t.text||"",i=t.x,o=t.y,a=t.options||{},s=t.mutex||{},u=s.pdfEscape,c=s.activeFontKey,l=s.fonts,f=c,h="",p=0,d="",g=l[f].encoding;if("Identity-H"!==l[f].encoding)return{text:n,x:i,y:o,options:a,mutex:s};for(d=n,f=c,Array.isArray(n)&&(d=n[0]),p=0;p<d.length;p+=1)l[f].metadata.hasOwnProperty("cmap")&&(e=l[f].metadata.cmap.unicode.codeMap[d[p].charCodeAt(0)]),e||d[p].charCodeAt(0)<256&&l[f].metadata.hasOwnProperty("Unicode")?h+=d[p]:h+="";var v="";return parseInt(f.slice(1))<14||"WinAnsiEncoding"===g?v=u(h,f).split("").map((function(t){return t.charCodeAt(0).toString(16)})).join(""):"Identity-H"===g&&(v=r(h,l[f])),s.isHex=!0,{text:v,x:i,y:o,options:a,mutex:s}};e.events.push(["postProcessText",function(t){var e=t.text||"",r=[],n={text:e,x:t.x,y:t.y,options:t.options,mutex:t.mutex};if(Array.isArray(e)){var o=0;for(o=0;o<e.length;o+=1)Array.isArray(e[o])&&3===e[o].length?r.push([i(Object.assign({},n,{text:e[o][0]})).text,e[o][1],e[o][2]]):r.push(i(Object.assign({},n,{text:e[o]})).text);t.text=r}else t.text=i(Object.assign({},n,{text:e})).text}])}(T),
|
|
271
|
+
/**
|
|
272
|
+
* @license
|
|
273
|
+
* jsPDF virtual FileSystem functionality
|
|
274
|
+
*
|
|
275
|
+
* Licensed under the MIT License.
|
|
276
|
+
* http://opensource.org/licenses/mit-license
|
|
277
|
+
*/
|
|
278
|
+
function(t){var e=function(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(t){return e.call(this),void 0!==this.internal.vFS[t]},t.addFileToVFS=function(t,r){return e.call(this),this.internal.vFS[t]=r,this},t.getFileFromVFS=function(t){return e.call(this),void 0!==this.internal.vFS[t]?this.internal.vFS[t]:null}}(T.API),
|
|
279
|
+
/**
|
|
280
|
+
* @license
|
|
281
|
+
* Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
|
|
282
|
+
* MIT License
|
|
283
|
+
*/
|
|
284
|
+
function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var r,n,i,o,a,s,u,c=e,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],f=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},p={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},d=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],g=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),v=!1,m=0;this.__bidiEngine__={};var b=function(t){var e=t.charCodeAt(),r=e>>8,n=p[r];return void 0!==n?c[256*n+(255&e)]:252===r||253===r?"AL":g.test(r)?"L":8===r?"R":"N"},y=function(t){for(var e,r=0;r<t.length;r++){if("L"===(e=b(t.charAt(r))))return!1;if("R"===e)return!0}return!1},w=function(t,e,a,s){var u,c,l,f,h=e[s];switch(h){case"L":case"R":v=!1;break;case"N":case"AN":break;case"EN":v&&(h="AN");break;case"AL":v=!0,h="R";break;case"WS":h="N";break;case"CS":s<1||s+1>=e.length||"EN"!==(u=a[s-1])&&"AN"!==u||"EN"!==(c=e[s+1])&&"AN"!==c?h="N":v&&(c="AN"),h=c===u?c:"N";break;case"ES":h="EN"===(u=s>0?a[s-1]:"B")&&s+1<e.length&&"EN"===e[s+1]?"EN":"N";break;case"ET":if(s>0&&"EN"===a[s-1]){h="EN";break}if(v){h="N";break}for(l=s+1,f=e.length;l<f&&"ET"===e[l];)l++;h=l<f&&"EN"===e[l]?"EN":"N";break;case"NSM":if(i&&!o){for(f=e.length,l=s+1;l<f&&"NSM"===e[l];)l++;if(l<f){var p=t[s],d=p>=1425&&p<=2303||64286===p;if(u=e[l],d&&("R"===u||"AL"===u)){h="R";break}}}h=s<1||"B"===(u=e[s-1])?"N":a[s-1];break;case"B":v=!1,r=!0,h=m;break;case"S":n=!0,h="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":v=!1;break;case"BN":h="N"}return h},x=function(t,e,r){var n=t.split("");return r&&A(n,r,{hiLevel:m}),n.reverse(),e&&e.reverse(),n.join("")},A=function(t,e,i){var o,a,s,u,c,p=-1,d=t.length,g=0,y=[],x=m?f:l,A=[];for(v=!1,r=!1,n=!1,a=0;a<d;a++)A[a]=b(t[a]);for(s=0;s<d;s++){if(c=g,y[s]=w(t,A,y,s),o=240&(g=x[c][h[y[s]]]),g&=15,e[s]=u=x[g][5],o>0)if(16===o){for(a=p;a<s;a++)e[a]=1;p=-1}else p=-1;if(x[g][6])-1===p&&(p=s);else if(p>-1){for(a=p;a<s;a++)e[a]=u;p=-1}"B"===A[s]&&(e[s]=0),i.hiLevel|=u}n&&function(t,e,r){for(var n=0;n<r;n++)if("S"===t[n]){e[n]=m;for(var i=n-1;i>=0&&"WS"===t[i];i--)e[i]=m}}(A,e,d)},N=function(t,e,n,i,o){if(!(o.hiLevel<t)){if(1===t&&1===m&&!r)return e.reverse(),void(n&&n.reverse());for(var a,s,u,c,l=e.length,f=0;f<l;){if(i[f]>=t){for(u=f+1;u<l&&i[u]>=t;)u++;for(c=f,s=u-1;c<s;c++,s--)a=e[c],e[c]=e[s],e[s]=a,n&&(a=n[c],n[c]=n[s],n[s]=a);f=u}f++}}},L=function(t,e,r){var n=t.split(""),i={hiLevel:m};return r||(r=[]),A(n,r,i),function(t,e,r){if(0!==r.hiLevel&&u)for(var n,i=0;i<t.length;i++)1===e[i]&&(n=d.indexOf(t[i]))>=0&&(t[i]=d[n+1])}(n,r,i),N(2,n,e,r,i),N(1,n,e,r,i),n.join("")};return this.__bidiEngine__.doBidiReorder=function(t,e,r){if(function(t,e){if(e)for(var r=0;r<t.length;r++)e[r]=r;void 0===o&&(o=y(t)),void 0===s&&(s=y(t))}(t,e),i||!a||s)if(i&&a&&o^s)m=o?1:0,t=x(t,e,r);else if(!i&&a&&s)m=o?1:0,t=L(t,e,r),t=x(t,e);else if(!i||o||a||s){if(i&&!a&&o^s)t=x(t,e),o?(m=0,t=L(t,e,r)):(m=1,t=L(t,e,r),t=x(t,e));else if(i&&o&&!a&&s)m=1,t=L(t,e,r),t=x(t,e);else if(!i&&!a&&o^s){var n=u;o?(m=1,t=L(t,e,r),m=0,u=!1,t=L(t,e,r),u=n):(m=0,t=L(t,e,r),t=x(t,e),m=1,u=!1,t=L(t,e,r),u=n,t=x(t,e))}}else m=0,t=L(t,e,r);else m=o?1:0,t=L(t,e,r);return t},this.__bidiEngine__.setOptions=function(t){t&&(i=t.isInputVisual,a=t.isOutputVisual,o=t.isInputRtl,s=t.isOutputRtl,u=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],r=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(t){var e=t.text,n=(t.x,t.y,t.options||{}),i=(t.mutex,n.lang,[]);if(n.isInputVisual="boolean"!=typeof n.isInputVisual||n.isInputVisual,r.setOptions(n),"[object Array]"===Object.prototype.toString.call(e)){var o=0;for(i=[],o=0;o<e.length;o+=1)"[object Array]"===Object.prototype.toString.call(e[o])?i.push([r.doBidiReorder(e[o][0]),e[o][1],e[o][2]]):i.push([r.doBidiReorder(e[o])]);t.text=i}else t.text=r.doBidiReorder(e);r.setOptions({isInputVisual:!0})}])}(T),T.API.TTFFont=function(){function t(t){var e;if(this.rawData=t,e=this.contents=new oe(t),this.contents.pos=4,"ttcf"===e.readString(4))throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new Le(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new ae(this.contents),this.head=new ce(this),this.name=new ve(this),this.cmap=new fe(this),this.toUnicode={},this.hhea=new he(this),this.maxp=new me(this),this.hmtx=new be(this),this.post=new de(this),this.os2=new pe(this),this.loca=new Ne(this),this.glyf=new we(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var t,e,r,n,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var e,r,n,i;for(i=[],e=0,r=(n=this.bbox).length;e<r;e++)t=n[e],i.push(Math.round(t*this.scaleFactor));return i}.call(this),this.stemV=0,this.post.exists?(r=255&(n=this.post.italic_angle),0!=(32768&(e=n>>16))&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(i=this.familyClass)||2===i||3===i||4===i||5===i||7===i,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var e;return(null!=(e=this.cmap.unicode)?e.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},t.prototype.widthOfString=function(t,e,r){var n,i,o,a;for(o=0,i=0,a=(t=""+t).length;0<=a?i<a:i>a;i=0<=a?++i:--i)n=t.charCodeAt(i),o+=this.widthOfGlyph(this.characterToGlyph(n))+r*(1e3/e)||0;return o*(e/1e3)},t.prototype.lineHeight=function(t,e){var r;return null==e&&(e=!1),r=e?this.lineGap:0,(this.ascender+r-this.decender)/1e3*t},t}();var ie,oe=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)r[e]=String.fromCharCode(this.readByte());return r.join("")},t.prototype.writeString=function(t){var e,r,n;for(n=[],e=0,r=t.length;0<=r?e<r:e>r;e=0<=r?++e:--e)n.push(this.writeByte(t.charCodeAt(e)));return n},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,e,r,n,i,o,a,s;return t=this.readByte(),e=this.readByte(),r=this.readByte(),n=this.readByte(),i=this.readByte(),o=this.readByte(),a=this.readByte(),s=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^r)+4294967296*(255^n)+16777216*(255^i)+65536*(255^o)+256*(255^a)+(255^s)+1):72057594037927940*t+281474976710656*e+1099511627776*r+4294967296*n+16777216*i+65536*o+256*a+s},t.prototype.writeLongLong=function(t){var e,r;return e=Math.floor(t/4294967296),r=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var e,r;for(e=[],r=0;0<=t?r<t:r>t;r=0<=t?++r:--r)e.push(this.readByte());return e},t.prototype.write=function(t){var e,r,n,i;for(i=[],r=0,n=t.length;r<n;r++)e=t[r],i.push(this.writeByte(e));return i},t}(),ae=function(){var t;function e(t){var e,r,n;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},r=0,n=this.tableCount;0<=n?r<n:r>n;r=0<=n?++r:--r)e={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[e.tag]=e}return e.prototype.encode=function(e){var r,n,i,o,a,s,u,c,l,f,h,p,d;for(d in h=Object.keys(e).length,s=Math.log(2),l=16*Math.floor(Math.log(h)/s),o=Math.floor(l/s),c=16*h-l,(n=new oe).writeInt(this.scalarType),n.writeShort(h),n.writeShort(l),n.writeShort(o),n.writeShort(c),i=16*h,u=n.pos+i,a=null,p=[],e)for(f=e[d],n.writeString(d),n.writeInt(t(f)),n.writeInt(u),n.writeInt(f.length),p=p.concat(f),"head"===d&&(a=u),u+=f.length;u%4;)p.push(0),u++;return n.write(p),r=2981146554-t(n.data),n.pos=a+8,n.writeUInt32(r),n.data},t=function(t){var e,r,n,i;for(t=ye.call(t);t.length%4;)t.push(0);for(n=new oe(t),r=0,e=0,i=t.length;e<i;e=e+=4)r+=n.readUInt32();return 4294967295&r},e}(),se={}.hasOwnProperty,ue=function(t,e){for(var r in e)se.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};ie=function(){function t(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var ce=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return ue(e,ie),e.prototype.tag="head",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},e.prototype.encode=function(t){var e;return(e=new oe).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},e}(),le=function(){function t(t,e){var r,n,i,o,a,s,u,c,l,f,h,p,d,g,v,m,b;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),l=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(s=0;s<256;++s)this.codeMap[s]=t.readByte();break;case 4:for(h=t.readUInt16(),f=h/2,t.pos+=6,i=function(){var e,r;for(r=[],s=e=0;0<=f?e<f:e>f;s=0<=f?++e:--e)r.push(t.readUInt16());return r}(),t.pos+=2,d=function(){var e,r;for(r=[],s=e=0;0<=f?e<f:e>f;s=0<=f?++e:--e)r.push(t.readUInt16());return r}(),u=function(){var e,r;for(r=[],s=e=0;0<=f?e<f:e>f;s=0<=f?++e:--e)r.push(t.readUInt16());return r}(),c=function(){var e,r;for(r=[],s=e=0;0<=f?e<f:e>f;s=0<=f?++e:--e)r.push(t.readUInt16());return r}(),n=(this.length-t.pos+this.offset)/2,a=function(){var e,r;for(r=[],s=e=0;0<=n?e<n:e>n;s=0<=n?++e:--e)r.push(t.readUInt16());return r}(),s=v=0,b=i.length;v<b;s=++v)for(g=i[s],r=m=p=d[s];p<=g?m<=g:m>=g;r=p<=g?++m:--m)0===c[s]?o=r+u[s]:0!==(o=a[c[s]/2+(r-p)-(f-s)]||0)&&(o+=u[s]),this.codeMap[r]=65535&o}t.pos=l}return t.encode=function(t,e){var r,n,i,o,a,s,u,c,l,f,h,p,d,g,v,m,b,y,w,x,A,N,L,S,_,P,k,j,O,I,C,F,R,E,M,B,q,T,D,z,U,H,V,W,G,J;switch(j=new oe,o=Object.keys(t).sort((function(t,e){return t-e})),e){case"macroman":for(d=0,g=function(){var t=[];for(p=0;p<256;++p)t.push(0);return t}(),m={0:0},i={},O=0,R=o.length;O<R;O++)null==m[V=t[n=o[O]]]&&(m[V]=++d),i[n]={old:t[n],new:m[t[n]]},g[n]=m[t[n]];return j.writeUInt16(1),j.writeUInt16(0),j.writeUInt32(12),j.writeUInt16(0),j.writeUInt16(262),j.writeUInt16(0),j.write(g),{charMap:i,subtable:j.data,maxGlyphID:d+1};case"unicode":for(P=[],l=[],b=0,m={},r={},v=u=null,I=0,E=o.length;I<E;I++)null==m[w=t[n=o[I]]]&&(m[w]=++b),r[n]={old:w,new:m[w]},a=m[w]-n,null!=v&&a===u||(v&&l.push(v),P.push(n),u=a),v=n;for(v&&l.push(v),l.push(65535),P.push(65535),S=2*(L=P.length),N=2*Math.pow(Math.log(L)/Math.LN2,2),f=Math.log(N/2)/Math.LN2,A=2*L-N,s=[],x=[],h=[],p=C=0,M=P.length;C<M;p=++C){if(_=P[p],c=l[p],65535===_){s.push(0),x.push(0);break}if(_-(k=r[_].new)>=32768)for(s.push(0),x.push(2*(h.length+L-p)),n=F=_;_<=c?F<=c:F>=c;n=_<=c?++F:--F)h.push(r[n].new);else s.push(k-_),x.push(0)}for(j.writeUInt16(3),j.writeUInt16(1),j.writeUInt32(12),j.writeUInt16(4),j.writeUInt16(16+8*L+2*h.length),j.writeUInt16(0),j.writeUInt16(S),j.writeUInt16(N),j.writeUInt16(f),j.writeUInt16(A),U=0,B=l.length;U<B;U++)n=l[U],j.writeUInt16(n);for(j.writeUInt16(0),H=0,q=P.length;H<q;H++)n=P[H],j.writeUInt16(n);for(W=0,T=s.length;W<T;W++)a=s[W],j.writeUInt16(a);for(G=0,D=x.length;G<D;G++)y=x[G],j.writeUInt16(y);for(J=0,z=h.length;J<z;J++)d=h[J],j.writeUInt16(d);return{charMap:r,subtable:j.data,maxGlyphID:b+1}}},t}(),fe=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return ue(e,ie),e.prototype.tag="cmap",e.prototype.parse=function(t){var e,r,n;for(t.pos=this.offset,this.version=t.readUInt16(),n=t.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=n?r<n:r>n;r=0<=n?++r:--r)e=new le(t,this.offset),this.tables.push(e),e.isUnicode&&null==this.unicode&&(this.unicode=e);return!0},e.encode=function(t,e){var r,n;return null==e&&(e="macroman"),r=le.encode(t,e),(n=new oe).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},e}(),he=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return ue(e,ie),e.prototype.tag="hhea",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},e}(),pe=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return ue(e,ie),e.prototype.tag="OS/2",e.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var e,r;for(r=[],e=0;e<10;++e)r.push(t.readByte());return r}(),this.charRange=function(){var e,r;for(r=[],e=0;e<4;++e)r.push(t.readInt());return r}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var e,r;for(r=[],e=0;e<2;e=++e)r.push(t.readInt());return r}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},e}(),de=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return ue(e,ie),e.prototype.tag="post",e.prototype.parse=function(t){var e,r,n;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:break;case 131072:var i;for(r=t.readUInt16(),this.glyphNameIndex=[],i=0;0<=r?i<r:i>r;i=0<=r?++i:--i)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],n=[];t.pos<this.offset+this.length;)e=t.readByte(),n.push(this.names.push(t.readString(e)));return n;case 151552:return r=t.readUInt16(),this.offsets=t.read(r);case 196608:break;case 262144:return this.map=function(){var e,r,n;for(n=[],i=e=0,r=this.file.maxp.numGlyphs;0<=r?e<r:e>r;i=0<=r?++e:--e)n.push(t.readUInt32());return n}.call(this)}},e}(),ge=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},ve=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return ue(e,ie),e.prototype.tag="name",e.prototype.parse=function(t){var e,r,n,i,o,a,s,u,c,l,f;for(t.pos=this.offset,t.readShort(),e=t.readShort(),a=t.readShort(),r=[],i=0;0<=e?i<e:i>e;i=0<=e?++i:--i)r.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+a+t.readShort()});for(s={},i=c=0,l=r.length;c<l;i=++c)n=r[i],t.pos=n.offset,u=t.readString(n.length),o=new ge(u,n),null==s[f=n.nameID]&&(s[f]=[]),s[n.nameID].push(o);this.strings=s,this.copyright=s[0],this.fontFamily=s[1],this.fontSubfamily=s[2],this.uniqueSubfamily=s[3],this.fontName=s[4],this.version=s[5];try{this.postscriptName=s[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(t){this.postscriptName=s[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=s[7],this.manufacturer=s[8],this.designer=s[9],this.description=s[10],this.vendorUrl=s[11],this.designerUrl=s[12],this.license=s[13],this.licenseUrl=s[14],this.preferredFamily=s[15],this.preferredSubfamily=s[17],this.compatibleFull=s[18],this.sampleText=s[19]},e}(),me=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return ue(e,ie),e.prototype.tag="maxp",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},e}(),be=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return ue(e,ie),e.prototype.tag="hmtx",e.prototype.parse=function(t){var e,r,n,i,o,a,s;for(t.pos=this.offset,this.metrics=[],e=0,a=this.file.hhea.numberOfMetrics;0<=a?e<a:e>a;e=0<=a?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var r,i;for(i=[],e=r=0;0<=n?r<n:r>n;e=0<=n?++r:--r)i.push(t.readInt16());return i}(),this.widths=function(){var t,e,r,n;for(n=[],t=0,e=(r=this.metrics).length;t<e;t++)i=r[t],n.push(i.advance);return n}.call(this),r=this.widths[this.widths.length-1],s=[],e=o=0;0<=n?o<n:o>n;e=0<=n?++o:--o)s.push(this.widths.push(r));return s},e.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},e}(),ye=[].slice,we=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return ue(e,ie),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var e,r,n,i,o,a,s,u,c,l;return t in this.cache?this.cache[t]:(i=this.file.loca,e=this.file.contents,r=i.indexOf(t),0===(n=i.lengthOf(t))?this.cache[t]=null:(e.pos=this.offset+r,o=(a=new oe(e.read(n))).readShort(),u=a.readShort(),l=a.readShort(),s=a.readShort(),c=a.readShort(),this.cache[t]=-1===o?new Ae(a,u,l,s,c):new xe(a,o,u,l,s,c),this.cache[t]))},e.prototype.encode=function(t,e,r){var n,i,o,a,s;for(o=[],i=[],a=0,s=e.length;a<s;a++)n=t[e[a]],i.push(o.length),n&&(o=o.concat(n.encode(r)));return i.push(o.length),{table:o,offsets:i}},e}(),xe=function(){function t(t,e,r,n,i,o){this.raw=t,this.numberOfContours=e,this.xMin=r,this.yMin=n,this.xMax=i,this.yMax=o,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),Ae=function(){function t(t,e,r,n,i){var o,a;for(this.raw=t,this.xMin=e,this.yMin=r,this.xMax=n,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;a=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&a;)o.pos+=1&a?4:2,128&a?o.pos+=8:64&a?o.pos+=4:8&a&&(o.pos+=2)}return t.prototype.encode=function(){var t,e,r;for(e=new oe(ye.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)e.pos=this.glyphOffsets[t];return e.data},t}(),Ne=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return ue(e,ie),e.prototype.tag="loca",e.prototype.parse=function(t){var e,r;return t.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=0===e?function(){var e,n;for(n=[],r=0,e=this.length;r<e;r+=2)n.push(2*t.readUInt16());return n}.call(this):function(){var e,n;for(n=[],r=0,e=this.length;r<e;r+=4)n.push(t.readUInt32());return n}.call(this)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.prototype.encode=function(t,e){for(var r=new Uint32Array(this.offsets.length),n=0,i=0,o=0;o<r.length;++o)if(r[o]=n,i<e.length&&e[i]==o){++i,r[o]=n;var a=this.offsets[o],s=this.offsets[o+1]-a;s>0&&(n+=s)}for(var u=new Array(4*r.length),c=0;c<r.length;++c)u[4*c+3]=255&r[c],u[4*c+2]=(65280&r[c])>>8,u[4*c+1]=(16711680&r[c])>>16,u[4*c]=(4278190080&r[c])>>24;return u},e}(),Le=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,e,r,n,i;for(e in n=this.font.cmap.tables[0].codeMap,t={},i=this.subset)r=i[e],t[e]=n[r];return t},t.prototype.glyphsFor=function(t){var e,r,n,i,o,a,s;for(n={},o=0,a=t.length;o<a;o++)n[i=t[o]]=this.font.glyf.glyphFor(i);for(i in e=[],n)(null!=(r=n[i])?r.compound:void 0)&&e.push.apply(e,r.glyphIDs);if(e.length>0)for(i in s=this.glyphsFor(e))r=s[i],n[i]=r;return n},t.prototype.encode=function(t,e){var r,n,i,o,a,s,u,c,l,f,h,p,d,g,v;for(n in r=fe.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(t),h={0:0},v=r.charMap)h[(s=v[n]).old]=s.new;for(p in f=r.maxGlyphID,o)p in h||(h[p]=f++);return c=function(t){var e,r;for(e in r={},t)r[t[e]]=e;return r}(h),l=Object.keys(c).sort((function(t,e){return t-e})),d=function(){var t,e,r;for(r=[],t=0,e=l.length;t<e;t++)a=l[t],r.push(c[a]);return r}(),i=this.font.glyf.encode(o,d,h),u=this.font.loca.encode(i.offsets,d),g={cmap:this.font.cmap.raw(),glyf:i.table,loca:u,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(e)},this.font.os2.exists&&(g["OS/2"]=this.font.os2.raw()),this.font.directory.encode(g)},t}();T.API.PDFObject=function(){var t;function e(){}return t=function(t,e){return(Array(e+1).join("0")+t).slice(-e)},e.convert=function(r){var n,i,o,a;if(Array.isArray(r))return"["+function(){var t,i,o;for(o=[],t=0,i=r.length;t<i;t++)n=r[t],o.push(e.convert(n));return o}().join(" ")+"]";if("string"==typeof r)return"/"+r;if(null!=r?r.isString:void 0)return"("+r+")";if(r instanceof Date)return"(D:"+t(r.getUTCFullYear(),4)+t(r.getUTCMonth(),2)+t(r.getUTCDate(),2)+t(r.getUTCHours(),2)+t(r.getUTCMinutes(),2)+t(r.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(r)){for(i in o=["<<"],r)a=r[i],o.push("/"+i+" "+e.convert(a));return o.push(">>"),o.join("\n")}return""+r},e}(),e.a=T}).call(this,r(74))},,,,,,,,,,,,,,,function(t,e,r){"use strict";var n=r(68),i=Date.now(),o="fnValues"+i,a="fnStyle"+ ++i;e.a=function(){return{onCreateRule:function(t,e,r){if("function"!=typeof e)return null;var i=Object(n.c)(t,{},r);return i[a]=e,i},onProcessStyle:function(t,e){if(o in e||a in e)return t;var r={};for(var n in t){var i=t[n];"function"==typeof i&&(delete t[n],r[n]=i)}return e[o]=r,t},onUpdate:function(t,e,r,n){var i=e,s=i[a];s&&(i.style=s(t)||{});var u=i[o];if(u)for(var c in u)i.prop(c,u[c](t),n)}}}},function(t,e,r){"use strict";var n=r(1),i=r(68),o="@global",a=function(){function t(t,e,r){for(var a in this.type="global",this.at=o,this.isProcessed=!1,this.key=t,this.options=r,this.rules=new i.a(Object(n.a)({},r,{parent:this})),e)this.rules.add(a,e[a]);this.rules.process()}var e=t.prototype;return e.getRule=function(t){return this.rules.get(t)},e.addRule=function(t,e,r){var n=this.rules.add(t,e,r);return n&&this.options.jss.plugins.onProcessRule(n),n},e.replaceRule=function(t,e,r){var n=this.rules.replace(t,e,r);return n&&this.options.jss.plugins.onProcessRule(n),n},e.indexOf=function(t){return this.rules.indexOf(t)},e.toString=function(t){return this.rules.toString(t)},t}(),s=function(){function t(t,e,r){this.type="global",this.at=o,this.isProcessed=!1,this.key=t,this.options=r;var i=t.substr("@global ".length);this.rule=r.jss.createRule(i,e,Object(n.a)({},r,{parent:this}))}return t.prototype.toString=function(t){return this.rule?this.rule.toString(t):""},t}(),u=/\s*,\s*/g;function c(t,e){for(var r=t.split(u),n="",i=0;i<r.length;i++)n+=e+" "+r[i].trim(),r[i+1]&&(n+=", ");return n}e.a=function(){return{onCreateRule:function(t,e,r){if(!t)return null;if(t===o)return new a(t,e,r);if("@"===t[0]&&"@global "===t.substr(0,"@global ".length))return new s(t,e,r);var n=r.parent;return n&&("global"===n.type||n.options.parent&&"global"===n.options.parent.type)&&(r.scoped=!1),r.selector||!1!==r.scoped||(r.selector=t),null},onProcessRule:function(t,e){"style"===t.type&&e&&(function(t,e){var r=t.options,i=t.style,a=i?i[o]:null;if(a){for(var s in a)e.addRule(s,a[s],Object(n.a)({},r,{selector:c(s,t.selector)}));delete i[o]}}(t,e),function(t,e){var r=t.options,i=t.style;for(var a in i)if("@"===a[0]&&a.substr(0,o.length)===o){var s=c(a.substr(o.length),t.selector);e.addRule(s,i[a],Object(n.a)({},r,{selector:s})),delete i[a]}}(t,e))}}}},function(t,e,r){"use strict";var n=r(1),i=/\s*,\s*/g,o=/&/g,a=/\$([\w-]+)/g;e.a=function(){function t(t,e){return function(r,n){var i=t.getRule(n)||e&&e.getRule(n);return i?i.selector:n}}function e(t,e){for(var r=e.split(i),n=t.split(i),a="",s=0;s<r.length;s++)for(var u=r[s],c=0;c<n.length;c++){var l=n[c];a&&(a+=", "),a+=-1!==l.indexOf("&")?l.replace(o,u):u+" "+l}return a}function r(t,e,r){if(r)return Object(n.a)({},r,{index:r.index+1});var i=t.options.nestingLevel;i=void 0===i?1:i+1;var o=Object(n.a)({},t.options,{nestingLevel:i,index:e.indexOf(t)+1});return delete o.name,o}return{onProcessStyle:function(i,o,s){if("style"!==o.type)return i;var u,c,l=o,f=l.options.parent;for(var h in i){var p=-1!==h.indexOf("&"),d="@"===h[0];if(p||d){if(u=r(l,f,u),p){var g=e(h,l.selector);c||(c=t(f,s)),g=g.replace(a,c);var v=l.key+"-"+h;"replaceRule"in f?f.replaceRule(v,i[h],Object(n.a)({},u,{selector:g})):f.addRule(v,i[h],Object(n.a)({},u,{selector:g}))}else d&&f.addRule(h,{},u).addRule(l.key,i[h],{selector:l.selector});delete i[h]}}return i}}}},function(t,e,r){"use strict";var n=r(68),i=n.e&&CSS?CSS.px:"px",o=n.e&&CSS?CSS.ms:"ms",a=n.e&&CSS?CSS.percent:"%";function s(t){var e=/(-[a-z])/g,r=function(t){return t[1].toUpperCase()},n={};for(var i in t)n[i]=t[i],n[i.replace(e,r)]=t[i];return n}var u=s({"animation-delay":o,"animation-duration":o,"background-position":i,"background-position-x":i,"background-position-y":i,"background-size":i,border:i,"border-bottom":i,"border-bottom-left-radius":i,"border-bottom-right-radius":i,"border-bottom-width":i,"border-left":i,"border-left-width":i,"border-radius":i,"border-right":i,"border-right-width":i,"border-top":i,"border-top-left-radius":i,"border-top-right-radius":i,"border-top-width":i,"border-width":i,"border-block":i,"border-block-end":i,"border-block-end-width":i,"border-block-start":i,"border-block-start-width":i,"border-block-width":i,"border-inline":i,"border-inline-end":i,"border-inline-end-width":i,"border-inline-start":i,"border-inline-start-width":i,"border-inline-width":i,"border-start-start-radius":i,"border-start-end-radius":i,"border-end-start-radius":i,"border-end-end-radius":i,margin:i,"margin-bottom":i,"margin-left":i,"margin-right":i,"margin-top":i,"margin-block":i,"margin-block-end":i,"margin-block-start":i,"margin-inline":i,"margin-inline-end":i,"margin-inline-start":i,padding:i,"padding-bottom":i,"padding-left":i,"padding-right":i,"padding-top":i,"padding-block":i,"padding-block-end":i,"padding-block-start":i,"padding-inline":i,"padding-inline-end":i,"padding-inline-start":i,"mask-position-x":i,"mask-position-y":i,"mask-size":i,height:i,width:i,"min-height":i,"max-height":i,"min-width":i,"max-width":i,bottom:i,left:i,top:i,right:i,inset:i,"inset-block":i,"inset-block-end":i,"inset-block-start":i,"inset-inline":i,"inset-inline-end":i,"inset-inline-start":i,"box-shadow":i,"text-shadow":i,"column-gap":i,"column-rule":i,"column-rule-width":i,"column-width":i,"font-size":i,"font-size-delta":i,"letter-spacing":i,"text-decoration-thickness":i,"text-indent":i,"text-stroke":i,"text-stroke-width":i,"word-spacing":i,motion:i,"motion-offset":i,outline:i,"outline-offset":i,"outline-width":i,perspective:i,"perspective-origin-x":a,"perspective-origin-y":a,"transform-origin":a,"transform-origin-x":a,"transform-origin-y":a,"transform-origin-z":a,"transition-delay":o,"transition-duration":o,"vertical-align":i,"flex-basis":i,"shape-margin":i,size:i,gap:i,grid:i,"grid-gap":i,"row-gap":i,"grid-row-gap":i,"grid-column-gap":i,"grid-template-rows":i,"grid-template-columns":i,"grid-auto-rows":i,"grid-auto-columns":i,"box-shadow-x":i,"box-shadow-y":i,"box-shadow-blur":i,"box-shadow-spread":i,"font-line-height":i,"text-shadow-x":i,"text-shadow-y":i,"text-shadow-blur":i});function c(t,e,r){if(null==e)return e;if(Array.isArray(e))for(var n=0;n<e.length;n++)e[n]=c(t,e[n],r);else if("object"==typeof e)if("fallbacks"===t)for(var o in e)e[o]=c(o,e[o],r);else for(var a in e)e[a]=c(t+"-"+a,e[a],r);else if("number"==typeof e&&!1===isNaN(e)){var s=r[t]||u[t];return!s||0===e&&s===i?e.toString():"function"==typeof s?s(e).toString():""+e+s}return e}e.a=function(t){void 0===t&&(t={});var e=s(t);return{onProcessStyle:function(t,r){if("style"!==r.type)return t;for(var n in t)t[n]=c(n,t[n],e);return t},onChangeValue:function(t,r){return c(r,t,e)}}}},function(t,e,r){"use strict";var n=r(220),i=r(68);e.a=function(){function t(e){for(var r in e){var o=e[r];if("fallbacks"===r&&Array.isArray(o))e[r]=o.map(t);else{var a=!1,s=Object(n.b)(r);s&&s!==r&&(a=!0);var u=!1,c=Object(n.c)(s,Object(i.f)(o));c&&c!==o&&(u=!0),(a||u)&&(a&&delete e[r],e[s||r]=c||o)}}return e}return{onProcessRule:function(t){if("keyframes"===t.type){var e=t;e.at=Object(n.a)(e.at)}},onProcessStyle:function(e,r){return"style"!==r.type?e:t(e)},onChangeValue:function(t,e){return Object(n.c)(e,Object(i.f)(t))||t}}}},function(t,e,r){"use strict";e.a=function(){var t=function(t,e){return t.length===e.length?t>e?1:-1:t.length-e.length};return{onProcessStyle:function(e,r){if("style"!==r.type)return e;for(var n={},i=Object.keys(e).sort(t),o=0;o<i.length;o++)n[i[o]]=e[i[o]];return n}}}},,,,,,,,,,,,function(t,e,r){"use strict";var n=/[A-Z]/g,i=/^ms-/,o={};function a(t){return"-"+t.toLowerCase()}var s=function(t){if(o.hasOwnProperty(t))return o[t];var e=t.replace(n,a);return o[t]=i.test(e)?"-"+e:e};function u(t){var e={};for(var r in t){e[0===r.indexOf("--")?r:s(r)]=t[r]}return t.fallbacks&&(Array.isArray(t.fallbacks)?e.fallbacks=t.fallbacks.map(u):e.fallbacks=u(t.fallbacks)),e}e.a=function(){return{onProcessStyle:function(t){if(Array.isArray(t)){for(var e=0;e<t.length;e++)t[e]=u(t[e]);return t}return u(t)},onChangeValue:function(t,e,r){if(0===e.indexOf("--"))return t;var n=s(e);return e===n?t:(r.prop(n,t),null)}}}},,,,,,,,function(t,e,r){var n=r(887),i=r(355),o=r(888),a=r(602),s=r(889),u=r(142),c=r(467),l=c(n),f=c(i),h=c(o),p=c(a),d=c(s),g=u;(n&&"[object DataView]"!=g(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||o&&"[object Promise]"!=g(o.resolve())||a&&"[object Set]"!=g(new a)||s&&"[object WeakMap]"!=g(new s))&&(g=function(t){var e=u(t),r="[object Object]"==e?t.constructor:void 0,n=r?c(r):"";if(n)switch(n){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=g},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){(function(t){var n=r(446),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&n.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(this,r(299)(t))},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}},function(t,e,r){var n=r(388),i=r(354),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var a=t[e];o.call(t,e)&&i(a,r)&&(void 0!==r||e in t)||n(t,e,r)}},function(t,e,r){var n=r(472),i=r(914),o=r(474);t.exports=function(t){return o(t)?n(t,!0):i(t)}},,,,function(t,e,r){var n=r(353),i=r(880),o=r(881);function a(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,t.exports=a},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,r){var n=r(107).Uint8Array;t.exports=n},function(t,e,r){var n=r(478),i=r(392),o=r(295);t.exports=function(t){return n(t,o,i)}},function(t,e,r){var n=r(143)(r(107),"Set");t.exports=n},function(t,e,r){var n=r(478),i=r(604),o=r(594);t.exports=function(t){return n(t,o,i)}},function(t,e,r){var n=r(360),i=r(387),o=r(392),a=r(479),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,o(t)),t=i(t);return e}:a;t.exports=s},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";var n=Date.prototype.getDay,i=Object.prototype.toString,o=r(238)();t.exports=function(t){return"object"==typeof t&&null!==t&&(o?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===i.call(t))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";var n=r(17),i=r(122),o=r(426)(),a=n("%TypeError%"),s={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");o.assert(t)},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=o.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var r=o.get(t);return!!r&&i(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`O` is not an object");if("string"!=typeof e)throw new a("`slot` must be a string");var n=o.get(t);n||(n={},o.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(s),t.exports=s},function(t,e,r){"use strict";r(744)()},function(t,e,r){"use strict";var n=r(58),i=r(745);t.exports=function(){var t=i();if(n.supportsDescriptors){var e=Object.getOwnPropertyDescriptor(t,"globalThis");(!e||e.configurable&&(e.enumerable||e.writable||globalThis!==t))&&Object.defineProperty(t,"globalThis",{configurable:!0,enumerable:!1,value:t,writable:!1})}else"object"==typeof globalThis&&globalThis===t||(t.globalThis=t);return t}},function(t,e,r){"use strict";(function(e){var n=r(746);t.exports=function(){return"object"==typeof e&&e&&e.Math===Math&&e.Array===Array?e:n}}).call(this,r(74))},function(t,e,r){"use strict";"undefined"!=typeof self?t.exports=self:"undefined"!=typeof window?t.exports=window:t.exports=Function("return this")()},,,,,,function(t,e,r){"use strict";var n=r(753),i=TypeError,o=r(758);t.exports=function(t){var e=n(t);if(!e)throw new i("non-iterable value provided");return arguments.length>1?o(e,arguments[1]):o(e)}},,function(t,e,r){"use strict";var n=r(238)(),i=r(44)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},a=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,t.exports=s?o:a},,function(t,e,r){"use strict";var n,i="function"==typeof Map&&Map.prototype?Map:null,o="function"==typeof Set&&Set.prototype?Set:null;i||(n=function(t){return!1});var a=i?Map.prototype.has:null,s=o?Set.prototype.has:null;n||a||(n=function(t){return!1}),t.exports=n||function(t){if(!t||"object"!=typeof t)return!1;try{if(a.call(t),s)try{s.call(t)}catch(t){return!0}return t instanceof i}catch(t){}return!1}},function(t,e,r){"use strict";var n,i="function"==typeof Map&&Map.prototype?Map:null,o="function"==typeof Set&&Set.prototype?Set:null;o||(n=function(t){return!1});var a=i?Map.prototype.has:null,s=o?Set.prototype.has:null;n||s||(n=function(t){return!1}),t.exports=n||function(t){if(!t||"object"!=typeof t)return!1;try{if(s.call(t),a)try{a.call(t)}catch(t){return!0}return t instanceof o}catch(t){}return!1}},function(t,e,r){"use strict";var n=TypeError;t.exports=function(t){if(!t||"function"!=typeof t.next)throw new n("iterator must be an object with a `next` method");if(arguments.length>1){var e=arguments[1];if("function"!=typeof e)throw new n("`callback`, if provided, must be a function")}for(var r,i=e||[];(r=t.next())&&!r.done;)e?e(r.value):i.push(r.value);if(!e)return i}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){var n=r(798),i=r(799),o=r(805),a=RegExp("['’]","g");t.exports=function(t){return function(e){return n(o(i(e).replace(a,"")),t,"")}}},function(t,e){t.exports=function(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}},function(t,e,r){var n=r(800),i=r(256),o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,a=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");t.exports=function(t){return(t=i(t))&&t.replace(o,n).replace(a,"")}},function(t,e,r){var n=r(801)({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});t.exports=n},function(t,e){t.exports=function(t){return function(e){return null==t?void 0:t[e]}}},function(t,e,r){var n=r(182),i=r(447),o=r(95),a=r(297),s=n?n.prototype:void 0,u=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return u?u.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},function(t,e,r){var n=r(182),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(t){}var i=a.call(t);return n&&(e?t[s]=r:delete t[s]),i}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e,r){var n=r(806),i=r(807),o=r(256),a=r(808);t.exports=function(t,e,r){return t=o(t),void 0===(e=r?void 0:e)?i(t)?a(t):n(t):t.match(e)||[]}},function(t,e){var r=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;t.exports=function(t){return t.match(r)||[]}},function(t,e){var r=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=function(t){return r.test(t)}},function(t,e){var r="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",n="["+r+"]",i="\\d+",o="[\\u2700-\\u27bf]",a="[a-z\\xdf-\\xf6\\xf8-\\xff]",s="[^\\ud800-\\udfff"+r+i+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",l="[A-Z\\xc0-\\xd6\\xd8-\\xde]",f="(?:"+a+"|"+s+")",h="(?:"+l+"|"+s+")",p="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",d="[\\ufe0e\\ufe0f]?"+p+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",u,c].join("|")+")[\\ufe0e\\ufe0f]?"+p+")*"),g="(?:"+[o,u,c].join("|")+")"+d,v=RegExp([l+"?"+a+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[n,l,"$"].join("|")+")",h+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[n,l+f,"$"].join("|")+")",l+"?"+f+"+(?:['’](?:d|ll|m|re|s|t|ve))?",l+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,g].join("|"),"g");t.exports=function(t){return t.match(v)||[]}},function(t,e,r){var n=r(810)("toUpperCase");t.exports=n},function(t,e,r){var n=r(811),i=r(448),o=r(813),a=r(256);t.exports=function(t){return function(e){e=a(e);var r=i(e)?o(e):void 0,s=r?r[0]:e.charAt(0),u=r?n(r,1).join(""):e.slice(1);return s[t]()+u}}},function(t,e,r){var n=r(812);t.exports=function(t,e,r){var i=t.length;return r=void 0===r?i:r,!e&&r>=i?t:n(t,e,r)}},function(t,e){t.exports=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}},function(t,e,r){var n=r(814),i=r(448),o=r(815);t.exports=function(t){return i(t)?o(t):n(t)}},function(t,e){t.exports=function(t){return t.split("")}},function(t,e){var r="[\\ud800-\\udfff]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[o,a,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[o+n+"?",n,a,s,r].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+c,"g");t.exports=function(t){return t.match(f)||[]}},,,,,,,,,,,,,,,,,,,,function(t,e,r){var n=r(836),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,r,n,i){e.push(n?i.replace(o,"$1"):r||t)})),e}));t.exports=a},function(t,e,r){var n=r(837);t.exports=function(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},function(t,e,r){var n=r(353);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,t.exports=i},function(t,e,r){var n=r(839),i=r(264),o=r(355);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},function(t,e,r){var n=r(840),i=r(845),o=r(846),a=r(847),s=r(848);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,r){var n=r(263);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e,r){var n=r(204),i=r(842),o=r(181),a=r(467),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(n(t)?h:s).test(a(t))}},function(t,e,r){var n,i=r(843),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";t.exports=function(t){return!!o&&o in t}},function(t,e,r){var n=r(107)["__core-js_shared__"];t.exports=n},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(263),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(263),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},function(t,e,r){var n=r(263);t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(265),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():i.call(e,r,1),--this.size,!0)}},function(t,e,r){var n=r(265);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(265);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(265);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(266);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(266);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(266);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(266);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},,,,,function(t,e,r){var n=r(864),i=r(295);t.exports=function(t,e){return t&&n(t,e,i)}},function(t,e,r){var n=r(865)();t.exports=n},function(t,e){t.exports=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(142),i=r(137);t.exports=function(t){return i(t)&&"[object Arguments]"==n(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,r){var n=r(142),i=r(359),o=r(137),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[n(t)]}},function(t,e,r){var n=r(390),i=r(871),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},function(t,e,r){var n=r(470)(Object.keys,Object);t.exports=n},function(t,e,r){var n=r(873),i=r(890),o=r(481);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(r){return r===t||n(r,t,e)}}},function(t,e,r){var n=r(391),i=r(476);t.exports=function(t,e,r,o){var a=r.length,s=a,u=!o;if(null==t)return!s;for(t=Object(t);a--;){var c=r[a];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<s;){var l=(c=r[a])[0],f=t[l],h=c[1];if(u&&c[2]){if(void 0===f&&!(l in t))return!1}else{var p=new n;if(o)var d=o(f,h,l,t,e,p);if(!(void 0===d?i(h,f,3,o,p):d))return!1}}return!0}},function(t,e,r){var n=r(264);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(264),i=r(355),o=r(353);t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(391),i=r(477),o=r(883),a=r(885),s=r(589),u=r(95),c=r(389),l=r(473),f="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,p,d,g){var v=u(t),m=u(e),b=v?"[object Array]":s(t),y=m?"[object Array]":s(e),w=(b="[object Arguments]"==b?f:b)==f,x=(y="[object Arguments]"==y?f:y)==f,A=b==y;if(A&&c(t)){if(!c(e))return!1;v=!0,w=!1}if(A&&!w)return g||(g=new n),v||l(t)?i(t,e,r,p,d,g):o(t,e,b,r,p,d,g);if(!(1&r)){var N=w&&h.call(t,"__wrapped__"),L=x&&h.call(e,"__wrapped__");if(N||L){var S=N?t.value():t,_=L?e.value():e;return g||(g=new n),d(S,_,r,p,g)}}return!!A&&(g||(g=new n),a(t,e,r,p,d,g))}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}},function(t,e,r){var n=r(182),i=r(600),o=r(354),a=r(477),s=r(884),u=r(592),c=n?n.prototype:void 0,l=c?c.valueOf:void 0;t.exports=function(t,e,r,n,c,f,h){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!f(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var p=s;case"[object Set]":var d=1&n;if(p||(p=u),t.size!=e.size&&!d)return!1;var g=h.get(t);if(g)return g==e;n|=2,h.set(t,e);var v=a(p(t),p(e),n,c,f,h);return h.delete(t),v;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}},function(t,e,r){var n=r(601),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r,o,a,s){var u=1&r,c=n(t),l=c.length;if(l!=n(e).length&&!u)return!1;for(var f=l;f--;){var h=c[f];if(!(u?h in e:i.call(e,h)))return!1}var p=s.get(t),d=s.get(e);if(p&&d)return p==e&&d==t;var g=!0;s.set(t,e),s.set(e,t);for(var v=u;++f<l;){var m=t[h=c[f]],b=e[h];if(o)var y=u?o(b,m,h,e,t,s):o(m,b,h,t,e,s);if(!(void 0===y?m===b||a(m,b,r,o,s):y)){g=!1;break}v||(v="constructor"==h)}if(g&&!v){var w=t.constructor,x=e.constructor;w==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(t),s.delete(e),g}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}},function(t,e,r){var n=r(143)(r(107),"DataView");t.exports=n},function(t,e,r){var n=r(143)(r(107),"Promise");t.exports=n},function(t,e,r){var n=r(143)(r(107),"WeakMap");t.exports=n},function(t,e,r){var n=r(480),i=r(295);t.exports=function(t){for(var e=i(t),r=e.length;r--;){var o=e[r],a=t[o];e[r]=[o,a,n(a)]}return e}},function(t,e,r){var n=r(476),i=r(366),o=r(482),a=r(352),s=r(480),u=r(481),c=r(200);t.exports=function(t,e){return a(t)&&s(e)?u(c(t),e):function(r){var a=i(r,t);return void 0===a&&a===e?o(r,t):n(e,a,3)}}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,r){var n=r(262),i=r(357),o=r(95),a=r(358),s=r(359),u=r(200);t.exports=function(t,e,r){for(var c=-1,l=(e=n(e,t)).length,f=!1;++c<l;){var h=u(e[c]);if(!(f=null!=t&&r(t,h)))break;t=t[h]}return f||++c!=l?f:!!(l=null==t?0:t.length)&&s(l)&&a(h,l)&&(o(t)||i(t))}},function(t,e,r){var n=r(895),i=r(896),o=r(352),a=r(200);t.exports=function(t){return o(t)?n(a(t)):i(t)}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,r){var n=r(351);t.exports=function(t){return function(e){return n(e,t)}}},,,,,,function(t,e,r){var n=r(488),i=r(482);t.exports=function(t,e){return n(t,e,(function(e,r){return i(t,r)}))}},function(t,e,r){var n=r(593),i=r(262),o=r(358),a=r(181),s=r(200);t.exports=function(t,e,r,u){if(!a(t))return t;for(var c=-1,l=(e=i(e,t)).length,f=l-1,h=t;null!=h&&++c<l;){var p=s(e[c]),d=r;if("__proto__"===p||"constructor"===p||"prototype"===p)return t;if(c!=f){var g=h[p];void 0===(d=u?u(g,p,h):void 0)&&(d=a(g)?g:o(e[c+1])?[]:{})}n(h,p,d),h=h[p]}return t}},function(t,e,r){var n=r(905),i=r(908),o=r(910);t.exports=function(t){return o(i(t,void 0,n),t+"")}},function(t,e,r){var n=r(906);t.exports=function(t){return(null==t?0:t.length)?n(t,1):[]}},function(t,e,r){var n=r(360),i=r(907);t.exports=function t(e,r,o,a,s){var u=-1,c=e.length;for(o||(o=i),s||(s=[]);++u<c;){var l=e[u];r>0&&o(l)?r>1?t(l,r-1,o,a,s):n(s,l):a||(s[s.length]=l)}return s}},function(t,e,r){var n=r(182),i=r(357),o=r(95),a=n?n.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},function(t,e,r){var n=r(909),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=r(u),n(t,this,c)}}},function(t,e){t.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},function(t,e,r){var n=r(911),i=r(913)(n);t.exports=i},function(t,e,r){var n=r(912),i=r(471),o=r(483),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;t.exports=a},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var r=Date.now;t.exports=function(t){var e=0,n=0;return function(){var i=r(),o=16-(i-n);if(n=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){var n=r(181),i=r(390),o=r(915),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=i(t),r=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&r.push(s);return r}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},,,,,,,,,,,,,,,,,,function(t){t.exports=JSON.parse('["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]')},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,r){"use strict";t.exports=r(970)},function(t,e,r){"use strict";
|
|
285
|
+
/** @license React v16.13.1
|
|
286
|
+
* react-is.production.min.js
|
|
287
|
+
*
|
|
288
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
289
|
+
*
|
|
290
|
+
* This source code is licensed under the MIT license found in the
|
|
291
|
+
* LICENSE file in the root directory of this source tree.
|
|
292
|
+
*/var n="function"==typeof Symbol&&Symbol.for,i=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,f=n?Symbol.for("react.async_mode"):60111,h=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,g=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,w=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function A(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case f:case h:case a:case u:case s:case d:return t;default:switch(t=t&&t.$$typeof){case l:case p:case m:case v:case c:return t;default:return e}}case o:return e}}}function N(t){return A(t)===h}e.AsyncMode=f,e.ConcurrentMode=h,e.ContextConsumer=l,e.ContextProvider=c,e.Element=i,e.ForwardRef=p,e.Fragment=a,e.Lazy=m,e.Memo=v,e.Portal=o,e.Profiler=u,e.StrictMode=s,e.Suspense=d,e.isAsyncMode=function(t){return N(t)||A(t)===f},e.isConcurrentMode=N,e.isContextConsumer=function(t){return A(t)===l},e.isContextProvider=function(t){return A(t)===c},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return A(t)===p},e.isFragment=function(t){return A(t)===a},e.isLazy=function(t){return A(t)===m},e.isMemo=function(t){return A(t)===v},e.isPortal=function(t){return A(t)===o},e.isProfiler=function(t){return A(t)===u},e.isStrictMode=function(t){return A(t)===s},e.isSuspense=function(t){return A(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===a||t===h||t===u||t===s||t===d||t===g||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===v||t.$$typeof===c||t.$$typeof===l||t.$$typeof===p||t.$$typeof===y||t.$$typeof===w||t.$$typeof===x||t.$$typeof===b)},e.typeOf=A}]]);
|
|
293
|
+
//# sourceMappingURL=vendors~main~73914085.227c6747.iframe.bundle.js.map
|