Repository: JosephinCrafter/auto-yescoin Branch: main Commit: c652438a81fe Files: 140 Total size: 1.4 MB Directory structure: gitextract_yz3aohkg/ ├── .firebaserc ├── .github/ │ └── workflows/ │ ├── firebase-hosting-pull-request.yml │ └── flutter_dep_get.yml ├── .hintrc ├── .metadata ├── README.md ├── analysis_options.yaml ├── assets/ │ ├── animations/ │ │ ├── done.lottie │ │ └── loading.json │ ├── content.md │ ├── fonts/ │ │ └── butler/ │ │ ├── Butler_Black.otf │ │ ├── Butler_Bold.otf │ │ ├── Butler_Light.otf │ │ ├── Butler_Regular.otf │ │ ├── Butler_Ultra_Light.otf │ │ ├── butler_extra_bold.otf │ │ └── butler_medium.otf │ ├── qui_sommes_nous.md │ └── sample.md ├── cors.json ├── dap.ps1 ├── devtools_options.yaml ├── firebase.json ├── firestore.indexes.json ├── firestore.rules ├── functions/ │ ├── main.py │ └── requirements.txt ├── l10n.yaml ├── lib/ │ ├── ahl_barrel.dart │ ├── firebase_options.dart │ ├── main.dart │ └── src/ │ ├── app.dart │ ├── article_view/ │ │ ├── bloc/ │ │ │ └── bloc.dart │ │ ├── data/ │ │ │ └── data.dart │ │ ├── event/ │ │ │ └── event.dart │ │ ├── state/ │ │ │ └── state.dart │ │ └── view/ │ │ ├── article_content_view.dart │ │ ├── article_view.dart │ │ └── highlight_article_tile.dart │ ├── assets/ │ │ └── assets.dart │ ├── constants/ │ │ └── constants.dart │ ├── firebase_constants.dart │ ├── localization/ │ │ ├── app_en.arb │ │ ├── app_fr.arb │ │ └── locale_utils.dart │ ├── newsletter/ │ │ ├── bloc/ │ │ │ └── bloc.dart │ │ ├── event/ │ │ │ └── event.dart │ │ ├── newsletter.dart │ │ ├── newsletter_repository.dart │ │ ├── state/ │ │ │ └── state.dart │ │ └── view/ │ │ └── news_letter_view.dart │ ├── pages/ │ │ ├── articles/ │ │ │ └── articles_page.dart │ │ ├── homepage/ │ │ │ ├── donation/ │ │ │ │ └── donation_page.dart │ │ │ ├── hero_header/ │ │ │ │ └── hero_header.dart │ │ │ ├── homepage.dart │ │ │ └── welcoming/ │ │ │ └── welcoming.dart │ │ ├── novena_page/ │ │ │ ├── novena_article_extension.dart │ │ │ └── novena_page.dart │ │ ├── prayers/ │ │ │ └── prayers_page.dart │ │ ├── projects/ │ │ │ ├── project_page_view.dart │ │ │ └── projects_page.dart │ │ ├── rosary/ │ │ │ └── rosary_page.dart │ │ ├── saints/ │ │ │ └── saints.dart │ │ └── who_we_are/ │ │ └── who_we_are.dart │ ├── partners/ │ │ └── view.dart │ ├── prayers_intention/ │ │ ├── bloc.dart │ │ ├── event.dart │ │ ├── model.dart │ │ ├── prayer_request.dart │ │ ├── repository.dart │ │ ├── state.dart │ │ └── view.dart │ ├── prayers_space/ │ │ └── view.dart │ ├── project_space/ │ │ ├── bloc.dart │ │ ├── model.dart │ │ └── view.dart │ ├── rosary/ │ │ ├── rosary.dart │ │ └── rosary_prompt.dart │ ├── sample_feature/ │ │ ├── sample_item.dart │ │ ├── sample_item_details_view.dart │ │ └── sample_item_list_view.dart │ ├── settings/ │ │ ├── settings_controller.dart │ │ ├── settings_service.dart │ │ └── settings_view.dart │ ├── theme/ │ │ └── theme.dart │ ├── utils/ │ │ ├── breakpoint_resolver.dart │ │ ├── date_time_utils.dart │ │ ├── firebase_utils.dart │ │ ├── seo.dart │ │ └── storage_utils.dart │ ├── validation/ │ │ └── email_validation.dart │ ├── who_we_are/ │ │ └── view.dart │ └── widgets/ │ ├── actions.dart │ ├── app_bar.dart │ ├── audio_player.dart │ ├── drawer.dart │ ├── footer.dart │ ├── forms_prompt.dart │ ├── loading_page.dart │ ├── logo.dart │ ├── my_flutter_app_icons.dart │ ├── prayers_request.dart │ ├── promotion_bar.dart │ ├── prompt_card.dart │ ├── section_title.dart │ ├── space_view.dart │ └── widgets.dart ├── pubspec.yaml ├── secrets.md ├── storage.rules ├── test/ │ ├── articles/ │ │ ├── article_view_test.dart │ │ ├── articles_bloc_test.dart │ │ ├── articles_repository_test.dart │ │ ├── bare_test.dart │ │ └── collection_utils_test.dart │ ├── breakpoint_resolver_test.dart │ ├── breakpoint_utils/ │ │ └── separator_size_test.dart │ ├── data_storage/ │ │ └── firestore_test.dart │ ├── newsletter/ │ │ ├── newsletterbloc_test.dart │ │ └── newsletterbloc_test.mocks.dart │ ├── prayer_request/ │ │ ├── bloc_test.dart │ │ └── repo_test.dart │ ├── project_bloc/ │ │ └── project_bloc_test.dart │ ├── project_page_view/ │ │ └── build_relations_test.dart │ ├── unit_test.dart │ └── widget_test.dart ├── untranslated_message.txt └── web/ ├── flutter_bootstrap.js ├── google-site-verification=zW71m6kfnZRv8zRIyqnpIJgMvlVlE0tK1aLMdqrTojg.txt ├── google91970a171ec523e2.html ├── index.html ├── js/ │ └── lottie.js ├── loader.css ├── loading_rosary.json ├── lottie.js ├── manifest.json ├── package.json ├── site.webmanifest ├── sitemap.xml └── style.css ================================================ FILE CONTENTS ================================================ ================================================ FILE: .firebaserc ================================================ { "projects": { "default": "aujourdhuilavenir" } } ================================================ FILE: .github/workflows/firebase-hosting-pull-request.yml ================================================ # This file was auto-generated by the Firebase CLI # https://github.com/firebase/firebase-tools name: Deploy to Firebase Hosting on PR 'on': pull_request permissions: checks: write contents: read pull-requests: write jobs: build_and_preview: if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: channel: 'stable' - run: flutter build web --release - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_AUJOURDHUILAVENIR }}' projectId: aujourdhuilavenir ================================================ FILE: .github/workflows/flutter_dep_get.yml ================================================ # An action to update flutter dep name: Deploy on merge with cache clearing 'on': push: branches: - main jobs: build_and_deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: channel: 'stable' - run: flutter clean - run: flutter pub upgrade - run: flutter build web --release - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_AUJOURDHUILAVENIR }}' channelId: live projectId: aujourdhuilavenir ================================================ FILE: .hintrc ================================================ { "extends": [ "development" ], "hints": { "meta-viewport": "off" } } ================================================ FILE: .metadata ================================================ # This file tracks properties of this Flutter project. # Used by Flutter tool to assess capabilities and perform upgrades etc. # # This file should be version controlled and should not be manually edited. version: revision: "a14f74ff3a1cbd521163c5f03d68113d50af93d3" channel: "stable" project_type: app # Tracks metadata for the flutter migrate command migration: platforms: - platform: root create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 - platform: web create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 # User provided section # List of Local paths (relative to this file) that should be # ignored by the migrate tool. # # Files that are not part of the templates will be ignored by default. unmanaged_files: - 'lib/main.dart' - 'ios/Runner.xcodeproj/project.pbxproj' ================================================ FILE: README.md ================================================ Visit [Aujourd'hui l'avenir](https://aujourdhuilavenir.org) to see how the website looks like. ================================================ FILE: analysis_options.yaml ================================================ # This file configures the analyzer, which statically analyzes Dart code to # check for errors, warnings, and lints. # # The issues identified by the analyzer are surfaced in the UI of Dart-enabled # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be # invoked from the command line by running `flutter analyze`. # The following line activates a set of recommended lints for Flutter apps, # packages, and plugins designed to encourage good coding practices. include: package:flutter_lints/flutter.yaml linter: # The lint rules applied to this project can be customized in the # section below to disable rules from the `package:flutter_lints/flutter.yaml` # included above or to enable additional rules. A list of all available lints # and their documentation is published at https://dart.dev/lints. # # Instead of disabling a lint rule for the entire project in the # section below, it can also be suppressed for a single line of code # or a specific dart file by using the `// ignore: name_of_lint` and # `// ignore_for_file: name_of_lint` syntax on the line or in the file # producing the lint. rules: # avoid_print: false # Uncomment to disable the `avoid_print` rule # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options ================================================ FILE: assets/animations/loading.json ================================================ {"v":"4.8.0","meta":{"g":"LottieFiles AE 3.5.7","a":"","k":"","d":"","tc":""},"fr":120,"ip":0,"op":1200,"w":3000,"h":3000,"nm":"loading composition","ddd":0,"assets":[{"id":"image_0","w":55,"h":45,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAAtCAYAAAAKlvO7AAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAADQUlEQVRoge2aT1baQBzHvzMRulGRE5QbFE9QbmB6AmEjj50uKfoaXxvd4ooHG+EGeILGG+AN6AkwqStD5teFgCEJIX8mKL5+NjBMmPl9mMn8C8B/thMW9cKJdnug5GyVQZQJrPxaAI0IfOTYuWFRqz1mE2Yy1spNrjslxeEaGI7XlkYYOIrQis3GWEZwT3qvDAC7rZNRku+Hypl6V2PAj/iF0s3U/qTFbUnrqqtCQAWDCqDgyf4DgsFI9PcuGka0OAJ46YLPQwBf4wTnDYaDqVF+deuqq4LQBvA5Ytn3TAhtnaRPbqLdHig7zwYYvkSsKAwTYKf7rZN+UObsPu4DdJSkcAIuC626tirfJ2fpvWHSylbDal5BaT8iYeBM86dBtwB3J6yrripfDADo1tJ71XnqSe+VldzzSErvYDh+af2gLBeW3h0jer+PDQc7BAABMuAfMFIR1EUXcn9/dirE+W+ZFQZgzl6lis3hYIfuAey1W3KmZlGhhwIyEgMAAWju9ELOverYXuhoct0pzVM85MqtRBFKZf7+w8kxiEUP/HBy7tvrw8m5cQ0oMN4wDomwxUplIccYEm0r3hsE8s9z+9/rQ7xOslsLF8JYvF/KIQw3HYxkTPc2aEnOUYS26WhkQkDbnV6SKzYbYxAGmw1JGqbgou/+wDcVzFpv6+49AtresxufXLHZGBMtL0C3AFPY+bb3w5UHRJbeNZDuDGVzMHybjfZLrFyhOHZexVZ0T3YXJAaEyBW12iMTYhN7vDSYjp2rrsoMXVvuXTQMIpxJD0kSTAg17Gx07cK5cF5vv8/pgdVin1uuwvrVlXNaJQPCYP+8Xl13WeQtjzPNV0B4SBWUDCKKATFaDpg9FBF8hAwPeUKJIQbE3KwWm40xB6vgLaaImGJAgp34butktGlBAi7jigExu6WbJ71XzuLk2EPog5R1JJYDMheM/AhsFakOiLLrouzOsfPlNGJAypabI7EFTSJohfO6b4WfBClygARBwgNnrJq2tdxIkwMSC5oEtMOekCZFqhwQW/De4aIq698PXqTLAZEEUw3xUcnkON01it578xjoxrHzpazFXurKmMl1p7QzRQkApjsYZ9UFg/gH1DJFFF6qRFMAAAAASUVORK5CYII=","e":1},{"id":"image_1","w":61,"h":50,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD0AAAAyCAYAAADvNNM8AAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAADfUlEQVRoge2a23XaQBCG/1nxaIRdQdxBSAWhgpztwOIY/EwHoQR4tZMD7mDjBiJ3gCqIqQDL8SPayQOIALqg2wrfvicBw878Z3ZXqxkBH7wPqMifnq9lW1tos8b5ZiCBh0DAPeuqh6qCM0Vm0YuJPG8EGDDYAdBKMZ0z01Q3MDrrqscywS0m8lxoSNJagujr7q/sAWIGQNk9pfKMe1D0YiJPxRIDIv6eK2LAZ6ZREfGLiTy3AgwBvsjqi0DTpYVRlpmWKvr5Wra1YAXgU0bnccyFJnlypWZZjJ9+SgfMI6TPpiR8Zhq1+mqYZpQouqTzGE/UtS/VNM3k6Yec5shuCuwFlpBJWY8V/fdGdpj4d3nn+85o3Oypwf73i4k8tZZaRddtKXyhqRM3wyKiV+uJZ6gqwxHo1u4pZ8vfqRVoF6DPBpz5gUXt/YyLfStrqacwJhgA+MK/kUPAuGAAaK317LCT6fU6nhgKYM8zdcHoVLOGD/va3k92M621YzyAEOZJLYJXvobbHzeZXq/lP7UEcQSEpi/hprbJtBWgfbyQzBMQZHi9Ec38tkUTdCe8juze74EP0e8FsXVV6jHwpUMkNsfR7d3bPUo0NcGEqOj1Pcw/SkQ1EIj/Sd1b05SrAvF6YG/7oWNHNDGmdYdTCyRG2x93RDf7ygXzfb0RGccPBHZmcOSWRRDD2sKpAWaK1Ogiopt95QL0q7aozOLrBkb7X8YeTgILDt7ATh6XZSBB9MqQHONRmSU2y0DKMdTuKUWgsbmYDEM0SKq3Hyz2P918cyuuUpqH+d7u33WSfj74wBE0hFy1UF4NftAQTprBQdFnXfUotHDwWja21bR+SDPJ9Gh5cqVmQlMHL1443R7qogA5W7WmOh/VwJ7du8tU8spVRGj2lQuibrGgjDIPLNHJapy7cmJfqukLE+4LTTJPO7jQmwhAzd2QZBKbdGkUFg0cXXghwUBJ0cBmc1Mw2vSLUFgwUEE1tNlXbr23M/bKCAYqyHTI+lUNF2bbvF5giU7ZF3gqEw2EwvXUTL95t5lfaqQqBtnGQKPdB9Egy0krK5WLBqoUzp7QwimzfuMwIjqkzNtCBBovLQzLrt/4sQ1TQPicmJxVrc4Mxht4dk85WSswBBoHFrVNCl75qYn00xt7xGJgWmxIbaKB8PQGB9Dt9SY3Z6JR61LFFvA+qJB/5nd5iq2mrRcAAAAASUVORK5CYII=","e":1},{"id":"image_2","w":66,"h":54,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAA2CAYAAABz508/AAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAD6klEQVRoge2bTX4aNxjGn1dTiBc22CcI2UC9CjcoNyg9QccbqFchJyg+QcmK4g2TG9Q3wCcorIi9cXwCPLiL/GyP3iw6QwYYeb5HTuz/ahBCevxYHyPpFfACAIB0C0jCcH7bEiSbIOyvEhk3ksX0+HBvkqTMxEYEigEgpZjs7DxMj94c3CQtW1WfIbjHwK9heQk4cyQN4pgSy4jTy/+azLIHoA2gGiaGAavbqPwTp45NhvPblhA8APA29o8Z55KpH8WQSEYM54uaIYxBlP9GANdSkpmkyY4u7D5Afyaocw0m+vBHfa/3WJ5QI04vlyYzBghpAWEQcFYqO2aULjO+Wuzf3xlWQuNVzMplp6Wq/1EjRhdLC8DvGYq5JhLtTn13qsowvlrs390ZEyTpCuEozVAakYMJHjaRaAWZkbMJHoFmiKCcOZoAAFVmORnOb1v+xIJMAIC393eGtZm41SJGn+weiP7KWQzgaxnubDRBynEoJr/5Z7Q1I4bzRU0IY1qgIJsIvSwG4wRcdxuVmvdhrWsIYfQLFlRlxrjgOj1ejy6Wbe/Dyojx1WIf+Y0LTxICTO95ZcT9vdEOzP0Dw0DLe14Zwfwt8RlRdXuCb4xg1HSp0cmXLz81AcV7xHPkxQiXZ2/Ezs7DFHgxwvbWHN+MIJ7oUqMLAibes69FkHJp/MNCWK01Vkak3VL7HimVnG0jXD4WrEUnH/17EmtGSElW4XI0sfm3bu9HXCw/A3hdkB49MM67P1da/qSt6ZMI/aL06IIErK20oIyjT8sJCL/krkgPs26j0txMDHyhkkz93OVoQkoKPN8INOL4cG/CRB/ylaQBxrnqoEn5iv2q9NAHcJ2TJC1IdkzVd0ojjt4c3EhJyh9+f/DJ8eHBZ9W3oUd+f1/eDoj5XaaaiidwgPQTuvp0D09nmUnSAJEww/JEWoZL6bQB2GkFaYH5/WNnrR6R4yPc06h/06kqFgLOOo1KpN35yBsznfrulAhHyWUVzqxUVs8Sm8TaoerUKxbAJ3EVacAmEpFiMTwSxVDlfFqeFmXYwWMk2rPsNiomnujeBRF6cU0AUoYXPrWWQYSj/7tvgt+mrfypmJHGBCCD7fxuo2KC+X3actKQ1gQgw8hbN/punFV5EbGlpHbSaFs/mYYgFxwClGh2UJHpSVenvjstl50a8l+bzKR0mlmZAOQYlJ7XqjVO4GrMcvPDjVGykFlX4ZNuo9rPpqx1cr+mkFE4cWaDoorC7mskbh2M8/Irp511V9ik0IsrbnTtAJFfwPLrCptoucHj3sGwoD5RmxEJM8tZIQytV5lOL5cmGG03zK8KwAZ4UFQreCGAr7eWeJMXlVNmAAAAAElFTkSuQmCC","e":1},{"id":"image_3","w":72,"h":59,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA7CAYAAADYW8woAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAD0ElEQVR4nO2b3VXjMBCF7ygFLB2soQFogCBVsHSAqWChgg0dmAo2dBAqsEgaSBoApwNSwGr2IQ5JHDv+k2Un5HvhHFmWhxvNWBqPgBMn6kA2Bgk9eQXgbKNpqiL9aWPstqkkUOjJKwjjg0kCfJnei+cAaTCPVDQZ1bAxzxYJABBm+dcIDQAq0trG+KUECr1rH0Q+gJtyj+E5GAMVTYbl7suyQ0qQeQAgAfzI7kkzEI9gxEhFelrlWYUEig0aoLQwO7yBha8iHVW5uZ4dNAOboOyPlCtQeNEPwPhd3qBMFmD2y7qdPTtoBia/6IzKFCj05BmIdXaMqQnzfZFfszE7CE/qfTzI7+bSqCQ5IoWevAIZjb1xphYv6mPs7+sgUlvJjBoXBwCI/obetZ92yYE4AHAXnveH+zrsCBRe9AeoH4yLQxTE66i1DW7EWXEXXvSDrItbLhZ60gOZKdwYtmnGDExSRfpz6d7/pgD9dGoCC5W2dtqeQcI8wLk4AMCXIBOsY59jcQCAOHUWbc+g8/4nWhHoi0Wrz095aXzNoHjJ3qY4aP35RLfJprWLrfYy35tfoSc3N90bAjE819Z0lK036maQ9tza0VESnpS+UDzxxUmgHDYFOooMoG3WAhEqJZSOnbVAhk8CAYDhLU/acLHeSSAASR0SW43rqJV9UHdYqI9xxkIRAIga+/pwIOhkw7ZARgwdGdJNmIfJpp2Ua3h+M3WSTewcPFcfEy/ZurtQZJOZXTtqGIO05vSk/bcL1umzB8jaamSoebTs+X+zv4t9n1n0pj7GMuti9maVe751U7oIi8G+y5kCxRn+V8vmdAvCc14VyP50B4sHLBPpRwjPYfbPHiBHIBXpCMy5gxwk3POLFHnlJsxUNAlwbK5WwLVWFMsosvBxNK5GM/U+fijau5BAKtKfYLHzzegAWSzLBotTOCetIq3B/FjapC7BQpYtLi2VtI/j0Uspo7oC832VOsVqVa6HtuMvWM2WRrXPPkwSoFmle11DeK5TXVu5kNxZmV49ckvs8qhVad9xkWqLA1g4itBJkWrEnCS2zmp0RySL4gCWBAI6IdICLG5tndFYYa14YbnaJolW1kk0ixeB2vrItgcE4lJixp8mxk7hNT7/0UjxRSMCAV8ngwI0WXfI/Biv7hujMYGAVUE4D+3HJZ6De7dVjziVodECKhXpaRyXbOaTXsC9KxfiAA3PoE0suFylY1R1cSYQUMvlGg3E+3Aq0Iribzmex7lj3bhRGbQiEFBgNhGeYETQ9unp1gRaEccmiXWddgQWg6rnWk845j8zXJssMavYjQAAAABJRU5ErkJggg==","e":1},{"id":"image_4","w":77,"h":62,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE0AAAA+CAYAAABuv5bfAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAEfklEQVR4nO2cTXraSBCGvy556cH2CcINopwg3CAwzuz80zlByA3wDewTRLZnFzOyTzDyCQI3wCcgIixR1SwQDLYloX8JzLtD3VLX86m6JHVVA+xIjEp7oranpsdsKkgTokwoHK5cdQSREYsa7BmeY3WOfuVibU1IJJq2pyYLdyFoAzhIcOpQgEuDvPttEDCWaPrH7xaT9AB8zDieK0D39rhhZbxOpUSKpu3xIXuGBYVPOY/7SOS18/Y6bU9NzOT/MLE3GxTh2aGiaXtqMvM9gHd5D+rzRERtq7M/SHuBk7tJmwhtCEwA7yO6DqGUwyzO358b92nHWxAomi+Yg2RxKw0ukddM6g2n/YlWQA/pbqgLpSxSs0urczRKcf5r0bQ9bjIbAxQv2IIhkdeKI5xvm4XssXWOUlekZr2kN41eHmA27lGeYADwnsW4XNdJ//jd8m9mPoIBgMhXZmOg7amZ5LRnop323S6iY0MxCM5P+xMd1nzan2gm+RfF3Mx3zPwzavyXLKentseHzMaoIMPi4BJ55ss4c3I3aZOCXYYBAnyJ8zq09DSPjaQvrHlz4MerJdqemqRgBXfPHwV8jzNVl6IpoFusSbH4eNZ3e8DC89lCyTeSmR1tjw+j+ihgOTXH5Zi1HiL6wCIaIl8rMUDh+ubPhg5rnnvabC/R06NomNmpTDAAEJxre9wMayYAYOJWWfbEpMrYCgBgMXphba/e03b4zFdyAtmJFs7Byd0kULidaBGQksBYvxMtEtUKOkoAIFCjMk3ZdAgADN6JlgQCAOuvP5yK7dgoVmPaY2VWbBhL0QSSeRl46xAELk4uRTPIcEozZlNQEpi/WIrmJzieSjNoAyAmJ/D46g+BrF12fkO4YQ/IZ6IZxLu4tkAhVItnolmdoxEED8VbVH/IU1Zo26sDonZTFHiMend9JZrfeVigQbWHWPUi24MOCvCWvS3Sy4AQ0fw01pv8QiDy9No+oQ1rXHQ7kYs49R2RpVZnd5P7Asqs6srw5rgRK8EUuQhJhtcF4OZiUs0hIh27b1Tj3FW3/ytBIN+S1MnFKh89608GqKIwpgwEDzefG6GZpyBi5QiSuO6GMSRj/dPyJbFEszr7A4F8S2xSvXHT1v0mKonfoqepS0SttPW+iVJ4vitv+ppbJsGAFDtW/CLmn2kHrJjMggEpksXz+IYvWQatiFwEA1Jm2G+PGxaUuso6eInkJhiQYUMZAJz9M7EgOM/DkAKJXXIfl0y1HKS8Luq89iZ4yFswIKOnAcvSUwe1+2KQi5vjg14RV84sGlCLcvpVXBboPPZAhZFLqZXVOfpFRC1UvyLySOSZRQoG5ORpC0rciBZAcdPxJbmKBlQiXOYtkEnJvRLS6uwPSpuqSl3NtwaVJxhQgKctKNjjnoiVrqqurrCa2+I8Ti6IPLPKQsTCPG1Bjh43JCJd9lQMonDRgMzCuQLp3R4f1CZXUUpJ/Hyqek0kTUArXBN5Zp0EA0rytFVibdpXuCZFl3WYikGULtqC+ZT1nmWBtvVvdnYA+A/3ztJz3tw/3gAAAABJRU5ErkJggg==","e":1},{"id":"image_5","w":74,"h":63,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEoAAAA/CAYAAABHP14DAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAElklEQVR4nO2cT3biRhDGv2oZMgsH4xOEOcGQEww5wXCDwMa82THLDM6L8mzGy+AVDzbgG9g3kE8wcIIxJ8Bgb2LoriwQRAxIIKE/zZjfCvSk7nof1erq7iqAA1tBSRsQNk8XzQIbIsuMPAAQ6IGUfJjKN71Ts/wYtN29F2podrLi6KVEhCKA9543M/pEbE0FN07/+Pjgp5+9FWpodrIi9VIloArgxH8LdCeFrG4r2F4KNf7SKoLRRSCBliHw9XTyk7lpWAYW6rnezktwkYACgDy+N9p2cyayMp8rt0H7cTI0O1nj6KUBwu9htLeA0RdEpePaWc/tFl9COdy9BOAXH48OmNFQ03Q36AvVFskC4V2Q57dgJEAFN7G2Fmp02aoSwcRu7j4AyMzUzrp+Hnqut/MKbO3Y9za4irVRqOFVM2dIcRvyL3kvQFUvV58To0hz1oolvJ54rrfzhhK9CNz9vQJ/HV22ql43jevtUswiAcCJYu4OzU7WedFVqPGXVlGBvyJCI4nwz7jesoZXzdxK//V2CeBOlP27G4Z3IvVSXb60hiTcHYTSfHYc1VsmAX/F1LcrUqi38zhrRaih2ckaqZce/M1qIUF3YH4MffoPCAN/n9QqJrBm6B2l/jWRiEgAwB90EQkA7DBo/vl/hlfNnKHEt9gt0hgB+vW4dtZb8ihDCjMhe7RFMhcAx9AbXjVzOrm9NhCygEMoIUUxOWv0hUB5wCGUvZ9zYAVe9ijMdgAOuOAUKv4IeA9gwAJsoZ4umoUkjdkHPBfFBwChlAUchNrIVL7pAY7IfFxvcXLmaAqjnzmvLIcHAEYJmaMtDHTnnx1CkRW/KXqjDLU4FFkIxcxWItboCqPvPPNbCOVU7wAAoobz60IoW737uO3RlJGcpJYcZyk8IKXMWM3RFAKvnD8uCfXznx8tHLwKU8GN76+tBJyv3qsYN+sSN1aEmnkV3cVhk45IY72jrF3CSCGreI0BqIs3AS5CzW4mz1PcH5CRmzcBHoviWSLF6xmCDHhm4XnuHshJqgRgELJNOjJQk/TKTOfEU6hTs/woQD/8XjopVdqUt7VxP2qW/kLl8MzSDbqz40dPttq4y9TOumDc7GyTfgzs18tGfKUmjuvtW4A/BDJJQ0ip37bxJsDnVrCcpEpg9ANZpRkEvt5WpNn9Pokh6TQO7jO1SsHPA74PF07N8qOcpgt77FkjOUn7nskDncLssVgjASoESeEOfFy1n2Jtl4m8jp3O9RZi7cFShxmf/Oa3OwmtFmZ82epqm1/FuMmcV0q7NBFq0ZAj5VkfQhAJiKC6KoHUa3dCEgmIIPfguHbWk5N0DknvvYcoEhBxvV5iifUhiwTEUNhoD8VbxJW7HoFIQAxpP/ZQzBP4Ouq+ACpHIRIQc6ns00WzwCQa0awTqbxLnLSx9aga9sJ+dwUsml5tzqtyMywSK76elZMYjZ32txh9aaii39L8ICRepR54ODJu5DRd3eVPH/yQuFBz7KjexBazIzM+nZxXPE9NwkYboeZsKPKO5X20Du2EAubFlZMimAsg5AB6ZGZrl78DOBAT/wHSltPK6CHTmQAAAABJRU5ErkJggg==","e":1},{"id":"image_6","w":83,"h":68,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFMAAABECAYAAAD9YQkjAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAE5klEQVR4nO2cTVrjRhCGv2pjZ8OAOQHcAN9gdIOQE0RsIKzGs5w4eaJ5wDPLwIqBDeYGvkHsE8TcAE7gH1hkbEuVhWUhy5Jp/bUsj96dJbdUz9dVLXWrqoGCgnWE4l6g//X6oGSVNIJVY1DNPlwDsAvgCcAjQAMG94Rldd79edaJe891JZKYfeOuKrbGOgE6CIchmw/BaBNbrbSF7Rt31a3SfzVLCI0YByAczM8RuGeBBkl2cCgx+8Zddav83WCQjpnnxaVLlmUkLeroy80RmHSAf5ZsMgSjDYH2zu+n7aj3lRZzeHFTJ4KBZET0GMFX7xq/1eNeZ9S81QE2AOzHuMwTQMZO46QVtuGbYvaNu2qpPGmF6OVoMB7MaUXbM44HYZu+NG9rFvgSwPsELeoKUH27cdKTbbBSzP7X64OSKdoRxsVoRBDU9sZLpBAxM5Pwebdxasj8N1DMmUeOe4gXMuEJIejo4qYFwq8KbLo3p5X6Wzb5itk37qqlrXFHmUcu091pnGpBJ+2ObiPZsF6NRCcLv4Nb5e9GhkICwPvn5rdLvxNOR6sUEgAIh/Z9A1kS8/n8WmPQh9SMkoRBH0Zfbo68xzONGMJhUCcDPmKyEEaqBoWB0Xpp3s5nVfMxMsuICexkwDNmPp9fayzEP2rMksQeq0R5XCfgr6zNsXkyJ5Wad/xc8EwmoSs1SQbCYak8bq+RkACwL8rjpUnGYpireM2IhtqHjQQE6N5jjpjP59eaSmM2gH3v2OmIaQmhqbYm91jwF1OAq+qtyTkEzf3TEdO1sFsgz8JU23cGVCCP+z24EDMmbJnO8FiImSCvYjIeszNjM3h9AFEhZhRIlJwppSMmEaSX5wtecX/WcMQ0x5VOFsbkGsaD+6cj5p5xPPCeLHiThWheeJoTcUepKXlHoL3408VUcOAqcsESQ2/CwoKYe5/OHgF0VVqUWxhLmR9LL+1kWYYSY3KOWVrWaUlMO++n8M5VMO7tKF7AdzpZeOdq/LwSCBCz8M5gCHzl55XAioUOAYqdlbaBDKeTn4ygk4FibjdOemDcp2JSTmGGETo9Zo45rdQBDBO3Kp90d/84XfkevlLMWS8U4Q7IDXtvLg7bGbQ/9MOIgc8ySa9SK+2msHT8qOHOeJBNdpUSc+/T2SMzpC64YQzNkuWbpOVHqGqLUfO2nXpu+zpB+CVM9UWoD2rmpKxjVii18RD4KmwZS+iiKruy4d+w7XLGyjTwIEJ/6t1unPSY8TFsu9zAeDAnFelx0k3k2klllQ5qGQqQFqb2x02sQtTRxU0v67ToBIklJBAzo8OcVrQN+QgXW0ggpph7xvFAEOnI/Qt9uLK+wKskYYr9hO8gpZK7dKHjKEWnvldK4iJALgVNJLTdJCYmkCtBExcSSDilcLtx0hMgDes9hj6lISSQsGfOWVsPjVHTLkMqya5r6aGzMufUhARS8sw5L83bmsWcfb0j4+NbnxySIFUxgcxr14dkWUeqtv9JXcw5Gczlu+akcpRmWHtRJibg7EDzd9r3URXWXpSKCThl2G2k8aRnPAgiPY3XHhmUiwmksytNmF1e0iITMec8N79dxt7CImNvdJOpmECssB8yw8hibAwiczGBCLt6Se4zpJq1EHPObEM8tBDspalsxJcUayUm4NpOkuD5qEWtpNYdC3LA/zxI80YyvHGBAAAAAElFTkSuQmCC","e":1},{"id":"image_7","w":87,"h":74,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAABKCAYAAADOgMgpAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAE7klEQVR4nO2cTW7aWhTH/8d2Z2kIK0h2UHbw3B2A1ETqKCCVSB09uoLyVvB4o0pxpJBRpThSyApKdkB3ACsAQ2e1OW+AqWLA39f2hfg3SmKce/Xj+tyvcw2UlJSUeCBR/2hhmPoSqClEZ8xc8xRCNFoyj1Xm4dHVxUhUmbKTSu785qEO5jqAOoBKxNssAAPHtrvVzx/HacqXnURy59f3TRB1AZymLP8uT8kLw9TXP9uaNqq2GrMsy4sld2GYOgN9pJfqgYF/Ku3zrsj/+ev6vsaK0nRD1F8BH50AGDEwFB22Istd3Dz0mPlvUQXv4NnRtHra1iTgqZow0FtqWj9tXULlTm8fT9Tfv4cgepemoIhMFOZ6ktbjxv8exD1Vliu5l1RyoNycxa6xFGY9quDp7eOJats9AJcZ1WdCQPNt+3wY90Yl6GIBYgGgsiQaTr99Pwv74J8vPzuxAHDKwA/LMLtxb/SVu7h56BUgdk1FVdXB9PbxxO8DeT9VBHydG2Y/zj075S4MU8+48wqH6J37uG9RULgCgMs4gnfKZaArqjYpuZxf3zc3/6ja9qDAp+oyaojY6tDcsewP4VVKjuXYdm090bAMs0vA14LrBALeh3VyWy2XgWZWFUpIRdW0HrD64mUQCwC8GvYFstVy54Y5Q/R1gvwgaggex6aHuXV8ddH3u+xpue7cWz6xAMDch0xiAbgzQV88cpeAnmVdUiLjl3766/q+5nfRI1ch8h1XluyGFaXpd80jd3ORuyQcXi51v2uB09+SCASMt0u5AvCLu6VcAbBPX7Upd5x9VV4P3g6tlCsUZeOXYUH12GuIeedOhUeurWmvJqdAJH67Jh651VZjBuaf+VTpQAjwtb0qRtTPtDIHBinK0O/altylbQ8yrc2BwQH91M7d37lhDhGcSFGyYnLcPj/zu7h7EkEUuhBcArjZR77slHv86cMAqzSfEn+spbtD4ofv9Jfk2+6RCgZCM3ECM27K2OtLYKxdE7hwQ/JssUtF1Kc6UK67dXwnoD6HxF3UvLHQJUfHtrtYZYOXAJajaZ2oHw6VW/38ccxAOTQDAKJmnHTSyMnPc8McQ7at7Xx5Om6f1+PcEHkn4pUPzSaOpjXj3hRZ7mvu3BTmRMcJYu2hucH8VXVuDHxJegglltxqqzEDUTNJQXvKU6V9nrgzj7376647PCUtcG9g/pkkzr4k0da6W+ghL+xYjuOkPraVSG611Zgpq2Oph4ilMOsiTnUmTgo5uroYMfAlbQWkg7kj6hRl6lPr7gGMLI8q5UdIMnNcUqczOZrWOYgdY8FiAUHvW3BPMY4hZ4JyOBmIBQQl4rkdnI59nGBkJBYQ+KYQYJVKuSQaYl9acIZiAcFygb0RbBFQT3JYOg7C83OPri5GkoeIicKsZy0WyKDlrpG0BQt5YUZUMpMLyCU4i1e9hJGpXACYfvt+pqpqkQehc4mvu8hcLlDoEf5cw8AmucgF8hdcRBjYJDe5QG6CCwsDm+QqF8hccKFhYJPc5QLZCCai/95++hA5YSMPCjnkV201Zs6bNzrE7CZbBLyXTSxQUMt9Scr1YKnCwCaFywUAyzA7BPwb5xYGuml2ZvNACrnAnxcXDRA+m3t2bLu5D6+HlUYusOroFNvuENDBtuRnAroyDLGiIpXcl3jedWvb431oqSUlJSUlxfE/piYHXJOOSmUAAAAASUVORK5CYII=","e":1},{"id":"image_8","w":86,"h":72,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAABICAYAAABsigIcAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAFFklEQVR4nO2cX27qRhTGv2ObtxsIK2h2cLODegclUh0pTxekEilPpSsodwVNnyrFlUKeKoVKITsgKyhZQckKEuC+4eHchzjEgA1je/wHx78njI3n6ON4fGbmzAFKSkpKQKpuNLP7JjMfMdGRz+kXDRgdtK2hqvbCMrP75gI4BnC4fo6Yxxow+nR+OlLVXmRhn6/vDvX5vAGiBoCfQvz0HsyD6vlpL2rbskyvbpsh7ZsAGIBoUP3l50GctkML+/zXP0e6YXQBfInTMIAJA5e1ttWNeZ8NXEG7AH6IcZsnBnoLw7ist05ewv5YWtjn67tDQ4guM/8atpEdPGnMDRWP4czumwz0EE/QdSI5gJSwCRm8AgNf43jvxO53CfhdoUmrMD9qQFPWAXYK6z5W1/Etk+JGGEYnzKP3fH13qDtOD+H6+cgw8FutbV3uum6rsBO73yHgD3VmScD8KCoVU0Zc9wU6BNHnNEzzcFNtW81tFwQKm7KnriIhboaivrFVXM3vy5ndNzMTFQCIPuvz+fDb1e1x0CW64wwyFBUAvsz+/jewS9jwWLfPGgOoJWmVJBON2Vx/YUztfg/xwz01EJ34xbwbHqs7ziXyISoA1BZEK547vbptIi+iAgBz7/n6bnM05z1wg///07NKmonGbM6FeNENY4T8/PEA/EPFFY91R1R5pLYg+k83jCFyJioAENBZ99qlsO6JRupWhSOxAUpMaprjNL1fLIXV5/MGcugN+wIxN73H710BkZmyLcViLfR7F5Y5MGYskWNm9823z16PzTLYLhwasHxxlcRkAZhvnzUAMByn7AbUsJzb8J0rKImGBow8n0uSYDmkndp9ztKQIlBtW0s9S49Vx4P3QAs6URIOBlamDr3CjtM1pVjozEPvsXfkNURJVJ7WJ+OXwopKJVbmx0eGiIJXENyFu/tULSoItFj01r9bjQqINi4o2clGNwCsCesuij2lZlIBYMB3pXYzjmXuJm1MkVg4ju+7yTdhY2r3x8jvMkieCEza8B95lV4rBb0mCgad82d6dTsqJ7+38lBtW2bQycC5AiLqJGJOQSCgu+18oLDufoEbxfYUhftd+ym2zm4Jw+jgNS+/5J2JcJydT/NWYeutkxfe4fIfDQa69Yuz8a7rpFLlp3Z/CODHmDYVgftq25LKFpKa6Bav6TMfu0tgfhSG0ZS9XErY+sXZGETSNy0gEyFEI8zeCOmlGXce4SNGCRON2ZTpV72EWvMShtEB82Mos/Yb34xyGUIJW2+dvAghGvgY/W1kUYEIq7T1i7Mx5T+PNi6xRAUiLn8ftK0hmFtRG805sUUFYuQVVM9Pe0T0Z5zGc4gSUQEF9QpytTUoHspEBRQVgiiAuEpFBRSlGLmz6PsZ4zI/Csc5VikqoLB0CbCHnhtiQ3RYlAoL7JG4CYoKJCAssBfi7twWH5dE0jirbauZ41AscVGBhDz2jUxrHvjB3EqjehKQsLDAsp7MANnuepyAqBm35FMYEhcWAL5d3R4vgF5Gy+nKY1QZUkmV/3R+OhKViom0sxkTilFlSMVjvSRexumdB2EYoWb9VZK6sEAq/W4qb/5tZLJr5qBtDYVhHCGJroG5lbWoQEYe68Wt7dVFfO9N/c2/jcyFBZa1aHqInrugrD6iKnIh7BuRvDfhMX9UcrUzsda2LsXrTnTZzXw3eRQVyJnHenGHw0E1wBKrPauK3AoLvFdV9panJqKR0PVhHr20JAW+AxA5A6fDBsf5AAAAAElFTkSuQmCC","e":1},{"id":"image_9","w":34,"h":28,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAcCAYAAAAEN20fAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAB40lEQVRIie2WzXXaQBDHfzMmN2yggriDkApCB0H2yy32kztQKgjpgFSQxT4mPJ47wBUEOnAqsCE+ol0fBDx98CFhUHzI/yTtzox+u9qdGXglkm0G/uDhFN7UjVcdFQnsD56azFwdgMpsZLzGY2EQf/BQt+6oi6MN1JYTjlt10jWfjodr/awGIEHCL/pSTyXsGK9xnwvk869pWwWTCZTUnWrYjq8yp9/EQXBzfmI2glz0p77Ajw2BEkFVtWW86uiyP+mAfM3ph4OrNMwSxB88Na21v/MGW8DgGCJ8LOiHqr6PnztdPFhru0WDAbVdIABsaDsJMIgOGfBhl4A7K7WAaEdmlWapEHP5P/+2kiD/ShVZ3jpND5SpzGGdD/wplcJxG3+N/RpnyuRQJ4lbugRRtQaYlMRxly4TS5CoBrhdcklhqWqQHsvUmsv+dAS8OxiFyPfrs+MMSOb6qqp/MAgYq8w6qyYyIMarjhzuyyEoVNVf15esTGg357UuQm+fEA6uNjVXazOrShgA471QCL1VPUjSZIOijutoyEsOr9C7Pjvxt5tt0YtgckJAjqJnvMajathKp+Ttct/yQkCOHYlr3pd2gbcbzMZqJVjXYO8FZKGL/tQXoYXjNBbpXkMxRQH+69XrGRujo9Fd8L75AAAAAElFTkSuQmCC","e":1},{"id":"image_10","w":35,"h":31,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAfCAYAAABtYXSPAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAACHklEQVRYhe2XPXLaQBTH/283oTICn8BKg4aOnCDKCeLcQDRoqOIbRLkBqZjQIN8A30C5AVRMaGydQOC4MRP2pcAiQqAvsHAmk3+n3afdn/at3gfwF4nKXLw/DXTglQ78uus2z+9ODjO8DerLpbgCyAJwEZnyAXYrFdVrvzmfF4bpTwNdSmkysw7GnIT0Oo2zcbL9T1MIHgGopSy7AGDZhjbKBdOfBroUssfAhz3TPsCubdSc6OBgdm8xY5gCsb0xod1paG4qzGD20GJWHtK/DgB8pcjqNqteUZCIPkZPaAumPw10IeQ4B8hGTPSVmK0i70Tk24amhw8iOiNIukUXJeZPB4IAwMVg9tDagRnM7i0Q3h246MFitTJ3YMC4PDUIAIBQ34FhwHwRGNAmVETvzKF+P0pKrfbCTF6AZRJNE1GYxMhalojQiz5vYJQi98QsfjwCb2C6zaoHxvcTwlzFB7aCnuKVhXUiK1UE3OxLlFswT5fJKpll8bqy2ruHiA/YhjYiQrtEGKtwPXNEJk4UATcdQ0uM9DsnE6rT0Fwi8RbPd4cS3ZMJswY6GxMJ8zmAlKLLJPfkggmBlFq1cFSE5i/dZtXLsspdkA9vg/ryUY4OKDOubUOz8hgW7g6+/Vg4AH3OaT6xDa2VbbZWppviso2aoxS9B+BnmF5XKn8Kpzw6qm96+v0dxPojIjjxvFM6TKiwc5SS5ml91X/9E/oN5Za0D/vto0EAAAAASUVORK5CYII=","e":1},{"id":"image_11","w":35,"h":31,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAfCAYAAABtYXSPAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAACE0lEQVRYhe3XTW7aQBjG8f87fKwaB05QbtDeoM4JSk9Q2GCxKl22TiRXLWLLDtFN6A3IDcwNkhuEEwDpKpDxdMGXBYbYhA9VyrMyr63RT8N4/A68JjpyiEH//mzZRqVqYGzgfFbugXQst9I5CmbgXedS6XET4fOWx/oKKb5xK7eJMINGq6C0KiLkAES41eOsn/fKww0QH+FdPLqUV2cpEjPwrnOpzKQD5uOGgW4k0M2zq6o/rzzU2z7wIR5kNkoQXITHWMMMGq1CKlA+8DbGeD2F1AxBySBfkkBm6VuuU4jEJJ/qPUT4ZH13ugAqXE9nHr2jQgBjeD+/XmAGjVZhx6neWxYYpVXxlBAIYUTEPonAsNgmQmvG5E5hSYn48+slxnB/Aks/vBMvMSHh8SJe+NcCoyeZLjA6oqS/+jlYYPJeeWgM3tEoQm29tJKH+u/u5m/S3iQ3lltZ20rUakFPMiUMdweUjLTSa7MSicl75aF+ytqHAhmDl/9WvY+6t7WfefjV7jzTKCVNz3Ide9PNtZkJx7p0SsbwdU+QkVZBadsDWzEA55dOU4Lgghe/9lLb9PfExgCcXVV9PckWgN5ODsOfbY14IgxMF7blOraBHwkhd/opG/n2rGan08H0KKI6PNeaTiF2VAO/N8w8o3rbE6ixPBuF09OTbDEu5MUYmPbNKj0uTfshkwMZAt04a+Q1/2X+AcGOsv0Jar1XAAAAAElFTkSuQmCC","e":1},{"id":"image_12","w":47,"h":37,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAlCAYAAADSvLDKAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAACeElEQVRYheWZXVbaQBSAv3vx0YOygroD2UHZQUn1sbZxByyB7kBX0Fh9az3YHbAE3AGsgJ/2kcz0AfEQJMlkHETb74kkczLf3Mn83AHeMOJSKO6ND+dpraVimwAWGdZUB0m0P9iuXjGF8vGP3y2jtgu8zykyApuomoskakxcKz27ncViaSMcAcfAFBggMjDG9m9O63fe8nFvfGjSWoLwwdFnarHd65ODi1JpuAAOSt43stC9PqknRYWeyMe98aExtT6LiFRDuFJJO+u94BGMJfeqaTuJGsPN1a1X4iuerbC1bECAd05VtbVpfGXkP9/O+uR/31W4V03bwCRAMABGqmlzvUd1+ePTz1mbMOIAx8bUBoHEAd4ZW3synh7lVegEqGSVA8KIL7B8iXvjo9VbCovvknBR3xrGaLx6vYj8fK+5C5nqSGv1SnNKvQn+Afm9+XC3Gn4owMMKNtqtigMimYVKVx44bYZ2ico8M9dr3oNXh8jl+h7nUT6JGkOEqxeXcmOkMu+u38zMNipph8Xe+jUxVdX2pnwhI59EjYmxxC+m5YCFTl7G9mSevzmt3yFyuX0tB0QuixKS3DQw4PbYD+Hq+8d6XFQkd4V92I/vau6/fxh/heTKJ1FjoqptXn4AZzKxIkqPPuLen6Yxpk950hwCZ3Fw2Jgl0f7AEjxR2UQlcXA8dILHY4tvfl6lVBaHCvKwtQZ4iUNFeQjeAG9x8JCHYA14ljh4ZlLXJ/XEwrlvpVh+PVccPCO/xKsHHFZO91c9k0oNCCgOARLwlU+oZCW2X0OKQ4DILylaiS2clx1X+xBMfsnZ7SwWkSbWNrFMDCSufxb8V/wFQ/UDpEsq4BQAAAAASUVORK5CYII=","e":1},{"id":"image_13","w":46,"h":37,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC4AAAAlCAYAAAA9ftv0AAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAACm0lEQVRYhdWZz33aMBTHf3rmmPJngmSDskG9QXFpb22ibMAIjEAmqJP0ljaGDcgGsIGZgJjkiKQesI0xtpGNjcn3ZGFhfdFH1nt6AB8UptuRO+9drFU7aNs/Pk0rMdIkU5w/vZnSUBwKPQCtvQ4KE1JsVORHcGfZXgvDJKa628cx1yCa2dbFrJA4d5ZtqYwRFG40PV6IaKAz4M+/qx4xDAB8yei2UMDwsd+00zrsiXPnvSulHAO41DGOooDbtMF84VHO586JhGlbndf4jR1x7izbUhoukpaFLgz3D9+aPHzm05spSQ2RPcNZeETiKi7fiDakNMY4RhoAFG6un1cgwWxJaiihigoHtKQ0pgC60Q/DGf/1b8UZ8PvIQSojvgwpuGCbneNsYcAw2qbIna+nlsnJJXfew+VCwOYFqk0nB0IKM7imjH5nBwPCyP2hxKNsxBtrt16N/BAA2FbHBeDVq3IYqViYUmyXisK0Dpk8NAwxDa5DccUwrsVGF4VJNOyH4n5UWtThpIME7Gh7Z1dRseh0Riz+fG/urIgdcX/WX05ppEPShO7t40SC47x2mHlSjr8nblsdVwGDkyhpQJIluiRGzsd+0wbDfbVKGjB2l3aeTQ35/immzvU+J7Yept3MzFWIRA/AvGwjDTwi4klnzYBMcdvqvBIJEyeWJ8l6hyoGB7PDiPxJgpMCbnXqNFpp7Uaeeqh4m8wqb8TRzsdt62JGJK5Q0bLJIw3kqB0G+LWXKYDPeb+bgkdEpk4VLEruE1DJL+ycSHTzSgMFj26lyDN255fX3EJfLzwwChVHAcCTCjye7eXlKPGA6+eVrSWvMCFDZAYWXUoRBw7KL0gyXuafAaWJA2H9cYDtjuMBavTQbw3LHKdSqq6O/QdNc/dDsiyGYAAAAABJRU5ErkJggg==","e":1},{"id":"image_14","w":48,"h":38,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAmCAYAAACCjRgBAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAACyUlEQVRYhdWZ3XnaMBSGv3PgMuFngrJB2aDuBMWhuUzqbMAGcSZoOkEFXPahwAR1NoANnAmI015iqRfYPAZskLD5e68kWT/fkeVj6Qi4cOhUAzvDWSOUJYugGlDUBKEGogmUfGPJHsrzibDrb7v62WnA3eDdIYUWCBaAauJRAAVPEUb9dkWYCJeq5ELh287KhC5T6Aq77mdXyRro119LshIAPmjoelWAu8uQu0HQIdB3jf7WUE+9dtVNe5JqwP0gcAF6NB8IL8yhkzZj97/fhdasZ0Ho9m4qzmZx0QMBAUtqidtrLy7Yf+bXIPrRu7nurBQlM3eDd4eAn7kHAqCAh367IqKl+KeIPgGAJX1OTs7SAGc4q0lZ8rH6oeZCAQ8EuND7jnQ7Hfe+VlpxluOElNxBgeIBIHqbxYlfdPrFGc5qcZYTT5xCBzog87BkxWkGFssHRc/UAWFSzWUaADAvNzNrnzm8u8p5c5EGKJAfpxkAkn71EigxT+J08g1MT6BlHwJhX6UZoEanUGMMYUXn0gBmKY4uZg+Y+HklHyeEXfdB6B5fkhEvyeUDrHkhptAFEBxTkQksyd0oS2aEXfcV1EalM+ElzVtu/Af67erzOS6ltNkHMn5kTGEH5+RWCd2sf1WqAcKuvzGHFoDXA8rSJYgmNJXMrcTCCG7hxB81S2ptC69s3QsJ+2rCzBZOZoR62rXN0QpsOcN/TSmlh4JPbFvJiEJsVtPkyEZMe+2K1hlFezudWE6H9k7TyIFoYRwbjaIXHoCPpm01mDKHlk5MNMb4QLN0sQpj07ZbIXRNxS+a5aCAKF6sQuuDTW+ak7zRvDiCt2/7Qu4HovDhCGYe6pWZW+vbY1MKOdSL22vPyEMpjJnDZl7xQME3NJGHGgH4lFElUEAnz5JZ5yBXTNH9goPVaF/m3UEeDnpH5gxnDczLDZTnftHCY/4DTdADXzyes/MAAAAASUVORK5CYII=","e":1},{"id":"image_15","w":51,"h":41,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAApCAYAAACY7BHXAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAADAElEQVRogeWZzXXaQBDH/7PS0QioIHQQOojSQLIdBD2Dr3EHER3ga3AeSgfrVCB3AB3gCohwjpYmB2GeAH1/IJz8brtazcyfN2J3Z4B/CGo7AADYLGRP82EyYxidJ4G1L+D2LbXOY6dVMc9zaTLhFuDP6St5BQjbGCuVtiqXmOe5NEGQzMHhL0diyYSlL6D6lvqdxxYAbBZyoPmYZYs4gvnR14VM8pUqZnsvJcAzAO8y3HgAKV+DnZUS3lzaRPwtw14KvPI1YcYJShSzvZcOwF8Ku2KaBjpmx87ClApmAL0vajPGy8oY/xoez56ICT/GwK3mlFciEKOrG7XcLGRP92Ez+Gt5ezEemKbdibKjcyditvNPLog+1ODPA0gBLAF0a7B3Yt/XaBDNAHHwdC7tmoQAQHeXpk0IAYCuFkBGJ/ZiNgs5qPZhtgAniNF93J4/mqqwGR3txXCY22+NgxQWQJhiyN5LLh4BAPoLBi3HUQsie8lF40UHb1sM8zI6FADwomPdSjAVYQg3OhYAsDscejHrL5pAhxMdR9KMUu8Klwevjk/oezHEhyovHhKzk6nooMZDZtM8GeOHwfHkwb8ZQdjniqYKzOTEzR+I6UyUS6C7s0RUHi/QcZJiQMw+86LBBvDUdESlIbotVAP4810OA8EumruLlCT+uvxK7Ang6kYtARo1FlNJRCBGqc+THhhjpUBk1R5RSZhpGv7IyWTWzbY/5AjMi/rCKkN6er2SedA0rpVDTB/R3nHH8zWR6+KY69TcmShXBGSiBUHEJPPWmnNfAa5u1NLXaBjWfc8EkdWZKDfv8kL3mb6l1r4mTIAeCoZVGGaaGtfKKfJO6S5A9ZpxGvTTGKtR4bequAzrx6xQ6+ZaTghQ8drcmSjX12gA5scqdvYQWWWFADU2myqnHZFV9Bs5MVHl5WN2aeegWA3OEwGZWbt7HmpvA+76k06+rlhy46gMjfU0d103Bwl/DgS664xVrfXtRhu0m4XsiQAjYpjgoBd6FGtiOEU2w/+Sv5ApGZYTyy8iAAAAAElFTkSuQmCC","e":1},{"id":"image_16","w":66,"h":166,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAACmCAYAAABugVl8AAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAKXUlEQVR4nO2dT37aSBbHf6/AxouMTU4QvPGfycLMCaIbjPsEDXF3/qziPsE4J5hk5e70OJAbuE/Q5ASNFxk73oScAONkYQzSm4URFiBA9UdSSZ/5roykKim/lKree/WqRMgx3Ua1XLy5qTJQIaAzXFtrP6y3r8KupaQfLil6x38/IuJDABsTJxgf3LXS4bQguRTi26+7bxh4Nf8KPnNLa05QDJHEgyXJt+MdZ7EIAEB74ub2MHgkd0Iw0eHyq4DRa3P/O57HSYduo1ou9PvdqNcLIf7x4NmnNpCzFlG47Tsy17Prlv2/cyUEMRzVsrkSgsGOzPVDoOP/nZs+onu8UykQfZEps/7ifPzvz02LKED2teCz4K/cCAGQI3U504RlmR8hhFyLIEJ7sngO+P7ucRWMRzJlvDy2CJc9R7aMgNea/J0DdOwHn1wIAekRA/jby4tW8Hfmhfh2vONgOuagQOaF8CAc6UKMj9OHMi8ESZrVo0Iz4bpMC9FtVMsgPJEtx0zt6WOZFkLW7R4jOF8tQnXYFB7nq0XIut0+QffbJ7NuuIrb7RN0v30y2yLk3e4RhK9hhzMrhLTb7ePNvhZAloWQdLt9pt3v++oySPd4pyLrdvtMu98+mRRCCNpXLUtidugEMiqEjttN3qwxBWRUCKiOGACGa2v5aBHf3z2uQsPtnpcfkTkhVMJyY0Lcb5/MCUEelDvKRWROCBW324dBrXnnMiXEKCynToj7PT6lVXHCKIXlAoS53+NzOhUnjVJYLli+UMhHi9DpHwDAz44JIzNCaPcPQG/RycwIAVL3LwAAHO51+mRGCNWwXIDOopOZEKLbqJYB2tOpg0GdReczIYRy2D4AwessOp8JIUzMdlMeXg0D/UNoCD+I9eF82WzaeYSF8INY3yJM9A/TGXRhWC+Eif5hOoMuDOuFMNE/zAvhB7FeCF37AZgfwg9itRAG/AsAsxl04ddYjG78wWfZ0AlYLoRu/AEAwPj48OVFZ9llVguhG38A0BMFEWlpk7VCaPUPhK8EvHVLpcqiYEyQovLNYsYTVCWWL8eEXzaen7+RLWetEAqGVE8I4QRbgL8S2P89nW0bxFohIDm/yYQjX4Ruo1ou9vtH3O+/Yrp3Ma5/3e2BcZqZlcDf3z2uep73V/QSfLb+4mL8P399vNta2NESvrqrpar1K4E9160uvyoAY9wn9H7bPVw62jAeFW76p8FDVgohmx/lAq1xSSDScAnCk7sQ4B12CkEs0yJ6vsEku5In2JFaJ4R0oDYQptdJGbBOiOD/UkQ6/h/kQbbsGOuEkHW0psL0FdX7WieEtKMVnOoXORICJNe8J6b6FXMvAcuEUEkU86f6u8c7FZ17WyWEtCGF+6n+okb/AFgmBBHJCjGe6mdB5UUXLsMqIZglh7+ADcGetIgTWCWEdEQqsFpPEOejRYw6SimCq/WkW9MU1gih0lGaxBohFDrKyfkKzUCvNUKYmNrTwRohVKb2/BikiRkxK4RQ6ShNELQ9rBBCqaMMLDnwhJoNEbQ9rBBCpaOcwNOzKgFLhFCxAYI5DyQX2gvFCiFkXW9gKueBkf0WMXKfpddoTeRNagRk7qtIGVX3eSJvUiMg45O6EKrJIH7yh25Axid1IQhcUSnnz2XoBmR8UhdCcjLH5z4gkxshVLLmggEZiIqJp0hVCBOmteqrNU2qQgQ335UqN7l+s2LiWVIVQnXEmGgFBmwIIOWMGeVmTdjvNqplcXN7CGZtGwJIP3Woolhuo9jvHzEt2xo+OumOGlrrvM2JAKQoRDBbxQZSE0IhDyJWUhPClEWoRSClIEUhzFiEOgRTClITwkRUySQpjhpmTGNTpCiE/hIlXYILWlIRwtQSJV2CC1pSEUJ1HiJOUhHCyFpOXab2pEqrj3BSuu9cEhfi+rfdfRjY2VyX9D8rEdPOYrKk+lmJ0YbeVgiR6mclRp+NS/21AGYXxSa2lGm0D0QHdgjRW39xPhEGSKxF2NQawrZiSkSI7+8eV4n4X0ncKwphuxjGLkS3US17ntuM+z4yhG0AHLsQhX6/aYODFcRdLbWmj8UqxPXxTg3AP+O8hzx8FrbvbbwtQnd/uRhgFqdhx5XmNdYa55WhJ2oAO0TUAVNrIFZOUd+cVJpxZdta40KBQoWQfsziyecjADMjAAFf2fNqw593W/4x+aXNsTNjP/hIvRor7z83ESICADDwCEL8uXJyMV6J++DZpzaY6zL3iBVGaGsAogrR+FIunly0mPHj8nvRv0eCAQDWX140bRGDwM3555bR+FIuerctAJJDIH8citK+329cH+/UQNSQq8MghK/rz88r804vbBErjcuqmggAQE+K3m0LjS9lwG8Z+CBfjxnYo+ai83OFWGlcVtnjFpREGLNX9G5ba427/4n1l+e1tMTw4DUXnQ8Vovj7uTMSwYSTtDf0RHulcVkFUhKD8WHZFkwzQqycXNYgxJ8w6ylusMetKTHmbuhvmkWdpM+EECsnlzUGx9WhTYjhrpX2o2yvqA3j46JNdnzGQsQsgs9YjIf19pVbWnPiFoPAR9Guw12fMHodkqJHgpxBfasda+RqyZAZRAAACdE0/hCLmWgZQggHS3YyV4E8rkW9Vqw0LqsM/ex2BTbg8SkaX8oPnn1qGxcjYt/gI3iolvRpAgYe+UbXg2ef2iDUTNUdtW/wEcNi+FeKEmRvZL1i/fn5qSG/5A+Z1gAAAvXNK6L0TN8Re76jZsBJ67nM0faiCiAAYECrh4Twrx4mBTN+LL6/fAPo+SXM9CbKRp7TjL3PgG+R6twDgeqDg60mAFwf7zZBy13/eyb3rJNhbFAN6lttEuQghmFMBgY3Jkxx4I+oZYUo1FTvO2FiD+pbbWZzPbcq7PHYfXdLpVoU65OZXkfdzTSMGafL/Wn7lEBpR5Q2/JEkkinO+Ljx8r9HOjcMdcMHB1tNC8TY8zvPezFCX9venQOnx9zAzOBgq5n6sMr8auXksgbciRFiffaEEM68DxXKsDRmufL+czNK0DZGxg4aMJ4iaAHYAOGH9efncyPTMkSa1yj+5/MpKNWpu7PhwfZ4WPz+7nGVXbcsaz0uItoEj3Ik2yBEb4dPt6QtxsjVR77SAjGY8YP707aRV2EauSm/OzE6SM/67A3FamVmjtUAcrPh9c2rlK3PjaJ724yjYqW56rT9kqLwNm/qux2TdSrlRwzqW214Xmq5D65XcEzXqZwoMvx5t5WW9ckxLHrRypixxBQ3gnbq0Ch28Fr/UaJDmP9tX1WM5FAND7aPEvVLhGgZr9JURYOn27VExCB66/sdRqs1XWHx5KIFkO63c0IhwofB0+1aHHUbTy8citI+AOPzmXGKAMSVnW/YL4lbBCCuhNP65tVQrDompggI/EvcIgBxZt7WN68gaB8afsldaH9H+gtLaveKGUW/ZCIqlQSxZ+crzJecFYVXTVIEIKGFK4P6VptAS6NLRPgwFKuOac8yCommjBd/P3dIiOacfIzXw4PtoySfJ0jyufN3Q+shgEMCrhjcYaY3cYXg/o8k/wNbcepbyG/CLwAAAABJRU5ErkJggg==","e":1},{"id":"image_17","w":64,"h":166,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAACmCAYAAABqdIlBAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAKPElEQVR4nO1dTXbbRhL+qkFKXMSidALLG0ucLMIbGDlBdAORcRKHq9gniHwCa1ZyEsukThD5BGFOMNQiI0ob0yeQqGQhWiRqFiQoAPxD/wBo6M33nt8j6O5G96fq6uqq6iYhgquj3W1HUJU9qgp47WGp1Nmqd66j5R4KyP9wdbS77YBaIDyLlOkz4aD84vww5b6lAgKAq2Z10xkMegDKiwoy4dVDJEEAgDMYtLBk8ABAjDdXR7vbKfQpVYjJoL6JU9gBHSTamwwgCsB27NKEveS6kg2EZPny30e7bhIdyQqyBMCDcI33IkOIIdCTqUBgN5muZAMCgJu3FZapNFpf33ooxtF4ChA+yVRyPg/cJDqTBcYEeJLTgOEm0JdM4CvBnkwlfkB6QAAAg3py1eirq2Z1M4H+pA4BAASvJ1vRub19EEbRhAC5KTAGuWa7kg0EAAxLpY5CTdd0Z7LA1B8gawsAwIj5yVaj2zPao5QRMIX5TLqyoNzrgXsCmKQtu4dgD0wJIIK8HsADIsBTkAAA5X9+/bJqsD+pQ9x/8NoqDYxGnGs9IO0PiCLv2+MpAY8a3bZSC7Nu9FxBWwIA4OaXSm6nQZgAxp8qjeR5OQwTQFDy8uR5exwigJlUbAHkeXsclgDByn6+vLrJQgQIjxUlAICXz6BJiABZF3mkJVezL5mAol+obIt95HF7PGsHSLrIg3ByuDmaJUDSRR5G/txkMwQobov91lydzmSBGQIUt8VjMB7nbXs8KwFCYykEMGLP1amfNmYJ8NSNISB/+4IZApS3xfdwNeunikXb4b5Gm7lyk80ngDVWAuRLD8wnQHFbPK2eIz0wlwD1bfEUrmb91DCXAJVocQS50QMLCNAxh8fIix6YS4BStDiCvOiBuQQYygBzDbSROJa4xeWjxRHkQg8sJkBnUzRBHvTAQgIY1NZtPA96YLEEaHiIpyDkdwpoeYh9MB7bfshiIQEmlkLAfj/hQgK26p1rAv6t/wq7/YRLo8OPfjx/qRownYLYaj2wMjy+0Th3iflrdSLsjhvGyg941Oi2NxrnLhNeqbzE5rhhIfrFVbO6Wbi9nYpt8ORo+cX54c3R7jWImjIvYY+qAE61e5sAphJw1axu/v22cugMBldM9If/zxkMev2jfx345TYa3RYzvZZ5ic15RFMCnMFtm4Gf5pQpE/HPN0eVlv+FV1o7hIzf0GKDSADA+C9MXy0tSdj3c4EmS2RL4j3WbozG6fKCazHLT88OkxAtmRd5o5GdBPzz65dVMB7HKh0IfX3xw19SliIR2UmAx962TIVQZqiEbcBspx4QkyUqNgi8rfQmSxMqVRIlt/0Psj4DGxWhPAFC4rR5BDYqQnkCAgpTNsPcRkWolCus6uSwUREqEeBfuiAdSrdQESoRwOFbJ6RC6bYpQkUCxHbgQcogsk0RKhEgiO8dHJKh9BB5FkBNAgLKTDaUbtvWWO3ESFACZOMHlm2NFY/M3G+dFeIHZZtiBdpnhlQyzKXuLkoYygT49wmpZIfbdBWPkVNjkLQFyKJYgTIBngjY9dJpdYpb6gSgLgEeKdsCK/2PKUKZgKAYq6TV2XInmboEMLTCXaEplCHUCQg4RlROngu2YynUkYB4nuRF1S3xDWgtg37UV+m4nSW+AS0C/CCq6lE5G0xiU4aQEhwLFKEWASGTViGBQjYmkQQylQAbfANaBGgPwALfgJ4EBBwjipml5azzhzSnwL1NLxFiDyGYjpMFZnKEZHFzVGmzwKmqYTRRpG3dfqiiAMHXUD4wD4DwjFjdqMnaNyCM5ATrIGNFmOkyCGCcUJ2hIsyeAGSrCAU5TuY3RGfpJBWyyU5JIEtFaMUUQIZnCpTuFk8AmUWLlO4WTwJZnSzxJSBzRZjVyZLx3eL6p8X1kdHvl4wlwMQROX2Us7iYUQCGjsiZgIeXab9yfLe4gePyRkB4lvZqIAB1r24SSPvHnAJXa2sejzMFwn6aUhC0BHtpvXQV0pSCKQEs9K7OMYoUpeD+am1bVoIJ0pKC0I2SOrdJJgFi/trA1V5LEdkNal+bYRScghSECCADt0YYBeFZ0pkkkYuV7dIDAMCgWpLth+ICI6DtJPk2gygeX9ZA7IK54wg+va1XeirtzLlWd7djURZXXwjhBt12zruLPUE4ZIQDMUQ4ccg7kCVi9kZJm/QA88vg4IvHlzUi/B4d/Lgo9oee6BSPu1IbqlmfILMdx9yZ6xuNbst/LB5f1hi86th+mUFvCsfdNpofY8UaZqYAANy8rVxjxc/wJorI4J13F3tE+F2ylT4Jcu/qT5cq9kU3SmYmBcz0OvSXb15WiaROqvsos8f/KR5f1pYVmkuAcEQ2vzDNOCk3/nvgPxabl1X2uA0NaWRwc5lemDsFAODml0pPNxdQCoyTjcZ5zX80MfggiHBy9+1OLfr9krvEkKYUfAgOHs2Pm/D4FAb1EDP2C+8vZ8a0kABvbb0Fvet1Y4LPRuvrtelj8+NmwfvcnrfU6b+Kf4rqhFU3SbWMdyLco7PResmdXuA4GTyAxAwxBjcLv527/vPS2OCQOblpQPgUGjyAgjc4RYKDn0KIU99OWErAVqPbA+MkgS70BYm94OCL7y9aAKWVP1wu8N0BECM6PAIfwKwumLHvi+8vWszYN/iO1eBxVttKArYa3R4zGZsK0cEXji8OUh/8GGUgZn6AV1o7NBJCZ65HNzcAftZuV6kv+ADEJGAyV/XCVmqbm+TA3iGwxBKch5ujSlvloAMTXpVfnE+nUeG3cxdC/CHbjjEwPgy/29kDJFNkRuAaZBUi4yQ4+GLzsgohstxynw2dtZr/IEXAVqPbY8JB7AoJ2/cK6A/Fmov6k+nyKzUFfNy8rZwC+GZpIcafG417iwvNj5tF73MnERM3Hub6B5SyxEbr67XlqwKfjUrr98kOSdr3MbHIOaJEwFa9cy1ILMjmiNj3AJK271eBQPVFniHlPMEvfvirA+Z65Ot+dPBjEzfjwT9/2lr0/1qJkhuNbmu6VyB8EkLMDD4jK8/H62WDBxSVYBQ3R7u1Ual0Ghr8cfclg96YaF8FizxAM+WSeHnWVl7cwQMJ5Ao77y72MjVxgbM7WottthuVAAsMnbOoobMK5ggYr/U9ZDR4Aj7dibWqzOABg1OgyJ8PkaGJC0F7soMHDBLAnNnP7sYKgS2CSSWYzV/f8/ZUBw/Yc2JECQSqD7+vtHXaMEYAId1TJ6tM3LgwpwMSD6KEsNLEjQtjBAzF2iGAxNPsiHAyfL5zYKo9czqg/uSaBNWQYDxRxsSN3abJxoBErcGz4fMd4+cLja8Cd/WnHRLkwqwkjE3cBJDIbhCAyUivtH0vg+QIAEyQ0C8Ir6qaBBkHyRpC9SfXQ7Hm+mEoSfRJkJvk4IGkJSCAwvvLQzDP+xGXedCy72WQmik8/PbpSwLVEUM5MqOWxuCBFCXAx2SZbGG+Xugzozb6bie10FnqBPiYOE1rGBPRJ8KpSrLz/6GJ/wHR0ty3T41iHwAAAABJRU5ErkJggg==","e":1},{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":0,"nm":"croix","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1503.25,2055,0],"ix":2},"a":{"a":0,"k":[1502.778,2030.556,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.36,0.36,0.36],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0]},"t":0,"s":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1.725]},"o":{"x":[0.21,0.21,0.21],"y":[0,0,0]},"t":144,"s":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":207,"s":[110,110,100]},{"t":256,"s":[100,100,100]}],"ix":6,"x":"var $bm_rt;\n$bm_rt = loopOut();"}},"ao":0,"w":3000,"h":3000,"ip":0,"op":1200,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":">>Controller","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-10,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.85,"y":1},"o":{"x":0.561,"y":0},"t":0,"s":[1496,1773,0],"to":[-541.11,-540.985,0],"ti":[515.428,-558.256,0]},{"i":{"x":0.92,"y":1},"o":{"x":0.79,"y":0},"t":171,"s":[1507.318,1763.037,0],"to":[-21.845,23.66,0],"ti":[28.351,-27.669,0]},{"i":{"x":0.92,"y":1},"o":{"x":0.99,"y":0},"t":224,"s":[1497,1772,0],"to":[-2.459,2.4,0],"ti":[-0.5,-0.333,0]},{"t":271,"s":[1498,1774,0]}],"ix":2,"x":"var $bm_rt;\n$bm_rt = loopOut();"},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":0,"s":[88.91,29.737,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":40,"s":[122.798,41.072,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":119,"s":[132.501,44.317,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":157,"s":[141.611,47.364,100]},{"t":221,"s":[94.89,31.737,100]}],"ix":6,"x":"var $bm_rt;\nvar temp;\ntemp = transform.scale[0];\n$bm_rt = [\n temp,\n temp\n];"}},"ao":0,"ef":[{"ty":5,"nm":"Falloff Master","np":5,"mn":"Pseudo/b0OA8d132c8bv","ix":1,"en":1,"ef":[{"ty":7,"nm":"Enable","mn":"Pseudo/b0OA8d132c8bv-0001","ix":1,"v":{"a":0,"k":1,"ix":1}},{"ty":7,"nm":"Invert","mn":"Pseudo/b0OA8d132c8bv-0002","ix":2,"v":{"a":0,"k":0,"ix":2}},{"ty":0,"nm":"Falloff","mn":"Pseudo/b0OA8d132c8bv-0003","ix":3,"v":{"a":0,"k":16.674,"ix":3,"x":"var $bm_rt;\n$bm_rt = value > 100 ? 100 : value;"}}]},{"ty":5,"nm":"Falloff - Echelle","np":5,"mn":"Pseudo/iSOkadb76865x","ix":2,"en":1,"ef":[{"ty":0,"nm":"X Amount","mn":"Pseudo/iSOkadb76865x-0001","ix":1,"v":{"a":0,"k":100,"ix":1}},{"ty":0,"nm":"Y Amount","mn":"Pseudo/iSOkadb76865x-0002","ix":2,"v":{"a":0,"k":100,"ix":2}},{"ty":0,"nm":"Z Amount","mn":"Pseudo/iSOkadb76865x-0003","ix":3,"v":{"a":0,"k":0,"ix":3}}]},{"ty":5,"nm":"Falloff - Opacité","np":3,"mn":"Pseudo/ajO511f0e9a91","ix":3,"en":1,"ef":[{"ty":0,"nm":"X Amount","mn":"Pseudo/ajO511f0e9a91-0001","ix":1,"v":{"a":0,"k":100,"ix":1}}]}],"shapes":[],"ip":0,"op":1209,"st":12,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"1","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacit\\xe9')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[1377.185,1626.348,0],"ix":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1313,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"2","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacit\\xe9')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[1331,1541.029,0],"ix":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"3","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacit\\xe9')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[1342.935,1449.728,0],"ix":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"4","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacit\\xe9')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[1407.099,1375.338,0],"ix":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"5","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacit\\xe9')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[1495,1350,0],"ix":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"6","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacit\\xe9')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[1592.053,1381.548,0],"ix":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"7","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacit\\xe9')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[1648.856,1449.728,0],"ix":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"8","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacit\\xe9')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[1660,1541.029,0],"ix":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"9","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacit\\xe9')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[1622.046,1626.348,0],"ix":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"bm":0}]},{"id":"comp_1","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Calque de forme 15","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1500,1744,0],"ix":2},"a":{"a":0,"k":[49,244,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[42,236],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Tracé rectangulaire 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.766274964576,0.137628996606,0.137628996606,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.211764720842,0.270588235294,0.309803921569,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[49,244],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"rd","nm":"Sommets arrondis 1","r":{"a":0,"k":15,"ix":1},"ix":2,"mn":"ADBE Vector Filter - RC","hd":false}],"ip":0,"op":1320,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Calque de forme 14","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[1500,1694,0],"ix":2},"a":{"a":0,"k":[49,244,0],"ix":1},"s":{"a":0,"k":[100,56.78,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[42,236],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Tracé rectangulaire 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.766274964576,0.137628996606,0.137628996606,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.211764720842,0.270588235294,0.309803921569,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[49,244],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"rd","nm":"Sommets arrondis 1","r":{"a":0,"k":24,"ix":1},"ix":2,"mn":"ADBE Vector Filter - RC","hd":false}],"ip":0,"op":1320,"st":0,"bm":0}]},{"id":"comp_2","layers":[{"ddd":0,"ind":1,"ty":2,"nm":"Calque 10/petits coeurs.ai","cl":"ai","refId":"image_0","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":330,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":426,"s":[70.581]},{"t":566,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":330,"s":[1500,1500,0],"to":[23.389,-291.222,0],"ti":[223.278,79.556,0]},{"t":566,"s":[1030.333,1052.667,0]}],"ix":2},"a":{"a":0,"k":[27.5,22.5,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":330,"s":[0,0,100]},{"t":564,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":0,"op":1234,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"Calque 11/petits coeurs.ai","cl":"ai","refId":"image_1","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":393,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":489,"s":[70.581]},{"t":627,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":393,"s":[1500,1500,0],"to":[155.333,-334.278,0],"ti":[-128.667,114.278,0]},{"t":629,"s":[1492,1024.333,0]}],"ix":2},"a":{"a":0,"k":[30.5,25,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":393,"s":[0,0,100]},{"t":627,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":63,"op":1297,"st":63,"bm":0},{"ddd":0,"ind":3,"ty":2,"nm":"Calque 12/petits coeurs.ai","cl":"ai","refId":"image_2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":361,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":457,"s":[70.581]},{"t":596,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":361,"s":[1500,1500,0],"to":[12.556,-242.833,0],"ti":[2.444,362.833,0]},{"t":597,"s":[1925.333,1103,0]}],"ix":2},"a":{"a":0,"k":[33,27,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":361,"s":[0,0,100]},{"t":596,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":31,"op":1265,"st":31,"bm":0},{"ddd":0,"ind":4,"ty":2,"nm":"Calque 13/petits coeurs.ai","cl":"ai","refId":"image_3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":434,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":530,"s":[70.581]},{"t":668,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.474,"y":0.622},"o":{"x":0.153,"y":0},"t":434,"s":[1500,1500,0],"to":[-11.952,-214.891,0],"ti":[200.508,51.457,0]},{"i":{"x":0.628,"y":1},"o":{"x":0.296,"y":0.591},"t":584,"s":[1758.198,1215.93,0],"to":[-27.401,-7.032,0],"ti":[37.611,2.091,0]},{"t":670,"s":[1658.333,1206.667,0]}],"ix":2},"a":{"a":0,"k":[36,29.5,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":434,"s":[0,0,100]},{"t":668,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":104,"op":1338,"st":104,"bm":0},{"ddd":0,"ind":5,"ty":2,"nm":"Calque 14/petits coeurs.ai","cl":"ai","refId":"image_4","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":358,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":454,"s":[70.581]},{"t":597,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":358,"s":[1500,1500,0],"to":[1.944,364.444,0],"ti":[-463.333,-446.667,0]},{"t":594,"s":[2171.667,1556.667,0]}],"ix":2},"a":{"a":0,"k":[38.5,31,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":358,"s":[0,0,100]},{"t":597,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":28,"op":1262,"st":28,"bm":0},{"ddd":0,"ind":6,"ty":2,"nm":"Calque 15/petits coeurs.ai","cl":"ai","refId":"image_5","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":330,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":426,"s":[70.581]},{"t":566,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":330,"s":[1500,1500,0],"to":[2.222,282.222,0],"ti":[316.111,24.444,0]},{"t":566,"s":[906.667,1531.667,0]}],"ix":2},"a":{"a":0,"k":[37,31.5,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":330,"s":[0,0,100]},{"t":566,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":0,"op":1234,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":2,"nm":"Calque 16/petits coeurs.ai","cl":"ai","refId":"image_6","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":410,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":506,"s":[70.581]},{"t":645,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":410,"s":[1500,1500,0],"to":[-24.444,-25.556,0],"ti":[81.667,128.611,0]},{"t":646,"s":[1353.333,1346.667,0]}],"ix":2},"a":{"a":0,"k":[41.5,34,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":410,"s":[0,0,100]},{"t":645,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":80,"op":1314,"st":80,"bm":0},{"ddd":0,"ind":8,"ty":2,"nm":"Calque 17/petits coeurs.ai","cl":"ai","refId":"image_7","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":390,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":486,"s":[70.581]},{"t":503,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":390,"s":[1500,1500,0],"to":[340.278,-158.333,0],"ti":[-311.944,300,0]},{"t":626,"s":[1761.667,930,0]}],"ix":2},"a":{"a":0,"k":[43.5,37,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":390,"s":[0,0,100]},{"t":626,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":60,"op":1294,"st":60,"bm":0},{"ddd":0,"ind":9,"ty":2,"nm":"Calque 18/petits coeurs.ai","cl":"ai","refId":"image_8","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":348,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":444,"s":[70.581]},{"t":586,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":348,"s":[1496.667,1498.333,0],"to":[-5.556,-277.778,0],"ti":[-609.444,-140.556,0]},{"t":584,"s":[2153.333,1233.333,0]}],"ix":2},"a":{"a":0,"k":[43,36,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":348,"s":[0,0,100]},{"t":586,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":18,"op":1252,"st":18,"bm":0},{"ddd":0,"ind":10,"ty":2,"nm":"Calque 3/petits coeurs.ai","cl":"ai","refId":"image_9","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":402,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":498,"s":[70.581]},{"t":637,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":402,"s":[1500,1500,0],"to":[11.389,246.111,0],"ti":[-86.389,90.556,0]},{"t":638,"s":[1743.333,1446.667,0]}],"ix":2},"a":{"a":0,"k":[17,14,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":402,"s":[0,0,100]},{"t":637,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":72,"op":1306,"st":72,"bm":0},{"ddd":0,"ind":11,"ty":2,"nm":"Calque 4/petits coeurs.ai","cl":"ai","refId":"image_10","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":330,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":426,"s":[70.581]},{"t":566,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":330,"s":[1500,1500,0],"to":[1.389,290.833,0],"ti":[-111.389,-32.5,0]},{"t":566,"s":[1728.333,1655,0]}],"ix":2},"a":{"a":0,"k":[17.5,15.5,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":330,"s":[0,0,100]},{"t":566,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":0,"op":1234,"st":0,"bm":0},{"ddd":0,"ind":12,"ty":2,"nm":"Calque 5/petits coeurs.ai","cl":"ai","refId":"image_11","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":386,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":482,"s":[70.581]},{"t":621,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":386,"s":[1500,1500,0],"to":[-4.167,-346.111,0],"ti":[130.833,249.444,0]},{"t":622,"s":[1833.333,1348.333,0]}],"ix":2},"a":{"a":0,"k":[17.5,15.5,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":386,"s":[0,0,100]},{"t":621,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":56,"op":1290,"st":56,"bm":0},{"ddd":0,"ind":13,"ty":2,"nm":"Calque 6/petits coeurs.ai","cl":"ai","refId":"image_12","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":350,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":446,"s":[70.581]},{"t":586,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":350,"s":[1498.333,1501.667,0],"to":[5.278,137.5,0],"ti":[-0.278,-39.167,0]},{"t":586,"s":[1500,1736.667,0]}],"ix":2},"a":{"a":0,"k":[23.5,18.5,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":350,"s":[0,0,100]},{"t":586,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":20,"op":1254,"st":20,"bm":0},{"ddd":0,"ind":14,"ty":2,"nm":"Calque 7/petits coeurs.ai","cl":"ai","refId":"image_13","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":374,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":470,"s":[70.581]},{"t":611,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":374,"s":[1500,1500,0],"to":[22.222,-262.778,0],"ti":[-80.556,181.111,0]},{"t":610,"s":[1283.333,1123.333,0]}],"ix":2},"a":{"a":0,"k":[23,18.5,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":374,"s":[0,0,100]},{"t":611,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":44,"op":1278,"st":44,"bm":0},{"ddd":0,"ind":15,"ty":2,"nm":"Calque 8/petits coeurs.ai","cl":"ai","refId":"image_14","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":330,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":426,"s":[70.581]},{"t":566,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":330,"s":[1500,1500,0],"to":[-30,87.222,0],"ti":[-16.667,-28.889,0]},{"t":566,"s":[1600,1673.333,0]}],"ix":2},"a":{"a":0,"k":[24,19,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":330,"s":[0,0,100]},{"t":566,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":0,"op":1234,"st":0,"bm":0},{"ddd":0,"ind":16,"ty":2,"nm":"Calque 9/petits coeurs.ai","cl":"ai","refId":"image_15","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0],"y":[0]},"t":420,"s":[100]},{"i":{"x":[0.259],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":516,"s":[70.581]},{"t":657,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.444,"y":1},"o":{"x":0.129,"y":0},"t":420,"s":[1500,1500,0],"to":[12.778,408.056,0],"ti":[11.111,-1.944,0]},{"t":656,"s":[1593.333,1361.667,0]}],"ix":2},"a":{"a":0,"k":[25.5,20.5,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.444,0.444,0.667],"y":[1,1,1]},"o":{"x":[0.129,0.129,0.333],"y":[0,0,0]},"t":420,"s":[0,0,100]},{"t":657,"s":[395,395,100]}],"ix":6}},"ao":0,"ip":90,"op":1324,"st":90,"bm":0}]},{"id":"comp_3","layers":[{"ddd":0,"ind":1,"ty":2,"nm":"main droite/main de priere.ai","cl":"ai","refId":"image_16","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.999],"y":[1]},"o":{"x":[0.46],"y":[0]},"t":250,"s":[0]},{"t":380,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.999,"y":1},"o":{"x":0.46,"y":0},"t":250,"s":[854,856.333,0],"to":[12,280.667,0],"ti":[-435.667,-18,0]},{"t":380,"s":[1458,1544,0]}],"ix":2},"a":{"a":0,"k":[29,83,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.999,0.999,0.999],"y":[1,1,1]},"o":{"x":[0.46,0.46,0.46],"y":[0,0,0]},"t":250,"s":[310,310,100]},{"t":380,"s":[100,100,100]}],"ix":6}},"ao":0,"ip":0,"op":1234,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"main gauche/main de priere.ai","cl":"ai","refId":"image_17","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.999],"y":[1]},"o":{"x":[0.46],"y":[0]},"t":250,"s":[0]},{"t":380,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.999,"y":1},"o":{"x":0.46,"y":0},"t":250,"s":[1975,821.667,0],"to":[-1.667,321.333,0],"ti":[365.333,-5.667,0]},{"t":380,"s":[1534,1544,0]}],"ix":2},"a":{"a":0,"k":[32,83,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.999,0.999,0.999],"y":[1,1,1]},"o":{"x":[0.46,0.46,0.46],"y":[0,0,0]},"t":250,"s":[310,310,100]},{"t":380,"s":[100,100,100]}],"ix":6}},"ao":0,"ip":0,"op":1234,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"chapelet","refId":"comp_0","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.877],"y":[0.619]},"o":{"x":[0.23],"y":[0]},"t":516,"s":[100]},{"t":686,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1500,1428,0],"ix":2},"a":{"a":0,"k":[1500,1500,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.92,0.92,0.91],"y":[-0.117,-0.117,1]},"o":{"x":[0.23,0.23,0.23],"y":[0,0,0]},"t":516,"s":[100,100,100]},{"t":686,"s":[354.999,354.999,100]}],"ix":6}},"ao":0,"w":3000,"h":3000,"ip":1,"op":1201,"st":1,"bm":0},{"ddd":0,"ind":2,"ty":0,"nm":"coeur","refId":"comp_2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1500,1500,0],"ix":2},"a":{"a":0,"k":[1500,1500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":3000,"h":3000,"ip":308,"op":1508,"st":308,"bm":0},{"ddd":0,"ind":3,"ty":0,"nm":"main","refId":"comp_3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":530,"s":[0]},{"i":{"x":[0.999],"y":[1]},"o":{"x":[0.69],"y":[0]},"t":723,"s":[100]},{"t":807,"s":[0]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1500,1500,0],"ix":2},"a":{"a":0,"k":[1500,1500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":3000,"h":3000,"ip":276,"op":1476,"st":276,"bm":0}],"markers":[{"tm":272,"cm":"1","dr":0}]} ================================================ FILE: assets/content.md ================================================ --- __Advertisement :)__ - __[pica](https://nodeca.github.io/pica/demo/)__ - high quality and fast image resize in browser. - __[babelfish](https://github.com/nodeca/babelfish/)__ - developer friendly i18n with plurals support and easy syntax. You will like those projects! --- # h1 Heading 8-) ## h2 Heading ### h3 Heading #### h4 Heading ##### h5 Heading ###### h6 Heading ## Horizontal Rules ___ --- *** ## Typographic replacements Enable typographer option to see result. (c) (C) (r) (R) (tm) (TM) (p) (P) +- test.. test... test..... test?..... test!.... !!!!!! ???? ,, -- --- "Smartypants, double quotes" and 'single quotes' ## Emphasis **This is bold text** __This is bold text__ *This is italic text* _This is italic text_ ~~Strikethrough~~ ## Blockquotes > Blockquotes can also be nested... >> ...by using additional greater-than signs right next to each other... > > > ...or with spaces between arrows. ## Lists Unordered + Create a list by starting a line with `+`, `-`, or `*` + Sub-lists are made by indenting 2 spaces: - Marker character change forces new list start: * Ac tristique libero volutpat at + Facilisis in pretium nisl aliquet - Nulla volutpat aliquam velit + Very easy! Ordered 1. Lorem ipsum dolor sit amet 2. Consectetur adipiscing elit 3. Integer molestie lorem at massa 1. You can use sequential numbers... 1. ...or keep all the numbers as `1.` Start numbering with offset: 57. foo 1. bar ## Code Inline `code` Indented code // Some comments line 1 of code line 2 of code line 3 of code Block code "fences" ``` Sample text here... ``` Syntax highlighting ``` js var foo = function (bar) { return bar++; }; console.log(foo(5)); ``` ## Tables | Option | Description | | ------ | ----------- | | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. | Right aligned columns | Option | Description | | ------:| -----------:| | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. | ## Links [link text](http://dev.nodeca.com) [link with title](http://nodeca.github.io/pica/demo/ "title text!") Autoconverted link https://github.com/nodeca/pica (enable linkify to see) ## Images ![Minion](https://octodex.github.com/images/minion.png) ![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") Like links, Images also have a footnote style syntax ![Alt text][id] With a reference later in the document defining the URL location: [id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" ## Plugins The killer feature of `markdown-it` is very effective support of [syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin). ### [Emojies](https://github.com/markdown-it/markdown-it-emoji) > Classic markup: :wink: :cry: :laughing: :yum: > > Shortcuts (emoticons): :-) :-( 8-) ;) see [how to change output](https://github.com/markdown-it/markdown-it-emoji#change-output) with twemoji. ### [Subscript](https://github.com/markdown-it/markdown-it-sub) / [Superscript](https://github.com/markdown-it/markdown-it-sup) - 19^th^ - H~2~O ### [\](https://github.com/markdown-it/markdown-it-ins) ++Inserted text++ ### [\](https://github.com/markdown-it/markdown-it-mark) ==Marked text== ### [Footnotes](https://github.com/markdown-it/markdown-it-footnote) Footnote 1 link[^first]. Footnote 2 link[^second]. Inline footnote^[Text of inline footnote] definition. Duplicated footnote reference[^second]. [^first]: Footnote **can have markup** and multiple paragraphs. [^second]: Footnote text. ### [Definition lists](https://github.com/markdown-it/markdown-it-deflist) Term 1 : Definition 1 with lazy continuation. Term 2 with *inline markup* : Definition 2 { some code, part of Definition 2 } Third paragraph of definition 2. _Compact style:_ Term 1 ~ Definition 1 Term 2 ~ Definition 2a ~ Definition 2b ### [Abbreviations](https://github.com/markdown-it/markdown-it-abbr) This is HTML abbreviation example. It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on. *[HTML]: Hyper Text Markup Language ### [Custom containers](https://github.com/markdown-it/markdown-it-container) ::: warning *here be dragons* ::: ================================================ FILE: assets/qui_sommes_nous.md ================================================ ![](gs://aujourdhuilavenir.appspot.com/articles/qui_somme_nous/les_soeurs_ndd.png) ### Qui sommes nous? ## Les Sœurs Dominicaines de Notre-Dame de la Délivrande à Madagascar **Un charisme au service de la communauté** ![](gs://aujourdhuilavenir.appspot.com/articles/qui_somme_nous/20231105_113635.jpg) Nous sommes les Sœurs Dominicaines de Notre-Dame de la Délivrande, une congrégation religieuse catholique fondée en 1811. Notre charisme se base sur quatre piliers: l'étude, la prière, la prédication et la vie fraternelle. Guidées par ces valeurs, nous nous investissons dans divers domaines pour servir les populations locales et contribuer au développement social et spirituel des communautés. **Arrivée à Madagascar et implantation à Antsirabe** En 2008, **nous** avons répondu à l'appel de l'Église catholique de Madagascar et **avons** établi une communauté dans le quartier de Saharoaloha à Antsirabe. Depuis lors, **nous** nous activons dans plusieurs œuvres sociales et pastorales, apportant **notre** contribution au bien-être de la population locale. **Œuvres et actions multiples** ![](gs://aujourdhuilavenir.appspot.com/articles/qui_somme_nous/20231114_133444.jpg) Le champ d'action des Sœurs Dominicaines à Madagascar est vaste et diversifié. **Nous** gérons une cantine qui offre des repas quotidiens aux enfants défavorisés. **Nous** nous impliquons également dans la pastorale de la paroisse de Bevokatra, de la Chapelle militaire et de Saint Luc Ambohimena. Soucieuses du développement holistique de la communauté, **nous** gérons également une ferme qui assure la production de denrées alimentaires et une source de revenus. **Nous** dirigeons aussi un dispensaire qui offre des soins médicaux aux populations démunies. ![](gs://aujourdhuilavenir.appspot.com/articles/qui_somme_nous/20231113_213646.jpg) L'éducation est un autre domaine d'intervention important pour la congrégation. **Nous** avons mis en place une école de la seconde chance pour les jeunes en décrochage scolaire et parrainons une dizaine d'enfants pour leur assurer une éducation et un avenir meilleur. **Une communauté dynamique et en croissance** La communauté des Sœurs Dominicaines à Madagascar est composée de 13 sœurs malgaches et de 3 sœurs martiniquaises. **Nous sommes** accompagnées par 43 jeunes en formation qui aspirent à suivre **notre** exemple et à embrasser la vie religieuse. Cette communauté dynamique et en croissance est un véritable pilier pour la communauté locale et un symbole de l'engagement de l'Église catholique au service des plus démunis. **Conclusion** Les Sœurs Dominicaines de Notre-Dame de la Délivrande constituent une force vive dans la communauté d'Antsirabe. Par **nos** œuvres multiples et **notre** engagement sans faille, **nous** contribuons de manière significative au développement social, éducatif et spirituel de la population. **Notre** présence est un précieux atout pour la ville et un modèle d'inspiration pour les générations futures. **Pour plus d'informations:** - Site web de la congrégation: - Page Facebook de la communauté à Madagascar: ================================================ FILE: assets/sample.md ================================================ --- __Advertisement :)__ - __[pica](https://nodeca.github.io/pica/demo/)__ - high quality and fast image resize in browser. - __[babelfish](https://github.com/nodeca/babelfish/)__ - developer friendly i18n with plurals support and easy syntax. You will like those projects! --- # h1 Heading 8-) ## h2 Heading ### h3 Heading #### h4 Heading ##### h5 Heading ###### h6 Heading ## Horizontal Rules ___ --- *** ## Typographic replacements Enable typographer option to see result. (c) (C) (r) (R) (tm) (TM) (p) (P) +- test.. test... test..... test?..... test!.... !!!!!! ???? ,, -- --- "Smartypants, double quotes" and 'single quotes' ## Emphasis **This is bold text** __This is bold text__ *This is italic text* _This is italic text_ ~~Strikethrough~~ ## Blockquotes > Blockquotes can also be nested... >> ...by using additional greater-than signs right next to each other... > > > ...or with spaces between arrows. ## Lists Unordered + Create a list by starting a line with `+`, `-`, or `*` + Sub-lists are made by indenting 2 spaces: - Marker character change forces new list start: * Ac tristique libero volutpat at + Facilisis in pretium nisl aliquet - Nulla volutpat aliquam velit + Very easy! Ordered 1. Lorem ipsum dolor sit amet 2. Consectetur adipiscing elit 3. Integer molestie lorem at massa 1. You can use sequential numbers... 1. ...or keep all the numbers as `1.` Start numbering with offset: 57. foo 1. bar ## Code Inline `code` Indented code // Some comments line 1 of code line 2 of code line 3 of code Block code "fences" ``` Sample text here... ``` Syntax highlighting ``` js var foo = function (bar) { return bar++; }; console.log(foo(5)); ``` ## Tables | Option | Description | | ------ | ----------- | | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. | Right aligned columns | Option | Description | | ------:| -----------:| | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. | ## Links [link text](http://dev.nodeca.com) [link with title](http://nodeca.github.io/pica/demo/ "title text!") Autoconverted link https://github.com/nodeca/pica (enable linkify to see) ## Images ![Minion](https://octodex.github.com/images/minion.png) ![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") Like links, Images also have a footnote style syntax ![Alt text][id] With a reference later in the document defining the URL location: [id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat" ## Plugins The killer feature of `markdown-it` is very effective support of [syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin). ### [Emojies](https://github.com/markdown-it/markdown-it-emoji) > Classic markup: :wink: :cry: :laughing: :yum: > > Shortcuts (emoticons): :-) :-( 8-) ;) see [how to change output](https://github.com/markdown-it/markdown-it-emoji#change-output) with twemoji. ### [Subscript](https://github.com/markdown-it/markdown-it-sub) / [Superscript](https://github.com/markdown-it/markdown-it-sup) - 19^th^ - H~2~O ### [\](https://github.com/markdown-it/markdown-it-ins) ++Inserted text++ ### [\](https://github.com/markdown-it/markdown-it-mark) ==Marked text== ### [Footnotes](https://github.com/markdown-it/markdown-it-footnote) Footnote 1 link[^first]. Footnote 2 link[^second]. Inline footnote^[Text of inline footnote] definition. Duplicated footnote reference[^second]. [^first]: Footnote **can have markup** and multiple paragraphs. [^second]: Footnote text. ### [Definition lists](https://github.com/markdown-it/markdown-it-deflist) Term 1 : Definition 1 with lazy continuation. Term 2 with *inline markup* : Definition 2 { some code, part of Definition 2 } Third paragraph of definition 2. _Compact style:_ Term 1 ~ Definition 1 Term 2 ~ Definition 2a ~ Definition 2b ### [Abbreviations](https://github.com/markdown-it/markdown-it-abbr) This is HTML abbreviation example. It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on. *[HTML]: Hyper Text Markup Language ### [Custom containers](https://github.com/markdown-it/markdown-it-container) ::: warning *here be dragons* ::: ================================================ FILE: cors.json ================================================ [ { "origin":["*"], "method":["GET"], "maxAgeSeconds": 3600 } ] ================================================ FILE: dap.ps1 ================================================ # Simple powershell script for automating build and deploy in the [avant_premiere] channel. # flutter build web --release # firebase hosting:channel:deploy avant_premiere D:\dev\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev D:\dev\flutter\bin\cache\dart-sdk\bin\snapshots\frontend_server.dart.snapshot --sdk-root D:\dev\flutter\bin\cache\flutter_web_sdk/ --incremental --target=dartdevc --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/3f3e560236539b7e2702f5ac790b2a4691b32d49/ --output-dill C:\Users\JOSEPH~1\AppData\Local\Temp\flutter_tools.a5149c9d\flutter_tool.b6134d75\app.dill --packages D:\Projects\ahl\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-root C:\Users\JOSEPH~1\AppData\Local\Temp\flutter_tools.a5149c9d\flutter_tools.e8b57183 --filesystem-scheme org-dartlang-app --initialize-from-dill build\a072907fec955372e484c180f3334617.cache.dill.track.dill --platform file:///D:/dev/flutter/bin/cache/flutter_web_sdk/kernel/ddc_outline_sound.dill --verbosity=error --sound-null-safety ================================================ FILE: devtools_options.yaml ================================================ extensions: - provider: true ================================================ FILE: firebase.json ================================================ { "hosting": { "public": "build/web/", "ignore": [ "firebase.json", "**/.*", "**/node_modules/**" ], "rewrites": [ { "source": "**", "destination": "/index.html" } ] }, "emulators": { "auth": { "port": 9099 }, "firestore": { "port": 46561 }, "hosting": { "port": 5000 }, "storage": { "port": 9199 }, "ui": { "enabled": true }, "singleProjectMode": true }, "storage": { "rules": "storage.rules" }, "firestore": { "rules": "firestore.rules", "indexes": "firestore.indexes.json" } } ================================================ FILE: firestore.indexes.json ================================================ { "indexes": [], "fieldOverrides": [] } ================================================ FILE: firestore.rules ================================================ rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read: if true; } match /users/{document=**}{ allow write: if true; } match /prayer_requests/{document=**}{ allow write: if true; allow read: if true; } } } ================================================ FILE: functions/main.py ================================================ # Welcome to Cloud Functions for Firebase for Python! # To get started, simply uncomment the below code or create your own. # Deploy with `firebase deploy` from firebase_functions import https_fn from firebase_admin import initialize_app # initialize_app() # # # @https_fn.on_request() # def on_request_example(req: https_fn.Request) -> https_fn.Response: # return https_fn.Response("Hello world!") ================================================ FILE: functions/requirements.txt ================================================ firebase_functions~=0.1.0 ================================================ FILE: l10n.yaml ================================================ arb-dir: lib/src/localization template-arb-file: app_fr.arb output-localization-file: app_localizations.dart untranslated-messages-file: untranslated_message.txt ================================================ FILE: lib/ahl_barrel.dart ================================================ library; import 'package:ahl/src/utils/breakpoint_resolver.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; part 'src/assets/assets.dart'; part 'src/constants/constants.dart'; ================================================ FILE: lib/firebase_options.dart ================================================ // File generated by FlutterFire CLI. // ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform; /// Default [FirebaseOptions] for use with your Firebase apps. /// /// Example: /// ```dart /// import 'firebase_options.dart'; /// // ... /// await Firebase.initializeApp( /// options: DefaultFirebaseOptions.currentPlatform, /// ); /// ``` class DefaultFirebaseOptions { static FirebaseOptions get currentPlatform { if (kIsWeb) { return web; } switch (defaultTargetPlatform) { case TargetPlatform.android: throw UnsupportedError( 'DefaultFirebaseOptions have not been configured for android - ' 'you can reconfigure this by running the FlutterFire CLI again.', ); case TargetPlatform.iOS: throw UnsupportedError( 'DefaultFirebaseOptions have not been configured for ios - ' 'you can reconfigure this by running the FlutterFire CLI again.', ); case TargetPlatform.macOS: throw UnsupportedError( 'DefaultFirebaseOptions have not been configured for macos - ' 'you can reconfigure this by running the FlutterFire CLI again.', ); case TargetPlatform.windows: throw UnsupportedError( 'DefaultFirebaseOptions have not been configured for windows - ' 'you can reconfigure this by running the FlutterFire CLI again.', ); case TargetPlatform.linux: throw UnsupportedError( 'DefaultFirebaseOptions have not been configured for linux - ' 'you can reconfigure this by running the FlutterFire CLI again.', ); default: throw UnsupportedError( 'DefaultFirebaseOptions are not supported for this platform.', ); } } static const FirebaseOptions web = FirebaseOptions( apiKey: 'AIzaSyB3NGL68GwU26EZyhuK1TgApgyjed6Xmuk', appId: '1:452957179496:web:511c2c7b5acddca9e8b5dd', messagingSenderId: '452957179496', projectId: 'aujourdhuilavenir', authDomain: 'aujourdhuilavenir.firebaseapp.com', storageBucket: 'aujourdhuilavenir.appspot.com', measurementId: 'G-RJLCGV14LF', ); } ================================================ FILE: lib/main.dart ================================================ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_web_plugins/url_strategy.dart'; import 'package:lottie/lottie.dart'; import 'package:provider/provider.dart'; import 'package:meta_seo/meta_seo.dart'; import 'src/app.dart'; import 'src/firebase_constants.dart'; import 'src/settings/settings_controller.dart'; import 'src/settings/settings_service.dart'; import 'src/theme/theme.dart'; // test on github auto deploy void main() async { /// Meta Seo Setup if(kIsWeb){ MetaSEO().config(); } // ensure flutter is initialized // WidgetsFlutterBinding.ensureInitialized(); // Make the app url based usePathUrlStrategy(); // Set up the SettingsController, which will glue user settings to multiple // Flutter Widgets. final settingsController = SettingsController(SettingsService()); // Load the user's preferred theme while the splash screen is displayed. // This prevents a sudden theme change when the app is first displayed. settingsController.loadSettings(); // Run the app and pass in the SettingsController. The app listens to the // SettingsController for changes, then passes it further down to the // SettingsView. // here we go with firebase setup. // It is better to await this flutter app, but when working offline, it makes // the app not loading. runApp( ChangeNotifierProvider.value( value: settingsController, child: FutureBuilder( future: firebaseApp, builder: (context, snapshot) { if (snapshot.hasData) { return MyApp( settingsController: settingsController, ); } else { return Container( color: AhlTheme.background, child: LottieBuilder.asset( 'animations/loading.json', repeat: true,), ); } }, ), ), ); } ================================================ FILE: lib/src/app.dart ================================================ import 'package:ahl/src/article_view/view/article_view.dart'; import 'package:ahl/src/pages/novena_page/novena_page.dart'; import 'package:ahl/src/pages/projects/project_page_view.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:firebase_article/firebase_article.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; import 'package:ahl/src/pages/homepage/donation/donation_page.dart'; import 'package:ahl/src/pages/prayers/prayers_page.dart'; import 'package:ahl/src/pages/projects/projects_page.dart'; import 'package:ahl/src/pages/rosary/rosary_page.dart'; import 'package:ahl/src/pages/who_we_are/who_we_are.dart'; import 'package:ahl/src/project_space/bloc.dart'; import 'package:ahl/src/article_view/bloc/bloc.dart'; import 'firebase_constants.dart'; import 'pages/homepage/homepage.dart'; import 'theme/theme.dart'; import 'settings/settings_controller.dart'; /// The route widget of the website. class MyApp extends StatefulWidget { const MyApp({ super.key, required this.settingsController, this.home, }); final SettingsController settingsController; final Widget? home; @override State createState() => _MyAppState(); static void setLocal(BuildContext context, Locale newLocale) async { _MyAppState? state = context.findAncestorStateOfType<_MyAppState>(); state?.changeLanguage(newLocale); } } class _MyAppState extends State { Locale? _locale = const Locale('fr', 'FR'); late SettingsController settingsController; final GoRouter router = GoRouter( routes: [ GoRoute( path: '/', name: HomePage.routeName, builder: (_, __) => const HomePage(), routes: [ /// Project GoRoute( path: ProjectsPage.routeName, name: ProjectsPage.routeName, builder: (_, __) => const ProjectsPage(), routes: [ GoRoute( path: ":projectId", // name: ProjectsPage.routeName, builder: (context, state) { // get article id from path String? projectId = state.pathParameters["projectId"]; //? Not working // when no project isn't specified, go to the all project. // if (state.pathParameters.isEmpty || articleId == null) { // return const ProjectsPage(); // } else { // context.read().add( // GetArticleByIdEvent(id: articleId), // ); // return BlocBuilder>( // builder: (context, state) { // // get project // var project = state.articles?[articleId]; // if (project == null) { // return const ProjectsPage(); // } else { // return ProjectPageView(project: project); // } // }, // ); // } // Passing the article name to ProjectPageView instead if (projectId != null && projectId.trim() != "") { return ProjectPageView( projectId: projectId, ); } else { return const ProjectsPage(); } }, ), ], ), // GoRoute( // path: ArticleView.routeName, // builder: (_, __) => const ProjectsPage(), // routes: [ // Articles GoRoute( name: ArticleContentPage.routeName, path: "${ArticleContentPage.routeName}/:articleId", // name: ProjectsPage.routeName, builder: (context, state) { // get article id from path String? articleId = state.pathParameters["articleId"]; // Passing the article name to ProjectPageView instead if (state.extra != null) { return ArticleContentPage( article: state.extra as Article, ); } else /*if (articleId != null && articleId.trim() != "")*/ { return ArticleContentPage.fromId(articleId: articleId); } // else { // return const ArticlesPage(); // } }, ), // Novena GoRoute( name: NovenaPage.routeName, path: "${NovenaPage.routeName}/:novenaId", // name: ProjectsPage.routeName, builder: (context, state) { // get article id from path String? articleId = state.pathParameters["novenaId"]; // Passing the article name to ProjectPageView instead if (state.extra != null) { return NovenaPage( novena: state.extra as Article, ); } else /*if (articleId != null && articleId.trim() != "")*/ { return NovenaPage.fromId(novenaId: articleId); } // else { // return const ArticlesPage(); // } }, ), // ], // ), // Prayers GoRoute( path: PrayersPage.routeName, name: PrayersPage.routeName, builder: (_, __) => const PrayersPage(), routes: [ GoRoute( path: RosaryPage.routeName, name: RosaryPage.routeName, builder: (_, __) => const RosaryPage(), ), ], ), // Who we are GoRoute( path: WhoWeArePage.routeName, name: WhoWeArePage.routeName, builder: (_, __) => const WhoWeArePage(), ), //Donnation Page GoRoute( path: DonationPage.routeName, name: DonationPage.routeName, builder: (_, __) => const DonationPage(), ), ], ), ], ); void changeLanguage(Locale locale) { setState( () { _locale = locale; settingsController.updateLocales([locale]); }, ); } @override void initState() { settingsController = widget.settingsController; super.initState(); } @override Widget build(BuildContext context) { // Glue the SettingsController to the MaterialApp. // // The ListenableBuilder Widget listens to the SettingsController for changes. // Whenever the user updates their settings, the MaterialApp is rebuilt. return MultiBlocProvider( providers: [ BlocProvider( create: (context) => ArticleBloc( repo: ArticlesRepository
(firestoreInstance: firestore), ), ), BlocProvider( create: (context) => ProjectBloc( firebaseFirestore: firestore, ), ), ], child: ListenableBuilder( listenable: settingsController, builder: (BuildContext context, Widget? child) { return LayoutBuilder( builder: (context, constraints) => MaterialApp.router( // Providing a restorationScopeId allows the Navigator built by the // MaterialApp to restore the navigation stack when a user leaves and // returns to the app after it has been killed while running in the // background. restorationScopeId: 'ahl', // Provide the generated AppLocalizations to the MaterialApp. This // allows descendant Widgets to display the correct translations // depending on the user's locale. localizationsDelegates: const [ AppLocalizations.delegate, GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, GlobalCupertinoLocalizations.delegate, ], supportedLocales: AppLocalizations.supportedLocales, locale: _locale, // Use AppLocalizations to configure the correct application title // depending on the user's locale. // // The appTitle is defined in .arb files found in the localization // directory. onGenerateTitle: (BuildContext context) => AppLocalizations.of(context)!.appTitle, // Define a light and dark color theme. Then, read the user's // preferred ThemeMode (light, dark, or system default) from the // SettingsController to display the correct theme. theme: AhlTheme.lightTheme( MediaQuery.maybeOf(context)!.size.width, ), darkTheme: ThemeData.dark( useMaterial3: true, ), themeMode: settingsController.themeMode, // Define a function to handle named routes in order to support // Flutter web url navigation and deep linking. // onGenerateRoute: (RouteSettings routeSettings) { // log("Route settings is $routeSettings"); // return MaterialPageRoute( // settings: routeSettings, // builder: (BuildContext context) { // return FutureBuilder( // future: firebaseApp, // builder: (context, snapshot) { // if (snapshot.hasData) { // switch (routeSettings.name) { // case SettingsView.routeName: // return SettingsView( // controller: settingsController); // case SampleItemDetailsView.routeName: // return const SampleItemDetailsView(); // case HomePage.routeName: // return HomePage(); // case ProjectsPage.routeName: // return const ProjectsPage(); // case PrayersPage.routeName: // return const PrayersPage(); // case RosaryPage.routeName: // return const RosaryPage(); // case SaintsPage.routeName: // return const SaintsPage(); // case ArticlesPage.routeName: // return const ArticlesPage(); // case WhoWeArePage.routeName: // return const WhoWeArePage(); // case DonationPage.routeName: // return const DonationPage(); // // todo: add 400 not found page // default: // return widget.home ?? HomePage(); // } // } else { // return Scaffold( // body: LoadingView( // work: firebaseApp, // ), // ); // } // }, // ); // }, // ); // }, routerConfig: router, ), ); }, ), ); } } ================================================ FILE: lib/src/article_view/bloc/bloc.dart ================================================ import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_article/firebase_article.dart' as fire_art; import 'package:firebase_article/firebase_article.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'dart:developer' as developer; import '../state/state.dart'; import '../event/event.dart'; class ArticleBloc extends Bloc> { ArticleBloc({required fire_art.ArticlesRepository repo}) : _repo = repo, super(const ArticleState( articles: null, status: ArticleStatus.initial, error: null, )) { on(_onGetArticleById); on(_onGetArticleByPath); on(_onGetHighlightedArticle); on(_onGetArticleListEvent); on(_onInitializeArticleBlocEvent); add(InitializeArticleBlocEvent()); on(_onGetHighlightPath); on(_onGetHighlightCollection); } ArticleBloc.inCollection( {required String collection, required FirebaseFirestore firestore}) : _repo = fire_art.ArticlesRepository( firestoreInstance: firestore, collection: collection), super(const ArticleState( articles: null, status: ArticleStatus.initial, error: null, )) { on(_onGetArticleById); on(_onGetArticleByPath); on(_onGetHighlightedArticle); on(_onGetArticleListEvent); on(_onInitializeArticleBlocEvent); on(_onGetHighlightPath); on(_onGetHighlightCollection); add(InitializeArticleBlocEvent()); } final fire_art.ArticlesRepository _repo; void _onGetHighlightPath(GetHighlightPathEvent event, Emitter emit) async { emit( state.copyWith( status: ArticleStatus.initial, ), ); var highlightPath = await _repo.getHighlightedPath(); emit( state.copyWith( status: ArticleStatus.succeed, highlightPath: highlightPath, ), ); } void _onGetHighlightCollection( GetHighlightCollectionEvent event, Emitter emit) async { emit( state.copyWith( status: ArticleStatus.initial, ), ); var highlightCollection = await _repo.getHighlightedCollection(); emit( state.copyWith( status: ArticleStatus.succeed, highlightCollection: highlightCollection, ), ); } void _onInitializeArticleBlocEvent( InitializeArticleBlocEvent event, Emitter emit, ) { emit(state.copyWith( status: ArticleStatus.initial, articles: null, error: null, )); } void _onGetArticleById(GetArticleByIdEvent event, Emitter emit) async { emit( state.copyWith( status: ArticleStatus.initial, error: null, ), ); Object? error; fire_art.Article? result; try { if (event.collection == null) { result = await _repo.getArticleById(articleId: event.id!); } else { result = await _repo.getArticleByPath( path: "/${event.collection}/${event.id}"); } } catch (e) { error = e; } if (result != null) { emit( state.copyWith( status: ArticleStatus.succeed, articles: {result.id: result}, error: null, ), ); } else { emit( state.copyWith( status: ArticleStatus.failed, articles: null, error: error, ), ); } } void _onGetArticleByPath(GetArticleByPathEvent event, Emitter emit) async { Object? error; fire_art.Article? result; try { if (event.collection == null) { if (event.path == null) { result = await _repo.getArticleById(articleId: event.id!); } else { result = await _repo.getArticleByPath(path: event.path!); } } else { result = await _repo.getArticleByPath( path: "/${event.collection}/${event.id}"); } } catch (e) { error = e; } if (result != null) { emit( state.copyWith( status: ArticleStatus.succeed, articles: {result.id: result}, error: null, ), ); } else { emit( state.copyWith( status: ArticleStatus.failed, articles: null, error: error, ), ); } } void _onGetHighlightedArticle( GetHighlightArticleEvent event, Emitter emit) async { Object? error; fire_art.Article? result; emit(state.copyWith( status: ArticleStatus.initial, )); try { result = await _repo.getHighlighted(); if (result != null) { emit( state.copyWith( status: ArticleStatus.succeed, articles: {result.id: result}, error: null, highlightArticle: result, ), ); developer.log('[ArticleBloc]: state: $state'); } } catch (e) { error = 'Error getting highlight article : $e'; if (result == null) { emit(state.copyWith( status: ArticleStatus.failed, error: error, articles: null, // highlightArticle: null, )); } } } void _onGetArticleListEvent(GetArticleListEvent event, Emitter emit) async { try { List? articles; if (event.ids != null) { articles = await _repo.getArticlesSubListByIds(event.ids!) as List; } if (event.foldLength != null) { articles?.addAll( await _repo.getArticlesSubListByLength(event.foldLength!) as List); } // build map articles Map? mapArticles = (articles != null) ? {for (var article in articles) article.id: article} : null; emit( state.copyWith( articles: mapArticles, status: ArticleStatus.succeed, error: null), ); } catch (e) { developer.log('[Article Bloc] Error getting article list: $e'); } } } ================================================ FILE: lib/src/article_view/data/data.dart ================================================ // A barrel that contain every data implementation ================================================ FILE: lib/src/article_view/event/event.dart ================================================ final class ArticleEvent { const ArticleEvent({this.id}); final String? id; } final class GetHighlightArticleEvent extends ArticleEvent { const GetHighlightArticleEvent() : super(id: null); } final class GetArticleByIdEvent extends ArticleEvent { const GetArticleByIdEvent({ required super.id, this.collection, }); final String? collection; } final class GetArticleByPathEvent extends ArticleEvent { const GetArticleByPathEvent.fromCollection({ required super.id, this.collection, }): path = null; const GetArticleByPathEvent({required this.path}):collection = null; final String? path; final String? collection; } final class GetHighlightPathEvent extends ArticleEvent { const GetHighlightPathEvent(); } final class GetHighlightCollectionEvent extends ArticleEvent { const GetHighlightCollectionEvent(); } /// Request A list of article from the server. final class GetArticleListEvent extends ArticleEvent { const GetArticleListEvent({ this.foldLength = 1, this.ids, }) : assert( ids == null && foldLength != null || ids != null && foldLength == null, 'ids and [foldLength] can\'t be provided at the same time', ), super( id: null, ); final int? foldLength; final List? ids; } final class InitializeArticleBlocEvent extends ArticleEvent { InitializeArticleBlocEvent() : super(id: null); } ================================================ FILE: lib/src/article_view/state/state.dart ================================================ import 'package:equatable/equatable.dart'; import 'package:firebase_article/firebase_article.dart'; enum ArticleStatus { initial, /// when no request has sent yet succeed, /// when a request has be done successfully failed, /// when a request } class ArticleState extends Equatable { const ArticleState({ this.status = ArticleStatus.initial, this.articles, this.error, this.highlightArticle, this.highlightCollection, this.highlightPath, }); final ArticleStatus status; final Map? articles; final Object? error; final T? highlightArticle; final String? highlightPath; final String? highlightCollection; ArticleState copyWith({ ArticleStatus? status, Map? articles, Object? error, T? highlightArticle, String? highlightPath, String? highlightCollection, }) { Map newArticles = {}; if (articles != null) { newArticles.addAll(articles); } if (this.articles != null) { newArticles.addAll(this.articles!); } return ArticleState( status: status ?? this.status, articles: newArticles, error: error ?? this.error, highlightArticle: highlightArticle ?? this.highlightArticle, highlightCollection: highlightCollection ?? this.highlightCollection, highlightPath: highlightPath ?? this.highlightPath, ); } @override List get props => [ status, articles, error, highlightArticle, highlightPath, highlightCollection, ]; } ================================================ FILE: lib/src/article_view/view/article_content_view.dart ================================================ part of 'article_view.dart'; /// Article Page class ArticleContentPage extends StatefulWidget { /// Build [ArticleContentPage] from a article object. /// /// [article] is required to be not null. const ArticleContentPage({ super.key, required this.article, this.collection = "articles", }) : articleId = null; /// Build article page from article id. const ArticleContentPage.fromId({ super.key, this.collection = "articles", required this.articleId, }) : article = null; /// The article base route name static const String routeName = 'articles'; /// The current article to be displayed. final Article? article; /// The collection where to look for article files final String? collection; /// Article id. /// /// It's a path where to search for the article data on the firestore. final String? articleId; @override State createState() => ArticleContentPageState(); } class ArticleContentPageState extends State { /// The page scrollController; late ScrollController scrollController; /// The current article to be displayed. /// /// If [widget.article] is not null, then it is that article. /// If not, then [article] if fetched from [ArticleBloc]. late Article? article; Future getImageUrl(Article article) async { ArticleStorageUtils articleUtils = ArticleStorageUtils( article: article, collection: widget.collection ?? "articles"); return await articleUtils.getCoverImageUrl() ?? ""; } void articleSeoSetup(BuildContext context) { if (kIsWeb) { log('start seo setup'); WidgetsBinding.instance.addPostFrameCallback((timeStamp) { if (context.mounted) { HeadTagUtil.setHead( title: article!.title!, description: article!.relations![0]['preview'] as String, keywords: [ 'Madagascar', 'Notre Dame de la Delivrande', 'Sœur Dominicaines Missionnaires de Notre Dame de la Délivrande', ], // imageUrl: getImageUrl(article!), url: "https://aujourdhuilavenir.org/${widget.collection ?? "articles"}/${article!.id}", ); CreateHtml.makeWidgetTree(context); } }); // Define MetaSEO object MetaSEO meta = MetaSEO(); // set document title to article title web.document.title = article!.title!; // Set decription to article preview meta.description( description: article!.relations![0]['preview'] as String); // add meta seo data for web app as you want meta.ogTitle(ogTitle: article!.title!); meta.keywords( keywords: 'Madagascar, Notre Dame de la Delivrande, Sœur Dominicaines Missionnaires de Notre Dame de la Délivrande,'); // meta.ogImage(ogImage: await getImageUrl(article!)); } else { log('SEO setup is not supported on mobile'); } } @override void initState() { /// get article from [widget] article = widget.article; super.initState(); scrollController = ScrollController( keepScrollOffset: true, initialScrollOffset: 0, ); } @override void dispose() { scrollController.dispose(); article = null; super.dispose(); } @override Widget build(BuildContext context) { // setup seo if (article != null) { // Make Open Graph setup articleSeoSetup(context); } /// If [article] is null, then retriever it from [ArticleBloc]. if (article == null) { context.read().add( GetArticleByIdEvent(id: widget.articleId), ); } else { /// when article is not null String? type = widget.article!.relations?[0]['type']; switch (type) { case 'novena': context.goNamed(NovenaPage.routeName, extra: article); return const SizedBox(); default: return LayoutBuilder( builder: (context, constraints) => Scaffold( endDrawer: constraints.maxWidth <= ScreenSizes.large ? const AhlDrawer() : null, appBar: const AhlAppBar(), body: ListView( controller: scrollController, addAutomaticKeepAlives: true, children: [ ArticleContentView( collection: widget.collection, article: article!, controller: scrollController, ), const Gap(25), const NewsLetterPrompt(), const AhlFooter(), ], ), ), ); } } return BlocBuilder>( // buildWhen: (previous, current) => // previous.articles?[widget.articleId] == null, builder: (context, state) { String? type = widget.article?.relations?[0]['type']; article = article ?? state.articles?[widget.articleId]; if (article == null) { if (state.status == ArticleStatus.failed) { context.goNamed(HomePage.routeName); } return Scaffold( body: Container( alignment: Alignment.center, child: LottieBuilder.asset('animations/loading.json'), ), ); } switch (type) { case 'novena': context.goNamed(NovenaPage.routeName, extra: article); return const SizedBox(); default: return LayoutBuilder( builder: (context, constraints) => Scaffold( endDrawer: constraints.maxWidth <= ScreenSizes.large ? const AhlDrawer() : null, appBar: const AhlAppBar(), body: ListView( controller: scrollController, addAutomaticKeepAlives: true, children: [ ArticleContentView( collection: widget.collection, article: article!, controller: scrollController, ), const Gap(25), const NewsLetterPrompt(), const AhlFooter(), ], ), ), ); } }, ); } } class ArticleContentView extends StatefulWidget { ArticleContentView({ this.isProject = false, super.key, required this.article, this.collection = "articles", this.controller, this.label, }) : articleUtils = ArticleStorageUtils(article: article, collection: collection!); final Article article; final String? collection; final ArticleStorageUtils articleUtils; final ScrollController? controller; final bool isProject; final String? label; @override State createState() => _ArticleContentViewState(); } class _ArticleContentViewState extends State with AutomaticKeepAliveClientMixin { @override void initState() { /// SEO setup setupSeo(context); super.initState(); } /// Ask content. Future contentFetching() async { SessionStorage cache = SessionStorage(); /// Read cache if it is available String contentKey = '${widget.collection}/${widget.article.id}/${widget.article.contentPath}'; if (cache[contentKey] != null) { return cache[contentKey]!; } /// Make real request final bytes = await firebase.storage .child( contentKey, ) .getData(); String decodedString = utf8.decode(bytes!.toList()); /// Add result to cache cache[contentKey] = decodedString; return decodedString; } late Future content; late double screenWidth; // late String articleKey = 'article_${widget.article.title}'; late SessionStorage cache = SessionStorage(); late Future _coverImage; late MarkdownConfig minimalisticCorporateConfig; @override bool get wantKeepAlive => true; @override Widget build(BuildContext context) { super.build(context); setupSeo(context); content = contentFetching(); widget.articleUtils.getCoverImage(); _coverImage = widget.articleUtils.getCoverImage(); screenWidth = MediaQuery.of(context).size.width; minimalisticCorporateConfig = MarkdownConfig( configs: [ ImgConfig( builder: (String url, Map? attribute) { SessionStorage cache = SessionStorage(); if (cache[url] != null) { return Align( key: SeoKey( TagType.img, src: url, attributes: attribute, ), child: AhlImageViewer.fromFuture( future: Future.value( decodeUint8ListFromString( cache[url]!, ), ), ), ); } else { if (url.contains('://')) { return Align( key: SeoKey( TagType.img, src: url, attributes: attribute, ), child: AhlImageViewer( url: url, attributes: attribute, ), ); } try { log(url); final Future future = firebase.storage.child(url).getData(); future.then( (value) { if (value != null) { if (cache[url] == null) { cache[url] = encodeUint8ListToString(value); } } }, ); return Container( alignment: Alignment.center, // constraints: BoxConstraints( // maxHeight: resolveForBreakPoint( // screenWidth, // other: 575, // small: 300, // ), // ), child: AhlImageViewer.fromFuture( key: SeoKey( TagType.img, src: url, attributes: attribute, ), // key: ValueKey(url), future: future, attributes: attribute, ), ); // return Container(); } catch (e) { log("[ArticleContentViewState] Error getting image: $e"); return Container( alignment: Alignment.center, child: const Icon(Icons.warning), ); } } }, ), H1Config( style: const H1Config().style.copyWith( fontFamily: "Poppins", color: AhlTheme.blackCharcoal, fontSize: 32, height: 1.25, fontWeight: FontWeight.w600, ), ), H2Config( style: const H2Config().style.copyWith( fontFamily: "Poppins", color: AhlTheme.blackCharcoal, fontSize: 28, height: 1.4, fontWeight: FontWeight.w600, ), ), H3Config( style: const H2Config().style.copyWith( fontFamily: "Poppins", color: AhlTheme.blackCharcoal, fontSize: 24, height: 1.4, fontWeight: FontWeight.w600, ), ), H4Config( style: const H2Config().style.copyWith( fontFamily: "Poppins", color: AhlTheme.blackCharcoal, fontSize: 22, height: 1.25, fontWeight: FontWeight.w600, ), ), H5Config( style: const H2Config().style.copyWith( fontFamily: "Poppins", color: AhlTheme.blackCharcoal, fontSize: 16, height: 1.5, fontWeight: FontWeight.w600, ), ), H6Config( style: const H2Config().style.copyWith( fontFamily: "Poppins", color: AhlTheme.blackCharcoal, fontSize: 14, height: 1.4, fontWeight: FontWeight.w600, ), ), PConfig( textStyle: const PConfig().textStyle.copyWith( fontFamily: 'Poppins', color: const Color(0xFF3F403C), ), ), LinkConfig( style: Theme.of(context).textTheme.labelLarge!.copyWith( color: Theme.of(context).primaryColor, decoration: TextDecoration.underline, decorationColor: Theme.of(context).primaryColor, // height: 5, ), onTap: (url) { launchUrl(Uri.parse(url)); }, ), // ImgConfig( // builder: (url, attributes) { // return Column( // children: [ // Container( // constraints: BoxConstraints( // minWidth: 320, // maxWidth: ContentSize.maxWidth(screenWidth), // ), // decoration: BoxDecoration( // image: DecorationImage(image: NetworkImage(url)), // borderRadius: BorderRadius.circular(BorderSizes.medium), // ), // clipBehavior: Clip.hardEdge, // ), // if (attributes['name'] != null) Text('${attributes["name"]}'), // ], // ); // }, // ), ], ); return Center( child: Container( key: ValueKey(widget.article.title), constraints: BoxConstraints(maxWidth: ContentSize.maxWidth(screenWidth)), // constraints: const BoxConstraints(maxWidth: 1024), margin: EdgeInsets.symmetric( horizontal: resolveForBreakPoint( screenWidth, other: Margins.small / 2, // extraHuge: Margins.extraHuge, // huge: Margins.huge, // extraLarge: Margins.extraLarge, // large: Margins.large, ), ), // padding: EdgeInsets.symmetric( // horizontal: resolveForBreakPoint( // screenWidth, // small: Margins.small, // medium: Margins.small, // large: Margins.large, // extraLarge: Margins.extraLarge, // other: Margins.huge, // ), // ), child: buildMarkdownBlock(context), ), ); } // share button Widget shareButtonBig = Builder( builder: (context) => Container( constraints: const BoxConstraints(maxWidth: 400), alignment: Alignment.center, child: OutlinedButton.icon( onPressed: () { var router = GoRouter.of(context); String location = router.routeInformationProvider.value.uri.path; Share.share("https://aujourdhuilavenir.org$location"); }, icon: const Icon( Icons.share_outlined, size: IconSizes.large, ), label: Container( height: 75, alignment: Alignment.center, child: Text( 'Partager', style: Theme.of(context).textTheme.labelLarge!.copyWith( fontSize: 22, color: Theme.of(context).primaryColor, ), ), ), ), ), ); // share button Widget shareButton = Builder( builder: (context) => OutlinedButton.icon( onPressed: () { var router = GoRouter.of(context); String location = router.routeInformationProvider.value.uri.path; Share.share("https://aujourdhuilavenir.org$location"); }, label: const Text('Partager'), icon: const Icon(Icons.share_outlined), ), ); Widget buildMarkdownBlock(BuildContext context) { //seo setupSeo(context); // share button Widget supportProjectButton = Builder( builder: (context) => Container( constraints: const BoxConstraints(maxWidth: 400), child: ElevatedButton.icon( style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).primaryColor, foregroundColor: Theme.of(context).colorScheme.onPrimary, ), onPressed: () => Navigator.of(context).pushNamed( DonationPage.routeName, arguments: widget.article, ), icon: SvgPicture.asset( AhlAssets.dons, width: IconSizes.large, height: IconSizes.large, ), label: Container( alignment: Alignment.center, height: 75, // width: 250, child: Text( AppLocalizations.of(context)!.supportProject, style: Theme.of(context).textTheme.labelLarge!.copyWith( fontSize: 22, color: Theme.of(context).colorScheme.onPrimary, ), ), ), ), ), ); return Card( color: Theme.of(context).colorScheme.surface, child: // padding: const EdgeInsets.all(Paddings.medium), Column( children: [ // label Container( padding: const EdgeInsets.all(Paddings.medium), alignment: Alignment.centerLeft, child: Text( key: SeoKey(TagType.p, text: widget.label ?? "", alt: "Article date"), widget.label ?? DateTimeUtils.localizedFromStringDate( dateString: widget.article.releaseDate, context: context), style: Theme.of(context) .textTheme .labelMedium! .copyWith(color: Theme.of(context).primaryColor), ), ), // title Container( padding: const EdgeInsets.all(Paddings.medium), alignment: Alignment.centerLeft, child: Text( widget.article.title ?? "", key: SeoKey(TagType.h1, text: widget.article.title ?? ""), style: resolveHeadlineTextThemeForBreakPoints( MediaQuery.of(context).size.width, context, ), ), ), // const Padding( // padding: EdgeInsets.symmetric(vertical: Paddings.medium), // child: AhlDivider( // leading: 0, // trailing: 50, // thickness: 16, // ), // ), Container( padding: const EdgeInsets.all(Paddings.medium), alignment: Alignment.centerLeft, child: Text(widget.article.relations?[0]['preview'], key: SeoKey( TagType.p, text: widget.article.relations?[0]['preview'], )), ), // share button Container( alignment: Alignment.centerLeft, padding: const EdgeInsets.symmetric( vertical: 20, horizontal: Paddings.medium, ), child: Wrap( alignment: WrapAlignment.start, runAlignment: WrapAlignment.start, spacing: 20, runSpacing: 20, crossAxisAlignment: WrapCrossAlignment.start, children: [ ListenPodcastButton( key: SeoKey(TagType.a, text: "Listen Podcast", alt: "Play Podcast Button"), article: widget.article, collection: widget.collection, ), shareButton, ], ), ), SizedBox( height: resolveForBreakPoint( screenWidth, other: 575, small: 300, ), width: double.maxFinite, // constraints: const BoxConstraints.expand(), child: AhlImageViewer.fromFuture( fit: BoxFit.cover, future: _coverImage, ), ), // markdown content Container( padding: EdgeInsets.all( resolveForBreakPoint( screenWidth, other: Paddings.big, small: 10, medium: 10, ), ), child: FutureBuilder( future: content, builder: (context, snapshot) { switch (snapshot.connectionState) { case ConnectionState.done: if (snapshot.hasData) { return MarkdownBlock( key: SeoKey(TagType.p, text: snapshot.data ?? "Empty article"), data: snapshot.data ?? 'Error loading article.', config: minimalisticCorporateConfig, ); } else { return Align( alignment: Alignment.center, child: Column( children: [ Icon( Icons.warning_rounded, color: Theme.of(context).colorScheme.error, ), Text( 'Error loading article content: ${snapshot.error}') ], ), ); } default: return Container( alignment: Alignment.center, width: MediaQuery.of(context).size.height - 50, child: const CircularProgressIndicator(), ); // default: // return Align( // alignment: Alignment.center, // child: Icon( // Icons.warning_rounded, // color: Theme.of(context).colorScheme.error, // ), // ); } }, )), Container( padding: const EdgeInsets.symmetric( vertical: 20, horizontal: Paddings.medium), child: shareButtonBig, ), if (widget.isProject) Container( padding: const EdgeInsets.all(Paddings.medium), alignment: Alignment.center, child: supportProjectButton, ), Gap( resolveSeparatorSize(context), ), ], ), ); } } class ListenPodcastButton extends StatelessWidget { const ListenPodcastButton({ super.key, required this.article, this.collection, this.iconSize = 24, }); final Article article; final String? collection; final double iconSize; @override Widget build(BuildContext context) { if (article.relations?[0]['audio'] != null) { return ElevatedButton.icon( // shape: const StadiumBorder(), // backgroundColor: Colors.transparent, style: ElevatedButton.styleFrom( // padding: const EdgeInsets.symmetric( // vertical: 10, // horizontal: 16, // ), foregroundColor: Theme.of(context).colorScheme.onPrimary, backgroundColor: Theme.of(context).colorScheme.primary, ), label: Text( AppLocalizations.of(context)!.listenPodcast, ), icon: const Icon(Icons.play_arrow), onPressed: () { PersistentBottomSheetController? controller; controller = Scaffold.maybeOf(context)?.showBottomSheet((context) { return Container( constraints: const BoxConstraints.tightFor( height: 125, ), child: Stack( children: [ FirebaseAudioPlayer( article: article, collection: collection, ), Align( alignment: Alignment.topRight, child: Row( mainAxisSize: MainAxisSize.min, children: [ IconButton( icon: Icon(Icons.minimize, size: iconSize), color: Theme.of(context).colorScheme.onPrimaryFixed, onPressed: () { controller?.close(); }, ), IconButton( icon: Icon(Icons.close_rounded, size: iconSize), color: Theme.of(context).colorScheme.onPrimaryFixed, onPressed: () { controller?.close(); }, ), ], ), ), ], ), ); }); }, ); } else { return const SizedBox.shrink(); } } } class AhlImageViewer extends StatefulWidget { const AhlImageViewer({ super.key, required this.url, this.attributes, this.fit = BoxFit.contain, }) : future = null; const AhlImageViewer.fromFuture( {super.key, required this.future, this.attributes, this.fit}) : url = null; final Future? future; final String? url; final Map? attributes; final BoxFit? fit; @override State createState() => _AhlImageViewerState(); } class _AhlImageViewerState extends State { late Future imageFuture; @override void initState() { developer.log("[AhlImageViewer] State is initialized."); super.initState(); if (widget.url != null) { imageFuture = firebase.storage.child(widget.url!).getData(); } else { imageFuture = widget.future!; } } @override Widget build(BuildContext context) { //seo setupSeo(context); if (widget.url != null && widget.url!.contains("://")) { return SizedBox( height: double.tryParse(widget.attributes?['height'] ?? ""), child: InkWell( onTap: () { Navigator.of(context).push( DialogRoute( context: context, builder: (context) => ImageViewer( child: Image.network( cacheHeight: 500, cacheWidth: 500, gaplessPlayback: false, widget.url!, fit: widget.fit, ), ), ), ); }, child: Image.network( key: SeoKey(TagType.img, src: widget.url ?? ""), widget.url!, fit: widget.fit, ), ), ); } return SizedBox( height: double.tryParse(widget.attributes?['height'] ?? ""), child: FutureBuilder( future: imageFuture, key: ValueKey(widget.url), builder: (context, snapshot) { switch (snapshot.connectionState) { case ConnectionState.done: if (snapshot.hasData) { return InkWell( onTap: () { Navigator.of(context).push( DialogRoute( context: context, builder: (context) => ImageViewer( child: Image.memory(snapshot.data!), ), ), ); }, child: Image.memory( Uint8List.fromList( snapshot.data!, ), fit: widget.fit, ), ); } if (snapshot.hasError) { return Container( height: 400, alignment: Alignment.center, child: Column( children: [ const Icon(Icons.error), Text("Error getting Image: ${snapshot.error}"), Text('Data: $snapshot'), ], ), ); } return Container( height: 400, alignment: Alignment.center, child: const CircularProgressIndicator(), ); default: return Container( height: 400, alignment: Alignment.center, child: const CircularProgressIndicator(), ); } }, ), ); } } ================================================ FILE: lib/src/article_view/view/article_view.dart ================================================ import 'dart:developer'; import 'dart:convert'; import 'dart:developer' as developer; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter/foundation.dart'; import 'package:web/web.dart' as web; import 'package:firebase_article/firebase_article.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:lottie/lottie.dart'; import 'package:share_plus/share_plus.dart'; import 'package:meta_seo/meta_seo.dart'; import 'package:logger/logger.dart'; import 'package:flutter_seo/flutter_seo.dart'; import 'package:gap/gap.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; import 'package:markdown_widget/markdown_widget.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:session_storage/session_storage.dart'; import 'package:ahl/src/pages/homepage/donation/donation_page.dart'; import 'package:ahl/src/utils/firebase_utils.dart'; import 'package:ahl/src/pages/homepage/homepage.dart'; import 'package:ahl/src/pages/novena_page/novena_page.dart'; import 'package:ahl/src/newsletter/newsletter.dart'; import 'package:ahl/src/article_view/bloc/bloc.dart'; import 'package:ahl/src/article_view/event/event.dart'; import 'package:ahl/src/article_view/state/state.dart'; import 'package:ahl/src/firebase_constants.dart' as firebase; import 'package:ahl/src/theme/theme.dart'; import 'package:ahl/src/utils/breakpoint_resolver.dart'; import '../../utils/date_time_utils.dart'; import 'package:ahl/ahl_barrel.dart'; import 'package:ahl/src/widgets/widgets.dart'; import '../../utils/seo.dart'; import '../../utils/storage_utils.dart'; part 'article_content_view.dart'; part 'highlight_article_tile.dart'; // import 'package:markdown_widget/markdown_widget.dart'; String monthTextResolve(BuildContext context, String monthName) { List vowels = ['a', 'e', 'i', 'o', 'u', 'y']; /// If the first element is a vowel. //todo: change based on locale to. if (vowels.contains(monthName.characters.first.toLowerCase())) { return "Mois d'$monthName"; } else { return 'Mois de $monthName'; } } /// A tile of article class ArticleTile extends StatefulWidget { const ArticleTile({ super.key, required this.article, }); final Article article; @override State createState() => ArticleTileState(); } class ArticleTileState extends State { // article of the tile late Article article; late ArticleStorageUtils articleStorageUtils; @override void initState() { article = widget.article; articleStorageUtils = ArticleStorageUtils(article: article, collection: 'articles'); super.initState(); } void goToReadingPage() { Navigator.push( context, MaterialPageRoute( builder: (context) { return ArticleContentPage(article: article); }, ), ); } @override Widget build(BuildContext context) { TextStyle? titleTheme = resolveHeadlineTextThemeForBreakPoints( MediaQuery.of(context).size.width, context, ); return LayoutBuilder( builder: (context, constraints) => Container( // padding: const EdgeInsets.all(Paddings.big), // clipBehavior: Clip.hardEdge, decoration: BoxDecoration( borderRadius: BorderRadius.circular(BorderSizes.big), ), child: Material( borderOnForeground: true, child: InkWell( onTap: goToReadingPage, child: Container( // margin: const EdgeInsets.symmetric( // horizontal: Margins.mobileMedium, // ), constraints: const BoxConstraints( maxWidth: 1130, minWidth: 350, ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ if (article.title != null) Padding( padding: const EdgeInsets.only( bottom: Paddings.big, top: Paddings.small), child: Text( article.title!, style: titleTheme, ), ), SizedBox( height: 135, // maxHeight: 232, width: constraints.maxWidth, child: Row( children: [ Expanded( flex: 1, child: ConstrainedBox( constraints: const BoxConstraints( minHeight: 135, maxHeight: 232, ), child: (article.relations ?.first[RepoSetUp.coverImageKey] != null) ? FutureBuilder( future: articleStorageUtils .getCoverImage(), //getHeroHeaderImage(), builder: (context, snapshot) { switch (snapshot.connectionState) { case ConnectionState.done: if (snapshot.hasData) { return Container( constraints: const BoxConstraints( maxHeight: 135, maxWidth: 185, minWidth: 107, ), decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.cover, image: MemoryImage( snapshot.data!), ), ), ).animate().fadeIn( curve: Curves.easeInOutBack, ); } else { return Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular( BorderSizes.small), color: Theme.of(context) .colorScheme .errorContainer, ), child: Text( 'Error getting image: ${snapshot.error}', style: Theme.of(context) .textTheme .labelSmall! .copyWith( color: Theme.of(context) .colorScheme .error, ), ).animate().fadeIn(), ); } case ConnectionState.waiting: return Container( alignment: Alignment.center, decoration: BoxDecoration( borderRadius: BorderRadius.circular( BorderSizes.small), color: Theme.of(context) .colorScheme .primaryContainer, ), child: SizedBox.square( dimension: 50, child: CircularProgressIndicator( color: Theme.of(context) .colorScheme .primary, ), ), ); default: return Container( alignment: Alignment.center, decoration: BoxDecoration( borderRadius: BorderRadius.circular( BorderSizes.small), color: Theme.of(context) .colorScheme .secondaryContainer, ), child: SizedBox.square( dimension: 50, child: CircularProgressIndicator( color: Theme.of(context) .colorScheme .secondary, ), ), ); } }, ) : Expanded( child: Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular( BorderSizes.small), color: Theme.of(context) .colorScheme .primaryContainer, ), ), ), ), ), Expanded( flex: 2, child: Column( children: [ Expanded( flex: 1, child: Row( children: [ Container( margin: const EdgeInsets.only( left: Paddings.big, right: Paddings.medium), color: AhlTheme.yellowRelax, constraints: const BoxConstraints.expand( width: 25, // height: 85, ), ), Expanded( flex: 1, child: FutureBuilder( future: Future.value(article.relations ?.first[RepoSetUp.previewKey] as String), builder: (context, snapshot) { if (snapshot.hasData) { return Container( alignment: Alignment.topCenter, child: Text( snapshot.data!, maxLines: 4, style: Theme.of(context) .textTheme .bodyMedium! .copyWith( overflow: TextOverflow .ellipsis), ), ); } else if (snapshot.connectionState == ConnectionState.waiting) { return Container( alignment: Alignment.center, decoration: BoxDecoration( borderRadius: BorderRadius.circular( BorderSizes.small), color: Theme.of(context) .colorScheme .primaryContainer, ), child: SizedBox.square( dimension: 50, child: CircularProgressIndicator( color: Theme.of(context) .colorScheme .primary, ), ), ); } else { return Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular( BorderSizes.small), color: Theme.of(context) .colorScheme .errorContainer, ), child: Text( 'Error getting content: ${snapshot.error}', style: Theme.of(context) .textTheme .labelSmall! .copyWith( color: Theme.of(context) .colorScheme .error, ), ), ); } }, ), ), ], ), ), // Align( // alignment: Alignment.centerRight, // child: ElevatedButton( // style: ElevatedButton.styleFrom( // foregroundColor: // Theme.of(context).colorScheme.onPrimary, // backgroundColor: // Theme.of(context).colorScheme.primary, // ), // onPressed: () { // goToReadingPage(); // }, // child: const Text('Lire'), // ), // ), ], ), ), ], ), ), ], ), ), ), ), ), ); } } /// A tile of article class CardArticleTile extends StatefulWidget { const CardArticleTile( {super.key, required this.article, this.collection = 'articles', this.callback, this.direction, this.maxHeight, this.label, this.title, this.preview}) : articleId = null; const CardArticleTile.fromId({ super.key, required this.articleId, this.collection = 'articles', this.callback, this.direction, this.maxHeight, this.label, this.title, this.preview, }) : article = null; final Article? article; final String collection; final VoidCallback? callback; final String? articleId; final Axis? direction; final double? maxHeight; /// A replacement string for the title final String? label; /// A replacement string for the title final String? title; /// A replacement string for the title final String? preview; @override State createState() => _CardArticleTileState(); } class _CardArticleTileState extends State with AutomaticKeepAliveClientMixin { // article of the tile late Article? article; late ArticleStorageUtils? articleStorageUtils; /// The collection where to search the article image. This also the name of /// firestore collection of the article. late String collection; final double elevation = 0; late double _maxHeight; @override void initState() { collection = getCollection(widget.articleId ?? "") ?? widget.collection; // elevation = 5.0; _maxHeight = (widget.direction == Axis.vertical) ? 400 : 300; /// Make article transaction /// /// Use from widget if it is not null. Trigger a request article event if not. if (widget.article != null) { article = widget.article!; articleStorageUtils = ArticleStorageUtils(article: article!, collection: collection); } else { article = null; articleStorageUtils = null; context.read().add( GetArticleByPathEvent.fromCollection( id: widget.articleId!, collection: collection, ), ); } super.initState(); } /// Default callback. /// /// Called when the the card is clicked. void goToReadingPage() { String articleId = widget.article?.id ?? widget.articleId!; if (collection.startsWith('/')) { collection = collection.substring(1); } context.go( '/$collection/$articleId', extra: article, ); } /// on Hover callback. /// /// It is mainly used in the ui update. void _onHover(bool isHovered) { // if (isHovered) { // setState(() { // elevation = 25; // }); // } else { // setState(() { // elevation = 5; // }); // } } @override Widget build(BuildContext context) { super.build(context); if (article != null) { return buildTile(context, article!); } else { return BlocBuilder>( buildWhen: (previous, current) => previous.articles == null || !previous.articles!.containsKey(widget.articleId), builder: (context, state) { article = state.articles?[widget.articleId]; if (article != null) { articleStorageUtils = ArticleStorageUtils(article: article!, collection: collection); return buildTile(context, article!); } if (state.error != null) { log("[CardArticleTile]: Error getting article: ${widget.articleId}. ${state.error}"); return const SizedBox.shrink(); } else { return Align( child: Container( decoration: BoxDecoration( color: Theme.of(context).colorScheme.surfaceContainerHigh, borderRadius: BorderRadius.circular(BorderSizes.medium), ), width: 330, height: 400, ) .animate( onPlay: (controller) => controller.repeat(), ) .then(delay: Durations.long1) .shimmer(), ); } }, ); } } Widget buildTile(BuildContext context, Article article) { super.build(context); TextStyle? titleTheme = // Theme.of(context).textTheme.headlineSmall; resolveHeadlineTextThemeForBreakPoints( MediaQuery.of(context).size.width, context, ); DateTime releaseDate = DateTimeUtils.parseReleaseDate(article.releaseDate ?? ""); return Card( color: Colors.white, elevation: elevation, borderOnForeground: true, clipBehavior: Clip.antiAlias, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(BorderSizes.medium), ), child: InkWell( onHover: _onHover, onTap: widget.callback ?? goToReadingPage, child: Container( // padding: const EdgeInsets.all(Paddings.medium), constraints: BoxConstraints( maxWidth: resolveForBreakPoint( MediaQuery.of(context).size.width, // small: 330, // medium: 330, other: ContentSize.maxWidth(MediaQuery.of(context).size.width), ), minWidth: 330, maxHeight: widget.maxHeight ?? _maxHeight, ), child: Flex( direction: widget.direction ?? resolveForBreakPoint( MediaQuery.of(context).size.width, other: Axis.horizontal, small: Axis.vertical, medium: Axis.vertical, ), children: [ Flexible( child: Container( alignment: Alignment.topLeft, padding: (widget.direction == Axis.horizontal) ? const EdgeInsets.only( top: Paddings.big, left: Paddings.big, right: Paddings.big, ) : const EdgeInsets.only( top: Paddings.medium, right: Paddings.medium, left: Paddings.medium, // vertical: Paddings.big, ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.end, children: [ // Flexible( // child: FittedBox( child: Text( widget.label ?? "${releaseDate.day} ${DateTimeUtils.localMonth(releaseDate.month, context)} ${releaseDate.year}", style: Theme.of(context) .textTheme .labelMedium! .copyWith(color: Theme.of(context).primaryColor), ), ), //title // Flexible( // child: // Padding( // padding: const EdgeInsets.only( // bottom: Paddings.small, top: Paddings.small), // child: // FittedBox( // child: Flexible( flex: 1, child: Align( alignment: Alignment.bottomLeft, child: Text( widget.title ?? article.title ?? "", style: titleTheme, maxLines: 3, overflow: TextOverflow.ellipsis, ), ), ), // ), // ), // separator // Flexible( // child: Container( // margin: const EdgeInsets.symmetric( // vertical: Paddings.small, // ), // color: AhlTheme.yellowRelax, // constraints: const BoxConstraints.expand( // width: 100, // height: 16, // ), // ), // ), const Gap(20), Flexible( flex: 2, child: (widget.preview != null) ? Text( widget.preview!, ) : ArticlePreviewTextView( article: article, collection: collection, callback: goToReadingPage, ), ), ], ), ), ), // SizedBox( // ], // ), // ), // // Align( // // alignment: Alignment.centerRight, // // child: ElevatedButton( // // style: ElevatedButton.styleFrom( // // foregroundColor: // // Theme.of(context).colorScheme.onPrimary, // // backgroundColor: // // Theme.of(context).colorScheme.primary, // // ), // // onPressed: () { // // goToReadingPage(); // // }, // // child: const Text('Lire'), // // ), // // ), // ], // ), // ), Expanded( child: ArticleCoverImage( direction: widget.direction, article: article, collection: collection, ), ), ], ), ), ), ); } @override bool get wantKeepAlive => true; // articleStorageUtils?.coverImage != null; @override void updateKeepAlive() { super.updateKeepAlive(); } } class MobileArticleClipper extends CustomClipper { @override Path getClip(Size size) { final path = Path(); path.moveTo(size.width, 0); // Start at top right corner path.lineTo(0, size.height * 1 / 10); // Draw line to top right corner path.lineTo(0, size.height); // Diagonal line down path.lineTo(size.width, size.width); // path.lineTo(0, size.height); // Line to bottom left corner path.close(); // Close the path return path; } @override bool shouldReclip(MobileArticleClipper oldClipper) => false; // Optimizes performance if path doesn't change } class LargeArticleClipper extends CustomClipper { @override Path getClip(Size size) { final path = Path(); path.moveTo(size.width * 1 / 4, 0); // Start at top right corner path.lineTo(0, size.height); // Draw line to top right corner path.lineTo(size.width, size.width); path.lineTo(size.width, 0); // Diagonal line down // path.lineTo(0, size.height); // Line to bottom left corner path.close(); // Close the path return path; } @override bool shouldReclip(LargeArticleClipper oldClipper) => false; // Optimizes performance if path doesn't change } class ArticleCoverImage extends StatefulWidget { const ArticleCoverImage({ super.key, required this.article, this.direction, this.collection = 'articles', }); final String collection; final Article article; final Axis? direction; @override State createState() => ArticleCoverImageState(); } class ArticleCoverImageState extends State { late ArticleStorageUtils articleStorageUtils; late Future articleCoverImage; late Article article; final SessionStorage cache = SessionStorage(); late String coverImageCacheKey; @override void initState() { super.initState(); articleStorageUtils = ArticleStorageUtils( article: widget.article, collection: widget.collection, ); article = widget.article; coverImageCacheKey = "${article.id}_cover_image"; articleCoverImage = articleStorageUtils.getCoverImage(); //getHeroHeaderImage() } @override Widget build(BuildContext context) { Axis direction = widget.direction ?? resolveForBreakPoint( MediaQuery.of(context).size.width, other: Axis.horizontal, small: Axis.vertical, medium: Axis.vertical, ); return // (cache[coverImageCacheKey] == null) // ? ConstrainedBox( constraints: const BoxConstraints( // minHeight: 135, // maxHeight: 232, ), child: // (article.relations?.first[RepoSetUp.coverImageKey] != null) // ? FutureBuilder( future: articleCoverImage, builder: (context, snapshot) { // switch (snapshot.connectionState) { // case ConnectionState.done: try { if (snapshot.hasData) { try { cache[coverImageCacheKey] = encodeUint8ListToString(snapshot.data!); } catch (e) { // error adding image to cache } return ClipPath( clipper: (direction == Axis.vertical) ? MobileArticleClipper() : LargeArticleClipper(), child: Container( // constraints: const BoxConstraints( // // maxHeight: 135, // // maxWidth: 185, // // minWidth: 107, // ), decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.cover, image: MemoryImage(snapshot.data!), ), ), ).animate().fadeIn(), ); } else { return const SizedBox.shrink(); } } catch (e) { log("Error getting HighLight Article"); return const SizedBox.shrink(); } // else { // return Container( // decoration: BoxDecoration( // borderRadius: // BorderRadius.circular(BorderSizes.small), // color: Theme.of(context) // .colorScheme // .errorContainer, // ), // child: Text( // 'Error getting image: ${snapshot.error}', // style: Theme.of(context) // .textTheme // .labelSmall! // .copyWith( // color: // Theme.of(context).colorScheme.error, // ), // ).animate().fadeIn(), // ); // } // case ConnectionState.waiting: // return Container( // alignment: Alignment.center, // decoration: BoxDecoration( // borderRadius: // BorderRadius.circular(BorderSizes.small), // color: Theme.of(context) // .colorScheme // .primaryContainer, // ), // child: SizedBox.square( // dimension: 50, // child: CircularProgressIndicator( // color: Theme.of(context).colorScheme.primary, // ), // ), // ); // default: // return Container( // alignment: Alignment.center, // decoration: BoxDecoration( // borderRadius: // BorderRadius.circular(BorderSizes.small), // color: Theme.of(context) // .colorScheme // .secondaryContainer, // ), // child: SizedBox.square( // dimension: 50, // child: CircularProgressIndicator( // color: Theme.of(context).colorScheme.secondary, // ), // ), // ); // } }, ) // : Expanded( // child: Container( // decoration: BoxDecoration( // borderRadius: BorderRadius.circular(BorderSizes.small), // color: Theme.of(context).colorScheme.primaryContainer, // ), // ), // ), ) // : ClipPath( // clipper: resolveForBreakPoint( // MediaQuery.of(context).size.width, // other: LargeArticleClipper(), // small: MobileArticleClipper(), // medium: MobileArticleClipper(), // ), // child: Container( // // constraints: const BoxConstraints( // // // maxHeight: 135, // // // maxWidth: 185, // // // minWidth: 107, // // ), // decoration: BoxDecoration( // image: DecorationImage( // fit: BoxFit.cover, // image: MemoryImage(decodeUint8ListFromString( // cache[coverImageCacheKey] ?? "[[]]")), // ), // ), // ).animate().fadeIn( // curve: Curves.easeInOutBack, // ), // ); ; } } class ArticlePreviewTextView extends StatefulWidget { const ArticlePreviewTextView( {super.key, required this.article, this.collection = 'articles', this.callback}); final Article article; final String collection; final VoidCallback? callback; @override State createState() { return ArticlePreviewViewState(); } } class ArticlePreviewViewState extends State { // late ArticleStorageUtils articleStorageUtils; @override void initState() { // articleStorageUtils = ArticleStorageUtils( // article: widget.article, collection: widget.collection); super.initState(); } @override Widget build(BuildContext context) { return (widget.article.relations?.first[RepoSetUp.coverImageKey] != null) ? FutureBuilder( future: Future.value(widget .article.relations?.first[RepoSetUp.previewKey] as String), builder: (context, snapshot) { if (snapshot.hasData) { return Container( alignment: Alignment.topCenter, child: RichText( overflow: TextOverflow.ellipsis, maxLines: 5, softWrap: true, // overflow: TextOverflow.ellipsis, text: TextSpan( text: snapshot.data!, // softWrap: true, // maxLines: 5, style: Theme.of(context) .textTheme .bodySmall! .copyWith(overflow: TextOverflow.ellipsis), // children: [ // WidgetSpan( // child: TextButton( // child: Text( // AppLocalizations.of(context)!.read, // ), // onPressed: () { // if (widget.callback != null) widget.callback!(); // }, // ), // ), // ], ), ), ); } else if (snapshot.connectionState == ConnectionState.waiting) { return Container( alignment: Alignment.center, decoration: BoxDecoration( borderRadius: BorderRadius.circular(BorderSizes.small), color: Theme.of(context).colorScheme.primaryContainer, ), child: SizedBox.square( dimension: 50, child: CircularProgressIndicator( color: Theme.of(context).colorScheme.primary, ), ), ); } else { return Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(BorderSizes.small), color: Theme.of(context).colorScheme.errorContainer, ), child: Text( 'Error getting content: ${snapshot.error}', style: Theme.of(context).textTheme.labelSmall!.copyWith( color: Theme.of(context).colorScheme.error, ), ), ); } }, ) : Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(BorderSizes.small), color: Theme.of(context).colorScheme.primaryContainer, ), ); } } /// Build related Article /// This Dart function builds a list of related article tiles in a Flutter app. /// /// Args: /// context (BuildContext): The `BuildContext` parameter in the `buildRelatedArticleTiles` method /// represents the location of a widget within the widget tree. It provides information about the /// current build context, such as the theme, media query data, and localization information. This /// context is essential for building widgets correctly and accessing resources like themes class RelatedArticles extends StatefulWidget { const RelatedArticles({ super.key, required this.collection, required this.article, this.relationKey = 'relatedArticles', }); final String collection; final Article article; final String relationKey; @override State createState() => _RelatedArticlesState(); } class _RelatedArticlesState extends State with AutomaticKeepAliveClientMixin { late List cards = []; List buildRelatedArticleTiles(BuildContext context, Article article) { List relatedArticle = article.relations?[0][widget.relationKey] ?? []; cards = []; for (String articleId in relatedArticle) { cards.add( Align( child: Container( margin: const EdgeInsets.symmetric(horizontal: Paddings.medium), constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.sizeOf(context).width), ), child: CardArticleTile.fromId( articleId: articleId, collection: widget.collection, ), ), ), ); } return cards; } @override bool get wantKeepAlive => true; @override Widget build(BuildContext context) { super.build(context); return Wrap( children: buildRelatedArticleTiles(context, widget.article), ); } } ================================================ FILE: lib/src/article_view/view/highlight_article_tile.dart ================================================ part of 'article_view.dart'; class HighlightArticleTile extends StatefulWidget { const HighlightArticleTile({ super.key, this.labelBuilder, }); final String Function({Article? article})? labelBuilder; @override State createState() => _HighlightArticleTileState(); } class _HighlightArticleTileState extends State with AutomaticKeepAliveClientMixin { final SessionStorage _cache = SessionStorage(); final String _highlightArticleStateKey = 'isHighlightArticleReady'; late Future computation; late String? label; @override void initState() { super.initState(); computation = firebase.firebaseApp; } String? buildLabel({required Article? article}) { var type = article?.relations?[0]['type']; if (type != null && type == 'novena') { return "NEUVAINE"; } return null; } @override Widget build(BuildContext context) { super.build(context); return FutureBuilder( key: const Key('Highlight Article'), future: computation, builder: (context, snapshot) { // if firebase is correctly initialized if (snapshot.hasData) { return BlocProvider( create: (BuildContext context) => ArticleBloc( repo: ArticlesRepository( firestoreInstance: firebase.firestore, // collection: 'articles', ), ) ..add( const GetHighlightArticleEvent(), ) ..add(const GetHighlightCollectionEvent()), child: Align( alignment: Alignment.center, child: Container( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth( MediaQuery.of(context).size.width, ), ), child: BlocBuilder>( // buildWhen: (previous, current) => // current.highlightCollection == null || current.articles == null || current.articles!.isEmpty, builder: (context, state) { /// generate label label = (widget.labelBuilder != null) ? widget.labelBuilder!(article: state.highlightArticle) : buildLabel(article: state.highlightArticle); String? highlightCollection = state.highlightCollection; switch (state.status) { /// failed to trigger state case ArticleStatus.failed: developer.log('${state.error}'); return Container( padding: const EdgeInsets.all(4.0), // color: Theme.of(context).colorScheme.onErrorContainer, margin: const EdgeInsets.symmetric( horizontal: Margins.medium, ), alignment: Alignment.center, child: Icon( Icons.warning_rounded, color: Theme.of(context).colorScheme.error, ), ); /// case done; case ArticleStatus.succeed: // update caching info _cache[_highlightArticleStateKey] = 'true'; // String releaseMonth = DateTimeUtils.localMonth( // DateTimeUtils.parseReleaseDate( // state.articles![0]!.releaseDate ?? // '2024-04-28') // .month, // context, // ); return Container( margin: const EdgeInsets.symmetric( horizontal: Margins.medium, ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ // Text( // monthTextResolve( // context, // releaseMonth, // ).toUpperCase(), // style: Theme.of(context) // .textTheme // .labelLarge! // .copyWith( // color: // Theme.of(context).colorScheme.primary, // ), // ), Align( alignment: Alignment.center, child: (state.highlightArticle != null) ? CardArticleTile( label: label, article: state.highlightArticle!, collection: highlightCollection ?? 'articles', ) : const Text( "[HighLightArticleTile] Error: HighLightArticle is null"), ), // Container( // margin: const EdgeInsets.symmetric( // vertical: Margins.medium, // ), // alignment: Alignment.centerRight, // child: TextButton( // onPressed: () { // Navigator.of(context) // .pushNamed(ArticlesPage.routeName); // }, // child: Text( // AppLocalizations.of(context)!.allArticles, // ), // ), // ), ], ), ); /// while waiting default: return Container( decoration: BoxDecoration( color: Theme.of(context) .colorScheme .surfaceContainerHighest, borderRadius: BorderRadius.circular(BorderSizes.medium), ), height: 408, margin: const EdgeInsets.symmetric( horizontal: Margins.medium, ), alignment: Alignment.center, // child: const CircularProgressIndicator(), ) .animate( onPlay: (controller) => controller.repeat(), ) .shimmer() .then(delay: Durations.long1); } }, ), ), ), ); } else { developer.log('article error: ${snapshot.error}'); return Container( height: 310, margin: const EdgeInsets.symmetric( horizontal: Margins.medium, ), alignment: Alignment.center, child: const CircularProgressIndicator( color: Colors.red, ), ); } }, ); } void goToReadingPage() { Navigator.push( context, MaterialPageRoute( builder: (context) { return ArticleContentPage( article: context.read().state.highlightArticle, ); }, ), ); } // bool keepAlive = false; @override bool get wantKeepAlive { return _cache[_highlightArticleStateKey] == 'true'; } } ================================================ FILE: lib/src/assets/assets.dart ================================================ part of '../../ahl_barrel.dart'; /// This source file collect all assets in the project and provide handier /// way to interact with them. /// /// To each assets correspond an class AhlAssets { const AhlAssets._(); // Prevent for instantiation static String get releasePath => kDebugMode ? '' : 'assets/'; // used to set up path when deployed static String heroBk = "${releasePath}images/hero_bk.webp"; static String heroBkAlt = "${releasePath}images/praying_alt.webp"; static String logoForm = "${releasePath}images/logo_form_colored.webp"; static String logoFormTypoHorizontalColored = "${releasePath}images/logo_form_typo_horizon_colored.webp"; static String logoFormTypoHorizontalColoredDark = "${releasePath}images/logo_form_typo_horizontal_colored_dark.webp"; static String logoNdd = "${releasePath}images/logo_ndd.webp"; static String priorAvatar = "${releasePath}images/prior_avatar.webp"; static String prayersSpaceCover = "${releasePath}images/prayers_space_banner.webp"; @Deprecated("use projectSpaceCover instead.") static String projectHeroHeader = "${releasePath}images/projects_hero_header.webp"; static String cantineImage = "${releasePath}images/cantine_hero.webp"; static String rosaryHeroHeader = "${releasePath}images/rosary_hero_header.webp"; static String praying = "${releasePath}images/praying.webp"; static String prayingAlt = "${releasePath}images/praying_alt.webp"; static String requestMotif = "${releasePath}images/motif_prayer.jpg"; static String projectSpaceCover = '${releasePath}images/project_space_banner.webp'; static String dons = '${releasePath}images/SVG/dons.svg'; static String doneAnimation = '${releasePath}animations/done.lottie'; } ================================================ FILE: lib/src/constants/constants.dart ================================================ part of '../../ahl_barrel.dart'; /// Maximum number of suggestions in Article Based architecture. const int maxSuggestionArticle = 10; class BorderSizes { /// 45 static const double huge = 45; /// 30 static const double big = 30; /// 26 static const double medium = 26; /// 15 static const double small = 15; } class Margins { /// 236 static const double extraHuge = 236; /// 200 static const double huge = 200; /// 50 static const double extraLarge = 48; /// 37 static const double large = 32; /// 24 static const double medium = 24; /// 16 static const double small = 16; /// 166 : Top margin of the hero header static const double heroHeaderExtraTop = 166; } /// Compute content size based on breakpoints class ContentSize { /// MaxWidth considering the breakpoints as widthConstraints. static double maxWidth(double widthConstraints) { return resolveForBreakPoint( widthConstraints, extraHuge: 1128, other: 966, ); } } class ScreenSizes { /// Phone size small than 480. static const double small = 480; /// Phone size when in landscape mode : 780. static const double medium = 780; /// Tablet in portrait mode : 1024 static const double large = 1024; /// Tablet in landscape mode and laptop or desktop : 1280 static const double extraLarge = 1280; /// Laptop and desktop more than 1600 static const double huge = 1600; } class Paddings { Paddings._(); /// 45 px static const double huge = 45; /// 30 px static const double big = 30; /// 27 px static const double drawerAppBarPadding = 27; /// 8 px static const double appBarPadding = 8; /// 15 px static const double listSeparator = 15; /// 21 px static const double actionSeparator = 21; /// A padding of 15 px static const double medium = 15; /// A padding of 7.5 px. /// /// It is computed as the half of medium. static const double small = medium / 2; } class Sizes { Sizes._(); static const double appBarSize = 75; // 64 from design static const double menuButtonWidth = 400; static const double menuButtonListHeight = 400; static const double mobileHeroHeaderImageHeight = 350; static const double nddLogoSize = 76; // 48 px static const double iconSize = 48; } class IconSizes { IconSizes._(); /// 64 static const double extraLarge = 64; /// 24 static const double medium = 24; /// 48 static const double large = medium * 2; /// 12 static const double small = medium / 2; } class ButtonGeometry { ButtonGeometry._(); static const EdgeInsets elevatedButtonPaddings = EdgeInsets.symmetric(vertical: 10); } class HeroHeaderGeometry { HeroHeaderGeometry._(); static const double heroHeaderExtrasHeight = 200; static const double heroHeaderExtrasWidth = 650; } class AhlDurations { AhlDurations._(); /// 300 ms static const Duration subtle = Duration(milliseconds: 300); } ================================================ FILE: lib/src/firebase_constants.dart ================================================ import 'dart:async'; import 'dart:developer'; import 'package:ahl/firebase_options.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_storage/firebase_storage.dart'; import 'package:flutter/foundation.dart'; /// Change this to true if using emulator const bool isUsingEmulator = false; /// Email key in users document in firestore. const String emailKey = 'email:'; /// Subscription Date key in users document in firestore. const String dateKey = 'subscriptionDate'; /// Collection names /// collections name in the root document. const String newsletterCollection = 'users'; /// The name of the collection containing articles. const String articlesCollection = 'articles'; /// The name of projects collection. const String projectsCollection = 'projects'; /// PrayerRequest collection name const String prayerRequestCollection = 'prayer_requests'; final FirebaseFirestore _firestore = FirebaseFirestore.instance; final Reference _storage = FirebaseStorage.instance.ref(); const String emulatorHost = 'localhost'; const int firestorePort = 46561; const int storagePort = 9199; const int authPort = 9099; const int hostingPort = 5000; FirebaseApp? _firebaseAppInstance; /// Get firebase initialization Future get firebaseApp async { if (_firebaseAppInstance == null) { try { // firebase initialization final FirebaseApp firebaseApp = await Firebase.initializeApp( // doesn't await this allows the app to run without firebase options: DefaultFirebaseOptions.currentPlatform, ).then((value) { return value; }); // env update _firebaseAppInstance = firebaseApp; return firebaseApp; } catch (e) { _isInitialized = false; _firebaseAppInstance = null; return null; } } else { return _firebaseAppInstance!; } } /// Get the instance of firestore in the app. FirebaseFirestore get firestore { initialize(); return _firestore; } Reference get storage { initialize(); return _storage; } /// Get status if plugins are initialized. bool get isInitialized => _isInitialized; /// internal initialization state. bool _isInitialized = false; /// we re initialize the firebase plugin. void initialize() { if (_isInitialized == false) { _initialize(); } } /// Perform firebase initialization. /// /// Typically, it setup firebase to work on emulator in debug mode. /// This enable offline data caching too. Future _initialize() async { if (!_isInitialized) { try { if (_firebaseAppInstance == null) { await firebaseApp; } // persistence data settings _firestore.settings = const Settings( persistenceEnabled: true, ); // emulator setup if (kDebugMode && isUsingEmulator) { _firestore.useFirestoreEmulator(emulatorHost, firestorePort); _storage.storage.useStorageEmulator(emulatorHost, storagePort); } // automatic caching _storage.storage.app.setAutomaticResourceManagementEnabled(true); // env update _isInitialized = true; // // notify that the firebase plugin in correctly initialized log('[Firebase Init] : Correctly initialized.'); } catch (e) { _isInitialized = false; log('[Firebase Init] : Failed initializing firebase: e'); } } } ================================================ FILE: lib/src/localization/app_en.arb ================================================ { "appTitle": "Aujourd'hui l'avenir", "@appTitle": { "description": "The title of the application" }, "longAppTitle": "Aujourd'hui l'avenir", "heroTitle": "Love and Serve", "@heroTitle": { "description": "The invitation text in the hero header" }, "heroExplanation": "Love is the most powerful force in the universe. It can defeat hate.", "@heroExplanation": { "description": "Use this under the Hero header Title" }, "homeText": "Home", "@homeText": { "description": "The text on the HomePage Tab in the app bar" }, "aboutUs": "About Us", "prayers": "Prayers", "ourProjects": "Our Projects", "news": "News", "makeDonation": "Support us", "contact": "Contact us", "welcomingTitle": "Welcome", "@welcomingTitle": { "description": "The title of the welcoming message." }, "welcomingBody": "Welcome on the Dominican Missionary Sister of Our Délivrande Lady, Madagascar, Saharoaloha.\nEn tant que Sœur Supérieure, je vous accueille chaleureusement pour partager notre histoire, notre mission et notre engagement envers la foi.\nUnissez-vous à nous dans la prière, en explorant ce site dédié à cultiver ensemble une vie spirituelle enrichissante.", "sister": "Sister", "@sister": { "description": "Denomination fo the sisters" }, "sisterDenomination": "Dominicans Missionaries Sisters Of Our Lady of Délivrande", "@sisterDenomination": { "description": "The text that is used as Signature for the website" }, "prior": "Prioress of the community", "inConstructionPromotionalMessage": "This Website is under construction.", "invitingNewsLetter": "To stay informed", "@invitingNewsLetter": { "description": "Sous titre dans le widget d'invitation à la news letter" }, "newsLetterWidgetTitle": "Register to Ahl newsletter", "@newsLetterWidgetTitle": { "description": "Title dans le widget d'invitation à la news letter" }, "exampleMail": "yourname@example.com", "register": "Register", "priesSpace": "Prayers Space", "@priesSpace": { "description": "Title for prayers space" } } ================================================ FILE: lib/src/localization/app_fr.arb ================================================ { "@@locale": "fr", "appTitle": "Aujourd'hui l'avenir", "@appTitle": { "description": "The title of the application" }, "longAppTitle": "Aujourd'hui l'avenir", "heroTitle": "\"Aimer et servir\"", "slogan":"\"Amour et Service\"", "@heroTitle": { "description": "Le text d'invitation qui s'affiche dans le hero header" }, "heroHeaderSubtitle": "Avec les Sœurs Dominicaines Missionnaires de Notre Dame de la Délivrande à Saharoaloha Antsirabe.", "heroExplanation": "Solidarité et Prière pour Madagascar.\n Découvrez nos missions auprès des enfants, rejoignez nos prières quotidiennes et partagez la vie de notre communauté.", "@heroExplanation": { "description": "Text d'accroche en dessous du text principale de l'Hero header." }, "homeText": "Accueil", "@homeText": { "description": "Le text du boutton page d'acceuil" }, "aboutUs": "À propos de nous", "prayers": "Prières", "ourProjects": "Nos Projets", "news": "Actualités de la communauté", "makeDonation": "Nous soutenir", "articles": "Articles", "read": "Lire", "contact": "Nous Contacter", "welcomingTitle": "Bienvenue!", "@welcomingTitle": { "description": "The title of the welcoming message." }, "welcomingBody": "Bienvenu sur le site des Soeurs Dominicaines Missionnaires de Notre Dame de la Délivrande, Madagascar, Saharoaloha.\n\nEn tant que Sœur Supérieure, je vous accueille chaleureusement pour partager notre histoire, notre mission et notre engagement envers la foi.\n\nUnissez-vous à nous dans la prière, en explorant ce site dédié à cultiver ensemble une vie spirituelle enrichissante.", "sister": "Sœur", "sisterDenomination": "Sœurs Dominicaines Missionnaires de Notre Dame de la Délivrande", "@sisterDenomination": { "description": "Text qui est utiliser dans le footer comme signiture du site internet" }, "@sister": { "description": "Denomination des Sœurs" }, "prior": "Prieure de la communauté", "inConstructionPromotionalMessage": "Ce site internet est en construction.", "invitingNewsLetter": "Pour rester informé", "@invitingNewsLetter": { "description": "Sous titre dans le widget d'invitation à la news letter" }, "newsLetterWidgetTitle": "Abonnez-vous à la newsletter", "@newsLetterWidgetTitle": { "description": "Title dans le widget d'invitation à la news letter" }, "exampleMail": "votrenom@example.com", "register": "S'inscrire", "thanksForRegistering": "Merci pour votre abonnement", "invalidEmail": "Email non valide.", "cantBeEmpty": "Ne peut pas être vide", "unknownError": "Erreur inconnue, Verifier votre connexion internet", "priesIntention": "Intentions de prières", "proverb": "\"Priez les uns les autres, afin que vous soyez guéris\"\nSt Jacques 5:16", "priersInvitation": "Vos intentions seront portées dans nos prières quotidiennes dans notre Communauté Sainte Catherine de Sienne à Saharoaloha, Madagascar.", "nameAndFirstName": "Nom et Prénom", "priers": "Prières", "sendPray": "Soumettre mon intention", "optional": "Facultatif", "yourPrayer": "Votre intention de prière", "prayerRequestInvitation": "Unissons nous dans la prière. Confiez vos intentions à notre communauté.", "priesSpace": "Espace Prière", "@priesSpace": { "description": "Titre pour espace de prières" }, "whenWePray": "Quand pronnoncer votre prière?", "wePrayOn": "On prie pour vous le:", "prayingDate": "{date} à {hour}, pendant {prayerType}.", "@prayingDate": { "description": "The message that shows the date when the prayer will be prayed", "placeholders": { "prayerType": { "type": "String", "example": "Rosary" }, "date": { "type": "DateTime", "format": "yMMMMEEEEd" }, "hour": { "type": "DateTime", "format": "jm" } } }, "priersOf": "Intention de prière de {name},\n{email}", "@priersOf": { "description": "Presentation of Prayer owner in Prayer Request", "placeholders": { "name": { "type": "String", "example": "John Doe" }, "email": { "type": "String", "example": "johndoe@example.com" } } }, "mass": "la Messe", "rosary": "le Rosaire", "vesper": "le Vêpre", "choiceMass": "Messe", "choiceRosary": "Rosaire", "choiceVesper": "Vêpre", "projectsSpace": "Nos projets", "projectsSpaceSubtitle": "Aimons et servons.", "projectsSpaceIntroduction": "Nous sommes engagées dans de nombreux projets qui visent à promouvoir la dignité humaine, la justice sociale, l’éducation et la santé. Nous vous invitons à découvrir sur cette page les initiatives que nous menons.", "ourPartners": "Nos Partenaires", "inProgress": "Projet en cours", "waitingBudget":"En attente de financement", "done": "Términé", "supportProject": "Soutenir ce projet", "realized": "Réalisation", "initiative": "Initiative des soeurs", "projectSpaceTitle": "Nos projets", "projectLongTitle": "Nos projets et nos œuvres sociaux", "projectSpaceDescription": "Découvrez les initiatives concrètes qui animent notre mission au service du peuple malgache et de l’eglise locale. Nous vous invitons à découvrir sur cette page les initiatives que nous menons.", "january": "Janvier", "february": "Fevrier", "march": "Mars", "april": "Avril", "may": "Mai", "june": "Juin", "july": "Juillet", "august": "Août", "september": "Septembre", "october": "Octobre", "november": "Novembre", "december": "Decembre", "whoWeAre": "Qui sommes nous?", "domSisters": "Les soeurs Dominicaines NDD", "allArticles": "Tous les articles", "share" : "Partager", "todaysRosary": "Chapelet du jour", "rosarySlogan": "Mediter la vie de Jesus avec Marie", "getNotified": "Être notifier", "allProjects": "Voir projets", "devInProgress": "Bientôt disponible", "prayerSpace": "Espace de prière", "@prayerSpace": { "description": "Title of the prayer space" }, "todaySaint":"Saint du jour", "office":"Office du jour", "novena": "Neuvaine", "availableSoon": "Bientôt Disponible", "listenPodcast": "Ecouter Podcast" } ================================================ FILE: lib/src/localization/locale_utils.dart ================================================ import 'package:flutter/material.dart'; import '../app.dart'; class LocaleUtils { /// Switch app locale to static void changeLocale(BuildContext context, Locale newLocale) { MyApp.setLocal(context, newLocale); Scaffold.of(context).closeEndDrawer(); } } ================================================ FILE: lib/src/newsletter/bloc/bloc.dart ================================================ part of '../newsletter.dart'; const invalidEmailError = "Invalid Email"; class NewsletterSubscriptionBloc extends Bloc { /// in super we add initial state. /// /// You should add an initialization state to make it work. NewsletterSubscriptionBloc({ required this.repo, }) : super( NewsletterSubscriptionState.initial(), ) { on(_onSubscriptionRequest); on(_onInitializeRequest); on(_onLoadingEvent); on(_onSuccessEvent); on(_onErrorEvent); // then, register a callback on subscribe event if (!_isListening) { _isListening = true; repo.status.listen( (event) { switch (event) { // Error case NewsletterSubscriptionStatus.error: add( ErrorEvent(), ); break; // Loading case NewsletterSubscriptionStatus.loading: add( LoadingEvent(), ); break; // Success case NewsletterSubscriptionStatus.success: add( SuccessEvent(), ); break; default: break; } }, ); } } void _onErrorEvent(ErrorEvent event, emit) => emit( state.copyWith( status: NewsletterSubscriptionStatus.error, error: event.error), ); // Loading void _onLoadingEvent(LoadingEvent event, emit) => emit( state.copyWith(status: NewsletterSubscriptionStatus.loading), ); // Success void _onSuccessEvent(SuccessEvent event, emit) => emit( state.copyWith( status: NewsletterSubscriptionStatus.success, error: null), ); /// The repo to be used when storing data. final NewsletterSubscriptionRepository repo; /// To prevent re listening to the stream bool _isListening = false; // Initialization Handler void _onInitializeRequest( InitializeRequestEvent event, Emitter emit, ) { /// emit initial state emit(NewsletterSubscriptionState.initial()); } // Subscription event handler void _onSubscriptionRequest(SubscriptionRequestEvent event, Emitter emit) async { emit( state.copyWith( email: event.email, status: NewsletterSubscriptionStatus.loading, error: null, ), ); // Test if the email is working and acting according to it if (event.email != null && event.email!.isNotEmpty) { if (isValidEmail(event.email!)) { emit(state.copyWith( status: NewsletterSubscriptionStatus.loading, )); await repo.subscribe(email: event.email!); } else { emit( state.copyWith( status: NewsletterSubscriptionStatus.error, error: invalidEmailError), ); } } else { emit( state.copyWith( status: NewsletterSubscriptionStatus.error, error: invalidEmailError, ), ); } } } ================================================ FILE: lib/src/newsletter/event/event.dart ================================================ part of '../newsletter.dart'; /// The event carry data (here email) from the UI to the /// bloc. Then the bloc return the state object containing status. /// class NewsletterSubscriptionEvent { const NewsletterSubscriptionEvent({this.email}); /// The email string gathered from prompt. final String? email; } class SubscriptionRequestEvent extends NewsletterSubscriptionEvent { SubscriptionRequestEvent({required String email}) : super(email: email); } class InitializeRequestEvent extends NewsletterSubscriptionEvent { InitializeRequestEvent() : super(email: null); } /// Closing the Subscription mechanism will re initialize it. typedef CloseRequestEvent = InitializeRequestEvent; class LoadingEvent extends NewsletterSubscriptionEvent {} class SuccessEvent extends NewsletterSubscriptionEvent {} class ErrorEvent extends NewsletterSubscriptionEvent { ErrorEvent({this.error = "Unknown Error"}); final Object? error; } ================================================ FILE: lib/src/newsletter/newsletter.dart ================================================ import 'dart:async'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:ahl/src/firebase_constants.dart'; import 'package:ahl/ahl_barrel.dart'; import '../theme/theme.dart' as theme; import '../validation/email_validation.dart'; part 'view/news_letter_view.dart'; part 'bloc/bloc.dart'; part 'event/event.dart'; part 'state/state.dart'; part 'newsletter_repository.dart'; ================================================ FILE: lib/src/newsletter/newsletter_repository.dart ================================================ part of 'newsletter.dart'; class NewsletterSubscriptionRepository { NewsletterSubscriptionRepository({ required FirebaseFirestore database, }) : _db = database; final _controller = StreamController(); final FirebaseFirestore _db; Stream get status async* { yield* _controller.stream; } /// Getter of the data to be written Map data(String email) => { emailKey: email, dateKey: Timestamp.now(), }; /// Handle initialization void initialize() { _controller.add(NewsletterSubscriptionStatus.initial); } /// Handle subscription Future subscribe({ required String email, }) async { // Writes to firebase firestore document return _db .collection(newsletterCollection) .doc(email) .set( data(email), SetOptions(merge: true), ) .then( (value) => _controller.add(NewsletterSubscriptionStatus.success), ) .onError( (e, _) => _controller.add(NewsletterSubscriptionStatus.error), ); } } ================================================ FILE: lib/src/newsletter/state/state.dart ================================================ part of '../newsletter.dart'; enum NewsletterSubscriptionStatus { /// When the prompt is empty initial, /// When the prompt is ready to submit loading, /// When the mail is submitted success, /// When an error occurred error, } final class NewsletterSubscriptionState extends Equatable { const NewsletterSubscriptionState({ this.email, this.error, this.status = NewsletterSubscriptionStatus.initial, }); /// an helper when building initial state factory NewsletterSubscriptionState.initial() => const NewsletterSubscriptionState(); final String? email; final NewsletterSubscriptionStatus status; final Object? error; NewsletterSubscriptionState copyWith({ String? email, NewsletterSubscriptionStatus? status, Object? error, }) => NewsletterSubscriptionState( email: email ?? this.email, status: status ?? this.status, error: error ?? this.error); @override List get props => [email, status, error]; bool get hasError => error != null; String? getError(BuildContext context) { switch (error) { case "Invalid Email": return AppLocalizations.of(context)!.invalidEmail; default: return AppLocalizations.of(context)!.unknownError; } } } ================================================ FILE: lib/src/newsletter/view/news_letter_view.dart ================================================ part of '../newsletter.dart'; class NewsLetterPrompt extends StatefulWidget { const NewsLetterPrompt({super.key}); @override State createState() => _NewsLetterPromptState(); } class _NewsLetterPromptState extends State with AutomaticKeepAliveClientMixin { @override bool get wantKeepAlive => true; @override Widget build(BuildContext context) { super.build(context); return FutureBuilder( future: firebaseApp, // listen to firebaseApp initialization builder: (context, snapshot) { switch (snapshot.connectionState) { case ConnectionState.done: return BlocProvider( create: (context) => NewsletterSubscriptionBloc( repo: NewsletterSubscriptionRepository( database: firestore, ), ), // Setup bloc providing // child: Container( // constraints: BoxConstraints( // maxWidth: ContentSize.maxWidth( // MediaQuery.of(context).size.width, // ), // ), child: const NewsletterPromptView(), // ), ); default: return const SizedBox.shrink(); } }, ); } } class NewsletterPromptView extends StatefulWidget { const NewsletterPromptView({super.key}); @override State createState() => _NewsletterPromptViewState(); } class _NewsletterPromptViewState extends State { final TextEditingController emailInputController = TextEditingController(); @override Widget build(BuildContext context) { return BlocBuilder( buildWhen: (previous, current) => previous != current, builder: (context, state) => Container( padding: const EdgeInsets.all(Paddings.huge), color: theme.AhlTheme.yellowRelax, alignment: Alignment.center, child: ConstrainedBox( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), ), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ /// This handle 2 state object NewsletterTextPrompt( test: () => false, ), Padding( padding: const EdgeInsets.symmetric( vertical: Paddings.big, ), child: TextField( controller: emailInputController, onTap: () { context .read() .add(InitializeRequestEvent()); }, onEditingComplete: () { context.read().add( SubscriptionRequestEvent( email: emailInputController.text, ), ); }, decoration: InputDecoration( label: const Text('e-mail'), hintText: AppLocalizations.of(context)!.exampleMail, border: const OutlineInputBorder(), error: state.hasError ? Text('${state.getError(context)}') : null, ), ), ), ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).primaryColor, foregroundColor: Theme.of(context).colorScheme.onPrimary, ), onPressed: (state.status == NewsletterSubscriptionStatus.initial) ? () { context.read().add( SubscriptionRequestEvent( email: emailInputController.text, ), ); emailInputController.clear(); } : null, child: Builder( builder: (context) { switch (state.status) { case NewsletterSubscriptionStatus.loading: return const CircularProgressIndicator(); case NewsletterSubscriptionStatus.success: return Row( mainAxisSize: MainAxisSize.min, children: [ const Padding( padding: EdgeInsets.only(right: Paddings.small), child: Icon(Icons.done_all_rounded), ), Text( AppLocalizations.of(context)! .thanksForRegistering, ), ], ); default: return Text( AppLocalizations.of(context)!.register, ); } }, ), ), ], ), ), ), ); } } class NewsletterTextPrompt extends StatelessWidget { const NewsletterTextPrompt({super.key, this.test}); final bool Function()? test; @override Widget build(BuildContext context) { Function testHelper = test ?? () => true; Widget child; if (testHelper()) { child = Text( "Thanks for registering to our newsletter!", style: Theme.of(context).textTheme.displayMedium!.copyWith( fontWeight: FontWeight.bold, ), ); } else { child = Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( AppLocalizations.of(context)!.invitingNewsLetter, style: Theme.of(context).textTheme.bodyLarge, ), Text( AppLocalizations.of(context)!.newsLetterWidgetTitle, style: Theme.of(context).textTheme.headlineMedium, ) ], ); } return child; } } /// Return the right axis based on the the constraints and threshold. /// /// If the constraints.maxWidth is upper than the threshold, /// it return [Axis.horizontal]. It return [Axis.vertical] in the else case. Axis evaluateAxis( /// Constraints to evaluate with. BoxConstraints constraints, { /// The minimum required threshold to maintain the larger than state double threshold = ScreenSizes.small, }) { Axis axis; if (constraints.maxWidth >= threshold) { axis = Axis.horizontal; } else { axis = Axis.vertical; } return axis; } ================================================ FILE: lib/src/pages/articles/articles_page.dart ================================================ import 'package:ahl/src/widgets/widgets.dart'; import 'package:flutter/material.dart'; class ArticlesPage extends StatefulWidget { const ArticlesPage({super.key}); static const String routeName = '/articles'; @override State createState() => _ArticlesPageState(); } class _ArticlesPageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: const AhlAppBar(), body: Center( child: Text( 'Article Space', style: Theme.of(context).textTheme.displayLarge, ), ), ); } } ================================================ FILE: lib/src/pages/homepage/donation/donation_page.dart ================================================ import 'package:ahl/src/widgets/widgets.dart'; import 'package:flutter/material.dart'; class DonationPage extends StatefulWidget { const DonationPage({super.key}); static const String routeName = "helpUs"; @override State createState() => _DonationPageState(); } class _DonationPageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: const AhlAppBar(), body: Center( child: Text( "Donation Page", style: Theme.of(context).textTheme.displayLarge, ), ), ); } } ================================================ FILE: lib/src/pages/homepage/hero_header/hero_header.dart ================================================ import 'package:ahl/src/utils/seo.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_seo/flutter_seo.dart'; import 'package:gap/gap.dart'; import 'package:go_router/go_router.dart'; import '../../prayers/prayers_page.dart'; import '../..//who_we_are/who_we_are.dart'; import '../../../utils/breakpoint_resolver.dart'; import '../../../../ahl_barrel.dart'; class HeroHeaderView extends StatelessWidget { const HeroHeaderView({super.key}); @override Widget build(BuildContext context) { // seo setupSeo(context); return LayoutBuilder( builder: (context, constraints) { if (constraints.maxWidth <= ScreenSizes.large) { // HeroHeader fo mobile return const MobileHeroHeader(); } else { return const DefaultHeroHeader(); } }, ); } } class MobileHeroHeader extends StatefulWidget { const MobileHeroHeader({ super.key, }); @override State createState() => _MobileHeroHeaderState(); } class _MobileHeroHeaderState extends State { @override Widget build(BuildContext context) { //seo setupSeo(context); return Column( children: [ // Hero header Image // AnimatedContainer( Container( // duration: Durations.short1, // curve: Curves.easeOut, color: Theme.of(context).colorScheme.surfaceContainer, constraints: const BoxConstraints( minHeight: Sizes.mobileHeroHeaderImageHeight, ), child: Image.asset( key: SeoKey( TagType.img, text: "HeroHeader image", alt: "A image with 3 part, a Dominican Sister praying on the left, Notre Dame de la Delivrande chapel in the midle, and smiling Saharoaloha' children on the right", src: AhlAssets.heroBk, ), AhlAssets.heroBk, ), ), Container( color: Theme.of(context).colorScheme.surfaceContainer, // color: AhlTheme.yellowLight, //.withAlpha(0xB6), // margin: EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.72), padding: const EdgeInsets.symmetric( horizontal: Paddings.big, ), child: const HeroTextView( needMargin: true, margin: 0, ), ), ], ); } } class HeroActions extends StatefulWidget { const HeroActions({ super.key, this.primaryCallback, this.secondaryCallback, }); final VoidCallback? primaryCallback; final VoidCallback? secondaryCallback; @override State createState() => _HeroActionsState(); } class _HeroActionsState extends State { void primaryAction() { context.goNamed(PrayersPage.routeName); } void secondaryAction() { context.goNamed(WhoWeArePage.routeName); } @override Widget build(BuildContext context) { //seo setupSeo(context); return Container( key: SeoKey(TagType.div), padding: const EdgeInsets.only(top: 30), child: Wrap( // mainAxisAlignment: MainAxisAlignment.spaceEvenly, // direction: , spacing: 20, runSpacing: 20, children: [ OutlinedButton( key: SeoKey(TagType.a, alt: "Link to about us page", src: "aujourdhuilavenir.org/aboutus"), onPressed: widget.secondaryCallback ?? secondaryAction, child: Padding( padding: const EdgeInsets.symmetric( vertical: Paddings.small, ), child: Text( AppLocalizations.of(context)!.aboutUs, // overflow: TextOverflow.ellipsis, textAlign: TextAlign.center, ), ), ), ElevatedButton( key: SeoKey(TagType.a, alt: "Link to prayer space", text: AppLocalizations.of(context)!.priesSpace, src: "aujourdhuilavenir.org/prierSpace"), onPressed: widget.primaryCallback ?? primaryAction, style: ElevatedButton.styleFrom( foregroundColor: Theme.of(context).colorScheme.onPrimary, backgroundColor: Theme.of(context).primaryColor, ), child: Padding( padding: const EdgeInsets.symmetric( vertical: Paddings.small, ), child: Text( AppLocalizations.of(context)!.priesSpace, // overflow: TextOverflow.ellipsis, textAlign: TextAlign.center, ), ), ), ], ), ); } } class DefaultHeroHeader extends StatefulWidget { const DefaultHeroHeader({ super.key, }); @override State createState() => _DefaultHeroHeaderState(); } class _DefaultHeroHeaderState extends State { @override Widget build(BuildContext context) { // var screenWidth = MediaQuery.sizeOf(context).width; return Container( key: const Key("HeroHeader_Container"), constraints: BoxConstraints( maxHeight: MediaQuery.of(context).size.height * 1.2, maxWidth: ContentSize.maxWidth( MediaQuery.of(context).size.width, ), ), alignment: Alignment.center, child: Stack( children: [ // const HeroImageView(), Align( alignment: Alignment.bottomCenter, child: Container( constraints: const BoxConstraints(maxHeight: 470), color: Theme.of(context) .colorScheme .surfaceContainer .withAlpha(0xB2), padding: const EdgeInsets.symmetric(horizontal: Margins.extraLarge) .add( const EdgeInsets.only(top: 45), ), alignment: Alignment.bottomCenter, child: const HeroTextView( alignment: Alignment.topCenter, ), ), ), ], ), ); } } class HeroImageView extends StatelessWidget { const HeroImageView({ super.key, this.isWithBorder = true, }); final bool isWithBorder; @override Widget build(BuildContext context) { return Container( // color: AhlTheme.yellowLight, // child: Container( decoration: BoxDecoration( borderRadius: isWithBorder ? const BorderRadius.only( bottomLeft: Radius.circular(BorderSizes.big), bottomRight: Radius.circular(BorderSizes.big), ) : null, image: DecorationImage( fit: BoxFit.cover, image: AssetImage(AhlAssets.heroBk), ), ), // ), ); } } class HeroTextView extends StatelessWidget { const HeroTextView({ super.key, this.needMargin = false, this.alignment, this.margin, }); /// The margin is needed when the text should /// go some pixel under the image final bool needMargin; final double? margin; final AlignmentGeometry? alignment; @override Widget build(BuildContext context) { return LayoutBuilder(builder: (context, constraints) { TextStyle? explanationTheme = resolveForBreakPoint( MediaQuery.of(context).size.width, small: Theme.of(context).textTheme.bodyMedium, medium: Theme.of(context).textTheme.bodyMedium, other: Theme.of(context).textTheme.bodyLarge, ); TextStyle? titleTheme = resolveForBreakPoint( MediaQuery.of(context).size.width, small: Theme.of(context).textTheme.displaySmall, medium: Theme.of(context).textTheme.displayMedium, other: Theme.of(context).textTheme.displayLarge, ); TextStyle? subtitleTheme = resolveForBreakPoint( MediaQuery.of(context).size.width, small: Theme.of(context).textTheme.titleSmall, medium: Theme.of(context).textTheme.titleMedium, other: Theme.of(context).textTheme.titleLarge, ); return Container( alignment: alignment ?? Alignment.center, margin: EdgeInsets.only( top: needMargin ? margin ?? Margins.heroHeaderExtraTop : 0, ), child: Container( constraints: const BoxConstraints( maxWidth: HeroHeaderGeometry.heroHeaderExtrasWidth), child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ const Gap(30), Padding( padding: const EdgeInsets.only(bottom: 0), child: Text( AppLocalizations.of(context)!.heroTitle, textAlign: TextAlign.center, style: titleTheme, ), ), const Gap(20), // Padding( // padding: const EdgeInsets.only(bottom: Paddings.huge), // child: Text( AppLocalizations.of(context)!.heroHeaderSubtitle, textAlign: TextAlign.center, style: subtitleTheme, ), // ), const Gap(20), Text( AppLocalizations.of(context)!.heroExplanation, textAlign: TextAlign.center, style: explanationTheme, ), const HeroActions(), ], ), ), ); }); } } class ScrollIncitation extends StatefulWidget { const ScrollIncitation({super.key}); @override State createState() { return _ScrollIncitation(); } } class _ScrollIncitation extends State with SingleTickerProviderStateMixin { late AnimationController controller; @override void initState() { super.initState(); controller = AnimationController( vsync: this, duration: Durations.medium1, )..repeat(); // controller.forward(); } @override Widget build(BuildContext context) { return Align( alignment: Alignment.topCenter, child: Container( height: 500, width: 10, color: Theme.of(context).colorScheme.surface, ), ); } } ================================================ FILE: lib/src/pages/homepage/homepage.dart ================================================ import 'dart:developer'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_seo/flutter_seo.dart'; import 'package:gap/gap.dart'; import 'package:meta_seo/meta_seo.dart'; import 'package:web/web.dart' as web; import '../../widgets/widgets.dart'; import '../../article_view/view/article_view.dart'; import '../../pages/homepage/hero_header/hero_header.dart'; import '../../pages/homepage/welcoming/welcoming.dart'; import '../../newsletter/newsletter.dart'; import '../../partners/view.dart'; import '../../prayers_space/view.dart'; import '../../utils/breakpoint_resolver.dart'; import '../../../ahl_barrel.dart'; import '../../project_space/view.dart'; import '../../who_we_are/view.dart'; /// Home page class HomePage extends StatefulWidget { static const String routeName = "home"; const HomePage({super.key}); @override State createState() { return _HomePageState(); } } class _HomePageState extends State { static late ScrollController scrollController; bool controllerIsAttached = false; final List _children = [ Builder(builder: (context) => Gap(resolveSeparatorSize(context))), const WelcomingView(), Builder(builder: (context) => Gap(resolveSeparatorSize(context))), Container(color: Colors.white, height: 4), Builder(builder: (context) => Gap(resolveSeparatorSize(context))), const HighlightArticleTile(), Builder(builder: (context) => Gap(resolveSeparatorSize(context))), Container(color: Colors.white, height: 4), Builder(builder: (context) => Gap(resolveSeparatorSize(context))), const PrayerSpaceView(), Builder(builder: (context) => Gap(resolveSeparatorSize(context))), const ProjectsSpaceView(), Builder(builder: (context) => Gap(resolveSeparatorSize(context))), const PartnersView(), Builder(builder: (context) => Gap(resolveSeparatorSize(context))), const WhoWeAreSpace(), Builder(builder: (context) => Gap(resolveSeparatorSize(context))), const NewsLetterPrompt(), const AhlFooter(), ]; @override void initState() { super.initState(); scrollController = ScrollController( onAttach: (position) async { await Future.delayed(Duration.zero); setState( () => controllerIsAttached = true, ); }, onDetach: (position) async { await Future.delayed(Durations.short1); setState( () => controllerIsAttached = false, ); }, ); } void seoSetup() { String title = "Aujourd'hui l'avenir | Mission des Sœurs Dominicaines Missionnaires De Notre Dame de la Delivrande à Madagascar"; String description = """ Aimer et Servir avec les sœurs Dominicaines Missionnaires de Notre Dame de la Délivrande à Saharoaloha Antsirabe. Solidarité et Prière pour Madagascar. Découvrer nos missions auprès des enfants, rejoignez nos prières quotidiennes et partagez la vie de notre communauté. """; if (kIsWeb) { log('start seo setup'); WidgetsBinding.instance.addPostFrameCallback((timeStamp) { if (context.mounted) { HeadTagUtil.setHead( title: title, description: description, keywords: [ 'Madagascar', 'Notre Dame de la Delivrande', 'Sœur Dominicaines Missionnaires de Notre Dame de la Délivrande', ], // imageUrl: getImageUrl(article!), url: "https://aujourdhuilavenir.org/", ); CreateHtml.makeWidgetTree(context); } }); // Define MetaSEO object MetaSEO meta = MetaSEO(); // set document title to article title web.document.title = title; // Set decription to article preview meta.description( description: description, ); // add meta seo data for web app as you want meta.ogTitle(ogTitle: title); meta.keywords( keywords: "Aimer et servir, Madagascar, Notre Dame de la Delivrande, Sœur Dominicaines Missionnaires de Notre Dame de la Délivrande,"); // meta.ogImage(ogImage: await getImageUrl(article!)); } else { log('SEO setup is not supported on mobile'); } } @override Widget build(BuildContext context) { // seo setup seoSetup(); /// Optimize hero header image. precacheImage(AssetImage(AhlAssets.heroBk), context); return LayoutBuilder( key: const Key('main_scroll_view'), builder: (BuildContext context, BoxConstraints constraints) { return Scaffold( endDrawer: constraints.maxWidth <= ScreenSizes.large ? const AhlDrawer() : null, appBar: AhlAppBar( key: SeoKey( TagType.div, text: "Aujourd'hui l'avenir", alt: "Web site title", ), ), // AppBar( // title: const AhlLogo(), // actions: [ // TabBar( // tabs: [ // Tab( // text: AppLocalizations.of(context)!.homeText, // ), // Tab( // text: AppLocalizations.of(context)!.aboutUs, // ), // Tab( // text: AppLocalizations.of(context)!.prayers, // ), // Tab( // text: AppLocalizations.of(context)!.ourProjects, // ), // Tab( // text: AppLocalizations.of(context)!.listening, // ), // ], // ) // ], // ), // Here are placed all components that build the entire // HomePage body: Stack( children: [ // const SingleChildScrollView( // AnimatedPositioned( // duration: Durations.medium1, // // curve: Curves.easeInOut, // bottom: _bottom, // child: (constraints.maxWidth > ScreenSizes.large) ? Align( alignment: Alignment.topCenter, child: Container( height: 700, constraints: BoxConstraints( maxWidth: resolveForBreakPoint( MediaQuery.of(context).size.width, // other: 1483, other: 1325, large: 925, ), ), child: Image.asset( AhlAssets.heroBk, key: SeoKey( TagType.img, src: "./${AhlAssets.heroBk}", text: "Aimer et servir. Mission pour Madagascar", alt: "Hero background image: the 3 missions of Dominican sister of Delivrande: Praying, Serving and Helping", ), ), ).animate().fadeIn( curve: Curves.easeIn, duration: Durations.long4, ), // ), ) : const SizedBox.shrink(), Scrollbar( controller: scrollController, // thumbVisibility: true, trackVisibility: true, thickness: 10, child: ListView( addAutomaticKeepAlives: true, controller: scrollController, // itemCount: _children.length, // itemBuilder: (context, index) => _children[index], // separatorBuilder: (context, index) { // if (index == _children.length - 2) { // return const SizedBox.shrink(); // } else { // return SizedBox.fromSize( // size: const Size.fromHeight(Margins.extraLarge), // ); // } // }, restorationId: "home_list_view", children: [ // HeroHeaderView(), // Container( // margin: const EdgeInsets.only( // top: Sizes.mobileHeroHeaderImageHeight) // .add( // const EdgeInsets.symmetric( // horizontal: Paddings.big, // ), // ), // child: const HeroTextView( // needMargin: true, // margin: 50, // ), // ), const HeroHeaderView(), Container( constraints: const BoxConstraints( // maxHeight: 6000, ), // fix transparent background error. color: Theme.of(context).colorScheme.surfaceContainer, child: Column( mainAxisSize: MainAxisSize.min, key: const Key("main_homepage_column"), children: _children, ), ), ], // child: Column( // children: _children, ), ), inConstructionPromotionalBar, ], ), ); }, ); } } ================================================ FILE: lib/src/pages/homepage/welcoming/welcoming.dart ================================================ import 'dart:math'; import 'package:ahl/ahl_barrel.dart'; import 'package:ahl/src/utils/breakpoint_resolver.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_seo/flutter_seo.dart'; import '../../../theme/theme.dart'; class WelcomingView extends StatelessWidget { const WelcomingView({super.key}); @override Widget build(BuildContext context) { return Container( margin: const EdgeInsets.symmetric( horizontal: Margins.medium, ).copyWith(bottom: 85), child: const _WelcomingContent(), ); } } class _WelcomingContent extends StatelessWidget { const _WelcomingContent(); @override Widget build(BuildContext context) { // Build html tree WidgetsBinding.instance.addPostFrameCallback((timestamp) { CreateHtml.makeWidgetTree(context); }); String welcomingBody = AppLocalizations.of(context)!.welcomingBody; String welcomingTitle = AppLocalizations.of(context)!.welcomingTitle; double avatarWidth = 174; double avatarHeight = 155; // GlobalKey containerKey = GlobalKey(debugLabel: 'welcoming_container'); return LayoutBuilder( builder: (context, constraints) { return Stack( clipBehavior: Clip.none, children: [ Align( alignment: Alignment.center, child: Container( // key: containerKey, constraints: BoxConstraints( minWidth: 342, maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), ), padding: const EdgeInsets.all(Paddings.big) .copyWith(top: Paddings.big + Sizes.nddLogoSize / 2), margin: const EdgeInsets.only(top: Sizes.nddLogoSize / 2), alignment: Alignment.center, decoration: BoxDecoration( color: AhlTheme.affiche, borderRadius: BorderRadius.circular(BorderSizes.medium), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( AppLocalizations.of(context)!.welcomingTitle, style: resolveHeadlineTextThemeForBreakPoints( MediaQuery.of(context).size.width, context, ), key: SeoKey( TagType.h2, text: welcomingTitle, alt: "Welcoming", ), ), SelectableText( '\n$welcomingBody', key: SeoKey(TagType.p, text: welcomingBody), style: resolveBodyTextThemeForBreakPoints( MediaQuery.of(context).size.width, context, ), ), Container( // constraints: BoxConstraints( // // minWidth: 480, // maxWidth: constraints.maxWidth - 135, // ), padding: EdgeInsets.only( top: 45, right: resolveForBreakPoint( MediaQuery.of(context).size.width, small: 0, other: avatarWidth / 2 + 140, medium: avatarWidth / 2 + 80, ), ), alignment: resolveForBreakPoint( MediaQuery.of(context).size.width, small: Alignment.center, other: Alignment.centerRight, ), child: const Signature(), ), Visibility( visible: resolveForBreakPoint( MediaQuery.of(context).size.width, small: true, other: false, ), child: const SizedBox( height: 50, ), ), ], ), ), ), const Align( alignment: Alignment.topCenter, child: LogoNDD(), ), Positioned( bottom: (-avatarHeight / 2) - 10, // avatarHeight is the image height left: resolveForBreakPoint( MediaQuery.of(context).size.width, small: constraints.maxWidth / 2 - avatarWidth / 2, medium: constraints.maxWidth / 2 + min( MediaQuery.of(context).size.width, ContentSize.maxWidth( MediaQuery.of(context).size.width), ) / 2 - 50 - avatarWidth, other: constraints.maxWidth / 2 + min( MediaQuery.of(context).size.width, ContentSize.maxWidth( MediaQuery.of(context).size.width), ) / 2 - 100 - avatarWidth, ), child: SizedBox( width: avatarWidth, child: Image.asset( AhlAssets.priorAvatar, ), ), ), ], ); }, ); } } class LogoNDD extends StatelessWidget { const LogoNDD({super.key}); @override Widget build(BuildContext context) { // seo: Html element creation WidgetsBinding.instance.addPostFrameCallback((timestamp) { CreateHtml.makeWidgetTree(context); }); return SizedBox.square( dimension: Sizes.nddLogoSize, child: Image.asset( key: SeoKey(TagType.img, alt: "Logo des Soeurs Dominicaines Missionnaires de Notre Dame de la Delivrande",src: AhlAssets.logoNdd,), filterQuality: FilterQuality.high, isAntiAlias: true, AhlAssets.logoNdd, ), ); } } class Signature extends StatelessWidget { const Signature({super.key}); @override Widget build(BuildContext context) { //seo: create html tag WidgetsBinding.instance.addPostFrameCallback((timestamp) { CreateHtml.makeWidgetTree(context); }); String title = '${AppLocalizations.of(context)!.sister} Michèle Marie, o.p'; return RichText( key:SeoKey(TagType.p), text: TextSpan( text: title, style: AhlTheme.name, children: [ TextSpan( text: '\n${AppLocalizations.of(context)!.prior}', style: AhlTheme.peopleTitle, ), ], ), ); } } ================================================ FILE: lib/src/pages/novena_page/novena_article_extension.dart ================================================ ================================================ FILE: lib/src/pages/novena_page/novena_page.dart ================================================ import 'package:ahl/ahl_barrel.dart'; import 'package:ahl/src/article_view/bloc/bloc.dart'; import 'package:ahl/src/article_view/event/event.dart'; import 'package:ahl/src/article_view/view/article_view.dart'; import 'package:ahl/src/newsletter/newsletter.dart'; import 'package:ahl/src/pages/homepage/homepage.dart'; import 'package:ahl/src/utils/breakpoint_resolver.dart'; import 'package:ahl/src/widgets/widgets.dart'; import 'package:firebase_article/firebase_article.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:gap/gap.dart'; import 'package:go_router/go_router.dart'; import 'package:lottie/lottie.dart'; import '../../article_view/state/state.dart'; class NovenaPage extends StatefulWidget { const NovenaPage({ super.key, required this.novena, this.collection = "novena", }) : novenaId = null; const NovenaPage.fromId({ super.key, required this.novenaId, this.collection = "novena", }) : novena = null; static const routeName = 'novena'; final Article? novena; final String? novenaId; final String collection; @override State createState() => _NovenaPageState(); } class _NovenaPageState extends State { @override void initState() { super.initState(); } @override Widget build(BuildContext context) { if (widget.novena != null) { if (widget.novena!.relations![0]['type'] != 'novena') { // Future.microtask(() => context.go('/articles/${widget.novena!.id}')); return ArticleContentPage( article: widget.novena, collection: widget.collection, ); } return NovenaContentView(novena: widget.novena!); } else { context.read().add( GetArticleByIdEvent( id: widget.novenaId, collection: widget.collection), ); return BlocBuilder>( buildWhen: (previous, current) => previous.articles?[widget.novenaId] == null, builder: (context, state) { Article? novena = state.articles?[widget.novenaId]; if (novena != null) { if (novena.relations![0]['type'] != 'novena') { // Future.microtask(() => context.go('/articles/${widget.novena!.id}')); return ArticleContentPage( key: ValueKey("article_${novena.id}"), article: novena, collection: widget.collection, ); } return NovenaContentView( novena: novena, collection: widget.collection, ); } else { if (state.status == ArticleStatus.failed && novena == null) { return FutureBuilder( future: Future( () => context.goNamed(HomePage.routeName), ), builder: (_, __) => const SizedBox.shrink(), ); } return Scaffold( body: Center( child: LottieBuilder.asset('animations/loading.json'), ), ); } }, ); } } } class NovenaContentView extends StatefulWidget { const NovenaContentView({ super.key, required this.novena, this.collection = "novena", }); final Article novena; final String collection; @override State createState() { return _NovenaContentViewState(); } /// The current day of the novena int get currentDay { return sortedDaysId.indexOf(novena.id) + 1; } /// A list of all days that is sorted. List get sortedDaysId { var sortedDays = days.keys.toList(); sortedDays.sort(); List sortedDaysId = []; for (String key in sortedDays) { sortedDaysId.add(days[key]); } return sortedDaysId; } /// A Map of all the novena document for upcoming and past days. Map get days { return novena.relations![0]['days'] as Map; } /// A list of all the novena document for upcoming and past days. List get daysId { List daysId = []; for (int i = 1; i <= days.length; i++) { String novenaDayId = days['day_$i'] ?? ""; if (novenaDayId.isNotEmpty) { daysId.add(novenaDayId); } } return daysId; } List buildNovenaDaysArticleTiles( BuildContext context, { void Function(String? novenaId)? callback, }) { List cards = []; for (String novenaId in sortedDaysId) { int day = sortedDaysId.indexOf(novenaId) + 1; cards.add( Container( constraints: const BoxConstraints( maxHeight: 425, maxWidth: 330, ), alignment: Alignment.center, child: Container( margin: const EdgeInsets.symmetric(horizontal: Paddings.medium + 3), constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.sizeOf(context).width), ), child: CardArticleTile.fromId( preview: "", label: "Neuvaine - Jour $day", callback: () { if (callback != null) { callback(novenaId); } }, direction: Axis.vertical, articleId: novenaId, collection: collection, ), ), ), ); } return cards; } } class _NovenaContentViewState extends State { late ScrollController controller; late ScrollController daysController; @override void initState() { super.initState(); controller = ScrollController( initialScrollOffset: 0, keepScrollOffset: false, // onAttach: (position) => controller.animateTo( // 0, // duration: Durations.medium3, // curve: Curves.easeInOut, // ), ); daysController = ScrollController(); } @override void dispose() { daysController.dispose(); controller.dispose(); super.dispose(); } @override Widget build(BuildContext context) { // Future.microtask( // () => controller.animateTo( // 0, // duration: Durations.extralong1, // curve: Curves.easeInOut, // ), // ); Size screenSize = MediaQuery.sizeOf(context); String label = 'Neuvaine - Jour ${widget.currentDay}'; PreferredSizeWidget appBar = AhlAppBar( preferredSize: const Size.fromHeight(75 + 36), bottomBar: Container( // padding: const EdgeInsets.all(Paddings.small), constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(screenSize.width), ), child: PopupMenuButton( child: DefaultTextStyle( style: Theme.of(context).textTheme.labelLarge!.copyWith( color: Theme.of(context).colorScheme.primary, ), child: Row( children: [ Icon( Icons.keyboard_arrow_down_rounded, color: Theme.of(context).colorScheme.primary, ), Text(label), ], ), ), itemBuilder: (context) => List.generate( widget.sortedDaysId.length, (index) => PopupMenuItem( child: Text('Jour ${index + 1}'), onTap: () { context.goNamed( NovenaPage.routeName, pathParameters: {"novenaId": widget.sortedDaysId[index]}, extra: context .read() .state .articles?[widget.sortedDaysId[index]], ); controller.animateTo( 0, duration: Durations.medium4, curve: Curves.easeInOut, ); }, ), ), ), ), ); return Scaffold( appBar: appBar, endDrawer: const AhlDrawer(), body: ListView( controller: controller, addAutomaticKeepAlives: true, cacheExtent: 6000, children: [ ArticleContentView( label: label, article: widget.novena, collection: widget.collection, ), Gap( resolveSeparatorSize(context), ), RelatedArticles( article: widget.novena, collection: widget.collection, ), Gap( resolveSeparatorSize(context), ), /// related article place /// newsletter prompt const NewsLetterPrompt(), Gap( resolveSeparatorSize(context), ), Container( alignment: Alignment.center, constraints: BoxConstraints( maxHeight: 480, maxWidth: MediaQuery.sizeOf(context).width, ), child: ListView( addAutomaticKeepAlives: true, controller: daysController, scrollDirection: Axis.horizontal, children: widget.buildNovenaDaysArticleTiles( context, callback: (novenaId) { context.goNamed( NovenaPage.routeName, pathParameters: {'novenaId': novenaId!}, ); controller.animateTo(0, duration: Durations.medium4, curve: Curves.easeInOut); }, ), ), ), Container( alignment: Alignment.center, child: Container( constraints: const BoxConstraints(maxWidth: 160), decoration: BoxDecoration( color: Theme.of(context).colorScheme.surface, borderRadius: BorderRadius.circular(BorderSizes.medium), ), alignment: Alignment.center, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisSize: MainAxisSize.min, children: [ IconButton( onPressed: () { double newOffset = daysController.offset - 330; daysController.animateTo(newOffset, duration: Durations.medium2, curve: Curves.easeInOut); }, icon: const Icon(Icons.arrow_back_rounded), ), IconButton( onPressed: () { double newOffset = daysController.offset + 330; daysController.animateTo(newOffset, duration: Durations.medium2, curve: Curves.easeInOut); }, icon: const Icon(Icons.arrow_forward_rounded), ), ], ), ), ), Gap( resolveSeparatorSize(context), ), /// other day /// Ahl footer const AhlFooter(), ], ), ); } } ================================================ FILE: lib/src/pages/prayers/prayers_page.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:gap/gap.dart'; import 'package:ahl/src/newsletter/newsletter.dart'; import 'package:ahl/src/prayers_space/view.dart'; import 'package:ahl/src/widgets/widgets.dart'; import '../../../ahl_barrel.dart'; import '../../utils/breakpoint_resolver.dart'; import '../projects/projects_page.dart'; class PrayersPage extends StatefulWidget { const PrayersPage({super.key}); static const String routeName = 'prayers'; @override State createState() => _PrayersPageState(); } class _PrayersPageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: const AhlAppBar(), body: ListView( children: [ const PrayerSpaceView(), Gap(resolveSeparatorSize(context)), const AhlDivider.symmetric( space: 25, ), Gap(resolveSeparatorSize(context)), SuggestionSection( callback: () => Navigator.pushNamed(context, PrayersPage.routeName), image: Future.value( AssetImage( AhlAssets.prayersSpaceCover, ), ), child: Text( AppLocalizations.of(context)!.prayerSpace, ), ), Gap(resolveSeparatorSize(context)), SuggestionSection( callback: () => Navigator.pushNamed(context, ProjectsPage.routeName), image: Future.value( AssetImage( AhlAssets.projectSpaceCover, ), ), child: Text( AppLocalizations.of(context)!.projectSpaceTitle, ), ), Gap(resolveSeparatorSize(context)), const AhlDivider.symmetric( space: 25, ), Gap(resolveSeparatorSize(context)), const NewsLetterPrompt(), const AhlFooter(), ], ), ); } } ================================================ FILE: lib/src/pages/projects/project_page_view.dart ================================================ import 'package:ahl/ahl_barrel.dart'; import 'package:ahl/src/article_view/event/event.dart'; import 'package:ahl/src/theme/theme.dart'; import 'package:ahl/src/utils/breakpoint_resolver.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:firebase_article/firebase_article.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:gap/gap.dart'; import 'package:go_router/go_router.dart'; import 'package:lottie/lottie.dart'; import '../../article_view/state/state.dart'; import '../../article_view/view/article_view.dart'; import '../../newsletter/newsletter.dart'; import '../../pages/homepage/donation/donation_page.dart'; import '../../pages/projects/projects_page.dart'; import '../../project_space/bloc.dart'; import '../../widgets/widgets.dart'; class ProjectPageView extends StatelessWidget { const ProjectPageView({ super.key, this.project, this.collection = "projects", this.projectId, }) : assert(project != null || projectId != null, "On the project or projectId must be supplied"); // change this to the build relations /// The current project to be displayed final Article? project; final String collection; final String? projectId; @override Widget build(BuildContext context) { if (project != null) { return _ProjectPageContentView(project: project); } // When no project is provided but instead, a projectId return BlocBuilder>( buildWhen: (previous, current) { bool needCallBuilder = true; if (previous.articles == null) { needCallBuilder = true; } else { needCallBuilder = !previous.articles!.keys.contains(projectId); } return needCallBuilder; }, builder: (context, state) { context.read().add(GetArticleByIdEvent(id: projectId)); // get project var project = state.articles?[projectId!]; // Make decision based on UI // 1 case: every thing works fine: // - a real project is returned by project bloc if (project != null) { return _ProjectPageContentView( project: project, collection: collection, ); } else if (state.status == ArticleStatus.initial) { return Container( color: AhlTheme.background, child: Center( child: LottieBuilder.asset( 'animations/loading.json', repeat: true, ), ), ); } else { return Container( color: AhlTheme.background, child: Center( child: LottieBuilder.asset( 'animations/loading.json', repeat: true, ), ), ); } }, ); } } class _ProjectPageContentView extends StatefulWidget { const _ProjectPageContentView({ required this.project, this.collection = "projects", }); final Article? project; final String collection; @override State<_ProjectPageContentView> createState() => _ProjectPageContentViewState(); } class _ProjectPageContentViewState extends State<_ProjectPageContentView> with SingleTickerProviderStateMixin { late TabController _tabController; late ScrollController _descriptionScrollController; late ScrollController _newsScrollController; late bool needDisplayTitleInAppBar; @override void initState() { super.initState(); _tabController = TabController(length: 2, vsync: this); _descriptionScrollController = ScrollController(); _newsScrollController = ScrollController(); needDisplayTitleInAppBar = false; _descriptionScrollController.addListener(updateNeedDisplayTitle); } void updateNeedDisplayTitle() { if (_descriptionScrollController.offset >= 64) { if (!needDisplayTitleInAppBar) { setState(() => needDisplayTitleInAppBar = true); } } else if (needDisplayTitleInAppBar) { setState(() => needDisplayTitleInAppBar = false); } } @override Widget build(BuildContext context) { // var screenWidth = MediaQuery.sizeOf(context).width; var title = widget.project?.title; // var value = needDisplayTitleInAppBar ? 1.0 : 0.0; return Scaffold( key: ValueKey(widget.project), appBar: AhlAppBar( preferredSize: Size.fromHeight( (needDisplayTitleInAppBar) ? 75 + 64 : 75 + 29, ), bottomBar: Flexible( flex: 1, child: Column( children: [ Align( alignment: Alignment.centerLeft, child: Container( // constraints: const BoxConstraints(maxWidth: 1024), // width: screenWidth / 2 - 20, alignment: const Alignment(-0.5, 0), // margin: EdgeInsets.symmetric( // horizontal: resolveForBreakPoint( // screenWidth, // other: Margins.small, // extraHuge: Margins.extraHuge, // huge: Margins.huge, // extraLarge: Margins.extraLarge, // large: Margins.large, // ), // ), // padding: EdgeInsets.symmetric( // horizontal: resolveForBreakPoint( // screenWidth, // small: Margins.small, // medium: Margins.small, // large: Margins.large, // extraLarge: Margins.extraLarge, // other: Margins.huge, // ), // ), child: AnimatedCrossFade( firstChild: const SizedBox.shrink(), secondChild: Text( title!, style: Theme.of(context).textTheme.titleMedium, ), crossFadeState: !needDisplayTitleInAppBar ? CrossFadeState.showFirst : CrossFadeState.showSecond, duration: Durations.medium1, layoutBuilder: (topChild, topChildKey, bottomChild, bottomChildKey) { return Container( key: topChildKey, child: topChild .animate( autoPlay: false, target: needDisplayTitleInAppBar ? 1 : 0, ) .fadeIn() .slideY(begin: 1), ); }, ), ), ), // Container( // child: Visibility( // visible: needDisplayTitleInAppBar, // child: Text( // title!, // style: Theme.of(context).textTheme.titleLarge, // ))) // .animate( // autoPlay: false, // target: needDisplayTitleInAppBar ? 1 : 0, // ) // .fadeIn() // .slideY(begin: 1), TabBar( controller: _tabController, tabs: const [ Tab( text: "Description", ), Tab( text: "Actualités", ), ], ), ], ), ), ), body: (widget.project != null) ? TabBarView( controller: _tabController, children: [ ProjectDescriptionContentView( key: ValueKey("${widget.project?.id}_description"), article: widget.project!, scrollController: _descriptionScrollController, ), ProjectNewsView( key: ValueKey("${widget.project?.id}_news"), scrollController: _newsScrollController, ), ], ) : Builder( builder: (context) { ScaffoldMessenger.maybeOf(context)?.showSnackBar( SnackBar( content: Container( color: Theme.of(context).colorScheme.surfaceContainerHigh, child: DefaultTextStyle( style: Theme.of(context) .textTheme .labelMedium! .copyWith( color: Theme.of(context).colorScheme.onSurface, ), child: Row( children: [ const Text( "Le contenu est introuvable.", ), IconButton( onPressed: () => context.pop(), icon: Icon( Icons.close_rounded, color: Theme.of(context).colorScheme.onSurface, ), ), ], ), ), ), ), ); context.goNamed(ProjectsPage.routeName); return const Center( child: Text("Project non disponible."), ); }, ), floatingActionButton: FloatingActionButton.small( backgroundColor: Theme.of(context).colorScheme.surfaceContainer, child: SizedBox.square( dimension: IconSizes.medium, child: SvgPicture.asset('images/SVG/dons_alt.svg'), ), onPressed: () { Navigator.pushNamed(context, DonationPage.routeName, arguments: widget.project); }, ), ); } } class ProjectDescriptionContentView extends StatelessWidget { const ProjectDescriptionContentView({ super.key, required Article article, this.scrollController, }) : _currentArticle = article; final Article _currentArticle; final ScrollController? scrollController; Article get currentArticle => _currentArticle; Widget buildSuggestions(BuildContext context) { return BlocBuilder>( key: ValueKey("suggestion_${currentArticle.id}"), buildWhen: (previous, currentArticle) { bool isUnique = false; bool isCorrectlyCharged = false; if (previous.status == ArticleStatus.succeed) { if (previous.articles!.keys.length <= 1) { isUnique = true; } else { isCorrectlyCharged = true; } } return !isUnique || !isCorrectlyCharged; }, builder: (context, state) { context.read().add( const GetArticleListEvent( foldLength: maxSuggestionArticle, ), ); Map? otherArticles = context.read().state.articles; List projectCards = []; if (otherArticles != null || otherArticles!.keys.isNotEmpty) { for (String articleId in otherArticles.keys) { if (articleId != currentArticle.id) { projectCards.add( ProjectCard(article: otherArticles[articleId]!), ); } } } return Wrap(children: projectCards); }, ); } @override Widget build(BuildContext context) { // List suggestion = context.read().state.articles?.map((element)=>).toList(); return ListView( controller: scrollController, addAutomaticKeepAlives: true, children: [ ArticleContentView( isProject: true, article: currentArticle, collection: "projects", ), Gap( resolveSeparatorSize(context), ), const NewsLetterPrompt(), Gap(resolveSeparatorSize(context)), const AhlDivider(leading: 0, trailing: 0), Gap(resolveSeparatorSize(context)), Center( child: ConstrainedBox( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.sizeOf(context).width), ), child: buildSuggestions(context), ), ), Gap(resolveSeparatorSize(context)), const AhlDivider(leading: 0, trailing: 0), Gap(resolveSeparatorSize(context)), const AhlFooter(), ], ); } } class ProjectNewsView extends StatelessWidget { const ProjectNewsView({ super.key, this.scrollController, }); final ScrollController? scrollController; static List
buildRelatedArticle(Article article) { List
relatedArticles = []; // building articles; //todo: replace with the real implementation relatedArticles.addAll( [ const Article( id: 'Fête de fin d\'année', releaseDate: '22/06/2024', contentPath: 'fete_fin_d\'annee.md', title: 'Fête de fin d\'année Cantine', ), const Article( id: 'Rapport fin', releaseDate: '17/07/2024', contentPath: 'rapport.md', title: 'Rapport Cantine 2023-2024', ), ], ); return relatedArticles; } @override Widget build(BuildContext context) { // List suggestion = context.read().state.articles?.map((element)=>).toList(); return ListView( controller: scrollController, children: [ Container( alignment: Alignment.center, height: 500, child: Text( AppLocalizations.of(context)!.availableSoon, style: Theme.of(context).textTheme.headlineMedium, ), ), const NewsLetterPrompt(), const AhlDivider(leading: 0, trailing: 0), // ...suggestion, const AhlDivider(leading: 0, trailing: 0), const AhlFooter(), ], ); } } ================================================ FILE: lib/src/pages/projects/projects_page.dart ================================================ import 'dart:developer'; import 'dart:typed_data'; import 'package:ahl/src/article_view/event/event.dart'; import 'package:ahl/src/article_view/state/state.dart'; import 'package:ahl/src/firebase_constants.dart'; import 'package:ahl/src/pages/prayers/prayers_page.dart'; import 'package:ahl/src/pages/who_we_are/who_we_are.dart'; import 'package:ahl/src/partners/view.dart'; import 'package:ahl/src/project_space/bloc.dart'; import 'package:ahl/src/project_space/view.dart'; import 'package:ahl/src/theme/theme.dart'; import 'package:ahl/src/utils/storage_utils.dart'; import 'package:ahl/src/who_we_are/view.dart'; import 'package:firebase_article/firebase_article.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:gap/gap.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:ahl/ahl_barrel.dart'; import 'package:ahl/src/utils/breakpoint_resolver.dart'; import 'package:ahl/src/widgets/widgets.dart'; import 'package:go_router/go_router.dart'; import 'package:session_storage/session_storage.dart'; class ProjectsPage extends StatefulWidget { const ProjectsPage({super.key}); /// projects static const String routeName = 'projects'; static ScrollController controller = ScrollController(); @override State createState() => _ProjectsPageState(); } class _ProjectsPageState extends State { @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return Scaffold( endDrawer: const AhlDrawer(), appBar: const AhlAppBar(), /// The project and all page are organized as list views /// and individual components that follows each over. body: ListView( controller: ProjectsPage.controller, children: [ const HeroImage(), const Gap(45), const Header(), const Gap(50), const PartnersView(), const Gap(50), const InProgressProjectListView(), const Gap(50), const AhlDivider.symmetric( space: 25, ), const Gap(25), SuggestionSection( callback: () => Navigator.pushNamed(context, WhoWeArePage.routeName), child: Text( AppLocalizations.of(context)!.whoWeAre, ), ), Gap(resolveSeparatorSize(context)), SuggestionSection( callback: () => Navigator.pushNamed(context, PrayersPage.routeName), image: Future.value( AssetImage( AhlAssets.prayersSpaceCover, ), ), child: Text( AppLocalizations.of(context)!.prayerSpace, ), ), Gap(resolveSeparatorSize(context)), const AhlDivider.symmetric( space: 25, ), Gap(resolveSeparatorSize(context)), const AhlFooter(), ], ), ); } } class AhlDivider extends StatelessWidget { const AhlDivider({ super.key, required this.leading, required this.trailing, this.thickness, this.isSized = true, }); const AhlDivider.symmetric({ super.key, required double space, this.thickness, this.isSized = true, }) : leading = space, trailing = space; final double leading; final double trailing; final double? thickness; final bool isSized; @override Widget build(BuildContext context) { return Align( child: Container( constraints: (isSized) ? BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), ) : null, margin: EdgeInsets.only( left: leading, right: trailing, ), child: Container( height: thickness ?? 5, color: AhlTheme.yellowRelax, ), ), ); } } class SuggestionSection extends StatefulWidget { const SuggestionSection({ super.key, this.image, required this.callback, this.child, }); final Future? image; final VoidCallback callback; final Widget? child; @override State createState() => _SuggestionSectionState(); } class _SuggestionSectionState extends State with AutomaticKeepAliveClientMixin { late Future image; static const String coverImageKey = 'coverImage'; @override void initState() { image = widget.image ?? getImage(); super.initState(); } Future getImage() async { final cache = SessionStorage(); return await WhoWeAreTileState.getImage().then((value) { cache[coverImageKey] = 'loaded'; return value; }); } @override Widget build(BuildContext context) { super.build(context); return FutureBuilder( future: image, builder: (context, snapshot) { return Align( child: Container( margin: const EdgeInsets.symmetric(horizontal: Margins.small), constraints: BoxConstraints( maxWidth: ContentSize.maxWidth( MediaQuery.of(context).size.width, ), ), child: ElevatedButton( style: ElevatedButton.styleFrom( // overlayColor: Colors.black26, backgroundBuilder: (context, states, child) { return Align( child: AnimatedContainer( duration: Durations.long1, curve: Curves.easeInOut, height: 150, decoration: (snapshot.hasData) ? BoxDecoration( image: DecorationImage( alignment: const Alignment(-1, -0.3), image: (snapshot.data is ImageProvider) ? snapshot.data! : MemoryImage(snapshot.data!), fit: BoxFit.cover, ), ) : null, alignment: Alignment.center, child: Container( color: (snapshot.hasData) ? Colors.black38 : null, alignment: Alignment.center, child: DefaultTextStyle( style: Theme.of(context) .textTheme .titleLarge! .copyWith( color: (snapshot.hasData) ? Theme.of(context).colorScheme.onPrimary : null), child: child ?? const SizedBox.shrink(), ), ), ), ); }, ), onPressed: widget.callback, child: widget.child, ), ), ); }, ); } @override bool get wantKeepAlive => SessionStorage()[coverImageKey] != null; } class HeroImage extends StatelessWidget { const HeroImage({super.key}); @override Widget build(BuildContext context) { return Align( child: Container( margin: const EdgeInsets.symmetric( horizontal: Margins.small, ), constraints: BoxConstraints( maxWidth: ContentSize.maxWidth( MediaQuery.of(context).size.width, ), maxHeight: resolveForBreakPoint( MediaQuery.of(context).size.width, other: 300, small: 133, medium: 133, ), ), decoration: BoxDecoration( borderRadius: BorderRadius.circular( resolveForBreakPoint( MediaQuery.of(context).size.width, other: BorderSizes.huge, small: BorderSizes.small, medium: BorderSizes.small, ), ), image: DecorationImage( fit: BoxFit.contain, image: AssetImage( AhlAssets.projectSpaceCover, ), ), ), ), ); } } class Header extends StatelessWidget { const Header({super.key}); @override Widget build(BuildContext context) { return Align( child: Container( margin: const EdgeInsets.symmetric( horizontal: Margins.small, ), alignment: Alignment.center, constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), ), child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( AppLocalizations.of(context)!.projectLongTitle, style: resolveDisplayTextThemeForBreakPoints( MediaQuery.of(context).size.width, context), textAlign: TextAlign.center, ), const Gap(10), Text( AppLocalizations.of(context)!.slogan, style: resolveTitleTextThemeForBreakPoints( MediaQuery.of(context).size.width, context), textAlign: TextAlign.center, ), const Gap(45), Text( AppLocalizations.of(context)!.projectSpaceDescription, style: Theme.of(context).textTheme.bodySmall, ), const Gap(45), Align( child: ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).primaryColor, foregroundColor: Theme.of(context).colorScheme.onPrimary, ), onPressed: () { ProjectsPage.controller.animateTo( 947, duration: Durations.long1, curve: Curves.easeIn, ); }, child: Text( AppLocalizations.of(context)!.allProjects, ), ), ), ], ), ), ); } } class InProgressProjectListView extends StatefulWidget { const InProgressProjectListView({super.key}); @override State createState() => _InProgressProjectListViewState(); } class _InProgressProjectListViewState extends State { @override void initState() { super.initState(); context.read().add( const GetArticleListEvent(foldLength: 100), ); } @override Widget build(BuildContext context) { return const AllArticleView(); } } /// This widget displays all article based on their status in a horizontal list. /// /// First, we trigger all article list and then make a filter to separate /// in progress and achieved projects. To do so, we listen to ProjectBloc. class AllArticleView extends StatefulWidget { const AllArticleView({super.key}); @override State createState() => _AllArticleViewState(); } class _AllArticleViewState extends State { @override Widget build(BuildContext context) { return BlocConsumer>( builder: (BuildContext context, ArticleState
state) { List? projectInProgress = state.articles?.values .where((article) => article.relations?[0]['status'] == 'inProgress') .toList(); List? projectWaiting = state.articles?.values .where( (article) => article.relations?[0]['status'] == 'waitingBudget') .toList(); List? projectDone = state.articles?.values .where((article) => article.relations?[0]['status'] == 'done') .toList(); switch (state.status) { case ArticleStatus.succeed: return Column( children: [ if (projectInProgress != null && projectInProgress.isNotEmpty) ProjectsView( title: 'Projet en cours', articles: projectInProgress, ), if (projectWaiting != null && projectWaiting.isNotEmpty) ...[ const Gap(45), ProjectsView( title: 'En attente financement', articles: projectWaiting, ), ], if (projectDone != null && projectDone.isNotEmpty) ...[ const Gap(45), Container( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth( MediaQuery.of(context).size.width), ), child: ProjectsView( alignment: Alignment.centerLeft, title: 'Projet achevé', articles: projectDone, ), ), ], ], ); case ArticleStatus.failed: return Align(child: Text("Failed:${state.error}")); default: return Container( alignment: Alignment.center, height: 702, child: const CircularProgressIndicator(), ); } }, listener: (context, state) {}, ); } } class ProjectsView extends StatefulWidget { const ProjectsView({ super.key, required this.title, this.subtitle, required this.articles, this.alignment, }); final List articles; final String title; final String? subtitle; final Alignment? alignment; @override State createState() { return ProjectsViewState(); } } class ProjectsViewState extends State { final ScrollController _controller = ScrollController(); List buildProjectWidget(BuildContext context) { List projectWidgets = []; for (Article? article in widget.articles) { if (article != null) { projectWidgets.add( ProjectCard( article: article, ), ); } } return projectWidgets; } @override Widget build(BuildContext context) { return Container( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), ), child: Column( children: [ Container( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), ), margin: const EdgeInsets.symmetric(horizontal: Margins.small), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( widget.title, style: /*resolveTitleTextThemeForBreakPoints( MediaQuery.of(context).size.width, context)!*/ Theme.of(context).textTheme.titleMedium!.copyWith( color: AhlTheme.darkNight, ), ), Container( padding: const EdgeInsets.all(4.0), decoration: const ShapeDecoration( color: Colors.white, //Theme.of(context).colorScheme.surface, shape: StadiumBorder(), ), child: Row( children: [ IconButton( onPressed: () => _controller.animateTo( _controller.offset - 300, duration: Durations.long1, curve: Curves.easeInOut, ), icon: const Icon(Icons.arrow_back_outlined), ), ConstrainedBox( constraints: BoxConstraints( maxWidth: resolveForBreakPoint( MediaQuery.of(context).size.width, other: 150, small: 0, medium: 0, large: 50, ), maxHeight: 5), child: const SizedBox.expand(), ), IconButton( onPressed: () => _controller.animateTo( _controller.offset + 300, duration: Durations.long1, curve: Curves.easeInOut, ), icon: const Icon( Icons.arrow_forward_rounded, ), ) ], ), ), ], ), ), Container( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), ), alignment: Alignment.centerLeft, child: (widget.subtitle != null) ? Text(widget.subtitle!) : null, ), Container( constraints: BoxConstraints( maxWidth: MediaQuery.of(context).size.width, maxHeight: 330, ), alignment: Alignment.centerLeft, child: ListView( controller: _controller, shrinkWrap: true, scrollDirection: Axis.horizontal, children: buildProjectWidget(context), ), ), ], ), ); } } /// A widget that build the project cards. class ProjectCard extends StatelessWidget { const ProjectCard({ super.key, required this.article, }); final Article article; @override Widget build(BuildContext context) { return AhlCard( callback: () { context.go("/${ProjectsPage.routeName}/${article.id}" // MaterialPageRoute( // builder: (context) => ProjectPageView( // collection: projectsCollection, // project: article, // ), // ), ); log("${article.contentPath}"); }, image: FutureBuilder( future: ArticleStorageUtils( article: article, collection: projectsCollection, ).getCoverImage(), builder: (context, snapshot) { if (snapshot.hasData) { return Container( // margin: const EdgeInsets.all(Paddings.medium), decoration: BoxDecoration( image: DecorationImage( image: MemoryImage(snapshot.data!), fit: BoxFit.cover, ), borderRadius: BorderRadius.circular(BorderSizes.small), ), ); } else { return Container( alignment: Alignment.center, child: const CircularProgressIndicator(), ); } }), // label: Text( // "${article.relations?[0]['status']}", // ), title: Text( "${article.title}", ), ).animate().fadeIn(curve: Curves.easeIn).slideY(begin: 0.125, end: 0); } } ================================================ FILE: lib/src/pages/rosary/rosary_page.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:ahl/src/newsletter/newsletter.dart'; import 'package:ahl/src/widgets/widgets.dart'; import '../../../ahl_barrel.dart'; class RosaryPage extends StatefulWidget { const RosaryPage({super.key}); static const String routeName = 'rosary'; @override State createState() => _RosaryPageState(); } class _RosaryPageState extends State { late PageController controller; @override void initState() { super.initState(); controller = PageController(); } @override Widget build(BuildContext context) { return Scaffold( appBar: const AhlAppBar(), drawer: const AhlDrawer(), body: Container( decoration: const BoxDecoration( image: DecorationImage( fit: BoxFit.cover, image: AssetImage( 'images/view-boat-water-with-flowers.webp', ), ), ), alignment: Alignment.center, child: Container( clipBehavior: Clip.antiAlias, alignment: Alignment.center, constraints: const BoxConstraints( maxWidth: 500, maxHeight: 350, ), decoration: BoxDecoration( borderRadius: BorderRadius.circular(BorderSizes.big), color: Colors.white.withAlpha(0x88), ), child: PageView( controller: controller, children: [ Padding( padding: const EdgeInsets.all(Paddings.medium), child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( 'Espace du Rosaire', textAlign: TextAlign.center, style: Theme.of(context).textTheme.displayLarge, ), const Text("Bientôt Disponible"), const Spacer(), ElevatedButton( style: ElevatedButton.styleFrom( fixedSize: const Size.fromHeight(45), foregroundColor: Theme.of(context).colorScheme.onPrimary, backgroundColor: Theme.of(context).colorScheme.primary, ), onPressed: () { controller.nextPage( duration: Durations.medium3, curve: Curves.easeIn, ); }, child: Text( AppLocalizations.of(context)!.getNotified, ), ), ], ), ), Stack( children: [ const NewsLetterPrompt(), Padding( padding: const EdgeInsets.all(Paddings.medium), child: IconButton( onPressed: () => controller.previousPage( curve: Curves.easeIn, duration: Durations.medium3, ), icon: const Icon( Icons.arrow_back_rounded, ), ), ), ], ), ], ), ), ), ); } } ================================================ FILE: lib/src/pages/saints/saints.dart ================================================ import 'package:flutter/material.dart'; class SaintsPage extends StatefulWidget { const SaintsPage({super.key}); static const String routeName = '/saints'; @override State createState() => _SaintsPageState(); } class _SaintsPageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(), body: Center( child: Text( 'Saints Space', style: Theme.of(context).textTheme.displayLarge, ), ), ); } } ================================================ FILE: lib/src/pages/who_we_are/who_we_are.dart ================================================ import 'dart:developer' as developer; import 'dart:math'; import 'package:ahl/ahl_barrel.dart'; import 'package:ahl/src/who_we_are/view.dart'; import 'package:ahl/src/widgets/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; class WhoWeArePage extends StatefulWidget { const WhoWeArePage({super.key}); static const String routeName = 'whoWeAre'; @override State createState() => _WhoWeArePageState(); } /// The WhoWeArePage is a show to who are the sisters in a suitable animation. /// - Problem: Display sister information in a beautiful and consumable way. /// - Approach: Use a GestureDetector to trigger scroll event that animate an /// animation controller that control the animation. /// - Step: 1. implement ViewUI: text that displays the current animation value. /// 2. Make Gesture Detector Scrolling change the animation state. /// class _WhoWeArePageState extends State with SingleTickerProviderStateMixin { late AnimationController animationController; late ScrollController scrollController; @override void initState() { super.initState(); animationController = AnimationController(vsync: this, lowerBound: 0, upperBound: 100); scrollController = ScrollController(); scrollController.addListener(incrementScrolling); } @override void dispose() { animationController.dispose(); super.dispose(); } void incrementDragging(DragUpdateDetails details) { setState(() { animationController.value += details.delta.dy / 100; }); } void incrementScrolling() { setState(() { animationController.value += scrollController.offset / 100; }); } @override Widget build(BuildContext context) { return Scaffold( appBar: const AhlAppBar(), endDrawer: const AhlDrawer(), body: Container( height: MediaQuery.sizeOf(context).height, alignment: Alignment.center, child: Text(AppLocalizations.of(context)!.availableSoon, style: Theme.of(context).textTheme.headlineLarge), ) // ListView( // children: [ // Container( // constraints: BoxConstraints( // maxHeight: // MediaQuery.sizeOf(context).height - Sizes.appBarSize), // child: // ScrollingAnimationPage( // animationBuilder: (animationValue) => MyAnimatedWidget( // animation: animationValue, // ), // ), // ), // ], ); } } /// Implement animation on who we are // todo: // todo step 1: - create all widget in a scrolling list // class ScrollingAnimationPage extends StatefulWidget { final double maxAnimationValue; final Function(AnimationController animation) animationBuilder; const ScrollingAnimationPage({ super.key, this.maxAnimationValue = 2000, required this.animationBuilder, }); @override State createState() => _ScrollingAnimationPageState(); } class _ScrollingAnimationPageState extends State with TickerProviderStateMixin { late final AnimationController _controller; late final ScrollController _scrollController; @override void initState() { super.initState(); _scrollController = ScrollController(); _scrollController.addListener(updateAnimation); _controller = AnimationController( lowerBound: 0, upperBound: widget.maxAnimationValue, duration: const Duration(seconds: 2), vsync: this, ); } void updateAnimation() { _controller.value = _scrollController.offset; } @override void dispose() { _controller.dispose(); _scrollController.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return Stack( children: [ AnimatedBuilder( animation: _controller, builder: (context, child) => widget.animationBuilder(_controller), ), Scrollbar( controller: _scrollController, child: ListView( controller: _scrollController, physics: const AlwaysScrollableScrollPhysics(), children: [ Container( // color: Colors.accents[Random().nextInt(Colors.accents.length)] // .withAlpha(0x8F), height: widget.maxAnimationValue, ), ], ), ), ], ); } } class MyAnimatedWidget extends StatelessWidget { final AnimationController animation; const MyAnimatedWidget({super.key, required this.animation}); @override Widget build(BuildContext context) { developer.log('${animation.value}'); return SizedBox( height: MediaQuery.of(context).size.height, width: MediaQuery.of(context).size.width, child: Column( children: [ FutureBuilder( future: WhoWeAreTileState.getImage(), builder: (context, snapshot) { CrossFadeState crossFadeState = CrossFadeState.showFirst; if (snapshot.hasData) { crossFadeState = CrossFadeState.showSecond; } return AnimatedCrossFade( layoutBuilder: (topChild, topChildKey, bottomChild, bottomChildKey) => Stack( children: [bottomChild, topChild.animate().fade()], ), duration: Durations.long4, crossFadeState: crossFadeState, secondChild: (snapshot.hasData) ? Align( child: Image.memory( fit: BoxFit.cover, snapshot.data!, height: MediaQuery.sizeOf(context).height / 2, ), ) : Container( height: MediaQuery.sizeOf(context).height / 2, ), firstChild: Container( height: MediaQuery.sizeOf(context).height / 2, ), ); }, ), Container( padding: const EdgeInsets.symmetric(vertical: Paddings.huge), child: SectionTitle( caretColor: Theme.of(context).primaryColor, isUpperCase: true, titleColor: Theme.of(context).colorScheme.onSurface, title: AppLocalizations.of(context)!.whoWeAre, ), ), AnimatedSlide( // alignment: Alignment(sloganDx(animation), 0), // width: MediaQuery.sizeOf(context).width, // duration: Durations.medium2, duration: Duration.zero, offset: Offset(max(2.0 - animation.value / 400, -4.0), 0), child: Text( maxLines: 1, overflow: TextOverflow.visible, AppLocalizations.of(context)!.slogan, style: const TextStyle( fontSize: 64, fontFamily: 'Butler', ), ), ), ], ), ); } Offset sloganSlide(AnimationController animation) { double dx = 0.0; double dy = 0.0; if (0 <= animation.value && animation.value <= 150) { dx = -animation.value / 100; } Offset offset = Offset(dx, dy); return offset; } double sloganDx(AnimationController animation) { if (0 <= animation.value && animation.value <= 150) { double xDistance = -animation.value / 100 + 1; developer.log("animation triggered: $xDistance"); return xDistance; } return 0; } } ================================================ FILE: lib/src/partners/view.dart ================================================ import 'dart:developer'; import "package:flutter/material.dart"; import "package:firebase_storage/firebase_storage.dart"; import "package:flutter/foundation.dart"; import "package:flutter_animate/flutter_animate.dart"; import "package:flutter_gen/gen_l10n/app_localizations.dart"; import "package:gap/gap.dart"; import "package:ahl/ahl_barrel.dart"; import "package:ahl/src/firebase_constants.dart"; import "package:ahl/src/theme/theme.dart"; import "package:ahl/src/utils/breakpoint_resolver.dart"; import "package:session_storage/session_storage.dart"; class PartnersView extends StatefulWidget { const PartnersView({super.key}); @override State createState() => _PartnersViewState(); } class _PartnersViewState extends State with AutomaticKeepAliveClientMixin { Uint8List? imageData; @override bool get wantKeepAlive => true; /// Get images from firebase_storage Future?> computeImage() async { String partnersLogoCacheKey = 'partnersLogo'; SessionStorage cache = SessionStorage(); List partnersLogo = []; ListResult? results; try { await storage.child('/partners').list().then( (value) { results = value; }, ); } catch (e) { log('[Partners]: Error loading partners logo: $e'); } if (results != null) { for (Reference ref in results!.items) { final Uint8List? data = await ref.getData(); if (data != null) { partnersLogo.add(data); } } } if (partnersLogo != []) { cache[partnersLogoCacheKey] = partnersLogo.toString(); } return partnersLogo; } @override void initState() { super.initState(); images = computeImage(); } Future?>? images; @override Widget build(BuildContext context) { computeImage(); super.build(context); return Container( alignment: Alignment.center, // constraints: const BoxConstraints.expand(height: 245), color: Colors.white, child: Container( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), maxHeight: 300, ), child: Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( alignment: Alignment.center, padding: const EdgeInsets.all(Paddings.big), child: Text( AppLocalizations.of(context)!.ourPartners, style: resolveHeadlineTextThemeForBreakPoints( MediaQuery.of(context).size.width, context, )! .copyWith(color: AhlTheme.blackCharcoal), ), ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Container( constraints: BoxConstraints.tight(const Size.square(150)), child: FutureBuilder( future: images, builder: (context, snapshot) { if (snapshot.hasData) { return Row( children: snapshot.data! .map( (element) => Container( clipBehavior: Clip.hardEdge, decoration: BoxDecoration( borderRadius: BorderRadius.circular( BorderSizes.small, ), ), // borderOnForeground: true, child: Image.memory(element), ).animate().fadeIn(), ) .toList(), ); } else if (snapshot.connectionState == ConnectionState.waiting) { return const Align( // alignment: Alignment.center, child: CircularProgressIndicator(), ); } else { return const Icon(Icons.warning_rounded); } }, ), ), ], ), const Gap(45), ], ), ), ); } } ================================================ FILE: lib/src/prayers_intention/bloc.dart ================================================ part of 'prayer_request.dart'; enum PrayerRequestStatus { initial, filledDate, filledForm, /// When the PrayerRequest is ready to send. complete, } class PrayerRequestBloc extends Bloc { PrayerRequestBloc( PrayerRequestRepo repository, ) : _repo = repository, super(_initialState) { on(_onInitializedEvent); on(_onFilledFormEvent); on(_onFilledDateEvent); on(_onCompletedEvent); /// Add an initialization event at creation. add(PrayerRequestInitializeEvent()); } /// short hand variable for initial static const PrayerRequestState _initialState = PrayerRequestInitialState(); /// PrayerRequestrepo final PrayerRequestRepo _repo; void _onInitializedEvent(PrayerRequestEvent event, Emitter emit) { if (state != _initialState) { /// Re emit a new state if the state is not initial. emit(_initialState); } } void _onFilledFormEvent(PrayerRequestFilledFormEvent event, Emitter emit) { emit( PrayerRequestFilledFormState( oldRequest: state.request, email: event.email, prayer: event.prayer, name: event.name, ), ); print(state); } void _onFilledDateEvent(PrayerRequestFilledDateEvent event, Emitter emit) { emit( PrayerRequestFilledDateState( oldRequest: state.request, date: event.date, prayerType: event.prayerType, ), ); print(state); } void _onCompletedEvent(PrayerRequestCompletedEvent event, Emitter emit) { emit( PrayerRequestCompleteState( name: event.name, email: event.email, prayer: event.prayer, date: event.date, prayerType: event.prayerType, ), ); /// write request to back _repo.write(state.request!); } } ================================================ FILE: lib/src/prayers_intention/event.dart ================================================ part of 'prayer_request.dart'; abstract class PrayerRequestEvent {} class PrayerRequestInitializeEvent implements PrayerRequestEvent {} class PrayerRequestFilledFormEvent implements PrayerRequestEvent { const PrayerRequestFilledFormEvent({ required this.email, required this.prayer, this.name, }); final String email; final String prayer; final String? name; } class PrayerRequestFilledDateEvent implements PrayerRequestEvent { const PrayerRequestFilledDateEvent({ required this.date, required this.prayerType, }); final DateTime date; final PrayerType prayerType; } class PrayerRequestCompletedEvent implements PrayerRequestEvent { const PrayerRequestCompletedEvent({ required this.email, required this.prayer, this.name, required this.date, required this.prayerType, }); final String email; final String prayer; final String? name; final DateTime date; final PrayerType prayerType; } ================================================ FILE: lib/src/prayers_intention/model.dart ================================================ part of 'prayer_request.dart'; const option = [ "Messe", "Chapelet", "Vêpre", ]; enum PrayerType { mass, rosary, vesper, } extension PrayerTypeToString on PrayerType { static List getList(BuildContext context) { return [ AppLocalizations.of(context)!.choiceMass, AppLocalizations.of(context)!.choiceRosary, AppLocalizations.of(context)!.choiceVesper, ]; } String localizedToString(BuildContext context) { switch (this) { case PrayerType.mass: return AppLocalizations.of(context)!.choiceMass; case PrayerType.rosary: return AppLocalizations.of(context)!.choiceRosary; case PrayerType.vesper: return AppLocalizations.of(context)!.choiceVesper; default: return "$this"; } } String localizedToStringWithArticle(BuildContext context) { switch (this) { case PrayerType.mass: return AppLocalizations.of(context)!.mass; case PrayerType.rosary: return AppLocalizations.of(context)!.rosary; case PrayerType.vesper: return AppLocalizations.of(context)!.vesper; default: return "$this"; } } TimeOfDay get time { switch (this) { case PrayerType.mass: return const TimeOfDay( hour: 6, minute: 0, ); case PrayerType.rosary: return const TimeOfDay( hour: 11, minute: 45, ); case PrayerType.vesper: return const TimeOfDay( hour: 18, minute: 0, ); default: return const TimeOfDay( hour: 18, minute: 0, ); } } String get name { switch (this) { case PrayerType.rosary: return 'Rosary'; case PrayerType.mass: return 'Mass'; case PrayerType.vesper: return 'Vesper'; default: return '$this'; } } } class PrayerRequest { const PrayerRequest({ this.name, required this.email, required this.dateTime, required this.prayer, required this.prayerType, }); final String? name; final String email; final DateTime dateTime; final String prayer; final PrayerType prayerType; PrayerRequest copyWith({ String? name, String? email, DateTime? dateTime, String? prayer, PrayerType? prayerType, }) => PrayerRequest( email: email ?? this.email, dateTime: dateTime ?? this.dateTime, prayer: prayer ?? this.prayer, prayerType: prayerType ?? this.prayerType, name: name ?? this.name); @override String toString() => """ Request: { name: ${name ?? "null"}, email: $email, prayer: $prayer, date: ${dateTime.toLocal().toString()}, prayerType: $prayerType } """; Map toDoc() { return { 'name': name, 'email': email, 'prayer': prayer, 'date': dateTime, 'prayerType': prayerType.name, }; } factory PrayerRequest.fromDoc(Map doc) { return PrayerRequest( email: doc['email'], dateTime: doc['date'], prayer: doc['prayer'], prayerType: doc['prayerType'], name: doc['name'], ); } } ================================================ FILE: lib/src/prayers_intention/prayer_request.dart ================================================ import 'package:ahl/src/firebase_constants.dart'; import 'package:ahl/src/utils/breakpoint_resolver.dart'; import 'package:ahl/src/validation/email_validation.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:dotlottie_loader/dotlottie_loader.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:gap/gap.dart'; import 'package:lottie/lottie.dart'; import '../../ahl_barrel.dart'; import '../widgets/widgets.dart'; part 'view.dart'; part 'bloc.dart'; part 'model.dart'; part 'event.dart'; part 'state.dart'; part 'repository.dart'; ================================================ FILE: lib/src/prayers_intention/repository.dart ================================================ part of 'prayer_request.dart'; class PrayerRequestRepo { PrayerRequestRepo({required this.db}); FirebaseFirestore db; void write(PrayerRequest request) { /// updating setup Map data = { '${request.hashCode}': { 'id': request.hashCode, 'date': dayMonthYear(request.dateTime), 'prayerType': request.prayerType.name, }, }; /// saving prayer db.doc('$prayerRequestCollection/setup').set( data, SetOptions( merge: true, ), ); db .doc( '$prayerRequestCollection/${dayMonthYear(request.dateTime)}/${request.prayerType.name}/${request.hashCode}') .set( request.toDoc(), ); } /// Helper on dd-mm-yyyy date formatting String dayMonthYear(DateTime date) => '${date.day}-${date.month}-${date.year}'; //todo: add how to know all path mechanism List getPrayersWithDate( DateTime date, PrayerType prayerType, ) { db.collection( '$prayerRequestCollection/${date.day}-${date.month}-${date.year}/${prayerType.name}/'); return []; } } ================================================ FILE: lib/src/prayers_intention/state.dart ================================================ part of 'prayer_request.dart'; class PrayerRequestState implements Equatable { const PrayerRequestState({this.request, required this.currentStatus}); /// the prayer itself final PrayerRequest? request; /// status of the state final PrayerRequestStatus currentStatus; @override bool? get stringify => false; @override List get props => [currentStatus, request]; /// Create a copy of this state in a new object. PrayerRequestState copyWith({ PrayerRequest? request, PrayerRequestStatus? status, }) => PrayerRequestState( request: request ?? this.request, currentStatus: status ?? currentStatus, ); @override String toString() => """ Request: $request, currentStatus: $currentStatus, """; } class PrayerRequestInitialState extends PrayerRequestState { const PrayerRequestInitialState() : super(request: null, currentStatus: PrayerRequestStatus.initial); } class PrayerRequestCompleteState extends PrayerRequestState { PrayerRequestCompleteState({ required String email, required String prayer, String? name, required DateTime date, required PrayerType prayerType, }) : super( request: PrayerRequest( email: email, dateTime: date, prayer: prayer, prayerType: prayerType, name: name, ), currentStatus: PrayerRequestStatus.complete, ); } class PrayerRequestFilledDateState extends PrayerRequestState { PrayerRequestFilledDateState({ this.oldRequest, required DateTime date, required PrayerType prayerType, }) : super( request: PrayerRequest( name: oldRequest?.name, email: oldRequest?.email ?? 'email', dateTime: date, prayer: oldRequest?.prayer ?? "prayer", prayerType: prayerType, ), currentStatus: PrayerRequestStatus.filledDate); final PrayerRequest? oldRequest; } class PrayerRequestFilledFormState extends PrayerRequestState { PrayerRequestFilledFormState({ this.oldRequest, required String email, required String prayer, String? name, }) : super( request: PrayerRequest( name: name ?? oldRequest?.name, email: email, dateTime: oldRequest?.dateTime ?? DateTime.now(), prayer: prayer, prayerType: oldRequest?.prayerType ?? PrayerType.mass, ), currentStatus: PrayerRequestStatus.filledForm, ); final PrayerRequest? oldRequest; } // to be continued. // class Smthg extends Cubit { // Smthg() // : super( // PrayerRequest( // email: "email", // dateTime: DateTime.now(), // prayer: "prayer", // prayerType: PrayerType.mass, // ), // ); // void fillDate(DateTime time, PrayerType prayerType) // } ================================================ FILE: lib/src/prayers_intention/view.dart ================================================ part of 'prayer_request.dart'; const Color prayerIntentionTextColor = Colors.white; /// The route view to collect, setup date and confirm prayers /// request. /// /// This widget is an AnimatedSwitcher with 4 children. /// /// This class should be used under the bloc of managing it's state. /// /// [email],[dateTime],[prayer] and [prayerType] should be not null. // // todo: Change variable to a PrayerRequests model. class PrayersIntentionRequestView extends StatefulWidget { const PrayersIntentionRequestView({super.key}); @override State createState() => _PrayersIntentionRequestViewState(); } class _PrayersIntentionRequestViewState extends State with SingleTickerProviderStateMixin { late List views; late String? name; late String email; late DateTime dateTime; late String prayer; late PrayerType prayerType; late PageController _controller; late AnimationController lottieController; @override void initState() { views = [ PrayerCollectView( key: const ValueKey(1), callback: nextView, ), PrayerDateCollectionView( key: const ValueKey(2), callback: nextView, backCallback: previousView, ), ReviewPrayerView( backCallback: previousView, callback: nextView, ), FormsLayoutBase( child: Container( alignment: Alignment.center, child: DotLottieLoader.fromAsset( AhlAssets.doneAnimation, frameBuilder: (BuildContext ctx, DotLottie? dotlottie) { if (dotlottie != null) { return Lottie.memory( dotlottie.animations.values.single, controller: lottieController, onLoaded: (p0) => lottieController.forward(), ); } else { return Container( ); } }, ), ), ), ]; _controller = PageController( keepPage: true, ); lottieController = AnimationController(vsync: this, duration: const Duration(seconds: 3)) ..addListener( () { if (lottieController.status == AnimationStatus.completed) { _controller.jumpToPage(0); // duration: duration, curve: Curves.easeIn); lottieController.reset(); } }, ); super.initState(); } @override void dispose() { lottieController.dispose(); super.dispose(); } // // todo: change to 0 after building dateView view final duration = Durations.medium2; final curvesIn = Curves.easeIn; final curvesOut = Curves.easeOut; void _submitPrayer() => setState( () { _controller.animateToPage( 0, duration: duration, curve: curvesIn, ); }, ); void nextView() => setState( () { _controller.nextPage( duration: duration, curve: curvesIn, ); }, ); void previousView() => setState(() { _controller.previousPage( duration: duration, curve: curvesIn, ); }); // test to setup animation // final bool _isGoingForward = true; @override Widget build(BuildContext context) { return BlocProvider( create: (context) => PrayerRequestBloc( PrayerRequestRepo( db: firestore, ), ), lazy: true, child: LayoutBuilder( builder: (context, constraints) => ConstrainedBox( constraints: BoxConstraints( maxWidth: MediaQuery.sizeOf(context).width, maxHeight: (MediaQuery.of(context).size.width < ScreenSizes.extraLarge) ? 990 : 747, ), child: PageView( controller: _controller, allowImplicitScrolling: false, physics: const NeverScrollableScrollPhysics(), scrollDirection: Axis.horizontal, children: views, ), ), ), ); } } class PrayerDateCollectionView extends StatefulWidget { const PrayerDateCollectionView({ super.key, void Function()? callback, void Function()? backCallback, }) : _callback = callback, _backCallback = backCallback; final void Function()? _callback; final void Function()? _backCallback; @override State createState() => _PrayerDateCollectionViewState(); } class _PrayerDateCollectionViewState extends State { final DateTime firstDate = DateTime.now(); final DateTime lastDate = DateTime.now().add(const Duration(days: 365)); late DateTime _date; final _option = PrayerType.values; late Set selected; void _onSelectionChange(Set p0) { setState( () => selected = p0, ); } late PrayerRequest? _request; @override void initState() { super.initState(); /// get the PrayerRequest object from the bloc _request = context.read().state.request; selected = {_request?.prayerType ?? _option[2]}; _date = _request?.dateTime ?? DateTime.now(); } @override Widget build(BuildContext context) { Axis direction = (MediaQuery.of(context).size.width > ScreenSizes.extraLarge) ? Axis.horizontal : Axis.vertical; final Widget child = LayoutBuilder( builder: (context, constraints) => ConstrainedBox( constraints: constraints, child: Flex( direction: direction, children: [ Flexible( // flex: 2, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ // Flexible( // flex: 2, // child: prayerDecorationImage, // ), Flexible( // flex: 1, child: title, ), // Flexible( // // flex: 1, // child: Container( // alignment: Alignment.centerLeft, // height: 350, // child: Text( // "${context.read().state.request?.prayer}", // style: resolveBodyTextThemeForBreakPoints( // MediaQuery.of(context).size.width, context)?.copyWith(color: Theme.of(context).colorScheme.onPrimary,), // ), // ), // ), // Flexible( // flex: 1, // child: DefaultTextStyle( // style: Theme.of(context).textTheme.labelLarge!, // child: (context.read().state.request != // null) // ? (context // .read() // .state // .request! // .name != // null) // ? Text( // AppLocalizations.of(context)!.priersOf( // context // .read() // .state // .request! // .name!, // context // .read() // .state // .request! // .email, // ), // style: , // ) // : Text(context // .read() // .state // .request! // .email) // : Container(), // ), // ), ], ), ), // const Gap(Paddings.big), Flexible( flex: (direction == Axis.vertical) ? 3 : 2, child: Column( mainAxisSize: MainAxisSize.max, children: [ Flexible( child: Container( margin: const EdgeInsets.only(top: Paddings.listSeparator), padding: //(constraints.maxWidth > ScreenSizes.mobile) // ? const EdgeInsets.all(Margins.medium), //: const EdgeInsets.all(Margins.mobileSmall), decoration: BoxDecoration( color: Theme.of(context).colorScheme.surface, borderRadius: BorderRadius.circular(BorderSizes.big), ), child: Column( children: [ Container( alignment: Alignment.centerLeft, padding: const EdgeInsets.only( bottom: Paddings.listSeparator, ), child: Text( AppLocalizations.of(context)!.whenWePray, style: Theme.of(context).textTheme.headlineSmall, ), ), Padding( padding: const EdgeInsets.only( bottom: Paddings.listSeparator, ), child: FittedBox( fit: BoxFit.contain, child: SegmentedButton( style: ButtonStyle( backgroundColor: WidgetStateProperty.resolveWith( (states) { if (states .contains(WidgetState.selected)) { return Theme.of(context) .colorScheme .secondaryContainer; } return null; // Use default button color }, ), visualDensity: VisualDensity.comfortable, ), onSelectionChanged: _onSelectionChange, showSelectedIcon: true, selected: selected, multiSelectionEnabled: false, selectedIcon: const Icon(Icons.done) .animate() .scale( duration: AhlDurations.subtle, alignment: Alignment.center, curve: Curves.easeOut, begin: const Offset(0.7, 0.7), end: const Offset(1.0, 1.0), ) .rotate(begin: 1.1, end: 1), segments: List.generate( _option.length, (index) => ButtonSegment( label: Container( alignment: Alignment.center, width: 60, child: Text( _option[index] .localizedToString(context), ), ), value: _option[index], ), ), ), ), ), Container( alignment: Alignment.centerLeft, padding: const EdgeInsets.only( bottom: Paddings.listSeparator, ), child: const Text("Choisir la date:"), ), Flexible( child: Container( padding: const EdgeInsets.only( bottom: Paddings.listSeparator, ), decoration: BoxDecoration( color: const Color(0xFFF7EFD4), borderRadius: BorderRadius.circular( BorderSizes.big - Paddings.listSeparator), ), child: CalendarDatePicker( initialCalendarMode: DatePickerMode.day, currentDate: DateTime.now(), onDateChanged: (value) { _date = value; }, initialDate: _date, firstDate: firstDate, lastDate: lastDate, ), ), ), ], ), ), ), Container( padding: const EdgeInsets.symmetric( vertical: Paddings.listSeparator, ), child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ IconButton( onPressed: widget._backCallback, icon: const Icon(Icons.arrow_back)), ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).colorScheme.primary, foregroundColor: Theme.of(context).colorScheme.onPrimary, ), onPressed: () { context.read().add( PrayerRequestFilledDateEvent( date: _date.copyWith( hour: selected.first.time.hour, minute: selected.first.time.minute, ), prayerType: selected.first, ), ); // execute callback or nothing Function fun = widget._callback ?? () {}; fun(); }, child: const Text("Suivant"), ), ], ), ), ], ), ), ], ), ), ); return FormsLayoutBase(child: child); } } class PrayerCollectView extends StatefulWidget { const PrayerCollectView({super.key, Function? callback}) : _callback = callback; final Function? _callback; @override State createState() => _PrayerCollectViewState(); } class _PrayerCollectViewState extends State { final TextEditingController _email = TextEditingController(); final TextEditingController _name = TextEditingController(); final TextEditingController _prayer = TextEditingController(); late final GlobalKey _formKey; PrayerRequest? _request; @override void initState() { _formKey = GlobalKey(debugLabel: toString()); super.initState(); try { _request = context.read().state.request; } catch (e) { _request = PrayerRequest( name: "Unknown", email: "", prayer: "(vide)", dateTime: DateTime.now(), prayerType: PrayerType.rosary, ); } _name.text = _request?.name ?? ""; _email.text = _request?.email ?? ""; _prayer.text = _request?.prayer ?? ""; } @override Widget build(BuildContext context) { Axis direction = (MediaQuery.of(context).size.width > ScreenSizes.extraLarge) ? Axis.horizontal : Axis.vertical; final Widget child = Form( key: _formKey, child: Flex( direction: direction, children: [ Flexible( flex: 3, fit: FlexFit.tight, child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.start, children: [ Flexible( flex: 2, child: prayerDecorationImage, ), const Gap(Margins.large), Flexible( // flex: 1, child: title, ), const Gap(Margins.large), Container( alignment: Alignment.centerLeft, // padding: const EdgeInsets.only( // top: Paddings.big, bottom: Paddings.listSeparator), child: Text( AppLocalizations.of(context)!.proverb, style: Theme.of(context).textTheme.labelLarge!.copyWith( color: prayerIntentionTextColor, fontStyle: FontStyle.italic, ), ), ), const Gap(Margins.large), Flexible( // flex: 1, child: Align( alignment: Alignment.topLeft, child: Text( AppLocalizations.of(context)!.priersInvitation, style: Theme.of(context) .textTheme .bodyMedium ?.copyWith(color: prayerIntentionTextColor), ), ), ), const Gap(Margins.large), ], ), ), // const Gap(Paddings.big), Flexible( flex: 3, child: Column( mainAxisSize: MainAxisSize.max, children: [ Flexible( flex: 1, child: Container( // margin: const EdgeInsets.symmetric(vertical: Paddings.big), padding: const EdgeInsets.all(Paddings.medium), decoration: BoxDecoration( color: Theme.of(context).colorScheme.surface, borderRadius: BorderRadius.circular(BorderSizes.small), ), child: Column( mainAxisSize: MainAxisSize.min, children: [ Align( alignment: Alignment.centerLeft, child: Text( AppLocalizations.of(context)! .prayerRequestInvitation, style: Theme.of(context).textTheme.titleSmall, ), ), //name and First name Padding( padding: const EdgeInsets.symmetric( vertical: Paddings.listSeparator), /// Name child: TextFormField( controller: _name, decoration: InputDecoration( helperText: AppLocalizations.of(context)!.optional, label: Text(AppLocalizations.of(context)! .nameAndFirstName), ), ), ), /// Email Padding( padding: const EdgeInsets.only( bottom: Paddings.listSeparator), child: TextFormField( controller: _email, decoration: const InputDecoration( label: Text("Email*"), ), validator: (value) { if (!isValidEmail(value ?? "")) { return AppLocalizations.of(context)! .invalidEmail; } return null; }, ), ), /// Prayer Flexible( child: TextFormField( // minLines: 5, maxLines: 10, controller: _prayer, // maxLines: 3, decoration: InputDecoration( // constraints: const BoxConstraints(minHeight: 250), label: Text( "${AppLocalizations.of(context)!.priers}*"), hintText: AppLocalizations.of(context)!.yourPrayer, ), validator: (value) { if (value == null || value == "") { return AppLocalizations.of(context)! .cantBeEmpty; } return null; }, ), ), ], ), ), ), const Gap(45), /// Buttons Container( alignment: Alignment.centerRight, // padding: const EdgeInsets.only(bottom: Paddings.listSeparator), child: ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).colorScheme.secondary, foregroundColor: Theme.of(context).colorScheme.onSurface, ), onPressed: () { if (_formKey.currentState!.validate()) { trySnack(() { // execute callback or nothing if (widget._callback != null) widget._callback!(); context.read().add( PrayerRequestFilledFormEvent( name: _name.value.text, email: _email.value.text, prayer: _prayer.value.text, ), ); }, context); } }, child: Text(AppLocalizations.of(context)!.sendPray), ), ), ], ), ), ], ), ); return FormsLayoutBase( child: child, ); } } /// Prayer request confirmation page. class ReviewPrayerView extends StatefulWidget { const ReviewPrayerView({ super.key, VoidCallback? callback, VoidCallback? backCallback, }) : _callback = callback, _backCallback = backCallback; /// callback final VoidCallback? _callback; /// back callback final VoidCallback? _backCallback; @override State createState() => _ReviewPrayerState(); } class _ReviewPrayerState extends State { @override Widget build(BuildContext context) { PrayerRequest? request = context.watch().state.request; Widget contentView = Container( padding: const EdgeInsets.all(Margins.medium), decoration: BoxDecoration( color: Theme.of(context).colorScheme.surface, borderRadius: BorderRadius.circular(38), ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ if (request?.name != null) FittedBox( fit: BoxFit.scaleDown, child: Text( "${request?.name},", style: const TextStyle( fontFamily: 'Aileron', fontWeight: FontWeight.w600, fontSize: 36, ), ), ), Text(AppLocalizations.of(context)!.wePrayOn), InkWell( splashFactory: InkRipple.splashFactory, canRequestFocus: true, enableFeedback: true, onTap: widget._backCallback, child: request != null ? Text( AppLocalizations.of(context)!.prayingDate( request.prayerType.localizedToStringWithArticle(context), request.dateTime, request.dateTime, ), style: TextStyle( fontFamily: 'Aileron', fontWeight: FontWeight.bold, color: Theme.of(context).primaryColor, fontSize: 26, ), ) : const SizedBox.shrink(), ), Padding( padding: const EdgeInsets.symmetric(vertical: Paddings.listSeparator), child: Text( "\"${request?.prayer}\"", style: const TextStyle( fontStyle: FontStyle.italic, fontWeight: FontWeight.bold, ), ), ), Text( "-${request?.email}", style: Theme.of(context).textTheme.labelSmall, ), Container( padding: const EdgeInsets.symmetric( vertical: Paddings.listSeparator, ), child: Row( mainAxisAlignment: MainAxisAlignment.end, children: [ TextButton.icon( onPressed: widget._backCallback, label: const Text("Modifier"), icon: const Icon(Icons.arrow_back), ), ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).colorScheme.primary, foregroundColor: Theme.of(context).colorScheme.onPrimary, ), onPressed: (request != null) ? () { context.read().add( PrayerRequestCompletedEvent( name: request.name, email: request.email, prayer: request.prayer, date: request.dateTime, prayerType: request.prayerType, ), ); context .read() .add(PrayerRequestInitializeEvent()); if (widget._callback != null) widget._callback!(); } : null, child: const Text("Confirmer"), ), ], ), ) ], ), ); Widget child = Column( children: [ Flexible( flex: 2, child: prayerDecorationImage, ), contentView, ], ); return FormsLayoutBase(child: child); } } /// Title of the prayer request prompt. final Widget title = Builder( builder: (context) => Text( AppLocalizations.of(context)!.priesIntention, style: Theme.of(context).textTheme.headlineLarge!.copyWith( color: prayerIntentionTextColor, ), ), ); Widget prayerDecorationImage = Container( // width: 215, // height: 141, decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.contain, image: AssetImage( AhlAssets.praying, ), ), ), ); void trySnack( Function fun, BuildContext context, { String message = "Erreur Server. Recharger la page!", }) { try { fun(); } catch (e) { ScaffoldMessenger.of(context).showSnackBar( SnackBar( action: SnackBarAction( label: 'Close', onPressed: () {}, ), content: Text( message, style: Theme.of(context).textTheme.labelLarge!.copyWith( color: Theme.of(context).colorScheme.error, ), ), ), ); } } ================================================ FILE: lib/src/prayers_space/view.dart ================================================ import 'package:ahl/src/rosary/rosary.dart'; import 'package:ahl/src/utils/breakpoint_resolver.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:gap/gap.dart'; import '../../ahl_barrel.dart'; import '../widgets/widgets.dart'; import '../prayers_intention/prayer_request.dart'; // import 'package:ahl/src/prayers_intention/prayers_intention.dart'; class PrayerSpaceView extends StatelessWidget { const PrayerSpaceView({super.key}); static void showAvailableSoonSnackBar(BuildContext context) { ScaffoldMessenger.maybeOf(context)?.showSnackBar( SnackBar( backgroundColor: Theme.of(context).colorScheme.tertiaryContainer, content: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Text( AppLocalizations.of(context)!.availableSoon, style: Theme.of(context).textTheme.labelLarge!.copyWith( color: Theme.of(context).colorScheme.onTertiaryContainer, ), ), IconButton( onPressed: () => ScaffoldMessenger.of(context).clearSnackBars(), icon: Icon( Icons.close_rounded, color: Theme.of(context).colorScheme.onTertiaryContainer, ), ), ], ), ), ); } static final saintCard = Builder( builder: (context) => Padding( padding: const EdgeInsets.all(Paddings.big), child: PromptCard( callback: () => showAvailableSoonSnackBar(context), backgroundImage: AssetImage( AhlAssets.heroBkAlt, ), title: Text( AppLocalizations.of(context)!.todaySaint, ), subtitle: Text( AppLocalizations.of(context)!.availableSoon, ), ), ), ); static final officeCard = Builder( builder: (context) => Padding( padding: const EdgeInsets.all(Paddings.big), child: PromptCard( callback: () => showAvailableSoonSnackBar(context), backgroundImage: AssetImage( AhlAssets.heroBkAlt, ), title: Text( AppLocalizations.of(context)!.office, ), subtitle: Text( AppLocalizations.of(context)!.availableSoon, ), ), ), ); @override Widget build(BuildContext context) { final List children = [ Gap(resolveSeparatorSize(context)), // title SectionTitle( title: AppLocalizations.of(context)!.priesSpace, ), Wrap( alignment: WrapAlignment.center, direction: Axis.horizontal, children: [ // rosary const Padding( padding: EdgeInsets.all(Paddings.big), child: RosaryPrompt(), ), saintCard, officeCard, const SizedBox( height: 45, ), ], ), // prayers intention const Align( alignment: Alignment.bottomCenter, child: PrayersIntentionRequestView(), ), ]; return SpaceView( useGradient: false, headerImage: AssetImage( AhlAssets.prayersSpaceCover, ), children: children, ); } } ================================================ FILE: lib/src/project_space/bloc.dart ================================================ import 'package:firebase_article/firebase_article.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'dart:developer' as developer; import '../article_view/event/event.dart'; import '../article_view/state/state.dart'; class ProjectBloc extends Bloc> { ProjectBloc({ required FirebaseFirestore firebaseFirestore, String collection = 'projects', }) : _repo = ArticlesRepository
( firestoreInstance: firebaseFirestore, collection: collection, ), super( const ArticleState
( status: ArticleStatus.initial, error: null, ), ) { on(_onGetArticleById); on(_onGetHighlightedArticle); on(_onGetArticleListEvent); on(_onInitializeArticleBlocEvent); add(InitializeArticleBlocEvent()); } final ArticlesRepository
_repo; void _onInitializeArticleBlocEvent( InitializeArticleBlocEvent event, Emitter emit, ) { emit( state.copyWith( status: ArticleStatus.initial, error: null, ), ); } void _onGetArticleById(GetArticleByIdEvent event, Emitter emit) async { Object? error; Article? result; emit( state.copyWith(status: ArticleStatus.initial,) ); try { result = await _repo.getArticleById(articleId: event.id!) as Article; } catch (e) { error = e; } if (result != null) { emit( state.copyWith( status: ArticleStatus.succeed, articles: {event.id!: result}, error: null, ), ); } else { emit( state.copyWith( status: ArticleStatus.failed, articles: null, error: error, ), ); } } void _onGetHighlightedArticle( GetHighlightArticleEvent event, Emitter emit) async { Object? error; Article? result; try { result = await _repo.getHighlighted(); if (result != null) { emit( state.copyWith( status: ArticleStatus.succeed, articles: { "highLight": result, result.id: result, }, error: null, highlightArticle: result, ), ); developer.log('[ProjectBloc]: state: $state'); } } catch (e) { error = 'Error getting highlight article : $e'; if (result == null) { emit(state.copyWith( status: ArticleStatus.failed, error: error, articles: null, // highlightArticle: null, )); } } finally {} } void _onGetArticleListEvent(GetArticleListEvent event, Emitter emit) async { try { List
? articles; if (event.ids != null) { developer.log('[ProjectBlocEvent] : ${event.ids}'); articles = await _repo.getArticlesSubListByIds(event.ids!) as List
; } if (event.foldLength != null) { developer.log('[ProjectBlocEvent] : ${event.foldLength}'); articles = await _repo.getArticlesSubListByLength(event.foldLength!) as List
; } // build map articles Map? mapArticles = (articles != null) ? {for (var article in articles) article.id: article} : null; emit( state.copyWith( articles: mapArticles, status: ArticleStatus.succeed, error: null), ); } catch (e) { developer.log('[ProjectBloc] Error getting article list: $e'); } } } ================================================ FILE: lib/src/project_space/model.dart ================================================ import 'package:firebase_article/firebase_article.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; class Project extends Article { Project({ required super.id, required super.title, super.contentPath, super.relations, super.releaseDate, }); String? get status { return relations?[0]['status']; } } extension LocalizedProject on Project { static String? getProjectStatus(BuildContext context, String projectStatus) { switch (projectStatus) { case "inProgress": return AppLocalizations.of(context)?.inProgress; case "waitingBudget": return AppLocalizations.of(context)?.waitingBudget; case "done": return AppLocalizations.of(context)?.done; default: return ""; } } } ================================================ FILE: lib/src/project_space/view.dart ================================================ import 'dart:developer'; import 'dart:typed_data'; import 'package:ahl/src/article_view/event/event.dart'; import 'package:ahl/src/pages/homepage/donation/donation_page.dart'; import 'package:ahl/src/pages/projects/projects_page.dart'; import 'package:ahl/src/project_space/bloc.dart'; import 'package:ahl/src/utils/storage_utils.dart'; import 'package:firebase_article/firebase_article.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'dart:developer' as developer; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:go_router/go_router.dart'; import 'package:session_storage/session_storage.dart'; import '../../ahl_barrel.dart'; import '../article_view/state/state.dart'; import '../theme/theme.dart'; import '../widgets/widgets.dart'; import 'model.dart'; class ProjectsSpaceView extends StatefulWidget { const ProjectsSpaceView({super.key}); @override State createState() => _ProjectsSpaceViewState(); } class _ProjectsSpaceViewState extends State with AutomaticKeepAliveClientMixin { List storageUtils = []; late List futureImageCovers; ArticleState
? state; Map? projects; final SessionStorage _cache = SessionStorage(); final String _projectsCardsKey = '_ProjectCardsKey'; @override void initState() { super.initState(); final ProjectBloc bloc = context.read(); // Listen for state changes bloc.stream.listen( (incomingState) { updateState( incomingState, ); }, ); // Fetch the initial project list bloc.add(const GetArticleListEvent(foldLength: 3)); // Initialize state state = bloc.state; updateState(state!); } void updateState(ArticleState
incomingState) { setState( () { state = incomingState; projects = state?.articles; /// Build firebase storage utils for each project. if (projects != null) { for (var project in projects!.values) { storageUtils.add( ArticleStorageUtils( article: project!, collection: 'projects', ), ); } } /// Launch get image for each of the Storage utils. if (storageUtils.isNotEmpty) { futureImageCovers = storageUtils .map( (element) => element.getCoverImage(), ) .toList(); } }, ); developer.log('state in projects has changed: $incomingState'); } @override bool get wantKeepAlive { if (_cache[_projectsCardsKey] != null && _cache[_projectsCardsKey] == "true") { return true; } else { return false; } } @override Widget build(BuildContext context) { super.build(context); if (state == null) { return const Padding( padding: EdgeInsets.symmetric(vertical: Paddings.big), child: LinearProgressIndicator(), ); } // Transform project list into widgets final projectCards = buildProjectCards(state?.articles?.values.toList()); return SpaceView( useGradient: false, // headerImage: AssetImage(AhlAssets.projectSpaceCover), children: [ // Title SectionTitle( titleColor: AhlTheme.blackCharcoal, title: AppLocalizations.of(context)!.projectsSpace, subtitle: AppLocalizations.of(context)!.projectsSpaceSubtitle, ), // Introduction Container( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), ), padding: const EdgeInsets.all(Paddings.medium), child: Text( AppLocalizations.of(context)!.projectsSpaceIntroduction, ), ), // Projects Carousel Wrap( alignment: WrapAlignment.center, direction: Axis.horizontal, runSpacing: Paddings.listSeparator, spacing: Paddings.listSeparator, children: projectCards, ), // Buttons Padding( padding: const EdgeInsets.symmetric( horizontal: 8.0, // vertical: Paddings.huge, ).copyWith(top: Paddings.huge), child: Wrap( alignment: WrapAlignment.center, crossAxisAlignment: WrapCrossAlignment.center, runAlignment: WrapAlignment.center, direction: Axis.horizontal, spacing: 20, runSpacing: 20, children: [ TextButton( onPressed: () { context.goNamed( DonationPage.routeName, ); }, child: Text(AppLocalizations.of(context)!.supportProject), ), const SizedBox(width: Paddings.listSeparator), ElevatedButton( style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).colorScheme.primary, foregroundColor: Theme.of(context).colorScheme.onPrimary, ), onPressed: () { context.goNamed(ProjectsPage.routeName); }, child: Text(AppLocalizations.of(context)!.allProjects), ), ], ), ), ], ); } Widget buildCard(BuildContext context, Uint8List imageData, Article project) { return AhlCard( callback: () { // Navigator.push( // context, // MaterialPageRoute( // builder: (context) => ProjectPageView( // collection: projectsCollection, // project: project, // ), // ), // ); context.go( "/${ProjectsPage.routeName}/${project.id}", ); log("${project.contentPath}"); }, image: Container( // margin: const EdgeInsets.all(Paddings.medium), decoration: BoxDecoration( image: DecorationImage( image: MemoryImage(imageData), fit: BoxFit.cover, ), borderRadius: BorderRadius.circular(BorderSizes.small), ), ), label: Text( LocalizedProject.getProjectStatus( context, "${project.relations?[0]['status']}") ?? "", ), title: Text( "${project.title}", ), ); } List buildProjectCards(List? projects) { _cache[_projectsCardsKey] = "true"; return (projects != null) ? projects.map((project) { if (project != null) { final futureImageCover = futureImageCovers[projects.indexOf(project)]; return FutureBuilder( future: futureImageCover, builder: (context, snapshot) { if (snapshot.hasData) { return buildCard( context, snapshot.data!, project, ); } else { return Container( height: 250, width: 270, alignment: Alignment.center, child: const CircularProgressIndicator(), ); } }, ); } else { return const SizedBox.shrink(); } }).toList() : []; // } else { // return projects!.map( // (project) { // final storageUtil = storageUtils?[projects.indexOf(project)]; // return buildCard( // context, // decodeUint8ListFromString( // storageUtil!.cache[storageUtil.coverImageDataKey]!, // ), // project!); // }, // ).toList(); // } } } class ProjectsCarousel extends StatefulWidget { const ProjectsCarousel({ super.key, required this.children, }); final List children; @override State createState() => _ProjectsCarouselState(); } class _ProjectsCarouselState extends State { late PageController _pageController; late ScrollController _listController; late int _currentIndex; // final int _opacity = 0x25; bool _isHovered = false; @override void initState() { super.initState(); _pageController = PageController( keepPage: true, ); _listController = ScrollController(); _currentIndex = 0; } void updateCurrentIndex(int value) { int oldIndex = _currentIndex; print('{list} Current old: $oldIndex'); setState(() { _currentIndex = value % widget.children.length; developer.log('Screen size: ${MediaQuery.of(context).size.width}'); }); if (MediaQuery.of(context).size.width <= ScreenSizes.small) { print('{page}Current Index: $_currentIndex'); _pageController.animateToPage( _currentIndex, duration: const Duration(milliseconds: 300), curve: Curves.easeInOutBack, ); } else { print('{list} Current Index: $_currentIndex'); _listController.animateTo( 350.0 * (_currentIndex - oldIndex), duration: const Duration(milliseconds: 300), curve: Curves.easeInOutBack, ); } } @override void dispose() { _pageController.dispose(); _listController.dispose(); super.dispose(); } void isHovered(bool isHovered) { setState( () => _isHovered = isHovered, ); } @override Widget build(BuildContext context) { return ConstrainedBox( constraints: const BoxConstraints(maxHeight: 493 + 15 * 2 + 10), child: Stack( children: [ Column( mainAxisSize: MainAxisSize.min, children: [ Flexible( child: ConstrainedBox( constraints: BoxConstraints.loose( const Size.fromHeight(493), ), child: (MediaQuery.of(context).size.width <= ScreenSizes.small) ? PageView( controller: _pageController, onPageChanged: (value) => updateCurrentIndex(value), children: widget.children, ) : ListView( controller: _listController, scrollDirection: Axis.horizontal, shrinkWrap: false, children: widget.children, ), ), ), Padding( padding: const EdgeInsets.symmetric( vertical: Paddings.listSeparator), child: CustomPageIndicator( pageCount: widget.children.length, currentIndex: _currentIndex, ), ) ], ), Align( alignment: Alignment.centerLeft, child: InkWell( onTap: () { updateCurrentIndex(_currentIndex - 1); }, onHover: isHovered, child: AnimatedContainer( duration: const Duration(milliseconds: 300), color: Theme.of(context).colorScheme.secondaryContainer.withAlpha( _isHovered ? 0xAA : 0x25, ), child: const Icon( Icons.keyboard_arrow_left, size: 48, ), ), ), ), Align( alignment: Alignment.centerRight, child: InkWell( onTap: () { updateCurrentIndex(_currentIndex + 1); }, onHover: isHovered, child: AnimatedContainer( duration: const Duration(milliseconds: 300), color: Theme.of(context).colorScheme.secondaryContainer.withAlpha( _isHovered ? 0xAA : 0x25, ), child: const Icon( Icons.keyboard_arrow_right, size: 48, ), ), ), ), ], ), ); } } class AhlCard extends StatefulWidget { const AhlCard({ super.key, this.constraints, this.outerDecoration, required this.image, this.title, this.label, this.description, this.content, this.callback, }); final BoxConstraints? constraints; final BoxDecoration? outerDecoration; final Widget image; final Widget? title; final Widget? label; final Widget? description; final VoidCallback? callback; /// if [content] is provided then [title], [label] and [description] is omitted. final Widget? content; @override State createState() => _AhlCardState(); } class _AhlCardState extends State with SingleTickerProviderStateMixin { bool _isHovered = false; late AnimationController animation; @override void initState() { super.initState(); animation = AnimationController(vsync: this); } void setHoveringTo(bool isHovered) { setState( () => _isHovered = isHovered, ); if (isHovered) { animation.forward(); } else { animation.reverse(); } } @override void dispose() { animation.dispose(); super.dispose(); } @override Widget build(BuildContext context) { // double borderThickness = _isHovered ? 5 : 3; BorderRadius borderRadius = BorderRadius.circular(BorderSizes.big); return LayoutBuilder( builder: (context, constraints) => Container( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), ), padding: const EdgeInsets.all(Paddings.medium), child: Material( clipBehavior: Clip.antiAliasWithSaveLayer, borderOnForeground: true, borderRadius: borderRadius, child: InkWell( onHover: (value) { setHoveringTo(value); }, onTap: () { // Implement navigation to article view if (widget.callback != null) widget.callback!(); }, child: AnimatedContainer( duration: const Duration(milliseconds: 300), curve: Curves.easeInOut, clipBehavior: Clip.hardEdge, constraints: widget.constraints ?? const BoxConstraints( maxHeight: 270, maxWidth: 278, ), decoration: widget.outerDecoration ?? BoxDecoration( border: Border.all( strokeAlign: BorderSide.strokeAlignInside, width: 3, //borderThickness, color: _isHovered ? Theme.of(context).primaryColor : AhlTheme.lightGrey, style: BorderStyle.solid, ), borderRadius: borderRadius, ), child: ConstrainedBox( constraints: const BoxConstraints(maxHeight: 770), child: Column( mainAxisSize: MainAxisSize.min, children: [ Flexible( child: Container( margin: const EdgeInsets.all(Paddings.medium), clipBehavior: Clip.antiAlias, decoration: BoxDecoration( // image: DecorationImage( // image: MemoryImage(snapshot.data!), // fit: BoxFit.cover, // ), borderRadius: BorderRadius.circular(BorderSizes.small), ), child: widget.image .animate(controller: animation, autoPlay: false) .scale( begin: const Offset(1, 1), end: const Offset(1.25, 1.25), ), ), ), widget.content ?? Container( // constraints: const BoxConstraints.expand(height: 100), padding: const EdgeInsets.all( Paddings.medium, ), alignment: Alignment.centerLeft, child: Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ /// Label DefaultTextStyle( style: Theme.of(context) .textTheme .labelMedium! .copyWith( overflow: TextOverflow.ellipsis, ), child: widget.label ?? const SizedBox.shrink()), /// title DefaultTextStyle( style: Theme.of(context) .textTheme .headlineMedium! .copyWith( overflow: TextOverflow.ellipsis, ), child: widget.title ?? const SizedBox.shrink(), ), /// Description DefaultTextStyle( style: Theme.of(context) .textTheme .bodyMedium! .copyWith( overflow: TextOverflow.ellipsis, ), child: widget.description ?? const SizedBox.shrink(), ), ], ), ), ], ), ), ), ), ), ), ); } } class CustomPageIndicator extends StatefulWidget { final int pageCount; final int currentIndex; const CustomPageIndicator( {super.key, required this.pageCount, required this.currentIndex}); @override _CustomPageIndicatorState createState() => _CustomPageIndicatorState(); } class _CustomPageIndicatorState extends State { @override Widget build(BuildContext context) { return Row( mainAxisAlignment: MainAxisAlignment.center, children: List.generate(widget.pageCount, (index) => _buildDot(index)), ); } Widget _buildDot(int index) { return AnimatedContainer( duration: const Duration(milliseconds: 200), curve: Curves.easeInOutBack, margin: const EdgeInsets.symmetric(horizontal: Margins.small), decoration: BoxDecoration( color: index == widget.currentIndex ? Theme.of(context).colorScheme.secondary : Colors.grey, borderRadius: BorderRadius.circular(4), ), width: index == widget.currentIndex ? 30.0 : 8.0, height: 8.0, ); } } ================================================ FILE: lib/src/rosary/rosary.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:go_router/go_router.dart'; import '../pages/rosary/rosary_page.dart'; import '../widgets/widgets.dart'; import '../../ahl_barrel.dart'; part 'rosary_prompt.dart'; ================================================ FILE: lib/src/rosary/rosary_prompt.dart ================================================ part of 'rosary.dart'; class RosaryPrompt extends StatelessWidget { const RosaryPrompt({super.key}); @override Widget build(BuildContext context) { // todo: make it dynamic image with storage // final Reference imageRef = // storage.child('/static/sj.jpg'); // final imageUrl = imageRef.getDownloadURL(); // var image = imageRef.getData(); return PromptCard( callback: () => context.goNamed(RosaryPage.routeName), backgroundImage: AssetImage( AhlAssets.rosaryHeroHeader, ), title: Text( AppLocalizations.of(context)!.todaysRosary, ), subtitle: Text( AppLocalizations.of(context)!.rosarySlogan, ), ); } } ================================================ FILE: lib/src/sample_feature/sample_item.dart ================================================ /// A placeholder class that represents an entity or model. class SampleItem { const SampleItem(this.id); final int id; } ================================================ FILE: lib/src/sample_feature/sample_item_details_view.dart ================================================ import 'package:flutter/material.dart'; /// Displays detailed information about a SampleItem. class SampleItemDetailsView extends StatelessWidget { const SampleItemDetailsView({super.key}); static const routeName = '/sample_item'; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Item Details'), ), body: const Center( child: Text('More Information Here'), ), ); } } ================================================ FILE: lib/src/sample_feature/sample_item_list_view.dart ================================================ import 'package:flutter/material.dart'; import '../settings/settings_view.dart'; import 'sample_item.dart'; import 'sample_item_details_view.dart'; /// Displays a list of SampleItems. class SampleItemListView extends StatelessWidget { const SampleItemListView({ super.key, this.items = const [SampleItem(1), SampleItem(2), SampleItem(3)], }); static const routeName = '/'; final List items; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Sample Items'), actions: [ IconButton( icon: const Icon(Icons.settings), onPressed: () { // Navigate to the settings page. If the user leaves and returns // to the app after it has been killed while running in the // background, the navigation stack is restored. Navigator.restorablePushNamed(context, SettingsView.routeName); }, ), ], ), // To work with lists that may contain a large number of items, it’s best // to use the ListView.builder constructor. // // In contrast to the default ListView constructor, which requires // building all Widgets up front, the ListView.builder constructor lazily // builds Widgets as they’re scrolled into view. body: ListView.builder( // Providing a restorationId allows the ListView to restore the // scroll position when a user leaves and returns to the app after it // has been killed while running in the background. restorationId: 'sampleItemListView', itemCount: items.length, itemBuilder: (BuildContext context, int index) { final item = items[index]; return ListTile( title: Text('SampleItem ${item.id}'), leading: const CircleAvatar( // Display the Flutter Logo image asset. foregroundImage: AssetImage('assets/images/flutter_logo.png'), ), onTap: () { // Navigate to the details page. If the user leaves and returns to // the app after it has been killed while running in the // background, the navigation stack is restored. Navigator.restorablePushNamed( context, SampleItemDetailsView.routeName, ); } ); }, ), ); } } ================================================ FILE: lib/src/settings/settings_controller.dart ================================================ import 'package:flutter/material.dart'; import 'settings_service.dart'; /// A class that many Widgets can interact with to read user settings, update /// user settings, or listen to user settings changes. /// /// Controllers glue Data Services to Flutter Widgets. The SettingsController /// uses the SettingsService to store and retrieve user settings. class SettingsController with ChangeNotifier { SettingsController(this._settingsService); // Make SettingsService a private variable so it is not used directly. final SettingsService _settingsService; // Make ThemeMode a private variable so it is not updated directly without // also persisting the changes with the SettingsService. late ThemeMode _themeMode; // actual local late List _locales; // Allow Widgets to read the user's preferred ThemeMode. ThemeMode get themeMode => _themeMode; // Changing language List get locales => _locales; /// Load the user's settings from the SettingsService. It may load from a /// local database or the internet. The controller only knows it can load the /// settings from the service. Future loadSettings() async { _themeMode = await _settingsService.themeMode(); _locales = await _settingsService.local(); // Important! Inform listeners a change has occurred. notifyListeners(); } /// Update and persist the ThemeMode based on the user's selection. Future updateThemeMode(ThemeMode? newThemeMode) async { if (newThemeMode == null) return; // Do not perform any work if new and old ThemeMode are identical if (newThemeMode == _themeMode) return; // Otherwise, store the new ThemeMode in memory _themeMode = newThemeMode; // Important! Inform listeners a change has occurred. notifyListeners(); // Persist the changes to a local database or the internet using the // SettingService. await _settingsService.updateThemeMode(newThemeMode); } /// Update and persist the ThemeMode based on the user's selection. Future updateLocales(List? newLocales) async { if (newLocales == null) return; // Do not perform any work if new and old ThemeMode are identical if (newLocales == _locales) return; // Otherwise, store the new ThemeMode in memory _locales = newLocales; // Important! Inform listeners a change has occurred. notifyListeners(); // Persist the changes to a local database or the internet using the // SettingService. // await _settingsService.updateThemeMode(newThemeMode); } } ================================================ FILE: lib/src/settings/settings_service.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; /// A service that stores and retrieves user settings. /// /// By default, this class does not persist user settings. If you'd like to /// persist the user settings locally, use the shared_preferences package. If /// you'd like to store settings on a web server, use the http package. class SettingsService { /// Loads the User's preferred ThemeMode from local or remote storage. Future themeMode() async => ThemeMode.light; /// Loads the User's preferred language Future> local() async => AppLocalizations.supportedLocales; /// Persists the user's preferred ThemeMode to local or remote storage. Future updateThemeMode(ThemeMode theme) async { // Use the shared_preferences package to persist settings locally or the // http package to persist settings over the network. } } ================================================ FILE: lib/src/settings/settings_view.dart ================================================ import 'package:flutter/material.dart'; import 'settings_controller.dart'; /// Displays the various settings that can be customized by the user. /// /// When a user changes a setting, the SettingsController is updated and /// Widgets that listen to the SettingsController are rebuilt. class SettingsView extends StatelessWidget { const SettingsView({super.key, required this.controller}); static const routeName = '/settings'; final SettingsController controller; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text('Settings'), ), body: Padding( padding: const EdgeInsets.all(16), // Glue the SettingsController to the theme selection DropdownButton. // // When a user selects a theme from the dropdown list, the // SettingsController is updated, which rebuilds the MaterialApp. child: DropdownButton( // Read the selected themeMode from the controller value: controller.themeMode, // Call the updateThemeMode method any time the user selects a theme. onChanged: controller.updateThemeMode, items: const [ DropdownMenuItem( value: ThemeMode.system, child: Text('System Theme'), ), DropdownMenuItem( value: ThemeMode.light, child: Text('Light Theme'), ), DropdownMenuItem( value: ThemeMode.dark, child: Text('Dark Theme'), ) ], ), ), ); } } ================================================ FILE: lib/src/theme/theme.dart ================================================ import 'package:flutter/material.dart'; import '../utils/breakpoint_resolver.dart'; class AhlTheme { AhlTheme._(); static const Color greenOlive = Color(0xFF728C6D); static const Color yellowRelax = Color(0xFFFFD166); static const Color yellowLight = Color(0xFFFFF9E6); static const Color blackCharcoal = Color(0xFF282828); static const Color blueNight = Color(0xFF36454F); static const Color darkNight = Color(0xFF1A202C); static const Color lightGrey = Color(0xFF8E8E8E); static const Color affiche = Color(0xFFFFECC0); static ThemeData lightTheme(double constraints) => ThemeData( brightness: Brightness.light, colorScheme: ColorScheme.fromSeed( seedColor: greenOlive, secondary: yellowRelax, // secondaryContainer: yellowLight, // s: yellowLight, ), inputDecorationTheme: const InputDecorationTheme( border: OutlineInputBorder(), ), textTheme: textTheme, useMaterial3: true, iconTheme: const IconThemeData(size: 24.0), buttonTheme: buttonTheme(constraints), ); static const Color primaryColor = Color(0xFF007bff); static const Color onPrimaryColor = Color(0xFFFFFFFF); static const Color secondaryColor = Color(0xFF673ab7); static const Color onSecondaryColor = Color(0xFFFFFFFF); static const Color background = Color(0xFFFFFFFF); static const Color onBackground = blackCharcoal; //Color(0xFF000000); static const Color surface = Color(0xFFF2F2F2); static const Color onSurface = Color(0xFF212121); static const Color error = Color(0xFFF44336); static const Color onError = Color(0xFFFFFFFF); static const TextStyle displayLarge = TextStyle( fontFamily: 'Butler', fontSize: 57, fontWeight: FontWeight.w900, fontStyle: FontStyle.normal, letterSpacing: -0.5, color: onBackground, ); static const TextStyle displayMedium = TextStyle( fontFamily: 'Butler', fontSize: 45, fontWeight: FontWeight.w900, fontStyle: FontStyle.normal, letterSpacing: -0.25, color: onBackground, ); static const TextStyle displaySmall = TextStyle( fontFamily: 'Butler', fontSize: 36, fontWeight: FontWeight.w900, fontStyle: FontStyle.normal, letterSpacing: 0, color: onBackground, ); static const TextStyle headlineLarge = TextStyle( fontFamily: 'Butler', fontSize: 32, fontWeight: FontWeight.w500, fontStyle: FontStyle.normal, letterSpacing: 0.15, color: onBackground, ); static const TextStyle headlineMedium = TextStyle( fontFamily: 'Butler', fontSize: 28, fontWeight: FontWeight.w500, fontStyle: FontStyle.normal, letterSpacing: 0.2, color: onBackground, ); static const TextStyle headlineSmall = TextStyle( fontFamily: 'Butler', fontSize: 24, fontWeight: FontWeight.w500, fontStyle: FontStyle.normal, letterSpacing: 0.15, color: onBackground, ); static const TextStyle titleLarge = TextStyle( fontFamily: 'Poppins', fontSize: 22, fontWeight: FontWeight.w500, fontStyle: FontStyle.normal, letterSpacing: 0.1, color: onBackground, ); static const TextStyle titleMedium = TextStyle( fontFamily: 'Poppins', fontSize: 16, fontWeight: FontWeight.w500, fontStyle: FontStyle.normal, letterSpacing: 0.1, color: onBackground, ); static const TextStyle titleSmall = TextStyle( fontFamily: 'Poppins', fontSize: 14, fontWeight: FontWeight.w500, fontStyle: FontStyle.normal, letterSpacing: 0.05, color: onBackground, ); static const TextStyle bodyLarge = TextStyle( fontFamily: 'Poppins', fontSize: 16, fontWeight: FontWeight.w400, fontStyle: FontStyle.normal, letterSpacing: 0.5, color: onBackground, ); static const TextStyle bodyMedium = TextStyle( fontFamily: 'Poppins', fontSize: 14, fontWeight: FontWeight.w400, fontStyle: FontStyle.normal, letterSpacing: 0.25, color: onBackground, ); static const TextStyle bodySmall = TextStyle( fontFamily: 'Poppins', fontSize: 12, fontWeight: FontWeight.w400, fontStyle: FontStyle.normal, letterSpacing: 0.25, color: onBackground, ); static const TextStyle label = TextStyle( fontFamily: 'Poppins', fontSize: 14, fontWeight: FontWeight.w500, fontStyle: FontStyle.normal, letterSpacing: 0, color: onSurface, ); static TextStyle labelMedium = label.copyWith( fontSize: 12, fontWeight: FontWeight.w400, ); static TextStyle labelSmall = label.copyWith( fontSize: 11, fontWeight: FontWeight.w700, ); static TextStyle name = // TextStyle( // fontFamily: 'Poppins', // fontSize: 12, // fontWeight: FontWeight.w400, // fontStyle: FontStyle.italic, // letterSpacing: 0, // color: onSurface, // ); label; static TextStyle peopleTitle = // TextStyle( // fontFamily: 'Poppins', // fontSize: 10, // fontWeight: FontWeight.w400, // fontStyle: FontStyle.italic, // letterSpacing: 0, // color: Color(0xFF4d4d4d), // ); labelSmall; // static TextTheme textTheme = Typography.material2021().copyWith(); static TextTheme get textTheme => Typography.blackMountainView.copyWith( displayLarge: displayLarge, displayMedium: displayMedium, displaySmall: displaySmall, headlineLarge: headlineLarge, headlineSmall: headlineSmall, headlineMedium: headlineMedium, titleLarge: titleLarge, titleMedium: titleMedium, titleSmall: titleSmall, bodyLarge: bodyLarge, bodyMedium: bodyMedium, bodySmall: bodySmall, labelLarge: label, labelMedium: labelMedium, labelSmall: labelSmall, ); static const TextStyle buttonTextStyle = label; static ButtonThemeData buttonTheme(double constraints) => ButtonThemeData( alignedDropdown: true, textTheme: ButtonTextTheme.normal, height: resolveForBreakPoint( constraints, other: 48, small: 40, medium: 40, large: 40, ), ); } ================================================ FILE: lib/src/utils/breakpoint_resolver.dart ================================================ import '../../ahl_barrel.dart'; import 'package:flutter/material.dart'; T resolveForBreakPoint( double screenWidth, { T? small, T? medium, T? large, T? extraLarge, T? huge, T? extraHuge, required T other, }) { switch (screenWidth) { case < ScreenSizes.small: return small ?? other; case > ScreenSizes.small && < ScreenSizes.medium: return medium ?? other; case > ScreenSizes.medium && < ScreenSizes.large: return large ?? other; case > ScreenSizes.large && < ScreenSizes.extraLarge: return extraLarge ?? other; case > ScreenSizes.extraLarge && < ScreenSizes.huge: return huge ?? other; case > ScreenSizes.huge: return extraHuge ?? other; default: return other; } } TextStyle? resolveLabelTextThemeForBreakPoints( double constraints, BuildContext context) { return resolveForBreakPoint( constraints, small: Theme.of(context).textTheme.labelSmall, medium: Theme.of(context).textTheme.labelMedium, other: Theme.of(context).textTheme.labelLarge, ); } TextStyle? resolveBodyTextThemeForBreakPoints( double constraints, BuildContext context) { return resolveForBreakPoint( constraints, small: Theme.of(context).textTheme.bodyMedium, medium: Theme.of(context).textTheme.bodyMedium, other: Theme.of(context).textTheme.bodyLarge, ); } TextStyle? resolveTitleTextThemeForBreakPoints( double constraints, BuildContext context) { return resolveForBreakPoint( constraints, small: Theme.of(context).textTheme.titleSmall, medium: Theme.of(context).textTheme.titleMedium, other: Theme.of(context).textTheme.titleLarge, ); } TextStyle? resolveHeadlineTextThemeForBreakPoints( double constraints, BuildContext context) { return resolveForBreakPoint( constraints, small: Theme.of(context).textTheme.headlineSmall, medium: Theme.of(context).textTheme.headlineMedium, other: Theme.of(context).textTheme.headlineLarge, ); } TextStyle? resolveDisplayTextThemeForBreakPoints( double constraints, BuildContext context) { return resolveForBreakPoint( constraints, small: Theme.of(context).textTheme.displaySmall, medium: Theme.of(context).textTheme.displayMedium, other: Theme.of(context).textTheme.displayLarge, ); } double resolveSeparatorSize(BuildContext context) { return resolveForBreakPoint( MediaQuery.of(context).size.width, small: 45, medium: 45, other: 50, ); } ================================================ FILE: lib/src/utils/date_time_utils.dart ================================================ import 'dart:developer'; import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; extension DateTimeUtils on DateTime { static DateTime parseReleaseDate(String dateString) { // dateString.split('/').map((e) => int.tryParse(e)); DateTime? date; try { date = DateTime.parse(dateString); } on FormatException catch (e) { log( 'Error formatting release date: e. The required format should follow this pattern: yyyy-mm-dd. ReleaseDate: $dateString', error: e, ); } catch (e, stacktrace) { log('Error occurred when parsing Article.releaseDate', error: e, stackTrace: stacktrace); } finally { date = date ?? DateTime.now(); } return date; } static String localMonth(int month, BuildContext context) { switch (month) { case DateTime.january: return AppLocalizations.of(context)!.january; case DateTime.february: return AppLocalizations.of(context)!.february; case DateTime.march: return AppLocalizations.of(context)!.march; case DateTime.april: return AppLocalizations.of(context)!.april; case DateTime.may: return AppLocalizations.of(context)!.may; case DateTime.june: return AppLocalizations.of(context)!.june; case DateTime.july: return AppLocalizations.of(context)!.july; case DateTime.august: return AppLocalizations.of(context)!.august; case DateTime.september: return AppLocalizations.of(context)!.september; case DateTime.october: return AppLocalizations.of(context)!.october; case DateTime.november: return AppLocalizations.of(context)!.november; case DateTime.december: return AppLocalizations.of(context)!.december; default: return 'Month'; } } static String localizedToString( {required DateTime dateTime, required BuildContext context}) { return "${dateTime.day} ${localMonth(dateTime.month, context)} ${dateTime.year}"; } static String localizedFromStringDate( {required String? dateString, required BuildContext context}) { if (dateString == null || dateString.isEmpty) { throw ArgumentError('dateString is empty or null'); } DateTime dateTime = parseReleaseDate(dateString); return localizedToString(dateTime: dateTime, context: context); } } ================================================ FILE: lib/src/utils/firebase_utils.dart ================================================ String? getCollection(String path) { List entry = path.split('/').where((element) => element != "").toList(); String? collection; try { collection = entry.getRange(0, entry.length - 1).join('/'); } on RangeError catch (_) { return null; } if (collection.isEmpty) { return null; } return collection; } ================================================ FILE: lib/src/utils/seo.dart ================================================ import 'package:flutter/material.dart'; import 'package:flutter_seo/flutter_seo.dart'; void setupSeo(BuildContext context) { WidgetsBinding.instance.addPostFrameCallback((timestamp) { CreateHtml.makeWidgetTree(context); }); } ================================================ FILE: lib/src/utils/storage_utils.dart ================================================ import 'dart:async'; import 'dart:convert'; import 'dart:developer'; import 'dart:typed_data'; import 'package:firebase_article/firebase_article.dart'; import 'package:firebase_storage/firebase_storage.dart'; import 'package:flutter/foundation.dart'; import 'package:http/http.dart' as http; import 'package:session_storage/session_storage.dart'; import '../firebase_constants.dart'; final class ArticleStorageUtils { // Image of the cover image Uint8List? coverImage; // content response http.Response? contentResponse; // Cover image url String? coverImageUrl; ArticleStorageUtils({ required Article article, required this.collection, Reference? storageRef, }) : _article = article, coverImageUrlKey = '${article.id}_coverImageUrl', coverImageDataKey = '${article.id}_coverImageData', contentDataKey = '${article.id}_contentData', _storage = storageRef ?? storage; /// The article on which this utils perform final Article _article; /// Collection name where to look for items. final String collection; /// Key to trigger cover image data final String coverImageDataKey; // key to trigger cover image url from cache. final String coverImageUrlKey; // key to trigger cover image url from cache. final String contentDataKey; // Firebase storage instance final Reference _storage; final SessionStorage cache = SessionStorage(); /// Ask storage Reference the coverImage url. Future getCoverImageUrl() async { // Cache check String? coverImageUrl = cache[coverImageUrlKey]; if (coverImageUrl != null) { return coverImageUrl; } // perform true operation on database final heroHeaderImageRef = _storage.child( "$collection/${_article.id}/${_article.relations?[0][RepoSetUp.coverImageKey]}", // "articles/qui_est_laure_sabes/hero_header_image.jpg", ); try { final String url = await heroHeaderImageRef.getDownloadURL(); // storing to cache coverImageUrl = url; cache[coverImageUrlKey] = coverImageUrl; } catch (e) { log('[storage] Error getting coverImage: e'); coverImageUrl = null; } return coverImageUrl; } Future getCoverImage() async { if (coverImage != null) { return coverImage; } Uint8List? data; String? dataString = cache[coverImageDataKey]; //cache check try { data = (dataString != null) ? decodeUint8ListFromString(dataString) : null; if (data != null) { coverImage = data; return data; } } catch (e) { log('[cache] Error getting data: $e'); } // perform truth reading try { final heroHeaderImageRef = _storage.child( "$collection/${_article.id}/${_article.relations?[0][RepoSetUp.coverImageKey]}", // "articles/qui_est_laure_sabes/hero_header_image.jpg", ); data = await heroHeaderImageRef.getData(); log('Image got: ${heroHeaderImageRef.name} '); // write data to cache cache[coverImageDataKey] = encodeUint8ListToString(data!); // update coverImage } catch (e) { log('Error loading image: $e'); data = Uint8List(0); } coverImage = data; return data; } /// Get the content of the article. Future getContent() async { // cache String? contentString = cache[contentDataKey]; http.Response? response = (contentString != null) ? decodeStringToResponse(content) : null; if (response != null) { return response; } //perform true operation final contentRef = storage.child( "$collection/${_article.id}/${_article.contentPath}", // "articles/qui_est_laure_sabes/hero_header_image.jpg", ); final String url = await contentRef.getDownloadURL(); response = await http.get(Uri.parse(url)); cache[contentDataKey] = encodeResponseToString(response); return response; } } // Function to encode Response to string String encodeResponseToString(http.Response response) { // Read the response body as a stream of bytes final bytes = response.bodyBytes; // Encode the bytes to a base64 string final encodedBody = base64Encode(bytes); // Extract other important fields from the response final headers = response.headers; final statusCode = response.statusCode; final reasonPhrase = response.reasonPhrase; // Combine all data into a JSON object final data = { 'headers': headers.toString(), 'statusCode': statusCode, 'reasonPhrase': reasonPhrase, 'url': response.request?.url.toString(), 'body': encodedBody, 'baseRequest': { 'method': response.request?.method, 'contentLength': response.request?.contentLength, 'url': response.request?.url.toString(), 'finalized': response.request?.finalized, 'headers': response.request?.headers, 'followRedirects': response.request?.followRedirects, 'hashCode': response.request?.hashCode, 'maxRedirects': response.request?.maxRedirects, 'persistentConnection': response.request?.persistentConnection, 'runtimeType': response.request?.runtimeType, } }; // Convert the data map to a JSON string return jsonEncode(data); } http.Response decodeStringToResponse(String encodedString) { // Decode the JSON string into a map final decodedData = jsonDecode(encodedString) as Map; // Extract data from the map final headers = Map.from(decodedData['headers']); final statusCode = decodedData['statusCode'] as int; final reasonPhrase = decodedData['reasonPhrase'] as String; final url = Uri.parse(decodedData['url'] as String); final bodyBytes = base64Decode(decodedData['body'] as String); // Extract request data (if available) http.Request? request; if (decodedData.containsKey('baseRequest')) { final requestData = decodedData['baseRequest'] as Map; request = http.Request( requestData['method'] as String, url, // headers: Map.from(requestData['headers']), // bodyBytes: requestData['contentLength'] != null ? Uint8List.fromList(requestData['body'] as List) : null, ); } // Rebuild the Response object with the decoded data return http.Response.bytes( bodyBytes, statusCode, reasonPhrase: reasonPhrase, headers: headers, request: request, ); } String encodeUint8ListToString(Uint8List data) { // Use the built-in converter to transform the list into a base64 encoded string return base64Encode(data); } Uint8List decodeUint8ListFromString(String encodedString) { // Use the built-in converter to decode the base64 string back into a Uint8List return base64Decode(encodedString); } ================================================ FILE: lib/src/validation/email_validation.dart ================================================ final emailRegex = RegExp( r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$", ); bool isValidEmail(String email) => emailRegex.hasMatch(email); ================================================ FILE: lib/src/who_we_are/view.dart ================================================ import 'dart:developer'; import '../../ahl_barrel.dart'; import 'package:ahl/src/firebase_constants.dart'; import 'package:ahl/src/pages/who_we_are/who_we_are.dart'; import 'package:ahl/src/utils/breakpoint_resolver.dart'; import 'package:ahl/src/utils/storage_utils.dart'; import 'package:ahl/src/widgets/widgets.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:go_router/go_router.dart'; import 'package:session_storage/session_storage.dart'; import '../project_space/view.dart'; class WhoWeAreSpace extends StatelessWidget { const WhoWeAreSpace({super.key}); @override Widget build(BuildContext context) { return Container( alignment: Alignment.center, // padding: EdgeInsets.symmetric(vertical: Paddings.huge), child: Column( children: [ // Padding( // padding: const EdgeInsets.symmetric(vertical: Margins.large), // child: SectionTitle( caretColor: Theme.of(context).primaryColor, isUpperCase: false, title: AppLocalizations.of(context)!.whoWeAre, titleStyle: resolveHeadlineTextThemeForBreakPoints( MediaQuery.of(context).size.width, context, ), // ), ), const WhoWeAreTile(), ], ), ); } } class WhoWeAreTile extends StatefulWidget { const WhoWeAreTile({super.key}); static const String imagePath = 'statics/who_we_are/les_soeurs_ndd.webp'; static const String titlePath = 'statics/setup'; static const String titleIndex = 'who_we_are_title'; @override State createState() => WhoWeAreTileState(); } class WhoWeAreTileState extends State with AutomaticKeepAliveClientMixin { static const String whoWeAreImageKey = 'who_we_are_image_key'; static const String whoWeAreTitleKey = 'who_we_are_title_key'; static Uint8List? data; static SessionStorage cache = SessionStorage(); String? _title; static Future getImage() async { data = await storage.child(WhoWeAreTile.imagePath).getData(); if (data != null) { cache[whoWeAreImageKey] = encodeUint8ListToString(data!); } return data; } Future getTitle() async { try { DocumentSnapshot> result = await firestore.doc(WhoWeAreTile.titlePath).get(); _title = result.get(WhoWeAreTile.titleIndex) as String; if (_title != null) { cache[whoWeAreTitleKey] = _title!; } } catch (e) { log('Error getting ${WhoWeAreTile.titlePath}'); _title = ''; return _title; } return _title; } @override bool get wantKeepAlive { if (cache[whoWeAreImageKey] != null && cache[whoWeAreTitleKey] != null) { data = decodeUint8ListFromString(cache[whoWeAreImageKey]!); _title = cache[whoWeAreTitleKey]; return true; } else { return false; } } @override Widget build(BuildContext context) { super.build(context); BoxConstraints constraints = BoxConstraints( maxWidth: ContentSize.maxWidth( MediaQuery.of(context).size.width, ), maxHeight: resolveForBreakPoint( MediaQuery.of(context).size.width, other: 500, small: 300, medium: 300, ), ); if (wantKeepAlive) { return AhlCard( callback: () => context.goNamed(WhoWeArePage.routeName), constraints: constraints, image: Container( // margin: const EdgeInsets.all(Margins.small), decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.cover, image: MemoryImage( data!, ), ), borderRadius: BorderRadius.circular( BorderSizes.small, ), ), ), title: FutureBuilder( future: getTitle(), builder: (context, snapshot) => Text( snapshot.data ?? "...", overflow: TextOverflow.ellipsis, maxLines: 2, style: Theme.of(context).textTheme.titleMedium, ), ), ); } else { return Container( constraints: constraints, child: AhlCard( callback: () => context.goNamed(WhoWeArePage.routeName), constraints: BoxConstraints( maxWidth: ContentSize.maxWidth( MediaQuery.of(context).size.width, ), ), image: FutureBuilder( future: getImage(), builder: (context, snapshot) { if (snapshot.hasData) { return Container( // margin: const EdgeInsets.all(Margins.small), decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.cover, image: MemoryImage( snapshot.data!, ), ), borderRadius: BorderRadius.circular( BorderSizes.small, ), ), ); } else if (snapshot.connectionState == ConnectionState.waiting) { return Container( constraints: constraints, alignment: Alignment.center, margin: const EdgeInsets.all(Margins.small), decoration: BoxDecoration( color: Theme.of(context).colorScheme.secondaryContainer, borderRadius: BorderRadius.circular( BorderSizes.small, ), ), child: const CircularProgressIndicator(), ); } else { log('${snapshot.error}'); return Container( constraints: constraints, color: Theme.of(context).colorScheme.errorContainer, child: Text( "Error loading image: ${snapshot.error}", style: Theme.of(context).textTheme.bodySmall!.copyWith( color: Theme.of(context).colorScheme.onErrorContainer, ), ), ); } }, ), title: FutureBuilder( future: getTitle(), builder: (context, snapshot) => Text( snapshot.data ?? "...", overflow: TextOverflow.ellipsis, maxLines: 2, style: Theme.of(context).textTheme.titleMedium, ), ), ), ); } } } ================================================ FILE: lib/src/widgets/actions.dart ================================================ part of 'widgets.dart'; enum Actions { aboutUs, home, news, ourProjects, prayers, makeDonation, contact, } /// A short hand to get website tabs. /// /// The website tabs like home, prayers, and over tabs are called action. They /// are accessed via the [AppBar] or [Footer]. /// /// To get localized map string, use [actionLocalized] function that takes a /// [BuildContext] argument and return a map with the localized title and the /// corresponding route name as value. class ActionsLists { ActionsLists._(); /// Return a map of localized action denomination and their routeName as Value. /// /// Call this function inside a build method to get the corresponding route /// an action. /// /// Outside a [build] method, consider using the [actions]. static Map actionLocalized(BuildContext context) { Map actions = { AppLocalizations.of(context)!.aboutUs: null, AppLocalizations.of(context)!.homeText: HomePage.routeName, AppLocalizations.of(context)!.news: null, AppLocalizations.of(context)!.ourProjects: null, AppLocalizations.of(context)!.prayers: null, AppLocalizations.of(context)!.makeDonation: null, AppLocalizations.of(context)!.contact: null, }; return actions; } /// A simple map of string that has as key action names and as value route /// names. static Map actions = { "about_us": null, "home": HomePage.routeName, "news": null, "our_projects": null, "prayers": null, }; /// A List of actions as widget. /// /// This list was optimized for the app drawer. For specific implementation /// like in footer, consider building actionsWidgets from [ActionsLists.actions] /// or [ActionsLists.actionLocalized] to make mapping between actions and /// Widgets. static final List actionsWidgets = [ Builder( builder: (context) => Padding( padding: const EdgeInsets.symmetric(vertical: Paddings.small), child: TextButton( onPressed: () { context.goNamed(WhoWeArePage.routeName); }, child: Container( alignment: Alignment.centerLeft, padding: const EdgeInsets.symmetric(vertical: Paddings.medium), child: Text( AppLocalizations.of(context)!.whoWeAre, style: Theme.of(context).textTheme.labelLarge!.copyWith( color: theme.AhlTheme.blueNight, ), ), ), ), ), ), Builder( builder: (context) => Padding( padding: const EdgeInsets.symmetric(vertical: Paddings.small), child: TextButton( onPressed: () { context.goNamed(PrayersPage.routeName); }, child: Container( alignment: Alignment.centerLeft, padding: const EdgeInsets.symmetric(vertical: Paddings.medium), child: Text( AppLocalizations.of(context)!.prayers, style: Theme.of(context).textTheme.labelLarge!.copyWith( color: theme.AhlTheme.blueNight, ), ), ), ), ), ), Builder( builder: (context) => Padding( padding: const EdgeInsets.symmetric(vertical: Paddings.small), child: TextButton( onPressed: () { context.goNamed(ProjectsPage.routeName); }, child: Container( alignment: Alignment.centerLeft, padding: const EdgeInsets.symmetric(vertical: Paddings.medium), child: Text( AppLocalizations.of(context)!.ourProjects, style: Theme.of(context).textTheme.labelLarge!.copyWith( color: theme.AhlTheme.blueNight, ), ), ), ), ), ), // Builder( // builder: (context) => Padding( // padding: const EdgeInsets.symmetric(vertical: Paddings.small), // child: TextButton( // onPressed: () { // context.goNamed(ArticleContentPage.routeName); // }, // child: Container( // alignment: Alignment.centerLeft, // padding: const EdgeInsets.symmetric(vertical: Paddings.medium), // child: Text( // AppLocalizations.of(context)!.articles, // style: Theme.of(context).textTheme.bodyLarge!.copyWith( // fontFamily: 'Aileron', // fontWeight: FontWeight.w900, // ), // ), // ), // ), // ), // ), Builder( builder: (context) => Container( margin: const EdgeInsets.only(top: 64), child: ElevatedButton( onPressed: () { context.goNamed(DonationPage.routeName); }, style: ElevatedButton.styleFrom( backgroundColor: Theme.of(context).primaryColor, foregroundColor: Theme.of(context).colorScheme.onPrimary, ), child: Container( padding: ButtonGeometry.elevatedButtonPaddings, child: Text(AppLocalizations.of(context)!.makeDonation), ), ), ), ), ]; } ================================================ FILE: lib/src/widgets/app_bar.dart ================================================ part of 'widgets.dart'; /// class for the appBar class AhlAppBar extends StatelessWidget implements PreferredSizeWidget { const AhlAppBar({ super.key, Size? preferredSize, this.title = const AhlLogo( // separation: SizedBox.shrink(), ), this.backgroundColor, this.actions, this.ending, this.crossAxisAlignment, this.padding, this.bottomBar, }) : _preferredSize = preferredSize ?? const Size.fromHeight( Sizes.appBarSize, ); /// The preferred size of this widget final Size _preferredSize; final Widget title; final List? actions; final Widget? ending; final Color? backgroundColor; final CrossAxisAlignment? crossAxisAlignment; final EdgeInsetsGeometry? padding; final Widget? bottomBar; Widget buildContentWidgets( BuildContext context, { Widget? leadingTitle, List? actions, Widget? ending, Widget? bottomBar, }) { // make logo a button to home Widget title = InkWell( onTap: () => context.goNamed( HomePage.routeName, ), child: this.title, ); /// background color of the app bar var color = backgroundColor ?? theme.AhlTheme.yellowLight; /// constraints BoxConstraints computedConstraint = BoxConstraints.loose( _preferredSize, ); /// Paddings EdgeInsetsGeometry computedPadding = padding ?? const EdgeInsets.all( Paddings.appBarPadding, ); TextBaseline? computedTextBaseLine = (crossAxisAlignment != null) ? (crossAxisAlignment == CrossAxisAlignment.baseline) ? TextBaseline.ideographic : null : TextBaseline.alphabetic; Widget leadingTitle0 = leadingTitle ?? Flexible( flex: 5, child: Row( mainAxisSize: MainAxisSize.min, children: [ if (Navigator.of(context).canPop()) IconButton( onPressed: () { Navigator.of(context).pop(); }, icon: const Icon(Icons.arrow_back_rounded)) .animate() .moveX(begin: -50, end: 0), Flexible( child: title, ), ], ), ); return Container( constraints: computedConstraint, color: color, padding: computedPadding, alignment: Alignment.center, child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ Row( textBaseline: computedTextBaseLine, crossAxisAlignment: crossAxisAlignment ?? CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisSize: MainAxisSize.max, children: [ leadingTitle0, ...?actions, ending ?? const AhlMenuButton(), ], ), bottomBar ?? const SizedBox.shrink(), ], ), ); } @override Widget build(BuildContext context) { // make logo a button to home return LayoutBuilder( builder: (context, constraints) { if (constraints.maxWidth <= ScreenSizes.large) { // use the mobile appBar return buildContentWidgets( context, actions: actions, ending: ending ?? const AhlMenuButton(), bottomBar: bottomBar ?? const SizedBox.shrink(), ); } else { // Use the default web appBar return buildContentWidgets( context, actions: actions ?? buildActions(context), ending: const SizedBox.shrink(), bottomBar: bottomBar ?? const SizedBox.shrink(), ); // return Container( // constraints: computedConstraint, // color: color, // padding: computedPadding, // alignment: Alignment.center, // child: Column( // crossAxisAlignment: CrossAxisAlignment.center, // children: [ // Row( // textBaseline: computedTextBaseLine, // crossAxisAlignment: // crossAxisAlignment ?? CrossAxisAlignment.baseline, // mainAxisAlignment: MainAxisAlignment.spaceBetween, // children: [ // leadingTitle, // ...actions, // ], // ), // bottomBar ?? const SizedBox.shrink(), // ], // ), // ); } }, ); } static List buildActions(BuildContext context) { List actionsList = []; String? currentRouteName = ModalRoute.of(context)?.settings.name; TextStyle? resolveStyle(String routeName) { return (routeName == currentRouteName) ? Theme.of(context).textTheme.labelLarge!.copyWith( fontWeight: FontWeight.bold, ) : null; } TextStyle? resolveStyleIf(bool Function() test) { return (test()) ? Theme.of(context).textTheme.labelLarge!.copyWith( fontWeight: FontWeight.bold, ) : null; } Map actions = { AppLocalizations.of(context)!.homeText: HomePage.routeName, AppLocalizations.of(context)!.priesSpace: PrayersPage.routeName, AppLocalizations.of(context)!.projectsSpace: ProjectsPage.routeName, AppLocalizations.of(context)!.whoWeAre: WhoWeArePage.routeName, AppLocalizations.of(context)!.makeDonation: DonationPage.routeName, }; Widget donationButton = Flexible( flex: 2, child: Container( alignment: Alignment.centerRight, child: OutlinedButton( style: ButtonStyle( foregroundColor: WidgetStateColor.resolveWith( (states) => Theme.of(context).colorScheme.onSurface, ), ), onPressed: () { context.goNamed(DonationPage.routeName); }, // child: FittedBox( // fit: BoxFit.contain, child: Text( actions.keys.lastOrNull, ), // ), ), ), ); Widget homeButton = // Flexible( // // flex: 1, // child: Container( child: TextButton( style: ButtonStyle( foregroundColor: WidgetStateColor.resolveWith( (states) => Theme.of(context).colorScheme.onSurface, ), ), onPressed: () { context.goNamed(HomePage.routeName); }, child: Text( actions.keys.elementAtOrNull(0), style: resolveStyleIf( () { return (currentRouteName == actions.values.elementAt(0) || currentRouteName == "/"); }, ), ), ), // ), // ), ); Widget projectsButton = TextButton( style: ButtonStyle( foregroundColor: WidgetStateColor.resolveWith( (states) => Theme.of(context).colorScheme.onSurface, ), ), onPressed: () { context.goNamed(ProjectsPage.routeName); }, child: Text( actions.keys.elementAtOrNull(2), style: resolveStyle(actions.values.elementAt(2)), ), // PopupMenuButton( /// This part of the code is defining a `PopupMenuButton` widget. The `child` property is setting /// the text that will be displayed on the button. In this case, it is setting the text based on /// the key at index 2 of the `actions` map. // child: Text(actions.keys.elementAtOrNull(2)), // itemBuilder: (context) => [ // PopupMenuItem( // onTap: () { // context.goNamed( // ProjectsPage.routeName, // ); // }, // child: const Text('Projet En cours'), // ), // PopupMenuItem( // onTap: () { // context.goNamed( // ProjectsPage.routeName, // ); // }, // child: const Text('Initiative des soeurs'), // ), // PopupMenuItem( // onTap: () { // context.goNamed( // ProjectsPage.routeName, // ); // }, // child: const Text('Soutenir un projet'), // ), // ], // // style: ButtonStyle( // foregroundColor: WidgetStateColor.resolveWith( // (states) => Theme.of(context).colorScheme.onSurface, // ), // ), // onChanged: (value) => 1, // onPressed: () {}, // child: Text( // actions.keys.elementAtOrNull(2), // style: resolveStyle(actions.values.elementAtOrNull(2)), // ), // ), ); Widget aboutUsButton = // Flexible( // // flex: 1, // child: Container( child: TextButton( style: ButtonStyle( foregroundColor: WidgetStateColor.resolveWith( (states) => Theme.of(context).colorScheme.onSurface, ), ), onPressed: () { context.goNamed( WhoWeArePage.routeName, ); }, child: Text( actions.keys.elementAtOrNull(3), style: resolveStyle(actions.values.elementAtOrNull(3)), ), ), // ), ); Widget priersSpaceButton = // Flexible( // // flex: 1, // child: Container( child: TextButton( style: ButtonStyle( foregroundColor: WidgetStateColor.resolveWith( (states) => Theme.of(context).colorScheme.onSurface, ), ), onPressed: () { context.goNamed(PrayersPage.routeName); }, child: Text( actions.keys.elementAtOrNull(1), style: resolveStyle(actions.values.elementAtOrNull(1)), ), ), // ), ); actionsList.addAll( [ homeButton, priersSpaceButton, projectsButton, aboutUsButton, donationButton, ], ); return actionsList; } @override Size get preferredSize => _preferredSize; } class AhlMenuButton extends StatelessWidget { const AhlMenuButton({super.key}); @override Widget build(BuildContext context) { ScaffoldState scaffoldState = Scaffold.of(context); bool scaffoldHasEndDrawer = scaffoldState.hasEndDrawer; if (scaffoldHasEndDrawer) { return Hero( tag: 'menu_button_tag', child: Container( alignment: Alignment.center, width: 32, height: 32, // alignment: Alignment.center, child: IconButton( onPressed: () => scaffoldState.openEndDrawer(), icon: Container( alignment: Alignment.center, child: const FittedBox( fit: BoxFit.contain, child: Icon( size: 24, MyFlutterIcons.menu, applyTextScaling: true, ), ), ), ), ), ); } else { return const SizedBox.shrink(); } } } ================================================ FILE: lib/src/widgets/audio_player.dart ================================================ part of 'widgets.dart'; class FirebaseAudioPlayer extends StatefulWidget { const FirebaseAudioPlayer({ super.key, required this.article, this.collection = 'articles', }); final Article article; final String? collection; @override State createState() => _FirebaseAudioPlayerState(); } class _FirebaseAudioPlayerState extends State { late Map? audioMap; late Future url; @override void initState() { super.initState(); audioMap = widget.article.relations?[0]['audio']; } Future getAudioUrl() async { String? audioFileName; audioFileName = audioMap?['file']; if (audioFileName == null) { throw NullRejectionException(false); } else { String path = '${widget.collection}/${widget.article.id}/$audioFileName'; return storage.child(path).getDownloadURL(); } } @override Widget build(BuildContext context) { url = getAudioUrl(); return Container( padding: const EdgeInsets.all(Paddings.medium,) .add(const EdgeInsets.only(top: 12.5,),), // color: Theme.of(context).colorScheme.secondaryContainer, child: FutureBuilder( future: url, builder: (context, snapshot) { if (snapshot.hasData) { return AudioPlayerView( color: AhlTheme.darkNight,//Theme.of(context).colorScheme.secondary, buttonColor: Theme.of(context).colorScheme.secondary, inactiveColor: Theme.of(context).colorScheme.secondaryContainer, secondaryActiveColor: Theme.of(context).colorScheme.secondaryContainer, iconSize: 48, title: Text(audioMap?['title']), timeStyle: Theme.of(context).textTheme.labelSmall, url: snapshot.requireData, ); } else if (snapshot.hasError) { log("[$runtimeType : ${DateTime.now()}] ${snapshot.error}"); return Container(); } return Container( height: 100, color: Theme.of(context).colorScheme.surfaceContainer, ) .animate( onInit: (controller) => controller.repeat( period: Durations.medium2, ), ) .shimmer( curve: Curves.easeInOut, ); }, ), ); } } ================================================ FILE: lib/src/widgets/drawer.dart ================================================ part of 'widgets.dart'; class AhlDrawer extends StatelessWidget { const AhlDrawer({super.key}); @override Widget build(BuildContext context) { return LayoutBuilder( builder: (context, constraints) => Drawer( clipBehavior: Clip.antiAlias, width: constraints.maxWidth, child: Scaffold( backgroundColor: theme.AhlTheme.yellowLight, appBar: AhlAppBar( backgroundColor: theme.AhlTheme.yellowLight, padding: const EdgeInsets.only(left: Paddings.drawerAppBarPadding), crossAxisAlignment: CrossAxisAlignment.center, title: AhlLogo( crossAxisAlignment: CrossAxisAlignment.center, leading: const Icon( Icons.home_filled, color: Colors.black54, size: IconSizes.medium, ), separation: Container(width: 9), title: Text( AppLocalizations.of(context)!.longAppTitle, ), ), ending: Hero( tag: 'menu_button_tag1', child: IconButton( onPressed: () => Scaffold.of(context).closeEndDrawer(), icon: const Icon(Icons.close), ), ), ), // body of the drawer body: Stack( children: [ SingleChildScrollView( child: Container( // constraints: const BoxConstraints( // maxWidth: Sizes.menuButtonWidth, // maxHeight: Sizes.menuButtonListHeight, // ), margin: const EdgeInsets.only(left: Paddings.medium), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ ...ActionsLists.actionsWidgets, ], ), ), ), Positioned( right: 20, bottom: 50, child: Container( padding: const EdgeInsets.all(8.0), color: theme.AhlTheme.yellowLight, child: Row( children: [ TextButton( onPressed: () { LocaleUtils.changeLocale( context, const Locale('fr'), ); }, child: const Text('Français'), ), TextButton( onPressed: () { LocaleUtils.changeLocale( context, const Locale('en'), ); }, child: const Text('English'), ), ], ), ), ), const DrawerFooter(), ], ), ), ), ); } } class DrawerFooter extends StatelessWidget { const DrawerFooter({super.key}); @override Widget build(BuildContext context) { return Align( alignment: Alignment.bottomCenter, child: Container( constraints: const BoxConstraints.expand(height: 50), alignment: Alignment.center, decoration: const BoxDecoration(color: theme.AhlTheme.greenOlive), child: Text( 'N.D.D MADAGASCAR 2023', style: Theme.of(context).textTheme.bodyLarge!.copyWith( color: Theme.of(context).colorScheme.onPrimary, fontFamily: 'Aileron', fontWeight: FontWeight.w100, ), ), ), ); } } ================================================ FILE: lib/src/widgets/footer.dart ================================================ part of 'widgets.dart'; class AhlFooter extends StatelessWidget { const AhlFooter({super.key, this.actionColor = const Color(0xFFA0ABC0)}); final Color? actionColor; @override Widget build(BuildContext context) { // var footerButtons = ActionsLists.actionLocalized(context).entries.map( // (e) => Align( // alignment: Alignment.centerLeft, // child: TextButton( // onPressed: () { // if (e.value != null) { // Navigator.pushNamed(context, e.value!); // } // }, // child: Text( // e.key, // style: TextStyle( // fontFamily: 'Aileron', // color: actionColor, // ), // ), // ), // ), // ); return Container( alignment: Alignment.center, color: theme.AhlTheme.darkNight, padding: const EdgeInsets.symmetric( horizontal: Paddings.medium, vertical: Paddings.big, ), child: Container( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), ), child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ // Ahl logo in the footer. // // The size of this logo is fix Container( alignment: Alignment.centerLeft, constraints: const BoxConstraints( maxHeight: 75, ), margin: const EdgeInsets.symmetric( vertical: Paddings.big, horizontal: Paddings.small + 5, ), child: Image.asset(AhlAssets.logoFormTypoHorizontalColoredDark), ), // Footer actions buttons. // // These buttons are the actions on the app bar and other // important or not buttons across the app. // // To make them work, we use a default text theme // Table( // children: [ // TableRow( // children: [ // footerButtons.toList()[Actions.ourProjects.index], // footerButtons.toList()[Actions.makeDonation.index], // ], // ), // TableRow( // children: [ // footerButtons.toList()[Actions.aboutUs.index], // footerButtons.toList()[Actions.news.index], // ], // ), // TableRow( // children: [ // footerButtons.toList()[Actions.prayers.index], // footerButtons.toList()[Actions.contact.index], // ], // ), // ], // ), // Home FooterPageButton( callback: () { Navigator.of(context).pushNamed(HomePage.routeName); }, icon: const Icon(Icons.home_filled), text: AppLocalizations.of(context)!.homeText, ), const Gap(45), Wrap( direction: Axis.horizontal, runSpacing: Paddings.huge, spacing: Paddings.huge, alignment: WrapAlignment.start, runAlignment: WrapAlignment.start, crossAxisAlignment: WrapCrossAlignment.start, children: [ Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ FooterProminentButton( callback: () => context.goNamed(PrayersPage.routeName), text: AppLocalizations.of(context)!.prayerSpace, ), FooterLowLevelButton( callback: () => context.goNamed(PrayersPage.routeName), text: AppLocalizations.of(context)!.todaysRosary, ), FooterLowLevelButton( callback: () => context.goNamed(PrayersPage.routeName), text: AppLocalizations.of(context)!.office, ), FooterLowLevelButton( callback: () => context.goNamed(PrayersPage.routeName), text: AppLocalizations.of(context)!.todaySaint, ), FooterLowLevelButton( callback: () { context.goNamed(PrayersPage.routeName); }, text: AppLocalizations.of(context)!.priesIntention, ), FooterLowLevelButton( callback: () { context.go('/novena/saint_dominic_day_1'); }, text: AppLocalizations.of(context)!.novena, ), ], ), Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ FooterProminentButton( callback: () => context.go(ProjectsPage.routeName), text: AppLocalizations.of(context)!.projectsSpace, ), FooterLowLevelButton( callback: () => context.go('/projects/cantine'), text: 'Cantine', ), FooterLowLevelButton( callback: () => context.go('/projects/dispensaire'), text: 'Dispensaire', ), FooterLowLevelButton( callback: () => context.go('/projects/grande_salle'), text: 'Grande Salle', ), ], ), Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ FooterProminentButton( callback: () => context.go(WhoWeArePage.routeName), text: AppLocalizations.of(context)!.domSisters, ), FooterLowLevelButton( callback: () => context.go(WhoWeArePage.routeName), text: AppLocalizations.of(context)!.whoWeAre, ), // FooterLowLevelButton( // callback: () => // ScaffoldMessenger.of(context).showSnackBar( // SnackBar( // content: Text( // AppLocalizations.of(context)!.devInProgress, // ), // ), // ), // text: AppLocalizations.of(context)!.realized, // ), // FooterLowLevelButton( // callback: () => context.go(ProjectsPage.routeName), // text: AppLocalizations.of(context)!.initiative, // ), ], ) ], ), const Gap(45), /// Sisters denomination // Flex( // textDirection: TextDirection.ltr, // mainAxisAlignment: MainAxisAlignment.spaceBetween, // direction: resolveForBreakPoint( // MediaQuery.of(context).size.width, // other: Axis.horizontal, // small: Axis.vertical, // medium: Axis.vertical, // ), Wrap( verticalDirection: VerticalDirection.down, // mainAxisAlignment: MainAxisAlignment.spaceBetween, direction: Axis.horizontal, runAlignment: WrapAlignment.spaceBetween, alignment: WrapAlignment.spaceBetween, crossAxisAlignment: WrapCrossAlignment.center, // runSpacing: 200, spacing: 50, children: [ ConstrainedBox( constraints: const BoxConstraints( maxHeight: 100, ), child: Column( textDirection: TextDirection.ltr, mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.symmetric( // vertical: Paddings.big, horizontal: Paddings.small + 5) .copyWith(bottom: 0), child: Text( '© ${DateTime.now().year}', style: Theme.of(context).textTheme.labelSmall!.copyWith( color: theme.AhlTheme.yellowLight, ), ), ), Padding( padding: const EdgeInsets.symmetric( horizontal: Paddings.small + 5, vertical: Paddings.small, ), child: Text( AppLocalizations.of(context)!.appTitle, style: Theme.of(context) .textTheme .labelSmall! .copyWith(color: theme.AhlTheme.yellowLight), ), ), ], ), ), Container( constraints: const BoxConstraints(maxWidth: 180), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ FooterIconButton( callback: () { launchUrl( Uri.parse("https://web.facebook.com/LaureSabes"), ); }, icon: MyFlutterIcons.facebook_circled, ), FooterIconButton( callback: () { launchUrl( Uri.parse( "https://www.youtube.com/@DominicainesMissionnairesMada"), ); }, icon: MyFlutterIcons.youtube, ), FooterIconButton( callback: () { //todo: implement whatsapp }, icon: MyFlutterIcons.whatsapp, ), ], ), ), ], ), ], ), ), ); } } /// The page button in footer. class FooterPageButton extends StatelessWidget { const FooterPageButton({ super.key, required this.callback, required this.icon, required this.text, }); /// This buttons callback. final VoidCallback callback; /// This buttons leading Widget. final Widget icon; /// This button text final String text; @override Widget build(BuildContext context) { return FittedBox( fit: BoxFit.fitWidth, child: TextButton( style: ButtonStyle( foregroundColor: WidgetStateColor.resolveWith( (states) { if (states.contains(WidgetState.hovered)) { return Colors.white; } else { return theme.AhlTheme.yellowLight.withAlpha(0x88); } }, ), ), onPressed: callback, child: Row( children: [ Padding( padding: const EdgeInsets.only(right: Paddings.small), child: icon, ), Text( text, ), ], ), ), ); } } class FooterProminentButton extends StatelessWidget { const FooterProminentButton({ super.key, required this.callback, required this.text, }); final VoidCallback callback; final String text; @override Widget build(BuildContext context) { return TextButton( style: ButtonStyle( foregroundColor: WidgetStateColor.resolveWith( (states) => theme.AhlTheme.yellowLight, ), textStyle: WidgetStateTextStyle.resolveWith( (states) { FontWeight ftw = FontWeight.w400; if (states.contains(WidgetState.hovered)) { ftw = FontWeight.w600; } return Theme.of(context).textTheme.labelLarge!.copyWith( fontWeight: ftw, ); }, ), ), onPressed: callback, child: Text( text, ), ); } } class FooterLowLevelButton extends StatelessWidget { const FooterLowLevelButton({ super.key, required this.callback, required this.text, }); final VoidCallback callback; final String text; @override Widget build(BuildContext context) { return TextButton( style: ButtonStyle( foregroundColor: WidgetStateColor.resolveWith( (states) => theme.AhlTheme.yellowLight.withAlpha(0x88), ), textStyle: WidgetStateTextStyle.resolveWith((states) { FontWeight ftw = FontWeight.w400; if (states.contains(WidgetState.hovered)) { ftw = FontWeight.w600; } return Theme.of(context).textTheme.labelMedium!.copyWith( fontWeight: ftw, ); }), ), onPressed: callback, child: Text( text, ), ); } } class FooterIconButton extends StatelessWidget { const FooterIconButton({ super.key, required this.callback, required this.icon, }); final VoidCallback callback; final IconData icon; @override Widget build(BuildContext context) { return IconButton.filled( style: ButtonStyle( backgroundColor: WidgetStateColor.resolveWith( (states) => theme.AhlTheme.yellowRelax, ), ), onPressed: callback, icon: Icon( icon, color: Colors.white, ), ); } } ================================================ FILE: lib/src/widgets/forms_prompt.dart ================================================ part of 'widgets.dart'; final GlobalKey _formKey = GlobalKey(debugLabel: "prayer_request_key"); class FormsLayoutBase extends StatelessWidget { const FormsLayoutBase({ super.key, Function? callback, required this.child, }); final Widget child; @override Widget build(BuildContext context) { return Container( constraints: BoxConstraints( maxWidth: MediaQuery.sizeOf(context).width, // maxHeight: min( // MediaQuery.of(context).size.height * 2 / 3, // 1124, // ), ), decoration: BoxDecoration( image: DecorationImage( fit: BoxFit.cover, opacity: 0.1, // scale: 10, // repeat: ImageRepeat.repeat, image: AssetImage( AhlAssets.requestMotif, ), ), color: theme.AhlTheme .blueNight, //Theme.of(context).colorScheme.secondaryContainer, ), padding: EdgeInsets.symmetric( vertical: Paddings.medium, horizontal: // (MediaQuery.of(context).size.width > ScreenSizes.extraLarge) //? Paddings.big // : Paddings.big, ), alignment: Alignment.center, child: Container( margin: const EdgeInsets.symmetric(vertical: Paddings.huge), alignment: Alignment.center, child: Container( constraints: BoxConstraints( maxWidth: ContentSize.maxWidth(MediaQuery.of(context).size.width), // maxHeight: min( // MediaQuery.of(context).size.height * 2 / 3, // 1124, // ), ), child: child, ), ), // switch (constraints.maxWidth) { // case > ScreenSizes.extraLarge: // return Align( // alignment: Alignment.center, // child: Container( // constraints: BoxConstraints.loose( // Size( // ContentSize.maxWidth(MediaQuery.of(context).size.width), // min( // MediaQuery.of(context).size.height - 200, // 1124, // ), // ), // ), // decoration: BoxDecoration( // borderRadius: BorderRadius.circular(38), // ), // clipBehavior: Clip.antiAlias, // child: container, // ), // ); // default: // return Container( // constraints: BoxConstraints.loose( // Size( // ContentSize.maxWidth(MediaQuery.of(context).size.width), // min( // MediaQuery.of(context).size.height - 200, // 1124, // ), // ), // ), // child: container, // ); // } ); } } ================================================ FILE: lib/src/widgets/loading_page.dart ================================================ import 'package:dotlottie_loader/dotlottie_loader.dart'; import 'package:flutter/material.dart'; import 'package:lottie/lottie.dart'; class LoadingView extends StatefulWidget { const LoadingView({super.key, this.work}); final Future? work; @override State createState() => _LoadingViewState(); } class _LoadingViewState extends State with SingleTickerProviderStateMixin { late AnimationController lottieController; @override void initState() { super.initState(); lottieController = AnimationController( vsync: this, duration: const Duration(seconds: 3), // animationBehavior: AnimationBehavior.preserve, // reverseDuration: const Duration(seconds: 3), )..addStatusListener((status) => animation(status)); } @override void dispose() { lottieController.dispose(); super.dispose(); } void animation(AnimationStatus status) { widget.work!.whenComplete(() { lottieController.forward(); }); } @override Widget build(BuildContext context) { //todo: change asset to ahl loading return DotLottieLoader.fromAsset( 'assets/animations/loading.json', frameBuilder: (context, composition) { if (composition == null) { return const Align( child: CircularProgressIndicator(), ); } return Align( child: Lottie.memory( composition.animations.values.single, onLoaded: (p0) => lottieController.forward(), reverse: true, repeat: true, animate: true, frameRate: FrameRate.max, backgroundLoading: true, controller: lottieController, ), ); }, ); } } ================================================ FILE: lib/src/widgets/logo.dart ================================================ part of 'widgets.dart'; class AhlLogo extends StatelessWidget { const AhlLogo({ super.key, this.size = const Size(34, 34), this.leading, this.title, this.separation, this.foregroundColor, this.crossAxisAlignment, }); final Size size; final Widget? leading; final Widget? title; final Widget? separation; final CrossAxisAlignment? crossAxisAlignment; final Color? foregroundColor; @override Widget build(BuildContext context) { return DefaultTextStyle( style: Theme.of(context).textTheme.titleLarge!.copyWith( fontFamily: 'Butler', fontSize: 22, color: foregroundColor, ), child: ConstrainedBox( constraints: const BoxConstraints( maxWidth: 250, ), child: Row( mainAxisSize: MainAxisSize.min, textBaseline: TextBaseline.alphabetic, crossAxisAlignment: crossAxisAlignment ?? CrossAxisAlignment.center, children: [ leading ?? Flexible( fit: FlexFit.loose, flex: 1, child: Container( constraints: BoxConstraints.tight(size), child: Image.asset( AhlAssets.logoForm, fit: BoxFit.contain, ), ), ), separation ?? const SizedBox( width: 15, ), title ?? Flexible( flex: 5, fit: FlexFit.tight, child: FittedBox( fit: BoxFit.scaleDown, alignment: Alignment.bottomLeft, child: Text( "Ajourd'hui l'avenir", maxLines: 1, style: Theme.of(context).textTheme.headlineSmall!.copyWith( fontFamily: 'Butler', ), ), ), ), // ), ], ), ), ); } } // Old logo setup // // Row( // children: [ // SizedBox.fromSize( // size: size, // child: Image.asset( // AhlAssets.logoForm, // fit: BoxFit.contain, // ), // ), // const SizedBox( // width: 30, // ), // Text( // "Ajourd'hui l'avenir", // style: Theme.of(context).textTheme.bodyLarge, // ), // ], // ); ================================================ FILE: lib/src/widgets/my_flutter_app_icons.dart ================================================ /// Flutter icons MyFlutterApp /// Copyright (C) 2024 by original authors @ fluttericon.com, fontello.com /// This font was generated by FlutterIcon.com, which is derived from Fontello. /// /// To use this font, place it in your fonts/ directory and include the /// following in your pubspec.yaml /// /// flutter: /// fonts: /// - family: MyFlutterApp /// fonts: /// - asset: fonts/MyFlutterApp.ttf /// /// /// * Typicons, (c) Stephen Hutchings 2012 /// Author: Stephen Hutchings /// License: SIL (http://scripts.sil.org/OFL) /// Homepage: http://typicons.com/ /// * Font Awesome 5, Copyright (C) 2016 by Dave Gandy /// Author: Dave Gandy /// License: SIL (https://github.com/FortAwesome/Font-Awesome/blob/master/LICENSE.txt) /// Homepage: http://fortawesome.github.com/Font-Awesome/ /// library; import 'package:flutter/widgets.dart'; class MyFlutterIcons { MyFlutterIcons._(); static const _kFontFam = 'MyFlutterIcons'; static const String? _kFontPkg = null; static const IconData facebook_circled = IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData menu = IconData(0xe801, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData youtube = IconData(0xf167, fontFamily: _kFontFam, fontPackage: _kFontPkg); static const IconData whatsapp = IconData(0xf232, fontFamily: _kFontFam, fontPackage: _kFontPkg); } ================================================ FILE: lib/src/widgets/prayers_request.dart ================================================ part of 'widgets.dart'; ================================================ FILE: lib/src/widgets/promotion_bar.dart ================================================ part of 'widgets.dart'; class PromotionBar extends StatefulWidget { const PromotionBar({ super.key, required this.child, this.isShown = true, this.backgroundColor, this.leading, }); final Widget? leading; final Widget child; final Color? backgroundColor; final bool isShown; @override State createState() => _PromotionBarState(); } class _PromotionBarState extends State { _PromotionBarState(); late bool isShown; @override void initState() { super.initState(); isShown = widget.isShown; } @override Widget build(BuildContext context) { return isShown ? Container( color: widget.backgroundColor, child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, crossAxisAlignment: CrossAxisAlignment.center, children: [ widget.leading ?? const SizedBox.shrink(), Expanded(child: widget.child), IconButton( onPressed: close, icon: const Icon( Icons.close, ), ), ], ), ) : const SizedBox.shrink(); } void close() => setState(() { isShown = false; }); void open() { if (isShown == true) { return; } else { setState(() => isShown = true); } } } /// The construction message that appear on /// the top of the home page. Widget inConstructionPromotionalBar = Builder( builder: (context) { return PromotionBar( backgroundColor: Theme.of(context).colorScheme.tertiaryContainer, leading: Padding( padding: const EdgeInsets.all(Paddings.small), child: Icon( Icons.build_rounded, color: Theme.of(context).colorScheme.onTertiaryContainer, ), ), child: Text( AppLocalizations.of(context)!.inConstructionPromotionalMessage, overflow: TextOverflow.ellipsis, maxLines: 3,textAlign: TextAlign.center, ), ); }, ); ================================================ FILE: lib/src/widgets/prompt_card.dart ================================================ part of 'widgets.dart'; class PromptCard extends StatefulWidget { const PromptCard({ super.key, this.constraints, this.backgroundImage, required this.title, this.subtitle, this.bottomHeight, this.backgroundColor, this.image, this.callback, }) : assert( backgroundImage == null && image != null || backgroundImage != null, """One of backgroundImage or image should be provided."""); final BoxConstraints? constraints; final ImageProvider? backgroundImage; /// A widget that is displayed on top of every thing. /// /// If image is provided, then it will replace [backgroundImage]. final Widget? image; final Widget title; final Widget? subtitle; final double? bottomHeight; final Color? backgroundColor; final VoidCallback? callback; @override State createState() => _PromptCardState(); } class _PromptCardState extends State with SingleTickerProviderStateMixin { final duration = AhlDurations.subtle; /// animation controller late AnimationController _controller; double _elevation = 5; @override void initState() { _controller = AnimationController( vsync: this, ); super.initState(); } @override void dispose() { _controller.dispose(); super.dispose(); } void _onHoverCallBack(bool isHovered) { animateZoomInOut(isHovered); elevate(isHovered); } /// setup zoom animation void animateZoomInOut(bool isHovered) { if (isHovered) { _controller.forward(); } else { // _controller.isCompleted _controller.reverse(); } } void elevate(bool isHovered) { setState(() { if (isHovered) { _elevation = 25; } else { // _controller.isCompleted _elevation = 5; } }); } @override Widget build(BuildContext context) { // todo: make it dynamic image with storage // final Reference imageRef = // storage.child('/static/sj.jpg'); // final imageUrl = imageRef.getDownloadURL(); // var image = imageRef.getData(); return Card( clipBehavior: Clip.antiAlias, elevation: _elevation, child: InkWell( onHover: _onHoverCallBack, onTap: widget.callback ?? () {}, child: Container( constraints: widget.constraints ?? BoxConstraints.loose(const Size(278, 270)), child: Stack( children: [ // FutureBuilder( // future: Future.delayed(const Duration(milliseconds: 1)), // builder: (context, snapshot) { // if (snapshot.hasData) { // return Animate( effects: [ ScaleEffect( duration: duration, begin: const Offset(1, 1), end: const Offset(1.1, 1.1), curve: Curves.bounceInOut, ), ], controller: _controller, child: widget.image ?? Container( decoration: BoxDecoration( image: DecorationImage( image: widget.backgroundImage!, fit: BoxFit.cover, ), ), ), ), // ; // } else if (snapshot.hasError) { // return Container( // decoration: BoxDecoration( // image: DecorationImage( // image: AssetImage( // AhlAssets.logoFormTypoHorizontalColoredDark), // fit: BoxFit.cover, // ), // ), // ); // } else { // return const Center(child: CircularProgressIndicator()); // } // }, // ) Align( alignment: Alignment.bottomCenter, child: Container( padding: const EdgeInsets.all(Paddings.medium), constraints: BoxConstraints.expand(height: widget.bottomHeight ?? 90), color: widget.backgroundColor ?? Theme.of(context).colorScheme.surface, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ DefaultTextStyle( overflow: TextOverflow.ellipsis, style: Theme.of(context).textTheme.headlineSmall!, child: widget.title, ), DefaultTextStyle( overflow: TextOverflow.ellipsis, style: Theme.of(context).textTheme.labelLarge!, child: widget.subtitle ?? const SizedBox.shrink(), ), ], ), ), ), ], ), ), ), ); } } ================================================ FILE: lib/src/widgets/section_title.dart ================================================ part of "widgets.dart"; class SectionTitle extends StatelessWidget { const SectionTitle({ super.key, required this.title, this.subtitle, this.titleColor, this.isUpperCase = true, this.titleStyle, this.caretColor, }); final String title; final TextStyle? titleStyle; final String? subtitle; final Color? titleColor; final Color? caretColor; final bool isUpperCase; @override Widget build(BuildContext context) { return Align( // padding: const EdgeInsets.symmetric(vertical: Paddings.huge), child: Column( children: [ Container( padding: const EdgeInsets.only( bottom: Paddings.actionSeparator, ), child: Text( (isUpperCase) ? title.toUpperCase() : title, style: titleStyle ?? resolveHeadlineTextThemeForBreakPoints( MediaQuery.of(context).size.width, context, )! .copyWith( color: titleColor ?? Colors.white, ), ), ), subtitle != null ? Container( padding: const EdgeInsets.symmetric( vertical: Paddings.listSeparator, ), child: Text( subtitle!, style: resolveBodyTextThemeForBreakPoints( MediaQuery.of(context).size.width, context, )! .copyWith(color: titleColor ?? Colors.white), ), ) : const SizedBox.shrink(), Container( padding: const EdgeInsets.symmetric( vertical: Paddings.listSeparator, ), width: 60, height: 18, color: caretColor ?? Theme.of(context).colorScheme.secondary, ), ], ), ); } } ================================================ FILE: lib/src/widgets/space_view.dart ================================================ part of 'widgets.dart'; class SpaceView extends StatelessWidget { const SpaceView({ super.key, this.headerImage, required this.children, this.useGradient = true, this.opacity, }); final ImageProvider? headerImage; final List children; final bool useGradient; final double? opacity; @override Widget build(BuildContext context) { final List children = [ // gradient Container( alignment: Alignment.center, decoration: BoxDecoration( gradient: useGradient ? LinearGradient( colors: [ Colors.transparent, AhlTheme.darkNight.withAlpha(0xFF), AhlTheme.blueNight, ], begin: Alignment.topCenter, end: Alignment.bottomCenter, stops: const [ 0, // this is the ratio of the header image 650 / 1681 * 2 / 3, 1, ], ) : null, ), // contents child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: this.children, ), ), ]; return // bk image Container( // constraints: const BoxConstraints.expand(height: 1000), decoration: headerImage != null ? BoxDecoration( // color: const Color(0xFF2e2e2e), // backgroundBlendMode: BlendMode.multiply, image: DecorationImage( opacity: opacity ?? 1, fit: BoxFit.cover, alignment: Alignment.topCenter, image: headerImage ?? AssetImage( AhlAssets.prayersSpaceCover, ), ), ) : null, child: Stack( // enableDrag: true, children: List.generate( children.length, (index) => children[index], ), ), ); } } ================================================ FILE: lib/src/widgets/widgets.dart ================================================ import 'dart:developer'; import 'dart:js_interop'; import 'package:ahl/src/pages/prayers/prayers_page.dart'; import 'package:audio_player/audio_player.dart'; import 'package:firebase_article/firebase_article.dart'; import 'package:flutter/material.dart'; import 'package:flutter_animate/flutter_animate.dart'; import 'package:gap/gap.dart'; import 'package:go_router/go_router.dart'; import 'package:url_launcher/url_launcher.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import '../../ahl_barrel.dart'; import '../localization/locale_utils.dart'; import '../pages/homepage/donation/donation_page.dart'; import '../pages/homepage/homepage.dart'; import '../pages/projects/projects_page.dart'; import '../pages/who_we_are/who_we_are.dart'; import '../theme/theme.dart' as theme; import '../theme/theme.dart'; import '../utils/breakpoint_resolver.dart'; import 'my_flutter_app_icons.dart'; import '../firebase_constants.dart'; part 'app_bar.dart'; part 'logo.dart'; part 'drawer.dart'; part 'actions.dart'; part 'promotion_bar.dart'; part 'footer.dart'; part 'prayers_request.dart'; part 'section_title.dart'; part 'prompt_card.dart'; part 'space_view.dart'; part 'forms_prompt.dart'; part 'audio_player.dart'; ================================================ FILE: pubspec.yaml ================================================ name: ahl description: A website for the community of dominican sisters at Madagascar. # Prevent accidental publishing to pub.dev. publish_to: "none" version: 1.0.2+pre-2-seo environment: sdk: ">=3.0.0 <4.0.0" dependencies: # indicator_button: # git: https://github.com/Josephincrafter/indicator_button.git firebase_article: # path: ../firebase_article git: https://github.com/Josephincrafter/firebase_article.git cloud_firestore: ^5.4.2 # cloud_functions: ^4.6.0 # firebase_analytics: ^10.8.0 # firebase_auth: ^4.16.0 firebase_core: ^3.5.0 firebase_storage: ^12.3.1 flutter: sdk: flutter flutter_bloc: ^8.1.3 flutter_localizations: sdk: flutter flutter_web_plugins: sdk: flutter flutter_markdown: ^0.7.3+1 #google_fonts: ^6.1.0 intl: any json_annotation: ^4.8.1 transparent_image: ^2.0.1 web: any equatable: ^2.0.5 formz: ^0.7.0 markdown_widget: ^2.3.2+3 provider: ^6.1.1 flame: ^1.18.0 parallax_effect: ^0.0.3 animations: ^2.0.8 flutter_animate: ^4.5.0 http: ^1.1.0 url_launcher: ^6.2.4 shared_preferences: ^2.2.3 session_storage: ^0.0.1 gap: ^3.0.1 lottie: ^3.1.2 #mouse_parallax: ^1.1.0 #google_fonts: ^6.2.0 share_plus: ^10.0.2 dotlottie_loader: ^0.0.4 responsive_builder: ^0.7.1 flutter_svg: ^2.0.10+1 go_router: ^14.2.1 just_audio: ^0.9.39 audio_service: ^0.18.15 audio_player: git: https://github.com/JosephinCrafter/audio_player.git seo_renderer: ^0.6.0 meta_seo: ^3.0.9 logger: ^2.4.0 flutter_seo: ^1.1.1 dev_dependencies: flutter_test: sdk: flutter flutter_lints: any mockito: any json_serializable: any build_runner: any fake_cloud_firestore: ^3.0.3 firebase_storage_mocks: ^0.7.0 bloc_test: ^9.1.5 flutter: uses-material-design: true # Enable generation of localized Strings from arb files. generate: true assets: # Add assets from the images directory to the application. - assets/images/ - assets/content.md - assets/animations/ fonts: - family: MyFlutterIcons fonts: - asset: assets/fonts/flutter_icons/MyFlutterIcons.ttf - family: Butler fonts: - asset: assets/fonts/butler/Butler_Regular.otf - asset: assets/fonts/butler/Butler_Ultra_Light.otf weight: 100 - asset: assets/fonts/butler/Butler_Ultra_Light.otf weight: 200 - asset: assets/fonts/butler/butler_medium.otf weight: 500 - asset: assets/fonts/butler/Butler_Bold.otf weight: 600 - asset: assets/fonts/butler/Butler_Black.otf weight: 700 - asset: assets/fonts/butler/butler_extra_bold.otf weight: 800 - family: Poppins fonts: - asset: assets/fonts/Poppins/Poppins-Thin.ttf weight: 100 - asset: assets/fonts/Poppins/Poppins-ExtraLight.ttf weight: 200 - asset: assets/fonts/Poppins/Poppins-Light.ttf weight: 300 - asset: assets/fonts/Poppins/Poppins-Regular.ttf weight: 400 - asset: assets/fonts/Poppins/Poppins-Medium.ttf weight: 500 - asset: assets/fonts/Poppins/Poppins-SemiBold.ttf weight: 600 - asset: assets/fonts/Poppins/Poppins-Bold.ttf weight: 700 - asset: assets/fonts/Poppins/Poppins-ExtraBold.ttf weight: 800 - asset: assets/fonts/Poppins/Poppins-Black.ttf weight: 900 - asset: assets/fonts/Poppins/Poppins-ThinItalic.ttf weight: 100 style: italic - asset: assets/fonts/Poppins/Poppins-ExtraLightItalic.ttf weight: 200 style: italic - asset: assets/fonts/Poppins/Poppins-LightItalic.ttf weight: 300 style: italic - asset: assets/fonts/Poppins/Poppins-Italic.ttf weight: 400 style: italic - asset: assets/fonts/Poppins/Poppins-MediumItalic.ttf weight: 500 style: italic - asset: assets/fonts/Poppins/Poppins-SemiBoldItalic.ttf weight: 600 style: italic - asset: assets/fonts/Poppins/Poppins-BoldItalic.ttf weight: 700 style: italic - asset: assets/fonts/Poppins/Poppins-ExtraBoldItalic.ttf weight: 800 style: italic - asset: assets/fonts/Poppins/Poppins-BlackItalic.ttf weight: 900 style: italic ================================================ FILE: secrets.md ================================================ ================================================ FILE: storage.rules ================================================ rules_version = '2'; // Craft rules based on data in your Firestore database // allow write: if firestore.get( // /databases/(default)/documents/users/$(request.auth.uid)).data.isAdmin; service firebase.storage { match /b/{bucket}/o { // This rule allows anyone with your Storage bucket reference to view, edit, // and delete all data in your Storage bucket. It is useful for getting // started, but it is configured to expire after 30 days because it // leaves your app open to attackers. At that time, all client // requests to your Storage bucket will be denied. // // Make sure to write security rules for your app before that time, or else // all client requests to your Storage bucket will be denied until you Update // your rules match /statics/{allPaths=**} { allow read; } match /articles/{allPaths=**} { allow read; } match /projects/{allPaths=**} { allow read; } match /prayers/{allPaths=**} { allow read; } match /novena/{allPaths=**}{ allow read; } } } ================================================ FILE: test/articles/article_view_test.dart ================================================ import "package:cloud_firestore/cloud_firestore.dart"; import "package:fake_cloud_firestore/fake_cloud_firestore.dart"; import "package:firebase_article/firebase_article.dart" as fa; import "package:firebase_storage/firebase_storage.dart"; import "package:firebase_storage_mocks/firebase_storage_mocks.dart"; FirebaseFirestore fakeFirestore = FakeFirebaseFirestore(); FirebaseStorage fakeStorage = MockFirebaseStorage(); // void main() { // /// initialize storage mocks // populate(); // testWidgets( // 'Display properly the highlighted article', // (tester) async { // Widget app = MaterialApp( // home: Scaffold( // appBar: AppBar( // title: const Text("Article View test"), // ), // body: ArticleContentPage( // isHighLight: true, // firestore: fakeFirestore, // storage: fakeStorage, // ), // ), // ); // await tester.pumpWidget(app); // expect( // find.text("This is the highLight article content."), findsOneWidget); // }, // ); // } void populate() { String articleTitle = "highLight"; fakeFirestore .doc("articles/setup") .set({fa.RepoSetUp.highLight: articleTitle}); fakeFirestore.doc("articles/$articleTitle").set({ fa.idKey: articleTitle, fa.titleKey: 'The $articleTitle Article', fa.releaseDateKey: "02/03/2024", fa.contentKey: "articles/$articleTitle/content.md", fa.relationsKey: [], }); fakeStorage.ref("articles/$articleTitle/content.md").putString( "This is the $articleTitle article content.", ); } ================================================ FILE: test/articles/articles_bloc_test.dart ================================================ import 'package:ahl/src/article_view/bloc/bloc.dart'; import 'package:ahl/src/article_view/event/event.dart'; import 'package:ahl/src/article_view/state/state.dart'; import 'package:ahl/src/firebase_constants.dart'; import 'package:firebase_article/firebase_article.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:bloc_test/bloc_test.dart'; void main() { ArticlesRepository mockRepo = ArticlesRepository(firestoreInstance: firestore); String highlightId = 'highlight'; group( 'Article bloc test', () { Article article = const Article( id: 'qui_est_laure_sabes', title: 'Qui est Laure Sabes?', releaseDate: '2024-02-04', contentPath: 'content.md', relations: [ { 'hero_header_image': 'image.png', }, ], ); setUp(() { // when(mockRepo.getHighlighted()).thenAnswer((_) { // return Future.value( // article, // ); // }); // when(mockRepo.getArticleByName(articleTitle: highlightId)) // .thenAnswer((_) { // return Future.value( // article, // ); // }); }); blocTest( 'getting highlighted article', build: () => ArticleBloc(repo: mockRepo), act: (ArticleBloc bloc) => bloc..add(const GetHighlightArticleEvent()), expect: () => [ const ArticleState( status: ArticleStatus.initial, articles: null, ), ArticleState( status: ArticleStatus.succeed, articles: {article.id: article}, ), ], ); blocTest( 'getting an id given article', build: () => ArticleBloc(repo: mockRepo), act: (bloc) => bloc.add( GetArticleByIdEvent(id: highlightId), ), expect: () => [ const ArticleState( status: ArticleStatus.initial, articles: null, ), ArticleState( status: ArticleStatus.succeed, articles: {article.id: article}, ), ], ); }, ); } ================================================ FILE: test/articles/articles_repository_test.dart ================================================ // Test on ArticleRepository class // - Responsibility: // - provide article objects to the whole app // - getArticleOfTheMonth() // ""get the highlight article of the month. // // First, it read setup document in articles collection. // Then, gather the highlighted article from setup and display it. // "" // - getArticleByName() // - foldArticles(number) // - AllArticles() // - setUp() // // Because, this class interact directly to the backend api. It's function // should return Future objects. import 'package:ahl/src/firebase_constants.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:fake_cloud_firestore/fake_cloud_firestore.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; import 'package:firebase_article/firebase_article.dart'; /// A matcher of a null article. const Article noArticle = Article( id: 'no_article', ); class MockArticlesRepository extends Mock implements ArticlesRepository {} void main() { group('Test on getArticleOfTheMonth', () { FirebaseFirestore fakeFirestore = FakeFirebaseFirestore(); ArticlesRepository repo = ArticlesRepository(firestoreInstance: fakeFirestore); test('Get highlighted article without error', () async { // add an article to firestore populate(fakeFirestore); // create a setup setupRepo(fakeFirestore, highLight: 'some_article'); // get articleOfTheMonth Article? highLight = await repo.getArticleOfTheMonth(); expect( highLight, isNotNull, ); expect(highLight!.title, 'Some Article'); fakeFirestore = FakeFirebaseFirestore(); }); // Remove setup from fakeFirestore test('Throws a UnableToGetSetup, no setup', () async { // use another fakeFirestore instead of the above fakeFirestore = FakeFirebaseFirestore(); // populate without setup populate(fakeFirestore); repo = ArticlesRepository(firestoreInstance: fakeFirestore); await expectLater( repo.getArticleOfTheMonth(), throwsA(isA())); }); }); } void populate( FirebaseFirestore fakeFirestore, { String? id, String? title, String? content, }) { var someArticle = id ?? 'some_article'; // populate the data var someArticleMap = { idKey: someArticle, titleKey: 'Some Article', contentKey: 'Some Content', }; fakeFirestore .collection(articlesCollection) .doc(someArticle) .set(someArticleMap); } void setupRepo(FirebaseFirestore fakeFirestore, {String highLight = 'some_article'}) { var setupDoc = 'setup'; var setup = { RepoSetUp.highLight: highLight, }; fakeFirestore.collection(articlesCollection).doc(setupDoc).set(setup); } ================================================ FILE: test/articles/bare_test.dart ================================================ import 'package:flutter_test/flutter_test.dart'; import 'package:flutter/material.dart'; void main() { test("bare test", () { var a = 0; var b = a; expect(a == b, true); }); testWidgets("Try a test on a widget", (widgetTester) async { String title = "App title"; Widget myApp = MaterialApp( home: Scaffold( appBar: AppBar(title: Text(title)), body: const Center( child: Text("Test App"), ), ), ); await widgetTester.pumpWidget(myApp); }); } ================================================ FILE: test/articles/collection_utils_test.dart ================================================ import 'package:ahl/src/utils/firebase_utils.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { group( "GetCollection ", () { test( 'on single element', () { String? collection = getCollection('/collection/document'); expect(collection, 'collection'); }, ); test( 'on multiple element', () { String? collection = getCollection('/collection/document/anotherCollection/document'); expect(collection, 'collection/document/anotherCollection'); }, ); test( 'no collection', () { String? collection = getCollection('document'); expect(collection, null); }, ); }, ); } ================================================ FILE: test/breakpoint_resolver_test.dart ================================================ import 'package:ahl/src/utils/breakpoint_resolver.dart'; import 'package:test/test.dart'; void main() { test( 'Breakpoint resolver test', () { final testValues = [ 'small', 'medium', 'large', 'extraLarge', 'huge', 'extraHuge' ]; final breakPoints = [ 450, 500, 820, 1100, 1500, 1920, ]; for (int i = 0; i < breakPoints.length; i++) { double constraints = breakPoints[i]; //BoxConstraints(maxWidth: breakPoints[i]); String result = resolveForBreakPoint( constraints, other: testValues.last, small: testValues[0], medium: testValues[1], large: testValues[2], extraLarge: testValues[3], huge: testValues[4], extraHuge: testValues.last, ); expect(result == testValues[i], true); } }, ); } ================================================ FILE: test/breakpoint_utils/separator_size_test.dart ================================================ import "dart:developer"; import "package:ahl/src/utils/breakpoint_resolver.dart"; import "package:flutter/material.dart"; import "package:flutter_test/flutter_test.dart"; void main() { testWidgets( 'resolveSeparatorSize function is screen size adaptive.', (WidgetTester tester) async { Widget myApp = Builder( builder: (context) { log("${resolveSeparatorSize(context)}"); return MediaQuery( data: const MediaQueryData(size: Size(320, 650)), child: Builder(builder: (context) { log("Constraints:${MediaQuery.of(context).size}, Separator Size:${resolveSeparatorSize(context)}"); return MaterialApp( home: Align( child: Text("${resolveSeparatorSize(context)}"), ), ); }), ); }, ); await tester.pumpWidget(myApp); expect(find.text('45.0'), findsOne); }, ); } ================================================ FILE: test/data_storage/firestore_test.dart ================================================ // Test the data storage mechanism and triggering from firestore. import 'package:firebase_article/firebase_article.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:fake_cloud_firestore/fake_cloud_firestore.dart'; import 'package:mockito/mockito.dart'; import '../articles/articles_repository_test.dart'; const emulatorHost = 'localhost'; const firestorePort = 46561; const storagePort = 9199; void main() async { TestWidgetsFlutterBinding.ensureInitialized(); // await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); FirebaseFirestore fakeFirestore = FakeFirebaseFirestore(); // firestore = FirebaseFirestore.instance; fakeFirestore = FakeFirebaseFirestore(); // firestore.useFirestoreEmulator(emulatorHost, firestorePort); // storage = FirebaseStorage.instance; // fakestorage = MockFirebaseStorage(); // storage.useStorageEmulator(emulatorHost, storagePort); // setup fixtures String testCollectionName = 'test'; // test document String docTest = 'DocTest'; // test data Map testData = {'title': 'A test on firebase firestore'}; /// a doc fixture Map doc = { 'id': 'leves_toi_et_marches', 'title': 'Leves toi et marches', 'content': 'articles/leves_toi_et_marches/content.md', 'releaseDate': '19/01/2024', 'relations': [ { 'type': 'articles', 'path': 'articles/carem/mercredi_des_cendres', }, ], }; group('Emulator operational verification', () { test('Write data to firestore', () async { await fakeFirestore .collection(testCollectionName) .doc(docTest) .set(testData, SetOptions(merge: true)); await fakeFirestore.doc('$testCollectionName/$docTest').get(); }); }); group( 'Test on ArticleHelper class.', () { setUp(() { setupRepo(fakeFirestore); populate( fakeFirestore, id: 'some_article_name', title: 'Some Article Title', content: 'gs://', ); }); ArticlesRepository articleHelper = ArticlesRepository(firestoreInstance: fakeFirestore); test( 'test on class method. This test should fail.', () { Future articleOfTheMonth = articleHelper.getHighlighted(); Future namedArticle = articleHelper.getArticleById(articleId: 'some_article_name'); expect(articleOfTheMonth, isNotNull); expect(namedArticle, isNotNull); }, ); test('Get raw data from cloud firestore', () { ArticlesRepository articleHelper = ArticlesRepository(firestoreInstance: fakeFirestore); Future namedArticle = articleHelper.getArticleById(articleId: 'leves_toi_et_marche'); expect(namedArticle, isNotNull); }); }, ); group( 'test on Article class.', () { test( 'Instantiate an article without argument', () { // Article article = const Article(id: 'some_article'); // var title = article.title; // var releaseDate = article.releaseDate; // var content = article.contentPath; // var relations = article.relations; // Article article1 = const Article( // id: 'title', // title: 'Title', // releaseDate: '19/01/2024', // contentPath: 'articles/some_content.md', // relations: [ // { // 'type': 'image', // 'path': 'article/some_article/image.png', // } // ], // ); Article article2 = Article.fromDoc(doc); expect(article2.title == doc[titleKey], true); expect(article2.contentPath == doc[contentKey], true); expect(article2.relations == doc[relationsKey], true); expect(article2.releaseDate, doc[releaseDateKey]); expect(article2.toDoc(), equals(doc)); }, ); }, ); } class MockArticleHelper with Mock implements ArticlesRepository {} ================================================ FILE: test/newsletter/newsletterbloc_test.dart ================================================ import 'package:bloc_test/bloc_test.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:mockito/mockito.dart'; import 'package:mockito/annotations.dart'; import 'package:ahl/src/newsletter/newsletter.dart'; // let's create the repo @GenerateNiceMocks([MockSpec()]) import 'newsletterbloc_test.mocks.dart'; /// To start a bloc test, I think we're gonna need to implement a widget and /// read from there. void main() { const String exampleEmail = 'example@email.com'; NewsletterSubscriptionRepository mockRepo = MockNewsletterSubscriptionRepository(); group( 'test on NewsletterBloc', () { setUpAll(() { when(mockRepo.status).thenAnswer((_) { return Stream.fromIterable([NewsletterSubscriptionStatus.initial]); }); }); blocTest( 'emits initial status when freshly created', build: () => NewsletterSubscriptionBloc(repo: mockRepo), act: (bloc) => bloc ..add(InitializeRequestEvent()) ..add(InitializeRequestEvent()), expect: () => [ NewsletterSubscriptionState.initial(), ], ); blocTest( 'emits loading when added an event email', build: () => NewsletterSubscriptionBloc(repo: mockRepo), act: (bloc)async { bloc.add( SubscriptionRequestEvent( email: exampleEmail, ), ); await Future.delayed( const Duration(milliseconds: 300)); }, expect: () => [ const NewsletterSubscriptionState( email: exampleEmail, status: NewsletterSubscriptionStatus.loading, error: null), const NewsletterSubscriptionState( email: exampleEmail, status: NewsletterSubscriptionStatus.success, error: null, ), ], ); }, ); } class MockNewsletterPromptBloc extends Mock implements Bloc {} ================================================ FILE: test/newsletter/newsletterbloc_test.mocks.dart ================================================ // Mocks generated by Mockito 5.4.4 from annotations // in ahl/test/newsletter/newsletterbloc_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'package:ahl/src/newsletter/newsletter.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references // ignore_for_file: deprecated_member_use // ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class /// A class which mocks [NewsletterSubscriptionRepository]. /// /// See the documentation for Mockito's code generation for more information. class MockNewsletterSubscriptionRepository extends _i1.Mock implements _i2.NewsletterSubscriptionRepository { @override _i3.Stream<_i2.NewsletterSubscriptionStatus> get status => (super.noSuchMethod( Invocation.getter(#status), returnValue: _i3.Stream<_i2.NewsletterSubscriptionStatus>.empty(), returnValueForMissingStub: _i3.Stream<_i2.NewsletterSubscriptionStatus>.empty(), ) as _i3.Stream<_i2.NewsletterSubscriptionStatus>); @override Map data(String? email) => (super.noSuchMethod( Invocation.method( #data, [email], ), returnValue: {}, returnValueForMissingStub: {}, ) as Map); @override void initialize() => super.noSuchMethod( Invocation.method( #initialize, [], ), returnValueForMissingStub: null, ); @override _i3.Future subscribe({required String? email}) => (super.noSuchMethod( Invocation.method( #subscribe, [], {#email: email}, ), returnValue: _i3.Future.value(), returnValueForMissingStub: _i3.Future.value(), ) as _i3.Future); } ================================================ FILE: test/prayer_request/bloc_test.dart ================================================ import 'package:ahl/src/prayers_intention/prayer_request.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:bloc_test/bloc_test.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:fake_cloud_firestore/fake_cloud_firestore.dart'; /// PrayerRequestState: /// /// This class is the bloc state. /// /// - It need a [PrayerRequest] object as [PrayerRequestState.request] /// that can be null on [PrayerRequestState.initial] /// - A [PrayerRequestStatus] object as [PrayerRequestState.currentStatus] that /// can't be null. /// PrayerRequestBloc: /// /// The bloc class for PrayerRequest management. /// /// It handles these events: /// - [PrayerRequestInitializeEvent] for initialization, and emit a [PrayerRequestState.initial] /// - [PrayerRequestFilledDateEvent] when date is gotten from the ui, /// emit a [PrayerRequestState.fillDate] /// - [PrayerRequestFilledFormEvent] when prayer form is gotten from the ui, /// emit a [PrayerRequestState.fillForm] /// These event updates the current [PrayerRequest] object and always change /// [PrayerRequestState.currentStatus] to the appropriate one. /// /// [on] is called on the initialization of the bloc. /// It emits a [PrayerRequestState.initial] at this time. /// PrayerRequestStatus: /// /// This status class can have 4 values: /// - [PrayerRequestStatus.initial] /// - [PrayerRequestStatus.filledDate] /// - [PrayerRequestStatus.filledForm] /// - [PrayerRequestStatus.complete] /// PrayerRequestEvent: /// /// Events are responsible of sending new information to change current state. /// For this purpose, we need 4 event like status: /// - [PrayerRequestInitializeEvent] /// - [PrayerRequestFilledDateEvent] /// - [PrayerRequestFilledFormEvent] /// - [PrayerRequestCompletedEvent] void main() { FirebaseFirestore firestore = FakeFirebaseFirestore(); PrayerRequestRepo repo = PrayerRequestRepo(db: firestore); blocTest('a bloc that emit an initial state of PrayerIntentionBloc', build: () => PrayerRequestBloc(repo), // act: (bloc) => bloc.add(PrayerRequestInitializeEvent()), expect: () => [ /// The initial state is clean and have not any value in /// PrayerRequest. /// /// It will set the [prayerRequest] object in state to null. isA(), ]); group( 'test on bloc filled interaction', () { var email = 'razafindrakotojosephin@gmail.com'; var prayer = 'some prayer'; var name = 'Josephin'; var date = DateTime.now(); var prayerType = PrayerType.mass; blocTest( 'a bloc that emit a filled state of PrayerIntentionBloc', build: () => PrayerRequestBloc(repo), act: (bloc) => bloc.add( PrayerRequestFilledFormEvent( email: email, prayer: prayer, name: name, ), ), expect: () => [ isA(), isA(), ], ); blocTest( 'a bloc that emit a request with all form', build: () => PrayerRequestBloc(repo), act: (bloc) => bloc.add( PrayerRequestFilledDateEvent( date: date, prayerType: prayerType, ), ), expect: () => [ isA(), isA(), ], ); blocTest( 'a bloc that emit a full request', build: () => PrayerRequestBloc(repo), act: (bloc) => bloc.add( PrayerRequestCompletedEvent( email: email, prayer: prayer, name: name, date: date, prayerType: prayerType, ), ), expect: () => [ isA(), isA(), ], ); }, ); } ================================================ FILE: test/prayer_request/repo_test.dart ================================================ import 'package:ahl/src/prayers_intention/prayer_request.dart'; import 'package:fake_cloud_firestore/fake_cloud_firestore.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { test('testing repository', () { PrayerRequest request = PrayerRequest( email: 'email', dateTime: DateTime.now(), prayer: 'prayer', prayerType: PrayerType.rosary, ); PrayerRequestRepo repo = PrayerRequestRepo( db: FakeFirebaseFirestore(), ); repo.write(request); }); } ================================================ FILE: test/project_bloc/project_bloc_test.dart ================================================ import 'package:ahl/src/article_view/state/state.dart'; import 'package:ahl/src/project_space/bloc.dart'; import 'package:ahl/src/project_space/model.dart'; import 'package:bloc_test/bloc_test.dart'; import 'package:flutter_test/flutter_test.dart'; import '../articles/article_view_test.dart'; void main() { group('ProjectBloc test', () { blocTest("initialize bloc", build: () => ProjectBloc(firebaseFirestore: fakeFirestore), expect: () => [ isA>() ] ); }); } ================================================ FILE: test/project_page_view/build_relations_test.dart ================================================ ================================================ FILE: test/unit_test.dart ================================================ // This is an example unit test. // // A unit test tests a single function, method, or class. To learn more about // writing unit tests, visit // https://flutter.dev/docs/cookbook/testing/unit/introduction import 'package:ahl/src/widgets/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { group('Plus Operator', () { test('should add two numbers together', () { expect(1 + 1, 2); }); }); group( 'actions test', () { /// The [ActionsLists] contain a static member [ActionsLists.actions] that is /// [Map]. The key represents the name of the actions. And the /// corresponding value is the route name of the action. /// /// This [Map] is used to set up the [AppBar] actions and [Footer] actions. /// /// This test try to get the member. This is the only one responsibility of the class. test( 'get action and rootNames from the static action list', () { var actions = ActionsLists.actions; expect(actions.isNotEmpty, true); }, ); }, ); } ================================================ FILE: test/widget_test.dart ================================================ // This is an example Flutter widget test. // // To perform an interaction with a widget in your test, use the WidgetTester // utility in the flutter_test package. For example, you can send tap and scroll // gestures. You can also use WidgetTester to find child widgets in the widget // tree, read text, and verify that the values of widget properties are correct. // // Visit https://flutter.dev/docs/cookbook/testing/widget/introduction for // more information about Widget testing. import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { group('MyWidget', () { testWidgets('should display a string of text', (WidgetTester tester) async { // Define a Widget const myWidget = MaterialApp( home: Scaffold( body: Text('Hello'), ), ); // Build myWidget and trigger a frame. await tester.pumpWidget(myWidget); // Verify myWidget shows some text expect(find.byType(Text), findsOneWidget); }); }); } ================================================ FILE: untranslated_message.txt ================================================ { "en": [ "slogan", "heroHeaderSubtitle", "articles", "read", "thanksForRegistering", "invalidEmail", "cantBeEmpty", "unknownError", "priesIntention", "proverb", "priersInvitation", "nameAndFirstName", "priers", "sendPray", "optional", "yourPrayer", "prayerRequestInvitation", "whenWePray", "wePrayOn", "prayingDate", "priersOf", "mass", "rosary", "vesper", "choiceMass", "choiceRosary", "choiceVesper", "projectsSpace", "projectsSpaceSubtitle", "projectsSpaceIntroduction", "ourPartners", "inProgress", "waitingBudget", "done", "supportProject", "realized", "initiative", "projectSpaceTitle", "projectLongTitle", "projectSpaceDescription", "january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december", "whoWeAre", "domSisters", "allArticles", "share", "todaysRosary", "rosarySlogan", "getNotified", "allProjects", "devInProgress", "prayerSpace", "todaySaint", "office", "novena", "availableSoon", "listenPodcast" ] } ================================================ FILE: web/flutter_bootstrap.js ================================================ /// This script avoid cache conflict when the old version is present in cache /// but a new version is already deployed. /// The mechanism is simple: /// - it compares the cached version of the website and the online one by making a real request console.log("Entering version check"); const MANIFEST = "flutter-app-manifest"; const TEMP = "flutter-temp-cache"; const CACHE_NAME = "flutter-app-cache"; const CORE = [ "main.dart.js", "index.html", "flutter_bootstrap.js", "assets/AssetManifest.bin.json", "assets/FontManifest.json", ]; async function getVersion({isOnline=false}) { console.log("Getting online version..."); /// Get online version var version = []; try { var response = await fetch(new Request("version.json",{ cache: isOnline ? "no-store" : "only-if-cached", mode:"same-origin", })); if (response.ok) { var data = await response.json(); console.log('Successfully got version.json', isOnline ? " online." : " from cache.", "\n version:", data); // Handle data version[0] = data.version; version[1] = data.build_number; console.log(isOnline ? "Online" : "Cache", " version is", version); } else { // handle case where there's no cached response console.log("No version.json file got from ", isOnline ? "online" : "cache", " resource", response); } } catch (error) { // Handling error console.log("Error getting ", isOnline ? " online" : " local", " version.json:", error); return; } console.log("[getVersion] Version is:", version); return version; } async function checkCache() { var onlineVersion = await getVersion({ isOnline: true }); var cachedVersion = await getVersion({ isOnline: false }); console.log("Online version is :", onlineVersion); console.log("Cached version is :", cachedVersion); if (onlineVersion && cachedVersion) { if (onlineVersion != cachedVersion) { /// In case the two version is different /// empty cache console.log("Clearing cache"); await caches.delete(MANIFEST); await caches.delete(CACHE_NAME); await caches.delete(TEMP); } else { console.log("The app is up to date."); } } } (async () => { await checkCache(); })(); {{flutter_js}} {{flutter_build_config}} const searchParams = new URLSearchParams(window.location.search); const renderer = searchParams.get('renderer'); const userConfig = renderer ? {'renderer': renderer} : {}; _flutter.loader.load({config: userConfig, serviceWorkerSettings: { serviceWorkerVersion: {{flutter_service_worker_version}}, }, }); ================================================ FILE: web/google-site-verification=zW71m6kfnZRv8zRIyqnpIJgMvlVlE0tK1aLMdqrTojg.txt ================================================ google-site-verification=zW71m6kfnZRv8zRIyqnpIJgMvlVlE0tK1aLMdqrTojg ================================================ FILE: web/google91970a171ec523e2.html ================================================ google-site-verification: google91970a171ec523e2.html ================================================ FILE: web/index.html ================================================ Aujourd'hui l'avenir | Soeurs de Notre Dame de la Délivrande Madagascar
Ahl Logo
================================================ FILE: web/js/lottie.js ================================================ "undefined" != typeof navigator && (function (t, e) { "object" == typeof exports && "undefined" != typeof module ? (module.exports = e()) : "function" == typeof define && define.amd ? define(e) : ((t = "undefined" != typeof globalThis ? globalThis : t || self).lottie = e()); })(this, function () { "use strict"; var svgNS = "http://www.w3.org/2000/svg", locationHref = "", _useWebWorker = !1, initialDefaultFrame = -999999, setWebWorker = function (t) { _useWebWorker = !!t; }, getWebWorker = function () { return _useWebWorker; }, setLocationHref = function (t) { locationHref = t; }, getLocationHref = function () { return locationHref; }; function createTag(t) { return document.createElement(t); } function extendPrototype(t, e) { var i, r, s = t.length; for (i = 0; i < s; i += 1) for (var a in (r = t[i].prototype)) Object.prototype.hasOwnProperty.call(r, a) && (e.prototype[a] = r[a]); } function getDescriptor(t, e) { return Object.getOwnPropertyDescriptor(t, e); } function createProxyFunction(t) { function e() {} return (e.prototype = t), e; } var audioControllerFactory = (function () { function t(t) { (this.audios = []), (this.audioFactory = t), (this._volume = 1), (this._isMuted = !1); } return ( (t.prototype = { addAudio: function (t) { this.audios.push(t); }, pause: function () { var t, e = this.audios.length; for (t = 0; t < e; t += 1) this.audios[t].pause(); }, resume: function () { var t, e = this.audios.length; for (t = 0; t < e; t += 1) this.audios[t].resume(); }, setRate: function (t) { var e, i = this.audios.length; for (e = 0; e < i; e += 1) this.audios[e].setRate(t); }, createAudio: function (t) { return this.audioFactory ? this.audioFactory(t) : window.Howl ? new window.Howl({ src: [t] }) : { isPlaying: !1, play: function () { this.isPlaying = !0; }, seek: function () { this.isPlaying = !1; }, playing: function () {}, rate: function () {}, setVolume: function () {}, }; }, setAudioFactory: function (t) { this.audioFactory = t; }, setVolume: function (t) { (this._volume = t), this._updateVolume(); }, mute: function () { (this._isMuted = !0), this._updateVolume(); }, unmute: function () { (this._isMuted = !1), this._updateVolume(); }, getVolume: function () { return this._volume; }, _updateVolume: function () { var t, e = this.audios.length; for (t = 0; t < e; t += 1) this.audios[t].volume(this._volume * (this._isMuted ? 0 : 1)); }, }), function () { return new t(); } ); })(), createTypedArray = (function () { function t(t, e) { var i, r = 0, s = []; switch (t) { case "int16": case "uint8c": i = 1; break; default: i = 1.1; } for (r = 0; r < e; r += 1) s.push(i); return s; } return "function" == typeof Uint8ClampedArray && "function" == typeof Float32Array ? function (e, i) { return "float32" === e ? new Float32Array(i) : "int16" === e ? new Int16Array(i) : "uint8c" === e ? new Uint8ClampedArray(i) : t(e, i); } : t; })(); function createSizedArray(t) { return Array.apply(null, { length: t }); } function _typeof$6(t) { return ( (_typeof$6 = "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; }), _typeof$6(t) ); } var subframeEnabled = !0, expressionsPlugin = null, expressionsInterfaces = null, idPrefix$1 = "", isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent), _shouldRoundValues = !1, bmPow = Math.pow, bmSqrt = Math.sqrt, bmFloor = Math.floor, bmMax = Math.max, bmMin = Math.min, BMMath = {}; function ProjectInterface$1() { return {}; } !(function () { var t, e = [ "abs", "acos", "acosh", "asin", "asinh", "atan", "atanh", "atan2", "ceil", "cbrt", "expm1", "clz32", "cos", "cosh", "exp", "floor", "fround", "hypot", "imul", "log", "log1p", "log2", "log10", "max", "min", "pow", "random", "round", "sign", "sin", "sinh", "sqrt", "tan", "tanh", "trunc", "E", "LN10", "LN2", "LOG10E", "LOG2E", "PI", "SQRT1_2", "SQRT2", ], i = e.length; for (t = 0; t < i; t += 1) BMMath[e[t]] = Math[e[t]]; })(), (BMMath.random = Math.random), (BMMath.abs = function (t) { if ("object" === _typeof$6(t) && t.length) { var e, i = createSizedArray(t.length), r = t.length; for (e = 0; e < r; e += 1) i[e] = Math.abs(t[e]); return i; } return Math.abs(t); }); var defaultCurveSegments = 150, degToRads = Math.PI / 180, roundCorner = 0.5519; function roundValues(t) { _shouldRoundValues = !!t; } function bmRnd(t) { return _shouldRoundValues ? Math.round(t) : t; } function styleDiv(t) { (t.style.position = "absolute"), (t.style.top = 0), (t.style.left = 0), (t.style.display = "block"), (t.style.transformOrigin = "0 0"), (t.style.webkitTransformOrigin = "0 0"), (t.style.backfaceVisibility = "visible"), (t.style.webkitBackfaceVisibility = "visible"), (t.style.transformStyle = "preserve-3d"), (t.style.webkitTransformStyle = "preserve-3d"), (t.style.mozTransformStyle = "preserve-3d"); } function BMEnterFrameEvent(t, e, i, r) { (this.type = t), (this.currentTime = e), (this.totalTime = i), (this.direction = r < 0 ? -1 : 1); } function BMCompleteEvent(t, e) { (this.type = t), (this.direction = e < 0 ? -1 : 1); } function BMCompleteLoopEvent(t, e, i, r) { (this.type = t), (this.currentLoop = i), (this.totalLoops = e), (this.direction = r < 0 ? -1 : 1); } function BMSegmentStartEvent(t, e, i) { (this.type = t), (this.firstFrame = e), (this.totalFrames = i); } function BMDestroyEvent(t, e) { (this.type = t), (this.target = e); } function BMRenderFrameErrorEvent(t, e) { (this.type = "renderFrameError"), (this.nativeError = t), (this.currentTime = e); } function BMConfigErrorEvent(t) { (this.type = "configError"), (this.nativeError = t); } function BMAnimationConfigErrorEvent(t, e) { (this.type = t), (this.nativeError = e); } var createElementID = ((_count = 0), function () { return idPrefix$1 + "__lottie_element_" + (_count += 1); }), _count; function HSVtoRGB(t, e, i) { var r, s, a, n, o, h, l, p; switch ( ((h = i * (1 - e)), (l = i * (1 - (o = 6 * t - (n = Math.floor(6 * t))) * e)), (p = i * (1 - (1 - o) * e)), n % 6) ) { case 0: (r = i), (s = p), (a = h); break; case 1: (r = l), (s = i), (a = h); break; case 2: (r = h), (s = i), (a = p); break; case 3: (r = h), (s = l), (a = i); break; case 4: (r = p), (s = h), (a = i); break; case 5: (r = i), (s = h), (a = l); } return [r, s, a]; } function RGBtoHSV(t, e, i) { var r, s = Math.max(t, e, i), a = Math.min(t, e, i), n = s - a, o = 0 === s ? 0 : n / s, h = s / 255; switch (s) { case a: r = 0; break; case t: (r = e - i + n * (e < i ? 6 : 0)), (r /= 6 * n); break; case e: (r = i - t + 2 * n), (r /= 6 * n); break; case i: (r = t - e + 4 * n), (r /= 6 * n); } return [r, o, h]; } function addSaturationToRGB(t, e) { var i = RGBtoHSV(255 * t[0], 255 * t[1], 255 * t[2]); return ( (i[1] += e), i[1] > 1 ? (i[1] = 1) : i[1] <= 0 && (i[1] = 0), HSVtoRGB(i[0], i[1], i[2]) ); } function addBrightnessToRGB(t, e) { var i = RGBtoHSV(255 * t[0], 255 * t[1], 255 * t[2]); return ( (i[2] += e), i[2] > 1 ? (i[2] = 1) : i[2] < 0 && (i[2] = 0), HSVtoRGB(i[0], i[1], i[2]) ); } function addHueToRGB(t, e) { var i = RGBtoHSV(255 * t[0], 255 * t[1], 255 * t[2]); return ( (i[0] += e / 360), i[0] > 1 ? (i[0] -= 1) : i[0] < 0 && (i[0] += 1), HSVtoRGB(i[0], i[1], i[2]) ); } var rgbToHex = (function () { var t, e, i = []; for (t = 0; t < 256; t += 1) (e = t.toString(16)), (i[t] = 1 === e.length ? "0" + e : e); return function (t, e, r) { return ( t < 0 && (t = 0), e < 0 && (e = 0), r < 0 && (r = 0), "#" + i[t] + i[e] + i[r] ); }; })(), setSubframeEnabled = function (t) { subframeEnabled = !!t; }, getSubframeEnabled = function () { return subframeEnabled; }, setExpressionsPlugin = function (t) { expressionsPlugin = t; }, getExpressionsPlugin = function () { return expressionsPlugin; }, setExpressionInterfaces = function (t) { expressionsInterfaces = t; }, getExpressionInterfaces = function () { return expressionsInterfaces; }, setDefaultCurveSegments = function (t) { defaultCurveSegments = t; }, getDefaultCurveSegments = function () { return defaultCurveSegments; }, setIdPrefix = function (t) { idPrefix$1 = t; }, getIdPrefix = function () { return idPrefix$1; }; function createNS(t) { return document.createElementNS(svgNS, t); } function _typeof$5(t) { return ( (_typeof$5 = "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; }), _typeof$5(t) ); } var dataManager = (function () { var t, e, i = 1, r = [], s = { onmessage: function () {}, postMessage: function (e) { t({ data: e }); }, }, a = { postMessage: function (t) { s.onmessage({ data: t }); }, }; function n() { e || ((e = (function (e) { if (window.Worker && window.Blob && getWebWorker()) { var i = new Blob( ["var _workerSelf = self; self.onmessage = ", e.toString()], { type: "text/javascript" } ), r = URL.createObjectURL(i); return new Worker(r); } return (t = e), s; })(function (t) { if ( (a.dataManager || (a.dataManager = (function () { function t(s, a) { var n, o, h, l, p, m, c = s.length; for (o = 0; o < c; o += 1) if ("ks" in (n = s[o]) && !n.completed) { if (((n.completed = !0), n.hasMask)) { var d = n.masksProperties; for (l = d.length, h = 0; h < l; h += 1) if (d[h].pt.k.i) r(d[h].pt.k); else for (m = d[h].pt.k.length, p = 0; p < m; p += 1) d[h].pt.k[p].s && r(d[h].pt.k[p].s[0]), d[h].pt.k[p].e && r(d[h].pt.k[p].e[0]); } 0 === n.ty ? ((n.layers = e(n.refId, a)), t(n.layers, a)) : 4 === n.ty ? i(n.shapes) : 5 === n.ty && f(n); } } function e(t, e) { var i = (function (t, e) { for (var i = 0, r = e.length; i < r; ) { if (e[i].id === t) return e[i]; i += 1; } return null; })(t, e); return i ? i.layers.__used ? JSON.parse(JSON.stringify(i.layers)) : ((i.layers.__used = !0), i.layers) : null; } function i(t) { var e, s, a; for (e = t.length - 1; e >= 0; e -= 1) if ("sh" === t[e].ty) if (t[e].ks.k.i) r(t[e].ks.k); else for (a = t[e].ks.k.length, s = 0; s < a; s += 1) t[e].ks.k[s].s && r(t[e].ks.k[s].s[0]), t[e].ks.k[s].e && r(t[e].ks.k[s].e[0]); else "gr" === t[e].ty && i(t[e].it); } function r(t) { var e, i = t.i.length; for (e = 0; e < i; e += 1) (t.i[e][0] += t.v[e][0]), (t.i[e][1] += t.v[e][1]), (t.o[e][0] += t.v[e][0]), (t.o[e][1] += t.v[e][1]); } function s(t, e) { var i = e ? e.split(".") : [100, 100, 100]; return ( t[0] > i[0] || (!(i[0] > t[0]) && (t[1] > i[1] || (!(i[1] > t[1]) && (t[2] > i[2] || (!(i[2] > t[2]) && null))))) ); } var a, n = (function () { var t = [4, 4, 14]; function e(t) { var e, i, r, s = t.length; for (e = 0; e < s; e += 1) 5 === t[e].ty && ((r = void 0), (r = (i = t[e]).t.d), (i.t.d = { k: [{ s: r, t: 0 }] })); } return function (i) { if (s(t, i.v) && (e(i.layers), i.assets)) { var r, a = i.assets.length; for (r = 0; r < a; r += 1) i.assets[r].layers && e(i.assets[r].layers); } }; })(), o = ((a = [4, 7, 99]), function (t) { if (t.chars && !s(a, t.v)) { var e, r = t.chars.length; for (e = 0; e < r; e += 1) { var n = t.chars[e]; n.data && n.data.shapes && (i(n.data.shapes), (n.data.ip = 0), (n.data.op = 99999), (n.data.st = 0), (n.data.sr = 1), (n.data.ks = { p: { k: [0, 0], a: 0 }, s: { k: [100, 100], a: 0 }, a: { k: [0, 0], a: 0 }, r: { k: 0, a: 0 }, o: { k: 100, a: 0 }, }), t.chars[e].t || (n.data.shapes.push({ ty: "no" }), n.data.shapes[0].it.push({ p: { k: [0, 0], a: 0 }, s: { k: [100, 100], a: 0 }, a: { k: [0, 0], a: 0 }, r: { k: 0, a: 0 }, o: { k: 100, a: 0 }, sk: { k: 0, a: 0 }, sa: { k: 0, a: 0 }, ty: "tr", }))); } } }), h = (function () { var t = [5, 7, 15]; function e(t) { var e, i, r = t.length; for (e = 0; e < r; e += 1) 5 === t[e].ty && ((i = void 0), "number" == typeof (i = t[e].t.p).a && (i.a = { a: 0, k: i.a }), "number" == typeof i.p && (i.p = { a: 0, k: i.p }), "number" == typeof i.r && (i.r = { a: 0, k: i.r })); } return function (i) { if (s(t, i.v) && (e(i.layers), i.assets)) { var r, a = i.assets.length; for (r = 0; r < a; r += 1) i.assets[r].layers && e(i.assets[r].layers); } }; })(), l = (function () { var t = [4, 1, 9]; function e(t) { var i, r, s, a = t.length; for (i = 0; i < a; i += 1) if ("gr" === t[i].ty) e(t[i].it); else if ("fl" === t[i].ty || "st" === t[i].ty) if (t[i].c.k && t[i].c.k[0].i) for (s = t[i].c.k.length, r = 0; r < s; r += 1) t[i].c.k[r].s && ((t[i].c.k[r].s[0] /= 255), (t[i].c.k[r].s[1] /= 255), (t[i].c.k[r].s[2] /= 255), (t[i].c.k[r].s[3] /= 255)), t[i].c.k[r].e && ((t[i].c.k[r].e[0] /= 255), (t[i].c.k[r].e[1] /= 255), (t[i].c.k[r].e[2] /= 255), (t[i].c.k[r].e[3] /= 255)); else (t[i].c.k[0] /= 255), (t[i].c.k[1] /= 255), (t[i].c.k[2] /= 255), (t[i].c.k[3] /= 255); } function i(t) { var i, r = t.length; for (i = 0; i < r; i += 1) 4 === t[i].ty && e(t[i].shapes); } return function (e) { if (s(t, e.v) && (i(e.layers), e.assets)) { var r, a = e.assets.length; for (r = 0; r < a; r += 1) e.assets[r].layers && i(e.assets[r].layers); } }; })(), p = (function () { var t = [4, 4, 18]; function e(t) { var i, r, s; for (i = t.length - 1; i >= 0; i -= 1) if ("sh" === t[i].ty) if (t[i].ks.k.i) t[i].ks.k.c = t[i].closed; else for (s = t[i].ks.k.length, r = 0; r < s; r += 1) t[i].ks.k[r].s && (t[i].ks.k[r].s[0].c = t[i].closed), t[i].ks.k[r].e && (t[i].ks.k[r].e[0].c = t[i].closed); else "gr" === t[i].ty && e(t[i].it); } function i(t) { var i, r, s, a, n, o, h = t.length; for (r = 0; r < h; r += 1) { if ((i = t[r]).hasMask) { var l = i.masksProperties; for (a = l.length, s = 0; s < a; s += 1) if (l[s].pt.k.i) l[s].pt.k.c = l[s].cl; else for ( o = l[s].pt.k.length, n = 0; n < o; n += 1 ) l[s].pt.k[n].s && (l[s].pt.k[n].s[0].c = l[s].cl), l[s].pt.k[n].e && (l[s].pt.k[n].e[0].c = l[s].cl); } 4 === i.ty && e(i.shapes); } } return function (e) { if (s(t, e.v) && (i(e.layers), e.assets)) { var r, a = e.assets.length; for (r = 0; r < a; r += 1) e.assets[r].layers && i(e.assets[r].layers); } }; })(); function f(t) { 0 === t.t.a.length && t.t.p; } var m = { completeData: function (i) { i.__complete || (l(i), n(i), o(i), h(i), p(i), t(i.layers, i.assets), (function (i, r) { if (i) { var s = 0, a = i.length; for (s = 0; s < a; s += 1) 1 === i[s].t && ((i[s].data.layers = e(i[s].data.refId, r)), t(i[s].data.layers, r)); } })(i.chars, i.assets), (i.__complete = !0)); }, }; return ( (m.checkColors = l), (m.checkChars = o), (m.checkPathProperties = h), (m.checkShapes = p), (m.completeLayers = t), m ); })()), a.assetLoader || (a.assetLoader = (function () { function t(t) { var e = t.getResponseHeader("content-type"); return (e && "json" === t.responseType && -1 !== e.indexOf("json")) || (t.response && "object" === _typeof$5(t.response)) ? t.response : t.response && "string" == typeof t.response ? JSON.parse(t.response) : t.responseText ? JSON.parse(t.responseText) : null; } return { load: function (e, i, r, s) { var a, n = new XMLHttpRequest(); try { n.responseType = "json"; } catch (t) {} n.onreadystatechange = function () { if (4 === n.readyState) if (200 === n.status) (a = t(n)), r(a); else try { (a = t(n)), r(a); } catch (t) { s && s(t); } }; try { n.open(["G", "E", "T"].join(""), e, !0); } catch (t) { n.open(["G", "E", "T"].join(""), i + "/" + e, !0); } n.send(); }, }; })()), "loadAnimation" === t.data.type) ) a.assetLoader.load( t.data.path, t.data.fullPath, function (e) { a.dataManager.completeData(e), a.postMessage({ id: t.data.id, payload: e, status: "success", }); }, function () { a.postMessage({ id: t.data.id, status: "error" }); } ); else if ("complete" === t.data.type) { var e = t.data.animation; a.dataManager.completeData(e), a.postMessage({ id: t.data.id, payload: e, status: "success", }); } else "loadData" === t.data.type && a.assetLoader.load( t.data.path, t.data.fullPath, function (e) { a.postMessage({ id: t.data.id, payload: e, status: "success", }); }, function () { a.postMessage({ id: t.data.id, status: "error" }); } ); })), (e.onmessage = function (t) { var e = t.data, i = e.id, s = r[i]; (r[i] = null), "success" === e.status ? s.onComplete(e.payload) : s.onError && s.onError(); })); } function o(t, e) { var s = "processId_" + (i += 1); return (r[s] = { onComplete: t, onError: e }), s; } return { loadAnimation: function (t, i, r) { n(); var s = o(i, r); e.postMessage({ type: "loadAnimation", path: t, fullPath: window.location.origin + window.location.pathname, id: s, }); }, loadData: function (t, i, r) { n(); var s = o(i, r); e.postMessage({ type: "loadData", path: t, fullPath: window.location.origin + window.location.pathname, id: s, }); }, completeAnimation: function (t, i, r) { n(); var s = o(i, r); e.postMessage({ type: "complete", animation: t, id: s }); }, }; })(), ImagePreloader = (function () { var t = (function () { var t = createTag("canvas"); (t.width = 1), (t.height = 1); var e = t.getContext("2d"); return (e.fillStyle = "rgba(0,0,0,0)"), e.fillRect(0, 0, 1, 1), t; })(); function e() { (this.loadedAssets += 1), this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages && this.imagesLoadedCb && this.imagesLoadedCb(null); } function i() { (this.loadedFootagesCount += 1), this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages && this.imagesLoadedCb && this.imagesLoadedCb(null); } function r(t, e, i) { var r = ""; if (t.e) r = t.p; else if (e) { var s = t.p; -1 !== s.indexOf("images/") && (s = s.split("/")[1]), (r = e + s); } else (r = i), (r += t.u ? t.u : ""), (r += t.p); return r; } function s(t) { var e = 0, i = setInterval( function () { (t.getBBox().width || e > 500) && (this._imageLoaded(), clearInterval(i)), (e += 1); }.bind(this), 50 ); } function a(t) { var e = { assetData: t }, i = r(t, this.assetsPath, this.path); return ( dataManager.loadData( i, function (t) { (e.img = t), this._footageLoaded(); }.bind(this), function () { (e.img = {}), this._footageLoaded(); }.bind(this) ), e ); } function n() { (this._imageLoaded = e.bind(this)), (this._footageLoaded = i.bind(this)), (this.testImageLoaded = s.bind(this)), (this.createFootageData = a.bind(this)), (this.assetsPath = ""), (this.path = ""), (this.totalImages = 0), (this.totalFootages = 0), (this.loadedAssets = 0), (this.loadedFootagesCount = 0), (this.imagesLoadedCb = null), (this.images = []); } return ( (n.prototype = { loadAssets: function (t, e) { var i; this.imagesLoadedCb = e; var r = t.length; for (i = 0; i < r; i += 1) t[i].layers || (t[i].t && "seq" !== t[i].t ? 3 === t[i].t && ((this.totalFootages += 1), this.images.push(this.createFootageData(t[i]))) : ((this.totalImages += 1), this.images.push(this._createImageData(t[i])))); }, setAssetsPath: function (t) { this.assetsPath = t || ""; }, setPath: function (t) { this.path = t || ""; }, loadedImages: function () { return this.totalImages === this.loadedAssets; }, loadedFootages: function () { return this.totalFootages === this.loadedFootagesCount; }, destroy: function () { (this.imagesLoadedCb = null), (this.images.length = 0); }, getAsset: function (t) { for (var e = 0, i = this.images.length; e < i; ) { if (this.images[e].assetData === t) return this.images[e].img; e += 1; } return null; }, createImgData: function (e) { var i = r(e, this.assetsPath, this.path), s = createTag("img"); (s.crossOrigin = "anonymous"), s.addEventListener("load", this._imageLoaded, !1), s.addEventListener( "error", function () { (a.img = t), this._imageLoaded(); }.bind(this), !1 ), (s.src = i); var a = { img: s, assetData: e }; return a; }, createImageData: function (e) { var i = r(e, this.assetsPath, this.path), s = createNS("image"); isSafari ? this.testImageLoaded(s) : s.addEventListener("load", this._imageLoaded, !1), s.addEventListener( "error", function () { (a.img = t), this._imageLoaded(); }.bind(this), !1 ), s.setAttributeNS("http://www.w3.org/1999/xlink", "href", i), this._elementHelper.append ? this._elementHelper.append(s) : this._elementHelper.appendChild(s); var a = { img: s, assetData: e }; return a; }, imageLoaded: e, footageLoaded: i, setCacheType: function (t, e) { "svg" === t ? ((this._elementHelper = e), (this._createImageData = this.createImageData.bind(this))) : (this._createImageData = this.createImgData.bind(this)); }, }), n ); })(); function BaseEvent() {} BaseEvent.prototype = { triggerEvent: function (t, e) { if (this._cbs[t]) for (var i = this._cbs[t], r = 0; r < i.length; r += 1) i[r](e); }, addEventListener: function (t, e) { return ( this._cbs[t] || (this._cbs[t] = []), this._cbs[t].push(e), function () { this.removeEventListener(t, e); }.bind(this) ); }, removeEventListener: function (t, e) { if (e) { if (this._cbs[t]) { for (var i = 0, r = this._cbs[t].length; i < r; ) this._cbs[t][i] === e && (this._cbs[t].splice(i, 1), (i -= 1), (r -= 1)), (i += 1); this._cbs[t].length || (this._cbs[t] = null); } } else this._cbs[t] = null; }, }; var markerParser = (function () { function t(t) { for ( var e, i = t.split("\r\n"), r = {}, s = 0, a = 0; a < i.length; a += 1 ) 2 === (e = i[a].split(":")).length && ((r[e[0]] = e[1].trim()), (s += 1)); if (0 === s) throw new Error(); return r; } return function (e) { for (var i = [], r = 0; r < e.length; r += 1) { var s = e[r], a = { time: s.tm, duration: s.dr }; try { a.payload = JSON.parse(e[r].cm); } catch (i) { try { a.payload = t(e[r].cm); } catch (t) { a.payload = { name: e[r].cm }; } } i.push(a); } return i; }; })(), ProjectInterface = (function () { function t(t) { this.compositions.push(t); } return function () { function e(t) { for (var e = 0, i = this.compositions.length; e < i; ) { if ( this.compositions[e].data && this.compositions[e].data.nm === t ) return ( this.compositions[e].prepareFrame && this.compositions[e].data.xt && this.compositions[e].prepareFrame(this.currentFrame), this.compositions[e].compInterface ); e += 1; } return null; } return ( (e.compositions = []), (e.currentFrame = 0), (e.registerComposition = t), e ); }; })(), renderers = {}, registerRenderer = function (t, e) { renderers[t] = e; }; function getRenderer(t) { return renderers[t]; } function getRegisteredRenderer() { if (renderers.canvas) return "canvas"; for (var t in renderers) if (renderers[t]) return t; return ""; } function _typeof$4(t) { return ( (_typeof$4 = "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; }), _typeof$4(t) ); } var AnimationItem = function () { (this._cbs = []), (this.name = ""), (this.path = ""), (this.isLoaded = !1), (this.currentFrame = 0), (this.currentRawFrame = 0), (this.firstFrame = 0), (this.totalFrames = 0), (this.frameRate = 0), (this.frameMult = 0), (this.playSpeed = 1), (this.playDirection = 1), (this.playCount = 0), (this.animationData = {}), (this.assets = []), (this.isPaused = !0), (this.autoplay = !1), (this.loop = !0), (this.renderer = null), (this.animationID = createElementID()), (this.assetsPath = ""), (this.timeCompleted = 0), (this.segmentPos = 0), (this.isSubframeEnabled = getSubframeEnabled()), (this.segments = []), (this._idle = !0), (this._completedLoop = !1), (this.projectInterface = ProjectInterface()), (this.imagePreloader = new ImagePreloader()), (this.audioController = audioControllerFactory()), (this.markers = []), (this.configAnimation = this.configAnimation.bind(this)), (this.onSetupError = this.onSetupError.bind(this)), (this.onSegmentComplete = this.onSegmentComplete.bind(this)), (this.drawnFrameEvent = new BMEnterFrameEvent("drawnFrame", 0, 0, 0)), (this.expressionsPlugin = getExpressionsPlugin()); }; extendPrototype([BaseEvent], AnimationItem), (AnimationItem.prototype.setParams = function (t) { (t.wrapper || t.container) && (this.wrapper = t.wrapper || t.container); var e = "svg"; t.animType ? (e = t.animType) : t.renderer && (e = t.renderer); var i = getRenderer(e); (this.renderer = new i(this, t.rendererSettings)), this.imagePreloader.setCacheType(e, this.renderer.globalData.defs), this.renderer.setProjectInterface(this.projectInterface), (this.animType = e), "" === t.loop || null === t.loop || void 0 === t.loop || !0 === t.loop ? (this.loop = !0) : !1 === t.loop ? (this.loop = !1) : (this.loop = parseInt(t.loop, 10)), (this.autoplay = !("autoplay" in t) || t.autoplay), (this.name = t.name ? t.name : ""), (this.autoloadSegments = !Object.prototype.hasOwnProperty.call(t, "autoloadSegments") || t.autoloadSegments), (this.assetsPath = t.assetsPath), (this.initialSegment = t.initialSegment), t.audioFactory && this.audioController.setAudioFactory(t.audioFactory), t.animationData ? this.setupAnimation(t.animationData) : t.path && (-1 !== t.path.lastIndexOf("\\") ? (this.path = t.path.substr(0, t.path.lastIndexOf("\\") + 1)) : (this.path = t.path.substr(0, t.path.lastIndexOf("/") + 1)), (this.fileName = t.path.substr(t.path.lastIndexOf("/") + 1)), (this.fileName = this.fileName.substr( 0, this.fileName.lastIndexOf(".json") )), dataManager.loadAnimation( t.path, this.configAnimation, this.onSetupError )); }), (AnimationItem.prototype.onSetupError = function () { this.trigger("data_failed"); }), (AnimationItem.prototype.setupAnimation = function (t) { dataManager.completeAnimation(t, this.configAnimation); }), (AnimationItem.prototype.setData = function (t, e) { e && "object" !== _typeof$4(e) && (e = JSON.parse(e)); var i = { wrapper: t, animationData: e }, r = t.attributes; (i.path = r.getNamedItem("data-animation-path") ? r.getNamedItem("data-animation-path").value : r.getNamedItem("data-bm-path") ? r.getNamedItem("data-bm-path").value : r.getNamedItem("bm-path") ? r.getNamedItem("bm-path").value : ""), (i.animType = r.getNamedItem("data-anim-type") ? r.getNamedItem("data-anim-type").value : r.getNamedItem("data-bm-type") ? r.getNamedItem("data-bm-type").value : r.getNamedItem("bm-type") ? r.getNamedItem("bm-type").value : r.getNamedItem("data-bm-renderer") ? r.getNamedItem("data-bm-renderer").value : r.getNamedItem("bm-renderer") ? r.getNamedItem("bm-renderer").value : getRegisteredRenderer() || "canvas"); var s = r.getNamedItem("data-anim-loop") ? r.getNamedItem("data-anim-loop").value : r.getNamedItem("data-bm-loop") ? r.getNamedItem("data-bm-loop").value : r.getNamedItem("bm-loop") ? r.getNamedItem("bm-loop").value : ""; "false" === s ? (i.loop = !1) : "true" === s ? (i.loop = !0) : "" !== s && (i.loop = parseInt(s, 10)); var a = r.getNamedItem("data-anim-autoplay") ? r.getNamedItem("data-anim-autoplay").value : r.getNamedItem("data-bm-autoplay") ? r.getNamedItem("data-bm-autoplay").value : !r.getNamedItem("bm-autoplay") || r.getNamedItem("bm-autoplay").value; (i.autoplay = "false" !== a), (i.name = r.getNamedItem("data-name") ? r.getNamedItem("data-name").value : r.getNamedItem("data-bm-name") ? r.getNamedItem("data-bm-name").value : r.getNamedItem("bm-name") ? r.getNamedItem("bm-name").value : ""), "false" === (r.getNamedItem("data-anim-prerender") ? r.getNamedItem("data-anim-prerender").value : r.getNamedItem("data-bm-prerender") ? r.getNamedItem("data-bm-prerender").value : r.getNamedItem("bm-prerender") ? r.getNamedItem("bm-prerender").value : "") && (i.prerender = !1), i.path ? this.setParams(i) : this.trigger("destroy"); }), (AnimationItem.prototype.includeLayers = function (t) { t.op > this.animationData.op && ((this.animationData.op = t.op), (this.totalFrames = Math.floor(t.op - this.animationData.ip))); var e, i, r = this.animationData.layers, s = r.length, a = t.layers, n = a.length; for (i = 0; i < n; i += 1) for (e = 0; e < s; ) { if (r[e].id === a[i].id) { r[e] = a[i]; break; } e += 1; } if ( ((t.chars || t.fonts) && (this.renderer.globalData.fontManager.addChars(t.chars), this.renderer.globalData.fontManager.addFonts( t.fonts, this.renderer.globalData.defs )), t.assets) ) for (s = t.assets.length, e = 0; e < s; e += 1) this.animationData.assets.push(t.assets[e]); (this.animationData.__complete = !1), dataManager.completeAnimation( this.animationData, this.onSegmentComplete ); }), (AnimationItem.prototype.onSegmentComplete = function (t) { this.animationData = t; var e = getExpressionsPlugin(); e && e.initExpressions(this), this.loadNextSegment(); }), (AnimationItem.prototype.loadNextSegment = function () { var t = this.animationData.segments; if (!t || 0 === t.length || !this.autoloadSegments) return ( this.trigger("data_ready"), void (this.timeCompleted = this.totalFrames) ); var e = t.shift(); this.timeCompleted = e.time * this.frameRate; var i = this.path + this.fileName + "_" + this.segmentPos + ".json"; (this.segmentPos += 1), dataManager.loadData( i, this.includeLayers.bind(this), function () { this.trigger("data_failed"); }.bind(this) ); }), (AnimationItem.prototype.loadSegments = function () { this.animationData.segments || (this.timeCompleted = this.totalFrames), this.loadNextSegment(); }), (AnimationItem.prototype.imagesLoaded = function () { this.trigger("loaded_images"), this.checkLoaded(); }), (AnimationItem.prototype.preloadImages = function () { this.imagePreloader.setAssetsPath(this.assetsPath), this.imagePreloader.setPath(this.path), this.imagePreloader.loadAssets( this.animationData.assets, this.imagesLoaded.bind(this) ); }), (AnimationItem.prototype.configAnimation = function (t) { if (this.renderer) try { (this.animationData = t), this.initialSegment ? ((this.totalFrames = Math.floor( this.initialSegment[1] - this.initialSegment[0] )), (this.firstFrame = Math.round(this.initialSegment[0]))) : ((this.totalFrames = Math.floor( this.animationData.op - this.animationData.ip )), (this.firstFrame = Math.round(this.animationData.ip))), this.renderer.configAnimation(t), t.assets || (t.assets = []), (this.assets = this.animationData.assets), (this.frameRate = this.animationData.fr), (this.frameMult = this.animationData.fr / 1e3), this.renderer.searchExtraCompositions(t.assets), (this.markers = markerParser(t.markers || [])), this.trigger("config_ready"), this.preloadImages(), this.loadSegments(), this.updaFrameModifier(), this.waitForFontsLoaded(), this.isPaused && this.audioController.pause(); } catch (t) { this.triggerConfigError(t); } }), (AnimationItem.prototype.waitForFontsLoaded = function () { this.renderer && (this.renderer.globalData.fontManager.isLoaded ? this.checkLoaded() : setTimeout(this.waitForFontsLoaded.bind(this), 20)); }), (AnimationItem.prototype.checkLoaded = function () { if ( !this.isLoaded && this.renderer.globalData.fontManager.isLoaded && (this.imagePreloader.loadedImages() || "canvas" !== this.renderer.rendererType) && this.imagePreloader.loadedFootages() ) { this.isLoaded = !0; var t = getExpressionsPlugin(); t && t.initExpressions(this), this.renderer.initItems(), setTimeout( function () { this.trigger("DOMLoaded"); }.bind(this), 0 ), this.gotoFrame(), this.autoplay && this.play(); } }), (AnimationItem.prototype.resize = function (t, e) { var i = "number" == typeof t ? t : void 0, r = "number" == typeof e ? e : void 0; this.renderer.updateContainerSize(i, r); }), (AnimationItem.prototype.setSubframe = function (t) { this.isSubframeEnabled = !!t; }), (AnimationItem.prototype.gotoFrame = function () { (this.currentFrame = this.isSubframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame), this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted && (this.currentFrame = this.timeCompleted), this.trigger("enterFrame"), this.renderFrame(), this.trigger("drawnFrame"); }), (AnimationItem.prototype.renderFrame = function () { if (!1 !== this.isLoaded && this.renderer) try { this.expressionsPlugin && this.expressionsPlugin.resetFrame(), this.renderer.renderFrame(this.currentFrame + this.firstFrame); } catch (t) { this.triggerRenderFrameError(t); } }), (AnimationItem.prototype.play = function (t) { (t && this.name !== t) || (!0 === this.isPaused && ((this.isPaused = !1), this.trigger("_play"), this.audioController.resume(), this._idle && ((this._idle = !1), this.trigger("_active")))); }), (AnimationItem.prototype.pause = function (t) { (t && this.name !== t) || (!1 === this.isPaused && ((this.isPaused = !0), this.trigger("_pause"), (this._idle = !0), this.trigger("_idle"), this.audioController.pause())); }), (AnimationItem.prototype.togglePause = function (t) { (t && this.name !== t) || (!0 === this.isPaused ? this.play() : this.pause()); }), (AnimationItem.prototype.stop = function (t) { (t && this.name !== t) || (this.pause(), (this.playCount = 0), (this._completedLoop = !1), this.setCurrentRawFrameValue(0)); }), (AnimationItem.prototype.getMarkerData = function (t) { for (var e, i = 0; i < this.markers.length; i += 1) if ((e = this.markers[i]).payload && e.payload.name === t) return e; return null; }), (AnimationItem.prototype.goToAndStop = function (t, e, i) { if (!i || this.name === i) { var r = Number(t); if (isNaN(r)) { var s = this.getMarkerData(t); s && this.goToAndStop(s.time, !0); } else e ? this.setCurrentRawFrameValue(t) : this.setCurrentRawFrameValue(t * this.frameModifier); this.pause(); } }), (AnimationItem.prototype.goToAndPlay = function (t, e, i) { if (!i || this.name === i) { var r = Number(t); if (isNaN(r)) { var s = this.getMarkerData(t); s && (s.duration ? this.playSegments([s.time, s.time + s.duration], !0) : this.goToAndStop(s.time, !0)); } else this.goToAndStop(r, e, i); this.play(); } }), (AnimationItem.prototype.advanceTime = function (t) { if (!0 !== this.isPaused && !1 !== this.isLoaded) { var e = this.currentRawFrame + t * this.frameModifier, i = !1; e >= this.totalFrames - 1 && this.frameModifier > 0 ? this.loop && this.playCount !== this.loop ? e >= this.totalFrames ? ((this.playCount += 1), this.checkSegments(e % this.totalFrames) || (this.setCurrentRawFrameValue(e % this.totalFrames), (this._completedLoop = !0), this.trigger("loopComplete"))) : this.setCurrentRawFrameValue(e) : this.checkSegments( e > this.totalFrames ? e % this.totalFrames : 0 ) || ((i = !0), (e = this.totalFrames - 1)) : e < 0 ? this.checkSegments(e % this.totalFrames) || (!this.loop || (this.playCount-- <= 0 && !0 !== this.loop) ? ((i = !0), (e = 0)) : (this.setCurrentRawFrameValue( this.totalFrames + (e % this.totalFrames) ), this._completedLoop ? this.trigger("loopComplete") : (this._completedLoop = !0))) : this.setCurrentRawFrameValue(e), i && (this.setCurrentRawFrameValue(e), this.pause(), this.trigger("complete")); } }), (AnimationItem.prototype.adjustSegment = function (t, e) { (this.playCount = 0), t[1] < t[0] ? (this.frameModifier > 0 && (this.playSpeed < 0 ? this.setSpeed(-this.playSpeed) : this.setDirection(-1)), (this.totalFrames = t[0] - t[1]), (this.timeCompleted = this.totalFrames), (this.firstFrame = t[1]), this.setCurrentRawFrameValue(this.totalFrames - 0.001 - e)) : t[1] > t[0] && (this.frameModifier < 0 && (this.playSpeed < 0 ? this.setSpeed(-this.playSpeed) : this.setDirection(1)), (this.totalFrames = t[1] - t[0]), (this.timeCompleted = this.totalFrames), (this.firstFrame = t[0]), this.setCurrentRawFrameValue(0.001 + e)), this.trigger("segmentStart"); }), (AnimationItem.prototype.setSegment = function (t, e) { var i = -1; this.isPaused && (this.currentRawFrame + this.firstFrame < t ? (i = t) : this.currentRawFrame + this.firstFrame > e && (i = e - t)), (this.firstFrame = t), (this.totalFrames = e - t), (this.timeCompleted = this.totalFrames), -1 !== i && this.goToAndStop(i, !0); }), (AnimationItem.prototype.playSegments = function (t, e) { if ((e && (this.segments.length = 0), "object" === _typeof$4(t[0]))) { var i, r = t.length; for (i = 0; i < r; i += 1) this.segments.push(t[i]); } else this.segments.push(t); this.segments.length && e && this.adjustSegment(this.segments.shift(), 0), this.isPaused && this.play(); }), (AnimationItem.prototype.resetSegments = function (t) { (this.segments.length = 0), this.segments.push([this.animationData.ip, this.animationData.op]), t && this.checkSegments(0); }), (AnimationItem.prototype.checkSegments = function (t) { return ( !!this.segments.length && (this.adjustSegment(this.segments.shift(), t), !0) ); }), (AnimationItem.prototype.destroy = function (t) { (t && this.name !== t) || !this.renderer || (this.renderer.destroy(), this.imagePreloader.destroy(), this.trigger("destroy"), (this._cbs = null), (this.onEnterFrame = null), (this.onLoopComplete = null), (this.onComplete = null), (this.onSegmentStart = null), (this.onDestroy = null), (this.renderer = null), (this.expressionsPlugin = null), (this.imagePreloader = null), (this.projectInterface = null)); }), (AnimationItem.prototype.setCurrentRawFrameValue = function (t) { (this.currentRawFrame = t), this.gotoFrame(); }), (AnimationItem.prototype.setSpeed = function (t) { (this.playSpeed = t), this.updaFrameModifier(); }), (AnimationItem.prototype.setDirection = function (t) { (this.playDirection = t < 0 ? -1 : 1), this.updaFrameModifier(); }), (AnimationItem.prototype.setLoop = function (t) { this.loop = t; }), (AnimationItem.prototype.setVolume = function (t, e) { (e && this.name !== e) || this.audioController.setVolume(t); }), (AnimationItem.prototype.getVolume = function () { return this.audioController.getVolume(); }), (AnimationItem.prototype.mute = function (t) { (t && this.name !== t) || this.audioController.mute(); }), (AnimationItem.prototype.unmute = function (t) { (t && this.name !== t) || this.audioController.unmute(); }), (AnimationItem.prototype.updaFrameModifier = function () { (this.frameModifier = this.frameMult * this.playSpeed * this.playDirection), this.audioController.setRate(this.playSpeed * this.playDirection); }), (AnimationItem.prototype.getPath = function () { return this.path; }), (AnimationItem.prototype.getAssetsPath = function (t) { var e = ""; if (t.e) e = t.p; else if (this.assetsPath) { var i = t.p; -1 !== i.indexOf("images/") && (i = i.split("/")[1]), (e = this.assetsPath + i); } else (e = this.path), (e += t.u ? t.u : ""), (e += t.p); return e; }), (AnimationItem.prototype.getAssetData = function (t) { for (var e = 0, i = this.assets.length; e < i; ) { if (t === this.assets[e].id) return this.assets[e]; e += 1; } return null; }), (AnimationItem.prototype.hide = function () { this.renderer.hide(); }), (AnimationItem.prototype.show = function () { this.renderer.show(); }), (AnimationItem.prototype.getDuration = function (t) { return t ? this.totalFrames : this.totalFrames / this.frameRate; }), (AnimationItem.prototype.updateDocumentData = function (t, e, i) { try { this.renderer.getElementByPath(t).updateDocumentData(e, i); } catch (t) {} }), (AnimationItem.prototype.trigger = function (t) { if (this._cbs && this._cbs[t]) switch (t) { case "enterFrame": this.triggerEvent( t, new BMEnterFrameEvent( t, this.currentFrame, this.totalFrames, this.frameModifier ) ); break; case "drawnFrame": (this.drawnFrameEvent.currentTime = this.currentFrame), (this.drawnFrameEvent.totalTime = this.totalFrames), (this.drawnFrameEvent.direction = this.frameModifier), this.triggerEvent(t, this.drawnFrameEvent); break; case "loopComplete": this.triggerEvent( t, new BMCompleteLoopEvent( t, this.loop, this.playCount, this.frameMult ) ); break; case "complete": this.triggerEvent(t, new BMCompleteEvent(t, this.frameMult)); break; case "segmentStart": this.triggerEvent( t, new BMSegmentStartEvent(t, this.firstFrame, this.totalFrames) ); break; case "destroy": this.triggerEvent(t, new BMDestroyEvent(t, this)); break; default: this.triggerEvent(t); } "enterFrame" === t && this.onEnterFrame && this.onEnterFrame.call( this, new BMEnterFrameEvent( t, this.currentFrame, this.totalFrames, this.frameMult ) ), "loopComplete" === t && this.onLoopComplete && this.onLoopComplete.call( this, new BMCompleteLoopEvent( t, this.loop, this.playCount, this.frameMult ) ), "complete" === t && this.onComplete && this.onComplete.call(this, new BMCompleteEvent(t, this.frameMult)), "segmentStart" === t && this.onSegmentStart && this.onSegmentStart.call( this, new BMSegmentStartEvent(t, this.firstFrame, this.totalFrames) ), "destroy" === t && this.onDestroy && this.onDestroy.call(this, new BMDestroyEvent(t, this)); }), (AnimationItem.prototype.triggerRenderFrameError = function (t) { var e = new BMRenderFrameErrorEvent(t, this.currentFrame); this.triggerEvent("error", e), this.onError && this.onError.call(this, e); }), (AnimationItem.prototype.triggerConfigError = function (t) { var e = new BMConfigErrorEvent(t, this.currentFrame); this.triggerEvent("error", e), this.onError && this.onError.call(this, e); }); var animationManager = (function () { var t = {}, e = [], i = 0, r = 0, s = 0, a = !0, n = !1; function o(t) { for (var i = 0, s = t.target; i < r; ) e[i].animation === s && (e.splice(i, 1), (i -= 1), (r -= 1), s.isPaused || p()), (i += 1); } function h(t, i) { if (!t) return null; for (var s = 0; s < r; ) { if (e[s].elem === t && null !== e[s].elem) return e[s].animation; s += 1; } var a = new AnimationItem(); return f(a, t), a.setData(t, i), a; } function l() { (s += 1), d(); } function p() { s -= 1; } function f(t, i) { t.addEventListener("destroy", o), t.addEventListener("_active", l), t.addEventListener("_idle", p), e.push({ elem: i, animation: t }), (r += 1); } function m(t) { var o, h = t - i; for (o = 0; o < r; o += 1) e[o].animation.advanceTime(h); (i = t), s && !n ? window.requestAnimationFrame(m) : (a = !0); } function c(t) { (i = t), window.requestAnimationFrame(m); } function d() { !n && s && a && (window.requestAnimationFrame(c), (a = !1)); } return ( (t.registerAnimation = h), (t.loadAnimation = function (t) { var e = new AnimationItem(); return f(e, null), e.setParams(t), e; }), (t.setSpeed = function (t, i) { var s; for (s = 0; s < r; s += 1) e[s].animation.setSpeed(t, i); }), (t.setDirection = function (t, i) { var s; for (s = 0; s < r; s += 1) e[s].animation.setDirection(t, i); }), (t.play = function (t) { var i; for (i = 0; i < r; i += 1) e[i].animation.play(t); }), (t.pause = function (t) { var i; for (i = 0; i < r; i += 1) e[i].animation.pause(t); }), (t.stop = function (t) { var i; for (i = 0; i < r; i += 1) e[i].animation.stop(t); }), (t.togglePause = function (t) { var i; for (i = 0; i < r; i += 1) e[i].animation.togglePause(t); }), (t.searchAnimations = function (t, e, i) { var r, s = [].concat( [].slice.call(document.getElementsByClassName("lottie")), [].slice.call(document.getElementsByClassName("bodymovin")) ), a = s.length; for (r = 0; r < a; r += 1) i && s[r].setAttribute("data-bm-type", i), h(s[r], t); if (e && 0 === a) { i || (i = "svg"); var n = document.getElementsByTagName("body")[0]; n.innerText = ""; var o = createTag("div"); (o.style.width = "100%"), (o.style.height = "100%"), o.setAttribute("data-bm-type", i), n.appendChild(o), h(o, t); } }), (t.resize = function () { var t; for (t = 0; t < r; t += 1) e[t].animation.resize(); }), (t.goToAndStop = function (t, i, s) { var a; for (a = 0; a < r; a += 1) e[a].animation.goToAndStop(t, i, s); }), (t.destroy = function (t) { var i; for (i = r - 1; i >= 0; i -= 1) e[i].animation.destroy(t); }), (t.freeze = function () { n = !0; }), (t.unfreeze = function () { (n = !1), d(); }), (t.setVolume = function (t, i) { var s; for (s = 0; s < r; s += 1) e[s].animation.setVolume(t, i); }), (t.mute = function (t) { var i; for (i = 0; i < r; i += 1) e[i].animation.mute(t); }), (t.unmute = function (t) { var i; for (i = 0; i < r; i += 1) e[i].animation.unmute(t); }), (t.getRegisteredAnimations = function () { var t, i = e.length, r = []; for (t = 0; t < i; t += 1) r.push(e[t].animation); return r; }), t ); })(), BezierFactory = (function () { var t = { getBezierEasing: function (t, i, r, s, a) { var n = a || ("bez_" + t + "_" + i + "_" + r + "_" + s).replace(/\./g, "p"); if (e[n]) return e[n]; var o = new l([t, i, r, s]); return (e[n] = o), o; }, }, e = {}; var i = 0.1, r = "function" == typeof Float32Array; function s(t, e) { return 1 - 3 * e + 3 * t; } function a(t, e) { return 3 * e - 6 * t; } function n(t) { return 3 * t; } function o(t, e, i) { return ((s(e, i) * t + a(e, i)) * t + n(e)) * t; } function h(t, e, i) { return 3 * s(e, i) * t * t + 2 * a(e, i) * t + n(e); } function l(t) { (this._p = t), (this._mSampleValues = r ? new Float32Array(11) : new Array(11)), (this._precomputed = !1), (this.get = this.get.bind(this)); } return ( (l.prototype = { get: function (t) { var e = this._p[0], i = this._p[1], r = this._p[2], s = this._p[3]; return ( this._precomputed || this._precompute(), e === i && r === s ? t : 0 === t ? 0 : 1 === t ? 1 : o(this._getTForX(t), i, s) ); }, _precompute: function () { var t = this._p[0], e = this._p[1], i = this._p[2], r = this._p[3]; (this._precomputed = !0), (t === e && i === r) || this._calcSampleValues(); }, _calcSampleValues: function () { for (var t = this._p[0], e = this._p[2], r = 0; r < 11; ++r) this._mSampleValues[r] = o(r * i, t, e); }, _getTForX: function (t) { for ( var e = this._p[0], r = this._p[2], s = this._mSampleValues, a = 0, n = 1; 10 !== n && s[n] <= t; ++n ) a += i; var l = a + ((t - s[--n]) / (s[n + 1] - s[n])) * i, p = h(l, e, r); return p >= 0.001 ? (function (t, e, i, r) { for (var s = 0; s < 4; ++s) { var a = h(e, i, r); if (0 === a) return e; e -= (o(e, i, r) - t) / a; } return e; })(t, l, e, r) : 0 === p ? l : (function (t, e, i, r, s) { var a, n, h = 0; do { (a = o((n = e + (i - e) / 2), r, s) - t) > 0 ? (i = n) : (e = n); } while (Math.abs(a) > 1e-7 && ++h < 10); return n; })(t, a, a + i, e, r); }, }), t ); })(), pooling = { double: function (t) { return t.concat(createSizedArray(t.length)); }, }, poolFactory = function (t, e, i) { var r = 0, s = t, a = createSizedArray(s); return { newElement: function () { return r ? a[(r -= 1)] : e(); }, release: function (t) { r === s && ((a = pooling.double(a)), (s *= 2)), i && i(t), (a[r] = t), (r += 1); }, }; }, bezierLengthPool = poolFactory(8, function () { return { addedLength: 0, percents: createTypedArray("float32", getDefaultCurveSegments()), lengths: createTypedArray("float32", getDefaultCurveSegments()), }; }), segmentsLengthPool = poolFactory( 8, function () { return { lengths: [], totalLength: 0 }; }, function (t) { var e, i = t.lengths.length; for (e = 0; e < i; e += 1) bezierLengthPool.release(t.lengths[e]); t.lengths.length = 0; } ); function bezFunction() { var t = Math; function e(t, e, i, r, s, a) { var n = t * r + e * s + i * a - s * r - a * t - i * e; return n > -0.001 && n < 0.001; } var i = function (t, e, i, r) { var s, a, n, o, h, l, p = getDefaultCurveSegments(), f = 0, m = [], c = [], d = bezierLengthPool.newElement(); for (n = i.length, s = 0; s < p; s += 1) { for (h = s / (p - 1), l = 0, a = 0; a < n; a += 1) (o = bmPow(1 - h, 3) * t[a] + 3 * bmPow(1 - h, 2) * h * i[a] + 3 * (1 - h) * bmPow(h, 2) * r[a] + bmPow(h, 3) * e[a]), (m[a] = o), null !== c[a] && (l += bmPow(m[a] - c[a], 2)), (c[a] = m[a]); l && (f += l = bmSqrt(l)), (d.percents[s] = h), (d.lengths[s] = f); } return (d.addedLength = f), d; }; function r(t) { (this.segmentLength = 0), (this.points = new Array(t)); } function s(t, e) { (this.partialLength = t), (this.point = e); } var a, n = ((a = {}), function (t, i, n, o) { var h = ( t[0] + "_" + t[1] + "_" + i[0] + "_" + i[1] + "_" + n[0] + "_" + n[1] + "_" + o[0] + "_" + o[1] ).replace(/\./g, "p"); if (!a[h]) { var l, p, f, m, c, d, u, y = getDefaultCurveSegments(), g = 0, v = null; 2 === t.length && (t[0] !== i[0] || t[1] !== i[1]) && e(t[0], t[1], i[0], i[1], t[0] + n[0], t[1] + n[1]) && e(t[0], t[1], i[0], i[1], i[0] + o[0], i[1] + o[1]) && (y = 2); var b = new r(y); for (f = n.length, l = 0; l < y; l += 1) { for ( u = createSizedArray(f), c = l / (y - 1), d = 0, p = 0; p < f; p += 1 ) (m = bmPow(1 - c, 3) * t[p] + 3 * bmPow(1 - c, 2) * c * (t[p] + n[p]) + 3 * (1 - c) * bmPow(c, 2) * (i[p] + o[p]) + bmPow(c, 3) * i[p]), (u[p] = m), null !== v && (d += bmPow(u[p] - v[p], 2)); (g += d = bmSqrt(d)), (b.points[l] = new s(d, u)), (v = u); } (b.segmentLength = g), (a[h] = b); } return a[h]; }); function o(t, e) { var i = e.percents, r = e.lengths, s = i.length, a = bmFloor((s - 1) * t), n = t * e.addedLength, o = 0; if (a === s - 1 || 0 === a || n === r[a]) return i[a]; for (var h = r[a] > n ? -1 : 1, l = !0; l; ) if ( (r[a] <= n && r[a + 1] > n ? ((o = (n - r[a]) / (r[a + 1] - r[a])), (l = !1)) : (a += h), a < 0 || a >= s - 1) ) { if (a === s - 1) return i[a]; l = !1; } return i[a] + (i[a + 1] - i[a]) * o; } var h = createTypedArray("float32", 8); return { getSegmentsLength: function (t) { var e, r = segmentsLengthPool.newElement(), s = t.c, a = t.v, n = t.o, o = t.i, h = t._length, l = r.lengths, p = 0; for (e = 0; e < h - 1; e += 1) (l[e] = i(a[e], a[e + 1], n[e], o[e + 1])), (p += l[e].addedLength); return ( s && h && ((l[e] = i(a[e], a[0], n[e], o[0])), (p += l[e].addedLength)), (r.totalLength = p), r ); }, getNewSegment: function (e, i, r, s, a, n, l) { a < 0 ? (a = 0) : a > 1 && (a = 1); var p, f = o(a, l), m = o((n = n > 1 ? 1 : n), l), c = e.length, d = 1 - f, u = 1 - m, y = d * d * d, g = f * d * d * 3, v = f * f * d * 3, b = f * f * f, x = d * d * u, P = f * d * u + d * f * u + d * d * m, E = f * f * u + d * f * m + f * d * m, S = f * f * m, C = d * u * u, _ = f * u * u + d * m * u + d * u * m, A = f * m * u + d * m * m + f * u * m, T = f * m * m, M = u * u * u, k = m * u * u + u * m * u + u * u * m, D = m * m * u + u * m * m + m * u * m, F = m * m * m; for (p = 0; p < c; p += 1) (h[4 * p] = t.round(1e3 * (y * e[p] + g * r[p] + v * s[p] + b * i[p])) / 1e3), (h[4 * p + 1] = t.round(1e3 * (x * e[p] + P * r[p] + E * s[p] + S * i[p])) / 1e3), (h[4 * p + 2] = t.round(1e3 * (C * e[p] + _ * r[p] + A * s[p] + T * i[p])) / 1e3), (h[4 * p + 3] = t.round(1e3 * (M * e[p] + k * r[p] + D * s[p] + F * i[p])) / 1e3); return h; }, getPointInSegment: function (e, i, r, s, a, n) { var h = o(a, n), l = 1 - h; return [ t.round( 1e3 * (l * l * l * e[0] + (h * l * l + l * h * l + l * l * h) * r[0] + (h * h * l + l * h * h + h * l * h) * s[0] + h * h * h * i[0]) ) / 1e3, t.round( 1e3 * (l * l * l * e[1] + (h * l * l + l * h * l + l * l * h) * r[1] + (h * h * l + l * h * h + h * l * h) * s[1] + h * h * h * i[1]) ) / 1e3, ]; }, buildBezierData: n, pointOnLine2D: e, pointOnLine3D: function (i, r, s, a, n, o, h, l, p) { if (0 === s && 0 === o && 0 === p) return e(i, r, a, n, h, l); var f, m = t.sqrt(t.pow(a - i, 2) + t.pow(n - r, 2) + t.pow(o - s, 2)), c = t.sqrt(t.pow(h - i, 2) + t.pow(l - r, 2) + t.pow(p - s, 2)), d = t.sqrt(t.pow(h - a, 2) + t.pow(l - n, 2) + t.pow(p - o, 2)); return ( (f = m > c ? m > d ? m - c - d : d - c - m : d > c ? d - c - m : c - m - d) > -1e-4 && f < 1e-4 ); }, }; } var bez = bezFunction(), initFrame = initialDefaultFrame, mathAbs = Math.abs; function interpolateValue(t, e) { var i, r = this.offsetTime; "multidimensional" === this.propType && (i = createTypedArray("float32", this.pv.length)); for ( var s, a, n, o, h, l, p, f, m, c = e.lastIndex, d = c, u = this.keyframes.length - 1, y = !0; y; ) { if ( ((s = this.keyframes[d]), (a = this.keyframes[d + 1]), d === u - 1 && t >= a.t - r) ) { s.h && (s = a), (c = 0); break; } if (a.t - r > t) { c = d; break; } d < u - 1 ? (d += 1) : ((c = 0), (y = !1)); } n = this.keyframesMetadata[d] || {}; var g, v = a.t - r, b = s.t - r; if (s.to) { n.bezierData || (n.bezierData = bez.buildBezierData(s.s, a.s || s.e, s.to, s.ti)); var x = n.bezierData; if (t >= v || t < b) { var P = t >= v ? x.points.length - 1 : 0; for (h = x.points[P].point.length, o = 0; o < h; o += 1) i[o] = x.points[P].point[o]; } else { n.__fnct ? (m = n.__fnct) : ((m = BezierFactory.getBezierEasing( s.o.x, s.o.y, s.i.x, s.i.y, s.n ).get), (n.__fnct = m)), (l = m((t - b) / (v - b))); var E, S = x.segmentLength * l, C = e.lastFrame < t && e._lastKeyframeIndex === d ? e._lastAddedLength : 0; for ( f = e.lastFrame < t && e._lastKeyframeIndex === d ? e._lastPoint : 0, y = !0, p = x.points.length; y; ) { if ( ((C += x.points[f].partialLength), 0 === S || 0 === l || f === x.points.length - 1) ) { for (h = x.points[f].point.length, o = 0; o < h; o += 1) i[o] = x.points[f].point[o]; break; } if (S >= C && S < C + x.points[f + 1].partialLength) { for ( E = (S - C) / x.points[f + 1].partialLength, h = x.points[f].point.length, o = 0; o < h; o += 1 ) i[o] = x.points[f].point[o] + (x.points[f + 1].point[o] - x.points[f].point[o]) * E; break; } f < p - 1 ? (f += 1) : (y = !1); } (e._lastPoint = f), (e._lastAddedLength = C - x.points[f].partialLength), (e._lastKeyframeIndex = d); } } else { var _, A, T, M, k; if (((u = s.s.length), (g = a.s || s.e), this.sh && 1 !== s.h)) if (t >= v) (i[0] = g[0]), (i[1] = g[1]), (i[2] = g[2]); else if (t <= b) (i[0] = s.s[0]), (i[1] = s.s[1]), (i[2] = s.s[2]); else { quaternionToEuler( i, slerp( createQuaternion(s.s), createQuaternion(g), (t - b) / (v - b) ) ); } else for (d = 0; d < u; d += 1) 1 !== s.h && (t >= v ? (l = 1) : t < b ? (l = 0) : (s.o.x.constructor === Array ? (n.__fnct || (n.__fnct = []), n.__fnct[d] ? (m = n.__fnct[d]) : ((_ = void 0 === s.o.x[d] ? s.o.x[0] : s.o.x[d]), (A = void 0 === s.o.y[d] ? s.o.y[0] : s.o.y[d]), (T = void 0 === s.i.x[d] ? s.i.x[0] : s.i.x[d]), (M = void 0 === s.i.y[d] ? s.i.y[0] : s.i.y[d]), (m = BezierFactory.getBezierEasing(_, A, T, M).get), (n.__fnct[d] = m))) : n.__fnct ? (m = n.__fnct) : ((_ = s.o.x), (A = s.o.y), (T = s.i.x), (M = s.i.y), (m = BezierFactory.getBezierEasing(_, A, T, M).get), (s.keyframeMetadata = m)), (l = m((t - b) / (v - b))))), (g = a.s || s.e), (k = 1 === s.h ? s.s[d] : s.s[d] + (g[d] - s.s[d]) * l), "multidimensional" === this.propType ? (i[d] = k) : (i = k); } return (e.lastIndex = c), i; } function slerp(t, e, i) { var r, s, a, n, o, h = [], l = t[0], p = t[1], f = t[2], m = t[3], c = e[0], d = e[1], u = e[2], y = e[3]; return ( (s = l * c + p * d + f * u + m * y) < 0 && ((s = -s), (c = -c), (d = -d), (u = -u), (y = -y)), 1 - s > 1e-6 ? ((r = Math.acos(s)), (a = Math.sin(r)), (n = Math.sin((1 - i) * r) / a), (o = Math.sin(i * r) / a)) : ((n = 1 - i), (o = i)), (h[0] = n * l + o * c), (h[1] = n * p + o * d), (h[2] = n * f + o * u), (h[3] = n * m + o * y), h ); } function quaternionToEuler(t, e) { var i = e[0], r = e[1], s = e[2], a = e[3], n = Math.atan2(2 * r * a - 2 * i * s, 1 - 2 * r * r - 2 * s * s), o = Math.asin(2 * i * r + 2 * s * a), h = Math.atan2(2 * i * a - 2 * r * s, 1 - 2 * i * i - 2 * s * s); (t[0] = n / degToRads), (t[1] = o / degToRads), (t[2] = h / degToRads); } function createQuaternion(t) { var e = t[0] * degToRads, i = t[1] * degToRads, r = t[2] * degToRads, s = Math.cos(e / 2), a = Math.cos(i / 2), n = Math.cos(r / 2), o = Math.sin(e / 2), h = Math.sin(i / 2), l = Math.sin(r / 2); return [ o * h * n + s * a * l, o * a * n + s * h * l, s * h * n - o * a * l, s * a * n - o * h * l, ]; } function getValueAtCurrentTime() { var t = this.comp.renderedFrame - this.offsetTime, e = this.keyframes[0].t - this.offsetTime, i = this.keyframes[this.keyframes.length - 1].t - this.offsetTime; if ( !( t === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= i && t >= i) || (this._caching.lastFrame < e && t < e))) ) ) { this._caching.lastFrame >= t && ((this._caching._lastKeyframeIndex = -1), (this._caching.lastIndex = 0)); var r = this.interpolateValue(t, this._caching); this.pv = r; } return (this._caching.lastFrame = t), this.pv; } function setVValue(t) { var e; if ("unidimensional" === this.propType) (e = t * this.mult), mathAbs(this.v - e) > 1e-5 && ((this.v = e), (this._mdf = !0)); else for (var i = 0, r = this.v.length; i < r; ) (e = t[i] * this.mult), mathAbs(this.v[i] - e) > 1e-5 && ((this.v[i] = e), (this._mdf = !0)), (i += 1); } function processEffectsSequence() { if ( this.elem.globalData.frameId !== this.frameId && this.effectsSequence.length ) if (this.lock) this.setVValue(this.pv); else { var t; (this.lock = !0), (this._mdf = this._isFirstFrame); var e = this.effectsSequence.length, i = this.kf ? this.pv : this.data.k; for (t = 0; t < e; t += 1) i = this.effectsSequence[t](i); this.setVValue(i), (this._isFirstFrame = !1), (this.lock = !1), (this.frameId = this.elem.globalData.frameId); } } function addEffect(t) { this.effectsSequence.push(t), this.container.addDynamicProperty(this); } function ValueProperty(t, e, i, r) { (this.propType = "unidimensional"), (this.mult = i || 1), (this.data = e), (this.v = i ? e.k * i : e.k), (this.pv = e.k), (this._mdf = !1), (this.elem = t), (this.container = r), (this.comp = t.comp), (this.k = !1), (this.kf = !1), (this.vel = 0), (this.effectsSequence = []), (this._isFirstFrame = !0), (this.getValue = processEffectsSequence), (this.setVValue = setVValue), (this.addEffect = addEffect); } function MultiDimensionalProperty(t, e, i, r) { var s; (this.propType = "multidimensional"), (this.mult = i || 1), (this.data = e), (this._mdf = !1), (this.elem = t), (this.container = r), (this.comp = t.comp), (this.k = !1), (this.kf = !1), (this.frameId = -1); var a = e.k.length; for ( this.v = createTypedArray("float32", a), this.pv = createTypedArray("float32", a), this.vel = createTypedArray("float32", a), s = 0; s < a; s += 1 ) (this.v[s] = e.k[s] * this.mult), (this.pv[s] = e.k[s]); (this._isFirstFrame = !0), (this.effectsSequence = []), (this.getValue = processEffectsSequence), (this.setVValue = setVValue), (this.addEffect = addEffect); } function KeyframedValueProperty(t, e, i, r) { (this.propType = "unidimensional"), (this.keyframes = e.k), (this.keyframesMetadata = []), (this.offsetTime = t.data.st), (this.frameId = -1), (this._caching = { lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1, }), (this.k = !0), (this.kf = !0), (this.data = e), (this.mult = i || 1), (this.elem = t), (this.container = r), (this.comp = t.comp), (this.v = initFrame), (this.pv = initFrame), (this._isFirstFrame = !0), (this.getValue = processEffectsSequence), (this.setVValue = setVValue), (this.interpolateValue = interpolateValue), (this.effectsSequence = [getValueAtCurrentTime.bind(this)]), (this.addEffect = addEffect); } function KeyframedMultidimensionalProperty(t, e, i, r) { var s; this.propType = "multidimensional"; var a, n, o, h, l = e.k.length; for (s = 0; s < l - 1; s += 1) e.k[s].to && e.k[s].s && e.k[s + 1] && e.k[s + 1].s && ((a = e.k[s].s), (n = e.k[s + 1].s), (o = e.k[s].to), (h = e.k[s].ti), ((2 === a.length && (a[0] !== n[0] || a[1] !== n[1]) && bez.pointOnLine2D( a[0], a[1], n[0], n[1], a[0] + o[0], a[1] + o[1] ) && bez.pointOnLine2D( a[0], a[1], n[0], n[1], n[0] + h[0], n[1] + h[1] )) || (3 === a.length && (a[0] !== n[0] || a[1] !== n[1] || a[2] !== n[2]) && bez.pointOnLine3D( a[0], a[1], a[2], n[0], n[1], n[2], a[0] + o[0], a[1] + o[1], a[2] + o[2] ) && bez.pointOnLine3D( a[0], a[1], a[2], n[0], n[1], n[2], n[0] + h[0], n[1] + h[1], n[2] + h[2] ))) && ((e.k[s].to = null), (e.k[s].ti = null)), a[0] === n[0] && a[1] === n[1] && 0 === o[0] && 0 === o[1] && 0 === h[0] && 0 === h[1] && (2 === a.length || (a[2] === n[2] && 0 === o[2] && 0 === h[2])) && ((e.k[s].to = null), (e.k[s].ti = null))); (this.effectsSequence = [getValueAtCurrentTime.bind(this)]), (this.data = e), (this.keyframes = e.k), (this.keyframesMetadata = []), (this.offsetTime = t.data.st), (this.k = !0), (this.kf = !0), (this._isFirstFrame = !0), (this.mult = i || 1), (this.elem = t), (this.container = r), (this.comp = t.comp), (this.getValue = processEffectsSequence), (this.setVValue = setVValue), (this.interpolateValue = interpolateValue), (this.frameId = -1); var p = e.k[0].s.length; for ( this.v = createTypedArray("float32", p), this.pv = createTypedArray("float32", p), s = 0; s < p; s += 1 ) (this.v[s] = initFrame), (this.pv[s] = initFrame); (this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray("float32", p), }), (this.addEffect = addEffect); } var PropertyFactory = { getProp: function (t, e, i, r, s) { var a; if ((e.sid && (e = t.globalData.slotManager.getProp(e)), e.k.length)) if ("number" == typeof e.k[0]) a = new MultiDimensionalProperty(t, e, r, s); else switch (i) { case 0: a = new KeyframedValueProperty(t, e, r, s); break; case 1: a = new KeyframedMultidimensionalProperty(t, e, r, s); } else a = new ValueProperty(t, e, r, s); return a.effectsSequence.length && s.addDynamicProperty(a), a; }, }; function DynamicPropertyContainer() {} DynamicPropertyContainer.prototype = { addDynamicProperty: function (t) { -1 === this.dynamicProperties.indexOf(t) && (this.dynamicProperties.push(t), this.container.addDynamicProperty(this), (this._isAnimated = !0)); }, iterateDynamicProperties: function () { var t; this._mdf = !1; var e = this.dynamicProperties.length; for (t = 0; t < e; t += 1) this.dynamicProperties[t].getValue(), this.dynamicProperties[t]._mdf && (this._mdf = !0); }, initDynamicPropertyContainer: function (t) { (this.container = t), (this.dynamicProperties = []), (this._mdf = !1), (this._isAnimated = !1); }, }; var pointPool = poolFactory(8, function () { return createTypedArray("float32", 2); }); function ShapePath() { (this.c = !1), (this._length = 0), (this._maxLength = 8), (this.v = createSizedArray(this._maxLength)), (this.o = createSizedArray(this._maxLength)), (this.i = createSizedArray(this._maxLength)); } (ShapePath.prototype.setPathData = function (t, e) { (this.c = t), this.setLength(e); for (var i = 0; i < e; ) (this.v[i] = pointPool.newElement()), (this.o[i] = pointPool.newElement()), (this.i[i] = pointPool.newElement()), (i += 1); }), (ShapePath.prototype.setLength = function (t) { for (; this._maxLength < t; ) this.doubleArrayLength(); this._length = t; }), (ShapePath.prototype.doubleArrayLength = function () { (this.v = this.v.concat(createSizedArray(this._maxLength))), (this.i = this.i.concat(createSizedArray(this._maxLength))), (this.o = this.o.concat(createSizedArray(this._maxLength))), (this._maxLength *= 2); }), (ShapePath.prototype.setXYAt = function (t, e, i, r, s) { var a; switch ( ((this._length = Math.max(this._length, r + 1)), this._length >= this._maxLength && this.doubleArrayLength(), i) ) { case "v": a = this.v; break; case "i": a = this.i; break; case "o": a = this.o; break; default: a = []; } (!a[r] || (a[r] && !s)) && (a[r] = pointPool.newElement()), (a[r][0] = t), (a[r][1] = e); }), (ShapePath.prototype.setTripleAt = function (t, e, i, r, s, a, n, o) { this.setXYAt(t, e, "v", n, o), this.setXYAt(i, r, "o", n, o), this.setXYAt(s, a, "i", n, o); }), (ShapePath.prototype.reverse = function () { var t = new ShapePath(); t.setPathData(this.c, this._length); var e = this.v, i = this.o, r = this.i, s = 0; this.c && (t.setTripleAt( e[0][0], e[0][1], r[0][0], r[0][1], i[0][0], i[0][1], 0, !1 ), (s = 1)); var a, n = this._length - 1, o = this._length; for (a = s; a < o; a += 1) t.setTripleAt( e[n][0], e[n][1], r[n][0], r[n][1], i[n][0], i[n][1], a, !1 ), (n -= 1); return t; }), (ShapePath.prototype.length = function () { return this._length; }); var shapePool = ((factory = poolFactory( 4, function () { return new ShapePath(); }, function (t) { var e, i = t._length; for (e = 0; e < i; e += 1) pointPool.release(t.v[e]), pointPool.release(t.i[e]), pointPool.release(t.o[e]), (t.v[e] = null), (t.i[e] = null), (t.o[e] = null); (t._length = 0), (t.c = !1); } )), (factory.clone = function (t) { var e, i = factory.newElement(), r = void 0 === t._length ? t.v.length : t._length; for (i.setLength(r), i.c = t.c, e = 0; e < r; e += 1) i.setTripleAt( t.v[e][0], t.v[e][1], t.o[e][0], t.o[e][1], t.i[e][0], t.i[e][1], e ); return i; }), factory), factory; function ShapeCollection() { (this._length = 0), (this._maxLength = 4), (this.shapes = createSizedArray(this._maxLength)); } (ShapeCollection.prototype.addShape = function (t) { this._length === this._maxLength && ((this.shapes = this.shapes.concat(createSizedArray(this._maxLength))), (this._maxLength *= 2)), (this.shapes[this._length] = t), (this._length += 1); }), (ShapeCollection.prototype.releaseShapes = function () { var t; for (t = 0; t < this._length; t += 1) shapePool.release(this.shapes[t]); this._length = 0; }); var shapeCollectionPool = ((ob = { newShapeCollection: function () { return _length ? pool[(_length -= 1)] : new ShapeCollection(); }, release: function (t) { var e, i = t._length; for (e = 0; e < i; e += 1) shapePool.release(t.shapes[e]); (t._length = 0), _length === _maxLength && ((pool = pooling.double(pool)), (_maxLength *= 2)), (pool[_length] = t), (_length += 1); }, }), (_length = 0), (_maxLength = 4), (pool = createSizedArray(_maxLength)), ob), ob, _length, _maxLength, pool, ShapePropertyFactory = (function () { var t = -999999; function e(t, e, i) { var r, s, a, n, o, h, l, p, f, m = i.lastIndex, c = this.keyframes; if (t < c[0].t - this.offsetTime) (r = c[0].s[0]), (a = !0), (m = 0); else if (t >= c[c.length - 1].t - this.offsetTime) (r = c[c.length - 1].s ? c[c.length - 1].s[0] : c[c.length - 2].e[0]), (a = !0); else { for ( var d, u, y, g = m, v = c.length - 1, b = !0; b && ((d = c[g]), !((u = c[g + 1]).t - this.offsetTime > t)); ) g < v - 1 ? (g += 1) : (b = !1); if ( ((y = this.keyframesMetadata[g] || {}), (m = g), !(a = 1 === d.h)) ) { if (t >= u.t - this.offsetTime) p = 1; else if (t < d.t - this.offsetTime) p = 0; else { var x; y.__fnct ? (x = y.__fnct) : ((x = BezierFactory.getBezierEasing( d.o.x, d.o.y, d.i.x, d.i.y ).get), (y.__fnct = x)), (p = x( (t - (d.t - this.offsetTime)) / (u.t - this.offsetTime - (d.t - this.offsetTime)) )); } s = u.s ? u.s[0] : d.e[0]; } r = d.s[0]; } for ( h = e._length, l = r.i[0].length, i.lastIndex = m, n = 0; n < h; n += 1 ) for (o = 0; o < l; o += 1) (f = a ? r.i[n][o] : r.i[n][o] + (s.i[n][o] - r.i[n][o]) * p), (e.i[n][o] = f), (f = a ? r.o[n][o] : r.o[n][o] + (s.o[n][o] - r.o[n][o]) * p), (e.o[n][o] = f), (f = a ? r.v[n][o] : r.v[n][o] + (s.v[n][o] - r.v[n][o]) * p), (e.v[n][o] = f); } function i() { var e = this.comp.renderedFrame - this.offsetTime, i = this.keyframes[0].t - this.offsetTime, r = this.keyframes[this.keyframes.length - 1].t - this.offsetTime, s = this._caching.lastFrame; return ( (s !== t && ((s < i && e < i) || (s > r && e > r))) || ((this._caching.lastIndex = s < e ? this._caching.lastIndex : 0), this.interpolateShape(e, this.pv, this._caching)), (this._caching.lastFrame = e), this.pv ); } function r() { this.paths = this.localShapeCollection; } function s(t) { (function (t, e) { if (t._length !== e._length || t.c !== e.c) return !1; var i, r = t._length; for (i = 0; i < r; i += 1) if ( t.v[i][0] !== e.v[i][0] || t.v[i][1] !== e.v[i][1] || t.o[i][0] !== e.o[i][0] || t.o[i][1] !== e.o[i][1] || t.i[i][0] !== e.i[i][0] || t.i[i][1] !== e.i[i][1] ) return !1; return !0; })(this.v, t) || ((this.v = shapePool.clone(t)), this.localShapeCollection.releaseShapes(), this.localShapeCollection.addShape(this.v), (this._mdf = !0), (this.paths = this.localShapeCollection)); } function a() { if (this.elem.globalData.frameId !== this.frameId) if (this.effectsSequence.length) if (this.lock) this.setVValue(this.pv); else { var t, e; (this.lock = !0), (this._mdf = !1), (t = this.kf ? this.pv : this.data.ks ? this.data.ks.k : this.data.pt.k); var i = this.effectsSequence.length; for (e = 0; e < i; e += 1) t = this.effectsSequence[e](t); this.setVValue(t), (this.lock = !1), (this.frameId = this.elem.globalData.frameId); } else this._mdf = !1; } function n(t, e, i) { (this.propType = "shape"), (this.comp = t.comp), (this.container = t), (this.elem = t), (this.data = e), (this.k = !1), (this.kf = !1), (this._mdf = !1); var s = 3 === i ? e.pt.k : e.ks.k; (this.v = shapePool.clone(s)), (this.pv = shapePool.clone(this.v)), (this.localShapeCollection = shapeCollectionPool.newShapeCollection()), (this.paths = this.localShapeCollection), this.paths.addShape(this.v), (this.reset = r), (this.effectsSequence = []); } function o(t) { this.effectsSequence.push(t), this.container.addDynamicProperty(this); } function h(e, s, a) { (this.propType = "shape"), (this.comp = e.comp), (this.elem = e), (this.container = e), (this.offsetTime = e.data.st), (this.keyframes = 3 === a ? s.pt.k : s.ks.k), (this.keyframesMetadata = []), (this.k = !0), (this.kf = !0); var n = this.keyframes[0].s[0].i.length; (this.v = shapePool.newElement()), this.v.setPathData(this.keyframes[0].s[0].c, n), (this.pv = shapePool.clone(this.v)), (this.localShapeCollection = shapeCollectionPool.newShapeCollection()), (this.paths = this.localShapeCollection), this.paths.addShape(this.v), (this.lastFrame = t), (this.reset = r), (this._caching = { lastFrame: t, lastIndex: 0 }), (this.effectsSequence = [i.bind(this)]); } (n.prototype.interpolateShape = e), (n.prototype.getValue = a), (n.prototype.setVValue = s), (n.prototype.addEffect = o), (h.prototype.getValue = a), (h.prototype.interpolateShape = e), (h.prototype.setVValue = s), (h.prototype.addEffect = o); var l = (function () { var t = roundCorner; function e(t, e) { (this.v = shapePool.newElement()), this.v.setPathData(!0, 4), (this.localShapeCollection = shapeCollectionPool.newShapeCollection()), (this.paths = this.localShapeCollection), this.localShapeCollection.addShape(this.v), (this.d = e.d), (this.elem = t), (this.comp = t.comp), (this.frameId = -1), this.initDynamicPropertyContainer(t), (this.p = PropertyFactory.getProp(t, e.p, 1, 0, this)), (this.s = PropertyFactory.getProp(t, e.s, 1, 0, this)), this.dynamicProperties.length ? (this.k = !0) : ((this.k = !1), this.convertEllToPath()); } return ( (e.prototype = { reset: r, getValue: function () { this.elem.globalData.frameId !== this.frameId && ((this.frameId = this.elem.globalData.frameId), this.iterateDynamicProperties(), this._mdf && this.convertEllToPath()); }, convertEllToPath: function () { var e = this.p.v[0], i = this.p.v[1], r = this.s.v[0] / 2, s = this.s.v[1] / 2, a = 3 !== this.d, n = this.v; (n.v[0][0] = e), (n.v[0][1] = i - s), (n.v[1][0] = a ? e + r : e - r), (n.v[1][1] = i), (n.v[2][0] = e), (n.v[2][1] = i + s), (n.v[3][0] = a ? e - r : e + r), (n.v[3][1] = i), (n.i[0][0] = a ? e - r * t : e + r * t), (n.i[0][1] = i - s), (n.i[1][0] = a ? e + r : e - r), (n.i[1][1] = i - s * t), (n.i[2][0] = a ? e + r * t : e - r * t), (n.i[2][1] = i + s), (n.i[3][0] = a ? e - r : e + r), (n.i[3][1] = i + s * t), (n.o[0][0] = a ? e + r * t : e - r * t), (n.o[0][1] = i - s), (n.o[1][0] = a ? e + r : e - r), (n.o[1][1] = i + s * t), (n.o[2][0] = a ? e - r * t : e + r * t), (n.o[2][1] = i + s), (n.o[3][0] = a ? e - r : e + r), (n.o[3][1] = i - s * t); }, }), extendPrototype([DynamicPropertyContainer], e), e ); })(), p = (function () { function t(t, e) { (this.v = shapePool.newElement()), this.v.setPathData(!0, 0), (this.elem = t), (this.comp = t.comp), (this.data = e), (this.frameId = -1), (this.d = e.d), this.initDynamicPropertyContainer(t), 1 === e.sy ? ((this.ir = PropertyFactory.getProp(t, e.ir, 0, 0, this)), (this.is = PropertyFactory.getProp(t, e.is, 0, 0.01, this)), (this.convertToPath = this.convertStarToPath)) : (this.convertToPath = this.convertPolygonToPath), (this.pt = PropertyFactory.getProp(t, e.pt, 0, 0, this)), (this.p = PropertyFactory.getProp(t, e.p, 1, 0, this)), (this.r = PropertyFactory.getProp(t, e.r, 0, degToRads, this)), (this.or = PropertyFactory.getProp(t, e.or, 0, 0, this)), (this.os = PropertyFactory.getProp(t, e.os, 0, 0.01, this)), (this.localShapeCollection = shapeCollectionPool.newShapeCollection()), this.localShapeCollection.addShape(this.v), (this.paths = this.localShapeCollection), this.dynamicProperties.length ? (this.k = !0) : ((this.k = !1), this.convertToPath()); } return ( (t.prototype = { reset: r, getValue: function () { this.elem.globalData.frameId !== this.frameId && ((this.frameId = this.elem.globalData.frameId), this.iterateDynamicProperties(), this._mdf && this.convertToPath()); }, convertStarToPath: function () { var t, e, i, r, s = 2 * Math.floor(this.pt.v), a = (2 * Math.PI) / s, n = !0, o = this.or.v, h = this.ir.v, l = this.os.v, p = this.is.v, f = (2 * Math.PI * o) / (2 * s), m = (2 * Math.PI * h) / (2 * s), c = -Math.PI / 2; c += this.r.v; var d = 3 === this.data.d ? -1 : 1; for (this.v._length = 0, t = 0; t < s; t += 1) { (i = n ? l : p), (r = n ? f : m); var u = (e = n ? o : h) * Math.cos(c), y = e * Math.sin(c), g = 0 === u && 0 === y ? 0 : y / Math.sqrt(u * u + y * y), v = 0 === u && 0 === y ? 0 : -u / Math.sqrt(u * u + y * y); (u += +this.p.v[0]), (y += +this.p.v[1]), this.v.setTripleAt( u, y, u - g * r * i * d, y - v * r * i * d, u + g * r * i * d, y + v * r * i * d, t, !0 ), (n = !n), (c += a * d); } }, convertPolygonToPath: function () { var t, e = Math.floor(this.pt.v), i = (2 * Math.PI) / e, r = this.or.v, s = this.os.v, a = (2 * Math.PI * r) / (4 * e), n = 0.5 * -Math.PI, o = 3 === this.data.d ? -1 : 1; for ( n += this.r.v, this.v._length = 0, t = 0; t < e; t += 1 ) { var h = r * Math.cos(n), l = r * Math.sin(n), p = 0 === h && 0 === l ? 0 : l / Math.sqrt(h * h + l * l), f = 0 === h && 0 === l ? 0 : -h / Math.sqrt(h * h + l * l); (h += +this.p.v[0]), (l += +this.p.v[1]), this.v.setTripleAt( h, l, h - p * a * s * o, l - f * a * s * o, h + p * a * s * o, l + f * a * s * o, t, !0 ), (n += i * o); } (this.paths.length = 0), (this.paths[0] = this.v); }, }), extendPrototype([DynamicPropertyContainer], t), t ); })(), f = (function () { function t(t, e) { (this.v = shapePool.newElement()), (this.v.c = !0), (this.localShapeCollection = shapeCollectionPool.newShapeCollection()), this.localShapeCollection.addShape(this.v), (this.paths = this.localShapeCollection), (this.elem = t), (this.comp = t.comp), (this.frameId = -1), (this.d = e.d), this.initDynamicPropertyContainer(t), (this.p = PropertyFactory.getProp(t, e.p, 1, 0, this)), (this.s = PropertyFactory.getProp(t, e.s, 1, 0, this)), (this.r = PropertyFactory.getProp(t, e.r, 0, 0, this)), this.dynamicProperties.length ? (this.k = !0) : ((this.k = !1), this.convertRectToPath()); } return ( (t.prototype = { convertRectToPath: function () { var t = this.p.v[0], e = this.p.v[1], i = this.s.v[0] / 2, r = this.s.v[1] / 2, s = bmMin(i, r, this.r.v), a = s * (1 - roundCorner); (this.v._length = 0), 2 === this.d || 1 === this.d ? (this.v.setTripleAt( t + i, e - r + s, t + i, e - r + s, t + i, e - r + a, 0, !0 ), this.v.setTripleAt( t + i, e + r - s, t + i, e + r - a, t + i, e + r - s, 1, !0 ), 0 !== s ? (this.v.setTripleAt( t + i - s, e + r, t + i - s, e + r, t + i - a, e + r, 2, !0 ), this.v.setTripleAt( t - i + s, e + r, t - i + a, e + r, t - i + s, e + r, 3, !0 ), this.v.setTripleAt( t - i, e + r - s, t - i, e + r - s, t - i, e + r - a, 4, !0 ), this.v.setTripleAt( t - i, e - r + s, t - i, e - r + a, t - i, e - r + s, 5, !0 ), this.v.setTripleAt( t - i + s, e - r, t - i + s, e - r, t - i + a, e - r, 6, !0 ), this.v.setTripleAt( t + i - s, e - r, t + i - a, e - r, t + i - s, e - r, 7, !0 )) : (this.v.setTripleAt( t - i, e + r, t - i + a, e + r, t - i, e + r, 2 ), this.v.setTripleAt( t - i, e - r, t - i, e - r + a, t - i, e - r, 3 ))) : (this.v.setTripleAt( t + i, e - r + s, t + i, e - r + a, t + i, e - r + s, 0, !0 ), 0 !== s ? (this.v.setTripleAt( t + i - s, e - r, t + i - s, e - r, t + i - a, e - r, 1, !0 ), this.v.setTripleAt( t - i + s, e - r, t - i + a, e - r, t - i + s, e - r, 2, !0 ), this.v.setTripleAt( t - i, e - r + s, t - i, e - r + s, t - i, e - r + a, 3, !0 ), this.v.setTripleAt( t - i, e + r - s, t - i, e + r - a, t - i, e + r - s, 4, !0 ), this.v.setTripleAt( t - i + s, e + r, t - i + s, e + r, t - i + a, e + r, 5, !0 ), this.v.setTripleAt( t + i - s, e + r, t + i - a, e + r, t + i - s, e + r, 6, !0 ), this.v.setTripleAt( t + i, e + r - s, t + i, e + r - s, t + i, e + r - a, 7, !0 )) : (this.v.setTripleAt( t - i, e - r, t - i + a, e - r, t - i, e - r, 1, !0 ), this.v.setTripleAt( t - i, e + r, t - i, e + r - a, t - i, e + r, 2, !0 ), this.v.setTripleAt( t + i, e + r, t + i - a, e + r, t + i, e + r, 3, !0 ))); }, getValue: function () { this.elem.globalData.frameId !== this.frameId && ((this.frameId = this.elem.globalData.frameId), this.iterateDynamicProperties(), this._mdf && this.convertRectToPath()); }, reset: r, }), extendPrototype([DynamicPropertyContainer], t), t ); })(); var m = { getShapeProp: function (t, e, i) { var r; return ( 3 === i || 4 === i ? (r = (3 === i ? e.pt : e.ks).k.length ? new h(t, e, i) : new n(t, e, i)) : 5 === i ? (r = new f(t, e)) : 6 === i ? (r = new l(t, e)) : 7 === i && (r = new p(t, e)), r.k && t.addDynamicProperty(r), r ); }, getConstructorFunction: function () { return n; }, getKeyframedConstructorFunction: function () { return h; }, }; return m; })(), Matrix = (function () { var t = Math.cos, e = Math.sin, i = Math.tan, r = Math.round; function s() { return ( (this.props[0] = 1), (this.props[1] = 0), (this.props[2] = 0), (this.props[3] = 0), (this.props[4] = 0), (this.props[5] = 1), (this.props[6] = 0), (this.props[7] = 0), (this.props[8] = 0), (this.props[9] = 0), (this.props[10] = 1), (this.props[11] = 0), (this.props[12] = 0), (this.props[13] = 0), (this.props[14] = 0), (this.props[15] = 1), this ); } function a(i) { if (0 === i) return this; var r = t(i), s = e(i); return this._t(r, -s, 0, 0, s, r, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } function n(i) { if (0 === i) return this; var r = t(i), s = e(i); return this._t(1, 0, 0, 0, 0, r, -s, 0, 0, s, r, 0, 0, 0, 0, 1); } function o(i) { if (0 === i) return this; var r = t(i), s = e(i); return this._t(r, 0, s, 0, 0, 1, 0, 0, -s, 0, r, 0, 0, 0, 0, 1); } function h(i) { if (0 === i) return this; var r = t(i), s = e(i); return this._t(r, -s, 0, 0, s, r, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } function l(t, e) { return this._t(1, e, t, 1, 0, 0); } function p(t, e) { return this.shear(i(t), i(e)); } function f(r, s) { var a = t(s), n = e(s); return this._t(a, n, 0, 0, -n, a, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) ._t(1, 0, 0, 0, i(r), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) ._t(a, -n, 0, 0, n, a, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); } function m(t, e, i) { return ( i || 0 === i || (i = 1), 1 === t && 1 === e && 1 === i ? this : this._t(t, 0, 0, 0, 0, e, 0, 0, 0, 0, i, 0, 0, 0, 0, 1) ); } function c(t, e, i, r, s, a, n, o, h, l, p, f, m, c, d, u) { return ( (this.props[0] = t), (this.props[1] = e), (this.props[2] = i), (this.props[3] = r), (this.props[4] = s), (this.props[5] = a), (this.props[6] = n), (this.props[7] = o), (this.props[8] = h), (this.props[9] = l), (this.props[10] = p), (this.props[11] = f), (this.props[12] = m), (this.props[13] = c), (this.props[14] = d), (this.props[15] = u), this ); } function d(t, e, i) { return ( (i = i || 0), 0 !== t || 0 !== e || 0 !== i ? this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, t, e, i, 1) : this ); } function u(t, e, i, r, s, a, n, o, h, l, p, f, m, c, d, u) { var y = this.props; if ( 1 === t && 0 === e && 0 === i && 0 === r && 0 === s && 1 === a && 0 === n && 0 === o && 0 === h && 0 === l && 1 === p && 0 === f ) return ( (y[12] = y[12] * t + y[15] * m), (y[13] = y[13] * a + y[15] * c), (y[14] = y[14] * p + y[15] * d), (y[15] *= u), (this._identityCalculated = !1), this ); var g = y[0], v = y[1], b = y[2], x = y[3], P = y[4], E = y[5], S = y[6], C = y[7], _ = y[8], A = y[9], T = y[10], M = y[11], k = y[12], D = y[13], F = y[14], w = y[15]; return ( (y[0] = g * t + v * s + b * h + x * m), (y[1] = g * e + v * a + b * l + x * c), (y[2] = g * i + v * n + b * p + x * d), (y[3] = g * r + v * o + b * f + x * u), (y[4] = P * t + E * s + S * h + C * m), (y[5] = P * e + E * a + S * l + C * c), (y[6] = P * i + E * n + S * p + C * d), (y[7] = P * r + E * o + S * f + C * u), (y[8] = _ * t + A * s + T * h + M * m), (y[9] = _ * e + A * a + T * l + M * c), (y[10] = _ * i + A * n + T * p + M * d), (y[11] = _ * r + A * o + T * f + M * u), (y[12] = k * t + D * s + F * h + w * m), (y[13] = k * e + D * a + F * l + w * c), (y[14] = k * i + D * n + F * p + w * d), (y[15] = k * r + D * o + F * f + w * u), (this._identityCalculated = !1), this ); } function y(t) { var e = t.props; return this.transform( e[0], e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8], e[9], e[10], e[11], e[12], e[13], e[14], e[15] ); } function g() { return ( this._identityCalculated || ((this._identity = !( 1 !== this.props[0] || 0 !== this.props[1] || 0 !== this.props[2] || 0 !== this.props[3] || 0 !== this.props[4] || 1 !== this.props[5] || 0 !== this.props[6] || 0 !== this.props[7] || 0 !== this.props[8] || 0 !== this.props[9] || 1 !== this.props[10] || 0 !== this.props[11] || 0 !== this.props[12] || 0 !== this.props[13] || 0 !== this.props[14] || 1 !== this.props[15] )), (this._identityCalculated = !0)), this._identity ); } function v(t) { for (var e = 0; e < 16; ) { if (t.props[e] !== this.props[e]) return !1; e += 1; } return !0; } function b(t) { var e; for (e = 0; e < 16; e += 1) t.props[e] = this.props[e]; return t; } function x(t) { var e; for (e = 0; e < 16; e += 1) this.props[e] = t[e]; } function P(t, e, i) { return { x: t * this.props[0] + e * this.props[4] + i * this.props[8] + this.props[12], y: t * this.props[1] + e * this.props[5] + i * this.props[9] + this.props[13], z: t * this.props[2] + e * this.props[6] + i * this.props[10] + this.props[14], }; } function E(t, e, i) { return ( t * this.props[0] + e * this.props[4] + i * this.props[8] + this.props[12] ); } function S(t, e, i) { return ( t * this.props[1] + e * this.props[5] + i * this.props[9] + this.props[13] ); } function C(t, e, i) { return ( t * this.props[2] + e * this.props[6] + i * this.props[10] + this.props[14] ); } function _() { var t = this.props[0] * this.props[5] - this.props[1] * this.props[4], e = this.props[5] / t, i = -this.props[1] / t, r = -this.props[4] / t, s = this.props[0] / t, a = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / t, n = -( this.props[0] * this.props[13] - this.props[1] * this.props[12] ) / t, o = new Matrix(); return ( (o.props[0] = e), (o.props[1] = i), (o.props[4] = r), (o.props[5] = s), (o.props[12] = a), (o.props[13] = n), o ); } function A(t) { return this.getInverseMatrix().applyToPointArray( t[0], t[1], t[2] || 0 ); } function T(t) { var e, i = t.length, r = []; for (e = 0; e < i; e += 1) r[e] = A(t[e]); return r; } function M(t, e, i) { var r = createTypedArray("float32", 6); if (this.isIdentity()) (r[0] = t[0]), (r[1] = t[1]), (r[2] = e[0]), (r[3] = e[1]), (r[4] = i[0]), (r[5] = i[1]); else { var s = this.props[0], a = this.props[1], n = this.props[4], o = this.props[5], h = this.props[12], l = this.props[13]; (r[0] = t[0] * s + t[1] * n + h), (r[1] = t[0] * a + t[1] * o + l), (r[2] = e[0] * s + e[1] * n + h), (r[3] = e[0] * a + e[1] * o + l), (r[4] = i[0] * s + i[1] * n + h), (r[5] = i[0] * a + i[1] * o + l); } return r; } function k(t, e, i) { return this.isIdentity() ? [t, e, i] : [ t * this.props[0] + e * this.props[4] + i * this.props[8] + this.props[12], t * this.props[1] + e * this.props[5] + i * this.props[9] + this.props[13], t * this.props[2] + e * this.props[6] + i * this.props[10] + this.props[14], ]; } function D(t, e) { if (this.isIdentity()) return t + "," + e; var i = this.props; return ( Math.round(100 * (t * i[0] + e * i[4] + i[12])) / 100 + "," + Math.round(100 * (t * i[1] + e * i[5] + i[13])) / 100 ); } function F() { for (var t = 0, e = this.props, i = "matrix3d("; t < 16; ) (i += r(1e4 * e[t]) / 1e4), (i += 15 === t ? ")" : ","), (t += 1); return i; } function w(t) { return (t < 1e-6 && t > 0) || (t > -1e-6 && t < 0) ? r(1e4 * t) / 1e4 : t; } function I() { var t = this.props; return ( "matrix(" + w(t[0]) + "," + w(t[1]) + "," + w(t[4]) + "," + w(t[5]) + "," + w(t[12]) + "," + w(t[13]) + ")" ); } return function () { (this.reset = s), (this.rotate = a), (this.rotateX = n), (this.rotateY = o), (this.rotateZ = h), (this.skew = p), (this.skewFromAxis = f), (this.shear = l), (this.scale = m), (this.setTransform = c), (this.translate = d), (this.transform = u), (this.multiply = y), (this.applyToPoint = P), (this.applyToX = E), (this.applyToY = S), (this.applyToZ = C), (this.applyToPointArray = k), (this.applyToTriplePoints = M), (this.applyToPointStringified = D), (this.toCSS = F), (this.to2dCSS = I), (this.clone = b), (this.cloneFromProps = x), (this.equals = v), (this.inversePoints = T), (this.inversePoint = A), (this.getInverseMatrix = _), (this._t = this.transform), (this.isIdentity = g), (this._identity = !0), (this._identityCalculated = !1), (this.props = createTypedArray("float32", 16)), this.reset(); }; })(); function _typeof$3(t) { return ( (_typeof$3 = "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; }), _typeof$3(t) ); } var lottie = {}, standalone = "__[STANDALONE]__", animationData = "__[ANIMATIONDATA]__", renderer = ""; function setLocation(t) { setLocationHref(t); } function searchAnimations() { !0 === standalone ? animationManager.searchAnimations(animationData, standalone, renderer) : animationManager.searchAnimations(); } function setSubframeRendering(t) { setSubframeEnabled(t); } function setPrefix(t) { setIdPrefix(t); } function loadAnimation(t) { return ( !0 === standalone && (t.animationData = JSON.parse(animationData)), animationManager.loadAnimation(t) ); } function setQuality(t) { if ("string" == typeof t) switch (t) { case "high": setDefaultCurveSegments(200); break; default: case "medium": setDefaultCurveSegments(50); break; case "low": setDefaultCurveSegments(10); } else !isNaN(t) && t > 1 && setDefaultCurveSegments(t); getDefaultCurveSegments() >= 50 ? roundValues(!1) : roundValues(!0); } function inBrowser() { return "undefined" != typeof navigator; } function installPlugin(t, e) { "expressions" === t && setExpressionsPlugin(e); } function getFactory(t) { switch (t) { case "propertyFactory": return PropertyFactory; case "shapePropertyFactory": return ShapePropertyFactory; case "matrix": return Matrix; default: return null; } } function checkReady() { "complete" === document.readyState && (clearInterval(readyStateCheckInterval), searchAnimations()); } function getQueryVariable(t) { for (var e = queryString.split("&"), i = 0; i < e.length; i += 1) { var r = e[i].split("="); if (decodeURIComponent(r[0]) == t) return decodeURIComponent(r[1]); } return null; } (lottie.play = animationManager.play), (lottie.pause = animationManager.pause), (lottie.setLocationHref = setLocation), (lottie.togglePause = animationManager.togglePause), (lottie.setSpeed = animationManager.setSpeed), (lottie.setDirection = animationManager.setDirection), (lottie.stop = animationManager.stop), (lottie.searchAnimations = searchAnimations), (lottie.registerAnimation = animationManager.registerAnimation), (lottie.loadAnimation = loadAnimation), (lottie.setSubframeRendering = setSubframeRendering), (lottie.resize = animationManager.resize), (lottie.goToAndStop = animationManager.goToAndStop), (lottie.destroy = animationManager.destroy), (lottie.setQuality = setQuality), (lottie.inBrowser = inBrowser), (lottie.installPlugin = installPlugin), (lottie.freeze = animationManager.freeze), (lottie.unfreeze = animationManager.unfreeze), (lottie.setVolume = animationManager.setVolume), (lottie.mute = animationManager.mute), (lottie.unmute = animationManager.unmute), (lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations), (lottie.useWebWorker = setWebWorker), (lottie.setIDPrefix = setPrefix), (lottie.__getFactory = getFactory), (lottie.version = "5.12.1"); var queryString = ""; if (standalone) { var scripts = document.getElementsByTagName("script"), index = scripts.length - 1, myScript = scripts[index] || { src: "" }; (queryString = myScript.src ? myScript.src.replace(/^[^\?]+\??/, "") : ""), (renderer = getQueryVariable("renderer")); } var readyStateCheckInterval = setInterval(checkReady, 100); try { ("object" === ("undefined" == typeof exports ? "undefined" : _typeof$3(exports)) && "undefined" != typeof module) || ("function" == typeof define && define.amd) || (window.bodymovin = lottie); } catch (t) {} var ShapeModifiers = (function () { var t = {}, e = {}; return ( (t.registerModifier = function (t, i) { e[t] || (e[t] = i); }), (t.getModifier = function (t, i, r) { return new e[t](i, r); }), t ); })(); function ShapeModifier() {} function TrimModifier() {} function PuckerAndBloatModifier() {} (ShapeModifier.prototype.initModifierProperties = function () {}), (ShapeModifier.prototype.addShapeToModifier = function () {}), (ShapeModifier.prototype.addShape = function (t) { if (!this.closed) { t.sh.container.addDynamicProperty(t.sh); var e = { shape: t.sh, data: t, localShapeCollection: shapeCollectionPool.newShapeCollection(), }; this.shapes.push(e), this.addShapeToModifier(e), this._isAnimated && t.setAsAnimated(); } }), (ShapeModifier.prototype.init = function (t, e) { (this.shapes = []), (this.elem = t), this.initDynamicPropertyContainer(t), this.initModifierProperties(t, e), (this.frameId = initialDefaultFrame), (this.closed = !1), (this.k = !1), this.dynamicProperties.length ? (this.k = !0) : this.getValue(!0); }), (ShapeModifier.prototype.processKeys = function () { this.elem.globalData.frameId !== this.frameId && ((this.frameId = this.elem.globalData.frameId), this.iterateDynamicProperties()); }), extendPrototype([DynamicPropertyContainer], ShapeModifier), extendPrototype([ShapeModifier], TrimModifier), (TrimModifier.prototype.initModifierProperties = function (t, e) { (this.s = PropertyFactory.getProp(t, e.s, 0, 0.01, this)), (this.e = PropertyFactory.getProp(t, e.e, 0, 0.01, this)), (this.o = PropertyFactory.getProp(t, e.o, 0, 0, this)), (this.sValue = 0), (this.eValue = 0), (this.getValue = this.processKeys), (this.m = e.m), (this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length); }), (TrimModifier.prototype.addShapeToModifier = function (t) { t.pathsData = []; }), (TrimModifier.prototype.calculateShapeEdges = function (t, e, i, r, s) { var a = []; e <= 1 ? a.push({ s: t, e: e }) : t >= 1 ? a.push({ s: t - 1, e: e - 1 }) : (a.push({ s: t, e: 1 }), a.push({ s: 0, e: e - 1 })); var n, o, h = [], l = a.length; for (n = 0; n < l; n += 1) { var p, f; if (!((o = a[n]).e * s < r || o.s * s > r + i)) (p = o.s * s <= r ? 0 : (o.s * s - r) / i), (f = o.e * s >= r + i ? 1 : (o.e * s - r) / i), h.push([p, f]); } return h.length || h.push([0, 0]), h; }), (TrimModifier.prototype.releasePathsData = function (t) { var e, i = t.length; for (e = 0; e < i; e += 1) segmentsLengthPool.release(t[e]); return (t.length = 0), t; }), (TrimModifier.prototype.processShapes = function (t) { var e, i, r, s; if (this._mdf || t) { var a = (this.o.v % 360) / 360; if ( (a < 0 && (a += 1), (e = this.s.v > 1 ? 1 + a : this.s.v < 0 ? 0 + a : this.s.v + a) > (i = this.e.v > 1 ? 1 + a : this.e.v < 0 ? 0 + a : this.e.v + a)) ) { var n = e; (e = i), (i = n); } (e = 1e-4 * Math.round(1e4 * e)), (i = 1e-4 * Math.round(1e4 * i)), (this.sValue = e), (this.eValue = i); } else (e = this.sValue), (i = this.eValue); var o, h, l, p, f, m = this.shapes.length, c = 0; if (i === e) for (s = 0; s < m; s += 1) this.shapes[s].localShapeCollection.releaseShapes(), (this.shapes[s].shape._mdf = !0), (this.shapes[s].shape.paths = this.shapes[s].localShapeCollection), this._mdf && (this.shapes[s].pathsData.length = 0); else if ((1 === i && 0 === e) || (0 === i && 1 === e)) { if (this._mdf) for (s = 0; s < m; s += 1) (this.shapes[s].pathsData.length = 0), (this.shapes[s].shape._mdf = !0); } else { var d, u, y = []; for (s = 0; s < m; s += 1) if ( (d = this.shapes[s]).shape._mdf || this._mdf || t || 2 === this.m ) { if ( ((h = (r = d.shape.paths)._length), (f = 0), !d.shape._mdf && d.pathsData.length) ) f = d.totalShapeLength; else { for ( l = this.releasePathsData(d.pathsData), o = 0; o < h; o += 1 ) (p = bez.getSegmentsLength(r.shapes[o])), l.push(p), (f += p.totalLength); (d.totalShapeLength = f), (d.pathsData = l); } (c += f), (d.shape._mdf = !0); } else d.shape.paths = d.localShapeCollection; var g, v = e, b = i, x = 0; for (s = m - 1; s >= 0; s -= 1) if ((d = this.shapes[s]).shape._mdf) { for ( (u = d.localShapeCollection).releaseShapes(), 2 === this.m && m > 1 ? ((g = this.calculateShapeEdges( e, i, d.totalShapeLength, x, c )), (x += d.totalShapeLength)) : (g = [[v, b]]), h = g.length, o = 0; o < h; o += 1 ) { (v = g[o][0]), (b = g[o][1]), (y.length = 0), b <= 1 ? y.push({ s: d.totalShapeLength * v, e: d.totalShapeLength * b, }) : v >= 1 ? y.push({ s: d.totalShapeLength * (v - 1), e: d.totalShapeLength * (b - 1), }) : (y.push({ s: d.totalShapeLength * v, e: d.totalShapeLength, }), y.push({ s: 0, e: d.totalShapeLength * (b - 1) })); var P = this.addShapes(d, y[0]); if (y[0].s !== y[0].e) { if (y.length > 1) if (d.shape.paths.shapes[d.shape.paths._length - 1].c) { var E = P.pop(); this.addPaths(P, u), (P = this.addShapes(d, y[1], E)); } else this.addPaths(P, u), (P = this.addShapes(d, y[1])); this.addPaths(P, u); } } d.shape.paths = u; } } }), (TrimModifier.prototype.addPaths = function (t, e) { var i, r = t.length; for (i = 0; i < r; i += 1) e.addShape(t[i]); }), (TrimModifier.prototype.addSegment = function (t, e, i, r, s, a, n) { s.setXYAt(e[0], e[1], "o", a), s.setXYAt(i[0], i[1], "i", a + 1), n && s.setXYAt(t[0], t[1], "v", a), s.setXYAt(r[0], r[1], "v", a + 1); }), (TrimModifier.prototype.addSegmentFromArray = function (t, e, i, r) { e.setXYAt(t[1], t[5], "o", i), e.setXYAt(t[2], t[6], "i", i + 1), r && e.setXYAt(t[0], t[4], "v", i), e.setXYAt(t[3], t[7], "v", i + 1); }), (TrimModifier.prototype.addShapes = function (t, e, i) { var r, s, a, n, o, h, l, p, f = t.pathsData, m = t.shape.paths.shapes, c = t.shape.paths._length, d = 0, u = [], y = !0; for ( i ? ((o = i._length), (p = i._length)) : ((i = shapePool.newElement()), (o = 0), (p = 0)), u.push(i), r = 0; r < c; r += 1 ) { for ( h = f[r].lengths, i.c = m[r].c, a = m[r].c ? h.length : h.length + 1, s = 1; s < a; s += 1 ) if (d + (n = h[s - 1]).addedLength < e.s) (d += n.addedLength), (i.c = !1); else { if (d > e.e) { i.c = !1; break; } e.s <= d && e.e >= d + n.addedLength ? (this.addSegment( m[r].v[s - 1], m[r].o[s - 1], m[r].i[s], m[r].v[s], i, o, y ), (y = !1)) : ((l = bez.getNewSegment( m[r].v[s - 1], m[r].v[s], m[r].o[s - 1], m[r].i[s], (e.s - d) / n.addedLength, (e.e - d) / n.addedLength, h[s - 1] )), this.addSegmentFromArray(l, i, o, y), (y = !1), (i.c = !1)), (d += n.addedLength), (o += 1); } if (m[r].c && h.length) { if (((n = h[s - 1]), d <= e.e)) { var g = h[s - 1].addedLength; e.s <= d && e.e >= d + g ? (this.addSegment( m[r].v[s - 1], m[r].o[s - 1], m[r].i[0], m[r].v[0], i, o, y ), (y = !1)) : ((l = bez.getNewSegment( m[r].v[s - 1], m[r].v[0], m[r].o[s - 1], m[r].i[0], (e.s - d) / g, (e.e - d) / g, h[s - 1] )), this.addSegmentFromArray(l, i, o, y), (y = !1), (i.c = !1)); } else i.c = !1; (d += n.addedLength), (o += 1); } if ( (i._length && (i.setXYAt(i.v[p][0], i.v[p][1], "i", p), i.setXYAt( i.v[i._length - 1][0], i.v[i._length - 1][1], "o", i._length - 1 )), d > e.e) ) break; r < c - 1 && ((i = shapePool.newElement()), (y = !0), u.push(i), (o = 0)); } return u; }), extendPrototype([ShapeModifier], PuckerAndBloatModifier), (PuckerAndBloatModifier.prototype.initModifierProperties = function ( t, e ) { (this.getValue = this.processKeys), (this.amount = PropertyFactory.getProp(t, e.a, 0, null, this)), (this._isAnimated = !!this.amount.effectsSequence.length); }), (PuckerAndBloatModifier.prototype.processPath = function (t, e) { var i = e / 100, r = [0, 0], s = t._length, a = 0; for (a = 0; a < s; a += 1) (r[0] += t.v[a][0]), (r[1] += t.v[a][1]); (r[0] /= s), (r[1] /= s); var n, o, h, l, p, f, m = shapePool.newElement(); for (m.c = t.c, a = 0; a < s; a += 1) (n = t.v[a][0] + (r[0] - t.v[a][0]) * i), (o = t.v[a][1] + (r[1] - t.v[a][1]) * i), (h = t.o[a][0] + (r[0] - t.o[a][0]) * -i), (l = t.o[a][1] + (r[1] - t.o[a][1]) * -i), (p = t.i[a][0] + (r[0] - t.i[a][0]) * -i), (f = t.i[a][1] + (r[1] - t.i[a][1]) * -i), m.setTripleAt(n, o, h, l, p, f, a); return m; }), (PuckerAndBloatModifier.prototype.processShapes = function (t) { var e, i, r, s, a, n, o = this.shapes.length, h = this.amount.v; if (0 !== h) for (i = 0; i < o; i += 1) { if ( ((n = (a = this.shapes[i]).localShapeCollection), a.shape._mdf || this._mdf || t) ) for ( n.releaseShapes(), a.shape._mdf = !0, e = a.shape.paths.shapes, s = a.shape.paths._length, r = 0; r < s; r += 1 ) n.addShape(this.processPath(e[r], h)); a.shape.paths = a.localShapeCollection; } this.dynamicProperties.length || (this._mdf = !1); }); var TransformPropertyFactory = (function () { var t = [0, 0]; function e(t, e, i) { if ( ((this.elem = t), (this.frameId = -1), (this.propType = "transform"), (this.data = e), (this.v = new Matrix()), (this.pre = new Matrix()), (this.appliedTransformations = 0), this.initDynamicPropertyContainer(i || t), e.p && e.p.s ? ((this.px = PropertyFactory.getProp(t, e.p.x, 0, 0, this)), (this.py = PropertyFactory.getProp(t, e.p.y, 0, 0, this)), e.p.z && (this.pz = PropertyFactory.getProp(t, e.p.z, 0, 0, this))) : (this.p = PropertyFactory.getProp( t, e.p || { k: [0, 0, 0] }, 1, 0, this )), e.rx) ) { if ( ((this.rx = PropertyFactory.getProp(t, e.rx, 0, degToRads, this)), (this.ry = PropertyFactory.getProp(t, e.ry, 0, degToRads, this)), (this.rz = PropertyFactory.getProp(t, e.rz, 0, degToRads, this)), e.or.k[0].ti) ) { var r, s = e.or.k.length; for (r = 0; r < s; r += 1) (e.or.k[r].to = null), (e.or.k[r].ti = null); } (this.or = PropertyFactory.getProp(t, e.or, 1, degToRads, this)), (this.or.sh = !0); } else this.r = PropertyFactory.getProp( t, e.r || { k: 0 }, 0, degToRads, this ); e.sk && ((this.sk = PropertyFactory.getProp(t, e.sk, 0, degToRads, this)), (this.sa = PropertyFactory.getProp(t, e.sa, 0, degToRads, this))), (this.a = PropertyFactory.getProp( t, e.a || { k: [0, 0, 0] }, 1, 0, this )), (this.s = PropertyFactory.getProp( t, e.s || { k: [100, 100, 100] }, 1, 0.01, this )), e.o ? (this.o = PropertyFactory.getProp(t, e.o, 0, 0.01, t)) : (this.o = { _mdf: !1, v: 1 }), (this._isDirty = !0), this.dynamicProperties.length || this.getValue(!0); } return ( (e.prototype = { applyToMatrix: function (t) { var e = this._mdf; this.iterateDynamicProperties(), (this._mdf = this._mdf || e), this.a && t.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), this.s && t.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.sk && t.skewFromAxis(-this.sk.v, this.sa.v), this.r ? t.rotate(-this.r.v) : t .rotateZ(-this.rz.v) .rotateY(this.ry.v) .rotateX(this.rx.v) .rotateZ(-this.or.v[2]) .rotateY(this.or.v[1]) .rotateX(this.or.v[0]), this.data.p.s ? this.data.p.z ? t.translate(this.px.v, this.py.v, -this.pz.v) : t.translate(this.px.v, this.py.v, 0) : t.translate(this.p.v[0], this.p.v[1], -this.p.v[2]); }, getValue: function (e) { if (this.elem.globalData.frameId !== this.frameId) { if ( (this._isDirty && (this.precalculateMatrix(), (this._isDirty = !1)), this.iterateDynamicProperties(), this._mdf || e) ) { var i; if ( (this.v.cloneFromProps(this.pre.props), this.appliedTransformations < 1 && this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), this.appliedTransformations < 2 && this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]), this.sk && this.appliedTransformations < 3 && this.v.skewFromAxis(-this.sk.v, this.sa.v), this.r && this.appliedTransformations < 4 ? this.v.rotate(-this.r.v) : !this.r && this.appliedTransformations < 4 && this.v .rotateZ(-this.rz.v) .rotateY(this.ry.v) .rotateX(this.rx.v) .rotateZ(-this.or.v[2]) .rotateY(this.or.v[1]) .rotateX(this.or.v[0]), this.autoOriented) ) { var r, s; if ( ((i = this.elem.globalData.frameRate), this.p && this.p.keyframes && this.p.getValueAtTime) ) this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t ? ((r = this.p.getValueAtTime( (this.p.keyframes[0].t + 0.01) / i, 0 )), (s = this.p.getValueAtTime( this.p.keyframes[0].t / i, 0 ))) : this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t ? ((r = this.p.getValueAtTime( this.p.keyframes[this.p.keyframes.length - 1].t / i, 0 )), (s = this.p.getValueAtTime( (this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / i, 0 ))) : ((r = this.p.pv), (s = this.p.getValueAtTime( (this.p._caching.lastFrame + this.p.offsetTime - 0.01) / i, this.p.offsetTime ))); else if ( this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime ) { (r = []), (s = []); var a = this.px, n = this.py; a._caching.lastFrame + a.offsetTime <= a.keyframes[0].t ? ((r[0] = a.getValueAtTime( (a.keyframes[0].t + 0.01) / i, 0 )), (r[1] = n.getValueAtTime( (n.keyframes[0].t + 0.01) / i, 0 )), (s[0] = a.getValueAtTime(a.keyframes[0].t / i, 0)), (s[1] = n.getValueAtTime(n.keyframes[0].t / i, 0))) : a._caching.lastFrame + a.offsetTime >= a.keyframes[a.keyframes.length - 1].t ? ((r[0] = a.getValueAtTime( a.keyframes[a.keyframes.length - 1].t / i, 0 )), (r[1] = n.getValueAtTime( n.keyframes[n.keyframes.length - 1].t / i, 0 )), (s[0] = a.getValueAtTime( (a.keyframes[a.keyframes.length - 1].t - 0.01) / i, 0 )), (s[1] = n.getValueAtTime( (n.keyframes[n.keyframes.length - 1].t - 0.01) / i, 0 ))) : ((r = [a.pv, n.pv]), (s[0] = a.getValueAtTime( (a._caching.lastFrame + a.offsetTime - 0.01) / i, a.offsetTime )), (s[1] = n.getValueAtTime( (n._caching.lastFrame + n.offsetTime - 0.01) / i, n.offsetTime ))); } else r = s = t; this.v.rotate(-Math.atan2(r[1] - s[1], r[0] - s[0])); } this.data.p && this.data.p.s ? this.data.p.z ? this.v.translate(this.px.v, this.py.v, -this.pz.v) : this.v.translate(this.px.v, this.py.v, 0) : this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]); } this.frameId = this.elem.globalData.frameId; } }, precalculateMatrix: function () { if ( ((this.appliedTransformations = 0), this.pre.reset(), !this.a.effectsSequence.length && (this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]), (this.appliedTransformations = 1), !this.s.effectsSequence.length)) ) { if ( (this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]), (this.appliedTransformations = 2), this.sk) ) { if ( this.sk.effectsSequence.length || this.sa.effectsSequence.length ) return; this.pre.skewFromAxis(-this.sk.v, this.sa.v), (this.appliedTransformations = 3); } this.r ? this.r.effectsSequence.length || (this.pre.rotate(-this.r.v), (this.appliedTransformations = 4)) : this.rz.effectsSequence.length || this.ry.effectsSequence.length || this.rx.effectsSequence.length || this.or.effectsSequence.length || (this.pre .rotateZ(-this.rz.v) .rotateY(this.ry.v) .rotateX(this.rx.v) .rotateZ(-this.or.v[2]) .rotateY(this.or.v[1]) .rotateX(this.or.v[0]), (this.appliedTransformations = 4)); } }, autoOrient: function () {}, }), extendPrototype([DynamicPropertyContainer], e), (e.prototype.addDynamicProperty = function (t) { this._addDynamicProperty(t), this.elem.addDynamicProperty(t), (this._isDirty = !0); }), (e.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty), { getTransformProperty: function (t, i, r) { return new e(t, i, r); }, } ); })(); function RepeaterModifier() {} function RoundCornersModifier() {} function floatEqual(t, e) { return 1e5 * Math.abs(t - e) <= Math.min(Math.abs(t), Math.abs(e)); } function floatZero(t) { return Math.abs(t) <= 1e-5; } function lerp(t, e, i) { return t * (1 - i) + e * i; } function lerpPoint(t, e, i) { return [lerp(t[0], e[0], i), lerp(t[1], e[1], i)]; } function quadRoots(t, e, i) { if (0 === t) return []; var r = e * e - 4 * t * i; if (r < 0) return []; var s = -e / (2 * t); if (0 === r) return [s]; var a = Math.sqrt(r) / (2 * t); return [s - a, s + a]; } function polynomialCoefficients(t, e, i, r) { return [3 * e - t - 3 * i + r, 3 * t - 6 * e + 3 * i, -3 * t + 3 * e, t]; } function singlePoint(t) { return new PolynomialBezier(t, t, t, t, !1); } function PolynomialBezier(t, e, i, r, s) { s && pointEqual(t, e) && (e = lerpPoint(t, r, 1 / 3)), s && pointEqual(i, r) && (i = lerpPoint(t, r, 2 / 3)); var a = polynomialCoefficients(t[0], e[0], i[0], r[0]), n = polynomialCoefficients(t[1], e[1], i[1], r[1]); (this.a = [a[0], n[0]]), (this.b = [a[1], n[1]]), (this.c = [a[2], n[2]]), (this.d = [a[3], n[3]]), (this.points = [t, e, i, r]); } function extrema(t, e) { var i = t.points[0][e], r = t.points[t.points.length - 1][e]; if (i > r) { var s = r; (r = i), (i = s); } for ( var a = quadRoots(3 * t.a[e], 2 * t.b[e], t.c[e]), n = 0; n < a.length; n += 1 ) if (a[n] > 0 && a[n] < 1) { var o = t.point(a[n])[e]; o < i ? (i = o) : o > r && (r = o); } return { min: i, max: r }; } function intersectData(t, e, i) { var r = t.boundingBox(); return { cx: r.cx, cy: r.cy, width: r.width, height: r.height, bez: t, t: (e + i) / 2, t1: e, t2: i, }; } function splitData(t) { var e = t.bez.split(0.5); return [intersectData(e[0], t.t1, t.t), intersectData(e[1], t.t, t.t2)]; } function boxIntersect(t, e) { return ( 2 * Math.abs(t.cx - e.cx) < t.width + e.width && 2 * Math.abs(t.cy - e.cy) < t.height + e.height ); } function intersectsImpl(t, e, i, r, s, a) { if (boxIntersect(t, e)) if ( i >= a || (t.width <= r && t.height <= r && e.width <= r && e.height <= r) ) s.push([t.t, e.t]); else { var n = splitData(t), o = splitData(e); intersectsImpl(n[0], o[0], i + 1, r, s, a), intersectsImpl(n[0], o[1], i + 1, r, s, a), intersectsImpl(n[1], o[0], i + 1, r, s, a), intersectsImpl(n[1], o[1], i + 1, r, s, a); } } function crossProduct(t, e) { return [ t[1] * e[2] - t[2] * e[1], t[2] * e[0] - t[0] * e[2], t[0] * e[1] - t[1] * e[0], ]; } function lineIntersection(t, e, i, r) { var s = [t[0], t[1], 1], a = [e[0], e[1], 1], n = [i[0], i[1], 1], o = [r[0], r[1], 1], h = crossProduct(crossProduct(s, a), crossProduct(n, o)); return floatZero(h[2]) ? null : [h[0] / h[2], h[1] / h[2]]; } function polarOffset(t, e, i) { return [t[0] + Math.cos(e) * i, t[1] - Math.sin(e) * i]; } function pointDistance(t, e) { return Math.hypot(t[0] - e[0], t[1] - e[1]); } function pointEqual(t, e) { return floatEqual(t[0], e[0]) && floatEqual(t[1], e[1]); } function ZigZagModifier() {} function setPoint(t, e, i, r, s, a, n) { var o = i - Math.PI / 2, h = i + Math.PI / 2, l = e[0] + Math.cos(i) * r * s, p = e[1] - Math.sin(i) * r * s; t.setTripleAt( l, p, l + Math.cos(o) * a, p - Math.sin(o) * a, l + Math.cos(h) * n, p - Math.sin(h) * n, t.length() ); } function getPerpendicularVector(t, e) { var i = [e[0] - t[0], e[1] - t[1]], r = 0.5 * -Math.PI; return [ Math.cos(r) * i[0] - Math.sin(r) * i[1], Math.sin(r) * i[0] + Math.cos(r) * i[1], ]; } function getProjectingAngle(t, e) { var i = 0 === e ? t.length() - 1 : e - 1, r = (e + 1) % t.length(), s = getPerpendicularVector(t.v[i], t.v[r]); return Math.atan2(0, 1) - Math.atan2(s[1], s[0]); } function zigZagCorner(t, e, i, r, s, a, n) { var o = getProjectingAngle(e, i), h = e.v[i % e._length], l = e.v[0 === i ? e._length - 1 : i - 1], p = e.v[(i + 1) % e._length], f = 2 === a ? Math.sqrt(Math.pow(h[0] - l[0], 2) + Math.pow(h[1] - l[1], 2)) : 0, m = 2 === a ? Math.sqrt(Math.pow(h[0] - p[0], 2) + Math.pow(h[1] - p[1], 2)) : 0; setPoint( t, e.v[i % e._length], o, n, r, m / (2 * (s + 1)), f / (2 * (s + 1)), a ); } function zigZagSegment(t, e, i, r, s, a) { for (var n = 0; n < r; n += 1) { var o = (n + 1) / (r + 1), h = 2 === s ? Math.sqrt( Math.pow(e.points[3][0] - e.points[0][0], 2) + Math.pow(e.points[3][1] - e.points[0][1], 2) ) : 0, l = e.normalAngle(o); setPoint( t, e.point(o), l, a, i, h / (2 * (r + 1)), h / (2 * (r + 1)), s ), (a = -a); } return a; } function linearOffset(t, e, i) { var r = Math.atan2(e[0] - t[0], e[1] - t[1]); return [polarOffset(t, r, i), polarOffset(e, r, i)]; } function offsetSegment(t, e) { var i, r, s, a, n, o, h; (i = (h = linearOffset(t.points[0], t.points[1], e))[0]), (r = h[1]), (s = (h = linearOffset(t.points[1], t.points[2], e))[0]), (a = h[1]), (n = (h = linearOffset(t.points[2], t.points[3], e))[0]), (o = h[1]); var l = lineIntersection(i, r, s, a); null === l && (l = r); var p = lineIntersection(n, o, s, a); return null === p && (p = n), new PolynomialBezier(i, l, p, o); } function joinLines(t, e, i, r, s) { var a = e.points[3], n = i.points[0]; if (3 === r) return a; if (pointEqual(a, n)) return a; if (2 === r) { var o = -e.tangentAngle(1), h = -i.tangentAngle(0) + Math.PI, l = lineIntersection( a, polarOffset(a, o + Math.PI / 2, 100), n, polarOffset(n, o + Math.PI / 2, 100) ), p = l ? pointDistance(l, a) : pointDistance(a, n) / 2, f = polarOffset(a, o, 2 * p * roundCorner); return ( t.setXYAt(f[0], f[1], "o", t.length() - 1), (f = polarOffset(n, h, 2 * p * roundCorner)), t.setTripleAt(n[0], n[1], n[0], n[1], f[0], f[1], t.length()), n ); } var m = lineIntersection( pointEqual(a, e.points[2]) ? e.points[0] : e.points[2], a, n, pointEqual(n, i.points[1]) ? i.points[3] : i.points[1] ); return m && pointDistance(m, a) < s ? (t.setTripleAt(m[0], m[1], m[0], m[1], m[0], m[1], t.length()), m) : a; } function getIntersection(t, e) { var i = t.intersections(e); return ( i.length && floatEqual(i[0][0], 1) && i.shift(), i.length ? i[0] : null ); } function pruneSegmentIntersection(t, e) { var i = t.slice(), r = e.slice(), s = getIntersection(t[t.length - 1], e[0]); return ( s && ((i[t.length - 1] = t[t.length - 1].split(s[0])[0]), (r[0] = e[0].split(s[1])[1])), t.length > 1 && e.length > 1 && (s = getIntersection(t[0], e[e.length - 1])) ? [[t[0].split(s[0])[0]], [e[e.length - 1].split(s[1])[1]]] : [i, r] ); } function pruneIntersections(t) { for (var e, i = 1; i < t.length; i += 1) (e = pruneSegmentIntersection(t[i - 1], t[i])), (t[i - 1] = e[0]), (t[i] = e[1]); return ( t.length > 1 && ((e = pruneSegmentIntersection(t[t.length - 1], t[0])), (t[t.length - 1] = e[0]), (t[0] = e[1])), t ); } function offsetSegmentSplit(t, e) { var i, r, s, a, n = t.inflectionPoints(); if (0 === n.length) return [offsetSegment(t, e)]; if (1 === n.length || floatEqual(n[1], 1)) return ( (i = (s = t.split(n[0]))[0]), (r = s[1]), [offsetSegment(i, e), offsetSegment(r, e)] ); i = (s = t.split(n[0]))[0]; var o = (n[1] - n[0]) / (1 - n[0]); return ( (a = (s = s[1].split(o))[0]), (r = s[1]), [offsetSegment(i, e), offsetSegment(a, e), offsetSegment(r, e)] ); } function OffsetPathModifier() {} function getFontProperties(t) { for ( var e = t.fStyle ? t.fStyle.split(" ") : [], i = "normal", r = "normal", s = e.length, a = 0; a < s; a += 1 ) switch (e[a].toLowerCase()) { case "italic": r = "italic"; break; case "bold": i = "700"; break; case "black": i = "900"; break; case "medium": i = "500"; break; case "regular": case "normal": i = "400"; break; case "light": case "thin": i = "200"; } return { style: r, weight: t.fWeight || i }; } extendPrototype([ShapeModifier], RepeaterModifier), (RepeaterModifier.prototype.initModifierProperties = function (t, e) { (this.getValue = this.processKeys), (this.c = PropertyFactory.getProp(t, e.c, 0, null, this)), (this.o = PropertyFactory.getProp(t, e.o, 0, null, this)), (this.tr = TransformPropertyFactory.getTransformProperty( t, e.tr, this )), (this.so = PropertyFactory.getProp(t, e.tr.so, 0, 0.01, this)), (this.eo = PropertyFactory.getProp(t, e.tr.eo, 0, 0.01, this)), (this.data = e), this.dynamicProperties.length || this.getValue(!0), (this._isAnimated = !!this.dynamicProperties.length), (this.pMatrix = new Matrix()), (this.rMatrix = new Matrix()), (this.sMatrix = new Matrix()), (this.tMatrix = new Matrix()), (this.matrix = new Matrix()); }), (RepeaterModifier.prototype.applyTransforms = function ( t, e, i, r, s, a ) { var n = a ? -1 : 1, o = r.s.v[0] + (1 - r.s.v[0]) * (1 - s), h = r.s.v[1] + (1 - r.s.v[1]) * (1 - s); t.translate(r.p.v[0] * n * s, r.p.v[1] * n * s, r.p.v[2]), e.translate(-r.a.v[0], -r.a.v[1], r.a.v[2]), e.rotate(-r.r.v * n * s), e.translate(r.a.v[0], r.a.v[1], r.a.v[2]), i.translate(-r.a.v[0], -r.a.v[1], r.a.v[2]), i.scale(a ? 1 / o : o, a ? 1 / h : h), i.translate(r.a.v[0], r.a.v[1], r.a.v[2]); }), (RepeaterModifier.prototype.init = function (t, e, i, r) { for ( this.elem = t, this.arr = e, this.pos = i, this.elemsData = r, this._currentCopies = 0, this._elements = [], this._groups = [], this.frameId = -1, this.initDynamicPropertyContainer(t), this.initModifierProperties(t, e[i]); i > 0; ) (i -= 1), this._elements.unshift(e[i]); this.dynamicProperties.length ? (this.k = !0) : this.getValue(!0); }), (RepeaterModifier.prototype.resetElements = function (t) { var e, i = t.length; for (e = 0; e < i; e += 1) (t[e]._processed = !1), "gr" === t[e].ty && this.resetElements(t[e].it); }), (RepeaterModifier.prototype.cloneElements = function (t) { var e = JSON.parse(JSON.stringify(t)); return this.resetElements(e), e; }), (RepeaterModifier.prototype.changeGroupRender = function (t, e) { var i, r = t.length; for (i = 0; i < r; i += 1) (t[i]._render = e), "gr" === t[i].ty && this.changeGroupRender(t[i].it, e); }), (RepeaterModifier.prototype.processShapes = function (t) { var e, i, r, s, a, n = !1; if (this._mdf || t) { var o, h = Math.ceil(this.c.v); if (this._groups.length < h) { for (; this._groups.length < h; ) { var l = { it: this.cloneElements(this._elements), ty: "gr" }; l.it.push({ a: { a: 0, ix: 1, k: [0, 0] }, nm: "Transform", o: { a: 0, ix: 7, k: 100 }, p: { a: 0, ix: 2, k: [0, 0] }, r: { a: 1, ix: 6, k: [ { s: 0, e: 0, t: 0 }, { s: 0, e: 0, t: 1 }, ], }, s: { a: 0, ix: 3, k: [100, 100] }, sa: { a: 0, ix: 5, k: 0 }, sk: { a: 0, ix: 4, k: 0 }, ty: "tr", }), this.arr.splice(0, 0, l), this._groups.splice(0, 0, l), (this._currentCopies += 1); } this.elem.reloadShapes(), (n = !0); } for (a = 0, r = 0; r <= this._groups.length - 1; r += 1) { if ( ((o = a < h), (this._groups[r]._render = o), this.changeGroupRender(this._groups[r].it, o), !o) ) { var p = this.elemsData[r].it, f = p[p.length - 1]; 0 !== f.transform.op.v ? ((f.transform.op._mdf = !0), (f.transform.op.v = 0)) : (f.transform.op._mdf = !1); } a += 1; } this._currentCopies = h; var m = this.o.v, c = m % 1, d = m > 0 ? Math.floor(m) : Math.ceil(m), u = this.pMatrix.props, y = this.rMatrix.props, g = this.sMatrix.props; this.pMatrix.reset(), this.rMatrix.reset(), this.sMatrix.reset(), this.tMatrix.reset(), this.matrix.reset(); var v, b, x = 0; if (m > 0) { for (; x < d; ) this.applyTransforms( this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, !1 ), (x += 1); c && (this.applyTransforms( this.pMatrix, this.rMatrix, this.sMatrix, this.tr, c, !1 ), (x += c)); } else if (m < 0) { for (; x > d; ) this.applyTransforms( this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, !0 ), (x -= 1); c && (this.applyTransforms( this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -c, !0 ), (x -= c)); } for ( r = 1 === this.data.m ? 0 : this._currentCopies - 1, s = 1 === this.data.m ? 1 : -1, a = this._currentCopies; a; ) { if ( ((b = (i = (e = this.elemsData[r].it)[e.length - 1].transform .mProps.v.props).length), (e[e.length - 1].transform.mProps._mdf = !0), (e[e.length - 1].transform.op._mdf = !0), (e[e.length - 1].transform.op.v = 1 === this._currentCopies ? this.so.v : this.so.v + (this.eo.v - this.so.v) * (r / (this._currentCopies - 1))), 0 !== x) ) { for ( ((0 !== r && 1 === s) || (r !== this._currentCopies - 1 && -1 === s)) && this.applyTransforms( this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, !1 ), this.matrix.transform( y[0], y[1], y[2], y[3], y[4], y[5], y[6], y[7], y[8], y[9], y[10], y[11], y[12], y[13], y[14], y[15] ), this.matrix.transform( g[0], g[1], g[2], g[3], g[4], g[5], g[6], g[7], g[8], g[9], g[10], g[11], g[12], g[13], g[14], g[15] ), this.matrix.transform( u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], u[8], u[9], u[10], u[11], u[12], u[13], u[14], u[15] ), v = 0; v < b; v += 1 ) i[v] = this.matrix.props[v]; this.matrix.reset(); } else for (this.matrix.reset(), v = 0; v < b; v += 1) i[v] = this.matrix.props[v]; (x += 1), (a -= 1), (r += s); } } else for (a = this._currentCopies, r = 0, s = 1; a; ) (i = (e = this.elemsData[r].it)[e.length - 1].transform.mProps.v .props), (e[e.length - 1].transform.mProps._mdf = !1), (e[e.length - 1].transform.op._mdf = !1), (a -= 1), (r += s); return n; }), (RepeaterModifier.prototype.addShape = function () {}), extendPrototype([ShapeModifier], RoundCornersModifier), (RoundCornersModifier.prototype.initModifierProperties = function (t, e) { (this.getValue = this.processKeys), (this.rd = PropertyFactory.getProp(t, e.r, 0, null, this)), (this._isAnimated = !!this.rd.effectsSequence.length); }), (RoundCornersModifier.prototype.processPath = function (t, e) { var i, r = shapePool.newElement(); r.c = t.c; var s, a, n, o, h, l, p, f, m, c, d, u, y = t._length, g = 0; for (i = 0; i < y; i += 1) (s = t.v[i]), (n = t.o[i]), (a = t.i[i]), s[0] === n[0] && s[1] === n[1] && s[0] === a[0] && s[1] === a[1] ? (0 !== i && i !== y - 1) || t.c ? ((o = 0 === i ? t.v[y - 1] : t.v[i - 1]), (l = (h = Math.sqrt( Math.pow(s[0] - o[0], 2) + Math.pow(s[1] - o[1], 2) )) ? Math.min(h / 2, e) / h : 0), (p = d = s[0] + (o[0] - s[0]) * l), (f = u = s[1] - (s[1] - o[1]) * l), (m = p - (p - s[0]) * roundCorner), (c = f - (f - s[1]) * roundCorner), r.setTripleAt(p, f, m, c, d, u, g), (g += 1), (o = i === y - 1 ? t.v[0] : t.v[i + 1]), (l = (h = Math.sqrt( Math.pow(s[0] - o[0], 2) + Math.pow(s[1] - o[1], 2) )) ? Math.min(h / 2, e) / h : 0), (p = m = s[0] + (o[0] - s[0]) * l), (f = c = s[1] + (o[1] - s[1]) * l), (d = p - (p - s[0]) * roundCorner), (u = f - (f - s[1]) * roundCorner), r.setTripleAt(p, f, m, c, d, u, g), (g += 1)) : (r.setTripleAt(s[0], s[1], n[0], n[1], a[0], a[1], g), (g += 1)) : (r.setTripleAt( t.v[i][0], t.v[i][1], t.o[i][0], t.o[i][1], t.i[i][0], t.i[i][1], g ), (g += 1)); return r; }), (RoundCornersModifier.prototype.processShapes = function (t) { var e, i, r, s, a, n, o = this.shapes.length, h = this.rd.v; if (0 !== h) for (i = 0; i < o; i += 1) { if ( ((n = (a = this.shapes[i]).localShapeCollection), a.shape._mdf || this._mdf || t) ) for ( n.releaseShapes(), a.shape._mdf = !0, e = a.shape.paths.shapes, s = a.shape.paths._length, r = 0; r < s; r += 1 ) n.addShape(this.processPath(e[r], h)); a.shape.paths = a.localShapeCollection; } this.dynamicProperties.length || (this._mdf = !1); }), (PolynomialBezier.prototype.point = function (t) { return [ ((this.a[0] * t + this.b[0]) * t + this.c[0]) * t + this.d[0], ((this.a[1] * t + this.b[1]) * t + this.c[1]) * t + this.d[1], ]; }), (PolynomialBezier.prototype.derivative = function (t) { return [ (3 * t * this.a[0] + 2 * this.b[0]) * t + this.c[0], (3 * t * this.a[1] + 2 * this.b[1]) * t + this.c[1], ]; }), (PolynomialBezier.prototype.tangentAngle = function (t) { var e = this.derivative(t); return Math.atan2(e[1], e[0]); }), (PolynomialBezier.prototype.normalAngle = function (t) { var e = this.derivative(t); return Math.atan2(e[0], e[1]); }), (PolynomialBezier.prototype.inflectionPoints = function () { var t = this.a[1] * this.b[0] - this.a[0] * this.b[1]; if (floatZero(t)) return []; var e = (-0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1])) / t, i = e * e - ((1 / 3) * (this.b[1] * this.c[0] - this.b[0] * this.c[1])) / t; if (i < 0) return []; var r = Math.sqrt(i); return floatZero(r) ? r > 0 && r < 1 ? [e] : [] : [e - r, e + r].filter(function (t) { return t > 0 && t < 1; }); }), (PolynomialBezier.prototype.split = function (t) { if (t <= 0) return [singlePoint(this.points[0]), this]; if (t >= 1) return [this, singlePoint(this.points[this.points.length - 1])]; var e = lerpPoint(this.points[0], this.points[1], t), i = lerpPoint(this.points[1], this.points[2], t), r = lerpPoint(this.points[2], this.points[3], t), s = lerpPoint(e, i, t), a = lerpPoint(i, r, t), n = lerpPoint(s, a, t); return [ new PolynomialBezier(this.points[0], e, s, n, !0), new PolynomialBezier(n, a, r, this.points[3], !0), ]; }), (PolynomialBezier.prototype.bounds = function () { return { x: extrema(this, 0), y: extrema(this, 1) }; }), (PolynomialBezier.prototype.boundingBox = function () { var t = this.bounds(); return { left: t.x.min, right: t.x.max, top: t.y.min, bottom: t.y.max, width: t.x.max - t.x.min, height: t.y.max - t.y.min, cx: (t.x.max + t.x.min) / 2, cy: (t.y.max + t.y.min) / 2, }; }), (PolynomialBezier.prototype.intersections = function (t, e, i) { void 0 === e && (e = 2), void 0 === i && (i = 7); var r = []; return ( intersectsImpl( intersectData(this, 0, 1), intersectData(t, 0, 1), 0, e, r, i ), r ); }), (PolynomialBezier.shapeSegment = function (t, e) { var i = (e + 1) % t.length(); return new PolynomialBezier(t.v[e], t.o[e], t.i[i], t.v[i], !0); }), (PolynomialBezier.shapeSegmentInverted = function (t, e) { var i = (e + 1) % t.length(); return new PolynomialBezier(t.v[i], t.i[i], t.o[e], t.v[e], !0); }), extendPrototype([ShapeModifier], ZigZagModifier), (ZigZagModifier.prototype.initModifierProperties = function (t, e) { (this.getValue = this.processKeys), (this.amplitude = PropertyFactory.getProp(t, e.s, 0, null, this)), (this.frequency = PropertyFactory.getProp(t, e.r, 0, null, this)), (this.pointsType = PropertyFactory.getProp(t, e.pt, 0, null, this)), (this._isAnimated = 0 !== this.amplitude.effectsSequence.length || 0 !== this.frequency.effectsSequence.length || 0 !== this.pointsType.effectsSequence.length); }), (ZigZagModifier.prototype.processPath = function (t, e, i, r) { var s = t._length, a = shapePool.newElement(); if (((a.c = t.c), t.c || (s -= 1), 0 === s)) return a; var n = -1, o = PolynomialBezier.shapeSegment(t, 0); zigZagCorner(a, t, 0, e, i, r, n); for (var h = 0; h < s; h += 1) (n = zigZagSegment(a, o, e, i, r, -n)), (o = h !== s - 1 || t.c ? PolynomialBezier.shapeSegment(t, (h + 1) % s) : null), zigZagCorner(a, t, h + 1, e, i, r, n); return a; }), (ZigZagModifier.prototype.processShapes = function (t) { var e, i, r, s, a, n, o = this.shapes.length, h = this.amplitude.v, l = Math.max(0, Math.round(this.frequency.v)), p = this.pointsType.v; if (0 !== h) for (i = 0; i < o; i += 1) { if ( ((n = (a = this.shapes[i]).localShapeCollection), a.shape._mdf || this._mdf || t) ) for ( n.releaseShapes(), a.shape._mdf = !0, e = a.shape.paths.shapes, s = a.shape.paths._length, r = 0; r < s; r += 1 ) n.addShape(this.processPath(e[r], h, l, p)); a.shape.paths = a.localShapeCollection; } this.dynamicProperties.length || (this._mdf = !1); }), extendPrototype([ShapeModifier], OffsetPathModifier), (OffsetPathModifier.prototype.initModifierProperties = function (t, e) { (this.getValue = this.processKeys), (this.amount = PropertyFactory.getProp(t, e.a, 0, null, this)), (this.miterLimit = PropertyFactory.getProp(t, e.ml, 0, null, this)), (this.lineJoin = e.lj), (this._isAnimated = 0 !== this.amount.effectsSequence.length); }), (OffsetPathModifier.prototype.processPath = function (t, e, i, r) { var s = shapePool.newElement(); s.c = t.c; var a, n, o, h = t.length(); t.c || (h -= 1); var l = []; for (a = 0; a < h; a += 1) (o = PolynomialBezier.shapeSegment(t, a)), l.push(offsetSegmentSplit(o, e)); if (!t.c) for (a = h - 1; a >= 0; a -= 1) (o = PolynomialBezier.shapeSegmentInverted(t, a)), l.push(offsetSegmentSplit(o, e)); l = pruneIntersections(l); var p = null, f = null; for (a = 0; a < l.length; a += 1) { var m = l[a]; for ( f && (p = joinLines(s, f, m[0], i, r)), f = m[m.length - 1], n = 0; n < m.length; n += 1 ) (o = m[n]), p && pointEqual(o.points[0], p) ? s.setXYAt(o.points[1][0], o.points[1][1], "o", s.length() - 1) : s.setTripleAt( o.points[0][0], o.points[0][1], o.points[1][0], o.points[1][1], o.points[0][0], o.points[0][1], s.length() ), s.setTripleAt( o.points[3][0], o.points[3][1], o.points[3][0], o.points[3][1], o.points[2][0], o.points[2][1], s.length() ), (p = o.points[3]); } return l.length && joinLines(s, f, l[0][0], i, r), s; }), (OffsetPathModifier.prototype.processShapes = function (t) { var e, i, r, s, a, n, o = this.shapes.length, h = this.amount.v, l = this.miterLimit.v, p = this.lineJoin; if (0 !== h) for (i = 0; i < o; i += 1) { if ( ((n = (a = this.shapes[i]).localShapeCollection), a.shape._mdf || this._mdf || t) ) for ( n.releaseShapes(), a.shape._mdf = !0, e = a.shape.paths.shapes, s = a.shape.paths._length, r = 0; r < s; r += 1 ) n.addShape(this.processPath(e[r], h, p, l)); a.shape.paths = a.localShapeCollection; } this.dynamicProperties.length || (this._mdf = !1); }); var FontManager = (function () { var t = { w: 0, size: 0, shapes: [], data: { shapes: [] } }, e = []; e = e.concat([ 2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403, ]); var i = 127988, r = ["d83cdffb", "d83cdffc", "d83cdffd", "d83cdffe", "d83cdfff"]; function s(t, e) { var i = createTag("span"); i.setAttribute("aria-hidden", !0), (i.style.fontFamily = e); var r = createTag("span"); (r.innerText = "giItT1WQy@!-/#"), (i.style.position = "absolute"), (i.style.left = "-10000px"), (i.style.top = "-10000px"), (i.style.fontSize = "300px"), (i.style.fontVariant = "normal"), (i.style.fontStyle = "normal"), (i.style.fontWeight = "normal"), (i.style.letterSpacing = "0"), i.appendChild(r), document.body.appendChild(i); var s = r.offsetWidth; return ( (r.style.fontFamily = (function (t) { var e, i = t.split(","), r = i.length, s = []; for (e = 0; e < r; e += 1) "sans-serif" !== i[e] && "monospace" !== i[e] && s.push(i[e]); return s.join(","); })(t) + ", " + e), { node: r, w: s, parent: i } ); } function a(t, e) { var i, r = document.body && e ? "svg" : "canvas", s = getFontProperties(t); if ("svg" === r) { var a = createNS("text"); (a.style.fontSize = "100px"), a.setAttribute("font-family", t.fFamily), a.setAttribute("font-style", s.style), a.setAttribute("font-weight", s.weight), (a.textContent = "1"), t.fClass ? ((a.style.fontFamily = "inherit"), a.setAttribute("class", t.fClass)) : (a.style.fontFamily = t.fFamily), e.appendChild(a), (i = a); } else { var n = new OffscreenCanvas(500, 500).getContext("2d"); (n.font = s.style + " " + s.weight + " 100px " + t.fFamily), (i = n); } return { measureText: function (t) { return "svg" === r ? ((i.textContent = t), i.getComputedTextLength()) : i.measureText(t).width; }, }; } function n(t) { var e = 0, i = t.charCodeAt(0); if (i >= 55296 && i <= 56319) { var r = t.charCodeAt(1); r >= 56320 && r <= 57343 && (e = 1024 * (i - 55296) + r - 56320 + 65536); } return e; } function o(t) { var e = n(t); return e >= 127462 && e <= 127487; } var h = function () { (this.fonts = []), (this.chars = null), (this.typekitLoaded = 0), (this.isLoaded = !1), (this._warned = !1), (this.initTime = Date.now()), (this.setIsLoadedBinded = this.setIsLoaded.bind(this)), (this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this)); }; (h.isModifier = function (t, e) { var i = t.toString(16) + e.toString(16); return -1 !== r.indexOf(i); }), (h.isZeroWidthJoiner = function (t) { return 8205 === t; }), (h.isFlagEmoji = function (t) { return o(t.substr(0, 2)) && o(t.substr(2, 2)); }), (h.isRegionalCode = o), (h.isCombinedCharacter = function (t) { return -1 !== e.indexOf(t); }), (h.isRegionalFlag = function (t, e) { var r = n(t.substr(e, 2)); if (r !== i) return !1; var s = 0; for (e += 2; s < 5; ) { if ((r = n(t.substr(e, 2))) < 917601 || r > 917626) return !1; (s += 1), (e += 2); } return 917631 === n(t.substr(e, 2)); }), (h.isVariationSelector = function (t) { return 65039 === t; }), (h.BLACK_FLAG_CODE_POINT = i); var l = { addChars: function (t) { if (t) { var e; this.chars || (this.chars = []); var i, r, s = t.length, a = this.chars.length; for (e = 0; e < s; e += 1) { for (i = 0, r = !1; i < a; ) this.chars[i].style === t[e].style && this.chars[i].fFamily === t[e].fFamily && this.chars[i].ch === t[e].ch && (r = !0), (i += 1); r || (this.chars.push(t[e]), (a += 1)); } } }, addFonts: function (t, e) { if (t) { if (this.chars) return (this.isLoaded = !0), void (this.fonts = t.list); if (!document.body) return ( (this.isLoaded = !0), t.list.forEach(function (t) { (t.helper = a(t)), (t.cache = {}); }), void (this.fonts = t.list) ); var i, r = t.list, n = r.length, o = n; for (i = 0; i < n; i += 1) { var h, l, p = !0; if ( ((r[i].loaded = !1), (r[i].monoCase = s(r[i].fFamily, "monospace")), (r[i].sansCase = s(r[i].fFamily, "sans-serif")), r[i].fPath) ) { if ("p" === r[i].fOrigin || 3 === r[i].origin) { if ( ((h = document.querySelectorAll( 'style[f-forigin="p"][f-family="' + r[i].fFamily + '"], style[f-origin="3"][f-family="' + r[i].fFamily + '"]' )).length > 0 && (p = !1), p) ) { var f = createTag("style"); f.setAttribute("f-forigin", r[i].fOrigin), f.setAttribute("f-origin", r[i].origin), f.setAttribute("f-family", r[i].fFamily), (f.type = "text/css"), (f.innerText = "@font-face {font-family: " + r[i].fFamily + "; font-style: normal; src: url('" + r[i].fPath + "');}"), e.appendChild(f); } } else if ("g" === r[i].fOrigin || 1 === r[i].origin) { for ( h = document.querySelectorAll( 'link[f-forigin="g"], link[f-origin="1"]' ), l = 0; l < h.length; l += 1 ) -1 !== h[l].href.indexOf(r[i].fPath) && (p = !1); if (p) { var m = createTag("link"); m.setAttribute("f-forigin", r[i].fOrigin), m.setAttribute("f-origin", r[i].origin), (m.type = "text/css"), (m.rel = "stylesheet"), (m.href = r[i].fPath), document.body.appendChild(m); } } else if ("t" === r[i].fOrigin || 2 === r[i].origin) { for ( h = document.querySelectorAll( 'script[f-forigin="t"], script[f-origin="2"]' ), l = 0; l < h.length; l += 1 ) r[i].fPath === h[l].src && (p = !1); if (p) { var c = createTag("link"); c.setAttribute("f-forigin", r[i].fOrigin), c.setAttribute("f-origin", r[i].origin), c.setAttribute("rel", "stylesheet"), c.setAttribute("href", r[i].fPath), e.appendChild(c); } } } else (r[i].loaded = !0), (o -= 1); (r[i].helper = a(r[i], e)), (r[i].cache = {}), this.fonts.push(r[i]); } 0 === o ? (this.isLoaded = !0) : setTimeout(this.checkLoadedFonts.bind(this), 100); } else this.isLoaded = !0; }, getCharData: function (e, i, r) { for (var s = 0, a = this.chars.length; s < a; ) { if ( this.chars[s].ch === e && this.chars[s].style === i && this.chars[s].fFamily === r ) return this.chars[s]; s += 1; } return ( (("string" == typeof e && 13 !== e.charCodeAt(0)) || !e) && console && console.warn && !this._warned && ((this._warned = !0), console.warn( "Missing character from exported characters list: ", e, i, r )), t ); }, getFontByName: function (t) { for (var e = 0, i = this.fonts.length; e < i; ) { if (this.fonts[e].fName === t) return this.fonts[e]; e += 1; } return this.fonts[0]; }, measureText: function (t, e, i) { var r = this.getFontByName(e), s = t; if (!r.cache[s]) { var a = r.helper; if (" " === t) { var n = a.measureText("|" + t + "|"), o = a.measureText("||"); r.cache[s] = (n - o) / 100; } else r.cache[s] = a.measureText(t) / 100; } return r.cache[s] * i; }, checkLoadedFonts: function () { var t, e, i, r = this.fonts.length, s = r; for (t = 0; t < r; t += 1) this.fonts[t].loaded ? (s -= 1) : "n" === this.fonts[t].fOrigin || 0 === this.fonts[t].origin ? (this.fonts[t].loaded = !0) : ((e = this.fonts[t].monoCase.node), (i = this.fonts[t].monoCase.w), e.offsetWidth !== i ? ((s -= 1), (this.fonts[t].loaded = !0)) : ((e = this.fonts[t].sansCase.node), (i = this.fonts[t].sansCase.w), e.offsetWidth !== i && ((s -= 1), (this.fonts[t].loaded = !0))), this.fonts[t].loaded && (this.fonts[t].sansCase.parent.parentNode.removeChild( this.fonts[t].sansCase.parent ), this.fonts[t].monoCase.parent.parentNode.removeChild( this.fonts[t].monoCase.parent ))); 0 !== s && Date.now() - this.initTime < 5e3 ? setTimeout(this.checkLoadedFontsBinded, 20) : setTimeout(this.setIsLoadedBinded, 10); }, setIsLoaded: function () { this.isLoaded = !0; }, }; return (h.prototype = l), h; })(); function SlotManager(t) { this.animationData = t; } function slotFactory(t) { return new SlotManager(t); } function RenderableElement() {} (SlotManager.prototype.getProp = function (t) { return this.animationData.slots && this.animationData.slots[t.sid] ? Object.assign(t, this.animationData.slots[t.sid].p) : t; }), (RenderableElement.prototype = { initRenderable: function () { (this.isInRange = !1), (this.hidden = !1), (this.isTransparent = !1), (this.renderableComponents = []); }, addRenderableComponent: function (t) { -1 === this.renderableComponents.indexOf(t) && this.renderableComponents.push(t); }, removeRenderableComponent: function (t) { -1 !== this.renderableComponents.indexOf(t) && this.renderableComponents.splice( this.renderableComponents.indexOf(t), 1 ); }, prepareRenderableFrame: function (t) { this.checkLayerLimits(t); }, checkTransparency: function () { this.finalTransform.mProp.o.v <= 0 ? !this.isTransparent && this.globalData.renderConfig.hideOnTransparent && ((this.isTransparent = !0), this.hide()) : this.isTransparent && ((this.isTransparent = !1), this.show()); }, checkLayerLimits: function (t) { this.data.ip - this.data.st <= t && this.data.op - this.data.st > t ? !0 !== this.isInRange && ((this.globalData._mdf = !0), (this._mdf = !0), (this.isInRange = !0), this.show()) : !1 !== this.isInRange && ((this.globalData._mdf = !0), (this.isInRange = !1), this.hide()); }, renderRenderable: function () { var t, e = this.renderableComponents.length; for (t = 0; t < e; t += 1) this.renderableComponents[t].renderFrame(this._isFirstFrame); }, sourceRectAtTime: function () { return { top: 0, left: 0, width: 100, height: 100 }; }, getLayerSize: function () { return 5 === this.data.ty ? { w: this.data.textData.width, h: this.data.textData.height } : { w: this.data.width, h: this.data.height }; }, }); var getBlendMode = ((blendModeEnums = { 0: "source-over", 1: "multiply", 2: "screen", 3: "overlay", 4: "darken", 5: "lighten", 6: "color-dodge", 7: "color-burn", 8: "hard-light", 9: "soft-light", 10: "difference", 11: "exclusion", 12: "hue", 13: "saturation", 14: "color", 15: "luminosity", }), function (t) { return blendModeEnums[t] || ""; }), blendModeEnums; function SliderEffect(t, e, i) { this.p = PropertyFactory.getProp(e, t.v, 0, 0, i); } function AngleEffect(t, e, i) { this.p = PropertyFactory.getProp(e, t.v, 0, 0, i); } function ColorEffect(t, e, i) { this.p = PropertyFactory.getProp(e, t.v, 1, 0, i); } function PointEffect(t, e, i) { this.p = PropertyFactory.getProp(e, t.v, 1, 0, i); } function LayerIndexEffect(t, e, i) { this.p = PropertyFactory.getProp(e, t.v, 0, 0, i); } function MaskIndexEffect(t, e, i) { this.p = PropertyFactory.getProp(e, t.v, 0, 0, i); } function CheckboxEffect(t, e, i) { this.p = PropertyFactory.getProp(e, t.v, 0, 0, i); } function NoValueEffect() { this.p = {}; } function EffectsManager(t, e) { var i, r = t.ef || []; this.effectElements = []; var s, a = r.length; for (i = 0; i < a; i += 1) (s = new GroupEffect(r[i], e)), this.effectElements.push(s); } function GroupEffect(t, e) { this.init(t, e); } function BaseElement() {} function FrameElement() {} function FootageElement(t, e, i) { this.initFrame(), this.initRenderable(), (this.assetData = e.getAssetData(t.refId)), (this.footageData = e.imageLoader.getAsset(this.assetData)), this.initBaseData(t, e, i); } function AudioElement(t, e, i) { this.initFrame(), this.initRenderable(), (this.assetData = e.getAssetData(t.refId)), this.initBaseData(t, e, i), (this._isPlaying = !1), (this._canPlay = !1); var r = this.globalData.getAssetsPath(this.assetData); (this.audio = this.globalData.audioController.createAudio(r)), (this._currentTime = 0), this.globalData.audioController.addAudio(this), (this._volumeMultiplier = 1), (this._volume = 1), (this._previousVolume = null), (this.tm = t.tm ? PropertyFactory.getProp(this, t.tm, 0, e.frameRate, this) : { _placeholder: !0 }), (this.lv = PropertyFactory.getProp( this, t.au && t.au.lv ? t.au.lv : { k: [100] }, 1, 0.01, this )); } function BaseRenderer() {} extendPrototype([DynamicPropertyContainer], GroupEffect), (GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties), (GroupEffect.prototype.init = function (t, e) { var i; (this.data = t), (this.effectElements = []), this.initDynamicPropertyContainer(e); var r, s = this.data.ef.length, a = this.data.ef; for (i = 0; i < s; i += 1) { switch (((r = null), a[i].ty)) { case 0: r = new SliderEffect(a[i], e, this); break; case 1: r = new AngleEffect(a[i], e, this); break; case 2: r = new ColorEffect(a[i], e, this); break; case 3: r = new PointEffect(a[i], e, this); break; case 4: case 7: r = new CheckboxEffect(a[i], e, this); break; case 10: r = new LayerIndexEffect(a[i], e, this); break; case 11: r = new MaskIndexEffect(a[i], e, this); break; case 5: r = new EffectsManager(a[i], e, this); break; default: r = new NoValueEffect(a[i], e, this); } r && this.effectElements.push(r); } }), (BaseElement.prototype = { checkMasks: function () { if (!this.data.hasMask) return !1; for (var t = 0, e = this.data.masksProperties.length; t < e; ) { if ( "n" !== this.data.masksProperties[t].mode && !1 !== this.data.masksProperties[t].cl ) return !0; t += 1; } return !1; }, initExpressions: function () { var t = getExpressionInterfaces(); if (t) { var e = t("layer"), i = t("effects"), r = t("shape"), s = t("text"), a = t("comp"); (this.layerInterface = e(this)), this.data.hasMask && this.maskManager && this.layerInterface.registerMaskInterface(this.maskManager); var n = i.createEffectsInterface(this, this.layerInterface); this.layerInterface.registerEffectsInterface(n), 0 === this.data.ty || this.data.xt ? (this.compInterface = a(this)) : 4 === this.data.ty ? ((this.layerInterface.shapeInterface = r( this.shapesData, this.itemsData, this.layerInterface )), (this.layerInterface.content = this.layerInterface.shapeInterface)) : 5 === this.data.ty && ((this.layerInterface.textInterface = s(this)), (this.layerInterface.text = this.layerInterface.textInterface)); } }, setBlendMode: function () { var t = getBlendMode(this.data.bm); (this.baseElement || this.layerElement).style["mix-blend-mode"] = t; }, initBaseData: function (t, e, i) { (this.globalData = e), (this.comp = i), (this.data = t), (this.layerId = createElementID()), this.data.sr || (this.data.sr = 1), (this.effectsManager = new EffectsManager( this.data, this, this.dynamicProperties )); }, getType: function () { return this.type; }, sourceRectAtTime: function () {}, }), (FrameElement.prototype = { initFrame: function () { (this._isFirstFrame = !1), (this.dynamicProperties = []), (this._mdf = !1); }, prepareProperties: function (t, e) { var i, r = this.dynamicProperties.length; for (i = 0; i < r; i += 1) (e || (this._isParent && "transform" === this.dynamicProperties[i].propType)) && (this.dynamicProperties[i].getValue(), this.dynamicProperties[i]._mdf && ((this.globalData._mdf = !0), (this._mdf = !0))); }, addDynamicProperty: function (t) { -1 === this.dynamicProperties.indexOf(t) && this.dynamicProperties.push(t); }, }), (FootageElement.prototype.prepareFrame = function () {}), extendPrototype( [RenderableElement, BaseElement, FrameElement], FootageElement ), (FootageElement.prototype.getBaseElement = function () { return null; }), (FootageElement.prototype.renderFrame = function () {}), (FootageElement.prototype.destroy = function () {}), (FootageElement.prototype.initExpressions = function () { var t = getExpressionInterfaces(); if (t) { var e = t("footage"); this.layerInterface = e(this); } }), (FootageElement.prototype.getFootageData = function () { return this.footageData; }), (AudioElement.prototype.prepareFrame = function (t) { if ( (this.prepareRenderableFrame(t, !0), this.prepareProperties(t, !0), this.tm._placeholder) ) this._currentTime = t / this.data.sr; else { var e = this.tm.v; this._currentTime = e; } this._volume = this.lv.v[0]; var i = this._volume * this._volumeMultiplier; this._previousVolume !== i && ((this._previousVolume = i), this.audio.volume(i)); }), extendPrototype( [RenderableElement, BaseElement, FrameElement], AudioElement ), (AudioElement.prototype.renderFrame = function () { this.isInRange && this._canPlay && (this._isPlaying ? (!this.audio.playing() || Math.abs( this._currentTime / this.globalData.frameRate - this.audio.seek() ) > 0.1) && this.audio.seek(this._currentTime / this.globalData.frameRate) : (this.audio.play(), this.audio.seek(this._currentTime / this.globalData.frameRate), (this._isPlaying = !0))); }), (AudioElement.prototype.show = function () {}), (AudioElement.prototype.hide = function () { this.audio.pause(), (this._isPlaying = !1); }), (AudioElement.prototype.pause = function () { this.audio.pause(), (this._isPlaying = !1), (this._canPlay = !1); }), (AudioElement.prototype.resume = function () { this._canPlay = !0; }), (AudioElement.prototype.setRate = function (t) { this.audio.rate(t); }), (AudioElement.prototype.volume = function (t) { (this._volumeMultiplier = t), (this._previousVolume = t * this._volume), this.audio.volume(this._previousVolume); }), (AudioElement.prototype.getBaseElement = function () { return null; }), (AudioElement.prototype.destroy = function () {}), (AudioElement.prototype.sourceRectAtTime = function () {}), (AudioElement.prototype.initExpressions = function () {}), (BaseRenderer.prototype.checkLayers = function (t) { var e, i, r = this.layers.length; for (this.completeLayers = !0, e = r - 1; e >= 0; e -= 1) this.elements[e] || ((i = this.layers[e]).ip - i.st <= t - this.layers[e].st && i.op - i.st > t - this.layers[e].st && this.buildItem(e)), (this.completeLayers = !!this.elements[e] && this.completeLayers); this.checkPendingElements(); }), (BaseRenderer.prototype.createItem = function (t) { switch (t.ty) { case 2: return this.createImage(t); case 0: return this.createComp(t); case 1: return this.createSolid(t); case 3: default: return this.createNull(t); case 4: return this.createShape(t); case 5: return this.createText(t); case 6: return this.createAudio(t); case 13: return this.createCamera(t); case 15: return this.createFootage(t); } }), (BaseRenderer.prototype.createCamera = function () { throw new Error("You're using a 3d camera. Try the html renderer."); }), (BaseRenderer.prototype.createAudio = function (t) { return new AudioElement(t, this.globalData, this); }), (BaseRenderer.prototype.createFootage = function (t) { return new FootageElement(t, this.globalData, this); }), (BaseRenderer.prototype.buildAllItems = function () { var t, e = this.layers.length; for (t = 0; t < e; t += 1) this.buildItem(t); this.checkPendingElements(); }), (BaseRenderer.prototype.includeLayers = function (t) { var e; this.completeLayers = !1; var i, r = t.length, s = this.layers.length; for (e = 0; e < r; e += 1) for (i = 0; i < s; ) { if (this.layers[i].id === t[e].id) { this.layers[i] = t[e]; break; } i += 1; } }), (BaseRenderer.prototype.setProjectInterface = function (t) { this.globalData.projectInterface = t; }), (BaseRenderer.prototype.initItems = function () { this.globalData.progressiveLoad || this.buildAllItems(); }), (BaseRenderer.prototype.buildElementParenting = function (t, e, i) { for ( var r = this.elements, s = this.layers, a = 0, n = s.length; a < n; ) s[a].ind == e && (r[a] && !0 !== r[a] ? (i.push(r[a]), r[a].setAsParent(), void 0 !== s[a].parent ? this.buildElementParenting(t, s[a].parent, i) : t.setHierarchy(i)) : (this.buildItem(a), this.addPendingElement(t))), (a += 1); }), (BaseRenderer.prototype.addPendingElement = function (t) { this.pendingElements.push(t); }), (BaseRenderer.prototype.searchExtraCompositions = function (t) { var e, i = t.length; for (e = 0; e < i; e += 1) if (t[e].xt) { var r = this.createComp(t[e]); r.initExpressions(), this.globalData.projectInterface.registerComposition(r); } }), (BaseRenderer.prototype.getElementById = function (t) { var e, i = this.elements.length; for (e = 0; e < i; e += 1) if (this.elements[e].data.ind === t) return this.elements[e]; return null; }), (BaseRenderer.prototype.getElementByPath = function (t) { var e, i = t.shift(); if ("number" == typeof i) e = this.elements[i]; else { var r, s = this.elements.length; for (r = 0; r < s; r += 1) if (this.elements[r].data.nm === i) { e = this.elements[r]; break; } } return 0 === t.length ? e : e.getElementByPath(t); }), (BaseRenderer.prototype.setupGlobalData = function (t, e) { (this.globalData.fontManager = new FontManager()), (this.globalData.slotManager = slotFactory(t)), this.globalData.fontManager.addChars(t.chars), this.globalData.fontManager.addFonts(t.fonts, e), (this.globalData.getAssetData = this.animationItem.getAssetData.bind( this.animationItem )), (this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem)), (this.globalData.imageLoader = this.animationItem.imagePreloader), (this.globalData.audioController = this.animationItem.audioController), (this.globalData.frameId = 0), (this.globalData.frameRate = t.fr), (this.globalData.nm = t.nm), (this.globalData.compSize = { w: t.w, h: t.h }); }); var effectTypes = { TRANSFORM_EFFECT: "transformEFfect" }; function TransformElement() {} function MaskElement(t, e, i) { (this.data = t), (this.element = e), (this.globalData = i), (this.storedData = []), (this.masksProperties = this.data.masksProperties || []), (this.maskElement = null); var r, s, a = this.globalData.defs, n = this.masksProperties ? this.masksProperties.length : 0; (this.viewData = createSizedArray(n)), (this.solidPath = ""); var o, h, l, p, f, m, c = this.masksProperties, d = 0, u = [], y = createElementID(), g = "clipPath", v = "clip-path"; for (r = 0; r < n; r += 1) if ( ((("a" !== c[r].mode && "n" !== c[r].mode) || c[r].inv || 100 !== c[r].o.k || c[r].o.x) && ((g = "mask"), (v = "mask")), ("s" !== c[r].mode && "i" !== c[r].mode) || 0 !== d ? (l = null) : ((l = createNS("rect")).setAttribute("fill", "#ffffff"), l.setAttribute("width", this.element.comp.data.w || 0), l.setAttribute("height", this.element.comp.data.h || 0), u.push(l)), (s = createNS("path")), "n" === c[r].mode) ) (this.viewData[r] = { op: PropertyFactory.getProp( this.element, c[r].o, 0, 0.01, this.element ), prop: ShapePropertyFactory.getShapeProp(this.element, c[r], 3), elem: s, lastPath: "", }), a.appendChild(s); else { var b; if ( ((d += 1), s.setAttribute("fill", "s" === c[r].mode ? "#000000" : "#ffffff"), s.setAttribute("clip-rule", "nonzero"), 0 !== c[r].x.k ? ((g = "mask"), (v = "mask"), (m = PropertyFactory.getProp( this.element, c[r].x, 0, null, this.element )), (b = createElementID()), (p = createNS("filter")).setAttribute("id", b), (f = createNS("feMorphology")).setAttribute( "operator", "erode" ), f.setAttribute("in", "SourceGraphic"), f.setAttribute("radius", "0"), p.appendChild(f), a.appendChild(p), s.setAttribute( "stroke", "s" === c[r].mode ? "#000000" : "#ffffff" )) : ((f = null), (m = null)), (this.storedData[r] = { elem: s, x: m, expan: f, lastPath: "", lastOperator: "", filterId: b, lastRadius: 0, }), "i" === c[r].mode) ) { h = u.length; var x = createNS("g"); for (o = 0; o < h; o += 1) x.appendChild(u[o]); var P = createNS("mask"); P.setAttribute("mask-type", "alpha"), P.setAttribute("id", y + "_" + d), P.appendChild(s), a.appendChild(P), x.setAttribute( "mask", "url(" + getLocationHref() + "#" + y + "_" + d + ")" ), (u.length = 0), u.push(x); } else u.push(s); c[r].inv && !this.solidPath && (this.solidPath = this.createLayerSolidPath()), (this.viewData[r] = { elem: s, lastPath: "", op: PropertyFactory.getProp( this.element, c[r].o, 0, 0.01, this.element ), prop: ShapePropertyFactory.getShapeProp(this.element, c[r], 3), invRect: l, }), this.viewData[r].prop.k || this.drawPath(c[r], this.viewData[r].prop.v, this.viewData[r]); } for (this.maskElement = createNS(g), n = u.length, r = 0; r < n; r += 1) this.maskElement.appendChild(u[r]); d > 0 && (this.maskElement.setAttribute("id", y), this.element.maskedElement.setAttribute( v, "url(" + getLocationHref() + "#" + y + ")" ), a.appendChild(this.maskElement)), this.viewData.length && this.element.addRenderableComponent(this); } (TransformElement.prototype = { initTransform: function () { var t = new Matrix(); (this.finalTransform = { mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty( this, this.data.ks, this ) : { o: 0 }, _matMdf: !1, _localMatMdf: !1, _opMdf: !1, mat: t, localMat: t, localOpacity: 1, }), this.data.ao && (this.finalTransform.mProp.autoOriented = !0), this.data.ty; }, renderTransform: function () { if ( ((this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame), (this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame), this.hierarchy) ) { var t, e = this.finalTransform.mat, i = 0, r = this.hierarchy.length; if (!this.finalTransform._matMdf) for (; i < r; ) { if (this.hierarchy[i].finalTransform.mProp._mdf) { this.finalTransform._matMdf = !0; break; } i += 1; } if (this.finalTransform._matMdf) for ( t = this.finalTransform.mProp.v.props, e.cloneFromProps(t), i = 0; i < r; i += 1 ) e.multiply(this.hierarchy[i].finalTransform.mProp.v); } this.finalTransform._matMdf && (this.finalTransform._localMatMdf = this.finalTransform._matMdf), this.finalTransform._opMdf && (this.finalTransform.localOpacity = this.finalTransform.mProp.o.v); }, renderLocalTransform: function () { if (this.localTransforms) { var t = 0, e = this.localTransforms.length; if ( ((this.finalTransform._localMatMdf = this.finalTransform._matMdf), !this.finalTransform._localMatMdf || !this.finalTransform._opMdf) ) for (; t < e; ) this.localTransforms[t]._mdf && (this.finalTransform._localMatMdf = !0), this.localTransforms[t]._opMdf && !this.finalTransform._opMdf && ((this.finalTransform.localOpacity = this.finalTransform.mProp.o.v), (this.finalTransform._opMdf = !0)), (t += 1); if (this.finalTransform._localMatMdf) { var i = this.finalTransform.localMat; for ( this.localTransforms[0].matrix.clone(i), t = 1; t < e; t += 1 ) { var r = this.localTransforms[t].matrix; i.multiply(r); } i.multiply(this.finalTransform.mat); } if (this.finalTransform._opMdf) { var s = this.finalTransform.localOpacity; for (t = 0; t < e; t += 1) s *= 0.01 * this.localTransforms[t].opacity; this.finalTransform.localOpacity = s; } } }, searchEffectTransforms: function () { if (this.renderableEffectsManager) { var t = this.renderableEffectsManager.getEffects( effectTypes.TRANSFORM_EFFECT ); if (t.length) { (this.localTransforms = []), (this.finalTransform.localMat = new Matrix()); var e = 0, i = t.length; for (e = 0; e < i; e += 1) this.localTransforms.push(t[e]); } } }, globalToLocal: function (t) { var e = []; e.push(this.finalTransform); for (var i, r = !0, s = this.comp; r; ) s.finalTransform ? (s.data.hasMask && e.splice(0, 0, s.finalTransform), (s = s.comp)) : (r = !1); var a, n = e.length; for (i = 0; i < n; i += 1) (a = e[i].mat.applyToPointArray(0, 0, 0)), (t = [t[0] - a[0], t[1] - a[1], 0]); return t; }, mHelper: new Matrix(), }), (MaskElement.prototype.getMaskProperty = function (t) { return this.viewData[t].prop; }), (MaskElement.prototype.renderFrame = function (t) { var e, i = this.element.finalTransform.mat, r = this.masksProperties.length; for (e = 0; e < r; e += 1) if ( ((this.viewData[e].prop._mdf || t) && this.drawPath( this.masksProperties[e], this.viewData[e].prop.v, this.viewData[e] ), (this.viewData[e].op._mdf || t) && this.viewData[e].elem.setAttribute( "fill-opacity", this.viewData[e].op.v ), "n" !== this.masksProperties[e].mode && (this.viewData[e].invRect && (this.element.finalTransform.mProp._mdf || t) && this.viewData[e].invRect.setAttribute( "transform", i.getInverseMatrix().to2dCSS() ), this.storedData[e].x && (this.storedData[e].x._mdf || t))) ) { var s = this.storedData[e].expan; this.storedData[e].x.v < 0 ? ("erode" !== this.storedData[e].lastOperator && ((this.storedData[e].lastOperator = "erode"), this.storedData[e].elem.setAttribute( "filter", "url(" + getLocationHref() + "#" + this.storedData[e].filterId + ")" )), s.setAttribute("radius", -this.storedData[e].x.v)) : ("dilate" !== this.storedData[e].lastOperator && ((this.storedData[e].lastOperator = "dilate"), this.storedData[e].elem.setAttribute("filter", null)), this.storedData[e].elem.setAttribute( "stroke-width", 2 * this.storedData[e].x.v )); } }), (MaskElement.prototype.getMaskelement = function () { return this.maskElement; }), (MaskElement.prototype.createLayerSolidPath = function () { var t = "M0,0 "; return ( (t += " h" + this.globalData.compSize.w), (t += " v" + this.globalData.compSize.h), (t += " h-" + this.globalData.compSize.w), (t += " v-" + this.globalData.compSize.h + " ") ); }), (MaskElement.prototype.drawPath = function (t, e, i) { var r, s, a = " M" + e.v[0][0] + "," + e.v[0][1]; for (s = e._length, r = 1; r < s; r += 1) a += " C" + e.o[r - 1][0] + "," + e.o[r - 1][1] + " " + e.i[r][0] + "," + e.i[r][1] + " " + e.v[r][0] + "," + e.v[r][1]; if ( (e.c && s > 1 && (a += " C" + e.o[r - 1][0] + "," + e.o[r - 1][1] + " " + e.i[0][0] + "," + e.i[0][1] + " " + e.v[0][0] + "," + e.v[0][1]), i.lastPath !== a) ) { var n = ""; i.elem && (e.c && (n = t.inv ? this.solidPath + a : a), i.elem.setAttribute("d", n)), (i.lastPath = a); } }), (MaskElement.prototype.destroy = function () { (this.element = null), (this.globalData = null), (this.maskElement = null), (this.data = null), (this.masksProperties = null); }); var filtersFactory = (function () { var t = {}; return ( (t.createFilter = function (t, e) { var i = createNS("filter"); i.setAttribute("id", t), !0 !== e && (i.setAttribute("filterUnits", "objectBoundingBox"), i.setAttribute("x", "0%"), i.setAttribute("y", "0%"), i.setAttribute("width", "100%"), i.setAttribute("height", "100%")); return i; }), (t.createAlphaToLuminanceFilter = function () { var t = createNS("feColorMatrix"); return ( t.setAttribute("type", "matrix"), t.setAttribute("color-interpolation-filters", "sRGB"), t.setAttribute( "values", "0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1" ), t ); }), t ); })(), featureSupport = (function () { var t = { maskType: !0, svgLumaHidden: !0, offscreenCanvas: "undefined" != typeof OffscreenCanvas, }; return ( (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\/\d./i.test(navigator.userAgent)) && (t.maskType = !1), /firefox/i.test(navigator.userAgent) && (t.svgLumaHidden = !1), t ); })(), registeredEffects$1 = {}, idPrefix = "filter_result_"; function SVGEffects(t) { var e, i, r = "SourceGraphic", s = t.data.ef ? t.data.ef.length : 0, a = createElementID(), n = filtersFactory.createFilter(a, !0), o = 0; for (this.filters = [], e = 0; e < s; e += 1) { i = null; var h = t.data.ef[e].ty; if (registeredEffects$1[h]) (i = new (0, registeredEffects$1[h].effect)( n, t.effectsManager.effectElements[e], t, idPrefix + o, r )), (r = idPrefix + o), registeredEffects$1[h].countsAsEffect && (o += 1); i && this.filters.push(i); } o && (t.globalData.defs.appendChild(n), t.layerElement.setAttribute( "filter", "url(" + getLocationHref() + "#" + a + ")" )), this.filters.length && t.addRenderableComponent(this); } function registerEffect$1(t, e, i) { registeredEffects$1[t] = { effect: e, countsAsEffect: i }; } function SVGBaseElement() {} function HierarchyElement() {} function RenderableDOMElement() {} function IImageElement(t, e, i) { (this.assetData = e.getAssetData(t.refId)), this.assetData && this.assetData.sid && (this.assetData = e.slotManager.getProp(this.assetData)), this.initElement(t, e, i), (this.sourceRect = { top: 0, left: 0, width: this.assetData.w, height: this.assetData.h, }); } function ProcessedElement(t, e) { (this.elem = t), (this.pos = e); } function IShapeElement() {} (SVGEffects.prototype.renderFrame = function (t) { var e, i = this.filters.length; for (e = 0; e < i; e += 1) this.filters[e].renderFrame(t); }), (SVGEffects.prototype.getEffects = function (t) { var e, i = this.filters.length, r = []; for (e = 0; e < i; e += 1) this.filters[e].type === t && r.push(this.filters[e]); return r; }), (SVGBaseElement.prototype = { initRendererElement: function () { this.layerElement = createNS("g"); }, createContainerElements: function () { (this.matteElement = createNS("g")), (this.transformedElement = this.layerElement), (this.maskedElement = this.layerElement), (this._sizeChanged = !1); var t = null; if (this.data.td) { this.matteMasks = {}; var e = createNS("g"); e.setAttribute("id", this.layerId), e.appendChild(this.layerElement), (t = e), this.globalData.defs.appendChild(e); } else this.data.tt ? (this.matteElement.appendChild(this.layerElement), (t = this.matteElement), (this.baseElement = this.matteElement)) : (this.baseElement = this.layerElement); if ( (this.data.ln && this.layerElement.setAttribute("id", this.data.ln), this.data.cl && this.layerElement.setAttribute("class", this.data.cl), 0 === this.data.ty && !this.data.hd) ) { var i = createNS("clipPath"), r = createNS("path"); r.setAttribute( "d", "M0,0 L" + this.data.w + ",0 L" + this.data.w + "," + this.data.h + " L0," + this.data.h + "z" ); var s = createElementID(); if ( (i.setAttribute("id", s), i.appendChild(r), this.globalData.defs.appendChild(i), this.checkMasks()) ) { var a = createNS("g"); a.setAttribute( "clip-path", "url(" + getLocationHref() + "#" + s + ")" ), a.appendChild(this.layerElement), (this.transformedElement = a), t ? t.appendChild(this.transformedElement) : (this.baseElement = this.transformedElement); } else this.layerElement.setAttribute( "clip-path", "url(" + getLocationHref() + "#" + s + ")" ); } 0 !== this.data.bm && this.setBlendMode(); }, renderElement: function () { this.finalTransform._localMatMdf && this.transformedElement.setAttribute( "transform", this.finalTransform.localMat.to2dCSS() ), this.finalTransform._opMdf && this.transformedElement.setAttribute( "opacity", this.finalTransform.localOpacity ); }, destroyBaseElement: function () { (this.layerElement = null), (this.matteElement = null), this.maskManager.destroy(); }, getBaseElement: function () { return this.data.hd ? null : this.baseElement; }, createRenderableComponents: function () { (this.maskManager = new MaskElement( this.data, this, this.globalData )), (this.renderableEffectsManager = new SVGEffects(this)), this.searchEffectTransforms(); }, getMatte: function (t) { if ( (this.matteMasks || (this.matteMasks = {}), !this.matteMasks[t]) ) { var e, i, r, s, a = this.layerId + "_" + t; if (1 === t || 3 === t) { var n = createNS("mask"); n.setAttribute("id", a), n.setAttribute("mask-type", 3 === t ? "luminance" : "alpha"), (r = createNS("use")).setAttributeNS( "http://www.w3.org/1999/xlink", "href", "#" + this.layerId ), n.appendChild(r), this.globalData.defs.appendChild(n), featureSupport.maskType || 1 !== t || (n.setAttribute("mask-type", "luminance"), (e = createElementID()), (i = filtersFactory.createFilter(e)), this.globalData.defs.appendChild(i), i.appendChild(filtersFactory.createAlphaToLuminanceFilter()), (s = createNS("g")).appendChild(r), n.appendChild(s), s.setAttribute( "filter", "url(" + getLocationHref() + "#" + e + ")" )); } else if (2 === t) { var o = createNS("mask"); o.setAttribute("id", a), o.setAttribute("mask-type", "alpha"); var h = createNS("g"); o.appendChild(h), (e = createElementID()), (i = filtersFactory.createFilter(e)); var l = createNS("feComponentTransfer"); l.setAttribute("in", "SourceGraphic"), i.appendChild(l); var p = createNS("feFuncA"); p.setAttribute("type", "table"), p.setAttribute("tableValues", "1.0 0.0"), l.appendChild(p), this.globalData.defs.appendChild(i); var f = createNS("rect"); f.setAttribute("width", this.comp.data.w), f.setAttribute("height", this.comp.data.h), f.setAttribute("x", "0"), f.setAttribute("y", "0"), f.setAttribute("fill", "#ffffff"), f.setAttribute("opacity", "0"), h.setAttribute( "filter", "url(" + getLocationHref() + "#" + e + ")" ), h.appendChild(f), (r = createNS("use")).setAttributeNS( "http://www.w3.org/1999/xlink", "href", "#" + this.layerId ), h.appendChild(r), featureSupport.maskType || (o.setAttribute("mask-type", "luminance"), i.appendChild(filtersFactory.createAlphaToLuminanceFilter()), (s = createNS("g")), h.appendChild(f), s.appendChild(this.layerElement), h.appendChild(s)), this.globalData.defs.appendChild(o); } this.matteMasks[t] = a; } return this.matteMasks[t]; }, setMatte: function (t) { this.matteElement && this.matteElement.setAttribute( "mask", "url(" + getLocationHref() + "#" + t + ")" ); }, }), (HierarchyElement.prototype = { initHierarchy: function () { (this.hierarchy = []), (this._isParent = !1), this.checkParenting(); }, setHierarchy: function (t) { this.hierarchy = t; }, setAsParent: function () { this._isParent = !0; }, checkParenting: function () { void 0 !== this.data.parent && this.comp.buildElementParenting(this, this.data.parent, []); }, }), extendPrototype( [ RenderableElement, createProxyFunction({ initElement: function (t, e, i) { this.initFrame(), this.initBaseData(t, e, i), this.initTransform(t, e, i), this.initHierarchy(), this.initRenderable(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), this.createContent(), this.hide(); }, hide: function () { this.hidden || (this.isInRange && !this.isTransparent) || (((this.baseElement || this.layerElement).style.display = "none"), (this.hidden = !0)); }, show: function () { this.isInRange && !this.isTransparent && (this.data.hd || ((this.baseElement || this.layerElement).style.display = "block"), (this.hidden = !1), (this._isFirstFrame = !0)); }, renderFrame: function () { this.data.hd || this.hidden || (this.renderTransform(), this.renderRenderable(), this.renderLocalTransform(), this.renderElement(), this.renderInnerContent(), this._isFirstFrame && (this._isFirstFrame = !1)); }, renderInnerContent: function () {}, prepareFrame: function (t) { (this._mdf = !1), this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange), this.checkTransparency(); }, destroy: function () { (this.innerElem = null), this.destroyBaseElement(); }, }), ], RenderableDOMElement ), extendPrototype( [ BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ], IImageElement ), (IImageElement.prototype.createContent = function () { var t = this.globalData.getAssetsPath(this.assetData); (this.innerElem = createNS("image")), this.innerElem.setAttribute("width", this.assetData.w + "px"), this.innerElem.setAttribute("height", this.assetData.h + "px"), this.innerElem.setAttribute( "preserveAspectRatio", this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio ), this.innerElem.setAttributeNS( "http://www.w3.org/1999/xlink", "href", t ), this.layerElement.appendChild(this.innerElem); }), (IImageElement.prototype.sourceRectAtTime = function () { return this.sourceRect; }), (IShapeElement.prototype = { addShapeToModifiers: function (t) { var e, i = this.shapeModifiers.length; for (e = 0; e < i; e += 1) this.shapeModifiers[e].addShape(t); }, isShapeInAnimatedModifiers: function (t) { for (var e = this.shapeModifiers.length; 0 < e; ) if (this.shapeModifiers[0].isAnimatedWithShape(t)) return !0; return !1; }, renderModifiers: function () { if (this.shapeModifiers.length) { var t, e = this.shapes.length; for (t = 0; t < e; t += 1) this.shapes[t].sh.reset(); for ( t = (e = this.shapeModifiers.length) - 1; t >= 0 && !this.shapeModifiers[t].processShapes(this._isFirstFrame); t -= 1 ); } }, searchProcessedElement: function (t) { for (var e = this.processedElements, i = 0, r = e.length; i < r; ) { if (e[i].elem === t) return e[i].pos; i += 1; } return 0; }, addProcessedElement: function (t, e) { for (var i = this.processedElements, r = i.length; r; ) if (i[(r -= 1)].elem === t) return void (i[r].pos = e); i.push(new ProcessedElement(t, e)); }, prepareFrame: function (t) { this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange); }, }); var lineCapEnum = { 1: "butt", 2: "round", 3: "square" }, lineJoinEnum = { 1: "miter", 2: "round", 3: "bevel" }; function SVGShapeData(t, e, i) { (this.caches = []), (this.styles = []), (this.transformers = t), (this.lStr = ""), (this.sh = i), (this.lvl = e), (this._isAnimated = !!i.k); for (var r = 0, s = t.length; r < s; ) { if (t[r].mProps.dynamicProperties.length) { this._isAnimated = !0; break; } r += 1; } } function SVGStyleData(t, e) { (this.data = t), (this.type = t.ty), (this.d = ""), (this.lvl = e), (this._mdf = !1), (this.closed = !0 === t.hd), (this.pElem = createNS("path")), (this.msElem = null); } function DashProperty(t, e, i, r) { var s; (this.elem = t), (this.frameId = -1), (this.dataProps = createSizedArray(e.length)), (this.renderer = i), (this.k = !1), (this.dashStr = ""), (this.dashArray = createTypedArray( "float32", e.length ? e.length - 1 : 0 )), (this.dashoffset = createTypedArray("float32", 1)), this.initDynamicPropertyContainer(r); var a, n = e.length || 0; for (s = 0; s < n; s += 1) (a = PropertyFactory.getProp(t, e[s].v, 0, 0, this)), (this.k = a.k || this.k), (this.dataProps[s] = { n: e[s].n, p: a }); this.k || this.getValue(!0), (this._isAnimated = this.k); } function SVGStrokeStyleData(t, e, i) { this.initDynamicPropertyContainer(t), (this.getValue = this.iterateDynamicProperties), (this.o = PropertyFactory.getProp(t, e.o, 0, 0.01, this)), (this.w = PropertyFactory.getProp(t, e.w, 0, null, this)), (this.d = new DashProperty(t, e.d || {}, "svg", this)), (this.c = PropertyFactory.getProp(t, e.c, 1, 255, this)), (this.style = i), (this._isAnimated = !!this._isAnimated); } function SVGFillStyleData(t, e, i) { this.initDynamicPropertyContainer(t), (this.getValue = this.iterateDynamicProperties), (this.o = PropertyFactory.getProp(t, e.o, 0, 0.01, this)), (this.c = PropertyFactory.getProp(t, e.c, 1, 255, this)), (this.style = i); } function SVGNoStyleData(t, e, i) { this.initDynamicPropertyContainer(t), (this.getValue = this.iterateDynamicProperties), (this.style = i); } function GradientProperty(t, e, i) { (this.data = e), (this.c = createTypedArray("uint8c", 4 * e.p)); var r = e.k.k[0].s ? e.k.k[0].s.length - 4 * e.p : e.k.k.length - 4 * e.p; (this.o = createTypedArray("float32", r)), (this._cmdf = !1), (this._omdf = !1), (this._collapsable = this.checkCollapsable()), (this._hasOpacity = r), this.initDynamicPropertyContainer(i), (this.prop = PropertyFactory.getProp(t, e.k, 1, null, this)), (this.k = this.prop.k), this.getValue(!0); } function SVGGradientFillStyleData(t, e, i) { this.initDynamicPropertyContainer(t), (this.getValue = this.iterateDynamicProperties), this.initGradientData(t, e, i); } function SVGGradientStrokeStyleData(t, e, i) { this.initDynamicPropertyContainer(t), (this.getValue = this.iterateDynamicProperties), (this.w = PropertyFactory.getProp(t, e.w, 0, null, this)), (this.d = new DashProperty(t, e.d || {}, "svg", this)), this.initGradientData(t, e, i), (this._isAnimated = !!this._isAnimated); } function ShapeGroupData() { (this.it = []), (this.prevViewData = []), (this.gr = createNS("g")); } function SVGTransformData(t, e, i) { (this.transform = { mProps: t, op: e, container: i }), (this.elements = []), (this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length); } (SVGShapeData.prototype.setAsAnimated = function () { this._isAnimated = !0; }), (SVGStyleData.prototype.reset = function () { (this.d = ""), (this._mdf = !1); }), (DashProperty.prototype.getValue = function (t) { if ( (this.elem.globalData.frameId !== this.frameId || t) && ((this.frameId = this.elem.globalData.frameId), this.iterateDynamicProperties(), (this._mdf = this._mdf || t), this._mdf) ) { var e = 0, i = this.dataProps.length; for ( "svg" === this.renderer && (this.dashStr = ""), e = 0; e < i; e += 1 ) "o" !== this.dataProps[e].n ? "svg" === this.renderer ? (this.dashStr += " " + this.dataProps[e].p.v) : (this.dashArray[e] = this.dataProps[e].p.v) : (this.dashoffset[0] = this.dataProps[e].p.v); } }), extendPrototype([DynamicPropertyContainer], DashProperty), extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData), extendPrototype([DynamicPropertyContainer], SVGFillStyleData), extendPrototype([DynamicPropertyContainer], SVGNoStyleData), (GradientProperty.prototype.comparePoints = function (t, e) { for (var i = 0, r = this.o.length / 2; i < r; ) { if (Math.abs(t[4 * i] - t[4 * e + 2 * i]) > 0.01) return !1; i += 1; } return !0; }), (GradientProperty.prototype.checkCollapsable = function () { if (this.o.length / 2 != this.c.length / 4) return !1; if (this.data.k.k[0].s) for (var t = 0, e = this.data.k.k.length; t < e; ) { if (!this.comparePoints(this.data.k.k[t].s, this.data.p)) return !1; t += 1; } else if (!this.comparePoints(this.data.k.k, this.data.p)) return !1; return !0; }), (GradientProperty.prototype.getValue = function (t) { if ( (this.prop.getValue(), (this._mdf = !1), (this._cmdf = !1), (this._omdf = !1), this.prop._mdf || t) ) { var e, i, r, s = 4 * this.data.p; for (e = 0; e < s; e += 1) (i = e % 4 == 0 ? 100 : 255), (r = Math.round(this.prop.v[e] * i)), this.c[e] !== r && ((this.c[e] = r), (this._cmdf = !t)); if (this.o.length) for (s = this.prop.v.length, e = 4 * this.data.p; e < s; e += 1) (i = e % 2 == 0 ? 100 : 1), (r = e % 2 == 0 ? Math.round(100 * this.prop.v[e]) : this.prop.v[e]), this.o[e - 4 * this.data.p] !== r && ((this.o[e - 4 * this.data.p] = r), (this._omdf = !t)); this._mdf = !t; } }), extendPrototype([DynamicPropertyContainer], GradientProperty), (SVGGradientFillStyleData.prototype.initGradientData = function ( t, e, i ) { (this.o = PropertyFactory.getProp(t, e.o, 0, 0.01, this)), (this.s = PropertyFactory.getProp(t, e.s, 1, null, this)), (this.e = PropertyFactory.getProp(t, e.e, 1, null, this)), (this.h = PropertyFactory.getProp(t, e.h || { k: 0 }, 0, 0.01, this)), (this.a = PropertyFactory.getProp( t, e.a || { k: 0 }, 0, degToRads, this )), (this.g = new GradientProperty(t, e.g, this)), (this.style = i), (this.stops = []), this.setGradientData(i.pElem, e), this.setGradientOpacity(e, i), (this._isAnimated = !!this._isAnimated); }), (SVGGradientFillStyleData.prototype.setGradientData = function (t, e) { var i = createElementID(), r = createNS(1 === e.t ? "linearGradient" : "radialGradient"); r.setAttribute("id", i), r.setAttribute("spreadMethod", "pad"), r.setAttribute("gradientUnits", "userSpaceOnUse"); var s, a, n, o = []; for (n = 4 * e.g.p, a = 0; a < n; a += 4) (s = createNS("stop")), r.appendChild(s), o.push(s); t.setAttribute( "gf" === e.ty ? "fill" : "stroke", "url(" + getLocationHref() + "#" + i + ")" ), (this.gf = r), (this.cst = o); }), (SVGGradientFillStyleData.prototype.setGradientOpacity = function (t, e) { if (this.g._hasOpacity && !this.g._collapsable) { var i, r, s, a = createNS("mask"), n = createNS("path"); a.appendChild(n); var o = createElementID(), h = createElementID(); a.setAttribute("id", h); var l = createNS(1 === t.t ? "linearGradient" : "radialGradient"); l.setAttribute("id", o), l.setAttribute("spreadMethod", "pad"), l.setAttribute("gradientUnits", "userSpaceOnUse"), (s = t.g.k.k[0].s ? t.g.k.k[0].s.length : t.g.k.k.length); var p = this.stops; for (r = 4 * t.g.p; r < s; r += 2) (i = createNS("stop")).setAttribute( "stop-color", "rgb(255,255,255)" ), l.appendChild(i), p.push(i); n.setAttribute( "gf" === t.ty ? "fill" : "stroke", "url(" + getLocationHref() + "#" + o + ")" ), "gs" === t.ty && (n.setAttribute("stroke-linecap", lineCapEnum[t.lc || 2]), n.setAttribute("stroke-linejoin", lineJoinEnum[t.lj || 2]), 1 === t.lj && n.setAttribute("stroke-miterlimit", t.ml)), (this.of = l), (this.ms = a), (this.ost = p), (this.maskId = h), (e.msElem = n); } }), extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData), extendPrototype( [SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData ); var buildShapeString = function (t, e, i, r) { if (0 === e) return ""; var s, a = t.o, n = t.i, o = t.v, h = " M" + r.applyToPointStringified(o[0][0], o[0][1]); for (s = 1; s < e; s += 1) h += " C" + r.applyToPointStringified(a[s - 1][0], a[s - 1][1]) + " " + r.applyToPointStringified(n[s][0], n[s][1]) + " " + r.applyToPointStringified(o[s][0], o[s][1]); return ( i && e && ((h += " C" + r.applyToPointStringified(a[s - 1][0], a[s - 1][1]) + " " + r.applyToPointStringified(n[0][0], n[0][1]) + " " + r.applyToPointStringified(o[0][0], o[0][1])), (h += "z")), h ); }, SVGElementsRenderer = (function () { var t = new Matrix(), e = new Matrix(); function i(t, e, i) { (i || e.transform.op._mdf) && e.transform.container.setAttribute("opacity", e.transform.op.v), (i || e.transform.mProps._mdf) && e.transform.container.setAttribute( "transform", e.transform.mProps.v.to2dCSS() ); } function r() {} function s(i, r, s) { var a, n, o, h, l, p, f, m, c, d, u = r.styles.length, y = r.lvl; for (p = 0; p < u; p += 1) { if (((h = r.sh._mdf || s), r.styles[p].lvl < y)) { for ( m = e.reset(), c = y - r.styles[p].lvl, d = r.transformers.length - 1; !h && c > 0; ) (h = r.transformers[d].mProps._mdf || h), (c -= 1), (d -= 1); if (h) for ( c = y - r.styles[p].lvl, d = r.transformers.length - 1; c > 0; ) m.multiply(r.transformers[d].mProps.v), (c -= 1), (d -= 1); } else m = t; if (((n = (f = r.sh.paths)._length), h)) { for (o = "", a = 0; a < n; a += 1) (l = f.shapes[a]) && l._length && (o += buildShapeString(l, l._length, l.c, m)); r.caches[p] = o; } else o = r.caches[p]; (r.styles[p].d += !0 === i.hd ? "" : o), (r.styles[p]._mdf = h || r.styles[p]._mdf); } } function a(t, e, i) { var r = e.style; (e.c._mdf || i) && r.pElem.setAttribute( "fill", "rgb(" + bmFloor(e.c.v[0]) + "," + bmFloor(e.c.v[1]) + "," + bmFloor(e.c.v[2]) + ")" ), (e.o._mdf || i) && r.pElem.setAttribute("fill-opacity", e.o.v); } function n(t, e, i) { o(t, e, i), h(t, e, i); } function o(t, e, i) { var r, s, a, n, o, h = e.gf, l = e.g._hasOpacity, p = e.s.v, f = e.e.v; if (e.o._mdf || i) { var m = "gf" === t.ty ? "fill-opacity" : "stroke-opacity"; e.style.pElem.setAttribute(m, e.o.v); } if (e.s._mdf || i) { var c = 1 === t.t ? "x1" : "cx", d = "x1" === c ? "y1" : "cy"; h.setAttribute(c, p[0]), h.setAttribute(d, p[1]), l && !e.g._collapsable && (e.of.setAttribute(c, p[0]), e.of.setAttribute(d, p[1])); } if (e.g._cmdf || i) { r = e.cst; var u = e.g.c; for (a = r.length, s = 0; s < a; s += 1) (n = r[s]).setAttribute("offset", u[4 * s] + "%"), n.setAttribute( "stop-color", "rgb(" + u[4 * s + 1] + "," + u[4 * s + 2] + "," + u[4 * s + 3] + ")" ); } if (l && (e.g._omdf || i)) { var y = e.g.o; for ( a = (r = e.g._collapsable ? e.cst : e.ost).length, s = 0; s < a; s += 1 ) (n = r[s]), e.g._collapsable || n.setAttribute("offset", y[2 * s] + "%"), n.setAttribute("stop-opacity", y[2 * s + 1]); } if (1 === t.t) (e.e._mdf || i) && (h.setAttribute("x2", f[0]), h.setAttribute("y2", f[1]), l && !e.g._collapsable && (e.of.setAttribute("x2", f[0]), e.of.setAttribute("y2", f[1]))); else if ( ((e.s._mdf || e.e._mdf || i) && ((o = Math.sqrt( Math.pow(p[0] - f[0], 2) + Math.pow(p[1] - f[1], 2) )), h.setAttribute("r", o), l && !e.g._collapsable && e.of.setAttribute("r", o)), e.e._mdf || e.h._mdf || e.a._mdf || i) ) { o || (o = Math.sqrt( Math.pow(p[0] - f[0], 2) + Math.pow(p[1] - f[1], 2) )); var g = Math.atan2(f[1] - p[1], f[0] - p[0]), v = e.h.v; v >= 1 ? (v = 0.99) : v <= -1 && (v = -0.99); var b = o * v, x = Math.cos(g + e.a.v) * b + p[0], P = Math.sin(g + e.a.v) * b + p[1]; h.setAttribute("fx", x), h.setAttribute("fy", P), l && !e.g._collapsable && (e.of.setAttribute("fx", x), e.of.setAttribute("fy", P)); } } function h(t, e, i) { var r = e.style, s = e.d; s && (s._mdf || i) && s.dashStr && (r.pElem.setAttribute("stroke-dasharray", s.dashStr), r.pElem.setAttribute("stroke-dashoffset", s.dashoffset[0])), e.c && (e.c._mdf || i) && r.pElem.setAttribute( "stroke", "rgb(" + bmFloor(e.c.v[0]) + "," + bmFloor(e.c.v[1]) + "," + bmFloor(e.c.v[2]) + ")" ), (e.o._mdf || i) && r.pElem.setAttribute("stroke-opacity", e.o.v), (e.w._mdf || i) && (r.pElem.setAttribute("stroke-width", e.w.v), r.msElem && r.msElem.setAttribute("stroke-width", e.w.v)); } return { createRenderFunction: function (t) { switch (t.ty) { case "fl": return a; case "gf": return o; case "gs": return n; case "st": return h; case "sh": case "el": case "rc": case "sr": return s; case "tr": return i; case "no": return r; default: return null; } }, }; })(); function SVGShapeElement(t, e, i) { (this.shapes = []), (this.shapesData = t.shapes), (this.stylesList = []), (this.shapeModifiers = []), (this.itemsData = []), (this.processedElements = []), (this.animatedContents = []), this.initElement(t, e, i), (this.prevViewData = []); } function LetterProps(t, e, i, r, s, a) { (this.o = t), (this.sw = e), (this.sc = i), (this.fc = r), (this.m = s), (this.p = a), (this._mdf = { o: !0, sw: !!e, sc: !!i, fc: !!r, m: !0, p: !0 }); } function TextProperty(t, e) { (this._frameId = initialDefaultFrame), (this.pv = ""), (this.v = ""), (this.kf = !1), (this._isFirstFrame = !0), (this._mdf = !1), e.d && e.d.sid && (e.d = t.globalData.slotManager.getProp(e.d)), (this.data = e), (this.elem = t), (this.comp = this.elem.comp), (this.keysIndex = 0), (this.canResize = !1), (this.minimumFontSize = 1), (this.effectsSequence = []), (this.currentData = { ascent: 0, boxWidth: this.defaultBoxWidth, f: "", fStyle: "", fWeight: "", fc: "", j: "", justifyOffset: "", l: [], lh: 0, lineWidths: [], ls: "", of: "", s: "", sc: "", sw: 0, t: 0, tr: 0, sz: 0, ps: null, fillColorAnim: !1, strokeColorAnim: !1, strokeWidthAnim: !1, yOffset: 0, finalSize: 0, finalText: [], finalLineHeight: 0, __complete: !1, }), this.copyData(this.currentData, this.data.d.k[0].s), this.searchProperty() || this.completeTextData(this.currentData); } extendPrototype( [ BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement, ], SVGShapeElement ), (SVGShapeElement.prototype.initSecondaryElement = function () {}), (SVGShapeElement.prototype.identityMatrix = new Matrix()), (SVGShapeElement.prototype.buildExpressionInterface = function () {}), (SVGShapeElement.prototype.createContent = function () { this.searchShapes( this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], !0 ), this.filterUniqueShapes(); }), (SVGShapeElement.prototype.filterUniqueShapes = function () { var t, e, i, r, s = this.shapes.length, a = this.stylesList.length, n = [], o = !1; for (i = 0; i < a; i += 1) { for ( r = this.stylesList[i], o = !1, n.length = 0, t = 0; t < s; t += 1 ) -1 !== (e = this.shapes[t]).styles.indexOf(r) && (n.push(e), (o = e._isAnimated || o)); n.length > 1 && o && this.setShapesAsAnimated(n); } }), (SVGShapeElement.prototype.setShapesAsAnimated = function (t) { var e, i = t.length; for (e = 0; e < i; e += 1) t[e].setAsAnimated(); }), (SVGShapeElement.prototype.createStyleElement = function (t, e) { var i, r = new SVGStyleData(t, e), s = r.pElem; if ("st" === t.ty) i = new SVGStrokeStyleData(this, t, r); else if ("fl" === t.ty) i = new SVGFillStyleData(this, t, r); else if ("gf" === t.ty || "gs" === t.ty) { (i = new ( "gf" === t.ty ? SVGGradientFillStyleData : SVGGradientStrokeStyleData )(this, t, r)), this.globalData.defs.appendChild(i.gf), i.maskId && (this.globalData.defs.appendChild(i.ms), this.globalData.defs.appendChild(i.of), s.setAttribute( "mask", "url(" + getLocationHref() + "#" + i.maskId + ")" )); } else "no" === t.ty && (i = new SVGNoStyleData(this, t, r)); return ( ("st" !== t.ty && "gs" !== t.ty) || (s.setAttribute("stroke-linecap", lineCapEnum[t.lc || 2]), s.setAttribute("stroke-linejoin", lineJoinEnum[t.lj || 2]), s.setAttribute("fill-opacity", "0"), 1 === t.lj && s.setAttribute("stroke-miterlimit", t.ml)), 2 === t.r && s.setAttribute("fill-rule", "evenodd"), t.ln && s.setAttribute("id", t.ln), t.cl && s.setAttribute("class", t.cl), t.bm && (s.style["mix-blend-mode"] = getBlendMode(t.bm)), this.stylesList.push(r), this.addToAnimatedContents(t, i), i ); }), (SVGShapeElement.prototype.createGroupElement = function (t) { var e = new ShapeGroupData(); return ( t.ln && e.gr.setAttribute("id", t.ln), t.cl && e.gr.setAttribute("class", t.cl), t.bm && (e.gr.style["mix-blend-mode"] = getBlendMode(t.bm)), e ); }), (SVGShapeElement.prototype.createTransformElement = function (t, e) { var i = TransformPropertyFactory.getTransformProperty(this, t, this), r = new SVGTransformData(i, i.o, e); return this.addToAnimatedContents(t, r), r; }), (SVGShapeElement.prototype.createShapeElement = function (t, e, i) { var r = 4; "rc" === t.ty ? (r = 5) : "el" === t.ty ? (r = 6) : "sr" === t.ty && (r = 7); var s = new SVGShapeData( e, i, ShapePropertyFactory.getShapeProp(this, t, r, this) ); return ( this.shapes.push(s), this.addShapeToModifiers(s), this.addToAnimatedContents(t, s), s ); }), (SVGShapeElement.prototype.addToAnimatedContents = function (t, e) { for (var i = 0, r = this.animatedContents.length; i < r; ) { if (this.animatedContents[i].element === e) return; i += 1; } this.animatedContents.push({ fn: SVGElementsRenderer.createRenderFunction(t), element: e, data: t, }); }), (SVGShapeElement.prototype.setElementStyles = function (t) { var e, i = t.styles, r = this.stylesList.length; for (e = 0; e < r; e += 1) this.stylesList[e].closed || i.push(this.stylesList[e]); }), (SVGShapeElement.prototype.reloadShapes = function () { var t; this._isFirstFrame = !0; var e = this.itemsData.length; for (t = 0; t < e; t += 1) this.prevViewData[t] = this.itemsData[t]; for ( this.searchShapes( this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], !0 ), this.filterUniqueShapes(), e = this.dynamicProperties.length, t = 0; t < e; t += 1 ) this.dynamicProperties[t].getValue(); this.renderModifiers(); }), (SVGShapeElement.prototype.searchShapes = function (t, e, i, r, s, a, n) { var o, h, l, p, f, m, c = [].concat(a), d = t.length - 1, u = [], y = []; for (o = d; o >= 0; o -= 1) { if ( ((m = this.searchProcessedElement(t[o])) ? (e[o] = i[m - 1]) : (t[o]._render = n), "fl" === t[o].ty || "st" === t[o].ty || "gf" === t[o].ty || "gs" === t[o].ty || "no" === t[o].ty) ) m ? (e[o].style.closed = !1) : (e[o] = this.createStyleElement(t[o], s)), t[o]._render && e[o].style.pElem.parentNode !== r && r.appendChild(e[o].style.pElem), u.push(e[o].style); else if ("gr" === t[o].ty) { if (m) for (l = e[o].it.length, h = 0; h < l; h += 1) e[o].prevViewData[h] = e[o].it[h]; else e[o] = this.createGroupElement(t[o]); this.searchShapes( t[o].it, e[o].it, e[o].prevViewData, e[o].gr, s + 1, c, n ), t[o]._render && e[o].gr.parentNode !== r && r.appendChild(e[o].gr); } else "tr" === t[o].ty ? (m || (e[o] = this.createTransformElement(t[o], r)), (p = e[o].transform), c.push(p)) : "sh" === t[o].ty || "rc" === t[o].ty || "el" === t[o].ty || "sr" === t[o].ty ? (m || (e[o] = this.createShapeElement(t[o], c, s)), this.setElementStyles(e[o])) : "tm" === t[o].ty || "rd" === t[o].ty || "ms" === t[o].ty || "pb" === t[o].ty || "zz" === t[o].ty || "op" === t[o].ty ? (m ? ((f = e[o]).closed = !1) : ((f = ShapeModifiers.getModifier(t[o].ty)).init(this, t[o]), (e[o] = f), this.shapeModifiers.push(f)), y.push(f)) : "rp" === t[o].ty && (m ? ((f = e[o]).closed = !0) : ((f = ShapeModifiers.getModifier(t[o].ty)), (e[o] = f), f.init(this, t, o, e), this.shapeModifiers.push(f), (n = !1)), y.push(f)); this.addProcessedElement(t[o], o + 1); } for (d = u.length, o = 0; o < d; o += 1) u[o].closed = !0; for (d = y.length, o = 0; o < d; o += 1) y[o].closed = !0; }), (SVGShapeElement.prototype.renderInnerContent = function () { var t; this.renderModifiers(); var e = this.stylesList.length; for (t = 0; t < e; t += 1) this.stylesList[t].reset(); for (this.renderShape(), t = 0; t < e; t += 1) (this.stylesList[t]._mdf || this._isFirstFrame) && (this.stylesList[t].msElem && (this.stylesList[t].msElem.setAttribute( "d", this.stylesList[t].d ), (this.stylesList[t].d = "M0 0" + this.stylesList[t].d)), this.stylesList[t].pElem.setAttribute( "d", this.stylesList[t].d || "M0 0" )); }), (SVGShapeElement.prototype.renderShape = function () { var t, e, i = this.animatedContents.length; for (t = 0; t < i; t += 1) (e = this.animatedContents[t]), (this._isFirstFrame || e.element._isAnimated) && !0 !== e.data && e.fn(e.data, e.element, this._isFirstFrame); }), (SVGShapeElement.prototype.destroy = function () { this.destroyBaseElement(), (this.shapesData = null), (this.itemsData = null); }), (LetterProps.prototype.update = function (t, e, i, r, s, a) { (this._mdf.o = !1), (this._mdf.sw = !1), (this._mdf.sc = !1), (this._mdf.fc = !1), (this._mdf.m = !1), (this._mdf.p = !1); var n = !1; return ( this.o !== t && ((this.o = t), (this._mdf.o = !0), (n = !0)), this.sw !== e && ((this.sw = e), (this._mdf.sw = !0), (n = !0)), this.sc !== i && ((this.sc = i), (this._mdf.sc = !0), (n = !0)), this.fc !== r && ((this.fc = r), (this._mdf.fc = !0), (n = !0)), this.m !== s && ((this.m = s), (this._mdf.m = !0), (n = !0)), !a.length || (this.p[0] === a[0] && this.p[1] === a[1] && this.p[4] === a[4] && this.p[5] === a[5] && this.p[12] === a[12] && this.p[13] === a[13]) || ((this.p = a), (this._mdf.p = !0), (n = !0)), n ); }), (TextProperty.prototype.defaultBoxWidth = [0, 0]), (TextProperty.prototype.copyData = function (t, e) { for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]); return t; }), (TextProperty.prototype.setCurrentData = function (t) { t.__complete || this.completeTextData(t), (this.currentData = t), (this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth), (this._mdf = !0); }), (TextProperty.prototype.searchProperty = function () { return this.searchKeyframes(); }), (TextProperty.prototype.searchKeyframes = function () { return ( (this.kf = this.data.d.k.length > 1), this.kf && this.addEffect(this.getKeyframeValue.bind(this)), this.kf ); }), (TextProperty.prototype.addEffect = function (t) { this.effectsSequence.push(t), this.elem.addDynamicProperty(this); }), (TextProperty.prototype.getValue = function (t) { if ( (this.elem.globalData.frameId !== this.frameId && this.effectsSequence.length) || t ) { this.currentData.t = this.data.d.k[this.keysIndex].s.t; var e = this.currentData, i = this.keysIndex; if (this.lock) this.setCurrentData(this.currentData); else { var r; (this.lock = !0), (this._mdf = !1); var s = this.effectsSequence.length, a = t || this.data.d.k[this.keysIndex].s; for (r = 0; r < s; r += 1) a = i !== this.keysIndex ? this.effectsSequence[r](a, a.t) : this.effectsSequence[r](this.currentData, a.t); e !== a && this.setCurrentData(a), (this.v = this.currentData), (this.pv = this.v), (this.lock = !1), (this.frameId = this.elem.globalData.frameId); } } }), (TextProperty.prototype.getKeyframeValue = function () { for ( var t = this.data.d.k, e = this.elem.comp.renderedFrame, i = 0, r = t.length; i <= r - 1 && !(i === r - 1 || t[i + 1].t > e); ) i += 1; return ( this.keysIndex !== i && (this.keysIndex = i), this.data.d.k[this.keysIndex].s ); }), (TextProperty.prototype.buildFinalText = function (t) { for ( var e, i, r = [], s = 0, a = t.length, n = !1, o = !1, h = ""; s < a; ) (n = o), (o = !1), (e = t.charCodeAt(s)), (h = t.charAt(s)), FontManager.isCombinedCharacter(e) ? (n = !0) : e >= 55296 && e <= 56319 ? FontManager.isRegionalFlag(t, s) ? (h = t.substr(s, 14)) : (i = t.charCodeAt(s + 1)) >= 56320 && i <= 57343 && (FontManager.isModifier(e, i) ? ((h = t.substr(s, 2)), (n = !0)) : (h = FontManager.isFlagEmoji(t.substr(s, 4)) ? t.substr(s, 4) : t.substr(s, 2))) : e > 56319 ? ((i = t.charCodeAt(s + 1)), FontManager.isVariationSelector(e) && (n = !0)) : FontManager.isZeroWidthJoiner(e) && ((n = !0), (o = !0)), n ? ((r[r.length - 1] += h), (n = !1)) : r.push(h), (s += h.length); return r; }), (TextProperty.prototype.completeTextData = function (t) { t.__complete = !0; var e, i, r, s, a, n, o, h = this.elem.globalData.fontManager, l = this.data, p = [], f = 0, m = l.m.g, c = 0, d = 0, u = 0, y = [], g = 0, v = 0, b = h.getFontByName(t.f), x = 0, P = getFontProperties(b); (t.fWeight = P.weight), (t.fStyle = P.style), (t.finalSize = t.s), (t.finalText = this.buildFinalText(t.t)), (i = t.finalText.length), (t.finalLineHeight = t.lh); var E, S = (t.tr / 1e3) * t.finalSize; if (t.sz) for (var C, _, A = !0, T = t.sz[0], M = t.sz[1]; A; ) { (C = 0), (g = 0), (i = (_ = this.buildFinalText(t.t)).length), (S = (t.tr / 1e3) * t.finalSize); var k = -1; for (e = 0; e < i; e += 1) (E = _[e].charCodeAt(0)), (r = !1), " " === _[e] ? (k = e) : (13 !== E && 3 !== E) || ((g = 0), (r = !0), (C += t.finalLineHeight || 1.2 * t.finalSize)), h.chars ? ((o = h.getCharData(_[e], b.fStyle, b.fFamily)), (x = r ? 0 : (o.w * t.finalSize) / 100)) : (x = h.measureText(_[e], t.f, t.finalSize)), g + x > T && " " !== _[e] ? (-1 === k ? (i += 1) : (e = k), (C += t.finalLineHeight || 1.2 * t.finalSize), _.splice(e, k === e ? 1 : 0, "\r"), (k = -1), (g = 0)) : ((g += x), (g += S)); (C += (b.ascent * t.finalSize) / 100), this.canResize && t.finalSize > this.minimumFontSize && M < C ? ((t.finalSize -= 1), (t.finalLineHeight = (t.finalSize * t.lh) / t.s)) : ((t.finalText = _), (i = t.finalText.length), (A = !1)); } (g = -S), (x = 0); var D, F = 0; for (e = 0; e < i; e += 1) if ( ((r = !1), 13 === (E = (D = t.finalText[e]).charCodeAt(0)) || 3 === E ? ((F = 0), y.push(g), (v = g > v ? g : v), (g = -2 * S), (s = ""), (r = !0), (u += 1)) : (s = D), h.chars ? ((o = h.getCharData(D, b.fStyle, h.getFontByName(t.f).fFamily)), (x = r ? 0 : (o.w * t.finalSize) / 100)) : (x = h.measureText(s, t.f, t.finalSize)), " " === D ? (F += x + S) : ((g += x + S + F), (F = 0)), p.push({ l: x, an: x, add: c, n: r, anIndexes: [], val: s, line: u, animatorJustifyOffset: 0, }), 2 == m) ) { if (((c += x), "" === s || " " === s || e === i - 1)) { for (("" !== s && " " !== s) || (c -= x); d <= e; ) (p[d].an = c), (p[d].ind = f), (p[d].extra = x), (d += 1); (f += 1), (c = 0); } } else if (3 == m) { if (((c += x), "" === s || e === i - 1)) { for ("" === s && (c -= x); d <= e; ) (p[d].an = c), (p[d].ind = f), (p[d].extra = x), (d += 1); (c = 0), (f += 1); } } else (p[f].ind = f), (p[f].extra = 0), (f += 1); if (((t.l = p), (v = g > v ? g : v), y.push(g), t.sz)) (t.boxWidth = t.sz[0]), (t.justifyOffset = 0); else switch (((t.boxWidth = v), t.j)) { case 1: t.justifyOffset = -t.boxWidth; break; case 2: t.justifyOffset = -t.boxWidth / 2; break; default: t.justifyOffset = 0; } t.lineWidths = y; var w, I, V, B, R = l.a; n = R.length; var L = []; for (a = 0; a < n; a += 1) { for ( (w = R[a]).a.sc && (t.strokeColorAnim = !0), w.a.sw && (t.strokeWidthAnim = !0), (w.a.fc || w.a.fh || w.a.fs || w.a.fb) && (t.fillColorAnim = !0), B = 0, V = w.s.b, e = 0; e < i; e += 1 ) ((I = p[e]).anIndexes[a] = B), ((1 == V && "" !== I.val) || (2 == V && "" !== I.val && " " !== I.val) || (3 == V && (I.n || " " == I.val || e == i - 1)) || (4 == V && (I.n || e == i - 1))) && (1 === w.s.rn && L.push(B), (B += 1)); l.a[a].s.totalChars = B; var G, z = -1; if (1 === w.s.rn) for (e = 0; e < i; e += 1) z != (I = p[e]).anIndexes[a] && ((z = I.anIndexes[a]), (G = L.splice(Math.floor(Math.random() * L.length), 1)[0])), (I.anIndexes[a] = G); } (t.yOffset = t.finalLineHeight || 1.2 * t.finalSize), (t.ls = t.ls || 0), (t.ascent = (b.ascent * t.finalSize) / 100); }), (TextProperty.prototype.updateDocumentData = function (t, e) { e = void 0 === e ? this.keysIndex : e; var i = this.copyData({}, this.data.d.k[e].s); (i = this.copyData(i, t)), (this.data.d.k[e].s = i), this.recalculate(e), this.setCurrentData(i), this.elem.addDynamicProperty(this); }), (TextProperty.prototype.recalculate = function (t) { var e = this.data.d.k[t].s; (e.__complete = !1), (this.keysIndex = 0), (this._isFirstFrame = !0), this.getValue(e); }), (TextProperty.prototype.canResizeFont = function (t) { (this.canResize = t), this.recalculate(this.keysIndex), this.elem.addDynamicProperty(this); }), (TextProperty.prototype.setMinimumFontSize = function (t) { (this.minimumFontSize = Math.floor(t) || 1), this.recalculate(this.keysIndex), this.elem.addDynamicProperty(this); }); var TextSelectorProp = (function () { var t = Math.max, e = Math.min, i = Math.floor; function r(t, e) { (this._currentTextLength = -1), (this.k = !1), (this.data = e), (this.elem = t), (this.comp = t.comp), (this.finalS = 0), (this.finalE = 0), this.initDynamicPropertyContainer(t), (this.s = PropertyFactory.getProp(t, e.s || { k: 0 }, 0, 0, this)), (this.e = "e" in e ? PropertyFactory.getProp(t, e.e, 0, 0, this) : { v: 100 }), (this.o = PropertyFactory.getProp(t, e.o || { k: 0 }, 0, 0, this)), (this.xe = PropertyFactory.getProp(t, e.xe || { k: 0 }, 0, 0, this)), (this.ne = PropertyFactory.getProp(t, e.ne || { k: 0 }, 0, 0, this)), (this.sm = PropertyFactory.getProp( t, e.sm || { k: 100 }, 0, 0, this )), (this.a = PropertyFactory.getProp(t, e.a, 0, 0.01, this)), this.dynamicProperties.length || this.getValue(); } return ( (r.prototype = { getMult: function (r) { this._currentTextLength !== this.elem.textProperty.currentData.l.length && this.getValue(); var s = 0, a = 0, n = 1, o = 1; this.ne.v > 0 ? (s = this.ne.v / 100) : (a = -this.ne.v / 100), this.xe.v > 0 ? (n = 1 - this.xe.v / 100) : (o = 1 + this.xe.v / 100); var h = BezierFactory.getBezierEasing(s, a, n, o).get, l = 0, p = this.finalS, f = this.finalE, m = this.data.sh; if (2 === m) l = h( (l = f === p ? r >= f ? 1 : 0 : t(0, e(0.5 / (f - p) + (r - p) / (f - p), 1))) ); else if (3 === m) l = h( (l = f === p ? r >= f ? 0 : 1 : 1 - t(0, e(0.5 / (f - p) + (r - p) / (f - p), 1))) ); else if (4 === m) f === p ? (l = 0) : (l = t(0, e(0.5 / (f - p) + (r - p) / (f - p), 1))) < 0.5 ? (l *= 2) : (l = 1 - 2 * (l - 0.5)), (l = h(l)); else if (5 === m) { if (f === p) l = 0; else { var c = f - p, d = -c / 2 + (r = e(t(0, r + 0.5 - p), f - p)), u = c / 2; l = Math.sqrt(1 - (d * d) / (u * u)); } l = h(l); } else 6 === m ? (f === p ? (l = 0) : ((r = e(t(0, r + 0.5 - p), f - p)), (l = (1 + Math.cos(Math.PI + (2 * Math.PI * r) / (f - p))) / 2)), (l = h(l))) : (r >= i(p) && (l = t(0, e(r - p < 0 ? e(f, 1) - (p - r) : f - r, 1))), (l = h(l))); if (100 !== this.sm.v) { var y = 0.01 * this.sm.v; 0 === y && (y = 1e-8); var g = 0.5 - 0.5 * y; l < g ? (l = 0) : (l = (l - g) / y) > 1 && (l = 1); } return l * this.a.v; }, getValue: function (t) { this.iterateDynamicProperties(), (this._mdf = t || this._mdf), (this._currentTextLength = this.elem.textProperty.currentData.l.length || 0), t && 2 === this.data.r && (this.e.v = this._currentTextLength); var e = 2 === this.data.r ? 1 : 100 / this.data.totalChars, i = this.o.v / e, r = this.s.v / e + i, s = this.e.v / e + i; if (r > s) { var a = r; (r = s), (s = a); } (this.finalS = r), (this.finalE = s); }, }), extendPrototype([DynamicPropertyContainer], r), { getTextSelectorProp: function (t, e, i) { return new r(t, e, i); }, } ); })(); function TextAnimatorDataProperty(t, e, i) { var r = { propType: !1 }, s = PropertyFactory.getProp, a = e.a; (this.a = { r: a.r ? s(t, a.r, 0, degToRads, i) : r, rx: a.rx ? s(t, a.rx, 0, degToRads, i) : r, ry: a.ry ? s(t, a.ry, 0, degToRads, i) : r, sk: a.sk ? s(t, a.sk, 0, degToRads, i) : r, sa: a.sa ? s(t, a.sa, 0, degToRads, i) : r, s: a.s ? s(t, a.s, 1, 0.01, i) : r, a: a.a ? s(t, a.a, 1, 0, i) : r, o: a.o ? s(t, a.o, 0, 0.01, i) : r, p: a.p ? s(t, a.p, 1, 0, i) : r, sw: a.sw ? s(t, a.sw, 0, 0, i) : r, sc: a.sc ? s(t, a.sc, 1, 0, i) : r, fc: a.fc ? s(t, a.fc, 1, 0, i) : r, fh: a.fh ? s(t, a.fh, 0, 0, i) : r, fs: a.fs ? s(t, a.fs, 0, 0.01, i) : r, fb: a.fb ? s(t, a.fb, 0, 0.01, i) : r, t: a.t ? s(t, a.t, 0, 0, i) : r, }), (this.s = TextSelectorProp.getTextSelectorProp(t, e.s, i)), (this.s.t = e.s.t); } function TextAnimatorProperty(t, e, i) { (this._isFirstFrame = !0), (this._hasMaskedPath = !1), (this._frameId = -1), (this._textData = t), (this._renderType = e), (this._elem = i), (this._animatorsData = createSizedArray(this._textData.a.length)), (this._pathData = {}), (this._moreOptions = { alignment: {} }), (this.renderedLetters = []), (this.lettersChangedFlag = !1), this.initDynamicPropertyContainer(i); } function ITextElement() {} (TextAnimatorProperty.prototype.searchProperties = function () { var t, e, i = this._textData.a.length, r = PropertyFactory.getProp; for (t = 0; t < i; t += 1) (e = this._textData.a[t]), (this._animatorsData[t] = new TextAnimatorDataProperty( this._elem, e, this )); this._textData.p && "m" in this._textData.p ? ((this._pathData = { a: r(this._elem, this._textData.p.a, 0, 0, this), f: r(this._elem, this._textData.p.f, 0, 0, this), l: r(this._elem, this._textData.p.l, 0, 0, this), r: r(this._elem, this._textData.p.r, 0, 0, this), p: r(this._elem, this._textData.p.p, 0, 0, this), m: this._elem.maskManager.getMaskProperty(this._textData.p.m), }), (this._hasMaskedPath = !0)) : (this._hasMaskedPath = !1), (this._moreOptions.alignment = r( this._elem, this._textData.m.a, 1, 0, this )); }), (TextAnimatorProperty.prototype.getMeasures = function (t, e) { if ( ((this.lettersChangedFlag = e), this._mdf || this._isFirstFrame || e || (this._hasMaskedPath && this._pathData.m._mdf)) ) { this._isFirstFrame = !1; var i, r, s, a, n, o, h, l, p, f, m, c, d, u, y, g, v, b, x, P = this._moreOptions.alignment.v, E = this._animatorsData, S = this._textData, C = this.mHelper, _ = this._renderType, A = this.renderedLetters.length, T = t.l; if (this._hasMaskedPath) { if ( ((x = this._pathData.m), !this._pathData.n || this._pathData._mdf) ) { var M, k = x.v; for ( this._pathData.r.v && (k = k.reverse()), n = { tLength: 0, segments: [] }, a = k._length - 1, g = 0, s = 0; s < a; s += 1 ) (M = bez.buildBezierData( k.v[s], k.v[s + 1], [k.o[s][0] - k.v[s][0], k.o[s][1] - k.v[s][1]], [k.i[s + 1][0] - k.v[s + 1][0], k.i[s + 1][1] - k.v[s + 1][1]] )), (n.tLength += M.segmentLength), n.segments.push(M), (g += M.segmentLength); (s = a), x.v.c && ((M = bez.buildBezierData( k.v[s], k.v[0], [k.o[s][0] - k.v[s][0], k.o[s][1] - k.v[s][1]], [k.i[0][0] - k.v[0][0], k.i[0][1] - k.v[0][1]] )), (n.tLength += M.segmentLength), n.segments.push(M), (g += M.segmentLength)), (this._pathData.pi = n); } if ( ((n = this._pathData.pi), (o = this._pathData.f.v), (m = 0), (f = 1), (l = 0), (p = !0), (u = n.segments), o < 0 && x.v.c) ) for ( n.tLength < Math.abs(o) && (o = -Math.abs(o) % n.tLength), f = (d = u[(m = u.length - 1)].points).length - 1; o < 0; ) (o += d[f].partialLength), (f -= 1) < 0 && (f = (d = u[(m -= 1)].points).length - 1); (c = (d = u[m].points)[f - 1]), (y = (h = d[f]).partialLength); } (a = T.length), (i = 0), (r = 0); var D, F, w, I, V, B = 1.2 * t.finalSize * 0.714, R = !0; w = E.length; var L, G, z, O, N, H, q, j, W, $, Y, J, X = -1, Z = o, K = m, U = f, Q = -1, tt = "", et = this.defaultPropsArray; if (2 === t.j || 1 === t.j) { var it = 0, rt = 0, st = 2 === t.j ? -0.5 : -1, at = 0, nt = !0; for (s = 0; s < a; s += 1) if (T[s].n) { for (it && (it += rt); at < s; ) (T[at].animatorJustifyOffset = it), (at += 1); (it = 0), (nt = !0); } else { for (F = 0; F < w; F += 1) (D = E[F].a).t.propType && (nt && 2 === t.j && (rt += D.t.v * st), (V = E[F].s.getMult(T[s].anIndexes[F], S.a[F].s.totalChars)) .length ? (it += D.t.v * V[0] * st) : (it += D.t.v * V * st)); nt = !1; } for (it && (it += rt); at < s; ) (T[at].animatorJustifyOffset = it), (at += 1); } for (s = 0; s < a; s += 1) { if ((C.reset(), (O = 1), T[s].n)) (i = 0), (r += t.yOffset), (r += R ? 1 : 0), (o = Z), (R = !1), this._hasMaskedPath && ((f = U), (c = (d = u[(m = K)].points)[f - 1]), (y = (h = d[f]).partialLength), (l = 0)), (tt = ""), (Y = ""), (W = ""), (J = ""), (et = this.defaultPropsArray); else { if (this._hasMaskedPath) { if (Q !== T[s].line) { switch (t.j) { case 1: o += g - t.lineWidths[T[s].line]; break; case 2: o += (g - t.lineWidths[T[s].line]) / 2; } Q = T[s].line; } X !== T[s].ind && (T[X] && (o += T[X].extra), (o += T[s].an / 2), (X = T[s].ind)), (o += P[0] * T[s].an * 0.005); var ot = 0; for (F = 0; F < w; F += 1) (D = E[F].a).p.propType && ((V = E[F].s.getMult( T[s].anIndexes[F], S.a[F].s.totalChars )).length ? (ot += D.p.v[0] * V[0]) : (ot += D.p.v[0] * V)), D.a.propType && ((V = E[F].s.getMult( T[s].anIndexes[F], S.a[F].s.totalChars )).length ? (ot += D.a.v[0] * V[0]) : (ot += D.a.v[0] * V)); for ( p = !0, this._pathData.a.v && ((o = 0.5 * T[0].an + ((g - this._pathData.f.v - 0.5 * T[0].an - 0.5 * T[T.length - 1].an) * X) / (a - 1)), (o += this._pathData.f.v)); p; ) l + y >= o + ot || !d ? ((v = (o + ot - l) / h.partialLength), (G = c.point[0] + (h.point[0] - c.point[0]) * v), (z = c.point[1] + (h.point[1] - c.point[1]) * v), C.translate(-P[0] * T[s].an * 0.005, -P[1] * B * 0.01), (p = !1)) : d && ((l += h.partialLength), (f += 1) >= d.length && ((f = 0), u[(m += 1)] ? (d = u[m].points) : x.v.c ? ((f = 0), (d = u[(m = 0)].points)) : ((l -= h.partialLength), (d = null))), d && ((c = h), (y = (h = d[f]).partialLength))); (L = T[s].an / 2 - T[s].add), C.translate(-L, 0, 0); } else (L = T[s].an / 2 - T[s].add), C.translate(-L, 0, 0), C.translate(-P[0] * T[s].an * 0.005, -P[1] * B * 0.01, 0); for (F = 0; F < w; F += 1) (D = E[F].a).t.propType && ((V = E[F].s.getMult(T[s].anIndexes[F], S.a[F].s.totalChars)), (0 === i && 0 === t.j) || (this._hasMaskedPath ? V.length ? (o += D.t.v * V[0]) : (o += D.t.v * V) : V.length ? (i += D.t.v * V[0]) : (i += D.t.v * V))); for ( t.strokeWidthAnim && (H = t.sw || 0), t.strokeColorAnim && (N = t.sc ? [t.sc[0], t.sc[1], t.sc[2]] : [0, 0, 0]), t.fillColorAnim && t.fc && (q = [t.fc[0], t.fc[1], t.fc[2]]), F = 0; F < w; F += 1 ) (D = E[F].a).a.propType && ((V = E[F].s.getMult(T[s].anIndexes[F], S.a[F].s.totalChars)) .length ? C.translate( -D.a.v[0] * V[0], -D.a.v[1] * V[1], D.a.v[2] * V[2] ) : C.translate(-D.a.v[0] * V, -D.a.v[1] * V, D.a.v[2] * V)); for (F = 0; F < w; F += 1) (D = E[F].a).s.propType && ((V = E[F].s.getMult(T[s].anIndexes[F], S.a[F].s.totalChars)) .length ? C.scale( 1 + (D.s.v[0] - 1) * V[0], 1 + (D.s.v[1] - 1) * V[1], 1 ) : C.scale( 1 + (D.s.v[0] - 1) * V, 1 + (D.s.v[1] - 1) * V, 1 )); for (F = 0; F < w; F += 1) { if ( ((D = E[F].a), (V = E[F].s.getMult(T[s].anIndexes[F], S.a[F].s.totalChars)), D.sk.propType && (V.length ? C.skewFromAxis(-D.sk.v * V[0], D.sa.v * V[1]) : C.skewFromAxis(-D.sk.v * V, D.sa.v * V)), D.r.propType && (V.length ? C.rotateZ(-D.r.v * V[2]) : C.rotateZ(-D.r.v * V)), D.ry.propType && (V.length ? C.rotateY(D.ry.v * V[1]) : C.rotateY(D.ry.v * V)), D.rx.propType && (V.length ? C.rotateX(D.rx.v * V[0]) : C.rotateX(D.rx.v * V)), D.o.propType && (V.length ? (O += (D.o.v * V[0] - O) * V[0]) : (O += (D.o.v * V - O) * V)), t.strokeWidthAnim && D.sw.propType && (V.length ? (H += D.sw.v * V[0]) : (H += D.sw.v * V)), t.strokeColorAnim && D.sc.propType) ) for (j = 0; j < 3; j += 1) V.length ? (N[j] += (D.sc.v[j] - N[j]) * V[0]) : (N[j] += (D.sc.v[j] - N[j]) * V); if (t.fillColorAnim && t.fc) { if (D.fc.propType) for (j = 0; j < 3; j += 1) V.length ? (q[j] += (D.fc.v[j] - q[j]) * V[0]) : (q[j] += (D.fc.v[j] - q[j]) * V); D.fh.propType && (q = V.length ? addHueToRGB(q, D.fh.v * V[0]) : addHueToRGB(q, D.fh.v * V)), D.fs.propType && (q = V.length ? addSaturationToRGB(q, D.fs.v * V[0]) : addSaturationToRGB(q, D.fs.v * V)), D.fb.propType && (q = V.length ? addBrightnessToRGB(q, D.fb.v * V[0]) : addBrightnessToRGB(q, D.fb.v * V)); } } for (F = 0; F < w; F += 1) (D = E[F].a).p.propType && ((V = E[F].s.getMult(T[s].anIndexes[F], S.a[F].s.totalChars)), this._hasMaskedPath ? V.length ? C.translate(0, D.p.v[1] * V[0], -D.p.v[2] * V[1]) : C.translate(0, D.p.v[1] * V, -D.p.v[2] * V) : V.length ? C.translate( D.p.v[0] * V[0], D.p.v[1] * V[1], -D.p.v[2] * V[2] ) : C.translate(D.p.v[0] * V, D.p.v[1] * V, -D.p.v[2] * V)); if ( (t.strokeWidthAnim && (W = H < 0 ? 0 : H), t.strokeColorAnim && ($ = "rgb(" + Math.round(255 * N[0]) + "," + Math.round(255 * N[1]) + "," + Math.round(255 * N[2]) + ")"), t.fillColorAnim && t.fc && (Y = "rgb(" + Math.round(255 * q[0]) + "," + Math.round(255 * q[1]) + "," + Math.round(255 * q[2]) + ")"), this._hasMaskedPath) ) { if ( (C.translate(0, -t.ls), C.translate(0, P[1] * B * 0.01 + r, 0), this._pathData.p.v) ) { b = (h.point[1] - c.point[1]) / (h.point[0] - c.point[0]); var ht = (180 * Math.atan(b)) / Math.PI; h.point[0] < c.point[0] && (ht += 180), C.rotate((-ht * Math.PI) / 180); } C.translate(G, z, 0), (o -= P[0] * T[s].an * 0.005), T[s + 1] && X !== T[s + 1].ind && ((o += T[s].an / 2), (o += 0.001 * t.tr * t.finalSize)); } else { switch ( (C.translate(i, r, 0), t.ps && C.translate(t.ps[0], t.ps[1] + t.ascent, 0), t.j) ) { case 1: C.translate( T[s].animatorJustifyOffset + t.justifyOffset + (t.boxWidth - t.lineWidths[T[s].line]), 0, 0 ); break; case 2: C.translate( T[s].animatorJustifyOffset + t.justifyOffset + (t.boxWidth - t.lineWidths[T[s].line]) / 2, 0, 0 ); } C.translate(0, -t.ls), C.translate(L, 0, 0), C.translate(P[0] * T[s].an * 0.005, P[1] * B * 0.01, 0), (i += T[s].l + 0.001 * t.tr * t.finalSize); } "html" === _ ? (tt = C.toCSS()) : "svg" === _ ? (tt = C.to2dCSS()) : (et = [ C.props[0], C.props[1], C.props[2], C.props[3], C.props[4], C.props[5], C.props[6], C.props[7], C.props[8], C.props[9], C.props[10], C.props[11], C.props[12], C.props[13], C.props[14], C.props[15], ]), (J = O); } A <= s ? ((I = new LetterProps(J, W, $, Y, tt, et)), this.renderedLetters.push(I), (A += 1), (this.lettersChangedFlag = !0)) : ((I = this.renderedLetters[s]), (this.lettersChangedFlag = I.update(J, W, $, Y, tt, et) || this.lettersChangedFlag)); } } }), (TextAnimatorProperty.prototype.getValue = function () { this._elem.globalData.frameId !== this._frameId && ((this._frameId = this._elem.globalData.frameId), this.iterateDynamicProperties()); }), (TextAnimatorProperty.prototype.mHelper = new Matrix()), (TextAnimatorProperty.prototype.defaultPropsArray = []), extendPrototype([DynamicPropertyContainer], TextAnimatorProperty), (ITextElement.prototype.initElement = function (t, e, i) { (this.lettersChangedFlag = !0), this.initFrame(), this.initBaseData(t, e, i), (this.textProperty = new TextProperty( this, t.t, this.dynamicProperties )), (this.textAnimator = new TextAnimatorProperty( t.t, this.renderType, this )), this.initTransform(t, e, i), this.initHierarchy(), this.initRenderable(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), this.createContent(), this.hide(), this.textAnimator.searchProperties(this.dynamicProperties); }), (ITextElement.prototype.prepareFrame = function (t) { (this._mdf = !1), this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange); }), (ITextElement.prototype.createPathShape = function (t, e) { var i, r, s = e.length, a = ""; for (i = 0; i < s; i += 1) "sh" === e[i].ty && ((r = e[i].ks.k), (a += buildShapeString(r, r.i.length, !0, t))); return a; }), (ITextElement.prototype.updateDocumentData = function (t, e) { this.textProperty.updateDocumentData(t, e); }), (ITextElement.prototype.canResizeFont = function (t) { this.textProperty.canResizeFont(t); }), (ITextElement.prototype.setMinimumFontSize = function (t) { this.textProperty.setMinimumFontSize(t); }), (ITextElement.prototype.applyTextPropertiesToMatrix = function ( t, e, i, r, s ) { switch ( (t.ps && e.translate(t.ps[0], t.ps[1] + t.ascent, 0), e.translate(0, -t.ls, 0), t.j) ) { case 1: e.translate(t.justifyOffset + (t.boxWidth - t.lineWidths[i]), 0, 0); break; case 2: e.translate( t.justifyOffset + (t.boxWidth - t.lineWidths[i]) / 2, 0, 0 ); } e.translate(r, s, 0); }), (ITextElement.prototype.buildColor = function (t) { return ( "rgb(" + Math.round(255 * t[0]) + "," + Math.round(255 * t[1]) + "," + Math.round(255 * t[2]) + ")" ); }), (ITextElement.prototype.emptyProp = new LetterProps()), (ITextElement.prototype.destroy = function () {}), (ITextElement.prototype.validateText = function () { (this.textProperty._mdf || this.textProperty._isFirstFrame) && (this.buildNewText(), (this.textProperty._isFirstFrame = !1), (this.textProperty._mdf = !1)); }); var emptyShapeData = { shapes: [] }; function SVGTextLottieElement(t, e, i) { (this.textSpans = []), (this.renderType = "svg"), this.initElement(t, e, i); } function ISolidElement(t, e, i) { this.initElement(t, e, i); } function NullElement(t, e, i) { this.initFrame(), this.initBaseData(t, e, i), this.initFrame(), this.initTransform(t, e, i), this.initHierarchy(); } function SVGRendererBase() {} function ICompElement() {} function SVGCompElement(t, e, i) { (this.layers = t.layers), (this.supports3d = !0), (this.completeLayers = !1), (this.pendingElements = []), (this.elements = this.layers ? createSizedArray(this.layers.length) : []), this.initElement(t, e, i), (this.tm = t.tm ? PropertyFactory.getProp(this, t.tm, 0, e.frameRate, this) : { _placeholder: !0 }); } function SVGRenderer(t, e) { (this.animationItem = t), (this.layers = null), (this.renderedFrame = -1), (this.svgElement = createNS("svg")); var i = ""; if (e && e.title) { var r = createNS("title"), s = createElementID(); r.setAttribute("id", s), (r.textContent = e.title), this.svgElement.appendChild(r), (i += s); } if (e && e.description) { var a = createNS("desc"), n = createElementID(); a.setAttribute("id", n), (a.textContent = e.description), this.svgElement.appendChild(a), (i += " " + n); } i && this.svgElement.setAttribute("aria-labelledby", i); var o = createNS("defs"); this.svgElement.appendChild(o); var h = createNS("g"); this.svgElement.appendChild(h), (this.layerElement = h), (this.renderConfig = { preserveAspectRatio: (e && e.preserveAspectRatio) || "xMidYMid meet", imagePreserveAspectRatio: (e && e.imagePreserveAspectRatio) || "xMidYMid slice", contentVisibility: (e && e.contentVisibility) || "visible", progressiveLoad: (e && e.progressiveLoad) || !1, hideOnTransparent: !(e && !1 === e.hideOnTransparent), viewBoxOnly: (e && e.viewBoxOnly) || !1, viewBoxSize: (e && e.viewBoxSize) || !1, className: (e && e.className) || "", id: (e && e.id) || "", focusable: e && e.focusable, filterSize: { width: (e && e.filterSize && e.filterSize.width) || "100%", height: (e && e.filterSize && e.filterSize.height) || "100%", x: (e && e.filterSize && e.filterSize.x) || "0%", y: (e && e.filterSize && e.filterSize.y) || "0%", }, width: e && e.width, height: e && e.height, runExpressions: !e || void 0 === e.runExpressions || e.runExpressions, }), (this.globalData = { _mdf: !1, frameNum: -1, defs: o, renderConfig: this.renderConfig, }), (this.elements = []), (this.pendingElements = []), (this.destroyed = !1), (this.rendererType = "svg"); } function ShapeTransformManager() { (this.sequences = {}), (this.sequenceList = []), (this.transform_key_count = 0); } extendPrototype( [ BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement, ], SVGTextLottieElement ), (SVGTextLottieElement.prototype.createContent = function () { this.data.singleShape && !this.globalData.fontManager.chars && (this.textContainer = createNS("text")); }), (SVGTextLottieElement.prototype.buildTextContents = function (t) { for (var e = 0, i = t.length, r = [], s = ""; e < i; ) t[e] === String.fromCharCode(13) || t[e] === String.fromCharCode(3) ? (r.push(s), (s = "")) : (s += t[e]), (e += 1); return r.push(s), r; }), (SVGTextLottieElement.prototype.buildShapeData = function (t, e) { if (t.shapes && t.shapes.length) { var i = t.shapes[0]; if (i.it) { var r = i.it[i.it.length - 1]; r.s && ((r.s.k[0] = e), (r.s.k[1] = e)); } } return t; }), (SVGTextLottieElement.prototype.buildNewText = function () { var t, e; this.addDynamicProperty(this); var i = this.textProperty.currentData; (this.renderedLetters = createSizedArray(i ? i.l.length : 0)), i.fc ? this.layerElement.setAttribute("fill", this.buildColor(i.fc)) : this.layerElement.setAttribute("fill", "rgba(0,0,0,0)"), i.sc && (this.layerElement.setAttribute("stroke", this.buildColor(i.sc)), this.layerElement.setAttribute("stroke-width", i.sw)), this.layerElement.setAttribute("font-size", i.finalSize); var r = this.globalData.fontManager.getFontByName(i.f); if (r.fClass) this.layerElement.setAttribute("class", r.fClass); else { this.layerElement.setAttribute("font-family", r.fFamily); var s = i.fWeight, a = i.fStyle; this.layerElement.setAttribute("font-style", a), this.layerElement.setAttribute("font-weight", s); } this.layerElement.setAttribute("aria-label", i.t); var n, o = i.l || [], h = !!this.globalData.fontManager.chars; e = o.length; var l = this.mHelper, p = this.data.singleShape, f = 0, m = 0, c = !0, d = 0.001 * i.tr * i.finalSize; if (!p || h || i.sz) { var u, y = this.textSpans.length; for (t = 0; t < e; t += 1) { if ( (this.textSpans[t] || (this.textSpans[t] = { span: null, childSpan: null, glyph: null, }), !h || !p || 0 === t) ) { if ( ((n = y > t ? this.textSpans[t].span : createNS(h ? "g" : "text")), y <= t) ) { if ( (n.setAttribute("stroke-linecap", "butt"), n.setAttribute("stroke-linejoin", "round"), n.setAttribute("stroke-miterlimit", "4"), (this.textSpans[t].span = n), h) ) { var g = createNS("g"); n.appendChild(g), (this.textSpans[t].childSpan = g); } (this.textSpans[t].span = n), this.layerElement.appendChild(n); } n.style.display = "inherit"; } if ( (l.reset(), p && (o[t].n && ((f = -d), (m += i.yOffset), (m += c ? 1 : 0), (c = !1)), this.applyTextPropertiesToMatrix(i, l, o[t].line, f, m), (f += o[t].l || 0), (f += d)), h) ) { var v; if ( 1 === (u = this.globalData.fontManager.getCharData( i.finalText[t], r.fStyle, this.globalData.fontManager.getFontByName(i.f).fFamily )).t ) v = new SVGCompElement(u.data, this.globalData, this); else { var b = emptyShapeData; u.data && u.data.shapes && (b = this.buildShapeData(u.data, i.finalSize)), (v = new SVGShapeElement(b, this.globalData, this)); } if (this.textSpans[t].glyph) { var x = this.textSpans[t].glyph; this.textSpans[t].childSpan.removeChild(x.layerElement), x.destroy(); } (this.textSpans[t].glyph = v), (v._debug = !0), v.prepareFrame(0), v.renderFrame(), this.textSpans[t].childSpan.appendChild(v.layerElement), 1 === u.t && this.textSpans[t].childSpan.setAttribute( "transform", "scale(" + i.finalSize / 100 + "," + i.finalSize / 100 + ")" ); } else p && n.setAttribute( "transform", "translate(" + l.props[12] + "," + l.props[13] + ")" ), (n.textContent = o[t].val), n.setAttributeNS( "http://www.w3.org/XML/1998/namespace", "xml:space", "preserve" ); } p && n && n.setAttribute("d", ""); } else { var P = this.textContainer, E = "start"; switch (i.j) { case 1: E = "end"; break; case 2: E = "middle"; break; default: E = "start"; } P.setAttribute("text-anchor", E), P.setAttribute("letter-spacing", d); var S = this.buildTextContents(i.finalText); for ( e = S.length, m = i.ps ? i.ps[1] + i.ascent : 0, t = 0; t < e; t += 1 ) ((n = this.textSpans[t].span || createNS("tspan")).textContent = S[t]), n.setAttribute("x", 0), n.setAttribute("y", m), (n.style.display = "inherit"), P.appendChild(n), this.textSpans[t] || (this.textSpans[t] = { span: null, glyph: null }), (this.textSpans[t].span = n), (m += i.finalLineHeight); this.layerElement.appendChild(P); } for (; t < this.textSpans.length; ) (this.textSpans[t].span.style.display = "none"), (t += 1); this._sizeChanged = !0; }), (SVGTextLottieElement.prototype.sourceRectAtTime = function () { if ( (this.prepareFrame(this.comp.renderedFrame - this.data.st), this.renderInnerContent(), this._sizeChanged) ) { this._sizeChanged = !1; var t = this.layerElement.getBBox(); this.bbox = { top: t.y, left: t.x, width: t.width, height: t.height }; } return this.bbox; }), (SVGTextLottieElement.prototype.getValue = function () { var t, e, i = this.textSpans.length; for (this.renderedFrame = this.comp.renderedFrame, t = 0; t < i; t += 1) (e = this.textSpans[t].glyph) && (e.prepareFrame(this.comp.renderedFrame - this.data.st), e._mdf && (this._mdf = !0)); }), (SVGTextLottieElement.prototype.renderInnerContent = function () { if ( (this.validateText(), (!this.data.singleShape || this._mdf) && (this.textAnimator.getMeasures( this.textProperty.currentData, this.lettersChangedFlag ), this.lettersChangedFlag || this.textAnimator.lettersChangedFlag)) ) { var t, e; this._sizeChanged = !0; var i, r, s, a = this.textAnimator.renderedLetters, n = this.textProperty.currentData.l; for (e = n.length, t = 0; t < e; t += 1) n[t].n || ((i = a[t]), (r = this.textSpans[t].span), (s = this.textSpans[t].glyph) && s.renderFrame(), i._mdf.m && r.setAttribute("transform", i.m), i._mdf.o && r.setAttribute("opacity", i.o), i._mdf.sw && r.setAttribute("stroke-width", i.sw), i._mdf.sc && r.setAttribute("stroke", i.sc), i._mdf.fc && r.setAttribute("fill", i.fc)); } }), extendPrototype([IImageElement], ISolidElement), (ISolidElement.prototype.createContent = function () { var t = createNS("rect"); t.setAttribute("width", this.data.sw), t.setAttribute("height", this.data.sh), t.setAttribute("fill", this.data.sc), this.layerElement.appendChild(t); }), (NullElement.prototype.prepareFrame = function (t) { this.prepareProperties(t, !0); }), (NullElement.prototype.renderFrame = function () {}), (NullElement.prototype.getBaseElement = function () { return null; }), (NullElement.prototype.destroy = function () {}), (NullElement.prototype.sourceRectAtTime = function () {}), (NullElement.prototype.hide = function () {}), extendPrototype( [BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement ), extendPrototype([BaseRenderer], SVGRendererBase), (SVGRendererBase.prototype.createNull = function (t) { return new NullElement(t, this.globalData, this); }), (SVGRendererBase.prototype.createShape = function (t) { return new SVGShapeElement(t, this.globalData, this); }), (SVGRendererBase.prototype.createText = function (t) { return new SVGTextLottieElement(t, this.globalData, this); }), (SVGRendererBase.prototype.createImage = function (t) { return new IImageElement(t, this.globalData, this); }), (SVGRendererBase.prototype.createSolid = function (t) { return new ISolidElement(t, this.globalData, this); }), (SVGRendererBase.prototype.configAnimation = function (t) { this.svgElement.setAttribute("xmlns", "http://www.w3.org/2000/svg"), this.svgElement.setAttribute( "xmlns:xlink", "http://www.w3.org/1999/xlink" ), this.renderConfig.viewBoxSize ? this.svgElement.setAttribute( "viewBox", this.renderConfig.viewBoxSize ) : this.svgElement.setAttribute("viewBox", "0 0 " + t.w + " " + t.h), this.renderConfig.viewBoxOnly || (this.svgElement.setAttribute("width", t.w), this.svgElement.setAttribute("height", t.h), (this.svgElement.style.width = "100%"), (this.svgElement.style.height = "100%"), (this.svgElement.style.transform = "translate3d(0,0,0)"), (this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility)), this.renderConfig.width && this.svgElement.setAttribute("width", this.renderConfig.width), this.renderConfig.height && this.svgElement.setAttribute("height", this.renderConfig.height), this.renderConfig.className && this.svgElement.setAttribute("class", this.renderConfig.className), this.renderConfig.id && this.svgElement.setAttribute("id", this.renderConfig.id), void 0 !== this.renderConfig.focusable && this.svgElement.setAttribute( "focusable", this.renderConfig.focusable ), this.svgElement.setAttribute( "preserveAspectRatio", this.renderConfig.preserveAspectRatio ), this.animationItem.wrapper.appendChild(this.svgElement); var e = this.globalData.defs; this.setupGlobalData(t, e), (this.globalData.progressiveLoad = this.renderConfig.progressiveLoad), (this.data = t); var i = createNS("clipPath"), r = createNS("rect"); r.setAttribute("width", t.w), r.setAttribute("height", t.h), r.setAttribute("x", 0), r.setAttribute("y", 0); var s = createElementID(); i.setAttribute("id", s), i.appendChild(r), this.layerElement.setAttribute( "clip-path", "url(" + getLocationHref() + "#" + s + ")" ), e.appendChild(i), (this.layers = t.layers), (this.elements = createSizedArray(t.layers.length)); }), (SVGRendererBase.prototype.destroy = function () { var t; this.animationItem.wrapper && (this.animationItem.wrapper.innerText = ""), (this.layerElement = null), (this.globalData.defs = null); var e = this.layers ? this.layers.length : 0; for (t = 0; t < e; t += 1) this.elements[t] && this.elements[t].destroy && this.elements[t].destroy(); (this.elements.length = 0), (this.destroyed = !0), (this.animationItem = null); }), (SVGRendererBase.prototype.updateContainerSize = function () {}), (SVGRendererBase.prototype.findIndexByInd = function (t) { var e = 0, i = this.layers.length; for (e = 0; e < i; e += 1) if (this.layers[e].ind === t) return e; return -1; }), (SVGRendererBase.prototype.buildItem = function (t) { var e = this.elements; if (!e[t] && 99 !== this.layers[t].ty) { e[t] = !0; var i = this.createItem(this.layers[t]); if ( ((e[t] = i), getExpressionsPlugin() && (0 === this.layers[t].ty && this.globalData.projectInterface.registerComposition(i), i.initExpressions()), this.appendElementInPos(i, t), this.layers[t].tt) ) { var r = "tp" in this.layers[t] ? this.findIndexByInd(this.layers[t].tp) : t - 1; if (-1 === r) return; if (this.elements[r] && !0 !== this.elements[r]) { var s = e[r].getMatte(this.layers[t].tt); i.setMatte(s); } else this.buildItem(r), this.addPendingElement(i); } } }), (SVGRendererBase.prototype.checkPendingElements = function () { for (; this.pendingElements.length; ) { var t = this.pendingElements.pop(); if ((t.checkParenting(), t.data.tt)) for (var e = 0, i = this.elements.length; e < i; ) { if (this.elements[e] === t) { var r = "tp" in t.data ? this.findIndexByInd(t.data.tp) : e - 1, s = this.elements[r].getMatte(this.layers[e].tt); t.setMatte(s); break; } e += 1; } } }), (SVGRendererBase.prototype.renderFrame = function (t) { if (this.renderedFrame !== t && !this.destroyed) { var e; null === t ? (t = this.renderedFrame) : (this.renderedFrame = t), (this.globalData.frameNum = t), (this.globalData.frameId += 1), (this.globalData.projectInterface.currentFrame = t), (this.globalData._mdf = !1); var i = this.layers.length; for ( this.completeLayers || this.checkLayers(t), e = i - 1; e >= 0; e -= 1 ) (this.completeLayers || this.elements[e]) && this.elements[e].prepareFrame(t - this.layers[e].st); if (this.globalData._mdf) for (e = 0; e < i; e += 1) (this.completeLayers || this.elements[e]) && this.elements[e].renderFrame(); } }), (SVGRendererBase.prototype.appendElementInPos = function (t, e) { var i = t.getBaseElement(); if (i) { for (var r, s = 0; s < e; ) this.elements[s] && !0 !== this.elements[s] && this.elements[s].getBaseElement() && (r = this.elements[s].getBaseElement()), (s += 1); r ? this.layerElement.insertBefore(i, r) : this.layerElement.appendChild(i); } }), (SVGRendererBase.prototype.hide = function () { this.layerElement.style.display = "none"; }), (SVGRendererBase.prototype.show = function () { this.layerElement.style.display = "block"; }), extendPrototype( [ BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement, ], ICompElement ), (ICompElement.prototype.initElement = function (t, e, i) { this.initFrame(), this.initBaseData(t, e, i), this.initTransform(t, e, i), this.initRenderable(), this.initHierarchy(), this.initRendererElement(), this.createContainerElements(), this.createRenderableComponents(), (!this.data.xt && e.progressiveLoad) || this.buildAllItems(), this.hide(); }), (ICompElement.prototype.prepareFrame = function (t) { if ( ((this._mdf = !1), this.prepareRenderableFrame(t), this.prepareProperties(t, this.isInRange), this.isInRange || this.data.xt) ) { if (this.tm._placeholder) this.renderedFrame = t / this.data.sr; else { var e = this.tm.v; e === this.data.op && (e = this.data.op - 1), (this.renderedFrame = e); } var i, r = this.elements.length; for ( this.completeLayers || this.checkLayers(this.renderedFrame), i = r - 1; i >= 0; i -= 1 ) (this.completeLayers || this.elements[i]) && (this.elements[i].prepareFrame( this.renderedFrame - this.layers[i].st ), this.elements[i]._mdf && (this._mdf = !0)); } }), (ICompElement.prototype.renderInnerContent = function () { var t, e = this.layers.length; for (t = 0; t < e; t += 1) (this.completeLayers || this.elements[t]) && this.elements[t].renderFrame(); }), (ICompElement.prototype.setElements = function (t) { this.elements = t; }), (ICompElement.prototype.getElements = function () { return this.elements; }), (ICompElement.prototype.destroyElements = function () { var t, e = this.layers.length; for (t = 0; t < e; t += 1) this.elements[t] && this.elements[t].destroy(); }), (ICompElement.prototype.destroy = function () { this.destroyElements(), this.destroyBaseElement(); }), extendPrototype( [SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement ), (SVGCompElement.prototype.createComp = function (t) { return new SVGCompElement(t, this.globalData, this); }), extendPrototype([SVGRendererBase], SVGRenderer), (SVGRenderer.prototype.createComp = function (t) { return new SVGCompElement(t, this.globalData, this); }), (ShapeTransformManager.prototype = { addTransformSequence: function (t) { var e, i = t.length, r = "_"; for (e = 0; e < i; e += 1) r += t[e].transform.key + "_"; var s = this.sequences[r]; return ( s || ((s = { transforms: [].concat(t), finalTransform: new Matrix(), _mdf: !1, }), (this.sequences[r] = s), this.sequenceList.push(s)), s ); }, processSequence: function (t, e) { for (var i = 0, r = t.transforms.length, s = e; i < r && !e; ) { if (t.transforms[i].transform.mProps._mdf) { s = !0; break; } i += 1; } if (s) for (t.finalTransform.reset(), i = r - 1; i >= 0; i -= 1) t.finalTransform.multiply(t.transforms[i].transform.mProps.v); t._mdf = s; }, processSequences: function (t) { var e, i = this.sequenceList.length; for (e = 0; e < i; e += 1) this.processSequence(this.sequenceList[e], t); }, getNewKey: function () { return ( (this.transform_key_count += 1), "_" + this.transform_key_count ); }, }); var lumaLoader = function () { var t = "__lottie_element_luma_buffer", e = null, i = null, r = null; function s() { var s, a, n; e || ((s = createNS("svg")), (a = createNS("filter")), (n = createNS("feColorMatrix")), a.setAttribute("id", t), n.setAttribute("type", "matrix"), n.setAttribute("color-interpolation-filters", "sRGB"), n.setAttribute( "values", "0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0" ), a.appendChild(n), s.appendChild(a), s.setAttribute("id", t + "_svg"), featureSupport.svgLumaHidden && (s.style.display = "none"), (r = s), document.body.appendChild(r), (e = createTag("canvas")), ((i = e.getContext("2d")).filter = "url(#" + t + ")"), (i.fillStyle = "rgba(0,0,0,0)"), i.fillRect(0, 0, 1, 1)); } return { load: s, get: function (r) { return ( e || s(), (e.width = r.width), (e.height = r.height), (i.filter = "url(#" + t + ")"), e ); }, }; }; function createCanvas(t, e) { if (featureSupport.offscreenCanvas) return new OffscreenCanvas(t, e); var i = createTag("canvas"); return (i.width = t), (i.height = e), i; } var assetLoader = { loadLumaCanvas: lumaLoader.load, getLumaCanvas: lumaLoader.get, createCanvas: createCanvas, }, registeredEffects = {}; function CVEffects(t) { var e, i, r = t.data.ef ? t.data.ef.length : 0; for (this.filters = [], e = 0; e < r; e += 1) { i = null; var s = t.data.ef[e].ty; if (registeredEffects[s]) i = new (0, registeredEffects[s].effect)( t.effectsManager.effectElements[e], t ); i && this.filters.push(i); } this.filters.length && t.addRenderableComponent(this); } function registerEffect(t, e) { registeredEffects[t] = { effect: e }; } function CVMaskElement(t, e) { var i; (this.data = t), (this.element = e), (this.masksProperties = this.data.masksProperties || []), (this.viewData = createSizedArray(this.masksProperties.length)); var r = this.masksProperties.length, s = !1; for (i = 0; i < r; i += 1) "n" !== this.masksProperties[i].mode && (s = !0), (this.viewData[i] = ShapePropertyFactory.getShapeProp( this.element, this.masksProperties[i], 3 )); (this.hasMasks = s), s && this.element.addRenderableComponent(this); } function CVBaseElement() {} (CVEffects.prototype.renderFrame = function (t) { var e, i = this.filters.length; for (e = 0; e < i; e += 1) this.filters[e].renderFrame(t); }), (CVEffects.prototype.getEffects = function (t) { var e, i = this.filters.length, r = []; for (e = 0; e < i; e += 1) this.filters[e].type === t && r.push(this.filters[e]); return r; }), (CVMaskElement.prototype.renderFrame = function () { if (this.hasMasks) { var t, e, i, r, s = this.element.finalTransform.mat, a = this.element.canvasContext, n = this.masksProperties.length; for (a.beginPath(), t = 0; t < n; t += 1) if ("n" !== this.masksProperties[t].mode) { var o; this.masksProperties[t].inv && (a.moveTo(0, 0), a.lineTo(this.element.globalData.compSize.w, 0), a.lineTo( this.element.globalData.compSize.w, this.element.globalData.compSize.h ), a.lineTo(0, this.element.globalData.compSize.h), a.lineTo(0, 0)), (r = this.viewData[t].v), (e = s.applyToPointArray(r.v[0][0], r.v[0][1], 0)), a.moveTo(e[0], e[1]); var h = r._length; for (o = 1; o < h; o += 1) (i = s.applyToTriplePoints(r.o[o - 1], r.i[o], r.v[o])), a.bezierCurveTo(i[0], i[1], i[2], i[3], i[4], i[5]); (i = s.applyToTriplePoints(r.o[o - 1], r.i[0], r.v[0])), a.bezierCurveTo(i[0], i[1], i[2], i[3], i[4], i[5]); } this.element.globalData.renderer.save(!0), a.clip(); } }), (CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty), (CVMaskElement.prototype.destroy = function () { this.element = null; }); var operationsMap = { 1: "source-in", 2: "source-out", 3: "source-in", 4: "source-out", }; function CVShapeData(t, e, i, r) { (this.styledShapes = []), (this.tr = [0, 0, 0, 0, 0, 0]); var s, a = 4; "rc" === e.ty ? (a = 5) : "el" === e.ty ? (a = 6) : "sr" === e.ty && (a = 7), (this.sh = ShapePropertyFactory.getShapeProp(t, e, a, t)); var n, o = i.length; for (s = 0; s < o; s += 1) i[s].closed || ((n = { transforms: r.addTransformSequence(i[s].transforms), trNodes: [], }), this.styledShapes.push(n), i[s].elements.push(n)); } function CVShapeElement(t, e, i) { (this.shapes = []), (this.shapesData = t.shapes), (this.stylesList = []), (this.itemsData = []), (this.prevViewData = []), (this.shapeModifiers = []), (this.processedElements = []), (this.transformsManager = new ShapeTransformManager()), this.initElement(t, e, i); } function CVTextElement(t, e, i) { (this.textSpans = []), (this.yOffset = 0), (this.fillColorAnim = !1), (this.strokeColorAnim = !1), (this.strokeWidthAnim = !1), (this.stroke = !1), (this.fill = !1), (this.justifyOffset = 0), (this.currentRender = null), (this.renderType = "canvas"), (this.values = { fill: "rgba(0,0,0,0)", stroke: "rgba(0,0,0,0)", sWidth: 0, fValue: "", }), this.initElement(t, e, i); } function CVImageElement(t, e, i) { (this.assetData = e.getAssetData(t.refId)), (this.img = e.imageLoader.getAsset(this.assetData)), this.initElement(t, e, i); } function CVSolidElement(t, e, i) { this.initElement(t, e, i); } function CanvasRendererBase() {} function CanvasContext() { (this.opacity = -1), (this.transform = createTypedArray("float32", 16)), (this.fillStyle = ""), (this.strokeStyle = ""), (this.lineWidth = ""), (this.lineCap = ""), (this.lineJoin = ""), (this.miterLimit = ""), (this.id = Math.random()); } function CVContextData() { var t; (this.stack = []), (this.cArrPos = 0), (this.cTr = new Matrix()); for (t = 0; t < 15; t += 1) { var e = new CanvasContext(); this.stack[t] = e; } (this._length = 15), (this.nativeContext = null), (this.transformMat = new Matrix()), (this.currentOpacity = 1), (this.currentFillStyle = ""), (this.appliedFillStyle = ""), (this.currentStrokeStyle = ""), (this.appliedStrokeStyle = ""), (this.currentLineWidth = ""), (this.appliedLineWidth = ""), (this.currentLineCap = ""), (this.appliedLineCap = ""), (this.currentLineJoin = ""), (this.appliedLineJoin = ""), (this.appliedMiterLimit = ""), (this.currentMiterLimit = ""); } function CVCompElement(t, e, i) { (this.completeLayers = !1), (this.layers = t.layers), (this.pendingElements = []), (this.elements = createSizedArray(this.layers.length)), this.initElement(t, e, i), (this.tm = t.tm ? PropertyFactory.getProp(this, t.tm, 0, e.frameRate, this) : { _placeholder: !0 }); } function CanvasRenderer(t, e) { (this.animationItem = t), (this.renderConfig = { clearCanvas: !e || void 0 === e.clearCanvas || e.clearCanvas, context: (e && e.context) || null, progressiveLoad: (e && e.progressiveLoad) || !1, preserveAspectRatio: (e && e.preserveAspectRatio) || "xMidYMid meet", imagePreserveAspectRatio: (e && e.imagePreserveAspectRatio) || "xMidYMid slice", contentVisibility: (e && e.contentVisibility) || "visible", className: (e && e.className) || "", id: (e && e.id) || "", runExpressions: !e || void 0 === e.runExpressions || e.runExpressions, }), (this.renderConfig.dpr = (e && e.dpr) || 1), this.animationItem.wrapper && (this.renderConfig.dpr = (e && e.dpr) || window.devicePixelRatio || 1), (this.renderedFrame = -1), (this.globalData = { frameNum: -1, _mdf: !1, renderConfig: this.renderConfig, currentGlobalAlpha: -1, }), (this.contextData = new CVContextData()), (this.elements = []), (this.pendingElements = []), (this.transformMat = new Matrix()), (this.completeLayers = !1), (this.rendererType = "canvas"), this.renderConfig.clearCanvas && ((this.ctxTransform = this.contextData.transform.bind( this.contextData )), (this.ctxOpacity = this.contextData.opacity.bind(this.contextData)), (this.ctxFillStyle = this.contextData.fillStyle.bind( this.contextData )), (this.ctxStrokeStyle = this.contextData.strokeStyle.bind( this.contextData )), (this.ctxLineWidth = this.contextData.lineWidth.bind( this.contextData )), (this.ctxLineCap = this.contextData.lineCap.bind(this.contextData)), (this.ctxLineJoin = this.contextData.lineJoin.bind(this.contextData)), (this.ctxMiterLimit = this.contextData.miterLimit.bind( this.contextData )), (this.ctxFill = this.contextData.fill.bind(this.contextData)), (this.ctxFillRect = this.contextData.fillRect.bind(this.contextData)), (this.ctxStroke = this.contextData.stroke.bind(this.contextData)), (this.save = this.contextData.save.bind(this.contextData))); } function HBaseElement() {} function HSolidElement(t, e, i) { this.initElement(t, e, i); } function HShapeElement(t, e, i) { (this.shapes = []), (this.shapesData = t.shapes), (this.stylesList = []), (this.shapeModifiers = []), (this.itemsData = []), (this.processedElements = []), (this.animatedContents = []), (this.shapesContainer = createNS("g")), this.initElement(t, e, i), (this.prevViewData = []), (this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 }); } function HTextElement(t, e, i) { (this.textSpans = []), (this.textPaths = []), (this.currentBBox = { x: 999999, y: -999999, h: 0, w: 0 }), (this.renderType = "svg"), (this.isMasked = !1), this.initElement(t, e, i); } function HCameraElement(t, e, i) { this.initFrame(), this.initBaseData(t, e, i), this.initHierarchy(); var r = PropertyFactory.getProp; if ( ((this.pe = r(this, t.pe, 0, 0, this)), t.ks.p.s ? ((this.px = r(this, t.ks.p.x, 1, 0, this)), (this.py = r(this, t.ks.p.y, 1, 0, this)), (this.pz = r(this, t.ks.p.z, 1, 0, this))) : (this.p = r(this, t.ks.p, 1, 0, this)), t.ks.a && (this.a = r(this, t.ks.a, 1, 0, this)), t.ks.or.k.length && t.ks.or.k[0].to) ) { var s, a = t.ks.or.k.length; for (s = 0; s < a; s += 1) (t.ks.or.k[s].to = null), (t.ks.or.k[s].ti = null); } (this.or = r(this, t.ks.or, 1, degToRads, this)), (this.or.sh = !0), (this.rx = r(this, t.ks.rx, 0, degToRads, this)), (this.ry = r(this, t.ks.ry, 0, degToRads, this)), (this.rz = r(this, t.ks.rz, 0, degToRads, this)), (this.mat = new Matrix()), (this._prevMat = new Matrix()), (this._isFirstFrame = !0), (this.finalTransform = { mProp: this }); } function HImageElement(t, e, i) { (this.assetData = e.getAssetData(t.refId)), this.initElement(t, e, i); } function HybridRendererBase(t, e) { (this.animationItem = t), (this.layers = null), (this.renderedFrame = -1), (this.renderConfig = { className: (e && e.className) || "", imagePreserveAspectRatio: (e && e.imagePreserveAspectRatio) || "xMidYMid slice", hideOnTransparent: !(e && !1 === e.hideOnTransparent), filterSize: { width: (e && e.filterSize && e.filterSize.width) || "400%", height: (e && e.filterSize && e.filterSize.height) || "400%", x: (e && e.filterSize && e.filterSize.x) || "-100%", y: (e && e.filterSize && e.filterSize.y) || "-100%", }, }), (this.globalData = { _mdf: !1, frameNum: -1, renderConfig: this.renderConfig, }), (this.pendingElements = []), (this.elements = []), (this.threeDElements = []), (this.destroyed = !1), (this.camera = null), (this.supports3d = !0), (this.rendererType = "html"); } function HCompElement(t, e, i) { (this.layers = t.layers), (this.supports3d = !t.hasMask), (this.completeLayers = !1), (this.pendingElements = []), (this.elements = this.layers ? createSizedArray(this.layers.length) : []), this.initElement(t, e, i), (this.tm = t.tm ? PropertyFactory.getProp(this, t.tm, 0, e.frameRate, this) : { _placeholder: !0 }); } function HybridRenderer(t, e) { (this.animationItem = t), (this.layers = null), (this.renderedFrame = -1), (this.renderConfig = { className: (e && e.className) || "", imagePreserveAspectRatio: (e && e.imagePreserveAspectRatio) || "xMidYMid slice", hideOnTransparent: !(e && !1 === e.hideOnTransparent), filterSize: { width: (e && e.filterSize && e.filterSize.width) || "400%", height: (e && e.filterSize && e.filterSize.height) || "400%", x: (e && e.filterSize && e.filterSize.x) || "-100%", y: (e && e.filterSize && e.filterSize.y) || "-100%", }, runExpressions: !e || void 0 === e.runExpressions || e.runExpressions, }), (this.globalData = { _mdf: !1, frameNum: -1, renderConfig: this.renderConfig, }), (this.pendingElements = []), (this.elements = []), (this.threeDElements = []), (this.destroyed = !1), (this.camera = null), (this.supports3d = !0), (this.rendererType = "html"); } (CVBaseElement.prototype = { createElements: function () {}, initRendererElement: function () {}, createContainerElements: function () { if (this.data.tt >= 1) { this.buffers = []; var t = this.globalData.canvasContext, e = assetLoader.createCanvas(t.canvas.width, t.canvas.height); this.buffers.push(e); var i = assetLoader.createCanvas(t.canvas.width, t.canvas.height); this.buffers.push(i), this.data.tt >= 3 && !document._isProxy && assetLoader.loadLumaCanvas(); } (this.canvasContext = this.globalData.canvasContext), (this.transformCanvas = this.globalData.transformCanvas), (this.renderableEffectsManager = new CVEffects(this)), this.searchEffectTransforms(); }, createContent: function () {}, setBlendMode: function () { var t = this.globalData; if (t.blendMode !== this.data.bm) { t.blendMode = this.data.bm; var e = getBlendMode(this.data.bm); t.canvasContext.globalCompositeOperation = e; } }, createRenderableComponents: function () { (this.maskManager = new CVMaskElement(this.data, this)), (this.transformEffects = this.renderableEffectsManager.getEffects( effectTypes.TRANSFORM_EFFECT )); }, hideElement: function () { this.hidden || (this.isInRange && !this.isTransparent) || (this.hidden = !0); }, showElement: function () { this.isInRange && !this.isTransparent && ((this.hidden = !1), (this._isFirstFrame = !0), (this.maskManager._isFirstFrame = !0)); }, clearCanvas: function (t) { t.clearRect( this.transformCanvas.tx, this.transformCanvas.ty, this.transformCanvas.w * this.transformCanvas.sx, this.transformCanvas.h * this.transformCanvas.sy ); }, prepareLayer: function () { if (this.data.tt >= 1) { var t = this.buffers[0].getContext("2d"); this.clearCanvas(t), t.drawImage(this.canvasContext.canvas, 0, 0), (this.currentTransform = this.canvasContext.getTransform()), this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), this.clearCanvas(this.canvasContext), this.canvasContext.setTransform(this.currentTransform); } }, exitLayer: function () { if (this.data.tt >= 1) { var t = this.buffers[1], e = t.getContext("2d"); if ( (this.clearCanvas(e), e.drawImage(this.canvasContext.canvas, 0, 0), this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), this.clearCanvas(this.canvasContext), this.canvasContext.setTransform(this.currentTransform), this.comp .getElementById( "tp" in this.data ? this.data.tp : this.data.ind - 1 ) .renderFrame(!0), this.canvasContext.setTransform(1, 0, 0, 1, 0, 0), this.data.tt >= 3 && !document._isProxy) ) { var i = assetLoader.getLumaCanvas(this.canvasContext.canvas); i.getContext("2d").drawImage(this.canvasContext.canvas, 0, 0), this.clearCanvas(this.canvasContext), this.canvasContext.drawImage(i, 0, 0); } (this.canvasContext.globalCompositeOperation = operationsMap[this.data.tt]), this.canvasContext.drawImage(t, 0, 0), (this.canvasContext.globalCompositeOperation = "destination-over"), this.canvasContext.drawImage(this.buffers[0], 0, 0), this.canvasContext.setTransform(this.currentTransform), (this.canvasContext.globalCompositeOperation = "source-over"); } }, renderFrame: function (t) { if (!this.hidden && !this.data.hd && (1 !== this.data.td || t)) { this.renderTransform(), this.renderRenderable(), this.renderLocalTransform(), this.setBlendMode(); var e = 0 === this.data.ty; this.prepareLayer(), this.globalData.renderer.save(e), this.globalData.renderer.ctxTransform( this.finalTransform.localMat.props ), this.globalData.renderer.ctxOpacity( this.finalTransform.localOpacity ), this.renderInnerContent(), this.globalData.renderer.restore(e), this.exitLayer(), this.maskManager.hasMasks && this.globalData.renderer.restore(!0), this._isFirstFrame && (this._isFirstFrame = !1); } }, destroy: function () { (this.canvasContext = null), (this.data = null), (this.globalData = null), this.maskManager.destroy(); }, mHelper: new Matrix(), }), (CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement), (CVBaseElement.prototype.show = CVBaseElement.prototype.showElement), (CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated), extendPrototype( [ BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement, ], CVShapeElement ), (CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement), (CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: !1 }), (CVShapeElement.prototype.dashResetter = []), (CVShapeElement.prototype.createContent = function () { this.searchShapes( this.shapesData, this.itemsData, this.prevViewData, !0, [] ); }), (CVShapeElement.prototype.createStyleElement = function (t, e) { var i = { data: t, type: t.ty, preTransforms: this.transformsManager.addTransformSequence(e), transforms: [], elements: [], closed: !0 === t.hd, }, r = {}; if ( ("fl" === t.ty || "st" === t.ty ? ((r.c = PropertyFactory.getProp(this, t.c, 1, 255, this)), r.c.k || (i.co = "rgb(" + bmFloor(r.c.v[0]) + "," + bmFloor(r.c.v[1]) + "," + bmFloor(r.c.v[2]) + ")")) : ("gf" !== t.ty && "gs" !== t.ty) || ((r.s = PropertyFactory.getProp(this, t.s, 1, null, this)), (r.e = PropertyFactory.getProp(this, t.e, 1, null, this)), (r.h = PropertyFactory.getProp( this, t.h || { k: 0 }, 0, 0.01, this )), (r.a = PropertyFactory.getProp( this, t.a || { k: 0 }, 0, degToRads, this )), (r.g = new GradientProperty(this, t.g, this))), (r.o = PropertyFactory.getProp(this, t.o, 0, 0.01, this)), "st" === t.ty || "gs" === t.ty) ) { if ( ((i.lc = lineCapEnum[t.lc || 2]), (i.lj = lineJoinEnum[t.lj || 2]), 1 == t.lj && (i.ml = t.ml), (r.w = PropertyFactory.getProp(this, t.w, 0, null, this)), r.w.k || (i.wi = r.w.v), t.d) ) { var s = new DashProperty(this, t.d, "canvas", this); (r.d = s), r.d.k || ((i.da = r.d.dashArray), (i.do = r.d.dashoffset[0])); } } else i.r = 2 === t.r ? "evenodd" : "nonzero"; return this.stylesList.push(i), (r.style = i), r; }), (CVShapeElement.prototype.createGroupElement = function () { return { it: [], prevViewData: [] }; }), (CVShapeElement.prototype.createTransformElement = function (t) { return { transform: { opacity: 1, _opMdf: !1, key: this.transformsManager.getNewKey(), op: PropertyFactory.getProp(this, t.o, 0, 0.01, this), mProps: TransformPropertyFactory.getTransformProperty( this, t, this ), }, }; }), (CVShapeElement.prototype.createShapeElement = function (t) { var e = new CVShapeData( this, t, this.stylesList, this.transformsManager ); return this.shapes.push(e), this.addShapeToModifiers(e), e; }), (CVShapeElement.prototype.reloadShapes = function () { var t; this._isFirstFrame = !0; var e = this.itemsData.length; for (t = 0; t < e; t += 1) this.prevViewData[t] = this.itemsData[t]; for ( this.searchShapes( this.shapesData, this.itemsData, this.prevViewData, !0, [] ), e = this.dynamicProperties.length, t = 0; t < e; t += 1 ) this.dynamicProperties[t].getValue(); this.renderModifiers(), this.transformsManager.processSequences(this._isFirstFrame); }), (CVShapeElement.prototype.addTransformToStyleList = function (t) { var e, i = this.stylesList.length; for (e = 0; e < i; e += 1) this.stylesList[e].closed || this.stylesList[e].transforms.push(t); }), (CVShapeElement.prototype.removeTransformFromStyleList = function () { var t, e = this.stylesList.length; for (t = 0; t < e; t += 1) this.stylesList[t].closed || this.stylesList[t].transforms.pop(); }), (CVShapeElement.prototype.closeStyles = function (t) { var e, i = t.length; for (e = 0; e < i; e += 1) t[e].closed = !0; }), (CVShapeElement.prototype.searchShapes = function (t, e, i, r, s) { var a, n, o, h, l, p, f = t.length - 1, m = [], c = [], d = [].concat(s); for (a = f; a >= 0; a -= 1) { if ( ((h = this.searchProcessedElement(t[a])) ? (e[a] = i[h - 1]) : (t[a]._shouldRender = r), "fl" === t[a].ty || "st" === t[a].ty || "gf" === t[a].ty || "gs" === t[a].ty) ) h ? (e[a].style.closed = !1) : (e[a] = this.createStyleElement(t[a], d)), m.push(e[a].style); else if ("gr" === t[a].ty) { if (h) for (o = e[a].it.length, n = 0; n < o; n += 1) e[a].prevViewData[n] = e[a].it[n]; else e[a] = this.createGroupElement(t[a]); this.searchShapes(t[a].it, e[a].it, e[a].prevViewData, r, d); } else "tr" === t[a].ty ? (h || ((p = this.createTransformElement(t[a])), (e[a] = p)), d.push(e[a]), this.addTransformToStyleList(e[a])) : "sh" === t[a].ty || "rc" === t[a].ty || "el" === t[a].ty || "sr" === t[a].ty ? h || (e[a] = this.createShapeElement(t[a])) : "tm" === t[a].ty || "rd" === t[a].ty || "pb" === t[a].ty || "zz" === t[a].ty || "op" === t[a].ty ? (h ? ((l = e[a]).closed = !1) : ((l = ShapeModifiers.getModifier(t[a].ty)).init(this, t[a]), (e[a] = l), this.shapeModifiers.push(l)), c.push(l)) : "rp" === t[a].ty && (h ? ((l = e[a]).closed = !0) : ((l = ShapeModifiers.getModifier(t[a].ty)), (e[a] = l), l.init(this, t, a, e), this.shapeModifiers.push(l), (r = !1)), c.push(l)); this.addProcessedElement(t[a], a + 1); } for ( this.removeTransformFromStyleList(), this.closeStyles(m), f = c.length, a = 0; a < f; a += 1 ) c[a].closed = !0; }), (CVShapeElement.prototype.renderInnerContent = function () { (this.transformHelper.opacity = 1), (this.transformHelper._opMdf = !1), this.renderModifiers(), this.transformsManager.processSequences(this._isFirstFrame), this.renderShape( this.transformHelper, this.shapesData, this.itemsData, !0 ); }), (CVShapeElement.prototype.renderShapeTransform = function (t, e) { (t._opMdf || e.op._mdf || this._isFirstFrame) && ((e.opacity = t.opacity), (e.opacity *= e.op.v), (e._opMdf = !0)); }), (CVShapeElement.prototype.drawLayer = function () { var t, e, i, r, s, a, n, o, h, l = this.stylesList.length, p = this.globalData.renderer, f = this.globalData.canvasContext; for (t = 0; t < l; t += 1) if ( (("st" !== (o = (h = this.stylesList[t]).type) && "gs" !== o) || 0 !== h.wi) && h.data._shouldRender && 0 !== h.coOp && 0 !== this.globalData.currentGlobalAlpha ) { for ( p.save(), a = h.elements, "st" === o || "gs" === o ? (p.ctxStrokeStyle("st" === o ? h.co : h.grd), p.ctxLineWidth(h.wi), p.ctxLineCap(h.lc), p.ctxLineJoin(h.lj), p.ctxMiterLimit(h.ml || 0)) : p.ctxFillStyle("fl" === o ? h.co : h.grd), p.ctxOpacity(h.coOp), "st" !== o && "gs" !== o && f.beginPath(), p.ctxTransform(h.preTransforms.finalTransform.props), i = a.length, e = 0; e < i; e += 1 ) { for ( ("st" !== o && "gs" !== o) || (f.beginPath(), h.da && (f.setLineDash(h.da), (f.lineDashOffset = h.do))), s = (n = a[e].trNodes).length, r = 0; r < s; r += 1 ) "m" === n[r].t ? f.moveTo(n[r].p[0], n[r].p[1]) : "c" === n[r].t ? f.bezierCurveTo( n[r].pts[0], n[r].pts[1], n[r].pts[2], n[r].pts[3], n[r].pts[4], n[r].pts[5] ) : f.closePath(); ("st" !== o && "gs" !== o) || (p.ctxStroke(), h.da && f.setLineDash(this.dashResetter)); } "st" !== o && "gs" !== o && this.globalData.renderer.ctxFill(h.r), p.restore(); } }), (CVShapeElement.prototype.renderShape = function (t, e, i, r) { var s, a; for (a = t, s = e.length - 1; s >= 0; s -= 1) "tr" === e[s].ty ? ((a = i[s].transform), this.renderShapeTransform(t, a)) : "sh" === e[s].ty || "el" === e[s].ty || "rc" === e[s].ty || "sr" === e[s].ty ? this.renderPath(e[s], i[s]) : "fl" === e[s].ty ? this.renderFill(e[s], i[s], a) : "st" === e[s].ty ? this.renderStroke(e[s], i[s], a) : "gf" === e[s].ty || "gs" === e[s].ty ? this.renderGradientFill(e[s], i[s], a) : "gr" === e[s].ty ? this.renderShape(a, e[s].it, i[s].it) : e[s].ty; r && this.drawLayer(); }), (CVShapeElement.prototype.renderStyledShape = function (t, e) { if (this._isFirstFrame || e._mdf || t.transforms._mdf) { var i, r, s, a = t.trNodes, n = e.paths, o = n._length; a.length = 0; var h = t.transforms.finalTransform; for (s = 0; s < o; s += 1) { var l = n.shapes[s]; if (l && l.v) { for (r = l._length, i = 1; i < r; i += 1) 1 === i && a.push({ t: "m", p: h.applyToPointArray(l.v[0][0], l.v[0][1], 0), }), a.push({ t: "c", pts: h.applyToTriplePoints(l.o[i - 1], l.i[i], l.v[i]), }); 1 === r && a.push({ t: "m", p: h.applyToPointArray(l.v[0][0], l.v[0][1], 0), }), l.c && r && (a.push({ t: "c", pts: h.applyToTriplePoints(l.o[i - 1], l.i[0], l.v[0]), }), a.push({ t: "z" })); } } t.trNodes = a; } }), (CVShapeElement.prototype.renderPath = function (t, e) { if (!0 !== t.hd && t._shouldRender) { var i, r = e.styledShapes.length; for (i = 0; i < r; i += 1) this.renderStyledShape(e.styledShapes[i], e.sh); } }), (CVShapeElement.prototype.renderFill = function (t, e, i) { var r = e.style; (e.c._mdf || this._isFirstFrame) && (r.co = "rgb(" + bmFloor(e.c.v[0]) + "," + bmFloor(e.c.v[1]) + "," + bmFloor(e.c.v[2]) + ")"), (e.o._mdf || i._opMdf || this._isFirstFrame) && (r.coOp = e.o.v * i.opacity); }), (CVShapeElement.prototype.renderGradientFill = function (t, e, i) { var r, s = e.style; if ( !s.grd || e.g._mdf || e.s._mdf || e.e._mdf || (1 !== t.t && (e.h._mdf || e.a._mdf)) ) { var a, n = this.globalData.canvasContext, o = e.s.v, h = e.e.v; if (1 === t.t) r = n.createLinearGradient(o[0], o[1], h[0], h[1]); else { var l = Math.sqrt( Math.pow(o[0] - h[0], 2) + Math.pow(o[1] - h[1], 2) ), p = Math.atan2(h[1] - o[1], h[0] - o[0]), f = e.h.v; f >= 1 ? (f = 0.99) : f <= -1 && (f = -0.99); var m = l * f, c = Math.cos(p + e.a.v) * m + o[0], d = Math.sin(p + e.a.v) * m + o[1]; r = n.createRadialGradient(c, d, 0, o[0], o[1], l); } var u = t.g.p, y = e.g.c, g = 1; for (a = 0; a < u; a += 1) e.g._hasOpacity && e.g._collapsable && (g = e.g.o[2 * a + 1]), r.addColorStop( y[4 * a] / 100, "rgba(" + y[4 * a + 1] + "," + y[4 * a + 2] + "," + y[4 * a + 3] + "," + g + ")" ); s.grd = r; } s.coOp = e.o.v * i.opacity; }), (CVShapeElement.prototype.renderStroke = function (t, e, i) { var r = e.style, s = e.d; s && (s._mdf || this._isFirstFrame) && ((r.da = s.dashArray), (r.do = s.dashoffset[0])), (e.c._mdf || this._isFirstFrame) && (r.co = "rgb(" + bmFloor(e.c.v[0]) + "," + bmFloor(e.c.v[1]) + "," + bmFloor(e.c.v[2]) + ")"), (e.o._mdf || i._opMdf || this._isFirstFrame) && (r.coOp = e.o.v * i.opacity), (e.w._mdf || this._isFirstFrame) && (r.wi = e.w.v); }), (CVShapeElement.prototype.destroy = function () { (this.shapesData = null), (this.globalData = null), (this.canvasContext = null), (this.stylesList.length = 0), (this.itemsData.length = 0); }), extendPrototype( [ BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement, ], CVTextElement ), (CVTextElement.prototype.tHelper = createTag("canvas").getContext("2d")), (CVTextElement.prototype.buildNewText = function () { var t = this.textProperty.currentData; this.renderedLetters = createSizedArray(t.l ? t.l.length : 0); var e = !1; t.fc ? ((e = !0), (this.values.fill = this.buildColor(t.fc))) : (this.values.fill = "rgba(0,0,0,0)"), (this.fill = e); var i = !1; t.sc && ((i = !0), (this.values.stroke = this.buildColor(t.sc)), (this.values.sWidth = t.sw)); var r, s, a, n, o, h, l, p, f, m, c, d, u = this.globalData.fontManager.getFontByName(t.f), y = t.l, g = this.mHelper; (this.stroke = i), (this.values.fValue = t.finalSize + "px " + this.globalData.fontManager.getFontByName(t.f).fFamily), (s = t.finalText.length); var v = this.data.singleShape, b = 0.001 * t.tr * t.finalSize, x = 0, P = 0, E = !0, S = 0; for (r = 0; r < s; r += 1) { (n = ((a = this.globalData.fontManager.getCharData( t.finalText[r], u.fStyle, this.globalData.fontManager.getFontByName(t.f).fFamily )) && a.data) || {}), g.reset(), v && y[r].n && ((x = -b), (P += t.yOffset), (P += E ? 1 : 0), (E = !1)), (f = (l = n.shapes ? n.shapes[0].it : []).length), g.scale(t.finalSize / 100, t.finalSize / 100), v && this.applyTextPropertiesToMatrix(t, g, y[r].line, x, P), (c = createSizedArray(f - 1)); var C = 0; for (p = 0; p < f; p += 1) if ("sh" === l[p].ty) { for ( h = l[p].ks.k.i.length, m = l[p].ks.k, d = [], o = 1; o < h; o += 1 ) 1 === o && d.push( g.applyToX(m.v[0][0], m.v[0][1], 0), g.applyToY(m.v[0][0], m.v[0][1], 0) ), d.push( g.applyToX(m.o[o - 1][0], m.o[o - 1][1], 0), g.applyToY(m.o[o - 1][0], m.o[o - 1][1], 0), g.applyToX(m.i[o][0], m.i[o][1], 0), g.applyToY(m.i[o][0], m.i[o][1], 0), g.applyToX(m.v[o][0], m.v[o][1], 0), g.applyToY(m.v[o][0], m.v[o][1], 0) ); d.push( g.applyToX(m.o[o - 1][0], m.o[o - 1][1], 0), g.applyToY(m.o[o - 1][0], m.o[o - 1][1], 0), g.applyToX(m.i[0][0], m.i[0][1], 0), g.applyToY(m.i[0][0], m.i[0][1], 0), g.applyToX(m.v[0][0], m.v[0][1], 0), g.applyToY(m.v[0][0], m.v[0][1], 0) ), (c[C] = d), (C += 1); } v && ((x += y[r].l), (x += b)), this.textSpans[S] ? (this.textSpans[S].elem = c) : (this.textSpans[S] = { elem: c }), (S += 1); } }), (CVTextElement.prototype.renderInnerContent = function () { var t, e, i, r, s, a; this.validateText(), (this.canvasContext.font = this.values.fValue), this.globalData.renderer.ctxLineCap("butt"), this.globalData.renderer.ctxLineJoin("miter"), this.globalData.renderer.ctxMiterLimit(4), this.data.singleShape || this.textAnimator.getMeasures( this.textProperty.currentData, this.lettersChangedFlag ); var n, o = this.textAnimator.renderedLetters, h = this.textProperty.currentData.l; e = h.length; var l, p, f = null, m = null, c = null, d = this.globalData.renderer; for (t = 0; t < e; t += 1) if (!h[t].n) { if ( ((n = o[t]) && (d.save(), d.ctxTransform(n.p), d.ctxOpacity(n.o)), this.fill) ) { for ( n && n.fc ? f !== n.fc && (d.ctxFillStyle(n.fc), (f = n.fc)) : f !== this.values.fill && ((f = this.values.fill), d.ctxFillStyle(this.values.fill)), r = (l = this.textSpans[t].elem).length, this.globalData.canvasContext.beginPath(), i = 0; i < r; i += 1 ) for ( a = (p = l[i]).length, this.globalData.canvasContext.moveTo(p[0], p[1]), s = 2; s < a; s += 6 ) this.globalData.canvasContext.bezierCurveTo( p[s], p[s + 1], p[s + 2], p[s + 3], p[s + 4], p[s + 5] ); this.globalData.canvasContext.closePath(), d.ctxFill(); } if (this.stroke) { for ( n && n.sw ? c !== n.sw && ((c = n.sw), d.ctxLineWidth(n.sw)) : c !== this.values.sWidth && ((c = this.values.sWidth), d.ctxLineWidth(this.values.sWidth)), n && n.sc ? m !== n.sc && ((m = n.sc), d.ctxStrokeStyle(n.sc)) : m !== this.values.stroke && ((m = this.values.stroke), d.ctxStrokeStyle(this.values.stroke)), r = (l = this.textSpans[t].elem).length, this.globalData.canvasContext.beginPath(), i = 0; i < r; i += 1 ) for ( a = (p = l[i]).length, this.globalData.canvasContext.moveTo(p[0], p[1]), s = 2; s < a; s += 6 ) this.globalData.canvasContext.bezierCurveTo( p[s], p[s + 1], p[s + 2], p[s + 3], p[s + 4], p[s + 5] ); this.globalData.canvasContext.closePath(), d.ctxStroke(); } n && this.globalData.renderer.restore(); } }), extendPrototype( [ BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ], CVImageElement ), (CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement), (CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame), (CVImageElement.prototype.createContent = function () { if ( this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height) ) { var t = createTag("canvas"); (t.width = this.assetData.w), (t.height = this.assetData.h); var e, i, r = t.getContext("2d"), s = this.img.width, a = this.img.height, n = s / a, o = this.assetData.w / this.assetData.h, h = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio; (n > o && "xMidYMid slice" === h) || (n < o && "xMidYMid slice" !== h) ? (e = (i = a) * o) : (i = (e = s) / o), r.drawImage( this.img, (s - e) / 2, (a - i) / 2, e, i, 0, 0, this.assetData.w, this.assetData.h ), (this.img = t); } }), (CVImageElement.prototype.renderInnerContent = function () { this.canvasContext.drawImage(this.img, 0, 0); }), (CVImageElement.prototype.destroy = function () { this.img = null; }), extendPrototype( [ BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ], CVSolidElement ), (CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement), (CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame), (CVSolidElement.prototype.renderInnerContent = function () { this.globalData.renderer.ctxFillStyle(this.data.sc), this.globalData.renderer.ctxFillRect( 0, 0, this.data.sw, this.data.sh ); }), extendPrototype([BaseRenderer], CanvasRendererBase), (CanvasRendererBase.prototype.createShape = function (t) { return new CVShapeElement(t, this.globalData, this); }), (CanvasRendererBase.prototype.createText = function (t) { return new CVTextElement(t, this.globalData, this); }), (CanvasRendererBase.prototype.createImage = function (t) { return new CVImageElement(t, this.globalData, this); }), (CanvasRendererBase.prototype.createSolid = function (t) { return new CVSolidElement(t, this.globalData, this); }), (CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull), (CanvasRendererBase.prototype.ctxTransform = function (t) { (1 === t[0] && 0 === t[1] && 0 === t[4] && 1 === t[5] && 0 === t[12] && 0 === t[13]) || this.canvasContext.transform(t[0], t[1], t[4], t[5], t[12], t[13]); }), (CanvasRendererBase.prototype.ctxOpacity = function (t) { this.canvasContext.globalAlpha *= t < 0 ? 0 : t; }), (CanvasRendererBase.prototype.ctxFillStyle = function (t) { this.canvasContext.fillStyle = t; }), (CanvasRendererBase.prototype.ctxStrokeStyle = function (t) { this.canvasContext.strokeStyle = t; }), (CanvasRendererBase.prototype.ctxLineWidth = function (t) { this.canvasContext.lineWidth = t; }), (CanvasRendererBase.prototype.ctxLineCap = function (t) { this.canvasContext.lineCap = t; }), (CanvasRendererBase.prototype.ctxLineJoin = function (t) { this.canvasContext.lineJoin = t; }), (CanvasRendererBase.prototype.ctxMiterLimit = function (t) { this.canvasContext.miterLimit = t; }), (CanvasRendererBase.prototype.ctxFill = function (t) { this.canvasContext.fill(t); }), (CanvasRendererBase.prototype.ctxFillRect = function (t, e, i, r) { this.canvasContext.fillRect(t, e, i, r); }), (CanvasRendererBase.prototype.ctxStroke = function () { this.canvasContext.stroke(); }), (CanvasRendererBase.prototype.reset = function () { this.renderConfig.clearCanvas ? this.contextData.reset() : this.canvasContext.restore(); }), (CanvasRendererBase.prototype.save = function () { this.canvasContext.save(); }), (CanvasRendererBase.prototype.restore = function (t) { this.renderConfig.clearCanvas ? (t && (this.globalData.blendMode = "source-over"), this.contextData.restore(t)) : this.canvasContext.restore(); }), (CanvasRendererBase.prototype.configAnimation = function (t) { if (this.animationItem.wrapper) { this.animationItem.container = createTag("canvas"); var e = this.animationItem.container.style; (e.width = "100%"), (e.height = "100%"); var i = "0px 0px 0px"; (e.transformOrigin = i), (e.mozTransformOrigin = i), (e.webkitTransformOrigin = i), (e["-webkit-transform"] = i), (e.contentVisibility = this.renderConfig.contentVisibility), this.animationItem.wrapper.appendChild( this.animationItem.container ), (this.canvasContext = this.animationItem.container.getContext("2d")), this.renderConfig.className && this.animationItem.container.setAttribute( "class", this.renderConfig.className ), this.renderConfig.id && this.animationItem.container.setAttribute( "id", this.renderConfig.id ); } else this.canvasContext = this.renderConfig.context; this.contextData.setContext(this.canvasContext), (this.data = t), (this.layers = t.layers), (this.transformCanvas = { w: t.w, h: t.h, sx: 0, sy: 0, tx: 0, ty: 0, }), this.setupGlobalData(t, document.body), (this.globalData.canvasContext = this.canvasContext), (this.globalData.renderer = this), (this.globalData.isDashed = !1), (this.globalData.progressiveLoad = this.renderConfig.progressiveLoad), (this.globalData.transformCanvas = this.transformCanvas), (this.elements = createSizedArray(t.layers.length)), this.updateContainerSize(); }), (CanvasRendererBase.prototype.updateContainerSize = function (t, e) { var i, r, s, a; if ( (this.reset(), t ? ((i = t), (r = e), (this.canvasContext.canvas.width = i), (this.canvasContext.canvas.height = r)) : (this.animationItem.wrapper && this.animationItem.container ? ((i = this.animationItem.wrapper.offsetWidth), (r = this.animationItem.wrapper.offsetHeight)) : ((i = this.canvasContext.canvas.width), (r = this.canvasContext.canvas.height)), (this.canvasContext.canvas.width = i * this.renderConfig.dpr), (this.canvasContext.canvas.height = r * this.renderConfig.dpr)), -1 !== this.renderConfig.preserveAspectRatio.indexOf("meet") || -1 !== this.renderConfig.preserveAspectRatio.indexOf("slice")) ) { var n = this.renderConfig.preserveAspectRatio.split(" "), o = n[1] || "meet", h = n[0] || "xMidYMid", l = h.substr(0, 4), p = h.substr(4); (s = i / r), ((a = this.transformCanvas.w / this.transformCanvas.h) > s && "meet" === o) || (a < s && "slice" === o) ? ((this.transformCanvas.sx = i / (this.transformCanvas.w / this.renderConfig.dpr)), (this.transformCanvas.sy = i / (this.transformCanvas.w / this.renderConfig.dpr))) : ((this.transformCanvas.sx = r / (this.transformCanvas.h / this.renderConfig.dpr)), (this.transformCanvas.sy = r / (this.transformCanvas.h / this.renderConfig.dpr))), (this.transformCanvas.tx = "xMid" === l && ((a < s && "meet" === o) || (a > s && "slice" === o)) ? ((i - this.transformCanvas.w * (r / this.transformCanvas.h)) / 2) * this.renderConfig.dpr : "xMax" === l && ((a < s && "meet" === o) || (a > s && "slice" === o)) ? (i - this.transformCanvas.w * (r / this.transformCanvas.h)) * this.renderConfig.dpr : 0), (this.transformCanvas.ty = "YMid" === p && ((a > s && "meet" === o) || (a < s && "slice" === o)) ? ((r - this.transformCanvas.h * (i / this.transformCanvas.w)) / 2) * this.renderConfig.dpr : "YMax" === p && ((a > s && "meet" === o) || (a < s && "slice" === o)) ? (r - this.transformCanvas.h * (i / this.transformCanvas.w)) * this.renderConfig.dpr : 0); } else "none" === this.renderConfig.preserveAspectRatio ? ((this.transformCanvas.sx = i / (this.transformCanvas.w / this.renderConfig.dpr)), (this.transformCanvas.sy = r / (this.transformCanvas.h / this.renderConfig.dpr)), (this.transformCanvas.tx = 0), (this.transformCanvas.ty = 0)) : ((this.transformCanvas.sx = this.renderConfig.dpr), (this.transformCanvas.sy = this.renderConfig.dpr), (this.transformCanvas.tx = 0), (this.transformCanvas.ty = 0)); (this.transformCanvas.props = [ this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1, ]), this.ctxTransform(this.transformCanvas.props), this.canvasContext.beginPath(), this.canvasContext.rect( 0, 0, this.transformCanvas.w, this.transformCanvas.h ), this.canvasContext.closePath(), this.canvasContext.clip(), this.renderFrame(this.renderedFrame, !0); }), (CanvasRendererBase.prototype.destroy = function () { var t; for ( this.renderConfig.clearCanvas && this.animationItem.wrapper && (this.animationItem.wrapper.innerText = ""), t = (this.layers ? this.layers.length : 0) - 1; t >= 0; t -= 1 ) this.elements[t] && this.elements[t].destroy && this.elements[t].destroy(); (this.elements.length = 0), (this.globalData.canvasContext = null), (this.animationItem.container = null), (this.destroyed = !0); }), (CanvasRendererBase.prototype.renderFrame = function (t, e) { if ( (this.renderedFrame !== t || !0 !== this.renderConfig.clearCanvas || e) && !this.destroyed && -1 !== t ) { var i; (this.renderedFrame = t), (this.globalData.frameNum = t - this.animationItem._isFirstFrame), (this.globalData.frameId += 1), (this.globalData._mdf = !this.renderConfig.clearCanvas || e), (this.globalData.projectInterface.currentFrame = t); var r = this.layers.length; for ( this.completeLayers || this.checkLayers(t), i = r - 1; i >= 0; i -= 1 ) (this.completeLayers || this.elements[i]) && this.elements[i].prepareFrame(t - this.layers[i].st); if (this.globalData._mdf) { for ( !0 === this.renderConfig.clearCanvas ? this.canvasContext.clearRect( 0, 0, this.transformCanvas.w, this.transformCanvas.h ) : this.save(), i = r - 1; i >= 0; i -= 1 ) (this.completeLayers || this.elements[i]) && this.elements[i].renderFrame(); !0 !== this.renderConfig.clearCanvas && this.restore(); } } }), (CanvasRendererBase.prototype.buildItem = function (t) { var e = this.elements; if (!e[t] && 99 !== this.layers[t].ty) { var i = this.createItem(this.layers[t], this, this.globalData); (e[t] = i), i.initExpressions(); } }), (CanvasRendererBase.prototype.checkPendingElements = function () { for (; this.pendingElements.length; ) { this.pendingElements.pop().checkParenting(); } }), (CanvasRendererBase.prototype.hide = function () { this.animationItem.container.style.display = "none"; }), (CanvasRendererBase.prototype.show = function () { this.animationItem.container.style.display = "block"; }), (CVContextData.prototype.duplicate = function () { var t = 2 * this._length, e = 0; for (e = this._length; e < t; e += 1) this.stack[e] = new CanvasContext(); this._length = t; }), (CVContextData.prototype.reset = function () { (this.cArrPos = 0), this.cTr.reset(), (this.stack[this.cArrPos].opacity = 1); }), (CVContextData.prototype.restore = function (t) { this.cArrPos -= 1; var e, i = this.stack[this.cArrPos], r = i.transform, s = this.cTr.props; for (e = 0; e < 16; e += 1) s[e] = r[e]; if (t) { this.nativeContext.restore(); var a = this.stack[this.cArrPos + 1]; (this.appliedFillStyle = a.fillStyle), (this.appliedStrokeStyle = a.strokeStyle), (this.appliedLineWidth = a.lineWidth), (this.appliedLineCap = a.lineCap), (this.appliedLineJoin = a.lineJoin), (this.appliedMiterLimit = a.miterLimit); } this.nativeContext.setTransform(r[0], r[1], r[4], r[5], r[12], r[13]), (t || (-1 !== i.opacity && this.currentOpacity !== i.opacity)) && ((this.nativeContext.globalAlpha = i.opacity), (this.currentOpacity = i.opacity)), (this.currentFillStyle = i.fillStyle), (this.currentStrokeStyle = i.strokeStyle), (this.currentLineWidth = i.lineWidth), (this.currentLineCap = i.lineCap), (this.currentLineJoin = i.lineJoin), (this.currentMiterLimit = i.miterLimit); }), (CVContextData.prototype.save = function (t) { t && this.nativeContext.save(); var e = this.cTr.props; this._length <= this.cArrPos && this.duplicate(); var i, r = this.stack[this.cArrPos]; for (i = 0; i < 16; i += 1) r.transform[i] = e[i]; this.cArrPos += 1; var s = this.stack[this.cArrPos]; (s.opacity = r.opacity), (s.fillStyle = r.fillStyle), (s.strokeStyle = r.strokeStyle), (s.lineWidth = r.lineWidth), (s.lineCap = r.lineCap), (s.lineJoin = r.lineJoin), (s.miterLimit = r.miterLimit); }), (CVContextData.prototype.setOpacity = function (t) { this.stack[this.cArrPos].opacity = t; }), (CVContextData.prototype.setContext = function (t) { this.nativeContext = t; }), (CVContextData.prototype.fillStyle = function (t) { this.stack[this.cArrPos].fillStyle !== t && ((this.currentFillStyle = t), (this.stack[this.cArrPos].fillStyle = t)); }), (CVContextData.prototype.strokeStyle = function (t) { this.stack[this.cArrPos].strokeStyle !== t && ((this.currentStrokeStyle = t), (this.stack[this.cArrPos].strokeStyle = t)); }), (CVContextData.prototype.lineWidth = function (t) { this.stack[this.cArrPos].lineWidth !== t && ((this.currentLineWidth = t), (this.stack[this.cArrPos].lineWidth = t)); }), (CVContextData.prototype.lineCap = function (t) { this.stack[this.cArrPos].lineCap !== t && ((this.currentLineCap = t), (this.stack[this.cArrPos].lineCap = t)); }), (CVContextData.prototype.lineJoin = function (t) { this.stack[this.cArrPos].lineJoin !== t && ((this.currentLineJoin = t), (this.stack[this.cArrPos].lineJoin = t)); }), (CVContextData.prototype.miterLimit = function (t) { this.stack[this.cArrPos].miterLimit !== t && ((this.currentMiterLimit = t), (this.stack[this.cArrPos].miterLimit = t)); }), (CVContextData.prototype.transform = function (t) { this.transformMat.cloneFromProps(t); var e = this.cTr; this.transformMat.multiply(e), e.cloneFromProps(this.transformMat.props); var i = e.props; this.nativeContext.setTransform(i[0], i[1], i[4], i[5], i[12], i[13]); }), (CVContextData.prototype.opacity = function (t) { var e = this.stack[this.cArrPos].opacity; (e *= t < 0 ? 0 : t), this.stack[this.cArrPos].opacity !== e && (this.currentOpacity !== t && ((this.nativeContext.globalAlpha = t), (this.currentOpacity = t)), (this.stack[this.cArrPos].opacity = e)); }), (CVContextData.prototype.fill = function (t) { this.appliedFillStyle !== this.currentFillStyle && ((this.appliedFillStyle = this.currentFillStyle), (this.nativeContext.fillStyle = this.appliedFillStyle)), this.nativeContext.fill(t); }), (CVContextData.prototype.fillRect = function (t, e, i, r) { this.appliedFillStyle !== this.currentFillStyle && ((this.appliedFillStyle = this.currentFillStyle), (this.nativeContext.fillStyle = this.appliedFillStyle)), this.nativeContext.fillRect(t, e, i, r); }), (CVContextData.prototype.stroke = function () { this.appliedStrokeStyle !== this.currentStrokeStyle && ((this.appliedStrokeStyle = this.currentStrokeStyle), (this.nativeContext.strokeStyle = this.appliedStrokeStyle)), this.appliedLineWidth !== this.currentLineWidth && ((this.appliedLineWidth = this.currentLineWidth), (this.nativeContext.lineWidth = this.appliedLineWidth)), this.appliedLineCap !== this.currentLineCap && ((this.appliedLineCap = this.currentLineCap), (this.nativeContext.lineCap = this.appliedLineCap)), this.appliedLineJoin !== this.currentLineJoin && ((this.appliedLineJoin = this.currentLineJoin), (this.nativeContext.lineJoin = this.appliedLineJoin)), this.appliedMiterLimit !== this.currentMiterLimit && ((this.appliedMiterLimit = this.currentMiterLimit), (this.nativeContext.miterLimit = this.appliedMiterLimit)), this.nativeContext.stroke(); }), extendPrototype( [CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement ), (CVCompElement.prototype.renderInnerContent = function () { var t, e = this.canvasContext; for ( e.beginPath(), e.moveTo(0, 0), e.lineTo(this.data.w, 0), e.lineTo(this.data.w, this.data.h), e.lineTo(0, this.data.h), e.lineTo(0, 0), e.clip(), t = this.layers.length - 1; t >= 0; t -= 1 ) (this.completeLayers || this.elements[t]) && this.elements[t].renderFrame(); }), (CVCompElement.prototype.destroy = function () { var t; for (t = this.layers.length - 1; t >= 0; t -= 1) this.elements[t] && this.elements[t].destroy(); (this.layers = null), (this.elements = null); }), (CVCompElement.prototype.createComp = function (t) { return new CVCompElement(t, this.globalData, this); }), extendPrototype([CanvasRendererBase], CanvasRenderer), (CanvasRenderer.prototype.createComp = function (t) { return new CVCompElement(t, this.globalData, this); }), (HBaseElement.prototype = { checkBlendMode: function () {}, initRendererElement: function () { (this.baseElement = createTag(this.data.tg || "div")), this.data.hasMask ? ((this.svgElement = createNS("svg")), (this.layerElement = createNS("g")), (this.maskedElement = this.layerElement), this.svgElement.appendChild(this.layerElement), this.baseElement.appendChild(this.svgElement)) : (this.layerElement = this.baseElement), styleDiv(this.baseElement); }, createContainerElements: function () { (this.renderableEffectsManager = new CVEffects(this)), (this.transformedElement = this.baseElement), (this.maskedElement = this.layerElement), this.data.ln && this.layerElement.setAttribute("id", this.data.ln), this.data.cl && this.layerElement.setAttribute("class", this.data.cl), 0 !== this.data.bm && this.setBlendMode(); }, renderElement: function () { var t = this.transformedElement ? this.transformedElement.style : {}; if (this.finalTransform._matMdf) { var e = this.finalTransform.mat.toCSS(); (t.transform = e), (t.webkitTransform = e); } this.finalTransform._opMdf && (t.opacity = this.finalTransform.mProp.o.v); }, renderFrame: function () { this.data.hd || this.hidden || (this.renderTransform(), this.renderRenderable(), this.renderElement(), this.renderInnerContent(), this._isFirstFrame && (this._isFirstFrame = !1)); }, destroy: function () { (this.layerElement = null), (this.transformedElement = null), this.matteElement && (this.matteElement = null), this.maskManager && (this.maskManager.destroy(), (this.maskManager = null)); }, createRenderableComponents: function () { this.maskManager = new MaskElement(this.data, this, this.globalData); }, addEffects: function () {}, setMatte: function () {}, }), (HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement), (HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy), (HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting), extendPrototype( [ BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ], HSolidElement ), (HSolidElement.prototype.createContent = function () { var t; this.data.hasMask ? ((t = createNS("rect")).setAttribute("width", this.data.sw), t.setAttribute("height", this.data.sh), t.setAttribute("fill", this.data.sc), this.svgElement.setAttribute("width", this.data.sw), this.svgElement.setAttribute("height", this.data.sh)) : (((t = createTag("div")).style.width = this.data.sw + "px"), (t.style.height = this.data.sh + "px"), (t.style.backgroundColor = this.data.sc)), this.layerElement.appendChild(t); }), extendPrototype( [ BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement, ], HShapeElement ), (HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent), (HShapeElement.prototype.createContent = function () { var t; if (((this.baseElement.style.fontSize = 0), this.data.hasMask)) this.layerElement.appendChild(this.shapesContainer), (t = this.svgElement); else { t = createNS("svg"); var e = this.comp.data ? this.comp.data : this.globalData.compSize; t.setAttribute("width", e.w), t.setAttribute("height", e.h), t.appendChild(this.shapesContainer), this.layerElement.appendChild(t); } this.searchShapes( this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], !0 ), this.filterUniqueShapes(), (this.shapeCont = t); }), (HShapeElement.prototype.getTransformedPoint = function (t, e) { var i, r = t.length; for (i = 0; i < r; i += 1) e = t[i].mProps.v.applyToPointArray(e[0], e[1], 0); return e; }), (HShapeElement.prototype.calculateShapeBoundingBox = function (t, e) { var i, r, s, a, n, o = t.sh.v, h = t.transformers, l = o._length; if (!(l <= 1)) { for (i = 0; i < l - 1; i += 1) (r = this.getTransformedPoint(h, o.v[i])), (s = this.getTransformedPoint(h, o.o[i])), (a = this.getTransformedPoint(h, o.i[i + 1])), (n = this.getTransformedPoint(h, o.v[i + 1])), this.checkBounds(r, s, a, n, e); o.c && ((r = this.getTransformedPoint(h, o.v[i])), (s = this.getTransformedPoint(h, o.o[i])), (a = this.getTransformedPoint(h, o.i[0])), (n = this.getTransformedPoint(h, o.v[0])), this.checkBounds(r, s, a, n, e)); } }), (HShapeElement.prototype.checkBounds = function (t, e, i, r, s) { this.getBoundsOfCurve(t, e, i, r); var a = this.shapeBoundingBox; (s.x = bmMin(a.left, s.x)), (s.xMax = bmMax(a.right, s.xMax)), (s.y = bmMin(a.top, s.y)), (s.yMax = bmMax(a.bottom, s.yMax)); }), (HShapeElement.prototype.shapeBoundingBox = { left: 0, right: 0, top: 0, bottom: 0, }), (HShapeElement.prototype.tempBoundingBox = { x: 0, xMax: 0, y: 0, yMax: 0, width: 0, height: 0, }), (HShapeElement.prototype.getBoundsOfCurve = function (t, e, i, r) { for ( var s, a, n, o, h, l, p, f = [ [t[0], r[0]], [t[1], r[1]], ], m = 0; m < 2; ++m ) (a = 6 * t[m] - 12 * e[m] + 6 * i[m]), (s = -3 * t[m] + 9 * e[m] - 9 * i[m] + 3 * r[m]), (n = 3 * e[m] - 3 * t[m]), (a |= 0), (n |= 0), (0 === (s |= 0) && 0 === a) || (0 === s ? (o = -n / a) > 0 && o < 1 && f[m].push(this.calculateF(o, t, e, i, r, m)) : (h = a * a - 4 * n * s) >= 0 && ((l = (-a + bmSqrt(h)) / (2 * s)) > 0 && l < 1 && f[m].push(this.calculateF(l, t, e, i, r, m)), (p = (-a - bmSqrt(h)) / (2 * s)) > 0 && p < 1 && f[m].push(this.calculateF(p, t, e, i, r, m)))); (this.shapeBoundingBox.left = bmMin.apply(null, f[0])), (this.shapeBoundingBox.top = bmMin.apply(null, f[1])), (this.shapeBoundingBox.right = bmMax.apply(null, f[0])), (this.shapeBoundingBox.bottom = bmMax.apply(null, f[1])); }), (HShapeElement.prototype.calculateF = function (t, e, i, r, s, a) { return ( bmPow(1 - t, 3) * e[a] + 3 * bmPow(1 - t, 2) * t * i[a] + 3 * (1 - t) * bmPow(t, 2) * r[a] + bmPow(t, 3) * s[a] ); }), (HShapeElement.prototype.calculateBoundingBox = function (t, e) { var i, r = t.length; for (i = 0; i < r; i += 1) t[i] && t[i].sh ? this.calculateShapeBoundingBox(t[i], e) : t[i] && t[i].it ? this.calculateBoundingBox(t[i].it, e) : t[i] && t[i].style && t[i].w && this.expandStrokeBoundingBox(t[i].w, e); }), (HShapeElement.prototype.expandStrokeBoundingBox = function (t, e) { var i = 0; if (t.keyframes) { for (var r = 0; r < t.keyframes.length; r += 1) { var s = t.keyframes[r].s; s > i && (i = s); } i *= t.mult; } else i = t.v * t.mult; (e.x -= i), (e.xMax += i), (e.y -= i), (e.yMax += i); }), (HShapeElement.prototype.currentBoxContains = function (t) { return ( this.currentBBox.x <= t.x && this.currentBBox.y <= t.y && this.currentBBox.width + this.currentBBox.x >= t.x + t.width && this.currentBBox.height + this.currentBBox.y >= t.y + t.height ); }), (HShapeElement.prototype.renderInnerContent = function () { if ( (this._renderShapeFrame(), !this.hidden && (this._isFirstFrame || this._mdf)) ) { var t = this.tempBoundingBox, e = 999999; if ( ((t.x = e), (t.xMax = -e), (t.y = e), (t.yMax = -e), this.calculateBoundingBox(this.itemsData, t), (t.width = t.xMax < t.x ? 0 : t.xMax - t.x), (t.height = t.yMax < t.y ? 0 : t.yMax - t.y), this.currentBoxContains(t)) ) return; var i = !1; if ( (this.currentBBox.w !== t.width && ((this.currentBBox.w = t.width), this.shapeCont.setAttribute("width", t.width), (i = !0)), this.currentBBox.h !== t.height && ((this.currentBBox.h = t.height), this.shapeCont.setAttribute("height", t.height), (i = !0)), i || this.currentBBox.x !== t.x || this.currentBBox.y !== t.y) ) { (this.currentBBox.w = t.width), (this.currentBBox.h = t.height), (this.currentBBox.x = t.x), (this.currentBBox.y = t.y), this.shapeCont.setAttribute( "viewBox", this.currentBBox.x + " " + this.currentBBox.y + " " + this.currentBBox.w + " " + this.currentBBox.h ); var r = this.shapeCont.style, s = "translate(" + this.currentBBox.x + "px," + this.currentBBox.y + "px)"; (r.transform = s), (r.webkitTransform = s); } } }), extendPrototype( [ BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement, ], HTextElement ), (HTextElement.prototype.createContent = function () { if (((this.isMasked = this.checkMasks()), this.isMasked)) { (this.renderType = "svg"), (this.compW = this.comp.data.w), (this.compH = this.comp.data.h), this.svgElement.setAttribute("width", this.compW), this.svgElement.setAttribute("height", this.compH); var t = createNS("g"); this.maskedElement.appendChild(t), (this.innerElem = t); } else (this.renderType = "html"), (this.innerElem = this.layerElement); this.checkParenting(); }), (HTextElement.prototype.buildNewText = function () { var t = this.textProperty.currentData; this.renderedLetters = createSizedArray(t.l ? t.l.length : 0); var e = this.innerElem.style, i = t.fc ? this.buildColor(t.fc) : "rgba(0,0,0,0)"; (e.fill = i), (e.color = i), t.sc && ((e.stroke = this.buildColor(t.sc)), (e.strokeWidth = t.sw + "px")); var r, s, a = this.globalData.fontManager.getFontByName(t.f); if (!this.globalData.fontManager.chars) if ( ((e.fontSize = t.finalSize + "px"), (e.lineHeight = t.finalSize + "px"), a.fClass) ) this.innerElem.className = a.fClass; else { e.fontFamily = a.fFamily; var n = t.fWeight, o = t.fStyle; (e.fontStyle = o), (e.fontWeight = n); } var h, l, p, f = t.l; s = f.length; var m, c = this.mHelper, d = "", u = 0; for (r = 0; r < s; r += 1) { if ( (this.globalData.fontManager.chars ? (this.textPaths[u] ? (h = this.textPaths[u]) : ((h = createNS("path")).setAttribute( "stroke-linecap", lineCapEnum[1] ), h.setAttribute("stroke-linejoin", lineJoinEnum[2]), h.setAttribute("stroke-miterlimit", "4")), this.isMasked || (this.textSpans[u] ? (p = (l = this.textSpans[u]).children[0]) : (((l = createTag("div")).style.lineHeight = 0), (p = createNS("svg")).appendChild(h), styleDiv(l)))) : this.isMasked ? (h = this.textPaths[u] ? this.textPaths[u] : createNS("text")) : this.textSpans[u] ? ((l = this.textSpans[u]), (h = this.textPaths[u])) : (styleDiv((l = createTag("span"))), styleDiv((h = createTag("span"))), l.appendChild(h)), this.globalData.fontManager.chars) ) { var y, g = this.globalData.fontManager.getCharData( t.finalText[r], a.fStyle, this.globalData.fontManager.getFontByName(t.f).fFamily ); if ( ((y = g ? g.data : null), c.reset(), y && y.shapes && y.shapes.length && ((m = y.shapes[0].it), c.scale(t.finalSize / 100, t.finalSize / 100), (d = this.createPathShape(c, m)), h.setAttribute("d", d)), this.isMasked) ) this.innerElem.appendChild(h); else { if ((this.innerElem.appendChild(l), y && y.shapes)) { document.body.appendChild(p); var v = p.getBBox(); p.setAttribute("width", v.width + 2), p.setAttribute("height", v.height + 2), p.setAttribute( "viewBox", v.x - 1 + " " + (v.y - 1) + " " + (v.width + 2) + " " + (v.height + 2) ); var b = p.style, x = "translate(" + (v.x - 1) + "px," + (v.y - 1) + "px)"; (b.transform = x), (b.webkitTransform = x), (f[r].yOffset = v.y - 1); } else p.setAttribute("width", 1), p.setAttribute("height", 1); l.appendChild(p); } } else if ( ((h.textContent = f[r].val), h.setAttributeNS( "http://www.w3.org/XML/1998/namespace", "xml:space", "preserve" ), this.isMasked) ) this.innerElem.appendChild(h); else { this.innerElem.appendChild(l); var P = h.style, E = "translate3d(0," + -t.finalSize / 1.2 + "px,0)"; (P.transform = E), (P.webkitTransform = E); } this.isMasked ? (this.textSpans[u] = h) : (this.textSpans[u] = l), (this.textSpans[u].style.display = "block"), (this.textPaths[u] = h), (u += 1); } for (; u < this.textSpans.length; ) (this.textSpans[u].style.display = "none"), (u += 1); }), (HTextElement.prototype.renderInnerContent = function () { var t; if ((this.validateText(), this.data.singleShape)) { if (!this._isFirstFrame && !this.lettersChangedFlag) return; if (this.isMasked && this.finalTransform._matMdf) { this.svgElement.setAttribute( "viewBox", -this.finalTransform.mProp.p.v[0] + " " + -this.finalTransform.mProp.p.v[1] + " " + this.compW + " " + this.compH ), (t = this.svgElement.style); var e = "translate(" + -this.finalTransform.mProp.p.v[0] + "px," + -this.finalTransform.mProp.p.v[1] + "px)"; (t.transform = e), (t.webkitTransform = e); } } if ( (this.textAnimator.getMeasures( this.textProperty.currentData, this.lettersChangedFlag ), this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) ) { var i, r, s, a, n, o = 0, h = this.textAnimator.renderedLetters, l = this.textProperty.currentData.l; for (r = l.length, i = 0; i < r; i += 1) l[i].n ? (o += 1) : ((a = this.textSpans[i]), (n = this.textPaths[i]), (s = h[o]), (o += 1), s._mdf.m && (this.isMasked ? a.setAttribute("transform", s.m) : ((a.style.webkitTransform = s.m), (a.style.transform = s.m))), (a.style.opacity = s.o), s.sw && s._mdf.sw && n.setAttribute("stroke-width", s.sw), s.sc && s._mdf.sc && n.setAttribute("stroke", s.sc), s.fc && s._mdf.fc && (n.setAttribute("fill", s.fc), (n.style.color = s.fc))); if ( this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf) ) { var p = this.innerElem.getBBox(); this.currentBBox.w !== p.width && ((this.currentBBox.w = p.width), this.svgElement.setAttribute("width", p.width)), this.currentBBox.h !== p.height && ((this.currentBBox.h = p.height), this.svgElement.setAttribute("height", p.height)); if ( this.currentBBox.w !== p.width + 2 || this.currentBBox.h !== p.height + 2 || this.currentBBox.x !== p.x - 1 || this.currentBBox.y !== p.y - 1 ) { (this.currentBBox.w = p.width + 2), (this.currentBBox.h = p.height + 2), (this.currentBBox.x = p.x - 1), (this.currentBBox.y = p.y - 1), this.svgElement.setAttribute( "viewBox", this.currentBBox.x + " " + this.currentBBox.y + " " + this.currentBBox.w + " " + this.currentBBox.h ), (t = this.svgElement.style); var f = "translate(" + this.currentBBox.x + "px," + this.currentBBox.y + "px)"; (t.transform = f), (t.webkitTransform = f); } } } }), extendPrototype( [BaseElement, FrameElement, HierarchyElement], HCameraElement ), (HCameraElement.prototype.setup = function () { var t, e, i, r, s = this.comp.threeDElements.length; for (t = 0; t < s; t += 1) if ("3d" === (e = this.comp.threeDElements[t]).type) { (i = e.perspectiveElem.style), (r = e.container.style); var a = this.pe.v + "px", n = "0px 0px 0px", o = "matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"; (i.perspective = a), (i.webkitPerspective = a), (r.transformOrigin = n), (r.mozTransformOrigin = n), (r.webkitTransformOrigin = n), (i.transform = o), (i.webkitTransform = o); } }), (HCameraElement.prototype.createElements = function () {}), (HCameraElement.prototype.hide = function () {}), (HCameraElement.prototype.renderFrame = function () { var t, e, i = this._isFirstFrame; if (this.hierarchy) for (e = this.hierarchy.length, t = 0; t < e; t += 1) i = this.hierarchy[t].finalTransform.mProp._mdf || i; if ( i || this.pe._mdf || (this.p && this.p._mdf) || (this.px && (this.px._mdf || this.py._mdf || this.pz._mdf)) || this.rx._mdf || this.ry._mdf || this.rz._mdf || this.or._mdf || (this.a && this.a._mdf) ) { if ((this.mat.reset(), this.hierarchy)) for (t = e = this.hierarchy.length - 1; t >= 0; t -= 1) { var r = this.hierarchy[t].finalTransform.mProp; this.mat.translate(-r.p.v[0], -r.p.v[1], r.p.v[2]), this.mat .rotateX(-r.or.v[0]) .rotateY(-r.or.v[1]) .rotateZ(r.or.v[2]), this.mat.rotateX(-r.rx.v).rotateY(-r.ry.v).rotateZ(r.rz.v), this.mat.scale(1 / r.s.v[0], 1 / r.s.v[1], 1 / r.s.v[2]), this.mat.translate(r.a.v[0], r.a.v[1], r.a.v[2]); } if ( (this.p ? this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]) : this.mat.translate(-this.px.v, -this.py.v, this.pz.v), this.a) ) { var s; s = this.p ? [ this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2], ] : [ this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2], ]; var a = Math.sqrt( Math.pow(s[0], 2) + Math.pow(s[1], 2) + Math.pow(s[2], 2) ), n = [s[0] / a, s[1] / a, s[2] / a], o = Math.sqrt(n[2] * n[2] + n[0] * n[0]), h = Math.atan2(n[1], o), l = Math.atan2(n[0], -n[2]); this.mat.rotateY(l).rotateX(-h); } this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v), this.mat .rotateX(-this.or.v[0]) .rotateY(-this.or.v[1]) .rotateZ(this.or.v[2]), this.mat.translate( this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0 ), this.mat.translate(0, 0, this.pe.v); var p = !this._prevMat.equals(this.mat); if ((p || this.pe._mdf) && this.comp.threeDElements) { var f, m, c; for (e = this.comp.threeDElements.length, t = 0; t < e; t += 1) if ("3d" === (f = this.comp.threeDElements[t]).type) { if (p) { var d = this.mat.toCSS(); ((c = f.container.style).transform = d), (c.webkitTransform = d); } this.pe._mdf && (((m = f.perspectiveElem.style).perspective = this.pe.v + "px"), (m.webkitPerspective = this.pe.v + "px")); } this.mat.clone(this._prevMat); } } this._isFirstFrame = !1; }), (HCameraElement.prototype.prepareFrame = function (t) { this.prepareProperties(t, !0); }), (HCameraElement.prototype.destroy = function () {}), (HCameraElement.prototype.getBaseElement = function () { return null; }), extendPrototype( [ BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement, ], HImageElement ), (HImageElement.prototype.createContent = function () { var t = this.globalData.getAssetsPath(this.assetData), e = new Image(); this.data.hasMask ? ((this.imageElem = createNS("image")), this.imageElem.setAttribute("width", this.assetData.w + "px"), this.imageElem.setAttribute("height", this.assetData.h + "px"), this.imageElem.setAttributeNS( "http://www.w3.org/1999/xlink", "href", t ), this.layerElement.appendChild(this.imageElem), this.baseElement.setAttribute("width", this.assetData.w), this.baseElement.setAttribute("height", this.assetData.h)) : this.layerElement.appendChild(e), (e.crossOrigin = "anonymous"), (e.src = t), this.data.ln && this.baseElement.setAttribute("id", this.data.ln); }), extendPrototype([BaseRenderer], HybridRendererBase), (HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem), (HybridRendererBase.prototype.checkPendingElements = function () { for (; this.pendingElements.length; ) { this.pendingElements.pop().checkParenting(); } }), (HybridRendererBase.prototype.appendElementInPos = function (t, e) { var i = t.getBaseElement(); if (i) { var r = this.layers[e]; if (r.ddd && this.supports3d) this.addTo3dContainer(i, e); else if (this.threeDElements) this.addTo3dContainer(i, e); else { for (var s, a, n = 0; n < e; ) this.elements[n] && !0 !== this.elements[n] && this.elements[n].getBaseElement && ((a = this.elements[n]), (s = (this.layers[n].ddd ? this.getThreeDContainerByPos(n) : a.getBaseElement()) || s)), (n += 1); s ? (r.ddd && this.supports3d) || this.layerElement.insertBefore(i, s) : (r.ddd && this.supports3d) || this.layerElement.appendChild(i); } } }), (HybridRendererBase.prototype.createShape = function (t) { return this.supports3d ? new HShapeElement(t, this.globalData, this) : new SVGShapeElement(t, this.globalData, this); }), (HybridRendererBase.prototype.createText = function (t) { return this.supports3d ? new HTextElement(t, this.globalData, this) : new SVGTextLottieElement(t, this.globalData, this); }), (HybridRendererBase.prototype.createCamera = function (t) { return ( (this.camera = new HCameraElement(t, this.globalData, this)), this.camera ); }), (HybridRendererBase.prototype.createImage = function (t) { return this.supports3d ? new HImageElement(t, this.globalData, this) : new IImageElement(t, this.globalData, this); }), (HybridRendererBase.prototype.createSolid = function (t) { return this.supports3d ? new HSolidElement(t, this.globalData, this) : new ISolidElement(t, this.globalData, this); }), (HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull), (HybridRendererBase.prototype.getThreeDContainerByPos = function (t) { for (var e = 0, i = this.threeDElements.length; e < i; ) { if ( this.threeDElements[e].startPos <= t && this.threeDElements[e].endPos >= t ) return this.threeDElements[e].perspectiveElem; e += 1; } return null; }), (HybridRendererBase.prototype.createThreeDContainer = function (t, e) { var i, r, s = createTag("div"); styleDiv(s); var a = createTag("div"); if ((styleDiv(a), "3d" === e)) { ((i = s.style).width = this.globalData.compSize.w + "px"), (i.height = this.globalData.compSize.h + "px"); var n = "50% 50%"; (i.webkitTransformOrigin = n), (i.mozTransformOrigin = n), (i.transformOrigin = n); var o = "matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)"; ((r = a.style).transform = o), (r.webkitTransform = o); } s.appendChild(a); var h = { container: a, perspectiveElem: s, startPos: t, endPos: t, type: e, }; return this.threeDElements.push(h), h; }), (HybridRendererBase.prototype.build3dContainers = function () { var t, e, i = this.layers.length, r = ""; for (t = 0; t < i; t += 1) this.layers[t].ddd && 3 !== this.layers[t].ty ? ("3d" !== r && ((r = "3d"), (e = this.createThreeDContainer(t, "3d"))), (e.endPos = Math.max(e.endPos, t))) : ("2d" !== r && ((r = "2d"), (e = this.createThreeDContainer(t, "2d"))), (e.endPos = Math.max(e.endPos, t))); for (t = (i = this.threeDElements.length) - 1; t >= 0; t -= 1) this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem); }), (HybridRendererBase.prototype.addTo3dContainer = function (t, e) { for (var i = 0, r = this.threeDElements.length; i < r; ) { if (e <= this.threeDElements[i].endPos) { for (var s, a = this.threeDElements[i].startPos; a < e; ) this.elements[a] && this.elements[a].getBaseElement && (s = this.elements[a].getBaseElement()), (a += 1); s ? this.threeDElements[i].container.insertBefore(t, s) : this.threeDElements[i].container.appendChild(t); break; } i += 1; } }), (HybridRendererBase.prototype.configAnimation = function (t) { var e = createTag("div"), i = this.animationItem.wrapper, r = e.style; (r.width = t.w + "px"), (r.height = t.h + "px"), (this.resizerElem = e), styleDiv(e), (r.transformStyle = "flat"), (r.mozTransformStyle = "flat"), (r.webkitTransformStyle = "flat"), this.renderConfig.className && e.setAttribute("class", this.renderConfig.className), i.appendChild(e), (r.overflow = "hidden"); var s = createNS("svg"); s.setAttribute("width", "1"), s.setAttribute("height", "1"), styleDiv(s), this.resizerElem.appendChild(s); var a = createNS("defs"); s.appendChild(a), (this.data = t), this.setupGlobalData(t, s), (this.globalData.defs = a), (this.layers = t.layers), (this.layerElement = this.resizerElem), this.build3dContainers(), this.updateContainerSize(); }), (HybridRendererBase.prototype.destroy = function () { var t; this.animationItem.wrapper && (this.animationItem.wrapper.innerText = ""), (this.animationItem.container = null), (this.globalData.defs = null); var e = this.layers ? this.layers.length : 0; for (t = 0; t < e; t += 1) this.elements[t] && this.elements[t].destroy && this.elements[t].destroy(); (this.elements.length = 0), (this.destroyed = !0), (this.animationItem = null); }), (HybridRendererBase.prototype.updateContainerSize = function () { var t, e, i, r, s = this.animationItem.wrapper.offsetWidth, a = this.animationItem.wrapper.offsetHeight, n = s / a; this.globalData.compSize.w / this.globalData.compSize.h > n ? ((t = s / this.globalData.compSize.w), (e = s / this.globalData.compSize.w), (i = 0), (r = (a - this.globalData.compSize.h * (s / this.globalData.compSize.w)) / 2)) : ((t = a / this.globalData.compSize.h), (e = a / this.globalData.compSize.h), (i = (s - this.globalData.compSize.w * (a / this.globalData.compSize.h)) / 2), (r = 0)); var o = this.resizerElem.style; (o.webkitTransform = "matrix3d(" + t + ",0,0,0,0," + e + ",0,0,0,0,1,0," + i + "," + r + ",0,1)"), (o.transform = o.webkitTransform); }), (HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame), (HybridRendererBase.prototype.hide = function () { this.resizerElem.style.display = "none"; }), (HybridRendererBase.prototype.show = function () { this.resizerElem.style.display = "block"; }), (HybridRendererBase.prototype.initItems = function () { if ((this.buildAllItems(), this.camera)) this.camera.setup(); else { var t, e = this.globalData.compSize.w, i = this.globalData.compSize.h, r = this.threeDElements.length; for (t = 0; t < r; t += 1) { var s = this.threeDElements[t].perspectiveElem.style; (s.webkitPerspective = Math.sqrt(Math.pow(e, 2) + Math.pow(i, 2)) + "px"), (s.perspective = s.webkitPerspective); } } }), (HybridRendererBase.prototype.searchExtraCompositions = function (t) { var e, i = t.length, r = createTag("div"); for (e = 0; e < i; e += 1) if (t[e].xt) { var s = this.createComp(t[e], r, this.globalData.comp, null); s.initExpressions(), this.globalData.projectInterface.registerComposition(s); } }), extendPrototype( [HybridRendererBase, ICompElement, HBaseElement], HCompElement ), (HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements), (HCompElement.prototype.createContainerElements = function () { this._createBaseContainerElements(), this.data.hasMask ? (this.svgElement.setAttribute("width", this.data.w), this.svgElement.setAttribute("height", this.data.h), (this.transformedElement = this.baseElement)) : (this.transformedElement = this.layerElement); }), (HCompElement.prototype.addTo3dContainer = function (t, e) { for (var i, r = 0; r < e; ) this.elements[r] && this.elements[r].getBaseElement && (i = this.elements[r].getBaseElement()), (r += 1); i ? this.layerElement.insertBefore(t, i) : this.layerElement.appendChild(t); }), (HCompElement.prototype.createComp = function (t) { return this.supports3d ? new HCompElement(t, this.globalData, this) : new SVGCompElement(t, this.globalData, this); }), extendPrototype([HybridRendererBase], HybridRenderer), (HybridRenderer.prototype.createComp = function (t) { return this.supports3d ? new HCompElement(t, this.globalData, this) : new SVGCompElement(t, this.globalData, this); }); var CompExpressionInterface = function (t) { function e(e) { for (var i = 0, r = t.layers.length; i < r; ) { if (t.layers[i].nm === e || t.layers[i].ind === e) return t.elements[i].layerInterface; i += 1; } return null; } return ( Object.defineProperty(e, "_name", { value: t.data.nm }), (e.layer = e), (e.pixelAspect = 1), (e.height = t.data.h || t.globalData.compSize.h), (e.width = t.data.w || t.globalData.compSize.w), (e.pixelAspect = 1), (e.frameDuration = 1 / t.globalData.frameRate), (e.displayStartTime = 0), (e.numLayers = t.layers.length), e ); }; function _typeof$2(t) { return ( (_typeof$2 = "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; }), _typeof$2(t) ); } function seedRandom(t, e) { var i, r = this, s = 256, a = e.pow(s, 6), n = e.pow(2, 52), o = 2 * n, h = 255; function l(t) { var e, i = t.length, r = this, a = 0, n = (r.i = r.j = 0), o = (r.S = []); for (i || (t = [i++]); a < s; ) o[a] = a++; for (a = 0; a < s; a++) (o[a] = o[(n = h & (n + t[a % i] + (e = o[a])))]), (o[n] = e); r.g = function (t) { for (var e, i = 0, a = r.i, n = r.j, o = r.S; t--; ) (e = o[(a = h & (a + 1))]), (i = i * s + o[h & ((o[a] = o[(n = h & (n + e))]) + (o[n] = e))]); return (r.i = a), (r.j = n), i; }; } function p(t, e) { return (e.i = t.i), (e.j = t.j), (e.S = t.S.slice()), e; } function f(t, e) { var i, r = [], s = _typeof$2(t); if (e && "object" == s) for (i in t) try { r.push(f(t[i], e - 1)); } catch (t) {} return r.length ? r : "string" == s ? t : t + "\0"; } function m(t, e) { for (var i, r = t + "", s = 0; s < r.length; ) e[h & s] = h & ((i ^= 19 * e[h & s]) + r.charCodeAt(s++)); return c(e); } function c(t) { return String.fromCharCode.apply(0, t); } (e.seedrandom = function (h, d, u) { var y = [], g = m( f( (d = !0 === d ? { entropy: !0 } : d || {}).entropy ? [h, c(t)] : null === h ? (function () { try { i; var e = new Uint8Array(s); return (r.crypto || r.msCrypto).getRandomValues(e), c(e); } catch (e) { var a = r.navigator, n = a && a.plugins; return [+new Date(), r, n, r.screen, c(t)]; } })() : h, 3 ), y ), v = new l(y), b = function () { for (var t = v.g(6), e = a, i = 0; t < n; ) (t = (t + i) * s), (e *= s), (i = v.g(1)); for (; t >= o; ) (t /= 2), (e /= 2), (i >>>= 1); return (t + i) / e; }; return ( (b.int32 = function () { return 0 | v.g(4); }), (b.quick = function () { return v.g(4) / 4294967296; }), (b.double = b), m(c(v.S), t), ( d.pass || u || function (t, i, r, s) { return ( s && (s.S && p(s, v), (t.state = function () { return p(v, {}); })), r ? ((e.random = t), i) : t ); } )(b, g, "global" in d ? d.global : this == e, d.state) ); }), m(e.random(), t); } function initialize$2(t) { seedRandom([], t); } var propTypes = { SHAPE: "shape" }; function _typeof$1(t) { return ( (_typeof$1 = "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; }), _typeof$1(t) ); } var ExpressionManager = (function () { var ob = {}, Math = BMMath, window = null, document = null, XMLHttpRequest = null, fetch = null, frames = null, _lottieGlobal = {}; function resetFrame() { _lottieGlobal = {}; } function $bm_isInstanceOfArray(t) { return t.constructor === Array || t.constructor === Float32Array; } function isNumerable(t, e) { return ( "number" === t || e instanceof Number || "boolean" === t || "string" === t ); } function $bm_neg(t) { var e = _typeof$1(t); if ("number" === e || t instanceof Number || "boolean" === e) return -t; if ($bm_isInstanceOfArray(t)) { var i, r = t.length, s = []; for (i = 0; i < r; i += 1) s[i] = -t[i]; return s; } return t.propType ? t.v : -t; } initialize$2(BMMath); var easeInBez = BezierFactory.getBezierEasing( 0.333, 0, 0.833, 0.833, "easeIn" ).get, easeOutBez = BezierFactory.getBezierEasing( 0.167, 0.167, 0.667, 1, "easeOut" ).get, easeInOutBez = BezierFactory.getBezierEasing( 0.33, 0, 0.667, 1, "easeInOut" ).get; function sum(t, e) { var i = _typeof$1(t), r = _typeof$1(e); if ( (isNumerable(i, t) && isNumerable(r, e)) || "string" === i || "string" === r ) return t + e; if ($bm_isInstanceOfArray(t) && isNumerable(r, e)) return ((t = t.slice(0))[0] += e), t; if (isNumerable(i, t) && $bm_isInstanceOfArray(e)) return ((e = e.slice(0))[0] = t + e[0]), e; if ($bm_isInstanceOfArray(t) && $bm_isInstanceOfArray(e)) { for ( var s = 0, a = t.length, n = e.length, o = []; s < a || s < n; ) ("number" == typeof t[s] || t[s] instanceof Number) && ("number" == typeof e[s] || e[s] instanceof Number) ? (o[s] = t[s] + e[s]) : (o[s] = void 0 === e[s] ? t[s] : t[s] || e[s]), (s += 1); return o; } return 0; } var add = sum; function sub(t, e) { var i = _typeof$1(t), r = _typeof$1(e); if (isNumerable(i, t) && isNumerable(r, e)) return ( "string" === i && (t = parseInt(t, 10)), "string" === r && (e = parseInt(e, 10)), t - e ); if ($bm_isInstanceOfArray(t) && isNumerable(r, e)) return ((t = t.slice(0))[0] -= e), t; if (isNumerable(i, t) && $bm_isInstanceOfArray(e)) return ((e = e.slice(0))[0] = t - e[0]), e; if ($bm_isInstanceOfArray(t) && $bm_isInstanceOfArray(e)) { for ( var s = 0, a = t.length, n = e.length, o = []; s < a || s < n; ) ("number" == typeof t[s] || t[s] instanceof Number) && ("number" == typeof e[s] || e[s] instanceof Number) ? (o[s] = t[s] - e[s]) : (o[s] = void 0 === e[s] ? t[s] : t[s] || e[s]), (s += 1); return o; } return 0; } function mul(t, e) { var i, r, s, a = _typeof$1(t), n = _typeof$1(e); if (isNumerable(a, t) && isNumerable(n, e)) return t * e; if ($bm_isInstanceOfArray(t) && isNumerable(n, e)) { for ( s = t.length, i = createTypedArray("float32", s), r = 0; r < s; r += 1 ) i[r] = t[r] * e; return i; } if (isNumerable(a, t) && $bm_isInstanceOfArray(e)) { for ( s = e.length, i = createTypedArray("float32", s), r = 0; r < s; r += 1 ) i[r] = t * e[r]; return i; } return 0; } function div(t, e) { var i, r, s, a = _typeof$1(t), n = _typeof$1(e); if (isNumerable(a, t) && isNumerable(n, e)) return t / e; if ($bm_isInstanceOfArray(t) && isNumerable(n, e)) { for ( s = t.length, i = createTypedArray("float32", s), r = 0; r < s; r += 1 ) i[r] = t[r] / e; return i; } if (isNumerable(a, t) && $bm_isInstanceOfArray(e)) { for ( s = e.length, i = createTypedArray("float32", s), r = 0; r < s; r += 1 ) i[r] = t / e[r]; return i; } return 0; } function mod(t, e) { return ( "string" == typeof t && (t = parseInt(t, 10)), "string" == typeof e && (e = parseInt(e, 10)), t % e ); } var $bm_sum = sum, $bm_sub = sub, $bm_mul = mul, $bm_div = div, $bm_mod = mod; function clamp(t, e, i) { if (e > i) { var r = i; (i = e), (e = r); } return Math.min(Math.max(t, e), i); } function radiansToDegrees(t) { return t / degToRads; } var radians_to_degrees = radiansToDegrees; function degreesToRadians(t) { return t * degToRads; } var degrees_to_radians = radiansToDegrees, helperLengthArray = [0, 0, 0, 0, 0, 0]; function length(t, e) { if ("number" == typeof t || t instanceof Number) return (e = e || 0), Math.abs(t - e); var i; e || (e = helperLengthArray); var r = Math.min(t.length, e.length), s = 0; for (i = 0; i < r; i += 1) s += Math.pow(e[i] - t[i], 2); return Math.sqrt(s); } function normalize(t) { return div(t, length(t)); } function rgbToHsl(t) { var e, i, r = t[0], s = t[1], a = t[2], n = Math.max(r, s, a), o = Math.min(r, s, a), h = (n + o) / 2; if (n === o) (e = 0), (i = 0); else { var l = n - o; switch (((i = h > 0.5 ? l / (2 - n - o) : l / (n + o)), n)) { case r: e = (s - a) / l + (s < a ? 6 : 0); break; case s: e = (a - r) / l + 2; break; case a: e = (r - s) / l + 4; } e /= 6; } return [e, i, h, t[3]]; } function hue2rgb(t, e, i) { return ( i < 0 && (i += 1), i > 1 && (i -= 1), i < 1 / 6 ? t + 6 * (e - t) * i : i < 0.5 ? e : i < 2 / 3 ? t + (e - t) * (2 / 3 - i) * 6 : t ); } function hslToRgb(t) { var e, i, r, s = t[0], a = t[1], n = t[2]; if (0 === a) (e = n), (r = n), (i = n); else { var o = n < 0.5 ? n * (1 + a) : n + a - n * a, h = 2 * n - o; (e = hue2rgb(h, o, s + 1 / 3)), (i = hue2rgb(h, o, s)), (r = hue2rgb(h, o, s - 1 / 3)); } return [e, i, r, t[3]]; } function linear(t, e, i, r, s) { if ( ((void 0 !== r && void 0 !== s) || ((r = e), (s = i), (e = 0), (i = 1)), i < e) ) { var a = i; (i = e), (e = a); } if (t <= e) return r; if (t >= i) return s; var n, o = i === e ? 0 : (t - e) / (i - e); if (!r.length) return r + (s - r) * o; var h = r.length, l = createTypedArray("float32", h); for (n = 0; n < h; n += 1) l[n] = r[n] + (s[n] - r[n]) * o; return l; } function random(t, e) { if ( (void 0 === e && (void 0 === t ? ((t = 0), (e = 1)) : ((e = t), (t = void 0))), e.length) ) { var i, r = e.length; t || (t = createTypedArray("float32", r)); var s = createTypedArray("float32", r), a = BMMath.random(); for (i = 0; i < r; i += 1) s[i] = t[i] + a * (e[i] - t[i]); return s; } return void 0 === t && (t = 0), t + BMMath.random() * (e - t); } function createPath(t, e, i, r) { var s, a = t.length, n = shapePool.newElement(); n.setPathData(!!r, a); var o, h, l = [0, 0]; for (s = 0; s < a; s += 1) (o = e && e[s] ? e[s] : l), (h = i && i[s] ? i[s] : l), n.setTripleAt( t[s][0], t[s][1], h[0] + t[s][0], h[1] + t[s][1], o[0] + t[s][0], o[1] + t[s][1], s, !0 ); return n; } function initiateExpression(elem, data, property) { function noOp(t) { return t; } if (!elem.globalData.renderConfig.runExpressions) return noOp; var val = data.x, needsVelocity = /velocity(?![\w\d])/.test(val), _needsRandom = -1 !== val.indexOf("random"), elemType = elem.data.ty, transform, $bm_transform, content, effect, thisProperty = property; (thisProperty.valueAtTime = thisProperty.getValueAtTime), Object.defineProperty(thisProperty, "value", { get: function () { return thisProperty.v; }, }), (elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate), (elem.comp.displayStartTime = 0); var inPoint = elem.data.ip / elem.comp.globalData.frameRate, outPoint = elem.data.op / elem.comp.globalData.frameRate, width = elem.data.sw ? elem.data.sw : 0, height = elem.data.sh ? elem.data.sh : 0, name = elem.data.nm, loopIn, loop_in, loopOut, loop_out, smooth, toWorld, fromWorld, fromComp, toComp, fromCompToSurface, position, rotation, anchorPoint, scale, thisLayer, thisComp, mask, valueAtTime, velocityAtTime, scoped_bm_rt, expression_function = eval( "[function _expression_function(){" + val + ";scoped_bm_rt=$bm_rt}]" )[0], numKeys = property.kf ? data.k.length : 0, active = !this.data || !0 !== this.data.hd, wiggle = function (t, e) { var i, r, s = this.pv.length ? this.pv.length : 1, a = createTypedArray("float32", s); var n = Math.floor(5 * time); for (i = 0, r = 0; i < n; ) { for (r = 0; r < s; r += 1) a[r] += -e + 2 * e * BMMath.random(); i += 1; } var o = 5 * time, h = o - Math.floor(o), l = createTypedArray("float32", s); if (s > 1) { for (r = 0; r < s; r += 1) l[r] = this.pv[r] + a[r] + (-e + 2 * e * BMMath.random()) * h; return l; } return this.pv + a[0] + (-e + 2 * e * BMMath.random()) * h; }.bind(this); function loopInDuration(t, e) { return loopIn(t, e, !0); } function loopOutDuration(t, e) { return loopOut(t, e, !0); } thisProperty.loopIn && ((loopIn = thisProperty.loopIn.bind(thisProperty)), (loop_in = loopIn)), thisProperty.loopOut && ((loopOut = thisProperty.loopOut.bind(thisProperty)), (loop_out = loopOut)), thisProperty.smooth && (smooth = thisProperty.smooth.bind(thisProperty)), this.getValueAtTime && (valueAtTime = this.getValueAtTime.bind(this)), this.getVelocityAtTime && (velocityAtTime = this.getVelocityAtTime.bind(this)); var comp = elem.comp.globalData.projectInterface.bind( elem.comp.globalData.projectInterface ), time, velocity, value, text, textIndex, textTotal, selectorValue; function lookAt(t, e) { var i = [e[0] - t[0], e[1] - t[1], e[2] - t[2]], r = Math.atan2(i[0], Math.sqrt(i[1] * i[1] + i[2] * i[2])) / degToRads; return [-Math.atan2(i[1], i[2]) / degToRads, r, 0]; } function easeOut(t, e, i, r, s) { return applyEase(easeOutBez, t, e, i, r, s); } function easeIn(t, e, i, r, s) { return applyEase(easeInBez, t, e, i, r, s); } function ease(t, e, i, r, s) { return applyEase(easeInOutBez, t, e, i, r, s); } function applyEase(t, e, i, r, s, a) { void 0 === s ? ((s = i), (a = r)) : (e = (e - i) / (r - i)), e > 1 ? (e = 1) : e < 0 && (e = 0); var n = t(e); if ($bm_isInstanceOfArray(s)) { var o, h = s.length, l = createTypedArray("float32", h); for (o = 0; o < h; o += 1) l[o] = (a[o] - s[o]) * n + s[o]; return l; } return (a - s) * n + s; } function nearestKey(t) { var e, i, r, s = data.k.length; if (data.k.length && "number" != typeof data.k[0]) if ( ((i = -1), (t *= elem.comp.globalData.frameRate) < data.k[0].t) ) (i = 1), (r = data.k[0].t); else { for (e = 0; e < s - 1; e += 1) { if (t === data.k[e].t) { (i = e + 1), (r = data.k[e].t); break; } if (t > data.k[e].t && t < data.k[e + 1].t) { t - data.k[e].t > data.k[e + 1].t - t ? ((i = e + 2), (r = data.k[e + 1].t)) : ((i = e + 1), (r = data.k[e].t)); break; } } -1 === i && ((i = e + 1), (r = data.k[e].t)); } else (i = 0), (r = 0); var a = {}; return ( (a.index = i), (a.time = r / elem.comp.globalData.frameRate), a ); } function key(t) { var e, i, r; if (!data.k.length || "number" == typeof data.k[0]) throw new Error("The property has no keyframe at index " + t); (t -= 1), (e = { time: data.k[t].t / elem.comp.globalData.frameRate, value: [], }); var s = Object.prototype.hasOwnProperty.call(data.k[t], "s") ? data.k[t].s : data.k[t - 1].e; for (r = s.length, i = 0; i < r; i += 1) (e[i] = s[i]), (e.value[i] = s[i]); return e; } function framesToTime(t, e) { return e || (e = elem.comp.globalData.frameRate), t / e; } function timeToFrames(t, e) { return ( t || 0 === t || (t = time), e || (e = elem.comp.globalData.frameRate), t * e ); } function seedRandom(t) { BMMath.seedrandom(randSeed + t); } function sourceRectAtTime() { return elem.sourceRectAtTime(); } function substring(t, e) { return "string" == typeof value ? void 0 === e ? value.substring(t) : value.substring(t, e) : ""; } function substr(t, e) { return "string" == typeof value ? void 0 === e ? value.substr(t) : value.substr(t, e) : ""; } function posterizeTime(t) { (time = 0 === t ? 0 : Math.floor(time * t) / t), (value = valueAtTime(time)); } var index = elem.data.ind, hasParent = !(!elem.hierarchy || !elem.hierarchy.length), parent, randSeed = Math.floor(1e6 * Math.random()), globalData = elem.globalData; function executeExpression(t) { return ( (value = t), this.frameExpressionId === elem.globalData.frameId && "textSelector" !== this.propType ? value : ("textSelector" === this.propType && ((textIndex = this.textIndex), (textTotal = this.textTotal), (selectorValue = this.selectorValue)), thisLayer || ((text = elem.layerInterface.text), (thisLayer = elem.layerInterface), (thisComp = elem.comp.compInterface), (toWorld = thisLayer.toWorld.bind(thisLayer)), (fromWorld = thisLayer.fromWorld.bind(thisLayer)), (fromComp = thisLayer.fromComp.bind(thisLayer)), (toComp = thisLayer.toComp.bind(thisLayer)), (mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null), (fromCompToSurface = fromComp)), transform || ((transform = elem.layerInterface("ADBE Transform Group")), ($bm_transform = transform), transform && (anchorPoint = transform.anchorPoint)), 4 !== elemType || content || (content = thisLayer("ADBE Root Vectors Group")), effect || (effect = thisLayer(4)), (hasParent = !(!elem.hierarchy || !elem.hierarchy.length)) && !parent && (parent = elem.hierarchy[0].layerInterface), (time = this.comp.renderedFrame / this.comp.globalData.frameRate), _needsRandom && seedRandom(randSeed + time), needsVelocity && (velocity = velocityAtTime(time)), expression_function(), (this.frameExpressionId = elem.globalData.frameId), (scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE ? scoped_bm_rt.v : scoped_bm_rt)) ); } return ( (executeExpression.__preventDeadCodeRemoval = [ $bm_transform, anchorPoint, time, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData, ]), executeExpression ); } return ( (ob.initiateExpression = initiateExpression), (ob.__preventDeadCodeRemoval = [ window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath, _lottieGlobal, ]), (ob.resetFrame = resetFrame), ob ); })(), Expressions = (function () { var t = {}; return ( (t.initExpressions = function (t) { var e = 0, i = []; (t.renderer.compInterface = CompExpressionInterface(t.renderer)), t.renderer.globalData.projectInterface.registerComposition( t.renderer ), (t.renderer.globalData.pushExpression = function () { e += 1; }), (t.renderer.globalData.popExpression = function () { 0 == (e -= 1) && (function () { var t, e = i.length; for (t = 0; t < e; t += 1) i[t].release(); i.length = 0; })(); }), (t.renderer.globalData.registerExpressionProperty = function (t) { -1 === i.indexOf(t) && i.push(t); }); }), (t.resetFrame = ExpressionManager.resetFrame), t ); })(), MaskManagerInterface = (function () { function t(t, e) { (this._mask = t), (this._data = e); } Object.defineProperty(t.prototype, "maskPath", { get: function () { return ( this._mask.prop.k && this._mask.prop.getValue(), this._mask.prop ); }, }), Object.defineProperty(t.prototype, "maskOpacity", { get: function () { return ( this._mask.op.k && this._mask.op.getValue(), 100 * this._mask.op.v ); }, }); return function (e) { var i, r = createSizedArray(e.viewData.length), s = e.viewData.length; for (i = 0; i < s; i += 1) r[i] = new t(e.viewData[i], e.masksProperties[i]); return function (t) { for (i = 0; i < s; ) { if (e.masksProperties[i].nm === t) return r[i]; i += 1; } return null; }; }; })(), ExpressionPropertyInterface = (function () { var t = { pv: 0, v: 0, mult: 1 }, e = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 }; function i(t, e, i) { Object.defineProperty(t, "velocity", { get: function () { return e.getVelocityAtTime(e.comp.currentFrame); }, }), (t.numKeys = e.keyframes ? e.keyframes.length : 0), (t.key = function (r) { if (!t.numKeys) return 0; var s = ""; s = "s" in e.keyframes[r - 1] ? e.keyframes[r - 1].s : "e" in e.keyframes[r - 2] ? e.keyframes[r - 2].e : e.keyframes[r - 2].s; var a = "unidimensional" === i ? new Number(s) : Object.assign({}, s); return ( (a.time = e.keyframes[r - 1].t / e.elem.comp.globalData.frameRate), (a.value = "unidimensional" === i ? s[0] : s), a ); }), (t.valueAtTime = e.getValueAtTime), (t.speedAtTime = e.getSpeedAtTime), (t.velocityAtTime = e.getVelocityAtTime), (t.propertyGroup = e.propertyGroup); } function r() { return t; } return function (s) { return s ? "unidimensional" === s.propType ? (function (e) { (e && "pv" in e) || (e = t); var r = 1 / e.mult, s = e.pv * r, a = new Number(s); return ( (a.value = s), i(a, e, "unidimensional"), function () { return ( e.k && e.getValue(), (s = e.v * r), a.value !== s && (((a = new Number(s)).value = s), i(a, e, "unidimensional")), a ); } ); })(s) : (function (t) { (t && "pv" in t) || (t = e); var r = 1 / t.mult, s = (t.data && t.data.l) || t.pv.length, a = createTypedArray("float32", s), n = createTypedArray("float32", s); return ( (a.value = n), i(a, t, "multidimensional"), function () { t.k && t.getValue(); for (var e = 0; e < s; e += 1) (n[e] = t.v[e] * r), (a[e] = n[e]); return a; } ); })(s) : r; }; })(), TransformExpressionInterface = function (t) { function e(t) { switch (t) { case "scale": case "Scale": case "ADBE Scale": case 6: return e.scale; case "rotation": case "Rotation": case "ADBE Rotation": case "ADBE Rotate Z": case 10: return e.rotation; case "ADBE Rotate X": return e.xRotation; case "ADBE Rotate Y": return e.yRotation; case "position": case "Position": case "ADBE Position": case 2: return e.position; case "ADBE Position_0": return e.xPosition; case "ADBE Position_1": return e.yPosition; case "ADBE Position_2": return e.zPosition; case "anchorPoint": case "AnchorPoint": case "Anchor Point": case "ADBE AnchorPoint": case 1: return e.anchorPoint; case "opacity": case "Opacity": case 11: return e.opacity; default: return null; } } var i, r, s, a; return ( Object.defineProperty(e, "rotation", { get: ExpressionPropertyInterface(t.r || t.rz), }), Object.defineProperty(e, "zRotation", { get: ExpressionPropertyInterface(t.rz || t.r), }), Object.defineProperty(e, "xRotation", { get: ExpressionPropertyInterface(t.rx), }), Object.defineProperty(e, "yRotation", { get: ExpressionPropertyInterface(t.ry), }), Object.defineProperty(e, "scale", { get: ExpressionPropertyInterface(t.s), }), t.p ? (a = ExpressionPropertyInterface(t.p)) : ((i = ExpressionPropertyInterface(t.px)), (r = ExpressionPropertyInterface(t.py)), t.pz && (s = ExpressionPropertyInterface(t.pz))), Object.defineProperty(e, "position", { get: function () { return t.p ? a() : [i(), r(), s ? s() : 0]; }, }), Object.defineProperty(e, "xPosition", { get: ExpressionPropertyInterface(t.px), }), Object.defineProperty(e, "yPosition", { get: ExpressionPropertyInterface(t.py), }), Object.defineProperty(e, "zPosition", { get: ExpressionPropertyInterface(t.pz), }), Object.defineProperty(e, "anchorPoint", { get: ExpressionPropertyInterface(t.a), }), Object.defineProperty(e, "opacity", { get: ExpressionPropertyInterface(t.o), }), Object.defineProperty(e, "skew", { get: ExpressionPropertyInterface(t.sk), }), Object.defineProperty(e, "skewAxis", { get: ExpressionPropertyInterface(t.sa), }), Object.defineProperty(e, "orientation", { get: ExpressionPropertyInterface(t.or), }), e ); }, LayerExpressionInterface = (function () { function t(t) { var e = new Matrix(); void 0 !== t ? this._elem.finalTransform.mProp.getValueAtTime(t).clone(e) : this._elem.finalTransform.mProp.applyToMatrix(e); return e; } function e(t, e) { var i = this.getMatrix(e); return ( (i.props[12] = 0), (i.props[13] = 0), (i.props[14] = 0), this.applyPoint(i, t) ); } function i(t, e) { var i = this.getMatrix(e); return this.applyPoint(i, t); } function r(t, e) { var i = this.getMatrix(e); return ( (i.props[12] = 0), (i.props[13] = 0), (i.props[14] = 0), this.invertPoint(i, t) ); } function s(t, e) { var i = this.getMatrix(e); return this.invertPoint(i, t); } function a(t, e) { if (this._elem.hierarchy && this._elem.hierarchy.length) { var i, r = this._elem.hierarchy.length; for (i = 0; i < r; i += 1) this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t); } return t.applyToPointArray(e[0], e[1], e[2] || 0); } function n(t, e) { if (this._elem.hierarchy && this._elem.hierarchy.length) { var i, r = this._elem.hierarchy.length; for (i = 0; i < r; i += 1) this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t); } return t.inversePoint(e); } function o(t) { var e = new Matrix(); if ( (e.reset(), this._elem.finalTransform.mProp.applyToMatrix(e), this._elem.hierarchy && this._elem.hierarchy.length) ) { var i, r = this._elem.hierarchy.length; for (i = 0; i < r; i += 1) this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(e); return e.inversePoint(t); } return e.inversePoint(t); } function h() { return [1, 1, 1, 1]; } return function (l) { var p; function f(t) { switch (t) { case "ADBE Root Vectors Group": case "Contents": case 2: return f.shapeInterface; case 1: case 6: case "Transform": case "transform": case "ADBE Transform Group": return p; case 4: case "ADBE Effect Parade": case "effects": case "Effects": return f.effect; case "ADBE Text Properties": return f.textInterface; default: return null; } } (f.getMatrix = t), (f.invertPoint = n), (f.applyPoint = a), (f.toWorld = i), (f.toWorldVec = e), (f.fromWorld = s), (f.fromWorldVec = r), (f.toComp = i), (f.fromComp = o), (f.sampleImage = h), (f.sourceRectAtTime = l.sourceRectAtTime.bind(l)), (f._elem = l); var m = getDescriptor( (p = TransformExpressionInterface(l.finalTransform.mProp)), "anchorPoint" ); return ( Object.defineProperties(f, { hasParent: { get: function () { return l.hierarchy.length; }, }, parent: { get: function () { return l.hierarchy[0].layerInterface; }, }, rotation: getDescriptor(p, "rotation"), scale: getDescriptor(p, "scale"), position: getDescriptor(p, "position"), opacity: getDescriptor(p, "opacity"), anchorPoint: m, anchor_point: m, transform: { get: function () { return p; }, }, active: { get: function () { return l.isInRange; }, }, }), (f.startTime = l.data.st), (f.index = l.data.ind), (f.source = l.data.refId), (f.height = 0 === l.data.ty ? l.data.h : 100), (f.width = 0 === l.data.ty ? l.data.w : 100), (f.inPoint = l.data.ip / l.comp.globalData.frameRate), (f.outPoint = l.data.op / l.comp.globalData.frameRate), (f._name = l.data.nm), (f.registerMaskInterface = function (t) { f.mask = new MaskManagerInterface(t, l); }), (f.registerEffectsInterface = function (t) { f.effect = t; }), f ); }; })(), propertyGroupFactory = function (t, e) { return function (i) { return (i = void 0 === i ? 1 : i) <= 0 ? t : e(i - 1); }; }, PropertyInterface = function (t, e) { var i = { _name: t }; return function (t) { return (t = void 0 === t ? 1 : t) <= 0 ? i : e(t - 1); }; }, EffectsExpressionInterface = (function () { function t(i, r, s, a) { function n(t) { for (var e = i.ef, r = 0, s = e.length; r < s; ) { if (t === e[r].nm || t === e[r].mn || t === e[r].ix) return 5 === e[r].ty ? l[r] : l[r](); r += 1; } throw new Error(); } var o, h = propertyGroupFactory(n, s), l = [], p = i.ef.length; for (o = 0; o < p; o += 1) 5 === i.ef[o].ty ? l.push( t( i.ef[o], r.effectElements[o], r.effectElements[o].propertyGroup, a ) ) : l.push(e(r.effectElements[o], i.ef[o].ty, a, h)); return ( "ADBE Color Control" === i.mn && Object.defineProperty(n, "color", { get: function () { return l[0](); }, }), Object.defineProperties(n, { numProperties: { get: function () { return i.np; }, }, _name: { value: i.nm }, propertyGroup: { value: h }, }), (n.enabled = 0 !== i.en), (n.active = n.enabled), n ); } function e(t, e, i, r) { var s = ExpressionPropertyInterface(t.p); return ( t.p.setGroupProperty && t.p.setGroupProperty(PropertyInterface("", r)), function () { return 10 === e ? i.comp.compInterface(t.p.v) : s(); } ); } return { createEffectsInterface: function (e, i) { if (e.effectsManager) { var r, s = [], a = e.data.ef, n = e.effectsManager.effectElements.length; for (r = 0; r < n; r += 1) s.push(t(a[r], e.effectsManager.effectElements[r], i, e)); var o = e.data.ef || [], h = function (t) { for (r = 0, n = o.length; r < n; ) { if (t === o[r].nm || t === o[r].mn || t === o[r].ix) return s[r]; r += 1; } return null; }; return ( Object.defineProperty(h, "numProperties", { get: function () { return o.length; }, }), h ); } return null; }, }; })(), ShapePathInterface = function (t, e, i) { var r = e.sh; function s(t) { return "Shape" === t || "shape" === t || "Path" === t || "path" === t || "ADBE Vector Shape" === t || 2 === t ? s.path : null; } var a = propertyGroupFactory(s, i); return ( r.setGroupProperty(PropertyInterface("Path", a)), Object.defineProperties(s, { path: { get: function () { return r.k && r.getValue(), r; }, }, shape: { get: function () { return r.k && r.getValue(), r; }, }, _name: { value: t.nm }, ix: { value: t.ix }, propertyIndex: { value: t.ix }, mn: { value: t.mn }, propertyGroup: { value: i }, }), s ); }, ShapeExpressionInterface = (function () { function t(t, o, c) { var d, u = [], y = t ? t.length : 0; for (d = 0; d < y; d += 1) "gr" === t[d].ty ? u.push(e(t[d], o[d], c)) : "fl" === t[d].ty ? u.push(i(t[d], o[d], c)) : "st" === t[d].ty ? u.push(a(t[d], o[d], c)) : "tm" === t[d].ty ? u.push(n(t[d], o[d], c)) : "tr" === t[d].ty || ("el" === t[d].ty ? u.push(h(t[d], o[d], c)) : "sr" === t[d].ty ? u.push(l(t[d], o[d], c)) : "sh" === t[d].ty ? u.push(ShapePathInterface(t[d], o[d], c)) : "rc" === t[d].ty ? u.push(p(t[d], o[d], c)) : "rd" === t[d].ty ? u.push(f(t[d], o[d], c)) : "rp" === t[d].ty ? u.push(m(t[d], o[d], c)) : "gf" === t[d].ty ? u.push(r(t[d], o[d], c)) : u.push(s(t[d], o[d]))); return u; } function e(e, i, r) { var s = function (t) { switch (t) { case "ADBE Vectors Group": case "Contents": case 2: return s.content; default: return s.transform; } }; s.propertyGroup = propertyGroupFactory(s, r); var a = (function (e, i, r) { var s, a = function (t) { for (var e = 0, i = s.length; e < i; ) { if ( s[e]._name === t || s[e].mn === t || s[e].propertyIndex === t || s[e].ix === t || s[e].ind === t ) return s[e]; e += 1; } return "number" == typeof t ? s[t - 1] : null; }; (a.propertyGroup = propertyGroupFactory(a, r)), (s = t(e.it, i.it, a.propertyGroup)), (a.numProperties = s.length); var n = o( e.it[e.it.length - 1], i.it[i.it.length - 1], a.propertyGroup ); return ( (a.transform = n), (a.propertyIndex = e.cix), (a._name = e.nm), a ); })(e, i, s.propertyGroup), n = o( e.it[e.it.length - 1], i.it[i.it.length - 1], s.propertyGroup ); return ( (s.content = a), (s.transform = n), Object.defineProperty(s, "_name", { get: function () { return e.nm; }, }), (s.numProperties = e.np), (s.propertyIndex = e.ix), (s.nm = e.nm), (s.mn = e.mn), s ); } function i(t, e, i) { function r(t) { return "Color" === t || "color" === t ? r.color : "Opacity" === t || "opacity" === t ? r.opacity : null; } return ( Object.defineProperties(r, { color: { get: ExpressionPropertyInterface(e.c) }, opacity: { get: ExpressionPropertyInterface(e.o) }, _name: { value: t.nm }, mn: { value: t.mn }, }), e.c.setGroupProperty(PropertyInterface("Color", i)), e.o.setGroupProperty(PropertyInterface("Opacity", i)), r ); } function r(t, e, i) { function r(t) { return "Start Point" === t || "start point" === t ? r.startPoint : "End Point" === t || "end point" === t ? r.endPoint : "Opacity" === t || "opacity" === t ? r.opacity : null; } return ( Object.defineProperties(r, { startPoint: { get: ExpressionPropertyInterface(e.s) }, endPoint: { get: ExpressionPropertyInterface(e.e) }, opacity: { get: ExpressionPropertyInterface(e.o) }, type: { get: function () { return "a"; }, }, _name: { value: t.nm }, mn: { value: t.mn }, }), e.s.setGroupProperty(PropertyInterface("Start Point", i)), e.e.setGroupProperty(PropertyInterface("End Point", i)), e.o.setGroupProperty(PropertyInterface("Opacity", i)), r ); } function s() { return function () { return null; }; } function a(t, e, i) { var r, s = propertyGroupFactory(l, i), a = propertyGroupFactory(h, s); function n(i) { Object.defineProperty(h, t.d[i].nm, { get: ExpressionPropertyInterface(e.d.dataProps[i].p), }); } var o = t.d ? t.d.length : 0, h = {}; for (r = 0; r < o; r += 1) n(r), e.d.dataProps[r].p.setGroupProperty(a); function l(t) { return "Color" === t || "color" === t ? l.color : "Opacity" === t || "opacity" === t ? l.opacity : "Stroke Width" === t || "stroke width" === t ? l.strokeWidth : null; } return ( Object.defineProperties(l, { color: { get: ExpressionPropertyInterface(e.c) }, opacity: { get: ExpressionPropertyInterface(e.o) }, strokeWidth: { get: ExpressionPropertyInterface(e.w) }, dash: { get: function () { return h; }, }, _name: { value: t.nm }, mn: { value: t.mn }, }), e.c.setGroupProperty(PropertyInterface("Color", s)), e.o.setGroupProperty(PropertyInterface("Opacity", s)), e.w.setGroupProperty(PropertyInterface("Stroke Width", s)), l ); } function n(t, e, i) { function r(e) { return e === t.e.ix || "End" === e || "end" === e ? r.end : e === t.s.ix ? r.start : e === t.o.ix ? r.offset : null; } var s = propertyGroupFactory(r, i); return ( (r.propertyIndex = t.ix), e.s.setGroupProperty(PropertyInterface("Start", s)), e.e.setGroupProperty(PropertyInterface("End", s)), e.o.setGroupProperty(PropertyInterface("Offset", s)), (r.propertyIndex = t.ix), (r.propertyGroup = i), Object.defineProperties(r, { start: { get: ExpressionPropertyInterface(e.s) }, end: { get: ExpressionPropertyInterface(e.e) }, offset: { get: ExpressionPropertyInterface(e.o) }, _name: { value: t.nm }, }), (r.mn = t.mn), r ); } function o(t, e, i) { function r(e) { return t.a.ix === e || "Anchor Point" === e ? r.anchorPoint : t.o.ix === e || "Opacity" === e ? r.opacity : t.p.ix === e || "Position" === e ? r.position : t.r.ix === e || "Rotation" === e || "ADBE Vector Rotation" === e ? r.rotation : t.s.ix === e || "Scale" === e ? r.scale : (t.sk && t.sk.ix === e) || "Skew" === e ? r.skew : (t.sa && t.sa.ix === e) || "Skew Axis" === e ? r.skewAxis : null; } var s = propertyGroupFactory(r, i); return ( e.transform.mProps.o.setGroupProperty( PropertyInterface("Opacity", s) ), e.transform.mProps.p.setGroupProperty( PropertyInterface("Position", s) ), e.transform.mProps.a.setGroupProperty( PropertyInterface("Anchor Point", s) ), e.transform.mProps.s.setGroupProperty( PropertyInterface("Scale", s) ), e.transform.mProps.r.setGroupProperty( PropertyInterface("Rotation", s) ), e.transform.mProps.sk && (e.transform.mProps.sk.setGroupProperty( PropertyInterface("Skew", s) ), e.transform.mProps.sa.setGroupProperty( PropertyInterface("Skew Angle", s) )), e.transform.op.setGroupProperty(PropertyInterface("Opacity", s)), Object.defineProperties(r, { opacity: { get: ExpressionPropertyInterface(e.transform.mProps.o), }, position: { get: ExpressionPropertyInterface(e.transform.mProps.p), }, anchorPoint: { get: ExpressionPropertyInterface(e.transform.mProps.a), }, scale: { get: ExpressionPropertyInterface(e.transform.mProps.s) }, rotation: { get: ExpressionPropertyInterface(e.transform.mProps.r), }, skew: { get: ExpressionPropertyInterface(e.transform.mProps.sk) }, skewAxis: { get: ExpressionPropertyInterface(e.transform.mProps.sa), }, _name: { value: t.nm }, }), (r.ty = "tr"), (r.mn = t.mn), (r.propertyGroup = i), r ); } function h(t, e, i) { function r(e) { return t.p.ix === e ? r.position : t.s.ix === e ? r.size : null; } var s = propertyGroupFactory(r, i); r.propertyIndex = t.ix; var a = "tm" === e.sh.ty ? e.sh.prop : e.sh; return ( a.s.setGroupProperty(PropertyInterface("Size", s)), a.p.setGroupProperty(PropertyInterface("Position", s)), Object.defineProperties(r, { size: { get: ExpressionPropertyInterface(a.s) }, position: { get: ExpressionPropertyInterface(a.p) }, _name: { value: t.nm }, }), (r.mn = t.mn), r ); } function l(t, e, i) { function r(e) { return t.p.ix === e ? r.position : t.r.ix === e ? r.rotation : t.pt.ix === e ? r.points : t.or.ix === e || "ADBE Vector Star Outer Radius" === e ? r.outerRadius : t.os.ix === e ? r.outerRoundness : !t.ir || (t.ir.ix !== e && "ADBE Vector Star Inner Radius" !== e) ? t.is && t.is.ix === e ? r.innerRoundness : null : r.innerRadius; } var s = propertyGroupFactory(r, i), a = "tm" === e.sh.ty ? e.sh.prop : e.sh; return ( (r.propertyIndex = t.ix), a.or.setGroupProperty(PropertyInterface("Outer Radius", s)), a.os.setGroupProperty(PropertyInterface("Outer Roundness", s)), a.pt.setGroupProperty(PropertyInterface("Points", s)), a.p.setGroupProperty(PropertyInterface("Position", s)), a.r.setGroupProperty(PropertyInterface("Rotation", s)), t.ir && (a.ir.setGroupProperty(PropertyInterface("Inner Radius", s)), a.is.setGroupProperty(PropertyInterface("Inner Roundness", s))), Object.defineProperties(r, { position: { get: ExpressionPropertyInterface(a.p) }, rotation: { get: ExpressionPropertyInterface(a.r) }, points: { get: ExpressionPropertyInterface(a.pt) }, outerRadius: { get: ExpressionPropertyInterface(a.or) }, outerRoundness: { get: ExpressionPropertyInterface(a.os) }, innerRadius: { get: ExpressionPropertyInterface(a.ir) }, innerRoundness: { get: ExpressionPropertyInterface(a.is) }, _name: { value: t.nm }, }), (r.mn = t.mn), r ); } function p(t, e, i) { function r(e) { return t.p.ix === e ? r.position : t.r.ix === e ? r.roundness : t.s.ix === e || "Size" === e || "ADBE Vector Rect Size" === e ? r.size : null; } var s = propertyGroupFactory(r, i), a = "tm" === e.sh.ty ? e.sh.prop : e.sh; return ( (r.propertyIndex = t.ix), a.p.setGroupProperty(PropertyInterface("Position", s)), a.s.setGroupProperty(PropertyInterface("Size", s)), a.r.setGroupProperty(PropertyInterface("Rotation", s)), Object.defineProperties(r, { position: { get: ExpressionPropertyInterface(a.p) }, roundness: { get: ExpressionPropertyInterface(a.r) }, size: { get: ExpressionPropertyInterface(a.s) }, _name: { value: t.nm }, }), (r.mn = t.mn), r ); } function f(t, e, i) { function r(e) { return t.r.ix === e || "Round Corners 1" === e ? r.radius : null; } var s = propertyGroupFactory(r, i), a = e; return ( (r.propertyIndex = t.ix), a.rd.setGroupProperty(PropertyInterface("Radius", s)), Object.defineProperties(r, { radius: { get: ExpressionPropertyInterface(a.rd) }, _name: { value: t.nm }, }), (r.mn = t.mn), r ); } function m(t, e, i) { function r(e) { return t.c.ix === e || "Copies" === e ? r.copies : t.o.ix === e || "Offset" === e ? r.offset : null; } var s = propertyGroupFactory(r, i), a = e; return ( (r.propertyIndex = t.ix), a.c.setGroupProperty(PropertyInterface("Copies", s)), a.o.setGroupProperty(PropertyInterface("Offset", s)), Object.defineProperties(r, { copies: { get: ExpressionPropertyInterface(a.c) }, offset: { get: ExpressionPropertyInterface(a.o) }, _name: { value: t.nm }, }), (r.mn = t.mn), r ); } return function (e, i, r) { var s; function a(t) { if ("number" == typeof t) return 0 === (t = void 0 === t ? 1 : t) ? r : s[t - 1]; for (var e = 0, i = s.length; e < i; ) { if (s[e]._name === t) return s[e]; e += 1; } return null; } return ( (a.propertyGroup = propertyGroupFactory(a, function () { return r; })), (s = t(e, i, a.propertyGroup)), (a.numProperties = s.length), (a._name = "Contents"), a ); }; })(), TextExpressionInterface = function (t) { var e; function i(t) { return "ADBE Text Document" === t ? i.sourceText : null; } return ( Object.defineProperty(i, "sourceText", { get: function () { t.textProperty.getValue(); var i = t.textProperty.currentData.t; return ( (e && i === e.value) || (((e = new String(i)).value = i || new String(i)), Object.defineProperty(e, "style", { get: function () { return { fillColor: t.textProperty.currentData.fc }; }, })), e ); }, }), i ); }; function _typeof(t) { return ( (_typeof = "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; }), _typeof(t) ); } var FootageInterface = ((dataInterfaceFactory = function (t) { function e(t) { return "Outline" === t ? e.outlineInterface() : null; } return ( (e._name = "Outline"), (e.outlineInterface = (function (t) { var e = "", i = t.getFootageData(); function r(t) { if (i[t]) return (e = t), "object" === _typeof((i = i[t])) ? r : i; var s = t.indexOf(e); if (-1 !== s) { var a = parseInt(t.substr(s + e.length), 10); return "object" === _typeof((i = i[a])) ? r : i; } return ""; } return function () { return (e = ""), (i = t.getFootageData()), r; }; })(t)), e ); }), function (t) { function e(t) { return "Data" === t ? e.dataInterface : null; } return ( (e._name = "Data"), (e.dataInterface = dataInterfaceFactory(t)), e ); }), dataInterfaceFactory, interfaces = { layer: LayerExpressionInterface, effects: EffectsExpressionInterface, comp: CompExpressionInterface, shape: ShapeExpressionInterface, text: TextExpressionInterface, footage: FootageInterface, }; function getInterface(t) { return interfaces[t] || null; } var expressionHelpers = { searchExpressions: function (t, e, i) { e.x && ((i.k = !0), (i.x = !0), (i.initiateExpression = ExpressionManager.initiateExpression), i.effectsSequence.push(i.initiateExpression(t, e, i).bind(i))); }, getSpeedAtTime: function (t) { var e = this.getValueAtTime(t), i = this.getValueAtTime(t + -0.01), r = 0; if (e.length) { var s; for (s = 0; s < e.length; s += 1) r += Math.pow(i[s] - e[s], 2); r = 100 * Math.sqrt(r); } else r = 0; return r; }, getVelocityAtTime: function (t) { if (void 0 !== this.vel) return this.vel; var e, i, r = -0.001, s = this.getValueAtTime(t), a = this.getValueAtTime(t + r); if (s.length) for ( e = createTypedArray("float32", s.length), i = 0; i < s.length; i += 1 ) e[i] = (a[i] - s[i]) / r; else e = (a - s) / r; return e; }, getValueAtTime: function (t) { return ( (t *= this.elem.globalData.frameRate), (t -= this.offsetTime) !== this._cachingAtTime.lastFrame && ((this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < t ? this._cachingAtTime.lastIndex : 0), (this._cachingAtTime.value = this.interpolateValue( t, this._cachingAtTime )), (this._cachingAtTime.lastFrame = t)), this._cachingAtTime.value ); }, getStaticValueAtTime: function () { return this.pv; }, setGroupProperty: function (t) { this.propertyGroup = t; }, }; function addPropertyDecorator() { function t(t, e, i) { if (!this.k || !this.keyframes) return this.pv; t = t ? t.toLowerCase() : ""; var r, s, a, n, o, h = this.comp.renderedFrame, l = this.keyframes, p = l[l.length - 1].t; if (h <= p) return this.pv; if ( (i ? (s = p - (r = e ? Math.abs(p - this.elem.comp.globalData.frameRate * e) : Math.max(0, p - this.elem.data.ip))) : ((!e || e > l.length - 1) && (e = l.length - 1), (r = p - (s = l[l.length - 1 - e].t))), "pingpong" === t) ) { if (Math.floor((h - s) / r) % 2 != 0) return this.getValueAtTime( (r - ((h - s) % r) + s) / this.comp.globalData.frameRate, 0 ); } else { if ("offset" === t) { var f = this.getValueAtTime(s / this.comp.globalData.frameRate, 0), m = this.getValueAtTime(p / this.comp.globalData.frameRate, 0), c = this.getValueAtTime( (((h - s) % r) + s) / this.comp.globalData.frameRate, 0 ), d = Math.floor((h - s) / r); if (this.pv.length) { for (n = (o = new Array(f.length)).length, a = 0; a < n; a += 1) o[a] = (m[a] - f[a]) * d + c[a]; return o; } return (m - f) * d + c; } if ("continue" === t) { var u = this.getValueAtTime(p / this.comp.globalData.frameRate, 0), y = this.getValueAtTime( (p - 0.001) / this.comp.globalData.frameRate, 0 ); if (this.pv.length) { for (n = (o = new Array(u.length)).length, a = 0; a < n; a += 1) o[a] = u[a] + ((u[a] - y[a]) * ((h - p) / this.comp.globalData.frameRate)) / 5e-4; return o; } return u + ((h - p) / 0.001) * (u - y); } } return this.getValueAtTime( (((h - s) % r) + s) / this.comp.globalData.frameRate, 0 ); } function e(t, e, i) { if (!this.k) return this.pv; t = t ? t.toLowerCase() : ""; var r, s, a, n, o, h = this.comp.renderedFrame, l = this.keyframes, p = l[0].t; if (h >= p) return this.pv; if ( (i ? (s = p + (r = e ? Math.abs(this.elem.comp.globalData.frameRate * e) : Math.max(0, this.elem.data.op - p))) : ((!e || e > l.length - 1) && (e = l.length - 1), (r = (s = l[e].t) - p)), "pingpong" === t) ) { if (Math.floor((p - h) / r) % 2 == 0) return this.getValueAtTime( (((p - h) % r) + p) / this.comp.globalData.frameRate, 0 ); } else { if ("offset" === t) { var f = this.getValueAtTime(p / this.comp.globalData.frameRate, 0), m = this.getValueAtTime(s / this.comp.globalData.frameRate, 0), c = this.getValueAtTime( (r - ((p - h) % r) + p) / this.comp.globalData.frameRate, 0 ), d = Math.floor((p - h) / r) + 1; if (this.pv.length) { for (n = (o = new Array(f.length)).length, a = 0; a < n; a += 1) o[a] = c[a] - (m[a] - f[a]) * d; return o; } return c - (m - f) * d; } if ("continue" === t) { var u = this.getValueAtTime(p / this.comp.globalData.frameRate, 0), y = this.getValueAtTime( (p + 0.001) / this.comp.globalData.frameRate, 0 ); if (this.pv.length) { for (n = (o = new Array(u.length)).length, a = 0; a < n; a += 1) o[a] = u[a] + ((u[a] - y[a]) * (p - h)) / 0.001; return o; } return u + ((u - y) * (p - h)) / 0.001; } } return this.getValueAtTime( (r - (((p - h) % r) + p)) / this.comp.globalData.frameRate, 0 ); } function i(t, e) { if (!this.k) return this.pv; if (((t = 0.5 * (t || 0.4)), (e = Math.floor(e || 5)) <= 1)) return this.pv; var i, r, s = this.comp.renderedFrame / this.comp.globalData.frameRate, a = s - t, n = e > 1 ? (s + t - a) / (e - 1) : 1, o = 0, h = 0; for ( i = this.pv.length ? createTypedArray("float32", this.pv.length) : 0; o < e; ) { if (((r = this.getValueAtTime(a + o * n)), this.pv.length)) for (h = 0; h < this.pv.length; h += 1) i[h] += r[h]; else i += r; o += 1; } if (this.pv.length) for (h = 0; h < this.pv.length; h += 1) i[h] /= e; else i /= e; return i; } function r(t) { this._transformCachingAtTime || (this._transformCachingAtTime = { v: new Matrix() }); var e = this._transformCachingAtTime.v; if ( (e.cloneFromProps(this.pre.props), this.appliedTransformations < 1) ) { var i = this.a.getValueAtTime(t); e.translate( -i[0] * this.a.mult, -i[1] * this.a.mult, i[2] * this.a.mult ); } if (this.appliedTransformations < 2) { var r = this.s.getValueAtTime(t); e.scale(r[0] * this.s.mult, r[1] * this.s.mult, r[2] * this.s.mult); } if (this.sk && this.appliedTransformations < 3) { var s = this.sk.getValueAtTime(t), a = this.sa.getValueAtTime(t); e.skewFromAxis(-s * this.sk.mult, a * this.sa.mult); } if (this.r && this.appliedTransformations < 4) { var n = this.r.getValueAtTime(t); e.rotate(-n * this.r.mult); } else if (!this.r && this.appliedTransformations < 4) { var o = this.rz.getValueAtTime(t), h = this.ry.getValueAtTime(t), l = this.rx.getValueAtTime(t), p = this.or.getValueAtTime(t); e.rotateZ(-o * this.rz.mult) .rotateY(h * this.ry.mult) .rotateX(l * this.rx.mult) .rotateZ(-p[2] * this.or.mult) .rotateY(p[1] * this.or.mult) .rotateX(p[0] * this.or.mult); } if (this.data.p && this.data.p.s) { var f = this.px.getValueAtTime(t), m = this.py.getValueAtTime(t); if (this.data.p.z) { var c = this.pz.getValueAtTime(t); e.translate(f * this.px.mult, m * this.py.mult, -c * this.pz.mult); } else e.translate(f * this.px.mult, m * this.py.mult, 0); } else { var d = this.p.getValueAtTime(t); e.translate( d[0] * this.p.mult, d[1] * this.p.mult, -d[2] * this.p.mult ); } return e; } function s() { return this.v.clone(new Matrix()); } var a = TransformPropertyFactory.getTransformProperty; TransformPropertyFactory.getTransformProperty = function (t, e, i) { var n = a(t, e, i); return ( n.dynamicProperties.length ? (n.getValueAtTime = r.bind(n)) : (n.getValueAtTime = s.bind(n)), (n.setGroupProperty = expressionHelpers.setGroupProperty), n ); }; var n = PropertyFactory.getProp; PropertyFactory.getProp = function (r, s, a, o, h) { var l = n(r, s, a, o, h); l.kf ? (l.getValueAtTime = expressionHelpers.getValueAtTime.bind(l)) : (l.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(l)), (l.setGroupProperty = expressionHelpers.setGroupProperty), (l.loopOut = t), (l.loopIn = e), (l.smooth = i), (l.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(l)), (l.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(l)), (l.numKeys = 1 === s.a ? s.k.length : 0), (l.propertyIndex = s.ix); var p = 0; return ( 0 !== a && (p = createTypedArray( "float32", 1 === s.a ? s.k[0].s.length : s.k.length )), (l._cachingAtTime = { lastFrame: initialDefaultFrame, lastIndex: 0, value: p, }), expressionHelpers.searchExpressions(r, s, l), l.k && h.addDynamicProperty(l), l ); }; var o = ShapePropertyFactory.getConstructorFunction(), h = ShapePropertyFactory.getKeyframedConstructorFunction(); function l() {} (l.prototype = { vertices: function (t, e) { this.k && this.getValue(); var i, r = this.v; void 0 !== e && (r = this.getValueAtTime(e, 0)); var s = r._length, a = r[t], n = r.v, o = createSizedArray(s); for (i = 0; i < s; i += 1) o[i] = "i" === t || "o" === t ? [a[i][0] - n[i][0], a[i][1] - n[i][1]] : [a[i][0], a[i][1]]; return o; }, points: function (t) { return this.vertices("v", t); }, inTangents: function (t) { return this.vertices("i", t); }, outTangents: function (t) { return this.vertices("o", t); }, isClosed: function () { return this.v.c; }, pointOnPath: function (t, e) { var i = this.v; void 0 !== e && (i = this.getValueAtTime(e, 0)), this._segmentsLength || (this._segmentsLength = bez.getSegmentsLength(i)); for ( var r, s = this._segmentsLength, a = s.lengths, n = s.totalLength * t, o = 0, h = a.length, l = 0; o < h; ) { if (l + a[o].addedLength > n) { var p = o, f = i.c && o === h - 1 ? 0 : o + 1, m = (n - l) / a[o].addedLength; r = bez.getPointInSegment( i.v[p], i.v[f], i.o[p], i.i[f], m, a[o] ); break; } (l += a[o].addedLength), (o += 1); } return ( r || (r = i.c ? [i.v[0][0], i.v[0][1]] : [i.v[i._length - 1][0], i.v[i._length - 1][1]]), r ); }, vectorOnPath: function (t, e, i) { 1 == t ? (t = this.v.c) : 0 == t && (t = 0.999); var r = this.pointOnPath(t, e), s = this.pointOnPath(t + 0.001, e), a = s[0] - r[0], n = s[1] - r[1], o = Math.sqrt(Math.pow(a, 2) + Math.pow(n, 2)); return 0 === o ? [0, 0] : "tangent" === i ? [a / o, n / o] : [-n / o, a / o]; }, tangentOnPath: function (t, e) { return this.vectorOnPath(t, e, "tangent"); }, normalOnPath: function (t, e) { return this.vectorOnPath(t, e, "normal"); }, setGroupProperty: expressionHelpers.setGroupProperty, getValueAtTime: expressionHelpers.getStaticValueAtTime, }), extendPrototype([l], o), extendPrototype([l], h), (h.prototype.getValueAtTime = function (t) { return ( this._cachingAtTime || (this._cachingAtTime = { shapeValue: shapePool.clone(this.pv), lastIndex: 0, lastTime: initialDefaultFrame, }), (t *= this.elem.globalData.frameRate), (t -= this.offsetTime) !== this._cachingAtTime.lastTime && ((this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < t ? this._caching.lastIndex : 0), (this._cachingAtTime.lastTime = t), this.interpolateShape( t, this._cachingAtTime.shapeValue, this._cachingAtTime )), this._cachingAtTime.shapeValue ); }), (h.prototype.initiateExpression = ExpressionManager.initiateExpression); var p = ShapePropertyFactory.getShapeProp; ShapePropertyFactory.getShapeProp = function (t, e, i, r, s) { var a = p(t, e, i, r, s); return ( (a.propertyIndex = e.ix), (a.lock = !1), 3 === i ? expressionHelpers.searchExpressions(t, e.pt, a) : 4 === i && expressionHelpers.searchExpressions(t, e.ks, a), a.k && t.addDynamicProperty(a), a ); }; } function initialize$1() { addPropertyDecorator(); } function addDecorator() { (TextProperty.prototype.getExpressionValue = function (t, e) { var i = this.calculateExpression(e); if (t.t !== i) { var r = {}; return ( this.copyData(r, t), (r.t = i.toString()), (r.__complete = !1), r ); } return t; }), (TextProperty.prototype.searchProperty = function () { var t = this.searchKeyframes(), e = this.searchExpressions(); return (this.kf = t || e), this.kf; }), (TextProperty.prototype.searchExpressions = function () { return this.data.d.x ? ((this.calculateExpression = ExpressionManager.initiateExpression.bind(this)( this.elem, this.data.d, this )), this.addEffect(this.getExpressionValue.bind(this)), !0) : null; }); } function initialize() { addDecorator(); } function SVGComposableEffect() {} SVGComposableEffect.prototype = { createMergeNode: function (t, e) { var i, r, s = createNS("feMerge"); for (s.setAttribute("result", t), r = 0; r < e.length; r += 1) (i = createNS("feMergeNode")).setAttribute("in", e[r]), s.appendChild(i), s.appendChild(i); return s; }, }; var linearFilterValue = "0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0"; function SVGTintFilter(t, e, i, r, s) { this.filterManager = e; var a = createNS("feColorMatrix"); a.setAttribute("type", "matrix"), a.setAttribute("color-interpolation-filters", "linearRGB"), a.setAttribute("values", linearFilterValue + " 1 0"), (this.linearFilter = a), a.setAttribute("result", r + "_tint_1"), t.appendChild(a), (a = createNS("feColorMatrix")).setAttribute("type", "matrix"), a.setAttribute("color-interpolation-filters", "sRGB"), a.setAttribute("values", "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"), a.setAttribute("result", r + "_tint_2"), t.appendChild(a), (this.matrixFilter = a); var n = this.createMergeNode(r, [s, r + "_tint_1", r + "_tint_2"]); t.appendChild(n); } function SVGFillFilter(t, e, i, r) { this.filterManager = e; var s = createNS("feColorMatrix"); s.setAttribute("type", "matrix"), s.setAttribute("color-interpolation-filters", "sRGB"), s.setAttribute("values", "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"), s.setAttribute("result", r), t.appendChild(s), (this.matrixFilter = s); } function SVGStrokeEffect(t, e, i) { (this.initialized = !1), (this.filterManager = e), (this.elem = i), (this.paths = []); } function SVGTritoneFilter(t, e, i, r) { this.filterManager = e; var s = createNS("feColorMatrix"); s.setAttribute("type", "matrix"), s.setAttribute("color-interpolation-filters", "linearRGB"), s.setAttribute( "values", "0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0" ), t.appendChild(s); var a = createNS("feComponentTransfer"); a.setAttribute("color-interpolation-filters", "sRGB"), a.setAttribute("result", r), (this.matrixFilter = a); var n = createNS("feFuncR"); n.setAttribute("type", "table"), a.appendChild(n), (this.feFuncR = n); var o = createNS("feFuncG"); o.setAttribute("type", "table"), a.appendChild(o), (this.feFuncG = o); var h = createNS("feFuncB"); h.setAttribute("type", "table"), a.appendChild(h), (this.feFuncB = h), t.appendChild(a); } function SVGProLevelsFilter(t, e, i, r) { this.filterManager = e; var s = this.filterManager.effectElements, a = createNS("feComponentTransfer"); (s[10].p.k || 0 !== s[10].p.v || s[11].p.k || 1 !== s[11].p.v || s[12].p.k || 1 !== s[12].p.v || s[13].p.k || 0 !== s[13].p.v || s[14].p.k || 1 !== s[14].p.v) && (this.feFuncR = this.createFeFunc("feFuncR", a)), (s[17].p.k || 0 !== s[17].p.v || s[18].p.k || 1 !== s[18].p.v || s[19].p.k || 1 !== s[19].p.v || s[20].p.k || 0 !== s[20].p.v || s[21].p.k || 1 !== s[21].p.v) && (this.feFuncG = this.createFeFunc("feFuncG", a)), (s[24].p.k || 0 !== s[24].p.v || s[25].p.k || 1 !== s[25].p.v || s[26].p.k || 1 !== s[26].p.v || s[27].p.k || 0 !== s[27].p.v || s[28].p.k || 1 !== s[28].p.v) && (this.feFuncB = this.createFeFunc("feFuncB", a)), (s[31].p.k || 0 !== s[31].p.v || s[32].p.k || 1 !== s[32].p.v || s[33].p.k || 1 !== s[33].p.v || s[34].p.k || 0 !== s[34].p.v || s[35].p.k || 1 !== s[35].p.v) && (this.feFuncA = this.createFeFunc("feFuncA", a)), (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) && (a.setAttribute("color-interpolation-filters", "sRGB"), t.appendChild(a)), (s[3].p.k || 0 !== s[3].p.v || s[4].p.k || 1 !== s[4].p.v || s[5].p.k || 1 !== s[5].p.v || s[6].p.k || 0 !== s[6].p.v || s[7].p.k || 1 !== s[7].p.v) && ((a = createNS("feComponentTransfer")).setAttribute( "color-interpolation-filters", "sRGB" ), a.setAttribute("result", r), t.appendChild(a), (this.feFuncRComposed = this.createFeFunc("feFuncR", a)), (this.feFuncGComposed = this.createFeFunc("feFuncG", a)), (this.feFuncBComposed = this.createFeFunc("feFuncB", a))); } function SVGDropShadowEffect(t, e, i, r, s) { var a = e.container.globalData.renderConfig.filterSize, n = e.data.fs || a; t.setAttribute("x", n.x || a.x), t.setAttribute("y", n.y || a.y), t.setAttribute("width", n.width || a.width), t.setAttribute("height", n.height || a.height), (this.filterManager = e); var o = createNS("feGaussianBlur"); o.setAttribute("in", "SourceAlpha"), o.setAttribute("result", r + "_drop_shadow_1"), o.setAttribute("stdDeviation", "0"), (this.feGaussianBlur = o), t.appendChild(o); var h = createNS("feOffset"); h.setAttribute("dx", "25"), h.setAttribute("dy", "0"), h.setAttribute("in", r + "_drop_shadow_1"), h.setAttribute("result", r + "_drop_shadow_2"), (this.feOffset = h), t.appendChild(h); var l = createNS("feFlood"); l.setAttribute("flood-color", "#00ff00"), l.setAttribute("flood-opacity", "1"), l.setAttribute("result", r + "_drop_shadow_3"), (this.feFlood = l), t.appendChild(l); var p = createNS("feComposite"); p.setAttribute("in", r + "_drop_shadow_3"), p.setAttribute("in2", r + "_drop_shadow_2"), p.setAttribute("operator", "in"), p.setAttribute("result", r + "_drop_shadow_4"), t.appendChild(p); var f = this.createMergeNode(r, [r + "_drop_shadow_4", s]); t.appendChild(f); } extendPrototype([SVGComposableEffect], SVGTintFilter), (SVGTintFilter.prototype.renderFrame = function (t) { if (t || this.filterManager._mdf) { var e = this.filterManager.effectElements[0].p.v, i = this.filterManager.effectElements[1].p.v, r = this.filterManager.effectElements[2].p.v / 100; this.linearFilter.setAttribute( "values", linearFilterValue + " " + r + " 0" ), this.matrixFilter.setAttribute( "values", i[0] - e[0] + " 0 0 0 " + e[0] + " " + (i[1] - e[1]) + " 0 0 0 " + e[1] + " " + (i[2] - e[2]) + " 0 0 0 " + e[2] + " 0 0 0 1 0" ); } }), (SVGFillFilter.prototype.renderFrame = function (t) { if (t || this.filterManager._mdf) { var e = this.filterManager.effectElements[2].p.v, i = this.filterManager.effectElements[6].p.v; this.matrixFilter.setAttribute( "values", "0 0 0 0 " + e[0] + " 0 0 0 0 " + e[1] + " 0 0 0 0 " + e[2] + " 0 0 0 " + i + " 0" ); } }), (SVGStrokeEffect.prototype.initialize = function () { var t, e, i, r, s = this.elem.layerElement.children || this.elem.layerElement.childNodes; for ( 1 === this.filterManager.effectElements[1].p.v ? ((r = this.elem.maskManager.masksProperties.length), (i = 0)) : (r = (i = this.filterManager.effectElements[0].p.v - 1) + 1), (e = createNS("g")).setAttribute("fill", "none"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-dashoffset", 1); i < r; i += 1 ) (t = createNS("path")), e.appendChild(t), this.paths.push({ p: t, m: i }); if (3 === this.filterManager.effectElements[10].p.v) { var a = createNS("mask"), n = createElementID(); a.setAttribute("id", n), a.setAttribute("mask-type", "alpha"), a.appendChild(e), this.elem.globalData.defs.appendChild(a); var o = createNS("g"); for ( o.setAttribute("mask", "url(" + getLocationHref() + "#" + n + ")"); s[0]; ) o.appendChild(s[0]); this.elem.layerElement.appendChild(o), (this.masker = a), e.setAttribute("stroke", "#fff"); } else if ( 1 === this.filterManager.effectElements[10].p.v || 2 === this.filterManager.effectElements[10].p.v ) { if (2 === this.filterManager.effectElements[10].p.v) for ( s = this.elem.layerElement.children || this.elem.layerElement.childNodes; s.length; ) this.elem.layerElement.removeChild(s[0]); this.elem.layerElement.appendChild(e), this.elem.layerElement.removeAttribute("mask"), e.setAttribute("stroke", "#fff"); } (this.initialized = !0), (this.pathMasker = e); }), (SVGStrokeEffect.prototype.renderFrame = function (t) { var e; this.initialized || this.initialize(); var i, r, s = this.paths.length; for (e = 0; e < s; e += 1) if ( -1 !== this.paths[e].m && ((i = this.elem.maskManager.viewData[this.paths[e].m]), (r = this.paths[e].p), (t || this.filterManager._mdf || i.prop._mdf) && r.setAttribute("d", i.lastPath), t || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || i.prop._mdf) ) { var a; if ( 0 !== this.filterManager.effectElements[7].p.v || 100 !== this.filterManager.effectElements[8].p.v ) { var n = 0.01 * Math.min( this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v ), o = 0.01 * Math.max( this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v ), h = r.getTotalLength(); a = "0 0 0 " + h * n + " "; var l, p = h * (o - n), f = 1 + 2 * this.filterManager.effectElements[4].p.v * this.filterManager.effectElements[9].p.v * 0.01, m = Math.floor(p / f); for (l = 0; l < m; l += 1) a += "1 " + 2 * this.filterManager.effectElements[4].p.v * this.filterManager.effectElements[9].p.v * 0.01 + " "; a += "0 " + 10 * h + " 0 0"; } else a = "1 " + 2 * this.filterManager.effectElements[4].p.v * this.filterManager.effectElements[9].p.v * 0.01; r.setAttribute("stroke-dasharray", a); } if ( ((t || this.filterManager.effectElements[4].p._mdf) && this.pathMasker.setAttribute( "stroke-width", 2 * this.filterManager.effectElements[4].p.v ), (t || this.filterManager.effectElements[6].p._mdf) && this.pathMasker.setAttribute( "opacity", this.filterManager.effectElements[6].p.v ), (1 === this.filterManager.effectElements[10].p.v || 2 === this.filterManager.effectElements[10].p.v) && (t || this.filterManager.effectElements[3].p._mdf)) ) { var c = this.filterManager.effectElements[3].p.v; this.pathMasker.setAttribute( "stroke", "rgb(" + bmFloor(255 * c[0]) + "," + bmFloor(255 * c[1]) + "," + bmFloor(255 * c[2]) + ")" ); } }), (SVGTritoneFilter.prototype.renderFrame = function (t) { if (t || this.filterManager._mdf) { var e = this.filterManager.effectElements[0].p.v, i = this.filterManager.effectElements[1].p.v, r = this.filterManager.effectElements[2].p.v, s = r[0] + " " + i[0] + " " + e[0], a = r[1] + " " + i[1] + " " + e[1], n = r[2] + " " + i[2] + " " + e[2]; this.feFuncR.setAttribute("tableValues", s), this.feFuncG.setAttribute("tableValues", a), this.feFuncB.setAttribute("tableValues", n); } }), (SVGProLevelsFilter.prototype.createFeFunc = function (t, e) { var i = createNS(t); return i.setAttribute("type", "table"), e.appendChild(i), i; }), (SVGProLevelsFilter.prototype.getTableValue = function (t, e, i, r, s) { for ( var a, n, o = 0, h = Math.min(t, e), l = Math.max(t, e), p = Array.call(null, { length: 256 }), f = 0, m = s - r, c = e - t; o <= 256; ) (n = (a = o / 256) <= h ? c < 0 ? s : r : a >= l ? c < 0 ? r : s : r + m * Math.pow((a - t) / c, 1 / i)), (p[f] = n), (f += 1), (o += 256 / 255); return p.join(" "); }), (SVGProLevelsFilter.prototype.renderFrame = function (t) { if (t || this.filterManager._mdf) { var e, i = this.filterManager.effectElements; this.feFuncRComposed && (t || i[3].p._mdf || i[4].p._mdf || i[5].p._mdf || i[6].p._mdf || i[7].p._mdf) && ((e = this.getTableValue( i[3].p.v, i[4].p.v, i[5].p.v, i[6].p.v, i[7].p.v )), this.feFuncRComposed.setAttribute("tableValues", e), this.feFuncGComposed.setAttribute("tableValues", e), this.feFuncBComposed.setAttribute("tableValues", e)), this.feFuncR && (t || i[10].p._mdf || i[11].p._mdf || i[12].p._mdf || i[13].p._mdf || i[14].p._mdf) && ((e = this.getTableValue( i[10].p.v, i[11].p.v, i[12].p.v, i[13].p.v, i[14].p.v )), this.feFuncR.setAttribute("tableValues", e)), this.feFuncG && (t || i[17].p._mdf || i[18].p._mdf || i[19].p._mdf || i[20].p._mdf || i[21].p._mdf) && ((e = this.getTableValue( i[17].p.v, i[18].p.v, i[19].p.v, i[20].p.v, i[21].p.v )), this.feFuncG.setAttribute("tableValues", e)), this.feFuncB && (t || i[24].p._mdf || i[25].p._mdf || i[26].p._mdf || i[27].p._mdf || i[28].p._mdf) && ((e = this.getTableValue( i[24].p.v, i[25].p.v, i[26].p.v, i[27].p.v, i[28].p.v )), this.feFuncB.setAttribute("tableValues", e)), this.feFuncA && (t || i[31].p._mdf || i[32].p._mdf || i[33].p._mdf || i[34].p._mdf || i[35].p._mdf) && ((e = this.getTableValue( i[31].p.v, i[32].p.v, i[33].p.v, i[34].p.v, i[35].p.v )), this.feFuncA.setAttribute("tableValues", e)); } }), extendPrototype([SVGComposableEffect], SVGDropShadowEffect), (SVGDropShadowEffect.prototype.renderFrame = function (t) { if (t || this.filterManager._mdf) { if ( ((t || this.filterManager.effectElements[4].p._mdf) && this.feGaussianBlur.setAttribute( "stdDeviation", this.filterManager.effectElements[4].p.v / 4 ), t || this.filterManager.effectElements[0].p._mdf) ) { var e = this.filterManager.effectElements[0].p.v; this.feFlood.setAttribute( "flood-color", rgbToHex( Math.round(255 * e[0]), Math.round(255 * e[1]), Math.round(255 * e[2]) ) ); } if ( ((t || this.filterManager.effectElements[1].p._mdf) && this.feFlood.setAttribute( "flood-opacity", this.filterManager.effectElements[1].p.v / 255 ), t || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) ) { var i = this.filterManager.effectElements[3].p.v, r = (this.filterManager.effectElements[2].p.v - 90) * degToRads, s = i * Math.cos(r), a = i * Math.sin(r); this.feOffset.setAttribute("dx", s), this.feOffset.setAttribute("dy", a); } } }); var _svgMatteSymbols = []; function SVGMatte3Effect(t, e, i) { (this.initialized = !1), (this.filterManager = e), (this.filterElem = t), (this.elem = i), (i.matteElement = createNS("g")), i.matteElement.appendChild(i.layerElement), i.matteElement.appendChild(i.transformedElement), (i.baseElement = i.matteElement); } function SVGGaussianBlurEffect(t, e, i, r) { t.setAttribute("x", "-100%"), t.setAttribute("y", "-100%"), t.setAttribute("width", "300%"), t.setAttribute("height", "300%"), (this.filterManager = e); var s = createNS("feGaussianBlur"); s.setAttribute("result", r), t.appendChild(s), (this.feGaussianBlur = s); } function TransformEffect() {} function SVGTransformEffect(t, e) { this.init(e); } function CVTransformEffect(t) { this.init(t); } return ( (SVGMatte3Effect.prototype.findSymbol = function (t) { for (var e = 0, i = _svgMatteSymbols.length; e < i; ) { if (_svgMatteSymbols[e] === t) return _svgMatteSymbols[e]; e += 1; } return null; }), (SVGMatte3Effect.prototype.replaceInParent = function (t, e) { var i = t.layerElement.parentNode; if (i) { for ( var r, s = i.children, a = 0, n = s.length; a < n && s[a] !== t.layerElement; ) a += 1; a <= n - 2 && (r = s[a + 1]); var o = createNS("use"); o.setAttribute("href", "#" + e), r ? i.insertBefore(o, r) : i.appendChild(o); } }), (SVGMatte3Effect.prototype.setElementAsMask = function (t, e) { if (!this.findSymbol(e)) { var i = createElementID(), r = createNS("mask"); r.setAttribute("id", e.layerId), r.setAttribute("mask-type", "alpha"), _svgMatteSymbols.push(e); var s = t.globalData.defs; s.appendChild(r); var a = createNS("symbol"); a.setAttribute("id", i), this.replaceInParent(e, i), a.appendChild(e.layerElement), s.appendChild(a); var n = createNS("use"); n.setAttribute("href", "#" + i), r.appendChild(n), (e.data.hd = !1), e.show(); } t.setMatte(e.layerId); }), (SVGMatte3Effect.prototype.initialize = function () { for ( var t = this.filterManager.effectElements[0].p.v, e = this.elem.comp.elements, i = 0, r = e.length; i < r; ) e[i] && e[i].data.ind === t && this.setElementAsMask(this.elem, e[i]), (i += 1); this.initialized = !0; }), (SVGMatte3Effect.prototype.renderFrame = function () { this.initialized || this.initialize(); }), (SVGGaussianBlurEffect.prototype.renderFrame = function (t) { if (t || this.filterManager._mdf) { var e = 0.3 * this.filterManager.effectElements[0].p.v, i = this.filterManager.effectElements[1].p.v, r = 3 == i ? 0 : e, s = 2 == i ? 0 : e; this.feGaussianBlur.setAttribute("stdDeviation", r + " " + s); var a = 1 == this.filterManager.effectElements[2].p.v ? "wrap" : "duplicate"; this.feGaussianBlur.setAttribute("edgeMode", a); } }), (TransformEffect.prototype.init = function (t) { (this.effectsManager = t), (this.type = effectTypes.TRANSFORM_EFFECT), (this.matrix = new Matrix()), (this.opacity = -1), (this._mdf = !1), (this._opMdf = !1); }), (TransformEffect.prototype.renderFrame = function (t) { if ( ((this._opMdf = !1), (this._mdf = !1), t || this.effectsManager._mdf) ) { var e = this.effectsManager.effectElements, i = e[0].p.v, r = e[1].p.v, s = 1 === e[2].p.v, a = e[3].p.v, n = s ? a : e[4].p.v, o = e[5].p.v, h = e[6].p.v, l = e[7].p.v; this.matrix.reset(), this.matrix.translate(-i[0], -i[1], i[2]), this.matrix.scale(0.01 * n, 0.01 * a, 1), this.matrix.rotate(-l * degToRads), this.matrix.skewFromAxis(-o * degToRads, (h + 90) * degToRads), this.matrix.translate(r[0], r[1], 0), (this._mdf = !0), this.opacity !== e[8].p.v && ((this.opacity = e[8].p.v), (this._opMdf = !0)); } }), extendPrototype([TransformEffect], SVGTransformEffect), extendPrototype([TransformEffect], CVTransformEffect), registerRenderer("canvas", CanvasRenderer), registerRenderer("html", HybridRenderer), registerRenderer("svg", SVGRenderer), ShapeModifiers.registerModifier("tm", TrimModifier), ShapeModifiers.registerModifier("pb", PuckerAndBloatModifier), ShapeModifiers.registerModifier("rp", RepeaterModifier), ShapeModifiers.registerModifier("rd", RoundCornersModifier), ShapeModifiers.registerModifier("zz", ZigZagModifier), ShapeModifiers.registerModifier("op", OffsetPathModifier), setExpressionsPlugin(Expressions), setExpressionInterfaces(getInterface), initialize$1(), initialize(), registerEffect$1(20, SVGTintFilter, !0), registerEffect$1(21, SVGFillFilter, !0), registerEffect$1(22, SVGStrokeEffect, !1), registerEffect$1(23, SVGTritoneFilter, !0), registerEffect$1(24, SVGProLevelsFilter, !0), registerEffect$1(25, SVGDropShadowEffect, !0), registerEffect$1(28, SVGMatte3Effect, !1), registerEffect$1(29, SVGGaussianBlurEffect, !0), registerEffect$1(35, SVGTransformEffect, !1), registerEffect(35, CVTransformEffect), lottie ); }); ================================================ FILE: web/loader.css ================================================ body{ margin: 0; } #loader { width: 100vw; height: 100vh; /* display: block; */ display: flex; flex-direction: column; justify-content: center; justify-items: center; align-items: center; align-content: center; background-color: #fff9e6; } #loader-title { font-family: Butler ,-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-weight: 500; font-size: 22; color: white; } .lds-heart { display: inline-block; position: relative; width: 80px; height: 80px; transform: rotate(45deg); transform-origin: 40px 40px; } .lds-heart div { top: 32px; left: 32px; position: absolute; width: 32px; height: 32px; background: #728C6D; animation: lds-heart 1.2s infinite cubic-bezier(0.215, 0.61, 0.355, 1); } .lds-heart div:after, .lds-heart div:before { content: " "; position: absolute; display: block; width: 32px; height: 32px; background: #728C6D; } .lds-heart div:before { left: -24px; border-radius: 50% 0 0 50%; } .lds-heart div:after { top: -24px; border-radius: 50% 50% 0 0; } @keyframes lds-heart { 0% { transform: scale(0.95); } 5% { transform: scale(1.1); } 39% { transform: scale(0.85); } 45% { transform: scale(1); } 60% { transform: scale(0.95); } 100% { transform: scale(0.9); } } ================================================ FILE: web/loading_rosary.json ================================================ {"v":"5.12.1","fr":120,"ip":0,"op":286,"w":720,"h":720,"nm":"CHAPELET-LOGIN","ddd":0,"assets":[{"id":"comp_0","nm":"Précomp. 1","fr":120,"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"croix","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[359.25,435,0],"ix":2,"l":2},"a":{"a":0,"k":[1499.141,1699.646,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.36,0.36,0.36],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0]},"t":0,"s":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,1.725]},"o":{"x":[0.21,0.21,0.21],"y":[0,0,0]},"t":144,"s":[100,100,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":207,"s":[110,110,100]},{"t":256,"s":[100,100,100]}],"ix":6,"l":2,"x":"var $bm_rt;\n$bm_rt = loopOut();"}},"ao":0,"w":3000,"h":3000,"ip":0,"op":1200,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":">>Controller","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-10,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.85,"y":1},"o":{"x":0.561,"y":0},"t":0,"s":[356,553,0],"to":[-541.11,-540.985,0],"ti":[515.428,-558.256,0]},{"i":{"x":0.92,"y":1},"o":{"x":0.79,"y":0},"t":171,"s":[372.129,539.652,0],"to":[-21.845,23.66,0],"ti":[28.351,-27.669,0]},{"i":{"x":0.92,"y":1},"o":{"x":0.99,"y":0},"t":224,"s":[357,551.822,0],"to":[-2.459,2.4,0],"ti":[-0.5,-0.333,0]},{"t":271,"s":[358,547.408,0]}],"ix":2,"l":2,"x":"var $bm_rt;\n$bm_rt = loopOut();"},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":0,"s":[88.91,29.737,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":40,"s":[122.798,41.072,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":119,"s":[132.501,44.317,100]},{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":157,"s":[141.611,47.364,100]},{"t":221,"s":[94.89,31.737,100]}],"ix":6,"l":2,"x":"var $bm_rt;\nvar temp;\ntemp = transform.scale[0];\n$bm_rt = [\n temp,\n temp\n];"}},"ao":0,"ef":[{"ty":5,"nm":"Falloff Master","np":5,"mn":"Pseudo/b0OA8d132c8bv","ix":1,"en":1,"ef":[{"ty":7,"nm":"Enable","mn":"Pseudo/b0OA8d132c8bv-0001","ix":1,"v":{"a":0,"k":1,"ix":1}},{"ty":7,"nm":"Invert","mn":"Pseudo/b0OA8d132c8bv-0002","ix":2,"v":{"a":0,"k":0,"ix":2}},{"ty":0,"nm":"Falloff","mn":"Pseudo/b0OA8d132c8bv-0003","ix":3,"v":{"a":0,"k":16.674,"ix":3,"x":"var $bm_rt;\n$bm_rt = value > 100 ? 100 : value;"}}]},{"ty":5,"nm":"Falloff - Echelle","np":5,"mn":"Pseudo/iSOkadb76865x","ix":2,"en":1,"ef":[{"ty":0,"nm":"X Amount","mn":"Pseudo/iSOkadb76865x-0001","ix":1,"v":{"a":0,"k":100,"ix":1}},{"ty":0,"nm":"Y Amount","mn":"Pseudo/iSOkadb76865x-0002","ix":2,"v":{"a":0,"k":100,"ix":2}},{"ty":0,"nm":"Z Amount","mn":"Pseudo/iSOkadb76865x-0003","ix":3,"v":{"a":0,"k":0,"ix":3}}]},{"ty":5,"nm":"Falloff - Opacité","np":3,"mn":"Pseudo/ajO511f0e9a91","ix":3,"en":1,"ef":[{"ty":0,"nm":"X Amount","mn":"Pseudo/ajO511f0e9a91-0001","ix":1,"v":{"a":0,"k":100,"ix":1}}]}],"shapes":[],"ip":0,"op":1209,"st":12,"ct":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"1","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacité')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[237.185,406.348,0],"ix":2,"l":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1,"l":2},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"l":2,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1313,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"2","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacité')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[191,321.029,0],"ix":2,"l":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1,"l":2},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"l":2,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"3","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacité')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[202.935,229.728,0],"ix":2,"l":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1,"l":2},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"l":2,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"4","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacité')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[267.099,155.338,0],"ix":2,"l":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1,"l":2},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"l":2,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"5","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacité')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[355,130,0],"ix":2,"l":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1,"l":2},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"l":2,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"6","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacité')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[452.053,161.548,0],"ix":2,"l":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1,"l":2},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"l":2,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"7","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacité')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[508.856,229.728,0],"ix":2,"l":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1,"l":2},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"l":2,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"8","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacité')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[520,321.029,0],"ix":2,"l":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1,"l":2},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"l":2,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"9","sr":1,"ks":{"o":{"a":0,"k":30,"ix":11,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n $bm_rt = l = $bm_mul(a.effect('Falloff - Opacité')('Pseudo/ajO511f0e9a91-0001'), -1);\n if (c > 0) {\n $bm_rt = $bm_sub(value, $bm_mul(l, $bm_sub(1, k)));\n } else {\n $bm_rt = $bm_sub(value, $bm_mul(l, k));\n }\n}"},"r":{"a":0,"k":-10,"ix":10},"p":{"a":0,"k":[482.046,406.348,0],"ix":2,"l":2},"a":{"a":0,"k":[-3.75,-83.75,0],"ix":1,"l":2},"s":{"a":0,"k":[334.146,334.146,100],"ix":6,"l":2,"x":"var $bm_rt;\nvar a, b, c, isEnabled, d, o, f, g, h, dx, dy, iSq, i, l, m, n, result, result;\na = thisComp.layer('>>Controller');\nb = a.position.value;\nc = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0002');\n$bm_rt = isEnabled = a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0001');\nif (isEnabled == 0) {\n $bm_rt = value;\n} else {\n d = $bm_div(a.effect('Falloff Master')('Pseudo/b0OA8d132c8bv-0003').value, 100);\n o = $bm_div(a.scale.value[0], 100);\n f = $bm_div($bm_mul(o, 300), 2);\n g = $bm_mul(f, d);\n h = thisLayer.toWorld(thisLayer.anchorPoint);\n dx = $bm_sub(b[0], h[0]);\n dy = $bm_sub(b[1], h[1]);\n iSq = $bm_sum($bm_mul(dx, dx), $bm_mul(dy, dy));\n i = Math.sqrt(iSq);\n var k;\n if (i > f) {\n k = 0;\n } else if (i < g) {\n k = 1;\n } else {\n k = $bm_sub(1, $bm_div($bm_sub(i, g), $bm_sub(f, g)));\n }\n l = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0001'), -1);\n m = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0002'), -1);\n $bm_rt = n = $bm_mul(a.effect('Falloff - Echelle')('Pseudo/iSOkadb76865x-0003'), -1);\n if (c > 0) {\n result = [\n $bm_sub(value[0], $bm_mul(l, $bm_sub(1, k))),\n $bm_sub(value[1], $bm_mul(m, $bm_sub(1, k)))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, $bm_sub(1, k))));\n }\n $bm_rt = result;\n } else {\n result = [\n $bm_sub(value[0], $bm_mul(l, k)),\n $bm_sub(value[1], $bm_mul(m, k))\n ];\n if (value.length === 3) {\n result.push($bm_sub(value[2], $bm_mul(n, k)));\n }\n $bm_rt = result;\n }\n}"}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.661,0],[0,-5.661],[-5.661,0],[0,5.661]],"o":[[-5.661,0],[0,5.661],[5.661,0],[0,-5.661]],"v":[[0,-10.25],[-10.25,0],[0,10.25],[10.25,0]],"c":true},"ix":2},"nm":"Tracé 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.819607902976,0.400000029919,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.75,-83.75],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.454901993275,0.61960786581,0.4392157197,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":1314,"st":0,"ct":1,"bm":0}]},{"id":"comp_1","nm":"croix","fr":24,"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Calque de forme 15","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[1500,1744,0],"ix":2,"l":2},"a":{"a":0,"k":[49,244,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[42,236],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Tracé rectangulaire 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.766274964576,0.137628996606,0.137628996606,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.211764720842,0.270588235294,0.309803921569,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[49,244],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"rd","nm":"Sommets arrondis 1","r":{"a":0,"k":15,"ix":1},"ix":2,"mn":"ADBE Vector Filter - RC","hd":false}],"ip":0,"op":1320,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Calque de forme 14","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[1500,1694,0],"ix":2,"l":2},"a":{"a":0,"k":[49,244,0],"ix":1,"l":2},"s":{"a":0,"k":[100,56.78,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[42,236],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Tracé rectangulaire 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.766274964576,0.137628996606,0.137628996606,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Contour 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.211764720842,0.270588235294,0.309803921569,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fond 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[49,244],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformer "}],"nm":"Rectangle 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"rd","nm":"Sommets arrondis 1","r":{"a":0,"k":24,"ix":1},"ix":2,"mn":"ADBE Vector Filter - RC","hd":false}],"ip":0,"op":1320,"st":0,"ct":1,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"Précomp. 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[364,384,0],"ix":2,"l":2},"a":{"a":0,"k":[360,360,0],"ix":1,"l":2},"s":{"a":0,"k":[130,130,100],"ix":6,"l":2}},"ao":0,"w":720,"h":720,"ip":0,"op":1200,"st":0,"bm":0}],"markers":[{"tm":271,"cm":"1","dr":0}],"props":{}} ================================================ FILE: web/lottie.js ================================================ "undefined"!=typeof navigator&&function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lottie=e()}(this,(function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var i,r,s=t.length;for(i=0;i1?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[2]+=e,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[0]+=e/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,r){return t<0&&(t=0),e<0&&(e=0),r<0&&(r=0),"#"+i[t]+i[e]+i[r]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t},getIdPrefix=function(){return idPrefix$1};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return _typeof$5="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},_typeof$5(t)}var dataManager=function(){var t,e,i=1,r=[],s={onmessage:function(){},postMessage:function(e){t({data:e})}},a={postMessage:function(t){s.onmessage({data:t})}};function n(){e||(e=function(e){if(window.Worker&&window.Blob&&getWebWorker()){var i=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),r=URL.createObjectURL(i);return new Worker(r)}return t=e,s}((function(t){if(a.dataManager||(a.dataManager=function(){function t(s,a){var n,o,h,l,p,m,c=s.length;for(o=0;o=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)r(t[e].ks.k);else for(a=t[e].ks.k.length,s=0;si[0]||!(i[0]>t[0])&&(t[1]>i[1]||!(i[1]>t[1])&&(t[2]>i[2]||!(i[2]>t[2])&&null))}var a,n=function(){var t=[4,4,14];function e(t){var e,i,r,s=t.length;for(e=0;e=0;i-=1)if("sh"===t[i].ty)if(t[i].ks.k.i)t[i].ks.k.c=t[i].closed;else for(s=t[i].ks.k.length,r=0;r500)&&(this._imageLoaded(),clearInterval(i)),e+=1}.bind(this),50)}function a(t){var e={assetData:t},i=r(t,this.assetsPath,this.path);return dataManager.loadData(i,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function n(){this._imageLoaded=e.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=s.bind(this),this.createFootageData=a.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return n.prototype={loadAssets:function(t,e){var i;this.imagesLoadedCb=e;var r=t.length;for(i=0;ithis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,i,r=this.animationData.layers,s=r.length,a=t.layers,n=a.length;for(i=0;ithis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,i=0;i=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(i=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(i=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==i&&this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var i,r=t.length;for(i=0;i=0;i-=1)e[i].animation.destroy(t)},t.freeze=function(){n=!0},t.unfreeze=function(){n=!1,d()},t.setVolume=function(t,i){var s;for(s=0;s=.001?function(t,e,i,r){for(var s=0;s<4;++s){var a=h(e,i,r);if(0===a)return e;e-=(o(e,i,r)-t)/a}return e}(t,l,e,r):0===p?l:function(t,e,i,r,s){var a,n,h=0;do{(a=o(n=e+(i-e)/2,r,s)-t)>0?i=n:e=n}while(Math.abs(a)>1e-7&&++h<10);return n}(t,a,a+i,e,r)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,i){var r=0,s=t,a=createSizedArray(s);return{newElement:function(){return r?a[r-=1]:e()},release:function(t){r===s&&(a=pooling.double(a),s*=2),i&&i(t),a[r]=t,r+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,i=t.lengths.length;for(e=0;e-.001&&n<.001}var i=function(t,e,i,r){var s,a,n,o,h,l,p=getDefaultCurveSegments(),f=0,m=[],c=[],d=bezierLengthPool.newElement();for(n=i.length,s=0;sn?-1:1,l=!0;l;)if(r[a]<=n&&r[a+1]>n?(o=(n-r[a])/(r[a+1]-r[a]),l=!1):a+=h,a<0||a>=s-1){if(a===s-1)return i[a];l=!1}return i[a]+(i[a+1]-i[a])*o}var h=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,r=segmentsLengthPool.newElement(),s=t.c,a=t.v,n=t.o,o=t.i,h=t._length,l=r.lengths,p=0;for(e=0;e1&&(a=1);var p,f=o(a,l),m=o(n=n>1?1:n,l),c=e.length,d=1-f,u=1-m,y=d*d*d,g=f*d*d*3,v=f*f*d*3,b=f*f*f,x=d*d*u,P=f*d*u+d*f*u+d*d*m,E=f*f*u+d*f*m+f*d*m,S=f*f*m,C=d*u*u,_=f*u*u+d*m*u+d*u*m,A=f*m*u+d*m*m+f*u*m,T=f*m*m,M=u*u*u,k=m*u*u+u*m*u+u*u*m,D=m*m*u+u*m*m+m*u*m,F=m*m*m;for(p=0;pc?m>d?m-c-d:d-c-m:d>c?d-c-m:c-m-d)>-1e-4&&f<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(t,e){var i,r=this.offsetTime;"multidimensional"===this.propType&&(i=createTypedArray("float32",this.pv.length));for(var s,a,n,o,h,l,p,f,m,c=e.lastIndex,d=c,u=this.keyframes.length-1,y=!0;y;){if(s=this.keyframes[d],a=this.keyframes[d+1],d===u-1&&t>=a.t-r){s.h&&(s=a),c=0;break}if(a.t-r>t){c=d;break}d=v||t=v?x.points.length-1:0;for(h=x.points[P].point.length,o=0;o=C&&S=v)i[0]=g[0],i[1]=g[1],i[2]=g[2];else if(t<=b)i[0]=s.s[0],i[1]=s.s[1],i[2]=s.s[2];else{quaternionToEuler(i,slerp(createQuaternion(s.s),createQuaternion(g),(t-b)/(v-b)))}else for(d=0;d=v?l=1:t1e-6?(r=Math.acos(s),a=Math.sin(r),n=Math.sin((1-i)*r)/a,o=Math.sin(i*r)/a):(n=1-i,o=i),h[0]=n*l+o*c,h[1]=n*p+o*d,h[2]=n*f+o*u,h[3]=n*m+o*y,h}function quaternionToEuler(t,e){var i=e[0],r=e[1],s=e[2],a=e[3],n=Math.atan2(2*r*a-2*i*s,1-2*r*r-2*s*s),o=Math.asin(2*i*r+2*s*a),h=Math.atan2(2*i*a-2*r*s,1-2*i*i-2*s*s);t[0]=n/degToRads,t[1]=o/degToRads,t[2]=h/degToRads}function createQuaternion(t){var e=t[0]*degToRads,i=t[1]*degToRads,r=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(i/2),n=Math.cos(r/2),o=Math.sin(e/2),h=Math.sin(i/2),l=Math.sin(r/2);return[o*h*n+s*a*l,o*a*n+s*h*l,s*h*n-o*a*l,s*a*n-o*h*l]}function getValueAtCurrentTime(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=i&&t>=i||this._caching.lastFrame=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(t,this._caching);this.pv=r}return this._caching.lastFrame=t,this.pv}function setVValue(t){var e;if("unidimensional"===this.propType)e=t*this.mult,mathAbs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var i=0,r=this.v.length;i1e-5&&(this.v[i]=e,this._mdf=!0),i+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[r]||a[r]&&!s)&&(a[r]=pointPool.newElement()),a[r][0]=t,a[r][1]=e},ShapePath.prototype.setTripleAt=function(t,e,i,r,s,a,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(i,r,"o",n,o),this.setXYAt(s,a,"i",n,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,i=this.o,r=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],r[0][0],r[0][1],i[0][0],i[0][1],0,!1),s=1);var a,n=this._length-1,o=this._length;for(a=s;a=c[c.length-1].t-this.offsetTime)r=c[c.length-1].s?c[c.length-1].s[0]:c[c.length-2].e[0],a=!0;else{for(var d,u,y,g=m,v=c.length-1,b=!0;b&&(d=c[g],!((u=c[g+1]).t-this.offsetTime>t));)g=u.t-this.offsetTime)p=1;else if(tr&&e>r)||(this._caching.lastIndex=s0||t>-1e-6&&t<0?r(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+w(t[0])+","+w(t[1])+","+w(t[4])+","+w(t[5])+","+w(t[12])+","+w(t[13])+")"}return function(){this.reset=s,this.rotate=a,this.rotateX=n,this.rotateY=o,this.rotateZ=h,this.skew=p,this.skewFromAxis=f,this.shear=l,this.scale=m,this.setTransform=c,this.translate=d,this.transform=u,this.multiply=y,this.applyToPoint=P,this.applyToX=E,this.applyToY=S,this.applyToZ=C,this.applyToPointArray=k,this.applyToTriplePoints=M,this.applyToPointStringified=D,this.toCSS=F,this.to2dCSS=I,this.clone=b,this.cloneFromProps=x,this.equals=v,this.inversePoints=T,this.inversePoint=A,this.getInverseMatrix=_,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return _typeof$3="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},_typeof$3(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),i=0;i=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n,o,h=[],l=a.length;for(n=0;nr+i))p=o.s*s<=r?0:(o.s*s-r)/i,f=o.e*s>=r+i?1:(o.e*s-r)/i,h.push([p,f])}return h.length||h.push([0,0]),h},TrimModifier.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e1?1+a:this.s.v<0?0+a:this.s.v+a)>(i=this.e.v>1?1+a:this.e.v<0?0+a:this.e.v+a)){var n=e;e=i,i=n}e=1e-4*Math.round(1e4*e),i=1e-4*Math.round(1e4*i),this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var o,h,l,p,f,m=this.shapes.length,c=0;if(i===e)for(s=0;s=0;s-=1)if((d=this.shapes[s]).shape._mdf){for((u=d.localShapeCollection).releaseShapes(),2===this.m&&m>1?(g=this.calculateShapeEdges(e,i,d.totalShapeLength,x,c),x+=d.totalShapeLength):g=[[v,b]],h=g.length,o=0;o=1?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var P=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var E=P.pop();this.addPaths(P,u),P=this.addShapes(d,y[1],E)}else this.addPaths(P,u),P=this.addShapes(d,y[1]);this.addPaths(P,u)}}d.shape.paths=u}}},TrimModifier.prototype.addPaths=function(t,e){var i,r=t.length;for(i=0;ie.e){i.c=!1;break}e.s<=d&&e.e>=d+n.addedLength?(this.addSegment(m[r].v[s-1],m[r].o[s-1],m[r].i[s],m[r].v[s],i,o,y),y=!1):(l=bez.getNewSegment(m[r].v[s-1],m[r].v[s],m[r].o[s-1],m[r].i[s],(e.s-d)/n.addedLength,(e.e-d)/n.addedLength,h[s-1]),this.addSegmentFromArray(l,i,o,y),y=!1,i.c=!1),d+=n.addedLength,o+=1}if(m[r].c&&h.length){if(n=h[s-1],d<=e.e){var g=h[s-1].addedLength;e.s<=d&&e.e>=d+g?(this.addSegment(m[r].v[s-1],m[r].o[s-1],m[r].i[0],m[r].v[0],i,o,y),y=!1):(l=bez.getNewSegment(m[r].v[s-1],m[r].v[0],m[r].o[s-1],m[r].i[0],(e.s-d)/g,(e.e-d)/g,h[s-1]),this.addSegmentFromArray(l,i,o,y),y=!1,i.c=!1)}else i.c=!1;d+=n.addedLength,o+=1}if(i._length&&(i.setXYAt(i.v[p][0],i.v[p][1],"i",p),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),d>e.e)break;r=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),s=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(r=this.p.pv,s=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],s=[];var a=this.px,n=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(r[0]=a.getValueAtTime((a.keyframes[0].t+.01)/i,0),r[1]=n.getValueAtTime((n.keyframes[0].t+.01)/i,0),s[0]=a.getValueAtTime(a.keyframes[0].t/i,0),s[1]=n.getValueAtTime(n.keyframes[0].t/i,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(r[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/i,0),r[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/i,0),s[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/i,0),s[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/i,0)):(r=[a.pv,n.pv],s[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/i,a.offsetTime),s[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/i,n.offsetTime))}else r=s=t;this.v.rotate(-Math.atan2(r[1]-s[1],r[0]-s[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,i,r){return new e(t,i,r)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(t,e){return 1e5*Math.abs(t-e)<=Math.min(Math.abs(t),Math.abs(e))}function floatZero(t){return Math.abs(t)<=1e-5}function lerp(t,e,i){return t*(1-i)+e*i}function lerpPoint(t,e,i){return[lerp(t[0],e[0],i),lerp(t[1],e[1],i)]}function quadRoots(t,e,i){if(0===t)return[];var r=e*e-4*t*i;if(r<0)return[];var s=-e/(2*t);if(0===r)return[s];var a=Math.sqrt(r)/(2*t);return[s-a,s+a]}function polynomialCoefficients(t,e,i,r){return[3*e-t-3*i+r,3*t-6*e+3*i,-3*t+3*e,t]}function singlePoint(t){return new PolynomialBezier(t,t,t,t,!1)}function PolynomialBezier(t,e,i,r,s){s&&pointEqual(t,e)&&(e=lerpPoint(t,r,1/3)),s&&pointEqual(i,r)&&(i=lerpPoint(t,r,2/3));var a=polynomialCoefficients(t[0],e[0],i[0],r[0]),n=polynomialCoefficients(t[1],e[1],i[1],r[1]);this.a=[a[0],n[0]],this.b=[a[1],n[1]],this.c=[a[2],n[2]],this.d=[a[3],n[3]],this.points=[t,e,i,r]}function extrema(t,e){var i=t.points[0][e],r=t.points[t.points.length-1][e];if(i>r){var s=r;r=i,i=s}for(var a=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),n=0;n0&&a[n]<1){var o=t.point(a[n])[e];or&&(r=o)}return{min:i,max:r}}function intersectData(t,e,i){var r=t.boundingBox();return{cx:r.cx,cy:r.cy,width:r.width,height:r.height,bez:t,t:(e+i)/2,t1:e,t2:i}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return 2*Math.abs(t.cx-e.cx)=a||t.width<=r&&t.height<=r&&e.width<=r&&e.height<=r)s.push([t.t,e.t]);else{var n=splitData(t),o=splitData(e);intersectsImpl(n[0],o[0],i+1,r,s,a),intersectsImpl(n[0],o[1],i+1,r,s,a),intersectsImpl(n[1],o[0],i+1,r,s,a),intersectsImpl(n[1],o[1],i+1,r,s,a)}}function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,i,r){var s=[t[0],t[1],1],a=[e[0],e[1],1],n=[i[0],i[1],1],o=[r[0],r[1],1],h=crossProduct(crossProduct(s,a),crossProduct(n,o));return floatZero(h[2])?null:[h[0]/h[2],h[1]/h[2]]}function polarOffset(t,e,i){return[t[0]+Math.cos(e)*i,t[1]-Math.sin(e)*i]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}function setPoint(t,e,i,r,s,a,n){var o=i-Math.PI/2,h=i+Math.PI/2,l=e[0]+Math.cos(i)*r*s,p=e[1]-Math.sin(i)*r*s;t.setTripleAt(l,p,l+Math.cos(o)*a,p-Math.sin(o)*a,l+Math.cos(h)*n,p-Math.sin(h)*n,t.length())}function getPerpendicularVector(t,e){var i=[e[0]-t[0],e[1]-t[1]],r=.5*-Math.PI;return[Math.cos(r)*i[0]-Math.sin(r)*i[1],Math.sin(r)*i[0]+Math.cos(r)*i[1]]}function getProjectingAngle(t,e){var i=0===e?t.length()-1:e-1,r=(e+1)%t.length(),s=getPerpendicularVector(t.v[i],t.v[r]);return Math.atan2(0,1)-Math.atan2(s[1],s[0])}function zigZagCorner(t,e,i,r,s,a,n){var o=getProjectingAngle(e,i),h=e.v[i%e._length],l=e.v[0===i?e._length-1:i-1],p=e.v[(i+1)%e._length],f=2===a?Math.sqrt(Math.pow(h[0]-l[0],2)+Math.pow(h[1]-l[1],2)):0,m=2===a?Math.sqrt(Math.pow(h[0]-p[0],2)+Math.pow(h[1]-p[1],2)):0;setPoint(t,e.v[i%e._length],o,n,r,m/(2*(s+1)),f/(2*(s+1)),a)}function zigZagSegment(t,e,i,r,s,a){for(var n=0;n1&&e.length>1&&(s=getIntersection(t[0],e[e.length-1]))?[[t[0].split(s[0])[0]],[e[e.length-1].split(s[1])[1]]]:[i,r]}function pruneIntersections(t){for(var e,i=1;i1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var i,r,s,a,n=t.inflectionPoints();if(0===n.length)return[offsetSegment(t,e)];if(1===n.length||floatEqual(n[1],1))return i=(s=t.split(n[0]))[0],r=s[1],[offsetSegment(i,e),offsetSegment(r,e)];i=(s=t.split(n[0]))[0];var o=(n[1]-n[0])/(1-n[0]);return a=(s=s[1].split(o))[0],r=s[1],[offsetSegment(i,e),offsetSegment(a,e),offsetSegment(r,e)]}function OffsetPathModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],i="normal",r="normal",s=e.length,a=0;a0;)i-=1,this._elements.unshift(e[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,i=t.length;for(e=0;e0?Math.floor(m):Math.ceil(m),u=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,x=0;if(m>0){for(;xd;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),x-=1;c&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-c,!0),x-=c)}for(r=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,a=this._currentCopies;a;){if(b=(i=(e=this.elemsData[r].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(r/(this._currentCopies-1)),0!==x){for((0!==r&&1===s||r!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v0&&r<1?[e]:[]:[e-r,e+r].filter((function(t){return t>0&&t<1}))},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),i=lerpPoint(this.points[1],this.points[2],t),r=lerpPoint(this.points[2],this.points[3],t),s=lerpPoint(e,i,t),a=lerpPoint(i,r,t),n=lerpPoint(s,a,t);return[new PolynomialBezier(this.points[0],e,s,n,!0),new PolynomialBezier(n,a,r,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}},PolynomialBezier.prototype.intersections=function(t,e,i){void 0===e&&(e=2),void 0===i&&(i=7);var r=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,r,i),r},PolynomialBezier.shapeSegment=function(t,e){var i=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[i],t.v[i],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var i=(e+1)%t.length();return new PolynomialBezier(t.v[i],t.i[i],t.o[e],t.v[e],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(t,e,i,r){var s=t._length,a=shapePool.newElement();if(a.c=t.c,t.c||(s-=1),0===s)return a;var n=-1,o=PolynomialBezier.shapeSegment(t,0);zigZagCorner(a,t,0,e,i,r,n);for(var h=0;h=0;a-=1)o=PolynomialBezier.shapeSegmentInverted(t,a),l.push(offsetSegmentSplit(o,e));l=pruneIntersections(l);var p=null,f=null;for(a=0;a=55296&&i<=56319){var r=t.charCodeAt(1);r>=56320&&r<=57343&&(e=1024*(i-55296)+r-56320+65536)}return e}function o(t){var e=n(t);return e>=127462&&e<=127487}var h=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};h.isModifier=function(t,e){var i=t.toString(16)+e.toString(16);return-1!==r.indexOf(i)},h.isZeroWidthJoiner=function(t){return 8205===t},h.isFlagEmoji=function(t){return o(t.substr(0,2))&&o(t.substr(2,2))},h.isRegionalCode=o,h.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},h.isRegionalFlag=function(t,e){var r=n(t.substr(e,2));if(r!==i)return!1;var s=0;for(e+=2;s<5;){if((r=n(t.substr(e,2)))<917601||r>917626)return!1;s+=1,e+=2}return 917631===n(t.substr(e,2))},h.isVariationSelector=function(t){return 65039===t},h.BLACK_FLAG_CODE_POINT=i;var l={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var i,r,s=t.length,a=this.chars.length;for(e=0;e0&&(p=!1),p){var f=createTag("style");f.setAttribute("f-forigin",r[i].fOrigin),f.setAttribute("f-origin",r[i].origin),f.setAttribute("f-family",r[i].fFamily),f.type="text/css",f.innerText="@font-face {font-family: "+r[i].fFamily+"; font-style: normal; src: url('"+r[i].fPath+"');}",e.appendChild(f)}}else if("g"===r[i].fOrigin||1===r[i].origin){for(h=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),l=0;lt?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,i,r=this.layers.length;for(this.completeLayers=!0,e=r-1;e>=0;e-=1)this.elements[e]||(i=this.layers[e]).ip-i.st<=t-this.layers[e].st&&i.op-i.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+y+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var t=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:t,localMat:t,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,i=0,r=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;i1&&(a+=" C"+e.o[r-1][0]+","+e.o[r-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),i.lastPath!==a){var n="";i.elem&&(e.c&&(n=t.inv?this.solidPath+a:a),i.elem.setAttribute("d",n)),i.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};return t.createFilter=function(t,e){var i=createNS("filter");i.setAttribute("id",t),!0!==e&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%"));return i},t.createAlphaToLuminanceFilter=function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t},t}(),featureSupport=function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(t){var e,i,r="SourceGraphic",s=t.data.ef?t.data.ef.length:0,a=createElementID(),n=filtersFactory.createFilter(a,!0),o=0;for(this.filters=[],e=0;e=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,i=0,r=e.length;i.01)return!1;i+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t0;)h=r.transformers[d].mProps._mdf||h,c-=1,d-=1;if(h)for(c=y-r.styles[p].lvl,d=r.transformers.length-1;c>0;)m.multiply(r.transformers[d].mProps.v),c-=1,d-=1}else m=t;if(n=(f=r.sh.paths)._length,h){for(o="",a=0;a=1?v=.99:v<=-1&&(v=-.99);var b=o*v,x=Math.cos(g+e.a.v)*b+p[0],P=Math.sin(g+e.a.v)*b+p[1];h.setAttribute("fx",x),h.setAttribute("fy",P),l&&!e.g._collapsable&&(e.of.setAttribute("fx",x),e.of.setAttribute("fy",P))}}function h(t,e,i){var r=e.style,s=e.d;s&&(s._mdf||i)&&s.dashStr&&(r.pElem.setAttribute("stroke-dasharray",s.dashStr),r.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||i)&&r.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i)&&r.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||i)&&(r.pElem.setAttribute("stroke-width",e.w.v),r.msElem&&r.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return a;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return s;case"tr":return i;case"no":return r;default:return null}}}}();function SVGShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,i),this.prevViewData=[]}function LetterProps(t,e,i,r,s,a){this.o=t,this.sw=e,this.sc=i,this.fc=r,this.m=s,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!i,fc:!!r,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,e.d&&e.d.sid&&(e.d=t.globalData.slotManager.getProp(e.d)),this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,i,r,s=this.shapes.length,a=this.stylesList.length,n=[],o=!1;for(i=0;i1&&o&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,i=t.length;for(e=0;e=0;o-=1){if((m=this.searchProcessedElement(t[o]))?e[o]=i[m-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)m?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==r&&r.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(m)for(l=e[o].it.length,h=0;h1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,i=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var r;this.lock=!0,this._mdf=!1;var s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(r=0;re);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,i,r=[],s=0,a=t.length,n=!1,o=!1,h="";s=55296&&e<=56319?FontManager.isRegionalFlag(t,s)?h=t.substr(s,14):(i=t.charCodeAt(s+1))>=56320&&i<=57343&&(FontManager.isModifier(e,i)?(h=t.substr(s,2),n=!0):h=FontManager.isFlagEmoji(t.substr(s,4))?t.substr(s,4):t.substr(s,2)):e>56319?(i=t.charCodeAt(s+1),FontManager.isVariationSelector(e)&&(n=!0)):FontManager.isZeroWidthJoiner(e)&&(n=!0,o=!0),n?(r[r.length-1]+=h,n=!1):r.push(h),s+=h.length;return r},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,i,r,s,a,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,m=l.m.g,c=0,d=0,u=0,y=[],g=0,v=0,b=h.getFontByName(t.f),x=0,P=getFontProperties(b);t.fWeight=P.weight,t.fStyle=P.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),i=t.finalText.length,t.finalLineHeight=t.lh;var E,S=t.tr/1e3*t.finalSize;if(t.sz)for(var C,_,A=!0,T=t.sz[0],M=t.sz[1];A;){C=0,g=0,i=(_=this.buildFinalText(t.t)).length,S=t.tr/1e3*t.finalSize;var k=-1;for(e=0;eT&&" "!==_[e]?(-1===k?i+=1:e=k,C+=t.finalLineHeight||1.2*t.finalSize,_.splice(e,k===e?1:0,"\r"),k=-1,g=0):(g+=x,g+=S);C+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Mv?g:v,g=-2*S,s="",r=!0,u+=1):s=D,h.chars?(o=h.getCharData(D,b.fStyle,h.getFontByName(t.f).fFamily),x=r?0:o.w*t.finalSize/100):x=h.measureText(s,t.f,t.finalSize)," "===D?F+=x+S:(g+=x+S+F,F=0),p.push({l:x,an:x,add:c,n:r,anIndexes:[],val:s,line:u,animatorJustifyOffset:0}),2==m){if(c+=x,""===s||" "===s||e===i-1){for(""!==s&&" "!==s||(c-=x);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=x,d+=1;f+=1,c=0}}else if(3==m){if(c+=x,""===s||e===i-1){for(""===s&&(c-=x);d<=e;)p[d].an=c,p[d].ind=f,p[d].extra=x,d+=1;c=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=g>v?g:v,y.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=y;var w,I,V,B,R=l.a;n=R.length;var L=[];for(a=0;a0?s=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=BezierFactory.getBezierEasing(s,a,n,o).get,l=0,p=this.finalS,f=this.finalE,m=this.data.sh;if(2===m)l=h(l=f===p?r>=f?1:0:t(0,e(.5/(f-p)+(r-p)/(f-p),1)));else if(3===m)l=h(l=f===p?r>=f?0:1:1-t(0,e(.5/(f-p)+(r-p)/(f-p),1)));else if(4===m)f===p?l=0:(l=t(0,e(.5/(f-p)+(r-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===m){if(f===p)l=0;else{var c=f-p,d=-c/2+(r=e(t(0,r+.5-p),f-p)),u=c/2;l=Math.sqrt(1-d*d/(u*u))}l=h(l)}else 6===m?(f===p?l=0:(r=e(t(0,r+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*r/(f-p)))/2),l=h(l)):(r>=i(p)&&(l=t(0,e(r-p<0?e(f,1)-(p-r):f-r,1))),l=h(l));if(100!==this.sm.v){var y=.01*this.sm.v;0===y&&(y=1e-8);var g=.5-.5*y;l1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,i=this.o.v/e,r=this.s.v/e+i,s=this.e.v/e+i;if(r>s){var a=r;r=s,s=a}this.finalS=r,this.finalE=s}},extendPrototype([DynamicPropertyContainer],r),{getTextSelectorProp:function(t,e,i){return new r(t,e,i)}}}();function TextAnimatorDataProperty(t,e,i){var r={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,i):r,rx:a.rx?s(t,a.rx,0,degToRads,i):r,ry:a.ry?s(t,a.ry,0,degToRads,i):r,sk:a.sk?s(t,a.sk,0,degToRads,i):r,sa:a.sa?s(t,a.sa,0,degToRads,i):r,s:a.s?s(t,a.s,1,.01,i):r,a:a.a?s(t,a.a,1,0,i):r,o:a.o?s(t,a.o,0,.01,i):r,p:a.p?s(t,a.p,1,0,i):r,sw:a.sw?s(t,a.sw,0,0,i):r,sc:a.sc?s(t,a.sc,1,0,i):r,fc:a.fc?s(t,a.fc,1,0,i):r,fh:a.fh?s(t,a.fh,0,0,i):r,fs:a.fs?s(t,a.fs,0,.01,i):r,fb:a.fb?s(t,a.fb,0,.01,i):r,t:a.t?s(t,a.t,0,0,i):r},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,i),this.s.t=e.s.t}function TextAnimatorProperty(t,e,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=i,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,i=this._textData.a.length,r=PropertyFactory.getProp;for(t=0;t=o+ot||!d?(v=(o+ot-l)/h.partialLength,G=c.point[0]+(h.point[0]-c.point[0])*v,z=c.point[1]+(h.point[1]-c.point[1])*v,C.translate(-P[0]*T[s].an*.005,-P[1]*B*.01),p=!1):d&&(l+=h.partialLength,(f+=1)>=d.length&&(f=0,u[m+=1]?d=u[m].points:x.v.c?(f=0,d=u[m=0].points):(l-=h.partialLength,d=null)),d&&(c=h,y=(h=d[f]).partialLength));L=T[s].an/2-T[s].add,C.translate(-L,0,0)}else L=T[s].an/2-T[s].add,C.translate(-L,0,0),C.translate(-P[0]*T[s].an*.005,-P[1]*B*.01,0);for(F=0;Ft?this.textSpans[t].span:createNS(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var g=createNS("g");n.appendChild(g),this.textSpans[t].childSpan=g}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(l.reset(),p&&(o[t].n&&(f=-d,m+=i.yOffset,m+=c?1:0,c=!1),this.applyTextPropertiesToMatrix(i,l,o[t].line,f,m),f+=o[t].l||0,f+=d),h){var v;if(1===(u=this.globalData.fontManager.getCharData(i.finalText[t],r.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily)).t)v=new SVGCompElement(u.data,this.globalData,this);else{var b=emptyShapeData;u.data&&u.data.shapes&&(b=this.buildShapeData(u.data,i.finalSize)),v=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[t].glyph){var x=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(x.layerElement),x.destroy()}this.textSpans[t].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),1===u.t&&this.textSpans[t].childSpan.setAttribute("transform","scale("+i.finalSize/100+","+i.finalSize/100+")")}else p&&n.setAttribute("transform","translate("+l.props[12]+","+l.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}p&&n&&n.setAttribute("d","")}else{var P=this.textContainer,E="start";switch(i.j){case 1:E="end";break;case 2:E="middle";break;default:E="start"}P.setAttribute("text-anchor",E),P.setAttribute("letter-spacing",d);var S=this.buildTextContents(i.finalText);for(e=S.length,m=i.ps?i.ps[1]+i.ascent:0,t=0;t=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e=0;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t=0;i-=1)t.finalTransform.multiply(t.transforms[i].transform.mProps.v);t._mdf=s},processSequences:function(t){var e,i=this.sequenceList.length;for(e=0;e=1){this.buffers=[];var t=this.globalData.canvasContext,e=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(e);var i=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(i),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(t){t.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var t=this.buffers[0].getContext("2d");this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var t=this.buffers[1],e=t.getContext("2d");if(this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var i=assetLoader.getLumaCanvas(this.canvasContext.canvas);i.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(i,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(t,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(t){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||t)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var e=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(e),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(e),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var i={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},r={};if("fl"===t.ty||"st"===t.ty?(r.c=PropertyFactory.getProp(this,t.c,1,255,this),r.c.k||(i.co="rgb("+bmFloor(r.c.v[0])+","+bmFloor(r.c.v[1])+","+bmFloor(r.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(r.s=PropertyFactory.getProp(this,t.s,1,null,this),r.e=PropertyFactory.getProp(this,t.e,1,null,this),r.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),r.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),r.g=new GradientProperty(this,t.g,this)),r.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(i.lc=lineCapEnum[t.lc||2],i.lj=lineJoinEnum[t.lj||2],1==t.lj&&(i.ml=t.ml),r.w=PropertyFactory.getProp(this,t.w,0,null,this),r.w.k||(i.wi=r.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);r.d=s,r.d.k||(i.da=r.d.dashArray,i.do=r.d.dashoffset[0])}}else i.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(i),r.style=i,r},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t=0;a-=1){if((h=this.searchProcessedElement(t[a]))?e[a]=i[h-1]:t[a]._shouldRender=r,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)h?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],d),m.push(e[a].style);else if("gr"===t[a].ty){if(h)for(o=e[a].it.length,n=0;n=0;s-=1)"tr"===e[s].ty?(a=i[s].transform,this.renderShapeTransform(t,a)):"sh"===e[s].ty||"el"===e[s].ty||"rc"===e[s].ty||"sr"===e[s].ty?this.renderPath(e[s],i[s]):"fl"===e[s].ty?this.renderFill(e[s],i[s],a):"st"===e[s].ty?this.renderStroke(e[s],i[s],a):"gf"===e[s].ty||"gs"===e[s].ty?this.renderGradientFill(e[s],i[s],a):"gr"===e[s].ty?this.renderShape(a,e[s].it,i[s].it):e[s].ty;r&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var i,r,s,a=t.trNodes,n=e.paths,o=n._length;a.length=0;var h=t.transforms.finalTransform;for(s=0;s=1?f=.99:f<=-1&&(f=-.99);var m=l*f,c=Math.cos(p+e.a.v)*m+o[0],d=Math.sin(p+e.a.v)*m+o[1];r=n.createRadialGradient(c,d,0,o[0],o[1],l)}var u=t.g.p,y=e.g.c,g=1;for(a=0;ao&&"xMidYMid slice"===h||ns&&"meet"===o||as&&"slice"===o)?(i-this.transformCanvas.w*(r/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===l&&(as&&"slice"===o)?(i-this.transformCanvas.w*(r/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===p&&(a>s&&"meet"===o||as&&"meet"===o||a=0;t-=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var i;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var r=this.layers.length;for(this.completeLayers||this.checkLayers(t),i=r-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].prepareFrame(t-this.layers[i].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),i=r-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var i=this.createItem(this.layers[t],this,this.globalData);e[t]=i,i.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=0;for(e=this._length;e=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var i,r=t.length;for(i=0;i0&&o<1&&f[m].push(this.calculateF(o,t,e,i,r,m)):(h=a*a-4*n*s)>=0&&((l=(-a+bmSqrt(h))/(2*s))>0&&l<1&&f[m].push(this.calculateF(l,t,e,i,r,m)),(p=(-a-bmSqrt(h))/(2*s))>0&&p<1&&f[m].push(this.calculateF(p,t,e,i,r,m))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(t,e,i,r,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*i[a]+3*(1-t)*bmPow(t,2)*r[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var i,r=t.length;for(i=0;ii&&(i=s)}i*=t.mult}else i=t.v*t.mult;e.x-=i,e.xMax+=i,e.y-=i,e.yMax+=i},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax=0;t-=1){var r=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-r.p.v[0],-r.p.v[1],r.p.v[2]),this.mat.rotateX(-r.or.v[0]).rotateY(-r.or.v[1]).rotateZ(r.or.v[2]),this.mat.rotateX(-r.rx.v).rotateY(-r.ry.v).rotateZ(r.rz.v),this.mat.scale(1/r.s.v[0],1/r.s.v[1],1/r.s.v[2]),this.mat.translate(r.a.v[0],r.a.v[1],r.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],o=Math.sqrt(n[2]*n[2]+n[0]*n[0]),h=Math.atan2(n[1],o),l=Math.atan2(n[0],-n[2]);this.mat.rotateY(l).rotateX(-h)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var p=!this._prevMat.equals(this.mat);if((p||this.pe._mdf)&&this.comp.threeDElements){var f,m,c;for(e=this.comp.threeDElements.length,t=0;t=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var i,r,s=createTag("div");styleDiv(s);var a=createTag("div");if(styleDiv(a),"3d"===e){(i=s.style).width=this.globalData.compSize.w+"px",i.height=this.globalData.compSize.h+"px";var n="50% 50%";i.webkitTransformOrigin=n,i.mozTransformOrigin=n,i.transformOrigin=n;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(r=a.style).transform=o,r.webkitTransform=o}s.appendChild(a);var h={container:a,perspectiveElem:s,startPos:t,endPos:t,type:e};return this.threeDElements.push(h),h},HybridRendererBase.prototype.build3dContainers=function(){var t,e,i=this.layers.length,r="";for(t=0;t=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var i=0,r=this.threeDElements.length;in?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,i=0,r=(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,i=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,r=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+i+","+r+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,i=this.globalData.compSize.h,r=this.threeDElements.length;for(t=0;t=o;)t/=2,e/=2,i>>>=1;return(t+i)/e};return b.int32=function(){return 0|v.g(4)},b.quick=function(){return v.g(4)/4294967296},b.double=b,m(c(v.S),t),(d.pass||u||function(t,i,r,s){return s&&(s.S&&p(s,v),t.state=function(){return p(v,{})}),r?(e.random=t,i):t})(b,g,"global"in d?d.global:this==e,d.state)},m(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof$1(t){return _typeof$1="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},_typeof$1(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||e instanceof Number||"boolean"===t||"string"===t}function $bm_neg(t){var e=_typeof$1(t);if("number"===e||t instanceof Number||"boolean"===e)return-t;if($bm_isInstanceOfArray(t)){var i,r=t.length,s=[];for(i=0;ii){var r=i;i=e,e=r}return Math.min(Math.max(t,e),i)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var i;e||(e=helperLengthArray);var r=Math.min(t.length,e.length),s=0;for(i=0;i.5?l/(2-n-o):l/(n+o),n){case r:e=(s-a)/l+(s1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function hslToRgb(t){var e,i,r,s=t[0],a=t[1],n=t[2];if(0===a)e=n,r=n,i=n;else{var o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=hue2rgb(h,o,s+1/3),i=hue2rgb(h,o,s),r=hue2rgb(h,o,s-1/3)}return[e,i,r,t[3]]}function linear(t,e,i,r,s){if(void 0!==r&&void 0!==s||(r=e,s=i,e=0,i=1),i=i)return s;var n,o=i===e?0:(t-e)/(i-e);if(!r.length)return r+(s-r)*o;var h=r.length,l=createTypedArray("float32",h);for(n=0;n1){for(r=0;r1?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var o,h=s.length,l=createTypedArray("float32",h);for(o=0;odata.k[e].t&&tdata.k[e+1].t-t?(i=e+2,r=data.k[e+1].t):(i=e+1,r=data.k[e].t);break}}-1===i&&(i=e+1,r=data.k[e].t)}else i=0,r=0;var a={};return a.index=i,a.time=r/elem.comp.globalData.frameRate,a}function key(t){var e,i,r;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(r=s.length,i=0;il.length-1)&&(e=l.length-1),r=p-(s=l[l.length-1-e].t)),"pingpong"===t){if(Math.floor((h-s)/r)%2!=0)return this.getValueAtTime((r-(h-s)%r+s)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(s/this.comp.globalData.frameRate,0),m=this.getValueAtTime(p/this.comp.globalData.frameRate,0),c=this.getValueAtTime(((h-s)%r+s)/this.comp.globalData.frameRate,0),d=Math.floor((h-s)/r);if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a=p)return this.pv;if(i?s=p+(r=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-p)):((!e||e>l.length-1)&&(e=l.length-1),r=(s=l[e].t)-p),"pingpong"===t){if(Math.floor((p-h)/r)%2==0)return this.getValueAtTime(((p-h)%r+p)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var f=this.getValueAtTime(p/this.comp.globalData.frameRate,0),m=this.getValueAtTime(s/this.comp.globalData.frameRate,0),c=this.getValueAtTime((r-(p-h)%r+p)/this.comp.globalData.frameRate,0),d=Math.floor((p-h)/r)+1;if(this.pv.length){for(n=(o=new Array(f.length)).length,a=0;a1?(s+t-a)/(e-1):1,o=0,h=0;for(i=this.pv.length?createTypedArray("float32",this.pv.length):0;on){var p=o,f=i.c&&o===h-1?0:o+1,m=(n-l)/a[o].addedLength;r=bez.getPointInSegment(i.v[p],i.v[f],i.o[p],i.i[f],m,a[o]);break}l+=a[o].addedLength,o+=1}return r||(r=i.c?[i.v[0][0],i.v[0][1]]:[i.v[i._length-1][0],i.v[i._length-1][1]]),r},vectorOnPath:function(t,e,i){1==t?t=this.v.c:0==t&&(t=.999);var r=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),a=s[0]-r[0],n=s[1]-r[1],o=Math.sqrt(Math.pow(a,2)+Math.pow(n,2));return 0===o?[0,0]:"tangent"===i?[a/o,n/o]:[-n/o,a/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([l],o),extendPrototype([l],h),h.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime=l?c<0?r:s:r+m*Math.pow((a-t)/c,1/i),p[f]=n,f+=1,o+=256/255;return p.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,i=this.filterManager.effectElements;this.feFuncRComposed&&(t||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(e=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(e=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(e=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(e=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(e=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,r=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=i*Math.cos(r),a=i*Math.sin(r);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,i){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=i,i.matteElement=createNS("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}function SVGGaussianBlurEffect(t,e,i,r){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var s=createNS("feGaussianBlur");s.setAttribute("result",r),t.appendChild(s),this.feGaussianBlur=s}function TransformEffect(){}function SVGTransformEffect(t,e){this.init(e)}function CVTransformEffect(t){this.init(t)}return SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,i=_svgMatteSymbols.length;e https://ajourdhuilavenir.org 2024-11-03T14:38:00+02:00 1.0 https://aujourdhuilavenir.org/projects/cantine 2024-07-31T18:22:00+02:00 1.0 https://aujourdhuilavenir.org/articles/construction_cantine 2024-11-03T14:38:00+02:00 1.0 https://aujourdhuilavenir.org/articles/qui_est_laure_sabes 2024-07-31T18:22:00+02:00 0.8 https://aujourdhuilavenir.org/novena/saint_dominic_day_1 2024-07-31T18:22:00+02:00 1 https://aujourdhuilavenir.org/novena/saint_dominic_de_guzman 2024-07-31T18:22:00+02:00 1 https://aujourdhuilavenir.org/novena/saint_dominic_day_2 2024-07-31T18:22:00+02:00 0.8 https://aujourdhuilavenir.org/novena/saint_dominic_day_3 2024-07-31T18:22:00+02:00 0.8 ================================================ FILE: web/style.css ================================================ .loader-div { width: 100px; height: 100px; margin: 3em; }