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,mGAChBiU,EAAa5Z,MAAQ,IAIvB4Z,EAAa5Z,MAAQ6Z,CAAW,GAChC,GACF,G","sources":["webpack://app/./app/javascript/channels/ sync _channel\\.js$","webpack://app/./app/javascript/channels/index.js","webpack://app/./app/javascript/packs/bills/card_payments/index.ts","webpack://app/./app/javascript/packs/bills/konbini_payments/index.ts","webpack://app/./app/javascript/packs/stripe/payment-method-form.ts","webpack://app/./app/javascript/packs/fincode/platform-subscription-form.ts","webpack://app/./app/javascript/packs/events/index.ts","webpack://app/./app/javascript/packs/events/bulk-events-dialog.ts","webpack://app/./app/javascript/packs/bill_group/new.ts","webpack://app/./app/javascript/packs/recurrence_bill/new.ts","webpack://app/./app/javascript/packs/optional_bill/new.ts","webpack://app/./app/javascript/packs/announcements/new.ts","webpack://app/./app/javascript/packs/application.js","webpack://app/./app/javascript/packs/bills/show.ts","webpack://app/./app/javascript/packs/classrooms/classroom_managers/classroom-manager-role-dialog.ts","webpack://app/./app/javascript/packs/classrooms/enrollment.ts","webpack://app/./app/javascript/packs/course-members-select.ts","webpack://app/./app/javascript/packs/dialog-v2.js","webpack://app/./app/javascript/packs/dialog.js","webpack://app/./app/javascript/packs/disable-on-submitting.ts","webpack://app/./app/javascript/packs/draft-submit.ts","webpack://app/./app/javascript/packs/drawer.js","webpack://app/./app/javascript/packs/dropdown.ts","webpack://app/./app/javascript/packs/events/bulk-events-delete-dialog.ts","webpack://app/./app/javascript/packs/events/bulk-events-edit-dialog.ts","webpack://app/./app/javascript/packs/events/bulk-events-form.ts","webpack://app/./app/javascript/packs/file-preview.ts","webpack://app/./app/javascript/packs/form-validation.ts","webpack://app/./app/javascript/packs/header.js","webpack://app/./app/javascript/packs/history-back.js","webpack://app/./app/javascript/packs/invite.ts","webpack://app/./app/javascript/packs/multi-file-attachment.ts","webpack://app/./app/javascript/packs/open-close.ts","webpack://app/./app/javascript/packs/pdf-preview.ts","webpack://app/./app/javascript/packs/sessions/new.ts","webpack://app/./app/javascript/packs/settings/bank_accounts/new.ts","webpack://app/./app/javascript/packs/validate_input_number.ts"],"sourcesContent":["function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 3760;\nmodule.exports = webpackEmptyContext;","// Load all the channels within this directory and all subdirectories.\n// Channel files must be named *_channel.js.\n\nconst channels = require.context(\".\", true, /_channel\\.js$/);\nchannels.keys().forEach(channels);\n","import Turbolinks from \"turbolinks\";\nimport { loadStripe } from \"@stripe/stripe-js\";\nimport * as Sentry from \"@sentry/browser\";\n\ndocument.addEventListener(\"turbolinks:load\", async () => {\n const form = document.getElementById(\"payment-form\");\n const cardForm = document.getElementById(\"stripe-card-form\");\n const usingNewCardElement = document.getElementById(\"using-new-card\");\n const clientSecretElement = document.getElementById(\"client-secret\");\n const savingCardElement = document.getElementById(\"stripe-card-saving\");\n const paymentMethods: HTMLInputElement[] = Array.prototype.slice.call(\n document.querySelectorAll(\".js-payment-method\"),\n );\n\n if (\n !(form && form instanceof HTMLFormElement &&\n cardForm &&\n usingNewCardElement && usingNewCardElement instanceof HTMLInputElement &&\n clientSecretElement && clientSecretElement instanceof HTMLInputElement &&\n savingCardElement && savingCardElement instanceof HTMLInputElement &&\n document.getElementById(\"stripe-card-number\"))\n ) {\n return;\n }\n\n const { stripe, card } = await createCardElements();\n\n // 保存済みクレジットカードがある場合、カードフォームを非表示\n if (paymentMethods.length > 0) {\n cardForm.hidden = true;\n }\n\n paymentMethods.forEach((paymentMethod) => {\n paymentMethod.addEventListener(\"change\", () => {\n if (usingNewCardElement.checked) {\n usingNewCardElement.checked = false;\n cardForm.hidden = true;\n }\n });\n });\n\n usingNewCardElement.addEventListener(\"change\", (event) => {\n event.preventDefault();\n\n if (usingNewCardElement.checked) {\n // 新しいカードを登録する際には保存済みカードの選択を解除する\n paymentMethods.forEach((method) => method.checked = false);\n cardForm.hidden = false;\n } else {\n cardForm.hidden = true;\n }\n });\n\n form.addEventListener(\"submit\", async (event) => {\n event.preventDefault();\n\n const paymentMethod = usingNewCardElement.checked\n ? { card }\n : paymentMethods.find((method) => method.checked)?.value;\n\n try {\n const { error, paymentIntent } = await stripe.confirmCardPayment(\n clientSecretElement.value,\n {\n payment_method: paymentMethod,\n payment_method_options: {\n card: {\n setup_future_usage: savingCardElement.checked\n ? \"off_session\"\n : null,\n },\n },\n },\n );\n if (error) {\n Sentry.captureMessage(error.message);\n alert(error.message);\n return;\n }\n if (paymentIntent.status === \"succeeded\") {\n const formData = new FormData(form);\n formData.append(\n \"payment[payment_intent_id]\",\n paymentIntent.id,\n );\n const response = await fetch(form.action, {\n method: \"POST\",\n body: formData,\n });\n const redirectURL = response.url;\n Turbolinks.visit(redirectURL);\n }\n } catch (err) {\n Sentry.captureException(err);\n }\n });\n});\n\nconst createCardElements = async () => {\n const publicKey = process.env.STRIPE_PUBLIC_API_KEY;\n const stripe = await loadStripe(publicKey);\n const elements = stripe.elements({\n fonts: [\n {\n cssSrc:\n \"https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400&family=Roboto+Mono:wght@400&display=swap\",\n },\n ],\n });\n\n const stripeCardElementOptions = {\n style: {\n base: {\n color: \"#393c41\",\n fontFamily: \"'Roboto Mono', 'Noto Sans JP', sans-serif\",\n fontSize: \"16px\",\n\n \"::placeholder\": {\n color: \"#767b85\",\n },\n },\n invalid: {\n color: \"#cc1f24\",\n },\n },\n classes: {\n focus: \"focused\",\n empty: \"empty\",\n invalid: \"invalid\",\n },\n };\n\n const errorDisplay = document.getElementById(\"stripe-card-errors\");\n const showError = ({ error }) => {\n if (!errorDisplay) return;\n if (error) {\n errorDisplay.textContent = error.message;\n } else {\n errorDisplay.textContent = \"\";\n }\n };\n\n const card = elements.create(\"cardNumber\", stripeCardElementOptions);\n card.mount(\"#stripe-card-number\");\n card.on(\"change\", showError);\n\n const cardExpiry = elements.create(\"cardExpiry\", stripeCardElementOptions);\n cardExpiry.mount(\"#stripe-card-expiry\");\n cardExpiry.on(\"change\", showError);\n\n const cardCvc = elements.create(\"cardCvc\", stripeCardElementOptions);\n cardCvc.mount(\"#stripe-card-cvc\");\n cardCvc.on(\"change\", showError);\n\n return { stripe, card };\n};\n","import { loadStripe } from \"@stripe/stripe-js\";\nimport * as Sentry from \"@sentry/browser\";\n\ndocument.addEventListener(\"turbolinks:load\", async () => {\n const form = document.getElementById(\"konbini_payment-form\");\n const clientSecretElement = document.getElementById(\"client-secret\");\n const nameElement = document.getElementById(\"name\");\n const emailElement = document.getElementById(\"email\");\n const confirmationNumberElement = document.getElementById(\n \"confirmation-number\",\n );\n\n if (\n !(form && form instanceof HTMLFormElement &&\n clientSecretElement && clientSecretElement instanceof HTMLInputElement &&\n nameElement && nameElement instanceof HTMLInputElement &&\n emailElement && emailElement instanceof HTMLInputElement &&\n confirmationNumberElement &&\n confirmationNumberElement instanceof HTMLInputElement)\n ) {\n return;\n }\n\n const publicKey = process.env.STRIPE_PUBLIC_API_KEY;\n const stripe = await loadStripe(publicKey);\n\n form.addEventListener(\"submit\", async (event) => {\n event.preventDefault();\n\n try {\n const { error, _paymentIntent } = await stripe.confirmKonbiniPayment(\n clientSecretElement.value,\n {\n payment_method: {\n billing_details: {\n name: nameElement.value,\n email: emailElement.value,\n },\n },\n payment_method_options: {\n konbini: {\n confirmation_number: confirmationNumberElement.value,\n },\n },\n },\n );\n if (error) {\n Sentry.captureMessage(error.message);\n alert(error.message);\n return;\n }\n } catch (err) {\n Sentry.captureException(err);\n }\n });\n});\n","import showingSnackBar from \"../snackbar\";\nimport { loadStripe, Stripe, StripeElements } from \"@stripe/stripe-js\";\nimport { captureException } from \"@sentry/browser\";\n\ndocument.addEventListener(\"turbolinks:load\", async () => {\n const usingNewCardElement = document.getElementById(\"using-new-card\");\n const newCardElement = document.getElementById(\"new-card-form-section\");\n const paymentForm = document.getElementById(\"stripe-payment-form\");\n\n if (\n !(\n usingNewCardElement && usingNewCardElement instanceof HTMLInputElement &&\n paymentForm && paymentForm instanceof HTMLFormElement\n )\n ) {\n return;\n }\n\n const stripe = await loadStripe(process.env.STRIPE_PUBLIC_API_KEY);\n let elements: StripeElements;\n\n // view側で、登録済みカードがない時にcheckedにしておくことでフォームを表示させる\n if (usingNewCardElement.checked) {\n newCardElement.hidden = false;\n elements = await createPaymentElement(stripe);\n }\n\n // カード登録後の処理。URLパラメーターで notice が渡ってきていたら表示する\n const params = new URLSearchParams(document.location.search.substring(1));\n if (params.get(\"setup_intent_client_secret\")) {\n await notifySetupIntentStatus(\n stripe,\n params.get(\"setup_intent_client_secret\"),\n );\n }\n\n usingNewCardElement.addEventListener(\"change\", async (event) => {\n event.preventDefault();\n if (usingNewCardElement.checked) {\n newCardElement.hidden = false;\n elements = await createPaymentElement(stripe);\n } else {\n newCardElement.hidden = true;\n }\n });\n\n paymentForm.addEventListener(\"submit\", async (event) => {\n event.preventDefault();\n // ref: https://stripe.com/docs/js/payment_methods/create_payment_method\n const { error } = await stripe.confirmSetup({\n elements,\n confirmParams: {\n return_url: paymentForm.action,\n payment_method_data: {\n billing_details: {\n address: {\n country: \"JP\",\n },\n },\n },\n },\n });\n\n if (error) {\n const messageContainer = document.querySelector(\"#stripe-error-message\");\n messageContainer.textContent = error.message;\n captureException(error);\n }\n });\n});\n\nconst createPaymentElement = async (stripe: Stripe) => {\n const clientSecret = await fetchClientSecret();\n const elements = stripe.elements({\n clientSecret,\n appearance: {\n variables: {\n colorPrimary: \"#1f7acc\",\n colorText: \"#393c41\",\n colorDanger: \"#cc1f24\",\n fontFamily: \"'Roboto Mono', 'Noto Sans JP', sans-serif\",\n spacingUnit: \"4px\",\n borderRadius: \"4px\",\n },\n },\n });\n\n const paymentElement = elements.create(\"payment\", {\n fields: {\n billingDetails: {\n address: {\n country: \"never\",\n },\n },\n },\n });\n paymentElement.mount(\"#stripe-payment-element\");\n\n return elements;\n};\n\nconst fetchClientSecret = async () => {\n const clientSecretPath =\n document.getElementById(\"stripe-payment-form\").dataset.clientSecretPath;\n\n const response = await fetch(clientSecretPath);\n const responseJson = await response.json();\n return responseJson.client_secret;\n};\n\nconst notifySetupIntentStatus = async (\n stripe: Stripe,\n setup_intent_client_secret: string,\n) => {\n const { setupIntent } = await stripe.retrieveSetupIntent(\n setup_intent_client_secret,\n );\n switch (setupIntent.status) {\n case \"succeeded\": {\n showingSnackBar(\"カードを登録しました\");\n break;\n }\n case \"processing\": {\n showingSnackBar(\"決済情報を処理中です。完了しましたら更新します\");\n break;\n }\n case \"requires_payment_method\": {\n showingSnackBar(\n \"決済情報の処理に失敗しました。別の支払い方法をお試しください\",\n );\n break;\n }\n }\n};\n","import { CardRegistration, type Fincode } from \"types/fincode.d\";\nimport Turbolinks from \"turbolinks\";\nimport * as Sentry from \"@sentry/browser\";\nimport showingSnackBar from \"packs/snackbar\";\n\nconst fincodePublicKey =\n process.env.FINCODE_PUBLIC_API_KEY_FOR_PLATFORM_SUBSCRIPTION;\nconst fincodeSubscriptionFormId = \"fincode-form\";\nconst fincodeCustomerInputId = \"fincode-customer-id\";\nconst fincodeSubscriptionMountedId = \"fincode\";\n\ndocument.addEventListener(\"turbolinks:load\", async () => {\n const form = document.getElementById(fincodeSubscriptionFormId);\n const customerIdInput = document.getElementById(fincodeCustomerInputId);\n const submittedPath = document.getElementById(\"fincode-submitted-path\");\n if (\n !(form && form instanceof HTMLFormElement &&\n customerIdInput && customerIdInput instanceof HTMLInputElement &&\n submittedPath && submittedPath instanceof HTMLInputElement)\n ) {\n return;\n }\n\n // @ts-ignore: Fincode がスクリプトタグ経由でしか利用できないため無視するしかない\n const fincode: Fincode = Fincode(fincodePublicKey);\n const appearance = {\n layout: \"vertical\",\n fontFamily: \"'OpenSans', 'Noto Sans JP'\",\n colorText: \"393c41\",\n colorLabelText: \"393c41\",\n colorBackgroundInput: \"f7f8fa\",\n colorError: \"db4852\",\n };\n const ui = fincode.ui(appearance);\n ui.create(\"cards\", appearance);\n ui.mount(fincodeSubscriptionMountedId, \"380\");\n\n form.addEventListener(\"submit\", async (event) => {\n event.preventDefault();\n const formData = await ui.getFormData();\n const card: CardRegistration = {\n customer_id: customerIdInput.value,\n default_flag: \"1\",\n card_no: formData.cardNo,\n expire: formData.expire,\n holder_name: formData.holderName,\n security_code: formData.CVC,\n };\n fincode.cards(card, async (status, response) => {\n if (status !== 200) {\n showingSnackBar(\n \"カード情報の登録に失敗しました。入力情報をご確認ください。\",\n );\n Sentry.captureException(response);\n return;\n }\n Turbolinks.visit(submittedPath.value);\n }, () => {\n showingSnackBar(\n \"カード情報の登録に失敗しました。入力情報をご確認ください。\",\n );\n Sentry.captureException(event);\n });\n });\n});\n","import { add, differenceInMinutes, format, parse } from \"date-fns\";\n\ndocument.addEventListener(\"turbolinks:load\", function () {\n const eventStartDateInput: HTMLInputElement = document.querySelector(\n \"#js-event-start-date\",\n );\n const eventEndDateInput: HTMLInputElement = document.querySelector(\n \"#js-event-end-date\",\n );\n const eventStartTimeInput: HTMLInputElement = document.querySelector(\n \"#js-event-start-time\",\n );\n const eventEndTimeInput: HTMLInputElement = document.querySelector(\n \"#js-event-end-time\",\n );\n\n if (\n !(eventStartDateInput && eventStartDateInput instanceof HTMLInputElement &&\n eventEndDateInput && eventEndDateInput instanceof HTMLInputElement &&\n eventStartTimeInput && eventStartTimeInput instanceof HTMLInputElement &&\n eventEndTimeInput && eventEndTimeInput instanceof HTMLInputElement)\n ) {\n return false;\n }\n\n const convertDate = (date: string, time: string): Date =>\n parse(`${date} ${time}`, \"yyyy-MM-dd HH:mm\", new Date());\n\n const eventStartDate = () =>\n convertDate(eventStartDateInput.value, eventStartTimeInput.value);\n\n const eventEndDate = () =>\n convertDate(eventEndDateInput.value, eventEndTimeInput.value);\n\n const calcEventDuration = (): number =>\n differenceInMinutes(eventEndDate(), eventStartDate());\n\n let eventDuration = calcEventDuration();\n const updateEventDuration = () => {\n try {\n eventDuration = calcEventDuration();\n } catch {\n // ユーザーの入力がおかしいだけなので何もしない\n }\n };\n\n const updateEventEndDate = () => {\n try {\n const updatedEventEndDate = add(eventStartDate(), {\n minutes: eventDuration,\n });\n eventEndDateInput.value = format(updatedEventEndDate, \"yyyy-MM-dd\");\n eventEndTimeInput.value = format(updatedEventEndDate, \"HH:mm\");\n } catch {\n // ユーザーの入力がおかしいだけなので何もしない\n }\n };\n\n eventStartDateInput.addEventListener(\"change\", updateEventEndDate);\n eventStartTimeInput.addEventListener(\"change\", updateEventEndDate);\n eventEndDateInput.addEventListener(\"change\", updateEventDuration);\n eventEndTimeInput.addEventListener(\"change\", updateEventDuration);\n});\n","import { format } from \"date-fns\";\n\ndocument.addEventListener(\"turbolinks:load\", () => {\n const createButton = document.querySelector(\n \".js-bulk-events-dialog\",\n ) as HTMLElement;\n const startDateField = document.getElementById(\n \"js-event-start-date\",\n ) as HTMLInputElement;\n const bulkCreateConfirmDialogDescription = document.getElementById(\n \"bulk-create-confirm-dialog-description\",\n ) as HTMLElement;\n\n if (\n !(createButton && startDateField && bulkCreateConfirmDialogDescription)\n ) {\n return;\n }\n\n createButton.addEventListener(\"click\", () => {\n const { finalStartDateFormatted, count } = calculateFinalStartDateAndCount(\n startDateField.value,\n );\n bulkCreateConfirmDialogDescription.innerHTML = `${\n escapeHTML(finalStartDateFormatted)\n } まで${\n escapeHTML(count.toString())\n }個の予定が一括で作成されます。
※受講者に通知が大量に届くことはありません`;\n });\n});\n\nfunction calculateFinalStartDateAndCount(\n startDateStr: string,\n): { finalStartDateFormatted: string; count: number } {\n const startDate = new Date(startDateStr);\n const bulkInsertEndDate = new Date(startDate);\n bulkInsertEndDate.setFullYear(startDate.getFullYear() + 1);\n\n const calculateStartDate = new Date(startDate);\n let count = 0;\n\n while (calculateStartDate <= bulkInsertEndDate) {\n count++;\n calculateStartDate.setDate(calculateStartDate.getDate() + 7);\n }\n\n const finalStartDate = new Date(calculateStartDate);\n finalStartDate.setDate(finalStartDate.getDate() - 7);\n\n const finalStartDateFormatted = format(finalStartDate, \"yyyy/MM/dd\");\n\n return { finalStartDateFormatted, count };\n}\n\nfunction escapeHTML(str: string): string {\n return str.replace(/[&<>\"']/g, (match) => {\n const escapeMap: { [key: string]: string } = {\n \"&\": \"&\",\n \"<\": \"<\",\n \">\": \">\",\n '\"': \""\",\n \"'\": \"'\",\n };\n return escapeMap[match];\n });\n}\n","import { validateBillAmount, validateBillName } from \"../form-validation\";\n\ndocument.addEventListener(\"turbolinks:load\", function () {\n const nameInput: HTMLInputElement = document.querySelector(\n \"#js-bill-group-name\",\n );\n const nameValidationMessage: HTMLDivElement = document.querySelector(\n \"#js-bill-group-name-validation-message\",\n );\n const amountInput: HTMLInputElement = document.querySelector(\n \"#js-bill-group-amount\",\n );\n const amountValidationMessage: HTMLDivElement = document.querySelector(\n \"#js-bill-group-amount-validation-message\",\n );\n\n if (\n !(\n nameInput && nameInput instanceof HTMLInputElement &&\n nameValidationMessage &&\n nameValidationMessage instanceof HTMLDivElement &&\n amountInput && amountInput instanceof HTMLInputElement &&\n amountValidationMessage &&\n amountValidationMessage instanceof HTMLDivElement\n )\n ) {\n return false;\n }\n\n nameInput.addEventListener(\"change\", (event) => {\n const { currentTarget } = event;\n if (!(currentTarget instanceof HTMLInputElement)) return;\n nameValidationMessage.textContent = validateBillName(currentTarget.value);\n });\n\n amountInput.addEventListener(\"change\", (event) => {\n const { currentTarget } = event;\n if (!(currentTarget instanceof HTMLInputElement)) return;\n amountValidationMessage.textContent = validateBillAmount(\n currentTarget.value,\n );\n });\n});\n","import { validateBillAmount, validateBillName } from \"../form-validation\";\n\ndocument.addEventListener(\"turbolinks:load\", function () {\n const nameInput: HTMLInputElement = document.querySelector(\n \"#js-recurrence-bill-name\",\n );\n const nameValidationMessage: HTMLDivElement = document.querySelector(\n \"#js-recurrence-bill-name-validation-message\",\n );\n const amountInput: HTMLInputElement = document.querySelector(\n \"#js-recurrence-bill-amount\",\n );\n const amountValidationMessage: HTMLDivElement = document.querySelector(\n \"#js-recurrence-bill-amount-validation-message\",\n );\n\n if (\n !(\n nameInput && nameInput instanceof HTMLInputElement &&\n nameValidationMessage &&\n nameValidationMessage instanceof HTMLDivElement &&\n amountInput && amountInput instanceof HTMLInputElement &&\n amountValidationMessage &&\n amountValidationMessage instanceof HTMLDivElement\n )\n ) {\n return false;\n }\n\n nameInput.addEventListener(\"change\", (event) => {\n const { currentTarget } = event;\n if (!(currentTarget instanceof HTMLInputElement)) return;\n nameValidationMessage.textContent = validateBillName(currentTarget.value);\n });\n\n amountInput.addEventListener(\"change\", (event) => {\n const { currentTarget } = event;\n if (!(currentTarget instanceof HTMLInputElement)) return;\n amountValidationMessage.textContent = validateBillAmount(\n currentTarget.value,\n );\n });\n});\n","import {\n validateBillName,\n validateOptionalBillAmount,\n} from \"../form-validation\";\n\ndocument.addEventListener(\"turbolinks:load\", function () {\n const nameInput: HTMLInputElement = document.querySelector(\n \"#js-optional-bill-name\",\n );\n const nameValidationMessage: HTMLDivElement = document.querySelector(\n \"#js-optional-bill-name-validation-message\",\n );\n const amountInput: HTMLInputElement = document.querySelector(\n \"#js-optional-bill-amount\",\n );\n const amountValidationMessage: HTMLDivElement = document.querySelector(\n \"#js-optional-bill-amount-validation-message\",\n );\n\n if (\n !(\n nameInput && nameInput instanceof HTMLInputElement &&\n nameValidationMessage &&\n nameValidationMessage instanceof HTMLDivElement &&\n amountInput && amountInput instanceof HTMLInputElement &&\n amountValidationMessage &&\n amountValidationMessage instanceof HTMLDivElement\n )\n ) {\n return false;\n }\n\n nameInput.addEventListener(\"change\", (event) => {\n const { currentTarget } = event;\n if (!(currentTarget instanceof HTMLInputElement)) return;\n nameValidationMessage.textContent = validateBillName(currentTarget.value);\n });\n\n amountInput.addEventListener(\"change\", (event) => {\n const { currentTarget } = event;\n if (!(currentTarget instanceof HTMLInputElement)) return;\n amountValidationMessage.textContent = validateOptionalBillAmount(\n currentTarget.value,\n );\n });\n});\n","import {\n validateAnnouncementAddressee,\n validateAnnouncementBody,\n validateAnnouncementTitle,\n} from \"../form-validation\";\nimport multiFileAttachment from \"../multi-file-attachment\";\n\ndocument.addEventListener(\"turbolinks:load\", function () {\n const titleInput: HTMLInputElement = document.querySelector(\n \"#js-announcement-title\",\n );\n const titleValidationMessage: HTMLDivElement = document.querySelector(\n \"#js-announcement-title-validation-message\",\n );\n const bodyTextArea: HTMLTextAreaElement = document.querySelector(\n \"#js-announcement-body\",\n );\n const bodyValidationMessage: HTMLDivElement = document.querySelector(\n \"#js-announcement-body-validation-message\",\n );\n const sharedWithClassroom: HTMLInputElement = document.querySelector(\n \"#announcement_shared_with_classroom\",\n );\n const addresseeSelect: HTMLDivElement = document.querySelector(\n \"#js-radio-content-addressee\",\n );\n const addresseeValidationMessage: HTMLDivElement = document.querySelector(\n \"#js-announcement-addressee-validation-message\",\n );\n\n if (\n !(\n titleInput && titleInput instanceof HTMLInputElement &&\n titleValidationMessage &&\n titleValidationMessage instanceof HTMLDivElement &&\n bodyTextArea && bodyTextArea instanceof HTMLTextAreaElement &&\n bodyValidationMessage &&\n bodyValidationMessage instanceof HTMLDivElement &&\n sharedWithClassroom && sharedWithClassroom instanceof HTMLInputElement &&\n addresseeSelect && addresseeSelect instanceof HTMLDivElement &&\n addresseeValidationMessage &&\n addresseeValidationMessage instanceof HTMLDivElement\n )\n ) {\n return false;\n }\n\n titleInput.addEventListener(\"blur\", (event) => {\n const { currentTarget } = event;\n if (!(currentTarget instanceof HTMLInputElement)) return;\n titleValidationMessage.textContent = validateAnnouncementTitle(\n currentTarget.value,\n );\n });\n\n bodyTextArea.addEventListener(\"blur\", (event) => {\n const { currentTarget } = event;\n if (!(currentTarget instanceof HTMLTextAreaElement)) return;\n bodyValidationMessage.textContent = validateAnnouncementBody(\n currentTarget.value,\n );\n });\n\n sharedWithClassroom.addEventListener(\"click\", (event) => {\n const { currentTarget } = event;\n if (!(currentTarget instanceof HTMLInputElement)) return;\n addresseeValidationMessage.textContent = validateAnnouncementAddressee(\n currentTarget.value,\n );\n });\n\n addresseeSelect.addEventListener(\"click\", (event) => {\n const { currentTarget } = event;\n if (!(currentTarget instanceof HTMLDivElement)) return;\n addresseeValidationMessage.textContent = validateAnnouncementAddressee(\n currentTarget.innerText,\n );\n });\n\n const validateBeforeDraftSubmit = (event: MouseEvent) => {\n event.preventDefault();\n\n const titleValidationResultMessage = validateAnnouncementTitle(\n titleInput.value,\n );\n if (titleValidationResultMessage.length > 0) {\n titleValidationMessage.textContent = titleValidationResultMessage;\n event.stopImmediatePropagation();\n return;\n }\n\n const bodyValidationResultMessage = validateAnnouncementBody(\n bodyTextArea.value,\n );\n if (bodyValidationResultMessage.length > 0) {\n bodyValidationMessage.textContent = bodyValidationResultMessage;\n event.stopImmediatePropagation();\n return;\n }\n };\n\n const draftButton: HTMLButtonElement = document.querySelector(\n \".js-draft-submit\",\n );\n\n if (draftButton && draftButton instanceof HTMLButtonElement) {\n draftButton.addEventListener(\n \"click\",\n (event) => validateBeforeDraftSubmit(event),\n true, // useCapture=trueにして他のclickイベントハンドラより先に実行する\n );\n }\n\n multiFileAttachment();\n});\n","// This file is automatically compiled by Webpack, along with any other files\n// present in this directory. You're encouraged to place your actual application logic in\n// a relevant structure within app/javascript and only use these pack files to reference\n// that code so it'll be compiled.\n\nimport Rails from \"@rails/ujs\";\nimport Turbolinks from \"turbolinks\";\nimport * as ActiveStorage from \"@rails/activestorage\";\nimport * as Sentry from \"@sentry/browser\";\nimport { Integrations } from \"@sentry/tracing\";\nimport \"channels\";\nimport \"./course-members-select\";\nimport \"./dialog-v2\";\nimport \"./dialog\";\nimport \"./draft-submit\";\nimport \"./disable-on-submitting\";\nimport \"./drawer\";\nimport \"./dropdown\";\nimport \"./classrooms/classroom_managers/classroom-manager-role-dialog\";\nimport filePreview from \"./file-preview\";\nimport pdfPreview from \"./pdf-preview\";\nimport \"./header\";\nimport \"./history-back\";\nimport \"./invite\";\nimport openClose from \"./open-close\";\nimport \"./snackbar\";\nimport \"./styles/index.scss\";\nimport \"./bills/show\";\nimport \"./bills/card_payments/index\";\nimport \"./bills/konbini_payments/index\";\nimport \"./stripe/payment-method-form\";\nimport \"./fincode/platform-subscription-form\";\nimport \"./classrooms/enrollment\";\nimport \"./sessions/new\";\nimport \"./events/index\";\nimport \"./events/bulk-events-form\";\nimport \"./events/bulk-events-dialog\";\nimport \"./events/bulk-events-delete-dialog\";\nimport \"./events/bulk-events-edit-dialog\";\nimport \"./bill_group/new\";\nimport \"./recurrence_bill/new\";\nimport \"./optional_bill/new\";\nimport \"./settings/bank_accounts/new\";\nimport \"./announcements/new\";\nimport \"./validate_input_number\";\n\nRails.start();\nTurbolinks.start();\nActiveStorage.start();\n\nif (process.env.NODE_ENV === \"production\") {\n Sentry.init({\n dsn:\n \"https://f089295be7a8450f964ce0c168bd2eb6@o1008895.ingest.sentry.io/5990755\",\n environment: process.env.NODE_ENV,\n integrations: [new Integrations.BrowserTracing()],\n tracesSampleRate: 0.5,\n });\n}\n\n// Support component names relative to this directory:\nconst componentRequireContext = require.context(\"components\", true);\nconst ReactRailsUJS = require(\"react_ujs\");\nReactRailsUJS.useContext(componentRequireContext);\n\ndocument.addEventListener(\"turbolinks:load\", () => {\n filePreview();\n pdfPreview();\n openClose();\n});\n","document.addEventListener(\"turbolinks:load\", () => {\n const newPaymentButton = document.getElementsByClassName(\n \"js-new-payment-button\",\n );\n if (!(newPaymentButton && newPaymentButton instanceof HTMLButtonElement)) {\n return;\n }\n\n newPaymentButton.addEventListener(\"click\", () => {\n newPaymentButton.disabled = true;\n const newPaymentForm = newPaymentButton.closest(\"form\");\n newPaymentForm.submit();\n });\n});\n","document.addEventListener(\"turbolinks:load\", function () {\n const radioButtons: NodeListOf = document.querySelectorAll(\n \".js-classroom-manager-role-dialog\",\n );\n const button: HTMLButtonElement | null = document.querySelector(\n \".js-role-button\",\n );\n const dialog: HTMLElement | null = document.querySelector(\n \"#js-owner-change-confirm-dialog\",\n );\n const visibleSelector: string = \"--visible\";\n\n if (!button || !dialog) return;\n\n button.addEventListener(\"click\", function () {\n const selectedRole: string | undefined = Array.from(radioButtons).find((\n radio,\n ) => radio.checked)?.value;\n\n if (selectedRole === \"admin\") {\n dialog.classList.add(visibleSelector);\n } else {\n button.setAttribute(\"type\", \"submit\");\n dialog.classList.remove(visibleSelector);\n }\n });\n});\n","document.addEventListener(\"turbolinks:load\", function () {\n const enrollLink: HTMLAnchorElement = document.querySelector(\n \"#js-enroll-with-optional-bill\",\n );\n\n if (!(enrollLink && enrollLink instanceof HTMLAnchorElement)) {\n return false;\n }\n\n const optionalBills: HTMLInputElement[] = Array.prototype.slice.call(\n document.querySelectorAll(\".js-optional-bill\"),\n );\n\n enrollLink.addEventListener(\"click\", () => {\n const optionalBillId: string = optionalBills.find((optionalBill) =>\n optionalBill.checked\n )?.value;\n\n if (!optionalBillId) {\n return false;\n }\n\n enrollLink.href += `?optional_bill_id=${optionalBillId}`;\n });\n});\n","document.addEventListener(\"turbolinks:load\", () => {\n const selectAllBoxes: HTMLInputElement[] = Array.prototype.slice.call(\n document.querySelectorAll(\".js-course-members-select-all\"),\n );\n const targetBoxes: HTMLInputElement[] = Array.prototype.slice.call(\n document.querySelectorAll(\".js-course-members-target\"),\n );\n const changeState = \"--change\";\n const state = {\n enrollments: targetBoxes.map((element) => ({\n id: element.id,\n checked: element.checked,\n })),\n };\n\n function setState(): void {\n state.enrollments.forEach((enrollment, i) => {\n targetBoxes[i].checked = enrollment.checked;\n });\n if (state.enrollments.every((enrollment) => enrollment.checked)) {\n selectAllBoxes.forEach((selectAllBox) => {\n selectAllBox.checked = true;\n });\n } else {\n selectAllBoxes.forEach((selectAllBox) => {\n selectAllBox.checked = false;\n });\n }\n printCheckedCount();\n }\n setState();\n\n function printCheckedCount() {\n const header = document.getElementById(\"js-course-members-count-header\");\n const count = state.enrollments\n .filter((enrollment) => enrollment.checked).length;\n if (!header) {\n return;\n }\n header.textContent = `(${count})`;\n }\n printCheckedCount();\n\n selectAllBoxes.forEach((selectAllBox) => {\n selectAllBox.addEventListener(\"change\", () => {\n state.enrollments = state.enrollments.map((enrollment) => {\n if (selectAllBox.checked != enrollment.checked) {\n const item = document.getElementById(enrollment.id)\n .closest(\".js-course-members-item\");\n item.classList.toggle(changeState);\n }\n return { ...enrollment, checked: selectAllBox.checked };\n });\n setState();\n });\n });\n\n targetBoxes.forEach((targetBox) => {\n targetBox.addEventListener(\"change\", () => {\n state.enrollments = state.enrollments.map((enrollment) => {\n return {\n ...enrollment,\n checked: enrollment.id == targetBox.id\n ? targetBox.checked\n : enrollment.checked,\n };\n });\n const item = targetBox.closest(\".js-course-members-item\");\n item.classList.toggle(changeState);\n setState();\n });\n const memberItem = targetBox.closest(\".js-course-members-item\");\n memberItem.classList.add(\n targetBox.checked ? \"--pre-selected\" : \"--un-selected\",\n );\n });\n});\n","document.addEventListener(\"turbolinks:load\", function () {\n const dialogToggleSwitches = document.querySelectorAll(\n \".js-dialog-v2-toggle-switch\",\n );\n\n if (dialogToggleSwitches.length < 1) {\n return false;\n }\n\n for (let i = 0; i < dialogToggleSwitches.length; i++) {\n dialogToggleSwitches[i].addEventListener(\"click\", function () {\n const dialog = document.getElementById(this.dataset.targetDialog);\n const visibleSelector = \"--visible\";\n\n if (dialog.classList.contains(visibleSelector)) {\n dialog.classList.remove(visibleSelector);\n } else {\n dialog.classList.add(visibleSelector);\n }\n });\n }\n});\n","document.addEventListener(\"turbolinks:load\", function () {\n const openSwitches = document.querySelectorAll(\".js-dialog-open\");\n const closeSwitches = document.querySelectorAll(\".js-dialog-close\");\n const openOnceDialogs = document.querySelectorAll(\".js-dialog-open-once\");\n\n for (let i = 0; i < openSwitches.length; i++) {\n openSwitches[i].addEventListener(\"click\", function () {\n document.getElementById(this.dataset.dialog).classList.add(\"--visible\");\n });\n }\n\n for (let i = 0; i < closeSwitches.length; i++) {\n closeSwitches[i].addEventListener(\"click\", function () {\n const dialog = this.closest(\".js-dialog\");\n dialog.classList.remove(\"--visible\");\n\n if (dialog.classList.contains(\"js-dialog-open-once\")) {\n localStorage.setItem(dialog.dataset.dialogKey, true);\n }\n });\n }\n\n for (let i = 0; i < openOnceDialogs.length; i++) {\n const isOpened = localStorage.getItem(openOnceDialogs[i].dataset.dialogKey);\n\n if (isOpened) {\n openOnceDialogs[i].classList.remove(\"--visible\");\n }\n }\n});\n","document.addEventListener(\"turbolinks:load\", () => {\n const submitButtons = document.querySelectorAll(\n \".js-disable-on-submitting\",\n );\n\n const setDisabled = (button) => {\n button.addEventListener(\"click\", (event) => {\n event.preventDefault();\n\n const form = document.getElementById(button.dataset.targetForm);\n if (!(form instanceof HTMLFormElement)) {\n return;\n }\n\n button.disabled = true;\n form.submit();\n });\n };\n\n submitButtons.forEach((button) => setDisabled(button));\n});\n","document.addEventListener(\"turbolinks:load\", () => {\n const issueButtons = document.querySelectorAll(\n \".js-submit-to-issue\",\n );\n const draftButtons = document.querySelectorAll(\n \".js-draft-submit\",\n );\n\n const setDraftAndSubmit = (button, isDraft: boolean) => {\n button.addEventListener(\"click\", (event) => {\n event.preventDefault();\n\n const form = document.getElementById(button.dataset.targetForm);\n const hiddenField = document.getElementById(\n button.dataset.targetHiddenField,\n );\n if (\n !(form instanceof HTMLFormElement &&\n hiddenField instanceof HTMLInputElement)\n ) {\n return;\n }\n\n hiddenField.value = isDraft.toString();\n button.disabled = true;\n form.submit();\n });\n };\n\n issueButtons.forEach((button) => setDraftAndSubmit(button, false));\n draftButtons.forEach((button) => setDraftAndSubmit(button, true));\n});\n","document.addEventListener(\"turbolinks:load\", function () {\n const switches = document.querySelectorAll(\".js-drawer-switch\");\n const links = document.querySelectorAll(\".js-drawer-link a\");\n\n for (let i = 0; i < switches.length; i++) {\n switches[i].addEventListener(\"click\", function () {\n document.documentElement.classList.toggle(\"is-drawer-opened\");\n });\n }\n\n for (let i = 0; i < links.length; i++) {\n links[i].addEventListener(\"click\", function () {\n document.documentElement.classList.remove(\"is-drawer-opened\");\n });\n }\n});\n","document.addEventListener(\"turbolinks:load\", () => {\n const dropdownMenus = document.querySelectorAll(\".js-dropdown\");\n if (dropdownMenus.length < 1) {\n return false;\n }\n\n const dropdownSwitches: HTMLElement[] = Array.prototype.slice.call(\n document.querySelectorAll(\".js-dropdown-switch\"),\n );\n\n const openDropdownMenu = (dropdownSwitch: HTMLElement) => {\n const id = dropdownSwitch.getAttribute(\"id\");\n const dropdownList = document.querySelector(`[aria-labelledby=\"${id}\"]`);\n if (dropdownList) {\n dropdownSwitch.setAttribute(\"aria-expanded\", \"true\");\n dropdownList.setAttribute(\"aria-hidden\", \"false\");\n }\n };\n const closeDropdownMenu = (dropdownSwitch: HTMLElement) => {\n const id = dropdownSwitch.getAttribute(\"id\");\n const dropdownList = document.querySelector(`[aria-labelledby=\"${id}\"]`);\n if (dropdownList) {\n dropdownSwitch.setAttribute(\"aria-expanded\", \"false\");\n dropdownList.setAttribute(\"aria-hidden\", \"true\");\n }\n };\n\n dropdownSwitches.forEach((dropdownSwitch) => {\n dropdownSwitch.addEventListener(\"click\", () => {\n const isExpanded = dropdownSwitch.ariaExpanded === \"true\";\n const active = document.querySelector('[aria-expanded=\"true\"]');\n if (isExpanded || (active && active !== dropdownSwitch)) {\n closeDropdownMenu(dropdownSwitch);\n } else {\n openDropdownMenu(dropdownSwitch);\n }\n });\n });\n\n // ドロップダウン以外をクリックすると、開いた状態のドロップダウンメニューが閉じる挙動\n document.addEventListener(\"click\", (event) => {\n const active = document.querySelector('[aria-expanded=\"true\"]');\n const isClickedDropdown = event.target instanceof HTMLElement &&\n event.target.closest(\".js-dropdown\");\n if (!isClickedDropdown && active) {\n dropdownSwitches.forEach((dropdownSwitch) =>\n closeDropdownMenu(dropdownSwitch)\n );\n }\n });\n});\n","document.addEventListener(\"turbolinks:load\", () => {\n const form = document.getElementById(\"js-bulk-events-delete-form\");\n\n if (!(form && form instanceof HTMLFormElement)) {\n return;\n }\n\n form.addEventListener(\"submit\", (event) => {\n event.preventDefault();\n\n const deleteOptionElement = form.querySelector(\n 'input[name=\"delete_option\"]:checked',\n );\n\n if (\n !(deleteOptionElement && deleteOptionElement instanceof HTMLInputElement)\n ) {\n return;\n }\n\n if (deleteOptionElement.value === \"only\") {\n form.action = form.dataset.onlyPath;\n } else if (deleteOptionElement.value === \"after\") {\n form.action = form.dataset.afterPath;\n } else if (deleteOptionElement.value === \"all\") {\n form.action = form.dataset.allPath;\n }\n\n form.submit();\n });\n});\n","document.addEventListener(\"turbolinks:load\", () => {\n const div = document.getElementById(\"js-bulk-events-edit-form\");\n\n if (!(div && div instanceof HTMLDivElement)) {\n return;\n }\n\n const bulkEventsEditButton = div.querySelector(\n '[data-action=\"bulk_events-edit-button\"]',\n );\n const afterStartsAtRadioButton = div.querySelector(\n 'input[name=\"event[edit_option]\"][value=\"after_starts_at\"]',\n );\n const afterStartsAtRadioButtonLabel = div.querySelector(\n 'label[for=\"event_edit_option_after_starts_at\"]',\n );\n const cancelButton = div.querySelector(\".js-dialog-v2-toggle-switch\");\n\n if (\n !(bulkEventsEditButton &&\n bulkEventsEditButton instanceof HTMLButtonElement &&\n afterStartsAtRadioButton &&\n afterStartsAtRadioButton instanceof HTMLInputElement &&\n afterStartsAtRadioButtonLabel &&\n afterStartsAtRadioButtonLabel instanceof HTMLLabelElement &&\n cancelButton && cancelButton instanceof HTMLButtonElement)\n ) {\n return;\n }\n\n if (\n afterStartsAtRadioButton &&\n afterStartsAtRadioButton instanceof HTMLInputElement\n ) {\n const deadlineForReplyDate = document.querySelector(\n \".js-deadline-for-reply-date\",\n );\n const deadlineForReplyTime = document.querySelector(\n \".js-deadline-for-reply-time\",\n );\n\n if (\n !(deadlineForReplyDate &&\n deadlineForReplyDate instanceof HTMLInputElement &&\n deadlineForReplyTime &&\n deadlineForReplyTime instanceof HTMLInputElement)\n ) {\n return;\n }\n\n const updateAfterStartsAtRadioButtonState = () => {\n if (\n (deadlineForReplyDate && deadlineForReplyDate.value) ||\n (deadlineForReplyTime && deadlineForReplyTime.value)\n ) {\n afterStartsAtRadioButton.disabled = true;\n afterStartsAtRadioButtonLabel.classList.add(\"disabled-label\");\n } else {\n afterStartsAtRadioButton.disabled = false;\n afterStartsAtRadioButtonLabel.classList.remove(\"disabled-label\");\n }\n };\n\n updateAfterStartsAtRadioButtonState();\n\n deadlineForReplyDate.addEventListener(\n \"input\",\n updateAfterStartsAtRadioButtonState,\n );\n deadlineForReplyTime.addEventListener(\n \"input\",\n updateAfterStartsAtRadioButtonState,\n );\n }\n\n // 選択された編集オプションに応じてフォームの送信先を変更する\n bulkEventsEditButton.addEventListener(\"click\", (event) => {\n event.preventDefault();\n\n const editOptionElement = div.querySelector(\n 'input[name=\"event[edit_option]\"]:checked',\n );\n\n if (!(editOptionElement && editOptionElement instanceof HTMLInputElement)) {\n return;\n }\n\n const form = document.getElementById(\"bill-form\");\n\n if (!(form && form instanceof HTMLFormElement)) {\n return;\n }\n\n if (editOptionElement.value === \"only_event\") {\n form.action = div.dataset.onlyPath;\n } else if (editOptionElement.value === \"after_starts_at\") {\n form.action = div.dataset.afterPath;\n }\n\n form.submit();\n });\n\n // キャンセルボタンを押したら「この予定だけ」が選択されるようにリセットする\n cancelButton.addEventListener(\"click\", () => {\n const onlyEventRadioButton = div.querySelector(\n 'input[name=\"event[edit_option]\"][value=\"only_event\"]',\n );\n\n if (\n !(onlyEventRadioButton &&\n onlyEventRadioButton instanceof HTMLInputElement)\n ) {\n return;\n }\n\n onlyEventRadioButton.checked = true;\n });\n});\n","document.addEventListener(\"turbolinks:load\", () => {\n const bulkCreateButton = document.getElementById(\"bulk-create-button\");\n const bulkCancelButton = document.getElementById(\"bulk-cancel-button\");\n const bulkCreateMessage = document.getElementById(\"bulk-create-message\");\n const deadlineDateField = document.querySelector(\n \".js-deadline-for-reply-date\",\n ) as HTMLInputElement;\n const deadlineTimeField = document.querySelector(\n \".js-deadline-for-reply-time\",\n ) as HTMLInputElement;\n const notifyCheckbox = document.getElementById(\n \"event_notify\",\n ) as HTMLInputElement;\n const notifyLabel = document.querySelector(\"label[for='event_notify']\");\n const form = document.getElementById(\"bill-form\") as HTMLFormElement;\n const submitButton = document.querySelector(\n \".js-submit-button\",\n ) as HTMLElement;\n const dialogToggleButton = document.querySelector(\n \".js-dialog-v2-toggle-switch\",\n ) as HTMLElement;\n\n if (\n !(bulkCreateButton && bulkCancelButton && bulkCreateMessage &&\n deadlineDateField && deadlineTimeField && notifyCheckbox &&\n notifyLabel && form && submitButton && dialogToggleButton)\n ) {\n return;\n }\n\n const originalAction = form.action;\n const bulkAction = form.dataset.bulkAction; // 一括で作成するエンドポイントがセットされている\n const csrfToken = document.querySelector('meta[name=\"csrf-token\"]')\n .getAttribute(\"content\");\n\n bulkCreateButton.addEventListener(\"click\", () => {\n bulkCreateMessage.style.display = \"block\";\n bulkCreateButton.style.display = \"none\";\n bulkCancelButton.style.display = \"block\";\n deadlineDateField.setAttribute(\"disabled\", \"true\");\n deadlineTimeField.setAttribute(\"disabled\", \"true\");\n notifyCheckbox.setAttribute(\"disabled\", \"true\");\n notifyLabel.classList.add(\"grayed-out\");\n form.action = bulkAction;\n submitButton.style.display = \"none\";\n dialogToggleButton.style.display = \"block\";\n\n if (deadlineDateField.value) {\n deadlineDateField.value = \"\";\n }\n if (deadlineTimeField.value) {\n deadlineTimeField.value = \"\";\n }\n if (notifyCheckbox.checked) {\n notifyCheckbox.checked = false;\n }\n\n // CSRF tokenを再設定\n const csrfInput = document.createElement(\"input\");\n csrfInput.type = \"hidden\";\n csrfInput.name = \"authenticity_token\";\n csrfInput.value = csrfToken;\n form.appendChild(csrfInput);\n });\n\n bulkCancelButton.addEventListener(\"click\", () => {\n bulkCreateMessage.style.display = \"none\";\n bulkCreateButton.style.display = \"block\";\n bulkCancelButton.style.display = \"none\";\n deadlineDateField.removeAttribute(\"disabled\");\n deadlineTimeField.removeAttribute(\"disabled\");\n notifyCheckbox.removeAttribute(\"disabled\");\n notifyLabel.classList.remove(\"grayed-out\");\n form.action = originalAction;\n submitButton.style.display = \"block\";\n dialogToggleButton.style.display = \"none\";\n\n // CSRF tokenを削除\n const csrfInput = form.querySelector(\n 'input[name=\"authenticity_token\"]',\n );\n if (csrfInput) {\n form.removeChild(csrfInput);\n }\n });\n});\n","import toBase64 from \"./file-to-base64\";\n\nexport default function filePreview() {\n const elements = document.querySelectorAll(\".js-file-preview\");\n\n Array.prototype.forEach.call(elements, (element: HTMLInputElement) => {\n element.addEventListener(\"change\", async (event) => {\n const target = event.target as HTMLInputElement;\n const file = target.files[0];\n if (!file || !file.type.match(\"image.*\")) {\n return;\n }\n\n const data = await toBase64(file);\n const selector = element.dataset.previewTarget;\n\n if (typeof data === \"string\" && typeof selector === \"string\") {\n const targetElements = document.querySelectorAll(selector);\n Array.prototype.forEach.call(\n targetElements,\n (element: HTMLElement) => {\n if (element instanceof HTMLImageElement) {\n element.src = data;\n }\n },\n );\n }\n });\n });\n}\n","const isIntegralValue = (value: string): boolean => {\n if (!value) return false;\n return /^[-]?([1-9]\\d*|0)$/.test(value);\n};\n\nexport const validateBillName = (value: string): string => {\n if (!value) {\n return \"項目名を入力してください。\";\n }\n\n if (value.length > 140) {\n return \"項目名は140文字以内で入力してください。\";\n }\n\n return \"\";\n};\n\nexport const validateBillAmount = (value: string): string => {\n if (!value) {\n return \"金額を入力してください。\";\n }\n\n if (!isIntegralValue(value)) {\n return \"金額は整数で入力してください。\";\n }\n\n const amount = Number.parseInt(value);\n if (amount < 300) {\n return \"金額は300円以上で入力してください。\";\n }\n\n if (amount > 300_000) {\n return \"金額は30万円以下で入力してください。\";\n }\n\n return \"\";\n};\n\nexport const validateOptionalBillAmount = (value: string): string => {\n if (!value) {\n return \"金額を入力してください。\";\n }\n\n if (!isIntegralValue(value)) {\n return \"金額は整数で入力してください。\";\n }\n\n const amount = Number.parseInt(value);\n if (amount != 0 && amount < 300) {\n return \"金額は0円、または300円以上で入力してください。\";\n }\n\n if (amount > 300_000) {\n return \"金額は30万円以下で入力してください。\";\n }\n\n return \"\";\n};\n\nexport const validateAnnouncementTitle = (value: string): string => {\n if (!value) {\n return \"タイトルを入力してください。\";\n }\n\n if (value.length > 140) {\n return \"タイトルは140文字以内で入力してください。\";\n }\n\n return \"\";\n};\n\nexport const validateAnnouncementBody = (value: string): string => {\n if (!value) {\n return \"内容を入力してください。\";\n }\n\n if (value.length > 2000) {\n return \"内容は2000文字以内で入力してください。\";\n }\n\n return \"\";\n};\n\nexport const validateAnnouncementAddressee = (value: string): string => {\n if (value == \"0人\") {\n return \"受講者を選択してください。\";\n }\n\n return \"\";\n};\n","document.addEventListener(\"turbolinks:load\", function () {\n const transparentHeader = document.getElementById(\"js-transparent-header\");\n\n if (!transparentHeader) {\n return false;\n }\n\n const activeClassName = \"--active\";\n const throttle = function (fn, interval) {\n let lastTime = Date.now() - interval;\n return function () {\n if (lastTime + interval < Date.now()) {\n lastTime = Date.now();\n fn();\n }\n };\n };\n\n self.addEventListener(\n \"scroll\",\n throttle(function () {\n scrollY = document.documentElement.scrollTop || document.body.scrollTop;\n if (scrollY > 100) {\n if (!transparentHeader.classList.contains(activeClassName)) {\n transparentHeader.classList.add(activeClassName);\n }\n } else {\n if (transparentHeader.classList.contains(activeClassName)) {\n transparentHeader.classList.remove(activeClassName);\n }\n }\n }, 100),\n );\n});\n","document.addEventListener(\"turbolinks:load\", function () {\n const historyBackButtons = document.querySelectorAll(\".js-history-back\");\n\n for (let i = 0; i < historyBackButtons.length; i++) {\n historyBackButtons[i].addEventListener(\"click\", function (event) {\n history.back();\n event.preventDefault();\n });\n }\n});\n","import QRCode from \"qrcode\";\nimport ClipboardJS from \"clipboard\";\nimport showingSnackBar from \"./snackbar\";\n\ndocument.addEventListener(\"turbolinks:load\", function () {\n const inviteUrl = document.getElementById(\"js-invite-url\");\n const inviteQRCode = document.getElementById(\"js-invite-qrcode\");\n\n if (!(inviteUrl && inviteUrl instanceof HTMLInputElement)) {\n return false;\n }\n\n QRCode.toString(\n inviteUrl.value,\n {\n type: \"svg\",\n },\n function (_err, svg) {\n inviteQRCode.innerHTML = svg;\n },\n );\n\n const inviteCopyButton = new ClipboardJS(\"#js-invite-copy-button\");\n\n inviteCopyButton.on(\"success\", function (event) {\n event.clearSelection();\n showingSnackBar(\"招待リンクをコピーしました\");\n });\n});\n","import toBase64 from \"./file-to-base64\";\n\ntype Image = `image/${string}`;\ntype Pdf = \"application/pdf\";\n\ntype PreviewFile = {\n name: string;\n type: Image | Pdf;\n content: string | ArrayBuffer;\n};\n\nfunction createImagePreviewElement(previewFile: PreviewFile): HTMLElement {\n const wrapperDivElem = document.createElement(\"div\");\n\n const innerDivElem = document.createElement(\"div\");\n innerDivElem.className = \"thumbnail-card__media\";\n\n const imageElem = new Image(); // プレビュー画像のサイズはCSSで設定する\n imageElem.src = previewFile.content as string;\n\n innerDivElem.appendChild(imageElem);\n wrapperDivElem.appendChild(innerDivElem);\n\n return wrapperDivElem;\n}\n\nfunction createPdfPreviewElement(previewFile: PreviewFile): HTMLElement {\n const wrapperDivElem = document.createElement(\"div\");\n\n const innerDivFileElem = document.createElement(\"div\");\n innerDivFileElem.className = \"thumbnail-card__file\";\n\n const divBody = document.createElement(\"div\");\n divBody.className = \"_body\";\n divBody.innerText = previewFile.name;\n\n const divTrailing =\n 'PDF
';\n innerDivFileElem.innerHTML = divTrailing;\n innerDivFileElem.prepend(divBody);\n wrapperDivElem.appendChild(innerDivFileElem);\n\n return wrapperDivElem;\n}\n\nfunction createPreviewElement(previewFile: PreviewFile): HTMLElement {\n const liElem = document.createElement(\"li\");\n liElem.className = \"_item\";\n\n const outerDivElem = document.createElement(\"div\");\n outerDivElem.className = \"thumbnail-card\";\n\n const wrapperDivElem = previewFile.type.match(\"image.*\")\n ? createImagePreviewElement(previewFile)\n : createPdfPreviewElement(previewFile);\n\n outerDivElem.appendChild(wrapperDivElem);\n liElem.appendChild(outerDivElem);\n\n return liElem;\n}\n\nasync function multiFilePreview(target: HTMLInputElement) {\n const files = target.files;\n if (!files || !files.length) return;\n\n const selector = target.dataset.previewTarget;\n if (!selector || typeof selector !== \"string\") return;\n\n const targetElement = document.querySelector(selector);\n if (!targetElement) return;\n\n const validFiles = Array.from(files)\n .filter((file) => file && file.type.match(\"image.*|application/pdf\"));\n\n const previewElements = (await Promise.all(\n validFiles.map(async (file) => ({\n name: file.name,\n type: file.type,\n content: await toBase64(file),\n })),\n )).filter((file: PreviewFile) => typeof file.content === \"string\")\n .map((file: PreviewFile) => createPreviewElement(file));\n\n targetElement.textContent = \"\"; // 前回のプレビューをクリア\n targetElement.append(...previewElements);\n}\n\nfunction validateNumberOfFiles(files: FileList): boolean {\n return files.length <= 5;\n}\n\nfunction validateSizeOfFiles(files: FileList): boolean {\n const largeFiles = Array.from(files).map((file) => file.size / 1024 ** 2)\n .filter((mbSize) => mbSize > 10);\n\n return largeFiles.length == 0;\n}\n\nfunction clearFileAttachments(target: HTMLInputElement) {\n target.value = \"\";\n}\n\nexport default function multiFileAttachment() {\n const elements = document.querySelectorAll(\".js-multi-file-preview\");\n\n Array.prototype.forEach.call(elements, (element: HTMLInputElement) => {\n element.addEventListener(\"change\", async (event) => {\n const target = event.target as HTMLInputElement;\n const multiple = element.multiple;\n if (!multiple) return;\n\n const files = target.files;\n if (!files || !files.length) return;\n\n if (!validateNumberOfFiles(files)) {\n alert(\"添付できるファイルは5つまでです。\");\n clearFileAttachments(target);\n return;\n }\n\n if (!validateSizeOfFiles(files)) {\n alert(\"添付するファイルのサイズは10MB以下にしてください。\");\n clearFileAttachments(target);\n return;\n }\n\n await multiFilePreview(target);\n });\n });\n}\n","export default function openClose(): void {\n Array.prototype.forEach.call(\n document.querySelectorAll(\".js-click-open\"),\n (element: HTMLElement) => {\n element.addEventListener(\"click\", () => {\n openBy(element);\n });\n element.addEventListener(\"keydown\", (event: KeyboardEvent) => {\n const eventKey = event.key;\n if (eventKey === \"Enter\") {\n openBy(element);\n }\n });\n\n if (element.classList.contains(\"js-open\")) {\n openBy(element);\n }\n },\n );\n\n Array.prototype.forEach.call(\n document.querySelectorAll(\".js-click-close\"),\n (element: HTMLElement) => {\n element.addEventListener(\"click\", () => {\n closeBy(element);\n });\n element.addEventListener(\"keydown\", (event: KeyboardEvent) => {\n const eventKey = event.key;\n if (eventKey === \"Enter\") {\n openBy(element);\n }\n });\n\n if (element.classList.contains(\"js-close\")) {\n closeBy(element);\n }\n },\n );\n\n Array.prototype.forEach.call(\n document.querySelectorAll(\".js-check-open\"),\n (element: HTMLElement) => {\n element.addEventListener(\"change\", (event: Event) => {\n const eventTarget = event.target;\n if (eventTarget instanceof HTMLInputElement && eventTarget.checked) {\n openBy(element);\n }\n });\n\n if (element instanceof HTMLInputElement && element.checked) {\n openBy(element);\n }\n },\n );\n\n Array.prototype.forEach.call(\n document.querySelectorAll(\".js-check-close\"),\n (element: HTMLElement) => {\n element.addEventListener(\"change\", (event: Event) => {\n const eventTarget = event.target;\n if (eventTarget instanceof HTMLInputElement && eventTarget.checked) {\n closeBy(element);\n }\n });\n\n if (element instanceof HTMLInputElement && element.checked) {\n closeBy(element);\n }\n },\n );\n\n Array.prototype.forEach.call(\n document.querySelectorAll(\".js-toggle\"),\n (element: HTMLElement) => {\n element.addEventListener(\"click\", () => {\n toggleBy(element);\n });\n element.addEventListener(\"keydown\", (event: KeyboardEvent) => {\n const eventKey = event.key;\n const isEnterKey = eventKey === \"Enter\" || event.keyCode === 13;\n if (isEnterKey) {\n event.preventDefault(); // Enter キーによるクリックを防止\n toggleBy(element);\n }\n });\n },\n );\n}\n\nfunction openBy(element: HTMLElement): void {\n const target = element.dataset.openTarget;\n if (target) {\n Array.prototype.forEach.call(\n document.querySelectorAll(target),\n (targetElement: HTMLElement) => {\n targetElement.classList.remove(\"--hidden\");\n targetElement.classList.add(\"--visible\");\n targetElement.hidden = false;\n },\n );\n }\n}\n\nfunction closeBy(element: HTMLElement): void {\n const target = element.dataset.closeTarget;\n if (target) {\n Array.prototype.forEach.call(\n document.querySelectorAll(target),\n (targetElement: HTMLElement) => {\n targetElement.classList.remove(\"--visible\");\n targetElement.classList.add(\"--hidden\");\n targetElement.hidden = true;\n },\n );\n }\n}\n\nfunction toggleBy(element: HTMLElement): void {\n const target = element.dataset.toggleTarget;\n const parent = element.dataset.toggleParent;\n const parentElement = document.querySelector(parent);\n const expanded = parentElement.getAttribute(\"aria-expanded\");\n if (target && parent) {\n Array.prototype.forEach.call(\n document.querySelectorAll(target),\n (targetElement: HTMLElement) => {\n if (expanded == \"false\") {\n parentElement.setAttribute(\"aria-expanded\", \"true\");\n targetElement.setAttribute(\"aria-hidden\", \"false\");\n targetElement.hidden = false;\n } else {\n parentElement.setAttribute(\"aria-expanded\", \"false\");\n targetElement.setAttribute(\"aria-hidden\", \"true\");\n targetElement.hidden = true;\n }\n },\n );\n }\n}\n","export default function pdfPreview(): void {\n const pdfElements = document.querySelectorAll(\".js-pdf-preview\");\n\n Array.prototype.forEach.call(pdfElements, (element: HTMLInputElement) => {\n element.addEventListener(\"change\", (event) => {\n const target = event.target as HTMLInputElement;\n if (!(target instanceof HTMLInputElement)) return;\n\n const file = target.files?.[0];\n if (!file || file.type !== \"application/pdf\") {\n alert(\"PDFファイルのみアップロード可能です。\");\n target.value = \"\"; // 選択されたファイルをリセット\n return;\n }\n\n const parent = element.closest(\".file-upload__item\");\n if (!(parent && parent instanceof HTMLElement)) return;\n\n const filenameElement = parent.querySelector(\".term-filename\");\n if (!(filenameElement && filenameElement instanceof HTMLElement)) return;\n\n // 利用規約のプレビューを初期化\n filenameElement.innerHTML = \"\";\n\n // 選択した利用規約のURLを生成\n const objectUrl = URL.createObjectURL(file);\n\n const link = document.createElement(\"a\");\n link.textContent = file.name;\n link.href = objectUrl;\n link.target = \"_blank\";\n filenameElement.appendChild(link);\n\n // メモリリーク防止のためのクリーンアップ\n element.addEventListener(\"change\", () => {\n URL.revokeObjectURL(objectUrl);\n }, { once: true });\n });\n });\n}\n","document.addEventListener(\"turbolinks:load\", () => {\n const signInForm = document.getElementById(\"sign-in-form\");\n if (!(signInForm && signInForm instanceof HTMLFormElement)) {\n return;\n }\n\n setTimeout(() => signInForm.submit(), 1000);\n});\n","document.addEventListener(\"turbolinks:load\", () => {\n const bankCodeTargets: NodeListOf = document\n .querySelectorAll(\n \".js-bank-code-target\",\n );\n const branchCodeInput: HTMLInputElement = document.querySelector(\n \"#js-bank-account-branch-code\",\n );\n const bankAccountNumberInput: HTMLInputElement = document.querySelector(\n \"#js-bank-account-number\",\n );\n const bankAccountNameInput: HTMLInputElement = document.querySelector(\n \"#js-bank-account-name\",\n );\n const bankAccountTypeInputs: NodeListOf = document\n .querySelectorAll(\n \".js-bank-account-type\",\n );\n const branchCodeElement: HTMLInputElement = document.querySelector(\n \".js-bank-account-branch-code-item\",\n );\n const bankAccountNumberElement: HTMLInputElement = document.querySelector(\n \".js-bank-account-number-item\",\n );\n const bankAccountNameElement: HTMLInputElement = document.querySelector(\n \".js-bank-account-name-item\",\n );\n const bankAccountTypeElement: HTMLInputElement = document.querySelector(\n \".js-bank-account-type-item\",\n );\n const bankInitialKanaNavs: NodeListOf = document\n .querySelectorAll(\n \".js-bank-initial-kana-nav\",\n );\n const selectBankLabels: NodeListOf = document\n .querySelectorAll(\n \".js-select-bank-label\",\n );\n if (\n !(\n bankCodeTargets && bankCodeTargets[0] instanceof HTMLInputElement &&\n branchCodeElement && branchCodeInput &&\n branchCodeInput instanceof HTMLInputElement &&\n bankAccountNumberElement && bankAccountNumberInput &&\n bankAccountNumberInput instanceof HTMLInputElement &&\n bankAccountNameElement && bankAccountNameInput &&\n bankAccountNameInput instanceof HTMLInputElement &&\n bankAccountTypeElement && bankAccountTypeInputs[0] &&\n bankAccountTypeInputs[0] instanceof HTMLInputElement &&\n selectBankLabels.length > 0\n )\n ) {\n return false;\n }\n\n const refreshForm = () => {\n const selectedBank = Array.from(bankCodeTargets).find((t) => t.checked);\n if (!(selectedBank && selectedBank instanceof HTMLInputElement)) return;\n\n const {\n requiredBranchCode,\n requiredAccountNumber,\n requiredAccountName,\n requiredAccountType,\n bankLabel,\n } = selectedBank.dataset;\n if (\n !(requiredBranchCode &&\n requiredAccountType &&\n requiredAccountNumber &&\n requiredAccountName &&\n bankLabel)\n ) {\n return false;\n }\n\n if (requiredBranchCode === \"false\") {\n branchCodeInput.value = \"\";\n branchCodeElement.hidden = true;\n } else {\n branchCodeElement.hidden = false;\n }\n if (requiredAccountNumber === \"false\") {\n bankAccountNumberInput.value = \"\";\n bankAccountNumberElement.hidden = true;\n } else {\n bankAccountNumberElement.hidden = false;\n }\n if (requiredAccountName === \"false\") {\n bankAccountNameInput.value = \"\";\n bankAccountNameElement.hidden = true;\n } else {\n bankAccountNameElement.hidden = false;\n }\n if (requiredAccountType === \"false\") {\n bankAccountTypeElement.value = \"\";\n bankAccountTypeElement.hidden = true;\n } else {\n bankAccountTypeElement.hidden = false;\n }\n\n selectBankLabels.forEach((label) => {\n label.textContent = bankLabel;\n });\n };\n\n // ブラウザバック時も動いてほしいので pageshow を見ている\n globalThis.addEventListener(\"pageshow\", refreshForm);\n bankCodeTargets.forEach(\n (target) => target.addEventListener(\"change\", refreshForm),\n );\n\n bankInitialKanaNavs.forEach((kanaNav) => {\n kanaNav.addEventListener(\"click\", () => {\n const bankGroup = document.getElementById(kanaNav.dataset.initialKanaId);\n // position:stickyになっていると上にスクロールできないためrelativeにする\n bankGroup.classList.add(\"--relative\");\n bankGroup.scrollIntoView(\n { behavior: \"smooth\" },\n );\n // position:stickyにもどす\n bankGroup.classList.remove(\"--relative\");\n });\n });\n});\n","import showingSnackBar from \"packs/snackbar\";\n\ndocument.addEventListener(\"turbolinks:load\", () => {\n const textFields = document.querySelectorAll(\n \".js-half-width_numbers_only\",\n );\n\n if (!textFields.length) return;\n\n textFields.forEach((textField) => {\n if (!(textField instanceof HTMLInputElement)) {\n return;\n }\n\n textField.addEventListener(\"input\", (event: Event) => {\n const inputElement = event.target as HTMLInputElement;\n const inputNumber = inputElement.value.replace(\n /[0-9]/g,\n (s) => String.fromCharCode(s.charCodeAt(0) - 0xFEE0),\n );\n\n if (/[^0-9]/.test(inputNumber)) {\n showingSnackBar(\"定員には数字を入力してください\");\n inputElement.value = \"\";\n return;\n }\n\n inputElement.value = inputNumber;\n });\n });\n});\n"],"names":["webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","channels","require","forEach","document","addEventListener","async","form","getElementById","cardForm","usingNewCardElement","clientSecretElement","savingCardElement","paymentMethods","Array","prototype","slice","call","querySelectorAll","HTMLFormElement","HTMLInputElement","stripe","card","createCardElements","length","hidden","paymentMethod","checked","event","preventDefault","method","find","value","error","paymentIntent","confirmCardPayment","payment_method","payment_method_options","setup_future_usage","Sentry","message","alert","status","formData","FormData","append","redirectURL","fetch","action","body","url","Turbolinks","err","loadStripe","process","elements","fonts","cssSrc","stripeCardElementOptions","style","base","color","fontFamily","fontSize","invalid","classes","focus","empty","errorDisplay","showError","textContent","create","mount","on","cardExpiry","cardCvc","nameElement","emailElement","confirmationNumberElement","_paymentIntent","confirmKonbiniPayment","billing_details","name","email","konbini","confirmation_number","newCardElement","paymentForm","createPaymentElement","params","URLSearchParams","location","search","substring","get","notifySetupIntentStatus","confirmSetup","confirmParams","return_url","payment_method_data","address","country","querySelector","captureException","clientSecret","fetchClientSecret","appearance","variables","colorPrimary","colorText","colorDanger","spacingUnit","borderRadius","fields","billingDetails","clientSecretPath","dataset","response","json","client_secret","setup_intent_client_secret","setupIntent","retrieveSetupIntent","showingSnackBar","customerIdInput","submittedPath","fincode","Fincode","layout","colorLabelText","colorBackgroundInput","colorError","ui","getFormData","customer_id","default_flag","card_no","cardNo","expire","holder_name","holderName","security_code","CVC","cards","eventStartDateInput","eventEndDateInput","eventStartTimeInput","eventEndTimeInput","convertDate","date","time","parse","Date","eventStartDate","calcEventDuration","differenceInMinutes","eventDuration","updateEventDuration","updateEventEndDate","updatedEventEndDate","add","minutes","format","escapeHTML","str","replace","match","createButton","startDateField","bulkCreateConfirmDialogDescription","finalStartDateFormatted","count","startDateStr","startDate","bulkInsertEndDate","setFullYear","getFullYear","calculateStartDate","setDate","getDate","finalStartDate","calculateFinalStartDateAndCount","innerHTML","toString","nameInput","nameValidationMessage","amountInput","amountValidationMessage","HTMLDivElement","currentTarget","validateBillName","validateBillAmount","validateOptionalBillAmount","titleInput","titleValidationMessage","bodyTextArea","bodyValidationMessage","sharedWithClassroom","addresseeSelect","addresseeValidationMessage","HTMLTextAreaElement","validateAnnouncementTitle","validateAnnouncementBody","validateAnnouncementAddressee","innerText","draftButton","HTMLButtonElement","titleValidationResultMessage","stopImmediatePropagation","bodyValidationResultMessage","validateBeforeDraftSubmit","multiFileAttachment","Rails","start","ActiveStorage","dsn","environment","integrations","Integrations","BrowserTracing","tracesSampleRate","componentRequireContext","useContext","filePreview","pdfPreview","openClose","newPaymentButton","getElementsByClassName","disabled","closest","submit","radioButtons","button","dialog","visibleSelector","selectedRole","from","radio","classList","setAttribute","remove","enrollLink","HTMLAnchorElement","optionalBills","optionalBillId","optionalBill","href","selectAllBoxes","targetBoxes","changeState","state","enrollments","map","element","setState","enrollment","i","every","selectAllBox","printCheckedCount","header","filter","toggle","targetBox","dialogToggleSwitches","this","targetDialog","contains","openSwitches","closeSwitches","openOnceDialogs","localStorage","setItem","dialogKey","getItem","submitButtons","targetForm","setDisabled","issueButtons","draftButtons","setDraftAndSubmit","isDraft","hiddenField","targetHiddenField","switches","links","documentElement","dropdownSwitches","closeDropdownMenu","dropdownSwitch","getAttribute","dropdownList","isExpanded","ariaExpanded","active","openDropdownMenu","target","HTMLElement","deleteOptionElement","onlyPath","afterPath","allPath","div","bulkEventsEditButton","afterStartsAtRadioButton","afterStartsAtRadioButtonLabel","cancelButton","HTMLLabelElement","deadlineForReplyDate","deadlineForReplyTime","updateAfterStartsAtRadioButtonState","editOptionElement","onlyEventRadioButton","bulkCreateButton","bulkCancelButton","bulkCreateMessage","deadlineDateField","deadlineTimeField","notifyCheckbox","notifyLabel","submitButton","dialogToggleButton","originalAction","bulkAction","csrfToken","display","csrfInput","createElement","type","appendChild","removeAttribute","removeChild","file","files","data","toBase64","selector","previewTarget","targetElements","HTMLImageElement","src","isIntegralValue","test","amount","Number","parseInt","transparentHeader","activeClassName","self","fn","interval","lastTime","now","throttle","scrollY","scrollTop","historyBackButtons","history","back","inviteUrl","inviteQRCode","QRCode","_err","svg","ClipboardJS","clearSelection","createPreviewElement","previewFile","liElem","className","outerDivElem","wrapperDivElem","innerDivElem","imageElem","Image","content","createImagePreviewElement","innerDivFileElem","divBody","prepend","createPdfPreviewElement","clearFileAttachments","multiple","validateNumberOfFiles","size","mbSize","validateSizeOfFiles","targetElement","validFiles","previewElements","Promise","all","multiFilePreview","openBy","key","closeBy","eventTarget","toggleBy","keyCode","openTarget","closeTarget","toggleTarget","parent","toggleParent","parentElement","expanded","pdfElements","filenameElement","objectUrl","URL","createObjectURL","link","revokeObjectURL","once","signInForm","setTimeout","bankCodeTargets","branchCodeInput","bankAccountNumberInput","bankAccountNameInput","bankAccountTypeInputs","branchCodeElement","bankAccountNumberElement","bankAccountNameElement","bankAccountTypeElement","bankInitialKanaNavs","selectBankLabels","refreshForm","selectedBank","t","requiredBranchCode","requiredAccountNumber","requiredAccountName","requiredAccountType","bankLabel","label","globalThis","kanaNav","bankGroup","initialKanaId","scrollIntoView","behavior","textFields","textField","inputElement","inputNumber","s","String","fromCharCode","charCodeAt"],"sourceRoot":""}