diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 3474d75c..f9dfef74 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -15,15 +15,18 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Docker meta - id: meta + - name: Login to Docker Hub + uses: docker/login-action@v2.2.0 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Docker meta for base image + id: meta-base uses: docker/metadata-action@v4 with: - # List of Docker images to use as base name for tags images: | mediacms/mediacms - # Generate Docker tags based on the following events/attributes - # Set latest tag for default branch tags: | type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} type=semver,pattern={{version}} @@ -37,16 +40,39 @@ jobs: org.opencontainers.image.source=https://github.com/mediacms-io/mediacms org.opencontainers.image.licenses=AGPL-3.0 - - name: Login to Docker Hub - uses: docker/login-action@v2.2.0 + - name: Docker meta for full image + id: meta-full + uses: docker/metadata-action@v4 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + images: | + mediacms/mediacms + tags: | + type=raw,value=full,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=semver,pattern={{version}}-full + type=semver,pattern={{major}}.{{minor}}-full + type=semver,pattern={{major}}-full + labels: | + org.opencontainers.image.title=MediaCMS Full + org.opencontainers.image.description=MediaCMS is a modern, fully featured open source video and media CMS, written in Python/Django and React, featuring a REST API. This is the full version with additional dependencies. + org.opencontainers.image.vendor=MediaCMS + org.opencontainers.image.url=https://mediacms.io/ + org.opencontainers.image.source=https://github.com/mediacms-io/mediacms + org.opencontainers.image.licenses=AGPL-3.0 - - name: Build and push + - name: Build and push base image uses: docker/build-push-action@v4 with: context: . + target: base push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta-base.outputs.tags }} + labels: ${{ steps.meta-base.outputs.labels }} + + - name: Build and push full image + uses: docker/build-push-action@v4 + with: + context: . + target: full + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta-full.outputs.tags }} + labels: ${{ steps.meta-full.outputs.labels }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e0a3ba77..0251ace9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.13.5-bookworm AS build-image +FROM python:3.13.5-slim-bookworm AS build-image # Install system dependencies needed for downloading and extracting RUN apt-get update -y && \ @@ -14,7 +14,7 @@ RUN mkdir -p ffmpeg-tmp && \ cp -v ffmpeg-tmp/ffmpeg ffmpeg-tmp/ffprobe ffmpeg-tmp/qt-faststart /usr/local/bin && \ rm -rf ffmpeg-tmp ffmpeg-release-amd64-static.tar.xz - # Install Bento4 in the specified location +# Install Bento4 in the specified location RUN mkdir -p /home/mediacms.io/bento4 && \ wget -q http://zebulon.bok.net/Bento4/binaries/Bento4-SDK-1-6-0-637.x86_64-unknown-linux.zip && \ unzip Bento4-SDK-1-6-0-637.x86_64-unknown-linux.zip -d /home/mediacms.io/bento4 && \ @@ -23,8 +23,8 @@ RUN mkdir -p /home/mediacms.io/bento4 && \ rm -rf /home/mediacms.io/bento4/docs && \ rm Bento4-SDK-1-6-0-637.x86_64-unknown-linux.zip -############ RUNTIME IMAGE ############ -FROM python:3.13.5-bookworm AS runtime_image +############ BASE RUNTIME IMAGE ############ +FROM python:3.13.5-slim-bookworm AS base SHELL ["/bin/bash", "-c"] @@ -34,13 +34,47 @@ ENV CELERY_APP='cms' ENV VIRTUAL_ENV=/home/mediacms.io ENV PATH="$VIRTUAL_ENV/bin:$PATH" -# Install runtime system dependencies +# Install system dependencies first RUN apt-get update -y && \ apt-get -y upgrade && \ - apt-get install --no-install-recommends supervisor nginx imagemagick procps pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl -y && \ - rm -rf /var/lib/apt/lists/* && \ - apt-get purge --auto-remove && \ - apt-get clean + apt-get install --no-install-recommends -y \ + supervisor \ + nginx \ + imagemagick \ + procps \ + build-essential \ + pkg-config \ + zlib1g-dev \ + zlib1g \ + libxml2-dev \ + libxmlsec1-dev \ + libxmlsec1-openssl \ + libpq-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# Set up virtualenv first +RUN mkdir -p /home/mediacms.io/mediacms/{logs} && \ + cd /home/mediacms.io && \ + python3 -m venv $VIRTUAL_ENV + +# Copy requirements files +COPY requirements.txt requirements-dev.txt ./ + +# Install Python dependencies using pip (within virtualenv) +ARG DEVELOPMENT_MODE=False +RUN pip install --no-cache-dir uv && \ + uv pip install --no-binary lxml --no-binary xmlsec -r requirements.txt && \ + if [ "$DEVELOPMENT_MODE" = "True" ]; then \ + echo "Installing development dependencies..." && \ + uv pip install -r requirements-dev.txt; \ + fi && \ + apt-get purge -y --auto-remove \ + build-essential \ + pkg-config \ + libxml2-dev \ + libxmlsec1-dev \ + libpq-dev # Copy ffmpeg and Bento4 from build image COPY --from=build-image /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg @@ -48,28 +82,11 @@ COPY --from=build-image /usr/local/bin/ffprobe /usr/local/bin/ffprobe COPY --from=build-image /usr/local/bin/qt-faststart /usr/local/bin/qt-faststart COPY --from=build-image /home/mediacms.io/bento4 /home/mediacms.io/bento4 -# Set up virtualenv -RUN mkdir -p /home/mediacms.io/mediacms/{logs} && \ - cd /home/mediacms.io && \ - python3 -m venv $VIRTUAL_ENV - -# Install Python dependencies -COPY requirements.txt requirements-dev.txt ./ - -ARG DEVELOPMENT_MODE=False - -RUN pip install --no-cache-dir --no-binary lxml,xmlsec -r requirements.txt && \ - if [ "$DEVELOPMENT_MODE" = "True" ]; then \ - echo "Installing development dependencies..." && \ - pip install --no-cache-dir -r requirements-dev.txt; \ - fi - # Copy application files COPY . /home/mediacms.io/mediacms WORKDIR /home/mediacms.io/mediacms # required for sprite thumbnail generation for large video files - COPY deploy/docker/policy.xml /etc/ImageMagick-6/policy.xml # Set process control environment variables @@ -85,4 +102,12 @@ EXPOSE 9000 80 RUN chmod +x ./deploy/docker/entrypoint.sh ENTRYPOINT ["./deploy/docker/entrypoint.sh"] -CMD ["./deploy/docker/start.sh"] \ No newline at end of file +CMD ["./deploy/docker/start.sh"] + +############ FULL IMAGE ############ +FROM base AS full +COPY requirements-full.txt ./ +RUN mkdir -p /root/.cache/ && \ + chmod go+rwx /root/ && \ + chmod go+rwx /root/.cache/ +RUN uv pip install -r requirements-full.txt \ No newline at end of file diff --git a/cms/settings.py b/cms/settings.py index 76f9edf8..c28ed8da 100644 --- a/cms/settings.py +++ b/cms/settings.py @@ -470,7 +470,7 @@ LANGUAGE_CODE = 'en' # default language SPRITE_NUM_SECS = 10 # number of seconds for sprite image. -# If you plan to change this, you must also follow the instructions on admin_docs.md +# If you plan to change this, you must also follow the instructions on admins_docs.md # to change the equivalent value in ./frontend/src/static/js/components/media-viewer/VideoViewer/index.js and then re-build frontend # how many images will be shown on the slideshow @@ -507,8 +507,16 @@ NUMBER_OF_MEDIA_USER_CAN_UPLOAD = 100 # ffmpeg options FFMPEG_DEFAULT_PRESET = "medium" # see https://trac.ffmpeg.org/wiki/Encode/H.264 +# If 'all' is in the list, no check is performed ALLOWED_MEDIA_UPLOAD_TYPES = ["video", "audio", "image", "pdf"] +# transcription options +# the full docker image needs to be used in order to be able to use transcription +USER_CAN_TRANSCRIBE_VIDEO = True + +# Whisper transcribe options - https://github.com/openai/whisper +WHISPER_MODEL = "base" + try: # keep a local_settings.py file for local overrides from .local_settings import * # noqa diff --git a/docker-compose-dev.yaml b/docker-compose-dev.yaml index 7dd096d5..8f36990e 100644 --- a/docker-compose-dev.yaml +++ b/docker-compose-dev.yaml @@ -5,6 +5,7 @@ services: build: context: . dockerfile: ./Dockerfile + target: base args: - DEVELOPMENT_MODE=True image: mediacms/mediacms-dev:latest @@ -84,6 +85,5 @@ services: ENABLE_NGINX: 'no' ENABLE_CELERY_BEAT: 'no' ENABLE_MIGRATIONS: 'no' - DEVELOPMENT_MODE: True depends_on: - web diff --git a/docker-compose.full.yaml b/docker-compose.full.yaml new file mode 100644 index 00000000..f12c5b08 --- /dev/null +++ b/docker-compose.full.yaml @@ -0,0 +1,5 @@ +version: "3" + +services: + celery_worker: + image: mediacms/mediacms:full diff --git a/docs/admins_docs.md b/docs/admins_docs.md index b6ba4c58..356754b0 100644 --- a/docs/admins_docs.md +++ b/docs/admins_docs.md @@ -124,6 +124,9 @@ migrations_1 | Created admin user with password: gwg1clfkwf or if you have set the ADMIN_PASSWORD variable on docker-compose file you have used (example `docker-compose.yaml`), that variable will be set as the admin user's password +`Note`: if you want to use the automatic transcriptions, run `docker-compose -f docker-compose.yaml -f docker-compose.full.yaml up` instead, as this is using a separate image. + + ### Update Get latest MediaCMS image and stop/start containers @@ -984,7 +987,7 @@ MediaCMS performs identification attempts on new file uploads and only allows ce When a file is not identified as one of these allowed types, the file gets removed from the system and there's an entry indicating that this is not a supported media type. -If you want to change the allowed file types, edit the `ALLOWED_MEDIA_UPLOAD_TYPES` list in your `settings.py` or `local_settings.py` file. +If you want to change the allowed file types, edit the `ALLOWED_MEDIA_UPLOAD_TYPES` list in your `settings.py` or `local_settings.py` file. If 'all' is specified in this list, no check is performed and all files are allowed. ## 27. User upload limits MediaCMS allows you to set a maximum number of media files that each user can upload. This is controlled by the `NUMBER_OF_MEDIA_USER_CAN_UPLOAD` setting in `settings.py` or `local_settings.py`. By default, this is set to 100 media items per user. @@ -995,4 +998,18 @@ To change the maximum number of uploads allowed per user, modify the `NUMBER_OF_ ``` NUMBER_OF_MEDIA_USER_CAN_UPLOAD = 5 -``` \ No newline at end of file +``` + +## 28. Whisper Transcribe for Automatic Subtitles +MediaCMS can integrate with OpenAI's Whisper to automatically generate subtitles for your media files. This feature is useful for making your content more accessible. + +### How it works +When the whisper transcribe task is triggered for a media file, MediaCMS runs the `whisper` command-line tool to process the audio and generate a subtitle file in VTT format. The generated subtitles are then associated with the media and are available under the "automatic" language option. + +### Configuration + +Transcription functionality is available only for the Docker installation. To enable this feature, you must use the `docker-compose.full.yaml` file, as it contains an image with the necessary requirements. + +By default, all users have the ability to send a request for a video to be transcribed, as well as transcribed and translated to English. If you wish to change this behavior, you can edit the `settings.py` file and set `USER_CAN_TRANSCRIBE_VIDEO=False`. + +The transcription uses the base model of Whisper speech-to-text by default. However, you can change the model by editing the `WHISPER_MODEL` setting in `settings.py`. diff --git a/files/admin.py b/files/admin.py index e346ab4e..0ed921bb 100644 --- a/files/admin.py +++ b/files/admin.py @@ -15,6 +15,7 @@ from .models import ( Media, Subtitle, Tag, + TranscriptionRequest, VideoTrimRequest, ) @@ -219,6 +220,10 @@ class EncodingAdmin(admin.ModelAdmin): has_file.short_description = "Has file" +class TranscriptionRequestAdmin(admin.ModelAdmin): + pass + + admin.site.register(EncodeProfile, EncodeProfileAdmin) admin.site.register(Comment, CommentAdmin) admin.site.register(Media, MediaAdmin) @@ -228,5 +233,6 @@ admin.site.register(Tag, TagAdmin) admin.site.register(Subtitle, SubtitleAdmin) admin.site.register(Language, LanguageAdmin) admin.site.register(VideoTrimRequest, VideoTrimRequestAdmin) +admin.site.register(TranscriptionRequest, TranscriptionRequestAdmin) Media._meta.app_config.verbose_name = "Media" diff --git a/files/forms.py b/files/forms.py index ff8bc2ea..d2dc6aa4 100644 --- a/files/forms.py +++ b/files/forms.py @@ -118,14 +118,7 @@ class MediaPublishForm(forms.ModelForm): class Meta: model = Media - fields = ( - "category", - "state", - "featured", - "reported_times", - "is_reviewed", - "allow_download", - ) + fields = ("category", "state", "featured", "reported_times", "is_reviewed", "allow_download") widgets = { "category": MultipleSelect(), @@ -134,6 +127,7 @@ class MediaPublishForm(forms.ModelForm): def __init__(self, user, *args, **kwargs): self.user = user super(MediaPublishForm, self).__init__(*args, **kwargs) + if not is_mediacms_editor(user): for field in ["featured", "reported_times", "is_reviewed"]: self.fields[field].disabled = True @@ -220,16 +214,87 @@ class MediaPublishForm(forms.ModelForm): return media +class WhisperSubtitlesForm(forms.ModelForm): + class Meta: + model = Media + fields = ( + "allow_whisper_transcribe", + "allow_whisper_transcribe_and_translate", + ) + labels = { + "allow_whisper_transcribe": "automatic transcription", + "allow_whisper_transcribe_and_translate": "automatic transcription and translation", + } + help_texts = { + "allow_whisper_transcribe": "Request automatic transcription for this media.", + "allow_whisper_transcribe_and_translate": "Request automatic transcription and translation for this media.", + } + + def __init__(self, user, *args, **kwargs): + self.user = user + super(WhisperSubtitlesForm, self).__init__(*args, **kwargs) + + if self.instance.allow_whisper_transcribe: + self.fields['allow_whisper_transcribe'].widget.attrs['readonly'] = True + self.fields['allow_whisper_transcribe'].widget.attrs['disabled'] = True + if self.instance.allow_whisper_transcribe_and_translate: + self.fields['allow_whisper_transcribe_and_translate'].widget.attrs['readonly'] = True + self.fields['allow_whisper_transcribe_and_translate'].widget.attrs['disabled'] = True + + self.helper = FormHelper() + self.helper.form_tag = True + self.helper.form_class = 'post-form' + self.helper.form_method = 'post' + self.helper.form_enctype = "multipart/form-data" + self.helper.form_show_errors = False + self.helper.layout = Layout( + CustomField('allow_whisper_transcribe'), + CustomField('allow_whisper_transcribe_and_translate'), + ) + + self.helper.layout.append(FormActions(Submit('submit_whisper', 'Submit', css_class='primaryAction'))) + + def clean_allow_whisper_transcribe(self): + # Ensure the field value doesn't change if it was originally True + if self.instance and self.instance.allow_whisper_transcribe: + return self.instance.allow_whisper_transcribe + return self.cleaned_data['allow_whisper_transcribe'] + + def clean_allow_whisper_transcribe_and_translate(self): + # Ensure the field value doesn't change if it was originally True + if self.instance and self.instance.allow_whisper_transcribe_and_translate: + return self.instance.allow_whisper_transcribe_and_translate + return self.cleaned_data['allow_whisper_transcribe_and_translate'] + + class SubtitleForm(forms.ModelForm): class Meta: model = Subtitle fields = ["language", "subtitle_file"] + labels = { + "subtitle_file": "Subtitle or Closed Caption File", + } + help_texts = { + "subtitle_file": "SubRip (.srt) and WebVTT (.vtt) are supported file formats.", + } + def __init__(self, media_item, *args, **kwargs): super(SubtitleForm, self).__init__(*args, **kwargs) self.instance.media = media_item - self.fields["subtitle_file"].help_text = "SubRip (.srt) and WebVTT (.vtt) are supported file formats." - self.fields["subtitle_file"].label = "Subtitle or Closed Caption File" + + self.helper = FormHelper() + self.helper.form_tag = True + self.helper.form_class = 'post-form' + self.helper.form_method = 'post' + self.helper.form_enctype = "multipart/form-data" + self.helper.form_show_errors = False + self.helper.layout = Layout( + CustomField('subtitle_file'), + CustomField('language'), + ) + + self.helper.layout.append(FormActions(Submit('submit', 'Submit', css_class='primaryAction'))) def save(self, *args, **kwargs): self.instance.user = self.instance.media.user diff --git a/files/frontend_translations/ar.py b/files/frontend_translations/ar.py index c8f7f232..709d6f64 100644 --- a/files/frontend_translations/ar.py +++ b/files/frontend_translations/ar.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "تشغيل تلقائي", "About": "حول", "Add a ": "أضف ", + "Browse your files": "تصفح ملفاتك", "COMMENT": "تعليق", "Categories": "الفئات", "Category": "الفئة", "Change Language": "تغيير اللغة", "Change password": "تغيير كلمة المرور", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "انقر على 'بدء التسجيل' واختر الشاشة أو علامة التبويب المراد تسجيلها. بمجرد الانتهاء من التسجيل، انقر على 'إيقاف التسجيل'، وسيتم تحميل التسجيل.", "Comment": "تعليق", "Comments": "تعليقات", "Comments are disabled": "التعليقات معطلة", "Contact": "اتصل", "DELETE MEDIA": "حذف الوسائط", "DOWNLOAD": "تحميل", + "Drag and drop files": "سحب وإفلات الملفات", "EDIT MEDIA": "تعديل الوسائط", "EDIT PROFILE": "تعديل الملف الشخصي", "EDIT SUBTITLE": "تعديل الترجمة", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "قوائم التشغيل", "Playlists": "قوائم التشغيل", "Powered by": "مدعوم من", + "Publish": "نشر", "Published on": "نشر في", "Recommended": "موصى به", + "Record Screen": "تسجيل الشاشة", "Register": "تسجيل", "SAVE": "حفظ", "SEARCH": "بحث", @@ -54,9 +59,13 @@ translation_strings = { "Select": "اختر", "Sign in": "تسجيل الدخول", "Sign out": "تسجيل الخروج", + "Start Recording": "بدء التسجيل", + "Stop Recording": "إيقاف التسجيل", "Subtitle was added": "تمت إضافة الترجمة", + "Subtitles": "ترجمات", "Tags": "العلامات", "Terms": "الشروط", + "Trim": "قص", "UPLOAD": "رفع", "Up next": "التالي", "Upload": "رفع", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "التحميلات", "VIEW ALL": "عرض الكل", "View all": "عرض الكل", + "View media": "عرض الوسائط", "comment": "تعليق", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "هو نظام إدارة محتوى فيديو ووسائط مفتوح المصدر وحديث ومتكامل. تم تطويره لتلبية احتياجات المنصات الويب الحديثة لمشاهدة ومشاركة الوسائط", "media in category": "وسائط في الفئة", "media in tag": "وسائط في العلامة", + "or": "أو", "view": "عرض", "views": "مشاهدات", "yet": "بعد", diff --git a/files/frontend_translations/bn.py b/files/frontend_translations/bn.py index 9ba7ee89..e2b7355d 100644 --- a/files/frontend_translations/bn.py +++ b/files/frontend_translations/bn.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "স্বয়ংক্রিয় প্লে", "About": "সম্পর্কে", "Add a ": "যোগ করুন", + "Browse your files": "আপনার ফাইল ব্রাউজ করুন", "COMMENT": "মন্তব্য", "Categories": "বিভাগসমূহ", "Category": "বিভাগ", "Change Language": "ভাষা পরিবর্তন করুন", "Change password": "পাসওয়ার্ড পরিবর্তন করুন", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "'রেকর্ডিং শুরু করুন'-এ ক্লিক করুন এবং রেকর্ড করার জন্য স্ক্রিন বা ট্যাব নির্বাচন করুন। রেকর্ডিং শেষ হলে, 'রেকর্ডিং বন্ধ করুন'-এ ক্লিক করুন এবং রেকর্ডিং আপলোড হয়ে যাবে।", "Comment": "মন্তব্য", "Comments": "মন্তব্যসমূহ", "Comments are disabled": "মন্তব্য নিষ্ক্রিয় করা হয়েছে", "Contact": "যোগাযোগ", "DELETE MEDIA": "মিডিয়া মুছুন", "DOWNLOAD": "ডাউনলোড", + "Drag and drop files": "ফাইল টেনে আনুন", "EDIT MEDIA": "মিডিয়া সম্পাদনা করুন", "EDIT PROFILE": "প্রোফাইল সম্পাদনা করুন", "EDIT SUBTITLE": "সাবটাইটেল সম্পাদনা করুন", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "প্লেলিস্ট", "Playlists": "প্লেলিস্ট", "Powered by": "দ্বারা চালিত", + "Publish": "প্রকাশ করুন", "Published on": "প্রকাশিত", "Recommended": "প্রস্তাবিত", + "Record Screen": "স্ক্রিন রেকর্ড করুন", "Register": "নিবন্ধন করুন", "SAVE": "সংরক্ষণ করুন", "SEARCH": "অনুসন্ধান", @@ -54,9 +59,13 @@ translation_strings = { "Select": "নির্বাচন করুন", "Sign in": "সাইন ইন করুন", "Sign out": "সাইন আউট করুন", + "Start Recording": "রেকর্ডিং শুরু করুন", + "Stop Recording": "রেকর্ডিং বন্ধ করুন", "Subtitle was added": "সাবটাইটেল যোগ করা হয়েছে", + "Subtitles": "সাবটাইটেল", "Tags": "ট্যাগ", "Terms": "শর্তাবলী", + "Trim": "ছাঁটাই", "UPLOAD": "আপলোড করুন", "Up next": "পরবর্তী", "Upload": "আপলোড করুন", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "আপলোডসমূহ", "VIEW ALL": "সব দেখুন", "View all": "সব দেখুন", + "View media": "মিডিয়া দেখুন", "comment": "মন্তব্য", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "একটি আধুনিক, সম্পূর্ণ বৈশিষ্ট্যযুক্ত ওপেন সোর্স ভিডিও এবং মিডিয়া CMS। এটি আধুনিক ওয়েব প্ল্যাটফর্মের জন্য মিডিয়া দেখার এবং শেয়ার করার প্রয়োজন মেটাতে তৈরি করা হয়েছে", "media in category": "বিভাগে মিডিয়া", "media in tag": "ট্যাগে মিডিয়া", + "or": "অথবা", "view": "দেখুন", "views": "দেখা হয়েছে", "yet": "এখনও", diff --git a/files/frontend_translations/da.py b/files/frontend_translations/da.py index d658526c..4481597e 100644 --- a/files/frontend_translations/da.py +++ b/files/frontend_translations/da.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "Automatisk afspilning", "About": "Om", "Add a ": "Tilføj en ", + "Browse your files": "Gennemse dine filer", "COMMENT": "KOMMENTAR", "Categories": "Kategorier", "Category": "Kategori", "Change Language": "Skift sprog", "Change password": "Skift adgangskode", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "Klik på 'Start optagelse' og vælg den skærm eller fane, du vil optage. Når optagelsen er færdig, skal du klikke på 'Stop optagelse', og optagelsen vil blive uploadet.", "Comment": "Kommentar", "Comments": "Kommentarer", "Comments are disabled": "Kommentarer er slået fra", "Contact": "Kontakt", "DELETE MEDIA": "SLET MEDIE", "DOWNLOAD": "HENT", + "Drag and drop files": "Træk og slip filer", "EDIT MEDIA": "REDIGER MEDIE", "EDIT PROFILE": "REDIGER PROFIL", "EDIT SUBTITLE": "REDIGER UNDERTEKSTER", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "PLAYLISTER", "Playlists": "Playlister", "Powered by": "Drevet af", + "Publish": "Udgiv", "Published on": "Udgivet på", "Recommended": "Anbefalet", + "Record Screen": "Optag skærm", "Register": "Registrer", "SAVE": "GEM", "SEARCH": "SØG", @@ -54,9 +59,13 @@ translation_strings = { "Select": "Vælg", "Sign in": "Log ind", "Sign out": "Log ud", + "Start Recording": "Start optagelse", + "Stop Recording": "Stop optagelse", "Subtitle was added": "Undertekster tilføjet", + "Subtitles": "Undertekster", "Tags": "Tags", "Terms": "Vilkår", + "Trim": "Beskær", "UPLOAD": "UPLOAD", "Up next": "Næste", "Upload": "Upload", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "Uploads", "VIEW ALL": "SE ALLE", "View all": "Se alle", + "View media": "Se medie", "comment": "kommentar", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "er et moderne, fuldt udstyret open source video og medie CMS. Det er udviklet til at imødekomme behovene for moderne webplatforme til visning og deling af medier.", "media in category": "medier i kategori", "media in tag": "medier i tag", + "or": "eller", "view": "visning", "views": "visninger", "yet": "endnu", diff --git a/files/frontend_translations/de.py b/files/frontend_translations/de.py index f32d8bb4..e2e70e26 100644 --- a/files/frontend_translations/de.py +++ b/files/frontend_translations/de.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "Automatische Wiedergabe", "About": "Über", "Add a ": "Hinzufügen eines ", + "Browse your files": "Durchsuchen Sie Ihre Dateien", "COMMENT": "KOMMENTAR", "Categories": "Kategorien", "Category": "Kategorie", "Change Language": "Sprache ändern", "Change password": "Passwort ändern", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "Klicken Sie auf 'Aufnahme starten' und wählen Sie den Bildschirm oder Tab aus, den Sie aufnehmen möchten. Sobald die Aufnahme beendet ist, klicken Sie auf 'Aufnahme beenden', und die Aufnahme wird hochgeladen.", "Comment": "Kommentar", "Comments": "Kommentare", "Comments are disabled": "Kommentare sind deaktiviert", "Contact": "Kontakt", "DELETE MEDIA": "MEDIEN LÖSCHEN", "DOWNLOAD": "HERUNTERLADEN", + "Drag and drop files": "Dateien per Drag & Drop verschieben", "EDIT MEDIA": "MEDIEN BEARBEITEN", "EDIT PROFILE": "PROFIL BEARBEITEN", "EDIT SUBTITLE": "UNTERTITEL BEARBEITEN", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "PLAYLISTS", "Playlists": "Playlists", "Powered by": "Bereitgestellt von", + "Publish": "Veröffentlichen", "Published on": "Veröffentlicht am", "Recommended": "Empfohlen", + "Record Screen": "Bildschirm aufnehmen", "Register": "Registrieren", "SAVE": "SPEICHERN", "SEARCH": "SUCHE", @@ -54,9 +59,13 @@ translation_strings = { "Select": "Auswählen", "Sign in": "Anmelden", "Sign out": "Abmelden", + "Start Recording": "Aufnahme starten", + "Stop Recording": "Aufnahme stoppen", "Subtitle was added": "Untertitel wurde hinzugefügt", + "Subtitles": "Untertitel", "Tags": "Tags", "Terms": "Bedingungen", + "Trim": "Trimmen", "UPLOAD": "HOCHLADEN", "Up next": "Als nächstes", "Upload": "Hochladen", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "Uploads", "VIEW ALL": "ALLE ANZEIGEN", "View all": "Alle anzeigen", + "View media": "Medien anzeigen", "comment": "Kommentar", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "ist ein modernes, voll ausgestattetes Open-Source-Video- und Medien-CMS. Es wurde entwickelt, um den Anforderungen moderner Webplattformen für das Ansehen und Teilen von Medien gerecht zu werden", "media in category": "Medien in Kategorie", "media in tag": "Medien in Tag", + "or": "oder", "view": "Ansicht", "views": "Ansichten", "yet": "noch", diff --git a/files/frontend_translations/el.py b/files/frontend_translations/el.py index 754a4205..ae5b428c 100644 --- a/files/frontend_translations/el.py +++ b/files/frontend_translations/el.py @@ -3,30 +3,33 @@ translation_strings = { "AUTOPLAY": "Αυτόματη αναπαραγωγή", "About": "Σχετικά", "Add a ": "Προσθέστε ένα ", + "Browse your files": "Περιήγηση στα αρχεία σας", "COMMENT": "ΣΧΟΛΙΟ", "Categories": "Κατηγορίες", "Category": "Κατηγορία", "Change Language": "Αλλαγή Γλώσσας", "Change password": "Αλλαγή κωδικού", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "Κάντε κλικ στο 'Έναρξη εγγραφής' και επιλέξτε την οθόνη ή την καρτέλα για εγγραφή. Μόλις ολοκληρωθεί η εγγραφή, κάντε κλικ στο 'Διακοπή εγγραφής' και η εγγραφή θα μεταφορτωθεί.", "Comment": "Σχόλιο", "Comments": "Σχόλια", "Comments are disabled": "Τα σχόλια είναι απενεργοποιημένα", "Contact": "Επικοινωνία", "DELETE MEDIA": "ΔΙΑΓΡΑΦΗ ΑΡΧΕΙΟΥ", "DOWNLOAD": "ΚΑΤΕΒΑΣΜΑ", + "Drag and drop files": "Σύρετε και αποθέστε αρχεία", "EDIT MEDIA": "ΕΠΕΞΕΡΓΑΣΙΑ ΑΡΧΕΙΟΥ", "EDIT PROFILE": "ΕΠΕΞΕΡΓΑΣΙΑ ΠΡΟΦΙΛ", "EDIT SUBTITLE": "ΕΠΕΞΕΡΓΑΣΙΑ ΥΠΟΤΙΤΛΩΝ", "Edit media": "Επεξεργασία αρχείου", - "Edit profile": "Επεξεργασία προφιλ", + "Edit profile": "Επεξεργασία προφίλ", "Edit subtitle": "Επεξεργασία υποτίτλων", "Featured": "Επιλεγμένα", - "Go": "Πήγαινε", + "Go": "Μετάβαση", "History": "Ιστορικό", "Home": "Αρχική", "Language": "Γλώσσα", "Latest": "Πρόσφατα", - "Liked media": "Αγαπημένα", + "Liked media": "Αγαπημένα αρχεία", "Manage comments": "Διαχείριση σχολίων", "Manage media": "Διαχείριση αρχείων", "Manage users": "Διαχείριση χρηστών", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "ΛΙΣΤΕΣ", "Playlists": "Λίστες", "Powered by": "Υποστηρίζεται από το", + "Publish": "Δημοσίευση", "Published on": "Δημοσιεύτηκε στις", "Recommended": "Προτεινόμενα", + "Record Screen": "Καταγραφή οθόνης", "Register": "Εγγραφή", "SAVE": "ΑΠΟΘΗΚΕΥΣΗ", "SEARCH": "ΑΝΑΖΗΤΗΣΗ", @@ -54,20 +59,26 @@ translation_strings = { "Select": "Επιλογή", "Sign in": "Σύνδεση", "Sign out": "Αποσύνδεση", + "Start Recording": "Έναρξη εγγραφής", + "Stop Recording": "Διακοπή εγγραφής", "Subtitle was added": "Οι υπότιτλοι προστέθηκαν", + "Subtitles": "Υπότιτλοι", "Tags": "Ετικέτες", "Terms": "Όροι", + "Trim": "Περικοπή", "UPLOAD": "ΑΝΕΒΑΣΜΑ", "Up next": "Επόμενο", - "Upload": "Ανέβασμα αρχείου", + "Upload": "Ανέβασμα", "Upload media": "Ανέβασμα αρχείων", "Uploads": "Ανεβάσματα", "VIEW ALL": "ΔΕΣ ΤΑ ΟΛΑ", - "View all": "Δές τα όλα", + "View all": "Δες τα όλα", + "View media": "Προβολή αρχείου", "comment": "σχόλιο", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "είναι ένα σύγχρονο, πλήρως λειτουργικό ανοιχτού κώδικα CMS βίντεο και πολυμέσων. Αναπτύχθηκε για να καλύψει τις ανάγκες των σύγχρονων πλατφορμών ιστού για την προβολή και την κοινοποίηση πολυμέσων", "media in category": "αρχεία στην κατηγορία", "media in tag": "αρχεία με ετικέτα", + "or": "ή", "view": "προβολή", "views": "προβολές", "yet": "ακόμα", @@ -82,10 +93,10 @@ replacement_strings = { "Jul": "Ιουλ", "Jun": "Ιουν", "Mar": "Μαρ", - "May": "Μαϊ", + "May": "Μάι", "Nov": "Νοε", "Oct": "Οκτ", - "Sep": "Σεπτ", + "Sep": "Σεπ", "day ago": "μέρα πριν", "days ago": "μέρες πριν", "hour ago": "ώρα πριν", diff --git a/files/frontend_translations/en.py b/files/frontend_translations/en.py index b34d3878..eb3637fb 100644 --- a/files/frontend_translations/en.py +++ b/files/frontend_translations/en.py @@ -2,17 +2,20 @@ translation_strings = { "ABOUT": "", "AUTOPLAY": "", "Add a ": "", + "Browse your files": "", "COMMENT": "", "Categories": "", "Category": "", "Change Language": "", "Change password": "", "About": "", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "", "Comment": "", "Comments": "", "Comments are disabled": "", "Contact": "", "DELETE MEDIA": "", + "Drag and drop files": "", "DOWNLOAD": "", "EDIT MEDIA": "", "EDIT PROFILE": "", @@ -42,21 +45,27 @@ translation_strings = { "PLAYLISTS": "", "Playlists": "", "Powered by": "", + "Publish": "", "Published on": "", "Recommended": "", + "Record Screen": "", "Register": "", "SAVE": "", "SEARCH": "", "SHARE": "", "SHOW MORE": "", "SUBMIT": "", + "Subtitles": "", "Search": "", "Select": "", "Sign in": "", "Sign out": "", + "Start Recording": "", + "Stop Recording": "", "Subtitle was added": "", "Tags": "", "Terms": "", + "Trim": "", "UPLOAD": "", "Up next": "", "Upload": "", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "", "VIEW ALL": "", "View all": "", + "View media": "", "comment": "", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "", "media in category": "", "media in tag": "", + "or": "", "view": "", "views": "", "yet": "", diff --git a/files/frontend_translations/es.py b/files/frontend_translations/es.py index 681894d4..68151aeb 100644 --- a/files/frontend_translations/es.py +++ b/files/frontend_translations/es.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "Reproducción automática", "About": "Acerca de", "Add a ": "Agregar un ", + "Browse your files": "Explorar sus archivos", "COMMENT": "COMENTARIO", "Categories": "Categorías", "Category": "Categoría", "Change Language": "Cambiar idioma", "Change password": "Cambiar contraseña", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "Haga clic en 'Iniciar grabación' y seleccione la pantalla o pestaña para grabar. Una vez finalizada la grabación, haga clic en 'Detener grabación' y la grabación se subirá.", "Comment": "Comentario", "Comments": "Comentarios", "Comments are disabled": "Los comentarios están deshabilitados", "Contact": "Contacto", "DELETE MEDIA": "ELIMINAR MEDIOS", "DOWNLOAD": "DESCARGAR", + "Drag and drop files": "Arrastre y suelte archivos", "EDIT MEDIA": "EDITAR MEDIOS", "EDIT PROFILE": "EDITAR PERFIL", "EDIT SUBTITLE": "EDITAR SUBTÍTULO", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "LISTAS DE REPRODUCCIÓN", "Playlists": "Listas de reproducción", "Powered by": "Desarrollado por", + "Publish": "Publicar", "Published on": "Publicado en", "Recommended": "Recomendado", + "Record Screen": "Grabar pantalla", "Register": "Registrarse", "SAVE": "GUARDAR", "SEARCH": "BUSCAR", @@ -54,9 +59,13 @@ translation_strings = { "Select": "Seleccionar", "Sign in": "Iniciar sesión", "Sign out": "Cerrar sesión", + "Start Recording": "Iniciar grabación", + "Stop Recording": "Detener grabación", "Subtitle was added": "El subtítulo fue agregado", + "Subtitles": "Subtítulos", "Tags": "Etiquetas", "Terms": "Términos", + "Trim": "Recortar", "UPLOAD": "SUBIR", "Up next": "A continuación", "Upload": "Subir", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "Subidas", "VIEW ALL": "VER TODO", "View all": "Ver todo", + "View media": "Ver medios", "comment": "comentario", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "es un CMS de video y medios de código abierto, moderno y completamente equipado. Está desarrollado para satisfacer las necesidades de las plataformas web modernas para ver y compartir medios", "media in category": "medios en la categoría", "media in tag": "medios en la etiqueta", + "or": "o", "view": "vista", "views": "vistas", "yet": "aún", diff --git a/files/frontend_translations/fr.py b/files/frontend_translations/fr.py index d71f58e7..e2e9a13f 100644 --- a/files/frontend_translations/fr.py +++ b/files/frontend_translations/fr.py @@ -3,18 +3,21 @@ translation_strings = { "AUTOPLAY": "Lecture automatique", "About": "À propos", "Add a": "Ajouter un", - "Add a ": "", + "Add a ": "Ajouter un ", + "Browse your files": "Parcourir vos fichiers", "COMMENT": "COMMENTAIRE", "Categories": "Catégories", "Category": "Catégorie", "Change Language": "Changer de langue", "Change password": "Changer le mot de passe", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "Cliquez sur 'Démarrer l'enregistrement' et sélectionnez l'écran ou l'onglet à enregistrer. Une fois l'enregistrement terminé, cliquez sur 'Arrêter l'enregistrement', et l'enregistrement sera téléversé.", "Comment": "Commentaire", "Comments": "Commentaires", "Comments are disabled": "Les commentaires sont désactivés", "Contact": "Contact", "DELETE MEDIA": "SUPPRIMER LE MÉDIA", "DOWNLOAD": "TÉLÉCHARGER", + "Drag and drop files": "Glisser-déposer des fichiers", "EDIT MEDIA": "MODIFIER LE MÉDIA", "EDIT PROFILE": "MODIFIER LE PROFIL", "EDIT SUBTITLE": "MODIFIER LE SOUS-TITRE", @@ -43,8 +46,10 @@ translation_strings = { "PLAYLISTS": "PLAYLISTS", "Playlists": "Playlists", "Powered by": "Propulsé par", + "Publish": "Publier", "Published on": "Publié le", "Recommended": "Recommandé", + "Record Screen": "Enregistrer l'écran", "Register": "S'inscrire", "SAVE": "ENREGISTRER", "SEARCH": "RECHERCHER", @@ -55,9 +60,13 @@ translation_strings = { "Select": "Sélectionner", "Sign in": "Se connecter", "Sign out": "Se déconnecter", + "Start Recording": "Commencer l'enregistrement", + "Stop Recording": "Arrêter l'enregistrement", "Subtitle was added": "Le sous-titre a été ajouté", + "Subtitles": "Sous-titres", "Tags": "Tags", "Terms": "Conditions", + "Trim": "Couper", "UPLOAD": "TÉLÉCHARGER", "Up next": "À suivre", "Upload": "Télécharger", @@ -65,10 +74,12 @@ translation_strings = { "Uploads": "Téléchargements", "VIEW ALL": "VOIR TOUT", "View all": "Voir tout", + "View media": "Voir le média", "comment": "commentaire", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "est un CMS vidéo et média open source moderne et complet. Il est développé pour répondre aux besoins des plateformes web modernes pour la visualisation et le partage de médias", "media in category": "média dans la catégorie", "media in tag": "média dans le tag", + "or": "ou", "view": "vue", "views": "vues", "yet": "encore", diff --git a/files/frontend_translations/he.py b/files/frontend_translations/he.py index 022f1205..28b11df4 100644 --- a/files/frontend_translations/he.py +++ b/files/frontend_translations/he.py @@ -1,104 +1,115 @@ translation_strings = { - 'ABOUT': 'על אודות', - 'AUTOPLAY': 'ניגון אוטומטי', - 'About': 'על אודות', - 'Add a ': 'הוסף', - 'COMMENT': 'תגובה', - 'Categories': 'קטגוריות', - 'Category': 'קטגוריה', - 'Change Language': 'שנה שפה', - 'Change password': 'שנה סיסמה', - 'Comment': 'תגובה', - 'Comments': 'תגובות', - 'Comments are disabled': 'התגובות מושבתות', - 'Contact': 'צור קשר', - 'DELETE MEDIA': 'מחק מדיה', - 'DOWNLOAD': 'הורד', - 'EDIT MEDIA': 'ערוך מדיה', - 'EDIT PROFILE': 'ערוך פרופיל', - 'EDIT SUBTITLE': 'ערוך כתוביות', - 'Edit media': 'ערוך מדיה', - 'Edit profile': 'ערוך פרופיל', - 'Edit subtitle': 'ערוך כתוביות', - 'Featured': 'מומלצים', - 'Go': 'בצע', # in context of "execution" - 'History': 'היסטוריה', - 'Home': 'דף הבית', - 'Language': 'שפה', - 'Latest': 'העדכונים האחרונים', - 'Liked media': 'מדיה שאהבתי', - 'Manage comments': 'ניהול תגובות', - 'Manage media': 'ניהול מדיה', - 'Manage users': 'ניהול משתמשים', - 'Media': 'מדיה', - 'Media was edited': 'המדיה נערכה', - 'Members': 'משתמשים', - 'My media': 'המדיה שלי', - 'My playlists': 'הפלייליסטים שלי', - 'No': 'לא', # in context of "no comments", etc. - 'No comment yet': 'עדיין אין תגובות', - 'No comments yet': 'עדיין אין תגובות', - 'No results for': 'אין תוצאות עבור', - 'PLAYLISTS': 'פלייליסטים', - 'Playlists': 'פלייליסטים', - 'Powered by': 'מופעל על ידי', - 'Published on': 'פורסם בתאריך', - 'Recommended': 'מומלץ', - 'Register': 'הרשמה', - 'SAVE': 'שמור', - 'SEARCH': 'חפש', - 'SHARE': 'שתף', - 'SHOW MORE': 'הצג עוד', - 'SUBMIT': 'שלח', - 'Search': 'חפש', - 'Select': 'בחר', - 'Sign in': 'התחבר', - 'Sign out': 'התנתק', - 'Subtitle was added': 'הכתובית נוספה', - 'Tags': 'תגיות', - 'Terms': 'תנאים', - 'UPLOAD': 'העלה', - 'Up next': 'הבא בתור', - 'Upload': 'העלה', - 'Upload media': 'העלה מדיה', - 'Uploads': 'העלאות', - 'VIEW ALL': 'הצג הכל', - 'View all': 'הצג הכל', - 'comment': 'תגובה', - 'is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media': 'מערכת ניהול מדיה ווידאו מודרנית, פתוחה ומלאה בפיצ׳רים. פותחה כדי לענות על הצרכים של פלטפורמות אינטרנט מודרניות לצפייה ושיתוף מדיה.', - 'media in category': 'מדיה בקטגוריה', - 'media in tag': 'מדיה בתגית', - 'view': 'צפיות', - 'views': 'צפיות', - 'yet': 'עדיין', + "ABOUT": "על אודות", + "AUTOPLAY": "ניגון אוטומטי", + "About": "על אודות", + "Add a ": "הוסף", + "Browse your files": "עיין בקבצים שלך", + "COMMENT": "תגובה", + "Categories": "קטגוריות", + "Category": "קטגוריה", + "Change Language": "שנה שפה", + "Change password": "שנה סיסמה", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "לחץ על 'התחל הקלטה' ובחר את המסך או הכרטיסייה להקלטה. לאחר סיום ההקלטה, לחץ על 'עצור הקלטה', וההקלטה תועלה.", + "Comment": "תגובה", + "Comments": "תגובות", + "Comments are disabled": "התגובות מושבתות", + "Contact": "צור קשר", + "DELETE MEDIA": "מחק מדיה", + "DOWNLOAD": "הורד", + "Drag and drop files": "גרור ושחרר קבצים", + "EDIT MEDIA": "ערוך מדיה", + "EDIT PROFILE": "ערוך פרופיל", + "EDIT SUBTITLE": "ערוך כתוביות", + "Edit media": "ערוך מדיה", + "Edit profile": "ערוך פרופיל", + "Edit subtitle": "ערוך כתוביות", + "Featured": "מומלצים", + "Go": "בצע", + "History": "היסטוריה", + "Home": "דף הבית", + "Language": "שפה", + "Latest": "העדכונים האחרונים", + "Liked media": "מדיה שאהבתי", + "Manage comments": "ניהול תגובות", + "Manage media": "ניהול מדיה", + "Manage users": "ניהול משתמשים", + "Media": "מדיה", + "Media was edited": "המדיה נערכה", + "Members": "משתמשים", + "My media": "המדיה שלי", + "My playlists": "הפלייליסטים שלי", + "No": "לא", + "No comment yet": "עדיין אין תגובות", + "No comments yet": "עדיין אין תגובות", + "No results for": "אין תוצאות עבור", + "PLAYLISTS": "פלייליסטים", + "Playlists": "פלייליסטים", + "Powered by": "מופעל על ידי", + "Publish": "פרסם", + "Published on": "פורסם בתאריך", + "Recommended": "מומלץ", + "Record Screen": "הקלטת מסך", + "Register": "הרשמה", + "SAVE": "שמור", + "SEARCH": "חפש", + "SHARE": "שתף", + "SHOW MORE": "הצג עוד", + "SUBMIT": "שלח", + "Search": "חפש", + "Select": "בחר", + "Sign in": "התחבר", + "Sign out": "התנתק", + "Start Recording": "התחל הקלטה", + "Stop Recording": "עצור הקלטה", + "Subtitle was added": "הכתובית נוספה", + "Subtitles": "כתוביות", + "Tags": "תגיות", + "Terms": "תנאים", + "Trim": "גזירה", + "UPLOAD": "העלה", + "Up next": "הבא בתור", + "Upload": "העלה", + "Upload media": "העלה מדיה", + "Uploads": "העלאות", + "VIEW ALL": "הצג הכל", + "View all": "הצג הכל", + "View media": "צפה במדיה", + "comment": "תגובה", + "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "מערכת ניהול מדיה ווידאו מודרנית, פתוחה ומלאה בפיצ׳רים. פותחה כדי לענות על הצרכים של פלטפורמות אינטרנט מודרניות לצפייה ושיתוף מדיה.", + "media in category": "מדיה בקטגוריה", + "media in tag": "מדיה בתגית", + "or": "או", + "view": "צפיות", + "views": "צפיות", + "yet": "עדיין", } replacement_strings = { - 'Apr': 'אפריל', - 'Aug': 'אוגוסט', - 'Dec': 'דצמבר', - 'Feb': 'פברואר', - 'Jan': 'ינואר', - 'Jul': 'יולי', - 'Jun': 'יוני', - 'Mar': 'מרץ', - 'May': 'מאי', - 'Nov': 'נובמבר', - 'Oct': 'אוקטובר', - 'Sep': 'ספטמבר', - 'day ago': 'לפני יום', - 'days ago': 'לפני ימים', - 'hour ago': 'לפני שעה', - 'hours ago': 'לפני שעות', - 'just now': 'הרגע', - 'minute ago': 'לפני דקה', - 'minutes ago': 'לפני דקות', - 'month ago': 'לפני חודש', - 'months ago': 'לפני חודשים', - 'second ago': 'לפני שנייה', - 'seconds ago': 'לפני שניות', - 'week ago': 'לפני שבוע', - 'weeks ago': 'לפני שבועות', - 'year ago': 'לפני שנה', - 'years ago': 'לפני שנים', + "Apr": "אפריל", + "Aug": "אוגוסט", + "Dec": "דצמבר", + "Feb": "פברואר", + "Jan": "ינואר", + "Jul": "יולי", + "Jun": "יוני", + "Mar": "מרץ", + "May": "מאי", + "Nov": "נובמבר", + "Oct": "אוקטובר", + "Sep": "ספטמבר", + "day ago": "לפני יום", + "days ago": "לפני ימים", + "hour ago": "לפני שעה", + "hours ago": "לפני שעות", + "just now": "הרגע", + "minute ago": "לפני דקה", + "minutes ago": "לפני דקות", + "month ago": "לפני חודש", + "months ago": "לפני חודשים", + "second ago": "לפני שנייה", + "seconds ago": "לפני שניות", + "week ago": "לפני שבוע", + "weeks ago": "לפני שבועות", + "year ago": "לפני שנה", + "years ago": "לפני שנים", } diff --git a/files/frontend_translations/hi.py b/files/frontend_translations/hi.py index ea7d0cf4..ef9bb509 100644 --- a/files/frontend_translations/hi.py +++ b/files/frontend_translations/hi.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "स्वतः चलाएं", "About": "के बारे में", "Add a ": "जोड़ें", + "Browse your files": "अपनी फ़ाइलें ब्राउज़ करें", "COMMENT": "टिप्पणी", "Categories": "श्रेणियाँ", "Category": "श्रेणी", "Change Language": "भाषा बदलें", "Change password": "पासवर्ड बदलें", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "'रिकॉर्डिंग प्रारंभ करें' पर क्लिक करें और रिकॉर्ड करने के लिए स्क्रीन या टैब का चयन करें। रिकॉर्डिंग समाप्त होने के बाद, 'रिकॉर्डिंग रोकें' पर क्लिक करें, और रिकॉर्डिंग अपलोड हो जाएगी।", "Comment": "टिप्पणी", "Comments": "टिप्पणियाँ", "Comments are disabled": "टिप्पणियाँ अक्षम हैं", "Contact": "संपर्क करें", "DELETE MEDIA": "मीडिया हटाएं", "DOWNLOAD": "डाउनलोड करें", + "Drag and drop files": "फ़ाइलें खींचें और छोड़ें", "EDIT MEDIA": "मीडिया संपादित करें", "EDIT PROFILE": "प्रोफ़ाइल संपादित करें", "EDIT SUBTITLE": "उपशीर्षक संपादित करें", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "प्लेलिस्ट", "Playlists": "प्लेलिस्ट", "Powered by": "द्वारा संचालित", + "Publish": "प्रकाशित करें", "Published on": "पर प्रकाशित", "Recommended": "अनुशंसित", + "Record Screen": "स्क्रीन रिकॉर्ड करें", "Register": "पंजीकरण करें", "SAVE": "सहेजें", "SEARCH": "खोजें", @@ -54,9 +59,13 @@ translation_strings = { "Select": "चुनें", "Sign in": "साइन इन करें", "Sign out": "साइन आउट करें", + "Start Recording": "रिकॉर्डिंग प्रारंभ करें", + "Stop Recording": "रिकॉर्डिंग रोकें", "Subtitle was added": "उपशीर्षक जोड़ा गया", + "Subtitles": "उपशीर्षक", "Tags": "टैग", "Terms": "शर्तें", + "Trim": "छांटें", "UPLOAD": "अपलोड करें", "Up next": "अगला", "Upload": "अपलोड करें", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "अपलोड", "VIEW ALL": "सभी देखें", "View all": "सभी देखें", + "View media": "मीडिया देखें", "comment": "टिप्पणी", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "एक आधुनिक, पूर्ण विशेषताओं वाला ओपन सोर्स वीडियो और मीडिया CMS है। इसे मीडिया देखने और साझा करने के लिए आधुनिक वेब प्लेटफार्मों की आवश्यकताओं को पूरा करने के लिए विकसित किया गया है", "media in category": "श्रेणी में मीडिया", "media in tag": "टैग में मीडिया", + "or": "या", "view": "देखें", "views": "दृश्य", "yet": "अभी तक", diff --git a/files/frontend_translations/id.py b/files/frontend_translations/id.py index 67df8134..a13ceed8 100644 --- a/files/frontend_translations/id.py +++ b/files/frontend_translations/id.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "PUTAR OTOMATIS", "About": "Tentang", "Add a ": "Tambahkan ", + "Browse your files": "Jelajahi file Anda", "COMMENT": "KOMENTAR", "Categories": "Kategori", "Category": "Kategori", "Change Language": "Ganti Bahasa", "Change password": "Ganti kata sandi", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "Klik 'Mulai Merekam' dan pilih layar atau tab untuk merekam. Setelah perekaman selesai, klik 'Hentikan Perekaman,' dan rekaman akan diunggah.", "Comment": "Komentar", "Comments": "Komentar", "Comments are disabled": "Komentar dinonaktifkan", "Contact": "Kontak", "DELETE MEDIA": "HAPUS MEDIA", "DOWNLOAD": "UNDUH", + "Drag and drop files": "Seret dan lepas file", "EDIT MEDIA": "EDIT MEDIA", "EDIT PROFILE": "EDIT PROFIL", "EDIT SUBTITLE": "EDIT SUBTITLE", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "DAFTAR PUTAR", "Playlists": "Daftar putar", "Powered by": "Didukung oleh", + "Publish": "Terbitkan", "Published on": "Diterbitkan pada", "Recommended": "Direkomendasikan", + "Record Screen": "Rekam Layar", "Register": "Daftar", "SAVE": "SIMPAN", "SEARCH": "CARI", @@ -54,9 +59,13 @@ translation_strings = { "Select": "Pilih", "Sign in": "Masuk", "Sign out": "Keluar", + "Start Recording": "Mulai Merekam", + "Stop Recording": "Hentikan Perekaman", "Subtitle was added": "Subtitle telah ditambahkan", + "Subtitles": "Subtitel", "Tags": "Tag", "Terms": "Ketentuan", + "Trim": "Potong", "UPLOAD": "UNGGAH", "Up next": "Selanjutnya", "Upload": "Unggah", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "Unggahan", "VIEW ALL": "LIHAT SEMUA", "View all": "Lihat semua", + "View media": "Lihat media", "comment": "komentar", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "adalah CMS video dan media open source yang modern dan lengkap. Ini dikembangkan untuk memenuhi kebutuhan platform web modern untuk menonton dan berbagi media", "media in category": "media dalam kategori", "media in tag": "media dalam tag", + "or": "atau", "view": "lihat", "views": "tampilan", "yet": "belum", diff --git a/files/frontend_translations/it.py b/files/frontend_translations/it.py index e0e38f7d..4da118b1 100644 --- a/files/frontend_translations/it.py +++ b/files/frontend_translations/it.py @@ -4,17 +4,20 @@ translation_strings = { "About": "Su di noi", "Add a": "Aggiungi un", "Add a ": "Aggiungi un ", + "Browse your files": "Sfoglia i tuoi file", "COMMENT": "COMMENTA", "Categories": "Categorie", "Category": "Categoria", "Change Language": "Cambia lingua", "Change password": "Cambia password", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "Fai clic su 'Avvia registrazione' e seleziona lo schermo o la scheda da registrare. Una volta terminata la registrazione, fai clic su 'Interrompi registrazione' e la registrazione verrà caricata.", "Comment": "Commento", "Comments": "Commenti", "Comments are disabled": "I commenti sono disabilitati", "Contact": "Contatti", "DELETE MEDIA": "ELIMINA MEDIA", "DOWNLOAD": "SCARICA", + "Drag and drop files": "Trascina e rilascia i file", "EDIT MEDIA": "MODIFICA IL MEDIA", "EDIT PROFILE": "MODIFICA IL PROFILO", "EDIT SUBTITLE": "MODIFICA I SOTTOTITOLI", @@ -43,8 +46,10 @@ translation_strings = { "PLAYLISTS": "PLAYLIST", "Playlists": "Playlist", "Powered by": "Powered by", + "Publish": "Pubblica", "Published on": "Pubblicato il", "Recommended": "Raccomandati", + "Record Screen": "Registra schermo", "Register": "Registrati", "SAVE": "SALVA", "SEARCH": "CERCA", @@ -55,9 +60,13 @@ translation_strings = { "Select": "Seleziona", "Sign in": "Login", "Sign out": "Logout", + "Start Recording": "Inizia registrazione", + "Stop Recording": "Interrompi registrazione", "Subtitle was added": "I sottotitoli sono stati aggiunti", + "Subtitles": "Sottotitoli", "Tags": "Tag", "Terms": "Termini e condizioni", + "Trim": "Taglia", "UPLOAD": "CARICA", "Up next": "A seguire", "Upload": "Carica", @@ -65,10 +74,12 @@ translation_strings = { "Uploads": "Caricamenti", "VIEW ALL": "MOSTRA TUTTI", "View all": "Mostra tutti", + "View media": "Visualizza media", "comment": "commento", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "è un CMS per media open source moderno e completo. È stato sviluppato per rispondere per venire incontro alle esigenze delle moderne piattaforme web di visualizzazione e condivisione media", "media in category": "media nella categoria", "media in tag": "media con tag", + "or": "o", "view": "visualizzazione", "views": "visualizzazioni", "yet": "ancora", diff --git a/files/frontend_translations/ja.py b/files/frontend_translations/ja.py index 6319827b..33ab5088 100644 --- a/files/frontend_translations/ja.py +++ b/files/frontend_translations/ja.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "自動再生", "About": "約", "Add a ": "追加", + "Browse your files": "ファイルを参照", "COMMENT": "コメント", "Categories": "カテゴリー", "Category": "カテゴリー", "Change Language": "言語を変更", "Change password": "パスワードを変更", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "「録画開始」をクリックして、録画する画面またはタブを選択します。録画が終了したら、「録画停止」をクリックすると、録画がアップロードされます。", "Comment": "コメント", "Comments": "コメント", "Comments are disabled": "コメントは無効です", "Contact": "連絡先", "DELETE MEDIA": "メディアを削除", "DOWNLOAD": "ダウンロード", + "Drag and drop files": "ファイルをドラッグアンドドロップ", "EDIT MEDIA": "メディアを編集", "EDIT PROFILE": "プロフィールを編集", "EDIT SUBTITLE": "字幕を編集", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "プレイリスト", "Playlists": "プレイリスト", "Powered by": "提供", + "Publish": "公開", "Published on": "公開日", "Recommended": "おすすめ", + "Record Screen": "画面を録画", "Register": "登録", "SAVE": "保存", "SEARCH": "検索", @@ -54,9 +59,13 @@ translation_strings = { "Select": "選択", "Sign in": "サインイン", "Sign out": "サインアウト", + "Start Recording": "録画開始", + "Stop Recording": "録画停止", "Subtitle was added": "字幕が追加されました", + "Subtitles": "字幕", "Tags": "タグ", "Terms": "利用規約", + "Trim": "トリム", "UPLOAD": "アップロード", "Up next": "次に再生", "Upload": "アップロード", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "アップロード", "VIEW ALL": "すべて表示", "View all": "すべて表示", + "View media": "メディアを見る", "comment": "コメント", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "は、現代のウェブプラットフォームのニーズに応えるために開発された、最新のフル機能のオープンソースビデオおよびメディアCMSです。", "media in category": "カテゴリー内のメディア", "media in tag": "タグ内のメディア", + "or": "または", "view": "ビュー", "views": "ビュー", "yet": "まだ", diff --git a/files/frontend_translations/ko.py b/files/frontend_translations/ko.py index 84aba6bc..d9791a3b 100644 --- a/files/frontend_translations/ko.py +++ b/files/frontend_translations/ko.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "자동 재생", "About": "정보", "Add a ": "추가", + "Browse your files": "파일 찾아보기", "COMMENT": "댓글", "Categories": "카테고리", "Category": "카테고리", "Change Language": "언어 변경", "Change password": "비밀번호 변경", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "'녹화 시작'을 클릭하고 녹화할 화면이나 탭을 선택하세요. 녹화가 끝나면 '녹화 중지'를 클릭하면 녹화 파일이 업로드됩니다.", "Comment": "댓글", "Comments": "댓글", "Comments are disabled": "댓글이 비활성화되었습니다", "Contact": "연락처", "DELETE MEDIA": "미디어 삭제", "DOWNLOAD": "다운로드", + "Drag and drop files": "파일을 끌어다 놓기", "EDIT MEDIA": "미디어 편집", "EDIT PROFILE": "프로필 편집", "EDIT SUBTITLE": "자막 편집", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "재생 목록", "Playlists": "재생 목록", "Powered by": "제공", + "Publish": "게시", "Published on": "게시일", "Recommended": "추천", + "Record Screen": "화면 녹화", "Register": "등록", "SAVE": "저장", "SEARCH": "검색", @@ -54,9 +59,13 @@ translation_strings = { "Select": "선택", "Sign in": "로그인", "Sign out": "로그아웃", + "Start Recording": "녹화 시작", + "Stop Recording": "녹화 중지", "Subtitle was added": "자막이 추가되었습니다", + "Subtitles": "자막", "Tags": "태그", "Terms": "약관", + "Trim": "자르기", "UPLOAD": "업로드", "Up next": "다음", "Upload": "업로드", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "업로드", "VIEW ALL": "모두 보기", "View all": "모두 보기", + "View media": "미디어 보기", "comment": "댓글", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "현대적인, 완전한 기능을 갖춘 오픈 소스 비디오 및 미디어 CMS입니다. 미디어를 시청하고 공유하기 위한 현대 웹 플랫폼의 요구를 충족시키기 위해 개발되었습니다", "media in category": "카테고리의 미디어", "media in tag": "태그의 미디어", + "or": "또는", "view": "보기", "views": "조회수", "yet": "아직", diff --git a/files/frontend_translations/nl.py b/files/frontend_translations/nl.py index 5e33868c..9c642767 100644 --- a/files/frontend_translations/nl.py +++ b/files/frontend_translations/nl.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "AUTOMATISCH AFSPELEN", "About": "Over", "Add a ": "Voeg een ", + "Browse your files": "Blader door uw bestanden", "COMMENT": "REACTIE", "Categories": "Categorieën", "Category": "Categorie", "Change Language": "Taal wijzigen", "Change password": "Wachtwoord wijzigen", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "Klik op 'Opname starten' en selecteer het scherm of tabblad dat u wilt opnemen. Zodra de opname is voltooid, klikt u op 'Opname stoppen' en de opname wordt geüpload.", "Comment": "Reactie", "Comments": "Reacties", "Comments are disabled": "Reacties zijn uitgeschakeld", "Contact": "Contact", "DELETE MEDIA": "MEDIA VERWIJDEREN", "DOWNLOAD": "DOWNLOADEN", + "Drag and drop files": "Sleep bestanden en zet ze neer", "EDIT MEDIA": "MEDIA BEWERKEN", "EDIT PROFILE": "PROFIEL BEWERKEN", "EDIT SUBTITLE": "ONDERTITEL BEWERKEN", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "AFSPEELLIJSTEN", "Playlists": "Afspeellijsten", "Powered by": "Aangedreven door", + "Publish": "Publiceren", "Published on": "Gepubliceerd op", "Recommended": "Aanbevolen", + "Record Screen": "Scherm opnemen", "Register": "Registreren", "SAVE": "OPSLAAN", "SEARCH": "ZOEKEN", @@ -54,9 +59,13 @@ translation_strings = { "Select": "Selecteer", "Sign in": "Inloggen", "Sign out": "Uitloggen", + "Start Recording": "Opname starten", + "Stop Recording": "Opname stoppen", "Subtitle was added": "Ondertitel is toegevoegd", + "Subtitles": "Ondertitels", "Tags": "Tags", "Terms": "Voorwaarden", + "Trim": "Bijsnijden", "UPLOAD": "UPLOADEN", "Up next": "Hierna", "Upload": "Uploaden", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "Uploads", "VIEW ALL": "BEKIJK ALLES", "View all": "Bekijk alles", + "View media": "Media bekijken", "comment": "reactie", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "is een modern, volledig uitgerust open source video- en media-CMS. Het is ontwikkeld om te voldoen aan de behoeften van moderne webplatforms voor het bekijken en delen van media", "media in category": "media in categorie", "media in tag": "media in tag", + "or": "of", "view": "bekijk", "views": "weergaven", "yet": "nog", diff --git a/files/frontend_translations/pt.py b/files/frontend_translations/pt.py index 146e122a..a5f09d47 100644 --- a/files/frontend_translations/pt.py +++ b/files/frontend_translations/pt.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "REPRODUÇÃO AUTOMÁTICA", "About": "Sobre", "Add a ": "Adicionar um ", + "Browse your files": "Procurar seus arquivos", "COMMENT": "COMENTÁRIO", "Categories": "Categorias", "Category": "Categoria", "Change Language": "Mudar idioma", "Change password": "Mudar senha", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "Clique em 'Iniciar gravação' e selecione a tela ou guia para gravar. Quando a gravação terminar, clique em 'Parar gravação' e a gravação será enviada.", "Comment": "Comentário", "Comments": "Comentários", "Comments are disabled": "Comentários estão desativados", "Contact": "Contato", "DELETE MEDIA": "EXCLUIR MÍDIA", "DOWNLOAD": "BAIXAR", + "Drag and drop files": "Arraste e solte arquivos", "EDIT MEDIA": "EDITAR MÍDIA", "EDIT PROFILE": "EDITAR PERFIL", "EDIT SUBTITLE": "EDITAR LEGENDA", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "PLAYLISTS", "Playlists": "Playlists", "Powered by": "Desenvolvido por", + "Publish": "Publicar", "Published on": "Publicado em", "Recommended": "Recomendado", + "Record Screen": "Gravar tela", "Register": "Registrar", "SAVE": "SALVAR", "SEARCH": "PESQUISAR", @@ -54,9 +59,13 @@ translation_strings = { "Select": "Selecionar", "Sign in": "Entrar", "Sign out": "Sair", + "Start Recording": "Iniciar Gravação", + "Stop Recording": "Parar Gravação", "Subtitle was added": "Legenda foi adicionada", + "Subtitles": "Legendas", "Tags": "Tags", "Terms": "Termos", + "Trim": "Cortar", "UPLOAD": "CARREGAR", "Up next": "A seguir", "Upload": "Carregar", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "Uploads", "VIEW ALL": "VER TODOS", "View all": "Ver todos", + "View media": "Ver mídia", "comment": "comentário", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "é um CMS de vídeo e mídia de código aberto, moderno e completo. Foi desenvolvido para atender às necessidades das plataformas web modernas para visualização e compartilhamento de mídia", "media in category": "mídia na categoria", "media in tag": "mídia na tag", + "or": "ou", "view": "visualização", "views": "visualizações", "yet": "ainda", diff --git a/files/frontend_translations/ru.py b/files/frontend_translations/ru.py index 448e48fc..64fb663c 100644 --- a/files/frontend_translations/ru.py +++ b/files/frontend_translations/ru.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "Автовоспроизведение", "About": "О", "Add a ": "Добавить ", + "Browse your files": "Просмотреть файлы", "COMMENT": "КОММЕНТАРИЙ", "Categories": "Категории", "Category": "Категория", "Change Language": "Изменить язык", "Change password": "Изменить пароль", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "Нажмите 'Начать запись' и выберите экран или вкладку для записи. После окончания записи нажмите 'Остановить запись', и запись будет загружена.", "Comment": "Комментарий", "Comments": "Комментарии", "Comments are disabled": "Комментарии отключены", "Contact": "Контакт", "DELETE MEDIA": "УДАЛИТЬ МЕДИА", "DOWNLOAD": "СКАЧАТЬ", + "Drag and drop files": "Перетащите файлы", "EDIT MEDIA": "РЕДАКТИРОВАТЬ МЕДИА", "EDIT PROFILE": "РЕДАКТИРОВАТЬ ПРОФИЛЬ", "EDIT SUBTITLE": "РЕДАКТИРОВАТЬ СУБТИТРЫ", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "ПЛЕЙЛИСТЫ", "Playlists": "Плейлисты", "Powered by": "Работает на", + "Publish": "Опубликовать", "Published on": "Опубликовано", "Recommended": "Рекомендуемое", + "Record Screen": "Запись экрана", "Register": "Регистрация", "SAVE": "СОХРАНИТЬ", "SEARCH": "ПОИСК", @@ -54,9 +59,13 @@ translation_strings = { "Select": "Выбрать", "Sign in": "Войти", "Sign out": "Выйти", + "Start Recording": "Начать запись", + "Stop Recording": "Остановить запись", "Subtitle was added": "Субтитры были добавлены", + "Subtitles": "Субтитры", "Tags": "Теги", "Terms": "Условия", + "Trim": "Обрезать", "UPLOAD": "ЗАГРУЗИТЬ", "Up next": "Далее", "Upload": "Загрузить", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "Загрузки", "VIEW ALL": "ПОКАЗАТЬ ВСЕ", "View all": "Показать все", + "View media": "Просмотр медиа", "comment": "комментарий", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "это современная, полнофункциональная система управления видео и медиа с открытым исходным кодом. Она разработана для удовлетворения потребностей современных веб-платформ для просмотра и обмена медиа", "media in category": "медиа в категории", "media in tag": "медиа в теге", + "or": "или", "view": "просмотр", "views": "просмотры", "yet": "еще", diff --git a/files/frontend_translations/sl.py b/files/frontend_translations/sl.py index 60d5eb43..a123a77f 100644 --- a/files/frontend_translations/sl.py +++ b/files/frontend_translations/sl.py @@ -1,19 +1,22 @@ translation_strings = { "ABOUT": "O NAS", "AUTOPLAY": "SAMODEJNO PREDVAJANJE", + "About": "O nas", "Add a ": "Dodaj ", + "Browse your files": "Prebrskaj datoteke", "COMMENT": "KOMENTAR", "Categories": "Kategorije", "Category": "Kategorija", "Change Language": "Spremeni jezik", "Change password": "Spremeni geslo", - "About": "O nas", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "Kliknite 'Začni snemanje' in izberite zaslon ali zavihek za snemanje. Ko je snemanje končano, kliknite 'Ustavi snemanje' in posnetek bo naložen.", "Comment": "Komentar", "Comments": "Komentarji", "Comments are disabled": "Komentarji so onemogočeni", "Contact": "Kontakt", "DELETE MEDIA": "IZBRIŠI MEDIJ", "DOWNLOAD": "PRENESI", + "Drag and drop files": "Povleci in spusti datoteke", "EDIT MEDIA": "UREDI MEDIJ", "EDIT PROFILE": "UREDI PROFIL", "EDIT SUBTITLE": "UREDI PODNAPISE", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "SEZNAMI PREDVAJANJA", "Playlists": "Seznami predvajanja", "Powered by": "Poganja", + "Publish": "Objavi", "Published on": "Objavljeno", "Recommended": "Priporočeno", + "Record Screen": "Snemanje zaslona", "Register": "Registracija", "SAVE": "SHRANI", "SEARCH": "ISKANJE", @@ -54,9 +59,13 @@ translation_strings = { "Select": "Izberi", "Sign in": "Prijava", "Sign out": "Odjava", + "Start Recording": "Začni snemanje", + "Stop Recording": "Ustavi snemanje", "Subtitle was added": "Podnapisi so bili dodani", + "Subtitles": "Podnapisi", "Tags": "Oznake", "Terms": "Pogoji", + "Trim": "Obreži", "UPLOAD": "NALOŽI", "Up next": "Naslednji", "Upload": "Naloži", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "Naloženi", "VIEW ALL": "PRIKAŽI VSE", "View all": "Prikaži vse", + "View media": "Ogled medija", "comment": "komentar", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "je moderni, popolnoma opremljen odprtokodni video in medijski CMS. Razvit je za potrebe sodobnih spletnih platform za ogled in deljenje medijev", "media in category": "mediji v kategoriji", "media in tag": "mediji z oznako", + "or": "ali", "view": "ogled", "views": "ogledi", "yet": "še", diff --git a/files/frontend_translations/tr.py b/files/frontend_translations/tr.py index 23a1fb8e..18031989 100644 --- a/files/frontend_translations/tr.py +++ b/files/frontend_translations/tr.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "OTOMATİK OYNATMA", "About": "Hakkında", "Add a ": "Ekle ", + "Browse your files": "Dosyalarınıza göz atın", "COMMENT": "YORUM", "Categories": "Kategoriler", "Category": "Kategori", "Change Language": "Dili Değiştir", "Change password": "Şifreyi Değiştir", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "'Kaydı Başlat'a tıklayın ve kaydedilecek ekranı veya sekmeyi seçin. Kayıt bittiğinde, 'Kaydı Durdur'a tıklayın ve kayıt yüklenecektir.", "Comment": "Yorum", "Comments": "Yorumlar", "Comments are disabled": "Yorumlar devre dışı", "Contact": "İletişim", "DELETE MEDIA": "MEDYAYI SİL", "DOWNLOAD": "İNDİR", + "Drag and drop files": "Dosyaları sürükleyip bırakın", "EDIT MEDIA": "MEDYAYI DÜZENLE", "EDIT PROFILE": "PROFİLİ DÜZENLE", "EDIT SUBTITLE": "ALT YAZIYI DÜZENLE", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "ÇALMA LİSTELERİ", "Playlists": "Çalma listeleri", "Powered by": "Tarafından desteklenmektedir", + "Publish": "Yayınla", "Published on": "Yayınlanma tarihi", "Recommended": "Önerilen", + "Record Screen": "Ekranı Kaydet", "Register": "Kayıt Ol", "SAVE": "KAYDET", "SEARCH": "ARA", @@ -54,9 +59,13 @@ translation_strings = { "Select": "Seç", "Sign in": "Giriş Yap", "Sign out": "Çıkış Yap", + "Start Recording": "Kaydı Başlat", + "Stop Recording": "Kaydı Durdur", "Subtitle was added": "Alt yazı eklendi", + "Subtitles": "Altyazılar", "Tags": "Etiketler", "Terms": "Şartlar", + "Trim": "Kırp", "UPLOAD": "YÜKLE", "Up next": "Sıradaki", "Upload": "Yükle", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "Yüklemeler", "VIEW ALL": "HEPSİNİ GÖR", "View all": "Hepsini gör", + "View media": "Medyayı Görüntüle", "comment": "yorum", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "modern, tam özellikli açık kaynaklı bir video ve medya CMS'sidir. Medya izleme ve paylaşma ihtiyaçlarını karşılamak için geliştirilmiştir", "media in category": "kategorideki medya", "media in tag": "etiketteki medya", + "or": "veya", "view": "görünüm", "views": "görünümler", "yet": "henüz", diff --git a/files/frontend_translations/ur.py b/files/frontend_translations/ur.py index 4d1b9e1f..f2071790 100644 --- a/files/frontend_translations/ur.py +++ b/files/frontend_translations/ur.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "خودکار پلے", "About": "کے بارے میں", "Add a ": "شامل کریں", + "Browse your files": "اپنی فائلیں براؤز کریں", "COMMENT": "تبصرہ", "Categories": "اقسام", "Category": "قسم", "Change Language": "زبان تبدیل کریں", "Change password": "پاس ورڈ تبدیل کریں", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "'ریکارڈنگ شروع کریں' پر کلک کریں اور ریکارڈ کرنے کے لیے اسکرین یا ٹیب منتخب کریں۔ ریکارڈنگ مکمل ہونے کے بعد، 'ریکارڈنگ بند کریں' پر کلک کریں، اور ریکارڈنگ اپ لوڈ ہو جائے گی۔", "Comment": "تبصرہ", "Comments": "تبصرے", "Comments are disabled": "تبصرے غیر فعال ہیں", "Contact": "رابطہ کریں", "DELETE MEDIA": "میڈیا حذف کریں", "DOWNLOAD": "ڈاؤن لوڈ", + "Drag and drop files": "فائلیں گھسیٹیں اور چھوڑیں", "EDIT MEDIA": "میڈیا ترمیم کریں", "EDIT PROFILE": "پروفائل ترمیم کریں", "EDIT SUBTITLE": "سب ٹائٹل ترمیم کریں", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "پلے لسٹس", "Playlists": "پلے لسٹس", "Powered by": "کے ذریعہ تقویت یافتہ", + "Publish": "شائع کریں", "Published on": "پر شائع ہوا", "Recommended": "تجویز کردہ", + "Record Screen": "اسکرین ریکارڈ کریں", "Register": "رجسٹر کریں", "SAVE": "محفوظ کریں", "SEARCH": "تلاش کریں", @@ -54,9 +59,13 @@ translation_strings = { "Select": "منتخب کریں", "Sign in": "سائن ان کریں", "Sign out": "سائن آؤٹ کریں", + "Start Recording": "ریکارڈنگ شروع کریں", + "Stop Recording": "ریکارڈنگ روکیں", "Subtitle was added": "سب ٹائٹل شامل کیا گیا", + "Subtitles": "سب ٹائٹلز", "Tags": "ٹیگز", "Terms": "شرائط", + "Trim": "تراشیں", "UPLOAD": "اپ لوڈ کریں", "Up next": "اگلا", "Upload": "اپ لوڈ کریں", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "اپ لوڈز", "VIEW ALL": "سب دیکھیں", "View all": "سب دیکھیں", + "View media": "میڈیا دیکھیں", "comment": "تبصرہ", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "ایک جدید، مکمل خصوصیات والا اوپن سورس ویڈیو اور میڈیا CMS ہے۔ یہ جدید ویب پلیٹ فارمز کی ضروریات کو پورا کرنے کے لئے تیار کیا گیا ہے تاکہ میڈیا دیکھنے اور شیئر کرنے کے لئے", "media in category": "زمرے میں میڈیا", "media in tag": "ٹیگ میں میڈیا", + "or": "یا", "view": "دیکھیں", "views": "دیکھے گئے", "yet": "ابھی تک", diff --git a/files/frontend_translations/zh_hans.py b/files/frontend_translations/zh_hans.py index 4ee3ba73..1c8bd535 100644 --- a/files/frontend_translations/zh_hans.py +++ b/files/frontend_translations/zh_hans.py @@ -3,17 +3,20 @@ translation_strings = { "AUTOPLAY": "自动播放", "About": "关于", "Add a ": "添加一个", + "Browse your files": "浏览文件", "COMMENT": "评论", "Categories": "分类", "Category": "类别", "Change Language": "更改语言", "Change password": "更改密码", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "点击“开始录制”并选择要录制的屏幕或标签页。录制完成后,点击“停止录制”,录制内容将被上传。", "Comment": "评论", "Comments": "评论", "Comments are disabled": "评论已禁用", "Contact": "联系", "DELETE MEDIA": "删除媒体", "DOWNLOAD": "下载", + "Drag and drop files": "拖放文件", "EDIT MEDIA": "编辑媒体", "EDIT PROFILE": "编辑个人资料", "EDIT SUBTITLE": "编辑字幕", @@ -42,8 +45,10 @@ translation_strings = { "PLAYLISTS": "播放列表", "Playlists": "播放列表", "Powered by": "由...提供技术支持", + "Publish": "发布", "Published on": "发布于", "Recommended": "推荐", + "Record Screen": "录制屏幕", "Register": "注册", "SAVE": "保存", "SEARCH": "搜索", @@ -54,9 +59,13 @@ translation_strings = { "Select": "选择", "Sign in": "登录", "Sign out": "登出", + "Start Recording": "开始录制", + "Stop Recording": "停止录制", "Subtitle was added": "字幕已添加", + "Subtitles": "字幕", "Tags": "标签", "Terms": "条款", + "Trim": "修剪", "UPLOAD": "上传", "Up next": "接下来", "Upload": "上传", @@ -64,10 +73,12 @@ translation_strings = { "Uploads": "上传", "VIEW ALL": "查看全部", "View all": "查看全部", + "View media": "查看媒体", "comment": "评论", "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "是一个现代化、功能齐全的开源视频和媒体CMS。它是为了满足现代网络平台观看和分享媒体的需求而开发的", "media in category": "类别中的媒体", "media in tag": "标签中的媒体", + "or": "或", "view": "查看", "views": "查看", "yet": "还", diff --git a/files/frontend_translations/zh_hant.py b/files/frontend_translations/zh_hant.py index 6105e27a..4dbf8cfc 100644 --- a/files/frontend_translations/zh_hant.py +++ b/files/frontend_translations/zh_hant.py @@ -1,104 +1,115 @@ translation_strings = { - 'ABOUT': '關於', - 'AUTOPLAY': '自動播放', - 'About': '關於', - 'Add a ': '新增', - 'COMMENT': '留言', - 'Categories': '分類', - 'Category': '分類', - 'Change Language': '切換語言', - 'Change password': '變更密碼', - 'Comment': '留言', - 'Comments': '留言', - 'Comments are disabled': '留言功能已關閉', - 'Contact': '聯絡資訊', - 'DELETE MEDIA': '刪除影片', - 'DOWNLOAD': '下載', - 'EDIT MEDIA': '編輯影片', - 'EDIT PROFILE': '編輯個人資料', - 'EDIT SUBTITLE': '編輯字幕', - 'Edit media': '編輯影片', - 'Edit profile': '編輯個人資料', - 'Edit subtitle': '編輯字幕', - 'Featured': '精選內容', - 'Go': '執行', # in context of "execution" - 'History': '觀看紀錄', - 'Home': '首頁', - 'Language': '語言', - 'Latest': '最新內容', - 'Liked media': '我喜歡的影片', - 'Manage comments': '留言管理', - 'Manage media': '媒體管理', - 'Manage users': '使用者管理', - 'Media': '媒體', - 'Media was edited': '媒體已更新', - 'Members': '會員', - 'My media': '我的媒體', - 'My playlists': '我的播放清單', - 'No': '無', # in context of "no comments", etc. - 'No comment yet': '尚無留言', - 'No comments yet': '尚未有留言', - 'No results for': '查無相關結果:', - 'PLAYLISTS': '播放清單', - 'Playlists': '播放清單', - 'Powered by': '技術提供為', - 'Published on': '發布日期為', - 'Recommended': '推薦內容', - 'Register': '註冊', - 'SAVE': '儲存', - 'SEARCH': '搜尋', - 'SHARE': '分享', - 'SHOW MORE': '顯示更多', - 'SUBMIT': '送出', - 'Search': '搜尋', - 'Select': '選擇', - 'Sign in': '登入', - 'Sign out': '登出', - 'Subtitle was added': '字幕已新增', - 'Tags': '標籤', - 'Terms': '使用條款', - 'UPLOAD': '上傳', - 'Up next': '即將播放', - 'Upload': '上傳', - 'Upload media': '上傳媒體', - 'Uploads': '上傳內容', - 'VIEW ALL': '查看全部', - 'View all': '瀏覽全部', - 'comment': '留言', - 'is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media': '這是一個現代化且功能完整的開源影音內容管理系統,專為現代網路平台的觀賞與分享需求所打造。', - 'media in category': '此分類下的媒體', - 'media in tag': '此標籤下的媒體', - 'view': '次觀看', - 'views': '次觀看', - 'yet': ' ', # no such usage in this language, + "ABOUT": "關於", + "AUTOPLAY": "自動播放", + "About": "關於", + "Add a ": "新增", + "Browse your files": "瀏覽您的檔案", + "COMMENT": "留言", + "Categories": "分類", + "Category": "分類", + "Change Language": "切換語言", + "Change password": "變更密碼", + "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded.": "點擊「開始錄製」並選擇要錄製的螢幕或分頁。錄製完成後,點擊「停止錄製」,錄製的內容將會上傳。", + "Comment": "留言", + "Comments": "留言", + "Comments are disabled": "留言功能已關閉", + "Contact": "聯絡資訊", + "DELETE MEDIA": "刪除影片", + "DOWNLOAD": "下載", + "Drag and drop files": "拖放檔案", + "EDIT MEDIA": "編輯影片", + "EDIT PROFILE": "編輯個人資料", + "EDIT SUBTITLE": "編輯字幕", + "Edit media": "編輯影片", + "Edit profile": "編輯個人資料", + "Edit subtitle": "編輯字幕", + "Featured": "精選內容", + "Go": "執行", + "History": "觀看紀錄", + "Home": "首頁", + "Language": "語言", + "Latest": "最新內容", + "Liked media": "我喜歡的影片", + "Manage comments": "留言管理", + "Manage media": "媒體管理", + "Manage users": "使用者管理", + "Media": "媒體", + "Media was edited": "媒體已更新", + "Members": "會員", + "My media": "我的媒體", + "My playlists": "我的播放清單", + "No": "無", + "No comment yet": "尚無留言", + "No comments yet": "尚未有留言", + "No results for": "查無相關結果:", + "PLAYLISTS": "播放清單", + "Playlists": "播放清單", + "Powered by": "技術提供為", + "Publish": "發布", + "Published on": "發布日期為", + "Recommended": "推薦內容", + "Record Screen": "螢幕錄製", + "Register": "註冊", + "SAVE": "儲存", + "SEARCH": "搜尋", + "SHARE": "分享", + "SHOW MORE": "顯示更多", + "SUBMIT": "送出", + "Search": "搜尋", + "Select": "選擇", + "Sign in": "登入", + "Sign out": "登出", + "Start Recording": "開始錄製", + "Stop Recording": "停止錄製", + "Subtitle was added": "字幕已新增", + "Subtitles": "字幕", + "Tags": "標籤", + "Terms": "使用條款", + "Trim": "修剪", + "UPLOAD": "上傳", + "Up next": "即將播放", + "Upload": "上傳", + "Upload media": "上傳媒體", + "Uploads": "上傳內容", + "VIEW ALL": "查看全部", + "View all": "瀏覽全部", + "View media": "查看媒體", + "comment": "留言", + "is a modern, fully featured open source video and media CMS. It is developed to meet the needs of modern web platforms for viewing and sharing media": "這是一個現代化且功能完整的開源影音內容管理系統,專為現代網路平台的觀賞與分享需求所打造。", + "media in category": "此分類下的媒體", + "media in tag": "此標籤下的媒體", + "or": "或者", + "view": "次觀看", + "views": "次觀看", + "yet": " ", } replacement_strings = { - 'Apr': '四月', - 'Aug': '八月', - 'Dec': '十二月', - 'Feb': '二月', - 'Jan': '一月', - 'Jul': '七月', - 'Jun': '六月', - 'Mar': '三月', - 'May': '五月', - 'Nov': '十一月', - 'Oct': '十月', - 'Sep': '九月', - 'day ago': '天前', - 'days ago': '天前', - 'hour ago': '小時前', - 'hours ago': '小時前', - 'just now': '剛剛', - 'minute ago': '分鐘前', - 'minutes ago': '分鐘前', - 'month ago': '個月前', - 'months ago': '個月前', - 'second ago': '秒前', - 'seconds ago': '秒前', - 'week ago': '週前', - 'weeks ago': '週前', - 'year ago': '年前', - 'years ago': '年前', + "Apr": "四月", + "Aug": "八月", + "Dec": "十二月", + "Feb": "二月", + "Jan": "一月", + "Jul": "七月", + "Jun": "六月", + "Mar": "三月", + "May": "五月", + "Nov": "十一月", + "Oct": "十月", + "Sep": "九月", + "day ago": "天前", + "days ago": "天前", + "hour ago": "小時前", + "hours ago": "小時前", + "just now": "剛剛", + "minute ago": "分鐘前", + "minutes ago": "分鐘前", + "month ago": "個月前", + "months ago": "個月前", + "second ago": "秒前", + "seconds ago": "秒前", + "week ago": "週前", + "weeks ago": "週前", + "year ago": "年前", + "years ago": "年前", } diff --git a/files/methods.py b/files/methods.py index fb0f89dd..6439edd2 100644 --- a/files/methods.py +++ b/files/methods.py @@ -427,6 +427,15 @@ def user_allowed_to_upload(request): return False +def can_transcribe_video(user): + """Checks if a user can transcribe a video.""" + if is_mediacms_editor(user): + return True + if getattr(settings, 'USER_CAN_TRANSCRIBE_VIDEO', False): + return True + return False + + def kill_ffmpeg_process(filepath): """Kill ffmpeg process that is processing a specific file @@ -635,4 +644,6 @@ def copy_media(media_id): def is_media_allowed_type(media): + if "all" in settings.ALLOWED_MEDIA_UPLOAD_TYPES: + return True return media.media_type in settings.ALLOWED_MEDIA_UPLOAD_TYPES diff --git a/files/migrations/0012_media_allow_whisper_transcribe_and_more.py b/files/migrations/0012_media_allow_whisper_transcribe_and_more.py new file mode 100644 index 00000000..8888be2c --- /dev/null +++ b/files/migrations/0012_media_allow_whisper_transcribe_and_more.py @@ -0,0 +1,39 @@ +# Generated by Django 5.1.6 on 2025-08-31 08:28 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ('files', '0011_mediapermission'), + ] + + operations = [ + migrations.AlterField( + model_name='language', + name='code', + field=models.CharField(help_text='language code', max_length=30), + ), + migrations.AddField( + model_name='media', + name='allow_whisper_transcribe', + field=models.BooleanField(default=False, verbose_name='Transcribe auto-detected language'), + ), + migrations.AddField( + model_name='media', + name='allow_whisper_transcribe_and_translate', + field=models.BooleanField(default=False, verbose_name='Transcribe auto-detected language and translate to English'), + ), + migrations.CreateModel( + name='TranscriptionRequest', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('add_date', models.DateTimeField(auto_now_add=True)), + ('status', models.CharField(choices=[('pending', 'Pending'), ('running', 'Running'), ('fail', 'Fail'), ('success', 'Success')], db_index=True, default='pending', max_length=20)), + ('translate_to_english', models.BooleanField(default=False)), + ('logs', models.TextField(blank=True, null=True)), + ('media', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='transcriptionrequests', to='files.media')), + ], + ), + ] diff --git a/files/models/__init__.py b/files/models/__init__.py index d58009d1..c0bc162a 100644 --- a/files/models/__init__.py +++ b/files/models/__init__.py @@ -6,7 +6,7 @@ from .license import License # noqa: F401 from .media import Media, MediaPermission # noqa: F401 from .playlist import Playlist, PlaylistMedia # noqa: F401 from .rating import Rating, RatingCategory # noqa: F401 -from .subtitle import Language, Subtitle # noqa: F401 +from .subtitle import Language, Subtitle, TranscriptionRequest # noqa: F401 from .utils import CODECS # noqa: F401 from .utils import ENCODE_EXTENSIONS # noqa: F401 from .utils import ENCODE_EXTENSIONS_KEYS # noqa: F401 diff --git a/files/models/media.py b/files/models/media.py index 5a2403c6..82059743 100644 --- a/files/models/media.py +++ b/files/models/media.py @@ -23,6 +23,7 @@ from imagekit.processors import ResizeToFit from .. import helpers from ..stop_words import STOP_WORDS from .encoding import EncodeProfile, Encoding +from .subtitle import TranscriptionRequest from .utils import ( ENCODE_RESOLUTIONS_KEYS, MEDIA_ENCODING_STATUS, @@ -205,6 +206,9 @@ class Media(models.Model): views = models.IntegerField(db_index=True, default=1) + allow_whisper_transcribe = models.BooleanField("Transcribe auto-detected language", default=False) + allow_whisper_transcribe_and_translate = models.BooleanField("Transcribe auto-detected language and translate to English", default=False) + # keep track if media file has changed, on saves __original_media_file = None __original_thumbnail_time = None @@ -297,6 +301,26 @@ class Media(models.Model): thumbnail_name = helpers.get_file_name(self.uploaded_poster.path) self.uploaded_thumbnail.save(content=myfile, name=thumbnail_name) + def transcribe_function(self): + to_transcribe = False + to_transcribe_and_translate = False + + if self.allow_whisper_transcribe or self.allow_whisper_transcribe_and_translate: + if self.allow_whisper_transcribe and not TranscriptionRequest.objects.filter(media=self, translate_to_english=False).exists(): + to_transcribe = True + + if self.allow_whisper_transcribe_and_translate and not TranscriptionRequest.objects.filter(media=self, translate_to_english=True).exists(): + to_transcribe_and_translate = True + + from .. import tasks + + if to_transcribe: + TranscriptionRequest.objects.create(media=self, translate_to_english=False) + tasks.whisper_transcribe.delay(self.friendly_token, translate_to_english=False) + if to_transcribe_and_translate: + TranscriptionRequest.objects.create(media=self, translate_to_english=True) + tasks.whisper_transcribe.delay(self.friendly_token, translate_to_english=True) + def update_search_vector(self): """ Update SearchVector field of SearchModel using raw SQL @@ -965,6 +989,8 @@ def media_save(sender, instance, created, **kwargs): tag.update_tag_media() instance.update_search_vector() + if instance.media_type == "video": + instance.transcribe_function() @receiver(pre_delete, sender=Media) diff --git a/files/models/subtitle.py b/files/models/subtitle.py index e0e34d35..7f26c036 100644 --- a/files/models/subtitle.py +++ b/files/models/subtitle.py @@ -6,7 +6,7 @@ from django.db import models from django.urls import reverse from .. import helpers -from .utils import subtitles_file_path +from .utils import MEDIA_ENCODING_STATUS, subtitles_file_path class Language(models.Model): @@ -14,7 +14,7 @@ class Language(models.Model): to be used with Subtitles """ - code = models.CharField(max_length=12, help_text="language code") + code = models.CharField(max_length=30, help_text="language code") title = models.CharField(max_length=100, help_text="language code") @@ -70,3 +70,15 @@ class Subtitle(models.Model): else: raise Exception("Could not convert to srt") return True + + +class TranscriptionRequest(models.Model): + # Whisper transcription request + media = models.ForeignKey("Media", on_delete=models.CASCADE, related_name="transcriptionrequests") + add_date = models.DateTimeField(auto_now_add=True) + status = models.CharField(max_length=20, choices=MEDIA_ENCODING_STATUS, default="pending", db_index=True) + translate_to_english = models.BooleanField(default=False) + logs = models.TextField(blank=True, null=True) + + def __str__(self): + return f"Transcription request for {self.media.title} - {self.status}" diff --git a/files/tasks.py b/files/tasks.py index 63ac986f..b5577672 100644 --- a/files/tasks.py +++ b/files/tasks.py @@ -46,9 +46,12 @@ from .models import ( Category, EncodeProfile, Encoding, + Language, Media, Rating, + Subtitle, Tag, + TranscriptionRequest, VideoChapterData, VideoTrimRequest, ) @@ -465,6 +468,67 @@ def encode_media( return success +@task(name="whisper_transcribe", queue="long_tasks", soft_time_limit=60 * 60 * 2) +def whisper_transcribe(friendly_token, translate_to_english=False): + try: + media = Media.objects.get(friendly_token=friendly_token) + except: # noqa + logger.info(f"failed to get media {friendly_token}") + return False + + request = TranscriptionRequest.objects.filter(media=media, status="pending", translate_to_english=translate_to_english).first() + if not request: + logger.info(f"No pending transcription request for media {friendly_token}") + return False + + if translate_to_english: + language = Language.objects.filter(code="whisper-translation").first() + if not language: + language = Language.objects.create(code="whisper-translation", title="Automatic Transcription and Translation") + else: + language = Language.objects.filter(code="whisper").first() + if not language: + language = Language.objects.create(code="whisper", title="Automatic Transcription") + + cwd = os.path.dirname(os.path.realpath(media.media_file.path)) + request.status = "running" + request.save(update_fields=["status"]) + + with tempfile.TemporaryDirectory(dir=settings.TEMP_DIRECTORY) as tmpdirname: + video_file_path = get_file_name(media.media_file.name) + video_file_path = '.'.join(video_file_path.split('.')[:-1]) # needed by whisper without the extension + subtitle_name = f"{video_file_path}.vtt" + output_name = f"{tmpdirname}/{subtitle_name}" + + cmd = f"whisper /home/mediacms.io/mediacms/media_files/{media.media_file.name} --model {settings.WHISPER_MODEL} --output_dir {tmpdirname}" + if translate_to_english: + cmd += " --task translate" + + logger.info(f"Whisper transcribe: ready to run command {cmd}") + + start_time = datetime.now() + ret = run_command(cmd, cwd=cwd) # noqa + end_time = datetime.now() + duration = (end_time - start_time).total_seconds() + + if os.path.exists(output_name): + subtitle = Subtitle.objects.create(media=media, user=media.user, language=language) + + with open(output_name, 'rb') as f: + subtitle.subtitle_file.save(subtitle_name, File(f)) + + request.status = "success" + request.logs = f"Transcription took {duration:.2f} seconds." # noqa + request.save(update_fields=["status", "logs"]) + return True + + request.status = "fail" + request.logs = f"Transcription failed after {duration:.2f} seconds. Error: {ret.get('error')}" # noqa + request.save(update_fields=["status", "logs"]) + + return False + + @task(name="produce_sprite_from_video", queue="long_tasks") def produce_sprite_from_video(friendly_token): """Produces a sprites file for a video, uses ffmpeg""" diff --git a/files/urls.py b/files/urls.py index a9570a3c..ab05e848 100644 --- a/files/urls.py +++ b/files/urls.py @@ -7,6 +7,8 @@ from django.urls import path, re_path from . import management_views, views from .feeds import IndexRSSFeed, SearchRSSFeed +friendly_token = r"(?P[\w\-_]*)" + urlpatterns = [ path("i18n/", include("django.conf.urls.i18n")), re_path(r"^$", views.index), @@ -28,12 +30,12 @@ urlpatterns = [ re_path(r"^latest$", views.latest_media), re_path(r"^members", views.members, name="members"), re_path( - r"^playlist/(?P[\w]*)$", + rf"^playlist/{friendly_token}$", views.view_playlist, name="get_playlist", ), re_path( - r"^playlists/(?P[\w]*)$", + rf"^playlists/{friendly_token}$", views.view_playlist, name="get_playlist", ), @@ -41,6 +43,7 @@ urlpatterns = [ re_path(r"^recommended$", views.recommended_media), path("rss/", IndexRSSFeed()), re_path("^rss/search", SearchRSSFeed()), + re_path(r"^record_screen", views.record_screen, name="record_screen"), re_path(r"^search", views.search, name="search"), re_path(r"^scpublisher", views.upload_media, name="upload_media"), re_path(r"^tags", views.tags, name="tags"), @@ -53,7 +56,7 @@ urlpatterns = [ re_path(r"^api/v1/media$", views.MediaList.as_view()), re_path(r"^api/v1/media/$", views.MediaList.as_view()), re_path( - r"^api/v1/media/(?P[\w\-_]*)$", + rf"^api/v1/media/{friendly_token}$", views.MediaDetail.as_view(), name="api_get_media", ), @@ -64,32 +67,32 @@ urlpatterns = [ ), re_path(r"^api/v1/search$", views.MediaSearch.as_view()), re_path( - r"^api/v1/media/(?P[\w]*)/actions$", + rf"^api/v1/media/{friendly_token}/actions$", views.MediaActions.as_view(), ), re_path( - r"^api/v1/media/(?P[\w]*)/chapters$", + rf"^api/v1/media/{friendly_token}/chapters$", views.video_chapters, ), re_path( - r"^api/v1/media/(?P[\w]*)/trim_video$", + rf"^api/v1/media/{friendly_token}/trim_video$", views.trim_video, ), re_path(r"^api/v1/categories$", views.CategoryList.as_view()), re_path(r"^api/v1/tags$", views.TagList.as_view()), re_path(r"^api/v1/comments$", views.CommentList.as_view()), re_path( - r"^api/v1/media/(?P[\w]*)/comments$", + rf"^api/v1/media/{friendly_token}/comments$", views.CommentDetail.as_view(), ), re_path( - r"^api/v1/media/(?P[\w]*)/comments/(?P[\w-]*)$", + rf"^api/v1/media/{friendly_token}/comments/(?P[\w-]*)$", views.CommentDetail.as_view(), ), re_path(r"^api/v1/playlists$", views.PlaylistList.as_view()), re_path(r"^api/v1/playlists/$", views.PlaylistList.as_view()), re_path( - r"^api/v1/playlists/(?P[\w]*)$", + rf"^api/v1/playlists/{friendly_token}$", views.PlaylistDetail.as_view(), name="api_get_playlist", ), diff --git a/files/views/__init__.py b/files/views/__init__.py index 76007dfe..9d8c1231 100644 --- a/files/views/__init__.py +++ b/files/views/__init__.py @@ -28,6 +28,7 @@ from .pages import manage_users # noqa: F401 from .pages import members # noqa: F401 from .pages import publish_media # noqa: F401 from .pages import recommended_media # noqa: F401 +from .pages import record_screen # noqa: F401 from .pages import search # noqa: F401 from .pages import setlanguage # noqa: F401 from .pages import sitemap # noqa: F401 diff --git a/files/views/pages.py b/files/views/pages.py index 6d61da16..cce67227 100644 --- a/files/views/pages.py +++ b/files/views/pages.py @@ -19,10 +19,12 @@ from ..forms import ( MediaMetadataForm, MediaPublishForm, SubtitleForm, + WhisperSubtitlesForm, ) from ..frontend_translations import translate_string from ..helpers import get_alphanumeric_only from ..methods import ( + can_transcribe_video, create_video_trim_request, get_user_or_session, handle_video_chapters, @@ -33,6 +35,18 @@ from ..models import Category, Media, Playlist, Subtitle, Tag, VideoTrimRequest from ..tasks import save_user_action, video_trim_task +@login_required +def record_screen(request): + """Record screen view""" + + context = {} + context["can_add"] = user_allowed_to_upload(request) + can_upload_exp = settings.CANNOT_ADD_MEDIA_MESSAGE + context["can_upload_exp"] = can_upload_exp + + return render(request, "cms/record_screen.html", context) + + def about(request): """About view""" @@ -54,6 +68,7 @@ def add_subtitle(request): friendly_token = request.GET.get("m", "").strip() if not friendly_token: return HttpResponseRedirect("/") + media = Media.objects.filter(friendly_token=friendly_token).first() if not media: return HttpResponseRedirect("/") @@ -61,24 +76,41 @@ def add_subtitle(request): if not (request.user == media.user or is_mediacms_editor(request.user)): return HttpResponseRedirect("/") - if request.method == "POST": - form = SubtitleForm(media, request.POST, request.FILES) - if form.is_valid(): - subtitle = form.save() - new_subtitle = Subtitle.objects.filter(id=subtitle.id).first() - try: - new_subtitle.convert_to_srt() - messages.add_message(request, messages.INFO, "Subtitle was added!") - return HttpResponseRedirect(subtitle.media.get_absolute_url()) - except: # noqa: E722 - new_subtitle.delete() - error_msg = "Invalid subtitle format. Use SubRip (.srt) or WebVTT (.vtt) files." - form.add_error("subtitle_file", error_msg) + # Initialize variables + form = None + whisper_form = None + show_whisper_form = can_transcribe_video(request.user) + + if request.method == "POST": + if 'submit' in request.POST: + form = SubtitleForm(media, request.POST, request.FILES, prefix="form") + if form.is_valid(): + subtitle = form.save() + try: + subtitle.convert_to_srt() + messages.add_message(request, messages.INFO, "Subtitle was added!") + return HttpResponseRedirect(subtitle.media.get_absolute_url()) + except Exception as e: # noqa + subtitle.delete() + error_msg = "Invalid subtitle format. Use SubRip (.srt) or WebVTT (.vtt) files." + form.add_error("subtitle_file", error_msg) + + elif 'submit_whisper' in request.POST and show_whisper_form: + whisper_form = WhisperSubtitlesForm(request.user, request.POST, instance=media, prefix="whisper_form") + if whisper_form.is_valid(): + whisper_form.save() + messages.add_message(request, messages.INFO, "Request for transcription was sent") + return HttpResponseRedirect(media.get_absolute_url()) + + # GET request or form invalid + if form is None: + form = SubtitleForm(media_item=media, prefix="form") + + if show_whisper_form and whisper_form is None: + whisper_form = WhisperSubtitlesForm(request.user, instance=media, prefix="whisper_form") - else: - form = SubtitleForm(media_item=media) subtitles = media.subtitles.all() - context = {"media": media, "form": form, "subtitles": subtitles} + context = {"media_object": media, "form": form, "subtitles": subtitles, "whisper_form": whisper_form} return render(request, "cms/add_subtitle.html", context) diff --git a/frontend/src/static/css/styles.scss b/frontend/src/static/css/styles.scss index dd6b38a3..13fc8390 100755 --- a/frontend/src/static/css/styles.scss +++ b/frontend/src/static/css/styles.scss @@ -166,7 +166,6 @@ button { width: 100%; padding: 0 0 0.67em 0; margin: 0 0 0.5em; - font-size: 1.13125em; font-weight: 400; border-width: 0 0 1px; border-style: solid; diff --git a/frontend/src/static/js/components/media-page/ViewerInfoContent.js b/frontend/src/static/js/components/media-page/ViewerInfoContent.js index 6fb95ebc..41e3447d 100755 --- a/frontend/src/static/js/components/media-page/ViewerInfoContent.js +++ b/frontend/src/static/js/components/media-page/ViewerInfoContent.js @@ -86,20 +86,6 @@ function EditMediaButton(props) { ); } -function EditSubtitleButton(props) { - let link = props.link; - - if (window.MediaCMS.site.devEnv) { - link = '#'; - } - - return ( - - {translateString('EDIT SUBTITLE')} - - ); -} - export default function ViewerInfoContent(props) { const { userCan } = useUser(); @@ -231,14 +217,9 @@ export default function ViewerInfoContent(props) { /> ) : null} - {userCan.editMedia || userCan.editSubtitle || userCan.deleteMedia ? ( + {userCan.editMedia || userCan.deleteMedia ? (
{userCan.editMedia ? : null} - {userCan.editSubtitle && 'video' === MediaPageStore.get('media-data').media_type ? ( - - ) : null} diff --git a/frontend/src/static/js/components/page-layout/PageHeader/HeaderRight.jsx b/frontend/src/static/js/components/page-layout/PageHeader/HeaderRight.jsx index 3ead36ca..f349468a 100644 --- a/frontend/src/static/js/components/page-layout/PageHeader/HeaderRight.jsx +++ b/frontend/src/static/js/components/page-layout/PageHeader/HeaderRight.jsx @@ -77,16 +77,37 @@ function headerPopupPages(user, popupNavItems, hasHeaderThemeSwitcher) { } function UploadMediaButton({ user, links }) { + const [popupContentRef, PopupContent, PopupTrigger] = usePopup(); + + const uploadMenuItems = [ + { + link: links.user.addMedia, + icon: 'upload', + text: translateString('Upload'), + }, + { + link: '/record_screen', + icon: 'videocam', + text: translateString('Record Screen'), + }, + ]; + return !user.is.anonymous && user.can.addMedia ? ( -
- - - Upload media - +
+ + + + {translateString('Upload media')} + + + + + + +
) : null; } - function LoginButton({ user, link, hasHeaderThemeSwitcher }) { return user.is.anonymous && user.can.login ? (
diff --git a/requirements-full.txt b/requirements-full.txt new file mode 100644 index 00000000..2fed12ff --- /dev/null +++ b/requirements-full.txt @@ -0,0 +1,2 @@ +openai-whisper==20250625 +setuptools-rust diff --git a/requirements.txt b/requirements.txt index 4927d225..88d1b215 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ Django==5.1.6 djangorestframework==3.15.2 python3-saml==1.16.0 django-allauth==65.4.1 -psycopg[pool]==3.2.4 +psycopg[binary,pool]==3.2.4 uwsgi==2.0.28 django-redis==5.4.0 celery==5.4.0 @@ -22,4 +22,3 @@ pre-commit==4.1.0 django-jazzmin==3.0.1 pysubs2==1.8.0 sentry-sdk[django]==2.23.1 - diff --git a/static/css/_commons.css b/static/css/_commons.css index 73ced2e7..56b99330 100644 --- a/static/css/_commons.css +++ b/static/css/_commons.css @@ -368,7 +368,7 @@ template { display: none; } -body{--body-text-color: #111;--body-bg-color: #fafafa;--hr-color: #e1e1e1;--dotted-outline-color: rgba(0, 0, 0, 0.4);--input-color: hsl(0, 0%, 7%);--input-bg-color: hsl(0, 0%, 100%);--input-border-color: hsl(0, 0%, 80%);--header-bg-color: #fff;--header-circle-button-color: #606060;--header-popup-menu-color: rgb(13, 13, 13);--header-popup-menu-icon-color: rgb(144, 144, 144);--sidebar-bg-color: #f5f5f5;--sidebar-nav-border-color: #eee;--sidebar-nav-item-text-color: rgb(13, 13, 13);--sidebar-nav-item-icon-color: rgb(144, 144, 144);--sidebar-bottom-link-color: initial;--spinner-loader-color: rgba(17, 17, 17, 0.8);--nav-menu-active-item-bg-color: rgba(0, 0, 0, 0.1);--nav-menu-item-hover-bg-color: rgba(0, 0, 0, 0.04);--in-popup-nav-menu-item-hover-bg-color: #eee;--search-field-input-text-color: #111;--search-field-input-bg-color: #fff;--search-field-input-border-color: #ccc;--search-field-submit-text-color: #333;--search-field-submit-bg-color: #f8f8f8;--search-field-submit-border-color: #d3d3d3;--search-field-submit-hover-bg-color: #f0f0f0;--search-field-submit-hover-border-color: #c6c6c6;--search-results-item-content-link-title-text-color: rgb(17, 17, 17);--logged-in-user-thumb-bg-color: rgba(0, 0, 0, 0.07);--popup-bg-color: #fff;--popup-hr-bg-color: #eee;--popup-top-text-color: rgb(13, 13, 13);--popup-top-bg-color: #eee;--popup-msg-title-text-color: rgb(17, 17, 17);--popup-msg-main-text-color: rgba(17, 17, 17, 0.8);--comments-textarea-wrapper-border-color: #eeeeee;--comments-textarea-wrapper-after-bg-color: #0a0a0a;--comments-textarea-text-color: #0a0a0a;--comments-textarea-text-placeholder-color: rgba(17, 17, 17, 0.6);--comments-list-inner-border-color: #eee;--comment-author-text-color: #111;--comment-date-text-color: #606060;--comment-date-hover-text-color: #0a0a0a;--comment-text-color: #111;--comment-text-mentions-background-color-highlight:#00cc44;--comment-actions-material-icon-text-color: rgba(17, 17, 17, 0.8);--comment-actions-likes-num-text-color: rgba(17, 17, 17, 0.6);--comment-actions-reply-button-text-color: rgba(17, 17, 17, 0.6);--comment-actions-reply-button-hover-text-color: #111;--comment-actions-cancel-removal-button-text-color: rgba(17, 17, 17, 0.6);--comment-actions-cancel-removal-button-hover-text-color: #111;--item-bg-color: #fafafa;--item-title-text-color: #111;--item-thumb-bg-color: var(--sidebar-bg-color);--item-meta-text-color: rgba(17, 17, 17, 0.6);--item-meta-link-text-color: var(--item-text-color);--item-meta-link-hover-text-color: rgba(17, 17, 17, 0.8);--profile-page-item-content-title-bg-color: #fff;--playlist-item-main-view-full-link-text-color: rgb(96, 96, 96);--playlist-item-main-view-full-link-hover-text-color: rgb(13, 13, 13);--item-list-load-more-text-color: rgba(17, 17, 17, 0.6);--item-list-load-more-hover-text-color: rgba(17, 17, 17, 0.8);--media-list-row-border-color: #eee;--media-list-header-title-link-text-color: rgba(17, 17, 17, 0.6);--playlist-form-title-focused-bg-color: #111;--playlist-privacy-border-color: #888;--playlist-form-cancel-button-text-color: rgba(17, 17, 17, 0.6);--playlist-form-cancel-button-hover-text-color: #111;--playlist-form-field-text-color: #000;--playlist-form-field-border-color: #888;--playlist-save-popup-text-color: #111;--playlist-save-popup-border-color: #eee;--playlist-save-popup-create-icon-text-color: #909090;--playlist-save-popup-create-focus-bg-color: rgba(136, 136, 136, 0.14);--playlist-view-header-bg-color: #fafafa;--playlist-view-header-toggle-text-color: rgb(96, 96, 96);--playlist-view-header-toggle-bg-color: #fafafa;--playlist-view-title-link-text-color: rgb(13, 13, 13);--playlist-view-meta-text-color: rgba(17, 17, 17, 0.6);--playlist-view-meta-link-color: rgba(17, 17, 17, 0.6);--playlist-view-meta-link-hover-text-color: rgb(13, 13, 13);--playlist-view-status-text-color: rgba(17, 17, 17, 0.6);--playlist-view-status-bg-color: rgba(0, 0, 0, 0.05);--playlist-view-status-icon-text-color: rgba(17, 17, 17, 0.4);--playlist-view-actions-bg-color: #fafafa;--playlist-view-media-bg-color: var(--sidebar-bg-color);--playlist-view-media-order-number-color: rgb(136, 136, 136);--playlist-view-item-title-text-color: rgb(13, 13, 13);--playlist-view-item-author-text-color: rgb(13, 13, 13);--playlist-view-item-author-bg-color: var(--sidebar-bg-color);--profile-page-bg-color: #fff;--profile-page-header-bg-color: var(--body-bg-color);--profile-page-info-videos-number-text-color: rgba(17, 17, 17, 0.6);--profile-page-nav-link-text-color: rgba(17, 17, 17, 0.6);--profile-page-nav-link-hover-text-color: #111;--profile-page-nav-link-active-text-color: #111;--profile-page-nav-link-active-after-bg-color: rgba(17, 17, 17, 0.6);--add-media-page-tmplt-dialog-bg-color: #fff;--add-media-page-tmplt-uploader-bg-color: #fff;--add-media-page-tmplt-dropzone-bg-color: rgba(255, 255, 255, 0.5);--add-media-page-tmplt-drag-drop-inner-text-color: rgba(17, 17, 17, 0.4);--add-media-page-tmplt-upload-item-spiner-text-color: rgba(17, 17, 17, 0.32);--add-media-page-tmplt-upload-item-actions-text-color: rgba(17, 17, 17, 0.4);--add-media-page-qq-gallery-upload-button-text-color: rgba(17, 17, 17, 0.6);--add-media-page-qq-gallery-upload-button-icon-text-color: rgba(17, 17, 17, 0.6);--add-media-page-qq-gallery-upload-button-hover-text-color: rgba(17, 17, 17, 1);--add-media-page-qq-gallery-upload-button-hover-icon-text-color: rgba(17, 17, 17, 1);--add-media-page-qq-gallery-upload-button-focus-text-color: rgba(17, 17, 17, 0.4);--playlist-page-bg-color: rgb(250, 250, 250);--playlist-page-details-text-color: rgb(96, 96, 96);--playlist-page-thumb-bg-color: rgba(0, 0, 0, 0.07);--playlist-page-title-link-text-color: rgb(13, 13, 13);--playlist-page-actions-circle-icon-text-color: rgb(144, 144, 144);--playlist-page-actions-circle-icon-bg-color: rgb(250, 250, 250);--playlist-page-actions-nav-item-button-text-color: rgb(10, 10, 10);--playlist-page-actions-popup-message-bottom-cancel-button-text-color: rgba(17, 17, 17, 0.6);--playlist-page-actions-popup-message-bottom-cancel-button-hover-text-color: #111;--playlist-page-actions-popup-message-bottom-cancel-button-icon-hover-text-color: #111;--playlist-page-status-text-color: rgba(17, 17, 17, 0.6);--playlist-page-status-bg-color: rgba(0, 0, 0, 0.1);--playlist-page-status-icon-text-color: rgba(17, 17, 17, 0.4);--playlist-page-author-border-top-color: rgba(0, 0, 0, 0.1);--playlist-page-author-name-link-color: rgb(13, 13, 13);--playlist-page-author-edit-playlist-icon-button-text-color: rgb(96, 96, 96);--playlist-page-author-edit-playlist-icon-button-bg-color: #fafafa;--playlist-page-author-edit-playlist-icon-button-active-text-color: rgb(13, 13, 13);--playlist-page-author-edit-playlist-form-wrap-text-color: rgb(13, 13, 13);--playlist-page-author-edit-playlist-form-wrap-bg-color: #fff;--playlist-page-author-edit-playlist-form-wrap-border-color: #eee;--playlist-page-author-edit-playlist-form-wrap-title-circle-icon-hover-text-color: #111;--playlist-page-author-edit-playlist-author-thumb-text-color: #606060;--playlist-page-author-edit-playlist-author-thumb-bg-color: rgba(0, 0, 0, 0.07);--playlist-page-details-bg-color: #fafafa;--playlist-page-video-list-bg-color: #f5f5f5;--playlist-page-video-list-item-title-bg-color: #f5f5f5;--playlist-page-video-list-item-hover-bg-color: #ebebeb;--playlist-page-video-list-item-title-hover-bg-color: #ebebeb;--playlist-page-video-list-item-after-bg-color: rgba(0, 0, 0, 0.1);--playlist-page-video-list-item-order-text-color: rgb(96, 96, 96);--playlist-page-video-list-item-options-icon-hover-color: #111;--playlist-page-video-list-item-options-popup-cancel-removal-button-text-color: rgba(17, 17, 17, 0.6);--playlist-page-video-list-item-options-popup-cancel-removal-button-hover-text-color: #111;--playlist-page-video-list-item-options-popup-cancel-removal-button-hover-icon-text-color: #111;--media-author-actions-popup-bottom-cancel-removal-button-text-color: rgba(17, 17, 17, 0.6);--media-author-actions-popup-bottom-cancel-removal-button-hover-text-color: #111;--media-author-actions-popup-bottom-cancel-removal-button-hover-icon-text-color: #111;--profile-banner-wrap-popup-bottom-cancel-removal-button-text-color: rgba(17, 17, 17, 0.6);--profile-banner-wrap-popup-bottom-cancel-removal-button-hover-text-color: #111;--profile-banner-wrap-popup-bottom-cancel-removal-button-hover-icon-text-color: #111;--media-title-banner-border-color: #eee;--media-title-labels-area-text-color: rgba(17, 17, 17, 0.6);--media-title-labels-area-bg-color: rgba(238, 238, 238, 0.6);--media-title-views-text-color: rgba(17, 17, 17, 0.6);--media-actions-not-popup-circle-icon-focus-bg-color: rgba(0, 0, 0, 0.04);--media-actions-not-popup-circle-icon-active-bg-color: rgba(0, 0, 0, 0.07);--media-actions-like-before-border-color: rgba(17, 17, 17, 0.4);--media-actions-share-title-text-color: #111;--media-actions-share-options-nav-button-text-color: rgba(17, 17, 17, 0.4);--media-actions-share-options-link-text-color: rgb(17, 17, 17);--media-actions-share-copy-field-border-color: rgb(237, 237, 237);--media-actions-share-copy-field-bg-color: rgb(250, 250, 250);--media-actions-share-copy-field-input-text-color: rgb(17, 17, 17);--media-actions-more-options-popup-bg-color: #fff;--media-actions-more-options-popup-nav-link-text-color: rgb(10, 10, 10);--media-actions-share-fullscreen-popup-main-bg-color: #fff;--report-form-title-text-color: #111;--report-form-field-label-text-color: rgba(17, 17, 17, 0.6);--report-form-field-input-text-color: #111;--report-form-field-input-border-color: rgb(237, 237, 237);--report-form-field-input-bg-color: rgb(250, 250, 250);--report-form-help-text-color: rgba(17, 17, 17, 0.6);--form-actions-bottom-border-top-color: rgb(238, 238, 238);--media-author-banner-name-text-color: #0a0a0a;--media-author-banner-date-text-color: rgba(17, 17, 17, 0.6);--media-content-banner-border-color: #eee;--share-embed-inner-on-right-border-color: rgb(238, 238, 238);--share-embed-inner-on-right-ttl-text-color: #111;--share-embed-inner-on-right-icon-text-color: rgba(17, 17, 17, 0.4);--share-embed-inner-textarea-text-color: rgba(17, 17, 17, 0.8);--share-embed-inner-textarea-border-color: rgb(237, 237, 237);--share-embed-inner-textarea-bg-color: rgb(250, 250, 250);--share-embed-inner-embed-wrap-iconn-text-color: rgba(17, 17, 17, 0.4);--media-status-info-item-text-color: #111;--viewer-sidebar-auto-play-border-bottom-color: rgba(0, 0, 0, 0.1);--viewer-sidebar-auto-play-next-label-text-color: #0a0a0a;--viewer-sidebar-auto-play-option-text-color: #606060;--user-action-form-inner-bg-color: #fff;--user-action-form-inner-title-border-bottom-color: var(--sidebar-nav-border-color);--user-action-form-inner-input-border-color: #d3d3d3;--user-action-form-inner-input-text-color: #000;--user-action-form-inner-input-bg-color: #fff}body.dark_theme{--body-text-color: rgba(255, 255, 255, 0.88);--body-bg-color: #121212;--hr-color: #2a2a2a;--dotted-outline-color: rgba(255, 255, 255, 0.4);--input-color: hsla(0, 0%, 100%, 0.88);--input-bg-color: hsla(0, 0%, 0%, 0.55);--input-border-color: hsl(0, 0%, 19%);--header-bg-color: #272727;--header-circle-button-color: #fff;--header-popup-menu-color: #fff;--header-popup-menu-icon-color: rgb(144, 144, 144);--sidebar-bg-color: #1c1c1c;--sidebar-nav-border-color: rgba(255, 255, 255, 0.1);--sidebar-nav-item-text-color: #fff;--sidebar-nav-item-icon-color: rgb(144, 144, 144);--sidebar-bottom-link-color: rgba(255, 255, 255, 0.88);--spinner-loader-color: rgba(255, 255, 255, 0.74);--nav-menu-active-item-bg-color: rgba(255, 255, 255, 0.1);--nav-menu-item-hover-bg-color: rgba(255, 255, 255, 0.1);--in-popup-nav-menu-item-hover-bg-color: rgba(255, 255, 255, 0.1);--search-field-input-text-color: rgba(255, 255, 255, 0.88);--search-field-input-bg-color: #121212;--search-field-input-border-color: #303030;--search-field-submit-text-color: rgba(255, 255, 255, 0.5);--search-field-submit-bg-color: rgba(255, 255, 255, 0.08);--search-field-submit-border-color: #2e2e2e;--search-field-submit-hover-bg-color: rgba(255, 255, 255, 0.08);--search-field-submit-hover-border-color: #2e2e2e;--search-results-item-content-link-title-text-color: rgba(255, 255, 255, 0.88);--logged-in-user-thumb-bg-color: rgba(255, 255, 255, 0.14);--popup-bg-color: #242424;--popup-hr-bg-color: rgba(255, 255, 255, 0.08);--popup-top-text-color: #fff;--popup-top-bg-color: rgba(136, 136, 136, 0.4);--popup-msg-title-text-color: rgba(255, 255, 255, 0.88);--popup-msg-main-text-color: rgba(255, 255, 255, 0.5);--comments-textarea-wrapper-border-color: #898989;--comments-textarea-wrapper-after-bg-color: #fff;--comments-textarea-text-color: #fff;--comments-textarea-text-placeholder-color: #898989;--comments-list-inner-border-color: rgba(255, 255, 255, 0.08);--comment-author-text-color: rgba(255, 255, 255, 0.88);--comment-date-text-color: #888;--comment-date-hover-text-color: #fff;--comment-text-color: rgba(255, 255, 255, 0.88);--comment-text-mentions-background-color-highlight:#006622;--comment-actions-material-icon-text-color: rgba(255, 255, 255, 0.74);--comment-actions-likes-num-text-color: rgba(255, 255, 255, 0.5);--comment-actions-reply-button-text-color: rgba(255, 255, 255, 0.5);--comment-actions-reply-button-hover-text-color: rgba(255, 255, 255, 0.74);--comment-actions-cancel-removal-button-text-color: rgba(255, 255, 255, 0.5);--comment-actions-cancel-removal-button-hover-text-color: rgba(255, 255, 255, 0.74);--item-bg-color: #121212;--item-title-text-color: rgba(255, 255, 255, 0.88);--item-thumb-bg-color: var(--sidebar-bg-color);--item-meta-text-color: #888;--item-meta-link-text-color: var(--item-text-color);--item-meta-link-hover-text-color: rgba(255, 255, 255, 0.74);--profile-page-item-content-title-bg-color: #121212;--playlist-item-main-view-full-link-text-color: rgb(170, 170, 170);--playlist-item-main-view-full-link-hover-text-color: #fff;--item-list-load-more-text-color: #888;--item-list-load-more-hover-text-color: rgba(255, 255, 255, 0.74);--media-list-row-border-color: rgba(255, 255, 255, 0.08);--media-list-header-title-link-text-color: rgba(255, 255, 255, 0.5);--playlist-form-title-focused-bg-color: rgba(255, 255, 255, 0.88);--playlist-privacy-border-color: #888;--playlist-form-cancel-button-text-color: rgba(255, 255, 255, 0.5);--playlist-form-cancel-button-hover-text-color: rgba(255, 255, 255, 0.74);--playlist-form-field-text-color: #fff;--playlist-form-field-border-color: #888;--playlist-save-popup-text-color: rgba(255, 255, 255, 0.88);--playlist-save-popup-border-color: rgba(255, 255, 255, 0.1);--playlist-save-popup-create-icon-text-color: #909090;--playlist-save-popup-create-focus-bg-color: rgba(255, 255, 255, 0.14);--playlist-view-header-bg-color: #252525;--playlist-view-header-toggle-text-color: #fff;--playlist-view-header-toggle-bg-color: #252525;--playlist-view-title-link-text-color: rgba(255, 255, 255, 0.88);--playlist-view-meta-text-color: rgb(238, 238, 238);--playlist-view-meta-link-color: #fff;--playlist-view-meta-link-hover-text-color: #fff;--playlist-view-status-text-color: rgba(255, 255, 255, 0.6);--playlist-view-status-bg-color: rgba(255, 255, 255, 0.1);--playlist-view-status-icon-text-color: rgba(255, 255, 255, 0.6);--playlist-view-actions-bg-color: #252525;--playlist-view-media-bg-color: var(--sidebar-bg-color);--playlist-view-media-order-number-color: rgb(136, 136, 136);--playlist-view-item-title-text-color: #fff;--playlist-view-item-author-text-color: #fff;--playlist-view-item-author-bg-color: var(--sidebar-bg-color);--profile-page-bg-color: var(--body-bg-color);--profile-page-header-bg-color: #1a1a1a;--profile-page-info-videos-number-text-color: #888;--profile-page-nav-link-text-color: #888;--profile-page-nav-link-hover-text-color: rgba(255, 255, 255, 0.88);--profile-page-nav-link-active-text-color: rgba(255, 255, 255, 0.88);--profile-page-nav-link-active-after-bg-color: #888;--add-media-page-tmplt-dialog-bg-color: #242424;--add-media-page-tmplt-uploader-bg-color: #242424;--add-media-page-tmplt-dropzone-bg-color: rgba(28, 28, 28, 0.5);--add-media-page-tmplt-drag-drop-inner-text-color: rgba(255, 255, 255, 0.5);--add-media-page-tmplt-upload-item-spiner-text-color: rgba(255, 255, 255, 0.4);--add-media-page-tmplt-upload-item-actions-text-color: rgba(255, 255, 255, 0.5);--add-media-page-qq-gallery-upload-button-text-color: rgba(255, 255, 255, 0.528);--add-media-page-qq-gallery-upload-button-icon-text-color: rgba(255, 255, 255, 0.528);--add-media-page-qq-gallery-upload-button-hover-text-color: rgba(255, 255, 255, 0.88);--add-media-page-qq-gallery-upload-button-hover-icon-text-color: rgba(255, 255, 255, 0.88);--add-media-page-qq-gallery-upload-button-focus-text-color: rgba(255, 255, 255, 0.704);--playlist-page-bg-color: #1a1a1a;--playlist-page-details-text-color: rgb(170, 170, 170);--playlist-page-thumb-bg-color: #272727;--playlist-page-title-link-text-color: #fff;--playlist-page-actions-circle-icon-text-color: #1a1a1a;--playlist-page-actions-circle-icon-bg-color: inherit;--playlist-page-actions-nav-item-button-text-color: rgba(255, 255, 255, 0.88);--playlist-page-actions-popup-message-bottom-cancel-button-text-color: rgba(255, 255, 255, 0.5);--playlist-page-actions-popup-message-bottom-cancel-button-hover-text-color: rgba(255, 255, 255, 0.74);--playlist-page-actions-popup-message-bottom-cancel-button-icon-hover-text-color: rgba(255, 255, 255, 0.74);--playlist-page-status-text-color: rgba(255, 255, 255, 0.6);--playlist-page-status-bg-color: rgba(255, 255, 255, 0.1);--playlist-page-status-icon-text-color: rgba(255, 255, 255, 0.4);--playlist-page-author-border-top-color: rgba(255, 255, 255, 0.1);--playlist-page-author-name-link-color: rgba(255, 255, 255, 0.88);--playlist-page-author-edit-playlist-icon-button-text-color: rgb(170, 170, 170);--playlist-page-author-edit-playlist-icon-button-bg-color: #252525;--playlist-page-author-edit-playlist-icon-button-active-text-color: rgba(255, 255, 255, 0.88);--playlist-page-author-edit-playlist-form-wrap-text-color: rgba(255, 255, 255, 0.88);--playlist-page-author-edit-playlist-form-wrap-bg-color: #242424;--playlist-page-author-edit-playlist-form-wrap-border-color: rgba(255, 255, 255, 0.1);--playlist-page-author-edit-playlist-form-wrap-title-circle-icon-hover-text-color: rgba(255, 255, 255, 0.88);--playlist-page-author-edit-playlist-author-thumb-text-color: #fff;--playlist-page-author-edit-playlist-author-thumb-bg-color: #272727;--playlist-page-details-bg-color: #252525;--playlist-page-video-list-bg-color: #1c1c1c;--playlist-page-video-list-item-title-bg-color: #1c1c1c;--playlist-page-video-list-item-hover-bg-color: #333;--playlist-page-video-list-item-title-hover-bg-color: #333;--playlist-page-video-list-item-after-bg-color: rgba(255, 255, 255, 0.1);--playlist-page-video-list-item-order-text-color: rgb(170, 170, 170);--playlist-page-video-list-item-options-icon-hover-color: rgba(255, 255, 255, 0.88);--playlist-page-video-list-item-options-popup-cancel-removal-button-text-color: rgba(255, 255, 255, 0.5);--playlist-page-video-list-item-options-popup-cancel-removal-button-hover-text-color: rgba(255, 255, 255, 0.74);--playlist-page-video-list-item-options-popup-cancel-removal-button-hover-icon-text-color: rgba(255, 255, 255, 0.74);--media-author-actions-popup-bottom-cancel-removal-button-text-color: rgba(255, 255, 255, 0.5);--media-author-actions-popup-bottom-cancel-removal-button-hover-text-color: rgba(255, 255, 255, 0.74);--media-author-actions-popup-bottom-cancel-removal-button-hover-icon-text-color: rgba(255, 255, 255, 0.74);--profile-banner-wrap-popup-bottom-cancel-removal-button-text-color: rgba(255, 255, 255, 0.5);--profile-banner-wrap-popup-bottom-cancel-removal-button-hover-text-color: rgba(255, 255, 255, 0.74);--profile-banner-wrap-popup-bottom-cancel-removal-button-hover-icon-text-color: rgba(255, 255, 255, 0.74);--media-title-banner-border-color: rgba(255, 255, 255, 0.08);--media-title-labels-area-text-color: rgba(255, 255, 255, 0.6);--media-title-labels-area-bg-color: rgba(255, 255, 255, 0.08);--media-title-views-text-color: rgb(136, 136, 136);--media-actions-not-popup-circle-icon-focus-bg-color: rgba(255, 255, 255, 0.07);--media-actions-not-popup-circle-icon-active-bg-color: rgba(255, 255, 255, 0.14);--media-actions-like-before-border-color: rgba(255, 255, 255, 0.5);--media-actions-share-title-text-color: rgba(255, 255, 255, 0.88);--media-actions-share-options-nav-button-text-color: rgba(255, 255, 255, 0.5);--media-actions-share-options-link-text-color: rgba(255, 255, 255, 0.88);--media-actions-share-copy-field-border-color: rgb(41, 41, 41);--media-actions-share-copy-field-bg-color: rgb(28, 28, 28);--media-actions-share-copy-field-input-text-color: rgba(255, 255, 255, 0.88);--media-actions-more-options-popup-bg-color: #242424;--media-actions-more-options-popup-nav-link-text-color: rgba(255, 255, 255, 0.88);--media-actions-share-fullscreen-popup-main-bg-color: #242424;--report-form-title-text-color: rgba(255, 255, 255, 0.88);--report-form-field-label-text-color: rgba(255, 255, 255, 0.88);--report-form-field-input-text-color: rgba(255, 255, 255, 0.88);--report-form-field-input-border-color: rgb(41, 41, 41);--report-form-field-input-bg-color: rgb(28, 28, 28);--report-form-help-text-color: rgb(136, 136, 136);--form-actions-bottom-border-top-color: rgba(255, 255, 255, 0.08);--media-author-banner-name-text-color: rgba(255, 255, 255, 0.88);--media-author-banner-date-text-color: rgba(255, 255, 255, 0.6);--media-content-banner-border-color: rgba(255, 255, 255, 0.08);--share-embed-inner-on-right-border-color: rgba(255, 255, 255, 0.08);--share-embed-inner-on-right-ttl-text-color: rgba(255, 255, 255, 0.88);--share-embed-inner-on-right-icon-text-color: rgba(255, 255, 255, 0.5);--share-embed-inner-textarea-text-color: rgba(255, 255, 255, 0.55);--share-embed-inner-textarea-border-color: rgb(41, 41, 41);--share-embed-inner-textarea-bg-color: rgb(28, 28, 28);--share-embed-inner-embed-wrap-iconn-text-color: rgba(255, 255, 255, 0.5);--media-status-info-item-text-color: rgba(255, 255, 255, 0.88);--viewer-sidebar-auto-play-border-bottom-color: rgba(255, 255, 255, 0.1);--viewer-sidebar-auto-play-next-label-text-color: #fff;--viewer-sidebar-auto-play-option-text-color: #aaa;--user-action-form-inner-bg-color: #242424;--user-action-form-inner-title-border-bottom-color: var(--sidebar-nav-border-color);--user-action-form-inner-input-border-color: #303030;--user-action-form-inner-input-text-color: rgba(255, 255, 255, 0.88);--user-action-form-inner-input-bg-color: #121212}body{--default-logo-height: 18px;--default-theme-color: #009933;--default-brand-color: #009933;--success-color: #00a28b;--warning-color: #e09f1f;--danger-color: #de623b;--input-disabled-bg-color: hsla(0, 0%, 0%, 0.05);--dotted-outline: 1px dotted var(--dotted-outline-color);--header-height: 56px;--sidebar-width: 240px;--item-title-font-size: 14px;--item-title-max-lines: 2;--item-title-line-height: 18px;--horizontal-item-title-line-height: 21px;--playlist-item-title-line-height: 20px;--large-item-title-font-size: 16px;--large-item-title-line-height: 22px;--links-color: var(--default-theme-color)}body{--default-item-width: 218px;--default-max-item-width: 344px;--default-max-row-items: 6;--default-item-margin-right-width: 4px;--default-item-margin-bottom-width: 24px;--default-horizontal-item-margin-right-width: 12px;--default-horizontal-item-margin-bottom-width: 12px}.nav-menu li.link-item.active .menu-item-icon{color:var(--theme-color, var(--default-theme-color))}.logo span{color:var(--theme-color, var(--default-theme-color))}.comments-form-inner .form .form-buttons a,.comments-form-inner .form .form-buttons button{background:var(--theme-color, var(--default-theme-color))}.comment-text a{color:var(--theme-color, var(--default-theme-color))}.comment-actions .remove-comment>button{background-color:var(--theme-color, var(--default-theme-color))}.comment-actions .remove-comment .popup-message-bottom button.proceed-comment-removal{color:var(--theme-color, var(--default-theme-color))}.nav-menu li.label-item button.reported-label,.nav-menu li.label-item button.reported-label *{color:var(--theme-color, var(--default-theme-color))}.page-sidebar .page-sidebar-bottom a:hover{color:var(--theme-color, var(--default-theme-color)) !important}.media-drag-drop-content-inner .browse-files-btn-wrap span{background-color:var(--theme-color, var(--default-theme-color))}.filename-edit:hover{color:var(--theme-color, var(--default-theme-color))}.media-upload-item-bottom-actions>*:hover{color:var(--theme-color, var(--default-theme-color))}.media-upload-item-progress-bar-container .media-upload-item-progress-bar{background-color:var(--theme-color, var(--default-theme-color))}dialog .qq-dialog-buttons button{color:var(--theme-color, var(--default-theme-color)) !important}.media-drag-drop-content-inner .browse-files-btn-wrap span{background-color:var(--theme-color, var(--default-theme-color))}.media-upload-item-top-actions>*:hover,.media-upload-item-bottom-actions>*:hover{color:var(--theme-color, var(--default-theme-color))}.media-upload-item-bottom-actions>*:hover{background-color:var(--theme-color, var(--default-theme-color))}.retry-media-upload-item{color:var(--theme-color, var(--default-theme-color))}.retry-media-upload-item:hover{background-color:var(--theme-color, var(--default-theme-color))}.media-upload-item-progress-bar-container .media-upload-item-progress-bar{background-color:var(--theme-color, var(--default-theme-color))}.viewer-container .player-container.audio-player-container .vjs-big-play-button{background-color:var(--brand-color, var(--default-brand-color)) !important}.media-author-actions>a,.media-author-actions>button{background-color:var(--theme-color, var(--default-theme-color))}.media-author-actions .popup-message-bottom button.proceed-comment-removal{color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-actions>*>*.share .copy-field button{color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-actions .disliked-media>*>*.dislike:before{border-color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-views-actions.liked-media .media-actions>*>*.like,.media-title-banner .media-views-actions.liked-media .media-actions>*>*.like button,.media-title-banner .media-views-actions.liked-media .media-actions>*>*.like .circle-icon-button{color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-views-actions.liked-media .media-actions>*>*.like:before,.media-title-banner .media-views-actions.liked-media .media-actions>*>*.dislike:before{border-color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-views-actions.disliked-media .media-actions>*>*.dislike,.media-title-banner .media-views-actions.disliked-media .media-actions>*>*.dislike button,.media-title-banner .media-views-actions.disliked-media .media-actions>*>*.dislike .circle-icon-button{color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-views-actions.disliked-media .media-actions>*>*.like:before,.media-title-banner .media-views-actions.disliked-media .media-actions>*>*.dislike:before{border-color:var(--theme-color, var(--default-theme-color))}.form-actions-bottom button{color:var(--theme-color, var(--default-theme-color)) !important}.media-content-field-content a{color:var(--theme-color, var(--default-theme-color))}.share-embed .share-embed-inner .on-right-bottom button{color:var(--theme-color, var(--default-theme-color))}.profile-page-header a.edit-channel,.profile-page-header a.edit-profile,.profile-page-header button.delete-profile{background-color:var(--theme-color, var(--default-theme-color))}.profile-banner-wrap .popup-message-bottom>a,.profile-banner-wrap .popup-message-bottom>button{background-color:var(--theme-color, var(--default-theme-color))}.profile-banner-wrap .popup-message-bottom button.proceed-profile-removal{color:var(--theme-color, var(--default-theme-color))}p a{color:var(--theme-color, var(--default-theme-color))}.user-action-form-inner a{color:var(--theme-color, var(--default-theme-color))}.user-action-form-inner button,.user-action-form-inner *[type=submit],.user-action-form-inner *[type=button]{background-color:var(--theme-color, var(--default-theme-color))}html{height:100%}body,body *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body:after,body:before,body *:after,body *:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{min-height:100%;color:var(--body-text-color);background-color:var(--body-bg-color);-webkit-transition-property:overflow;-moz-transition-property:overflow;transition-property:overflow;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:linear;-moz-transition-timing-function:linear;transition-timing-function:linear}body.overflow-hidden{overflow:hidden}body{font-size:14px;font-family:"Roboto",Arial,sans-serif;line-height:1.5}body .font-size-large{font-size:2.6625em}body h1,body .h1{font-size:2.13125em}body h2,body .h2{font-size:1.4625em}body h3,body .h3{font-size:1.13125em}body h4,body .h4{font-size:1.0625em}body h5,body .h5{font-size:1em}body h6,body .h6{font-size:1em}body .font-size-small{font-size:.93125em}body .sub-heading,body .font-size-x-small{font-size:.8625em}body .section-intro{font-size:1.25em}body small{font-size:.8625em}body big{font-size:1.25em}h1,h2,h3,h4,h5,h6{font-weight:bold;font-weight:500;line-height:1.15}.sub-heading{display:block;clear:both;line-height:1.1;letter-spacing:.05em;margin:8px 0;text-transform:uppercase}.section-intro{font-weight:100;font-weight:200;font-weight:300}p,ul{font-size:1em;line-height:1.62}p a,ul a{text-decoration:none}p a:hover,ul a:hover{text-decoration:underline}ul,ol{padding:0;list-style-position:inside}blockquote{line-height:1.75}button{line-height:1}hr{display:block;height:1px;padding:0;margin:1em 0 2em 0;border:0;background-color:var(--hr-color)}.num-value-unit .label{display:block;padding:0 0 4px}.num-value-unit .value-input,.num-value-unit .value-unit{position:relative;float:left;width:auto}.num-value-unit .value-input:focus,.num-value-unit .value-input:active,.num-value-unit .value-unit:focus,.num-value-unit .value-unit:active{z-index:1}.num-value-unit .value-input{margin-right:-1px;-moz-border-radius-topright:0px;border-top-right-radius:0px;-moz-border-radius-bottomright:0px;border-bottom-right-radius:0px}:root{--checkbox-width: 1.143em;--checkbox-height: 1.143em}button,input,select,textarea{overflow:visible}input[type=text],input[type=email],input[type=number],input[type=password],input[type=file],input[type=range],input[type=reset],input[type=radio],input[type=checkbox],select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none}button:focus,input:focus,select:focus,textarea:focus{outline:0}input[type=text]:focus,input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=file]:focus,input[type=reset]:focus,input[type=radio]:focus,input[type=checkbox]:focus,select:focus,textarea:focus{-webkit-box-shadow:0px 0px 2px 0px rgba(0,0,0,.25);box-shadow:0px 0px 2px 0px rgba(0,0,0,.25)}input[type=text]:focus,input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=file]:focus,input[type=reset]:focus,select:focus,textarea:focus{border-color:var(--theme-color, var(--default-theme-color))}input,select,textarea{padding:.57142875em;line-height:1.3;color:var(--input-color);-moz-border-radius:1px;border-radius:1px;border-width:1px;border-style:solid;border-color:var(--input-border-color);background-color:var(--input-bg-color)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--input-disabled-bg-color)}input.input-success,select.input-success,textarea.input-success{border-color:var(--success-color)}input.input-warning,select.input-warning,textarea.input-warning{border-color:var(--warning-color)}input.input-error,select.input-error,textarea.input-error{border-color:var(--danger-color)}label{display:inline-block;line-height:1.1;margin-bottom:.5em}select{padding-right:32px;background-size:24px;background-repeat:no-repeat;background-position:right 4px center;background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%280,0,0,0.897%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%280,0,0,0.897%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%280,0,0,0.897%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%280,0,0,0.897%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}.dark_theme select{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%28255,255,255,0.88%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%28255,255,255,0.88%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%28255,255,255,0.88%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%28255,255,255,0.88%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}select[multiple]{padding:0;overflow:auto;background-image:none}select[multiple] option{padding:.7143em .57142875em;margin:1px}textarea{min-height:2.75rem;height:160px;min-width:9.375rem;max-width:100%}input[type=file]{max-width:100%}input[type=range]{display:block;max-width:none;min-height:40px;padding:1em 1px;border:none;-moz-border-radius:0;border-radius:0;background:none}input[type=range]:focus::-webkit-slider-thumb{background-color:var(--body-bg-color);background-color:var(--theme-color, var(--default-theme-color))}input[type=range]:focus::-moz-range-thumb{background-color:var(--body-bg-color);background-color:var(--theme-color, var(--default-theme-color))}input[type=range]:focus::-ms-thumb{background-color:var(--body-bg-color);background-color:var(--theme-color, var(--default-theme-color))}input[type=range]::-webkit-slider-runnable-track{width:100%;height:16px;cursor:pointer;border-radius:9999em;border:1px solid var(--input-border-color);background:var(--input-bg-color)}input[type=range]::-moz-range-track{width:100%;height:16px;cursor:pointer;-moz-border-radius:9999em;border-radius:9999em;border:1px solid var(--input-border-color);background:var(--input-bg-color)}input[type=range]::-ms-track{width:100%;height:16px;cursor:pointer;border-radius:9999em;border:1px solid var(--input-border-color);background:var(--input-bg-color)}input[type=range]::-webkit-slider-thumb{width:20px;height:20px;cursor:pointer;-webkit-appearance:none;border:none;border-radius:999em;background-color:var(--input-border-color);appearance:none;margin-top:-0.19rem}input[type=range]::-moz-range-thumb{width:20px;height:20px;cursor:pointer;-webkit-appearance:none;border:none;-moz-border-radius:999em;border-radius:999em;background-color:var(--input-border-color)}input[type=range]::-ms-thumb{width:20px;height:20px;cursor:pointer;-webkit-appearance:none;border:none;border-radius:999em;background-color:var(--input-border-color)}input[type=range]::-ms-fill-lower{border-radius:999em;border:1px solid var(--input-border-color);background:var(--input-bg-color)}input[type=range]::-ms-fill-upper{border-radius:999em;border:1px solid var(--input-border-color);background:var(--input-bg-color)}input[type=radio],input[type=checkbox],*.radio-label .selectbox,*.checkbox-label .selectbox{width:var(--checkbox-width);height:var(--checkbox-height);vertical-align:middle}input[type=radio],input[type=checkbox]{margin:0 .75em}input[type=radio]:focus,input[type=checkbox]:focus{border-color:var(--input-border-color);-webkit-box-shadow:0px 0px 2px 0px rgba(0,0,0,.25);box-shadow:0px 0px 2px 0px rgba(0,0,0,.25)}input[type=radio]:active,input[type=checkbox]:active{opacity:.85}input[type=radio]:checked,input[type=checkbox]:checked{background-size:20px auto;background-repeat:no-repeat;background-size:cover;background-position:center center;background-color:var(--theme-color, var(--default-theme-color));border-color:var(--theme-color, var(--default-theme-color))}input[type=radio]:disabled,input[type=checkbox]:disabled{border-color:var(--input-border-color);background-color:var(--input-disabled-bg-color)}input[type=radio]:checked:disabled,input[type=checkbox]:checked:disabled{background-color:var(--input-border-color)}*.radio-label .selectbox,*.checkbox-label .selectbox{background-color:var(--input-bg-color);border:1px solid var(--input-border-color)}*.radio-label input[type=radio]:focus~.selectbox,*.radio-label input[type=checkbox]:focus~.selectbox,*.checkbox-label input[type=radio]:focus~.selectbox,*.checkbox-label input[type=checkbox]:focus~.selectbox{border-color:var(--input-border-color);-webkit-box-shadow:0px 0px 2px 0px rgba(0,0,0,.25);box-shadow:0px 0px 2px 0px rgba(0,0,0,.25)}*.radio-label input[type=radio]:active~.selectbox,*.radio-label input[type=checkbox]:active~.selectbox,*.checkbox-label input[type=radio]:active~.selectbox,*.checkbox-label input[type=checkbox]:active~.selectbox{opacity:.85}*.radio-label input[type=radio]:checked~.selectbox,*.radio-label input[type=checkbox]:checked~.selectbox,*.checkbox-label input[type=radio]:checked~.selectbox,*.checkbox-label input[type=checkbox]:checked~.selectbox{background-size:20px auto;background-repeat:no-repeat;background-size:cover;background-position:center center;background-color:var(--theme-color, var(--default-theme-color));border-color:var(--theme-color, var(--default-theme-color))}*.radio-label input[type=radio]:disabled~.selectbox,*.radio-label input[type=checkbox]:disabled~.selectbox,*.checkbox-label input[type=radio]:disabled~.selectbox,*.checkbox-label input[type=checkbox]:disabled~.selectbox{border-color:var(--input-border-color);background-color:var(--input-disabled-bg-color)}*.radio-label input[type=radio]:checked:disabled~.selectbox,*.radio-label input[type=checkbox]:checked:disabled~.selectbox,*.checkbox-label input[type=radio]:checked:disabled~.selectbox,*.checkbox-label input[type=checkbox]:checked:disabled~.selectbox{background-color:var(--input-border-color)}input[type=radio],input[type=radio]~.selectbox{-moz-border-radius:99em;border-radius:99em}input[type=radio]:checked,input[type=radio]:checked~.selectbox{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27white%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27white%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27white%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27white%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}input[type=radio]:checked:disabled,input[type=radio]:checked:disabled~.selectbox{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}input[type=checkbox]:checked,input[type=checkbox]:checked~.selectbox{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27white%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27white%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27white%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27white%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}input[type=checkbox]:checked:disabled,input[type=checkbox]:checked:disabled~.selectbox{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}*.radio-label,*.checkbox-label{position:relative;line-height:1.143;margin-right:1em;cursor:pointer}*.radio-label .selectbox,*.checkbox-label .selectbox{display:inline-block;margin-right:.75em}*.radio-label.right-selectbox .selectbox,*.checkbox-label.right-selectbox .selectbox{margin-right:0;margin-left:.75em}*.radio-label input[type=radio],*.radio-label input[type=checkbox],*.checkbox-label input[type=radio],*.checkbox-label input[type=checkbox]{position:absolute;left:-999em}label+input:not([type=radio]):not([type=checkbox]),label+select,label+textarea,label+button,.input-message+input:not([type=radio]):not([type=checkbox]),.input-message+select,.input-message+textarea,.input-message+button{display:block;margin-bottom:1em}.input-message{display:inline-block;line-height:1.1;margin-bottom:.5em}.input-message.success-message{color:var(--success-color)}.input-message.warning-message{color:var(--warning-color)}.input-message.error-message{color:var(--danger-color)}label+.input-message{display:block}a{color:var(--theme-color, var(--default-theme-color))}a:focus{outline:0}button{cursor:pointer;padding:0}.cf:before,.cf:after{content:" ";display:table}.cf:after{clear:both}.cf{*zoom:1}.fl{float:left}.fr{float:right}.hidden-txt{display:none}.button-link{text-overflow:ellipsis;white-space:nowrap;text-align:center;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0)}.button-link{overflow:hidden;cursor:pointer}@media screen and (min-width: 640px){.visible-only-in-small{display:none !important}}@media screen and (max-width: 639px){.hidden-only-in-small{display:none !important}}@media screen and (min-width: 480px){.visible-only-in-extra-small{display:none !important}}@media screen and (max-width: 479px){.hidden-only-in-extra-small{display:none !important}}.user-action-form-wrap{margin:2em 1em 1em}@media screen and (min-width: 1220px){.sliding-sidebar .user-action-form-wrap{-webkit-transition-property:padding-right;-moz-transition-property:padding-right;transition-property:padding-right;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}.visible-sidebar .user-action-form-wrap{padding-right:240px}}.user-action-form-inner{position:relative;margin:0 auto;width:100%;max-width:480px;padding:2em 2em;font-size:14px;line-height:1.5;background-color:var(--user-action-form-inner-bg-color);-moz-border-radius:2px;border-radius:2px;-webkit-box-shadow:0px 4px 8px 0 rgba(17,17,17,.06);box-shadow:0px 4px 8px 0 rgba(17,17,17,.06)}@media screen and (min-width: 1220px){.user-action-form-inner{max-width:640px}}.user-action-form-inner form,.user-action-form-inner label,.user-action-form-inner select,.user-action-form-inner textarea,.user-action-form-inner input[type=text],.user-action-form-inner input[type=email],.user-action-form-inner input[type=number],.user-action-form-inner input[type=password]{display:block;width:100%}.user-action-form-inner label{margin-top:1.5em}.user-action-form-inner h1{display:inline-block;width:100%;padding:0 0 .67em 0;margin:0 0 .5em;font-size:1.13125em;font-weight:400;border-width:0 0 1px;border-style:solid;border-bottom-color:var(--user-action-form-inner-title-border-bottom-color)}.user-action-form-inner form *[type=submit],.user-action-form-inner form .primaryAction,.user-action-form-inner form .secondaryAction{line-height:1.125;padding:1em 2em;margin:1em 0 .5em;cursor:pointer}.user-action-form-inner h1+form{margin-top:0}.user-action-form-inner a{text-decoration:none}.user-action-form-inner a:hover{text-decoration:underline}.user-action-form-inner .help-block{line-height:1.5;font-weight:lighter;margin-top:.25em;margin-bottom:2em}.user-action-form-inner form{margin-top:1.5em}.user-action-form-inner form>.control-group>*:first-child.controls{margin-top:2em;margin-bottom:2.5em}.user-action-form-inner form>.control-group>*:first-child.controls>*:first-child{margin-top:0}.user-action-form-inner form>.control-group>*:first-child.controls>*:last-child{margin-bottom:0}.user-action-form-inner form>.control-group .controls a{margin:0 .25em;word-break:break-all}.user-action-form-inner form>.control-group .controls label{display:inline-block;width:auto;margin:1em 0 0 0;line-height:1.5;cursor:pointer}.user-action-form-inner form>.control-group .controls label[for=banner_logo-clear_id]{margin-bottom:1em}.user-action-form-inner form>.control-group .controls input[type=file]{width:100%;margin-top:.5em}@media screen and (min-width: 711px){.user-action-form-inner form>.control-group .controls input[type=file]{width:auto;margin-left:.5em}}.user-action-form-inner form>.control-group:last-of-type .controls{margin-bottom:1.5em}.user-action-form-inner form.login .primaryAction,.user-action-form-inner form.logout .primaryAction{margin-right:1em}.user-action-form-inner form.login .secondaryAction,.user-action-form-inner form.logout .secondaryAction{float:right;padding-left:0;padding-right:0}.user-action-form-inner form label.checkbox{display:inline-block;width:auto;cursor:pointer}.user-action-form-inner form label.checkbox+.help-block{margin-top:.25em}.user-action-form-inner form label.checkbox input[type=checkbox]{margin-top:-2px;margin-right:1em;margin-left:0}.user-action-form-inner form p{position:relative;margin-bottom:1.5em}.user-action-form-inner form p a{margin:0 .25em;word-break:break-all}.user-action-form-inner form p label{display:inline-block;width:auto;margin:0;line-height:1.5;cursor:pointer}.user-action-form-inner form p label+input,.user-action-form-inner form p label+select,.user-action-form-inner form p label+textarea{vertical-align:top;display:inline-block;margin-top:.5em}.user-action-form-inner form p label+input[type=radio],.user-action-form-inner form p label+input[type=checkbox]{vertical-align:top;display:inline-block;margin:.3em 0em 0em .75em}.user-action-form-inner form p label[for=logo-clear_id]{margin-bottom:1em}.user-action-form-inner form p input[type=file]{width:100%;margin-top:.5em}@media screen and (min-width: 711px){.user-action-form-inner form p input[type=file]{width:auto;margin-left:.5em}}.user-action-form-inner button,.user-action-form-inner *[type=submit],.user-action-form-inner *[type=button],.user-action-form-inner form.login .secondaryAction,.user-action-form-inner form.logout .secondaryAction{min-width:88px;text-align:center}.user-action-form-inner button,.user-action-form-inner *[type=submit],.user-action-form-inner *[type=button]{border:0;color:#fff;-moz-border-radius:1px;border-radius:1px}.user-action-form-inner textarea{min-width:100%;max-width:100%;min-height:80px;max-height:50vh}.user-action-form-inner .requiredField .asteriskField{margin-left:.25em;color:rgba(255,0,0,.8)}.user-action-form-inner .control-group.error input{border-color:rgba(255,0,0,.4)}.user-action-form-inner .control-group.error input+p{color:rgba(255,0,0,.8)}.user-action-form-inner .errorlist{width:100%;display:inline-block;padding:.75rem .75rem 0;margin:0 0 1rem;list-style:lower-latin;list-style-position:inside;color:rgba(17,17,17,.9);background-color:#fae6e6}.user-action-form-inner .errorlist li{margin:0 0 .75rem 0}.player-container.player-container-error .error-container{position:relative;display:table;width:100%;height:100%;color:#fff}.player-container.player-container-error .error-container-inner{display:table-cell;vertical-align:middle;padding:1em;font-size:20px}.player-container.player-container-error .error-container-inner .icon-wrap{display:block;margin-bottom:1rem;opacity:.4}.player-container.player-container-error .error-container-inner .icon-wrap i{font-size:2.5em}@media screen and (min-width: 640px){.player-container.player-container-error .error-container-inner .icon-wrap{display:inline-block;padding-right:.75rem;margin-bottom:0;text-align:left}.player-container.player-container-error .error-container-inner .icon-wrap i{font-size:3em}}.player-container.player-container-error .error-container-inner .msg-wrap{overflow:hidden}@media screen and (max-width: 639px){.player-container.player-container-error .error-container-inner{padding:.5em .5em 2.5em;text-align:center}}.alert{position:relative;width:100%;display:block;padding:1.5rem 4rem 1.5rem 1.5rem;overflow:hidden;font-size:14px;font-weight:500;color:rgba(17,17,17,.9);background-color:#e6e6e6;-webkit-transition-property:margin-top;-moz-transition-property:margin-top;transition-property:margin-top;-webkit-transition-duration:.3s;-moz-transition-duration:.3s;transition-duration:.3s}.alert.info{background-color:#e6e6fa}.alert.error{background-color:#fae6e6}.alert.warn,.alert.warning{background-color:#fafae6}.alert.success{background-color:#e6f0e6}.alert.alert-dismissible{min-height:4rem}.alert.hiding{margin-top:-4rem}.alert .close{position:absolute;top:.875rem;right:.75rem;width:2.5rem;height:2.5rem;display:block;padding:0;text-align:center;color:rgba(17,17,17,.9);outline:0;border:0;background:none;font-family:serif;font-size:32px;font-weight:normal;-moz-border-radius:9999px;border-radius:9999px}.alert .close:focus{background-color:rgba(0,0,0,.07)}.custom-page-wrapper{position:relative;width:100%;max-width:1366px;padding:1em 3em 1em;margin:0 auto;display:inline-block}.custom-page-wrapper p,.custom-page-wrapper ul,.custom-page-wrapper ol{font-size:1.071428571em}.custom-page-wrapper li{margin-bottom:.5em}.custom-page-wrapper p img.fl{margin:0 .75em .5em 0}.custom-page-wrapper p img.fr{margin:0 0 .5em .75em}.page-main-inner .custom-page-wrapper{padding:0 2em 1em}.tooltip{position:fixed;top:0;left:0;max-width:15em;padding:.9166666667em .6666666667em !important;padding:.9125em 1.125em !important;padding:10px 12px !important;font-size:12px !important;line-height:1.5 !important;color:#fff !important;background-color:#595959 !important;-moz-border-radius:2px !important;border-radius:2px !important;z-index:5 !important}.empty-media{padding:80px 0 32px;text-align:center}@media screen and (min-width: 1366px){.empty-media{padding:96px 0 48px}}.empty-media .welcome-title{display:block;font-size:2em}.empty-media .start-uploading{max-width:360px;display:block;font-size:1em;padding:12px 0 24px;margin:0 auto}.empty-media .button-link{display:inline-block;padding:13px 16px 11px;font-size:13px;line-height:1;color:#fff;border-style:solid;border-width:1px;-moz-border-radius:1px;border-radius:1px;border-color:var(--default-brand-color);background-color:var(--default-brand-color)}.empty-media .button-link .material-icons{margin-right:8px;margin-top:-1px;font-size:17px;line-height:1;opacity:.65} +body{--body-text-color: #111;--body-bg-color: #fafafa;--hr-color: #e1e1e1;--dotted-outline-color: rgba(0, 0, 0, 0.4);--input-color: hsl(0, 0%, 7%);--input-bg-color: hsl(0, 0%, 100%);--input-border-color: hsl(0, 0%, 80%);--header-bg-color: #fff;--header-circle-button-color: #606060;--header-popup-menu-color: rgb(13, 13, 13);--header-popup-menu-icon-color: rgb(144, 144, 144);--sidebar-bg-color: #f5f5f5;--sidebar-nav-border-color: #eee;--sidebar-nav-item-text-color: rgb(13, 13, 13);--sidebar-nav-item-icon-color: rgb(144, 144, 144);--sidebar-bottom-link-color: initial;--spinner-loader-color: rgba(17, 17, 17, 0.8);--nav-menu-active-item-bg-color: rgba(0, 0, 0, 0.1);--nav-menu-item-hover-bg-color: rgba(0, 0, 0, 0.04);--in-popup-nav-menu-item-hover-bg-color: #eee;--search-field-input-text-color: #111;--search-field-input-bg-color: #fff;--search-field-input-border-color: #ccc;--search-field-submit-text-color: #333;--search-field-submit-bg-color: #f8f8f8;--search-field-submit-border-color: #d3d3d3;--search-field-submit-hover-bg-color: #f0f0f0;--search-field-submit-hover-border-color: #c6c6c6;--search-results-item-content-link-title-text-color: rgb(17, 17, 17);--logged-in-user-thumb-bg-color: rgba(0, 0, 0, 0.07);--popup-bg-color: #fff;--popup-hr-bg-color: #eee;--popup-top-text-color: rgb(13, 13, 13);--popup-top-bg-color: #eee;--popup-msg-title-text-color: rgb(17, 17, 17);--popup-msg-main-text-color: rgba(17, 17, 17, 0.8);--comments-textarea-wrapper-border-color: #eeeeee;--comments-textarea-wrapper-after-bg-color: #0a0a0a;--comments-textarea-text-color: #0a0a0a;--comments-textarea-text-placeholder-color: rgba(17, 17, 17, 0.6);--comments-list-inner-border-color: #eee;--comment-author-text-color: #111;--comment-date-text-color: #606060;--comment-date-hover-text-color: #0a0a0a;--comment-text-color: #111;--comment-text-mentions-background-color-highlight:#00cc44;--comment-actions-material-icon-text-color: rgba(17, 17, 17, 0.8);--comment-actions-likes-num-text-color: rgba(17, 17, 17, 0.6);--comment-actions-reply-button-text-color: rgba(17, 17, 17, 0.6);--comment-actions-reply-button-hover-text-color: #111;--comment-actions-cancel-removal-button-text-color: rgba(17, 17, 17, 0.6);--comment-actions-cancel-removal-button-hover-text-color: #111;--item-bg-color: #fafafa;--item-title-text-color: #111;--item-thumb-bg-color: var(--sidebar-bg-color);--item-meta-text-color: rgba(17, 17, 17, 0.6);--item-meta-link-text-color: var(--item-text-color);--item-meta-link-hover-text-color: rgba(17, 17, 17, 0.8);--profile-page-item-content-title-bg-color: #fff;--playlist-item-main-view-full-link-text-color: rgb(96, 96, 96);--playlist-item-main-view-full-link-hover-text-color: rgb(13, 13, 13);--item-list-load-more-text-color: rgba(17, 17, 17, 0.6);--item-list-load-more-hover-text-color: rgba(17, 17, 17, 0.8);--media-list-row-border-color: #eee;--media-list-header-title-link-text-color: rgba(17, 17, 17, 0.6);--playlist-form-title-focused-bg-color: #111;--playlist-privacy-border-color: #888;--playlist-form-cancel-button-text-color: rgba(17, 17, 17, 0.6);--playlist-form-cancel-button-hover-text-color: #111;--playlist-form-field-text-color: #000;--playlist-form-field-border-color: #888;--playlist-save-popup-text-color: #111;--playlist-save-popup-border-color: #eee;--playlist-save-popup-create-icon-text-color: #909090;--playlist-save-popup-create-focus-bg-color: rgba(136, 136, 136, 0.14);--playlist-view-header-bg-color: #fafafa;--playlist-view-header-toggle-text-color: rgb(96, 96, 96);--playlist-view-header-toggle-bg-color: #fafafa;--playlist-view-title-link-text-color: rgb(13, 13, 13);--playlist-view-meta-text-color: rgba(17, 17, 17, 0.6);--playlist-view-meta-link-color: rgba(17, 17, 17, 0.6);--playlist-view-meta-link-hover-text-color: rgb(13, 13, 13);--playlist-view-status-text-color: rgba(17, 17, 17, 0.6);--playlist-view-status-bg-color: rgba(0, 0, 0, 0.05);--playlist-view-status-icon-text-color: rgba(17, 17, 17, 0.4);--playlist-view-actions-bg-color: #fafafa;--playlist-view-media-bg-color: var(--sidebar-bg-color);--playlist-view-media-order-number-color: rgb(136, 136, 136);--playlist-view-item-title-text-color: rgb(13, 13, 13);--playlist-view-item-author-text-color: rgb(13, 13, 13);--playlist-view-item-author-bg-color: var(--sidebar-bg-color);--profile-page-bg-color: #fff;--profile-page-header-bg-color: var(--body-bg-color);--profile-page-info-videos-number-text-color: rgba(17, 17, 17, 0.6);--profile-page-nav-link-text-color: rgba(17, 17, 17, 0.6);--profile-page-nav-link-hover-text-color: #111;--profile-page-nav-link-active-text-color: #111;--profile-page-nav-link-active-after-bg-color: rgba(17, 17, 17, 0.6);--add-media-page-tmplt-dialog-bg-color: #fff;--add-media-page-tmplt-uploader-bg-color: #fff;--add-media-page-tmplt-dropzone-bg-color: rgba(255, 255, 255, 0.5);--add-media-page-tmplt-drag-drop-inner-text-color: rgba(17, 17, 17, 0.4);--add-media-page-tmplt-upload-item-spiner-text-color: rgba(17, 17, 17, 0.32);--add-media-page-tmplt-upload-item-actions-text-color: rgba(17, 17, 17, 0.4);--add-media-page-qq-gallery-upload-button-text-color: rgba(17, 17, 17, 0.6);--add-media-page-qq-gallery-upload-button-icon-text-color: rgba(17, 17, 17, 0.6);--add-media-page-qq-gallery-upload-button-hover-text-color: rgba(17, 17, 17, 1);--add-media-page-qq-gallery-upload-button-hover-icon-text-color: rgba(17, 17, 17, 1);--add-media-page-qq-gallery-upload-button-focus-text-color: rgba(17, 17, 17, 0.4);--playlist-page-bg-color: rgb(250, 250, 250);--playlist-page-details-text-color: rgb(96, 96, 96);--playlist-page-thumb-bg-color: rgba(0, 0, 0, 0.07);--playlist-page-title-link-text-color: rgb(13, 13, 13);--playlist-page-actions-circle-icon-text-color: rgb(144, 144, 144);--playlist-page-actions-circle-icon-bg-color: rgb(250, 250, 250);--playlist-page-actions-nav-item-button-text-color: rgb(10, 10, 10);--playlist-page-actions-popup-message-bottom-cancel-button-text-color: rgba(17, 17, 17, 0.6);--playlist-page-actions-popup-message-bottom-cancel-button-hover-text-color: #111;--playlist-page-actions-popup-message-bottom-cancel-button-icon-hover-text-color: #111;--playlist-page-status-text-color: rgba(17, 17, 17, 0.6);--playlist-page-status-bg-color: rgba(0, 0, 0, 0.1);--playlist-page-status-icon-text-color: rgba(17, 17, 17, 0.4);--playlist-page-author-border-top-color: rgba(0, 0, 0, 0.1);--playlist-page-author-name-link-color: rgb(13, 13, 13);--playlist-page-author-edit-playlist-icon-button-text-color: rgb(96, 96, 96);--playlist-page-author-edit-playlist-icon-button-bg-color: #fafafa;--playlist-page-author-edit-playlist-icon-button-active-text-color: rgb(13, 13, 13);--playlist-page-author-edit-playlist-form-wrap-text-color: rgb(13, 13, 13);--playlist-page-author-edit-playlist-form-wrap-bg-color: #fff;--playlist-page-author-edit-playlist-form-wrap-border-color: #eee;--playlist-page-author-edit-playlist-form-wrap-title-circle-icon-hover-text-color: #111;--playlist-page-author-edit-playlist-author-thumb-text-color: #606060;--playlist-page-author-edit-playlist-author-thumb-bg-color: rgba(0, 0, 0, 0.07);--playlist-page-details-bg-color: #fafafa;--playlist-page-video-list-bg-color: #f5f5f5;--playlist-page-video-list-item-title-bg-color: #f5f5f5;--playlist-page-video-list-item-hover-bg-color: #ebebeb;--playlist-page-video-list-item-title-hover-bg-color: #ebebeb;--playlist-page-video-list-item-after-bg-color: rgba(0, 0, 0, 0.1);--playlist-page-video-list-item-order-text-color: rgb(96, 96, 96);--playlist-page-video-list-item-options-icon-hover-color: #111;--playlist-page-video-list-item-options-popup-cancel-removal-button-text-color: rgba(17, 17, 17, 0.6);--playlist-page-video-list-item-options-popup-cancel-removal-button-hover-text-color: #111;--playlist-page-video-list-item-options-popup-cancel-removal-button-hover-icon-text-color: #111;--media-author-actions-popup-bottom-cancel-removal-button-text-color: rgba(17, 17, 17, 0.6);--media-author-actions-popup-bottom-cancel-removal-button-hover-text-color: #111;--media-author-actions-popup-bottom-cancel-removal-button-hover-icon-text-color: #111;--profile-banner-wrap-popup-bottom-cancel-removal-button-text-color: rgba(17, 17, 17, 0.6);--profile-banner-wrap-popup-bottom-cancel-removal-button-hover-text-color: #111;--profile-banner-wrap-popup-bottom-cancel-removal-button-hover-icon-text-color: #111;--media-title-banner-border-color: #eee;--media-title-labels-area-text-color: rgba(17, 17, 17, 0.6);--media-title-labels-area-bg-color: rgba(238, 238, 238, 0.6);--media-title-views-text-color: rgba(17, 17, 17, 0.6);--media-actions-not-popup-circle-icon-focus-bg-color: rgba(0, 0, 0, 0.04);--media-actions-not-popup-circle-icon-active-bg-color: rgba(0, 0, 0, 0.07);--media-actions-like-before-border-color: rgba(17, 17, 17, 0.4);--media-actions-share-title-text-color: #111;--media-actions-share-options-nav-button-text-color: rgba(17, 17, 17, 0.4);--media-actions-share-options-link-text-color: rgb(17, 17, 17);--media-actions-share-copy-field-border-color: rgb(237, 237, 237);--media-actions-share-copy-field-bg-color: rgb(250, 250, 250);--media-actions-share-copy-field-input-text-color: rgb(17, 17, 17);--media-actions-more-options-popup-bg-color: #fff;--media-actions-more-options-popup-nav-link-text-color: rgb(10, 10, 10);--media-actions-share-fullscreen-popup-main-bg-color: #fff;--report-form-title-text-color: #111;--report-form-field-label-text-color: rgba(17, 17, 17, 0.6);--report-form-field-input-text-color: #111;--report-form-field-input-border-color: rgb(237, 237, 237);--report-form-field-input-bg-color: rgb(250, 250, 250);--report-form-help-text-color: rgba(17, 17, 17, 0.6);--form-actions-bottom-border-top-color: rgb(238, 238, 238);--media-author-banner-name-text-color: #0a0a0a;--media-author-banner-date-text-color: rgba(17, 17, 17, 0.6);--media-content-banner-border-color: #eee;--share-embed-inner-on-right-border-color: rgb(238, 238, 238);--share-embed-inner-on-right-ttl-text-color: #111;--share-embed-inner-on-right-icon-text-color: rgba(17, 17, 17, 0.4);--share-embed-inner-textarea-text-color: rgba(17, 17, 17, 0.8);--share-embed-inner-textarea-border-color: rgb(237, 237, 237);--share-embed-inner-textarea-bg-color: rgb(250, 250, 250);--share-embed-inner-embed-wrap-iconn-text-color: rgba(17, 17, 17, 0.4);--media-status-info-item-text-color: #111;--viewer-sidebar-auto-play-border-bottom-color: rgba(0, 0, 0, 0.1);--viewer-sidebar-auto-play-next-label-text-color: #0a0a0a;--viewer-sidebar-auto-play-option-text-color: #606060;--user-action-form-inner-bg-color: #fff;--user-action-form-inner-title-border-bottom-color: var(--sidebar-nav-border-color);--user-action-form-inner-input-border-color: #d3d3d3;--user-action-form-inner-input-text-color: #000;--user-action-form-inner-input-bg-color: #fff}body.dark_theme{--body-text-color: rgba(255, 255, 255, 0.88);--body-bg-color: #121212;--hr-color: #2a2a2a;--dotted-outline-color: rgba(255, 255, 255, 0.4);--input-color: hsla(0, 0%, 100%, 0.88);--input-bg-color: hsla(0, 0%, 0%, 0.55);--input-border-color: hsl(0, 0%, 19%);--header-bg-color: #272727;--header-circle-button-color: #fff;--header-popup-menu-color: #fff;--header-popup-menu-icon-color: rgb(144, 144, 144);--sidebar-bg-color: #1c1c1c;--sidebar-nav-border-color: rgba(255, 255, 255, 0.1);--sidebar-nav-item-text-color: #fff;--sidebar-nav-item-icon-color: rgb(144, 144, 144);--sidebar-bottom-link-color: rgba(255, 255, 255, 0.88);--spinner-loader-color: rgba(255, 255, 255, 0.74);--nav-menu-active-item-bg-color: rgba(255, 255, 255, 0.1);--nav-menu-item-hover-bg-color: rgba(255, 255, 255, 0.1);--in-popup-nav-menu-item-hover-bg-color: rgba(255, 255, 255, 0.1);--search-field-input-text-color: rgba(255, 255, 255, 0.88);--search-field-input-bg-color: #121212;--search-field-input-border-color: #303030;--search-field-submit-text-color: rgba(255, 255, 255, 0.5);--search-field-submit-bg-color: rgba(255, 255, 255, 0.08);--search-field-submit-border-color: #2e2e2e;--search-field-submit-hover-bg-color: rgba(255, 255, 255, 0.08);--search-field-submit-hover-border-color: #2e2e2e;--search-results-item-content-link-title-text-color: rgba(255, 255, 255, 0.88);--logged-in-user-thumb-bg-color: rgba(255, 255, 255, 0.14);--popup-bg-color: #242424;--popup-hr-bg-color: rgba(255, 255, 255, 0.08);--popup-top-text-color: #fff;--popup-top-bg-color: rgba(136, 136, 136, 0.4);--popup-msg-title-text-color: rgba(255, 255, 255, 0.88);--popup-msg-main-text-color: rgba(255, 255, 255, 0.5);--comments-textarea-wrapper-border-color: #898989;--comments-textarea-wrapper-after-bg-color: #fff;--comments-textarea-text-color: #fff;--comments-textarea-text-placeholder-color: #898989;--comments-list-inner-border-color: rgba(255, 255, 255, 0.08);--comment-author-text-color: rgba(255, 255, 255, 0.88);--comment-date-text-color: #888;--comment-date-hover-text-color: #fff;--comment-text-color: rgba(255, 255, 255, 0.88);--comment-text-mentions-background-color-highlight:#006622;--comment-actions-material-icon-text-color: rgba(255, 255, 255, 0.74);--comment-actions-likes-num-text-color: rgba(255, 255, 255, 0.5);--comment-actions-reply-button-text-color: rgba(255, 255, 255, 0.5);--comment-actions-reply-button-hover-text-color: rgba(255, 255, 255, 0.74);--comment-actions-cancel-removal-button-text-color: rgba(255, 255, 255, 0.5);--comment-actions-cancel-removal-button-hover-text-color: rgba(255, 255, 255, 0.74);--item-bg-color: #121212;--item-title-text-color: rgba(255, 255, 255, 0.88);--item-thumb-bg-color: var(--sidebar-bg-color);--item-meta-text-color: #888;--item-meta-link-text-color: var(--item-text-color);--item-meta-link-hover-text-color: rgba(255, 255, 255, 0.74);--profile-page-item-content-title-bg-color: #121212;--playlist-item-main-view-full-link-text-color: rgb(170, 170, 170);--playlist-item-main-view-full-link-hover-text-color: #fff;--item-list-load-more-text-color: #888;--item-list-load-more-hover-text-color: rgba(255, 255, 255, 0.74);--media-list-row-border-color: rgba(255, 255, 255, 0.08);--media-list-header-title-link-text-color: rgba(255, 255, 255, 0.5);--playlist-form-title-focused-bg-color: rgba(255, 255, 255, 0.88);--playlist-privacy-border-color: #888;--playlist-form-cancel-button-text-color: rgba(255, 255, 255, 0.5);--playlist-form-cancel-button-hover-text-color: rgba(255, 255, 255, 0.74);--playlist-form-field-text-color: #fff;--playlist-form-field-border-color: #888;--playlist-save-popup-text-color: rgba(255, 255, 255, 0.88);--playlist-save-popup-border-color: rgba(255, 255, 255, 0.1);--playlist-save-popup-create-icon-text-color: #909090;--playlist-save-popup-create-focus-bg-color: rgba(255, 255, 255, 0.14);--playlist-view-header-bg-color: #252525;--playlist-view-header-toggle-text-color: #fff;--playlist-view-header-toggle-bg-color: #252525;--playlist-view-title-link-text-color: rgba(255, 255, 255, 0.88);--playlist-view-meta-text-color: rgb(238, 238, 238);--playlist-view-meta-link-color: #fff;--playlist-view-meta-link-hover-text-color: #fff;--playlist-view-status-text-color: rgba(255, 255, 255, 0.6);--playlist-view-status-bg-color: rgba(255, 255, 255, 0.1);--playlist-view-status-icon-text-color: rgba(255, 255, 255, 0.6);--playlist-view-actions-bg-color: #252525;--playlist-view-media-bg-color: var(--sidebar-bg-color);--playlist-view-media-order-number-color: rgb(136, 136, 136);--playlist-view-item-title-text-color: #fff;--playlist-view-item-author-text-color: #fff;--playlist-view-item-author-bg-color: var(--sidebar-bg-color);--profile-page-bg-color: var(--body-bg-color);--profile-page-header-bg-color: #1a1a1a;--profile-page-info-videos-number-text-color: #888;--profile-page-nav-link-text-color: #888;--profile-page-nav-link-hover-text-color: rgba(255, 255, 255, 0.88);--profile-page-nav-link-active-text-color: rgba(255, 255, 255, 0.88);--profile-page-nav-link-active-after-bg-color: #888;--add-media-page-tmplt-dialog-bg-color: #242424;--add-media-page-tmplt-uploader-bg-color: #242424;--add-media-page-tmplt-dropzone-bg-color: rgba(28, 28, 28, 0.5);--add-media-page-tmplt-drag-drop-inner-text-color: rgba(255, 255, 255, 0.5);--add-media-page-tmplt-upload-item-spiner-text-color: rgba(255, 255, 255, 0.4);--add-media-page-tmplt-upload-item-actions-text-color: rgba(255, 255, 255, 0.5);--add-media-page-qq-gallery-upload-button-text-color: rgba(255, 255, 255, 0.528);--add-media-page-qq-gallery-upload-button-icon-text-color: rgba(255, 255, 255, 0.528);--add-media-page-qq-gallery-upload-button-hover-text-color: rgba(255, 255, 255, 0.88);--add-media-page-qq-gallery-upload-button-hover-icon-text-color: rgba(255, 255, 255, 0.88);--add-media-page-qq-gallery-upload-button-focus-text-color: rgba(255, 255, 255, 0.704);--playlist-page-bg-color: #1a1a1a;--playlist-page-details-text-color: rgb(170, 170, 170);--playlist-page-thumb-bg-color: #272727;--playlist-page-title-link-text-color: #fff;--playlist-page-actions-circle-icon-text-color: #1a1a1a;--playlist-page-actions-circle-icon-bg-color: inherit;--playlist-page-actions-nav-item-button-text-color: rgba(255, 255, 255, 0.88);--playlist-page-actions-popup-message-bottom-cancel-button-text-color: rgba(255, 255, 255, 0.5);--playlist-page-actions-popup-message-bottom-cancel-button-hover-text-color: rgba(255, 255, 255, 0.74);--playlist-page-actions-popup-message-bottom-cancel-button-icon-hover-text-color: rgba(255, 255, 255, 0.74);--playlist-page-status-text-color: rgba(255, 255, 255, 0.6);--playlist-page-status-bg-color: rgba(255, 255, 255, 0.1);--playlist-page-status-icon-text-color: rgba(255, 255, 255, 0.4);--playlist-page-author-border-top-color: rgba(255, 255, 255, 0.1);--playlist-page-author-name-link-color: rgba(255, 255, 255, 0.88);--playlist-page-author-edit-playlist-icon-button-text-color: rgb(170, 170, 170);--playlist-page-author-edit-playlist-icon-button-bg-color: #252525;--playlist-page-author-edit-playlist-icon-button-active-text-color: rgba(255, 255, 255, 0.88);--playlist-page-author-edit-playlist-form-wrap-text-color: rgba(255, 255, 255, 0.88);--playlist-page-author-edit-playlist-form-wrap-bg-color: #242424;--playlist-page-author-edit-playlist-form-wrap-border-color: rgba(255, 255, 255, 0.1);--playlist-page-author-edit-playlist-form-wrap-title-circle-icon-hover-text-color: rgba(255, 255, 255, 0.88);--playlist-page-author-edit-playlist-author-thumb-text-color: #fff;--playlist-page-author-edit-playlist-author-thumb-bg-color: #272727;--playlist-page-details-bg-color: #252525;--playlist-page-video-list-bg-color: #1c1c1c;--playlist-page-video-list-item-title-bg-color: #1c1c1c;--playlist-page-video-list-item-hover-bg-color: #333;--playlist-page-video-list-item-title-hover-bg-color: #333;--playlist-page-video-list-item-after-bg-color: rgba(255, 255, 255, 0.1);--playlist-page-video-list-item-order-text-color: rgb(170, 170, 170);--playlist-page-video-list-item-options-icon-hover-color: rgba(255, 255, 255, 0.88);--playlist-page-video-list-item-options-popup-cancel-removal-button-text-color: rgba(255, 255, 255, 0.5);--playlist-page-video-list-item-options-popup-cancel-removal-button-hover-text-color: rgba(255, 255, 255, 0.74);--playlist-page-video-list-item-options-popup-cancel-removal-button-hover-icon-text-color: rgba(255, 255, 255, 0.74);--media-author-actions-popup-bottom-cancel-removal-button-text-color: rgba(255, 255, 255, 0.5);--media-author-actions-popup-bottom-cancel-removal-button-hover-text-color: rgba(255, 255, 255, 0.74);--media-author-actions-popup-bottom-cancel-removal-button-hover-icon-text-color: rgba(255, 255, 255, 0.74);--profile-banner-wrap-popup-bottom-cancel-removal-button-text-color: rgba(255, 255, 255, 0.5);--profile-banner-wrap-popup-bottom-cancel-removal-button-hover-text-color: rgba(255, 255, 255, 0.74);--profile-banner-wrap-popup-bottom-cancel-removal-button-hover-icon-text-color: rgba(255, 255, 255, 0.74);--media-title-banner-border-color: rgba(255, 255, 255, 0.08);--media-title-labels-area-text-color: rgba(255, 255, 255, 0.6);--media-title-labels-area-bg-color: rgba(255, 255, 255, 0.08);--media-title-views-text-color: rgb(136, 136, 136);--media-actions-not-popup-circle-icon-focus-bg-color: rgba(255, 255, 255, 0.07);--media-actions-not-popup-circle-icon-active-bg-color: rgba(255, 255, 255, 0.14);--media-actions-like-before-border-color: rgba(255, 255, 255, 0.5);--media-actions-share-title-text-color: rgba(255, 255, 255, 0.88);--media-actions-share-options-nav-button-text-color: rgba(255, 255, 255, 0.5);--media-actions-share-options-link-text-color: rgba(255, 255, 255, 0.88);--media-actions-share-copy-field-border-color: rgb(41, 41, 41);--media-actions-share-copy-field-bg-color: rgb(28, 28, 28);--media-actions-share-copy-field-input-text-color: rgba(255, 255, 255, 0.88);--media-actions-more-options-popup-bg-color: #242424;--media-actions-more-options-popup-nav-link-text-color: rgba(255, 255, 255, 0.88);--media-actions-share-fullscreen-popup-main-bg-color: #242424;--report-form-title-text-color: rgba(255, 255, 255, 0.88);--report-form-field-label-text-color: rgba(255, 255, 255, 0.88);--report-form-field-input-text-color: rgba(255, 255, 255, 0.88);--report-form-field-input-border-color: rgb(41, 41, 41);--report-form-field-input-bg-color: rgb(28, 28, 28);--report-form-help-text-color: rgb(136, 136, 136);--form-actions-bottom-border-top-color: rgba(255, 255, 255, 0.08);--media-author-banner-name-text-color: rgba(255, 255, 255, 0.88);--media-author-banner-date-text-color: rgba(255, 255, 255, 0.6);--media-content-banner-border-color: rgba(255, 255, 255, 0.08);--share-embed-inner-on-right-border-color: rgba(255, 255, 255, 0.08);--share-embed-inner-on-right-ttl-text-color: rgba(255, 255, 255, 0.88);--share-embed-inner-on-right-icon-text-color: rgba(255, 255, 255, 0.5);--share-embed-inner-textarea-text-color: rgba(255, 255, 255, 0.55);--share-embed-inner-textarea-border-color: rgb(41, 41, 41);--share-embed-inner-textarea-bg-color: rgb(28, 28, 28);--share-embed-inner-embed-wrap-iconn-text-color: rgba(255, 255, 255, 0.5);--media-status-info-item-text-color: rgba(255, 255, 255, 0.88);--viewer-sidebar-auto-play-border-bottom-color: rgba(255, 255, 255, 0.1);--viewer-sidebar-auto-play-next-label-text-color: #fff;--viewer-sidebar-auto-play-option-text-color: #aaa;--user-action-form-inner-bg-color: #242424;--user-action-form-inner-title-border-bottom-color: var(--sidebar-nav-border-color);--user-action-form-inner-input-border-color: #303030;--user-action-form-inner-input-text-color: rgba(255, 255, 255, 0.88);--user-action-form-inner-input-bg-color: #121212}body{--default-logo-height: 18px;--default-theme-color: #009933;--default-brand-color: #009933;--success-color: #00a28b;--warning-color: #e09f1f;--danger-color: #de623b;--input-disabled-bg-color: hsla(0, 0%, 0%, 0.05);--dotted-outline: 1px dotted var(--dotted-outline-color);--header-height: 56px;--sidebar-width: 240px;--item-title-font-size: 14px;--item-title-max-lines: 2;--item-title-line-height: 18px;--horizontal-item-title-line-height: 21px;--playlist-item-title-line-height: 20px;--large-item-title-font-size: 16px;--large-item-title-line-height: 22px;--links-color: var(--default-theme-color)}body{--default-item-width: 218px;--default-max-item-width: 344px;--default-max-row-items: 6;--default-item-margin-right-width: 4px;--default-item-margin-bottom-width: 24px;--default-horizontal-item-margin-right-width: 12px;--default-horizontal-item-margin-bottom-width: 12px}.nav-menu li.link-item.active .menu-item-icon{color:var(--theme-color, var(--default-theme-color))}.logo span{color:var(--theme-color, var(--default-theme-color))}.comments-form-inner .form .form-buttons a,.comments-form-inner .form .form-buttons button{background:var(--theme-color, var(--default-theme-color))}.comment-text a{color:var(--theme-color, var(--default-theme-color))}.comment-actions .remove-comment>button{background-color:var(--theme-color, var(--default-theme-color))}.comment-actions .remove-comment .popup-message-bottom button.proceed-comment-removal{color:var(--theme-color, var(--default-theme-color))}.nav-menu li.label-item button.reported-label,.nav-menu li.label-item button.reported-label *{color:var(--theme-color, var(--default-theme-color))}.page-sidebar .page-sidebar-bottom a:hover{color:var(--theme-color, var(--default-theme-color)) !important}.media-drag-drop-content-inner .browse-files-btn-wrap span{background-color:var(--theme-color, var(--default-theme-color))}.filename-edit:hover{color:var(--theme-color, var(--default-theme-color))}.media-upload-item-bottom-actions>*:hover{color:var(--theme-color, var(--default-theme-color))}.media-upload-item-progress-bar-container .media-upload-item-progress-bar{background-color:var(--theme-color, var(--default-theme-color))}dialog .qq-dialog-buttons button{color:var(--theme-color, var(--default-theme-color)) !important}.media-drag-drop-content-inner .browse-files-btn-wrap span{background-color:var(--theme-color, var(--default-theme-color))}.media-upload-item-top-actions>*:hover,.media-upload-item-bottom-actions>*:hover{color:var(--theme-color, var(--default-theme-color))}.media-upload-item-bottom-actions>*:hover{background-color:var(--theme-color, var(--default-theme-color))}.retry-media-upload-item{color:var(--theme-color, var(--default-theme-color))}.retry-media-upload-item:hover{background-color:var(--theme-color, var(--default-theme-color))}.media-upload-item-progress-bar-container .media-upload-item-progress-bar{background-color:var(--theme-color, var(--default-theme-color))}.viewer-container .player-container.audio-player-container .vjs-big-play-button{background-color:var(--brand-color, var(--default-brand-color)) !important}.media-author-actions>a,.media-author-actions>button{background-color:var(--theme-color, var(--default-theme-color))}.media-author-actions .popup-message-bottom button.proceed-comment-removal{color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-actions>*>*.share .copy-field button{color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-actions .disliked-media>*>*.dislike:before{border-color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-views-actions.liked-media .media-actions>*>*.like,.media-title-banner .media-views-actions.liked-media .media-actions>*>*.like button,.media-title-banner .media-views-actions.liked-media .media-actions>*>*.like .circle-icon-button{color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-views-actions.liked-media .media-actions>*>*.like:before,.media-title-banner .media-views-actions.liked-media .media-actions>*>*.dislike:before{border-color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-views-actions.disliked-media .media-actions>*>*.dislike,.media-title-banner .media-views-actions.disliked-media .media-actions>*>*.dislike button,.media-title-banner .media-views-actions.disliked-media .media-actions>*>*.dislike .circle-icon-button{color:var(--theme-color, var(--default-theme-color))}.media-title-banner .media-views-actions.disliked-media .media-actions>*>*.like:before,.media-title-banner .media-views-actions.disliked-media .media-actions>*>*.dislike:before{border-color:var(--theme-color, var(--default-theme-color))}.form-actions-bottom button{color:var(--theme-color, var(--default-theme-color)) !important}.media-content-field-content a{color:var(--theme-color, var(--default-theme-color))}.share-embed .share-embed-inner .on-right-bottom button{color:var(--theme-color, var(--default-theme-color))}.profile-page-header a.edit-channel,.profile-page-header a.edit-profile,.profile-page-header button.delete-profile{background-color:var(--theme-color, var(--default-theme-color))}.profile-banner-wrap .popup-message-bottom>a,.profile-banner-wrap .popup-message-bottom>button{background-color:var(--theme-color, var(--default-theme-color))}.profile-banner-wrap .popup-message-bottom button.proceed-profile-removal{color:var(--theme-color, var(--default-theme-color))}p a{color:var(--theme-color, var(--default-theme-color))}.user-action-form-inner a{color:var(--theme-color, var(--default-theme-color))}.user-action-form-inner button,.user-action-form-inner *[type=submit],.user-action-form-inner *[type=button]{background-color:var(--theme-color, var(--default-theme-color))}html{height:100%}body,body *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body:after,body:before,body *:after,body *:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{min-height:100%;color:var(--body-text-color);background-color:var(--body-bg-color);-webkit-transition-property:overflow;-moz-transition-property:overflow;transition-property:overflow;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s;-webkit-transition-timing-function:linear;-moz-transition-timing-function:linear;transition-timing-function:linear}body.overflow-hidden{overflow:hidden}body{font-size:14px;font-family:"Roboto",Arial,sans-serif;line-height:1.5}body .font-size-large{font-size:2.6625em}body h1,body .h1{font-size:2.13125em}body h2,body .h2{font-size:1.4625em}body h3,body .h3{font-size:1.13125em}body h4,body .h4{font-size:1.0625em}body h5,body .h5{font-size:1em}body h6,body .h6{font-size:1em}body .font-size-small{font-size:.93125em}body .sub-heading,body .font-size-x-small{font-size:.8625em}body .section-intro{font-size:1.25em}body small{font-size:.8625em}body big{font-size:1.25em}h1,h2,h3,h4,h5,h6{font-weight:bold;font-weight:500;line-height:1.15}.sub-heading{display:block;clear:both;line-height:1.1;letter-spacing:.05em;margin:8px 0;text-transform:uppercase}.section-intro{font-weight:100;font-weight:200;font-weight:300}p,ul{font-size:1em;line-height:1.62}p a,ul a{text-decoration:none}p a:hover,ul a:hover{text-decoration:underline}ul,ol{padding:0;list-style-position:inside}blockquote{line-height:1.75}button{line-height:1}hr{display:block;height:1px;padding:0;margin:1em 0 2em 0;border:0;background-color:var(--hr-color)}.num-value-unit .label{display:block;padding:0 0 4px}.num-value-unit .value-input,.num-value-unit .value-unit{position:relative;float:left;width:auto}.num-value-unit .value-input:focus,.num-value-unit .value-input:active,.num-value-unit .value-unit:focus,.num-value-unit .value-unit:active{z-index:1}.num-value-unit .value-input{margin-right:-1px;-moz-border-radius-topright:0px;border-top-right-radius:0px;-moz-border-radius-bottomright:0px;border-bottom-right-radius:0px}:root{--checkbox-width: 1.143em;--checkbox-height: 1.143em}button,input,select,textarea{overflow:visible}input[type=text],input[type=email],input[type=number],input[type=password],input[type=file],input[type=range],input[type=reset],input[type=radio],input[type=checkbox],select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none}button:focus,input:focus,select:focus,textarea:focus{outline:0}input[type=text]:focus,input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=file]:focus,input[type=reset]:focus,input[type=radio]:focus,input[type=checkbox]:focus,select:focus,textarea:focus{-webkit-box-shadow:0px 0px 2px 0px rgba(0,0,0,.25);box-shadow:0px 0px 2px 0px rgba(0,0,0,.25)}input[type=text]:focus,input[type=email]:focus,input[type=number]:focus,input[type=password]:focus,input[type=file]:focus,input[type=reset]:focus,select:focus,textarea:focus{border-color:var(--theme-color, var(--default-theme-color))}input,select,textarea{padding:.57142875em;line-height:1.3;color:var(--input-color);-moz-border-radius:1px;border-radius:1px;border-width:1px;border-style:solid;border-color:var(--input-border-color);background-color:var(--input-bg-color)}input:disabled,select:disabled,textarea:disabled{cursor:not-allowed;background-color:var(--input-disabled-bg-color)}input.input-success,select.input-success,textarea.input-success{border-color:var(--success-color)}input.input-warning,select.input-warning,textarea.input-warning{border-color:var(--warning-color)}input.input-error,select.input-error,textarea.input-error{border-color:var(--danger-color)}label{display:inline-block;line-height:1.1;margin-bottom:.5em}select{padding-right:32px;background-size:24px;background-repeat:no-repeat;background-position:right 4px center;background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%280,0,0,0.897%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%280,0,0,0.897%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%280,0,0,0.897%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%280,0,0,0.897%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}.dark_theme select{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%28255,255,255,0.88%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%28255,255,255,0.88%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%28255,255,255,0.88%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2748%27 height=%2748%27 viewBox=%270 0 48 48%27 fill=%27rgba%28255,255,255,0.88%29%27%3E%3Cpath d=%27M14 22l10-10 10 10z%27 /%3E%3Cpath d=%27M14 26l10 10 10-10z%27 /%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}select[multiple]{padding:0;overflow:auto;background-image:none}select[multiple] option{padding:.7143em .57142875em;margin:1px}textarea{min-height:2.75rem;height:160px;min-width:9.375rem;max-width:100%}input[type=file]{max-width:100%}input[type=range]{display:block;max-width:none;min-height:40px;padding:1em 1px;border:none;-moz-border-radius:0;border-radius:0;background:none}input[type=range]:focus::-webkit-slider-thumb{background-color:var(--body-bg-color);background-color:var(--theme-color, var(--default-theme-color))}input[type=range]:focus::-moz-range-thumb{background-color:var(--body-bg-color);background-color:var(--theme-color, var(--default-theme-color))}input[type=range]:focus::-ms-thumb{background-color:var(--body-bg-color);background-color:var(--theme-color, var(--default-theme-color))}input[type=range]::-webkit-slider-runnable-track{width:100%;height:16px;cursor:pointer;border-radius:9999em;border:1px solid var(--input-border-color);background:var(--input-bg-color)}input[type=range]::-moz-range-track{width:100%;height:16px;cursor:pointer;-moz-border-radius:9999em;border-radius:9999em;border:1px solid var(--input-border-color);background:var(--input-bg-color)}input[type=range]::-ms-track{width:100%;height:16px;cursor:pointer;border-radius:9999em;border:1px solid var(--input-border-color);background:var(--input-bg-color)}input[type=range]::-webkit-slider-thumb{width:20px;height:20px;cursor:pointer;-webkit-appearance:none;border:none;border-radius:999em;background-color:var(--input-border-color);appearance:none;margin-top:-0.19rem}input[type=range]::-moz-range-thumb{width:20px;height:20px;cursor:pointer;-webkit-appearance:none;border:none;-moz-border-radius:999em;border-radius:999em;background-color:var(--input-border-color)}input[type=range]::-ms-thumb{width:20px;height:20px;cursor:pointer;-webkit-appearance:none;border:none;border-radius:999em;background-color:var(--input-border-color)}input[type=range]::-ms-fill-lower{border-radius:999em;border:1px solid var(--input-border-color);background:var(--input-bg-color)}input[type=range]::-ms-fill-upper{border-radius:999em;border:1px solid var(--input-border-color);background:var(--input-bg-color)}input[type=radio],input[type=checkbox],*.radio-label .selectbox,*.checkbox-label .selectbox{width:var(--checkbox-width);height:var(--checkbox-height);vertical-align:middle}input[type=radio],input[type=checkbox]{margin:0 .75em}input[type=radio]:focus,input[type=checkbox]:focus{border-color:var(--input-border-color);-webkit-box-shadow:0px 0px 2px 0px rgba(0,0,0,.25);box-shadow:0px 0px 2px 0px rgba(0,0,0,.25)}input[type=radio]:active,input[type=checkbox]:active{opacity:.85}input[type=radio]:checked,input[type=checkbox]:checked{background-size:20px auto;background-repeat:no-repeat;background-size:cover;background-position:center center;background-color:var(--theme-color, var(--default-theme-color));border-color:var(--theme-color, var(--default-theme-color))}input[type=radio]:disabled,input[type=checkbox]:disabled{border-color:var(--input-border-color);background-color:var(--input-disabled-bg-color)}input[type=radio]:checked:disabled,input[type=checkbox]:checked:disabled{background-color:var(--input-border-color)}*.radio-label .selectbox,*.checkbox-label .selectbox{background-color:var(--input-bg-color);border:1px solid var(--input-border-color)}*.radio-label input[type=radio]:focus~.selectbox,*.radio-label input[type=checkbox]:focus~.selectbox,*.checkbox-label input[type=radio]:focus~.selectbox,*.checkbox-label input[type=checkbox]:focus~.selectbox{border-color:var(--input-border-color);-webkit-box-shadow:0px 0px 2px 0px rgba(0,0,0,.25);box-shadow:0px 0px 2px 0px rgba(0,0,0,.25)}*.radio-label input[type=radio]:active~.selectbox,*.radio-label input[type=checkbox]:active~.selectbox,*.checkbox-label input[type=radio]:active~.selectbox,*.checkbox-label input[type=checkbox]:active~.selectbox{opacity:.85}*.radio-label input[type=radio]:checked~.selectbox,*.radio-label input[type=checkbox]:checked~.selectbox,*.checkbox-label input[type=radio]:checked~.selectbox,*.checkbox-label input[type=checkbox]:checked~.selectbox{background-size:20px auto;background-repeat:no-repeat;background-size:cover;background-position:center center;background-color:var(--theme-color, var(--default-theme-color));border-color:var(--theme-color, var(--default-theme-color))}*.radio-label input[type=radio]:disabled~.selectbox,*.radio-label input[type=checkbox]:disabled~.selectbox,*.checkbox-label input[type=radio]:disabled~.selectbox,*.checkbox-label input[type=checkbox]:disabled~.selectbox{border-color:var(--input-border-color);background-color:var(--input-disabled-bg-color)}*.radio-label input[type=radio]:checked:disabled~.selectbox,*.radio-label input[type=checkbox]:checked:disabled~.selectbox,*.checkbox-label input[type=radio]:checked:disabled~.selectbox,*.checkbox-label input[type=checkbox]:checked:disabled~.selectbox{background-color:var(--input-border-color)}input[type=radio],input[type=radio]~.selectbox{-moz-border-radius:99em;border-radius:99em}input[type=radio]:checked,input[type=radio]:checked~.selectbox{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27white%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27white%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27white%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27white%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}input[type=radio]:checked:disabled,input[type=radio]:checked:disabled~.selectbox{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 width=%2718px%27 height=%2718px%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M0 0h24v24H0V0z%27 fill=%27none%27/%3E%3Cpath d=%27M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z%27/%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}input[type=checkbox]:checked,input[type=checkbox]:checked~.selectbox{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27white%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27white%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27white%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27white%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}input[type=checkbox]:checked:disabled,input[type=checkbox]:checked:disabled~.selectbox{background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-webkit-gradient(linear, left top, left bottom, from(transparent), to(transparent));background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-webkit-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),-moz-linear-gradient(transparent, transparent);background-image:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 48 48%27 width=%2748%27 height=%2748%27 fill=%27rgba%28255,255,255,0.65%29%27%3E%3Cpath d=%27M18 32.34L9.66 24l-2.83 2.83L18 38l24-24-2.83-2.83z%27/%3E%3C/svg%3E"),linear-gradient(transparent, transparent)}*.radio-label,*.checkbox-label{position:relative;line-height:1.143;margin-right:1em;cursor:pointer}*.radio-label .selectbox,*.checkbox-label .selectbox{display:inline-block;margin-right:.75em}*.radio-label.right-selectbox .selectbox,*.checkbox-label.right-selectbox .selectbox{margin-right:0;margin-left:.75em}*.radio-label input[type=radio],*.radio-label input[type=checkbox],*.checkbox-label input[type=radio],*.checkbox-label input[type=checkbox]{position:absolute;left:-999em}label+input:not([type=radio]):not([type=checkbox]),label+select,label+textarea,label+button,.input-message+input:not([type=radio]):not([type=checkbox]),.input-message+select,.input-message+textarea,.input-message+button{display:block;margin-bottom:1em}.input-message{display:inline-block;line-height:1.1;margin-bottom:.5em}.input-message.success-message{color:var(--success-color)}.input-message.warning-message{color:var(--warning-color)}.input-message.error-message{color:var(--danger-color)}label+.input-message{display:block}a{color:var(--theme-color, var(--default-theme-color))}a:focus{outline:0}button{cursor:pointer;padding:0}.cf:before,.cf:after{content:" ";display:table}.cf:after{clear:both}.cf{*zoom:1}.fl{float:left}.fr{float:right}.hidden-txt{display:none}.button-link{text-overflow:ellipsis;white-space:nowrap;text-align:center;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:rgba(0,0,0,0)}.button-link{overflow:hidden;cursor:pointer}@media screen and (min-width: 640px){.visible-only-in-small{display:none !important}}@media screen and (max-width: 639px){.hidden-only-in-small{display:none !important}}@media screen and (min-width: 480px){.visible-only-in-extra-small{display:none !important}}@media screen and (max-width: 479px){.hidden-only-in-extra-small{display:none !important}}.user-action-form-wrap{margin:2em 1em 1em}@media screen and (min-width: 1220px){.sliding-sidebar .user-action-form-wrap{-webkit-transition-property:padding-right;-moz-transition-property:padding-right;transition-property:padding-right;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}.visible-sidebar .user-action-form-wrap{padding-right:240px}}.user-action-form-inner{position:relative;margin:0 auto;width:100%;max-width:480px;padding:2em 2em;font-size:14px;line-height:1.5;background-color:var(--user-action-form-inner-bg-color);-moz-border-radius:2px;border-radius:2px;-webkit-box-shadow:0px 4px 8px 0 rgba(17,17,17,.06);box-shadow:0px 4px 8px 0 rgba(17,17,17,.06)}@media screen and (min-width: 1220px){.user-action-form-inner{max-width:640px}}.user-action-form-inner form,.user-action-form-inner label,.user-action-form-inner select,.user-action-form-inner textarea,.user-action-form-inner input[type=text],.user-action-form-inner input[type=email],.user-action-form-inner input[type=number],.user-action-form-inner input[type=password]{display:block;width:100%}.user-action-form-inner label{margin-top:1.5em}.user-action-form-inner h1{display:inline-block;width:100%;padding:0 0 .67em 0;margin:0 0 .5em;font-weight:400;border-width:0 0 1px;border-style:solid;border-bottom-color:var(--user-action-form-inner-title-border-bottom-color)}.user-action-form-inner form *[type=submit],.user-action-form-inner form .primaryAction,.user-action-form-inner form .secondaryAction{line-height:1.125;padding:1em 2em;margin:1em 0 .5em;cursor:pointer}.user-action-form-inner h1+form{margin-top:0}.user-action-form-inner a{text-decoration:none}.user-action-form-inner a:hover{text-decoration:underline}.user-action-form-inner .help-block{line-height:1.5;font-weight:lighter;margin-top:.25em;margin-bottom:2em}.user-action-form-inner form{margin-top:1.5em}.user-action-form-inner form>.control-group>*:first-child.controls{margin-top:2em;margin-bottom:2.5em}.user-action-form-inner form>.control-group>*:first-child.controls>*:first-child{margin-top:0}.user-action-form-inner form>.control-group>*:first-child.controls>*:last-child{margin-bottom:0}.user-action-form-inner form>.control-group .controls a{margin:0 .25em;word-break:break-all}.user-action-form-inner form>.control-group .controls label{display:inline-block;width:auto;margin:1em 0 0 0;line-height:1.5;cursor:pointer}.user-action-form-inner form>.control-group .controls label[for=banner_logo-clear_id]{margin-bottom:1em}.user-action-form-inner form>.control-group .controls input[type=file]{width:100%;margin-top:.5em}@media screen and (min-width: 711px){.user-action-form-inner form>.control-group .controls input[type=file]{width:auto;margin-left:.5em}}.user-action-form-inner form>.control-group:last-of-type .controls{margin-bottom:1.5em}.user-action-form-inner form.login .primaryAction,.user-action-form-inner form.logout .primaryAction{margin-right:1em}.user-action-form-inner form.login .secondaryAction,.user-action-form-inner form.logout .secondaryAction{float:right;padding-left:0;padding-right:0}.user-action-form-inner form label.checkbox{display:inline-block;width:auto;cursor:pointer}.user-action-form-inner form label.checkbox+.help-block{margin-top:.25em}.user-action-form-inner form label.checkbox input[type=checkbox]{margin-top:-2px;margin-right:1em;margin-left:0}.user-action-form-inner form p{position:relative;margin-bottom:1.5em}.user-action-form-inner form p a{margin:0 .25em;word-break:break-all}.user-action-form-inner form p label{display:inline-block;width:auto;margin:0;line-height:1.5;cursor:pointer}.user-action-form-inner form p label+input,.user-action-form-inner form p label+select,.user-action-form-inner form p label+textarea{vertical-align:top;display:inline-block;margin-top:.5em}.user-action-form-inner form p label+input[type=radio],.user-action-form-inner form p label+input[type=checkbox]{vertical-align:top;display:inline-block;margin:.3em 0em 0em .75em}.user-action-form-inner form p label[for=logo-clear_id]{margin-bottom:1em}.user-action-form-inner form p input[type=file]{width:100%;margin-top:.5em}@media screen and (min-width: 711px){.user-action-form-inner form p input[type=file]{width:auto;margin-left:.5em}}.user-action-form-inner button,.user-action-form-inner *[type=submit],.user-action-form-inner *[type=button],.user-action-form-inner form.login .secondaryAction,.user-action-form-inner form.logout .secondaryAction{min-width:88px;text-align:center}.user-action-form-inner button,.user-action-form-inner *[type=submit],.user-action-form-inner *[type=button]{border:0;color:#fff;-moz-border-radius:1px;border-radius:1px}.user-action-form-inner textarea{min-width:100%;max-width:100%;min-height:80px;max-height:50vh}.user-action-form-inner .requiredField .asteriskField{margin-left:.25em;color:rgba(255,0,0,.8)}.user-action-form-inner .control-group.error input{border-color:rgba(255,0,0,.4)}.user-action-form-inner .control-group.error input+p{color:rgba(255,0,0,.8)}.user-action-form-inner .errorlist{width:100%;display:inline-block;padding:.75rem .75rem 0;margin:0 0 1rem;list-style:lower-latin;list-style-position:inside;color:rgba(17,17,17,.9);background-color:#fae6e6}.user-action-form-inner .errorlist li{margin:0 0 .75rem 0}.player-container.player-container-error .error-container{position:relative;display:table;width:100%;height:100%;color:#fff}.player-container.player-container-error .error-container-inner{display:table-cell;vertical-align:middle;padding:1em;font-size:20px}.player-container.player-container-error .error-container-inner .icon-wrap{display:block;margin-bottom:1rem;opacity:.4}.player-container.player-container-error .error-container-inner .icon-wrap i{font-size:2.5em}@media screen and (min-width: 640px){.player-container.player-container-error .error-container-inner .icon-wrap{display:inline-block;padding-right:.75rem;margin-bottom:0;text-align:left}.player-container.player-container-error .error-container-inner .icon-wrap i{font-size:3em}}.player-container.player-container-error .error-container-inner .msg-wrap{overflow:hidden}@media screen and (max-width: 639px){.player-container.player-container-error .error-container-inner{padding:.5em .5em 2.5em;text-align:center}}.alert{position:relative;width:100%;display:block;padding:1.5rem 4rem 1.5rem 1.5rem;overflow:hidden;font-size:14px;font-weight:500;color:rgba(17,17,17,.9);background-color:#e6e6e6;-webkit-transition-property:margin-top;-moz-transition-property:margin-top;transition-property:margin-top;-webkit-transition-duration:.3s;-moz-transition-duration:.3s;transition-duration:.3s}.alert.info{background-color:#e6e6fa}.alert.error{background-color:#fae6e6}.alert.warn,.alert.warning{background-color:#fafae6}.alert.success{background-color:#e6f0e6}.alert.alert-dismissible{min-height:4rem}.alert.hiding{margin-top:-4rem}.alert .close{position:absolute;top:.875rem;right:.75rem;width:2.5rem;height:2.5rem;display:block;padding:0;text-align:center;color:rgba(17,17,17,.9);outline:0;border:0;background:none;font-family:serif;font-size:32px;font-weight:normal;-moz-border-radius:9999px;border-radius:9999px}.alert .close:focus{background-color:rgba(0,0,0,.07)}.custom-page-wrapper{position:relative;width:100%;max-width:1366px;padding:1em 3em 1em;margin:0 auto;display:inline-block}.custom-page-wrapper p,.custom-page-wrapper ul,.custom-page-wrapper ol{font-size:1.071428571em}.custom-page-wrapper li{margin-bottom:.5em}.custom-page-wrapper p img.fl{margin:0 .75em .5em 0}.custom-page-wrapper p img.fr{margin:0 0 .5em .75em}.page-main-inner .custom-page-wrapper{padding:0 2em 1em}.tooltip{position:fixed;top:0;left:0;max-width:15em;padding:.9166666667em .6666666667em !important;padding:.9125em 1.125em !important;padding:10px 12px !important;font-size:12px !important;line-height:1.5 !important;color:#fff !important;background-color:#595959 !important;-moz-border-radius:2px !important;border-radius:2px !important;z-index:5 !important}.empty-media{padding:80px 0 32px;text-align:center}@media screen and (min-width: 1366px){.empty-media{padding:96px 0 48px}}.empty-media .welcome-title{display:block;font-size:2em}.empty-media .start-uploading{max-width:360px;display:block;font-size:1em;padding:12px 0 24px;margin:0 auto}.empty-media .button-link{display:inline-block;padding:13px 16px 11px;font-size:13px;line-height:1;color:#fff;border-style:solid;border-width:1px;-moz-border-radius:1px;border-radius:1px;border-color:var(--default-brand-color);background-color:var(--default-brand-color)}.empty-media .button-link .material-icons{margin-right:8px;margin-top:-1px;font-size:17px;line-height:1;opacity:.65} .page-header{background-color:var(--header-bg-color)}.page-header .circle-icon-button{color:var(--header-circle-button-color)}.page-header .page-header-right .popup .nav-menu li{color:var(--header-popup-menu-color)}.page-header .page-header-right .popup .nav-menu li .material-icons{color:var(--header-popup-menu-icon-color)}.page-header .page-header-right .popup .nav-menu li.link-item a{color:var(--header-popup-menu-color)}.page-header{z-index:6;position:fixed;top:0;left:0;right:0;height:var(--header-height);display:table;width:100%}.page-header:after{content:"";position:absolute;bottom:-5px;right:0;width:100%;height:5px;left:0;opacity:1;pointer-events:none;-webkit-box-shadow:inset 0px 4px 8px -3px rgba(17,17,17,.06);box-shadow:inset 0px 4px 8px -3px rgba(17,17,17,.06)}.page-header-left,.page-header-right{position:absolute;top:0;width:auto;height:100%;display:table;display:table-cell}.page-header-left>*,.page-header-right>*{display:table;height:100%;height:var(--header-height)}.page-header-left>*>*,.page-header-right>*>*{height:100%;display:table-cell;vertical-align:middle}.page-header-right{padding-right:1rem}@media screen and (max-width: 709px){.page-header-right{padding-right:8px}}.page-header-left{left:0;padding-right:104px}.page-header-left>*>*{padding-left:8px}@media screen and (min-width: 710px){.page-header-left>*>*{padding-left:16px}}.page-header-left>*>*{padding-right:16px}@media screen and (min-width: 640px)and (max-width: 1023px){.page-header-left{max-width:55%}.page-header-right{max-width:45%}}.page-header-right{right:0}.page-header-right>*>*{padding-right:8px;padding-right:6px}@media screen and (max-width: 368px){.page-header-right>*>*{padding-right:0}}.page-header-right .button-link{padding:10px 16px}.page-header-right .popup{position:absolute;top:100%;right:8px;margin-top:-8px;max-width:-webkit-calc(100vw - 38px);max-width:-moz-calc(100vw - 38px);max-width:calc(100vw - 38px)}@media screen and (max-width: 1007px){.page-header-right .popup{right:16px}}@media screen and (max-width: 479px){.page-header-right .popup{right:16px}}@media screen and (max-width: 359px){.page-header-right .popup{right:12px}}@media screen and (min-width: 1007px){.anonymous-user .page-header-right .popup{right:0}}@media screen and (min-width: 1024px){.mobile-search-toggle{display:none}}.user-thumb{padding:0}@media screen and (min-width: 1008px){.user-thumb,.user-options{position:relative}}.user-thumb{width:48px;text-align:center}@media screen and (min-width: 768px){.user-thumb{width:60px}}.sign-in-wrap,.register-wrap{padding:0}.button-link.sign-in,.button-link.register-link{color:var(--brand-color, var(--default-brand-color));font-weight:500;line-height:1;display:block;text-transform:uppercase}.signin-icon-link{color:var(--brand-color, var(--default-brand-color))}.close-search-field{display:none}a.user-menu-top-link{display:table;padding:8px;color:inherit;text-decoration:none}a.user-menu-top-link:focus{outline:var(--dotted-outline)}a.user-menu-top-link>*{display:table-cell;vertical-align:middle}a.user-menu-top-link>*:first-child{width:56px}a.user-menu-top-link>* .username{display:block;font-weight:500;line-height:1.25}a.user-menu-top-link>* .videos-count{display:block;line-height:1.5;font-size:.875em}.logo{padding:0;margin:0;font-size:1.25em;font-weight:300}@media screen and (max-width: 359px){.logo{font-size:1em}}.logo a{color:inherit;display:block}.logo a:focus span:before{content:"";display:block;position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;border:1px dotted var(--body-text-color);opacity:.5}.logo span{position:relative;display:block;float:left}.logo span>img,.logo picture{position:relative;float:left;max-width:100%;max-height:var(--logo-height, var(--default-logo-height))}@media screen and (max-width: 1023px){.mobile-search-field .toggle-sidebar,.mobile-search-field .logo,.mobile-search-field .page-header-right{display:none}.mobile-search-field .close-search-field{display:table-cell;padding-left:8px;padding-right:8px}}@media screen and (max-width: 1023px)and (min-width: 710px){.mobile-search-field .close-search-field{padding-left:16px;padding-right:16px}}@media screen and (max-width: 1023px){.mobile-search-field .page-header-left{position:relative;top:auto;left:auto;float:left}}@media screen and (max-width: 709px){.mobile-search-field .close-search-field{padding-left:4px}}@media screen and (max-width: 479px){.toggle-sidebar{padding-right:8px}}@media screen and (max-width: 359px){.toggle-sidebar{padding-right:4px}} .page-main-wrap{padding-top:var(--header-height);will-change:padding-left}@media(min-width: 768px){.visible-sidebar .page-main-wrap{padding-left:var(--sidebar-width);opacity:1}}.visible-sidebar #page-media .page-main-wrap{padding-left:0}.visible-sidebar .page-main-wrap #page-media{padding-left:0}body.sliding-sidebar .page-main-wrap{-webkit-transition-property:padding-left;-moz-transition-property:padding-left;transition-property:padding-left;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}#page-profile-media .page-main,#page-profile-playlists .page-main,#page-profile-about .page-main,#page-liked.profile-page-liked .page-main,#page-history.profile-page-history .page-main{min-height:-webkit-calc(100vh - var(--header-height));min-height:-moz-calc(100vh - var(--header-height));min-height:calc(100vh - var(--header-height))}.page-main{position:relative;width:100%;padding-bottom:16px}.page-main-inner{display:block;margin:1em 1em 0 1em}#page-profile-media .page-main-wrap,#page-profile-playlists .page-main-wrap,#page-profile-about .page-main-wrap,#page-liked.profile-page-liked .page-main-wrap,#page-history.profile-page-history .page-main-wrap{background-color:var(--body-bg-color)} .page-sidebar-content-overlay{position:fixed;top:3.5rem;left:0;right:0;bottom:0;z-index:4;background-color:#000;opacity:0;visibility:hidden;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);transform:translateZ(0);-webkit-transition-property:opacity;-moz-transition-property:opacity;transition-property:opacity;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;transition-duration:.2s}body.visible-sidebar #page-media .page-sidebar-content-overlay,body.visible-sidebar #page-media-video .page-sidebar-content-overlay,body.visible-sidebar #page-media-audio .page-sidebar-content-overlay,body.visible-sidebar #page-media-image .page-sidebar-content-overlay,body.visible-sidebar #page-media-pdf .page-sidebar-content-overlay{display:block;opacity:.5;visibility:visible}@media(max-width: 767px){body.visible-sidebar .page-sidebar-content-overlay{display:block;opacity:.5;visibility:visible}} diff --git a/static/js/_commons.js b/static/js/_commons.js index 43035235..caad604f 100644 --- a/static/js/_commons.js +++ b/static/js/_commons.js @@ -1,2 +1,2 @@ /*! For license information please see _commons.js.LICENSE.txt */ -(self.webpackChunkmediacms_frontend=self.webpackChunkmediacms_frontend||[]).push([[276],{70:function(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},78:function(e,t,n){"use strict";var r,i=n(4449),o=n(4903)(),a=n(8396),s=n(7570);if(o){var l=i("RegExp.prototype.exec"),c={},u=function(){throw c},d={toString:u,valueOf:u};"symbol"==typeof Symbol.toPrimitive&&(d[Symbol.toPrimitive]=u),r=function(e){if(!e||"object"!=typeof e)return!1;var t=s(e,"lastIndex");if(!t||!a(t,"value"))return!1;try{l(e,d)}catch(e){return e===c}}}else{var h=i("Object.prototype.toString");r=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===h(e)}}e.exports=r},160:function(e){"use strict";e.exports=function(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},239:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(9471);class i extends r.PureComponent{render(){return this.props.children?r.createElement("div",{className:"profile-page-content"+(this.props.enabledContactForm?" with-cform":"")},this.props.children):null}}},266:function(e,t,n){"use strict";n.r(t),n.d(t,{addNotification:function(){return s},initPage:function(){return o},toggleMediaAutoPlay:function(){return a}});var r=n(7143),i=n.n(r);function o(e){i().dispatch({type:"INIT_PAGE",page:e})}function a(){i().dispatch({type:"TOGGLE_AUTO_PLAY"})}function s(e,t){i().dispatch({type:"ADD_NOTIFICATION",notification:e,notificationId:t})}},278:function(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},285:function(e,t,n){"use strict";var r,i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||(r=function(e){return r=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},r(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=r(e),a=0;a{h()}),[a]),[s,a,l,c,p,n,t,d,u,function(){return null},function(){return l?1>l.totalPages()||l.loadedAllItems()?null:r.createElement("button",{className:"load-more",onClick:f},(0,o.translateString)("SHOW MORE")):null}]}},403:function(e){"use strict";var t,n,r=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},i((function(){throw 42}),null,t)}catch(e){e!==n&&(i=null)}else i=null;var o=/^\s*class\b/,a=function(e){try{var t=r.call(e);return o.test(t)}catch(e){return!1}},s=function(e){try{return!a(e)&&(r.call(e),!0)}catch(e){return!1}},l=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,u=!(0 in[,]),d=function(){return!1};if("object"==typeof document){var h=document.all;l.call(h)===l.call(document.all)&&(d=function(e){if((u||!e)&&(void 0===e||"object"==typeof e))try{var t=l.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(d(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==n)return!1}return!a(e)&&s(e)}:function(e){if(d(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return s(e);if(a(e))return!1;var t=l.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},419:function(e,t,n){"use strict";n.d(t,{jV:function(){return u},pl:function(){return l},r1:function(){return c}});var r=n(338),i=n.n(r);if(201==n.j)var o=n(8255);if(201==n.j)var a=n(5474);var s=function(e){return e.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}))},l=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,o.HP)(e),r={},i=0,a=n.length;i=0)&&(r[s]=e[s])}return r},c=function(e,t){for(var n=t.map(s),r=(0,o.HP)(e),i={},a=0,l=r.length;a=0||n.indexOf(s(c))>=0)&&(i[c]=e[c])}return i},u=function e(t,n){for(var r=o.h1.apply(void 0,[{},(0,o.cJ)(t,n)].concat(i()((0,o.zu)(c(t,n))))),s=(0,o.HP)(r).filter(a.Y),l=0,u=s.length;l=0?(delete r[d],r=(0,o.h1)({},r,h)):r[d]=h}return r}},463:function(e,t,n){"use strict";n.d(t,{c:function(){return o}});var r=n(4571),i=n.n(r);function o(e,t){let n=i()(e,{});return""!==n.origin&&"null"!==n.origin&&n.origin||(n=i()(t+"/"+e.replace(/^\//g,""),{})),n.toString()}},519:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}n.d(t,{A:function(){return r}})},750:function(e,t,n){"use strict";var r=n(2031),i="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t=3&&(a=n),s=e,"[object Array]"===i.call(s)?function(e,t,n){for(var r=0,i=e.length;r{const t=s()(e.link);return{active:p===t.host+t.pathname,itemType:"link",link:e.link||"#",icon:e.icon||null,iconPos:"left",text:e.text||e.link||"#",itemAttr:{className:e.className||""}}}))}return[function(){const e=[];return d.hideHomeLink||e.push({link:a.home,icon:"home",text:(0,u.translateString)("Home"),className:"nav-item-home"}),o.PageStore.get("config-enabled").pages.featured&&o.PageStore.get("config-enabled").pages.featured.enabled&&e.push({link:a.featured,icon:"star",text:(0,u.translateString)("Featured"),className:"nav-item-featured"}),o.PageStore.get("config-enabled").pages.recommended&&o.PageStore.get("config-enabled").pages.recommended.enabled&&e.push({link:a.recommended,icon:"done_outline",text:(0,u.translateString)("Recommended"),className:"nav-item-recommended"}),o.PageStore.get("config-enabled").pages.latest&&o.PageStore.get("config-enabled").pages.latest.enabled&&e.push({link:a.latest,icon:"new_releases",text:(0,u.translateString)("Latest"),className:"nav-item-latest"}),!d.hideTagsLink&&o.PageStore.get("config-enabled").taxonomies.tags&&o.PageStore.get("config-enabled").taxonomies.tags.enabled&&e.push({link:a.archive.tags,icon:"local_offer",text:(0,u.translateString)("Tags"),className:"nav-item-tags"}),!d.hideCategoriesLink&&o.PageStore.get("config-enabled").taxonomies.categories&&o.PageStore.get("config-enabled").taxonomies.categories.enabled&&e.push({link:a.archive.categories,icon:"list_alt",text:(0,u.translateString)("Categories"),className:"nav-item-categories"}),o.PageStore.get("config-enabled").pages.members&&o.PageStore.get("config-enabled").pages.members.enabled&&e.push({link:a.members,icon:"people",text:(0,u.translateString)("Members"),className:"nav-item-members"}),o.PageStore.get("config-contents").sidebar.mainMenuExtra.items.forEach((t=>{e.push({link:t.link,icon:t.icon,text:t.text,className:t.className})})),e.length?r.createElement(c.NavigationMenuList,{key:"main-first",items:f(e)}):null}(),function(){const i=[];return t||(e.addMedia&&(i.push({link:a.user.addMedia,icon:"video_call",text:(0,u.translateString)("Upload"),className:"nav-item-upload-media"}),n.media&&i.push({link:n.media,icon:"video_library",text:(0,u.translateString)("My media"),className:"nav-item-my-media"})),e.saveMedia&&i.push({link:n.playlists,icon:"playlist_play",text:(0,u.translateString)("My playlists"),className:"nav-item-my-playlists"})),i.length?r.createElement(c.NavigationMenuList,{key:"main-second",items:f(i)}):null}(),function(){const t=[];return o.PageStore.get("config-enabled").pages.history&&o.PageStore.get("config-enabled").pages.history.enabled&&t.push({link:a.user.history,icon:"history",text:(0,u.translateString)("History"),className:"nav-item-history"}),e.likeMedia&&o.PageStore.get("config-enabled").pages.liked&&o.PageStore.get("config-enabled").pages.liked.enabled&&t.push({link:a.user.liked,icon:"thumb_up",text:(0,u.translateString)("Liked media"),className:"nav-item-liked"}),t.length?r.createElement(c.NavigationMenuList,{key:"user",items:f(t)}):null}(),function(){const e=[];return e.push({link:"/about",icon:"contact_support",text:(0,u.translateString)("About"),className:"nav-item-about"}),e.push({link:"/tos",icon:"description",text:(0,u.translateString)("Terms"),className:"nav-item-terms"}),e.push({link:"/contact",icon:"alternate_email",text:(0,u.translateString)("Contact"),className:"nav-item-contact"}),e.push({link:"/setlanguage",icon:"language",text:(0,u.translateString)("Language"),className:"nav-item-language"}),e.length?r.createElement(c.NavigationMenuList,{key:"custom",items:f(e)}):null}(),function(){const t=[];return e.manageMedia&&t.push({link:a.manage.media,icon:"miscellaneous_services",text:(0,u.translateString)("Manage media"),className:"nav-item-manage-media"}),e.manageUsers&&t.push({link:a.manage.users,icon:"miscellaneous_services",text:(0,u.translateString)("Manage users"),className:"nav-item-manage-users"}),e.manageComments&&t.push({link:a.manage.comments,icon:"miscellaneous_services",text:(0,u.translateString)("Manage comments"),className:"nav-item-manage-comments"}),t.length?r.createElement(c.NavigationMenuList,{key:"admin",items:f(t)}):null}()]}function h(){const e=o.PageStore.get("config-contents").sidebar.belowNavMenu;return e?r.createElement("div",{className:"page-sidebar-under-nav-menus",dangerouslySetInnerHTML:{__html:e}}):null}function p(){const e=o.PageStore.get("config-contents").sidebar.belowThemeSwitcher;return e?r.createElement("div",{className:"page-sidebar-below-theme-switcher",dangerouslySetInnerHTML:{__html:e}}):null}var f=n(2140);function m(){const e=o.PageStore.get("config-contents").sidebar.footer;return e?r.createElement("div",{className:"page-sidebar-bottom",dangerouslySetInnerHTML:{__html:e}}):null}function g(){const{visibleSidebar:e,toggleSidebar:t}=(0,i.useLayout)(),n=(0,r.useRef)(null),[a,s]=(0,r.useState)(e||492>window.innerWidth),[l,c]=(0,r.useState)(!0);let u=null,g=null,v=!1,y=!1;function b(){if(v||!o.PageStore.get("config-contents").sidebar.footer)return;u=document.querySelector(".page-sidebar-bottom"),g=u.previousSibling,"relative"!==getComputedStyle(g).position&&(y=!0),v=!0,o.PageStore.on("window_resize",E);let e=0,t=0,n=0;!function r(){const i=g.offsetTop+g.offsetHeight;i!==n?n=i:t+=1,e+=1,10>t&&50>e&&setTimeout(r,10),E()}()}function E(){let e=g,t=u.offsetHeight;y&&(t+=e.offsetHeight,e=e.previousSibling),c(!(e.offsetTop+e.offsetHeight+t>window.innerHeight-n.current.offsetTop))}function S(e){e.preventDefault(),e.stopPropagation(),t()}return(0,r.useEffect)((()=>{s(!0),setTimeout(b,20)}),[e]),(0,r.useEffect)((()=>{(e||a)&&b();const t=document.querySelector(".page-sidebar-content-overlay");return t&&t.addEventListener("click",S),()=>{v&&o.PageStore.removeListener("window_resize",E),t&&t.removeEventListener("click",S)}}),[]),r.createElement("div",{ref:n,className:"page-sidebar"+(l?" fixed-bottom":"")},r.createElement("div",{className:"page-sidebar-inner"},e||a?r.createElement(r.Fragment,null,r.createElement(d,null),r.createElement(h,null),r.createElement(f.SidebarThemeSwitcher,null),r.createElement(p,null),r.createElement(m,null)):null))}},868:function(e,t,n){"use strict";n.d(t,{gR:function(){return g},p9:function(){return v},cN:function(){return y},Et:function(){return b},w3:function(){return E},rc:function(){return x},$2:function(){return A},st:function(){return R},Aj:function(){return k},fR:function(){return T},jf:function(){return M},MU:function(){return D},wN:function(){return C},s0:function(){return I},aH:function(){return O},Tl:function(){return _},A6:function(){return w},z_:function(){return S},fC:function(){return P},$h:function(){return L.$}});var r=n(9471),i=n(4350),o=n(1838),a=n(8713),s=n.n(a),l=n(4571),c=n.n(l),u=n(8790),d=n(7154),h=n(2818),p=n(5615),f=n(8974);function m(e){const t=(0,r.useContext)(u.ApiUrlContext),n=(0,r.useContext)(u.SiteContext),[i,a]=(0,r.useState)(null),[s,l]=(0,r.useState)(null),[m,g]=(0,r.useState)(null),[v,y]=(0,r.useState)([]),[b,E]=(0,r.useState)({}),[S,w]=(0,r.useState)([]),[_,k]=(0,r.useState)({}),C={videoQuality:new d.BrowserCache(n.id,86400).get("video-quality")};C.videoQuality=null!==C.videoQuality?C.videoQuality:"Auto";let P=null,x=null,A=null,M=function(){let t=new(c())(e.pageLink).query;return t?(t=t.substring(1),t.split("&"),t=t.length?t.split("="):[]):t=[],t}();if(M.length){let e=0;for(;e div");p&&(p.innerHTML=x.summary)}function R(e){if(void 0!==e&&void 0!==e.type)switch(e.type){case"network":case"private":case"unavailable":a(e.type),l(void 0!==e.message?e.message:"Αn error occurred while loading the media's data")}}return null!==A&&(P=t.media+"/"+A),(0,r.useEffect)((()=>{null!==P&&(0,o.getRequest)(P,!1,T,R)}),[]),v.length?r.createElement("div",{className:"video-player"},r.createElement(p.L9,{siteId:n.id,siteUrl:n.url,info:b,sources:v,poster:m,previewSprite:_,subtitlesInfo:S,enableAutoplay:!1,inEmbed:!1,hasTheaterMode:!1,hasNextLink:!1,hasPreviousLink:!1,errorMessage:s})):null}function g(e){return""===e.description?null:r.createElement("div",{className:"item-description"},r.createElement("div",null,e.description))}function v(e){return r.createElement("div",{className:"item-main"},e.children)}function y(e){return r.createElement(v,null,r.createElement("a",{className:"item-content-link",href:e.link,title:e.title},e.children))}function b(e){return""===e.title?null:r.createElement("h3",null,r.createElement("span",{"aria-label":e.ariaLabel},e.title))}function E(e){return""===e.title?null:r.createElement("h3",null,r.createElement("a",{href:e.link,title:e.title},r.createElement("span",{"aria-label":e.ariaLabel},e.title)))}function S(e){return r.createElement("time",{key:"member-since"},"Member for ",(0,i.GP)(new Date(e.date)).replace(" ago",""))}function w(e){return r.createElement("span",{key:"item-media-count",className:"item-media-count"}," "+e.count," media")}function _(e){return r.createElement("span",{className:"item-meta"},r.createElement("span",{className:"playlist-date"},r.createElement("time",{dateTime:e.dateTime},e.text)))}function k(e){let t=e.link;return t&&window.MediaCMS.site.devEnv&&(t="/edit-media.html"),t?r.createElement("a",{href:t,title:(0,o.translateString)("Edit media"),className:"item-edit-link"},(0,o.translateString)("EDIT MEDIA")):null}function C(e){const t={key:"item-thumb",href:e.link,title:e.title,tabIndex:"-1","aria-hidden":!0,className:"item-thumb"+(e.src?"":" no-thumb"),style:e.src?{backgroundImage:"url('"+e.src+"')"}:null};return r.createElement("a",t,e.src?r.createElement("div",{key:"item-type-icon",className:"item-type-icon"},r.createElement("div",null)):null)}function P(e){const t={key:"item-thumb",href:e.link,title:e.title,tabIndex:"-1","aria-hidden":!0,className:"item-thumb"+(e.src?"":" no-thumb"),style:e.src?{backgroundImage:"url('"+e.src+"')"}:null};return r.createElement("a",t)}function x(e){return""===e.name?null:r.createElement("span",{className:"item-author"},r.createElement("span",null,e.name))}function A(e){return""===e.name?null:r.createElement("span",{className:"item-author"},r.createElement("a",{href:e.link,title:e.name},r.createElement("span",null,e.name)))}function M(e){return r.createElement("span",{className:"item-views"},(0,o.formatViewsNumber)(e.views)+" "+(1>=e.views?(0,o.translateString)("view"):(0,o.translateString)("views")))}function T(e){return r.createElement("span",{className:"item-date"},r.createElement("time",{dateTime:e.dateTime,content:e.time},e.text))}function R(e){return r.createElement("span",{className:"item-duration"},r.createElement("span",{"aria-label":e.ariaLabel,content:e.time},e.text))}function O(e){if(""===e.url)return null;const t=e.url.split(".").slice(0,-1).join("."),n=(0,o.imageExtension)(e.url);return r.createElement("span",{className:"item-img-preview","data-src":t,"data-ext":n})}function I(e){return r.createElement("div",{className:"item-player-wrapper"},r.createElement("div",{className:"item-player-wrapper-inner"},r.createElement(m,{pageLink:e.mediaPageLink})))}function D(e){return r.createElement("div",{className:"item-order-number"},r.createElement("div",null,r.createElement("div",{"data-order":e.index,"data-id":e.media_id},e.inPlayback&&e.index===e.activeIndex?r.createElement("i",{className:"material-icons"},"play_arrow"):e.index)))}if(m.propTypes={pageLink:s().string.isRequired},!/^((10|40|42)1|152|543|594|722)$/.test(n.j))var L=n(4845)},878:function(e,t,n){"use strict";n.d(t,{c:function(){return c}});var r=n(9471),i=n(8713),o=n.n(i),a=n(6387),s=n(5321),l=n(2828);function c(e){const{thumbnail:t}=(0,a.useUser)(),n={"aria-label":"Account profile photo that opens list of options and settings pages links",className:"thumbnail"};switch(e.isButton?void 0!==e.onClick&&(n.onClick=e.onClick):n.type="span",e.size){case"small":case"large":n.className+=" "+e.size+"-thumb"}return r.createElement(s.i,n,t?r.createElement("img",{src:t,alt:""}):r.createElement(l.Z,{type:"person"}))}c.propTypes={isButton:o().bool,size:o().oneOf(["small","medium","large"]),onClick:o().func},c.defaultProps={isButton:!1,size:"medium"}},977:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var r=n(7143);function i(e,t){return r.register(e[t].bind(e)),e}},1003:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MediaListHeader=void 0;var i=r(n(9471)),o=n(1838);t.MediaListHeader=function(e){var t=e.viewAllText||(0,o.translateString)("VIEW ALL");return i.default.createElement("div",{className:(e.className?e.className+" ":"")+"media-list-header",style:e.style},i.default.createElement("h2",null,e.title),e.viewAllLink?i.default.createElement("h3",null," ",i.default.createElement("a",{href:e.viewAllLink,title:t}," ",t||e.viewAllLink," ")," "):null)}},1024:function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,u=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+e[t+d],d+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=f,s/=256,i-=8);for(a=a<0;e[n+p]=255&a,p+=f,a/=256,c-=8);e[n+p-f]|=128*m}},1064:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(2698);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},1095:function(e,t,n){"use strict";var r=n(7118),i=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),o=function(e){var t=e.files,n=i.useRef(),o=i.useContext(r.LocalizationContext).l10n,a=i.useContext(r.ThemeContext).direction===r.TextDirection.RightToLeft,s=i.useRef([]),l=o&&o.attachment?o.attachment.clickToDownload:"Click to download",c=function(e){var t=n.current,r=[].slice.call(t.getElementsByClassName("rpv-attachment__item"));if(0!==r.length){r.forEach((function(e){return e.setAttribute("tabindex","-1")}));var i=document.activeElement,o=r[Math.min(r.length-1,Math.max(0,e(r,i)))];o.setAttribute("tabindex","0"),o.focus()}};return r.useIsomorphicLayoutEffect((function(){var e=n.current;if(e){var t=[].slice.call(e.getElementsByClassName("rpv-attachment__item"));if(s.current=t,t.length>0){var r=t[0];r.focus(),r.setAttribute("tabindex","0")}}}),[]),i.createElement("div",{"data-testid":"attachment__list",className:r.classNames({"rpv-attachment__list":!0,"rpv-attachment__list--rtl":a}),ref:n,tabIndex:-1,onKeyDown:function(e){switch(e.key){case"ArrowDown":e.preventDefault(),c((function(e,t){return e.indexOf(t)+1}));break;case"ArrowUp":e.preventDefault(),c((function(e,t){return e.indexOf(t)-1}));break;case"End":e.preventDefault(),c((function(e,t){return e.length-1}));break;case"Home":e.preventDefault(),c((function(e,t){return 0}))}}},t.map((function(e){return i.createElement("button",{className:"rpv-attachment__item",key:e.fileName,tabIndex:-1,title:l,type:"button",onClick:function(){return t=e.fileName,r="string"==typeof(n=e.data)?"":URL.createObjectURL(new Blob([n],{type:""})),(i=document.createElement("a")).style.display="none",i.href=r||t,i.setAttribute("download",function(e){var t=e.split("/").pop();return t?t.split("#")[0].split("?")[0]:e}(t)),document.body.appendChild(i),i.click(),document.body.removeChild(i),void(r&&URL.revokeObjectURL(r));var t,n,r,i}},e.fileName)})))},a=function(e){var t=e.doc,n=i.useContext(r.LocalizationContext).l10n,a=i.useContext(r.ThemeContext).direction===r.TextDirection.RightToLeft,s=n&&n.attachment?n.attachment.noAttachment:"There is no attachment",l=i.useState({files:[],isLoaded:!1}),c=l[0],u=l[1];return i.useEffect((function(){t.getAttachments().then((function(e){var t=e?Object.keys(e).map((function(t){return{data:e[t].content,fileName:e[t].filename}})):[];u({files:t,isLoaded:!0})}))}),[t]),c.isLoaded?0===c.files.length?i.createElement("div",{"data-testid":"attachment__empty",className:r.classNames({"rpv-attachment__empty":!0,"rpv-attachment__empty--rtl":a})},s):i.createElement(o,{files:c.files}):i.createElement(r.Spinner,null)},s=function(e){var t=e.store,n=i.useState(t.get("doc")),o=n[0],s=n[1],l=function(e){s(e)};return i.useEffect((function(){return t.subscribe("doc",l),function(){t.unsubscribe("doc",l)}}),[]),o?i.createElement(a,{doc:o}):i.createElement("div",{className:"rpv-attachment__loader"},i.createElement(r.Spinner,null))};t.attachmentPlugin=function(){var e=i.useMemo((function(){return r.createStore({})}),[]);return{onDocumentLoad:function(t){e.update("doc",t.doc)},Attachments:function(){return i.createElement(s,{store:e})}}}},1134:function(e,t,n){"use strict";function r(){return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1")}function i(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," ")}function o(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function a(e,t){return e.className&&new RegExp("(\\s|^)"+t+"(\\s|$)").test(e.className)}n.d(t,{CX:function(){return a},GT:function(){return c},kN:function(){return r},qk:function(){return i},uU:function(){return s},xi:function(){return l},zc:function(){return o}});const s=window.cancelAnimationFrame||window.mozCancelAnimationFrame,l=window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;function c(){const e={document:{visibility:[]},window:{resize:[],scroll:[]}};return document.addEventListener("visibilitychange",(function(){e.document.visibility.map((e=>e()))})),window.addEventListener("resize",(function(){e.window.resize.map((e=>e()))})),window.addEventListener("scroll",(function(){e.window.scroll.map((e=>e()))})),{doc:function(t){"function"==typeof t&&e.document.visibility.push(t)},win:function(t,n){"function"==typeof t&&e.window.resize.push(t),"function"==typeof n&&e.window.scroll.push(n)}}}},1177:function(e,t,n){"use strict";n.d(t,{A:function(){return E}});var r=n(9471),i=n(8713),o=n.n(i),a=n(5338),s=n(8790),l=n(7460),c=n(285),u=n(7664),d=n(5289),h=n(1838),p=n(8974);class f extends r.PureComponent{constructor(e){super(e),this.state={visibleForm:!1,queryVal:l.ProfilePageStore.get("author-query")||""},this.onChange=this.onChange.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.showForm=this.showForm.bind(this),this.hideForm=this.hideForm.bind(this),this.onFormSubmit=this.onFormSubmit.bind(this),this.updateTimeout=null,this.pendingUpdate=!1}updateQuery(e){this.pendingUpdateValue=null,this.setState({queryVal:e},(function(){"function"==typeof this.props.onQueryChange&&this.props.onQueryChange(this.state.queryVal)}))}onChange(e){this.pendingEvent=e,this.setState({queryVal:e.target.value||""},(function(){this.updateTimeout||(this.pendingEvent=null,"function"==typeof this.props.onQueryChange&&this.props.onQueryChange(this.state.queryVal),this.updateTimeout=setTimeout(function(){this.updateTimeout=null,this.pendingEvent&&this.onChange(this.pendingEvent)}.bind(this),100))}))}onInputFocus(){}onInputBlur(){this.hideForm()}showForm(){this.setState({visibleForm:!0},(function(){"function"==typeof this.props.toggleSearchField&&this.props.toggleSearchField()}))}hideForm(){this.setState({visibleForm:!1},(function(){"function"==typeof this.props.toggleSearchField&&this.props.toggleSearchField()}))}onFormSubmit(e){""===this.refs.SearchInput.value.trim()&&(e.preventDefault(),e.stopPropagation())}render(){return this.state.visibleForm?r.createElement("form",{method:"get",action:s.LinksContext._currentValue.profile.media,onSubmit:this.onFormSubmit},r.createElement("span",null,r.createElement(u.CircleIconButton,{buttonShadow:!1},r.createElement("i",{className:"material-icons"},"search"))),r.createElement("span",null,r.createElement("input",{autoFocus:!0,ref:"SearchInput",type:"text",name:"aq",placeholder:"Search","aria-label":"Search",value:this.state.queryVal,onChange:this.onChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur}))):r.createElement("div",null,r.createElement("span",null,r.createElement(u.CircleIconButton,{buttonShadow:!1,onClick:this.showForm},r.createElement("i",{className:"material-icons"},"search"))))}}function m(e){return r.createElement("li",{className:e.isActive?"active":null},r.createElement("a",{href:e.link,title:e.label},e.label))}f.propTypes={onQueryChange:o().func},f.defaultProps={},m.propTypes={id:o().string.isRequired,label:o().string.isRequired,link:o().string.isRequired,isActive:o().bool.isRequired};class g extends r.PureComponent{constructor(e){super(e),this.state={displayNext:!1,displayPrev:!1},this.inlineSlider=null,this.nextSlide=this.nextSlide.bind(this),this.prevSlide=this.prevSlide.bind(this),this.updateSlider=this.updateSlider.bind(this,!1),this.onToggleSearchField=this.onToggleSearchField.bind(this),l.PageStore.on("window_resize",this.updateSlider),this.sliderRecalTimeout=null,l.PageStore.on("changed_page_sidebar_visibility",function(){clearTimeout(this.sliderRecalTimeout),this.sliderRecalTimeout=setTimeout(function(){this.updateSliderButtonsView(),this.sliderRecalTimeout=setTimeout(function(){this.sliderRecalTimeout=null,this.updateSlider()}.bind(this),50)}.bind(this),150)}.bind(this)),this.previousBtn=r.createElement("span",{className:"previous-slide"},r.createElement(u.CircleIconButton,{buttonShadow:!1,onClick:this.prevSlide},r.createElement("i",{className:"material-icons"},"keyboard_arrow_left"))),this.nextBtn=r.createElement("span",{className:"next-slide"},r.createElement(u.CircleIconButton,{buttonShadow:!1,onClick:this.nextSlide},r.createElement("i",{className:"material-icons"},"keyboard_arrow_right"))),this.userIsAuthor=!s.MemberContext._currentValue.is.anonymous&&l.ProfilePageStore.get("author-data").username===s.MemberContext._currentValue.username}componentDidMount(){this.updateSlider()}nextSlide(){this.inlineSlider.nextSlide(),this.updateSliderButtonsView(),this.inlineSlider.scrollToCurrentSlide()}prevSlide(){this.inlineSlider.previousSlide(),this.updateSliderButtonsView(),this.inlineSlider.scrollToCurrentSlide()}updateSlider(e){this.inlineSlider||(this.inlineSlider=new d.A(this.refs.itemsListWrap,".profile-nav ul li")),this.inlineSlider.updateDataState(document.querySelectorAll(".profile-nav ul li").length,!0,!e),this.updateSliderButtonsView(),this.pendingChangeSlide&&(this.pendingChangeSlide=!1,this.inlineSlider.scrollToCurrentSlide())}updateSliderButtonsView(){this.setState({displayPrev:this.inlineSlider.hasPreviousSlide(),displayNext:this.inlineSlider.hasNextSlide()})}onToggleSearchField(){this.updateSlider()}render(){return r.createElement("nav",{ref:"tabsNav",className:"profile-nav items-list-outer list-inline list-slider"},r.createElement("div",{className:"profile-nav-inner items-list-outer"},this.state.displayPrev?this.previousBtn:null,r.createElement("ul",{className:"items-list-wrap",ref:"itemsListWrap"},r.createElement(m,{id:"about",isActive:"about"===this.props.type,label:(0,h.translateString)("About"),link:s.LinksContext._currentValue.profile.about}),r.createElement(m,{id:"media",isActive:"media"===this.props.type,label:(0,h.translateString)("Media"),link:s.LinksContext._currentValue.profile.media}),s.MemberContext._currentValue.can.saveMedia?r.createElement(m,{id:"playlists",isActive:"playlists"===this.props.type,label:(0,h.translateString)("Playlists"),link:s.LinksContext._currentValue.profile.playlists}):null,l.PageStore.get("config-options").pages.profile.includeHistory&&this.userIsAuthor?r.createElement(m,{id:"history",isActive:"history"===this.props.type,label:l.PageStore.get("config-enabled").pages.history.title,link:s.LinksContext._currentValue.user.history}):null,l.PageStore.get("config-options").pages.profile.includeLikedMedia&&this.userIsAuthor?r.createElement(m,{id:"liked",isActive:"liked"===this.props.type,label:l.PageStore.get("config-enabled").pages.liked.title,link:s.LinksContext._currentValue.user.liked}):null,r.createElement("li",{className:"media-search"},r.createElement(f,{onQueryChange:this.props.onQueryChange,toggleSearchField:this.onToggleSearchField}))),this.state.displayNext?this.nextBtn:null))}}function v(e){let t=e.link;return window.MediaCMS.site.devEnv&&(t="/edit-channel.html"),r.createElement("a",{href:t,className:"edit-channel",title:"Add banner"},"ADD BANNER")}function y(e){let t=e.link;return window.MediaCMS.site.devEnv&&(t="/edit-channel.html"),r.createElement("a",{href:t,className:"edit-channel",title:"Edit banner"},"EDIT BANNER")}function b(e){let t=e.link;return window.MediaCMS.site.devEnv&&(t="/edit-profile.html"),r.createElement("a",{href:t,className:"edit-profile",title:"Edit profile"},"EDIT PROFILE")}function E(e){const[t,n,i]=(0,a.usePopup)(),o=(0,r.useRef)(null),d=(0,r.useRef)(null),[h,f]=(0,r.useState)(!1),m={profileNavTop:0},E=!s.MemberContext._currentValue.is.anonymous&&s.MemberContext._currentValue.is.admin,S=!s.MemberContext._currentValue.is.anonymous&&l.ProfilePageStore.get("author-data").username===s.MemberContext._currentValue.username,w=S||!s.MemberContext._currentValue.is.anonymous&&s.MemberContext._currentValue.can.editProfile,_=E||S||!s.MemberContext._currentValue.is.anonymous&&s.MemberContext._currentValue.can.deleteProfile;function k(){m.profileHeaderTop=o.current.offsetTop,m.profileNavTop=m.profileHeaderTop+o.current.offsetHeight-d.current.refs.tabsNav.offsetHeight}function C(){f(m.profileHeaderTop+window.scrollY>m.profileNavTop)}function P(e){setTimeout((function(){c.PageActions.addNotification("Profile removed. Redirecting...","profileDelete"),setTimeout((function(){window.location.href=s.SiteContext._currentValue.url}),2e3)}),100),void 0!==e&&p.info("Removed user's profile '"+e+'"')}function x(e){setTimeout((function(){c.PageActions.addNotification("Profile removal failed","profileDeleteFail")}),100),void 0!==e&&p.info('Profile "'+e+'" removal failed')}function A(){k(),C()}function M(){C()}return(0,r.useEffect)((()=>(_&&(l.ProfilePageStore.on("profile_delete",P),l.ProfilePageStore.on("profile_delete_fail",x)),l.PageStore.on("resize",A),l.PageStore.on("changed_page_sidebar_visibility",A),l.PageStore.on("window_scroll",M),k(),C(),()=>{_&&(l.ProfilePageStore.removeListener("profile_delete",P),l.ProfilePageStore.removeListener("profile_delete_fail",x)),l.PageStore.removeListener("resize",A),l.PageStore.removeListener("changed_page_sidebar_visibility",A),l.PageStore.removeListener("window_scroll",M)})),[]),r.createElement("div",{ref:o,className:"profile-page-header"+(h?" fixed-nav":"")},r.createElement("span",{className:"profile-banner-wrap"},e.author.banner_thumbnail_url?r.createElement("span",{className:"profile-banner",style:{backgroundImage:"url("+s.SiteContext._currentValue.url+"/"+e.author.banner_thumbnail_url.replace(/^\//g,"")+")"}}):null,_?r.createElement("span",{className:"delete-profile-wrap"},r.createElement(i,{contentRef:t},r.createElement("button",{className:"delete-profile",title:""},"REMOVE PROFILE")),r.createElement(n,{contentRef:t},r.createElement(u.PopupMain,null,r.createElement("div",{className:"popup-message"},r.createElement("span",{className:"popup-message-title"},"Profile removal"),r.createElement("span",{className:"popup-message-main"},"You're willing to remove profile permanently?")),r.createElement("hr",null),r.createElement("span",{className:"popup-message-bottom"},r.createElement("button",{className:"button-link cancel-profile-removal",onClick:function(){t.current.toggle()}},"CANCEL"),r.createElement("button",{className:"button-link proceed-profile-removal",onClick:function(){c.ProfilePageActions.remove_profile(),t.current.toggle()}},"PROCEED"))))):null,w?e.author.banner_thumbnail_url?r.createElement(y,{link:l.ProfilePageStore.get("author-data").default_channel_edit_url}):r.createElement(v,{link:l.ProfilePageStore.get("author-data").default_channel_edit_url}):null),r.createElement("div",{className:"profile-info-nav-wrap"},e.author.thumbnail_url||e.author.name?r.createElement("div",{className:"profile-info"},r.createElement("div",{className:"profile-info-inner"},r.createElement("div",null,e.author.thumbnail_url?r.createElement("img",{src:e.author.thumbnail_url,alt:""}):null),r.createElement("div",null,e.author.name?r.createElement("h1",null,e.author.name):null,w?r.createElement(b,{link:l.ProfilePageStore.get("author-data").edit_url}):null))):null,r.createElement(g,{ref:d,type:e.type,onQueryChange:e.onQueryChange})))}g.propTypes={type:o().string.isRequired,onQueryChange:o().func},E.propTypes={author:o().object.isRequired,type:o().string.isRequired,onQueryChange:o().func},E.defaultProps={type:"media"}},1254:function(e,t,n){"use strict";n.d(t,{z:function(){return w}});var r=n(9471),i=n(7460),o=n(5338),a=n(1838),s=n(8790),l=n(285),c=n(7664);function u(e,t,n){let r,i=[];for(n=!!n,r=0;rwindow.innerHeight-98,n=()=>a(t()),[o,a]=(0,r.useState)(t());return(0,r.useEffect)((()=>(i.PageStore.on("window_resize",n),()=>i.PageStore.removeListener("window_resize",n)))),r.createElement("div",{className:"search-predictions-list",style:{maxHeight:o+"px"}},e.children||null)}function h(e){const t=(0,r.useRef)(null);function n(t){let n;switch(t.keyCode||t.charCode){case 13:i();break;case 38:n=e.itemsDomArray(e.previousIndex);break;case 40:n=e.itemsDomArray(e.nextIndex)}void 0!==n&&(n.focus(),t.preventDefault(),t.stopPropagation())}function i(){e.onSelect instanceof Function&&e.onSelect(e.value)}return(0,r.useEffect)((()=>{e.onPredictionItemLoad(e.index,t.current)})),r.createElement("div",{ref:t,tabIndex:"0",className:"search-predictions-item",onFocus:function(e){e.target.onkeydown=n},onBlur:function(e){e.target.onkeydown=null},onClick:i},r.createElement("span",{dangerouslySetInnerHTML:{__html:e.children||""}}))}function p(e){const t=(0,r.useRef)(null),n=(0,r.useRef)(null),[p,f,m]=(0,o.usePopup)(),[g,v]=(0,r.useState)([]),[y,b]=(0,r.useState)([]),[E,S]=(0,r.useState)(i.SearchFieldStore.get("search-query")),{visibleMobileSearch:w}=(0,o.useLayout)();function _(e){return-1===e?t.current:g[e]}function k(e){let t=!1;switch(e.keyCode||e.charCode){case 38:t=_(y.length-1);break;case 40:t=_(0)}t&&(t.focus(),e.preventDefault(),e.stopPropagation())}function C(e){b([]),S(e),setTimeout((function(){n.current.submit()}),50)}function P(e,t){const n=g;n[e]=t,v(n)}function x(e,t){let n,i,o,a,s,l,c,d=[];if(e){for(o=[],n=0;n=0;)a=a.substring(0,s[i])+""+a.substring(s[i],s[i]+e.length)+""+a.substring(s[i]+e.length),i--;o.push([t[n],a]),n+=1}for(n=0;n{w&&t.current.focus()}),[w]),(0,r.useEffect)((()=>{y.length?(t.current.onkeydown=t.current.onkeydown||k,p.current.tryToShow()):(t.current.onkeydown=null,p.current.tryToHide())}),[y]),(0,r.useEffect)((()=>(i.SearchFieldStore.on("load_predictions",x),()=>{i.SearchFieldStore.removeListener("load_predictions",x)})),[]),r.createElement("div",{className:"search-field-wrap"},r.createElement("div",null,r.createElement("form",{ref:n,method:"get",action:s.LinksContext._currentValue.search.base,autoComplete:"off",onSubmit:function(e){""===t.current.value.trim()&&(e.preventDefault(),e.stopPropagation())}},r.createElement("div",null,r.createElement("div",{className:"text-field-wrap"},r.createElement("input",{ref:t,type:"text",placeholder:(0,a.translateString)("Search"),"aria-label":"Search",name:"q",value:E,onChange:function(e){let t=e.target.value;t="string"!=typeof t?t.toString():t,S(t),""!==t.trim()&&l.SearchFieldActions.requestPredictions(t.trim())},onFocus:function(){y.length&&(t.current.onkeydown=t.current.onkeydown||k)},onBlur:function(){t.current.onkeydown=null}}),r.createElement(f,{contentRef:p,hideCallback:function(){b([])}},r.createElement(c.PopupMain,null,r.createElement(d,null,y)))),r.createElement("button",{type:"submit","aria-label":"Search"},r.createElement(c.MaterialIcon,{type:"search"}))))))}function f(){const{currentThemeMode:e,changeThemeMode:t}=(0,o.useTheme)(),n=(0,r.useRef)(null);return r.createElement("div",{className:"theme-switch",tabIndex:0,onKeyPress:function(e){0===e.keyCode&&t()},onClick:function(e){e.target!==n.current&&t()}},r.createElement("span",null,"Dark Theme"),r.createElement("span",null,r.createElement("label",{className:"checkbox-label right-selectbox"},r.createElement("span",{className:"checkbox-switcher-wrap"},r.createElement("span",{className:"checkbox-switcher"},r.createElement("input",{ref:n,type:"checkbox",tabIndex:-1,checked:"dark"===e,onChange:function(e){e.stopPropagation(),t()}}))))))}function m(e,t,n){const i={main:null};if(e.is.anonymous)i.main=r.createElement("div",null,r.createElement(c.PopupMain,null,r.createElement(c.NavigationMenuList,{items:t.middle})));else{const o=[];function a(e,t){t.length&&(o.length&&o.push(r.createElement("hr",{key:e+"-nav-seperator"})),o.push(r.createElement(c.NavigationMenuList,{key:e+"-nav",items:t})))}a("top",t.top),a("middle",t.middle),a("bottom",t.bottom),i.main=r.createElement("div",null,r.createElement(c.PopupTop,null,r.createElement("a",{className:"user-menu-top-link",href:e.pages.about,title:e.username},r.createElement("span",null,r.createElement(c.UserThumbnail,{size:"medium"})),r.createElement("span",null,r.createElement("span",{className:"username"},e?.name||e?.email||e?.username||"User")))),o.length?r.createElement(c.PopupMain,null,o):null)}return n&&(i["switch-theme"]=r.createElement("div",null,r.createElement(c.PopupTop,null,r.createElement("div",null,r.createElement("span",null,r.createElement(c.CircleIconButton,{className:"menu-item-icon change-page","data-page-id":"main","aria-label":"Switch theme"},r.createElement("i",{className:"material-icons"},"arrow_back"))),r.createElement("span",null,"Switch theme"))),r.createElement(c.PopupMain,null,r.createElement(f,null)))),i}function g(e){let{user:t,links:n}=e;return!t.is.anonymous&&t.can.addMedia?r.createElement("div",{className:"hidden-only-in-small"},r.createElement(c.CircleIconButton,{type:"link",href:n.user.addMedia,title:"Upload media"},r.createElement(c.MaterialIcon,{type:"video_call"}),r.createElement("span",{className:"hidden-txt"},"Upload media"))):null}function v(e){let{user:t,link:n,hasHeaderThemeSwitcher:i}=e;return t.is.anonymous&&t.can.login?r.createElement("div",{className:"sign-in-wrap"},r.createElement("a",{href:n,rel:"noffolow",className:"button-link sign-in"+(i?" hidden-only-in-small":" hidden-only-in-extra-small"),title:(0,a.translateString)("Sign in")},(0,a.translateString)("Sign in"))):null}function y(e){let{user:t,link:n,hasHeaderThemeSwitcher:i}=e;return t.is.anonymous&&t.can.register?r.createElement("div",{className:"register-wrap"},r.createElement("a",{href:n,className:"button-link register-link"+(i?" hidden-only-in-small":" hidden-only-in-extra-small"),title:(0,a.translateString)("Register")},(0,a.translateString)("Register"))):null}function b(e){const{toggleMobileSearch:t}=(0,o.useLayout)(),[n,a,l]=(0,o.usePopup)();return r.createElement(s.HeaderConsumer,null,(e=>r.createElement(s.MemberConsumer,null,(o=>r.createElement(s.LinksConsumer,null,(s=>r.createElement("div",{className:"page-header-right"},r.createElement("div",null,r.createElement("div",{className:"mobile-search-toggle"},r.createElement(c.CircleIconButton,{onClick:t,"aria-label":"Search"},r.createElement(c.MaterialIcon,{type:"search"}))),r.createElement(g,{user:o,links:s}),r.createElement("div",{className:(o.is.anonymous?"user-options":"user-thumb")+(!o.is.anonymous||e.hasThemeSwitcher?"":" visible-only-in-extra-small")},r.createElement(l,{contentRef:n},o.is.anonymous?r.createElement(c.CircleIconButton,{"aria-label":"Settings"},r.createElement(c.MaterialIcon,{type:"more_vert"})):r.createElement(c.UserThumbnail,{size:"small",isButton:!0})),r.createElement(a,{contentRef:n},r.createElement(c.NavigationContentApp,{initPage:"main",pages:m(o,e.popupNavItems,e.hasThemeSwitcher),pageChangeSelector:".change-page",pageIdSelectorAttr:"data-page-id"}))),r.createElement(v,{user:o,link:s.signin,hasHeaderThemeSwitcher:e.hasThemeSwitcher}),r.createElement(y,{user:o,link:s.register,hasHeaderThemeSwitcher:e.hasThemeSwitcher}),i.PageStore.get("config-contents").header.right?r.createElement("div",{className:"on-header-right",dangerouslySetInnerHTML:{__html:i.PageStore.get("config-contents").header.right}}):null))))))))}const E=e=>{let{src:t,loading:n="lazy",title:i,alt:o,href:a="#"}=e;return t?r.createElement("div",{className:"logo"},r.createElement("a",{href:a,title:i},r.createElement("span",null,r.createElement("img",{src:t,alt:o||i,title:i,loading:n})))):null};function S(){const{logo:e}=(0,o.useTheme)(),{enabledSidebar:t,toggleMobileSearch:n,toggleSidebar:a}=(0,o.useLayout)();return r.createElement(s.SiteConsumer,null,(o=>r.createElement(s.LinksConsumer,null,(s=>r.createElement("div",{className:"page-header-left"},r.createElement("div",null,r.createElement("div",{className:"close-search-field"},r.createElement(c.CircleIconButton,{onClick:n},r.createElement("i",{className:"material-icons"},"arrow_back"))),t?r.createElement("div",{className:"toggle-sidebar"},r.createElement(c.CircleIconButton,{onClick:a},r.createElement("i",{className:"material-icons"},"menu"))):null,r.createElement(E,{src:e,href:s.home,title:o.title}),i.PageStore.get("config-contents").header.onLogoRight?r.createElement("div",{className:"on-logo-right",dangerouslySetInnerHTML:{__html:i.PageStore.get("config-contents").header.onLogoRight}}):null))))))}function w(e){const{isAnonymous:t}=(0,o.useUser)(),{visibleMobileSearch:n}=(0,o.useLayout)();return(0,r.useEffect)((()=>{!function(){function e(){const e=this.parentNode;(0,a.addClassname)(e,"hiding"),setTimeout(function(){e&&e.parentNode&&e.parentNode.removeChild(e)}.bind(this),400)}setTimeout(function(){const t=document.querySelectorAll(".alert.alert-dismissible .close");let n;if(t.length)for(n=0;n(()=>{"use strict";var __webpack_modules__=[,(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.UNSUPPORTED_FEATURES=t.TextRenderingMode=t.RenderingIntentFlag=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.LINE_FACTOR=t.LINE_DESCENT_FACTOR=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FeatureTest=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.BASELINE_FACTOR=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMode=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationEditorType=t.AnnotationEditorPrefix=t.AnnotationEditorParamsType=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.assert=function(e,t){e||o(t)},t.bytesToString=function(e){"object"==typeof e&&null!==e&&void 0!==e.length||o("Invalid argument for bytesToString");const t=e.length,n=8192;if(t=2&&(e=`http://${e}`)}if(n.tryConvertEncoding)try{e=h(e)}catch(e){}}const r=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r))return r}catch(e){}return null},t.getModificationDate=function(e=new Date){return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getVerbosityLevel=function(){return r},t.info=function(e){r>=n.INFOS&&console.log(`Info: ${e}`)},t.isArrayBuffer=function(e){return"object"==typeof e&&null!==e&&void 0!==e.byteLength},t.isArrayEqual=function(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=l,t.stringToPDFString=function(e){if(e[0]>="ï"){let t;if("þ"===e[0]&&"ÿ"===e[1]?t="utf-16be":"ÿ"===e[0]&&"þ"===e[1]?t="utf-16le":"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t)try{const n=new TextDecoder(t,{fatal:!0}),r=l(e);return n.decode(r)}catch(e){i(`stringToPDFString: "${e}".`)}}const t=[];for(let n=0,r=e.length;n=n.WARNINGS&&console.log(`Warning: ${e}`)}function o(e){throw new Error(e)}function a(e,t,n,r=!1){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!0,writable:!1}),n}const s=function(){function e(t,n){this.constructor===e&&o("Cannot initialize BaseException."),this.message=t,this.name=n}return e.prototype=new Error,e.constructor=e,e}();function l(e){"string"!=typeof e&&o("Invalid argument for stringToBytes");const t=e.length,n=new Uint8Array(t);for(let r=0;re.toString(16).padStart(2,"0")));class u{static makeHexColor(e,t,n){return`#${c[e]}${c[t]}${c[n]}`}static scaleMinMax(e,t){let n;e[0]?(e[0]<0&&(n=t[0],t[0]=t[1],t[1]=n),t[0]*=e[0],t[1]*=e[0],e[3]<0&&(n=t[2],t[2]=t[3],t[3]=n),t[2]*=e[3],t[3]*=e[3]):(n=t[0],t[0]=t[2],t[2]=n,n=t[1],t[1]=t[3],t[3]=n,e[1]<0&&(n=t[2],t[2]=t[3],t[3]=n),t[2]*=e[1],t[3]*=e[1],e[2]<0&&(n=t[0],t[0]=t[1],t[1]=n),t[0]*=e[2],t[1]*=e[2]),t[0]+=e[4],t[1]+=e[4],t[2]+=e[5],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){const n=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/n,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/n]}static getAxialAlignedBoundingBox(e,t){const n=u.applyTransform(e,t),r=u.applyTransform(e.slice(2,4),t),i=u.applyTransform([e[0],e[3]],t),o=u.applyTransform([e[2],e[1]],t);return[Math.min(n[0],r[0],i[0],o[0]),Math.min(n[1],r[1],i[1],o[1]),Math.max(n[0],r[0],i[0],o[0]),Math.max(n[1],r[1],i[1],o[1])]}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){const t=[e[0],e[2],e[1],e[3]],n=e[0]*t[0]+e[1]*t[2],r=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],o=e[2]*t[1]+e[3]*t[3],a=(n+o)/2,s=Math.sqrt((n+o)**2-4*(n*o-i*r))/2,l=a+s||1,c=a-s||1;return[Math.sqrt(l),Math.sqrt(c)]}static normalizeRect(e){const t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){const n=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),r=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(n>r)return null;const i=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),o=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return i>o?null:[n,i,r,o]}static bezierBoundingBox(e,t,n,r,i,o,a,s){const l=[],c=[[],[]];let u,d,h,p,f,m,g,v;for(let c=0;c<2;++c)if(0===c?(d=6*e-12*n+6*i,u=-3*e+9*n-9*i+3*a,h=3*n-3*e):(d=6*t-12*r+6*o,u=-3*t+9*r-9*o+3*s,h=3*r-3*t),Math.abs(u)<1e-12){if(Math.abs(d)<1e-12)continue;p=-h/d,0{Object.defineProperty(exports,"__esModule",{value:!0}),exports.build=exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,exports.getDocument=getDocument,exports.version=void 0;var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(3),_display_utils=__w_pdfjs_require__(6),_font_loader=__w_pdfjs_require__(9),_canvas=__w_pdfjs_require__(11),_worker_options=__w_pdfjs_require__(14),_is_node=__w_pdfjs_require__(10),_message_handler=__w_pdfjs_require__(15),_metadata=__w_pdfjs_require__(16),_optional_content_config=__w_pdfjs_require__(17),_transport_stream=__w_pdfjs_require__(18),_xfa_text=__w_pdfjs_require__(19);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100;let DefaultCanvasFactory=_display_utils.DOMCanvasFactory;exports.DefaultCanvasFactory=DefaultCanvasFactory;let DefaultCMapReaderFactory=_display_utils.DOMCMapReaderFactory;exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory;let DefaultStandardFontDataFactory=_display_utils.DOMStandardFontDataFactory,createPDFNetworkStream;if(exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory,_is_node.isNodeJS){const{NodeCanvasFactory:e,NodeCMapReaderFactory:t,NodeStandardFontDataFactory:n}=__w_pdfjs_require__(20);exports.DefaultCanvasFactory=DefaultCanvasFactory=e,exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory=t,exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory=n}if(_is_node.isNodeJS){const{PDFNodeStream:e}=__w_pdfjs_require__(21);createPDFNetworkStream=t=>new e(t)}else{const{PDFNetworkStream:e}=__w_pdfjs_require__(24),{PDFFetchStream:t}=__w_pdfjs_require__(25);createPDFNetworkStream=n=>(0,_display_utils.isValidFetchUrl)(n.url)?new t(n):new e(n)}function getDocument(e){if("string"==typeof e||e instanceof URL)e={url:e};else if((0,_util.isArrayBuffer)(e))e={data:e};else if(e instanceof PDFDataRangeTransport)(0,_display_utils.deprecated)("`PDFDataRangeTransport`-instance, please use a parameter object with `range`-property instead."),e={range:e};else if("object"!=typeof e)throw new Error("Invalid parameter in getDocument, need either string, URL, TypedArray, or parameter object.");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const t=new PDFDocumentLoadingTask,n=e.url?getUrlProp(e.url):null,r=e.data?getDataProp(e.data):null,i=e.httpHeaders||null,o=!0===e.withCredentials,a=e.password??null,s=e.range instanceof PDFDataRangeTransport?e.range:null,l=Number.isInteger(e.rangeChunkSize)&&e.rangeChunkSize>0?e.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let c=e.worker instanceof PDFWorker?e.worker:null;const u=e.verbosity,d="string"!=typeof e.docBaseUrl||(0,_display_utils.isDataScheme)(e.docBaseUrl)?null:e.docBaseUrl,h="string"==typeof e.cMapUrl?e.cMapUrl:null,p=!1!==e.cMapPacked,f=e.CMapReaderFactory||DefaultCMapReaderFactory,m="string"==typeof e.standardFontDataUrl?e.standardFontDataUrl:null,g=e.StandardFontDataFactory||DefaultStandardFontDataFactory,v=!0!==e.stopAtErrors,y=Number.isInteger(e.maxImageSize)&&e.maxImageSize>-1?e.maxImageSize:-1,b=!1!==e.isEvalSupported,E="boolean"==typeof e.isOffscreenCanvasSupported?e.isOffscreenCanvasSupported:!_is_node.isNodeJS,S="boolean"==typeof e.disableFontFace?e.disableFontFace:_is_node.isNodeJS,w=!0===e.fontExtraProperties,_=!0===e.enableXfa,k=e.ownerDocument||globalThis.document,C=!0===e.disableRange,P=!0===e.disableStream,x=!0===e.disableAutoFetch,A=!0===e.pdfBug,M=s?s.length:e.length??NaN,T="boolean"==typeof e.useSystemFonts?e.useSystemFonts:!_is_node.isNodeJS&&!S,R="boolean"==typeof e.useWorkerFetch?e.useWorkerFetch:f===_display_utils.DOMCMapReaderFactory&&g===_display_utils.DOMStandardFontDataFactory&&(0,_display_utils.isValidFetchUrl)(h,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(m,document.baseURI);(0,_util.setVerbosityLevel)(u);const O=R?null:{cMapReaderFactory:new f({baseUrl:h,isCompressed:p}),standardFontDataFactory:new g({baseUrl:m})};if(!c){const e={verbosity:u,port:_worker_options.GlobalWorkerOptions.workerPort};c=e.port?PDFWorker.fromPort(e):new PDFWorker(e),t._worker=c}const I=t.docId,D={docId:I,apiVersion:"3.4.120",data:r,password:a,disableAutoFetch:x,rangeChunkSize:l,length:M,docBaseUrl:d,enableXfa:_,evaluatorOptions:{maxImageSize:y,disableFontFace:S,ignoreErrors:v,isEvalSupported:b,isOffscreenCanvasSupported:E,fontExtraProperties:w,useSystemFonts:T,cMapUrl:R?h:null,standardFontDataUrl:R?m:null}},L={ignoreErrors:v,isEvalSupported:b,disableFontFace:S,fontExtraProperties:w,enableXfa:_,ownerDocument:k,disableAutoFetch:x,pdfBug:A,styleElement:null};return c.promise.then((function(){if(t.destroyed)throw new Error("Loading aborted");const e=_fetchDocument(c,D),a=new Promise((function(e){let t;s?t=new _transport_stream.PDFDataTransportStream({length:M,initialData:s.initialData,progressiveDone:s.progressiveDone,contentDispositionFilename:s.contentDispositionFilename,disableRange:C,disableStream:P},s):r||(t=createPDFNetworkStream({url:n,length:M,httpHeaders:i,withCredentials:o,rangeChunkSize:l,disableRange:C,disableStream:P})),e(t)}));return Promise.all([e,a]).then((function([e,n]){if(t.destroyed)throw new Error("Loading aborted");const r=new _message_handler.MessageHandler(I,e,c.port),i=new WorkerTransport(r,t,n,L,O);t._transport=i,r.send("Ready",null)}))})).catch(t._capability.reject),t}async function _fetchDocument(e,t){if(e.destroyed)throw new Error("Worker was destroyed");const n=await e.messageHandler.sendWithPromise("GetDocRequest",t,t.data?[t.data.buffer]:null);if(e.destroyed)throw new Error("Worker was destroyed");return n}function getUrlProp(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch(t){if(_is_node.isNodeJS&&"string"==typeof e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(e){if(_is_node.isNodeJS&&void 0!==Buffer&&e instanceof Buffer)return(0,_display_utils.deprecated)("Please provide binary data as `Uint8Array`, rather than `Buffer`."),new Uint8Array(e);if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if("string"==typeof e)return(0,_util.stringToBytes)(e);if("object"==typeof e&&!isNaN(e?.length)||(0,_util.isArrayBuffer)(e))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}class PDFDocumentLoadingTask{static#e=0;#t=null;constructor(){this._capability=(0,_util.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+PDFDocumentLoadingTask.#e++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get onUnsupportedFeature(){return this.#t}set onUnsupportedFeature(e){(0,_display_utils.deprecated)("The PDFDocumentLoadingTask onUnsupportedFeature property will be removed in the future."),this.#t=e}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0,await(this._transport?.destroy()),this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(e,t,n=!1,r=null){this.length=e,this.initialData=t,this.progressiveDone=n,this.contentDispositionFilename=r,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=(0,_util.createPromiseCapability)()}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const n of this._rangeListeners)n(e,t)}onDataProgress(e,t){this._readyCapability.promise.then((()=>{for(const n of this._progressListeners)n(e,t)}))}onDataProgressiveRead(e){this._readyCapability.promise.then((()=>{for(const t of this._progressiveReadListeners)t(e)}))}onDataProgressiveDone(){this._readyCapability.promise.then((()=>{for(const e of this._progressiveDoneListeners)e()}))}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e,this._transport=t}get annotationStorage(){return this._transport.annotationStorage}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJavaScript(){return this._transport.getJavaScript()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(e=!1){return this._transport.startCleanup(e||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{constructor(e,t,n,r,i=!1){this._pageIndex=e,this._pageInfo=t,this._ownerDocument=r,this._transport=n,this._stats=i?new _display_utils.StatTimer:null,this._pdfBug=i,this.commonObjs=n.commonObjs,this.objs=new PDFObjects,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:e,rotation:t=this.rotate,offsetX:n=0,offsetY:r=0,dontFlip:i=!1}={}){return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:n,offsetY:r,dontFlip:i})}getAnnotations({intent:e="display"}={}){const t=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,t.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext:e,viewport:t,intent:n="display",annotationMode:r=_util.AnnotationMode.ENABLE,transform:i=null,canvasFactory:o=null,background:a=null,optionalContentConfigPromise:s=null,annotationCanvasMap:l=null,pageColors:c=null,printAnnotationStorage:u=null}){this._stats?.time("Overall");const d=this._transport.getRenderingIntent(n,r,u);this.pendingCleanup=!1,s||(s=this._transport.getOptionalContentConfig());let h=this._intentStates.get(d.cacheKey);h||(h=Object.create(null),this._intentStates.set(d.cacheKey,h)),h.streamReaderCancelTimeout&&(clearTimeout(h.streamReaderCancelTimeout),h.streamReaderCancelTimeout=null);const p=o||new DefaultCanvasFactory({ownerDocument:this._ownerDocument}),f=!!(d.renderingIntent&_util.RenderingIntentFlag.PRINT);h.displayReadyCapability||(h.displayReadyCapability=(0,_util.createPromiseCapability)(),h.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(d));const m=e=>{h.renderTasks.delete(g),(this.cleanupAfterRender||f)&&(this.pendingCleanup=!0),this._tryCleanup(),e?(g.capability.reject(e),this._abortOperatorList({intentState:h,reason:e instanceof Error?e:new Error(e)})):g.capability.resolve(),this._stats?.timeEnd("Rendering"),this._stats?.timeEnd("Overall")},g=new InternalRenderTask({callback:m,params:{canvasContext:e,viewport:t,transform:i,background:a},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:h.operatorList,pageIndex:this._pageIndex,canvasFactory:p,useRequestAnimationFrame:!f,pdfBug:this._pdfBug,pageColors:c});(h.renderTasks||=new Set).add(g);const v=g.task;return Promise.all([h.displayReadyCapability.promise,s]).then((([e,t])=>{this.pendingCleanup?m():(this._stats?.time("Rendering"),g.initializeGraphics({transparency:e,optionalContentConfig:t}),g.operatorListChanged())})).catch(m),v}getOperatorList({intent:e="display",annotationMode:t=_util.AnnotationMode.ENABLE,printAnnotationStorage:n=null}={}){const r=this._transport.getRenderingIntent(e,t,n,!0);let i,o=this._intentStates.get(r.cacheKey);return o||(o=Object.create(null),this._intentStates.set(r.cacheKey,o)),o.opListReadCapability||(i=Object.create(null),i.operatorListChanged=function(){o.operatorList.lastChunk&&(o.opListReadCapability.resolve(o.operatorList),o.renderTasks.delete(i))},o.opListReadCapability=(0,_util.createPromiseCapability)(),(o.renderTasks||=new Set).add(i),o.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(r)),o.opListReadCapability.promise}streamTextContent({disableCombineTextItems:e=!1,includeMarkedContent:t=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,combineTextItems:!0!==e,includeMarkedContent:!0===t},{highWaterMark:100,size(e){return e.items.length}})}getTextContent(e={}){if(this._transport._htmlForXfa)return this.getXfa().then((e=>_xfa_text.XfaText.textContent(e)));const t=this.streamTextContent(e);return new Promise((function(e,n){const r=t.getReader(),i={items:[],styles:Object.create(null)};!function t(){r.read().then((function({value:n,done:r}){r?e(i):(Object.assign(i.styles,n.styles),i.items.push(...n.items),t())}),n)}()}))}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const n of t.renderTasks)e.push(n.completed),n.cancel();return this.objs.clear(),this.pendingCleanup=!1,Promise.all(e)}cleanup(e=!1){return this.pendingCleanup=!0,this._tryCleanup(e)}_tryCleanup(e=!1){if(!this.pendingCleanup)return!1;for(const{renderTasks:e,operatorList:t}of this._intentStates.values())if(e.size>0||!t.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),e&&this._stats&&(this._stats=new _display_utils.StatTimer),this.pendingCleanup=!1,!0}_startRenderPage(e,t){const n=this._intentStates.get(t);n&&(this._stats?.timeEnd("Page Request"),n.displayReadyCapability?.resolve(e))}_renderPageChunk(e,t){for(let n=0,r=e.length;n{r.read().then((({value:e,done:t})=>{t?i.streamReader=null:this._transport.destroyed||(this._renderPageChunk(e,i),o())}),(e=>{if(i.streamReader=null,!this._transport.destroyed){if(i.operatorList){i.operatorList.lastChunk=!0;for(const e of i.renderTasks)e.operatorListChanged();this._tryCleanup()}if(i.displayReadyCapability)i.displayReadyCapability.reject(e);else{if(!i.opListReadCapability)throw e;i.opListReadCapability.reject(e)}}}))};o()}_abortOperatorList({intentState:e,reason:t,force:n=!1}){if(e.streamReader){if(e.streamReaderCancelTimeout&&(clearTimeout(e.streamReaderCancelTimeout),e.streamReaderCancelTimeout=null),!n){if(e.renderTasks.size>0)return;if(t instanceof _display_utils.RenderingCancelledException){let n=RENDERING_CANCELLED_TIMEOUT;return t.extraDelay>0&&t.extraDelay<1e3&&(n+=t.extraDelay),void(e.streamReaderCancelTimeout=setTimeout((()=>{e.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:e,reason:t,force:!0})}),n))}}if(e.streamReader.cancel(new _util.AbortException(t.message)).catch((()=>{})),e.streamReader=null,!this._transport.destroyed){for(const[t,n]of this._intentStates)if(n===e){this._intentStates.delete(t);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{#n=new Set;#r=Promise.resolve();postMessage(e,t){const n={data:structuredClone(e,t)};this.#r.then((()=>{for(const e of this.#n)e.call(this,n)}))}addEventListener(e,t){this.#n.add(t)}removeEventListener(e,t){this.#n.delete(t)}terminate(){this.#n.clear()}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_is_node.isNodeJS)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document){const e=document?.currentScript?.src;e&&(PDFWorkerUtil.fallbackWorkerSrc=e.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(e,t){let n;try{if(n=new URL(e),!n.origin||"null"===n.origin)return!1}catch(e){return!1}const r=new URL(t,n);return n.origin===r.origin},PDFWorkerUtil.createCDNWrapper=function(e){const t=`importScripts("${e}");`;return URL.createObjectURL(new Blob([t]))};class PDFWorker{static#i=new WeakMap;constructor({name:e=null,port:t=null,verbosity:n=(0,_util.getVerbosityLevel)()}={}){if(t&&PDFWorker.#i.has(t))throw new Error("Cannot use more than one PDFWorker per port.");if(this.name=e,this.destroyed=!1,this.verbosity=n,this._readyCapability=(0,_util.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,t)return PDFWorker.#i.set(t,this),void this._initializeFromPort(t);this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",(function(){})),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){let{workerSrc:e}=PDFWorker;try{PDFWorkerUtil.isSameOrigin(window.location.href,e)||(e=PDFWorkerUtil.createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e),n=new _message_handler.MessageHandler("main","worker",t),r=()=>{t.removeEventListener("error",i),n.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},i=()=>{this._webWorker||r()};t.addEventListener("error",i),n.on("test",(e=>{t.removeEventListener("error",i),this.destroyed?r():e?(this._messageHandler=n,this._port=t,this._webWorker=t,this._readyCapability.resolve(),n.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),n.destroy(),t.terminate())})),n.on("ready",(e=>{if(t.removeEventListener("error",i),this.destroyed)r();else try{o()}catch(e){this._setupFakeWorker()}}));const o=()=>{const e=new Uint8Array;n.send("test",e,[e.buffer])};return void o()}catch(e){(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then((e=>{if(this.destroyed)return void this._readyCapability.reject(new Error("Worker was destroyed"));const t=new LoopbackPort;this._port=t;const n="fake"+PDFWorkerUtil.fakeWorkerId++,r=new _message_handler.MessageHandler(n+"_worker",n,t);e.setup(r,t);const i=new _message_handler.MessageHandler(n,n+"_worker",t);this._messageHandler=i,this._readyCapability.resolve(),i.send("configure",{verbosity:this.verbosity})})).catch((e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))}))}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker.#i.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(!e?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return this.#i.has(e.port)?this.#i.get(e.port):new PDFWorker(e)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _is_node.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch(e){return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_is_node.isNodeJS){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}exports.PDFWorker=PDFWorker;class WorkerTransport{#o=new Map;#a=new Map;#s=new Map;constructor(e,t,n,r,i){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({onUnsupportedFeature:this._onUnsupportedFeature.bind(this),ownerDocument:r.ownerDocument,styleElement:r.styleElement}),this._params=r,this.cMapReaderFactory=i?.cMapReaderFactory,this.standardFontDataFactory=i?.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=n,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=(0,_util.createPromiseCapability)(),this.setupMessageHandler()}#l(e,t=null){const n=this.#o.get(e);if(n)return n;const r=this.messageHandler.sendWithPromise(e,t);return this.#o.set(e,r),r}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(e,t=_util.AnnotationMode.ENABLE,n=null,r=!1){let i=_util.RenderingIntentFlag.DISPLAY,o=null;switch(e){case"any":i=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":i=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)(`getRenderingIntent - invalid intent: ${e}`)}switch(t){case _util.AnnotationMode.DISABLE:i+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:i+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:i+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,o=(i&_util.RenderingIntentFlag.PRINT&&n instanceof _annotation_storage.PrintAnnotationStorage?n:this.annotationStorage).serializable;break;default:(0,_util.warn)(`getRenderingIntent - invalid annotationMode: ${t}`)}return r&&(i+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:i,cacheKey:`${i}_${_annotation_storage.AnnotationStorage.getHash(o)}`,annotationStorageMap:o}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,_util.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));const e=[];for(const t of this.#a.values())e.push(t._destroy());this.#a.clear(),this.#s.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);return e.push(t),Promise.all(e).then((()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#o.clear(),this._networkStream&&this._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()}),this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:e,loadingTask:t}=this;e.on("GetReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=()=>{this._fullReader.read().then((function({value:e,done:n}){n?t.close():((0,_util.assert)(e instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{this._fullReader.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}})),e.on("ReaderHeadersReady",(e=>{const n=(0,_util.createPromiseCapability)(),r=this._fullReader;return r.headersReady.then((()=>{r.isStreamingSupported&&r.isRangeSupported||(this._lastProgress&&t.onProgress?.(this._lastProgress),r.onProgress=e=>{t.onProgress?.({loaded:e.loaded,total:e.total})}),n.resolve({isStreamingSupported:r.isStreamingSupported,isRangeSupported:r.isRangeSupported,contentLength:r.contentLength})}),n.reject),n.promise})),e.on("GetRangeReader",((e,t)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const n=this._networkStream.getRangeReader(e.begin,e.end);n?(t.onPull=()=>{n.read().then((function({value:e,done:n}){n?t.close():((0,_util.assert)(e instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),t.enqueue(new Uint8Array(e),1,[e]))})).catch((e=>{t.error(e)}))},t.onCancel=e=>{n.cancel(e),t.ready.catch((e=>{if(!this.destroyed)throw e}))}):t.close()})),e.on("GetDoc",(({pdfInfo:e})=>{this._numPages=e.numPages,this._htmlForXfa=e.htmlForXfa,delete e.htmlForXfa,t._capability.resolve(new PDFDocumentProxy(e,this))})),e.on("DocException",(function(e){let n;switch(e.name){case"PasswordException":n=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":n=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":n=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":n=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":n=new _util.UnknownErrorException(e.message,e.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}t._capability.reject(n)})),e.on("PasswordRequest",(e=>{if(this._passwordCapability=(0,_util.createPromiseCapability)(),t.onPassword){const n=e=>{e instanceof Error?this._passwordCapability.reject(e):this._passwordCapability.resolve({password:e})};try{t.onPassword(n,e.code)}catch(e){this._passwordCapability.reject(e)}}else this._passwordCapability.reject(new _util.PasswordException(e.message,e.code));return this._passwordCapability.promise})),e.on("DataLoaded",(e=>{t.onProgress?.({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)})),e.on("StartRenderPage",(e=>{this.destroyed||this.#a.get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)})),e.on("commonobj",(([t,n,r])=>{if(!this.destroyed&&!this.commonObjs.has(t))switch(n){case"Font":const i=this._params;if("error"in r){const e=r.error;(0,_util.warn)(`Error during font loading: ${e}`),this.commonObjs.resolve(t,e);break}let o=null;i.pdfBug&&globalThis.FontInspector?.enabled&&(o={registerFont(e,t){globalThis.FontInspector.fontAdded(e,t)}});const a=new _font_loader.FontFaceObject(r,{isEvalSupported:i.isEvalSupported,disableFontFace:i.disableFontFace,ignoreErrors:i.ignoreErrors,onUnsupportedFeature:this._onUnsupportedFeature.bind(this),fontRegistry:o});this.fontLoader.bind(a).catch((n=>e.sendWithPromise("FontFallback",{id:t}))).finally((()=>{!i.fontExtraProperties&&a.data&&(a.data=null),this.commonObjs.resolve(t,a)}));break;case"FontPath":case"Image":this.commonObjs.resolve(t,r);break;default:throw new Error(`Got unknown common object type ${n}`)}})),e.on("obj",(([e,t,n,r])=>{if(this.destroyed)return;const i=this.#a.get(t);if(!i.objs.has(e))switch(n){case"Image":i.objs.resolve(e,r);const t=8e6;if(r){let e;if(r.bitmap){const{width:t,height:n}=r;e=t*n*4}else e=r.data?.length||0;e>t&&(i.cleanupAfterRender=!0)}break;case"Pattern":i.objs.resolve(e,r);break;default:throw new Error(`Got unknown object type ${n}`)}})),e.on("DocProgress",(e=>{this.destroyed||t.onProgress?.({loaded:e.loaded,total:e.total})})),e.on("UnsupportedFeature",this._onUnsupportedFeature.bind(this)),e.on("FetchBuiltInCMap",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(e):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.")))),e.on("FetchStandardFontData",(e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(e):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter."))))}_onUnsupportedFeature({featureId:e}){this.destroyed||this.loadingTask.onUnsupportedFeature?.(e)}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){return this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead."),this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:this.annotationStorage.serializable,filename:this._fullReader?.filename??null}).finally((()=>{this.annotationStorage.resetModified()}))}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,n=this.#s.get(t);if(n)return n;const r=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then((e=>{if(this.destroyed)throw new Error("Transport destroyed");const n=new PDFPageProxy(t,e,this,this._params.ownerDocument,this._params.pdfBug);return this.#a.set(t,n),n}));return this.#s.set(t,r),r}getPageIndex(e){return"object"!=typeof e||null===e||!Number.isInteger(e.num)||e.num<0||!Number.isInteger(e.gen)||e.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen})}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return this.#l("GetFieldObjects")}hasJSActions(){return this.#l("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getJavaScript(){return this.messageHandler.sendWithPromise("GetJavaScript",null)}getDocJSActions(){return this.messageHandler.sendWithPromise("GetDocJSActions",null)}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then((e=>new _optional_content_config.OptionalContentConfig(e)))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const e="GetMetadata",t=this.#o.get(e);if(t)return t;const n=this.messageHandler.sendWithPromise(e,null).then((e=>({info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null})));return this.#o.set(e,n),n}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(e=!1){if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of this.#a.values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),this.#o.clear()}}get loadingParams(){const{disableAutoFetch:e,enableXfa:t}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e,enableXfa:t})}}class PDFObjects{#c=Object.create(null);#u(e){return this.#c[e]||(this.#c[e]={capability:(0,_util.createPromiseCapability)(),data:null})}get(e,t=null){if(t){const n=this.#u(e);return n.capability.promise.then((()=>t(n.data))),null}const n=this.#c[e];if(!n?.capability.settled)throw new Error(`Requesting object that isn't resolved yet ${e}.`);return n.data}has(e){const t=this.#c[e];return t?.capability.settled||!1}resolve(e,t=null){const n=this.#u(e);n.data=t,n.capability.resolve()}clear(){for(const e in this.#c){const{data:t}=this.#c[e];t?.bitmap?.close()}this.#c=Object.create(null)}}class RenderTask{#d=null;constructor(e){this.#d=e,this.onContinue=null}get promise(){return this.#d.capability.promise}cancel(e=0){this.#d.cancel(null,e)}get separateAnnots(){const{separateAnnots:e}=this.#d.operatorList;if(!e)return!1;const{annotationCanvasMap:t}=this.#d;return e.form||e.canvas&&t?.size>0}}exports.RenderTask=RenderTask;class InternalRenderTask{static#h=new WeakSet;constructor({callback:e,params:t,objs:n,commonObjs:r,annotationCanvasMap:i,operatorList:o,pageIndex:a,canvasFactory:s,useRequestAnimationFrame:l=!1,pdfBug:c=!1,pageColors:u=null}){this.callback=e,this.params=t,this.objs=n,this.commonObjs=r,this.annotationCanvasMap=i,this.operatorListIdx=null,this.operatorList=o,this._pageIndex=a,this.canvasFactory=s,this._pdfBug=c,this.pageColors=u,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===l&&"undefined"!=typeof window,this.cancelled=!1,this.capability=(0,_util.createPromiseCapability)(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}get completed(){return this.capability.promise.catch((function(){}))}initializeGraphics({transparency:e=!1,optionalContentConfig:t}){if(this.cancelled)return;if(this._canvas){if(InternalRenderTask.#h.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");InternalRenderTask.#h.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{canvasContext:n,viewport:r,transform:i,background:o}=this.params;this.gfx=new _canvas.CanvasGraphics(n,this.commonObjs,this.objs,this.canvasFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:i,viewport:r,transparency:e,background:o}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(e=null,t=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this._canvas&&InternalRenderTask.#h.delete(this._canvas),this.callback(e||new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex+1}`,"canvas",t))}operatorListChanged(){this.graphicsReady?(this.stepper?.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame((()=>{this._nextBound().catch(this._cancelBound)})):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&InternalRenderTask.#h.delete(this._canvas),this.callback())))}}const version="3.4.120";exports.version=version;const build="af6414988";exports.build=build},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PrintAnnotationStorage=t.AnnotationStorage=void 0;var r=n(1),i=n(4),o=n(8);class a{#p=!1;#f=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){const n=this.#f.get(e);return void 0===n?t:Object.assign(t,n)}getRawValue(e){return this.#f.get(e)}remove(e){if(this.#f.delete(e),0===this.#f.size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const e of this.#f.values())if(e instanceof i.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(e,t){const n=this.#f.get(e);let r=!1;if(void 0!==n)for(const[e,i]of Object.entries(t))n[e]!==i&&(r=!0,n[e]=i);else r=!0,this.#f.set(e,t);r&&this.#m(),t instanceof i.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return this.#f.has(e)}getAll(){return this.#f.size>0?(0,r.objectFromMap)(this.#f):null}setAll(e){for(const[t,n]of Object.entries(e))this.setValue(t,n)}get size(){return this.#f.size}#m(){this.#p||(this.#p=!0,"function"==typeof this.onSetModified&&this.onSetModified())}resetModified(){this.#p&&(this.#p=!1,"function"==typeof this.onResetModified&&this.onResetModified())}get print(){return new s(this)}get serializable(){if(0===this.#f.size)return null;const e=new Map;for(const[t,n]of this.#f){const r=n instanceof i.AnnotationEditor?n.serialize():n;r&&e.set(t,r)}return e}static getHash(e){if(!e)return"";const t=new o.MurmurHash3_64;for(const[n,r]of e)t.update(`${n}:${JSON.stringify(r)}`);return t.hexdigest()}}t.AnnotationStorage=a;class s extends a{#g=null;constructor(e){super(),this.#g=structuredClone(e.serializable)}get print(){(0,r.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#g}}t.PrintAnnotationStorage=s},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditor=void 0;var r=n(5),i=n(1);class o{#v=this.focusin.bind(this);#y=this.focusout.bind(this);#b=!1;#E=!1;#S=!1;_uiManager=null;#w=o._zIndex++;static _colorManager=new r.ColorManager;static _zIndex=1;constructor(e){this.constructor===o&&(0,i.unreachable)("Cannot initialize AnnotationEditor."),this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager;const{rotation:t,rawDims:{pageWidth:n,pageHeight:r,pageX:a,pageY:s}}=this.parent.viewport;this.rotation=t,this.pageDimensions=[n,r],this.pageTranslation=[a,s];const[l,c]=this.parentDimensions;this.x=e.x/l,this.y=e.y/c,this.isAttachedToDOM=!1}static get _defaultLineColor(){return(0,i.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#w}setParent(e){null!==e&&(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions),this.parent=e}focusin(e){this.#b?this.#b=!1:this.parent.setSelected(this)}focusout(e){if(!this.isAttachedToDOM)return;const t=e.relatedTarget;t?.closest(`#${this.id}`)||(e.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}dragstart(e){const t=this.parent.div.getBoundingClientRect();this.startX=e.clientX-t.x,this.startY=e.clientY-t.y,e.dataTransfer.setData("text/plain",this.id),e.dataTransfer.effectAllowed="move"}setAt(e,t,n,r){const[i,o]=this.parentDimensions;[n,r]=this.screenToPageTranslation(n,r),this.x=(e+n)/i,this.y=(t+r)/o,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}translate(e,t){const[n,r]=this.parentDimensions;[e,t]=this.screenToPageTranslation(e,t),this.x+=e/n,this.y+=t/r,this.div.style.left=100*this.x+"%",this.div.style.top=100*this.y+"%"}screenToPageTranslation(e,t){switch(this.parentRotation){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return this._uiManager.viewParameters.rotation}get parentDimensions(){const{realScale:e}=this._uiManager.viewParameters,[t,n]=this.pageDimensions;return[t*e,n*e]}setDims(e,t){const[n,r]=this.parentDimensions;this.div.style.width=100*e/n+"%",this.div.style.height=100*t/r+"%"}fixDims(){const{style:e}=this.div,{height:t,width:n}=e,r=n.endsWith("%"),i=t.endsWith("%");if(r&&i)return;const[o,a]=this.parentDimensions;r||(e.width=100*parseFloat(n)/o+"%"),i||(e.height=100*parseFloat(t)/a+"%")}getInitialTranslation(){return[0,0]}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",this.#v),this.div.addEventListener("focusout",this.#y);const[e,t]=this.getInitialTranslation();return this.translate(e,t),(0,r.bindEvents)(this,this.div,["dragstart","pointerdown"]),this.div}pointerdown(e){const{isMac:t}=i.FeatureTest.platform;0!==e.button||e.ctrlKey&&t?e.preventDefault():(e.ctrlKey&&!t||e.shiftKey||e.metaKey&&t?this.parent.toggleSelected(this):this.parent.setSelected(this),this.#b=!0)}getRect(e,t){const n=this.parentScale,[r,i]=this.pageDimensions,[o,a]=this.pageTranslation,s=e/n,l=t/n,c=this.x*r,u=this.y*i,d=this.width*r,h=this.height*i;switch(this.rotation){case 0:return[c+s+o,i-u-l-h+a,c+s+d+o,i-u-l+a];case 90:return[c+l+o,i-u+s+a,c+l+h+o,i-u+s+d+a];case 180:return[c-s-d+o,i-u+l+a,c-s+o,i-u+l+h+a];case 270:return[c-l-h+o,i-u-s-d+a,c-l+o,i-u-s+a];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){const[n,r,i,o]=e,a=i-n,s=o-r;switch(this.rotation){case 0:return[n,t-o,a,s];case 90:return[n,t-r,s,a];case 180:return[i,t-r,a,s];case 270:return[i,t-o,s,a];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#S=!0}disableEditMode(){this.#S=!1}isInEditMode(){return this.#S}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){this.div?.addEventListener("focusin",this.#v)}serialize(){(0,i.unreachable)("An editor must be serializable")}static deserialize(e,t,n){const r=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:n});r.rotation=e.rotation;const[i,o]=r.pageDimensions,[a,s,l,c]=r.getRectInCurrentCoords(e.rect,o);return r.x=a/i,r.y=s/o,r.width=l/i,r.height=c/o,r}remove(){this.div.removeEventListener("focusin",this.#v),this.div.removeEventListener("focusout",this.#y),this.isEmpty()||this.commit(),this.parent.remove(this)}select(){this.div?.classList.add("selectedEditor")}unselect(){this.div?.classList.remove("selectedEditor")}updateParams(e,t){}disableEditing(){}enableEditing(){}get propertiesToUpdate(){return{}}get contentDiv(){return this.div}get isEditing(){return this.#E}set isEditing(e){this.#E=e,e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null)}}t.AnnotationEditor=o},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardManager=t.CommandManager=t.ColorManager=t.AnnotationEditorUIManager=void 0,t.bindEvents=function(e,t,n){for(const r of n)t.addEventListener(r,e[r].bind(e))},t.opacityToHex=function(e){return Math.round(Math.min(255,Math.max(1,255*e))).toString(16).padStart(2,"0")};var r=n(1),i=n(6);class o{#_=0;getId(){return`${r.AnnotationEditorPrefix}${this.#_++}`}}class a{#k=[];#C=!1;#P;#x=-1;constructor(e=128){this.#P=e}add({cmd:e,undo:t,mustExec:n,type:r=NaN,overwriteIfSameType:i=!1,keepUndo:o=!1}){if(n&&e(),this.#C)return;const a={cmd:e,undo:t,type:r};if(-1===this.#x)return this.#k.length>0&&(this.#k.length=0),this.#x=0,void this.#k.push(a);if(i&&this.#k[this.#x].type===r)return o&&(a.undo=this.#k[this.#x].undo),void(this.#k[this.#x]=a);const s=this.#x+1;s===this.#P?this.#k.splice(0,1):(this.#x=s,se===t[n])))return l._colorsMapping.get(e);return t}getHexCode(e){const t=this._colors.get(e);return t?r.Util.makeHexColor(...t):e}}t.ColorManager=l;class c{#M=null;#T=new Map;#R=new Map;#O=null;#I=new a;#D=0;#L=null;#F=new Set;#N=null;#j=new o;#B=!1;#U=r.AnnotationEditorType.NONE;#z=new Set;#V=this.copy.bind(this);#q=this.cut.bind(this);#H=this.paste.bind(this);#W=this.keydown.bind(this);#G=this.onEditingAction.bind(this);#$=this.onPageChanging.bind(this);#Y=this.onScaleChanging.bind(this);#K=this.onRotationChanging.bind(this);#X={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1};#Q=null;static _keyboardManager=new s([[["ctrl+a","mac+meta+a"],c.prototype.selectAll],[["ctrl+z","mac+meta+z"],c.prototype.undo],[["ctrl+y","ctrl+shift+Z","mac+meta+shift+Z"],c.prototype.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete"],c.prototype.delete],[["Escape","mac+Escape"],c.prototype.unselectAll]]);constructor(e,t,n){this.#Q=e,this.#N=t,this.#N._on("editingaction",this.#G),this.#N._on("pagechanging",this.#$),this.#N._on("scalechanging",this.#Y),this.#N._on("rotationchanging",this.#K),this.#O=n,this.viewParameters={realScale:i.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){this.#J(),this.#N._off("editingaction",this.#G),this.#N._off("pagechanging",this.#$),this.#N._off("scalechanging",this.#Y),this.#N._off("rotationchanging",this.#K);for(const e of this.#R.values())e.destroy();this.#R.clear(),this.#T.clear(),this.#F.clear(),this.#M=null,this.#z.clear(),this.#I.destroy()}onPageChanging({pageNumber:e}){this.#D=e-1}focusMainContainer(){this.#Q.focus()}addShouldRescale(e){this.#F.add(e)}removeShouldRescale(e){this.#F.delete(e)}onScaleChanging({scale:e}){this.commitOrRemove(),this.viewParameters.realScale=e*i.PixelsPerInch.PDF_TO_CSS_UNITS;for(const e of this.#F)e.onScaleChanging()}onRotationChanging({pagesRotation:e}){this.commitOrRemove(),this.viewParameters.rotation=e}addToAnnotationStorage(e){e.isEmpty()||!this.#O||this.#O.has(e.id)||this.#O.setValue(e.id,e)}#Z(){this.#Q.addEventListener("keydown",this.#W)}#J(){this.#Q.removeEventListener("keydown",this.#W)}#ee(){document.addEventListener("copy",this.#V),document.addEventListener("cut",this.#q),document.addEventListener("paste",this.#H)}#te(){document.removeEventListener("copy",this.#V),document.removeEventListener("cut",this.#q),document.removeEventListener("paste",this.#H)}copy(e){if(e.preventDefault(),this.#M&&this.#M.commitOrRemove(),!this.hasSelection)return;const t=[];for(const e of this.#z)e.isEmpty()||t.push(e.serialize());0!==t.length&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}cut(e){this.copy(e),this.delete()}paste(e){e.preventDefault();let t=e.clipboardData.getData("application/pdfjs");if(!t)return;try{t=JSON.parse(t)}catch(e){return void(0,r.warn)(`paste: "${e.message}".`)}if(!Array.isArray(t))return;this.unselectAll();const n=this.#R.get(this.#D);try{const e=[];for(const r of t){const t=n.deserialize(r);if(!t)return;e.push(t)}const r=()=>{for(const t of e)this.#ne(t);this.#re(e)},i=()=>{for(const t of e)t.remove()};this.addCommands({cmd:r,undo:i,mustExec:!0})}catch(e){(0,r.warn)(`paste: "${e.message}".`)}}keydown(e){this.getActive()?.shouldGetKeyboardEvents()||c._keyboardManager.exec(this,e)}onEditingAction(e){["undo","redo","delete","selectAll"].includes(e.name)&&this[e.name]()}#ie(e){Object.entries(e).some((([e,t])=>this.#X[e]!==t))&&this.#N.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#X,e)})}#oe(e){this.#N.dispatch("annotationeditorparamschanged",{source:this,details:e})}setEditingState(e){e?(this.#Z(),this.#ee(),this.#ie({isEditing:this.#U!==r.AnnotationEditorType.NONE,isEmpty:this.#ae(),hasSomethingToUndo:this.#I.hasSomethingToUndo(),hasSomethingToRedo:this.#I.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#J(),this.#te(),this.#ie({isEditing:!1}))}registerEditorTypes(e){if(!this.#L){this.#L=e;for(const e of this.#L)this.#oe(e.defaultPropertiesToUpdate)}}getId(){return this.#j.getId()}get currentLayer(){return this.#R.get(this.#D)}get currentPageIndex(){return this.#D}addLayer(e){this.#R.set(e.pageIndex,e),this.#B?e.enable():e.disable()}removeLayer(e){this.#R.delete(e.pageIndex)}updateMode(e){if(this.#U=e,e===r.AnnotationEditorType.NONE)this.setEditingState(!1),this.#se();else{this.setEditingState(!0),this.#le();for(const t of this.#R.values())t.updateMode(e)}}updateToolbar(e){e!==this.#U&&this.#N.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){if(this.#L){for(const n of this.#z)n.updateParams(e,t);for(const n of this.#L)n.updateDefaultParams(e,t)}}#le(){if(!this.#B){this.#B=!0;for(const e of this.#R.values())e.enable()}}#se(){if(this.unselectAll(),this.#B){this.#B=!1;for(const e of this.#R.values())e.disable()}}getEditors(e){const t=[];for(const n of this.#T.values())n.pageIndex===e&&t.push(n);return t}getEditor(e){return this.#T.get(e)}addEditor(e){this.#T.set(e.id,e)}removeEditor(e){this.#T.delete(e.id),this.unselect(e),this.#O?.remove(e.id)}#ne(e){const t=this.#R.get(e.pageIndex);t?t.addOrRebuild(e):this.addEditor(e)}setActiveEditor(e){this.#M!==e&&(this.#M=e,e&&this.#oe(e.propertiesToUpdate))}toggleSelected(e){if(this.#z.has(e))return this.#z.delete(e),e.unselect(),void this.#ie({hasSelectedEditor:this.hasSelection});this.#z.add(e),e.select(),this.#oe(e.propertiesToUpdate),this.#ie({hasSelectedEditor:!0})}setSelected(e){for(const t of this.#z)t!==e&&t.unselect();this.#z.clear(),this.#z.add(e),e.select(),this.#oe(e.propertiesToUpdate),this.#ie({hasSelectedEditor:!0})}isSelected(e){return this.#z.has(e)}unselect(e){e.unselect(),this.#z.delete(e),this.#ie({hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==this.#z.size}undo(){this.#I.undo(),this.#ie({hasSomethingToUndo:this.#I.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#ae()})}redo(){this.#I.redo(),this.#ie({hasSomethingToUndo:!0,hasSomethingToRedo:this.#I.hasSomethingToRedo(),isEmpty:this.#ae()})}addCommands(e){this.#I.add(e),this.#ie({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#ae()})}#ae(){if(0===this.#T.size)return!0;if(1===this.#T.size)for(const e of this.#T.values())return e.isEmpty();return!1}delete(){if(this.commitOrRemove(),!this.hasSelection)return;const e=[...this.#z];this.addCommands({cmd:()=>{for(const t of e)t.remove()},undo:()=>{for(const t of e)this.#ne(t)},mustExec:!0})}commitOrRemove(){this.#M?.commitOrRemove()}#re(e){this.#z.clear();for(const t of e)t.isEmpty()||(this.#z.add(t),t.select());this.#ie({hasSelectedEditor:!0})}selectAll(){for(const e of this.#z)e.commit();this.#re(this.#T.values())}unselectAll(){if(this.#M)this.#M.commitOrRemove();else if(0!==this.#z.size){for(const e of this.#z)e.unselect();this.#z.clear(),this.#ie({hasSelectedEditor:!1})}}isActive(e){return this.#M===e}getActive(){return this.#M}getMode(){return this.#U}}t.AnnotationEditorUIManager=c},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=t.AnnotationPrefix=void 0,t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getColorValues=function(e){const t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const n of e.keys()){t.style.color=n;const r=window.getComputedStyle(t).color;e.set(n,g(r))}t.remove()},t.getCurrentTransform=function(e){const{a:t,b:n,c:r,d:i,e:o,f:a}=e.getTransform();return[t,n,r,i,o,a]},t.getCurrentTransformInverse=function(e){const{a:t,b:n,c:r,d:i,e:o,f:a}=e.getTransform().invertSelf();return[t,n,r,i,o,a]},t.getFilenameFromUrl=function(e,t=!1){return t||([e]=e.split(/[#?]/,1)),e.substring(e.lastIndexOf("/")+1)},t.getPdfFilenameFromUrl=function(e,t="document.pdf"){if("string"!=typeof e)return t;if(p(e))return(0,i.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;const n=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,r=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let o=n.exec(r[1])||n.exec(r[2])||n.exec(r[3]);if(o&&(o=o[0],o.includes("%")))try{o=n.exec(decodeURIComponent(o))[0]}catch(e){}return o||t},t.getRGB=g,t.getXfaPageViewport=function(e,{scale:t=1,rotation:n=0}){const{width:r,height:i}=e.attributes.style,o=[0,0,parseInt(r),parseInt(i)];return new d({viewBox:o,scale:t,rotation:n})},t.isDataScheme=p,t.isPdfFile=function(e){return"string"==typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=f,t.loadScript=function(e,t=!1){return new Promise(((n,r)=>{const i=document.createElement("script");i.src=e,i.onload=function(e){t&&i.remove(),n(e)},i.onerror=function(){r(new Error(`Cannot load script at: ${i.src}`))},(document.head||document.documentElement).append(i)}))},t.setLayerDimensions=function(e,t,n=!1,r=!0){if(t instanceof d){const{pageWidth:r,pageHeight:i}=t.rawDims,{style:o}=e,a=`calc(var(--scale-factor) * ${r}px)`,s=`calc(var(--scale-factor) * ${i}px)`;n&&t.rotation%180!=0?(o.width=s,o.height=a):(o.width=a,o.height=s)}r&&e.setAttribute("data-main-rotation",t.rotation)};var r=n(7),i=n(1);t.AnnotationPrefix="pdfjs_internal_id_";class o{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}t.PixelsPerInch=o;class a extends r.BaseCanvasFactory{constructor({ownerDocument:e=globalThis.document}={}){super(),this._document=e}_createCanvas(e,t){const n=this._document.createElement("canvas");return n.width=e,n.height=t,n}}async function s(e,t=!1){if(f(e,document.baseURI)){const n=await fetch(e);if(!n.ok)throw new Error(n.statusText);return t?new Uint8Array(await n.arrayBuffer()):(0,i.stringToBytes)(await n.text())}return new Promise(((n,r)=>{const o=new XMLHttpRequest;o.open("GET",e,!0),t&&(o.responseType="arraybuffer"),o.onreadystatechange=()=>{if(o.readyState===XMLHttpRequest.DONE){if(200===o.status||0===o.status){let e;if(t&&o.response?e=new Uint8Array(o.response):!t&&o.responseText&&(e=(0,i.stringToBytes)(o.responseText)),e)return void n(e)}r(new Error(o.statusText))}},o.send(null)}))}t.DOMCanvasFactory=a;class l extends r.BaseCMapReaderFactory{_fetchData(e,t){return s(e,this.isCompressed).then((e=>({cMapData:e,compressionType:t})))}}t.DOMCMapReaderFactory=l;class c extends r.BaseStandardFontDataFactory{_fetchData(e){return s(e,!0)}}t.DOMStandardFontDataFactory=c;class u extends r.BaseSVGFactory{_createSVG(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}}t.DOMSVGFactory=u;class d{constructor({viewBox:e,scale:t,rotation:n,offsetX:r=0,offsetY:i=0,dontFlip:o=!1}){this.viewBox=e,this.scale=t,this.rotation=n,this.offsetX=r,this.offsetY=i;const a=(e[2]+e[0])/2,s=(e[3]+e[1])/2;let l,c,u,d,h,p,f,m;switch((n%=360)<0&&(n+=360),n){case 180:l=-1,c=0,u=0,d=1;break;case 90:l=0,c=1,u=1,d=0;break;case 270:l=0,c=-1,u=-1,d=0;break;case 0:l=1,c=0,u=0,d=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(u=-u,d=-d),0===l?(h=Math.abs(s-e[1])*t+r,p=Math.abs(a-e[0])*t+i,f=(e[3]-e[1])*t,m=(e[2]-e[0])*t):(h=Math.abs(a-e[0])*t+r,p=Math.abs(s-e[1])*t+i,f=(e[2]-e[0])*t,m=(e[3]-e[1])*t),this.transform=[l*t,c*t,u*t,d*t,h-l*t*a-u*t*s,p-c*t*a-d*t*s],this.width=f,this.height=m}get rawDims(){const{viewBox:e}=this;return(0,i.shadow)(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone({scale:e=this.scale,rotation:t=this.rotation,offsetX:n=this.offsetX,offsetY:r=this.offsetY,dontFlip:i=!1}={}){return new d({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:n,offsetY:r,dontFlip:i})}convertToViewportPoint(e,t){return i.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){const t=i.Util.applyTransform([e[0],e[1]],this.transform),n=i.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],n[0],n[1]]}convertToPdfPoint(e,t){return i.Util.applyInverseTransform([e,t],this.transform)}}t.PageViewport=d;class h extends i.BaseException{constructor(e,t,n=0){super(e,"RenderingCancelledException"),this.type=t,this.extraDelay=n}}function p(e){const t=e.length;let n=0;for(;n>16,(65280&t)>>8,255&t]}return e.startsWith("rgb(")?e.slice(4,-1).split(",").map((e=>parseInt(e))):e.startsWith("rgba(")?e.slice(5,-1).split(",").map((e=>parseInt(e))).slice(0,3):((0,i.warn)(`Not a valid color format: "${e}"`),[0,0,0])}t.RenderingCancelledException=h,t.StatTimer=class{started=Object.create(null);times=[];time(e){e in this.started&&(0,i.warn)(`Timer is already running for ${e}`),this.started[e]=Date.now()}timeEnd(e){e in this.started||(0,i.warn)(`Timer has not been started for ${e}`),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const{name:e}of this.times)t=Math.max(e.length,t);for(const{name:n,start:r,end:i}of this.times)e.push(`${n.padEnd(t)} ${i-r}ms\n`);return e.join("")}},t.PDFDateString=class{static toDateObject(e){if(!e||"string"!=typeof e)return null;m||(m=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));const t=m.exec(e);if(!t)return null;const n=parseInt(t[1],10);let r=parseInt(t[2],10);r=r>=1&&r<=12?r-1:0;let i=parseInt(t[3],10);i=i>=1&&i<=31?i:1;let o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;let a=parseInt(t[5],10);a=a>=0&&a<=59?a:0;let s=parseInt(t[6],10);s=s>=0&&s<=59?s:0;const l=t[7]||"Z";let c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;let u=parseInt(t[9],10)||0;return u=u>=0&&u<=59?u:0,"-"===l?(o+=c,a+=u):"+"===l&&(o-=c,a-=u),new Date(Date.UTC(n,r,i,o,a,s))}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0;var r=n(1);class i{constructor(){this.constructor===i&&(0,r.unreachable)("Cannot initialize BaseCanvasFactory.")}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");const n=this._createCanvas(e,t);return{canvas:n,context:n.getContext("2d")}}reset(e,t,n){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||n<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=n}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){(0,r.unreachable)("Abstract method `_createCanvas` called.")}}t.BaseCanvasFactory=i;class o{constructor({baseUrl:e=null,isCompressed:t=!0}){this.constructor===o&&(0,r.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=e,this.isCompressed=t}async fetch({name:e}){if(!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw new Error("CMap name must be specified.");const t=this.baseUrl+e+(this.isCompressed?".bcmap":""),n=this.isCompressed?r.CMapCompressionType.BINARY:r.CMapCompressionType.NONE;return this._fetchData(t,n).catch((e=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${t}`)}))}_fetchData(e,t){(0,r.unreachable)("Abstract method `_fetchData` called.")}}t.BaseCMapReaderFactory=o;class a{constructor({baseUrl:e=null}){this.constructor===a&&(0,r.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=e}async fetch({filename:e}){if(!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!e)throw new Error("Font filename must be specified.");const t=`${this.baseUrl}${e}`;return this._fetchData(t).catch((e=>{throw new Error(`Unable to load font data at: ${t}`)}))}_fetchData(e){(0,r.unreachable)("Abstract method `_fetchData` called.")}}t.BaseStandardFontDataFactory=a;class s{constructor(){this.constructor===s&&(0,r.unreachable)("Cannot initialize BaseSVGFactory.")}create(e,t,n=!1){if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");const r=this._createSVG("svg:svg");return r.setAttribute("version","1.1"),n||(r.setAttribute("width",`${e}px`),r.setAttribute("height",`${t}px`)),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox",`0 0 ${e} ${t}`),r}createElement(e){if("string"!=typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){(0,r.unreachable)("Abstract method `_createSVG` called.")}}t.BaseSVGFactory=s},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0;var r=n(1);const i=3285377520,o=4294901760,a=65535;t.MurmurHash3_64=class{constructor(e){this.h1=e?4294967295&e:i,this.h2=e?4294967295&e:i}update(e){let t,n;if("string"==typeof e){t=new Uint8Array(2*e.length),n=0;for(let r=0,i=e.length;r>>8,t[n++]=255&i)}}else{if(!(0,r.isArrayBuffer)(e))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");t=e.slice(),n=t.byteLength}const i=n>>2,s=n-4*i,l=new Uint32Array(t.buffer,0,i);let c=0,u=0,d=this.h1,h=this.h2;const p=3432918353,f=461845907,m=11601,g=13715;for(let e=0;e>>17,c=c*f&o|c*g&a,d^=c,d=d<<13|d>>>19,d=5*d+3864292196):(u=l[e],u=u*p&o|u*m&a,u=u<<15|u>>>17,u=u*f&o|u*g&a,h^=u,h=h<<13|h>>>19,h=5*h+3864292196);switch(c=0,s){case 3:c^=t[4*i+2]<<16;case 2:c^=t[4*i+1]<<8;case 1:c^=t[4*i],c=c*p&o|c*m&a,c=c<<15|c>>>17,c=c*f&o|c*g&a,1&i?d^=c:h^=c}this.h1=d,this.h2=h}hexdigest(){let e=this.h1,t=this.h2;return e^=t>>>1,e=3981806797*e&o|36045*e&a,t=4283543511*t&o|(2950163797*(t<<16|e>>>16)&o)>>>16,e^=t>>>1,e=444984403*e&o|60499*e&a,t=3301882366*t&o|(3120437893*(t<<16|e>>>16)&o)>>>16,e^=t>>>1,(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var r=n(1),i=n(10);t.FontLoader=class{constructor({onUnsupportedFeature:e,ownerDocument:t=globalThis.document,styleElement:n=null}){this._onUnsupportedFeature=e,this._document=t,this.nativeFontFaces=[],this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.push(e),this._document.fonts.add(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.length=0,this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async bind(e){if(e.attached||e.missingFile)return;if(e.attached=!0,this.isFontLoadingAPISupported){const t=e.createNativeFontFace();if(t){this.addNativeFontFace(t);try{await t.loaded}catch(n){throw this._onUnsupportedFeature({featureId:r.UNSUPPORTED_FEATURES.errorFontLoadNative}),(0,r.warn)(`Failed to load font '${t.family}': '${n}'.`),e.disableFontFace=!0,n}}return}const t=e.createFontFaceRule();if(t){if(this.insertRule(t),this.isSyncFontLoadingSupported)return;await new Promise((t=>{const n=this._queueLoadingCallback(t);this._prepareFontLoadEvent(e,n)}))}}get isFontLoadingAPISupported(){const e=!!this._document?.fonts;return(0,r.shadow)(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){let e=!1;return(i.isNodeJS||"undefined"!=typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),(0,r.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const{loadingRequests:t}=this,n={done:!1,complete:function(){for((0,r.assert)(!n.done,"completeRequest() cannot be called twice."),n.done=!0;t.length>0&&t[0].done;){const e=t.shift();setTimeout(e.callback,0)}},callback:e};return t.push(n),n}get _loadTestFont(){const e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,r.shadow)(this,"_loadTestFont",e)}_prepareFontLoadEvent(e,t){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function i(e,t,n,r){return e.substring(0,t)+r+e.substring(t+n)}let o,a;const s=this._document.createElement("canvas");s.width=1,s.height=1;const l=s.getContext("2d");let c=0;const u=`lt${Date.now()}${this.loadTestFontId++}`;let d=this._loadTestFont;d=i(d,976,u.length,u);const h=1482184792;let p=n(d,16);for(o=0,a=u.length-3;o30)return(0,r.warn)("Load test font never loaded."),void n();l.font="30px "+t,l.fillText(".",0,20),l.getImageData(0,0,1,1).data[3]>0?n():setTimeout(e.bind(null,t,n))}(u,(()=>{m.remove(),t.complete()}))}},t.FontFaceObject=class{constructor(e,{isEvalSupported:t=!0,disableFontFace:n=!1,ignoreErrors:r=!1,onUnsupportedFeature:i,fontRegistry:o=null}){this.compiledGlyphs=Object.create(null);for(const t in e)this[t]=e[t];this.isEvalSupported=!1!==t,this.disableFontFace=!0===n,this.ignoreErrors=!0===r,this._onUnsupportedFeature=i,this.fontRegistry=o}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;if(this.cssFontInfo){const t={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(t.style=`oblique ${this.cssFontInfo.italicAngle}deg`),e=new FontFace(this.cssFontInfo.fontFamily,this.data,t)}else e=new FontFace(this.loadedName,this.data,{});return this.fontRegistry?.registerFont(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const e=(0,r.bytesToString)(this.data),t=`url(data:${this.mimetype};base64,${btoa(e)});`;let n;if(this.cssFontInfo){let e=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(e+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),n=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${e}src:${t}}`}else n=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return this.fontRegistry?.registerFont(this,t),n}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let n;try{n=e.get(this.loadedName+"_path_"+t)}catch(e){if(!this.ignoreErrors)throw e;return this._onUnsupportedFeature({featureId:r.UNSUPPORTED_FEATURES.errorFontGetPath}),(0,r.warn)(`getPathGenerator - ignoring character: "${e}".`),this.compiledGlyphs[t]=function(e,t){}}if(this.isEvalSupported&&r.FeatureTest.isEvalSupported){const e=[];for(const t of n){const n=void 0!==t.args?t.args.join(","):"";e.push("c.",t.cmd,"(",n,");\n")}return this.compiledGlyphs[t]=new Function("c","size",e.join(""))}return this.compiledGlyphs[t]=function(e,t){for(const r of n)"scale"===r.cmd&&(r.args=[t,-t]),e[r.cmd].apply(e,r.args)}}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isNodeJS=void 0;const n=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=n},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var r=n(1),i=n(6),o=n(12),a=n(13);const s=4096,l=16;class c{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,n){let r;return void 0!==this.cache[e]?(r=this.cache[e],this.canvasFactory.reset(r,t,n)):(r=this.canvasFactory.create(t,n),this.cache[e]=r),r}delete(e){delete this.cache[e]}clear(){for(const e in this.cache){const t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}}function u(e,t,n,r,o,a,s,l,c,u){const[d,h,p,f,m,g]=(0,i.getCurrentTransform)(e);if(0===h&&0===p){const i=s*d+m,v=Math.round(i),y=l*f+g,b=Math.round(y),E=(s+c)*d+m,S=Math.abs(Math.round(E)-v)||1,w=(l+u)*f+g,_=Math.abs(Math.round(w)-b)||1;return e.setTransform(Math.sign(d),0,0,Math.sign(f),v,b),e.drawImage(t,n,r,o,a,0,0,S,_),e.setTransform(d,h,p,f,m,g),[S,_]}if(0===d&&0===f){const i=l*p+m,v=Math.round(i),y=s*h+g,b=Math.round(y),E=(l+u)*p+m,S=Math.abs(Math.round(E)-v)||1,w=(s+c)*h+g,_=Math.abs(Math.round(w)-b)||1;return e.setTransform(0,Math.sign(h),Math.sign(p),0,v,b),e.drawImage(t,n,r,o,a,0,0,_,S),e.setTransform(d,h,p,f,m,g),[_,S]}return e.drawImage(t,n,r,o,a,s,l,c,u),[Math.hypot(d,h)*c,Math.hypot(p,f)*u]}class d{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=r.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=r.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=r.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps=null,this.startNewPathAndClipBox([0,0,e,t])}clone(){const e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,n){[t,n]=r.Util.applyTransform([t,n],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,n),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,n)}updateRectMinMax(e,t){const n=r.Util.applyTransform(t,e),i=r.Util.applyTransform(t.slice(2),e);this.minX=Math.min(this.minX,n[0],i[0]),this.minY=Math.min(this.minY,n[1],i[1]),this.maxX=Math.max(this.maxX,n[0],i[0]),this.maxY=Math.max(this.maxY,n[1],i[1])}updateScalingPathMinMax(e,t){r.Util.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.maxX=Math.max(this.maxX,t[1]),this.minY=Math.min(this.minY,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,n,i,o,a,s,l,c,u){const d=r.Util.bezierBoundingBox(t,n,i,o,a,s,l,c);if(u)return u[0]=Math.min(u[0],d[0],d[2]),u[1]=Math.max(u[1],d[0],d[2]),u[2]=Math.min(u[2],d[1],d[3]),void(u[3]=Math.max(u[3],d[1],d[3]));this.updateRectMinMax(e,d)}getPathBoundingBox(e=o.PathType.FILL,t=null){const n=[this.minX,this.minY,this.maxX,this.maxY];if(e===o.PathType.STROKE){t||(0,r.unreachable)("Stroke bounding box must include transform.");const e=r.Util.singularValueDecompose2dScale(t),i=e[0]*this.lineWidth/2,o=e[1]*this.lineWidth/2;n[0]-=i,n[1]-=o,n[2]+=i,n[3]+=o}return n}updateClipFromPath(){const e=r.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(e=o.PathType.FILL,t=null){return r.Util.intersect(this.clipBox,this.getPathBoundingBox(e,t))}}function h(e,t,n=null){if("undefined"!=typeof ImageData&&t instanceof ImageData)return void e.putImageData(t,0,0);const i=t.height,o=t.width,a=i%l,s=(i-a)/l,c=0===a?s:s+1,u=e.createImageData(o,l);let d,h=0;const p=t.data,f=u.data;let m,g,v,y,b,E,S,w;if(n)switch(n.length){case 1:b=n[0],E=n[0],S=n[0],w=n[0];break;case 4:b=n[0],E=n[1],S=n[2],w=n[3]}if(t.kind===r.ImageKind.GRAYSCALE_1BPP){const t=p.byteLength,n=new Uint32Array(f.buffer,0,f.byteLength>>2),i=n.length,y=o+7>>3;let b=4294967295,E=r.FeatureTest.isLittleEndian?4278190080:255;for(w&&255===w[0]&&0===w[255]&&([b,E]=[E,b]),m=0;my?o:8*e-7,a=-8&i;let s=0,l=0;for(;r>=1}for(;d=s&&(v=a,y=o*v),d=0,g=y;g--;)f[d++]=p[h++],f[d++]=p[h++],f[d++]=p[h++],f[d++]=255;if(t)for(let e=0;e>8,e[o-2]=e[o-2]*i+n*a>>8,e[o-1]=e[o-1]*i+r*a>>8}}}function v(e,t,n){const r=e.length,i=1/255;for(let o=3;o>8]>>8:t[i]*r>>16}}function b(e,t){const n=r.Util.singularValueDecompose2dScale(e);n[0]=Math.fround(n[0]),n[1]=Math.fround(n[1]);const o=Math.fround((globalThis.devicePixelRatio||1)*i.PixelsPerInch.PDF_TO_CSS_UNITS);return void 0!==t?t:n[0]<=o||n[1]<=o}const E=["butt","round","square"],S=["miter","round","bevel"],w={},_={};class k{constructor(e,t,n,r,{optionalContentConfig:i,markedContentStack:o=null},a,s){this.ctx=e,this.current=new d(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=n,this.canvasFactory=r,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=o||[],this.optionalContentConfig=i,this.cachedCanvases=new c(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=a,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.backgroundColor=s?.background||null,this.foregroundColor=s?.foreground||null,this._cachedScaleForStroking=null,this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e,t=null){return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}beginDrawing({transform:e,viewport:t,transparency:n=!1,background:r=null}){const o=this.ctx.canvas.width,a=this.ctx.canvas.height,s=r||"#ffffff";if(this.ctx.save(),this.foregroundColor&&this.backgroundColor){this.ctx.fillStyle=this.foregroundColor;const e=this.foregroundColor=this.ctx.fillStyle;this.ctx.fillStyle=this.backgroundColor;const t=this.backgroundColor=this.ctx.fillStyle;let n=!0,r=s;if(this.ctx.fillStyle=s,r=this.ctx.fillStyle,n="string"==typeof r&&/^#[0-9A-Fa-f]{6}$/.test(r),"#000000"===e&&"#ffffff"===t||e===t||!n)this.foregroundColor=this.backgroundColor=null;else{const[n,o,a]=(0,i.getRGB)(r),s=e=>(e/=255)<=.03928?e/12.92:((e+.055)/1.055)**2.4,l=Math.round(.2126*s(n)+.7152*s(o)+.0722*s(a));this.selectColor=(n,r,i)=>{const o=.2126*s(n)+.7152*s(r)+.0722*s(i);return Math.round(o)===l?t:e}}}if(this.ctx.fillStyle=this.backgroundColor||s,this.ctx.fillRect(0,0,o,a),this.ctx.restore(),n){const e=this.cachedCanvases.getCanvas("transparent",o,a);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...(0,i.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),m(this.ctx,this.foregroundColor),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=(0,i.getCurrentTransform)(this.ctx)}executeOperatorList(e,t,n,i){const o=e.argsArray,a=e.fnArray;let s=t||0;const l=o.length;if(l===s)return s;const c=l-s>10&&"function"==typeof n,u=c?Date.now()+15:0;let d=0;const h=this.commonObjs,p=this.objs;let f;for(;;){if(void 0!==i&&s===i.nextBreakPoint)return i.breakIt(s,n),s;if(f=a[s],f!==r.OPS.dependency)this[f].apply(this,o[s]);else for(const e of o[s]){const t=e.startsWith("g_")?h:p;if(!t.has(e))return t.get(e,n),s}if(s++,s===l)return s;if(c&&++d>10){if(Date.now()>u)return n(),s;d=0}}}#ce(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#ce(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear()}_scaleImage(e,t){const n=e.width,r=e.height;let i,o,a=Math.max(Math.hypot(t[0],t[1]),1),s=Math.max(Math.hypot(t[2],t[3]),1),l=n,c=r,u="prescale1";for(;a>2&&l>1||s>2&&c>1;){let t=l,n=c;a>2&&l>1&&(t=Math.ceil(l/2),a/=l/t),s>2&&c>1&&(n=Math.ceil(c/2),s/=c/n),i=this.cachedCanvases.getCanvas(u,t,n),o=i.context,o.clearRect(0,0,t,n),o.drawImage(e,0,0,l,c,0,0,t,n),e=i.canvas,l=t,c=n,u="prescale1"===u?"prescale2":"prescale1"}return{img:e,paintWidth:l,paintHeight:c}}_createMaskCanvas(e){const t=this.ctx,{width:n,height:a}=e,s=this.current.fillColor,l=this.current.patternFill,c=(0,i.getCurrentTransform)(t);let d,h,f,m;if((e.bitmap||e.data)&&e.count>1){const t=e.bitmap||e.data.buffer;h=JSON.stringify(l?c:[c.slice(0,4),s]),d=this._cachedBitmapsMap.get(t),d||(d=new Map,this._cachedBitmapsMap.set(t,d));const n=d.get(h);if(n&&!l)return{canvas:n,offsetX:Math.round(Math.min(c[0],c[2])+c[4]),offsetY:Math.round(Math.min(c[1],c[3])+c[5])};f=n}f||(m=this.cachedCanvases.getCanvas("maskCanvas",n,a),p(m.context,e));let g=r.Util.transform(c,[1/n,0,0,-1/a,0,0]);g=r.Util.transform(g,[1,0,0,1,0,-a]);const v=r.Util.applyTransform([0,0],g),y=r.Util.applyTransform([n,a],g),E=r.Util.normalizeRect([v[0],v[1],y[0],y[1]]),S=Math.round(E[2]-E[0])||1,w=Math.round(E[3]-E[1])||1,_=this.cachedCanvases.getCanvas("fillCanvas",S,w),k=_.context,C=Math.min(v[0],y[0]),P=Math.min(v[1],y[1]);k.translate(-C,-P),k.transform(...g),f||(f=this._scaleImage(m.canvas,(0,i.getCurrentTransformInverse)(k)),f=f.img,d&&l&&d.set(h,f)),k.imageSmoothingEnabled=b((0,i.getCurrentTransform)(k),e.interpolate),u(k,f,0,0,f.width,f.height,0,0,n,a),k.globalCompositeOperation="source-in";const x=r.Util.transform((0,i.getCurrentTransformInverse)(k),[1,0,0,1,-C,-P]);return k.fillStyle=l?s.getPattern(t,this,x,o.PathType.FILL):s,k.fillRect(0,0,n,a),d&&!l&&(this.cachedCanvases.delete("fillCanvas"),d.set(h,_.canvas)),{canvas:_.canvas,offsetX:Math.round(C),offsetY:Math.round(P)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking=null),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=E[e]}setLineJoin(e){this.ctx.lineJoin=S[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){const n=this.ctx;void 0!==n.setLineDash&&(n.setLineDash(e),n.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,n]of e)switch(t){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n[0],n[1]);break;case"CA":this.current.strokeAlpha=n;break;case"ca":this.current.fillAlpha=n,this.ctx.globalAlpha=n;break;case"BM":this.ctx.globalCompositeOperation=n;break;case"SMask":this.current.activeSMask=n?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.current.transferMaps=n}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");const e=this.ctx.canvas.width,t=this.ctx.canvas.height,n="smaskGroupAt"+this.groupLevel,r=this.cachedCanvases.getCanvas(n,e,t);this.suspendedCtx=this.ctx,this.ctx=r.context;const o=this.ctx;o.setTransform(...(0,i.getCurrentTransform)(this.suspendedCtx)),f(this.suspendedCtx,o),function(e,t){if(e._removeMirroring)throw new Error("Context is already forwarding operations.");e.__originalSave=e.save,e.__originalRestore=e.restore,e.__originalRotate=e.rotate,e.__originalScale=e.scale,e.__originalTranslate=e.translate,e.__originalTransform=e.transform,e.__originalSetTransform=e.setTransform,e.__originalResetTransform=e.resetTransform,e.__originalClip=e.clip,e.__originalMoveTo=e.moveTo,e.__originalLineTo=e.lineTo,e.__originalBezierCurveTo=e.bezierCurveTo,e.__originalRect=e.rect,e.__originalClosePath=e.closePath,e.__originalBeginPath=e.beginPath,e._removeMirroring=()=>{e.save=e.__originalSave,e.restore=e.__originalRestore,e.rotate=e.__originalRotate,e.scale=e.__originalScale,e.translate=e.__originalTranslate,e.transform=e.__originalTransform,e.setTransform=e.__originalSetTransform,e.resetTransform=e.__originalResetTransform,e.clip=e.__originalClip,e.moveTo=e.__originalMoveTo,e.lineTo=e.__originalLineTo,e.bezierCurveTo=e.__originalBezierCurveTo,e.rect=e.__originalRect,e.closePath=e.__originalClosePath,e.beginPath=e.__originalBeginPath,delete e._removeMirroring},e.save=function(){t.save(),this.__originalSave()},e.restore=function(){t.restore(),this.__originalRestore()},e.translate=function(e,n){t.translate(e,n),this.__originalTranslate(e,n)},e.scale=function(e,n){t.scale(e,n),this.__originalScale(e,n)},e.transform=function(e,n,r,i,o,a){t.transform(e,n,r,i,o,a),this.__originalTransform(e,n,r,i,o,a)},e.setTransform=function(e,n,r,i,o,a){t.setTransform(e,n,r,i,o,a),this.__originalSetTransform(e,n,r,i,o,a)},e.resetTransform=function(){t.resetTransform(),this.__originalResetTransform()},e.rotate=function(e){t.rotate(e),this.__originalRotate(e)},e.clip=function(e){t.clip(e),this.__originalClip(e)},e.moveTo=function(e,n){t.moveTo(e,n),this.__originalMoveTo(e,n)},e.lineTo=function(e,n){t.lineTo(e,n),this.__originalLineTo(e,n)},e.bezierCurveTo=function(e,n,r,i,o,a){t.bezierCurveTo(e,n,r,i,o,a),this.__originalBezierCurveTo(e,n,r,i,o,a)},e.rect=function(e,n,r,i){t.rect(e,n,r,i),this.__originalRect(e,n,r,i)},e.closePath=function(){t.closePath(),this.__originalClosePath()},e.beginPath=function(){t.beginPath(),this.__originalBeginPath()}}(o,this.suspendedCtx),this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),f(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(!this.current.activeSMask)return;e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const t=this.current.activeSMask;(function(e,t,n,r){const i=r[0],o=r[1],a=r[2]-i,s=r[3]-o;0!==a&&0!==s&&(function(e,t,n,r,i,o,a,s,l,c,u){const d=!!o,h=d?o[0]:0,p=d?o[1]:0,f=d?o[2]:0;let m;m="Luminosity"===i?y:v;const b=Math.min(r,Math.ceil(1048576/n));for(let i=0;i100&&(c=100),this.current.fontSizeScale=t/c,this.ctx.font=`${s} ${a} ${c}px ${l}`}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,n,r,i,o){this.current.textMatrix=[e,t,n,r,i,o],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,n,o){const a=this.ctx,s=this.current,l=s.font,c=s.textRenderingMode,u=s.fontSize/s.fontSizeScale,d=c&r.TextRenderingMode.FILL_STROKE_MASK,h=!!(c&r.TextRenderingMode.ADD_TO_PATH_FLAG),p=s.patternFill&&!l.missingFile;let f;(l.disableFontFace||h||p)&&(f=l.getPathGenerator(this.commonObjs,e)),l.disableFontFace||p?(a.save(),a.translate(t,n),a.beginPath(),f(a,u),o&&a.setTransform(...o),d!==r.TextRenderingMode.FILL&&d!==r.TextRenderingMode.FILL_STROKE||a.fill(),d!==r.TextRenderingMode.STROKE&&d!==r.TextRenderingMode.FILL_STROKE||a.stroke(),a.restore()):(d!==r.TextRenderingMode.FILL&&d!==r.TextRenderingMode.FILL_STROKE||a.fillText(e,t,n),d!==r.TextRenderingMode.STROKE&&d!==r.TextRenderingMode.FILL_STROKE||a.strokeText(e,t,n)),h&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:(0,i.getCurrentTransform)(a),x:t,y:n,fontSize:u,addToPath:f})}get isFontSubpixelAAEnabled(){const{context:e}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);e.scale(1.5,1),e.fillText("I",0,10);const t=e.getImageData(0,0,10,10).data;let n=!1;for(let e=3;e0&&t[e]<255){n=!0;break}return(0,r.shadow)(this,"isFontSubpixelAAEnabled",n)}showText(e){const t=this.current,n=t.font;if(n.isType3Font)return this.showType3Text(e);const a=t.fontSize;if(0===a)return;const s=this.ctx,l=t.fontSizeScale,c=t.charSpacing,u=t.wordSpacing,d=t.fontDirection,h=t.textHScale*d,p=e.length,f=n.vertical,m=f?1:-1,g=n.defaultVMetrics,v=a*t.fontMatrix[0],y=t.textRenderingMode===r.TextRenderingMode.FILL&&!n.disableFontFace&&!t.patternFill;let b;if(s.save(),s.transform(...t.textMatrix),s.translate(t.x,t.y+t.textRise),d>0?s.scale(h,-1):s.scale(h,1),t.patternFill){s.save();const e=t.fillColor.getPattern(s,this,(0,i.getCurrentTransformInverse)(s),o.PathType.FILL);b=(0,i.getCurrentTransform)(s),s.restore(),s.fillStyle=e}let E=t.lineWidth;const S=t.textMatrixScale;if(0===S||0===E){const e=t.textRenderingMode&r.TextRenderingMode.FILL_STROKE_MASK;e!==r.TextRenderingMode.STROKE&&e!==r.TextRenderingMode.FILL_STROKE||(E=this.getSinglePixelWidth())}else E/=S;if(1!==l&&(s.scale(l,l),E/=l),s.lineWidth=E,n.isInvalidPDFjsFont){const n=[];let r=0;for(const t of e)n.push(t.unicode),r+=t.width;return s.fillText(n.join(""),0,0),t.x+=r*v*h,s.restore(),void this.compose()}let w,_=0;for(w=0;w0){const e=1e3*s.measureText(o).width/a*l;if(knew k(e,this.commonObjs,this.objs,this.canvasFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};t=new o.TilingPattern(e,n,this.ctx,a,r)}else t=this._getPattern(e[1],e[2]);return t}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,n){const i=this.selectColor?.(e,t,n)||r.Util.makeHexColor(e,t,n);this.ctx.strokeStyle=i,this.current.strokeColor=i}setFillRGBColor(e,t,n){const i=this.selectColor?.(e,t,n)||r.Util.makeHexColor(e,t,n);this.ctx.fillStyle=i,this.current.fillColor=i,this.current.patternFill=!1}_getPattern(e,t=null){let n;return this.cachedPatterns.has(e)?n=this.cachedPatterns.get(e):(n=(0,o.getShadingPattern)(this.objs.get(e)),this.cachedPatterns.set(e,n)),t&&(n.matrix=t),n}shadingFill(e){if(!this.contentVisible)return;const t=this.ctx;this.save();const n=this._getPattern(e);t.fillStyle=n.getPattern(t,this,(0,i.getCurrentTransformInverse)(t),o.PathType.SHADING);const a=(0,i.getCurrentTransformInverse)(t);if(a){const e=t.canvas,n=e.width,i=e.height,o=r.Util.applyTransform([0,0],a),s=r.Util.applyTransform([0,i],a),l=r.Util.applyTransform([n,0],a),c=r.Util.applyTransform([n,i],a),u=Math.min(o[0],s[0],l[0],c[0]),d=Math.min(o[1],s[1],l[1],c[1]),h=Math.max(o[0],s[0],l[0],c[0]),p=Math.max(o[1],s[1],l[1],c[1]);this.ctx.fillRect(u,d,h-u,p-d)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){(0,r.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,r.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform(...e),this.baseTransform=(0,i.getCurrentTransform)(this.ctx),t)){const e=t[2]-t[0],n=t[3]-t[1];this.ctx.rect(t[0],t[1],e,n),this.current.updateRectMinMax((0,i.getCurrentTransform)(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(e){if(!this.contentVisible)return;this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const t=this.ctx;e.isolated||(0,r.info)("TODO: Support non-isolated groups."),e.knockout&&(0,r.warn)("Knockout groups not supported.");const n=(0,i.getCurrentTransform)(t);if(e.matrix&&t.transform(...e.matrix),!e.bbox)throw new Error("Bounding box is required.");let o=r.Util.getAxialAlignedBoundingBox(e.bbox,(0,i.getCurrentTransform)(t));const a=[0,0,t.canvas.width,t.canvas.height];o=r.Util.intersect(o,a)||[0,0,0,0];const l=Math.floor(o[0]),c=Math.floor(o[1]);let u=Math.max(Math.ceil(o[2])-l,1),d=Math.max(Math.ceil(o[3])-c,1),h=1,p=1;u>s&&(h=u/s,u=s),d>s&&(p=d/s,d=s),this.current.startNewPathAndClipBox([0,0,u,d]);let m="groupAt"+this.groupLevel;e.smask&&(m+="_smask_"+this.smaskCounter++%2);const g=this.cachedCanvases.getCanvas(m,u,d),v=g.context;v.scale(1/h,1/p),v.translate(-l,-c),v.transform(...n),e.smask?this.smaskStack.push({canvas:g.canvas,context:v,offsetX:l,offsetY:c,scaleX:h,scaleY:p,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(l,c),t.scale(h,p),t.save()),f(t,v),this.ctx=v,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++}endGroup(e){if(!this.contentVisible)return;this.groupLevel--;const t=this.ctx,n=this.groupStack.pop();if(this.ctx=n,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const e=(0,i.getCurrentTransform)(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...e);const n=r.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e);this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(n)}}beginAnnotation(e,t,n,o,a){if(this.#ce(),m(this.ctx,this.foregroundColor),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(t)&&4===t.length){const o=t[2]-t[0],s=t[3]-t[1];if(a&&this.annotationCanvasMap){(n=n.slice())[4]-=t[0],n[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=o,t[3]=s;const[a,l]=r.Util.singularValueDecompose2dScale((0,i.getCurrentTransform)(this.ctx)),{viewportScale:c}=this,u=Math.ceil(o*this.outputScaleX*c),d=Math.ceil(s*this.outputScaleY*c);this.annotationCanvas=this.canvasFactory.create(u,d);const{canvas:h,context:p}=this.annotationCanvas;this.annotationCanvasMap.set(e,h),this.annotationCanvas.savedCtx=this.ctx,this.ctx=p,this.ctx.setTransform(a,0,0,-l,0,s*l),m(this.ctx,this.foregroundColor)}else m(this.ctx,this.foregroundColor),this.ctx.rect(t[0],t[1],o,s),this.ctx.clip(),this.endPath()}this.current=new d(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...n),this.transform(...o)}endAnnotation(){this.annotationCanvas&&(this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){if(!this.contentVisible)return;const t=e.count;(e=this.getObject(e.data,e)).count=t;const n=this.ctx,r=this.processingType3;if(r&&(void 0===r.compiled&&(r.compiled=function(e){const{width:t,height:n}=e;if(t>1e3||n>1e3)return null;const r=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),i=t+1;let o,a,s,l=new Uint8Array(i*(n+1));const c=t+7&-8;let u=new Uint8Array(c*n),d=0;for(const t of e.data){let e=128;for(;e>0;)u[d++]=t&e?0:255,e>>=1}let h=0;for(d=0,0!==u[d]&&(l[0]=1,++h),a=1;a>2)+(u[d+1]?4:0)+(u[d-c+1]?8:0),r[e]&&(l[s+a]=r[e],++h),d++;if(u[d-c]!==u[d]&&(l[s+a]=u[d]?2:4,++h),h>1e3)return null}for(d=c*(n-1),s=o*i,0!==u[d]&&(l[s]=8,++h),a=1;a1e3)return null;const p=new Int32Array([0,i,-1,0,-i,0,0,0,1]),f=new Path2D;for(o=0;h&&o<=n;o++){let e=o*i;const n=e+t;for(;e>4,l[e]&=a>>2|a<<2),f.lineTo(e%i,e/i|0),l[e]||--h}while(r!==e);--o}return u=null,l=null,function(e){e.save(),e.scale(1/t,-1/n),e.translate(0,-n),e.fill(f),e.beginPath(),e.restore()}}(e)),r.compiled))return void r.compiled(n);const i=this._createMaskCanvas(e),o=i.canvas;n.save(),n.setTransform(1,0,0,1,0,0),n.drawImage(o,i.offsetX,i.offsetY),n.restore(),this.compose()}paintImageMaskXObjectRepeat(e,t,n=0,o=0,a,s){if(!this.contentVisible)return;e=this.getObject(e.data,e);const l=this.ctx;l.save();const c=(0,i.getCurrentTransform)(l);l.transform(t,n,o,a,0,0);const u=this._createMaskCanvas(e);l.setTransform(1,0,0,1,u.offsetX-c[4],u.offsetY-c[5]);for(let e=0,i=s.length;et?a/t:1,r=o>t?o/t:1}}this._cachedScaleForStroking=[n,r]}return this._cachedScaleForStroking}rescaleAndStroke(e){const{ctx:t}=this,{lineWidth:n}=this.current,[r,o]=this.getScaleForStroking();if(t.lineWidth=n||1,1===r&&1===o)return void t.stroke();let a,s,l;e&&(a=(0,i.getCurrentTransform)(t),s=t.getLineDash().slice(),l=t.lineDashOffset),t.scale(r,o);const c=Math.max(r,o);t.setLineDash(t.getLineDash().map((e=>e/c))),t.lineDashOffset/=c,t.stroke(),e&&(t.setTransform(...a),t.setLineDash(s),t.lineDashOffset=l)}isContentVisible(){for(let e=this.markedContentStack.length-1;e>=0;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}t.CanvasGraphics=k;for(const e in r.OPS)void 0!==k.prototype[e]&&(k.prototype[r.OPS[e]]=k.prototype[e])},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new l(e);case"Mesh":return new d(e);case"Dummy":return new h}throw new Error(`Unknown IR type: ${e[0]}`)};var r=n(1),i=n(6);const o={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function a(e,t){if(!t)return;const n=t[2]-t[0],r=t[3]-t[1],i=new Path2D;i.rect(t[0],t[1],n,r),e.clip(i)}t.PathType=o;class s{constructor(){this.constructor===s&&(0,r.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,r.unreachable)("Abstract method `getPattern` called.")}}class l extends s{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const e of this._colorStops)t.addColorStop(e[0],e[1]);return t}getPattern(e,t,n,s){let l;if(s===o.STROKE||s===o.FILL){const o=t.current.getClippedPathBoundingBox(s,(0,i.getCurrentTransform)(e))||[0,0,0,0],c=Math.ceil(o[2]-o[0])||1,u=Math.ceil(o[3]-o[1])||1,d=t.cachedCanvases.getCanvas("pattern",c,u,!0),h=d.context;h.clearRect(0,0,h.canvas.width,h.canvas.height),h.beginPath(),h.rect(0,0,h.canvas.width,h.canvas.height),h.translate(-o[0],-o[1]),n=r.Util.transform(n,[1,0,0,1,o[0],o[1]]),h.transform(...t.baseTransform),this.matrix&&h.transform(...this.matrix),a(h,this._bbox),h.fillStyle=this._createGradient(h),h.fill(),l=e.createPattern(d.canvas,"no-repeat");const p=new DOMMatrix(n);l.setTransform(p)}else a(e,this._bbox),l=this._createGradient(e);return l}}function c(e,t,n,r,i,o,a,s){const l=t.coords,c=t.colors,u=e.data,d=4*e.width;let h;l[n+1]>l[r+1]&&(h=n,n=r,r=h,h=o,o=a,a=h),l[r+1]>l[i+1]&&(h=r,r=i,i=h,h=a,a=s,s=h),l[n+1]>l[r+1]&&(h=n,n=r,r=h,h=o,o=a,a=h);const p=(l[n]+t.offsetX)*t.scaleX,f=(l[n+1]+t.offsetY)*t.scaleY,m=(l[r]+t.offsetX)*t.scaleX,g=(l[r+1]+t.offsetY)*t.scaleY,v=(l[i]+t.offsetX)*t.scaleX,y=(l[i+1]+t.offsetY)*t.scaleY;if(f>=y)return;const b=c[o],E=c[o+1],S=c[o+2],w=c[a],_=c[a+1],k=c[a+2],C=c[s],P=c[s+1],x=c[s+2],A=Math.round(f),M=Math.round(y);let T,R,O,I,D,L,F,N;for(let e=A;e<=M;e++){if(ey?1:g===y?0:(g-e)/(g-y),T=m-(m-v)*t,R=w-(w-C)*t,O=_-(_-P)*t,I=k-(k-x)*t}let t;t=ey?1:(f-e)/(f-y),D=p-(p-v)*t,L=b-(b-C)*t,F=E-(E-P)*t,N=S-(S-x)*t;const n=Math.round(Math.min(T,D)),r=Math.round(Math.max(T,D));let i=d*e+4*n;for(let e=n;e<=r;e++)t=(T-e)/(T-D),t<0?t=0:t>1&&(t=1),u[i++]=R-(R-L)*t|0,u[i++]=O-(O-F)*t|0,u[i++]=I-(I-N)*t|0,u[i++]=255}}function u(e,t,n){const r=t.coords,i=t.colors;let o,a;switch(t.type){case"lattice":const s=t.verticesPerRow,l=Math.floor(r.length/s)-1,u=s-1;for(o=0;o=r?i=r:n=i/e,{scale:n,size:i}}clipBbox(e,t,n,r,o){const a=r-t,s=o-n;e.ctx.rect(t,n,a,s),e.current.updateRectMinMax((0,i.getCurrentTransform)(e.ctx),[t,n,r,o]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,n){const i=e.ctx,o=e.current;switch(t){case 1:const e=this.ctx;i.fillStyle=e.fillStyle,i.strokeStyle=e.strokeStyle,o.fillColor=e.fillStyle,o.strokeColor=e.strokeStyle;break;case 2:const a=r.Util.makeHexColor(n[0],n[1],n[2]);i.fillStyle=a,i.strokeStyle=a,o.fillColor=a,o.strokeColor=a;break;default:throw new r.FormatError(`Unsupported paint type: ${t}`)}}getPattern(e,t,n,i){let a=n;i!==o.SHADING&&(a=r.Util.transform(a,t.baseTransform),this.matrix&&(a=r.Util.transform(a,this.matrix)));const s=this.createPatternCanvas(t);let l=new DOMMatrix(a);l=l.translate(s.offsetX,s.offsetY),l=l.scale(1/s.scaleX,1/s.scaleY);const c=e.createPattern(s.canvas,"repeat");return c.setTransform(l),c}}t.TilingPattern=p},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.applyMaskImageData=function({src:e,srcPos:t=0,dest:n,destPos:i=0,width:o,height:a,inverseDecode:s=!1}){const l=r.FeatureTest.isLittleEndian?4278190080:255,[c,u]=s?[0,l]:[l,0],d=o>>3,h=7&o,p=e.length;n=new Uint32Array(n.buffer);for(let r=0;r{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;const n=Object.create(null);t.GlobalWorkerOptions=n,n.workerPort=null,n.workerSrc=""},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0;var r=n(1);function i(e){switch(e instanceof Error||"object"==typeof e&&null!==e||(0,r.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new r.AbortException(e.message);case"MissingPDFException":return new r.MissingPDFException(e.message);case"PasswordException":return new r.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new r.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new r.UnknownErrorException(e.message,e.details);default:return new r.UnknownErrorException(e.message,e.toString())}}t.MessageHandler=class{constructor(e,t,n){this.sourceName=e,this.targetName=t,this.comObj=n,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=e=>{const t=e.data;if(t.targetName!==this.sourceName)return;if(t.stream)return void this._processStreamMessage(t);if(t.callback){const e=t.callbackId,n=this.callbackCapabilities[e];if(!n)throw new Error(`Cannot resolve callback ${e}`);if(delete this.callbackCapabilities[e],1===t.callback)n.resolve(t.data);else{if(2!==t.callback)throw new Error("Unexpected callback case");n.reject(i(t.reason))}return}const r=this.actionHandler[t.action];if(!r)throw new Error(`Unknown action from worker: ${t.action}`);if(t.callbackId){const e=this.sourceName,o=t.sourceName;new Promise((function(e){e(r(t.data))})).then((function(r){n.postMessage({sourceName:e,targetName:o,callback:1,callbackId:t.callbackId,data:r})}),(function(r){n.postMessage({sourceName:e,targetName:o,callback:2,callbackId:t.callbackId,reason:i(r)})}))}else t.streamId?this._createStreamSink(t):r(t.data)},n.addEventListener("message",this._onComObjOnMessage)}on(e,t){const n=this.actionHandler;if(n[e])throw new Error(`There is already an actionName called "${e}"`);n[e]=t}send(e,t,n){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},n)}sendWithPromise(e,t,n){const i=this.callbackId++,o=(0,r.createPromiseCapability)();this.callbackCapabilities[i]=o;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:i,data:t},n)}catch(e){o.reject(e)}return o.promise}sendWithStream(e,t,n,o){const a=this.streamId++,s=this.sourceName,l=this.targetName,c=this.comObj;return new ReadableStream({start:n=>{const i=(0,r.createPromiseCapability)();return this.streamControllers[a]={controller:n,startCall:i,pullCall:null,cancelCall:null,isClosed:!1},c.postMessage({sourceName:s,targetName:l,action:e,streamId:a,data:t,desiredSize:n.desiredSize},o),i.promise},pull:e=>{const t=(0,r.createPromiseCapability)();return this.streamControllers[a].pullCall=t,c.postMessage({sourceName:s,targetName:l,stream:6,streamId:a,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,r.assert)(e instanceof Error,"cancel must have a valid reason");const t=(0,r.createPromiseCapability)();return this.streamControllers[a].cancelCall=t,this.streamControllers[a].isClosed=!0,c.postMessage({sourceName:s,targetName:l,stream:1,streamId:a,reason:i(e)}),t.promise}},n)}_createStreamSink(e){const t=e.streamId,n=this.sourceName,o=e.sourceName,a=this.comObj,s=this,l=this.actionHandler[e.action],c={enqueue(e,i=1,s){if(this.isCancelled)return;const l=this.desiredSize;this.desiredSize-=i,l>0&&this.desiredSize<=0&&(this.sinkCapability=(0,r.createPromiseCapability)(),this.ready=this.sinkCapability.promise),a.postMessage({sourceName:n,targetName:o,stream:4,streamId:t,chunk:e},s)},close(){this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:n,targetName:o,stream:3,streamId:t}),delete s.streamSinks[t])},error(e){(0,r.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:n,targetName:o,stream:5,streamId:t,reason:i(e)}))},sinkCapability:(0,r.createPromiseCapability)(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[t]=c,new Promise((function(t){t(l(e.data,c))})).then((function(){a.postMessage({sourceName:n,targetName:o,stream:8,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:n,targetName:o,stream:8,streamId:t,reason:i(e)})}))}_processStreamMessage(e){const t=e.streamId,n=this.sourceName,o=e.sourceName,a=this.comObj,s=this.streamControllers[t],l=this.streamSinks[t];switch(e.stream){case 8:e.success?s.startCall.resolve():s.startCall.reject(i(e.reason));break;case 7:e.success?s.pullCall.resolve():s.pullCall.reject(i(e.reason));break;case 6:if(!l){a.postMessage({sourceName:n,targetName:o,stream:7,streamId:t,success:!0});break}l.desiredSize<=0&&e.desiredSize>0&&l.sinkCapability.resolve(),l.desiredSize=e.desiredSize,new Promise((function(e){e(l.onPull&&l.onPull())})).then((function(){a.postMessage({sourceName:n,targetName:o,stream:7,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:n,targetName:o,stream:7,streamId:t,reason:i(e)})}));break;case 4:if((0,r.assert)(s,"enqueue should have stream controller"),s.isClosed)break;s.controller.enqueue(e.chunk);break;case 3:if((0,r.assert)(s,"close should have stream controller"),s.isClosed)break;s.isClosed=!0,s.controller.close(),this._deleteStreamController(s,t);break;case 5:(0,r.assert)(s,"error should have stream controller"),s.controller.error(i(e.reason)),this._deleteStreamController(s,t);break;case 2:e.success?s.cancelCall.resolve():s.cancelCall.reject(i(e.reason)),this._deleteStreamController(s,t);break;case 1:if(!l)break;new Promise((function(t){t(l.onCancel&&l.onCancel(i(e.reason)))})).then((function(){a.postMessage({sourceName:n,targetName:o,stream:2,streamId:t,success:!0})}),(function(e){a.postMessage({sourceName:n,targetName:o,stream:2,streamId:t,reason:i(e)})})),l.sinkCapability.reject(i(e.reason)),l.isCancelled=!0,delete this.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async _deleteStreamController(e,t){await Promise.allSettled([e.startCall&&e.startCall.promise,e.pullCall&&e.pullCall.promise,e.cancelCall&&e.cancelCall.promise]),delete this.streamControllers[t]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var r=n(1);t.Metadata=class{#ue;#de;constructor({parsedData:e,rawData:t}){this.#ue=e,this.#de=t}getRaw(){return this.#de}get(e){return this.#ue.get(e)??null}getAll(){return(0,r.objectFromMap)(this.#ue)}has(e){return this.#ue.has(e)}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var r=n(1),i=n(8);const o=Symbol("INTERNAL");class a{#he=!0;constructor(e,t){this.name=e,this.intent=t}get visible(){return this.#he}_setVisible(e,t){e!==o&&(0,r.unreachable)("Internal method `_setVisible` called."),this.#he=t}}t.OptionalContentConfig=class{#pe=null;#fe=new Map;#me=null;#ge=null;constructor(e){if(this.name=null,this.creator=null,null!==e){this.name=e.name,this.creator=e.creator,this.#ge=e.order;for(const t of e.groups)this.#fe.set(t.id,new a(t.name,t.intent));if("OFF"===e.baseState)for(const e of this.#fe.values())e._setVisible(o,!1);for(const t of e.on)this.#fe.get(t)._setVisible(o,!0);for(const t of e.off)this.#fe.get(t)._setVisible(o,!1);this.#me=this.getHash()}}#ve(e){const t=e.length;if(t<2)return!0;const n=e[0];for(let i=1;i0?(0,r.objectFromMap)(this.#fe):null}getGroup(e){return this.#fe.get(e)||null}getHash(){if(null!==this.#pe)return this.#pe;const e=new i.MurmurHash3_64;for(const[t,n]of this.#fe)e.update(`${t}:${n.visible}`);return this.#pe=e.hexdigest()}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var r=n(1),i=n(6);t.PDFDataTransportStream=class{constructor({length:e,initialData:t,progressiveDone:n=!1,contentDispositionFilename:i=null,disableRange:o=!1,disableStream:a=!1},s){if((0,r.assert)(s,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=n,this._contentDispositionFilename=i,t?.length>0){const e=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=s,this._isStreamingSupported=!a,this._isRangeSupported=!o,this._contentLength=e,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(((e,t)=>{this._onReceiveData({begin:e,chunk:t})})),this._pdfDataRangeTransport.addProgressListener(((e,t)=>{this._onProgress({loaded:e,total:t})})),this._pdfDataRangeTransport.addProgressiveReadListener((e=>{this._onReceiveData({chunk:e})})),this._pdfDataRangeTransport.addProgressiveDoneListener((()=>{this._onProgressiveDone()})),this._pdfDataRangeTransport.transportReady()}_onReceiveData({begin:e,chunk:t}){const n=t instanceof Uint8Array&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t).buffer;if(void 0===e)this._fullRequestReader?this._fullRequestReader._enqueue(n):this._queuedChunks.push(n);else{const t=this._rangeReaders.some((function(t){return t._begin===e&&(t._enqueue(n),!0)}));(0,r.assert)(t,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){void 0===e.total?this._rangeReaders[0]?.onProgress?.({loaded:e.loaded}):this._fullRequestReader?.onProgress?.({loaded:e.loaded,total:e.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){const t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)}getFullReader(){(0,r.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const e=this._queuedChunks;return this._queuedChunks=null,new o(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=new a(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeReaders.slice(0))t.cancel(e);this._pdfDataRangeTransport.abort()}};class o{constructor(e,t,n=!1,r=null){this._stream=e,this._done=n||!1,this._filename=(0,i.isPdfFile)(r)?r:null,this._queuedChunks=t||[],this._loaded=0;for(const e of this._queuedChunks)this._loaded+=e.byteLength;this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}_enqueue(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class a{constructor(e,t,n){this._stream=e,this._begin=t,this._end=n,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0;class n{static textContent(e){const t=[],r={items:t,styles:Object.create(null)};return function e(r){if(!r)return;let i=null;const o=r.name;if("#text"===o)i=r.value;else{if(!n.shouldBuildText(o))return;r?.attributes?.textContent?i=r.attributes.textContent:r.value&&(i=r.value)}if(null!==i&&t.push({str:i}),r.children)for(const t of r.children)e(t)}(e),r}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}t.XfaText=n},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0;var r=n(7);const i=function(e){return new Promise(((t,n)=>{__webpack_require__(3237).readFile(e,((e,r)=>{!e&&r?t(new Uint8Array(r)):n(new Error(e))}))}))};class o extends r.BaseCanvasFactory{_createCanvas(e,t){return __webpack_require__(7640).createCanvas(e,t)}}t.NodeCanvasFactory=o;class a extends r.BaseCMapReaderFactory{_fetchData(e,t){return i(e).then((e=>({cMapData:e,compressionType:t})))}}t.NodeCMapReaderFactory=a;class s extends r.BaseStandardFontDataFactory{_fetchData(e){return i(e)}}t.NodeStandardFontDataFactory=s},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var r=n(1),i=n(22);const o=__webpack_require__(3237),a=__webpack_require__(7492),s=__webpack_require__(1815),l=__webpack_require__(6671),c=/^file:\/\/\/[a-zA-Z]:\//;t.PDFNodeStream=class{constructor(e){this.source=e,this.url=function(e){const t=l.parse(e);return"file:"===t.protocol||t.host?t:/^[a-z]:[/\\]/i.test(e)?l.parse(`file:///${e}`):(t.host||(t.protocol="file:"),t)}(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=this.isFsUrl?new m(this):new p(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=this.isFsUrl?new g(this,e,t):new f(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class u{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;const t=e.source;this._contentLength=t.length,this._loaded=0,this._filename=null,this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._readableStream=null,this._readCapability=(0,r.createPromiseCapability)(),this._headersCapability=(0,r.createPromiseCapability)()}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=(0,r.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new r.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class d{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,r.createPromiseCapability)();const t=e.source;this._isStreamingSupported=!t.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const e=this._readableStream.read();return null===e?(this._readCapability=(0,r.createPromiseCapability)(),this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){this._readableStream=e,e.on("readable",(()=>{this._readCapability.resolve()})),e.on("end",(()=>{e.destroy(),this._done=!0,this._readCapability.resolve()})),e.on("error",(e=>{this._error(e)})),this._storedError&&this._readableStream.destroy(this._storedError)}}function h(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class p extends u{constructor(e){super(e);const t=t=>{if(404===t.statusCode){const e=new r.MissingPDFException(`Missing PDF "${this._url}".`);return this._storedError=e,void this._headersCapability.reject(e)}this._headersCapability.resolve(),this._setReadableStream(t);const n=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:o,suggestedLength:a}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:n,isHttp:e.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=o,this._contentLength=a||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(n)};this._request=null,"http:"===this._url.protocol?this._request=a.request(h(this._url,e.httpHeaders),t):this._request=s.request(h(this._url,e.httpHeaders),t),this._request.on("error",(e=>{this._storedError=e,this._headersCapability.reject(e)})),this._request.end()}}class f extends d{constructor(e,t,n){super(e),this._httpHeaders={};for(const t in e.httpHeaders){const n=e.httpHeaders[t];void 0!==n&&(this._httpHeaders[t]=n)}this._httpHeaders.Range=`bytes=${t}-${n-1}`;const i=e=>{if(404!==e.statusCode)this._setReadableStream(e);else{const e=new r.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e}};this._request=null,"http:"===this._url.protocol?this._request=a.request(h(this._url,this._httpHeaders),i):this._request=s.request(h(this._url,this._httpHeaders),i),this._request.on("error",(e=>{this._storedError=e})),this._request.end()}}class m extends u{constructor(e){super(e);let t=decodeURIComponent(this._url.path);c.test(this._url.href)&&(t=t.replace(/^\//,"")),o.lstat(t,((e,n)=>{if(e)return"ENOENT"===e.code&&(e=new r.MissingPDFException(`Missing PDF "${t}".`)),this._storedError=e,void this._headersCapability.reject(e);this._contentLength=n.size,this._setReadableStream(o.createReadStream(t)),this._headersCapability.resolve()}))}}class g extends d{constructor(e,t,n){super(e);let r=decodeURIComponent(this._url.path);c.test(this._url.href)&&(r=r.replace(/^\//,"")),this._setReadableStream(o.createReadStream(r,{start:t,end:n-1}))}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new r.MissingPDFException('Missing PDF "'+t+'".'):new r.UnexpectedResponseException(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)},t.extractFilenameFromHeader=function(e){const t=e("Content-Disposition");if(t){let e=(0,i.getFilenameFromContentDispositionHeader)(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch(e){}if((0,o.isPdfFile)(e))return e}return null},t.validateRangeRequestCapabilities=function({getResponseHeader:e,isHttp:t,rangeChunkSize:n,disableRange:r}){const i={allowRangeRequests:!1,suggestedLength:void 0},o=parseInt(e("Content-Length"),10);return Number.isInteger(o)?(i.suggestedLength=o,o<=2*n||r||!t||"bytes"!==e("Accept-Ranges")||"identity"!==(e("Content-Encoding")||"identity")||(i.allowRangeRequests=!0),i):i},t.validateResponseStatus=function(e){return 200===e||206===e};var r=n(1),i=n(23),o=n(6)},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){let t=!0,n=i("filename\\*","i").exec(e);if(n){n=n[1];let e=s(n);return e=unescape(e),e=l(e),e=c(e),a(e)}if(n=function(e){const t=[];let n;const r=i("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;null!==(n=r.exec(e));){let[,e,r,i]=n;if(e=parseInt(e,10),e in t){if(0===e)break}else t[e]=[r,i]}const o=[];for(let e=0;e{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0;var r=n(1),i=n(22);class o{constructor(e,t={}){this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.getXhr=t.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,n){const r={begin:e,end:t};for(const e in n)r[e]=n[e];return this.request(r)}requestFull(e){return this.request(e)}request(e){const t=this.getXhr(),n=this.currXhrId++,r=this.pendingRequests[n]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(const e in this.httpHeaders){const n=this.httpHeaders[e];void 0!==n&&t.setRequestHeader(e,n)}return this.isHttp&&"begin"in e&&"end"in e?(t.setRequestHeader("Range",`bytes=${e.begin}-${e.end-1}`),r.expectedStatus=206):r.expectedStatus=200,t.responseType="arraybuffer",e.onError&&(t.onerror=function(n){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,n),t.onprogress=this.onProgress.bind(this,n),r.onHeadersReceived=e.onHeadersReceived,r.onDone=e.onDone,r.onError=e.onError,r.onProgress=e.onProgress,t.send(null),n}onProgress(e,t){const n=this.pendingRequests[e];n&&n.onProgress?.(t)}onStateChange(e,t){const n=this.pendingRequests[e];if(!n)return;const i=n.xhr;if(i.readyState>=2&&n.onHeadersReceived&&(n.onHeadersReceived(),delete n.onHeadersReceived),4!==i.readyState)return;if(!(e in this.pendingRequests))return;if(delete this.pendingRequests[e],0===i.status&&this.isHttp)return void n.onError?.(i.status);const o=i.status||200;if((200!==o||206!==n.expectedStatus)&&o!==n.expectedStatus)return void n.onError?.(i.status);const a=function(e){const t=e.response;return"string"!=typeof t?t:(0,r.stringToBytes)(t).buffer}(i);if(206===o){const e=i.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);n.onDone({begin:parseInt(t[1],10),chunk:a})}else a?n.onDone({begin:0,chunk:a}):n.onError?.(i.status)}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){const t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}t.PDFNetworkStream=class{constructor(e){this._source=e,this._manager=new o(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){const t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new a(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){const n=new s(this._manager,e,t);return n.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class a{constructor(e,t){this._manager=e;const n={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(n),this._headersReceivedCapability=(0,r.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),n=e=>t.getResponseHeader(e),{allowRangeRequests:r,suggestedLength:o}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:n,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});r&&(this._isRangeSupported=!0),this._contentLength=o||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(n),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(this._requests.length>0?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=(0,i.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){this.onProgress?.({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class s{constructor(e,t,n){this._manager=e;const r={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,n,r),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(e){const t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=(0,i.createResponseStatusError)(e,this._url);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){this.isStreamingSupported||this.onProgress?.({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=(0,r.createPromiseCapability)();return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var r=n(1),i=n(22);function o(e,t,n){return{method:"GET",headers:e,signal:n.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function a(e){const t=new Headers;for(const n in e){const r=e[n];void 0!==r&&t.append(n,r)}return t}function s(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:((0,r.warn)(`getArrayBuffer - unexpected data format: ${e}`),new Uint8Array(e).buffer)}t.PDFFetchStream=class{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new l(this),this._fullRequestReader}getRangeReader(e,t){if(t<=this._progressiveDataLength)return null;const n=new c(this,e,t);return this._rangeRequestReaders.push(n),n}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class l{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;const t=e.source;this._withCredentials=t.withCredentials||!1,this._contentLength=t.length,this._headersCapability=(0,r.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!t.disableStream,this._isRangeSupported=!t.disableRange,this._headers=a(this._stream.httpHeaders);const n=t.url;fetch(n,o(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,n);this._reader=e.body.getReader(),this._headersCapability.resolve();const t=t=>e.headers.get(t),{allowRangeRequests:o,suggestedLength:a}=(0,i.validateRangeRequestCapabilities)({getResponseHeader:t,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=o,this._contentLength=a||this._contentLength,this._filename=(0,i.extractFilenameFromHeader)(t),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new r.AbortException("Streaming is disabled."))})).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:s(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}class c{constructor(e,t,n){this._stream=e,this._reader=null,this._loaded=0;const s=e.source;this._withCredentials=s.withCredentials||!1,this._readCapability=(0,r.createPromiseCapability)(),this._isStreamingSupported=!s.disableStream,this._abortController=new AbortController,this._headers=a(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-${n-1}`);const l=s.url;fetch(l,o(this._headers,this._withCredentials,this._abortController)).then((e=>{if(!(0,i.validateResponseStatus)(e.status))throw(0,i.createResponseStatusError)(e.status,l);this._readCapability.resolve(),this._reader=e.body.getReader()})).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded}),{value:s(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=function(e){e.textContentSource||!e.textContent&&!e.textContentStream||((0,i.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),e.textContentSource=e.textContent||e.textContentStream);const t=new u(e);return t._render(),t},t.updateTextLayer=function({container:e,viewport:t,textDivs:n,textDivProperties:r,isOffscreenCanvasSupported:o,mustRotate:a=!0,mustRescale:l=!0}){if(a&&(0,i.setLayerDimensions)(e,{rotation:t.rotation}),l){const e=s(0,o),i={prevFontSize:null,prevFontFamily:null,div:null,scale:t.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:e};for(const e of n)i.properties=r.get(e),i.div=e,c(i)}};var r=n(1),i=n(6);const o=30,a=new Map;function s(e,t){let n;if(t&&r.FeatureTest.isOffscreenCanvasSupported)n=new OffscreenCanvas(e,e).getContext("2d",{alpha:!1});else{const t=document.createElement("canvas");t.width=t.height=e,n=t.getContext("2d",{alpha:!1})}return n}function l(e,t,n){const i=document.createElement("span"),l={angle:0,canvasWidth:0,hasText:""!==t.str,hasEOL:t.hasEOL,fontSize:0};e._textDivs.push(i);const c=r.Util.transform(e._transform,t.transform);let u=Math.atan2(c[1],c[0]);const d=n[t.fontName];d.vertical&&(u+=Math.PI/2);const h=Math.hypot(c[2],c[3]),p=h*function(e,t){const n=a.get(e);if(n)return n;const r=s(o,t);r.font=`30px ${e}`;const i=r.measureText("");let l=i.fontBoundingBoxAscent,c=Math.abs(i.fontBoundingBoxDescent);if(l){const t=l/(l+c);return a.set(e,t),r.canvas.width=r.canvas.height=0,t}r.strokeStyle="red",r.clearRect(0,0,o,o),r.strokeText("g",0,0);let u=r.getImageData(0,0,o,o).data;c=0;for(let e=u.length-1-3;e>=0;e-=4)if(u[e]>0){c=Math.ceil(e/4/o);break}r.clearRect(0,0,o,o),r.strokeText("A",0,o),u=r.getImageData(0,0,o,o).data,l=0;for(let e=0,t=u.length;e0){l=o-Math.floor(e/4/o);break}if(r.canvas.width=r.canvas.height=0,l){const t=l/(l+c);return a.set(e,t),t}return a.set(e,.8),.8}(d.fontFamily,e._isOffscreenCanvasSupported);let f,m;0===u?(f=c[4],m=c[5]-p):(f=c[4]+p*Math.sin(u),m=c[5]-p*Math.cos(u));const g="calc(var(--scale-factor)*",v=i.style;e._container===e._rootContainer?(v.left=`${(100*f/e._pageWidth).toFixed(2)}%`,v.top=`${(100*m/e._pageHeight).toFixed(2)}%`):(v.left=`${g}${f.toFixed(2)}px)`,v.top=`${g}${m.toFixed(2)}px)`),v.fontSize=`${g}${h.toFixed(2)}px)`,v.fontFamily=d.fontFamily,l.fontSize=h,i.setAttribute("role","presentation"),i.textContent=t.str,i.dir=t.dir,e._fontInspectorEnabled&&(i.dataset.fontName=t.fontName),0!==u&&(l.angle=u*(180/Math.PI));let y=!1;if(t.str.length>1)y=!0;else if(" "!==t.str&&t.transform[0]!==t.transform[3]){const e=Math.abs(t.transform[0]),n=Math.abs(t.transform[3]);e!==n&&Math.max(e,n)/Math.min(e,n)>1.5&&(y=!0)}y&&(l.canvasWidth=d.vertical?t.height:t.width),e._textDivProperties.set(i,l),e._isReadableStream&&e._layoutText(i)}function c(e){const{div:t,scale:n,properties:r,ctx:i,prevFontSize:o,prevFontFamily:a}=e,{style:s}=t;let l="";if(0!==r.canvasWidth&&r.hasText){const{fontFamily:c}=s,{canvasWidth:u,fontSize:d}=r;o===d&&a===c||(i.font=`${d*n}px ${c}`,e.prevFontSize=d,e.prevFontFamily=c);const{width:h}=i.measureText(t.textContent);h>0&&(l=`scaleX(${u*n/h})`)}0!==r.angle&&(l=`rotate(${r.angle}deg) ${l}`),l.length>0&&(s.transform=l)}class u{constructor({textContentSource:e,container:t,viewport:n,textDivs:o,textDivProperties:a,textContentItemsStr:l,isOffscreenCanvasSupported:c}){this._textContentSource=e,this._isReadableStream=e instanceof ReadableStream,this._container=this._rootContainer=t,this._textDivs=o||[],this._textContentItemsStr=l||[],this._isOffscreenCanvasSupported=c,this._fontInspectorEnabled=!!globalThis.FontInspector?.enabled,this._reader=null,this._textDivProperties=a||new WeakMap,this._canceled=!1,this._capability=(0,r.createPromiseCapability)(),this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:n.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:s(0,c)};const{pageWidth:u,pageHeight:d,pageX:h,pageY:p}=n.rawDims;this._transform=[1,0,0,-1,-h,p+d],this._pageWidth=u,this._pageHeight=d,(0,i.setLayerDimensions)(t,n),this._capability.promise.finally((()=>{this._layoutTextParams=null})).catch((()=>{}))}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new r.AbortException("TextLayer task cancelled.")).catch((()=>{})),this._reader=null),this._capability.reject(new r.AbortException("TextLayer task cancelled."))}_processItems(e,t){for(const n of e)if(void 0!==n.str)this._textContentItemsStr.push(n.str),l(this,n,t);else if("beginMarkedContentProps"===n.type||"beginMarkedContent"===n.type){const e=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==n.id&&this._container.setAttribute("id",`${n.id}`),e.append(this._container)}else"endMarkedContent"===n.type&&(this._container=this._container.parentNode)}_layoutText(e){const t=this._layoutTextParams.properties=this._textDivProperties.get(e);if(this._layoutTextParams.div=e,c(this._layoutTextParams),t.hasText&&this._container.append(e),t.hasEOL){const e=document.createElement("br");e.setAttribute("role","presentation"),this._container.append(e)}}_render(){const e=(0,r.createPromiseCapability)();let t=Object.create(null);if(this._isReadableStream){const n=()=>{this._reader.read().then((({value:r,done:i})=>{i?e.resolve():(Object.assign(t,r.styles),this._processItems(r.items,t),n())}),e.reject)};this._reader=this._textContentSource.getReader(),n()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');{const{items:t,styles:n}=this._textContentSource;this._processItems(t,n),e.resolve()}}e.promise.then((()=>{t=null,function(e){if(e._canceled)return;const t=e._textDivs,n=e._capability;if(t.length>1e5)n.resolve();else{if(!e._isReadableStream)for(const n of t)e._layoutText(n);n.resolve()}}(this)}),this._capability.reject)}}t.TextLayerRenderTask=u},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayer=void 0;var r=n(1),i=n(5),o=n(28),a=n(29),s=n(6);class l{#ye;#be=!1;#Ee=this.pointerup.bind(this);#Se=this.pointerdown.bind(this);#we=new Map;#_e=!1;#ke=!1;#Ce;static _initialized=!1;constructor(e){l._initialized||(l._initialized=!0,o.FreeTextEditor.initialize(e.l10n),a.InkEditor.initialize(e.l10n)),e.uiManager.registerEditorTypes([o.FreeTextEditor,a.InkEditor]),this.#Ce=e.uiManager,this.pageIndex=e.pageIndex,this.div=e.div,this.#ye=e.accessibilityManager,this.#Ce.addLayer(this)}get isEmpty(){return 0===this.#we.size}updateToolbar(e){this.#Ce.updateToolbar(e)}updateMode(e=this.#Ce.getMode()){this.#Pe(),e===r.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),this.#Ce.unselectAll(),e!==r.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",e===r.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",e===r.AnnotationEditorType.INK),this.div.hidden=!1)}addInkEditorIfNeeded(e){if(e||this.#Ce.getMode()===r.AnnotationEditorType.INK){if(!e)for(const e of this.#we.values())if(e.isEmpty())return void e.setInBackground();this.#xe({offsetX:0,offsetY:0}).setInBackground()}}setEditingState(e){this.#Ce.setEditingState(e)}addCommands(e){this.#Ce.addCommands(e)}enable(){this.div.style.pointerEvents="auto";for(const e of this.#we.values())e.enableEditing()}disable(){this.div.style.pointerEvents="none";for(const e of this.#we.values())e.disableEditing();this.#Pe(),this.isEmpty&&(this.div.hidden=!0)}setActiveEditor(e){this.#Ce.getActive()!==e&&this.#Ce.setActiveEditor(e)}enableClick(){this.div.addEventListener("pointerdown",this.#Se),this.div.addEventListener("pointerup",this.#Ee)}disableClick(){this.div.removeEventListener("pointerdown",this.#Se),this.div.removeEventListener("pointerup",this.#Ee)}attach(e){this.#we.set(e.id,e)}detach(e){this.#we.delete(e.id),this.#ye?.removePointerInTextLayer(e.contentDiv)}remove(e){this.#Ce.removeEditor(e),this.detach(e),e.div.style.display="none",setTimeout((()=>{e.div.style.display="",e.div.remove(),e.isAttachedToDOM=!1,document.activeElement===document.body&&this.#Ce.focusMainContainer()}),0),this.#ke||this.addInkEditorIfNeeded(!1)}#Ae(e){e.parent!==this&&(this.attach(e),e.parent?.detach(e),e.setParent(this),e.div&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div)))}add(e){if(this.#Ae(e),this.#Ce.addEditor(e),this.attach(e),!e.isAttachedToDOM){const t=e.render();this.div.append(t),e.isAttachedToDOM=!0}this.moveEditorInDOM(e),e.onceAdded(),this.#Ce.addToAnnotationStorage(e)}moveEditorInDOM(e){this.#ye?.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}addOrRebuild(e){e.needsToBeRebuilt()?e.rebuild():this.add(e)}addANewEditor(e){this.addCommands({cmd:()=>{this.addOrRebuild(e)},undo:()=>{e.remove()},mustExec:!0})}addUndoableEditor(e){this.addCommands({cmd:()=>{this.addOrRebuild(e)},undo:()=>{e.remove()},mustExec:!1})}getNextId(){return this.#Ce.getId()}#Me(e){switch(this.#Ce.getMode()){case r.AnnotationEditorType.FREETEXT:return new o.FreeTextEditor(e);case r.AnnotationEditorType.INK:return new a.InkEditor(e)}return null}deserialize(e){switch(e.annotationType){case r.AnnotationEditorType.FREETEXT:return o.FreeTextEditor.deserialize(e,this,this.#Ce);case r.AnnotationEditorType.INK:return a.InkEditor.deserialize(e,this,this.#Ce)}return null}#xe(e){const t=this.getNextId(),n=this.#Me({parent:this,id:t,x:e.offsetX,y:e.offsetY,uiManager:this.#Ce});return n&&this.add(n),n}setSelected(e){this.#Ce.setSelected(e)}toggleSelected(e){this.#Ce.toggleSelected(e)}isSelected(e){return this.#Ce.isSelected(e)}unselect(e){this.#Ce.unselect(e)}pointerup(e){const{isMac:t}=r.FeatureTest.platform;0!==e.button||e.ctrlKey&&t||e.target===this.div&&this.#_e&&(this.#_e=!1,this.#be?this.#xe(e):this.#be=!0)}pointerdown(e){const{isMac:t}=r.FeatureTest.platform;if(0!==e.button||e.ctrlKey&&t)return;if(e.target!==this.div)return;this.#_e=!0;const n=this.#Ce.getActive();this.#be=!n||n.isEmpty()}drop(e){const t=e.dataTransfer.getData("text/plain"),n=this.#Ce.getEditor(t);if(!n)return;e.preventDefault(),e.dataTransfer.dropEffect="move",this.#Ae(n);const r=this.div.getBoundingClientRect(),i=e.clientX-r.x,o=e.clientY-r.y;n.translate(i-n.startX,o-n.startY),this.moveEditorInDOM(n),n.div.focus()}dragover(e){e.preventDefault()}destroy(){this.#Ce.getActive()?.parent===this&&this.#Ce.setActiveEditor(null);for(const e of this.#we.values())this.#ye?.removePointerInTextLayer(e.contentDiv),e.setParent(null),e.isAttachedToDOM=!1,e.div.remove();this.div=null,this.#we.clear(),this.#Ce.removeLayer(this)}#Pe(){this.#ke=!0;for(const e of this.#we.values())e.isEmpty()&&e.remove();this.#ke=!1}render({viewport:e}){this.viewport=e,(0,s.setLayerDimensions)(this.div,e),(0,i.bindEvents)(this,this.div,["dragover","drop"]);for(const e of this.#Ce.getEditors(this.pageIndex))this.add(e);this.updateMode()}update({viewport:e}){this.#Ce.commitOrRemove(),this.viewport=e,(0,s.setLayerDimensions)(this.div,{rotation:e.rotation}),this.updateMode()}get pageDimensions(){const{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}}t.AnnotationEditorLayer=l},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FreeTextEditor=void 0;var r=n(1),i=n(5),o=n(4);class a extends o.AnnotationEditor{#Te=this.editorDivBlur.bind(this);#Re=this.editorDivFocus.bind(this);#Oe=this.editorDivInput.bind(this);#Ie=this.editorDivKeydown.bind(this);#De;#Le="";#Fe=`${this.id}-editor`;#Ne=!1;#je;static _freeTextDefaultContent="";static _l10nPromise;static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static _keyboardManager=new i.KeyboardManager([[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],a.prototype.commitOrRemove]]);static _type="freetext";constructor(e){super({...e,name:"freeTextEditor"}),this.#De=e.color||a._defaultColor||o.AnnotationEditor._defaultLineColor,this.#je=e.fontSize||a._defaultFontSize}static initialize(e){this._l10nPromise=new Map(["free_text2_default_content","editor_free_text2_aria_label"].map((t=>[t,e.get(t)])));const t=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(t.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case r.AnnotationEditorParamsType.FREETEXT_SIZE:a._defaultFontSize=t;break;case r.AnnotationEditorParamsType.FREETEXT_COLOR:a._defaultColor=t}}updateParams(e,t){switch(e){case r.AnnotationEditorParamsType.FREETEXT_SIZE:this.#Be(t);break;case r.AnnotationEditorParamsType.FREETEXT_COLOR:this.#Ue(t)}}static get defaultPropertiesToUpdate(){return[[r.AnnotationEditorParamsType.FREETEXT_SIZE,a._defaultFontSize],[r.AnnotationEditorParamsType.FREETEXT_COLOR,a._defaultColor||o.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[r.AnnotationEditorParamsType.FREETEXT_SIZE,this.#je],[r.AnnotationEditorParamsType.FREETEXT_COLOR,this.#De]]}#Be(e){const t=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--scale-factor))`,this.translate(0,-(e-this.#je)*this.parentScale),this.#je=e,this.#ze()},n=this.#je;this.addCommands({cmd:()=>{t(e)},undo:()=>{t(n)},mustExec:!0,type:r.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#Ue(e){const t=this.#De;this.addCommands({cmd:()=>{this.#De=this.editorDiv.style.color=e},undo:()=>{this.#De=this.editorDiv.style.color=t},mustExec:!0,type:r.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}getInitialTranslation(){const e=this.parentScale;return[-a._internalPadding*e,-(a._internalPadding+this.#je)*e]}rebuild(){super.rebuild(),null!==this.div&&(this.isAttachedToDOM||this.parent.add(this))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(r.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this.div.draggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",this.#Ie),this.editorDiv.addEventListener("focus",this.#Re),this.editorDiv.addEventListener("blur",this.#Te),this.editorDiv.addEventListener("input",this.#Oe))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#Fe),this.div.draggable=!0,this.editorDiv.removeEventListener("keydown",this.#Ie),this.editorDiv.removeEventListener("focus",this.#Re),this.editorDiv.removeEventListener("blur",this.#Te),this.editorDiv.removeEventListener("input",this.#Oe),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(e){super.focusin(e),e.target!==this.editorDiv&&this.editorDiv.focus()}onceAdded(){this.width||(this.enableEditMode(),this.editorDiv.focus())}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing"),super.remove()}#Ve(){const e=this.editorDiv.getElementsByTagName("div");if(0===e.length)return this.editorDiv.innerText;const t=[];for(const n of e)t.push(n.innerText.replace(/\r\n?|\n/,""));return t.join("\n")}#ze(){const[e,t]=this.parentDimensions;let n;if(this.isAttachedToDOM)n=this.div.getBoundingClientRect();else{const{currentLayer:e,div:t}=this,r=t.style.display;t.style.display="hidden",e.div.append(this.div),n=t.getBoundingClientRect(),t.remove(),t.style.display=r}this.width=n.width/e,this.height=n.height/t}commit(){this.isInEditMode()&&(super.commit(),this.#Ne||(this.#Ne=!0,this.parent.addUndoableEditor(this)),this.disableEditMode(),this.#Le=this.#Ve().trimEnd(),this.#ze())}shouldGetKeyboardEvents(){return this.isInEditMode()}dblclick(e){this.enableEditMode(),this.editorDiv.focus()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enableEditMode(),this.editorDiv.focus())}editorDivKeydown(e){a._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#Fe),this.enableEditing(),a._l10nPromise.get("editor_free_text2_aria_label").then((e=>this.editorDiv?.setAttribute("aria-label",e))),a._l10nPromise.get("free_text2_default_content").then((e=>this.editorDiv?.setAttribute("default-content",e))),this.editorDiv.contentEditable=!0;const{style:n}=this.editorDiv;if(n.fontSize=`calc(${this.#je}px * var(--scale-factor))`,n.color=this.#De,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,i.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[n,r]=this.parentDimensions;this.setAt(e*n,t*r,this.width*n,this.height*r);for(const e of this.#Le.split("\n")){const t=document.createElement("div");t.append(e?document.createTextNode(e):document.createElement("br")),this.editorDiv.append(t)}this.div.draggable=!0,this.editorDiv.contentEditable=!1}else this.div.draggable=!1,this.editorDiv.contentEditable=!0;return this.div}get contentDiv(){return this.editorDiv}static deserialize(e,t,n){const i=super.deserialize(e,t,n);return i.#je=e.fontSize,i.#De=r.Util.makeHexColor(...e.color),i.#Le=e.value,i}serialize(){if(this.isEmpty())return null;const e=a._internalPadding*this.parentScale,t=this.getRect(e,e),n=o.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#De);return{annotationType:r.AnnotationEditorType.FREETEXT,color:n,fontSize:this.#je,value:this.#Le,pageIndex:this.pageIndex,rect:t,rotation:this.rotation}}}t.FreeTextEditor=a},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0,Object.defineProperty(t,"fitCurve",{enumerable:!0,get:function(){return o.fitCurve}});var r=n(1),i=n(4),o=n(30),a=n(5);const s=16;class l extends i.AnnotationEditor{#qe=0;#He=0;#We=0;#Ge=this.canvasPointermove.bind(this);#$e=this.canvasPointerleave.bind(this);#Ye=this.canvasPointerup.bind(this);#Ke=this.canvasPointerdown.bind(this);#Xe=!1;#Qe=!1;#Je=null;#Ze=null;#et=0;#tt=0;#nt=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _l10nPromise;static _type="ink";constructor(e){super({...e,name:"inkEditor"}),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0}static initialize(e){this._l10nPromise=new Map(["editor_ink_canvas_aria_label","editor_ink2_aria_label"].map((t=>[t,e.get(t)])))}static updateDefaultParams(e,t){switch(e){case r.AnnotationEditorParamsType.INK_THICKNESS:l._defaultThickness=t;break;case r.AnnotationEditorParamsType.INK_COLOR:l._defaultColor=t;break;case r.AnnotationEditorParamsType.INK_OPACITY:l._defaultOpacity=t/100}}updateParams(e,t){switch(e){case r.AnnotationEditorParamsType.INK_THICKNESS:this.#rt(t);break;case r.AnnotationEditorParamsType.INK_COLOR:this.#Ue(t);break;case r.AnnotationEditorParamsType.INK_OPACITY:this.#it(t)}}static get defaultPropertiesToUpdate(){return[[r.AnnotationEditorParamsType.INK_THICKNESS,l._defaultThickness],[r.AnnotationEditorParamsType.INK_COLOR,l._defaultColor||i.AnnotationEditor._defaultLineColor],[r.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*l._defaultOpacity)]]}get propertiesToUpdate(){return[[r.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||l._defaultThickness],[r.AnnotationEditorParamsType.INK_COLOR,this.color||l._defaultColor||i.AnnotationEditor._defaultLineColor],[r.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??l._defaultOpacity))]]}#rt(e){const t=this.thickness;this.addCommands({cmd:()=>{this.thickness=e,this.#ot()},undo:()=>{this.thickness=t,this.#ot()},mustExec:!0,type:r.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#Ue(e){const t=this.color;this.addCommands({cmd:()=>{this.color=e,this.#at()},undo:()=>{this.color=t,this.#at()},mustExec:!0,type:r.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#it(e){e/=100;const t=this.opacity;this.addCommands({cmd:()=>{this.opacity=e,this.#at()},undo:()=>{this.opacity=t,this.#at()},mustExec:!0,type:r.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){super.rebuild(),null!==this.div&&(this.canvas||(this.#st(),this.#lt()),this.isAttachedToDOM||(this.parent.add(this),this.#ct()),this.#ot())}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,this.#Ze.disconnect(),this.#Ze=null,super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){const[e,t]=this.parentDimensions,n=this.width*e,r=this.height*t;this.setDimensions(n,r)}enableEditMode(){this.#Xe||null===this.canvas||(super.enableEditMode(),this.div.draggable=!1,this.canvas.addEventListener("pointerdown",this.#Ke),this.canvas.addEventListener("pointerup",this.#Ye))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this.div.draggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",this.#Ke),this.canvas.removeEventListener("pointerup",this.#Ye))}onceAdded(){this.div.draggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}#ut(){const{parentRotation:e,parentDimensions:[t,n]}=this;switch(e){case 90:return[0,n,n,t];case 180:return[t,n,t,n];case 270:return[t,0,n,t];default:return[0,0,t,n]}}#dt(){const{ctx:e,color:t,opacity:n,thickness:r,parentScale:i,scaleFactor:o}=this;e.lineWidth=r*i/o,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle=`${t}${(0,a.opacityToHex)(n)}`}#ht(e,t){this.isEditing=!0,this.#Qe||(this.#Qe=!0,this.#ct(),this.thickness||=l._defaultThickness,this.color||=l._defaultColor||i.AnnotationEditor._defaultLineColor,this.opacity??=l._defaultOpacity),this.currentPath.push([e,t]),this.#Je=null,this.#dt(),this.ctx.beginPath(),this.ctx.moveTo(e,t),this.#nt=()=>{this.#nt&&(this.#Je&&(this.isEmpty()?(this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height)):this.#at(),this.ctx.lineTo(...this.#Je),this.#Je=null,this.ctx.stroke()),window.requestAnimationFrame(this.#nt))},window.requestAnimationFrame(this.#nt)}#pt(e,t){const[n,r]=this.currentPath.at(-1);e===n&&t===r||(this.currentPath.push([e,t]),this.#Je=[e,t])}#ft(e,t){this.ctx.closePath(),this.#nt=null,e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height);const[n,r]=this.currentPath.at(-1);let i;if(e===n&&t===r||this.currentPath.push([e,t]),1!==this.currentPath.length)i=(0,o.fitCurve)(this.currentPath,30,null);else{const n=[e,t];i=[[n,n.slice(),n.slice(),n]]}const a=l.#mt(i);this.currentPath.length=0,this.addCommands({cmd:()=>{this.paths.push(i),this.bezierPath2D.push(a),this.rebuild()},undo:()=>{this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(this.#st(),this.#lt()),this.#ot())},mustExec:!0})}#at(){if(this.isEmpty())return void this.#gt();this.#dt();const{canvas:e,ctx:t}=this;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),this.#gt();for(const e of this.bezierPath2D)t.stroke(e)}commit(){this.#Xe||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),this.#Xe=!0,this.div.classList.add("disabled"),this.#ot(!0),this.parent.addInkEditorIfNeeded(!0),this.parent.moveEditorInDOM(this),this.div.focus({preventScroll:!0}))}focusin(e){super.focusin(e),this.enableEditMode()}canvasPointerdown(e){0===e.button&&this.isInEditMode()&&!this.#Xe&&(this.setInForeground(),"mouse"!==e.type&&this.div.focus(),e.stopPropagation(),this.canvas.addEventListener("pointerleave",this.#$e),this.canvas.addEventListener("pointermove",this.#Ge),this.#ht(e.offsetX,e.offsetY))}canvasPointermove(e){e.stopPropagation(),this.#pt(e.offsetX,e.offsetY)}canvasPointerup(e){0===e.button&&this.isInEditMode()&&0!==this.currentPath.length&&(e.stopPropagation(),this.#vt(e),this.setInBackground())}canvasPointerleave(e){this.#vt(e),this.setInBackground()}#vt(e){this.#ft(e.offsetX,e.offsetY),this.canvas.removeEventListener("pointerleave",this.#$e),this.canvas.removeEventListener("pointermove",this.#Ge),this.addToAnnotationStorage()}#st(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",l._l10nPromise.get("editor_ink_canvas_aria_label").then((e=>this.canvas?.setAttribute("aria-label",e))),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}#lt(){let e=null;this.#Ze=new ResizeObserver((t=>{const n=t[0].contentRect;n.width&&n.height&&(null!==e&&clearTimeout(e),e=setTimeout((()=>{this.fixDims(),e=null}),100),this.setDimensions(n.width,n.height))})),this.#Ze.observe(this.div)}render(){if(this.div)return this.div;let e,t;this.width&&(e=this.x,t=this.y),super.render(),l._l10nPromise.get("editor_ink2_aria_label").then((e=>this.div?.setAttribute("aria-label",e)));const[n,r,i,o]=this.#ut();if(this.setAt(n,r,0,0),this.setDims(i,o),this.#st(),this.width){const[n,r]=this.parentDimensions;this.setAt(e*n,t*r,this.width*n,this.height*r),this.#Qe=!0,this.#ct(),this.setDims(this.width*n,this.height*r),this.#at(),this.#yt(),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();return this.#lt(),this.div}#ct(){if(!this.#Qe)return;const[e,t]=this.parentDimensions;this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),this.#gt()}setDimensions(e,t){const n=Math.round(e),r=Math.round(t);if(this.#et===n&&this.#tt===r)return;this.#et=n,this.#tt=r,this.canvas.style.visibility="hidden",this.#qe&&Math.abs(this.#qe-e/t)>.01&&(t=Math.ceil(e/this.#qe),this.setDims(e,t));const[i,o]=this.parentDimensions;this.width=e/i,this.height=t/o,this.#Xe&&this.#bt(e,t),this.#ct(),this.#at(),this.canvas.style.visibility="visible"}#bt(e,t){const n=this.#Et(),r=(e-n)/this.#We,i=(t-n)/this.#He;this.scaleFactor=Math.min(r,i)}#gt(){const e=this.#Et()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}static#mt(e){const t=new Path2D;for(let n=0,r=e.length;n=1?(e.minHeight="16px",e.minWidth=`${Math.round(this.#qe*s)}px`):(e.minWidth="16px",e.minHeight=`${Math.round(s/this.#qe)}px`)}static deserialize(e,t,n){const i=super.deserialize(e,t,n);i.thickness=e.thickness,i.color=r.Util.makeHexColor(...e.color),i.opacity=e.opacity;const[o,a]=i.pageDimensions,l=i.width*o,c=i.height*a,u=i.parentScale,d=e.thickness/2;i.#qe=l/c,i.#Xe=!0,i.#et=Math.round(l),i.#tt=Math.round(c);for(const{bezier:t}of e.paths){const e=[];i.paths.push(e);let n=u*(t[0]-d),r=u*(c-t[1]-d);for(let i=2,o=t.length;i{Object.defineProperty(t,"__esModule",{value:!0}),t.fitCurve=void 0;const r=n(31);t.fitCurve=r},e=>{function t(e,i,o,a,s){var c,u,d,h,p,f,m,g,v,y,b,E,S;if(2===e.length)return E=l.vectorLen(l.subtract(e[0],e[1]))/3,[c=[e[0],l.addArrays(e[0],l.mulItems(i,E)),l.addArrays(e[1],l.mulItems(o,E)),e[1]]];if(u=function(e){var t,n,r,i=[];return e.forEach(((e,o)=>{t=o?n+l.vectorLen(l.subtract(e,r)):0,i.push(t),n=t,r=e})),i=i.map((e=>e/n))}(e),[c,h,f]=n(e,u,u,i,o,s),0===h||h.9999&&e<1.0001)break}p=h,m=f}return b=[],(g=l.subtract(e[f-1],e[f+1])).every((e=>0===e))&&(g=l.subtract(e[f-1],e[f]),[g[0],g[1]]=[-g[1],g[0]]),v=l.normalize(g),y=l.mulItems(v,-1),(b=b.concat(t(e.slice(0,f+1),i,v,a,s))).concat(t(e.slice(f),y,o,a,s))}function n(e,t,n,r,i,s){var u,d,h;return u=function(e,t,n,r){var i,o,a,s,u,d,h,p,f,m,g,v,y,b,E,S,w,_=e[0],k=e[e.length-1];for(i=[_,null,null,k],o=l.zeros_Xx2x2(t.length),y=0,b=t.length;yi&&(i=r,s=d);return[i,s]}(e,u,t),s&&s({bez:u,points:e,params:t,maxErr:d,maxPoint:h}),[u,d,h]}function r(e,t,n){return n.map(((n,r)=>i(e,t[r],n)))}function i(e,t,n){var r=l.subtract(c.q(e,n),t),i=c.qprime(e,n),o=l.mulMatrix(r,i),a=l.sum(l.squareItems(i))+2*l.mulMatrix(r,c.qprimeprime(e,n));return 0===a?n:n-o/a}var o=function(e,t){for(var n,r=[0],i=e[0],o=0,a=1;a<=t;a++)n=c.q(e,a/t),o+=l.vectorLen(l.subtract(n,i)),r.push(o),i=n;return r.map((e=>e/o))};function a(e,t,n,r){if(t<0)return 0;if(t>1)return 1;for(var i,o,a,s,l=1;l<=r;l++)if(t<=n[l]){a=(l-1)/r,o=l/r,s=(t-(i=n[l-1]))/(n[l]-i)*(o-a)+a;break}return s}function s(e,t){return l.normalize(l.subtract(e,t))}class l{static zeros_Xx2x2(e){for(var t=[];e--;)t.push([0,0]);return t}static mulItems(e,t){return e.map((e=>e*t))}static mulMatrix(e,t){return e.reduce(((e,n,r)=>e+n*t[r]),0)}static subtract(e,t){return e.map(((e,n)=>e-t[n]))}static addArrays(e,t){return e.map(((e,n)=>e+t[n]))}static addItems(e,t){return e.map((e=>e+t))}static sum(e){return e.reduce(((e,t)=>e+t))}static dot(e,t){return l.mulMatrix(e,t)}static vectorLen(e){return Math.hypot(...e)}static divItems(e,t){return e.map((e=>e/t))}static squareItems(e){return e.map((e=>e*e))}static normalize(e){return this.divItems(e,this.vectorLen(e))}}class c{static q(e,t){var n=1-t,r=l.mulItems(e[0],n*n*n),i=l.mulItems(e[1],3*n*n*t),o=l.mulItems(e[2],3*n*t*t),a=l.mulItems(e[3],t*t*t);return l.addArrays(l.addArrays(r,i),l.addArrays(o,a))}static qprime(e,t){var n=1-t,r=l.mulItems(l.subtract(e[1],e[0]),3*n*n),i=l.mulItems(l.subtract(e[2],e[1]),6*n*t),o=l.mulItems(l.subtract(e[3],e[2]),3*t*t);return l.addArrays(l.addArrays(r,i),o)}static qprimeprime(e,t){return l.addArrays(l.mulItems(l.addArrays(l.subtract(e[2],l.mulItems(e[1],2)),e[0]),6*(1-t)),l.mulItems(l.addArrays(l.subtract(e[3],l.mulItems(e[2],2)),e[1]),6*t))}}e.exports=function(e,n,r){if(!Array.isArray(e))throw new TypeError("First argument should be an array");if(e.forEach((t=>{if(!Array.isArray(t)||t.some((e=>"number"!=typeof e))||t.length!==e[0].length)throw Error("Each point should be an array of numbers. Each point should have the same amount of numbers.")})),(e=e.filter(((t,n)=>0===n||!t.every(((t,r)=>t===e[n-1][r]))))).length<2)return[];const i=e.length,o=s(e[1],e[0]),a=s(e[i-2],e[i-1]);return t(e,o,a,n,r)},e.exports.fitCubic=t,e.exports.createTangent=s},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var r=n(1),i=n(6),o=n(3),a=n(33),s=n(34);const l=1e3,c=new WeakSet;function u(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class d{static create(e){switch(e.data.annotationType){case r.AnnotationType.LINK:return new p(e);case r.AnnotationType.TEXT:return new f(e);case r.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new g(e);case"Btn":return e.data.radioButton?new y(e):e.data.checkBox?new v(e):new b(e);case"Ch":return new E(e)}return new m(e);case r.AnnotationType.POPUP:return new S(e);case r.AnnotationType.FREETEXT:return new _(e);case r.AnnotationType.LINE:return new k(e);case r.AnnotationType.SQUARE:return new C(e);case r.AnnotationType.CIRCLE:return new P(e);case r.AnnotationType.POLYLINE:return new x(e);case r.AnnotationType.CARET:return new M(e);case r.AnnotationType.INK:return new T(e);case r.AnnotationType.POLYGON:return new A(e);case r.AnnotationType.HIGHLIGHT:return new R(e);case r.AnnotationType.UNDERLINE:return new O(e);case r.AnnotationType.SQUIGGLY:return new I(e);case r.AnnotationType.STRIKEOUT:return new D(e);case r.AnnotationType.STAMP:return new L(e);case r.AnnotationType.FILEATTACHMENT:return new F(e);default:return new h(e)}}}class h{constructor(e,{isRenderable:t=!1,ignoreBorder:n=!1,createQuadrilaterals:r=!1}={}){this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.page=e.page,this.viewport=e.viewport,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,t&&(this.container=this._createContainer(n)),r&&(this.quadrilaterals=this._createQuadrilaterals(n))}_createContainer(e=!1){const{data:t,page:n,viewport:i}=this,o=document.createElement("section");o.setAttribute("data-annotation-id",t.id);const{pageWidth:a,pageHeight:s,pageX:l,pageY:c}=i.rawDims,{width:d,height:h}=u(t.rect),p=r.Util.normalizeRect([t.rect[0],n.view[3]-t.rect[1]+n.view[1],t.rect[2],n.view[3]-t.rect[3]+n.view[1]]);if(!e&&t.borderStyle.width>0){o.style.borderWidth=`${t.borderStyle.width}px`;const e=t.borderStyle.horizontalCornerRadius,n=t.borderStyle.verticalCornerRadius;if(e>0||n>0){const t=`calc(${e}px * var(--scale-factor)) / calc(${n}px * var(--scale-factor))`;o.style.borderRadius=t}else if(this instanceof y){const e=`calc(${d}px * var(--scale-factor)) / calc(${h}px * var(--scale-factor))`;o.style.borderRadius=e}switch(t.borderStyle.style){case r.AnnotationBorderStyleType.SOLID:o.style.borderStyle="solid";break;case r.AnnotationBorderStyleType.DASHED:o.style.borderStyle="dashed";break;case r.AnnotationBorderStyleType.BEVELED:(0,r.warn)("Unimplemented border style: beveled");break;case r.AnnotationBorderStyleType.INSET:(0,r.warn)("Unimplemented border style: inset");break;case r.AnnotationBorderStyleType.UNDERLINE:o.style.borderBottomStyle="solid"}const i=t.borderColor||null;i?o.style.borderColor=r.Util.makeHexColor(0|i[0],0|i[1],0|i[2]):o.style.borderWidth=0}o.style.left=100*(p[0]-l)/a+"%",o.style.top=100*(p[1]-c)/s+"%";const{rotation:f}=t;return t.hasOwnCanvas||0===f?(o.style.width=100*d/a+"%",o.style.height=100*h/s+"%"):this.setRotation(f,o),o}setRotation(e,t=this.container){const{pageWidth:n,pageHeight:r}=this.viewport.rawDims,{width:i,height:o}=u(this.data.rect);let a,s;e%180==0?(a=100*i/n,s=100*o/r):(a=100*o/n,s=100*i/r),t.style.width=`${a}%`,t.style.height=`${s}%`,t.setAttribute("data-main-rotation",(360-e)%360)}get _commonActions(){const e=(e,t,n)=>{const r=n.detail[e];n.target.style[t]=a.ColorConverters[`${r[0]}_HTML`](r.slice(1))};return(0,r.shadow)(this,"_commonActions",{display:e=>{const t=e.detail.display%2==1;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:t,print:0===e.detail.display||3===e.detail.display})},print:e=>{this.annotationStorage.setValue(this.data.id,{print:e.detail.print})},hidden:e=>{this.container.style.visibility=e.detail.hidden?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{hidden:e.detail.hidden})},focus:e=>{setTimeout((()=>e.target.focus({preventScroll:!1})),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.detail.readonly?e.target.setAttribute("readonly",""):e.target.removeAttribute("readonly")},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:t=>{e("bgColor","backgroundColor",t)},fillColor:t=>{e("fillColor","backgroundColor",t)},fgColor:t=>{e("fgColor","color",t)},textColor:t=>{e("textColor","color",t)},borderColor:t=>{e("borderColor","borderColor",t)},strokeColor:t=>{e("strokeColor","borderColor",t)},rotation:e=>{const t=e.detail.rotation;this.setRotation(t),this.annotationStorage.setValue(this.data.id,{rotation:t})}})}_dispatchEventFromSandbox(e,t){const n=this._commonActions;for(const r of Object.keys(t.detail)){const i=e[r]||n[r];i?.(t)}}_setDefaultPropertiesFromJS(e){if(!this.enableScripting)return;const t=this.annotationStorage.getRawValue(this.data.id);if(!t)return;const n=this._commonActions;for(const[r,i]of Object.entries(t)){const o=n[r];o&&(o({detail:{[r]:i},target:e}),delete t[r])}}_createQuadrilaterals(e=!1){if(!this.data.quadPoints)return null;const t=[],n=this.data.rect;for(const n of this.data.quadPoints)this.data.rect=[n[2].x,n[2].y,n[1].x,n[1].y],t.push(this._createContainer(e));return this.data.rect=n,t}_createPopup(e,t){let n=this.container;this.quadrilaterals&&(e=e||this.quadrilaterals,n=this.quadrilaterals[0]),e||((e=document.createElement("div")).className="popupTriggerArea",n.append(e));const r=new w({container:n,trigger:e,color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,hideWrapper:!0}).render();r.style.left="100%",n.append(r)}_renderQuadrilaterals(e){for(const t of this.quadrilaterals)t.className=e;return this.quadrilaterals}render(){(0,r.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(e,t=null){const n=[];if(this._fieldObjects){const i=this._fieldObjects[e];if(i)for(const{page:e,id:o,exportValues:a}of i){if(-1===e)continue;if(o===t)continue;const i="string"==typeof a?a:null,s=document.querySelector(`[data-element-id="${o}"]`);!s||c.has(s)?n.push({id:o,exportValue:i,domElement:s}):(0,r.warn)(`_getElementsByName - element not allowed: ${o}`)}return n}for(const r of document.getElementsByName(e)){const{exportValue:e}=r,i=r.getAttribute("data-element-id");i!==t&&c.has(r)&&n.push({id:i,exportValue:e,domElement:r})}return n}}class p extends h{constructor(e,t=null){super(e,{isRenderable:!0,ignoreBorder:!!t?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=e.data.isTooltipOnly}render(){const{data:e,linkService:t}=this,n=document.createElement("a");n.setAttribute("data-element-id",e.id);let r=!1;return e.url?(t.addLinkAttributes(n,e.url,e.newWindow),r=!0):e.action?(this._bindNamedAction(n,e.action),r=!0):e.attachment?(this._bindAttachment(n,e.attachment),r=!0):e.setOCGState?(this.#Ct(n,e.setOCGState),r=!0):e.dest?(this._bindLink(n,e.dest),r=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(n,e),r=!0),e.resetForm?(this._bindResetFormAction(n,e.resetForm),r=!0):this.isTooltipOnly&&!r&&(this._bindLink(n,""),r=!0)),this.quadrilaterals?this._renderQuadrilaterals("linkAnnotation").map(((e,t)=>{const r=0===t?n:n.cloneNode();return e.append(r),e})):(this.container.className="linkAnnotation",r&&this.container.append(n),this.container)}#Pt(){this.container.setAttribute("data-internal-link","")}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(t&&this.linkService.goToDestination(t),!1),(t||""===t)&&this.#Pt()}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),this.#Pt()}_bindAttachment(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.downloadManager?.openOrDownloadData(this.container,t.content,t.filename),!1),this.#Pt()}#Ct(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),this.#Pt()}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");const n=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(t.actions)){const i=n.get(r);i&&(e[i]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:r}}),!1))}e.onclick||(e.onclick=()=>!1),this.#Pt()}_bindResetFormAction(e,t){const n=e.onclick;if(n||(e.href=this.linkService.getAnchorUrl("")),this.#Pt(),!this._fieldObjects)return(0,r.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),void(n||(e.onclick=()=>!1));e.onclick=()=>{n?.();const{fields:e,refs:i,include:o}=t,a=[];if(0!==e.length||0!==i.length){const t=new Set(i);for(const n of e){const e=this._fieldObjects[n]||[];for(const{id:n}of e)t.add(n)}for(const e of Object.values(this._fieldObjects))for(const n of e)t.has(n.id)===o&&a.push(n)}else for(const e of Object.values(this._fieldObjects))a.push(...e);const s=this.annotationStorage,l=[];for(const e of a){const{id:t}=e;switch(l.push(t),e.type){case"text":{const n=e.defaultValue||"";s.setValue(t,{value:n});break}case"checkbox":case"radiobutton":{const n=e.defaultValue===e.exportValues;s.setValue(t,{value:n});break}case"combobox":case"listbox":{const n=e.defaultValue||"";s.setValue(t,{value:n});break}default:continue}const n=document.querySelector(`[data-element-id="${t}"]`);n&&(c.has(n)?n.dispatchEvent(new Event("resetform")):(0,r.warn)(`_bindResetFormAction - element not allowed: ${t}`))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:l,name:"ResetForm"}}),!1}}}class f extends h{constructor(e){super(e,{isRenderable:!!(e.data.hasPopup||e.data.titleObj?.str||e.data.contentsObj?.str||e.data.richText?.str)})}render(){this.container.className="textAnnotation";const e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(e,this.data),this.container.append(e),this.container}}class m extends h{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}_getKeyModifier(e){const{isWin:t,isMac:n}=r.FeatureTest.platform;return t&&e.ctrlKey||n&&e.metaKey}_setEventListener(e,t,n,r){t.includes("mouse")?e.addEventListener(t,(e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:r(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})})):e.addEventListener(t,(e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:r(e)}})}))}_setEventListeners(e,t,n){for(const[r,i]of t)("Action"===i||this.data.actions?.[i])&&this._setEventListener(e,r,i,n)}_setBackgroundColor(e){const t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":r.Util.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const{fontColor:t}=this.data.defaultAppearanceData,n=this.data.defaultAppearanceData.fontSize||9,i=e.style;let o;const a=e=>Math.round(10*e)/10;if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),t=e/(Math.round(e/(r.LINE_FACTOR*n))||1);o=Math.min(n,a(t/r.LINE_FACTOR))}else{const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2);o=Math.min(n,a(e/r.LINE_FACTOR))}i.fontSize=`calc(${o}px * var(--scale-factor))`,i.color=r.Util.makeHexColor(t[0],t[1],t[2]),null!==this.data.textAlignment&&(i.textAlign=["left","center","right"][this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class g extends m{constructor(e){super(e,{isRenderable:e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,n,r){const i=this.annotationStorage;for(const o of this._getElementsByName(e.name,e.id))o.domElement&&(o.domElement[t]=n),i.setValue(o.id,{[r]:n})}render(){const e=this.annotationStorage,t=this.data.id;this.container.className="textWidgetAnnotation";let n=null;if(this.renderForms){const r=e.getValue(t,{value:this.data.fieldValue});let i=r.formattedValue||r.value||"";const o=e.getValue(t,{charLimit:this.data.maxLen}).charLimit;o&&i.length>o&&(i=i.slice(0,o));const a={userValue:i,formattedValue:null,lastCommittedValue:null,commitKey:1};this.data.multiLine?(n=document.createElement("textarea"),n.textContent=i,this.data.doNotScroll&&(n.style.overflowY="hidden")):(n=document.createElement("input"),n.type="text",n.setAttribute("value",i),this.data.doNotScroll&&(n.style.overflowX="hidden")),c.add(n),n.setAttribute("data-element-id",t),n.disabled=this.data.readOnly,n.name=this.data.fieldName,n.tabIndex=l,this._setRequired(n,this.data.required),o&&(n.maxLength=o),n.addEventListener("input",(r=>{e.setValue(t,{value:r.target.value}),this.setPropertyOnSiblings(n,"value",r.target.value,"value")})),n.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue??"";n.value=a.userValue=t,a.formattedValue=null}));let s=e=>{const{formattedValue:t}=a;null!=t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){n.addEventListener("focus",(e=>{const{target:t}=e;a.userValue&&(t.value=a.userValue),a.lastCommittedValue=t.value,a.commitKey=1})),n.addEventListener("updatefromsandbox",(n=>{const r={value(n){a.userValue=n.detail.value??"",e.setValue(t,{value:a.userValue.toString()}),n.target.value=a.userValue},formattedValue(n){const{formattedValue:r}=n.detail;a.formattedValue=r,null!=r&&n.target!==document.activeElement&&(n.target.value=r),e.setValue(t,{formattedValue:r})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:n=>{const{charLimit:r}=n.detail,{target:i}=n;if(0===r)return void i.removeAttribute("maxLength");i.setAttribute("maxLength",r);let o=a.userValue;!o||o.length<=r||(o=o.slice(0,r),i.value=a.userValue=o,e.setValue(t,{value:o}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:o,willCommit:!0,commitKey:1,selStart:i.selectionStart,selEnd:i.selectionEnd}}))}};this._dispatchEventFromSandbox(r,n)})),n.addEventListener("keydown",(e=>{a.commitKey=1;let n=-1;if("Escape"===e.key?n=0:"Enter"!==e.key||this.data.multiLine?"Tab"===e.key&&(a.commitKey=3):n=2,-1===n)return;const{value:r}=e.target;a.lastCommittedValue!==r&&(a.lastCommittedValue=r,a.userValue=r,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:r,willCommit:!0,commitKey:n,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))}));const r=s;s=null,n.addEventListener("blur",(e=>{if(!e.relatedTarget)return;const{value:n}=e.target;a.userValue=n,a.lastCommittedValue!==n&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:n,willCommit:!0,commitKey:a.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}),r(e)})),this.data.actions?.Keystroke&&n.addEventListener("beforeinput",(e=>{a.lastCommittedValue=null;const{data:n,target:r}=e,{value:i,selectionStart:o,selectionEnd:s}=r;let l=o,c=s;switch(e.inputType){case"deleteWordBackward":{const e=i.substring(0,o).match(/\w*[^\w]*$/);e&&(l-=e[0].length);break}case"deleteWordForward":{const e=i.substring(o).match(/^[^\w]*\w*/);e&&(c+=e[0].length);break}case"deleteContentBackward":o===s&&(l-=1);break;case"deleteContentForward":o===s&&(c+=1)}e.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:i,change:n||"",willCommit:!1,selStart:l,selEnd:c}})})),this._setEventListeners(n,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.value))}if(s&&n.addEventListener("blur",s),this.data.comb){const e=(this.data.rect[2]-this.data.rect[0])/o;n.classList.add("comb"),n.style.letterSpacing=`calc(${e}px * var(--scale-factor) - 1ch)`}}else n=document.createElement("div"),n.textContent=this.data.fieldValue,n.style.verticalAlign="middle",n.style.display="table-cell";return this._setTextStyle(n),this._setBackgroundColor(n),this._setDefaultPropertiesFromJS(n),this.container.append(n),this.container}}class v extends m{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const e=this.annotationStorage,t=this.data,n=t.id;let r=e.getValue(n,{value:t.exportValue===t.fieldValue}).value;"string"==typeof r&&(r="Off"!==r,e.setValue(n,{value:r})),this.container.className="buttonWidgetAnnotation checkBox";const i=document.createElement("input");return c.add(i),i.setAttribute("data-element-id",n),i.disabled=t.readOnly,this._setRequired(i,this.data.required),i.type="checkbox",i.name=t.fieldName,r&&i.setAttribute("checked",!0),i.setAttribute("exportValue",t.exportValue),i.tabIndex=l,i.addEventListener("change",(r=>{const{name:i,checked:o}=r.target;for(const r of this._getElementsByName(i,n)){const n=o&&r.exportValue===t.exportValue;r.domElement&&(r.domElement.checked=n),e.setValue(r.id,{value:n})}e.setValue(n,{value:o})})),i.addEventListener("resetform",(e=>{const n=t.defaultFieldValue||"Off";e.target.checked=n===t.exportValue})),this.enableScripting&&this.hasJSActions&&(i.addEventListener("updatefromsandbox",(t=>{const r={value(t){t.target.checked="Off"!==t.detail.value,e.setValue(n,{value:t.target.checked})}};this._dispatchEventFromSandbox(r,t)})),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))),this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class y extends m{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.className="buttonWidgetAnnotation radioButton";const e=this.annotationStorage,t=this.data,n=t.id;let r=e.getValue(n,{value:t.fieldValue===t.buttonValue}).value;"string"==typeof r&&(r=r!==t.buttonValue,e.setValue(n,{value:r}));const i=document.createElement("input");if(c.add(i),i.setAttribute("data-element-id",n),i.disabled=t.readOnly,this._setRequired(i,this.data.required),i.type="radio",i.name=t.fieldName,r&&i.setAttribute("checked",!0),i.tabIndex=l,i.addEventListener("change",(t=>{const{name:r,checked:i}=t.target;for(const t of this._getElementsByName(r,n))e.setValue(t.id,{value:!1});e.setValue(n,{value:i})})),i.addEventListener("resetform",(e=>{const n=t.defaultFieldValue;e.target.checked=null!=n&&n===t.buttonValue})),this.enableScripting&&this.hasJSActions){const r=t.buttonValue;i.addEventListener("updatefromsandbox",(t=>{const i={value:t=>{const i=r===t.detail.value;for(const r of this._getElementsByName(t.target.name)){const t=i&&r.id===n;r.domElement&&(r.domElement.checked=t),e.setValue(r.id,{value:t})}}};this._dispatchEventFromSandbox(i,t)})),this._setEventListeners(i,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],(e=>e.target.checked))}return this._setBackgroundColor(i),this._setDefaultPropertiesFromJS(i),this.container.append(i),this.container}}class b extends p{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){const e=super.render();e.className="buttonWidgetAnnotation pushButton",this.data.alternativeText&&(e.title=this.data.alternativeText);const t=e.lastChild;return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",(e=>{this._dispatchEventFromSandbox({},e)}))),e}}class E extends m{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.className="choiceWidgetAnnotation";const e=this.annotationStorage,t=this.data.id,n=e.getValue(t,{value:this.data.fieldValue}),r=document.createElement("select");c.add(r),r.setAttribute("data-element-id",t),r.disabled=this.data.readOnly,this._setRequired(r,this.data.required),r.name=this.data.fieldName,r.tabIndex=l;let i=this.data.combo&&this.data.options.length>0;this.data.combo||(r.size=this.data.options.length,this.data.multiSelect&&(r.multiple=!0)),r.addEventListener("resetform",(e=>{const t=this.data.defaultFieldValue;for(const e of r.options)e.selected=e.value===t}));for(const e of this.data.options){const t=document.createElement("option");t.textContent=e.displayValue,t.value=e.exportValue,n.value.includes(e.exportValue)&&(t.setAttribute("selected",!0),i=!1),r.append(t)}let o=null;if(i){const e=document.createElement("option");e.value=" ",e.setAttribute("hidden",!0),e.setAttribute("selected",!0),r.prepend(e),o=()=>{e.remove(),r.removeEventListener("input",o),o=null},r.addEventListener("input",o)}const a=e=>{const t=e?"value":"textContent",{options:n,multiple:i}=r;return i?Array.prototype.filter.call(n,(e=>e.selected)).map((e=>e[t])):-1===n.selectedIndex?null:n[n.selectedIndex][t]};let s=a(!1);const u=e=>{const t=e.target.options;return Array.prototype.map.call(t,(e=>({displayValue:e.textContent,exportValue:e.value})))};return this.enableScripting&&this.hasJSActions?(r.addEventListener("updatefromsandbox",(n=>{const i={value(n){o?.();const i=n.detail.value,l=new Set(Array.isArray(i)?i:[i]);for(const e of r.options)e.selected=l.has(e.value);e.setValue(t,{value:a(!0)}),s=a(!1)},multipleSelection(e){r.multiple=!0},remove(n){const i=r.options,o=n.detail.remove;i[o].selected=!1,r.remove(o),i.length>0&&-1===Array.prototype.findIndex.call(i,(e=>e.selected))&&(i[0].selected=!0),e.setValue(t,{value:a(!0),items:u(n)}),s=a(!1)},clear(n){for(;0!==r.length;)r.remove(0);e.setValue(t,{value:null,items:[]}),s=a(!1)},insert(n){const{index:i,displayValue:o,exportValue:l}=n.detail.insert,c=r.children[i],d=document.createElement("option");d.textContent=o,d.value=l,c?c.before(d):r.append(d),e.setValue(t,{value:a(!0),items:u(n)}),s=a(!1)},items(n){const{items:i}=n.detail;for(;0!==r.length;)r.remove(0);for(const e of i){const{displayValue:t,exportValue:n}=e,i=document.createElement("option");i.textContent=t,i.value=n,r.append(i)}r.options.length>0&&(r.options[0].selected=!0),e.setValue(t,{value:a(!0),items:u(n)}),s=a(!1)},indices(n){const r=new Set(n.detail.indices);for(const e of n.target.options)e.selected=r.has(e.index);e.setValue(t,{value:a(!0)}),s=a(!1)},editable(e){e.target.disabled=!e.detail.editable}};this._dispatchEventFromSandbox(i,n)})),r.addEventListener("input",(n=>{const r=a(!0);e.setValue(t,{value:r}),n.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t,name:"Keystroke",value:s,changeEx:r,willCommit:!1,commitKey:1,keyDown:!1}})})),this._setEventListeners(r,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],(e=>e.target.value))):r.addEventListener("input",(function(n){e.setValue(t,{value:a(!0)})})),this.data.combo&&this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class S extends h{static IGNORE_TYPES=new Set(["Line","Square","Circle","PolyLine","Polygon","Ink"]);constructor(e){const{data:t}=e;super(e,{isRenderable:!S.IGNORE_TYPES.has(t.parentType)&&!!(t.titleObj?.str||t.contentsObj?.str||t.richText?.str)})}render(){this.container.className="popupAnnotation";const e=this.layer.querySelectorAll(`[data-annotation-id="${this.data.parentId}"]`);if(0===e.length)return this.container;const t=new w({container:this.container,trigger:Array.from(e),color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText}),n=this.page,i=r.Util.normalizeRect([this.data.parentRect[0],n.view[3]-this.data.parentRect[1]+n.view[1],this.data.parentRect[2],n.view[3]-this.data.parentRect[3]+n.view[1]]),o=i[0]+this.data.parentRect[2]-this.data.parentRect[0],a=i[1],{pageWidth:s,pageHeight:l,pageX:c,pageY:u}=this.viewport.rawDims;return this.container.style.left=100*(o-c)/s+"%",this.container.style.top=100*(a-u)/l+"%",this.container.append(t.render()),this.container}}class w{constructor(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.titleObj=e.titleObj,this.modificationDate=e.modificationDate,this.contentsObj=e.contentsObj,this.richText=e.richText,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}render(){const e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.hidden=!0;const t=document.createElement("div");t.className="popup";const n=this.color;if(n){const e=.7*(255-n[0])+n[0],i=.7*(255-n[1])+n[1],o=.7*(255-n[2])+n[2];t.style.backgroundColor=r.Util.makeHexColor(0|e,0|i,0|o)}const o=document.createElement("h1");o.dir=this.titleObj.dir,o.textContent=this.titleObj.str,t.append(o);const a=i.PDFDateString.toDateObject(this.modificationDate);if(a){const e=document.createElement("span");e.className="popupDate",e.textContent="{{date}}, {{time}}",e.dataset.l10nId="annotation_date_string",e.dataset.l10nArgs=JSON.stringify({date:a.toLocaleDateString(),time:a.toLocaleTimeString()}),t.append(e)}if(!this.richText?.str||this.contentsObj?.str&&this.contentsObj.str!==this.richText.str){const e=this._formatContents(this.contentsObj);t.append(e)}else s.XfaLayer.render({xfaHtml:this.richText.html,intent:"richText",div:t}),t.lastChild.className="richText popupContent";Array.isArray(this.trigger)||(this.trigger=[this.trigger]);for(const e of this.trigger)e.addEventListener("click",this._toggle.bind(this)),e.addEventListener("mouseover",this._show.bind(this,!1)),e.addEventListener("mouseout",this._hide.bind(this,!1));return t.addEventListener("click",this._hide.bind(this,!0)),e.append(t),e}_formatContents({str:e,dir:t}){const n=document.createElement("p");n.className="popupContent",n.dir=t;const r=e.split(/(?:\r\n?|\n)/);for(let e=0,t=r.length;e{function n(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0,t.ColorConverters=class{static CMYK_G([e,t,n,r]){return["G",1-Math.min(1,.3*e+.59*n+.11*t+r)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_HTML([e]){const t=n(e);return`#${t}${t}${t}`}static RGB_G([e,t,n]){return["G",.3*e+.59*t+.11*n]}static RGB_HTML([e,t,r]){return`#${n(e)}${n(t)}${n(r)}`}static T_HTML(){return"#00000000"}static CMYK_RGB([e,t,n,r]){return["RGB",1-Math.min(1,e+r),1-Math.min(1,n+r),1-Math.min(1,t+r)]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,n]){const r=1-e,i=1-t,o=1-n;return["CMYK",r,i,o,Math.min(r,i,o)]}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0;var r=n(19);t.XfaLayer=class{static setupStorage(e,t,n,r,i){const o=r.getValue(t,{value:null});switch(n.name){case"textarea":if(null!==o.value&&(e.textContent=o.value),"print"===i)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}));break;case"input":if("radio"===n.attributes.type||"checkbox"===n.attributes.type){if(o.value===n.attributes.xfaOn?e.setAttribute("checked",!0):o.value===n.attributes.xfaOff&&e.removeAttribute("checked"),"print"===i)break;e.addEventListener("change",(e=>{r.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})}))}else{if(null!==o.value&&e.setAttribute("value",o.value),"print"===i)break;e.addEventListener("input",(e=>{r.setValue(t,{value:e.target.value})}))}break;case"select":if(null!==o.value)for(const e of n.children)e.attributes.value===o.value&&(e.attributes.selected=!0);e.addEventListener("input",(e=>{const n=e.target.options,i=-1===n.selectedIndex?"":n[n.selectedIndex].value;r.setValue(t,{value:i})}))}}static setAttributes({html:e,element:t,storage:n=null,intent:r,linkService:i}){const{attributes:o}=t,a=e instanceof HTMLAnchorElement;"radio"===o.type&&(o.name=`${o.name}-${r}`);for(const[t,n]of Object.entries(o))if(null!=n)switch(t){case"class":n.length&&e.setAttribute(t,n.join(" "));break;case"dataId":break;case"id":e.setAttribute("data-element-id",n);break;case"style":Object.assign(e.style,n);break;case"textContent":e.textContent=n;break;default:(!a||"href"!==t&&"newWindow"!==t)&&e.setAttribute(t,n)}a&&i.addLinkAttributes(e,o.href,o.newWindow),n&&o.dataId&&this.setupStorage(e,o.dataId,t,n)}static render(e){const t=e.annotationStorage,n=e.linkService,i=e.xfaHtml,o=e.intent||"display",a=document.createElement(i.name);i.attributes&&this.setAttributes({html:a,element:i,intent:o,linkService:n});const s=[[i,-1,a]],l=e.div;if(l.append(a),e.viewport){const t=`matrix(${e.viewport.transform.join(",")})`;l.style.transform=t}"richText"!==o&&l.setAttribute("class","xfaLayer xfaFont");const c=[];for(;s.length>0;){const[e,i,a]=s.at(-1);if(i+1===e.children.length){s.pop();continue}const l=e.children[++s.at(-1)[1]];if(null===l)continue;const{name:u}=l;if("#text"===u){const e=document.createTextNode(l.value);c.push(e),a.append(e);continue}let d;if(d=l?.attributes?.xmlns?document.createElementNS(l.attributes.xmlns,u):document.createElement(u),a.append(d),l.attributes&&this.setAttributes({html:d,element:l,storage:t,intent:o,linkService:n}),l.children&&l.children.length>0)s.push([l,-1,d]);else if(l.value){const e=document.createTextNode(l.value);r.XfaText.shouldBuildText(u)&&c.push(e),d.append(e)}}for(const e of l.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))e.setAttribute("readOnly",!0);return{textDivs:c}}static update(e){const t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}},(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var r=n(6),i=n(1),o=n(10);let a=class{constructor(){(0,i.unreachable)("Not implemented: SVGGraphics")}};t.SVGGraphics=a;{const s={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},l="http://www.w3.org/XML/1998/namespace",c="http://www.w3.org/1999/xlink",u=["butt","round","square"],d=["miter","round","bevel"],h=function(e,t="",n=!1){if(URL.createObjectURL&&"undefined"!=typeof Blob&&!n)return URL.createObjectURL(new Blob([e],{type:t}));const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let i=`data:${t};base64,`;for(let t=0,n=e.length;t>2]+r[(3&o)<<4|a>>4]+r[t+1>6:64]+r[t+2>1&2147483647:n>>1&2147483647;t[e]=n}function n(e,n,r,i){let o=i;const a=n.length;r[o]=a>>24&255,r[o+1]=a>>16&255,r[o+2]=a>>8&255,r[o+3]=255&a,o+=4,r[o]=255&e.charCodeAt(0),r[o+1]=255&e.charCodeAt(1),r[o+2]=255&e.charCodeAt(2),r[o+3]=255&e.charCodeAt(3),o+=4,r.set(n,o),o+=n.length;const s=function(e,n,r){let i=-1;for(let o=n;o>>8^t[n]}return~i}(r,i+4,o);r[o]=s>>24&255,r[o+1]=s>>16&255,r[o+2]=s>>8&255,r[o+3]=255&s}function r(e){let t=e.length;const n=65535,r=Math.ceil(t/n),i=new Uint8Array(2+t+5*r+4);let o=0;i[o++]=120,i[o++]=156;let a=0;for(;t>n;)i[o++]=0,i[o++]=255,i[o++]=255,i[o++]=0,i[o++]=0,i.set(e.subarray(a,a+n),o),o+=n,a+=n,t-=n;i[o++]=1,i[o++]=255&t,i[o++]=t>>8&255,i[o++]=255&~t,i[o++]=(65535&~t)>>8&255,i.set(e.subarray(a),o),o+=e.length-a;const s=function(e,t,n){let r=1,i=0;for(let t=0;t>24&255,i[o++]=s>>16&255,i[o++]=s>>8&255,i[o++]=255&s,i}return function(t,a,s){return function(t,a,s,l){const c=t.width,u=t.height;let d,p,f;const m=t.data;switch(a){case i.ImageKind.GRAYSCALE_1BPP:p=0,d=1,f=c+7>>3;break;case i.ImageKind.RGB_24BPP:p=2,d=8,f=3*c;break;case i.ImageKind.RGBA_32BPP:p=6,d=8,f=4*c;break;default:throw new Error("invalid format")}const g=new Uint8Array((1+f)*u);let v=0,y=0;for(let e=0;e>24&255,c>>16&255,c>>8&255,255&c,u>>24&255,u>>16&255,u>>8&255,255&u,d,p,0,0,0]),E=function(e){if(!o.isNodeJS)return r(e);try{let t;t=parseInt(process.versions.node)>=8?e:Buffer.from(e);const n=__webpack_require__(2787).deflateSync(t,{level:9});return n instanceof Uint8Array?n:new Uint8Array(n)}catch(e){(0,i.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return r(e)}(g),S=e.length+36+b.length+E.length,w=new Uint8Array(S);let _=0;return w.set(e,_),_+=e.length,n("IHDR",b,w,_),_+=12+b.length,n("IDATA",E,w,_),_+=12+E.length,n("IEND",new Uint8Array(0),w,_),h(w,"image/png",s)}(t,void 0===t.kind?i.ImageKind.GRAYSCALE_1BPP:t.kind,a,s)}}();class f{constructor(){this.fontSizeScale=1,this.fontWeight=s.fontWeight,this.fontSize=0,this.textMatrix=i.IDENTITY_MATRIX,this.fontMatrix=i.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=i.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=s.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e,this.y=t}}function m(e){let t=[];const n=[];for(const r of e)"save"!==r.fn?"restore"===r.fn?t=n.pop():t.push(r):(t.push({fnId:92,fn:"group",items:[]}),n.push(t),t=t.at(-1).items);return t}function g(e){if(Number.isInteger(e))return e.toString();const t=e.toFixed(10);let n=t.length-1;if("0"!==t[n])return t;do{n--}while("0"===t[n]);return t.substring(0,"."===t[n]?n:n+1)}function v(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":`scale(${g(e[0])} ${g(e[3])})`;if(e[0]===e[3]&&e[1]===-e[2])return`rotate(${g(180*Math.acos(e[0])/Math.PI)})`}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return`translate(${g(e[4])} ${g(e[5])})`;return`matrix(${g(e[0])} ${g(e[1])} ${g(e[2])} ${g(e[3])} ${g(e[4])} ${g(e[5])})`}let y=0,b=0,E=0;t.SVGGraphics=a=class{constructor(e,t,n=!1){(0,r.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new r.DOMSVGFactory,this.current=new f,this.transformMatrix=i.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!n,this._operatorIdMapping=[];for(const e in i.OPS)this._operatorIdMapping[i.OPS[e]]=e}getObject(e,t=null){return"string"==typeof e?e.startsWith("g_")?this.commonObjs.get(e):this.objs.get(e):t}save(){this.transformStack.push(this.transformMatrix);const e=this.current;this.extraStack.push(e),this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(e){this.save(),this.executeOpTree(e),this.restore()}loadDependencies(e){const t=e.fnArray,n=e.argsArray;for(let e=0,r=t.length;e{e.get(t,n)}));this.current.dependencies.push(n)}return Promise.all(this.current.dependencies)}transform(e,t,n,r,o,a){const s=[e,t,n,r,o,a];this.transformMatrix=i.Util.transform(this.transformMatrix,s),this.tgrp=null}getSVG(e,t){this.viewport=t;const n=this._initialize(t);return this.loadDependencies(e).then((()=>(this.transformMatrix=i.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(e)),n)))}convertOpList(e){const t=this._operatorIdMapping,n=e.argsArray,r=e.fnArray,i=[];for(let e=0,o=r.length;e0&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=u[e]}setLineJoin(e){this.current.lineJoin=d[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,n){this.current.strokeColor=i.Util.makeHexColor(e,t,n)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,n){this.current.fillColor=i.Util.makeHexColor(e,t,n),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){const t=this.viewport.width,n=this.viewport.height,r=i.Util.inverseTransform(this.transformMatrix),o=i.Util.applyTransform([0,0],r),a=i.Util.applyTransform([0,n],r),s=i.Util.applyTransform([t,0],r),l=i.Util.applyTransform([t,n],r),c=Math.min(o[0],a[0],s[0],l[0]),u=Math.min(o[1],a[1],s[1],l[1]),d=Math.max(o[0],a[0],s[0],l[0]),h=Math.max(o[1],a[1],s[1],l[1]),p=this.svgFactory.createElement("svg:rect");p.setAttributeNS(null,"x",c),p.setAttributeNS(null,"y",u),p.setAttributeNS(null,"width",d-c),p.setAttributeNS(null,"height",h-u),p.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&p.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(p)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){const t=e[1],n=e[2],r=e[3]||i.IDENTITY_MATRIX,[o,a,s,l]=e[4],c=e[5],u=e[6],d=e[7],h="shading"+E++,[p,f,m,g]=i.Util.normalizeRect([...i.Util.applyTransform([o,a],r),...i.Util.applyTransform([s,l],r)]),[v,y]=i.Util.singularValueDecompose2dScale(r),b=c*v,S=u*y,w=this.svgFactory.createElement("svg:pattern");w.setAttributeNS(null,"id",h),w.setAttributeNS(null,"patternUnits","userSpaceOnUse"),w.setAttributeNS(null,"width",b),w.setAttributeNS(null,"height",S),w.setAttributeNS(null,"x",`${p}`),w.setAttributeNS(null,"y",`${f}`);const _=this.svg,k=this.transformMatrix,C=this.current.fillColor,P=this.current.strokeColor,x=this.svgFactory.create(m-p,g-f);if(this.svg=x,this.transformMatrix=r,2===d){const e=i.Util.makeHexColor(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(n)),this.svg=_,this.transformMatrix=k,this.current.fillColor=C,this.current.strokeColor=P,w.append(x.childNodes[0]),this.defs.append(w),`url(#${h})`}_makeShadingPattern(e){switch("string"==typeof e&&(e=this.objs.get(e)),e[0]){case"RadialAxial":const t="shading"+E++,n=e[3];let r;switch(e[1]){case"axial":const n=e[4],i=e[5];r=this.svgFactory.createElement("svg:linearGradient"),r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),r.setAttributeNS(null,"x1",n[0]),r.setAttributeNS(null,"y1",n[1]),r.setAttributeNS(null,"x2",i[0]),r.setAttributeNS(null,"y2",i[1]);break;case"radial":const o=e[4],a=e[5],s=e[6],l=e[7];r=this.svgFactory.createElement("svg:radialGradient"),r.setAttributeNS(null,"id",t),r.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),r.setAttributeNS(null,"cx",a[0]),r.setAttributeNS(null,"cy",a[1]),r.setAttributeNS(null,"r",l),r.setAttributeNS(null,"fx",o[0]),r.setAttributeNS(null,"fy",o[1]),r.setAttributeNS(null,"fr",s);break;default:throw new Error(`Unknown RadialAxial type: ${e[1]}`)}for(const e of n){const t=this.svgFactory.createElement("svg:stop");t.setAttributeNS(null,"offset",e[0]),t.setAttributeNS(null,"stop-color",e[1]),r.append(t)}return this.defs.append(r),`url(#${t})`;case"Mesh":return(0,i.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error(`Unknown IR type: ${e[0]}`)}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const n=this.current;let r=n.x,o=n.y,a=[],s=0;for(const n of e)switch(0|n){case i.OPS.rectangle:r=t[s++],o=t[s++];const e=r+t[s++],n=o+t[s++];a.push("M",g(r),g(o),"L",g(e),g(o),"L",g(e),g(n),"L",g(r),g(n),"Z");break;case i.OPS.moveTo:r=t[s++],o=t[s++],a.push("M",g(r),g(o));break;case i.OPS.lineTo:r=t[s++],o=t[s++],a.push("L",g(r),g(o));break;case i.OPS.curveTo:r=t[s+4],o=t[s+5],a.push("C",g(t[s]),g(t[s+1]),g(t[s+2]),g(t[s+3]),g(r),g(o)),s+=6;break;case i.OPS.curveTo2:a.push("C",g(r),g(o),g(t[s]),g(t[s+1]),g(t[s+2]),g(t[s+3])),r=t[s+2],o=t[s+3],s+=4;break;case i.OPS.curveTo3:r=t[s+2],o=t[s+3],a.push("C",g(t[s]),g(t[s+1]),g(r),g(o),g(r),g(o)),s+=4;break;case i.OPS.closePath:a.push("Z")}a=a.join(" "),n.path&&e.length>0&&e[0]!==i.OPS.rectangle&&e[0]!==i.OPS.moveTo?a=n.path.getAttributeNS(null,"d")+a:(n.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(n.path)),n.path.setAttributeNS(null,"d",a),n.path.setAttributeNS(null,"fill","none"),n.element=n.path,n.setCurrentPoint(r,o)}endPath(){const e=this.current;if(e.path=null,!this.pendingClip)return;if(!e.element)return void(this.pendingClip=null);const t="clippath"+y++,n=this.svgFactory.createElement("svg:clipPath");n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"transform",v(this.transformMatrix));const r=e.element.cloneNode(!0);if("evenodd"===this.pendingClip?r.setAttributeNS(null,"clip-rule","evenodd"):r.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,n.append(r),this.defs.append(n),e.activeClipUrl){e.clipGroup=null;for(const e of this.extraStack)e.clipGroup=null;n.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl=`url(#${t})`,this.tgrp=null}clip(e){this.pendingClip=e}closePath(){const e=this.current;if(e.path){const t=`${e.path.getAttributeNS(null,"d")}Z`;e.path.setAttributeNS(null,"d",t)}}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(const[t,n]of e)switch(t){case"LW":this.setLineWidth(n);break;case"LC":this.setLineCap(n);break;case"LJ":this.setLineJoin(n);break;case"ML":this.setMiterLimit(n);break;case"D":this.setDash(n[0],n[1]);break;case"RI":this.setRenderingIntent(n);break;case"FL":this.setFlatness(n);break;case"Font":this.setFont(n);break;case"CA":this.setStrokeAlpha(n);break;case"ca":this.setFillAlpha(n);break;default:(0,i.warn)(`Unimplemented graphic state operator ${t}`)}}fill(){const e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){const e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e,t=1){const n=this.current;let r=n.dashArray;1!==t&&r.length>0&&(r=r.map((function(e){return t*e}))),e.setAttributeNS(null,"stroke",n.strokeColor),e.setAttributeNS(null,"stroke-opacity",n.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",g(n.miterLimit)),e.setAttributeNS(null,"stroke-linecap",n.lineCap),e.setAttributeNS(null,"stroke-linejoin",n.lineJoin),e.setAttributeNS(null,"stroke-width",g(t*n.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",r.map(g).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",g(t*n.dashPhase)+"px")}eoFill(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){const e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(e)}paintImageXObject(e){const t=this.getObject(e);t?this.paintInlineImageXObject(t):(0,i.warn)(`Dependent image with object ID ${e} is not ready yet`)}paintInlineImageXObject(e,t){const n=e.width,r=e.height,i=p(e,this.forceDataSchema,!!t),o=this.svgFactory.createElement("svg:rect");o.setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",g(n)),o.setAttributeNS(null,"height",g(r)),this.current.element=o,this.clip("nonzero");const a=this.svgFactory.createElement("svg:image");a.setAttributeNS(c,"xlink:href",i),a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y",g(-r)),a.setAttributeNS(null,"width",g(n)+"px"),a.setAttributeNS(null,"height",g(r)+"px"),a.setAttributeNS(null,"transform",`scale(${g(1/n)} ${g(-1/r)})`),t?t.append(a):this._ensureTransformGroup().append(a)}paintImageMaskXObject(e){const t=this.getObject(e.data,e);if(t.bitmap)return void(0,i.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled.");const n=this.current,r=t.width,o=t.height,a=n.fillColor;n.maskId="mask"+b++;const s=this.svgFactory.createElement("svg:mask");s.setAttributeNS(null,"id",n.maskId);const l=this.svgFactory.createElement("svg:rect");l.setAttributeNS(null,"x","0"),l.setAttributeNS(null,"y","0"),l.setAttributeNS(null,"width",g(r)),l.setAttributeNS(null,"height",g(o)),l.setAttributeNS(null,"fill",a),l.setAttributeNS(null,"mask",`url(#${n.maskId})`),this.defs.append(s),this._ensureTransformGroup().append(l),this.paintInlineImageXObject(t,s)}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],n=t[3]-t[1],r=this.svgFactory.createElement("svg:rect");r.setAttributeNS(null,"x",t[0]),r.setAttributeNS(null,"y",t[1]),r.setAttributeNS(null,"width",g(e)),r.setAttributeNS(null,"height",g(n)),this.current.element=r,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){const t=this.svgFactory.create(e.width,e.height),n=this.svgFactory.createElement("svg:defs");t.append(n),this.defs=n;const r=this.svgFactory.createElement("svg:g");return r.setAttributeNS(null,"transform",v(e.transform)),t.append(r),this.svg=r,t}_ensureClipGroup(){if(!this.current.clipGroup){const e=this.svgFactory.createElement("svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(e),this.current.clipGroup=e}return this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",v(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().append(this.tgrp):this.svg.append(this.tgrp)),this.tgrp}}}}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__w_pdfjs_require__),n.exports}var __nested_webpack_exports__={};return(()=>{var e=__nested_webpack_exports__;Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AbortException",{enumerable:!0,get:function(){return t.AbortException}}),Object.defineProperty(e,"AnnotationEditorLayer",{enumerable:!0,get:function(){return o.AnnotationEditorLayer}}),Object.defineProperty(e,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return t.AnnotationEditorParamsType}}),Object.defineProperty(e,"AnnotationEditorType",{enumerable:!0,get:function(){return t.AnnotationEditorType}}),Object.defineProperty(e,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return a.AnnotationEditorUIManager}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return s.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"FeatureTest",{enumerable:!0,get:function(){return t.FeatureTest}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return n.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return r.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return n.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return r.PixelsPerInch}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return r.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return c.SVGGraphics}}),Object.defineProperty(e,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return t.UNSUPPORTED_FEATURES}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return u.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return n.build}}),Object.defineProperty(e,"createPromiseCapability",{enumerable:!0,get:function(){return t.createPromiseCapability}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return n.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return r.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return r.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return r.getXfaPageViewport}}),Object.defineProperty(e,"isDataScheme",{enumerable:!0,get:function(){return r.isDataScheme}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return r.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return r.loadScript}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return i.renderTextLayer}}),Object.defineProperty(e,"setLayerDimensions",{enumerable:!0,get:function(){return r.setLayerDimensions}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"updateTextLayer",{enumerable:!0,get:function(){return i.updateTextLayer}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return n.version}});var t=__w_pdfjs_require__(1),n=__w_pdfjs_require__(2),r=__w_pdfjs_require__(6),i=__w_pdfjs_require__(26),o=__w_pdfjs_require__(27),a=__w_pdfjs_require__(5),s=__w_pdfjs_require__(32),l=__w_pdfjs_require__(14),c=__w_pdfjs_require__(35),u=__w_pdfjs_require__(34)})(),__nested_webpack_exports__})(),module.exports=factory()},1385:function(e){var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var s,l=[],c=!1,u=-1;function d(){c&&s&&(c=!1,s.length?l=s.concat(l):u=-1,l.length&&h())}function h(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(s=l,l=[];++u1)for(var n=1;nr.createElement("div",{className:"page-sidebar-content-overlay"})},1474:function(e){"use strict";var t=function(e){return e!=e};e.exports=function(e,n){return 0===e&&0===n?1/e==1/n:e===n||!(!t(e)||!t(n))}},1535:function(e,t,n){"use strict";n.r(t),n.d(t,{useItem:function(){return s}});var r=n(9471),i=n(1838),o=n(868),a=n(6371);function s(e){const[t,n]=(0,r.useState)(""),[s,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(""),d=(e.type,e.singleLinkContent?o.cN:o.p9),h=""===e.thumbnail?null:(0,i.formatInnerLink)(e.thumbnail,a.default.get("config-site").url);return(0,r.useEffect)((()=>{void 0!==e.onMount&&e.onMount()}),[]),{titleComponent:function(){let n=e.title;return""!==s&&(n+=" "+s),""!==t&&(n+=" "+t),e.singleLinkContent?r.createElement(o.Et,{title:e.title,ariaLabel:n}):r.createElement(o.w3,{title:e.title,ariaLabel:n,link:e.link})},descriptionComponent:function(){return e.hasMediaViewer&&e.hasMediaViewerDescr?[r.createElement(o.gR,{key:"1",description:e.meta_description?e.meta_description.trim():" "}),r.createElement(o.gR,{key:"2",description:e.description?e.description.trim():" "})]:r.createElement(o.gR,{description:e.description.trim()})},thumbnailUrl:h,UnderThumbWrapper:d}}},1554:function(e,t,n){"use strict";n.d(t,{t:function(){return r}});const r=e=>{if(!e)return;const t=e.split(".");return t[t.length-1]}},1610:function(e,t,n){"use strict";n.r(t),n.d(t,{usePopup:function(){return c}});var r=n(9471),i=n(9834),o=n(1134),a=n(2901);function s(e){const t=(0,r.useRef)(null),[n,s]=(0,r.useState)(!1),l=(0,r.useCallback)((e=>{if((0,o.CX)(e.target,"popup-fullscreen-overlay"))return void d();const n=(0,i.findDOMNode)(t.current),r=e.target;n&&!n.contains(r)&&d()}),[]),c=(0,r.useCallback)((e=>{27===(e.keyCode||e.charCode)&&l(e)}),[]);function u(){s(!0)}function d(){document.removeEventListener("mousedown",l),document.removeEventListener("keydown",c),s(!1)}function h(){n?d():u()}function p(){n&&d()}function f(){n||u()}return(0,r.useEffect)((()=>{n?(document.addEventListener("mousedown",l),document.addEventListener("keydown",c),"function"==typeof e.showCallback&&e.showCallback()):"function"==typeof e.hideCallback&&e.hideCallback()}),[n]),(0,r.useImperativeHandle)(e.contentRef,(()=>({toggle:h,tryToHide:p,tryToShow:f}))),n?r.createElement(a.Ay,{ref:t,className:e.className,style:e.style},e.children):null}function l(e){return r.cloneElement(e.children,{onClick:()=>e.contentRef.current.toggle()})}function c(){return[(0,r.useRef)(null),s,l]}},1661:function(e,t,n){"use strict";e.exports=n(9249)},1662:function(e,t,n){"use strict";e.exports=n(1993)},1701:function(e,t,n){"use strict";var r=n(4912);e.exports=function(e){return!!r(e)}},1702:function(e,t,n){"use strict";n.d(t,{R:function(){return o},e:function(){return a}});var r=n(6403),i=n(8354);const o=function(e,t,n){return void 0===e[t]||(0,i.tR)(e[t])?null:(0,r.m)(["Invalid prop `"+t+"` of type `"+typeof e[t]+"` supplied to `"+(n||"N/A")+"`, expected `positive integer or zero` ("+e[t]+")."])},a=function(e,t,n){return void 0===e[t]||(0,i.q6)(e[t])?null:(0,r.m)(["Invalid prop `"+t+"` of type `"+typeof e[t]+"` supplied to `"+(n||"N/A")+"`, expected `positive integer` ("+e[t]+")."])}},1723:function(e,t,n){"use strict";var r=n(1474);e.exports=function(){return"function"==typeof Object.is?Object.is:r}},1730:function(e,t,n){"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=n(6838),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),c=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!h["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===o.call(e),r=a(e),s=t&&"[object String]"===o.call(e),h=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var f=c&&n;if(s&&e.length>0&&!i.call(e,0))for(var m=0;m0)for(var g=0;g3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(r)r(e,t,{configurable:null===c&&d?d.configurable:!c,enumerable:null===s&&d?d.enumerable:!s,value:n,writable:null===l&&d?d.writable:!l});else{if(!u&&(s||l||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},1829:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{A:function(){return r}})},1838:function(e,t,n){"use strict";n.r(t),n.d(t,{BrowserEvents:function(){return r.GT},PositiveInteger:function(){return p.e},PositiveIntegerOrZero:function(){return p.R},addClassname:function(){return r.zc},cancelAnimationFrame:function(){return r.uU},csrfToken:function(){return c.G},deleteRequest:function(){return g.Fb},error:function(){return d.z},exportStore:function(){return o.A},formatInnerLink:function(){return a.c},formatManagementTableDate:function(){return s.n},formatViewsNumber:function(){return l.A},getRequest:function(){return g.iq},greaterCommonDivision:function(){return h.p7},hasClassname:function(){return r.CX},imageExtension:function(){return u.t},isGt:function(){return h.en},isInteger:function(){return h.Fq},isNumber:function(){return h.Et},isPositive:function(){return h.ep},isPositiveInteger:function(){return h.q6},isPositiveIntegerOrZero:function(){return h.tR},isPositiveNumber:function(){return h.F5},isZero:function(){return h.be},logErrorAndReturnError:function(){return i.m},logWarningAndReturnError:function(){return i.g},postRequest:function(){return g.MB},publishedOnDate:function(){return f.A},putRequest:function(){return g.zi},quickSort:function(){return m.g},removeClassname:function(){return r.qk},replaceString:function(){return y.u},requestAnimationFrame:function(){return r.xi},supportsSvgAsImg:function(){return r.kN},translateString:function(){return v.g},warn:function(){return d.R}});var r=n(1134),i=n(6403),o=n(977),a=n(463);if(!/^(152|201|33|543|594|722)$/.test(n.j))var s=n(8482);var l=n(4632),c=n(5393);if(!/^(152|543|594|722)$/.test(n.j))var u=n(1554);var d=n(8004),h=n(8354),p=n(1702),f=n(7673),m=n(1453),g=n(9659),v=n(4036),y=n(4470)},1871:function(e,t,n){"use strict";var r=n(7118),i=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),o=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M5.5,11.5c-.275,0-.341.159-.146.354l6.292,6.293a.5.5,0,0,0,.709,0l6.311-6.275c.2-.193.13-.353-.145-.355L15.5,11.5V1.5a1,1,0,0,0-1-1h-5a1,1,0,0,0-1,1V11a.5.5,0,0,1-.5.5Z"}),i.createElement("path",{d:"M23.5,18.5v4a1,1,0,0,1-1,1H1.5a1,1,0,0,1-1-1v-4"}))},a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;ne.length)){var t=e[C];t.setAttribute("tabindex","0"),t.focus()}}),[C]),i.useIsomorphicLayoutEffect((function(){var e=w.current,r=_.current;if(!(!e||0===r.length||n<0||n>r.length)){var i=r[n].closest(".rpv-thumbnail__items");i&&(m===t.ThumbnailDirection.Vertical?function(e,t){var n=e.getBoundingClientRect().top-t.getBoundingClientRect().top,r=e.clientHeight,i=t.clientHeight;n<0?t.scrollTop+=n:n+r<=i||(t.scrollTop+=n+r-i)}(i,e):function(e,t){var n=e.getBoundingClientRect().left-t.getBoundingClientRect().left,r=e.clientWidth,i=t.clientWidth;n<0?t.scrollLeft+=n:n+r<=i||(t.scrollLeft+=n+r-i)}(i,e))}}),[n,m]);var N=o.useCallback((function(e){R.current&&(D.markRendered(e),I.current=!1,B())}),[S]),j=o.useCallback((function(e,t){t.isVisible?D.setVisibility(e,t.ratio):D.setOutOfRange(e),B()}),[S]),B=o.useCallback((function(){if(!I.current){var e=D.getHighestPriorityPage();e>-1&&(D.markRendering(e),I.current=!0,T(e))}}),[S]);return o.useEffect((function(){h>=0&&(D.markRendering(h),I.current=!0,T(h))}),[S,h]),i.useIsomorphicLayoutEffect((function(){O!==v&&(D.markNotRendered(),B())}),[v]),o.createElement("div",{ref:w,"data-testid":"thumbnail__list",className:i.classNames({"rpv-thumbnail__list":!0,"rpv-thumbnail__list--horizontal":m===t.ThumbnailDirection.Horizontal,"rpv-thumbnail__list--rtl":x,"rpv-thumbnail__list--vertical":m===t.ThumbnailDirection.Vertical}),onKeyDown:function(e){switch(e.key){case"ArrowDown":!function(){if(w.current){var e=_.current,t=C+1;t=0&&e[C].setAttribute("tabindex","-1"),P(t))}}();break;case"ArrowUp":!function(){if(w.current){var e=_.current,t=C-1;t>=0&&(C>=0&&e[C].setAttribute("tabindex","-1"),P(t))}}();break;case"Enter":C>=0&&C0&&n===2*t-1||t>0&&n===2*t;break;case i.ViewMode.SinglePage:default:h=n===t}return o.createElement("div",{className:i.classNames({"rpv-thumbnail__items":!0,"rpv-thumbnail__items--dual":v===i.ViewMode.DualPage,"rpv-thumbnail__items--dual-cover":v===i.ViewMode.DualPageWithCover,"rpv-thumbnail__items--single":v===i.ViewMode.SinglePage,"rpv-thumbnail__items--selected":h}),key:"".concat(t,"___").concat(v)},e.map((function(e){return function(e){var t=v===i.ViewMode.DualPageWithCover&&(0===e||E%2==0&&e===E-1),h="".concat(r.loadingTask.docId,"___").concat(e),m=a.length===E?a[e]:"".concat(e+1),S=u?u({currentPage:n,pageIndex:e,numPages:E,pageLabel:m}):m,w=s.has(e)?s.get(e):0,_=o.createElement(p,{doc:r,pageHeight:l,pageIndex:e,pageRotation:w,pageWidth:c,rotation:f,shouldRender:M===e,thumbnailWidth:g,onRenderCompleted:N,onVisibilityChanged:j});return d?d({currentPage:n,key:h,numPages:E,pageIndex:e,renderPageLabel:o.createElement(o.Fragment,null,S),renderPageThumbnail:_,onJumpToPage:function(){return y(e)},onRotatePage:function(t){return b(e,t)}}):o.createElement("div",{key:h},o.createElement("div",{className:i.classNames({"rpv-thumbnail__item":!0,"rpv-thumbnail__item--dual-even":v===i.ViewMode.DualPage&&e%2==0,"rpv-thumbnail__item--dual-odd":v===i.ViewMode.DualPage&&e%2==1,"rpv-thumbnail__item--dual-cover":t,"rpv-thumbnail__item--dual-cover-even":v===i.ViewMode.DualPageWithCover&&!t&&e%2==0,"rpv-thumbnail__item--dual-cover-odd":v===i.ViewMode.DualPageWithCover&&!t&&e%2==1,"rpv-thumbnail__item--single":v===i.ViewMode.SinglePage,"rpv-thumbnail__item--selected":n===e}),role:"button",tabIndex:n===e?0:-1,onClick:function(){return y(e)}},_),o.createElement("div",{"data-testid":"thumbnail__label-".concat(e),className:"rpv-thumbnail__label"},S))}(e)})))})))},m=function(e){var t=e.renderCurrentPageLabel,n=e.renderThumbnailItem,r=e.store,a=e.thumbnailDirection,s=e.thumbnailWidth,l=o.useState(r.get("doc")),c=l[0],h=l[1],p=o.useState(r.get("currentPage")||0),m=p[0],g=p[1],v=o.useState(r.get("pageHeight")||0),y=v[0],b=v[1],E=o.useState(r.get("pageWidth")||0),S=E[0],w=E[1],_=o.useState(r.get("rotation")||0),k=_[0],C=_[1],P=o.useState(r.get("pagesRotation")||new Map),x=P[0],A=P[1],M=o.useState(r.get("rotatedPage")||-1),T=M[0],R=M[1],O=o.useState(r.get("viewMode")),I=O[0],D=O[1],L=function(e){g(e)},F=function(e){h(e)},N=function(e){b(e)},j=function(e){w(e)},B=function(e){C(e)},U=function(e){A(e)},z=function(e){R(e)},V=function(e){D(e)},q=function(e){var t=r.get("jumpToPage");t&&t(e)},H=function(e,t){r.get("rotatePage")(e,t)};return o.useEffect((function(){return r.subscribe("doc",F),r.subscribe("pageHeight",N),r.subscribe("pageWidth",j),r.subscribe("rotatedPage",z),r.subscribe("rotation",B),r.subscribe("pagesRotation",U),r.subscribe("viewMode",V),function(){r.unsubscribe("doc",F),r.unsubscribe("pageHeight",N),r.unsubscribe("pageWidth",j),r.unsubscribe("rotatedPage",z),r.unsubscribe("rotation",B),r.unsubscribe("pagesRotation",U),r.unsubscribe("viewMode",V)}}),[]),i.useIsomorphicLayoutEffect((function(){return r.subscribe("currentPage",L),function(){r.unsubscribe("currentPage",L)}}),[]),c?o.createElement(i.LazyRender,{testId:"thumbnail__list-container",attrs:{className:"rpv-thumbnail__list-container"}},o.createElement(d,{doc:c},(function(e){return o.createElement(f,{currentPage:m,doc:c,labels:e,pagesRotation:x,pageHeight:y,pageWidth:S,renderCurrentPageLabel:t,renderThumbnailItem:n,rotatedPage:T,rotation:k,thumbnailDirection:a,thumbnailWidth:s,viewMode:I,onJumpToPage:q,onRotatePage:H})}))):o.createElement("div",{"data-testid":"thumbnail-list__loader",className:"rpv-thumbnail__loader"},o.useContext(u).renderSpinner())};t.thumbnailPlugin=function(e){var n=o.useMemo((function(){return i.createStore({rotatePage:function(){},viewMode:i.ViewMode.SinglePage})}),[]),r=o.useState(""),s=r[0],d=r[1];return{install:function(e){n.update("jumpToPage",e.jumpToPage),n.update("rotatePage",e.rotatePage)},onDocumentLoad:function(e){d(e.doc.loadingTask.docId),n.update("doc",e.doc)},onViewerStateChange:function(e){return n.update("currentPage",e.pageIndex),n.update("pagesRotation",e.pagesRotation),n.update("pageHeight",e.pageHeight),n.update("pageWidth",e.pageWidth),n.update("rotation",e.rotation),n.update("rotatedPage",e.rotatedPage),n.update("viewMode",e.viewMode),e},Cover:function(t){return o.createElement(l,a({},t,{renderSpinner:null==e?void 0:e.renderSpinner,store:n}))},Thumbnails:o.useCallback((function(r){return o.createElement(u.Provider,{value:{renderSpinner:(null==e?void 0:e.renderSpinner)||c}},o.createElement(m,{renderCurrentPageLabel:null==e?void 0:e.renderCurrentPageLabel,renderThumbnailItem:null==r?void 0:r.renderThumbnailItem,store:n,thumbnailDirection:(null==r?void 0:r.thumbnailDirection)||t.ThumbnailDirection.Vertical,thumbnailWidth:(null==e?void 0:e.thumbnailWidth)||100}))}),[s])}}},2031:function(e){"use strict";e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},2063:function(e,t,n){e.exports.Dispatcher=n(5986)},2078:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,{A:function(){return r}})},2099:function(e,t,n){"use strict";var r=n(7118),i=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),o=function(){return i.createElement(r.Icon,{ignoreDirection:!0,size:16},i.createElement("path",{d:"M10.5,0.499c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.499,10.5,0.499z\n M23.5,23.499\n l-5.929-5.929\n M5.5,10.499h10\n M10.5,5.499v10"}))},a=function(){return i.createElement(r.Icon,{ignoreDirection:!0,size:16},i.createElement("path",{d:"M10.5,0.499c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.499,10.5,0.499z\n M23.5,23.499\n l-5.929-5.929\n M5.5,10.499h10"}))},s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;ne}))||e},m=function(e){var t=p.findIndex((function(t){return t>=e}));return-1===t||0===t?e:p[t-1]},g=function(e){var t=e.containerRef,n=e.store,o=function(e){if(!e.shiftKey&&!e.altKey&&(r.isMac()?e.metaKey:e.ctrlKey)){var i=t.current;if(i&&document.activeElement&&i.contains(document.activeElement)){var o=n.get("zoom");if(o){var a=n.get("scale")||1,s=1;switch(e.key){case"-":s=m(a);break;case"=":s=f(a);break;case"0":s=1;break;default:s=a}s!==a&&(e.preventDefault(),o(s))}}}};return i.useEffect((function(){if(t.current)return document.addEventListener("keydown",o),function(){document.removeEventListener("keydown",o)}}),[t.current]),i.createElement(i.Fragment,null)},v=[.5,.75,1,1.25,1.5,2,3,4],y={left:0,top:8},b=function(e){var t=e.levels,n=void 0===t?v:t,o=e.scale,a=e.onZoom,s=i.useContext(r.LocalizationContext).l10n,l=i.useContext(r.ThemeContext).direction===r.TextDirection.RightToLeft,c=s&&s.zoom?s.zoom.zoomDocument:"Zoom document";return i.createElement(r.Popover,{ariaControlsSuffix:"zoom",ariaHasPopup:"menu",position:r.Position.BottomCenter,target:function(e){return i.createElement(r.MinimalButton,{ariaLabel:c,testId:"zoom__popover-target",onClick:function(){e()}},i.createElement("span",{className:"rpv-zoom__popover-target"},i.createElement("span",{"data-testid":"zoom__popover-target-scale",className:r.classNames({"rpv-zoom__popover-target-scale":!0,"rpv-zoom__popover-target-scale--ltr":!l,"rpv-zoom__popover-target-scale--rtl":l})},Math.round(100*o),"%"),i.createElement("span",{className:"rpv-zoom__popover-target-arrow"})))},content:function(e){return i.createElement(r.Menu,null,Object.keys(r.SpecialZoomLevel).map((function(t){var n=t;return i.createElement(r.MenuItem,{key:n,onClick:function(){e(),a(n)}},function(e){switch(e){case r.SpecialZoomLevel.ActualSize:return s&&s.zoom?s.zoom.actualSize:"Actual size";case r.SpecialZoomLevel.PageFit:return s&&s.zoom?s.zoom.pageFit:"Page fit";case r.SpecialZoomLevel.PageWidth:return s&&s.zoom?s.zoom.pageWidth:"Page width"}}(n))})),i.createElement(r.MenuDivider,null),n.map((function(t){return i.createElement(r.MenuItem,{key:t,onClick:function(){e(),a(t)}},"".concat(Math.round(100*t),"%"))})))},offset:y,closeOnClickOutside:!0,closeOnEscape:!0})},E=function(e){var t=e.children,n=e.levels,r=e.store;return(t||function(e){return i.createElement(b,{levels:n,scale:e.scale,onZoom:e.onZoom})})({scale:l(r).scale,onZoom:function(e){var t=r.get("zoom");t&&t(e)}})},S={left:0,top:8},w=function(e){var t=e.enableShortcuts,n=e.onClick,a=i.useContext(r.LocalizationContext).l10n,s=a&&a.zoom?a.zoom.zoomIn:"Zoom in",l=t?r.isMac()?"Meta+=":"Ctrl+=":"";return i.createElement(r.Tooltip,{ariaControlsSuffix:"zoom-in",position:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaKeyShortcuts:l,ariaLabel:s,testId:"zoom__in-button",onClick:n},i.createElement(o,null)),content:function(){return s},offset:S})},_=function(e){var t=e.children,n=e.enableShortcuts,r=e.store,i=l(r).scale;return(t||w)({enableShortcuts:n,onClick:function(){var e=r.get("zoom");e&&e(f(i))}})},k=function(e){var t=e.onClick,n=i.useContext(r.LocalizationContext).l10n,a=n&&n.zoom?n.zoom.zoomIn:"Zoom in";return i.createElement(r.MenuItem,{icon:i.createElement(o,null),testId:"zoom__in-menu",onClick:t},a)},C={left:0,top:8},P=function(e){var t=e.enableShortcuts,n=e.onClick,o=i.useContext(r.LocalizationContext).l10n,s=o&&o.zoom?o.zoom.zoomOut:"Zoom out",l=t?r.isMac()?"Meta+-":"Ctrl+-":"";return i.createElement(r.Tooltip,{ariaControlsSuffix:"zoom-out",position:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaKeyShortcuts:l,ariaLabel:s,testId:"zoom__out-button",onClick:n},i.createElement(a,null)),content:function(){return s},offset:C})},x=function(e){var t=e.children,n=e.enableShortcuts,r=e.store,i=l(r).scale;return(t||P)({enableShortcuts:n,onClick:function(){var e=r.get("zoom");e&&e(m(i))}})},A=function(e){var t=e.onClick,n=i.useContext(r.LocalizationContext).l10n,o=n&&n.zoom?n.zoom.zoomOut:"Zoom out";return i.createElement(r.MenuItem,{icon:i.createElement(a,null),testId:"zoom__out-menu",onClick:t},o)};t.ZoomInIcon=o,t.ZoomOutIcon=a,t.zoomPlugin=function(e){var t=i.useMemo((function(){return Object.assign({},{enableShortcuts:!0},e)}),[]),n=i.useMemo((function(){return r.createStore({})}),[]),o=function(e){return i.createElement(_,s({enableShortcuts:t.enableShortcuts},e,{store:n}))},a=function(e){return i.createElement(x,s({enableShortcuts:t.enableShortcuts},e,{store:n}))},l=function(e){return i.createElement(E,s({},e,{store:n}))};return{renderViewer:function(e){var r=e.slot;if(!t.enableShortcuts)return r;var o={children:i.createElement(i.Fragment,null,i.createElement(g,{containerRef:e.containerRef,store:n}),i.createElement(h,{pagesContainerRef:e.pagesContainerRef,store:n}),r.children)};return s(s({},r),o)},install:function(e){n.update("zoom",e.zoom)},onViewerStateChange:function(e){return n.update("scale",e.scale),e},zoomTo:function(e){var t=n.get("zoom");t&&t(e)},CurrentScale:function(e){return i.createElement(c,s({},e,{store:n}))},ZoomIn:o,ZoomInButton:function(){return i.createElement(o,null,(function(e){return i.createElement(w,s({},e))}))},ZoomInMenuItem:function(e){return i.createElement(o,null,(function(t){return i.createElement(k,{onClick:function(){t.onClick(),e.onClick()}})}))},ZoomOut:a,ZoomOutButton:function(){return i.createElement(a,null,(function(e){return i.createElement(P,s({},e))}))},ZoomOutMenuItem:function(e){return i.createElement(a,null,(function(t){return i.createElement(A,{onClick:function(){t.onClick(),e.onClick()}})}))},Zoom:l,ZoomPopover:function(e){return i.createElement(l,null,(function(t){return i.createElement(b,s({levels:null==e?void 0:e.levels},t))}))}}}},2101:function(e,t,n){"use strict";n.r(t)},2127:function(e,t,n){"use strict";n.r(t);var r=n(9032),i=n.n(r),o=n(1838),a=n(3997),s=n(4571),l=n.n(s),c=n(6371),u=n(8974);const d={};class h extends(i()){constructor(){super(),this.mediacms_config=(0,a.$)(window.MediaCMS),this._MEDIA=null,this.pagePlaylistId=null,this.pagePlaylistData=null,this.userList=null,d[Object.defineProperty(this,"id",{value:"MediaPageStoreData_"+Object.keys(d).length}).id]={likedMedia:!1,dislikedMedia:!1,reported_times:0,while:{deleteMedia:!1,submitComment:!1,deleteCommentId:null}},this.removeMediaResponse=this.removeMediaResponse.bind(this),this.removeMediaFail=this.removeMediaFail.bind(this),this.submitCommentFail=this.submitCommentFail.bind(this),this.submitCommentResponse=this.submitCommentResponse.bind(this),this.removeCommentFail=this.removeCommentFail.bind(this),this.removeCommentResponse=this.removeCommentResponse.bind(this)}loadData(){if(!d[this.id].mediaId){let e=function(){let e=new(l())(window.location.href).query;return e?(e=e.substring(1),e.split("&"),e=e.length?e.split("="):[]):e=[],e}();if(e.length){let t=0;for(;t-1?i(n):n}},2289:function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function b(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function E(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&y(e,t):y(e,t))||r&&e===n)return e;if(e===n)break}while(e=b(e))}return null}var S,w=/\s+/g;function _(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(w," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(w," ")}}function k(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function C(e,t){var n="";if("string"==typeof e)n=e;else do{var r=k(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function P(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i=o:i<=o))return r;if(r===x())break;r=D(r,!1)}return!1}function T(e,t,n,r){for(var i=0,o=0,a=e.children;o2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(n,H);q.pluginEvent.bind(Ne)(e,t,i({dragEl:$,parentEl:Y,ghostEl:K,rootEl:X,nextEl:Q,lastDownEl:J,cloneEl:Z,cloneHidden:ee,dragStarted:pe,putSortable:ae,activeSortable:Ne.active,originalEvent:r,oldIndex:te,oldDraggableIndex:re,newIndex:ne,newDraggableIndex:ie,hideGhostForTarget:Ie,unhideGhostForTarget:De,cloneNowHidden:function(){ee=!0},cloneNowShown:function(){ee=!1},dispatchSortableEvent:function(e){G({sortable:t,name:e,originalEvent:r})}},o))};function G(e){!function(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,a=e.cloneEl,s=e.toEl,l=e.fromEl,d=e.oldIndex,h=e.newIndex,p=e.oldDraggableIndex,f=e.newDraggableIndex,m=e.originalEvent,g=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[U]){var y,b=t.options,E="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||c||u?(y=document.createEvent("Event")).initEvent(r,!0,!0):y=new CustomEvent(r,{bubbles:!0,cancelable:!0}),y.to=s||n,y.from=l||n,y.item=o||n,y.clone=a,y.oldIndex=d,y.newIndex=h,y.oldDraggableIndex=p,y.newDraggableIndex=f,y.originalEvent=m,y.pullMode=g?g.lastPutMode:void 0;var S=i(i({},v),q.getEventProperties(r,t));for(var w in S)y[w]=S[w];n&&n.dispatchEvent(y),b[E]&&b[E].call(t,y)}}(i({putSortable:ae,cloneEl:Z,targetEl:$,rootEl:X,oldIndex:te,oldDraggableIndex:re,newIndex:ne,newDraggableIndex:ie},e))}var $,Y,K,X,Q,J,Z,ee,te,ne,re,ie,oe,ae,se,le,ce,ue,de,he,pe,fe,me,ge,ve,ye=!1,be=!1,Ee=[],Se=!1,we=!1,_e=[],ke=!1,Ce=[],Pe="undefined"!=typeof document,xe=p,Ae=u||c?"cssFloat":"float",Me=Pe&&!f&&!p&&"draggable"in document.createElement("div"),Te=function(){if(Pe){if(c)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Re=function(e,t){var n=k(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=T(e,0,t),o=T(e,1,t),a=i&&k(i),s=o&&k(o),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+A(i).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+A(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[Ae]||o&&"none"===n[Ae]&&l+c>r)?"vertical":"horizontal"},Oe=function(e){function t(e,n){return function(r,i,o,a){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,i,o,a),n)(r,i,o,a);var l=(n?r:i).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},r=e.group;r&&"object"==o(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},Ie=function(){!Te&&K&&k(K,"display","none")},De=function(){!Te&&K&&k(K,"display","")};Pe&&!f&&document.addEventListener("click",(function(e){if(be)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),be=!1,!1}),!0);var Le=function(e){if($){e=e.touches?e.touches[0]:e;var t=(i=e.clientX,o=e.clientY,Ee.some((function(e){var t=e[U].options.emptyInsertThreshold;if(t&&!R(e)){var n=A(e),r=i>=n.left-t&&i<=n.right+t,s=o>=n.top-t&&o<=n.bottom+t;return r&&s?a=e:void 0}})),a);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[U]._onDragOver(n)}}var i,o,a},Fe=function(e){$&&$.parentNode[U]._isOutsideThisEl(e.target)};function Ne(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=s({},t),e[U]=this;var n,r,o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Re(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ne.supportPointer&&"PointerEvent"in window&&(!h||p),emptyInsertThreshold:5};for(var a in q.initializePlugins(this,e,o),o)!(a in t)&&(t[a]=o[a]);for(var l in Oe(t),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!t.forceFallback&&Me,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?g(e,"pointerdown",this._onTapStart):(g(e,"mousedown",this._onTapStart),g(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(g(e,"dragover",this),g(e,"dragenter",this)),Ee.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),s(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==k(e,"display")&&e!==Ne.ghost){r.push({target:e,rect:A(e)});var t=i({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=C(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var i=!1,o=0;r.forEach((function(e){var n=0,r=e.target,a=r.fromRect,s=A(r),l=r.prevFromRect,c=r.prevToRect,u=e.rect,d=C(r,!0);d&&(s.top-=d.f,s.left-=d.e),r.toRect=s,r.thisAnimationDuration&&L(l,s)&&!L(a,s)&&(u.top-s.top)/(u.left-s.left)==(a.top-s.top)/(a.left-s.left)&&(n=function(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}(u,l,c,t.options)),L(s,a)||(r.prevFromRect=a,r.prevToRect=s,n||(n=t.options.animation),t.animate(r,u,s,n)),n&&(i=!0,o=Math.max(o,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout((function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null}),n),r.thisAnimationDuration=n)})),clearTimeout(n),i?n=setTimeout((function(){"function"==typeof e&&e()}),o):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,r){if(r){k(e,"transition",""),k(e,"transform","");var i=C(this.el),o=i&&i.a,a=i&&i.d,s=(t.left-n.left)/(o||1),l=(t.top-n.top)/(a||1);e.animatingX=!!s,e.animatingY=!!l,k(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),k(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),k(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){k(e,"transition",""),k(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r)}}}))}function je(e,t,n,r,i,o,a,s){var l,d,h=e[U],p=h.options.onMove;return!window.CustomEvent||c||u?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=i||t,l.relatedRect=o||A(t),l.willInsertAfter=s,l.originalEvent=a,e.dispatchEvent(l),p&&(d=p.call(h,l,a)),d}function Be(e){e.draggable=!1}function Ue(){ke=!1}function ze(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function Ve(e){return setTimeout(e,0)}function qe(e){return clearTimeout(e)}Ne.prototype={constructor:Ne,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(fe=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,$):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,o=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=r.filter;if(function(e){Ce.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&Ce.push(r)}}(n),!$&&!(/mousedown|pointerdown/.test(o)&&0!==e.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!h||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=E(s,r.draggable,n,!1))&&s.animated||J===s)){if(te=O(s),re=O(s,r.draggable),"function"==typeof c){if(c.call(this,e,s,this))return G({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),W("filter",t,{evt:e}),void(i&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=E(l,r.trim(),n,!1))return G({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),W("filter",t,{evt:e}),!0}))))return void(i&&e.preventDefault());r.handle&&!E(l,r.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var r,i=this,o=i.el,a=i.options,s=o.ownerDocument;if(n&&!$&&n.parentNode===o){var l=A(n);if(X=o,Y=($=n).parentNode,Q=$.nextSibling,J=n,oe=a.group,Ne.dragged=$,se={target:$,clientX:(t||e).clientX,clientY:(t||e).clientY},de=se.clientX-l.left,he=se.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,$.style["will-change"]="all",r=function(){W("delayEnded",i,{evt:e}),Ne.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!d&&i.nativeDraggable&&($.draggable=!0),i._triggerDragStart(e,t),G({sortable:i,name:"choose",originalEvent:e}),_($,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){P($,e.trim(),Be)})),g(s,"dragover",Le),g(s,"mousemove",Le),g(s,"touchmove",Le),a.supportPointer?(g(s,"pointerup",i._onDrop),!this.nativeDraggable&&g(s,"pointercancel",i._onDrop)):(g(s,"mouseup",i._onDrop),g(s,"touchend",i._onDrop),g(s,"touchcancel",i._onDrop)),d&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$.draggable=!0),W("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(u||c))r();else{if(Ne.eventCanceled)return void this._onDrop();a.supportPointer?(g(s,"pointerup",i._disableDelayedDrag),g(s,"pointercancel",i._disableDelayedDrag)):(g(s,"mouseup",i._disableDelayedDrag),g(s,"touchend",i._disableDelayedDrag),g(s,"touchcancel",i._disableDelayedDrag)),g(s,"mousemove",i._delayedDragTouchMoveHandler),g(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&g(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){$&&Be($),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._disableDelayedDrag),v(e,"touchend",this._disableDelayedDrag),v(e,"touchcancel",this._disableDelayedDrag),v(e,"pointerup",this._disableDelayedDrag),v(e,"pointercancel",this._disableDelayedDrag),v(e,"mousemove",this._delayedDragTouchMoveHandler),v(e,"touchmove",this._delayedDragTouchMoveHandler),v(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?g(document,"pointermove",this._onTouchMove):g(document,t?"touchmove":"mousemove",this._onTouchMove):(g($,"dragend",this),g(X,"dragstart",this._onDragStart));try{document.selection?Ve((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(ye=!1,X&&$){W("dragStarted",this,{evt:t}),this.nativeDraggable&&g(document,"dragover",Fe);var n=this.options;!e&&_($,n.dragClass,!1),_($,n.ghostClass,!0),Ne.active=this,e&&this._appendGhost(),G({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(le){this._lastX=le.clientX,this._lastY=le.clientY,Ie();for(var e=document.elementFromPoint(le.clientX,le.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(le.clientX,le.clientY))!==t;)t=e;if($.parentNode[U]._isOutsideThisEl(e),t)do{if(t[U]&&t[U]._onDragOver({clientX:le.clientX,clientY:le.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=b(t));De()}},_onTouchMove:function(e){if(se){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,o=K&&C(K,!0),a=K&&o&&o.a,s=K&&o&&o.d,l=xe&&ve&&I(ve),c=(i.clientX-se.clientX+r.x)/(a||1)+(l?l[0]-_e[0]:0)/(a||1),u=(i.clientY-se.clientY+r.y)/(s||1)+(l?l[1]-_e[1]:0)/(s||1);if(!Ne.active&&!ye){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))i.right+10||e.clientY>r.bottom&&e.clientX>r.left:e.clientY>i.bottom+10||e.clientX>r.right&&e.clientY>r.top}(e,o,this)&&!g.animated){if(g===$)return q(!1);if(g&&a===e.target&&(s=g),s&&(n=A(s)),!1!==je(X,a,$,t,s,n,e,!!s))return V(),g&&g.nextSibling?a.insertBefore($,g.nextSibling):a.appendChild($),Y=a,H(),q(!0)}else if(g&&function(e,t,n){var r=A(T(n.el,0,n.options,!0)),i=B(n.el,n.options,K);return t?e.clientXu+c*o/2:ld-ge)return-me}else if(l>u+c*(1-i)/2&&ld-c*o/2)?l>u+c/2?1:-1:0}(e,s,n,o,C?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,we,fe===s),0!==y){var D=O($);do{D-=y,S=Y.children[D]}while(S&&("none"===k(S,"display")||S===K))}if(0===y||S===s)return q(!1);fe=s,me=y;var L=s.nextElementSibling,F=!1,j=je(X,a,$,t,s,n,e,F=1===y);if(!1!==j)return 1!==j&&-1!==j||(F=1===j),ke=!0,setTimeout(Ue,30),V(),F&&!L?a.appendChild($):s.parentNode.insertBefore($,F?L:s),x&&N(x,0,I-x.scrollTop),Y=$.parentNode,void 0===b||we||(ge=Math.abs(b-A(s)[P])),H(),q(!0)}if(a.contains($))return q(!1)}return!1}function z(l,c){W(l,f,i({evt:e,isOwner:d,axis:o?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:h,fromSortable:p,target:s,completed:q,onMove:function(n,r){return je(X,a,$,t,n,A(n),e,r)},changed:H},c))}function V(){z("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function q(t){return z("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(f),f!==p&&(_($,ae?ae.options.ghostClass:u.options.ghostClass,!1),_($,l.ghostClass,!0)),ae!==f&&f!==Ne.active?ae=f:f===Ne.active&&ae&&(ae=null),p===f&&(f._ignoreWhileAnimating=s),f.animateAll((function(){z("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(s===$&&!$.animated||s===a&&!s.animated)&&(fe=null),l.dragoverBubble||e.rootEl||s===document||($.parentNode[U]._isOutsideThisEl(e.target),!t&&Le(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function H(){ne=O($),ie=O($,l.draggable),G({sortable:f,name:"change",toEl:a,newIndex:ne,newDraggableIndex:ie,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){v(document,"mousemove",this._onTouchMove),v(document,"touchmove",this._onTouchMove),v(document,"pointermove",this._onTouchMove),v(document,"dragover",Le),v(document,"mousemove",Le),v(document,"touchmove",Le)},_offUpEvents:function(){var e=this.el.ownerDocument;v(e,"mouseup",this._onDrop),v(e,"touchend",this._onDrop),v(e,"pointerup",this._onDrop),v(e,"pointercancel",this._onDrop),v(e,"touchcancel",this._onDrop),v(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ne=O($),ie=O($,n.draggable),W("drop",this,{evt:e}),Y=$&&$.parentNode,ne=O($),ie=O($,n.draggable),Ne.eventCanceled||(ye=!1,we=!1,Se=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qe(this.cloneId),qe(this._dragStartId),this.nativeDraggable&&(v(document,"drop",this),v(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&k(document.body,"user-select",""),k($,"transform",""),e&&(pe&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),K&&K.parentNode&&K.parentNode.removeChild(K),(X===Y||ae&&"clone"!==ae.lastPutMode)&&Z&&Z.parentNode&&Z.parentNode.removeChild(Z),$&&(this.nativeDraggable&&v($,"dragend",this),Be($),$.style["will-change"]="",pe&&!ye&&_($,ae?ae.options.ghostClass:this.options.ghostClass,!1),_($,this.options.chosenClass,!1),G({sortable:this,name:"unchoose",toEl:Y,newIndex:null,newDraggableIndex:null,originalEvent:e}),X!==Y?(ne>=0&&(G({rootEl:Y,name:"add",toEl:Y,fromEl:X,originalEvent:e}),G({sortable:this,name:"remove",toEl:Y,originalEvent:e}),G({rootEl:Y,name:"sort",toEl:Y,fromEl:X,originalEvent:e}),G({sortable:this,name:"sort",toEl:Y,originalEvent:e})),ae&&ae.save()):ne!==te&&ne>=0&&(G({sortable:this,name:"update",toEl:Y,originalEvent:e}),G({sortable:this,name:"sort",toEl:Y,originalEvent:e})),Ne.active&&(null!=ne&&-1!==ne||(ne=te,ie=re),G({sortable:this,name:"end",toEl:Y,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){W("nulling",this),X=$=Y=K=Q=Z=J=ee=se=le=pe=ne=ie=te=re=fe=me=ae=oe=Ne.dragged=Ne.ghost=Ne.clone=Ne.active=null,Ce.forEach((function(e){e.checked=!0})),Ce.length=ce=ue=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":$&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,o=this.options;r0?n:0),!0)},i?i(e.exports,"apply",{value:a}):e.exports.apply=a},2757:function(e,t,n){"use strict";n.r(t),n.d(t,{itemClassname:function(){return c},useMediaItem:function(){return u}});var r=n(9471),i=n(4350),o=n(1838),a=n(7460),s=n(868),l=n(1535);function c(e,t,n){let r=e;return""!==t&&(r+=" "+t),n&&(r+=" pl-active-item"),r}function u(e){const{titleComponent:t,descriptionComponent:n,thumbnailUrl:c,UnderThumbWrapper:u}=(0,l.useItem)({...e});return[t,n,c,u,function(){return r.createElement(s.Aj,{link:e.editLink})},function(){return e.hideAllMeta?null:r.createElement("span",{className:"item-meta"},function(){if(e.hideAuthor)return null;if(e.singleLinkContent)return r.createElement(s.rc,{name:e.author_name});const t=""===e.author_link?null:(0,o.formatInnerLink)(e.author_link,a.PageStore.get("config-site").url);return r.createElement(s.$2,{name:e.author_name,link:t})}(),e.hideViews?null:r.createElement(s.jf,{views:e.views}),function(){if(e.hideDate)return null;const t=(0,o.replaceString)((0,i.GP)(new Date(e.publish_date))),n="string"==typeof e.publish_date?Date.parse(e.publish_date):Date.parse(new Date(e.publish_date));return r.createElement(s.fR,{time:e.publish_date,dateTime:n,text:t})}())}]}},2763:function(e,t,n){"use strict";var r=n(1385);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;te.length)&&(n=e.length),e.substring(n-t.length,n)===t}var b="",E="",S="",w="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function k(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function C(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var P=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(P,e);var n,i,s,u,d=(n=P,i=h(),function(){var e,t=f(n);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return l(this,e)});function P(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,P),"object"!==m(e)||null===e)throw new v("options","Object",e);var n=e.message,i=e.operator,o=e.stackStartFn,a=e.actual,s=e.expected,u=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)t=d.call(this,String(n));else if(r.stderr&&r.stderr.isTTY&&(r.stderr&&r.stderr.getColorDepth&&1!==r.stderr.getColorDepth()?(b="",E="",w="",S=""):(b="",E="",w="",S="")),"object"===m(a)&&null!==a&&"object"===m(s)&&null!==s&&"stack"in a&&a instanceof Error&&"stack"in s&&s instanceof Error&&(a=k(a),s=k(s)),"deepStrictEqual"===i||"strictEqual"===i)t=d.call(this,function(e,t,n){var i="",o="",a=0,s="",l=!1,c=C(e),u=c.split("\n"),d=C(t).split("\n"),h=0,p="";if("strictEqual"===n&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===u.length&&1===d.length&&u[0]!==d[0]){var f=u[0].length+d[0].length;if(f<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(_[n],"\n\n")+"".concat(u[0]," !== ").concat(d[0],"\n")}else if("strictEqualObject"!==n&&f<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;u[0][h]===d[0][h];)h++;h>2&&(p="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",h),"^"),h=0)}}for(var g=u[u.length-1],v=d[d.length-1];g===v&&(h++<2?s="\n ".concat(g).concat(s):i=g,u.pop(),d.pop(),0!==u.length&&0!==d.length);)g=u[u.length-1],v=d[d.length-1];var k=Math.max(u.length,d.length);if(0===k){var P=c.split("\n");if(P.length>30)for(P[26]="".concat(b,"...").concat(w);P.length>27;)P.pop();return"".concat(_.notIdentical,"\n\n").concat(P.join("\n"),"\n")}h>3&&(s="\n".concat(b,"...").concat(w).concat(s),l=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var x=0,A=_[n]+"\n".concat(E,"+ actual").concat(w," ").concat(S,"- expected").concat(w),M=" ".concat(b,"...").concat(w," Lines skipped");for(h=0;h1&&h>2&&(T>4?(o+="\n".concat(b,"...").concat(w),l=!0):T>3&&(o+="\n ".concat(d[h-2]),x++),o+="\n ".concat(d[h-1]),x++),a=h,i+="\n".concat(S,"-").concat(w," ").concat(d[h]),x++;else if(d.length1&&h>2&&(T>4?(o+="\n".concat(b,"...").concat(w),l=!0):T>3&&(o+="\n ".concat(u[h-2]),x++),o+="\n ".concat(u[h-1]),x++),a=h,o+="\n".concat(E,"+").concat(w," ").concat(u[h]),x++;else{var R=d[h],O=u[h],I=O!==R&&(!y(O,",")||O.slice(0,-1)!==R);I&&y(R,",")&&R.slice(0,-1)===O&&(I=!1,O+=","),I?(T>1&&h>2&&(T>4?(o+="\n".concat(b,"...").concat(w),l=!0):T>3&&(o+="\n ".concat(u[h-2]),x++),o+="\n ".concat(u[h-1]),x++),a=h,o+="\n".concat(E,"+").concat(w," ").concat(O),i+="\n".concat(S,"-").concat(w," ").concat(R),x+=2):(o+=i,i="",1!==T&&0!==h||(o+="\n ".concat(O),x++))}if(x>20&&h30)for(p[26]="".concat(b,"...").concat(w);p.length>27;)p.pop();t=1===p.length?d.call(this,"".concat(h," ").concat(p[0])):d.call(this,"".concat(h,"\n\n").concat(p.join("\n"),"\n"))}else{var f=C(a),g="",x=_[i];"notDeepEqual"===i||"notEqual"===i?(f="".concat(_[i],"\n\n").concat(f)).length>1024&&(f="".concat(f.slice(0,1021),"...")):(g="".concat(C(s)),f.length>512&&(f="".concat(f.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===i||"equal"===i?f="".concat(x,"\n\n").concat(f,"\n\nshould equal\n\n"):g=" ".concat(i," ").concat(g)),t=d.call(this,"".concat(f).concat(g))}return Error.stackTraceLimit=u,t.generatedMessage=!n,Object.defineProperty(c(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=a,t.expected=s,t.operator=i,Error.captureStackTrace&&Error.captureStackTrace(c(t),o),t.stack,t.name="AssertionError",l(t)}return s=P,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,o(o({},t),{},{customInspect:!1,depth:0}))}}])&&a(s.prototype,u),Object.defineProperty(s,"prototype",{writable:!1}),P}(u(Error),g.custom);e.exports=P},2818:function(e,t,n){"use strict";n.d(t,{OQ:function(){return u},n1:function(){return l},uW:function(){return c}});var r=n(8790),i=n(1838),o=n(8974);const a=["hls","h265","vp9","h264","vp8","mp4","theora"];function s(e,t){let n=null,r=document.createElement("video");if(r.canPlayType)try{switch(e){case"hls":case"mp4":n=!0;break;case"h265":n="probably"===r.canPlayType('video/mp4; codecs="hvc1.1.L0.0"')||"probably"===r.canPlayType('video/mp4; codecs="hev1.1.L0.0"');break;case"h264":n="probably"===r.canPlayType('video/mp4; codecs="avc1.42E01E"')||"probably"===r.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');break;case"vp9":n="probably"===r.canPlayType('video/webm; codecs="vp9"');break;case"vp8":n="probably"===r.canPlayType('video/webm; codecs="vp8, vorbis"');break;case"theora":n="probably"===r.canPlayType('video/ogg; codecs="theora"')}if(t=(t instanceof Boolean||0===t||1==t)&&t){if("no"===r.canPlayType("video/nonsense")&&o.warn('BUGGY: Codec detection bug in Firefox 3.5.0 - 3.5.1 and Safari 4.0.0 - 4.0.4 that answer "no" to unknown codecs instead of an empty string'),"probably"===r.canPlayType("video/webm")&&o.warn('BUGGY: Codec detection bug that Firefox 27 and earlier always says "probably" when asked about WebM, even when the codecs string is not present'),"maybe"===r.canPlayType('video/mp4; codecs="avc1.42E01E"'))switch(r.canPlayType("video/mp4")){case"probably":o.warn('BUGGY: Codec detection bug in iOS 4.1 and earlier that switches "maybe" and "probably" around');break;case"maybe":o.warn('BUGGY: Codec detection bug in Android where no better answer than "maybe" is given')}"probably"===r.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')&&"probably"!==r.canPlayType('video/mp4; codecs="avc1.42E01E"')&&o.warn("BUGGY: Codec detection bug in Internet Explorer 9 that requires both audio and video codec on test")}}catch(e){o.warn(e)}return n}function l(e){let t=[],n={},r=document.createElement("video");return r.canPlayType&&(n.hls=!0,t.push("hls"),(r.canPlayType('video/mp4; codecs="hvc1.1.L0.0"')||"probably"===r.canPlayType('video/mp4; codecs="hev1.1.L0.0"'))&&(n.h265=!0,t.push("h265")),"probably"===r.canPlayType('video/mp4; codecs="avc1.42E01E"')&&(n.h264=!0,t.push("h264")),"probably"===r.canPlayType('video/webm; codecs="vp9"')&&(n.vp9=!0,t.push("vp9")),e&&("probably"===r.canPlayType('video/webm; codecs="vp8, vorbis"')&&(n.vp8=!0,t.push("vp8")),"probably"===r.canPlayType('video/ogg; codecs="theora"')&&(n.theora=!0,t.push("theora"))),"probably"===r.canPlayType('video/mp4; codecs="mp4v.20.8"')&&(n.mp4=!0,t.push("mp4"))),{order:t,support:n}}function c(e,t,n){const c={};let u,d,h;n=void 0===n?l():n;const p={hls:["m3u8"],h265:["mp4","webm"],h264:["mp4","webm"],vp9:["mp4","webm"],vp8:["mp4","webm"],theora:["ogg"],mp4:["mp4"]};for(u in t)t.hasOwnProperty(u)&&(d=null,"master_file"===u?d="Auto":(d=u.split("_playlist"),d=2===d.length?d[0]:null),null!==d&&(c[d]=void 0===c[d]?{format:[],url:[]}:c[d],c[d].format.push("hls"),c[d].url.push((0,i.formatInnerLink)(t[u],r.SiteContext._currentValue.url))));for(d in e)if(e.hasOwnProperty(d)&&Object.keys(e[d]).length&&(1080>=parseInt(d,10)||1080=parseInt(r[r.length-1],10))return r[r.length-1];if(parseInt(e,10)<=parseInt(r[0],10))return r[0];for(n=r.length-1;n>=0;){if(parseInt(e,10)>=parseInt(r[n],10))return r[n+1];n-=1}}},2828:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9471);const i=e=>{let{type:t}=e;return t?r.createElement("i",{className:"material-icons","data-icon":t}):null}},2855:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MediaListWrapper=void 0;var i=r(n(9471)),o=n(6190);n(2101),t.MediaListWrapper=function(e){var t=e.title,n=e.viewAllLink,r=e.viewAllText,a=e.className,s=e.style,l=e.children;return i.default.createElement("div",{className:(a?a+" ":"")+"media-list-wrapper",style:s},i.default.createElement(o.MediaListRow,{title:t,viewAllLink:n,viewAllText:r},l||null))}},2901:function(e,t,n){"use strict";n.d(t,{AP:function(){return a},cp:function(){return o}});var r=n(9471);const i=r.forwardRef(((e,t)=>void 0!==e.children?r.createElement("div",{ref:t,className:"popup"+(void 0!==e.className?" "+e.className:""),style:e.style},e.children):null));function o(e){return void 0!==e.children?r.createElement("div",{className:"popup-top"+(void 0!==e.className?" "+e.className:""),style:e.style},e.children):null}function a(e){return void 0!==e.children?r.createElement("div",{className:"popup-main"+(void 0!==e.className?" "+e.className:""),style:e.style},e.children):null}t.Ay=i},2907:function(e,t,n){"use strict";n.r(t),n.d(t,{useItemListInlineSlider:function(){return l}});var r=n(9471),i=n(1838),o=n(7664),a=n(5289),s=n(4876);function l(e){const t=(0,r.useRef)(null),n=(0,r.useRef)(null),[l,c,u,d,h,p,f]=(0,s.useItemList)(e,t),[m,g]=(0,r.useState)(null),[v,y]=(0,r.useState)(!1),[b,E]=(0,r.useState)(!1),[S,w]=(0,r.useState)(null),[_,k]=(0,r.useState)(null);let C=null,P=null,x=!0,A={list:"items-list",listOuter:"items-list-outer list-inline list-slider"+(e.className?" "+e.className:"")};function M(){m.updateDataStateOnResize(l.length,u.loadedAllItems()),m.scrollToCurrentSlide(),(0,i.removeClassname)(n.current,"resizing"),C=null}function T(){m.nextSlide(),I(),!u.loadedAllItems()&&m.loadMoreItems()?(x=!0,u.loadItems(m.itemsFit())):m.scrollToCurrentSlide()}function R(){m.previousSlide(),I(),m.scrollToCurrentSlide()}function O(e){null!==m?(m.updateDataState(l.length,u.loadedAllItems(),!e),!u.loadedAllItems()&&m.loadItemsToFit()?u.loadItems(m.itemsFit()):(I(),x&&(x=!1,m.scrollToCurrentSlide()))):n.current&&g(new a.A(n.current,".item"))}function I(){m&&(y(m.hasNextSlide()),E(m.hasPreviousSlide()))}return(0,r.useEffect)((()=>{f(),O(!0)}),[l]),(0,r.useEffect)((()=>{O(!0)}),[m]),(0,r.useEffect)((()=>{null!==m?(clearTimeout(C),(0,i.addClassname)(n.current,"resizing"),m.updateDataStateOnResize(l.length,u.loadedAllItems()),m.scrollToCurrentSlide(),C=setTimeout(M,200)):O(!1)}),[S]),(0,r.useEffect)((()=>{clearTimeout(P),P=setTimeout((function(){I(),P=setTimeout((function(){P=null,O()}),50)}),150)}),[_]),[l,c,u,A,d,p,h,function(){w(new Date)},function(){k(new Date)},n,t,function(){return b?r.createElement("span",{className:"previous-slide"},r.createElement(o.CircleIconButton,{buttonShadow:!0,onClick:R},r.createElement("i",{className:"material-icons"},"keyboard_arrow_left"))):null},function(){return v?r.createElement("span",{className:"next-slide"},r.createElement(o.CircleIconButton,{buttonShadow:!0,onClick:T},r.createElement("i",{className:"material-icons"},"keyboard_arrow_right"))):null}]}},2954:function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function I(e){return Object.keys(e).filter(O).concat(u(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function D(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i{let{children:t}=e;return r.createElement(a.LayoutProvider,null,r.createElement(o.ThemeProvider,null,r.createElement(s.UserProvider,null,t)))};function u(e,t){const n=document.getElementById("app-header"),u=document.getElementById("app-sidebar"),d=e?document.getElementById(e):void 0;d&&t?i.render(r.createElement(c,null,n?i.createPortal(r.createElement(l.PageHeader,null),n):null,u?i.createPortal(r.createElement(l.PageSidebar,null),u):null,r.createElement(t,null)),d):n&&u?i.render(r.createElement(c,null,i.createPortal(r.createElement(l.PageHeader,null),n),r.createElement(l.PageSidebar,null)),u):n?i.render(r.createElement(a.LayoutProvider,null,r.createElement(o.ThemeProvider,null,r.createElement(s.UserProvider,null,r.createElement(l.PageHeader,null)))),u):u&&i.render(r.createElement(c,null,r.createElement(l.PageSidebar,null)),u)}function d(e,t){const n=e?document.getElementById(e):void 0;n&&t&&i.render(r.createElement(t,null),n)}},3063:function(e,t,n){"use strict";e.exports=n(1095)},3095:function(e){"use strict";e.exports=Object},3114:function(e,t,n){"use strict";e.exports=n(6881)},3129:function(e,t,n){"use strict";var r,i=n(7118),o=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),a=function(){return o.createElement(i.Icon,{size:16},o.createElement("path",{d:"M11.5,5.5v-2C11.5,2.672,12.172,2,13,2s1.5,0.672,1.5,1.5v2 M14.5,11.5v-6C14.5,4.672,15.172,4,16,4\n c0.828,0,1.5,0.672,1.5,1.5v3 M17.5,13V8.5C17.5,7.672,18.172,7,19,7s1.5,0.672,1.5,1.5v10c0,2.761-2.239,5-5,5h-3.335\n c-1.712-0.001-3.305-0.876-4.223-2.321C6.22,18.467,4.083,14,4.083,14c-0.378-0.545-0.242-1.292,0.303-1.67\n c0.446-0.309,1.044-0.281,1.458,0.07L8.5,15.5v-10C8.5,4.672,9.172,4,10,4s1.5,0.672,1.5,1.5v6"}))},s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n(0,r.useContext)(i.LayoutContext)},3289:function(e){"use strict";e.exports=Math.min},3337:function(e,t,n){"use strict";n.r(t),n.d(t,{UpNextLoaderView:function(){return i}});var r=n(1838);function i(e){var t,n=function(){window.location.href=e.url},i=function(){(0,r.removeClassname)(this.vjsPlayerElem,"vjs-mediacms-up-next-hidden")}.bind(this),o=function(){this.cancelTimer(),(0,r.addClassname)(this.vjsPlayerElem,"vjs-mediacms-up-next-hidden")}.bind(this),a={nextMediaPoster:document.createElement("div"),wrapper:document.createElement("div"),inner:document.createElement("div"),innerContent:document.createElement("div"),upNextLabel:document.createElement("div"),nextMediaTitle:document.createElement("div"),nextMediaAuthor:document.createElement("div"),cancelNext:document.createElement("div"),cancelNextButton:document.createElement("button"),goNext:document.createElement("div")};a.nextMediaPoster.setAttribute("class","next-media-poster"),a.wrapper.setAttribute("class","up-next-loader"),a.inner.setAttribute("class","up-next-loader-inner"),a.goNext.setAttribute("class","go-next"),a.cancelNext.setAttribute("class","up-next-cancel"),a.upNextLabel.setAttribute("class","up-next-label"),a.nextMediaTitle.setAttribute("class","next-media-title"),a.nextMediaAuthor.setAttribute("class","next-media-author"),a.upNextLabel.innerHTML=(0,r.translateString)("Up Next"),a.nextMediaTitle.innerHTML=e.title,a.nextMediaAuthor.innerHTML=e.author_name,a.goNext.innerHTML='skip_next',a.cancelNextButton.innerHTML="CANCEL",a.cancelNextButton.addEventListener("click",o),a.nextMediaPoster.style.backgroundImage="url('"+e.thumbnail_url+"')",a.cancelNext.appendChild(a.cancelNextButton),a.innerContent.appendChild(a.upNextLabel),a.innerContent.appendChild(a.nextMediaTitle),a.innerContent.appendChild(a.nextMediaAuthor),a.innerContent.appendChild(a.goNext),a.innerContent.appendChild(a.cancelNext),a.inner.appendChild(a.innerContent),a.wrapper.appendChild(a.nextMediaPoster),a.wrapper.appendChild(a.inner);var s=!1;function l(){var e=this.vjsPlayerElem.getBoundingClientRect();window.pageYOffset||document.documentElement.scrollTop,0>=this.vjsPlayerElem.offsetHeight-56+e.top?(s||this.cancelTimer(!0),s=!0):(s&&this.startTimer(),s=!1)}l=l.bind(this),this.vjsPlayerElem=null,this.html=function(){return a.wrapper},this.startTimer=function(){i(),t=setTimeout(n,1e4),this.vjsPlayerElem&&(0,r.removeClassname)(this.vjsPlayerElem,"vjs-mediacms-canceled-next"),window.addEventListener("scroll",l)},this.cancelTimer=function(e){(e=!!e)||window.removeEventListener("scroll",l),clearTimeout(t),t=null,this.vjsPlayerElem&&(0,r.addClassname)(this.vjsPlayerElem,"vjs-mediacms-canceled-next")},this.setVideoJsPlayerElem=function(e){e&&(this.vjsPlayerElem=e,(0,r.addClassname)(this.vjsPlayerElem,"vjs-mediacms-has-up-next-view"))},this.showTimerView=function(e){(e=!!e)?this.startTimer():i()},this.hideTimerView=function(){o()}}},3354:function(e,t,n){"use strict";var r=n(5935),i=n(2756),o=n(1474),a=n(1723),s=n(2365),l=i(a(),Object);r(l,{getPolyfill:a,implementation:o,shim:s}),e.exports=l},3369:function(e,t,n){"use strict";var r=n(7118),i=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),o=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M0.541,5.627L11.666,18.2c0.183,0.207,0.499,0.226,0.706,0.043c0.015-0.014,0.03-0.028,0.043-0.043\n L23.541,5.627"}))},a=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M23.535,18.373L12.409,5.8c-0.183-0.207-0.499-0.226-0.706-0.043C11.688,5.77,11.674,5.785,11.66,5.8\n L0.535,18.373"}))},s=function(){return i.createElement(r.Icon,{ignoreDirection:!0,size:16},i.createElement("path",{d:"M10.5,0.5c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.5,10.5,0.5z\n M23.5,23.5\n l-5.929-5.929"}))},l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.top?1:e.leftt.left?1:0},m=function(e){var t=e.numPages,n=e.pageIndex,o=e.renderHighlights,a=e.store,s=e.onHighlightKeyword,l=i.useRef(),h=i.useCallback((function(e){return i.createElement(i.Fragment,null,e.highlightAreas.map((function(e,t){return i.createElement(d,{index:t,key:t,area:e,onHighlightKeyword:s})})))}),[]),m=o||h,g=i.useState(a.get("matchPosition")),v=g[0],y=g[1],b=i.useState(a.get("keyword")||[c]),E=b[0],S=b[1],w=i.useState({pageIndex:n,scale:1,status:r.LayerRenderStatus.PreRender}),_=w[0],k=w[1],C=i.useRef(null),P=i.useRef([]),x=i.useState([]),A=x[0],M=x[1],T=function(){return!0},R=i.useCallback((function(){return a.get("targetPageFilter")||T}),[a.get("targetPageFilter")]),O=function(e){e&&e.length>0&&S(e)},I=function(e){return y(e)},D=function(e){if(e.has(n)){var t=e.get(n);t&&k({ele:t.ele,pageIndex:n,scale:t.scale,status:t.status})}},L=function(){return 0===E.length||1===E.length&&""===E[0].keyword.trim()};return i.useEffect((function(){if(!L()&&_.status===r.LayerRenderStatus.DidRender&&!P.current.length){var e=_.ele,t=[].slice.call(e.querySelectorAll(".rpv-core__text-layer-text")).map((function(e){return e.textContent})).reduce((function(e,t,n){return e.concat(t.split("").map((function(e,t){return{char:e,charIndexInSpan:t,spanIndex:n}})))}),[{char:"",charIndexInSpan:0,spanIndex:0}]).slice(1);P.current=t}}),[E,_.status]),i.useEffect((function(){if(!L()&&_.ele&&_.status===r.LayerRenderStatus.DidRender&&R()({pageIndex:n,numPages:t})){var e=function(e){var r=P.current;if(0===r.length)return[];var i=[],o=[].slice.call(e.querySelectorAll(".rpv-core__text-layer-text")),a=r.map((function(e){return e.char})).join("");return E.forEach((function(s){var l=s.keyword;if(l.trim()){for(var c,u=-1===s.regExp.flags.indexOf("g")?new RegExp(s.regExp,"".concat(s.regExp.flags,"g")):s.regExp,d=[];null!==(c=u.exec(a));)d.push({keyword:u,startIndex:c.index,endIndex:u.lastIndex});d.map((function(e){return{keyword:e.keyword,indexes:r.slice(e.startIndex,e.endIndex)}})).forEach((function(r){var a=r.indexes.reduce((function(e,t){return e[t.spanIndex]=(e[t.spanIndex]||[]).concat([t]),e}),{});Object.values(a).forEach((function(a){if(1!==a.length||""!==a[0].char.trim()){var c=s.wholeWords?a.slice(1,-1):a,u=function(e,r,i,o,a){var s=document.createRange(),l=o.firstChild;if(!l||l.nodeType!==Node.TEXT_NODE)return null;var c=l.textContent.length,u=a[0].charIndexInSpan,d=1===a.length?u:a[a.length-1].charIndexInSpan;if(u>c||d+1>c)return null;s.setStart(l,u),s.setEnd(l,d+1);var h=document.createElement("span");s.surroundContents(h);var f=h.getBoundingClientRect(),m=i.getBoundingClientRect(),g=m.height,v=m.width,y=100*(f.left-m.left)/v,b=100*(f.top-m.top)/g,E=100*f.height/g,S=100*f.width/v;return p(h),{keyword:r,keywordStr:e,numPages:t,pageIndex:n,left:y,top:b,height:E,width:S,pageHeight:g,pageWidth:v}}(l,r.keyword,e,o[c[0].spanIndex],c);u&&i.push(u)}}))}))}})),i.sort(f)}(_.ele);M(e)}}),[E,v,_.status,P.current]),i.useEffect((function(){L()&&_.ele&&_.status===r.LayerRenderStatus.DidRender&&M([])}),[E,_.status]),i.useEffect((function(){if(0!==A.length){var e=l.current;if(v.pageIndex===n&&e&&_.status===r.LayerRenderStatus.DidRender){var t=e.querySelector('.rpv-search__highlight[data-index="'.concat(v.matchIndex,'"]'));if(t){var i=function(e,t){for(var n=e.offsetTop,r=e.offsetLeft,i=e.parentElement;i&&i!==t;)n+=i.offsetTop,r+=i.offsetLeft,i=i.parentElement;return{left:r,top:n}}(t,e),o=i.left,s=i.top,c=a.get("jumpToDestination");c&&(c({pageIndex:n,bottomOffset:(e.getBoundingClientRect().height-s)/_.scale,leftOffset:o/_.scale,scaleTo:_.scale}),C.current&&C.current.classList.remove("rpv-search__highlight--current"),C.current=t,t.classList.add("rpv-search__highlight--current"))}}}}),[A,v]),i.useEffect((function(){return a.subscribe("keyword",O),a.subscribe("matchPosition",I),a.subscribe("renderStatus",D),function(){a.unsubscribe("keyword",O),a.unsubscribe("matchPosition",I),a.unsubscribe("renderStatus",D)}}),[]),i.createElement("div",{className:"rpv-search__highlights","data-testid":"search__highlights-".concat(n),ref:l},m({getCssProperties:u,highlightAreas:A}))},g=function(e){var t,n=e.wholeWords?" ".concat(e.keyword," "):e.keyword,r=e.matchCase?"g":"gi";return{keyword:e.keyword,regExp:new RegExp((t=n,t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r),wholeWords:e.wholeWords||!1}},v=function(e,t,n){return e instanceof RegExp?{keyword:e.source,regExp:e,wholeWords:n||!1}:"string"==typeof e?""===e?c:g({keyword:e,matchCase:t||!1,wholeWords:n||!1}):(void 0!==t&&(e.matchCase=t),void 0!==n&&(e.wholeWords=n),g(e))},y=function(e){var t,n=e.get("initialKeyword"),o=i.useMemo((function(){if(n&&1===n.length){var e=v(n[0]);return{matchCase:-1===e.regExp.flags.indexOf("i"),wholeWords:e.wholeWords}}return{matchCase:!1,wholeWords:!1}}),[]),a=function(e){var t=i.useRef(e.get("doc")),n=function(e){t.current=e};return i.useEffect((function(){return e.subscribe("doc",n),function(){e.unsubscribe("doc",n)}}),[]),t}(e),s=i.useState(n),l=s[0],u=s[1],d=i.useState([]),h=d[0],p=d[1],f=i.useState(0),m=f[0],g=f[1],y=i.useState(o.matchCase),b=y[0],E=y[1],S=i.useRef([]),w=i.useState(o.wholeWords),_=w[0],k=w[1],C=function(){return!0},P=i.useCallback((function(){return e.get("targetPageFilter")||C}),[e.get("targetPageFilter")]),x=function(e){var t=h.length;if(0===l.length||0===t)return null;var n=e===t+1?1:Math.max(1,Math.min(t,e));return g(n),M(h[n-1])},A=function(e){return u(""===e?[]:[e])},M=function(t){var n=e.get("jumpToPage");return n&&n(t.pageIndex),e.update("matchPosition",{matchIndex:t.matchIndex,pageIndex:t.pageIndex}),t},T=function(t,n,i){var o=a.current;if(!o)return Promise.resolve([]);var s=o.numPages,l=t.map((function(e){return v(e,n,i)}));return e.update("keyword",l),g(0),p([]),new Promise((function(e,t){var n=0===S.current.length?function(){var e=a.current;if(!e)return Promise.resolve([]);var t=Array(e.numPages).fill(0).map((function(t,n){return r.getPage(e,n).then((function(e){return e.getTextContent()})).then((function(e){var t=e.items.map((function(e){return e.str||""})).join("");return Promise.resolve({pageContent:t,pageIndex:n})}))}));return Promise.all(t).then((function(e){return e.sort((function(e,t){return e.pageIndex-t.pageIndex})),Promise.resolve(e.map((function(e){return e.pageContent})))}))}().then((function(e){return S.current=e,Promise.resolve(e)})):Promise.resolve(S.current);n.then((function(t){var n=[];t.forEach((function(e,t){P()({pageIndex:t,numPages:s})&&l.forEach((function(r){for(var i,o=0;null!==(i=r.regExp.exec(e));)n.push({keyword:r.regExp,matchIndex:o,pageIndex:t,pageText:e,startIndex:i.index,endIndex:r.regExp.lastIndex}),o++}))})),p(n),n.length>0&&(g(1),M(n[0])),e(n)}))}))};return i.useEffect((function(){S.current=[]}),[a.current]),{clearKeyword:function(){e.update("keyword",[c]),A(""),g(0),p([]),E(!1),k(!1)},changeMatchCase:function(e){E(e),l.length>0&&T(l,e,_)},changeWholeWords:function(e){k(e),l.length>0&&T(l,b,e)},currentMatch:m,jumpToMatch:x,jumpToNextMatch:function(){return x(m+1)},jumpToPreviousMatch:function(){return x(m-1)},keywords:l,matchCase:b,numberOfMatches:h.length,wholeWords:_,search:function(){return T(l,b,_)},searchFor:T,setKeywords:u,keyword:0===l.length?"":(t=l[0],t instanceof RegExp?t.source:"string"==typeof t?t:t.keyword),setKeyword:A,setTargetPages:function(t){e.update("targetPageFilter",t)}}},b=function(e){var t=e.children,n=e.store,r=y(n),o=i.useState(!1),a=o[0],s=o[1],c=function(e){return s(!0)};return i.useEffect((function(){return n.subscribe("doc",c),function(){n.unsubscribe("doc",c)}}),[]),t(l(l({},r),{isDocumentLoaded:a}))},E=function(e){var t=e.containerRef,n=e.store,o=i.useRef(!1),a=function(){o.current=!0},s=function(){o.current=!1},l=function(e){var i=t.current;i&&(e.shiftKey||e.altKey||"f"!==e.key||(r.isMac()?e.metaKey&&!e.ctrlKey:e.ctrlKey)&&(o.current||document.activeElement&&i.contains(document.activeElement))&&(e.preventDefault(),n.update("areShortcutsPressed",!0)))};return i.useEffect((function(){var e=t.current;if(e)return document.addEventListener("keydown",l),e.addEventListener("mouseenter",a),e.addEventListener("mouseleave",s),function(){document.removeEventListener("keydown",l),e.removeEventListener("mouseenter",a),e.removeEventListener("mouseleave",s)}}),[t.current]),i.createElement(i.Fragment,null)},S={left:0,top:8},w=function(e){var t=e.store,n=e.onToggle,s=i.useContext(r.LocalizationContext).l10n,l=i.useContext(r.ThemeContext).direction,c=i.useState(!1),u=c[0],d=c[1],h=i.useState(!1),p=h[0],f=h[1],m=l===r.TextDirection.RightToLeft,g=y(t),v=g.clearKeyword,b=g.changeMatchCase,E=g.changeWholeWords,w=g.currentMatch,_=g.jumpToNextMatch,k=g.jumpToPreviousMatch,C=g.keyword,P=g.matchCase,x=g.numberOfMatches,A=g.wholeWords,M=g.search,T=g.setKeyword,R=function(e){d(!0),M().then((function(t){d(!1),f(!0),e&&e()}))};i.useEffect((function(){var e=t.get("initialKeyword");e&&1===e.length&&C&&R((function(){t.update("initialKeyword",[])}))}),[]);var O=s&&s.search?s.search.enterToSearch:"Enter to search",I=s&&s.search?s.search.previousMatch:"Previous match",D=s&&s.search?s.search.nextMatch:"Next match",L=s&&s.search?s.search.close:"Close";return i.createElement("div",{className:"rpv-search__popover"},i.createElement("div",{className:"rpv-search__popover-input-counter"},i.createElement(r.TextBox,{ariaLabel:O,autoFocus:!0,placeholder:O,type:"text",value:C,onChange:function(e){f(!1),T(e)},onKeyDown:function(e){"Enter"===e.key&&C&&(p?_():R())}}),i.createElement("div",{className:r.classNames({"rpv-search__popover-counter":!0,"rpv-search__popover-counter--ltr":!m,"rpv-search__popover-counter--rtl":m})},u&&i.createElement(r.Spinner,{testId:"search__popover-searching",size:"1rem"}),!u&&i.createElement("span",{"data-testid":"search__popover-num-matches"},w,"/",x))),i.createElement("label",{className:"rpv-search__popover-label"},i.createElement("input",{className:"rpv-search__popover-label-checkbox","data-testid":"search__popover-match-case",checked:P,type:"checkbox",onChange:function(e){f(!1),b(e.target.checked)}})," ",s&&s.search?s.search.matchCase:"Match case"),i.createElement("label",{className:"rpv-search__popover-label"},i.createElement("input",{className:"rpv-search__popover-label-checkbox",checked:A,"data-testid":"search__popover-whole-words",type:"checkbox",onChange:function(e){f(!1),E(e.target.checked)}})," ",s&&s.search?s.search.wholeWords:"Whole words"),i.createElement("div",{className:"rpv-search__popover-footer"},i.createElement("div",{className:"rpv-search__popover-footer-item"},i.createElement(r.Tooltip,{ariaControlsSuffix:"search-previous-match",position:m?r.Position.BottomRight:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaLabel:I,isDisabled:w<=1,onClick:k},i.createElement(a,null)),content:function(){return I},offset:S})),i.createElement("div",{className:"rpv-search__popover-footer-item"},i.createElement(r.Tooltip,{ariaControlsSuffix:"search-next-match",position:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaLabel:D,isDisabled:w>x-1,onClick:_},i.createElement(o,null)),content:function(){return D},offset:S})),i.createElement("div",{className:r.classNames({"rpv-search__popover-footer-button":!0,"rpv-search__popover-footer-button--ltr":!m,"rpv-search__popover-footer-button--rtl":m})},i.createElement(r.Button,{onClick:function(){n(),v()}},L))))},_=function(e){var t=e.children,n=e.onClick,o=i.useContext(r.LocalizationContext).l10n,a=o&&o.search?o.search.search:"Search";return t({icon:i.createElement(s,null),label:a,onClick:n})},k={left:0,top:8},C=function(e){var t=e.enableShortcuts,n=e.store,o=e.onClick,a=t?r.isMac()?"Meta+F":"Ctrl+F":"",s=function(e){e&&o()};return i.useEffect((function(){return n.subscribe("areShortcutsPressed",s),function(){n.unsubscribe("areShortcutsPressed",s)}}),[]),i.createElement(_,{onClick:o},(function(e){return i.createElement(r.Tooltip,{ariaControlsSuffix:"search-popover",position:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaKeyShortcuts:a,ariaLabel:e.label,testId:"search__popover-button",onClick:o},e.icon),content:function(){return e.label},offset:k})}))},P={left:0,top:8},x=function(e){var t=e.children,n=e.enableShortcuts,o=e.store,a=i.useContext(r.ThemeContext).direction===r.TextDirection.RightToLeft?r.Position.BottomRight:r.Position.BottomLeft,s=t||function(e){return i.createElement(C,l({enableShortcuts:n,store:o},e))};return i.createElement(r.Popover,{ariaControlsSuffix:"search",lockScroll:!1,position:a,target:function(e){return s({onClick:e})},content:function(e){return i.createElement(w,{store:o,onToggle:e})},offset:P,closeOnClickOutside:!1,closeOnEscape:!0})},A=function(e){return Array.isArray(e)?e.map((function(e){return v(e)})):[v(e)]};t.NextIcon=o,t.PreviousIcon=a,t.SearchIcon=s,t.searchPlugin=function(e){var t=i.useMemo((function(){return Object.assign({},{enableShortcuts:!0,onHighlightKeyword:function(){}},e)}),[]),n=i.useMemo((function(){return r.createStore({initialKeyword:e&&e.keyword?Array.isArray(e.keyword)?e.keyword:[e.keyword]:[],keyword:e&&e.keyword?A(e.keyword):[c],matchPosition:{matchIndex:-1,pageIndex:-1},renderStatus:new Map})}),[]),o=y(n),a=o.clearKeyword,s=o.jumpToMatch,u=o.jumpToNextMatch,d=o.jumpToPreviousMatch,h=o.searchFor,p=o.setKeywords,f=o.setTargetPages,g=function(e){return i.createElement(x,l({enableShortcuts:t.enableShortcuts},e,{store:n}))};return{install:function(t){var r=e&&e.keyword?Array.isArray(e.keyword)?e.keyword:[e.keyword]:[],i=e&&e.keyword?A(e.keyword):[c];n.update("initialKeyword",r),n.update("jumpToDestination",t.jumpToDestination),n.update("jumpToPage",t.jumpToPage),n.update("keyword",i)},renderPageLayer:function(r){return i.createElement(m,{key:r.pageIndex,numPages:r.doc.numPages,pageIndex:r.pageIndex,renderHighlights:null==e?void 0:e.renderHighlights,store:n,onHighlightKeyword:t.onHighlightKeyword})},renderViewer:function(e){var r=e.slot;return r.subSlot&&(r.subSlot.children=i.createElement(i.Fragment,null,t.enableShortcuts&&i.createElement(E,{containerRef:e.containerRef,store:n}),r.subSlot.children)),r},uninstall:function(e){var t=n.get("renderStatus");t&&t.clear()},onDocumentLoad:function(e){n.update("doc",e.doc)},onTextLayerRender:function(e){var t=n.get("renderStatus");t&&(t=t.set(e.pageIndex,e),n.update("renderStatus",t))},Search:function(e){return i.createElement(b,l({},e,{store:n}))},ShowSearchPopover:g,ShowSearchPopoverButton:function(){return i.createElement(g,null,(function(e){return i.createElement(C,l({enableShortcuts:t.enableShortcuts,store:n},e))}))},clearHighlights:function(){a()},highlight:function(e){var t=Array.isArray(e)?e:[e];return p(t),h(t)},jumpToMatch:s,jumpToNextMatch:u,jumpToPreviousMatch:d,setTargetPages:f}}},3496:function(e,t,n){"use strict";n.r(t),n.d(t,{MemberConsumer:function(){return a},MemberContext:function(){return o}});var r=n(9471),i=n(3997);const o=(0,r.createContext)((0,i.$)(window.MediaCMS).member),a=o.Consumer},3534:function(e,t,n){"use strict";var r=n(9383),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,l=60112;t.Suspense=60113;var c=60115,u=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;i=d("react.element"),o=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),s=d("react.context"),l=d("react.forward_ref"),t.Suspense=d("react.suspense"),c=d("react.memo"),u=d("react.lazy")}var h="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i(0,r.useContext)(i.ThemeContext)},3640:function(e,t,n){"use strict";var r=n(6035),i=n.n(r);if(201==n.j)var o=n(419);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t(s.MediaPageStore.on("playlist_creation_completed",v),s.MediaPageStore.on("playlist_creation_failed",y),n.current.focus(),()=>{s.MediaPageStore.removeListener("playlist_creation_completed",v),s.MediaPageStore.removeListener("playlist_creation_failed",y)})),[]),r.createElement("div",{className:"playlist-form-wrap"},r.createElement("div",{className:"playlist-form-field playlist-title",ref:t},r.createElement("span",{className:"playlist-form-label"},"Title"),r.createElement("input",{ref:n,type:"text",placeholder:"Enter playlist title...",value:d,onChange:function(){h(n.current.value)},onFocus:function(){(0,l.addClassname)(t.current,"focused")},onBlur:function(){(0,l.removeClassname)(t.current,"focused")},onClick:function(){(0,l.removeClassname)(t.current,"invalid")}})),r.createElement("div",{className:"playlist-form-field playlist-description",ref:i},r.createElement("span",{className:"playlist-form-label"},"Description"),r.createElement("textarea",{ref:o,rows:"1",placeholder:"Enter playlist description...",value:p,onChange:function(){o.current.style.height="";const e=o.current.scrollHeight-2,t=0{o(function(e,t,n){if(void 0!==e){let r=null;return r=void 0!==t&&t>e?t:e,r=void 0!==n&&n=0&&"[object Array]"!==i(e)&&"callee"in e&&"[object Function]"===i(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,e.exports=s?o:a},3973:function(e,t,n){"use strict";var r=n(7118),i=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),o=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M18.5,7.5c.275,0,.341-.159.146-.354L12.354.854a.5.5,0,0,0-.708,0L5.354,7.147c-.2.195-.129.354.146.354h3v10a1,1,0,0,0,1,1h5a1,1,0,0,0,1-1V7.5Z"}),i.createElement("path",{d:"M23.5,18.5v4a1,1,0,0,1-1,1H1.5a1,1,0,0,1-1-1v-4"}))},a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;ni[this.id].minutes?"0":"")+i[this.id].minutes+":"+i[this.id].fn.infoToString(i[this.id].seconds)),i[this.id].toString}ariaLabel(){if(void 0===i[this.id].ariaLabel){let e=[];0=s[i]&&i(0==(i*=2)?9:1)&&(i+=1),t(e,i,r)[n].replace("%s",e.toString())}(r,function(e){return o[e]||o.en_US}(t))};a("en_US",(function(e,t){if(0===t)return["just now","right now"];var n=r[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]})),a("zh_CN",(function(e,t){if(0===t)return["刚刚","片刻后"];var n=i[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}))},4388:function(e,t,n){"use strict";n.r(t),n.d(t,{addMediaToPlaylist:function(){return m},addNewPlaylist:function(){return v},copyEmbedMediaCode:function(){return u},copyShareLink:function(){return c},createPlaylist:function(){return f},deleteComment:function(){return p},dislikeMedia:function(){return s},likeMedia:function(){return a},loadMediaData:function(){return o},removeMedia:function(){return d},removeMediaFromPlaylist:function(){return g},reportMedia:function(){return l},submitComment:function(){return h}});var r=n(7143),i=n.n(r);function o(){i().dispatch({type:"LOAD_MEDIA_DATA"})}function a(){i().dispatch({type:"LIKE_MEDIA"})}function s(){i().dispatch({type:"DISLIKE_MEDIA"})}function l(e){i().dispatch({type:"REPORT_MEDIA",reportDescription:e?e.replace(/\s/g,""):""})}function c(e){i().dispatch({type:"COPY_SHARE_LINK",inputElement:e})}function u(e){i().dispatch({type:"COPY_EMBED_MEDIA_CODE",inputElement:e})}function d(){i().dispatch({type:"REMOVE_MEDIA"})}function h(e){i().dispatch({type:"SUBMIT_COMMENT",commentText:e})}function p(e){i().dispatch({type:"DELETE_COMMENT",commentId:e})}function f(e){i().dispatch({type:"CREATE_PLAYLIST",playlist_data:e})}function m(e,t){i().dispatch({type:"ADD_MEDIA_TO_PLAYLIST",playlist_id:e,media_id:t})}function g(e,t){i().dispatch({type:"REMOVE_MEDIA_FROM_PLAYLIST",playlist_id:e,media_id:t})}function v(e){i().dispatch({type:"APPEND_NEW_PLAYLIST",playlist_data:e})}},4389:function(e,t,n){"use strict";var r,i=n(7118),o=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0)return!1;var r=n.length;if(0===r)return!1;for(var i=n.concat([]);i.length>0;){var o=i.shift(),a=o.items;o.count&&a&&o.count>0&&a.length>0&&(r+=a.length,i=i.concat(a))}return Math.abs(t)===r}(t)}),[t]),y=m.get("bookmarkExpandedMap"),b=d?d({bookmark:t,doc:r,depth:n,index:c}):y.has(g)?y.get(g):!v,E=o.useState(b),S=E[0],w=E[1],_=t.items&&t.items.length>0,k=function(){var e=!S;m.updateCurrentValue("bookmarkExpandedMap",(function(t){return t.set(g,e)})),w(e)},C=function(){var e=t.dest,n=m.get("jumpToDestination");i.getDestination(r,e).then((function(e){n&&n(a({label:t.title},e))}))},P=function(){_&&t.dest&&C()},x=function(){!_&&t.dest&&C()},A=function(e,t){return o.createElement("div",{className:"rpv-bookmark__item",style:{paddingLeft:"".concat(1.25*n,"rem")},onClick:e},t)},M=function(e,t){return _?o.createElement("span",{className:"rpv-bookmark__toggle","data-testid":"bookmark__toggle-".concat(n,"-").concat(c),onClick:k},S?e:t):o.createElement("span",{className:"rpv-bookmark__toggle"})},T=function(e){return t.url?o.createElement("a",{className:"rpv-bookmark__title",href:t.url,rel:"noopener noreferrer nofollow",target:t.newWindow?"_blank":""},t.title):o.createElement("div",{className:"rpv-bookmark__title","aria-label":t.title,onClick:e},t.title)};return o.createElement("li",{"aria-expanded":S?"true":"false","aria-label":t.title,"aria-level":n+1,"aria-posinset":c+1,"aria-setsize":h,role:"treeitem",tabIndex:-1},f?f({bookmark:t,depth:n,hasSubItems:_,index:c,isExpanded:S,path:g,defaultRenderItem:A,defaultRenderTitle:T,defaultRenderToggle:M,onClickItem:x,onClickTitle:P,onToggleSubItems:k}):A(x,o.createElement(o.Fragment,null,M(o.createElement(s,null),o.createElement(l,null)),T(P))),_&&S&&o.createElement(u,{bookmarks:t.items,depth:n+1,doc:r,isBookmarkExpanded:d,isRoot:!1,pathFromRoot:g,renderBookmarkItem:f,store:m}))},u=function(e){var t=e.bookmarks,n=e.depth,r=void 0===n?0:n,i=e.doc,a=e.isBookmarkExpanded,s=e.isRoot,l=e.pathFromRoot,u=e.renderBookmarkItem,d=e.store;return o.createElement("ul",{className:"rpv-bookmark__list",role:s?"tree":"group",tabIndex:-1},t.map((function(e,n){return o.createElement(c,{bookmark:e,depth:r,doc:i,index:n,isBookmarkExpanded:a,key:n,numberOfSiblings:t.length,pathFromRoot:l,renderBookmarkItem:u,store:d})})))};!function(e){e[e.Collapse=0]="Collapse",e[e.Expand=1]="Expand"}(r||(r={}));var d=function(e){var t=e.bookmarks,n=e.doc,i=e.isBookmarkExpanded,a=e.renderBookmarkItem,s=e.store,l=o.useRef(),c=function(e){var t=l.current;if(t&&e.target instanceof HTMLElement&&t.contains(e.target))switch(e.key){case"ArrowDown":e.preventDefault(),h((function(e,t){return e.indexOf(t)+1}));break;case"ArrowLeft":e.preventDefault(),p(r.Collapse);break;case"ArrowRight":e.preventDefault(),p(r.Expand);break;case"ArrowUp":e.preventDefault,h((function(e,t){return e.indexOf(t)-1}));break;case"End":e.preventDefault(),h((function(e,t){return e.length-1}));break;case" ":case"Enter":case"Space":e.preventDefault(),d();break;case"Home":e.preventDefault(),h((function(e,t){return 0}))}},d=function(){var e=document.activeElement.closest(".rpv-bookmark__item").querySelector(".rpv-bookmark__title");e&&e.click()},h=function(e){var t=l.current,n=[].slice.call(t.getElementsByClassName("rpv-bookmark__item"));if(0!==n.length){var r=document.activeElement,i=n[Math.min(n.length-1,Math.max(0,e(n,r)))];r.setAttribute("tabindex","-1"),i.setAttribute("tabindex","0"),i.focus()}},p=function(e){var t=l.current;if(0!==[].slice.call(t.getElementsByClassName("rpv-bookmark__item")).length){var n=document.activeElement.closest(".rpv-bookmark__item"),i=e===r.Collapse?"true":"false";if(n&&n.parentElement.getAttribute("aria-expanded")===i){var o=n.querySelector(".rpv-bookmark__toggle");o&&o.click()}}};return o.useEffect((function(){return document.addEventListener("keydown",c),function(){document.removeEventListener("keydown",c)}}),[]),o.useEffect((function(){var e=l.current;if(e){var t=[].slice.call(e.getElementsByClassName("rpv-bookmark__item"));t.length>0&&(t[0].focus(),t[0].setAttribute("tabindex","0"))}}),[]),o.createElement("div",{ref:l},o.createElement(u,{bookmarks:t,depth:0,doc:n,isBookmarkExpanded:i,isRoot:!0,pathFromRoot:"",renderBookmarkItem:a,store:s}))},h=function(e){var t=e.doc,n=e.isBookmarkExpanded,r=e.renderBookmarkItem,a=e.store,s=o.useContext(i.LocalizationContext).l10n,l=o.useContext(i.ThemeContext).direction===i.TextDirection.RightToLeft,c=o.useState({isLoaded:!1,items:[]}),u=c[0],h=c[1];return o.useEffect((function(){h({isLoaded:!1,items:[]}),t.getOutline().then((function(e){h({isLoaded:!0,items:e||[]})}))}),[t]),u.isLoaded?0===u.items.length?o.createElement("div",{"data-testid":"bookmark__empty",className:i.classNames({"rpv-bookmark__empty":!0,"rpv-bookmark__empty--rtl":l})},s&&s.bookmark?s.bookmark.noBookmark:"There is no bookmark"):o.createElement("div",{"data-testid":"bookmark__container",className:i.classNames({"rpv-bookmark__container":!0,"rpv-bookmark__container--rtl":l})},o.createElement(d,{bookmarks:u.items,doc:t,isBookmarkExpanded:n,renderBookmarkItem:r,store:a})):o.createElement("div",{className:"rpv-bookmark__loader"},o.createElement(i.Spinner,null))},p=function(e){var t=e.isBookmarkExpanded,n=e.renderBookmarkItem,r=e.store,a=o.useState(r.get("doc")),s=a[0],l=a[1],c=function(e){l(e)};return o.useEffect((function(){return r.subscribe("doc",c),function(){r.unsubscribe("doc",c)}}),[]),s?o.createElement(h,{doc:s,isBookmarkExpanded:t,renderBookmarkItem:n,store:r}):o.createElement("div",{className:"rpv-bookmark__loader"},o.createElement(i.Spinner,null))};t.DownArrowIcon=s,t.RightArrowIcon=l,t.bookmarkPlugin=function(){var e=o.useMemo((function(){return i.createStore({bookmarkExpandedMap:new Map})}),[]);return{install:function(t){e.update("jumpToDestination",t.jumpToDestination)},onDocumentLoad:function(t){e.update("doc",t.doc)},Bookmarks:function(t){return o.createElement(p,{isBookmarkExpanded:null==t?void 0:t.isBookmarkExpanded,renderBookmarkItem:null==t?void 0:t.renderBookmarkItem,store:e})}}}},4402:function(e,t,n){"use strict";n.r(t);var r=n(9032),i=n.n(r),o=n(1838),a=n(3997);const s={};class l extends(i()){constructor(){super(),this.mediacms_config=(0,a.$)(window.MediaCMS);const e=(t={},window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,(function(e,n,r){t[n]=r})),t);var t;const n=e.q,r=e.c,i=e.t;s[Object.defineProperty(this,"id",{value:"SearchFieldStoreData_"+Object.keys(s).length}).id]={searchQuery:n?decodeURIComponent(n).replace(/\+/g," "):"",categoriesQuery:r?decodeURIComponent(r).replace(/\+/g," "):"",tagsQuery:i?decodeURIComponent(i).replace(/\+/g," "):"",predictions:[]},this.dataResponse=this.dataResponse.bind(this)}dataResponse(e){if(e&&e.data){let t=0;for(s[this.id].predictions=[];t]+)>)/gi,""),_.description=m,e.summary&&(g=e.summary.trim(),g=null===g?g:g.replace(/(<([^>]+)>)/gi,""),_.meta_description=g)):(m=e.preferSummary&&"string"==typeof e.summary?e.summary.trim():"string"==typeof t.description?t.description.trim():null,m=null===m?m:m.replace(/(<([^>]+)>)/gi,""),l||e.inCategoriesList||"user"===h?_.description=m:_.meta_description=m),"video"===h&&(_.previewThumbnail=d),"video"!==h&&"audio"!==h||(_.duration=t.duration),!r&&!a||isNaN(t.media_count)||(_.media_count=parseInt(t.media_count,10)),s&&(w.date=e.hideDate||!1,w.views=e.hideViews||!1,w.author=e.hideAuthor||!1),_={..._,hide:w},_}function P(e){let t=!1;const n={order:e.order,title:e.title,link:e.url.view,thumbnail:e.thumbnail,publish_date:e.date,singleLinkContent:e.singleLinkContent,hasMediaViewer:e.hasMediaViewer,hasMediaViewerDescr:e.hasMediaViewerDescr};switch(e.type){case"user":case"playlist":break;case"video":t=!0,n.duration=e.duration,n.preview_thumbnail=e.previewThumbnail;break;case"audio":t=!0,n.duration=e.duration;break;case"image":case"pdf":t=!0}if(void 0!==e.description&&(n.description=e.description),void 0!==e.meta_description&&(n.meta_description=e.meta_description),!e.taxonomyPage.current&&"playlist"!==e.type||isNaN(e.media_count)||(n.media_count=e.media_count),n.hideAllMeta=e.hide.allMeta,t&&(n.views=e.stats.views,n.author_name=e.author.name,n.author_link=e.author.url,n.hideDate=e.hide.date,n.hideViews=e.hide.views,n.hideAuthor=e.hide.author),(e.playlistPage.current||e.playlistPlayback.current)&&(n.playlistOrder=e.order,e.playlistPlayback.current?(n.playlist_id=e.playlistPlayback.id,n.playlistActiveItem=e.playlistPlayback.activeItem,n.hidePlaylistOrderNumber=e.playlistPlayback.hideOrderNumber):(n.playlist_id=e.playlistPage.id,n.hidePlaylistOptions=e.playlistPage.hideOptions,n.hidePlaylistOrderNumber=e.playlistPage.hideOrderNumber)),e.canEdit&&(n.editLink=e.url.edit),e.taxonomyPage.current)switch(e.taxonomyPage.type){case"categories":return r.createElement(S,_({},n,{type:"category"}));case"tags":return r.createElement(S,_({},n,{type:"tag"}))}switch(e.type){case"user":return r.createElement(w,n);case"playlist":return window.MediaCMS.site.devEnv&&(n.link=n.link.replace("/playlists/","playlist.html?pl=")),r.createElement(E,n);case"video":return r.createElement(y,n);case"audio":return r.createElement(v,n);case"image":return r.createElement(g,_({},n,{type:"image"}));case"pdf":return r.createElement(g,_({},n,{type:"pdf"}))}return r.createElement(g,_({},n,{type:"attachment"}))}E.propTypes={...m.propTypes,media_count:c.PositiveIntegerOrZero},E.defaultProps={...m.defaultProps,media_count:0},S.propTypes={...m.propTypes,type:s().string.isRequired,class_name:s().string,media_count:c.PositiveIntegerOrZero},S.defaultProps={...m.defaultProps,class_name:"",media_count:0},w.propTypes={...m.propTypes},w.defaultProps={...m.defaultProps}},4449:function(e,t,n){"use strict";var r=n(9718),i=n(5953),o=i([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i([n]):n}},4463:function(e,t,n){"use strict";n.r(t),n.d(t,{UserConsumer:function(){return l},UserContext:function(){return o},UserProvider:function(){return s}});var r=n(9471),i=n(3997);const o=(0,r.createContext)(),a=(0,i.$)(window.MediaCMS).member,s=e=>{let{children:t}=e;const n={isAnonymous:a.is.anonymous,username:a.username,thumbnail:a.thumbnail,userCan:a.can,pages:a.pages};return r.createElement(o.Provider,{value:n},t)},l=o.Consumer;t.default=o},4470:function(e,t,n){"use strict";function r(e){for(const t in window.REPLACEMENTS)e=e.replace(t,window.REPLACEMENTS[t]);return e}n.d(t,{u:function(){return r}})},4473:function(e,t,n){"use strict";var r,i=n(1385),o=n(7118),a=n(9471),s=n(9834),l=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(a),c=function(){return l.createElement(o.Icon,{size:16},l.createElement("path",{d:"M7.5,19.499h9 M7.5,16.499h9 M5.5,16.5h-3c-1.103-0.003-1.997-0.897-2-2v-6c0.003-1.103,0.897-1.997,2-2h19\n c1.103,0.003,1.997,0.897,2,2v6c-0.003,1.103-0.897,1.997-2,2h-3\n M5.5,4.5v-4h9.586c0.265,0,0.52,0.105,0.707,0.293l2.414,2.414\n C18.395,3.394,18.5,3.649,18.5,3.914V4.5\n M18.5,22.5c0,0.552-0.448,1-1,1h-11c-0.552,0-1-0.448-1-1v-9h13V22.5z\n M3.5,8.499\n c0.552,0,1,0.448,1,1s-0.448,1-1,1s-1-0.448-1-1S2.948,8.499,3.5,8.499z\n M14.5,0.499v4h4"}))},u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&t=0&&e").methods)),e.player.addChild("ActionsAnimations")}function O(e){e.player.removeChild("LoadingSpinner"),videojs.registerComponent("LoadingSpinner",videojs.extend(c,P(c,"vjs-loading-spinner",'
').methods)),e.player.addChild("LoadingSpinner")}function I(e,t,r,i){var a,s,u;switch(t){case"bottomBackground":r.bottomBackground=null,videojs.registerComponent("BottomBackground",videojs.extend(c,P(c,"vjs-bottom-bg").methods));break;case"progressControl":r.progressControl=null;break;case"__subtitles":for(r.subtitlesPanel={children:{subtitlesPanelInner:{children:{subtitlesMenuTitle:null,subtitlesMenu:{children:{}}}}}},(u=P(m,"vjs-subtitles-panel")).methods.constructor=function(){n.apply(this,arguments),this.setAttribute("class",this.buildCSSClass());var t=this;function r(e){t.el_.contains(e.relatedTarget)||t.player_.trigger("focusoutSubtitlesPanel")}e.on(this.player_,["updatedSubtitlesPanelsVisibility"],(function(){videojs.dom[this.state.isOpenSubtitlesOptions?"addClass":"removeClass"](t.el_,"vjs-visible-panel")})),e.on(this.player_,["openedSubtitlesPanel"],(function(e,n){t.el_.setAttribute("tabindex","-1"),t.el_.addEventListener("focusout",r),n?t.el_.querySelector(".vjs-settings-menu-item").focus():t.el_.focus()})),e.on(this.player_,["closedSubtitlesPanel"],(function(e,n){t.el_.removeAttribute("tabindex"),t.el_.removeEventListener("focusout",r),n&&t.el_.querySelector(".vjs-settings-menu-item").focus()}))},videojs.registerComponent("SubtitlesPanel",videojs.extend(u.extend,u.methods)),videojs.registerComponent("SubtitlesPanelInner",videojs.extend(g,P(g).methods)),videojs.registerComponent("SubtitlesMenu",videojs.extend(y,P(y).methods)),videojs.registerComponent("SubtitlesMenuTitle",videojs.extend(v,P(v,null,"Subtitles").methods)),s=0;s *[role="button"]').focus():t.el_.focus()})),e.on(this.player_,["closedQualities"],(function(e,n){t.el_.removeAttribute("tabindex"),t.el_.removeEventListener("focusout",r),n&&t.el_.querySelector(".vjs-settings-menu-item").focus()}))},videojs.registerComponent("ResolutionsPanel",videojs.extend(u.extend,u.methods)),videojs.registerComponent("ResolutionsPanelInner",videojs.extend(g,P(g).methods)),videojs.registerComponent("ResolutionsMenu",videojs.extend(y,P(y).methods)),videojs.registerComponent("ResolutionsMenuTitle",videojs.extend(v,P(v,"vjs-settings-back").methods)),(u=P(f,null,"Quality")).methods.handleClick=function(e){this.player_.trigger("closeQualityOptions",!e.screenX&&!e.screenY)},videojs.registerComponent("ResolutionsMenuBackButton",videojs.extend(u.extend,u.methods));var d=function(){var e,t=[],n=Object.keys(i.resolutions),r=[],o=[];for(e=0;e *[role="button"]').focus():t.el_.focus()})),e.on(this.player_,["closedPlaybackSpeeds"],(function(e,n){t.el_.removeAttribute("tabindex"),t.el_.removeEventListener("focusout",r),n&&t.el_.querySelector(".vjs-settings-menu-item").focus()}))},videojs.registerComponent("PlaybackSpeedsPanel",videojs.extend(u.extend,u.methods)),videojs.registerComponent("PlaybackSpeedsPanelInner",videojs.extend(g,P(g).methods)),videojs.registerComponent("PlaybackSpeedsMenu",videojs.extend(y,P(y).methods)),videojs.registerComponent("PlaybackSpeedsMenuTitle",videojs.extend(v,P(v,"vjs-settings-back").methods)),(u=P(f,null,"Playback speed")).methods.handleClick=function(e){this.player_.trigger("closePlaybackSpeedOptions",!e.screenX&&!e.screenY)},videojs.registerComponent("PlaybackSpeedsMenuBackButton",videojs.extend(u.extend,u.methods)),i.playbackSpeeds)i.playbackSpeeds.hasOwnProperty(a)&&(r.playbackSpeedsPanel.children.playbackSpeedsPanelInner.children.playbackSpeedsMenu.children["playbackSpeedOption_"+i.playbackSpeeds[a].speed]={children:o({},"playbackSpeedOption_"+i.playbackSpeeds[a].speed+"_content",null)},function(t,n){(u=P(b,t.toString()===e.state.theSelectedPlaybackSpeed.toString()?"vjs-selected-menu-item":null,null)).methods.constructor=function(){b.apply(this,arguments);var n=this;this.playbackSpeedKey=t,this.setAttribute("data-opt",t),e.on(this.player_,["updatedSelectedPlaybackSpeed"],(function(){videojs.dom[n.playbackSpeedKey===this.state.theSelectedPlaybackSpeed?"addClass":"removeClass"](n.el_,"vjs-selected-menu-item")}))},u.methods.handleClick=function(){this.player_.trigger("selectedPlaybackSpeed",this.el_.getAttribute("data-opt"))},videojs.registerComponent("PlaybackSpeedOption_"+t,videojs.extend(u.extend,u.methods)),u=P(S,null,n),videojs.registerComponent("PlaybackSpeedOption_"+t+"_content",videojs.extend(u.extend,u.methods))}(i.playbackSpeeds[a].speed,i.playbackSpeeds[a].title||a));break;case"__leftControls":r.leftControls={children:{}},i.options.controlBar.previous&&((u=P(l,"vjs-previous-button")).methods.handleClick=function(e){this.player_.trigger("clicked_previous_button")},videojs.registerComponent("PreviousButton",videojs.extend(u.extend,u.methods)),r.leftControls.children.previousButton=null),i.options.controlBar.play&&(r.leftControls.children.playToggle=null),i.options.controlBar.next&&((u=P(l,"vjs-next-button")).methods.handleClick=function(e){this.player_.trigger("clicked_next_button")},videojs.registerComponent("NextButton",videojs.extend(u.extend,u.methods)),r.leftControls.children.nextButton=null),i.options.controlBar.volume&&(r.leftControls.children.volumePanel=null),i.options.controlBar.time&&(r.leftControls.children.currentTimeDisplay=null,r.leftControls.children.timeDivider=null,r.leftControls.children.durationDisplay=null),videojs.registerComponent("LeftControls",videojs.extend(c,P(c,"vjs-left-controls").methods));break;case"__rightControls":r.rightControls={children:{}},i.options.subtitles&&(r.rightControls.children.subtitlesToggle=null),i.enabledSettingsPanel&&(r.rightControls.children.settingsToggle=null),i.options.controlBar.theaterMode&&(r.rightControls.children.theaterModeToggle=null),i.options.controlBar.pictureInPicture&&(r.rightControls.children.pictureInPictureToggle=null),i.options.controlBar.fullscreen&&(r.rightControls.children.fullscreenToggle=null),videojs.registerComponent("RightControls",videojs.extend(c,P(c,"vjs-right-controls").methods)),i.options.subtitles&&((u=P(l,"vjs-subtitles-control")).methods.handleClick=function(t){this.player_.trigger(e.state.isOpenSubtitlesOptions?"closeSubtitlesPanel":"openSubtitlesPanel",!t.screenX&&!t.screenY)},videojs.registerComponent("SubtitlesToggle",videojs.extend(u.extend,u.methods))),i.enabledSettingsPanel&&((u=P(l,"vjs-settings-control vjs-icon-cog")).methods.handleClick=function(t){this.player_.trigger(e.state.isOpenSettingsOptions?"closeSettingsPanel":"openSettingsPanel",!t.screenX&&!t.screenY)},videojs.registerComponent("SettingsToggle",videojs.extend(u.extend,u.methods))),i.options.controlBar.theaterMode&&((u=P(l,"vjs-theater-mode-control")).methods.handleClick=function(){this.player_.trigger("theatermodechange"),this.updateControlText()},u.methods.updateControlText=function(){this.controlText(this.player_.localize(e.isTheaterMode()?"Default mode":"Theater mode"))},videojs.registerComponent("TheaterModeToggle",videojs.extend(u.extend,u.methods)))}}function D(e,t){var n={},r=void 0!==t.resolutions&&void 0!==t.resolutions.options&&!!Object.keys(t.resolutions.options).length,i=void 0!==t.playbackSpeeds&&void 0!==t.playbackSpeeds.options&&!!Object.keys(t.playbackSpeeds.options).length,o=r||i;return t.controlBar.bottomBackground&&I(e,"bottomBackground",n),t.controlBar.progress&&I(e,"progressControl",n),r&&I(e,"__resolution",n,{resolutions:t.resolutions.options}),i&&I(e,"__playbackSpeed",n,{playbackSpeeds:t.playbackSpeeds.options}),t.subtitles&&I(e,"__subtitles",n,{options:t}),o&&(r&&i?I(e,"__settings",n,{enabledResolutionsPanel:r,selectedResolution:r?t.resolutions.default:null,enabledPlaybackSpeedPanel:i,selectedPlaybackSpeed:i?t.playbackSpeeds.default:null}):r?I(e,"__settings",n,{enabledResolutionsPanel:r,selectedResolution:r?t.resolutions.default:null}):i&&I(e,"__settings",n,{enabledPlaybackSpeedPanel:i,selectedPlaybackSpeed:i?t.playbackSpeeds.default:null})),(t.controlBar.play||t.controlBar.previous||t.controlBar.next||t.controlBar.volume||t.controlBar.time)&&I(e,"__leftControls",n,{options:t}),(o||t.subtitles||t.controlBar.theaterMode||t.controlBar.fullscreen||t.controlBar.pictureInPictureToggle)&&I(e,"__rightControls",n,{options:t,enabledSettingsPanel:o}),{children:n}}function L(e,t,n){V(t)&&V(t.controlBar)&&A(e)(D(e,t),n.getChild("controlBar"))}function F(e,t){V(t)&&T(e,t)}function N(e){R(e)}function j(e){O(e)}function B(e,t){M(e,t)}function U(e,t,n,r,i,o){var a={},s=V(n)&&!q(n)?n:e/t,l=V(o)&&!q(o)?o:r/i,c=1>s;return 1>l?c?s>l?e>=r?(a.w=r,a.h=a.w/s):(a.w=e,a.h=t):e>=r||t>=i?(a.h=i,a.w=a.h*s):(a.w=e,a.h=t):e>=r?(a.w=r,a.h=a.w/s):(a.w=e,a.h=t):c?t>=i?(a.h=i,a.w=a.h*s):(a.w=e,a.h=t):s>l?e>=r?(a.w=r,a.h=a.w/s):(a.w=e,a.h=t):(a.h=e>=r||t>=i?i:t,a.w=a.h*s),a.t=(i-a.h)/2,a.l=(r-a.w)/2,a}function z(e){return"boolean"==typeof e||e instanceof Boolean}function V(e){return null!=e}function q(e){return null===e}function H(e,t){t=t.replace(/ /g,""),e.style.transform=t,e.style.msTransform=t,e.style.MozTransform=t,e.style.WebkitTransform=t,e.style.OTransform=t}function W(){var e,t,n=(document.body||document.documentElement).style,r="transition";if("string"==typeof n[r])return!0;for(t=["Moz","webkit","Webkit","Khtml","O","ms"],r=r.charAt(0).toUpperCase()+r.substr(1),e=0;eo-r&&(i=o-r),d.wrap.style.transform="translate("+Math.min(o-r,i)+"px, 0px)",d.inner.style.backgroundPositionY=(m?-1.5:-1)*g.frame.height*Math.floor(a/g.frame.seconds)+"px"}t.on("durationchange",(function(e){f=t.duration()})),t.on("loadedmetadata",(function(e){f=t.duration()})),t.on("fullscreenchange",(function(e){setTimeout((function(){m=t.isFullscreen(),c()}),100)})),t.one("playing",(function(e){c(),t.addClass("vjs-enabled-preview-thumb"),d.img.onload=function(){var e=a(d.inner);void 0!==e&&(h.top=parseFloat(e.borderTopWidth),h.left=parseFloat(e.borderLeftWidth),h.right=parseFloat(e.borderRightWidth),h.bottom=parseFloat(e.borderBottomWidth)),v=this.naturalHeight,d.img=void 0,c()},d.img.src=g.url})),p.on("mouseover",y),p.on("mousemove",y),d.timeDisplay.appendChild(d.timeDisplayInner),d.inner.appendChild(d.timeDisplay),d.wrap.appendChild(d.inner),p.el_.appendChild(d.wrap)}var Q=function(){a(n,videojs.getPlugin("plugin"));var e=h(n);function n(i,o,a,s,l,c,h,p,f){var m;if(t(this,n),m=e.call(this,i,a),!a.sources.length)return r.warn("Missing media source"),d(m);function g(e){var t,n={};if(e&&e instanceof Object&&Object.keys(e).length&&(isNaN(e.volume)||(n.volume=Math.max(Math.min(e.volume,1),0)),z(e.soundMuted)&&(n.soundMuted=e.soundMuted),z(e.theaterMode)&&(n.theaterMode=e.theaterMode)),Object.keys(l).length){var r=Object.keys(l);n.theSelectedQuality=e&&void 0!==e.theSelectedQuality&&void 0!==l[e.theSelectedQuality]?e.theSelectedQuality:r[Math.floor(r.length/2)]}if(Object.keys(c).length){if(e.theSelectedPlaybackSpeed)for(t in e.theSelectedPlaybackSpeed=e.theSelectedPlaybackSpeed.toString(),c)if(c.hasOwnProperty(t)&&e.theSelectedPlaybackSpeed===c[t].speed){n.theSelectedPlaybackSpeed=c[t].speed;break}}else n.theSelectedPlaybackSpeed="1";return n}return a.enabledTouchControls=!!videojs.TOUCH_ENABLED||a.enabledTouchControls,m.videoHtmlElem=o,m.initedVideoPreviewThumb=!1,m.videoPreviewThumb=null,videojs.TOUCH_ENABLED||!a.videoPreviewThumb||void 0===a.videoPreviewThumb.url||void 0===a.videoPreviewThumb.frame||isNaN(a.videoPreviewThumb.frame.width)||isNaN(a.videoPreviewThumb.frame.height)||isNaN(a.videoPreviewThumb.frame.seconds)||(m.videoPreviewThumb=a.videoPreviewThumb),m.enabledFullscreenToggle=a.controlBar.fullscreen,m.enabledTheaterMode=a.controlBar.theaterMode,m.playbackSpeeds=c,m.videoResolutions=null,m.videoPlaybackSpeeds=null,m.timeoutSettingsPanelFocusout=null,m.timeoutSubtitlesPanelFocusout=null,m.timeoutResolutionsPanelFocusout=null,m.timeoutPlaybackSpeedsPanelFocusout=null,m.actionAnimationTimeout=null,m.seekingTimeout=null,m.updateTime=0,m.pausedTime=-1,m.seeking=!1,m.wasPlayingOnResolutionChange=!1,m.hadStartedOnResolutionChange=!1,m.isChangingResolution=!1,m.videoNativeDimensions=a.nativeDimensions,m.setState(videojs.mergeOptions(m.state,g(s))),m.stateUpdateCallback=h instanceof Function?h:null,m.nextButtonClickCallback=p instanceof Function?p:null,m.previousButtonClickCallback=f instanceof Function?f:null,m.state.theSelectedQuality&&(m.videoResolutions=l,m.videoFormat=$(m.player.src(),m.state.theSelectedQuality,m.videoResolutions),m.state.theSelectedQuality=m.videoFormat.defaultResolution,m.videoFormat={format:m.videoFormat.format,order:m.videoFormat.order},a.resolutions={default:m.state.theSelectedQuality,options:m.videoResolutions}),m.state.theSelectedPlaybackSpeed&&(m.videoPlaybackSpeeds=c,a.playbackSpeeds={default:m.state.theSelectedPlaybackSpeed,options:m.videoPlaybackSpeeds}),void 0!==s.theSelectedSubtitleOption&&null!==s.theSelectedSubtitleOption&&(m.state.theSelectedSubtitleOption=s.theSelectedSubtitleOption),a.subtitles&&a.subtitles.languages&&a.subtitles.languages.length&&a.subtitles.languages.length?a.subtitles.languages.unshift({label:"Off",srclang:"off",src:null}):a.subtitles=null,m.subtitles=a.subtitles,N(u(m)),j(u(m)),F(u(m),a),a.enabledTouchControls&&B(u(m),a),L(u(m),a,i),m.csstransforms=G("csstransforms"),i.addClass("vjs-loading-video"),m.videoNativeDimensions&&i.addClass("vjs-native-dimensions"),a.enabledTouchControls&&i.addClass("vjs-enabled-touch-controls"),m.progressBarLine=null,m.onBandwidthUpdate=null,m.onHlsRetryPlaylist=null,a.keyboardControls&&(m.player.el_.onkeyup=m.onKeyUp.bind(u(m)),m.player.el_.onkeydown=m.onKeyDown.bind(u(m))),m.onError=m.onError.bind(u(m)),m.on(i,["error"],m.onError),m.on(i,["dispose"],m.onDispose),m.on(i,["ended"],m.onEnded),m.on(i,["volumechange"],m.onVolumeChange),m.on(i,["playing","pause"],m.onPlayToggle),m.on(i,["timeupdate"],m.onTimeUpdateChange),m.on(i,["fullscreenchange"],m.onFullscreenChange),m.on(i,["theatermodechange"],m.onTheaterModeChange),m.on(i,["openSettingsPanel"],m.openSettingsOptions),m.on(i,["closeSettingsPanel"],m.closeSettingsOptions),m.on(i,["openSubtitlesPanel"],m.openSubtitlesOptions),m.on(i,["closeSubtitlesPanel"],m.closeSubtitlesOptions),m.on(i,["openQualityOptions"],m.openQualityOptions),m.on(i,["closeQualityOptions"],m.closeQualityOptions),m.on(i,["openPlaybackSpeedOptions"],m.openPlaybackSpeedOptions),m.on(i,["closePlaybackSpeedOptions"],m.closePlaybackSpeedOptions),m.on(i,["selectedQuality"],m.onQualitySelection),m.on(i,["selectedSubtitleOption"],m.onSubtitleOptionSelection),m.on(i,["selectedPlaybackSpeed"],m.onPlaybackSpeedSelection),m.on(i,["focusoutSettingsPanel"],m.onFocusOutSettingsPanel),m.on(i,["focusoutSubtitlesPanel"],m.onFocusOutSubtitlesPanel),m.on(i,["focusoutResolutionsPanel"],m.onFocusOutResolutionsPanel),m.on(i,["focusoutPlaybackSpeedsPanel"],m.onFocusOutPlaybackSpeedsPanel),m.on(i,["moveforward"],m.onMoveForward),m.on(i,["movebackward"],m.onMoveBackward),m.on(i,["userinactive"],m.onUserInactive),m.on(i,["seeked"],m.onSeeked),m.on(i,["seeking"],m.onSeeking),m.on("statechanged",m.onStateChange),m.hasPrevious=!!a.controlBar.previous,m.hasNext=!!a.controlBar.next,m.hasPrevious&&m.on(i,["clicked_previous_button"],m.onPreviousButtonClick),m.hasNext&&m.on(i,["clicked_next_button"],m.onNextButtonClick),m.onPlayerReady=m.onPlayerReady.bind(u(m)),i.ready(m.onPlayerReady),Y(i),m}return i(n,[{key:"onPreviousButtonClick",value:function(){this.hasPrevious&&(this.actionAnimation("play_previous"),this.previousButtonClickCallback&&this.previousButtonClickCallback())}},{key:"onNextButtonClick",value:function(){this.hasNext&&(this.actionAnimation("play_next"),this.nextButtonClickCallback&&this.nextButtonClickCallback())}},{key:"actionAnimation",value:function(e){if(this.player.hasStarted_&&(this.actionAnimElem=this.actionAnimElem||this.player.el_.querySelector(".vjs-actions-anim"),this.actionAnimElem)){var t;switch(e){case"play":void 0!==this.previousActionAnim&&"forward"!==this.previousActionAnim&&"backward"!==this.previousActionAnim&&(t="started-playing");break;case"pause":t="just-paused";break;case"backward":t="moving-backward";break;case"forward":t="moving-forward";break;case"volume":t=this.player.muted()||.001>=this.player.volume()?"volume-mute":.33>=this.player.volume()?"volume-low":.69>=this.player.volume()?"volume-mid":"volume-high";break;case"play_previous":t="play_previous";break;case"play_next":t="play_next"}t&&(this.actionAnimationTimeout&&this.actionAnimElem.setAttribute("class","vjs-actions-anim"),setTimeout(function(){this.previousActionAnim=e,t+=" active-anim",clearTimeout(this.actionAnimationTimeout),this.actionAnimElem.setAttribute("class","vjs-actions-anim "+t),this.actionAnimationTimeout=setTimeout((function(e){e.actionAnimElem.setAttribute("class","vjs-actions-anim"),e.actionAnimationTimeout=null,e.previousActionAnim=null}),750,this)}.bind(this),this.actionAnimationTimeout?20:0))}}},{key:"onMoveForward",value:function(){this.actionAnimation("forward")}},{key:"onMoveBackward",value:function(){this.actionAnimation("backward")}},{key:"onKeyDown",value:function(e){if(!this.player.ended()){var t=!1;switch(e.keyCode||e.charCode){case 32:this.player[this.player.paused()?"play":"pause"](),t=!0;break;case 37:this.player.currentTime(this.player.currentTime()-5*this.state.theSelectedPlaybackSpeed),this.player.trigger("movebackward"),t=!0;break;case 38:this.player.muted()?this.player.muted(!1):this.player.volume(Math.min(1,this.player.volume()+.03)),t=!0;break;case 39:this.player.currentTime(this.player.currentTime()+5*this.state.theSelectedPlaybackSpeed),this.player.trigger("moveforward"),t=!0;break;case 40:this.player.volume(Math.max(0,this.player.volume()-.03)),t=!0}t&&(e.preventDefault(),e.stopPropagation())}}},{key:"onKeyUp",value:function(e){if(!this.player.ended()){var t=e.keyCode||e.charCode,n=!1;if(e.shiftKey)switch(t){case 78:this.onNextButtonClick();break;case 80:this.onPreviousButtonClick()}else if(48<=t&&57>=t||96<=t&&105>=t)this.player.currentTime(.1*(57Math.abs(this.updateTimeDiff)&&this.actionAnimation(t?"play":"pause"),this.setState({playing:t})}},{key:"onTimeUpdateChange",value:function(e){var t=this.player.currentTime();this.updateTimeDiff=t-this.updateTime,this.updateTime=t}},{key:"onFullscreenChange",value:function(){this.player.addClass("vjs-fullscreen-change"),setTimeout((function(e){e.removeClass("vjs-fullscreen-change")}),100,this.player),this.updateVideoElementPosition()}},{key:"onTheaterModeChange",value:function(){this.setState({theaterMode:!this.state.theaterMode})}},{key:"openSettingsOptions",value:function(e,t){clearTimeout(this.timeoutSettingsPanelFocusout),this.setState({openSettings:new Date,openSettingsFromKeyboard:!!t&&new Date,isOpenSettingsOptions:!0,isOpenQualityOptions:!1,isOpenPlaybackSpeedOptions:!1,isOpenSubtitlesOptions:!1})}},{key:"closeSettingsOptions",value:function(e,t){clearTimeout(this.timeoutSettingsPanelFocusout),this.setState({closeSettings:new Date,closeSettingsFromKeyboard:!!t&&new Date,isOpenSettingsOptions:!1,isOpenQualityOptions:!1,isOpenPlaybackSpeedOptions:!1})}},{key:"openSubtitlesOptions",value:function(e,t){clearTimeout(this.timeoutSubtitlesPanelFocusout),this.setState({openSubtitles:new Date,openSubtitlesFromKeyboard:!!t&&new Date,isOpenSubtitlesOptions:!0,isOpenSettingsOptions:!1,isOpenQualityOptions:!1,isOpenPlaybackSpeedOptions:!1})}},{key:"closeSubtitlesOptions",value:function(e,t){clearTimeout(this.timeoutSubtitlesPanelFocusout),this.setState({closeSubtitles:new Date,closeSubtitlesFromKeyboard:!!t&&new Date,isOpenSubtitlesOptions:!1})}},{key:"openQualityOptions",value:function(e,t){clearTimeout(this.timeoutResolutionsPanelFocusout),this.setState({openQualities:new Date,openQualitiesFromKeyboard:!!t&&new Date,isOpenSettingsOptions:!1,isOpenQualityOptions:!0})}},{key:"openPlaybackSpeedOptions",value:function(e,t){clearTimeout(this.timeoutPlaybackSpeedsPanelFocusout),this.setState({openPlaybackSpeeds:new Date,openPlaybackSpeedsFromKeyboard:!!t&&new Date,isOpenSettingsOptions:!1,isOpenPlaybackSpeedOptions:!0})}},{key:"closeQualityOptions",value:function(e,t){clearTimeout(this.timeoutResolutionsPanelFocusout),this.setState({closeQualities:new Date,closeQualitiesFromKeyboard:!!t&&new Date,openSettings:new Date,openSettingsFromKeyboard:!!t&&new Date,isOpenSettingsOptions:!0,isOpenQualityOptions:!1})}},{key:"closePlaybackSpeedOptions",value:function(e,t){clearTimeout(this.timeoutPlaybackSpeedsPanelFocusout),this.setState({closePlaybackSpeeds:new Date,closePlaybackSpeedsFromKeyboard:!!t&&new Date,openSettings:new Date,openSettingsFromKeyboard:!!t&&new Date,isOpenSettingsOptions:!0,isOpenPlaybackSpeedOptions:!1})}},{key:"onQualitySelection",value:function(e,t){this.setState({isOpenSettingsOptions:!1,isOpenQualityOptions:!1,theSelectedQuality:t})}},{key:"onSubtitleOptionSelection",value:function(e,t){this.setState({isOpenSubtitlesOptions:!1,theSelectedSubtitleOption:t})}},{key:"onAutoQualitySelection",value:function(e){e!==this.state.theSelectedAutoQuality&&(this.setState({theSelectedAutoQuality:e}),this.player.trigger("updatedSelectedQuality"))}},{key:"onPlaybackSpeedSelection",value:function(e,t){this.setState({isOpenSettingsOptions:!1,isOpenPlaybackSpeedOptions:!1,theSelectedPlaybackSpeed:t})}},{key:"onFocusOutSubtitlesPanel",value:function(){this.timeoutSubtitlesPanelFocusout||(this.player.focus(),this.timeoutSubtitlesPanelFocusout=setTimeout((function(e){e.setState({isOpenSubtitlesOptions:!1}),e.timeoutSubtitlesPanelFocusout=null}),100,this))}},{key:"onFocusOutSettingsPanel",value:function(){this.timeoutSettingsPanelFocusout||(this.state.isOpenQualityOptions||this.state.isOpenPlaybackSpeedOptions||this.player.focus(),this.state.isOpenQualityOptions?this.state.isOpenPlaybackSpeedOptions||(this.timeoutSettingsPanelFocusout=setTimeout((function(e){e.state.isOpenSettingsOptions&&!e.state.isOpenPlaybackSpeedOptions&&e.setState({isOpenSettingsOptions:!1}),e.timeoutSettingsPanelFocusout=null}),100,this)):this.timeoutSettingsPanelFocusout=setTimeout((function(e){e.state.isOpenSettingsOptions&&!e.state.isOpenQualityOptions&&e.setState({isOpenSettingsOptions:!1}),e.timeoutSettingsPanelFocusout=null}),100,this))}},{key:"onFocusOutResolutionsPanel",value:function(){this.timeoutResolutionsPanelFocusout||(this.state.isOpenSettingsOptions||this.state.isOpenPlaybackSpeedOptions||this.player.focus(),this.state.isOpenSettingsOptions||(this.timeoutResolutionsPanelFocusout=setTimeout((function(e){e.state.isOpenQualityOptions&&!e.state.isOpenSettingsOptions&&e.setState({isOpenQualityOptions:!1}),e.timeoutResolutionsPanelFocusout=null}),100,this)))}},{key:"onFocusOutPlaybackSpeedsPanel",value:function(){this.timeoutPlaybackSpeedsPanelFocusout||(this.state.isOpenQualityOptions||this.state.isOpenSettingsOptions||this.player.focus(),this.state.isOpenSettingsOptions||(this.timeoutPlaybackSpeedsPanelFocusout=setTimeout((function(e){e.state.isOpenPlaybackSpeedOptions&&!e.state.isOpenSettingsOptions&&e.setState({isOpenPlaybackSpeedOptions:!1}),e.timeoutPlaybackSpeedsPanelFocusout=null}),100,this)))}},{key:"onPublicStateUpdate",value:function(){this.stateUpdateCallback&&this.stateUpdateCallback({volume:this.state.volume,theaterMode:this.state.theaterMode,soundMuted:this.state.soundMuted,quality:this.state.theSelectedQuality,playbackSpeed:this.state.theSelectedPlaybackSpeed,subtitle:this.state.theSelectedSubtitleOption})}},{key:"onWindowResize",value:function(){this.updateVideoPlayerRatios()}},{key:"updateVideoPlayerRatios",value:function(){this.setState({videoRatio:this.videoHtmlElem.offsetWidth/this.videoHtmlElem.offsetHeight,playerRatio:this.player.el_.offsetWidth/this.player.el_.offsetHeight});var e=document.querySelectorAll(".vjs-settings-panel-inner");if(e.length)for(var t=0;t0?e.l:"0")+"px,"+(e.t>0?e.t:"0")+"px)"):(this.videoHtmlElem.style.top=e.t>0?e.t+"px":"",this.videoHtmlElem.style.left=e.l>0?e.l+"px":"")}}},{key:"isTheaterMode",value:function(){return this.state.theaterMode}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"isEnded",value:function(){return this.player.ended()}},{key:"selectedQualityTitle",value:function(){return this.state.theSelectedQuality+("Auto"===this.state.theSelectedQuality&&null!==this.state.theSelectedAutoQuality?" "+this.state.theSelectedAutoQuality+"":"")}},{key:"selectedPlaybackSpeedTitle",value:function(){var e;for(e in this.playbackSpeeds)if(this.playbackSpeeds.hasOwnProperty(e)&&this.state.theSelectedPlaybackSpeed===this.playbackSpeeds[e].speed)return this.playbackSpeeds[e].title||this.playbackSpeeds[e].speed;return"n/a"}}]),n}();return Q.defaultState={volume:1,theaterMode:!1,soundMuted:!1,ended:!1,playing:!1,videoRatio:0,playerRatio:0,isOpenSettingsOptions:!1,isOpenSubtitlesOptions:!1,isOpenQualityOptions:!1,theSelectedQuality:null,theSelectedSubtitleOption:"off",theSelectedAutoQuality:null,theSelectedPlaybackSpeed:null,openSettings:!1,closeSettings:!1,openSettingsFromKeyboard:!1,closeSettingsFromKeyboard:!1,openSubtitles:!1,openSubtitlesFromKeyboard:!1,closeSubtitles:!1,closeSubtitlesFromKeyboard:!1,openQualities:!1,closeQualities:!1,openQualitiesFromKeyboard:!1,closeQualitiesFromKeyboard:!1},Q.VERSION=p,videojs.registerPlugin("mediaCmsVjsPlugin",Q),Q}function g(){return null===f&&(f=m()),f}g()}();const o={options:{sources:[],keyboardControls:!0,enabledTouchControls:!0,nativeDimensions:!1,suppressNotSupportedError:!0,poster:"",loop:!1,controls:!0,preload:"auto",autoplay:!1,bigPlayButton:!0,liveui:!1,controlBar:{bottomBackground:!0,progress:!0,play:!0,next:!1,previous:!1,volume:!0,pictureInPicture:!0,fullscreen:!0,theaterMode:!0,time:!0},cornerLayers:{topLeft:null,topRight:null,bottomLeft:null,bottomRight:null},videoPreviewThumb:{},subtitles:{on:!1,default:null,languages:[]}}};return function(n,a,s,l,c,u,d,h){if(!Node.prototype.isPrototypeOf(n))return r.error("Invalid player DOM element",n),null;function p(e){const t=[];let n=0;for(;n=r.sources.length&&r.sources.push(c)}l+=1}let d=n.querySelectorAll('track[kind="subtitles"]');const h={on:r.subtitles.on,default:null,languages:[]},p={};function f(e){e.src=void 0!==e.src&&null!==e.src?e.src.toString().trim():"",e.srclang=void 0!==e.srclang&&null!==e.srclang?e.srclang.toString().trim():"",e.src.length&&e.srclang.length&&(e.label=void 0!==e.label&&null!==e.label?e.label.toString().trim():e.srclang,void 0!==p[e.srclang]?(p[e.srclang].src=e.src,p[e.srclang].label=e.label):(h.languages.push({label:e.label,src:e.src,srclang:e.srclang}),p[e.srclang]=h.languages[h.languages.length-1]),void 0!==e.default&&null!==e.default&&(e.default=e.default.toString().trim(),e.default.length&&"1"!==e.default&&"true"!==e.default||(h.default=e.srclang)))}for(l=0;l=2&&(n=n.slice(2)):m(i)?n=r[4]:i?o&&(n=n.slice(2)):l>=2&&m(t.protocol)&&(n=r[4]),{protocol:i,slashes:o||m(i),slashesCount:l,rest:n}}function v(e,t,n){if(e=(e=d(e)).replace(a,""),!(this instanceof v))return new v(e,t,n);var o,s,l,c,p,y,b=h.slice(),E=typeof t,S=this,w=0;for("object"!==E&&"string"!==E&&(n=t,t=null),n&&"function"!=typeof n&&(n=i.parse),o=!(s=g(e||"",t=f(t))).protocol&&!s.slashes,S.slashes=s.slashes||o&&t.slashes,S.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||u.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!m(S.protocol)))&&(b[3]=[/(.*)/,"pathname"]);w=i;)o*=r,i*=r,e+=1;return e(o(new u.B(e.pageItems,e.maxItems,e.firstItemRequestUrl,e.requestUrl,f,m)),()=>{i&&(i.cancelAll(),o(null))})),[]),t?n.length?r.createElement("div",{className:s.listOuter},g(),r.createElement("div",{ref:h,className:"items-list-wrap"},r.createElement("div",{ref:p,className:s.list},n.map(((t,n)=>r.createElement(c.c,d({key:n},(0,c.k)(e,t,n))))))),v()):null:r.createElement(l.e,{className:s.listOuter})}h.propTypes={...s.k.propTypes,items:o().array,requestUrl:o().string.isRequired,firstItemRequestUrl:o().string},h.defaultProps={...s.k.defaultProps,requestUrl:null,firstItemRequestUrl:null,pageItems:24}},4737:function(e,t,n){"use strict";n.d(t,{k:function(){return h}});var r=n(9471),i=n(8713),o=n.n(i),a=n(5338),s=n(1838),l=n(2495),c=n(4433);function u(e,t,n,r,i){const o={maxItems:n||255,pageItems:t?Math.min(n,t):1},a={totalItems:0,totalPages:0};let s=e;const l=[],c=[];function u(e){e=isNaN(e)?o.pageItems:e;let t=Math.min(e,c.length);if(t){let e=0;for(;ec.length;)c.push(s[d]),d+=1;return a.totalItems=Math.min(o.maxItems,s.length),a.totalPages=Math.ceil(a.totalItems/o.pageItems),"function"==typeof r&&r(a.totalItems),u(),{loadItems:function(e){l.length(o(new u(e.items,e.pageItems,e.maxItems,f,m)),()=>{i&&(i.cancelAll(),o(null))})),[]),t?n.length?r.createElement("div",{className:s.listOuter},g(),r.createElement("div",{ref:h,className:"items-list-wrap"},r.createElement("div",{ref:p,className:s.list},n.map(((t,n)=>r.createElement(c.c,d({key:n},(0,c.k)(e,t,n))))))),v()):null:r.createElement(l.e,{className:s.listOuter})}h.propTypes={items:o().array.isRequired,className:o().string,hideDate:o().bool,hideViews:o().bool,hideAuthor:o().bool,hidePlaylistOptions:o().bool,hidePlaylistOrderNumber:o().bool,hideAllMeta:o().bool,preferSummary:o().bool,inPlaylistView:o().bool,inPlaylistPage:o().bool,playlistActiveItem:s.PositiveIntegerOrZero,playlistId:o().string,maxItems:o().number.isRequired,pageItems:o().number.isRequired,horizontalItemsOrientation:o().bool.isRequired,singleLinkContent:o().bool.isRequired,inTagsList:o().bool,inCategoriesList:o().bool,itemsCountCallback:o().func,itemsLoadCallback:o().func,firstItemViewer:o().bool,firstItemDescr:o().bool,canEdit:o().bool},h.defaultProps={hideDate:!1,hideViews:!1,hideAuthor:!1,hidePlaylistOptions:!0,hidePlaylistOrderNumber:!0,hideAllMeta:!1,preferSummary:!1,inPlaylistView:!1,inPlaylistPage:!1,playlistActiveItem:1,playlistId:void 0,maxItems:99999,pageItems:24,horizontalItemsOrientation:!1,singleLinkContent:!1,inTagsList:!1,inCategoriesList:!1,firstItemViewer:!1,firstItemDescr:!1,canEdit:!1}},4845:function(e,t,n){"use strict";function r(e,t,n){let r=e;return""!==t&&(r+=" "+t),n&&(r+=" pl-active-item"),r}n.d(t,{$:function(){return r}})},4876:function(e,t,n){"use strict";n.r(t),n.d(t,{useItemList:function(){return g}});var r,i,o=n(9471),a=n(7460),s=n(1838);Array.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};var l=".item-img-preview";class c{constructor(e){if(!Array.isArray(e))return null;this.extensions={};const t=["png","jpg","jpeg"];let n,r;if(this.element=null,-1{void 0!==e.itemsLoadCallback&&e.itemsLoadCallback()}),[i]),[i,s,c,u,function(e){a([...e])},function(t){l(!0),void 0!==e.itemsCountCallback&&e.itemsCountCallback(t)},function(){if(n-1?t:"Object"===t&&function(e){var t=!1;return r(m,(function(n,r){if(!t)try{n(e),t=p(r,1)}catch(e){}})),t}(e)}return s?function(e){var t=!1;return r(m,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=p(r,1))}catch(e){}})),t}(e):null}},5020:function(e,t,n){"use strict";var r=n(8228);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},5187:function(e){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=this.state.currentSlide?1:this.state.currentSlide},i.prototype.updateDataState=function(e,t,n){!n&&this.state.initedAllStateValues||(this.state.initedAllStateValues=!0,this.state.wrapper.width=this.data.dom.wrapper.offsetWidth,this.state.wrapper.scrollWidth=this.data.dom.wrapper.scrollWidth,this.state.slideItemsFit=Math.floor(this.state.wrapper.width/this.data.item.width),this.state.slideItems=Math.max(1,this.state.slideItemsFit),t&&this.state.slideItems<=this.state.slideItemsFit&&(this.state.itemsLengthFit=this.state.slideItems)),this.state.totalItems=e,this.state.maxSlideIndex=Math.max(1,this.state.totalItems-this.state.slideItemsFit+1),this.state.currentSlide=Math.min(this.state.currentSlide,this.state.maxSlideIndex),this.state.currentSlide=0>=this.state.currentSlide?1:this.state.currentSlide},i.prototype.nextSlide=function(){this.state.currentSlide=Math.min(r(this.data.dom.wrapper,this.data.item.width,this.state.currentSlide)+this.state.slideItems,this.state.maxSlideIndex)},i.prototype.previousSlide=function(){this.state.currentSlide=Math.max(1,r(this.data.dom.wrapper,this.data.item.width,this.state.currentSlide)-this.state.slideItems)},i.prototype.scrollToCurrentSlide=function(){this.data.dom.wrapper.scrollLeft=this.data.item.width*(this.state.currentSlide-1)},i.prototype.hasNextSlide=function(){return this.state.currentSlidethis.state.totalItems},i.prototype.loadMoreItems=function(){return this.state.currentSlide+this.state.slideItemsFit>=this.state.maxSlideIndex},i.prototype.itemsFit=function(){return this.state.slideItemsFit}},5305:function(e,t,n){"use strict";n.d(t,{V:function(){return s}});var r=n(9471),i=n(9834),o=n(8713),a=n.n(o);function s(e){const t=(0,r.useRef)(null),[n,o]=(0,r.useState)(null);let a=[];function s(t,n){var r;n.preventDefault(),n.stopPropagation(),r=a[t].id,void 0!==e.pages[r]&&o(r)}return(0,r.useEffect)((()=>{void 0!==e.pages[e.initPage]?o(e.initPage):Object.keys(e.pages).length?o(Object.keys(e.pages)[0]):o(null)}),[e.initPage]),(0,r.useEffect)((()=>{!function(){let e=0;for(;et=>s(e,t))(n),a[n].elem.addEventListener("click",a[n].listener)),n+=1;e.focusFirstItemOnPageChange&&o.focus()}(),"function"==typeof e.pageChangeCallback&&e.pageChangeCallback(n))}),[n]),n?r.createElement("div",{ref:t},r.cloneElement(e.pages[n])):null}s.propTypes={initPage:a().string,pages:a().object.isRequired,pageChangeSelector:a().string.isRequired,pageIdSelectorAttr:a().string.isRequired,focusFirstItemOnPageChange:a().bool,pageChangeCallback:a().func},s.defaultProps={focusFirstItemOnPageChange:!0}},5320:function(e,t,n){"use strict";n.r(t),n.d(t,{LayoutConsumer:function(){return d},LayoutContext:function(){return c},LayoutProvider:function(){return u}});var r=n(9471),i=n(7154),o=n(7460),a=n(1838),s=n(8899);let l;const c=(0,r.createContext)(),u=e=>{let{children:t}=e;const n=(0,r.useContext)(s.default),u=new i.BrowserCache("MediaCMS["+n.id+"][layout]",86400),d=!(!document.getElementById("app-sidebar")&&!document.querySelector(".page-sidebar")),[h,p]=(0,r.useState)(u.get("visible-sidebar")),[f,m]=(0,r.useState)(!1);(0,r.useEffect)((()=>{h?(0,a.addClassname)(document.body,"visible-sidebar"):(0,a.removeClassname)(document.body,"visible-sidebar"),"media"!==o.PageStore.get("current-page")&&1023{o.PageStore.once("page_init",(()=>{"media"===o.PageStore.get("current-page")&&(p(!1),(0,a.removeClassname)(document.body,"visible-sidebar"))})),p("media"!==o.PageStore.get("current-page")&&1023{m(!f)},toggleSidebar:()=>{const e=!h;!function(e){clearTimeout(l),(0,a.addClassname)(document.body,"sliding-sidebar"),l=setTimeout((function(){"media"===o.PageStore.get("current-page")?e?(0,a.addClassname)(document.body,"overflow-hidden"):(0,a.removeClassname)(document.body,"overflow-hidden"):!e||767{let{children:t}=e;const n=(0,r.useContext)(s.default),a=new i.BrowserCache("MediaCMS["+n.id+"][theme]",86400),[u,d]=(0,r.useState)((h=a.get("mode"),p=l.theme.mode,"light"===h||"dark"===h?h:p));var h,p;const f=function(e){let t=null,n=null;return void 0!==e.darkMode&&((0,o.supportsSvgAsImg)()&&void 0!==e.darkMode.svg&&""!==e.darkMode.svg?n=e.darkMode.svg:void 0!==e.darkMode.img&&""!==e.darkMode.img&&(n=e.darkMode.img)),void 0!==e.lightMode&&((0,o.supportsSvgAsImg)()&&void 0!==e.lightMode.svg&&""!==e.lightMode.svg?t=e.lightMode.svg:void 0!==e.lightMode.img&&""!==e.lightMode.img&&(t=e.lightMode.img)),null===t&&null===n||(null===t?t=n:null===n&&(n=t)),{light:t,dark:n}}(l.theme.logo),[m,g]=(0,r.useState)(f[u]);(0,r.useEffect)((()=>{"dark"===u?(0,o.addClassname)(document.body,"dark_theme"):(0,o.removeClassname)(document.body,"dark_theme"),a.set("mode",u),g(f[u])}),[u]);const v={logo:m,currentThemeMode:u,changeThemeMode:()=>{d("light"===u?"dark":"light")},themeModeSwitcher:l.theme.switch};return r.createElement(c.Provider,{value:v},t)},d=c.Consumer},5474:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},v:function(){return i}});var r=function(e){return"&"===e[0]},i=function(e){return!r(e)}},5503:function(e,t,n){"use strict";n.r(t);var r=n(9032),i=n.n(r),o=n(1838),a=n(6371),s=n(2127);class l extends(i()){constructor(){super(),this.data={playlistId:null,enabledLoop:null,enabledShuffle:null,savedPlaylist:!1,response:null},this.browserCache=a.default.get("browser-cache")}get(e){switch(e){case"logged-in-user-playlist":return!1;case"enabled-loop":return null===this.data.playlistId&&(this.data.playlistId=s.default.get("playlist-id"),this.data.enabledLoop=this.browserCache.get("loopPlaylist["+this.data.playlistId+"]"),this.data.enabledLoop=null===this.data.enabledLoop||this.data.enabledLoop),this.data.enabledLoop;case"enabled-shuffle":return null===this.data.playlistId&&(this.data.playlistId=s.default.get("playlist-id"),this.data.enabledShuffle=this.browserCache.get("shufflePlaylist["+this.data.playlistId+"]"),this.data.enabledShuffle=null!==this.data.enabledShuffle&&this.data.enabledShuffle),this.data.enabledShuffle;case"saved-playlist":return this.data.savedPlaylist}return null}actions_handler(e){switch(e.type){case"TOGGLE_LOOP":null===this.data.playlistId&&(this.data.playlistId=s.default.get("playlist-id"),this.data.enabledLoop=this.browserCache.get("loopPlaylist["+this.data.playlistId+"]"),this.data.enabledLoop=null===this.data.enabledLoop||this.data.enabledLoop),this.data.enabledLoop=!this.data.enabledLoop,this.browserCache.set("loopPlaylist["+this.data.playlistId+"]",this.data.enabledLoop),this.emit("loop-repeat-updated");break;case"TOGGLE_SHUFFLE":null===this.data.playlistId&&(this.data.playlistId=s.default.get("playlist-id"),this.data.enabledShuffle=this.browserCache.get("shufflePlaylist["+this.data.playlistId+"]"),this.data.enabledShuffle=null!==this.data.enabledShuffle&&this.data.enabledShuffle),this.data.enabledShuffle=!this.data.enabledShuffle,this.browserCache.set("shufflePlaylist["+this.data.playlistId+"]",this.data.enabledShuffle),this.emit("shuffle-updated");break;case"TOGGLE_SAVE":this.data.savedPlaylist=!this.data.savedPlaylist,this.emit("saved-updated")}}}t.default=(0,o.exportStore)(new l,"actions_handler")},5510:function(e,t,n){"use strict";n.r(t),n.d(t,{useManagementTableHeader:function(){return i}});var r=n(9471);function i(e){const[t,n]=(0,r.useState)(e.sort),[i,o]=(0,r.useState)(e.order),[a,s]=(0,r.useState)(e.selected);return(0,r.useEffect)((()=>{n(e.sort)}),[e.sort]),(0,r.useEffect)((()=>{o(e.order)}),[e.order]),(0,r.useEffect)((()=>{s(e.selected)}),[e.selected]),[t,i,a,function(r){const a=r.currentTarget.getAttribute("id"),s=a,l=t===a&&"desc"===i?"asc":"desc";n(s),o(l),void 0!==e.onClickColumnSort&&e.onClickColumnSort(s,l)},function(){const t=!a;s(!t),void 0!==e.onCheckAllRows&&e.onCheckAllRows(t,e.type)}]}},5518:function(e,t,n){"use strict";function r(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}n.d(t,{A:function(){return r}})},5541:function(e){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},5577:function(e){"use strict";e.exports=Math.abs},5615:function(e,t,n){"use strict";n.d(t,{L9:function(){return h},lg:function(){return d}});var r=n(9471),i=n(8713),o=n.n(i),a=n(4571),s=n.n(a),l=n(4480),c=n.n(l);function u(e,t){let n=s()(e,{});return""!==n.origin&&"null"!==n.origin&&n.origin||(n=s()(t+"/"+e.replace(/^\//g,""),{})),n.toString()}function d(e){return r.createElement("div",{className:"error-container"},r.createElement("div",{className:"error-container-inner"},r.createElement("span",{className:"icon-wrap"},r.createElement("i",{className:"material-icons"},"error_outline")),r.createElement("span",{className:"msg-wrap"},e.errorMessage)))}function h(e){const t=(0,r.useRef)(null);let n=null;const i={playerVolume:e.playerVolume,playerSoundMuted:e.playerSoundMuted,videoQuality:e.videoQuality,videoPlaybackSpeed:e.videoPlaybackSpeed,inTheaterMode:e.inTheaterMode};function o(){void 0!==e.onClickNextCallback&&e.onClickNextCallback()}function a(){void 0!==e.onClickPreviousCallback&&e.onClickPreviousCallback()}function s(t){i.playerVolume!==t.volume&&(i.playerVolume=t.volume),i.playerSoundMuted!==t.soundMuted&&(i.playerSoundMuted=t.soundMuted),i.videoQuality!==t.quality&&(i.videoQuality=t.quality),i.videoPlaybackSpeed!==t.playbackSpeed&&(i.videoPlaybackSpeed=t.playbackSpeed),i.inTheaterMode!==t.theaterMode&&(i.inTheaterMode=t.theaterMode),void 0!==e.onStateUpdateCallback&&e.onStateUpdateCallback(t)}function l(){if(null!==n||null!==e.errorMessage)return;if(e.inEmbed||(window.removeEventListener("focus",l),document.removeEventListener("visibilitychange",l)),!t.current)return;e.inEmbed||t.current.focus();const r={on:!1};if(void 0!==e.subtitlesInfo&&null!==e.subtitlesInfo&&e.subtitlesInfo.length){r.languages=[];let t=0;for(;t(e.inEmbed||document.hasFocus()||"visible"===document.visibilityState?l():(window.addEventListener("focus",l),document.addEventListener("visibilitychange",l)),()=>{null!==n&&(videojs(t.current).dispose(),n=null),void 0!==e.onUnmountCallback&&e.onUnmountCallback()})),[]),null===e.errorMessage?r.createElement("video",{ref:t,className:"video-js vjs-mediacms native-dimensions"}):r.createElement("div",{className:"error-container"},r.createElement("div",{className:"error-container-inner"},r.createElement("span",{className:"icon-wrap"},r.createElement("i",{className:"material-icons"},"error_outline")),r.createElement("span",{className:"msg-wrap"},e.errorMessage)))}d.propTypes={errorMessage:o().string.isRequired},h.propTypes={playerVolume:o().string,playerSoundMuted:o().bool,videoQuality:o().string,videoPlaybackSpeed:o().number,inTheaterMode:o().bool,siteId:o().string.isRequired,siteUrl:o().string.isRequired,errorMessage:o().string,cornerLayers:o().object,subtitlesInfo:o().array.isRequired,inEmbed:o().bool.isRequired,sources:o().array.isRequired,info:o().object.isRequired,enableAutoplay:o().bool.isRequired,hasTheaterMode:o().bool.isRequired,hasNextLink:o().bool.isRequired,hasPreviousLink:o().bool.isRequired,poster:o().string,previewSprite:o().object,onClickPreviousCallback:o().func,onClickNextCallback:o().func,onPlayerInitCallback:o().func,onStateUpdateCallback:o().func,onUnmountCallback:o().func},h.defaultProps={errorMessage:null,cornerLayers:{}}},5633:function(e,t,n){"use strict";n.d(t,{B:function(){return o}});var r=n(7460),i=n(1838);function o(e,t,n,o,a,s){const l={maxItems:t||255,pageItems:e?Math.min(t,e):1},c={totalItems:0,totalPages:0,nextRequestUrl:(0,i.formatInnerLink)(o,r.PageStore.get("config-site").url)},u={pageItems:0,requestResponse:!1};let d=null;const h=[],p=[];function f(e){let t,n;if(e=isNaN(e)?l.pageItems:e,u.pageItems&&u.pageItems<=p.length?(t=u.pageItems,n=!1,u.pageItems=0):(t=Math.min(e,p.length),n=e>p.length&&!!c.nextRequestUrl,u.pageItems=n?e-p.length:0),t){let e=0;for(;ep.length;)null!==d&&d===r[i].url||p.push(r[i]),i+=1;c.nextRequestUrl=n.next&&l.maxItems>p.length?n.next:null,e&&(c.totalItems=n.count?n.count:p.length,c.totalItems=Math.min(l.maxItems,c.totalItems),c.totalPages=Math.ceil(c.totalItems/l.pageItems),"function"==typeof a&&a(c.totalItems)),f()})),c.nextRequestUrl=null}return null!=n?(0,i.getRequest)((0,i.formatInnerLink)(n,r.PageStore.get("config-site").url),!1,(function(e){if(e&&e.data){let t=e.data,n=void 0!==t.results?t.results:t;n.length&&(d=n[0].url,h.push(n[0]))}m(!0)})):m(!0),{loadItems:function(e){!u.requestResponse&&h.length2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s(new Date).getTime()?n.value:null:n},clear:function(){var t;if(o&&Object.keys(localStorage).length)for(t in localStorage)localStorage.hasOwnProperty(t)&&0===t.indexOf(e)&&localStorage.removeItem(t);return!0}}:(0,r.logErrorAndReturnError)(["Cache object prefix is required"])}},6089:function(e,t,n){"use strict";n.d(t,{$:function(){return s}});var r=n(9471),i=n(6371);let o=/^(152|543|594|722)$/.test(n.j)?null:[];function a(e){const[t,n]=(0,r.useState)(!1),[i,o]=(0,r.useState)(!0);let a=null,s=null;return(0,r.useEffect)((()=>(a=setTimeout((function(){s=setTimeout((function(){o(!1),s=null}),1e3),a=null,n(!0),e.onHide(e.id)}),5e3),()=>{a&&clearTimeout(a),s&&clearTimeout(s)})),[]),i?r.createElement("div",{className:"notification-item"+(t?" hidden":"")},r.createElement("div",null,e.children||null)):null}function s(){const[e,t]=(0,r.useState)(o.length);function n(){t(i.default.get("notifications-size")+o.length)}function s(e){const t=[];o.map((n=>{n[0]!==e&&t.push(n)})),o=t}return(0,r.useEffect)((()=>(n(),i.default.on("added_notification",n),()=>i.default.removeListener("added_notification",n))),[]),e?r.createElement("div",{className:"notifications"},r.createElement("div",null,function(){const e=i.default.get("notifications");return[...o.map((e=>r.createElement(a,{key:e[0],id:e[0],onHide:s},e[1]))),...e.map((e=>(o.push(e),r.createElement(a,{key:e[0],id:e[0],onHide:s},e[1]))))]}())," "):null}},6098:function(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},6109:function(e,t,n){"use strict";var r=n(7118),i=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),o=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M19.5,15.106l2.4-2.4a1,1,0,0,0,0-1.414l-2.4-2.4V5.5a1,1,0,0,0-1-1H15.106l-2.4-2.4a1,1,0,0,0-1.414,0l-2.4,2.4H5.5a1,1,0,0,0-1,1V8.894l-2.4,2.4a1,1,0,0,0,0,1.414l2.4,2.4V18.5a1,1,0,0,0,1,1H8.894l2.4,2.4a1,1,0,0,0,1.414,0l2.4-2.4H18.5a1,1,0,0,0,1-1Z"}),i.createElement("path",{d:"M10,6.349a6,6,0,0,1,0,11.3,6,6,0,1,0,0-11.3Z"}))},a=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M19.491,15.106l2.4-2.4a1,1,0,0,0,0-1.414l-2.4-2.4V5.5a1,1,0,0,0-1-1H15.1L12.7,2.1a1,1,0,0,0-1.414,0l-2.4,2.4H5.491a1,1,0,0,0-1,1V8.894l-2.4,2.4a1,1,0,0,0,0,1.414l2.4,2.4V18.5a1,1,0,0,0,1,1H8.885l2.4,2.4a1,1,0,0,0,1.414,0l2.4-2.4h3.394a1,1,0,0,0,1-1Z"}),i.createElement("path",{d:"M11.491,6c4,0,6,2.686,6,6s-2,6-6,6Z"}))},s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;ne.toString(36))).join("")).replace(/./g,""+Math.random()+Intl.DateTimeFormat().resolvedOptions().timeZone+Date.now())}let c,u=null,d=null;class h extends(i()){constructor(e){super(),d=(0,s.$)(window.MediaCMS),c=new o.BrowserCache(d.site.id,86400),u={mediaAutoPlay:c.get("media-auto-play")},u.mediaAutoPlay=null===u.mediaAutoPlay||u.mediaAutoPlay,this.browserEvents=(0,a.BrowserEvents)(),this.browserEvents.doc(this.onDocumentVisibilityChange.bind(this)),this.browserEvents.win(this.onWindowResize.bind(this),this.onWindowScroll.bind(this)),this.notifications=function(e){let t=[];function n(e){"string"==typeof e&&t.push([l(),e])}return e.map(n),{size:function(){return t.length},push:n,clear:function(){t=[]},messages:function(){return[...t]}}}(void 0!==window.MediaCMS&&void 0!==window.MediaCMS.notifications?window.MediaCMS.notifications:[])}onDocumentVisibilityChange(){this.emit("document_visibility_change")}onWindowScroll(){this.emit("window_scroll")}onWindowResize(){this.emit("window_resize")}initPage(e){u.currentPage=e}get(e){let t;switch(e){case"browser-cache":t=c;break;case"media-auto-play":t=u.mediaAutoPlay;break;case"config-contents":t=d.contents;break;case"config-enabled":t=d.enabled;break;case"config-media-item":t=d.media.item;break;case"config-options":t=d.options;break;case"config-site":t=d.site;break;case"api-playlists":n=e.split("-")[1],t=d.api[n]||null;break;case"notifications-size":t=this.notifications.size();break;case"notifications":t=this.notifications.messages(),this.notifications.clear();break;case"current-page":t=u.currentPage}var n;return t}actions_handler(e){switch(e.type){case"INIT_PAGE":this.initPage(e.page),this.emit("page_init");break;case"TOGGLE_AUTO_PLAY":u.mediaAutoPlay=!u.mediaAutoPlay,c.set("media-auto-play",u.mediaAutoPlay),this.emit("switched_media_auto_play");break;case"ADD_NOTIFICATION":this.notifications.push(e.notification),this.emit("added_notification")}}}t.default=(0,a.exportStore)(new h,"actions_handler")},6387:function(e,t,n){"use strict";n.r(t),n.d(t,{useUser:function(){return o}});var r=n(9471),i=n(4463);const o=()=>(0,r.useContext)(i.default)},6403:function(e,t,n){"use strict";n.d(t,{g:function(){return a},m:function(){return o}});var r=n(8004);function i(e,t,n){let r;switch(n){case TypeError:case RangeError:case SyntaxError:case ReferenceError:r=new n(t[0]);break;default:r=new Error(t[0])}return e(r.message,...t.slice(1)),r}function o(e,t){return i(r.z,e,t)}function a(e,t){return i(r.R,e,t)}},6550:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6552:function(e,t,n){"use strict";n.r(t),n.d(t,{useMediaFilter:function(){return o}});var r=n(9471),i=n(1610);function o(e){const t=(0,r.useRef)(null),[n,o]=(0,r.useState)(e),[a,s,l]=(0,i.usePopup)();return[t,n,o,a,s,l]}},6568:function(e,t,n){"use strict";n.d(t,{x:function(){return a}});var r=n(9471),i=n(8713),o=n.n(i);function a(e){let t="spinner-loader";switch(e.size){case"tiny":case"x-small":case"small":case"large":case"x-large":t+=" "+e.size}return r.createElement("div",{className:t},r.createElement("svg",{className:"circular",viewBox:"25 25 50 50"},r.createElement("circle",{className:"path",cx:"50",cy:"50",r:"20",fill:"none",strokeWidth:"1.5",strokeMiterlimit:"10"})))}a.propTypes={size:o().oneOf(["tiny","x-small","small","medium","large","x-large"])},a.defaultProps={size:"medium"}},6619:function(e,t,n){"use strict";n.d(t,{P:function(){return ye},G:function(){return ge}});var r=n(9191),i=n(5385),o=n(2531);function a(e){return(0,r.A)(e)||(0,i.A)(e)||(0,o.A)()}function s(){return s=Object.assign||function(e){for(var t=1;t=0&&t++,e.indexOf("__display__")>=0&&t++,t},L=function(){},F=function(e,t,n){for(var r,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:L,s=(r=t.map((function(e){return e.regex})),i=/^\/(.+)\/(\w+)?$/,new RegExp(r.map((function(e){var t=E(i.exec(e.toString()),3),n=t[1],r=t[2];return g()(!r,"RegExp flags are not supported. Change /".concat(n,"/").concat(r," into /").concat(n,"/")),"(".concat(n,")")})).join("|"),"g")),l=2,c=t.map((function(e){var t=e.markup,n=l;return l+=D(t)+1,n})),u=0,d=0;null!==(o=s.exec(e));){var h=c.find((function(e){return!!o[e]})),p=c.indexOf(h),f=t[p],m=f.markup,v=f.displayTransform,y=h+I(m,"id"),b=h+I(m,"display"),S=o[y],w=v(S,o[b]),_=e.substring(u,o.index);a(_,u,d),d+=_.length,n(o[0],o.index,d,S,w,p,u),d+=w.length,u=s.lastIndex}u3&&void 0!==arguments[3]?arguments[3]:"START";return"number"!=typeof n?n:(F(e,t,(function(e,t,o,a,s,l,c){void 0===r&&o+s.length>n&&(r="NULL"===i?null:t+("END"===i?e.length:0))}),(function(e,t,i){void 0===r&&i+e.length>=n&&(r=t+n-i)})),void 0===r?e.length:r)},B=function(e,t,n,r){return e.substring(0,t)+r+e.substring(n)},U=function(e,t,n){var r=n,i=!1;if(F(e,t,(function(e,t,o,a,s,l,c){o<=n&&o+s.length>n&&(r=o,i=!0)})),i)return r},z=function(e,t){var n=[];return F(e,t,(function(e,t,r,i,o,a,s){n.push({id:i,display:o,childIndex:a,index:t,plainTextIndex:r})})),n},V=function(e,t){return"".concat(e,"-").concat(t)},q=function(e){return Object.values(e).reduce((function(e,t){return e+t.results.length}),0)},H=function(e){var t=T(e),n=e[e.indexOf(O)+11],r=e[e.indexOf(R)+6];return new RegExp(t.replace(O,"([^".concat(T(n||""),"]+?)")).replace(R,"([^".concat(T(r||""),"]+?)")))},W=function(e){return f.Children.toArray(e).map((function(e){var t=e.props,n=t.markup,r=t.regex,i=t.displayTransform;return{markup:n,regex:r?G(r,n):H(n),displayTransform:i||function(e,t){return t||e}}}))},G=function(e,t){var n=new RegExp(e.toString()+"|").exec("").length-1,r=D(t);return g()(n===r,"Number of capturing groups in RegExp ".concat(e.toString()," (").concat(n,") does not match the number of placeholders in the markup '").concat(t,"' (").concat(r,")")),e},$=[{base:"A",letters:/(A|Ⓐ|A|À|Á|Â|Ầ|Ấ|Ẫ|Ẩ|Ã|Ā|Ă|Ằ|Ắ|Ẵ|Ẳ|Ȧ|Ǡ|Ä|Ǟ|Ả|Å|Ǻ|Ǎ|Ȁ|Ȃ|Ạ|Ậ|Ặ|Ḁ|Ą|Ⱥ|Ɐ|[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F])/g},{base:"AA",letters:/(Ꜳ|[\uA732])/g},{base:"AE",letters:/(Æ|Ǽ|Ǣ|[\u00C6\u01FC\u01E2])/g},{base:"AO",letters:/(Ꜵ|[\uA734])/g},{base:"AU",letters:/(Ꜷ|[\uA736])/g},{base:"AV",letters:/(Ꜹ|Ꜻ|[\uA738\uA73A])/g},{base:"AY",letters:/(Ꜽ|[\uA73C])/g},{base:"B",letters:/(B|Ⓑ|B|Ḃ|Ḅ|Ḇ|Ƀ|Ƃ|Ɓ|[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181])/g},{base:"C",letters:/(C|Ⓒ|C|Ć|Ĉ|Ċ|Č|Ç|Ḉ|Ƈ|Ȼ|Ꜿ|[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E])/g},{base:"D",letters:/(D|Ⓓ|D|Ḋ|Ď|Ḍ|Ḑ|Ḓ|Ḏ|Đ|Ƌ|Ɗ|Ɖ|Ꝺ|Ð|[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779\u00D0])/g},{base:"DZ",letters:/(DZ|DŽ|[\u01F1\u01C4])/g},{base:"Dz",letters:/(Dz|Dž|[\u01F2\u01C5])/g},{base:"E",letters:/(E|Ⓔ|E|È|É|Ê|Ề|Ế|Ễ|Ể|Ẽ|Ē|Ḕ|Ḗ|Ĕ|Ė|Ë|Ẻ|Ě|Ȅ|Ȇ|Ẹ|Ệ|Ȩ|Ḝ|Ę|Ḙ|Ḛ|Ɛ|Ǝ|[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E])/g},{base:"F",letters:/(F|Ⓕ|F|Ḟ|Ƒ|Ꝼ|[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B])/g},{base:"G",letters:/(G|Ⓖ|G|Ǵ|Ĝ|Ḡ|Ğ|Ġ|Ǧ|Ģ|Ǥ|Ɠ|Ꞡ|Ᵹ|Ꝿ|[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E])/g},{base:"H",letters:/(H|Ⓗ|H|Ĥ|Ḣ|Ḧ|Ȟ|Ḥ|Ḩ|Ḫ|Ħ|Ⱨ|Ⱶ|Ɥ|[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D])/g},{base:"I",letters:/(I|Ⓘ|I|Ì|Í|Î|Ĩ|Ī|Ĭ|İ|Ï|Ḯ|Ỉ|Ǐ|Ȉ|Ȋ|Ị|Į|Ḭ|Ɨ|[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197])/g},{base:"J",letters:/(J|Ⓙ|J|Ĵ|Ɉ|[\u004A\u24BF\uFF2A\u0134\u0248])/g},{base:"K",letters:/(K|Ⓚ|K|Ḱ|Ǩ|Ḳ|Ķ|Ḵ|Ƙ|Ⱪ|Ꝁ|Ꝃ|Ꝅ|Ꞣ|[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2])/g},{base:"L",letters:/(L|Ⓛ|L|Ŀ|Ĺ|Ľ|Ḷ|Ḹ|Ļ|Ḽ|Ḻ|Ł|Ƚ|Ɫ|Ⱡ|Ꝉ|Ꝇ|Ꞁ|[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780])/g},{base:"LJ",letters:/(LJ|[\u01C7])/g},{base:"Lj",letters:/(Lj|[\u01C8])/g},{base:"M",letters:/(M|Ⓜ|M|Ḿ|Ṁ|Ṃ|Ɱ|Ɯ|[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C])/g},{base:"N",letters:/(N|Ⓝ|N|Ǹ|Ń|Ñ|Ṅ|Ň|Ṇ|Ņ|Ṋ|Ṉ|Ƞ|Ɲ|Ꞑ|Ꞥ|Ŋ|[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4\u014A])/g},{base:"NJ",letters:/(NJ|[\u01CA])/g},{base:"Nj",letters:/(Nj|[\u01CB])/g},{base:"O",letters:/(O|Ⓞ|O|Ò|Ó|Ô|Ồ|Ố|Ỗ|Ổ|Õ|Ṍ|Ȭ|Ṏ|Ō|Ṑ|Ṓ|Ŏ|Ȯ|Ȱ|Ö|Ȫ|Ỏ|Ő|Ǒ|Ȍ|Ȏ|Ơ|Ờ|Ớ|Ỡ|Ở|Ợ|Ọ|Ộ|Ǫ|Ǭ|Ø|Ǿ|Ɔ|Ɵ|Ꝋ|Ꝍ|[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C])/g},{base:"OE",letters:/(Œ|[\u0152])/g},{base:"OI",letters:/(Ƣ|[\u01A2])/g},{base:"OO",letters:/(Ꝏ|[\uA74E])/g},{base:"OU",letters:/(Ȣ|[\u0222])/g},{base:"P",letters:/(P|Ⓟ|P|Ṕ|Ṗ|Ƥ|Ᵽ|Ꝑ|Ꝓ|Ꝕ|[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754])/g},{base:"Q",letters:/(Q|Ⓠ|Q|Ꝗ|Ꝙ|Ɋ|[\u0051\u24C6\uFF31\uA756\uA758\u024A])/g},{base:"R",letters:/(R|Ⓡ|R|Ŕ|Ṙ|Ř|Ȑ|Ȓ|Ṛ|Ṝ|Ŗ|Ṟ|Ɍ|Ɽ|Ꝛ|Ꞧ|Ꞃ|[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782])/g},{base:"S",letters:/(S|Ⓢ|S|ẞ|Ś|Ṥ|Ŝ|Ṡ|Š|Ṧ|Ṣ|Ṩ|Ș|Ş|Ȿ|Ꞩ|Ꞅ|[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784])/g},{base:"T",letters:/(T|Ⓣ|T|Ṫ|Ť|Ṭ|Ț|Ţ|Ṱ|Ṯ|Ŧ|Ƭ|Ʈ|Ⱦ|Ꞇ|[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786])/g},{base:"TH",letters:/(Þ|[\u00DE])/g},{base:"TZ",letters:/(Ꜩ|[\uA728])/g},{base:"U",letters:/(U|Ⓤ|U|Ù|Ú|Û|Ũ|Ṹ|Ū|Ṻ|Ŭ|Ü|Ǜ|Ǘ|Ǖ|Ǚ|Ủ|Ů|Ű|Ǔ|Ȕ|Ȗ|Ư|Ừ|Ứ|Ữ|Ử|Ự|Ụ|Ṳ|Ų|Ṷ|Ṵ|Ʉ|[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244])/g},{base:"V",letters:/(V|Ⓥ|V|Ṽ|Ṿ|Ʋ|Ꝟ|Ʌ|[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245])/g},{base:"VY",letters:/(Ꝡ|[\uA760])/g},{base:"W",letters:/(W|Ⓦ|W|Ẁ|Ẃ|Ŵ|Ẇ|Ẅ|Ẉ|Ⱳ|[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72])/g},{base:"X",letters:/(X|Ⓧ|X|Ẋ|Ẍ|[\u0058\u24CD\uFF38\u1E8A\u1E8C])/g},{base:"Y",letters:/(Y|Ⓨ|Y|Ỳ|Ý|Ŷ|Ỹ|Ȳ|Ẏ|Ÿ|Ỷ|Ỵ|Ƴ|Ɏ|Ỿ|[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE])/g},{base:"Z",letters:/(Z|Ⓩ|Z|Ź|Ẑ|Ż|Ž|Ẓ|Ẕ|Ƶ|Ȥ|Ɀ|Ⱬ|Ꝣ|[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762])/g},{base:"a",letters:/(a|ⓐ|a|ẚ|à|á|â|ầ|ấ|ẫ|ẩ|ã|ā|ă|ằ|ắ|ẵ|ẳ|ȧ|ǡ|ä|ǟ|ả|å|ǻ|ǎ|ȁ|ȃ|ạ|ậ|ặ|ḁ|ą|ⱥ|ɐ|[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250])/g},{base:"aa",letters:/(ꜳ|[\uA733])/g},{base:"ae",letters:/(æ|ǽ|ǣ|[\u00E6\u01FD\u01E3])/g},{base:"ao",letters:/(ꜵ|[\uA735])/g},{base:"au",letters:/(ꜷ|[\uA737])/g},{base:"av",letters:/(ꜹ|ꜻ|[\uA739\uA73B])/g},{base:"ay",letters:/(ꜽ|[\uA73D])/g},{base:"b",letters:/(b|ⓑ|b|ḃ|ḅ|ḇ|ƀ|ƃ|ɓ|[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253])/g},{base:"c",letters:/(c|ⓒ|c|ć|ĉ|ċ|č|ç|ḉ|ƈ|ȼ|ꜿ|ↄ|[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184])/g},{base:"d",letters:/(d|ⓓ|d|ḋ|ď|ḍ|ḑ|ḓ|ḏ|đ|ƌ|ɖ|ɗ|ꝺ|ð|[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A\u00F0])/g},{base:"dz",letters:/(dz|dž|[\u01F3\u01C6])/g},{base:"e",letters:/(e|ⓔ|e|è|é|ê|ề|ế|ễ|ể|ẽ|ē|ḕ|ḗ|ĕ|ė|ë|ẻ|ě|ȅ|ȇ|ẹ|ệ|ȩ|ḝ|ę|ḙ|ḛ|ɇ|ɛ|ǝ|[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD])/g},{base:"f",letters:/(f|ⓕ|f|ḟ|ƒ|ꝼ|[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C])/g},{base:"g",letters:/(g|ⓖ|g|ǵ|ĝ|ḡ|ğ|ġ|ǧ|ģ|ǥ|ɠ|ꞡ|ᵹ|ꝿ|[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F])/g},{base:"h",letters:/(h|ⓗ|h|ĥ|ḣ|ḧ|ȟ|ḥ|ḩ|ḫ|ẖ|ħ|ⱨ|ⱶ|ɥ|[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265])/g},{base:"hv",letters:/(ƕ|[\u0195])/g},{base:"i",letters:/(i|ⓘ|i|ì|í|î|ĩ|ī|ĭ|ï|ḯ|ỉ|ǐ|ȉ|ȋ|ị|į|ḭ|ɨ|ı|[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131])/g},{base:"ij",letters:/(ij|[\u0133])/g},{base:"j",letters:/(j|ⓙ|j|ĵ|ǰ|ɉ|[\u006A\u24D9\uFF4A\u0135\u01F0\u0249])/g},{base:"k",letters:/(k|ⓚ|k|ḱ|ǩ|ḳ|ķ|ḵ|ƙ|ⱪ|ꝁ|ꝃ|ꝅ|ꞣ|[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3])/g},{base:"l",letters:/(l|ⓛ|l|ŀ|ĺ|ľ|ḷ|ḹ|ļ|ḽ|ḻ|ł|ƚ|ɫ|ⱡ|ꝉ|ꞁ|ꝇ|[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u0142\u019A\u026B\u2C61\uA749\uA781\uA747])/g},{base:"lj",letters:/(lj|[\u01C9])/g},{base:"m",letters:/(m|ⓜ|m|ḿ|ṁ|ṃ|ɱ|ɯ|[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F])/g},{base:"n",letters:/(n|ⓝ|n|ǹ|ń|ñ|ṅ|ň|ṇ|ņ|ṋ|ṉ|ƞ|ɲ|ʼn|ꞑ|ꞥ|ŋ|[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5\u014B])/g},{base:"nj",letters:/(nj|[\u01CC])/g},{base:"o",letters:/(o|ⓞ|o|ò|ó|ô|ồ|ố|ỗ|ổ|õ|ṍ|ȭ|ṏ|ō|ṑ|ṓ|ŏ|ȯ|ȱ|ö|ȫ|ỏ|ő|ǒ|ȍ|ȏ|ơ|ờ|ớ|ỡ|ở|ợ|ọ|ộ|ǫ|ǭ|ø|ǿ|ɔ|ꝋ|ꝍ|ɵ|[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275])/g},{base:"oe",letters:/(œ|[\u0153])/g},{base:"oi",letters:/(ƣ|[\u01A3])/g},{base:"ou",letters:/(ȣ|[\u0223])/g},{base:"oo",letters:/(ꝏ|[\uA74F])/g},{base:"p",letters:/(p|ⓟ|p|ṕ|ṗ|ƥ|ᵽ|ꝑ|ꝓ|ꝕ|[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755])/g},{base:"q",letters:/(q|ⓠ|q|ɋ|ꝗ|ꝙ|[\u0071\u24E0\uFF51\u024B\uA757\uA759])/g},{base:"r",letters:/(r|ⓡ|r|ŕ|ṙ|ř|ȑ|ȓ|ṛ|ṝ|ŗ|ṟ|ɍ|ɽ|ꝛ|ꞧ|ꞃ|[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783])/g},{base:"s",letters:/(s|ⓢ|s|ś|ṥ|ŝ|ṡ|š|ṧ|ṣ|ṩ|ș|ş|ȿ|ꞩ|ꞅ|ẛ|ſ|[\u0073\u24E2\uFF53\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B\u017F])/g},{base:"ss",letters:/(ß|[\u00DF])/g},{base:"t",letters:/(t|ⓣ|t|ṫ|ẗ|ť|ṭ|ț|ţ|ṱ|ṯ|ŧ|ƭ|ʈ|ⱦ|ꞇ|[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787])/g},{base:"th",letters:/(þ|[\u00FE])/g},{base:"tz",letters:/(ꜩ|[\uA729])/g},{base:"u",letters:/(u|ⓤ|u|ù|ú|û|ũ|ṹ|ū|ṻ|ŭ|ü|ǜ|ǘ|ǖ|ǚ|ủ|ů|ű|ǔ|ȕ|ȗ|ư|ừ|ứ|ữ|ử|ự|ụ|ṳ|ų|ṷ|ṵ|ʉ|[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289])/g},{base:"v",letters:/(v|ⓥ|v|ṽ|ṿ|ʋ|ꝟ|ʌ|[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C])/g},{base:"vy",letters:/(ꝡ|[\uA761])/g},{base:"w",letters:/(w|ⓦ|w|ẁ|ẃ|ŵ|ẇ|ẅ|ẘ|ẉ|ⱳ|[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73])/g},{base:"x",letters:/(x|ⓧ|x|ẋ|ẍ|[\u0078\u24E7\uFF58\u1E8B\u1E8D])/g},{base:"y",letters:/(y|ⓨ|y|ỳ|ý|ŷ|ỹ|ȳ|ẏ|ÿ|ỷ|ẙ|ỵ|ƴ|ɏ|ỿ|[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF])/g},{base:"z",letters:/(z|ⓩ|z|ź|ẑ|ż|ž|ẓ|ẕ|ƶ|ȥ|ɀ|ⱬ|ꝣ|[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763])/g}],Y=function(e){return function(e){var t=e;return $.forEach((function(e){t=t.replace(e.letters,e.base)})),t}(e).toLowerCase()},K=function(e,t,n){return n?Y(e).indexOf(Y(t)):e.toLowerCase().indexOf(t.toLowerCase())},X=function(e){return"number"==typeof e},Q=["style","className","classNames"];function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(r,Q),c=t?t(l):void 0,u=w(e,{style:i,className:o,classNames:a},c);return f.createElement(n,s({},l,{style:u}))},i=n.displayName||n.name||"Component";return r.displayName="defaultStyle(".concat(i,")"),f.forwardRef((function(e,t){return r(Z(Z({},e),{},{ref:t}))}))}}function te(e){var t=e.selectionStart,n=e.selectionEnd,r=e.value,i=void 0===r?"":r,o=e.onCaretPositionChange,a=e.containerRef,l=e.children,c=(e.singleLine,e.style),u=E((0,f.useState)({left:void 0,top:void 0}),2),d=u[0],h=u[1],p=E((0,f.useState)(),2),m=p[0],g=p[1];(0,f.useEffect)((function(){y()}));var v,y=function(){if(m){var e=m.offsetLeft,t=m.offsetTop;if(d.left!==e||d.top!==t){var n={left:e,top:t};h(n),o(n)}}},b=W(l);n===t&&(v=j(i,b,t,"START"));var S=[],w={},_=S,k=0,C=function(e,t){return f.createElement("span",s({},c("substring"),{key:t}),e)};return F(i,b,(function(e,t,n,r,i,o,a){var s=function(e,t){return e.hasOwnProperty(t)?e[t]++:e[t]=0,t+"_"+e[t]}(w,r);_.push(function(e,t,n,r){var i={id:e,display:t,key:r},o=f.Children.toArray(l)[n];return f.cloneElement(o,i)}(r,i,o,s))}),(function(e,t,n){if(X(v)&&v>=t&&v<=t+e.length){var r=v-t;_.push(C(e.substring(0,r),k)),_=[C(e.substring(r),k)]}else _.push(C(e,k));k++})),_.push(" "),_!==S&&S.push(function(e){return f.createElement("span",s({},c("caret"),{ref:g,key:"caret"}),e)}(_)),f.createElement("div",s({},c,{ref:a}),S)}te.propTypes={selectionStart:A().number,selectionEnd:A().number,value:A().string.isRequired,onCaretPositionChange:A().func.isRequired,containerRef:A().oneOfType([A().func,A().shape({current:"undefined"==typeof Element?A().any:A().instanceOf(Element)})]),children:A().oneOfType([A().element,A().arrayOf(A().element)]).isRequired};var ne=ee({position:"relative",boxSizing:"border-box",width:"100%",color:"transparent",overflow:"hidden",whiteSpace:"pre-wrap",wordWrap:"break-word",border:"1px solid transparent",textAlign:"start","&singleLine":{whiteSpace:"pre",wordWrap:null},substring:{visibility:"hidden"}},(function(e){return{"&singleLine":e.singleLine}}))(te);function re(e){var t,n,r=e.id,i=e.focused,o=e.ignoreAccents,a=e.index,l=e.onClick,c=e.onMouseEnter,u=e.query,d=e.renderSuggestion,h=e.suggestion,p=e.style,m=(e.className,e.classNames,{onClick:l,onMouseEnter:c});return f.createElement("li",s({id:r,role:"option","aria-selected":i},m,p),(t=function(){if("string"==typeof h)return h;var e=h.id,t=h.display;return void 0!==e&&t?t:e}(),n=function(e){var t=K(e,u,o);return-1===t?f.createElement("span",p("display"),e):f.createElement("span",p("display"),e.substring(0,t),f.createElement("b",p("highlight"),e.substring(t,t+u.length)),e.substring(t+u.length))}(t),d?d(h,u,n,a,i):n))}re.propTypes={id:A().string.isRequired,query:A().string.isRequired,index:A().number.isRequired,ignoreAccents:A().bool,suggestion:A().oneOfType([A().string,A().shape({id:A().oneOfType([A().string,A().number]).isRequired,display:A().string})]).isRequired,renderSuggestion:A().func,focused:A().bool};var ie=ee({cursor:"pointer"},(function(e){return{"&focused":e.focused}}))(re);function oe(e){var t=e.style,n=e.className,r=e.classNames,i=w(ae,{style:t,className:n,classNames:r}),o=i("spinner");return f.createElement("div",i,f.createElement("div",o,f.createElement("div",o(["element","element1"])),f.createElement("div",o(["element","element2"])),f.createElement("div",o(["element","element3"])),f.createElement("div",o(["element","element4"])),f.createElement("div",o(["element","element5"]))))}var ae={};function se(e){var t=e.id,n=e.suggestions,r=void 0===n?{}:n,i=e.a11ySuggestionsListLabel,o=e.focusIndex,l=e.position,c=e.left,u=e.right,d=e.top,h=e.scrollFocusedIntoView,p=e.isLoading,m=e.isOpened,g=e.onSelect,v=void 0===g?function(){return null}:g,y=e.ignoreAccents,b=e.containerRef,S=e.children,w=e.style,_=e.customSuggestionsContainer,k=e.onMouseDown,C=e.onMouseEnter,x=E((0,f.useState)(void 0),2),A=x[0],M=x[1];(0,f.useEffect)((function(){if(A&&!(A.offsetHeight>=A.scrollHeight)&&h){var e=A.scrollTop,t=A.children[o].getBoundingClientRect(),n=t.top,r=t.bottom,i=A.getBoundingClientRect().top;r=r-i+e,(n=n-i+e)A.offsetHeight&&(A.scrollTop=r-A.offsetHeight)}}),[o,h,A]);var T,R=function(e,t){C&&C(e)},O=function(e,t){v(e,t)},I=function(e){return"string"==typeof e?e:e.id};return m?f.createElement("div",s({},function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i1?n-1:0),i=1;id&&(c=l=d+(e.nativeEvent.data?e.nativeEvent.data.length:0),u=!0),t.setState({selectionStart:l,selectionEnd:c,setSelectionAfterMentionChange:u});var h=z(s,r);e.nativeEvent.isComposing&&l===c&&t.updateMentionsQueries(t.inputElement.value,l);var p={target:{value:s}};t.executeOnChange(p,s,i,h)}})),p((0,c.A)(t),"handleSelect",(function(e){if(t.setState({selectionStart:e.target.selectionStart,selectionEnd:e.target.selectionEnd}),!he){var n=t.inputElement;e.target.selectionStart===e.target.selectionEnd?t.updateMentionsQueries(n.value,e.target.selectionStart):t.clearSuggestions(),t.updateHighlighterScroll(),t.props.onSelect(e)}})),p((0,c.A)(t),"handleKeyDown",(function(e){if(0!==q(t.state.suggestions)&&t.suggestionsElement)switch(Object.values(de).indexOf(e.keyCode)>=0&&(e.preventDefault(),e.stopPropagation()),e.keyCode){case de.ESC:return void t.clearSuggestions();case de.DOWN:return void t.shiftFocus(1);case de.UP:return void t.shiftFocus(-1);case de.RETURN:case de.TAB:return void t.selectFocused();default:return}else t.props.onKeyDown(e)})),p((0,c.A)(t),"shiftFocus",(function(e){var n=q(t.state.suggestions);t.setState({focusIndex:(n+t.state.focusIndex+e)%n,scrollFocusedIntoView:!0})})),p((0,c.A)(t),"selectFocused",(function(){var e=t.state,n=e.suggestions,r=e.focusIndex,i=Object.values(n).reduce((function(e,t){var n=t.results,r=t.queryInfo;return[].concat(a(e),a(n.map((function(e){return{result:e,queryInfo:r}}))))}),[])[r],o=i.result,s=i.queryInfo;t.addMention(o,s),t.setState({focusIndex:0})})),p((0,c.A)(t),"handleBlur",(function(e){var n=t._suggestionsMouseDown;t._suggestionsMouseDown=!1,n||t.setState({selectionStart:null,selectionEnd:null}),window.setTimeout((function(){t.updateHighlighterScroll()}),1),t.props.onBlur(e,n)})),p((0,c.A)(t),"handleSuggestionsMouseDown",(function(e){t._suggestionsMouseDown=!0})),p((0,c.A)(t),"handleSuggestionsMouseEnter",(function(e){t.setState({focusIndex:e,scrollFocusedIntoView:!1})})),p((0,c.A)(t),"updateSuggestionsPosition",(function(){var e=t.state.caretPosition,n=t.props,r=n.suggestionsPortalHost,i=n.allowSuggestionsAboveCursor,o=n.forceSuggestionsAboveCursor;if(e&&t.suggestionsElement){var a=t.suggestionsElement,s=t.highlighterElement,l=s.getBoundingClientRect(),c=me(s,"font-size"),u={left:l.left+e.left,top:l.top+e.top+c},d=Math.max(document.documentElement.clientHeight,window.innerHeight||0);if(a){var h={};if(r){h.position="fixed";var p=u.left,f=u.top;p-=me(a,"margin-left"),f-=me(a,"margin-top"),p-=s.scrollLeft,f-=s.scrollTop;var m=Math.max(document.documentElement.clientWidth,window.innerWidth||0);p+a.offsetWidth>m?h.left=Math.max(0,m-a.offsetWidth):h.left=p,i&&f+a.offsetHeight>d&&a.offsetHeightt.containerElement.offsetWidth?h.right=0:h.left=g,i&&u.top-s.scrollTop+a.offsetHeight>d&&a.offsetHeight1&&void 0!==arguments[1]?arguments[1]:{}).allowSpaceInQuery,n=T(e);return new RegExp("(?:^|\\s)(".concat(n,"([^").concat(t?"":"\\s").concat(n,"]*))$"))}(n.props.trigger,t.props),o=l.match(i);if(o){var a=s+l.indexOf(o[1],o.index);t.queryData(o[2],r,a,a+o[1].length,e)}}}))}})),p((0,c.A)(t),"clearSuggestions",(function(){t._queryId++,t.suggestions={},t.setState({suggestions:{},focusIndex:0})})),p((0,c.A)(t),"queryData",(function(e,n,r,i,o){var a=t.props,s=a.children,l=a.ignoreAccents,c=function(e,t){return e instanceof Array?function(n,r){for(var i=[],o=0,a=e.length;o=0&&i.push(e[o])}return i}:e}(f.Children.toArray(s)[n].props.data,l),u=c(e,t.updateSuggestions.bind(null,t._queryId,n,e,r,i,o));u instanceof Array&&t.updateSuggestions(t._queryId,n,e,r,i,o,u)})),p((0,c.A)(t),"updateSuggestions",(function(e,n,r,i,o,a,s){if(e===t._queryId){t.suggestions=ue(ue({},t.suggestions),{},p({},n,{queryInfo:{childIndex:n,query:r,querySequenceStart:i,querySequenceEnd:o,plainTextValue:a},results:s}));var l=t.state.focusIndex,c=q(t.suggestions);t.setState({suggestions:t.suggestions,focusIndex:l>=c?Math.max(c-1,0):l})}})),p((0,c.A)(t),"addMention",(function(e,n){var r=e.id,i=e.display,o=n.childIndex,a=n.querySequenceStart,s=n.querySequenceEnd,l=n.plainTextValue,c=t.props.value||"",u=W(t.props.children),d=f.Children.toArray(t.props.children)[o].props,h=d.markup,p=d.displayTransform,m=d.appendSpaceOnAdd,g=d.onAdd,v=j(c,u,a,"START"),y=v+s-a,b=function(e,t,n){return e.replace(R,t).replace(O,n)}(h,r,i);m&&(b+=" ");var E=B(c,v,y,b);t.inputElement.focus();var S=p(r,i);m&&(S+=" ");var w=a+S.length;t.setState({selectionStart:w,selectionEnd:w,setSelectionAfterMentionChange:!0});var _={target:{value:E}},k=z(E,u),C=B(l,a,s,S);t.executeOnChange(_,E,C,k),g&&g(r,i,v,y),t.clearSuggestions()})),p((0,c.A)(t),"isLoading",(function(){var e=!1;return f.Children.forEach(t.props.children,(function(t){e=e||t&&t.props.isLoading})),e})),p((0,c.A)(t),"isOpened",(function(){return X(t.state.selectionStart)&&(0!==q(t.state.suggestions)||t.isLoading())})),p((0,c.A)(t),"_queryId",0),t.suggestions={},t.uuidSuggestionsOverlay=Math.random().toString(16).substring(2),t.handleCopy=t.handleCopy.bind((0,c.A)(t)),t.handleCut=t.handleCut.bind((0,c.A)(t)),t.handlePaste=t.handlePaste.bind((0,c.A)(t)),t.state={focusIndex:0,selectionStart:null,selectionEnd:null,suggestions:{},caretPosition:null,suggestionsPosition:{},setSelectionAfterHandlePaste:!1},t}return t=m,(n=[{key:"componentDidMount",value:function(){document.addEventListener("copy",this.handleCopy),document.addEventListener("cut",this.handleCut),document.addEventListener("paste",this.handlePaste),this.updateSuggestionsPosition()}},{key:"componentDidUpdate",value:function(e,t){t.suggestionsPosition===this.state.suggestionsPosition&&this.updateSuggestionsPosition(),this.state.setSelectionAfterMentionChange&&(this.setState({setSelectionAfterMentionChange:!1}),this.setSelection(this.state.selectionStart,this.state.selectionEnd)),this.state.setSelectionAfterHandlePaste&&(this.setState({setSelectionAfterHandlePaste:!1}),this.setSelection(this.state.selectionStart,this.state.selectionEnd))}},{key:"componentWillUnmount",value:function(){document.removeEventListener("copy",this.handleCopy),document.removeEventListener("cut",this.handleCut),document.removeEventListener("paste",this.handlePaste)}},{key:"render",value:function(){return f.createElement("div",s({ref:this.setContainerElement},this.props.style),this.renderControl(),this.renderSuggestionsOverlay())}},{key:"handlePaste",value:function(e){if(e.target===this.inputElement&&this.supportsClipboardActions(e)){e.preventDefault();var t=this.state,n=t.selectionStart,r=t.selectionEnd,i=this.props,o=i.value,a=i.children,s=W(a),l=j(o,s,n,"START"),c=j(o,s,r,"END"),u=e.clipboardData.getData("text/react-mentions"),d=e.clipboardData.getData("text/plain"),h=B(o,l,c,u||d).replace(/\r/g,""),p=N(h,s),f={target:ue(ue({},e.target),{},{value:h})};this.executeOnChange(f,h,p,z(h,s));var m=(U(o,s,n)||n)+N(u||d,s).length;this.setState({selectionStart:m,selectionEnd:m,setSelectionAfterHandlePaste:!0})}}},{key:"saveSelectionToClipboard",value:function(e){var t=this.inputElement.selectionStart,n=this.inputElement.selectionEnd,r=this.props,i=r.children,o=r.value,a=W(i),s=j(o,a,t,"START"),l=j(o,a,n,"END");e.clipboardData.setData("text/plain",e.target.value.slice(t,n)),e.clipboardData.setData("text/react-mentions",o.slice(s,l))}},{key:"supportsClipboardActions",value:function(e){return!!e.clipboardData}},{key:"handleCopy",value:function(e){e.target===this.inputElement&&this.supportsClipboardActions(e)&&(e.preventDefault(),this.saveSelectionToClipboard(e))}},{key:"handleCut",value:function(e){if(e.target===this.inputElement&&this.supportsClipboardActions(e)){e.preventDefault(),this.saveSelectionToClipboard(e);var t=this.state,n=t.selectionStart,r=t.selectionEnd,i=this.props,o=i.children,a=i.value,s=W(o),l=j(a,s,n,"START"),c=j(a,s,r,"END"),u=[a.slice(0,l),a.slice(c)].join(""),d=N(u,s),h={target:ue(ue({},e.target),{},{value:d})};this.executeOnChange(h,u,d,z(a,s))}}}])&&l(t.prototype,n),m}(f.Component);p(fe,"propTypes",pe),p(fe,"defaultProps",{ignoreAccents:!1,singleLine:!1,allowSuggestionsAboveCursor:!1,onKeyDown:function(){return null},onSelect:function(){return null},onBlur:function(){return null}});var me=function(e,t){var n=parseFloat(window.getComputedStyle(e,null).getPropertyValue(t));return isFinite(n)?n:0},ge=ee({position:"relative",overflowY:"visible",input:{display:"block",width:"100%",position:"absolute",margin:0,top:0,left:0,boxSizing:"border-box",backgroundColor:"transparent",fontFamily:"inherit",fontSize:"inherit",letterSpacing:"inherit"},"&multiLine":{input:ue({height:"100%",bottom:0,overflow:"hidden",resize:"none"},"undefined"!=typeof navigator&&/iPhone|iPad|iPod/i.test(navigator.userAgent)?{marginTop:1,marginLeft:-3}:null)}},(function(e){var t=e.singleLine;return{"&singleLine":t,"&multiLine":!t}}))(fe),ve={fontWeight:"inherit"},ye=function(e){var t=e.display,n=e.style,r=e.className,i=e.classNames,o=w(ve,{style:n,className:r,classNames:i});return f.createElement("strong",o,t)};ye.propTypes={onAdd:A().func,onRemove:A().func,renderSuggestion:A().func,trigger:A().oneOfType([A().string,A().instanceOf(RegExp)]),markup:A().string,displayTransform:A().func,allowSpaceInQuery:A().bool,isLoading:A().bool},ye.defaultProps={trigger:"@",markup:"@[__display__](__id__)",displayTransform:function(e,t){return t||e},onAdd:function(){return null},onRemove:function(){return null},renderSuggestion:null,isLoading:!1,appendSpaceOnAdd:!1}},6653:function(e,t,n){"use strict";var r=n(7118),i=n(6308),o=n(9471),a=n(8474),s=n(8183),l=n(8558),c=n(3114),u=n(9281),d=n(7911),h=n(4581),p=n(1661),f=n(6830),m=n(8915),g=n(4301),v=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(o),y=function(){return v.createElement(r.Icon,{size:16},v.createElement("path",{d:"M12,0.5c1.381,0,2.5,1.119,2.5,2.5S13.381,5.5,12,5.5S9.5,4.381,9.5,3S10.619,0.5,12,0.5z\n M12,9.5\n c1.381,0,2.5,1.119,2.5,2.5s-1.119,2.5-2.5,2.5S9.5,13.381,9.5,12S10.619,9.5,12,9.5z\n M12,18.5c1.381,0,2.5,1.119,2.5,2.5\n s-1.119,2.5-2.5,2.5S9.5,22.381,9.5,21S10.619,18.5,12,18.5z"}))},b={left:0,top:8},E=function(e){var t=e.toolbarSlot,n=v.useContext(r.LocalizationContext).l10n,o=v.useContext(r.ThemeContext).direction===r.TextDirection.RightToLeft?r.Position.BottomLeft:r.Position.BottomRight,a=t.DownloadMenuItem,s=t.EnterFullScreenMenuItem,l=t.GoToFirstPageMenuItem,c=t.GoToLastPageMenuItem,u=t.GoToNextPageMenuItem,d=t.GoToPreviousPageMenuItem,h=t.OpenMenuItem,p=t.PrintMenuItem,f=t.RotateBackwardMenuItem,m=t.RotateForwardMenuItem,g=t.ShowPropertiesMenuItem,E=t.SwitchScrollModeMenuItem,S=t.SwitchSelectionModeMenuItem,w=t.SwitchViewModeMenuItem,_=t.SwitchThemeMenuItem;return v.createElement(r.Popover,{ariaControlsSuffix:"toolbar-more-actions",ariaHasPopup:"menu",position:o,target:function(e,t){var i=n&&n.toolbar?n.toolbar.moreActions:"More actions";return v.createElement(r.Tooltip,{ariaControlsSuffix:"toolbar-more-actions",position:o,target:v.createElement(r.MinimalButton,{ariaLabel:i,isSelected:t,testId:"toolbar__more-actions-popover-target",onClick:e},v.createElement(y,null)),content:function(){return i},offset:b})},content:function(e){return v.createElement(r.Menu,null,v.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},v.createElement(_,{onClick:e})),v.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},v.createElement(s,{onClick:e})),v.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},v.createElement(h,null)),v.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},v.createElement(p,{onClick:e})),v.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},v.createElement(a,{onClick:e})),v.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},v.createElement(r.MenuDivider,null)),v.createElement(l,{onClick:e}),v.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},v.createElement(d,{onClick:e})),v.createElement("div",{className:"rpv-core__display--block rpv-core__display--hidden-medium"},v.createElement(u,{onClick:e})),v.createElement(c,{onClick:e}),v.createElement(r.MenuDivider,null),v.createElement(m,{onClick:e}),v.createElement(f,{onClick:e}),v.createElement(r.MenuDivider,null),v.createElement(S,{mode:i.SelectionMode.Text,onClick:e}),v.createElement(S,{mode:i.SelectionMode.Hand,onClick:e}),v.createElement(r.MenuDivider,null),v.createElement(E,{mode:r.ScrollMode.Page,onClick:e}),v.createElement(E,{mode:r.ScrollMode.Vertical,onClick:e}),v.createElement(E,{mode:r.ScrollMode.Horizontal,onClick:e}),v.createElement(E,{mode:r.ScrollMode.Wrapped,onClick:e}),v.createElement(r.MenuDivider,null),v.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},v.createElement(w,{mode:r.ViewMode.SinglePage,onClick:e})),v.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},v.createElement(w,{mode:r.ViewMode.DualPage,onClick:e})),v.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},v.createElement(w,{mode:r.ViewMode.DualPageWithCover,onClick:e})),v.createElement("div",{className:"rpv-core__display--hidden rpv-core__display--block-small"},v.createElement(r.MenuDivider,null)),v.createElement(g,{onClick:e}))},offset:b,closeOnClickOutside:!0,closeOnEscape:!0})},S=function(){return S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),v(n)?r.showHidden=n:n&&t._extend(r,n),S(r.showHidden)&&(r.showHidden=!1),S(r.depth)&&(r.depth=2),S(r.colors)&&(r.colors=!1),S(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=d),p(r,e,r.depth)}function d(e,t){var n=u.styles[t];return n?"["+u.colors[n][0]+"m"+e+"["+u.colors[n][1]+"m":e}function h(e,t){return e}function p(e,n,r){if(e.customInspect&&n&&P(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return E(i)||(i=p(e,i,r)),i}var o=function(e,t){if(S(t))return e.stylize("undefined","undefined");if(E(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return b(t)?e.stylize(""+t,"number"):v(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),C(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(P(n)){var l=n.name?": "+n.name:"";return e.stylize("[Function"+l+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(k(n))return e.stylize(Date.prototype.toString.call(n),"date");if(C(n))return f(n)}var c,u="",d=!1,h=["{","}"];return g(n)&&(d=!0,h=["[","]"]),P(n)&&(u=" [Function"+(n.name?": "+n.name:"")+"]"),w(n)&&(u=" "+RegExp.prototype.toString.call(n)),k(n)&&(u=" "+Date.prototype.toUTCString.call(n)),C(n)&&(u=" "+f(n)),0!==a.length||d&&0!=n.length?r<0?w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),c=d?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,u,h)):h[0]+u+h[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function m(e,t,n,r,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),T(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=y(n)?p(e,l.value,null):p(e,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),S(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function g(e){return Array.isArray(e)}function v(e){return"boolean"==typeof e}function y(e){return null===e}function b(e){return"number"==typeof e}function E(e){return"string"==typeof e}function S(e){return void 0===e}function w(e){return _(e)&&"[object RegExp]"===x(e)}function _(e){return"object"==typeof e&&null!==e}function k(e){return _(e)&&"[object Date]"===x(e)}function C(e){return _(e)&&("[object Error]"===x(e)||e instanceof Error)}function P(e){return"function"==typeof e}function x(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(l.test(e)){var n=r.pid;s[e]=function(){var r=t.format.apply(t,arguments);i.error("%s %d: %s",e,n,r)}}else s[e]=function(){};return s[e]},t.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=n(7213),t.isArray=g,t.isBoolean=v,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=b,t.isString=E,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=S,t.isRegExp=w,t.types.isRegExp=w,t.isObject=_,t.isDate=k,t.types.isDate=k,t.isError=C,t.types.isNativeError=C,t.isFunction=P,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(6098);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,n;i.log("%s - %s",(n=[A((e=new Date).getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),M[e.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n(8365),t._extend=function(e,t){if(!t||!_(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var R="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(R&&e[R]){var t;if("function"!=typeof(t=e[R]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,R,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o=0&&"[object Function]"===t.call(e.callee)),r}},6841:function(e,t,n){"use strict";n.r(t);var r=n(9471),i=n(9032),o=n.n(i),a=n(1838),s=n(3997),l=n(8974);const c={};class u extends(o()){constructor(){super(),this.mediacms_config=(0,s.$)(window.MediaCMS),c[Object.defineProperty(this,"id",{value:"PlaylistPageStoreData_"+Object.keys(c).length}).id]={playlistId:null,data:{}},this.data={savedPlaylist:!1,publishDate:new Date(2018,3,14,1,13,22,0),publishDateLabel:null},this.onPlaylistUpdateCompleted=this.onPlaylistUpdateCompleted.bind(this),this.onPlaylistUpdateFailed=this.onPlaylistUpdateFailed.bind(this),this.onPlaylistRemovalCompleted=this.onPlaylistRemovalCompleted.bind(this),this.onPlaylistRemovalFailed=this.onPlaylistRemovalFailed.bind(this)}loadData(){if(!c[this.id].playlistId)return l.warn("Invalid playlist id:",c[this.id].playlistId),!1;this.playlistAPIUrl=this.mediacms_config.api.playlists+"/"+c[this.id].playlistId,this.dataResponse=this.dataResponse.bind(this),this.dataErrorResponse=this.dataErrorResponse.bind(this),(0,a.getRequest)(this.playlistAPIUrl,!1,this.dataResponse,this.dataErrorResponse)}dataResponse(e){e&&e.data&&(c[this.id].data=e.data,this.emit("loaded_playlist_data"))}dataErrorResponse(e){this.emit("loaded_playlist_error"),e.type}get(e){switch(e){case"playlistId":return c[this.id].playlistId||null;case"logged-in-user-playlist":return!this.mediacms_config.member.is.anonymous&&c[this.id].data.user===this.mediacms_config.member.username;case"playlist-media":return c[this.id].data.playlist_media||[];case"visibility":return"public";case"visibility-icon":switch(this.get("visibility")){case"unlisted":return r.createElement("i",{className:"material-icons"},"insert_link");case"private":return r.createElement("i",{className:"material-icons"},"lock")}return null;case"total-items":return c[this.id].data.playlist_media.length||0;case"views-count":return"N/A";case"title":return c[this.id].data.title||null;case"edit-link":return"#";case"thumb":return c[this.id].data.playlist_media&&c[this.id].data.playlist_media.length?c[this.id].data.playlist_media[0].thumbnail_url:null;case"description":return c[this.id].data.description||null;case"author-username":case"author-name":return c[this.id].data.user||null;case"author-link":return c[this.id].data.user?this.mediacms_config.site.url+"/user/"+c[this.id].data.user:null;case"author-thumb":return c[this.id].data.user_thumbnail_url?this.mediacms_config.site.url+"/"+c[this.id].data.user_thumbnail_url.replace(/^\//g,""):null;case"saved-playlist":return this.data.savedPlaylist;case"date-label":return c[this.id].data&&c[this.id].data.add_date?(this.data.publishDateLabel=this.data.publishDateLabel||"Created on "+(0,a.publishedOnDate)(new Date(c[this.id].data.add_date),3),this.data.publishDateLabel):null}return null}onPlaylistUpdateCompleted(e){e&&e.data&&(c[this.id].data.title=e.data.title,c[this.id].data.description=e.data.description,this.emit("playlist_update_completed",e.data))}onPlaylistUpdateFailed(){this.emit("playlist_update_failed")}onPlaylistRemovalCompleted(e){e&&void 0!==e.status&&403!==e.status?this.emit("playlist_removal_completed",e):this.onPlaylistRemovalFailed()}onPlaylistRemovalFailed(){this.emit("playlist_removal_failed")}actions_handler(e){switch(e.type){case"LOAD_PLAYLIST_DATA":c[this.id].playlistId=window.MediaCMS.playlistId||((t=window.location.href.split("/")).length?t[t.length-1]:null),this.loadData();break;case"TOGGLE_SAVE":this.data.savedPlaylist=!this.data.savedPlaylist,this.emit("saved-updated");break;case"UPDATE_PLAYLIST":(0,a.postRequest)(this.playlistAPIUrl,{title:e.playlist_data.title,description:e.playlist_data.description},{headers:{"X-CSRFToken":(0,a.csrfToken)()}},!1,this.onPlaylistUpdateCompleted,this.onPlaylistUpdateFailed);break;case"REMOVE_PLAYLIST":(0,a.deleteRequest)(this.playlistAPIUrl,{headers:{"X-CSRFToken":(0,a.csrfToken)()}},!1,this.onPlaylistRemovalCompleted,this.onPlaylistRemovalFailed);break;case"PLAYLIST_MEDIA_REORDERED":c[this.id].data.playlist_media=e.playlist_media,this.emit("reordered_media_in_playlist");break;case"MEDIA_REMOVED_FROM_PLAYLIST":const n=[];let r=0;for(;r=0&&(s("".concat(r+1)),h(r));break;case"ArrowDown":(n=u+1)d?s("".concat(u+1)):h(t-1)}var t,n,r}}))},d=function(e){var t=e.children,n=e.doc,o=r.useIsMounted(),a=i.useState({loading:!0,labels:[]}),s=a[0],l=a[1];return i.useEffect((function(){n.getPageLabels().then((function(e){o.current&&l({loading:!1,labels:e||[]})}))}),[n.loadingTask.docId]),s.loading?i.createElement(i.Fragment,null):t(s.labels)},h=function(e){var t=e.children,n=e.store,r=function(e){var t=i.useState(e.get("doc")),n=t[0],r=t[1],o=function(e){r(e)};return i.useEffect((function(){return e.subscribe("doc",o),function(){e.unsubscribe("doc",o)}}),[]),n}(n),o=l(n).currentPage,a=c(n).numberOfPages,s=t||function(e){return i.createElement(i.Fragment,null,e.currentPage+1)};return r?i.createElement(d,{doc:r},(function(e){var t=e.length===a&&a>0?e[o]:"";return s({currentPage:o,numberOfPages:a,pageLabel:t})})):i.createElement(i.Fragment,null)},p=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M21.783,21.034H2.332c-0.552,0-1-0.448-1-1c0-0.182,0.05-0.361,0.144-0.517L11.2,3.448\n c0.286-0.472,0.901-0.624,1.373-0.338c0.138,0.084,0.254,0.2,0.338,0.338l9.726,16.069c0.286,0.473,0.134,1.087-0.339,1.373\n C22.143,20.984,21.965,21.034,21.783,21.034z"}))},f={left:0,top:8},m=function(e){var t=e.isDisabled,n=e.onClick,o=i.useContext(r.LocalizationContext).l10n,a=o&&o.pageNavigation?o.pageNavigation.goToFirstPage:"First page";return i.createElement(r.Tooltip,{ariaControlsSuffix:"page-navigation-first",position:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaLabel:a,isDisabled:t,testId:"page-navigation__first-button",onClick:n},i.createElement(p,null)),content:function(){return a},offset:f})},g=function(e){var t=e.children,n=e.store;return(t||function(e){return i.createElement(m,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:0===l(n).currentPage,onClick:function(){var e=n.get("jumpToPage");e&&e(0)}})},v=function(e){var t=e.isDisabled,n=e.onClick,o=i.useContext(r.LocalizationContext).l10n,a=o&&o.pageNavigation?o.pageNavigation.goToFirstPage:"First page";return i.createElement(r.MenuItem,{icon:i.createElement(p,null),isDisabled:t,testId:"page-navigation__first-menu",onClick:n},a)},y={left:0,top:8},b=function(e){var t=e.isDisabled,n=e.onClick,a=i.useContext(r.LocalizationContext).l10n,s=a&&a.pageNavigation?a.pageNavigation.goToLastPage:"Last page";return i.createElement(r.Tooltip,{ariaControlsSuffix:"page-navigation-last",position:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaLabel:s,isDisabled:t,testId:"page-navigation__last-button",onClick:n},i.createElement(o,null)),content:function(){return s},offset:y})},E=function(e){var t=e.children,n=e.store,r=l(n).currentPage,o=c(n).numberOfPages;return(t||function(e){return i.createElement(b,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:r+1>=o,onClick:function(){var e=n.get("jumpToPage");e&&e(o-1)}})},S=function(e){var t=e.isDisabled,n=e.onClick,a=i.useContext(r.LocalizationContext).l10n,s=a&&a.pageNavigation?a.pageNavigation.goToLastPage:"Last page";return i.createElement(r.MenuItem,{icon:i.createElement(o,null),isDisabled:t,testId:"page-navigation__last-menu",onClick:n},s)},w={left:0,top:8},_=function(e){var t=e.isDisabled,n=e.onClick,o=i.useContext(r.LocalizationContext).l10n,s=o&&o.pageNavigation?o.pageNavigation.goToNextPage:"Next page";return i.createElement(r.Tooltip,{ariaControlsSuffix:"page-navigation-next",position:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaLabel:s,isDisabled:t,testId:"page-navigation__next-button",onClick:n},i.createElement(a,null)),content:function(){return s},offset:w})},k=function(e){var t=e.children,n=e.store;return(t||function(e){return i.createElement(_,{onClick:e.onClick,isDisabled:e.isDisabled})})({isDisabled:l(n).currentPage+1>=c(n).numberOfPages,onClick:function(){var e=n.get("jumpToNextPage");e&&e()}})},C=function(e){var t=e.isDisabled,n=e.onClick,o=i.useContext(r.LocalizationContext).l10n,s=o&&o.pageNavigation?o.pageNavigation.goToNextPage:"Next page";return i.createElement(r.MenuItem,{icon:i.createElement(a,null),isDisabled:t,testId:"page-navigation__next-menu",onClick:n},s)},P=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M23.535,18.373L12.409,5.8c-0.183-0.207-0.499-0.226-0.706-0.043C11.688,5.77,11.674,5.785,11.66,5.8\n L0.535,18.373"}))},x={left:0,top:8},A=function(e){var t=e.isDisabled,n=e.onClick,o=i.useContext(r.LocalizationContext).l10n,a=o&&o.pageNavigation?o.pageNavigation.goToPreviousPage:"Previous page";return i.createElement(r.Tooltip,{ariaControlsSuffix:"page-navigation-previous",position:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaLabel:a,isDisabled:t,testId:"page-navigation__previous-button",onClick:n},i.createElement(P,null)),content:function(){return a},offset:x})},M=function(e){var t=e.store;return(e.children||function(e){return i.createElement(A,{isDisabled:e.isDisabled,onClick:e.onClick})})({isDisabled:l(t).currentPage<=0,onClick:function(){var e=t.get("jumpToPreviousPage");e&&e()}})},T=function(e){var t=e.isDisabled,n=e.onClick,o=i.useContext(r.LocalizationContext).l10n,a=o&&o.pageNavigation?o.pageNavigation.goToPreviousPage:"Previous page";return i.createElement(r.MenuItem,{icon:i.createElement(P,null),isDisabled:t,testId:"page-navigation__previous-menu",onClick:n},a)},R=function(e){var t=e.children,n=e.store,r=c(n).numberOfPages;return t?t({numberOfPages:r}):i.createElement(i.Fragment,null,r)},O=function(e){var t=e.containerRef,n=e.numPages,o=e.store,a=l(o).currentPage,s=i.useRef(a);s.current=a;var c=i.useRef(!1),u=function(){c.current=!0},d=function(){c.current=!1},h=function(e){var i=t.current,a=c.current||document.activeElement&&i.contains(document.activeElement);if(i&&a){var l,u,d=e.altKey&&"ArrowDown"===e.key||!e.shiftKey&&!e.altKey&&"PageDown"===e.key,h=e.altKey&&"ArrowUp"===e.key||!e.shiftKey&&!e.altKey&&"PageUp"===e.key;if(d)return e.preventDefault(),l=o.get("jumpToPage"),u=s.current+1,void(l&&u=0&&e(t)}();if(r.isMac()?e.metaKey&&!e.ctrlKey:e.altKey)switch(e.key){case"ArrowLeft":e.preventDefault(),function(){var e=o.get("jumpToPreviousDestination");e&&e()}();break;case"ArrowRight":e.preventDefault(),function(){var e=o.get("jumpToNextDestination");e&&e()}()}}};return i.useEffect((function(){var e=t.current;if(e)return document.addEventListener("keydown",h),e.addEventListener("mouseenter",u),e.addEventListener("mouseleave",d),function(){document.removeEventListener("keydown",h),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseleave",d)}}),[t.current]),i.createElement(i.Fragment,null)};t.DownArrowIcon=o,t.NextIcon=a,t.PreviousIcon=P,t.UpArrowIcon=p,t.pageNavigationPlugin=function(e){var t=i.useMemo((function(){return Object.assign({},{enableShortcuts:!0},e)}),[]),n=i.useMemo((function(){return r.createStore()}),[]),o=function(e){return i.createElement(g,s({},e,{store:n}))},a=function(e){return i.createElement(E,s({},e,{store:n}))},l=function(e){return i.createElement(k,s({},e,{store:n}))},c=function(e){return i.createElement(M,s({},e,{store:n}))};return{install:function(e){n.update("jumpToDestination",e.jumpToDestination),n.update("jumpToNextDestination",e.jumpToNextDestination),n.update("jumpToNextPage",e.jumpToNextPage),n.update("jumpToPage",e.jumpToPage),n.update("jumpToPreviousDestination",e.jumpToPreviousDestination),n.update("jumpToPreviousPage",e.jumpToPreviousPage)},renderViewer:function(e){var r=e.slot;if(!t.enableShortcuts)return r;var o={children:i.createElement(i.Fragment,null,i.createElement(O,{containerRef:e.containerRef,numPages:e.doc.numPages,store:n}),r.children)};return s(s({},r),o)},onDocumentLoad:function(e){n.update("doc",e.doc),n.update("numberOfPages",e.doc.numPages)},onViewerStateChange:function(e){return n.update("currentPage",e.pageIndex),e},jumpToNextPage:function(){var e=n.get("jumpToNextPage");e&&e()},jumpToPage:function(e){var t=n.get("jumpToPage");t&&t(e)},jumpToPreviousPage:function(){var e=n.get("jumpToPreviousPage");e&&e()},CurrentPageInput:function(){return i.createElement(u,{store:n})},CurrentPageLabel:function(e){return i.createElement(h,s({},e,{store:n}))},GoToFirstPage:o,GoToFirstPageButton:function(){return i.createElement(o,null,(function(e){return i.createElement(m,s({},e))}))},GoToFirstPageMenuItem:function(e){return i.createElement(o,null,(function(t){return i.createElement(v,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},GoToLastPage:a,GoToLastPageButton:function(){return i.createElement(a,null,(function(e){return i.createElement(b,s({},e))}))},GoToLastPageMenuItem:function(e){return i.createElement(a,null,(function(t){return i.createElement(S,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},GoToNextPage:l,GoToNextPageButton:function(){return i.createElement(l,null,(function(e){return i.createElement(_,s({},e))}))},GoToNextPageMenuItem:function(e){return i.createElement(l,null,(function(t){return i.createElement(C,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},GoToPreviousPage:c,GoToPreviousPageButton:function(){return i.createElement(c,null,(function(e){return i.createElement(A,s({},e))}))},GoToPreviousPageMenuItem:function(e){return i.createElement(c,null,(function(t){return i.createElement(T,{isDisabled:t.isDisabled,onClick:function(){t.onClick(),e.onClick()}})}))},NumberOfPages:function(e){return i.createElement(R,s({},e,{store:n}))}}}},6898:function(e,t,n){"use strict";var r=n(9932),i=n(9289),o=n(7679);e.exports=function(){return o(r,i,arguments)}},6930:function(e,t,n){"use strict";var r=n(9718),i=n(1828),o=n(6177)(),a=n(7570),s=n(4114),l=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||l(t)!==t)throw new s("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,c=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(r=!1),u&&!u.writable&&(c=!1)}return(r||c||!n)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},7118:function(e,t,n){"use strict";e.exports=n(8851)},7143:function(e,t,n){const r=n(2063).Dispatcher;e.exports=new r},7154:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(6077),t),i(n(4247),t),i(n(7687),t),i(n(3337),t)},7171:function(e,t,n){"use strict";var r=n(7118),i=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),o=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M12,1.001c6.075,0,11,4.925,11,11s-4.925,11-11,11s-11-4.925-11-11S5.925,1.001,12,1.001z\n M14.5,17.005H13\n c-0.552,0-1-0.448-1-1v-6.5c0-0.276-0.224-0.5-0.5-0.5H10\n M11.745,6.504L11.745,6.504\n M11.745,6.5c-0.138,0-0.25,0.112-0.25,0.25\n S11.607,7,11.745,7s0.25-0.112,0.25-0.25S11.883,6.5,11.745,6.5"}))},a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=t&&i<=n?i:r},d=function(e){var t=e.doc,n=e.fileName,o=e.onToggle,a=i.useContext(r.LocalizationContext).l10n,d=function(e){var t=function(e){var t=c.exec(e);if(!t)return null;var n=parseInt(t[1],10),r=u(t[2],1,12,1)-1,i=u(t[3],1,31,1),o=u(t[4],0,23,0),a=u(t[5],0,59,0),s=u(t[6],0,59,0),l=t[7]||"Z",d=u(t[8],0,23,0),h=u(t[9],0,59,0);switch(l){case"-":o+=d,a+=h;break;case"+":o-=d,a-=h}return new Date(Date.UTC(n,r,i,o,a,s))}(e);return t?"".concat(t.toLocaleDateString(),", ").concat(t.toLocaleTimeString()):""};return i.createElement("div",{className:"rpv-properties__modal"},i.createElement(s,{doc:t,render:function(e){return i.createElement(i.Fragment,null,i.createElement("div",{className:"rpv-properties__modal-section"},i.createElement(l,{label:a&&a.properties?a.properties.fileName:"File name",value:e.fileName||(c=n,u=c.split("/").pop(),u?u.split("#")[0].split("?")[0]:c)}),i.createElement(l,{label:a&&a.properties?a.properties.fileSize:"File size",value:(o=e.length,s=Math.floor(Math.log(o)/Math.log(1024)),"".concat((o/Math.pow(1024,s)).toFixed(2)," ").concat(["B","kB","MB","GB","TB"][s]))})),i.createElement(r.Separator,null),i.createElement("div",{className:"rpv-properties__modal-section"},i.createElement(l,{label:a&&a.properties?a.properties.title:"Title",value:e.info.Title}),i.createElement(l,{label:a&&a.properties?a.properties.author:"Author",value:e.info.Author}),i.createElement(l,{label:a&&a.properties?a.properties.subject:"Subject",value:e.info.Subject}),i.createElement(l,{label:a&&a.properties?a.properties.keywords:"Keywords",value:e.info.Keywords}),i.createElement(l,{label:a&&a.properties?a.properties.creator:"Creator",value:e.info.Creator}),i.createElement(l,{label:a&&a.properties?a.properties.creationDate:"Creation date",value:d(e.info.CreationDate)}),i.createElement(l,{label:a&&a.properties?a.properties.modificationDate:"Modification date",value:d(e.info.ModDate)})),i.createElement(r.Separator,null),i.createElement("div",{className:"rpv-properties__modal-section"},i.createElement(l,{label:a&&a.properties?a.properties.pdfProducer:"PDF producer",value:e.info.Producer}),i.createElement(l,{label:a&&a.properties?a.properties.pdfVersion:"PDF version",value:e.info.PDFFormatVersion}),i.createElement(l,{label:a&&a.properties?a.properties.pageCount:"Page count",value:"".concat(t.numPages)})));var o,s,c,u}}),i.createElement("div",{className:"rpv-properties__modal-footer"},i.createElement(r.Button,{onClick:o},a&&a.properties?a.properties.close:"Close")))},h={left:0,top:8},p=function(e){var t=e.onClick,n=i.useContext(r.LocalizationContext).l10n,a=n&&n.properties?n.properties.showProperties:"Show properties";return i.createElement(r.Tooltip,{ariaControlsSuffix:"properties",position:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaLabel:a,testId:"properties__button",onClick:t},i.createElement(o,null)),content:function(){return a},offset:h})},f=function(e){var t=e.children,n=e.store,o=function(e){var t=i.useState(e.get("doc")),n=t[0],r=t[1],o=function(e){r(e)};return i.useEffect((function(){return e.subscribe("doc",o),function(){e.unsubscribe("doc",o)}}),[]),{currentDoc:n}}(n).currentDoc,s=n.get("fileName")||"",l=t||function(e){return i.createElement(p,a({},e))};return o?i.createElement(r.Modal,{ariaControlsSuffix:"properties",target:function(e){return l({onClick:e})},content:function(e){return i.createElement(d,{doc:o,fileName:s,onToggle:e})},closeOnClickOutside:!0,closeOnEscape:!0}):i.createElement(i.Fragment,null)},m=function(e){var t=e.onClick,n=i.useContext(r.LocalizationContext).l10n,a=n&&n.properties?n.properties.showProperties:"Show properties";return i.createElement(r.MenuItem,{icon:i.createElement(o,null),testId:"properties__menu",onClick:t},a)};t.InfoIcon=o,t.propertiesPlugin=function(){var e=i.useMemo((function(){return r.createStore({fileName:""})}),[]),t=function(t){return i.createElement(f,a({},t,{store:e}))};return{onDocumentLoad:function(t){e.update("doc",t.doc)},onViewerStateChange:function(t){return e.update("fileName",t.file.name),t},ShowProperties:t,ShowPropertiesButton:function(){return i.createElement(f,{store:e})},ShowPropertiesMenuItem:function(e){return i.createElement(t,null,(function(e){return i.createElement(m,a({},e))}))}}}},7190:function(e,t,n){"use strict";e.exports=n(4389)},7201:function(e,t,n){"use strict";n.d(t,{S:function(){return c}});var r=n(9471),i=n(8713),o=n.n(i),a=n(2828);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement(l,s({key:t},e))));return t.length?r.createElement("div",{className:"nav-menu"+(e.removeVerticalPadding?" pv0":"")},r.createElement("nav",null,r.createElement("ul",null,t))):null}l.propTypes={itemType:o().oneOf(["link","open-subpage","button","label","div"]),link:o().string,icon:o().string,iconPos:o().oneOf(["left","right"]),text:o().string,active:o().bool,divAttr:o().object,buttonAttr:o().object,itemAttr:o().object,linkAttr:o().object},l.defaultProps={itemType:"link",iconPos:"left",active:!1},c.propTypes={removeVerticalPadding:o().bool,items:o().arrayOf(o().shape(l.propTypes)).isRequired},c.defaultProps={removeVerticalPadding:!1}},7213:function(e,t,n){"use strict";var r=n(3929),i=n(2379),o=n(4912),a=n(1701);function s(e){return e.call.bind(e)}var l="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,u=s(Object.prototype.toString),d=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),p=s(Boolean.prototype.valueOf);if(l)var f=s(BigInt.prototype.valueOf);if(c)var m=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"[object Map]"===u(e)}function y(e){return"[object Set]"===u(e)}function b(e){return"[object WeakMap]"===u(e)}function E(e){return"[object WeakSet]"===u(e)}function S(e){return"[object ArrayBuffer]"===u(e)}function w(e){return"undefined"!=typeof ArrayBuffer&&(S.working?S(e):e instanceof ArrayBuffer)}function _(e){return"[object DataView]"===u(e)}function k(e){return"undefined"!=typeof DataView&&(_.working?_(e):e instanceof DataView)}t.isArgumentsObject=r,t.isGeneratorFunction=i,t.isTypedArray=a,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):a(e)||k(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},v.working="undefined"!=typeof Map&&v(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(v.working?v(e):e instanceof Map)},y.working="undefined"!=typeof Set&&y(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(y.working?y(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},E.working="undefined"!=typeof WeakSet&&E(new WeakSet),t.isWeakSet=function(e){return E(e)},S.working="undefined"!=typeof ArrayBuffer&&S(new ArrayBuffer),t.isArrayBuffer=w,_.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&_(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=k;var C="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function P(e){return"[object SharedArrayBuffer]"===u(e)}function x(e){return void 0!==C&&(void 0===P.working&&(P.working=P(new C)),P.working?P(e):e instanceof C)}function A(e){return g(e,d)}function M(e){return g(e,h)}function T(e){return g(e,p)}function R(e){return l&&g(e,f)}function O(e){return c&&g(e,m)}t.isSharedArrayBuffer=x,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},t.isGeneratorObject=function(e){return"[object Generator]"===u(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},t.isNumberObject=A,t.isStringObject=M,t.isBooleanObject=T,t.isBigIntObject=R,t.isSymbolObject=O,t.isBoxedPrimitive=function(e){return A(e)||M(e)||T(e)||R(e)||O(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(w(e)||x(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},7230:function(e,t,n){"use strict";var r=n(8974),i=n(9471),o=n(9383),a=n(9817);function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t\t
\t\t\t\t\t\t\t\t',this.cornerLayers={topLeft:e,topRight:this.upNextLoaderView?this.upNextLoaderView.html():null,bottomLeft:this.recommendedMedia?this.recommendedMedia.html():null,bottomRight:this.props.inEmbed?a:null},this.setState({displayPlayer:!0},(function(){setTimeout((function(){const e=document.querySelector(".share-video-btn"),t=document.querySelector(".share-options-wrapper"),a=document.querySelector(".share-options-inner");e&&e.addEventListener("click",(function(e){(0,m.addClassname)(document.querySelector(".video-js.vjs-mediacms"),"vjs-visible-share-options")})),t&&t.addEventListener("click",(function(e){e.target!==a&&e.target!==t||(0,m.removeClassname)(document.querySelector(".video-js.vjs-mediacms"),"vjs-visible-share-options")}))}),1e3)}))}}componentWillUnmount(){this.unsetRecommendedMedia()}initRecommendedMedia(){null!==this.recommendedMedia&&(this.props.inEmbed||this.recommendedMedia.init(),this.playerInstance.player.on("fullscreenchange",this.recommendedMedia.onResize),l.PageStore.on("window_resize",this.recommendedMedia.onResize),l.VideoViewerStore.on("changed_viewer_mode",this.recommendedMedia.onResize))}unsetRecommendedMedia(){null!==this.recommendedMedia&&(this.playerInstance.player.off("fullscreenchange",this.recommendedMedia.onResize),l.PageStore.removeListener("window_resize",this.recommendedMedia.onResize),l.VideoViewerStore.removeListener("changed_viewer_mode",this.recommendedMedia.onResize),this.recommendedMedia.destroy())}onClickNext(){let e;l.MediaPageStore.get("playlist-id")?(e=l.MediaPageStore.get("playlist-next-media-url"),null===e&&(e=this.props.data.related_media[0].url)):this.props.inEmbed||(e=this.props.data.related_media[0].url),window.location.href=e}onClickPrevious(){let e;l.MediaPageStore.get("playlist-id")?(e=l.MediaPageStore.get("playlist-previous-media-url"),null===e&&(e=this.props.data.related_media[0].url)):this.props.inEmbed||(e=this.props.data.related_media[0].url),window.location.href=e}onStateUpdate(e){l.VideoViewerStore.get("in-theater-mode")!==e.theaterMode&&p.VideoViewerActions.set_viewer_mode(e.theaterMode),l.VideoViewerStore.get("player-volume")!==e.volume&&p.VideoViewerActions.set_player_volume(e.volume),l.VideoViewerStore.get("player-sound-muted")!==e.soundMuted&&p.VideoViewerActions.set_player_sound_muted(e.soundMuted),l.VideoViewerStore.get("video-quality")!==e.quality&&p.VideoViewerActions.set_video_quality(e.quality),l.VideoViewerStore.get("video-playback-speed")!==e.playbackSpeed&&p.VideoViewerActions.set_video_playback_speed(e.playbackSpeed)}onPlayerInit(e,t){this.playerElem=t,this.playerInstance=e,this.upNextLoaderView&&(this.upNextLoaderView.setVideoJsPlayerElem(this.playerInstance.player.el_),this.onUpdateMediaAutoPlay()),this.props.inEmbed||this.playerElem.parentNode.focus(),null!==this.recommendedMedia&&(this.recommendedMedia.initWrappers(this.playerElem.parentNode),this.props.inEmbed&&(this.playerInstance.player.one("pause",this.recommendedMedia.init),this.initRecommendedMedia())),this.playerInstance.player.one("ended",this.onVideoEnd)}onVideoRestart(){null!==this.recommendedMedia&&(this.recommendedMedia.updateDisplayType("inline"),this.props.inEmbed&&this.playerInstance.player.one("pause",this.recommendedMedia.init),this.playerInstance.player.one("ended",this.onVideoEnd))}onVideoEnd(){if(null!==this.recommendedMedia&&(this.props.inEmbed||this.initRecommendedMedia(),this.recommendedMedia.updateDisplayType("full"),this.playerInstance.player.one("playing",this.onVideoRestart)),!this.props.inEmbed&&l.MediaPageStore.get("playlist-id")){const e=document.querySelector(".video-player .more-media"),t=document.querySelector(".video-player .vjs-actions-anim");this.upNextLoaderView.cancelTimer();const a=l.MediaPageStore.get("playlist-next-media-url");return a&&(e&&(e.style.display="none"),t&&(t.style.display="none"),window.location.href=a),void this.upNextLoaderView.hideTimerView()}this.upNextLoaderView&&(l.PageStore.get("media-auto-play")?(this.upNextLoaderView.startTimer(),this.playerInstance.player.one("play",function(){this.upNextLoaderView.cancelTimer()}.bind(this))):this.upNextLoaderView.cancelTimer())}onUpdateMediaAutoPlay(){this.upNextLoaderView&&(l.PageStore.get("media-auto-play")?this.upNextLoaderView.showTimerView(this.playerInstance.isEnded()):this.upNextLoaderView.hideTimerView())}render(){let e=null,t=null;!this.props.inEmbed&&l.MediaPageStore.get("playlist-id")?(e=l.MediaPageStore.get("playlist-next-media-url"),t=l.MediaPageStore.get("playlist-previous-media-url")):e=this.props.data.related_media.length&&!this.props.inEmbed?this.props.data.related_media[0].url:null;const a=this.props.data.sprites_url?{url:this.props.siteUrl+"/"+this.props.data.sprites_url.replace(/^\//g,""),frame:{width:160,height:90,seconds:10}}:null;return n.createElement("div",{key:(this.props.inEmbed?"embed-":"")+"player-container",className:"player-container"+(this.videoSources.length?"":" player-container-error"),style:this.props.containerStyles,ref:"playerContainer"},n.createElement("div",{className:"player-container-inner",ref:"playerContainerInner",style:this.props.containerStyles},this.state.displayPlayer&&null!==l.MediaPageStore.get("media-load-error-type")?n.createElement(k.lg,{errorMessage:l.MediaPageStore.get("media-load-error-message")}):null,this.state.displayPlayer&&null==l.MediaPageStore.get("media-load-error-type")?n.createElement("div",{className:"video-player",ref:"videoPlayerWrapper",key:"videoPlayerWrapper"},n.createElement(r.SiteConsumer,null,(i=>n.createElement(k.L9,{playerVolume:this.browserCache.get("player-volume"),playerSoundMuted:this.browserCache.get("player-sound-muted"),videoQuality:this.browserCache.get("video-quality"),videoPlaybackSpeed:parseInt(this.browserCache.get("video-playback-speed"),10),inTheaterMode:this.browserCache.get("in-theater-mode"),siteId:i.id,siteUrl:i.url,info:this.videoInfo,cornerLayers:this.cornerLayers,sources:this.videoSources,poster:this.videoPoster,previewSprite:a,subtitlesInfo:this.props.data.subtitles_info,enableAutoplay:!this.props.inEmbed,inEmbed:this.props.inEmbed,hasTheaterMode:!this.props.inEmbed,hasNextLink:!!e,hasPreviousLink:!!t,errorMessage:l.MediaPageStore.get("media-load-error-message"),onClickNextCallback:this.onClickNext,onClickPreviousCallback:this.onClickPrevious,onStateUpdateCallback:this.onStateUpdate,onPlayerInitCallback:this.onPlayerInit})))):null))}}function C(e){let t=null,a=[];var i=location.search.substr(1).split("&");for(let n=0;n{const a=document.querySelector(".video-js.vjs-mediacms");if(a){const e=a.querySelector("video");e&&(function(e){if(!e||!e.tagName||"video"!==e.tagName.toLowerCase())return void _.error("Invalid video element:",e);const t=videojs(e);t.playsinline(!0),t.on("loadedmetadata",(function(){const e=parseInt(C("muted")),a=parseInt(C("autoplay")),i=parseInt(C("t"));document.addEventListener("click",(function(e){if(e.target.classList.contains("video-timestamp")){e.preventDefault();const a=parseInt(e.target.dataset.timestamp,10);a>=0&&a=0&&t.play()}})),1==e&&t.muted(!0),i>=0&&i=0&&i>=t.duration()&&t.play(),1===a&&t.play()}))}(e),t.disconnect())}})).observe(document,{childList:!0,subtree:!0});var x=a(5338),L=a(6619),V=a(4350);a(6880);const A={single:(0,m.translateString)("comment"),uppercaseSingle:(0,m.translateString)("COMMENT"),ucfirstSingle:(0,m.translateString)("Comment"),ucfirstPlural:(0,m.translateString)("Comments"),submitCommentText:(0,m.translateString)("SUBMIT"),disabledCommentsMsg:(0,m.translateString)("Comments are disabled")};function I(e){const t=(0,n.useRef)(null),[a,i]=(0,n.useState)(""),[o,s]=(0,n.useState)(!1),[d,c]=(0,n.useState)(!1),[u,h]=(0,n.useState)(-1),[g,f]=(0,n.useState)(""),[v]=(0,n.useState)(r.MemberContext._currentValue.is.anonymous?r.LinksContext._currentValue.signin+"?next=/"+window.location.href.replace(r.SiteContext._currentValue.url,"").replace(/^\//g,""):null);function b(){c(!0)}function E(){c(!1)}function S(){const e=[...l.MediaPageStore.get("users")],t=[];e.forEach((e=>{t.push({id:e.username,display:e.name})})),f(t)}function P(){t.current.style.height="";const e=t.current.scrollHeight,a=0(l.MediaPageStore.on("comment_submit",P),l.MediaPageStore.on("comment_submit_fail",M),!0===MediaCMS.features.media.actions.comment_mention&&l.MediaPageStore.on("users_load",S),()=>{l.MediaPageStore.removeListener("comment_submit",P),l.MediaPageStore.removeListener("comment_submit_fail",M),!0===MediaCMS.features.media.actions.comment_mention&&l.MediaPageStore.removeListener("users_load",S)}))),r.MemberContext._currentValue.is.anonymous?n.createElement("div",{className:"comments-form"},n.createElement("div",{className:"comments-form-inner"},n.createElement(y.UserThumbnail,null),n.createElement("div",{className:"form"},n.createElement("a",{href:v,rel:"noffolow",className:"form-textarea-wrap",title:(0,m.translateString)("Add a ")+A.single+"..."},n.createElement("span",{className:"form-textarea"},(0,m.translateString)("Add a ")+A.single+"...")),n.createElement("div",{className:"form-buttons"},n.createElement("a",{href:v,rel:"noffolow",className:"disabled"},A.submitCommentText))))):n.createElement("div",{className:"comments-form"},n.createElement("div",{className:"comments-form-inner"},n.createElement(y.UserThumbnail,null),n.createElement("div",{className:"form"},n.createElement("div",{className:"form-textarea-wrap"+(d?" focused":"")},MediaCMS.features.media.actions.comment_mention?n.createElement(L.G,{inputRef:t,className:"form-textarea",rows:"1",placeholder:"Add a "+A.single+"...",value:a,onChange:function(e,a,n,r){t.current.style.height="",i(a),s(!0);const l=t.current.scrollHeight,o=0()=>{}),[]),n.createElement("div",{className:"comment"},n.createElement("div",{className:"comment-inner"},n.createElement("a",{className:"comment-author-thumb",href:e.author_link,title:e.author_name},n.createElement("img",{src:e.author_thumb,alt:e.author_name})),n.createElement("div",{className:"comment-content"},n.createElement("div",{className:"comment-meta"},n.createElement("div",{className:"comment-author"},n.createElement("a",{href:e.author_link,title:e.author_name},e.author_name)),n.createElement("div",{className:"comment-date"},(0,m.replaceString)((0,V.GP)(new Date(e.publish_date))))),n.createElement("div",{ref:t,className:"comment-text"+(i?" show-all":"")},n.createElement("div",{ref:a,className:"comment-text-inner",dangerouslySetInnerHTML:(d=e.text,{__html:d.replace(/\n/g,"
")})})),o?n.createElement("button",{className:"toggle-more",onClick:function(){l(!i)}},i?"Show less":"Read more"):null,r.MemberContext._currentValue.can.deleteComment?n.createElement(T,{comment_id:e.comment_id}):null)));var d}R.propTypes={comment_id:d().oneOfType([d().string,d().number]).isRequired,media_id:d().oneOfType([d().string,d().number]).isRequired,text:d().string,author_name:d().string,author_link:d().string,author_thumb:d().string,publish_date:d().oneOfType([d().string,d().number]),likes:d().number,dislikes:d().number},R.defaultProps={author_name:"",author_link:"#",publish_date:0,likes:0,dislikes:0};const D=e=>{let{commentsLength:t}=e;return n.createElement(n.Fragment,null,!r.MemberContext._currentValue.can.readComment||l.MediaPageStore.get("media-data").enable_comments?null:n.createElement("span",{className:"disabled-comments-msg"},A.disabledCommentsMsg),r.MemberContext._currentValue.can.readComment&&(l.MediaPageStore.get("media-data").enable_comments||r.MemberContext._currentValue.can.editMedia)?n.createElement("h2",null,t?1{e.text=function(e){const t=new RegExp("((\\d)?\\d:)?(\\d)?\\d:\\d\\d","g");return e.replace(t,(function(e,t){let a=e.split(":"),i=0,n=1;for(;a.length>0;)i+=n*parseInt(a.pop(),10),n*=60;return`${e}`}))}(e.text)})),function(){var e=document.querySelector(".page-main"),t=e.querySelector(".no-comment");const a=l.PageStore.get("config-contents").uploader.postUploadMessage;if(""===a)t&&0===comm.length&&t.parentNode.removeChild(t);else if(0===comm.length&&"unlisted"===l.MediaPageStore.get("media-data").state){if(-1p.PageActions.addNotification(A.ucfirstSingle+" added","commentSubmit")),100)}function m(){setTimeout((()=>p.PageActions.addNotification(A.ucfirstSingle+" submission failed","commentSubmitFail")),100)}function h(e){c(),setTimeout((()=>p.PageActions.addNotification(A.ucfirstSingle+" removed","commentDelete")),100)}function g(e){setTimeout((()=>p.PageActions.addNotification(A.ucfirstSingle+" removal failed","commentDeleteFail")),100)}return(0,n.useEffect)((()=>{d(i.length&&r.MemberContext._currentValue.can.readComment&&(l.MediaPageStore.get("media-data").enable_comments||r.MemberContext._currentValue.can.editMedia))}),[i]),(0,n.useEffect)((()=>(l.MediaPageStore.on("comments_load",c),l.MediaPageStore.on("comment_submit",u),l.MediaPageStore.on("comment_submit_fail",m),l.MediaPageStore.on("comment_delete",h),l.MediaPageStore.on("comment_delete_fail",g),()=>{l.MediaPageStore.removeListener("comments_load",c),l.MediaPageStore.removeListener("comment_submit",u),l.MediaPageStore.removeListener("comment_submit_fail",m),l.MediaPageStore.removeListener("comment_delete",h),l.MediaPageStore.removeListener("comment_delete_fail",g)})),[]),n.createElement("div",{className:"comments-list"},n.createElement("div",{className:"comments-list-inner"},n.createElement(D,{commentsLength:i.length}),l.MediaPageStore.get("media-data").enable_comments?n.createElement(I,{media_id:t}):null,s?i.map((e=>n.createElement(R,{key:e.uid,comment_id:e.uid,media_id:t,text:e.text,author_name:e.author_name,author_link:e.author_profile,author_thumb:r.SiteContext._currentValue.url+"/"+e.author_thumbnail_url.replace(/^\//g,""),publish_date:e.add_date,likes:0,dislikes:0}))):null))}var O=a(8974);function q(e){let t,a,i=[];if(e&&e.length)for(t=0,a=1(l.MediaPageStore.on("media_delete",b),l.MediaPageStore.on("media_delete_fail",E),()=>{l.MediaPageStore.removeListener("media_delete",b),l.MediaPageStore.removeListener("media_delete_fail",E)})),[]);const S=(0,m.formatInnerLink)(e.author.url,r.SiteContext._currentValue.url),P=(0,m.formatInnerLink)(e.author.thumb,r.SiteContext._currentValue.url);return n.createElement("div",{className:"media-info-content"},void 0===l.PageStore.get("config-media-item").displayAuthor||null===l.PageStore.get("config-media-item").displayAuthor||l.PageStore.get("config-media-item").displayAuthor?n.createElement(j,{link:S,thumb:P,name:e.author.name,published:e.published}):null,n.createElement("div",{className:"media-content-banner"},n.createElement("div",{className:"media-content-banner-inner"},h?n.createElement("div",{className:"media-content-summary"},s):null,h&&!f||!a?null:n.createElement("div",{className:"media-content-description",dangerouslySetInnerHTML:{__html:function(e){const t=new RegExp("((\\d)?\\d:)?(\\d)?\\d:\\d\\d","g");return e.replace(t,(function(e,t){let a=e.split(":"),i=0,n=1;for(;a.length>0;)i+=n*parseInt(a.pop(),10),n*=60;return`${e}`}))}(a)}}),h?n.createElement("button",{className:"load-more",onClick:function(){v(!f)}},f?"SHOW LESS":"SHOW MORE"):null,i.length?n.createElement(z,{value:i,title:1(l.MediaPageStore.on("disliked_media",s),l.MediaPageStore.on("undisliked_media",d),l.MediaPageStore.on("disliked_media_failed_request",c),()=>{l.MediaPageStore.removeListener("disliked_media",s),l.MediaPageStore.removeListener("undisliked_media",d),l.MediaPageStore.removeListener("disliked_media_failed_request",c)})),[]),n.createElement("div",{className:"like"},n.createElement("button",{onClick:function(t){t.preventDefault(),t.stopPropagation(),p.MediaPageActions[e?"undislikeMedia":"dislikeMedia"]()}},n.createElement(y.CircleIconButton,{type:"span"},n.createElement(y.MaterialIcon,{type:"thumb_down"})),n.createElement("span",{className:"dislikes-counter"},a)))}function Q(){const[e,t]=(0,n.useState)(l.MediaPageStore.get("user-liked-media")),[a,i]=(0,n.useState)((0,m.formatViewsNumber)(l.MediaPageStore.get("media-likes"),!1));function o(){t(l.MediaPageStore.get("user-liked-media")),i((0,m.formatViewsNumber)(l.MediaPageStore.get("media-likes"),!1))}function s(){o(),p.PageActions.addNotification(r.TextsContext._currentValue.addToLiked,"likedMedia")}function d(){o(),p.PageActions.addNotification(r.TextsContext._currentValue.removeFromLiked,"unlikedMedia")}function c(){p.PageActions.addNotification("Action failed","likedMediaRequestFail")}return(0,n.useEffect)((()=>(l.MediaPageStore.on("liked_media",s),l.MediaPageStore.on("unliked_media",d),l.MediaPageStore.on("liked_media_failed_request",c),()=>{l.MediaPageStore.removeListener("liked_media",s),l.MediaPageStore.removeListener("unliked_media",d),l.MediaPageStore.removeListener("liked_media_failed_request",c)})),[]),n.createElement("div",{className:"like"},n.createElement("button",{onClick:function(t){t.preventDefault(),t.stopPropagation(),p.MediaPageActions[e?"unlikeMedia":"likeMedia"]()}},n.createElement(y.CircleIconButton,{type:"span"},n.createElement(y.MaterialIcon,{type:"thumb_up"})),n.createElement("span",{className:"likes-counter"},a)))}function $(e){const t=(0,n.useRef)(null),a=(0,n.useRef)(null),[i,r]=(0,n.useState)(null);function o(){r(window.innerHeight-(104+t.current.offsetHeight))}return(0,n.useEffect)((()=>(o(),l.PageStore.on("window_resize",o),()=>{l.PageStore.removeListener("window_resize",o)})),[]),n.createElement("form",null,n.createElement("div",{className:"report-form",style:null!==i?{maxHeight:i+"px"}:null},n.createElement("div",{className:"form-title"},"Report media"),n.createElement("div",{className:"form-field"},n.createElement("span",{className:"label"},"URL"),n.createElement("input",{type:"text",readOnly:!0,value:e.mediaUrl})),n.createElement("div",{className:"form-field"},n.createElement("span",{className:"label"},"Description"),n.createElement("textarea",{ref:a,required:!0})),n.createElement("div",{className:"form-field form-help-text"},"Reported media is reviewed")),n.createElement("div",{ref:t,className:"form-actions-bottom"},n.createElement("button",{className:"cancel",onClick:function(t){t.preventDefault(),void 0!==e.cancelReportForm&&e.cancelReportForm()}},"CANCEL"),n.createElement("button",{onClick:function(t){const i=a.current.value.trim();""!==i&&(t.preventDefault(),void 0!==e.submitReportForm&&e.submitReportForm(i))}},"SUBMIT")))}function Y(e,t){const a=r.SiteContext._currentValue,i=e.encodings_info,n={};let l,o;for(l in i)if(i.hasOwnProperty(l)&&Object.keys(i[l]).length)for(o in i[l])i[l].hasOwnProperty(o)&&"success"===i[l][o].status&&100===i[l][o].progress&&null!==i[l][o].url&&(n[i[l][o].title]={text:l+" - "+o.toUpperCase()+" ("+i[l][o].size+")",link:(0,m.formatInnerLink)(i[l][o].url,a.url),linkAttr:{target:"_blank",download:e.title+"_"+l+"_"+o.toUpperCase()}});return n.original_media_url={text:"Original file ("+e.size+")",link:(0,m.formatInnerLink)(e.original_media_url,a.url),linkAttr:{target:"_blank",download:e.title}},Object.values(n)}function G(e,t,a,i,r,l,o){const s=t.url,d=t.media_type,c=t.state||"N/A",u=t.encoding_status||"N/A",m=t.reported_times,p=t.is_reviewed,h="video"===d,g=function(e,t,a,i,n){const r=[],l="video"===t.media_type,o=t.reported_times;return a&&e.downloadMedia&&(l?r.push({itemType:"open-subpage",text:"Download",icon:"arrow_downward",itemAttr:{className:"visible-only-in-small"},buttonAttr:{className:"change-page","data-page-id":"videoDownloadOptions"}}):i&&r.push({itemType:"link",link:i,text:"Download",icon:"arrow_downward",itemAttr:{className:"visible-only-in-small"},linkAttr:{target:"_blank",download:t.title}})),l&&e.editMedia&&r.push({itemType:"open-subpage",text:"Status info",icon:"info",buttonAttr:{className:"change-page","data-page-id":"mediaStatusInfo"}}),e.reportMedia&&(n?r.push({itemType:"div",text:"Reported",icon:"flag",divAttr:{className:"reported-label loggedin-media-reported"}}):r.push({itemType:"open-subpage",text:"Report",icon:"flag",buttonAttr:{className:"change-page"+(o?" loggedin-media-reported":""),"data-page-id":"loggedInReportMedia"}})),r}(e,t,a,i,r),f={};return g.length&&(f.main=n.createElement("div",{className:"main-options"},n.createElement(y.PopupMain,null,n.createElement(y.NavigationMenuList,{items:g})))),e.reportMedia&&(f.loggedInReportMedia=r?null:n.createElement("div",{className:"popup-fullscreen"},n.createElement(y.PopupMain,null,n.createElement("span",{className:"popup-fullscreen-overlay"}),n.createElement("div",null,n.createElement($,{mediaUrl:s,submitReportForm:l,cancelReportForm:o}))))),e.editMedia&&(f.mediaStatusInfo=n.createElement("div",{className:"main-options"},n.createElement(y.PopupMain,null,n.createElement("ul",{className:"media-status-info"},n.createElement("li",null,"Media type: ",n.createElement("span",null,d)),n.createElement("li",null,"State: ",n.createElement("span",null,c)),n.createElement("li",null,"Review state: ",n.createElement("span",null,p?"Is reviewed":"Pending review")),h?n.createElement("li",null,"Encoding Status: ",n.createElement("span",null,u)):null,m?n.createElement("li",{className:"reports"},"Reports: ",n.createElement("span",null,m)):null)))),a&&e.downloadMedia&&h&&(f.videoDownloadOptions=n.createElement("div",{className:"video-download-options"},n.createElement(y.PopupMain,null,n.createElement(y.NavigationMenuList,{items:Y(t)})))),f}$.propTypes={mediaUrl:d().string.isRequired,cancelReportForm:d().func,submitReportForm:d().func};const Z="more-options active-options";function X(e){const{userCan:t}=(0,x.useUser)(),a=r.SiteContext._currentValue,i=(0,m.formatInnerLink)(l.MediaPageStore.get("media-original-url"),a.url),o=l.MediaPageStore.get("media-data"),s="video"===o.media_type,[d,c,u]=(0,x.usePopup)(),[h,g]=(0,n.useState)(!1),[f,v]=(0,n.useState)(!1),[b,E]=(0,n.useState)({}),[S,P]=(0,n.useState)("main"),[M,w]=(0,n.useState)(Z);function k(e){p.MediaPageActions.reportMedia(e)}function _(){d.current.toggle()}function N(){d.current.tryToHide(),setTimeout((function(){p.PageActions.addNotification("Media Reported","reportedMedia"),v(!0),l.MediaPageStore.removeListener("reported_media",N)}),100)}return(0,n.useEffect)((()=>{f||(h?l.MediaPageStore.on("reported_media",N):l.MediaPageStore.removeListener("reported_media",N))}),[h]),(0,n.useEffect)((()=>{g(Object.keys(b).length&&e.allowDownload&&t.downloadMedia)}),[b]),(0,n.useEffect)((()=>{let a=Z;e.allowDownload&&t.downloadMedia&&"videoDownloadOptions"===S&&(a+=" video-downloads"),1===Object.keys(b).length&&e.allowDownload&&t.downloadMedia&&(s||i)&&(a+=" visible-only-in-small"),w(a)}),[S]),(0,n.useEffect)((()=>{E(G(t,o,e.allowDownload,i,f,k,_))}),[f]),(0,n.useEffect)((()=>(E(G(t,o,e.allowDownload,i,f,k,_)),()=>{h&&!f&&l.MediaPageStore.removeListener("reported_media",N)})),[]),h?n.createElement("div",{className:M},n.createElement(u,{contentRef:d},n.createElement("span",null,n.createElement(y.CircleIconButton,{type:"button"},n.createElement(y.MaterialIcon,{type:"more_horiz"})))),n.createElement("div",{className:"nav-page-"+S},n.createElement(c,{contentRef:d,hideCallback:function(){P("main")}},n.createElement(y.NavigationContentApp,{pageChangeCallback:function(e){P(e)},initPage:S,focusFirstItemOnPageChange:!1,pages:b,pageChangeSelector:".change-page",pageIdSelectorAttr:"data-page-id"})))):null}X.propTypes={allowDownload:d().bool.isRequired},X.defaultProps={allowDownload:!1};var J=a(3706);function K(e){return e.renderDate?n.createElement("label",null,n.createElement("input",{type:"checkbox",checked:e.isChecked,onChange:function(t){t.persist(),e.isChecked?p.MediaPageActions.removeMediaFromPlaylist(e.playlistId,l.MediaPageStore.get("media-id")):p.MediaPageActions.addMediaToPlaylist(e.playlistId,l.MediaPageStore.get("media-id"))}}),n.createElement("span",null,e.title)):null}function ee(e){const t=(0,n.useRef)(null),a=(0,n.useRef)(null),[i,r]=(0,n.useState)(new Date),[o,s]=(0,n.useState)(l.MediaPageStore.get("playlists")),[d,c]=(0,n.useState)(!1);function u(){b()}function m(){s(l.MediaPageStore.get("playlists")),r(new Date)}function h(){s(l.MediaPageStore.get("playlists")),r(new Date),setTimeout((function(){p.PageActions.addNotification("Media added to playlist","playlistMediaAdditionComplete")}),100)}function g(){setTimeout((function(){p.PageActions.addNotification("Media's addition to playlist failed","playlistMediaAdditionFail")}),100)}function f(){s(l.MediaPageStore.get("playlists")),r(new Date),setTimeout((function(){p.PageActions.addNotification("Media removed from playlist","playlistMediaRemovalComplete")}),100)}function v(){setTimeout((function(){p.PageActions.addNotification("Media's removal from playlist failed","playlistMediaaRemovalFail")}),100)}function b(){null!==a.current&&(a.current.style.maxHeight=window.innerHeight-74-(t.current.offsetHeight-a.current.offsetHeight)+"px")}function E(){c(!d),b()}return(0,n.useEffect)((()=>{b()})),(0,n.useEffect)((()=>(l.PageStore.on("window_resize",u),l.MediaPageStore.on("playlists_load",m),l.MediaPageStore.on("media_playlist_addition_completed",h),l.MediaPageStore.on("media_playlist_addition_failed",g),l.MediaPageStore.on("media_playlist_removal_completed",f),l.MediaPageStore.on("media_playlist_removal_failed",v),()=>{l.PageStore.removeListener("window_resize",u),l.MediaPageStore.removeListener("playlists_load",m),l.MediaPageStore.removeListener("media_playlist_addition_completed",h),l.MediaPageStore.removeListener("media_playlist_addition_failed",g),l.MediaPageStore.removeListener("media_playlist_removal_completed",f),l.MediaPageStore.removeListener("media_playlist_removal_failed",v)})),[]),n.createElement("div",{ref:t,className:"saveto-popup"},n.createElement("div",{className:"saveto-title"},"Save to...",n.createElement(y.CircleIconButton,{type:"button",onClick:function(){c(!1),void 0!==e.triggerPopupClose&&e.triggerPopupClose()}},n.createElement(y.MaterialIcon,{type:"close"}))),o.length?n.createElement("div",{ref:a,className:"saveto-select"},function(){const e=l.MediaPageStore.get("media-id");let t=[],a=0;for(;a{m(window.innerHeight-144+56),x(s.current.offsetHeight),V(c.current.offsetHeight)})),(0,n.useEffect)((()=>(l.PageStore.on("window_resize",T),l.MediaPageStore.on("copied_embed_media_code",R),()=>{l.PageStore.removeListener("window_resize",T),l.MediaPageStore.removeListener("copied_embed_media_code",R)})),[]),n.createElement("div",{className:"share-embed",style:{maxHeight:u+"px"}},n.createElement("div",{className:"share-embed-inner"},n.createElement("div",{className:"on-left"},n.createElement("div",{className:"media-embed-wrap"},n.createElement(N,{data:l.MediaPageStore.get("media-data"),inEmbed:!0}))),n.createElement("div",{ref:o,className:"on-right"},n.createElement("div",{ref:s,className:"on-right-top"},n.createElement("div",{className:"on-right-top-inner"},n.createElement("span",{className:"ttl"},"Embed Video"),n.createElement(y.CircleIconButton,{type:"button",onClick:function(){void 0!==e.triggerPopupClose&&e.triggerPopupClose()}},n.createElement(y.MaterialIcon,{type:"close"})))),n.createElement("div",{ref:d,className:"on-right-middle",style:{top:C+"px",bottom:L+"px"}},n.createElement("textarea",{readOnly:!0,value:''}),n.createElement("div",{className:"iframe-config"},n.createElement("div",{className:"iframe-config-options-title"},"Embed options"),n.createElement("div",{className:"iframe-config-option"},n.createElement("div",{className:"option-content"},n.createElement("div",{className:"ratio-options"},n.createElement("div",{className:"options-group"},n.createElement("label",{style:{minHeight:"36px"}},n.createElement("input",{type:"checkbox",checked:h,onChange:function(){const e=!h,t=f.split(":"),a=t[0],i=t[1];g(e),P(e?"px":S),_(e?"px":k),w(e?parseInt(b*i/a,10):M),I(e?[{key:"px",label:"px"}]:[{key:"px",label:"px"},{key:"percent",label:"%"}])}}),"Keep aspect ratio")),h?n.createElement("div",{className:"options-group"},n.createElement("select",{ref:i,onChange:function(){const e=i.current.value,t=e.split(":"),a=t[0],n=t[1];v(e),w(h?parseInt(b*n/a,10):M)},value:f},n.createElement("optgroup",{label:"Horizontal orientation"},n.createElement("option",{value:"16:9"},"16:9"),n.createElement("option",{value:"4:3"},"4:3"),n.createElement("option",{value:"3:2"},"3:2")),n.createElement("optgroup",{label:"Vertical orientation"},n.createElement("option",{value:"9:16"},"9:16"),n.createElement("option",{value:"3:4"},"3:4"),n.createElement("option",{value:"2:3"},"2:3")))):null),n.createElement("br",null),n.createElement("div",{className:"options-group"},n.createElement(y.NumericInputWithUnit,{valueCallback:function(e){e=""===e?0:e;const t=f.split(":"),a=t[0],i=t[1];E(e),w(h?parseInt(e*i/a,10):M)},unitCallback:function(e){P(e)},label:"Width",defaultValue:parseInt(b,10),defaultUnit:S,minValue:1,maxValue:99999,units:A})),n.createElement("div",{className:"options-group"},n.createElement(y.NumericInputWithUnit,{valueCallback:function(e){e=""===e?0:e;const t=f.split(":"),a=t[0],i=t[1];w(e),E(h?parseInt(e*a/i,10):b)},unitCallback:function(e){_(e)},label:"Height",defaultValue:parseInt(M,10),defaultUnit:k,minValue:1,maxValue:99999,units:A})))))),n.createElement("div",{ref:c,className:"on-right-bottom"},n.createElement("button",{onClick:function(){p.MediaPageActions.copyEmbedMediaCode(d.current.querySelector("textarea"))}},"COPY")))))}K.propTypes={playlistId:d().string,isChecked:d().bool,title:d().string},K.defaultProps={isChecked:!1,title:""},ee.propTypes={triggerPopupClose:d().func},ae.propTypes={triggerPopupClose:d().func};var ie=a(5289);function ne(e){let{onClick:t}=e;return n.createElement("span",{className:"next-slide"},n.createElement(y.CircleIconButton,{buttonShadow:!0,onClick:t},n.createElement("i",{className:"material-icons"},"keyboard_arrow_right")))}function re(e){let{onClick:t}=e;return n.createElement("span",{className:"previous-slide"},n.createElement(y.CircleIconButton,{buttonShadow:!0,onClick:t},n.createElement("i",{className:"material-icons"},"keyboard_arrow_left")))}function le(){return{maxFormContentHeight:window.innerHeight-196,maxPopupWidth:518>window.innerWidth-80?window.innerWidth-80:null}}function oe(e){const t=(0,n.useRef)(null),a=(0,n.useRef)(null),i=l.MediaPageStore.get("media-url"),[o,s]=(0,n.useState)(null),[d,c]=(0,n.useState)({prev:!1,next:!1}),[u,m]=(0,n.useState)(le()),[h]=(0,n.useState)(function(){const e=function(){const e=r.ShareOptionsContext._currentValue,t=l.MediaPageStore.get("media-url"),a=l.MediaPageStore.get("media-data").title,i={};let n=0;for(;n{s(new ie.A(a.current,".sh-option"))}),[h]),(0,n.useEffect)((()=>{o&&(o.updateDataStateOnResize(h.length,!0,!0),k())}),[u,o]),(0,n.useEffect)((()=>{l.PageStore.on("window_resize",M),l.MediaPageStore.on("copied_media_link",w);const e=function(){const e=document.getElementsByTagName("video");return e[0]?.currentTime}();return f(e),y(function(e){let t=parseInt(e,10),a=Math.floor(t/3600),i=Math.floor((t-3600*a)/60),n=t-3600*a-60*i;return a<10&&(a="0"+a),i<10&&(i="0"+i),n<10&&(n="0"+n),a>=1?a+":"+i+":"+n:i+":"+n}(e)),()=>{l.PageStore.removeListener("window_resize",M),l.MediaPageStore.removeListener("copied_media_link",w),s(null)}}),[]),n.createElement("div",{ref:t,style:null!==u.maxPopupWidth?{maxWidth:u.maxPopupWidth+"px"}:null},n.createElement("div",{className:"scrollable-content",style:null!==u.maxFormContentHeight?{maxHeight:u.maxFormContentHeight+"px"}:null},n.createElement("div",{className:"share-popup-title"},"Share media"),h.length?n.createElement("div",{className:"share-options"},d.prev?n.createElement(re,{onClick:function(){o.previousSlide(),k()}}):null,n.createElement("div",{ref:a,className:"share-options-inner"},h),d.next?n.createElement(ne,{onClick:function(){o.nextSlide(),k()}}):null):null),n.createElement("div",{className:"copy-field"},n.createElement("div",null,n.createElement("input",{type:"text",readOnly:!0,value:S}),n.createElement("button",{onClick:function(){p.MediaPageActions.copyShareLink(t.current.querySelector(".copy-field input"))}},"COPY"))),n.createElement("div",{className:"start-at"},n.createElement("label",null,n.createElement("input",{type:"checkbox",name:"start-at-checkbox",id:"id-start-at-checkbox",checked:b,onChange:function(){E(!b),function(){const e=b?i:i+"&t="+Math.trunc(g);P(e)}()}}),"Start at ",v)))}function se(){return{shareOptions:n.createElement("div",{className:"popup-fullscreen"},n.createElement(y.PopupMain,null,n.createElement("span",{className:"popup-fullscreen-overlay"}),n.createElement(oe,null)))}}function de(e){const[t,a,i]=(0,x.usePopup)(),[r,l]=(0,n.useState)("shareOptions");return n.createElement("div",{className:"share"},n.createElement(i,{contentRef:t},n.createElement("button",null,n.createElement(y.CircleIconButton,{type:"span"},n.createElement(y.MaterialIcon,{type:"share"})),n.createElement("span",null,(0,m.translateString)("SHARE")))),n.createElement(a,{contentRef:t,hideCallback:function(){l("shareOptions")}},n.createElement(y.NavigationContentApp,{initPage:r,pageChangeSelector:".change-page",pageIdSelectorAttr:"data-page-id",pages:e.isVideo?(o=function(){t.current.toggle()},{...se(),shareEmbed:n.createElement("div",{className:"popup-fullscreen share-embed-popup"},n.createElement(y.PopupMain,null,n.createElement("span",{className:"popup-fullscreen-overlay"}),n.createElement(ae,{triggerPopupClose:o})))}):se(),focusFirstItemOnPageChange:!1,pageChangeCallback:function(e){l(e)}})));var o}function ce(e){return n.createElement("div",{className:"download hidden-only-in-small"},n.createElement("a",{href:e.link,target:"_blank",download:e.title,title:"Download",rel:"noreferrer"},n.createElement(y.CircleIconButton,{type:"span"},n.createElement(y.MaterialIcon,{type:"arrow_downward"})),n.createElement("span",null,"DOWNLOAD")))}function ue(){const e=l.MediaPageStore.get("media-data"),t=(e.title,e.encodings_info),a={};let i,n;for(i in t)if(t.hasOwnProperty(i)&&Object.keys(t[i]).length)for(n in t[i])t[i].hasOwnProperty(n)&&"success"===t[i][n].status&&100===t[i][n].progress&&null!==t[i][n].url&&(a[t[i][n].title]={text:i+" - "+n.toUpperCase()+" ("+t[i][n].size+")",link:(0,m.formatInnerLink)(t[i][n].url,r.SiteContext._currentValue.url),linkAttr:{target:"_blank",download:e.title+"_"+i+"_"+n.toUpperCase()}});return a.original_media_url={text:"Original file ("+e.size+")",link:(0,m.formatInnerLink)(e.original_media_url,r.SiteContext._currentValue.url),linkAttr:{target:"_blank",download:e.title}},Object.values(a)}function me(e){const[t,a,i]=(0,x.usePopup)(),[r,l]=(0,n.useState)("main");return n.createElement("div",{className:"video-downloads hidden-only-in-small"},n.createElement(i,{contentRef:t},n.createElement("button",null,n.createElement(y.CircleIconButton,{type:"span"},n.createElement(y.MaterialIcon,{type:"arrow_downward"})),n.createElement("span",null,(0,m.translateString)("DOWNLOAD")))),n.createElement("div",{className:"nav-page-"+r},n.createElement(a,{contentRef:t},n.createElement(y.NavigationContentApp,{pageChangeCallback:null,initPage:"main",focusFirstItemOnPageChange:!1,pages:{main:n.createElement("div",{className:"main-options"},n.createElement(y.PopupMain,null,n.createElement(y.NavigationMenuList,{items:ue()})))},pageChangeSelector:".change-page",pageIdSelectorAttr:"data-page-id"}))))}ce.propTypes={link:d().string.isRequired,title:d().string.isRequired};class pe extends n.PureComponent{constructor(e){super(e),this.state={likedMedia:l.MediaPageStore.get("user-liked-media"),dislikedMedia:l.MediaPageStore.get("user-disliked-media")},this.downloadLink="video"!==l.MediaPageStore.get("media-type")?(0,m.formatInnerLink)(l.MediaPageStore.get("media-original-url"),r.SiteContext._currentValue.url):null,this.updateStateValues=this.updateStateValues.bind(this)}componentDidMount(){l.MediaPageStore.on("liked_media",this.updateStateValues),l.MediaPageStore.on("unliked_media",this.updateStateValues),l.MediaPageStore.on("disliked_media",this.updateStateValues),l.MediaPageStore.on("undisliked_media",this.updateStateValues);const e=document.querySelectorAll("[data-tooltip]");e.length&&e.forEach((e=>function(e){const t=document.body,a=document.createElement("span");function i(){const t=e.getBoundingClientRect();a.style.top=t.top-(0+a.offsetHeight)+"px",a.style.left=t.left+"px"}a.innerText=e.getAttribute("data-tooltip"),a.setAttribute("class","tooltip"),e.removeAttribute("data-tooltip"),e.addEventListener("mouseenter",(function(){const n=e.getBoundingClientRect();t.appendChild(a),a.style.top=n.top-(0+a.offsetHeight)+"px",a.style.left=n.left+"px",document.addEventListener("scroll",i)})),e.addEventListener("mouseleave",(function(){t.removeChild(a),a.style.top="",a.style.left="",document.removeEventListener("scroll",i)}))}(e)))}updateStateValues(){this.setState({likedMedia:l.MediaPageStore.get("user-liked-media"),dislikedMedia:l.MediaPageStore.get("user-disliked-media")})}mediaCategories(e){if(void 0===this.props.categories||null===this.props.categories||!this.props.categories.length)return null;let t=0,a=[];for(;t=this.props.views?"view":"views"):null,n.createElement("div",{className:"media-actions"},n.createElement("div",null,r.MemberContext._currentValue.can.likeMedia?n.createElement(Q,null):null,r.MemberContext._currentValue.can.dislikeMedia?n.createElement(W,null):null,r.MemberContext._currentValue.can.shareMedia?n.createElement(de,{isVideo:!1}):null,!r.MemberContext._currentValue.is.anonymous&&r.MemberContext._currentValue.can.saveMedia&&-1=this.props.views?(0,m.translateString)("view"):(0,m.translateString)("views")):null,n.createElement("div",{className:"media-actions"},n.createElement("div",null,r.MemberContext._currentValue.can.likeMedia?n.createElement(Q,null):null,r.MemberContext._currentValue.can.dislikeMedia?n.createElement(W,null):null,r.MemberContext._currentValue.can.shareMedia?n.createElement(de,{isVideo:!0}):null,!r.MemberContext._currentValue.is.anonymous&&r.MemberContext._currentValue.can.saveMedia&&-1(l.MediaPageStore.on("loaded_media_data",s),l.PageStore.on("switched_media_auto_play",o),()=>{l.MediaPageStore.removeListener("loaded_media_data",s),l.PageStore.removeListener("switched_media_auto_play",o)})),[]),t?n.createElement("div",{className:"auto-play"},n.createElement("div",{className:"auto-play-header"},n.createElement("div",{className:"next-label"},(0,m.translateString)("Up next")),n.createElement("div",{className:"auto-play-option"},n.createElement("label",{className:"checkbox-label right-selectbox",tabIndex:0,onKeyPress:function(e){0===e.keyCode&&p.PageActions.toggleMediaAutoPlay()}},(0,m.translateString)("AUTOPLAY"),n.createElement("span",{className:"checkbox-switcher-wrap"},n.createElement("span",{className:"checkbox-switcher"},n.createElement("input",{type:"checkbox",tabIndex:-1,checked:i,onChange:p.PageActions.toggleMediaAutoPlay})))))),n.createElement(ye.k,{className:"items-list-hor",items:[t],pageItems:1,maxItems:1,singleLinkContent:!0,horizontalItemsOrientation:!0,hideDate:!0,hideViews:!l.PageStore.get("config-media-item").displayViews,hideAuthor:!l.PageStore.get("config-media-item").displayAuthor})):null}function Se(e){const[t,a]=(0,n.useState)(s()),[i,r]=(0,n.useState)(null);function o(){r(l.MediaPageStore.get("media-type")),a(s())}function s(){const e=l.MediaPageStore.get("media-data");return null!=e&&void 0!==e.related_media&&e.related_media.length?e.related_media:null}return(0,n.useEffect)((()=>(l.MediaPageStore.on("loaded_media_data",o),()=>l.MediaPageStore.removeListener("loaded_media_data",o))),[]),t&&t.length?n.createElement(ye.k,{className:"items-list-hor",items:!e.hideFirst||"video"!==i&&"audio"!==i?t:t.slice(1),pageItems:l.PageStore.get("config-options").pages.media.related.initialSize,singleLinkContent:!0,horizontalItemsOrientation:!0,hideDate:!0,hideViews:!l.PageStore.get("config-media-item").displayViews,hideAuthor:!l.PageStore.get("config-media-item").displayAuthor}):null}function Pe(e){return n.createElement(ye.k,{className:"items-list-hor",pageItems:9999,maxItems:9999,items:e.items,hideDate:!0,hideViews:!0,hidePlaylistOrderNumber:!1,horizontalItemsOrientation:!0,inPlaylistView:!0,singleLinkContent:!0,playlistActiveItem:e.playlistActiveItem})}Se.propTypes={hideFirst:d().bool},Se.defaultProps={hideFirst:!0},Pe.propTypes={items:d().array.isRequired,playlistActiveItem:m.PositiveIntegerOrZero},Pe.defaultProps={playlistActiveItem:1};class Me extends n.PureComponent{constructor(e){super(e),this.state={expanded:!0,loopRepeat:l.PlaylistViewStore.get("enabled-loop"),shuffle:l.PlaylistViewStore.get("enabled-shuffle"),savedPlaylist:l.PlaylistViewStore.get("saved-playlist-loop"),title:e.playlistData.title,link:e.playlistData.url,authorName:e.playlistData.user,authorLink:r.LinksContext._currentValue.home+"/user/"+e.playlistData.user,activeItem:e.activeItem,totalMedia:e.playlistData.media_count,items:e.playlistData.playlist_media},this.onHeaderClick=this.onHeaderClick.bind(this),this.onLoopClick=this.onLoopClick.bind(this),this.onShuffleClick=this.onShuffleClick.bind(this),this.onSaveClick=this.onSaveClick.bind(this),this.onLoopRepeatUpdate=this.onLoopRepeatUpdate.bind(this),this.onShuffleUpdate=this.onShuffleUpdate.bind(this),this.onPlaylistSaveUpdate=this.onPlaylistSaveUpdate.bind(this),l.PlaylistViewStore.on("loop-repeat-updated",this.onLoopRepeatUpdate),l.PlaylistViewStore.on("shuffle-updated",this.onShuffleUpdate),l.PlaylistViewStore.on("saved-updated",this.onPlaylistSaveUpdate)}onHeaderClick(e){this.setState({expanded:!this.state.expanded})}onLoopClick(){p.PlaylistViewActions.toggleLoop()}onShuffleClick(){p.PlaylistViewActions.toggleShuffle()}onSaveClick(){p.PlaylistViewActions.toggleSave()}onShuffleUpdate(){this.setState({shuffle:l.PlaylistViewStore.get("enabled-shuffle")},(()=>{this.state.shuffle?p.PageActions.addNotification("Playlist shuffle is on","shuffle-on"):p.PageActions.addNotification("Playlist shuffle is off","shuffle-off")}))}onLoopRepeatUpdate(){this.setState({loopRepeat:l.PlaylistViewStore.get("enabled-loop")},(()=>{this.state.loopRepeat?p.PageActions.addNotification("Playlist loop is on","loop-on"):p.PageActions.addNotification("Playlist loop is off","loop-off")}))}onPlaylistSaveUpdate(){this.setState({savedPlaylist:l.PlaylistViewStore.get("saved-playlist")},(()=>{this.state.savedPlaylist?p.PageActions.addNotification("Added to playlists library","added-to-playlists-lib"):p.PageActions.addNotification("Removed from playlists library","removed-from-playlists-lib")}))}render(){return n.createElement("div",{className:"playlist-view-wrap"},n.createElement("div",{className:"playlist-view"+(this.state.expanded?" playlist-expanded-view":"")},n.createElement("div",{className:"playlist-header"},n.createElement("div",{className:"playlist-title"},n.createElement("a",{href:this.state.link,title:this.state.title},this.state.title)),n.createElement("div",{className:"playlist-meta"},n.createElement("span",null,n.createElement("a",{href:this.state.authorLink,title:this.state.authorName},this.state.authorName)),"  -  ",n.createElement("span",{className:"counter"},this.state.activeItem," / ",this.state.totalMedia)),n.createElement(y.CircleIconButton,{className:"toggle-playlist-view",onClick:this.onHeaderClick},this.state.expanded?n.createElement("i",{className:"material-icons"},"keyboard_arrow_up"):n.createElement("i",{className:"material-icons"},"keyboard_arrow_down"))),this.state.expanded?n.createElement("div",{className:"playlist-actions"},n.createElement(y.CircleIconButton,{className:this.state.loopRepeat?"active":"",onClick:this.onLoopClick,title:"Loop playlist"},n.createElement("i",{className:"material-icons"},"repeat"))):null,this.state.expanded&&this.state.items.length?n.createElement("div",{className:"playlist-media"},n.createElement(Pe,{items:this.state.items,playlistActiveItem:this.state.activeItem})):null))}}Me.propTypes={playlistData:d().object.isRequired,activeItem:m.PositiveIntegerOrZero},Me.defaultProps={};class we extends n.PureComponent{constructor(e){if(super(e),this.state={playlistData:e.playlistData,isPlaylistPage:!!e.playlistData,activeItem:0,mediaType:l.MediaPageStore.get("media-type"),chapters:l.MediaPageStore.get("media-data")?.chapters},e.playlistData){let t=0;for(;t{let e=null,t=null;const a=window.location.search.split("?")[1];return a&&a.split("&").forEach((a=>{0===a.indexOf("m=")?e=a.split("m=")[1]:0===a.indexOf("pl=")&&(t=a.split("pl=")[1])})),{mediaId:e,playlistId:t}},{mediaId:t,playlistId:a}=e();t&&(window.MediaCMS.mediaId=t),a&&(window.MediaCMS.playlistId=a)}(0,i.C)("page-media",class extends _e{viewerContainerContent(e){switch(l.MediaPageStore.get("media-type")){case"video":return n.createElement(r.SiteConsumer,null,(t=>n.createElement(N,{data:e,siteUrl:t.url,inEmbed:!1})));case"audio":return n.createElement(v,null);case"image":return n.createElement(E,null);case"pdf":const t=(0,m.formatInnerLink)(l.MediaPageStore.get("media-original-url"),r.SiteContext._currentValue.url);return n.createElement(M,{fileUrl:t})}return n.createElement(o,null)}})},1815:function(){},2787:function(){},3237:function(){},3818:function(e,t,a){"use strict";a.d(t,{_:function(){return l}});var i=a(9471),n=a(8713),r=a.n(n);function l(e){const t=(0,i.useRef)(null),a=(0,i.useRef)(null),[n,r]=(0,i.useState)(null),[l,o]=(0,i.useState)(null);return(0,i.useEffect)((()=>{r(function(e,t,a){if(void 0!==e){let i=null;return i=void 0!==t&&t>e?t:e,i=void 0!==a&&a(e.inEmbed||document.hasFocus()||"visible"===document.visibilityState?s():(window.addEventListener("focus",s),document.addEventListener("visibilitychange",s)),()=>{null!==a&&(videojs(t.current).dispose(),a=null),void 0!==e.onUnmountCallback&&e.onUnmountCallback()})),[]),null===e.errorMessage?i.createElement("video",{ref:t,className:"video-js vjs-mediacms native-dimensions"}):i.createElement("div",{className:"error-container"},i.createElement("div",{className:"error-container-inner"},i.createElement("span",{className:"icon-wrap"},i.createElement("i",{className:"material-icons"},"error_outline")),i.createElement("span",{className:"msg-wrap"},e.errorMessage)))}u.propTypes={errorMessage:r().string.isRequired},m.propTypes={playerVolume:r().string,playerSoundMuted:r().bool,videoQuality:r().string,videoPlaybackSpeed:r().number,inTheaterMode:r().bool,siteId:r().string.isRequired,siteUrl:r().string.isRequired,errorMessage:r().string,cornerLayers:r().object,subtitlesInfo:r().array.isRequired,inEmbed:r().bool.isRequired,sources:r().array.isRequired,info:r().object.isRequired,enableAutoplay:r().bool.isRequired,hasTheaterMode:r().bool.isRequired,hasNextLink:r().bool.isRequired,hasPreviousLink:r().bool.isRequired,poster:r().string,previewSprite:r().object,onClickPreviousCallback:r().func,onClickNextCallback:r().func,onPlayerInitCallback:r().func,onStateUpdateCallback:r().func,onUnmountCallback:r().func},m.defaultProps={errorMessage:null,cornerLayers:{}}},6568:function(e,t,a){"use strict";a.d(t,{x:function(){return l}});var i=a(9471),n=a(8713),r=a.n(n);function l(e){let t="spinner-loader";switch(e.size){case"tiny":case"x-small":case"small":case"large":case"x-large":t+=" "+e.size}return i.createElement("div",{className:t},i.createElement("svg",{className:"circular",viewBox:"25 25 50 50"},i.createElement("circle",{className:"path",cx:"50",cy:"50",r:"20",fill:"none",strokeWidth:"1.5",strokeMiterlimit:"10"})))}l.propTypes={size:r().oneOf(["tiny","x-small","small","medium","large","x-large"])},l.defaultProps={size:"medium"}},6671:function(){},6880:function(e,t,a){var i,n,r,l=a(8974);n=[a(4480)],void 0===(r="function"==typeof(i=function(e){"use strict";var t,a=(t=e)&&t.__esModule?t:{default:t};var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n={markerStyle:{width:"7px","border-radius":"30%","background-color":"red"},markerTip:{display:!0,text:function(e){return"Break: "+e.text},time:function(e){return e.time}},breakOverlay:{display:!0,displayTime:3,text:function(e){return"Break overlay: "+e.overlayText},style:{width:"100%",height:"20%","background-color":"rgba(0,0,0,0.7)",color:"white","font-size":"17px"}},onMarkerClick:function(e){},onMarkerReached:function(e,t){},markers:[]};function r(e){var t;try{t=e.getBoundingClientRect()}catch(e){t={top:0,bottom:0,left:0,width:0,height:0,right:0}}return t}var o=-1;videojs.registerPlugin("markers",(function(e){if(!a.default.mergeOptions){var t=function(e){return!!e&&"object"===(void 0===e?"undefined":i(e))&&"[object Object]"===toString.call(e)&&e.constructor===Object};a.default.mergeOptions=function e(a,i){var n={};return[a,i].forEach((function(a){a&&Object.keys(a).forEach((function(i){var r=a[i];t(r)?(t(n[i])||(n[i]={}),n[i]=e(n[i],r)):n[i]=r}))})),n}}a.default.createEl||(a.default.createEl=function(e,t,i){var n=a.default.Player.prototype.createEl(e,t);return i&&Object.keys(i).forEach((function(e){n.setAttribute(e,i[e])})),n});var s=a.default.mergeOptions(n,e),d={},c=[],u=o,m=this,p=null,h=null,g=o;function f(){c.sort((function(e,t){return s.markerTip.time(e)-s.markerTip.time(t)}))}function v(e){e.forEach((function(e){var t;e.key=(t=(new Date).getTime(),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var a=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?a:3&a|8).toString(16)}))),m.el().querySelector(".vjs-progress-holder").appendChild(function(e){var t=a.default.createEl("div",{},{"data-marker-key":e.key,"data-marker-time":s.markerTip.time(e)});return b(e,t),t.addEventListener("click",(function(t){var a=!1;if("function"==typeof s.onMarkerClick&&(a=!1===s.onMarkerClick(e)),!a){var i=this.getAttribute("data-marker-key");m.currentTime(s.markerTip.time(d[i]))}})),s.markerTip.display&&function(e){e.addEventListener("mouseover",(function(){var t=d[e.getAttribute("data-marker-key")];if(p){p.querySelector(".vjs-tip-inner").innerText=s.markerTip.text(t),p.style.left=y(t)+"%";var a=r(p),i=r(e);p.style.marginLeft=-parseFloat(a.width/2)+parseFloat(i.width/4)+"px",p.style.visibility="visible"}})),e.addEventListener("mouseout",(function(){p&&(p.style.visibility="hidden")}))}(t),t}(e)),d[e.key]=e,c.push(e)})),f()}function y(e){return s.markerTip.time(e)/m.duration()*100}function b(e,t){t.className="vjs-marker "+(e.class||""),Object.keys(s.markerStyle).forEach((function(e){t.style[e]=s.markerStyle[e]}));var a=e.time/m.duration();if((a<0||a>1)&&(t.style.display="none"),t.style.left=y(e)+"%",e.duration)t.style.width=e.duration/m.duration()*100+"%",t.style.marginLeft="0px";else{var i=r(t);t.style.marginLeft=i.width/2+"px"}}function E(e){h&&(g=o,h.style.visibility="hidden"),u=o;var t=[];e.forEach((function(e){var a=c[e];if(a){delete d[a.key],t.push(e);var i=m.el().querySelector(".vjs-marker[data-marker-key='"+a.key+"']");i&&i.parentNode.removeChild(i)}}));try{t.reverse(),t.forEach((function(e){c.splice(e,1)}))}catch(e){l.log(e)}f()}function S(){if(s.breakOverlay.display&&!(u<0)){var e=m.currentTime(),t=c[u],a=s.markerTip.time(t);e>=a&&e<=a+s.breakOverlay.displayTime?(g!==u&&(g=u,h&&(h.querySelector(".vjs-break-overlay-text").innerHTML=s.breakOverlay.text(t))),h&&(h.style.visibility="visible")):(g=o,h&&(h.style.visibility="hidden"))}}function P(){(function(){if(c.length){var t=function(e){return e=s.markerTip.time(c[u])&&a=s.markerTip.time(c[r])&&a
"}),m.el().querySelector(".vjs-progress-holder").appendChild(p)),m.markers.removeAll(),v(s.markers),s.breakOverlay.display&&(h=a.default.createEl("div",{className:"vjs-break-overlay",innerHTML:"
"}),Object.keys(s.breakOverlay.style).forEach((function(e){h&&(h.style[e]=s.breakOverlay.style[e])})),m.el().appendChild(h),g=o),P(),m.on("timeupdate",P),m.off("loadedmetadata")}m.on("loadedmetadata",(function(){M()})),m.markers={getMarkers:function(){return c},next:function(){for(var e=m.currentTime(),t=0;te){m.currentTime(a);break}}},prev:function(){for(var e=m.currentTime(),t=c.length-1;t>=0;t--){var a=s.markerTip.time(c[t]);if(a+.5 div");m&&(m.innerHTML=N.summary)}function V(e){if(void 0!==e&&void 0!==e.type)switch(e.type){case"network":case"private":case"unavailable":r(e.type),h(void 0!==e.message?e.message:"Αn error occurred while loading the media's data")}}return null!==C&&(_=t.media+"/"+C),(0,i.useEffect)((()=>{null!==_&&(0,d.getRequest)(_,!1,L,V)}),[]),v.length?i.createElement("div",{className:"video-player"},i.createElement(m.L9,{siteId:a.id,siteUrl:a.url,info:b,sources:v,poster:g,previewSprite:M,subtitlesInfo:S,enableAutoplay:!1,inEmbed:!1,hasTheaterMode:!1,hasNextLink:!1,hasPreviousLink:!1,errorMessage:l})):null}h.propTypes={pageLink:r().string.isRequired}}},a={};function i(e){var n=a[e];if(void 0!==n)return n.exports;var r=a[e]={exports:{}};return t[e].call(r.exports,r,r.exports,i),r.exports}i.m=t,e=[],i.O=function(t,a,n,r){if(!a){var l=1/0;for(c=0;c=r)&&Object.keys(i.O).every((function(e){return i.O[e](a[s])}))?a.splice(s--,1):(o=!1,r0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[a,n,r]},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=201,function(){var e={201:0};i.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,r,l=a[0],o=a[1],s=a[2],d=0;if(l.some((function(t){return 0!==e[t]}))){for(n in o)i.o(o,n)&&(i.m[n]=o[n]);if(s)var c=s(i)}for(t&&t(a);d');let a=null,i=null;!this.props.inEmbed&&l.MediaPageStore.get("playlist-id")?(a=l.MediaPageStore.get("playlist-next-media-url"),i=l.MediaPageStore.get("playlist-previous-media-url")):a=l.MediaPageStore.get("media-data").related_media.length&&!this.props.inEmbed?l.MediaPageStore.get("media-data").related_media[0].url:null,this.AudioPlayerData.instance=new(u())(this.refs.AudioElem,{sources:this.videoSources,poster:this.videoPoster,autoplay:!this.props.inEmbed,bigPlayButton:!0,controlBar:{fullscreen:!1,theaterMode:!1,next:!!a,previous:!!i},cornerLayers:{topLeft:e,topRight:this.upNextLoaderView?this.upNextLoaderView.html():null,bottomLeft:this.recommendedMedia?this.recommendedMedia.html():null,bottomRight:t}},{volume:l.VideoViewerStore.get("player-volume"),soundMuted:l.VideoViewerStore.get("player-sound-muted")},null,null,this.onAudioPlayerStateUpdate.bind(this),this.onClickNextButton.bind(this),this.onClickPreviousButton.bind(this)),this.upNextLoaderView&&(this.upNextLoaderView.setVideoJsPlayerElem(this.AudioPlayerData.instance.player.el_),this.onUpdateMediaAutoPlay()),this.refs.AudioElem.parentNode.focus(),this.AudioPlayerData.instance.player.one("play",function(){this.audioStartedPlaying=!0}.bind(this)),this.recommendedMedia&&(this.recommendedMedia.initWrappers(this.AudioPlayerData.instance.player.el_),this.AudioPlayerData.instance.player.one("pause",this.recommendedMedia.init),this.AudioPlayerData.instance.player.on("fullscreenchange",this.recommendedMedia.onResize),l.PageStore.on("window_resize",this.recommendedMedia.onResize),l.VideoViewerStore.on("changed_viewer_mode",this.recommendedMedia.onResize)),this.AudioPlayerData.instance.player.one("ended",this.onAudioEnd)}}.bind(this),50)}initialDocumentFocus(){this.refs.AudioElem.parentNode&&(this.refs.AudioElem.parentNode.focus(),setTimeout(function(){this.AudioPlayerData.instance.player.play()}.bind(this),50)),window.removeEventListener("focus",this.initialDocumentFocus),this.initialDocumentFocus=null}onClickNextButton(){let e;l.MediaPageStore.get("playlist-id")?(e=l.MediaPageStore.get("playlist-next-media-url"),null===e&&(e=l.MediaPageStore.get("media-data").related_media[0].url)):this.props.inEmbed||(e=l.MediaPageStore.get("media-data").related_media[0].url),window.location.href=e}onClickPreviousButton(){let e;l.MediaPageStore.get("playlist-id")?(e=l.MediaPageStore.get("playlist-previous-media-url"),null===e&&(e=l.MediaPageStore.get("media-data").related_media[0].url)):this.props.inEmbed||(e=l.MediaPageStore.get("media-data").related_media[0].url),window.location.href=e}onUpdateMediaAutoPlay(){this.upNextLoaderView&&(l.PageStore.get("media-auto-play")?this.upNextLoaderView.showTimerView(this.AudioPlayerData.instance.isEnded()):this.upNextLoaderView.hideTimerView())}onAudioPlayerStateUpdate(e){this.updatePlayerVolume(e.volume,e.soundMuted)}onAudioRestart(){this.recommendedMedia&&(this.recommendedMedia.updateDisplayType("inline"),this.AudioPlayerData.instance.player.one("pause",this.recommendedMedia.init),this.AudioPlayerData.instance.player.one("ended",this.onAudioEnd))}onAudioEnd(){if(this.recommendedMedia&&(this.recommendedMedia.updateDisplayType("full"),this.AudioPlayerData.instance.player.one("playing",this.onAudioRestart)),!this.props.inEmbed&&l.MediaPageStore.get("playlist-id")){const e=document.querySelector(".video-player .more-media"),t=document.querySelector(".video-player .vjs-actions-anim");this.upNextLoaderView.cancelTimer();const a=l.MediaPageStore.get("playlist-next-media-url");return a&&(e&&(e.style.display="none"),t&&(t.style.display="none"),window.location.href=a),void this.upNextLoaderView.hideTimerView()}this.upNextLoaderView&&(l.PageStore.get("media-auto-play")?(this.upNextLoaderView.startTimer(),this.AudioPlayerData.instance.player.one("play",function(){this.upNextLoaderView.cancelTimer()}.bind(this))):this.upNextLoaderView.cancelTimer())}onUpdateMediaAutoPlay(){this.upNextLoaderView&&(l.PageStore.get("media-auto-play")?this.upNextLoaderView.showTimerView(this.AudioPlayerData.instance.isEnded()):this.upNextLoaderView.hideTimerView())}updatePlayerVolume(e,t){l.VideoViewerStore.get("player-volume")!==e&&p.VideoViewerActions.set_player_volume(e),l.VideoViewerStore.get("player-sound-muted")!==t&&p.VideoViewerActions.set_player_sound_muted(t)}wrapperClick(e){e.target.parentNode===this.refs.videoPlayerWrap&&(this.AudioPlayerData.instance.player.ended()||(!this.AudioPlayerData.instance.player.hasStarted_||this.AudioPlayerData.instance.player.paused()?this.AudioPlayerData.instance.player.play():this.AudioPlayerData.instance.player.pause()))}render(){return n.createElement("div",{className:"player-container audio-player-container"},n.createElement("div",{className:"player-container-inner"},n.createElement("div",{className:"video-player",ref:"videoPlayerWrap",onClick:this.wrapperClick},n.createElement("audio",{tabIndex:"1",ref:"AudioElem",className:"video-js vjs-mediacms native-dimensions"}))))}}v.defaultProps={inEmbed:!1},v.propTypes={inEmbed:d().bool};var y=a(7664),b=function(e){let{children:t,content:a,title:i,position:r="right",classNames:l=""}=e;const[o,s]=(0,n.useState)(!1),[d,c]=(0,n.useState)({height:0,width:0}),u=(0,n.useRef)(null);(0,n.useEffect)((()=>{u.current&&c({height:u.current.clientHeight||0,width:u.current.clientWidth||0})}),[o]);const m={right:{left:"100%",marginLeft:"10px",top:"-50%"},left:{right:"100%",marginRight:"10px",top:"-50%"},top:{left:"50%",top:`-${d.height+10}px`,transform:"translateX(-50%)"},center:{top:"50%",left:"50%",translate:"x-[-50%]"},"bottom-left":{left:`-${d.width-20}px`,top:"100%",marginTop:"10px"}};return n.createElement("div",{onMouseEnter:()=>{s(!0)},onMouseLeave:()=>{s(!1)}},n.createElement("div",{ref:u,className:`tooltip-box ${o?"show":"hide"} ${l}`,style:m[r]},i&&n.createElement("div",{className:"tooltip-title"},i),n.createElement("div",{className:"tooltip-content"},a)),t)};function E(){const e=(0,n.useContext)(r.SiteContext);let t=v();t=t||l.MediaPageStore.get("media-data").thumbnail_url,t=t||"";const[a,i]=(0,n.useState)(t),[o,s]=(0,n.useState)([]),[d,c]=(0,n.useState)(!1),[u,m]=(0,n.useState)(0),[p,h]=(0,n.useState)(!0),g=n.useRef();function f(){i(v())}function v(){const t=l.MediaPageStore.get("media-data");let a=t.poster_url?.trim()||t.thumbnail_url?.trim()||l.MediaPageStore.get("media-original-url")?.trim()||"#";return e.url+"/"+a.replace(/^\//g,"")}(0,n.useEffect)((()=>{a&&(()=>{const e=l.MediaPageStore.get("media-data").slideshow_items;Array.isArray(e)&&s(e)})()}),[a]),(0,n.useEffect)((()=>(l.MediaPageStore.on("loaded_image_data",f),()=>l.MediaPageStore.removeListener("loaded_image_data",f))),[]),(0,n.useEffect)((()=>{if(d)return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}}),[d,o]);const E=e=>{"ArrowRight"===e.key&&P(),"ArrowLeft"===e.key&&M(),"Escape"===e.key&&S()},S=()=>c(!1),P=()=>{h(!0),m((e=>(e+1)%o.length))},M=()=>{h(!0),m((e=>(e-1+o.length)%o.length))},w=e=>{if(g.current){const t=10;"left"===e?g.current.scrollBy({left:-t,behavior:"smooth"}):"right"===e&&g.current.scrollBy({left:t,behavior:"smooth"})}};return a?n.createElement("div",{className:"viewer-image-container"},n.createElement(b,{content:"load full-image",position:"center"},n.createElement("img",{src:a,alt:l.MediaPageStore.get("media-data").title||null,onClick:()=>c(!0)})),d&&o&&n.createElement("div",{className:"modal-overlay",onClick:()=>c(!1)},n.createElement("div",{className:"slideshow-container",onClick:e=>e.stopPropagation()},!p&&n.createElement("button",{className:"arrow left",onClick:M,"aria-label":"Previous slide"},"‹"),n.createElement("div",{className:"slideshow-image"},p&&n.createElement(y.SpinnerLoader,{size:"large"}),n.createElement("img",{src:e.url+"/"+o[u]?.original_media_url,alt:`Slide ${u+1}`,onClick:()=>(t=>{const a=e.url+o[t]?.url;window.location.href=a})(u),onLoad:()=>h(!1),onError:()=>h(!1),style:{display:p?"none":"block"}}),!p&&n.createElement("div",{className:"slideshow-title"},o[u]?.title)),!p&&n.createElement("button",{className:"arrow right",onClick:P,"aria-label":"Next slide"},"›"),n.createElement("div",{className:"thumbnail-navigation"},o.length>5&&n.createElement("button",{className:"arrow left",onClick:()=>w("left"),"aria-label":"Scroll left"},"‹"),n.createElement("div",{className:"thumbnail-container "+(o.length<=5?"center-thumbnails":""),ref:g},o.map(((t,a)=>n.createElement("img",{key:a,src:e.url+"/"+t.thumbnail_url,alt:`Thumbnail ${a+1}`,className:"thumbnail "+(u===a?"active":""),onClick:()=>(e=>{h(!0),m(e)})(a)})))),o.length>5&&n.createElement("button",{className:"arrow right",onClick:()=>w("right"),"aria-label":"Scroll right"},"›"))))):null}var S=a(7118),P=a(5928);function M(e){let{fileUrl:t}=e;const a=(0,P.defaultLayoutPlugin)();return n.createElement("div",{className:"pdf-container"},n.createElement(S.Worker,{workerUrl:"https://unpkg.com/pdfjs-dist@3.4.120/build/pdf.worker.min.js"},n.createElement(S.Viewer,{fileUrl:t,plugins:[a]})))}var w=a(2818),k=a(5615),_=a(8974);class N extends n.PureComponent{constructor(e){if(super(e),this.state={displayPlayer:!1},this.videoSources=[],function(e){switch(e){case"running_X":l.MediaPageStore.set("media-load-error-type","encodingRunning"),l.MediaPageStore.set("media-load-error-message","Media encoding is currently running. Try again in few minutes.");break;case"pending_X":l.MediaPageStore.set("media-load-error-type","encodingPending"),l.MediaPageStore.set("media-load-error-message","Media encoding is pending");break;case"fail":l.MediaPageStore.set("media-load-error-type","encodingFailed"),l.MediaPageStore.set("media-load-error-message","Media encoding failed")}}(this.props.data.encoding_status),null!==l.MediaPageStore.get("media-load-error-type"))return void(this.state.displayPlayer=!0);if("string"==typeof this.props.data.poster_url?this.videoPoster=(0,m.formatInnerLink)(this.props.data.poster_url,this.props.siteUrl):"string"==typeof this.props.data.thumbnail_url&&(this.videoPoster=(0,m.formatInnerLink)(this.props.data.thumbnail_url,this.props.siteUrl)),this.videoInfo=(0,w.uW)(this.props.data.encodings_info,this.props.data.hls_info),Object.keys(this.videoInfo).length){let e=l.VideoViewerStore.get("video-quality");(null===e||"Auto"===e&&void 0===this.videoInfo.Auto)&&(e=720);let t=(0,w.OQ)(e,this.videoInfo);"Auto"===e&&void 0!==this.videoInfo.Auto&&this.videoSources.push({src:this.videoInfo.Auto.url[0]});const a=(0,w.n1)();let i,n;for(n=0;nemailEmail\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t',this.cornerLayers={topLeft:e,topRight:this.upNextLoaderView?this.upNextLoaderView.html():null,bottomLeft:this.recommendedMedia?this.recommendedMedia.html():null,bottomRight:this.props.inEmbed?a:null},this.setState({displayPlayer:!0},(function(){setTimeout((function(){const e=document.querySelector(".share-video-btn"),t=document.querySelector(".share-options-wrapper"),a=document.querySelector(".share-options-inner");e&&e.addEventListener("click",(function(e){(0,m.addClassname)(document.querySelector(".video-js.vjs-mediacms"),"vjs-visible-share-options")})),t&&t.addEventListener("click",(function(e){e.target!==a&&e.target!==t||(0,m.removeClassname)(document.querySelector(".video-js.vjs-mediacms"),"vjs-visible-share-options")}))}),1e3)}))}}componentWillUnmount(){this.unsetRecommendedMedia()}initRecommendedMedia(){null!==this.recommendedMedia&&(this.props.inEmbed||this.recommendedMedia.init(),this.playerInstance.player.on("fullscreenchange",this.recommendedMedia.onResize),l.PageStore.on("window_resize",this.recommendedMedia.onResize),l.VideoViewerStore.on("changed_viewer_mode",this.recommendedMedia.onResize))}unsetRecommendedMedia(){null!==this.recommendedMedia&&(this.playerInstance.player.off("fullscreenchange",this.recommendedMedia.onResize),l.PageStore.removeListener("window_resize",this.recommendedMedia.onResize),l.VideoViewerStore.removeListener("changed_viewer_mode",this.recommendedMedia.onResize),this.recommendedMedia.destroy())}onClickNext(){let e;l.MediaPageStore.get("playlist-id")?(e=l.MediaPageStore.get("playlist-next-media-url"),null===e&&(e=this.props.data.related_media[0].url)):this.props.inEmbed||(e=this.props.data.related_media[0].url),window.location.href=e}onClickPrevious(){let e;l.MediaPageStore.get("playlist-id")?(e=l.MediaPageStore.get("playlist-previous-media-url"),null===e&&(e=this.props.data.related_media[0].url)):this.props.inEmbed||(e=this.props.data.related_media[0].url),window.location.href=e}onStateUpdate(e){l.VideoViewerStore.get("in-theater-mode")!==e.theaterMode&&p.VideoViewerActions.set_viewer_mode(e.theaterMode),l.VideoViewerStore.get("player-volume")!==e.volume&&p.VideoViewerActions.set_player_volume(e.volume),l.VideoViewerStore.get("player-sound-muted")!==e.soundMuted&&p.VideoViewerActions.set_player_sound_muted(e.soundMuted),l.VideoViewerStore.get("video-quality")!==e.quality&&p.VideoViewerActions.set_video_quality(e.quality),l.VideoViewerStore.get("video-playback-speed")!==e.playbackSpeed&&p.VideoViewerActions.set_video_playback_speed(e.playbackSpeed)}onPlayerInit(e,t){this.playerElem=t,this.playerInstance=e,this.upNextLoaderView&&(this.upNextLoaderView.setVideoJsPlayerElem(this.playerInstance.player.el_),this.onUpdateMediaAutoPlay()),this.props.inEmbed||this.playerElem.parentNode.focus(),null!==this.recommendedMedia&&(this.recommendedMedia.initWrappers(this.playerElem.parentNode),this.props.inEmbed&&(this.playerInstance.player.one("pause",this.recommendedMedia.init),this.initRecommendedMedia())),this.playerInstance.player.one("ended",this.onVideoEnd)}onVideoRestart(){null!==this.recommendedMedia&&(this.recommendedMedia.updateDisplayType("inline"),this.props.inEmbed&&this.playerInstance.player.one("pause",this.recommendedMedia.init),this.playerInstance.player.one("ended",this.onVideoEnd))}onVideoEnd(){if(null!==this.recommendedMedia&&(this.props.inEmbed||this.initRecommendedMedia(),this.recommendedMedia.updateDisplayType("full"),this.playerInstance.player.one("playing",this.onVideoRestart)),!this.props.inEmbed&&l.MediaPageStore.get("playlist-id")){const e=document.querySelector(".video-player .more-media"),t=document.querySelector(".video-player .vjs-actions-anim");this.upNextLoaderView.cancelTimer();const a=l.MediaPageStore.get("playlist-next-media-url");return a&&(e&&(e.style.display="none"),t&&(t.style.display="none"),window.location.href=a),void this.upNextLoaderView.hideTimerView()}this.upNextLoaderView&&(l.PageStore.get("media-auto-play")?(this.upNextLoaderView.startTimer(),this.playerInstance.player.one("play",function(){this.upNextLoaderView.cancelTimer()}.bind(this))):this.upNextLoaderView.cancelTimer())}onUpdateMediaAutoPlay(){this.upNextLoaderView&&(l.PageStore.get("media-auto-play")?this.upNextLoaderView.showTimerView(this.playerInstance.isEnded()):this.upNextLoaderView.hideTimerView())}render(){let e=null,t=null;!this.props.inEmbed&&l.MediaPageStore.get("playlist-id")?(e=l.MediaPageStore.get("playlist-next-media-url"),t=l.MediaPageStore.get("playlist-previous-media-url")):e=this.props.data.related_media.length&&!this.props.inEmbed?this.props.data.related_media[0].url:null;const a=this.props.data.sprites_url?{url:this.props.siteUrl+"/"+this.props.data.sprites_url.replace(/^\//g,""),frame:{width:160,height:90,seconds:10}}:null;return n.createElement("div",{key:(this.props.inEmbed?"embed-":"")+"player-container",className:"player-container"+(this.videoSources.length?"":" player-container-error"),style:this.props.containerStyles,ref:"playerContainer"},n.createElement("div",{className:"player-container-inner",ref:"playerContainerInner",style:this.props.containerStyles},this.state.displayPlayer&&null!==l.MediaPageStore.get("media-load-error-type")?n.createElement(k.lg,{errorMessage:l.MediaPageStore.get("media-load-error-message")}):null,this.state.displayPlayer&&null==l.MediaPageStore.get("media-load-error-type")?n.createElement("div",{className:"video-player",ref:"videoPlayerWrapper",key:"videoPlayerWrapper"},n.createElement(r.SiteConsumer,null,(i=>n.createElement(k.L9,{playerVolume:this.browserCache.get("player-volume"),playerSoundMuted:this.browserCache.get("player-sound-muted"),videoQuality:this.browserCache.get("video-quality"),videoPlaybackSpeed:parseInt(this.browserCache.get("video-playback-speed"),10),inTheaterMode:this.browserCache.get("in-theater-mode"),siteId:i.id,siteUrl:i.url,info:this.videoInfo,cornerLayers:this.cornerLayers,sources:this.videoSources,poster:this.videoPoster,previewSprite:a,subtitlesInfo:this.props.data.subtitles_info,enableAutoplay:!this.props.inEmbed,inEmbed:this.props.inEmbed,hasTheaterMode:!this.props.inEmbed,hasNextLink:!!e,hasPreviousLink:!!t,errorMessage:l.MediaPageStore.get("media-load-error-message"),onClickNextCallback:this.onClickNext,onClickPreviousCallback:this.onClickPrevious,onStateUpdateCallback:this.onStateUpdate,onPlayerInitCallback:this.onPlayerInit})))):null))}}function C(e){let t=null,a=[];var i=location.search.substr(1).split("&");for(let n=0;n{const a=document.querySelector(".video-js.vjs-mediacms");if(a){const e=a.querySelector("video");e&&(function(e){if(!e||!e.tagName||"video"!==e.tagName.toLowerCase())return void _.error("Invalid video element:",e);const t=videojs(e);t.playsinline(!0),t.on("loadedmetadata",(function(){const e=parseInt(C("muted")),a=parseInt(C("autoplay")),i=parseInt(C("t"));document.addEventListener("click",(function(e){if(e.target.classList.contains("video-timestamp")){e.preventDefault();const a=parseInt(e.target.dataset.timestamp,10);a>=0&&a=0&&t.play()}})),1==e&&t.muted(!0),i>=0&&i=0&&i>=t.duration()&&t.play(),1===a&&t.play()}))}(e),t.disconnect())}})).observe(document,{childList:!0,subtree:!0});var x=a(5338),L=a(6619),V=a(4350);a(6880);const A={single:(0,m.translateString)("comment"),uppercaseSingle:(0,m.translateString)("COMMENT"),ucfirstSingle:(0,m.translateString)("Comment"),ucfirstPlural:(0,m.translateString)("Comments"),submitCommentText:(0,m.translateString)("SUBMIT"),disabledCommentsMsg:(0,m.translateString)("Comments are disabled")};function I(e){const t=(0,n.useRef)(null),[a,i]=(0,n.useState)(""),[o,s]=(0,n.useState)(!1),[d,c]=(0,n.useState)(!1),[u,h]=(0,n.useState)(-1),[g,f]=(0,n.useState)(""),[v]=(0,n.useState)(r.MemberContext._currentValue.is.anonymous?r.LinksContext._currentValue.signin+"?next=/"+window.location.href.replace(r.SiteContext._currentValue.url,"").replace(/^\//g,""):null);function b(){c(!0)}function E(){c(!1)}function S(){const e=[...l.MediaPageStore.get("users")],t=[];e.forEach((e=>{t.push({id:e.username,display:e.name})})),f(t)}function P(){t.current.style.height="";const e=t.current.scrollHeight,a=0(l.MediaPageStore.on("comment_submit",P),l.MediaPageStore.on("comment_submit_fail",M),!0===MediaCMS.features.media.actions.comment_mention&&l.MediaPageStore.on("users_load",S),()=>{l.MediaPageStore.removeListener("comment_submit",P),l.MediaPageStore.removeListener("comment_submit_fail",M),!0===MediaCMS.features.media.actions.comment_mention&&l.MediaPageStore.removeListener("users_load",S)}))),r.MemberContext._currentValue.is.anonymous?n.createElement("div",{className:"comments-form"},n.createElement("div",{className:"comments-form-inner"},n.createElement(y.UserThumbnail,null),n.createElement("div",{className:"form"},n.createElement("a",{href:v,rel:"noffolow",className:"form-textarea-wrap",title:(0,m.translateString)("Add a ")+A.single+"..."},n.createElement("span",{className:"form-textarea"},(0,m.translateString)("Add a ")+A.single+"...")),n.createElement("div",{className:"form-buttons"},n.createElement("a",{href:v,rel:"noffolow",className:"disabled"},A.submitCommentText))))):n.createElement("div",{className:"comments-form"},n.createElement("div",{className:"comments-form-inner"},n.createElement(y.UserThumbnail,null),n.createElement("div",{className:"form"},n.createElement("div",{className:"form-textarea-wrap"+(d?" focused":"")},MediaCMS.features.media.actions.comment_mention?n.createElement(L.G,{inputRef:t,className:"form-textarea",rows:"1",placeholder:"Add a "+A.single+"...",value:a,onChange:function(e,a,n,r){t.current.style.height="",i(a),s(!0);const l=t.current.scrollHeight,o=0()=>{}),[]),n.createElement("div",{className:"comment"},n.createElement("div",{className:"comment-inner"},n.createElement("a",{className:"comment-author-thumb",href:e.author_link,title:e.author_name},n.createElement("img",{src:e.author_thumb,alt:e.author_name})),n.createElement("div",{className:"comment-content"},n.createElement("div",{className:"comment-meta"},n.createElement("div",{className:"comment-author"},n.createElement("a",{href:e.author_link,title:e.author_name},e.author_name)),n.createElement("div",{className:"comment-date"},(0,m.replaceString)((0,V.GP)(new Date(e.publish_date))))),n.createElement("div",{ref:t,className:"comment-text"+(i?" show-all":"")},n.createElement("div",{ref:a,className:"comment-text-inner",dangerouslySetInnerHTML:(d=e.text,{__html:d.replace(/\n/g,"
")})})),o?n.createElement("button",{className:"toggle-more",onClick:function(){l(!i)}},i?"Show less":"Read more"):null,r.MemberContext._currentValue.can.deleteComment?n.createElement(T,{comment_id:e.comment_id}):null)));var d}R.propTypes={comment_id:d().oneOfType([d().string,d().number]).isRequired,media_id:d().oneOfType([d().string,d().number]).isRequired,text:d().string,author_name:d().string,author_link:d().string,author_thumb:d().string,publish_date:d().oneOfType([d().string,d().number]),likes:d().number,dislikes:d().number},R.defaultProps={author_name:"",author_link:"#",publish_date:0,likes:0,dislikes:0};const D=e=>{let{commentsLength:t}=e;return n.createElement(n.Fragment,null,!r.MemberContext._currentValue.can.readComment||l.MediaPageStore.get("media-data").enable_comments?null:n.createElement("span",{className:"disabled-comments-msg"},A.disabledCommentsMsg),r.MemberContext._currentValue.can.readComment&&(l.MediaPageStore.get("media-data").enable_comments||r.MemberContext._currentValue.can.editMedia)?n.createElement("h2",null,t?1{e.text=function(e){const t=new RegExp("((\\d)?\\d:)?(\\d)?\\d:\\d\\d","g");return e.replace(t,(function(e,t){let a=e.split(":"),i=0,n=1;for(;a.length>0;)i+=n*parseInt(a.pop(),10),n*=60;return`${e}`}))}(e.text)})),function(){var e=document.querySelector(".page-main"),t=e.querySelector(".no-comment");const a=l.PageStore.get("config-contents").uploader.postUploadMessage;if(""===a)t&&0===comm.length&&t.parentNode.removeChild(t);else if(0===comm.length&&"unlisted"===l.MediaPageStore.get("media-data").state){if(-1p.PageActions.addNotification(A.ucfirstSingle+" added","commentSubmit")),100)}function m(){setTimeout((()=>p.PageActions.addNotification(A.ucfirstSingle+" submission failed","commentSubmitFail")),100)}function h(e){c(),setTimeout((()=>p.PageActions.addNotification(A.ucfirstSingle+" removed","commentDelete")),100)}function g(e){setTimeout((()=>p.PageActions.addNotification(A.ucfirstSingle+" removal failed","commentDeleteFail")),100)}return(0,n.useEffect)((()=>{d(i.length&&r.MemberContext._currentValue.can.readComment&&(l.MediaPageStore.get("media-data").enable_comments||r.MemberContext._currentValue.can.editMedia))}),[i]),(0,n.useEffect)((()=>(l.MediaPageStore.on("comments_load",c),l.MediaPageStore.on("comment_submit",u),l.MediaPageStore.on("comment_submit_fail",m),l.MediaPageStore.on("comment_delete",h),l.MediaPageStore.on("comment_delete_fail",g),()=>{l.MediaPageStore.removeListener("comments_load",c),l.MediaPageStore.removeListener("comment_submit",u),l.MediaPageStore.removeListener("comment_submit_fail",m),l.MediaPageStore.removeListener("comment_delete",h),l.MediaPageStore.removeListener("comment_delete_fail",g)})),[]),n.createElement("div",{className:"comments-list"},n.createElement("div",{className:"comments-list-inner"},n.createElement(D,{commentsLength:i.length}),l.MediaPageStore.get("media-data").enable_comments?n.createElement(I,{media_id:t}):null,s?i.map((e=>n.createElement(R,{key:e.uid,comment_id:e.uid,media_id:t,text:e.text,author_name:e.author_name,author_link:e.author_profile,author_thumb:r.SiteContext._currentValue.url+"/"+e.author_thumbnail_url.replace(/^\//g,""),publish_date:e.add_date,likes:0,dislikes:0}))):null))}var O=a(8974);function q(e){let t,a,i=[];if(e&&e.length)for(t=0,a=1(l.MediaPageStore.on("media_delete",b),l.MediaPageStore.on("media_delete_fail",E),()=>{l.MediaPageStore.removeListener("media_delete",b),l.MediaPageStore.removeListener("media_delete_fail",E)})),[]);const S=(0,m.formatInnerLink)(e.author.url,r.SiteContext._currentValue.url),P=(0,m.formatInnerLink)(e.author.thumb,r.SiteContext._currentValue.url);return n.createElement("div",{className:"media-info-content"},void 0===l.PageStore.get("config-media-item").displayAuthor||null===l.PageStore.get("config-media-item").displayAuthor||l.PageStore.get("config-media-item").displayAuthor?n.createElement(j,{link:S,thumb:P,name:e.author.name,published:e.published}):null,n.createElement("div",{className:"media-content-banner"},n.createElement("div",{className:"media-content-banner-inner"},h?n.createElement("div",{className:"media-content-summary"},s):null,h&&!f||!a?null:n.createElement("div",{className:"media-content-description",dangerouslySetInnerHTML:{__html:function(e){const t=new RegExp("((\\d)?\\d:)?(\\d)?\\d:\\d\\d","g");return e.replace(t,(function(e,t){let a=e.split(":"),i=0,n=1;for(;a.length>0;)i+=n*parseInt(a.pop(),10),n*=60;return`${e}`}))}(a)}}),h?n.createElement("button",{className:"load-more",onClick:function(){v(!f)}},f?"SHOW LESS":"SHOW MORE"):null,i.length?n.createElement(z,{value:i,title:1(l.MediaPageStore.on("disliked_media",s),l.MediaPageStore.on("undisliked_media",d),l.MediaPageStore.on("disliked_media_failed_request",c),()=>{l.MediaPageStore.removeListener("disliked_media",s),l.MediaPageStore.removeListener("undisliked_media",d),l.MediaPageStore.removeListener("disliked_media_failed_request",c)})),[]),n.createElement("div",{className:"like"},n.createElement("button",{onClick:function(t){t.preventDefault(),t.stopPropagation(),p.MediaPageActions[e?"undislikeMedia":"dislikeMedia"]()}},n.createElement(y.CircleIconButton,{type:"span"},n.createElement(y.MaterialIcon,{type:"thumb_down"})),n.createElement("span",{className:"dislikes-counter"},a)))}function W(){const[e,t]=(0,n.useState)(l.MediaPageStore.get("user-liked-media")),[a,i]=(0,n.useState)((0,m.formatViewsNumber)(l.MediaPageStore.get("media-likes"),!1));function o(){t(l.MediaPageStore.get("user-liked-media")),i((0,m.formatViewsNumber)(l.MediaPageStore.get("media-likes"),!1))}function s(){o(),p.PageActions.addNotification(r.TextsContext._currentValue.addToLiked,"likedMedia")}function d(){o(),p.PageActions.addNotification(r.TextsContext._currentValue.removeFromLiked,"unlikedMedia")}function c(){p.PageActions.addNotification("Action failed","likedMediaRequestFail")}return(0,n.useEffect)((()=>(l.MediaPageStore.on("liked_media",s),l.MediaPageStore.on("unliked_media",d),l.MediaPageStore.on("liked_media_failed_request",c),()=>{l.MediaPageStore.removeListener("liked_media",s),l.MediaPageStore.removeListener("unliked_media",d),l.MediaPageStore.removeListener("liked_media_failed_request",c)})),[]),n.createElement("div",{className:"like"},n.createElement("button",{onClick:function(t){t.preventDefault(),t.stopPropagation(),p.MediaPageActions[e?"unlikeMedia":"likeMedia"]()}},n.createElement(y.CircleIconButton,{type:"span"},n.createElement(y.MaterialIcon,{type:"thumb_up"})),n.createElement("span",{className:"likes-counter"},a)))}function Q(e){const t=(0,n.useRef)(null),a=(0,n.useRef)(null),[i,r]=(0,n.useState)(null);function o(){r(window.innerHeight-(104+t.current.offsetHeight))}return(0,n.useEffect)((()=>(o(),l.PageStore.on("window_resize",o),()=>{l.PageStore.removeListener("window_resize",o)})),[]),n.createElement("form",null,n.createElement("div",{className:"report-form",style:null!==i?{maxHeight:i+"px"}:null},n.createElement("div",{className:"form-title"},"Report media"),n.createElement("div",{className:"form-field"},n.createElement("span",{className:"label"},"URL"),n.createElement("input",{type:"text",readOnly:!0,value:e.mediaUrl})),n.createElement("div",{className:"form-field"},n.createElement("span",{className:"label"},"Description"),n.createElement("textarea",{ref:a,required:!0})),n.createElement("div",{className:"form-field form-help-text"},"Reported media is reviewed")),n.createElement("div",{ref:t,className:"form-actions-bottom"},n.createElement("button",{className:"cancel",onClick:function(t){t.preventDefault(),void 0!==e.cancelReportForm&&e.cancelReportForm()}},"CANCEL"),n.createElement("button",{onClick:function(t){const i=a.current.value.trim();""!==i&&(t.preventDefault(),void 0!==e.submitReportForm&&e.submitReportForm(i))}},"SUBMIT")))}function $(e,t){const a=r.SiteContext._currentValue,i=e.encodings_info,n={};let l,o;for(l in i)if(i.hasOwnProperty(l)&&Object.keys(i[l]).length)for(o in i[l])i[l].hasOwnProperty(o)&&"success"===i[l][o].status&&100===i[l][o].progress&&null!==i[l][o].url&&(n[i[l][o].title]={text:l+" - "+o.toUpperCase()+" ("+i[l][o].size+")",link:(0,m.formatInnerLink)(i[l][o].url,a.url),linkAttr:{target:"_blank",download:e.title+"_"+l+"_"+o.toUpperCase()}});return n.original_media_url={text:"Original file ("+e.size+")",link:(0,m.formatInnerLink)(e.original_media_url,a.url),linkAttr:{target:"_blank",download:e.title}},Object.values(n)}function Y(e,t,a,i,r,l,o){const s=t.url,d=t.media_type,c=t.state||"N/A",u=t.encoding_status||"N/A",m=t.reported_times,p=t.is_reviewed,h="video"===d,g=function(e,t,a,i,n){const r=[],l="video"===t.media_type,o=t.reported_times;return a&&e.downloadMedia&&(l?r.push({itemType:"open-subpage",text:"Download",icon:"arrow_downward",itemAttr:{className:"visible-only-in-small"},buttonAttr:{className:"change-page","data-page-id":"videoDownloadOptions"}}):i&&r.push({itemType:"link",link:i,text:"Download",icon:"arrow_downward",itemAttr:{className:"visible-only-in-small"},linkAttr:{target:"_blank",download:t.title}})),l&&e.editMedia&&r.push({itemType:"open-subpage",text:"Status info",icon:"info",buttonAttr:{className:"change-page","data-page-id":"mediaStatusInfo"}}),e.reportMedia&&(n?r.push({itemType:"div",text:"Reported",icon:"flag",divAttr:{className:"reported-label loggedin-media-reported"}}):r.push({itemType:"open-subpage",text:"Report",icon:"flag",buttonAttr:{className:"change-page"+(o?" loggedin-media-reported":""),"data-page-id":"loggedInReportMedia"}})),r}(e,t,a,i,r),f={};return g.length&&(f.main=n.createElement("div",{className:"main-options"},n.createElement(y.PopupMain,null,n.createElement(y.NavigationMenuList,{items:g})))),e.reportMedia&&(f.loggedInReportMedia=r?null:n.createElement("div",{className:"popup-fullscreen"},n.createElement(y.PopupMain,null,n.createElement("span",{className:"popup-fullscreen-overlay"}),n.createElement("div",null,n.createElement(Q,{mediaUrl:s,submitReportForm:l,cancelReportForm:o}))))),e.editMedia&&(f.mediaStatusInfo=n.createElement("div",{className:"main-options"},n.createElement(y.PopupMain,null,n.createElement("ul",{className:"media-status-info"},n.createElement("li",null,"Media type: ",n.createElement("span",null,d)),n.createElement("li",null,"State: ",n.createElement("span",null,c)),n.createElement("li",null,"Review state: ",n.createElement("span",null,p?"Is reviewed":"Pending review")),h?n.createElement("li",null,"Encoding Status: ",n.createElement("span",null,u)):null,m?n.createElement("li",{className:"reports"},"Reports: ",n.createElement("span",null,m)):null)))),a&&e.downloadMedia&&h&&(f.videoDownloadOptions=n.createElement("div",{className:"video-download-options"},n.createElement(y.PopupMain,null,n.createElement(y.NavigationMenuList,{items:$(t)})))),f}Q.propTypes={mediaUrl:d().string.isRequired,cancelReportForm:d().func,submitReportForm:d().func};const G="more-options active-options";function Z(e){const{userCan:t}=(0,x.useUser)(),a=r.SiteContext._currentValue,i=(0,m.formatInnerLink)(l.MediaPageStore.get("media-original-url"),a.url),o=l.MediaPageStore.get("media-data"),s="video"===o.media_type,[d,c,u]=(0,x.usePopup)(),[h,g]=(0,n.useState)(!1),[f,v]=(0,n.useState)(!1),[b,E]=(0,n.useState)({}),[S,P]=(0,n.useState)("main"),[M,w]=(0,n.useState)(G);function k(e){p.MediaPageActions.reportMedia(e)}function _(){d.current.toggle()}function N(){d.current.tryToHide(),setTimeout((function(){p.PageActions.addNotification("Media Reported","reportedMedia"),v(!0),l.MediaPageStore.removeListener("reported_media",N)}),100)}return(0,n.useEffect)((()=>{f||(h?l.MediaPageStore.on("reported_media",N):l.MediaPageStore.removeListener("reported_media",N))}),[h]),(0,n.useEffect)((()=>{g(Object.keys(b).length&&e.allowDownload&&t.downloadMedia)}),[b]),(0,n.useEffect)((()=>{let a=G;e.allowDownload&&t.downloadMedia&&"videoDownloadOptions"===S&&(a+=" video-downloads"),1===Object.keys(b).length&&e.allowDownload&&t.downloadMedia&&(s||i)&&(a+=" visible-only-in-small"),w(a)}),[S]),(0,n.useEffect)((()=>{E(Y(t,o,e.allowDownload,i,f,k,_))}),[f]),(0,n.useEffect)((()=>(E(Y(t,o,e.allowDownload,i,f,k,_)),()=>{h&&!f&&l.MediaPageStore.removeListener("reported_media",N)})),[]),h?n.createElement("div",{className:M},n.createElement(u,{contentRef:d},n.createElement("span",null,n.createElement(y.CircleIconButton,{type:"button"},n.createElement(y.MaterialIcon,{type:"more_horiz"})))),n.createElement("div",{className:"nav-page-"+S},n.createElement(c,{contentRef:d,hideCallback:function(){P("main")}},n.createElement(y.NavigationContentApp,{pageChangeCallback:function(e){P(e)},initPage:S,focusFirstItemOnPageChange:!1,pages:b,pageChangeSelector:".change-page",pageIdSelectorAttr:"data-page-id"})))):null}Z.propTypes={allowDownload:d().bool.isRequired},Z.defaultProps={allowDownload:!1};var X=a(3706);function J(e){return e.renderDate?n.createElement("label",null,n.createElement("input",{type:"checkbox",checked:e.isChecked,onChange:function(t){t.persist(),e.isChecked?p.MediaPageActions.removeMediaFromPlaylist(e.playlistId,l.MediaPageStore.get("media-id")):p.MediaPageActions.addMediaToPlaylist(e.playlistId,l.MediaPageStore.get("media-id"))}}),n.createElement("span",null,e.title)):null}function K(e){const t=(0,n.useRef)(null),a=(0,n.useRef)(null),[i,r]=(0,n.useState)(new Date),[o,s]=(0,n.useState)(l.MediaPageStore.get("playlists")),[d,c]=(0,n.useState)(!1);function u(){b()}function m(){s(l.MediaPageStore.get("playlists")),r(new Date)}function h(){s(l.MediaPageStore.get("playlists")),r(new Date),setTimeout((function(){p.PageActions.addNotification("Media added to playlist","playlistMediaAdditionComplete")}),100)}function g(){setTimeout((function(){p.PageActions.addNotification("Media's addition to playlist failed","playlistMediaAdditionFail")}),100)}function f(){s(l.MediaPageStore.get("playlists")),r(new Date),setTimeout((function(){p.PageActions.addNotification("Media removed from playlist","playlistMediaRemovalComplete")}),100)}function v(){setTimeout((function(){p.PageActions.addNotification("Media's removal from playlist failed","playlistMediaaRemovalFail")}),100)}function b(){null!==a.current&&(a.current.style.maxHeight=window.innerHeight-74-(t.current.offsetHeight-a.current.offsetHeight)+"px")}function E(){c(!d),b()}return(0,n.useEffect)((()=>{b()})),(0,n.useEffect)((()=>(l.PageStore.on("window_resize",u),l.MediaPageStore.on("playlists_load",m),l.MediaPageStore.on("media_playlist_addition_completed",h),l.MediaPageStore.on("media_playlist_addition_failed",g),l.MediaPageStore.on("media_playlist_removal_completed",f),l.MediaPageStore.on("media_playlist_removal_failed",v),()=>{l.PageStore.removeListener("window_resize",u),l.MediaPageStore.removeListener("playlists_load",m),l.MediaPageStore.removeListener("media_playlist_addition_completed",h),l.MediaPageStore.removeListener("media_playlist_addition_failed",g),l.MediaPageStore.removeListener("media_playlist_removal_completed",f),l.MediaPageStore.removeListener("media_playlist_removal_failed",v)})),[]),n.createElement("div",{ref:t,className:"saveto-popup"},n.createElement("div",{className:"saveto-title"},"Save to...",n.createElement(y.CircleIconButton,{type:"button",onClick:function(){c(!1),void 0!==e.triggerPopupClose&&e.triggerPopupClose()}},n.createElement(y.MaterialIcon,{type:"close"}))),o.length?n.createElement("div",{ref:a,className:"saveto-select"},function(){const e=l.MediaPageStore.get("media-id");let t=[],a=0;for(;a{m(window.innerHeight-144+56),x(s.current.offsetHeight),V(c.current.offsetHeight)})),(0,n.useEffect)((()=>(l.PageStore.on("window_resize",T),l.MediaPageStore.on("copied_embed_media_code",R),()=>{l.PageStore.removeListener("window_resize",T),l.MediaPageStore.removeListener("copied_embed_media_code",R)})),[]),n.createElement("div",{className:"share-embed",style:{maxHeight:u+"px"}},n.createElement("div",{className:"share-embed-inner"},n.createElement("div",{className:"on-left"},n.createElement("div",{className:"media-embed-wrap"},n.createElement(N,{data:l.MediaPageStore.get("media-data"),inEmbed:!0}))),n.createElement("div",{ref:o,className:"on-right"},n.createElement("div",{ref:s,className:"on-right-top"},n.createElement("div",{className:"on-right-top-inner"},n.createElement("span",{className:"ttl"},"Embed Video"),n.createElement(y.CircleIconButton,{type:"button",onClick:function(){void 0!==e.triggerPopupClose&&e.triggerPopupClose()}},n.createElement(y.MaterialIcon,{type:"close"})))),n.createElement("div",{ref:d,className:"on-right-middle",style:{top:C+"px",bottom:L+"px"}},n.createElement("textarea",{readOnly:!0,value:''}),n.createElement("div",{className:"iframe-config"},n.createElement("div",{className:"iframe-config-options-title"},"Embed options"),n.createElement("div",{className:"iframe-config-option"},n.createElement("div",{className:"option-content"},n.createElement("div",{className:"ratio-options"},n.createElement("div",{className:"options-group"},n.createElement("label",{style:{minHeight:"36px"}},n.createElement("input",{type:"checkbox",checked:h,onChange:function(){const e=!h,t=f.split(":"),a=t[0],i=t[1];g(e),P(e?"px":S),_(e?"px":k),w(e?parseInt(b*i/a,10):M),I(e?[{key:"px",label:"px"}]:[{key:"px",label:"px"},{key:"percent",label:"%"}])}}),"Keep aspect ratio")),h?n.createElement("div",{className:"options-group"},n.createElement("select",{ref:i,onChange:function(){const e=i.current.value,t=e.split(":"),a=t[0],n=t[1];v(e),w(h?parseInt(b*n/a,10):M)},value:f},n.createElement("optgroup",{label:"Horizontal orientation"},n.createElement("option",{value:"16:9"},"16:9"),n.createElement("option",{value:"4:3"},"4:3"),n.createElement("option",{value:"3:2"},"3:2")),n.createElement("optgroup",{label:"Vertical orientation"},n.createElement("option",{value:"9:16"},"9:16"),n.createElement("option",{value:"3:4"},"3:4"),n.createElement("option",{value:"2:3"},"2:3")))):null),n.createElement("br",null),n.createElement("div",{className:"options-group"},n.createElement(y.NumericInputWithUnit,{valueCallback:function(e){e=""===e?0:e;const t=f.split(":"),a=t[0],i=t[1];E(e),w(h?parseInt(e*i/a,10):M)},unitCallback:function(e){P(e)},label:"Width",defaultValue:parseInt(b,10),defaultUnit:S,minValue:1,maxValue:99999,units:A})),n.createElement("div",{className:"options-group"},n.createElement(y.NumericInputWithUnit,{valueCallback:function(e){e=""===e?0:e;const t=f.split(":"),a=t[0],i=t[1];w(e),E(h?parseInt(e*a/i,10):b)},unitCallback:function(e){_(e)},label:"Height",defaultValue:parseInt(M,10),defaultUnit:k,minValue:1,maxValue:99999,units:A})))))),n.createElement("div",{ref:c,className:"on-right-bottom"},n.createElement("button",{onClick:function(){p.MediaPageActions.copyEmbedMediaCode(d.current.querySelector("textarea"))}},"COPY")))))}J.propTypes={playlistId:d().string,isChecked:d().bool,title:d().string},J.defaultProps={isChecked:!1,title:""},K.propTypes={triggerPopupClose:d().func},te.propTypes={triggerPopupClose:d().func};var ae=a(5289);function ie(e){let{onClick:t}=e;return n.createElement("span",{className:"next-slide"},n.createElement(y.CircleIconButton,{buttonShadow:!0,onClick:t},n.createElement("i",{className:"material-icons"},"keyboard_arrow_right")))}function ne(e){let{onClick:t}=e;return n.createElement("span",{className:"previous-slide"},n.createElement(y.CircleIconButton,{buttonShadow:!0,onClick:t},n.createElement("i",{className:"material-icons"},"keyboard_arrow_left")))}function re(){return{maxFormContentHeight:window.innerHeight-196,maxPopupWidth:518>window.innerWidth-80?window.innerWidth-80:null}}function le(e){const t=(0,n.useRef)(null),a=(0,n.useRef)(null),i=l.MediaPageStore.get("media-url"),[o,s]=(0,n.useState)(null),[d,c]=(0,n.useState)({prev:!1,next:!1}),[u,m]=(0,n.useState)(re()),[h]=(0,n.useState)(function(){const e=function(){const e=r.ShareOptionsContext._currentValue,t=l.MediaPageStore.get("media-url"),a=l.MediaPageStore.get("media-data").title,i={};let n=0;for(;n{s(new ae.A(a.current,".sh-option"))}),[h]),(0,n.useEffect)((()=>{o&&(o.updateDataStateOnResize(h.length,!0,!0),k())}),[u,o]),(0,n.useEffect)((()=>{l.PageStore.on("window_resize",M),l.MediaPageStore.on("copied_media_link",w);const e=function(){const e=document.getElementsByTagName("video");return e[0]?.currentTime}();return f(e),y(function(e){let t=parseInt(e,10),a=Math.floor(t/3600),i=Math.floor((t-3600*a)/60),n=t-3600*a-60*i;return a<10&&(a="0"+a),i<10&&(i="0"+i),n<10&&(n="0"+n),a>=1?a+":"+i+":"+n:i+":"+n}(e)),()=>{l.PageStore.removeListener("window_resize",M),l.MediaPageStore.removeListener("copied_media_link",w),s(null)}}),[]),n.createElement("div",{ref:t,style:null!==u.maxPopupWidth?{maxWidth:u.maxPopupWidth+"px"}:null},n.createElement("div",{className:"scrollable-content",style:null!==u.maxFormContentHeight?{maxHeight:u.maxFormContentHeight+"px"}:null},n.createElement("div",{className:"share-popup-title"},"Share media"),h.length?n.createElement("div",{className:"share-options"},d.prev?n.createElement(ne,{onClick:function(){o.previousSlide(),k()}}):null,n.createElement("div",{ref:a,className:"share-options-inner"},h),d.next?n.createElement(ie,{onClick:function(){o.nextSlide(),k()}}):null):null),n.createElement("div",{className:"copy-field"},n.createElement("div",null,n.createElement("input",{type:"text",readOnly:!0,value:S}),n.createElement("button",{onClick:function(){p.MediaPageActions.copyShareLink(t.current.querySelector(".copy-field input"))}},"COPY"))),n.createElement("div",{className:"start-at"},n.createElement("label",null,n.createElement("input",{type:"checkbox",name:"start-at-checkbox",id:"id-start-at-checkbox",checked:b,onChange:function(){E(!b),function(){const e=b?i:i+"&t="+Math.trunc(g);P(e)}()}}),"Start at ",v)))}function oe(){return{shareOptions:n.createElement("div",{className:"popup-fullscreen"},n.createElement(y.PopupMain,null,n.createElement("span",{className:"popup-fullscreen-overlay"}),n.createElement(le,null)))}}function se(e){const[t,a,i]=(0,x.usePopup)(),[r,l]=(0,n.useState)("shareOptions");return n.createElement("div",{className:"share"},n.createElement(i,{contentRef:t},n.createElement("button",null,n.createElement(y.CircleIconButton,{type:"span"},n.createElement(y.MaterialIcon,{type:"share"})),n.createElement("span",null,(0,m.translateString)("SHARE")))),n.createElement(a,{contentRef:t,hideCallback:function(){l("shareOptions")}},n.createElement(y.NavigationContentApp,{initPage:r,pageChangeSelector:".change-page",pageIdSelectorAttr:"data-page-id",pages:e.isVideo?(o=function(){t.current.toggle()},{...oe(),shareEmbed:n.createElement("div",{className:"popup-fullscreen share-embed-popup"},n.createElement(y.PopupMain,null,n.createElement("span",{className:"popup-fullscreen-overlay"}),n.createElement(te,{triggerPopupClose:o})))}):oe(),focusFirstItemOnPageChange:!1,pageChangeCallback:function(e){l(e)}})));var o}function de(e){return n.createElement("div",{className:"download hidden-only-in-small"},n.createElement("a",{href:e.link,target:"_blank",download:e.title,title:"Download",rel:"noreferrer"},n.createElement(y.CircleIconButton,{type:"span"},n.createElement(y.MaterialIcon,{type:"arrow_downward"})),n.createElement("span",null,"DOWNLOAD")))}function ce(){const e=l.MediaPageStore.get("media-data"),t=(e.title,e.encodings_info),a={};let i,n;for(i in t)if(t.hasOwnProperty(i)&&Object.keys(t[i]).length)for(n in t[i])t[i].hasOwnProperty(n)&&"success"===t[i][n].status&&100===t[i][n].progress&&null!==t[i][n].url&&(a[t[i][n].title]={text:i+" - "+n.toUpperCase()+" ("+t[i][n].size+")",link:(0,m.formatInnerLink)(t[i][n].url,r.SiteContext._currentValue.url),linkAttr:{target:"_blank",download:e.title+"_"+i+"_"+n.toUpperCase()}});return a.original_media_url={text:"Original file ("+e.size+")",link:(0,m.formatInnerLink)(e.original_media_url,r.SiteContext._currentValue.url),linkAttr:{target:"_blank",download:e.title}},Object.values(a)}function ue(e){const[t,a,i]=(0,x.usePopup)(),[r,l]=(0,n.useState)("main");return n.createElement("div",{className:"video-downloads hidden-only-in-small"},n.createElement(i,{contentRef:t},n.createElement("button",null,n.createElement(y.CircleIconButton,{type:"span"},n.createElement(y.MaterialIcon,{type:"arrow_downward"})),n.createElement("span",null,(0,m.translateString)("DOWNLOAD")))),n.createElement("div",{className:"nav-page-"+r},n.createElement(a,{contentRef:t},n.createElement(y.NavigationContentApp,{pageChangeCallback:null,initPage:"main",focusFirstItemOnPageChange:!1,pages:{main:n.createElement("div",{className:"main-options"},n.createElement(y.PopupMain,null,n.createElement(y.NavigationMenuList,{items:ce()})))},pageChangeSelector:".change-page",pageIdSelectorAttr:"data-page-id"}))))}de.propTypes={link:d().string.isRequired,title:d().string.isRequired};class me extends n.PureComponent{constructor(e){super(e),this.state={likedMedia:l.MediaPageStore.get("user-liked-media"),dislikedMedia:l.MediaPageStore.get("user-disliked-media")},this.downloadLink="video"!==l.MediaPageStore.get("media-type")?(0,m.formatInnerLink)(l.MediaPageStore.get("media-original-url"),r.SiteContext._currentValue.url):null,this.updateStateValues=this.updateStateValues.bind(this)}componentDidMount(){l.MediaPageStore.on("liked_media",this.updateStateValues),l.MediaPageStore.on("unliked_media",this.updateStateValues),l.MediaPageStore.on("disliked_media",this.updateStateValues),l.MediaPageStore.on("undisliked_media",this.updateStateValues);const e=document.querySelectorAll("[data-tooltip]");e.length&&e.forEach((e=>function(e){const t=document.body,a=document.createElement("span");function i(){const t=e.getBoundingClientRect();a.style.top=t.top-(0+a.offsetHeight)+"px",a.style.left=t.left+"px"}a.innerText=e.getAttribute("data-tooltip"),a.setAttribute("class","tooltip"),e.removeAttribute("data-tooltip"),e.addEventListener("mouseenter",(function(){const n=e.getBoundingClientRect();t.appendChild(a),a.style.top=n.top-(0+a.offsetHeight)+"px",a.style.left=n.left+"px",document.addEventListener("scroll",i)})),e.addEventListener("mouseleave",(function(){t.removeChild(a),a.style.top="",a.style.left="",document.removeEventListener("scroll",i)}))}(e)))}updateStateValues(){this.setState({likedMedia:l.MediaPageStore.get("user-liked-media"),dislikedMedia:l.MediaPageStore.get("user-disliked-media")})}mediaCategories(e){if(void 0===this.props.categories||null===this.props.categories||!this.props.categories.length)return null;let t=0,a=[];for(;t=this.props.views?"view":"views"):null,n.createElement("div",{className:"media-actions"},n.createElement("div",null,r.MemberContext._currentValue.can.likeMedia?n.createElement(W,null):null,r.MemberContext._currentValue.can.dislikeMedia?n.createElement(B,null):null,r.MemberContext._currentValue.can.shareMedia?n.createElement(se,{isVideo:!1}):null,!r.MemberContext._currentValue.is.anonymous&&r.MemberContext._currentValue.can.saveMedia&&-1=this.props.views?(0,m.translateString)("view"):(0,m.translateString)("views")):null,n.createElement("div",{className:"media-actions"},n.createElement("div",null,r.MemberContext._currentValue.can.likeMedia?n.createElement(W,null):null,r.MemberContext._currentValue.can.dislikeMedia?n.createElement(B,null):null,r.MemberContext._currentValue.can.shareMedia?n.createElement(se,{isVideo:!0}):null,!r.MemberContext._currentValue.is.anonymous&&r.MemberContext._currentValue.can.saveMedia&&-1(l.MediaPageStore.on("loaded_media_data",s),l.PageStore.on("switched_media_auto_play",o),()=>{l.MediaPageStore.removeListener("loaded_media_data",s),l.PageStore.removeListener("switched_media_auto_play",o)})),[]),t?n.createElement("div",{className:"auto-play"},n.createElement("div",{className:"auto-play-header"},n.createElement("div",{className:"next-label"},(0,m.translateString)("Up next")),n.createElement("div",{className:"auto-play-option"},n.createElement("label",{className:"checkbox-label right-selectbox",tabIndex:0,onKeyPress:function(e){0===e.keyCode&&p.PageActions.toggleMediaAutoPlay()}},(0,m.translateString)("AUTOPLAY"),n.createElement("span",{className:"checkbox-switcher-wrap"},n.createElement("span",{className:"checkbox-switcher"},n.createElement("input",{type:"checkbox",tabIndex:-1,checked:i,onChange:p.PageActions.toggleMediaAutoPlay})))))),n.createElement(ve.k,{className:"items-list-hor",items:[t],pageItems:1,maxItems:1,singleLinkContent:!0,horizontalItemsOrientation:!0,hideDate:!0,hideViews:!l.PageStore.get("config-media-item").displayViews,hideAuthor:!l.PageStore.get("config-media-item").displayAuthor})):null}function Ee(e){const[t,a]=(0,n.useState)(s()),[i,r]=(0,n.useState)(null);function o(){r(l.MediaPageStore.get("media-type")),a(s())}function s(){const e=l.MediaPageStore.get("media-data");return null!=e&&void 0!==e.related_media&&e.related_media.length?e.related_media:null}return(0,n.useEffect)((()=>(l.MediaPageStore.on("loaded_media_data",o),()=>l.MediaPageStore.removeListener("loaded_media_data",o))),[]),t&&t.length?n.createElement(ve.k,{className:"items-list-hor",items:!e.hideFirst||"video"!==i&&"audio"!==i?t:t.slice(1),pageItems:l.PageStore.get("config-options").pages.media.related.initialSize,singleLinkContent:!0,horizontalItemsOrientation:!0,hideDate:!0,hideViews:!l.PageStore.get("config-media-item").displayViews,hideAuthor:!l.PageStore.get("config-media-item").displayAuthor}):null}function Se(e){return n.createElement(ve.k,{className:"items-list-hor",pageItems:9999,maxItems:9999,items:e.items,hideDate:!0,hideViews:!0,hidePlaylistOrderNumber:!1,horizontalItemsOrientation:!0,inPlaylistView:!0,singleLinkContent:!0,playlistActiveItem:e.playlistActiveItem})}Ee.propTypes={hideFirst:d().bool},Ee.defaultProps={hideFirst:!0},Se.propTypes={items:d().array.isRequired,playlistActiveItem:m.PositiveIntegerOrZero},Se.defaultProps={playlistActiveItem:1};class Pe extends n.PureComponent{constructor(e){super(e),this.state={expanded:!0,loopRepeat:l.PlaylistViewStore.get("enabled-loop"),shuffle:l.PlaylistViewStore.get("enabled-shuffle"),savedPlaylist:l.PlaylistViewStore.get("saved-playlist-loop"),title:e.playlistData.title,link:e.playlistData.url,authorName:e.playlistData.user,authorLink:r.LinksContext._currentValue.home+"/user/"+e.playlistData.user,activeItem:e.activeItem,totalMedia:e.playlistData.media_count,items:e.playlistData.playlist_media},this.onHeaderClick=this.onHeaderClick.bind(this),this.onLoopClick=this.onLoopClick.bind(this),this.onShuffleClick=this.onShuffleClick.bind(this),this.onSaveClick=this.onSaveClick.bind(this),this.onLoopRepeatUpdate=this.onLoopRepeatUpdate.bind(this),this.onShuffleUpdate=this.onShuffleUpdate.bind(this),this.onPlaylistSaveUpdate=this.onPlaylistSaveUpdate.bind(this),l.PlaylistViewStore.on("loop-repeat-updated",this.onLoopRepeatUpdate),l.PlaylistViewStore.on("shuffle-updated",this.onShuffleUpdate),l.PlaylistViewStore.on("saved-updated",this.onPlaylistSaveUpdate)}onHeaderClick(e){this.setState({expanded:!this.state.expanded})}onLoopClick(){p.PlaylistViewActions.toggleLoop()}onShuffleClick(){p.PlaylistViewActions.toggleShuffle()}onSaveClick(){p.PlaylistViewActions.toggleSave()}onShuffleUpdate(){this.setState({shuffle:l.PlaylistViewStore.get("enabled-shuffle")},(()=>{this.state.shuffle?p.PageActions.addNotification("Playlist shuffle is on","shuffle-on"):p.PageActions.addNotification("Playlist shuffle is off","shuffle-off")}))}onLoopRepeatUpdate(){this.setState({loopRepeat:l.PlaylistViewStore.get("enabled-loop")},(()=>{this.state.loopRepeat?p.PageActions.addNotification("Playlist loop is on","loop-on"):p.PageActions.addNotification("Playlist loop is off","loop-off")}))}onPlaylistSaveUpdate(){this.setState({savedPlaylist:l.PlaylistViewStore.get("saved-playlist")},(()=>{this.state.savedPlaylist?p.PageActions.addNotification("Added to playlists library","added-to-playlists-lib"):p.PageActions.addNotification("Removed from playlists library","removed-from-playlists-lib")}))}render(){return n.createElement("div",{className:"playlist-view-wrap"},n.createElement("div",{className:"playlist-view"+(this.state.expanded?" playlist-expanded-view":"")},n.createElement("div",{className:"playlist-header"},n.createElement("div",{className:"playlist-title"},n.createElement("a",{href:this.state.link,title:this.state.title},this.state.title)),n.createElement("div",{className:"playlist-meta"},n.createElement("span",null,n.createElement("a",{href:this.state.authorLink,title:this.state.authorName},this.state.authorName)),"  -  ",n.createElement("span",{className:"counter"},this.state.activeItem," / ",this.state.totalMedia)),n.createElement(y.CircleIconButton,{className:"toggle-playlist-view",onClick:this.onHeaderClick},this.state.expanded?n.createElement("i",{className:"material-icons"},"keyboard_arrow_up"):n.createElement("i",{className:"material-icons"},"keyboard_arrow_down"))),this.state.expanded?n.createElement("div",{className:"playlist-actions"},n.createElement(y.CircleIconButton,{className:this.state.loopRepeat?"active":"",onClick:this.onLoopClick,title:"Loop playlist"},n.createElement("i",{className:"material-icons"},"repeat"))):null,this.state.expanded&&this.state.items.length?n.createElement("div",{className:"playlist-media"},n.createElement(Se,{items:this.state.items,playlistActiveItem:this.state.activeItem})):null))}}Pe.propTypes={playlistData:d().object.isRequired,activeItem:m.PositiveIntegerOrZero},Pe.defaultProps={};class Me extends n.PureComponent{constructor(e){if(super(e),this.state={playlistData:e.playlistData,isPlaylistPage:!!e.playlistData,activeItem:0,mediaType:l.MediaPageStore.get("media-type"),chapters:l.MediaPageStore.get("media-data")?.chapters},e.playlistData){let t=0;for(;t{let e=null,t=null;const a=window.location.search.split("?")[1];return a&&a.split("&").forEach((a=>{0===a.indexOf("m=")?e=a.split("m=")[1]:0===a.indexOf("pl=")&&(t=a.split("pl=")[1])})),{mediaId:e,playlistId:t}},{mediaId:t,playlistId:a}=e();t&&(window.MediaCMS.mediaId=t),a&&(window.MediaCMS.playlistId=a)}(0,i.C)("page-media",class extends ke{viewerContainerContent(e){switch(l.MediaPageStore.get("media-type")){case"video":return n.createElement(r.SiteConsumer,null,(t=>n.createElement(N,{data:e,siteUrl:t.url,inEmbed:!1})));case"audio":return n.createElement(v,null);case"image":return n.createElement(E,null);case"pdf":const t=(0,m.formatInnerLink)(l.MediaPageStore.get("media-original-url"),r.SiteContext._currentValue.url);return n.createElement(M,{fileUrl:t})}return n.createElement(o,null)}})},1815:function(){},2787:function(){},3237:function(){},3818:function(e,t,a){"use strict";a.d(t,{_:function(){return l}});var i=a(9471),n=a(8713),r=a.n(n);function l(e){const t=(0,i.useRef)(null),a=(0,i.useRef)(null),[n,r]=(0,i.useState)(null),[l,o]=(0,i.useState)(null);return(0,i.useEffect)((()=>{r(function(e,t,a){if(void 0!==e){let i=null;return i=void 0!==t&&t>e?t:e,i=void 0!==a&&a(e.inEmbed||document.hasFocus()||"visible"===document.visibilityState?s():(window.addEventListener("focus",s),document.addEventListener("visibilitychange",s)),()=>{null!==a&&(videojs(t.current).dispose(),a=null),void 0!==e.onUnmountCallback&&e.onUnmountCallback()})),[]),null===e.errorMessage?i.createElement("video",{ref:t,className:"video-js vjs-mediacms native-dimensions"}):i.createElement("div",{className:"error-container"},i.createElement("div",{className:"error-container-inner"},i.createElement("span",{className:"icon-wrap"},i.createElement("i",{className:"material-icons"},"error_outline")),i.createElement("span",{className:"msg-wrap"},e.errorMessage)))}u.propTypes={errorMessage:r().string.isRequired},m.propTypes={playerVolume:r().string,playerSoundMuted:r().bool,videoQuality:r().string,videoPlaybackSpeed:r().number,inTheaterMode:r().bool,siteId:r().string.isRequired,siteUrl:r().string.isRequired,errorMessage:r().string,cornerLayers:r().object,subtitlesInfo:r().array.isRequired,inEmbed:r().bool.isRequired,sources:r().array.isRequired,info:r().object.isRequired,enableAutoplay:r().bool.isRequired,hasTheaterMode:r().bool.isRequired,hasNextLink:r().bool.isRequired,hasPreviousLink:r().bool.isRequired,poster:r().string,previewSprite:r().object,onClickPreviousCallback:r().func,onClickNextCallback:r().func,onPlayerInitCallback:r().func,onStateUpdateCallback:r().func,onUnmountCallback:r().func},m.defaultProps={errorMessage:null,cornerLayers:{}}},6568:function(e,t,a){"use strict";a.d(t,{x:function(){return l}});var i=a(9471),n=a(8713),r=a.n(n);function l(e){let t="spinner-loader";switch(e.size){case"tiny":case"x-small":case"small":case"large":case"x-large":t+=" "+e.size}return i.createElement("div",{className:t},i.createElement("svg",{className:"circular",viewBox:"25 25 50 50"},i.createElement("circle",{className:"path",cx:"50",cy:"50",r:"20",fill:"none",strokeWidth:"1.5",strokeMiterlimit:"10"})))}l.propTypes={size:r().oneOf(["tiny","x-small","small","medium","large","x-large"])},l.defaultProps={size:"medium"}},6671:function(){},6880:function(e,t,a){var i,n,r,l=a(8974);n=[a(4480)],void 0===(r="function"==typeof(i=function(e){"use strict";var t,a=(t=e)&&t.__esModule?t:{default:t};var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n={markerStyle:{width:"7px","border-radius":"30%","background-color":"red"},markerTip:{display:!0,text:function(e){return"Break: "+e.text},time:function(e){return e.time}},breakOverlay:{display:!0,displayTime:3,text:function(e){return"Break overlay: "+e.overlayText},style:{width:"100%",height:"20%","background-color":"rgba(0,0,0,0.7)",color:"white","font-size":"17px"}},onMarkerClick:function(e){},onMarkerReached:function(e,t){},markers:[]};function r(e){var t;try{t=e.getBoundingClientRect()}catch(e){t={top:0,bottom:0,left:0,width:0,height:0,right:0}}return t}var o=-1;videojs.registerPlugin("markers",(function(e){if(!a.default.mergeOptions){var t=function(e){return!!e&&"object"===(void 0===e?"undefined":i(e))&&"[object Object]"===toString.call(e)&&e.constructor===Object};a.default.mergeOptions=function e(a,i){var n={};return[a,i].forEach((function(a){a&&Object.keys(a).forEach((function(i){var r=a[i];t(r)?(t(n[i])||(n[i]={}),n[i]=e(n[i],r)):n[i]=r}))})),n}}a.default.createEl||(a.default.createEl=function(e,t,i){var n=a.default.Player.prototype.createEl(e,t);return i&&Object.keys(i).forEach((function(e){n.setAttribute(e,i[e])})),n});var s=a.default.mergeOptions(n,e),d={},c=[],u=o,m=this,p=null,h=null,g=o;function f(){c.sort((function(e,t){return s.markerTip.time(e)-s.markerTip.time(t)}))}function v(e){e.forEach((function(e){var t;e.key=(t=(new Date).getTime(),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var a=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?a:3&a|8).toString(16)}))),m.el().querySelector(".vjs-progress-holder").appendChild(function(e){var t=a.default.createEl("div",{},{"data-marker-key":e.key,"data-marker-time":s.markerTip.time(e)});return b(e,t),t.addEventListener("click",(function(t){var a=!1;if("function"==typeof s.onMarkerClick&&(a=!1===s.onMarkerClick(e)),!a){var i=this.getAttribute("data-marker-key");m.currentTime(s.markerTip.time(d[i]))}})),s.markerTip.display&&function(e){e.addEventListener("mouseover",(function(){var t=d[e.getAttribute("data-marker-key")];if(p){p.querySelector(".vjs-tip-inner").innerText=s.markerTip.text(t),p.style.left=y(t)+"%";var a=r(p),i=r(e);p.style.marginLeft=-parseFloat(a.width/2)+parseFloat(i.width/4)+"px",p.style.visibility="visible"}})),e.addEventListener("mouseout",(function(){p&&(p.style.visibility="hidden")}))}(t),t}(e)),d[e.key]=e,c.push(e)})),f()}function y(e){return s.markerTip.time(e)/m.duration()*100}function b(e,t){t.className="vjs-marker "+(e.class||""),Object.keys(s.markerStyle).forEach((function(e){t.style[e]=s.markerStyle[e]}));var a=e.time/m.duration();if((a<0||a>1)&&(t.style.display="none"),t.style.left=y(e)+"%",e.duration)t.style.width=e.duration/m.duration()*100+"%",t.style.marginLeft="0px";else{var i=r(t);t.style.marginLeft=i.width/2+"px"}}function E(e){h&&(g=o,h.style.visibility="hidden"),u=o;var t=[];e.forEach((function(e){var a=c[e];if(a){delete d[a.key],t.push(e);var i=m.el().querySelector(".vjs-marker[data-marker-key='"+a.key+"']");i&&i.parentNode.removeChild(i)}}));try{t.reverse(),t.forEach((function(e){c.splice(e,1)}))}catch(e){l.log(e)}f()}function S(){if(s.breakOverlay.display&&!(u<0)){var e=m.currentTime(),t=c[u],a=s.markerTip.time(t);e>=a&&e<=a+s.breakOverlay.displayTime?(g!==u&&(g=u,h&&(h.querySelector(".vjs-break-overlay-text").innerHTML=s.breakOverlay.text(t))),h&&(h.style.visibility="visible")):(g=o,h&&(h.style.visibility="hidden"))}}function P(){(function(){if(c.length){var t=function(e){return e=s.markerTip.time(c[u])&&a=s.markerTip.time(c[r])&&a
"}),m.el().querySelector(".vjs-progress-holder").appendChild(p)),m.markers.removeAll(),v(s.markers),s.breakOverlay.display&&(h=a.default.createEl("div",{className:"vjs-break-overlay",innerHTML:"
"}),Object.keys(s.breakOverlay.style).forEach((function(e){h&&(h.style[e]=s.breakOverlay.style[e])})),m.el().appendChild(h),g=o),P(),m.on("timeupdate",P),m.off("loadedmetadata")}m.on("loadedmetadata",(function(){M()})),m.markers={getMarkers:function(){return c},next:function(){for(var e=m.currentTime(),t=0;te){m.currentTime(a);break}}},prev:function(){for(var e=m.currentTime(),t=c.length-1;t>=0;t--){var a=s.markerTip.time(c[t]);if(a+.5 div");m&&(m.innerHTML=N.summary)}function V(e){if(void 0!==e&&void 0!==e.type)switch(e.type){case"network":case"private":case"unavailable":r(e.type),h(void 0!==e.message?e.message:"Αn error occurred while loading the media's data")}}return null!==C&&(_=t.media+"/"+C),(0,i.useEffect)((()=>{null!==_&&(0,d.getRequest)(_,!1,L,V)}),[]),v.length?i.createElement("div",{className:"video-player"},i.createElement(m.L9,{siteId:a.id,siteUrl:a.url,info:b,sources:v,poster:g,previewSprite:M,subtitlesInfo:S,enableAutoplay:!1,inEmbed:!1,hasTheaterMode:!1,hasNextLink:!1,hasPreviousLink:!1,errorMessage:l})):null}h.propTypes={pageLink:r().string.isRequired}}},a={};function i(e){var n=a[e];if(void 0!==n)return n.exports;var r=a[e]={exports:{}};return t[e].call(r.exports,r,r.exports,i),r.exports}i.m=t,e=[],i.O=function(t,a,n,r){if(!a){var l=1/0;for(c=0;c=r)&&Object.keys(i.O).every((function(e){return i.O[e](a[s])}))?a.splice(s--,1):(o=!1,r0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[a,n,r]},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=201,function(){var e={201:0};i.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,r,l=a[0],o=a[1],s=a[2],d=0;if(l.some((function(t){return 0!==e[t]}))){for(n in o)i.o(o,n)&&(i.m[n]=o[n]);if(s)var c=s(i)}for(t&&t(a);d
-

Upload media files

+

{{ "Upload media" | custom_translate:LANGUAGE_CODE}}

@@ -38,16 +43,19 @@
cloud_upload - Drag and drop files - or + {{ "Drag and drop files" | custom_translate:LANGUAGE_CODE}} + {{ "or" | custom_translate:LANGUAGE_CODE}} - Browse your files + {{ "Browse your files" | custom_translate:LANGUAGE_CODE}} +
+
+ @@ -76,7 +84,7 @@ Edit filename create - View media open_in_new + {{ "View media" | custom_translate:LANGUAGE_CODE}}open_in_new
diff --git a/templates/cms/add_subtitle.html b/templates/cms/add_subtitle.html index d1cbec3e..404d79f1 100644 --- a/templates/cms/add_subtitle.html +++ b/templates/cms/add_subtitle.html @@ -1,29 +1,49 @@ {% extends "base.html" %} {% load crispy_forms_tags %} +{% load static %} {% block headtitle %}Add subtitle - {{PORTAL_NAME}}{% endblock headtitle %} {% block innercontent %} + {% include "cms/media_nav.html" with active_tab="subtitles" %} +
-

Add subtitle

- Media: {{media.title}} -
{% csrf_token %} - {{ form|crispy }} - + {% crispy form %}
+
+
- {% if subtitles %} -

View/Edit Existing Subtitles

+ + {% if subtitles %} +
+
+

Existing Subtitles

- {% endif %} - +
-
+ {% endif %} + + {% if whisper_form %} +
+
+

Request Automatic Tranascription + + info_outline + +

+
+ {% csrf_token %} + {% crispy whisper_form %} +
+
+
+ {% endif %} + {% endblock innercontent %} diff --git a/templates/cms/media_nav.html b/templates/cms/media_nav.html index 8fc0a06f..ac91c643 100644 --- a/templates/cms/media_nav.html +++ b/templates/cms/media_nav.html @@ -1,17 +1,28 @@ +{% load custom_filters %} +{% load i18n %} + +{% get_current_language as LANGUAGE_CODE %} +
diff --git a/templates/cms/record_screen.html b/templates/cms/record_screen.html new file mode 100644 index 00000000..eef9079a --- /dev/null +++ b/templates/cms/record_screen.html @@ -0,0 +1,216 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block headtitle %}Record Screen - {{PORTAL_NAME}}{% endblock headtitle %} +{% load custom_filters %} + +{% block innercontent %} +{% get_current_language as LANGUAGE_CODE %} + + +{% if can_add %} + +
+

{{ "Record Screen" | custom_translate:LANGUAGE_CODE}}

+
+ +
+

{{ "Click 'Start Recording' and select the screen or tab to record. Once recording is finished, click 'Stop Recording,' and the recording will be uploaded." | custom_translate:LANGUAGE_CODE}}

+ + + +
+ +
+ + + + + + +{% else %} + + {{can_upload_exp}} +
+ Contact portal owners for more information. + +{% endif %} + +{% endblock %} diff --git a/templates/config/core/url.html b/templates/config/core/url.html index 9be88796..4737563e 100644 --- a/templates/config/core/url.html +++ b/templates/config/core/url.html @@ -15,6 +15,7 @@ MediaCMS.url = { history: "/history", /* Add pages */ addMedia: "/upload", + recordScreen: "/record_screen", /* Profile/account edit pages */ editProfile: "{{user.edit_url}}", {% if request.user.is_authenticated %}