@feelflow/ffid-sdk 2.7.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -619,7 +619,7 @@ function createMembersMethods(deps) {
619
619
  }
620
620
 
621
621
  // src/client/version-check.ts
622
- var SDK_VERSION = "2.7.0";
622
+ var SDK_VERSION = "2.9.0";
623
623
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
624
624
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
625
625
  function sdkHeaders() {
@@ -1675,6 +1675,56 @@ function createNewsletterMethods(deps) {
1675
1675
  return { subscribe, confirm, unsubscribe };
1676
1676
  }
1677
1677
 
1678
+ // src/inquiry/ffid-inquiry-client.ts
1679
+ var EXT_INQUIRY_ENDPOINT = "/api/v1/ext/inquiry";
1680
+ function trimOrEmpty2(s) {
1681
+ return typeof s === "string" ? s.trim() : "";
1682
+ }
1683
+ function createInquiryMethods(deps) {
1684
+ const { fetchWithAuth, createError } = deps;
1685
+ async function create(params) {
1686
+ const email = trimOrEmpty2(params.email);
1687
+ const name = trimOrEmpty2(params.name);
1688
+ const message = trimOrEmpty2(params.message);
1689
+ const termsVersion = trimOrEmpty2(params.termsVersion);
1690
+ const privacyVersion = trimOrEmpty2(params.privacyVersion);
1691
+ if (!email) return { error: createError("VALIDATION_ERROR", "email \u306F\u5FC5\u9808\u3067\u3059") };
1692
+ if (!name) return { error: createError("VALIDATION_ERROR", "name \u306F\u5FC5\u9808\u3067\u3059") };
1693
+ if (!message) return { error: createError("VALIDATION_ERROR", "message \u306F\u5FC5\u9808\u3067\u3059") };
1694
+ if (!termsVersion) {
1695
+ return { error: createError("VALIDATION_ERROR", "termsVersion \u306F\u5FC5\u9808\u3067\u3059") };
1696
+ }
1697
+ if (!privacyVersion) {
1698
+ return { error: createError("VALIDATION_ERROR", "privacyVersion \u306F\u5FC5\u9808\u3067\u3059") };
1699
+ }
1700
+ const inquiryFollowupOptIn = params.inquiryFollowupOptIn === true;
1701
+ const generalNewsletterOptIn = params.generalNewsletterOptIn === true;
1702
+ return fetchWithAuth(EXT_INQUIRY_ENDPOINT, {
1703
+ method: "POST",
1704
+ body: JSON.stringify({
1705
+ email,
1706
+ name,
1707
+ message,
1708
+ category: params.category,
1709
+ company: params.company,
1710
+ phone: params.phone,
1711
+ locale: params.locale,
1712
+ termsVersion,
1713
+ privacyVersion,
1714
+ // The ext endpoint still accepts the legacy single-flag field, but
1715
+ // the SDK always submits the 2-layer model. `newsletterOptIn` is
1716
+ // passed as the union of the two new flags only to satisfy the
1717
+ // current schema's required bool — the server preferentially
1718
+ // reads `inquiryFollowupOptIn` / `generalNewsletterOptIn`.
1719
+ newsletterOptIn: inquiryFollowupOptIn || generalNewsletterOptIn,
1720
+ inquiryFollowupOptIn,
1721
+ generalNewsletterOptIn
1722
+ })
1723
+ });
1724
+ }
1725
+ return { create };
1726
+ }
1727
+
1678
1728
  // src/client/ffid-client.ts
1679
1729
  var UNAUTHORIZED_STATUS2 = 401;
1680
1730
  var SDK_LOG_PREFIX = "[FFID SDK]";
@@ -1955,6 +2005,10 @@ function createFFIDClient(config) {
1955
2005
  baseUrl,
1956
2006
  createError
1957
2007
  });
2008
+ const inquiry = createInquiryMethods({
2009
+ fetchWithAuth,
2010
+ createError
2011
+ });
1958
2012
  const verifyAccessToken = createVerifyAccessToken({
1959
2013
  authMode,
1960
2014
  baseUrl,
@@ -2011,6 +2065,8 @@ function createFFIDClient(config) {
2011
2065
  verifyOtp,
2012
2066
  /** Newsletter methods (subscribe / confirm / unsubscribe) */
2013
2067
  newsletter,
2068
+ /** Inquiry methods (create) */
2069
+ inquiry,
2014
2070
  /** Token store (token mode only) */
2015
2071
  tokenStore,
2016
2072
  /** Resolved auth mode */
@@ -3355,4 +3411,517 @@ function FFIDAnnouncementList({
3355
3411
  );
3356
3412
  }
3357
3413
 
3358
- export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, withSubscription };
3414
+ // src/inquiry/types.ts
3415
+ var FFID_INQUIRY_CATEGORIES = [
3416
+ "general",
3417
+ "sales",
3418
+ "support",
3419
+ "partnership",
3420
+ "press",
3421
+ "other"
3422
+ ];
3423
+ var DEFAULT_CATEGORY_LABELS_JA = {
3424
+ general: "\u4E00\u822C\u7684\u306A\u304A\u554F\u3044\u5408\u308F\u305B",
3425
+ sales: "\u3054\u5C0E\u5165\u30FB\u304A\u898B\u7A4D\u3082\u308A",
3426
+ support: "\u30B5\u30DD\u30FC\u30C8",
3427
+ partnership: "\u30D1\u30FC\u30C8\u30CA\u30FC\u30B7\u30C3\u30D7",
3428
+ press: "\u53D6\u6750\u30FB\u30D7\u30EC\u30B9",
3429
+ other: "\u305D\u306E\u4ED6"
3430
+ };
3431
+ function defaultCategories() {
3432
+ return FFID_INQUIRY_CATEGORIES.map((value) => ({
3433
+ value,
3434
+ label: DEFAULT_CATEGORY_LABELS_JA[value]
3435
+ }));
3436
+ }
3437
+ function renderCategoryOptions(options) {
3438
+ const hasAnyGroup = options.some((o) => !!o.group);
3439
+ if (!hasAnyGroup) {
3440
+ return options.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value));
3441
+ }
3442
+ const ungrouped = options.filter((o) => !o.group);
3443
+ const groupKeys = [];
3444
+ const groupLabelByKey = /* @__PURE__ */ new Map();
3445
+ const itemsByKey = /* @__PURE__ */ new Map();
3446
+ for (const opt of options) {
3447
+ if (!opt.group) continue;
3448
+ if (!itemsByKey.has(opt.group)) {
3449
+ groupKeys.push(opt.group);
3450
+ itemsByKey.set(opt.group, []);
3451
+ groupLabelByKey.set(opt.group, opt.groupLabel ?? opt.group);
3452
+ }
3453
+ itemsByKey.get(opt.group).push(opt);
3454
+ }
3455
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
3456
+ ungrouped.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value)),
3457
+ groupKeys.map((key) => /* @__PURE__ */ jsx("optgroup", { label: groupLabelByKey.get(key) ?? key, children: itemsByKey.get(key).map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value)) }, key))
3458
+ ] });
3459
+ }
3460
+ var labelStyle = {
3461
+ display: "block",
3462
+ fontSize: FONT_SIZE_SM,
3463
+ fontWeight: 500,
3464
+ marginBottom: SPACING_SM
3465
+ };
3466
+ var inputStyle = {
3467
+ width: "100%",
3468
+ padding: `${SPACING_SM}px ${SPACING_MD}px`,
3469
+ fontSize: FONT_SIZE_SM,
3470
+ border: BORDER_DEFAULT,
3471
+ borderRadius: BORDER_RADIUS_SM,
3472
+ background: COLOR_BG_WHITE,
3473
+ boxSizing: "border-box"
3474
+ };
3475
+ var readOnlyStyle = {
3476
+ ...inputStyle,
3477
+ background: "#f9fafb",
3478
+ color: COLOR_TEXT_MUTED,
3479
+ cursor: "not-allowed"
3480
+ };
3481
+ var fieldsetStyle = {
3482
+ marginBottom: SPACING_LG
3483
+ };
3484
+ var errorTextStyle = {
3485
+ fontSize: FONT_SIZE_XS,
3486
+ color: COLOR_DANGER,
3487
+ marginTop: SPACING_XS
3488
+ };
3489
+ var submitButtonStyle = {
3490
+ padding: `${SPACING_MD}px ${SPACING_LG}px`,
3491
+ fontSize: FONT_SIZE_SM,
3492
+ fontWeight: 600,
3493
+ color: COLOR_BG_WHITE,
3494
+ background: COLOR_PRIMARY,
3495
+ border: "none",
3496
+ borderRadius: BORDER_RADIUS_MD,
3497
+ cursor: "pointer"
3498
+ };
3499
+ var SUBMIT_BUTTON_OPACITY_PENDING = 0.6;
3500
+ function FFIDInquiryForm({
3501
+ mode,
3502
+ prefill,
3503
+ organizations = [],
3504
+ preselectedOrganizationId,
3505
+ categories,
3506
+ termsVersion,
3507
+ privacyVersion,
3508
+ termsHref,
3509
+ privacyHref,
3510
+ turnstileToken = null,
3511
+ turnstileSlot,
3512
+ onSubmit,
3513
+ onChange,
3514
+ separateLegalCheckboxes = false,
3515
+ locale = "ja",
3516
+ className
3517
+ }) {
3518
+ const isAuth = mode === "authenticated";
3519
+ const isNameReadOnly = isAuth && !!prefill?.name;
3520
+ const isEmailReadOnly = isAuth;
3521
+ const categoryOptions = useMemo(
3522
+ () => categories && categories.length > 0 ? categories : defaultCategories(),
3523
+ [categories]
3524
+ );
3525
+ const initialOrgId = useMemo(() => {
3526
+ if (!isAuth) return null;
3527
+ if (preselectedOrganizationId !== void 0) return preselectedOrganizationId;
3528
+ if (organizations.length === 1) return organizations[0].id;
3529
+ return null;
3530
+ }, [isAuth, organizations, preselectedOrganizationId]);
3531
+ const initialCategory = useMemo(() => {
3532
+ const fallback = categoryOptions[0]?.value ?? "general";
3533
+ const requested = prefill?.category;
3534
+ if (!requested) return fallback;
3535
+ return categoryOptions.some((opt) => opt.value === requested) ? requested : fallback;
3536
+ }, [categoryOptions, prefill?.category]);
3537
+ const [name, setName] = useState(prefill?.name ?? "");
3538
+ const [email, setEmail] = useState(prefill?.email ?? "");
3539
+ const [company, setCompany] = useState(isAuth ? "" : prefill?.company ?? "");
3540
+ const [phone, setPhone] = useState(isAuth ? "" : prefill?.phone ?? "");
3541
+ const [category, setCategory] = useState(initialCategory);
3542
+ const [message, setMessage] = useState(prefill?.message ?? "");
3543
+ const [organizationId, setOrganizationId] = useState(initialOrgId);
3544
+ const [inquiryFollowup, setInquiryFollowup] = useState(false);
3545
+ const [general, setGeneral] = useState(false);
3546
+ const [agreedLegal, setAgreedLegal] = useState(false);
3547
+ const [agreedTerms, setAgreedTerms] = useState(false);
3548
+ const [agreedPrivacy, setAgreedPrivacy] = useState(false);
3549
+ const [submitting, setSubmitting] = useState(false);
3550
+ const [formError, setFormError] = useState(null);
3551
+ const [successMessage, setSuccessMessage] = useState(null);
3552
+ const [hydrated, setHydrated] = useState(false);
3553
+ useEffect(() => {
3554
+ setHydrated(true);
3555
+ }, []);
3556
+ const onChangeRef = useRef(onChange);
3557
+ useEffect(() => {
3558
+ onChangeRef.current = onChange;
3559
+ }, [onChange]);
3560
+ useEffect(() => {
3561
+ onChangeRef.current?.({
3562
+ name: name.trim(),
3563
+ email: email.trim(),
3564
+ company: company.trim() || null,
3565
+ phone: phone.trim() || null,
3566
+ category,
3567
+ message: message.trim(),
3568
+ organizationId,
3569
+ inquiryFollowupOptIn: inquiryFollowup,
3570
+ generalNewsletterOptIn: general,
3571
+ termsVersion,
3572
+ privacyVersion,
3573
+ turnstileToken: turnstileToken ?? null,
3574
+ locale
3575
+ });
3576
+ }, [
3577
+ name,
3578
+ email,
3579
+ company,
3580
+ phone,
3581
+ category,
3582
+ message,
3583
+ organizationId,
3584
+ inquiryFollowup,
3585
+ general,
3586
+ termsVersion,
3587
+ privacyVersion,
3588
+ turnstileToken,
3589
+ locale
3590
+ ]);
3591
+ async function handleSubmit(e) {
3592
+ e.preventDefault();
3593
+ setFormError(null);
3594
+ if (separateLegalCheckboxes) {
3595
+ if (!agreedTerms && !agreedPrivacy) {
3596
+ setFormError("\u5229\u7528\u898F\u7D04\u3068\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3597
+ return;
3598
+ }
3599
+ if (!agreedTerms) {
3600
+ setFormError("\u5229\u7528\u898F\u7D04\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3601
+ return;
3602
+ }
3603
+ if (!agreedPrivacy) {
3604
+ setFormError("\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3605
+ return;
3606
+ }
3607
+ } else if (!agreedLegal) {
3608
+ setFormError("\u5229\u7528\u898F\u7D04\u3068\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3609
+ return;
3610
+ }
3611
+ if (!message.trim()) {
3612
+ setFormError("\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002");
3613
+ return;
3614
+ }
3615
+ if (!isAuth) {
3616
+ if (!name.trim() || !email.trim()) {
3617
+ setFormError("\u304A\u540D\u524D\u3068\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002");
3618
+ return;
3619
+ }
3620
+ }
3621
+ setSubmitting(true);
3622
+ try {
3623
+ const result = await onSubmit({
3624
+ name: name.trim(),
3625
+ email: email.trim(),
3626
+ company: company.trim() || null,
3627
+ phone: phone.trim() || null,
3628
+ category,
3629
+ message: message.trim(),
3630
+ organizationId,
3631
+ inquiryFollowupOptIn: inquiryFollowup,
3632
+ generalNewsletterOptIn: general,
3633
+ termsVersion,
3634
+ privacyVersion,
3635
+ turnstileToken: turnstileToken ?? null,
3636
+ locale
3637
+ });
3638
+ if (result.ok) {
3639
+ setSuccessMessage(
3640
+ result.message ?? (result.requiresDoubleOptIn ? "\u304A\u554F\u3044\u5408\u308F\u305B\u3092\u53D7\u3051\u4ED8\u3051\u307E\u3057\u305F\u3002\u30E1\u30EB\u30DE\u30AC\u306E\u8CFC\u8AAD\u78BA\u8A8D\u30E1\u30FC\u30EB\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F\u306E\u3067\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\u3002" : "\u304A\u554F\u3044\u5408\u308F\u305B\u3092\u53D7\u3051\u4ED8\u3051\u307E\u3057\u305F\u3002\u62C5\u5F53\u8005\u3088\u308A\u3054\u9023\u7D61\u3044\u305F\u3057\u307E\u3059\u3002")
3641
+ );
3642
+ setMessage("");
3643
+ } else {
3644
+ setFormError(
3645
+ result.message ?? "\u9001\u4FE1\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u6642\u9593\u3092\u304A\u3044\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"
3646
+ );
3647
+ }
3648
+ } catch (err) {
3649
+ console.error("[FFIDInquiryForm] onSubmit threw", err);
3650
+ setFormError("\u9001\u4FE1\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6642\u9593\u3092\u304A\u3044\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002");
3651
+ } finally {
3652
+ setSubmitting(false);
3653
+ }
3654
+ }
3655
+ if (successMessage) {
3656
+ return /* @__PURE__ */ jsx(
3657
+ "div",
3658
+ {
3659
+ role: "status",
3660
+ className,
3661
+ style: {
3662
+ padding: SPACING_LG,
3663
+ border: BORDER_DEFAULT,
3664
+ borderRadius: BORDER_RADIUS_MD,
3665
+ background: "#f0fdf4",
3666
+ color: "#166534",
3667
+ fontSize: FONT_SIZE_SM
3668
+ },
3669
+ children: successMessage
3670
+ }
3671
+ );
3672
+ }
3673
+ const showOrgBlock = isAuth && organizations.length >= 1;
3674
+ return /* @__PURE__ */ jsxs(
3675
+ "form",
3676
+ {
3677
+ onSubmit: handleSubmit,
3678
+ className,
3679
+ noValidate: true,
3680
+ "data-hydrated": hydrated ? "true" : void 0,
3681
+ children: [
3682
+ showOrgBlock && /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3683
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-org", children: "\u554F\u3044\u5408\u308F\u305B\u308B\u7ACB\u5834" }),
3684
+ /* @__PURE__ */ jsxs(
3685
+ "select",
3686
+ {
3687
+ id: "ffid-inquiry-org",
3688
+ style: inputStyle,
3689
+ value: organizationId ?? "",
3690
+ onChange: (e) => setOrganizationId(e.target.value || null),
3691
+ children: [
3692
+ /* @__PURE__ */ jsx("option", { value: "", children: "\u500B\u4EBA\u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B" }),
3693
+ organizations.map((org) => /* @__PURE__ */ jsxs("option", { value: org.id, children: [
3694
+ org.name,
3695
+ " \u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B"
3696
+ ] }, org.id))
3697
+ ]
3698
+ }
3699
+ )
3700
+ ] }),
3701
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3702
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-name", children: "\u304A\u540D\u524D" }),
3703
+ /* @__PURE__ */ jsx(
3704
+ "input",
3705
+ {
3706
+ id: "ffid-inquiry-name",
3707
+ style: isNameReadOnly ? readOnlyStyle : inputStyle,
3708
+ type: "text",
3709
+ value: name,
3710
+ onChange: (e) => setName(e.target.value),
3711
+ readOnly: isNameReadOnly,
3712
+ required: true
3713
+ }
3714
+ )
3715
+ ] }),
3716
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3717
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-email", children: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9" }),
3718
+ /* @__PURE__ */ jsx(
3719
+ "input",
3720
+ {
3721
+ id: "ffid-inquiry-email",
3722
+ style: isEmailReadOnly ? readOnlyStyle : inputStyle,
3723
+ type: "email",
3724
+ value: email,
3725
+ onChange: (e) => setEmail(e.target.value),
3726
+ readOnly: isEmailReadOnly,
3727
+ required: true
3728
+ }
3729
+ )
3730
+ ] }),
3731
+ !isAuth && /* @__PURE__ */ jsxs(Fragment, { children: [
3732
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3733
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-company", children: "\u4F1A\u793E\u540D (\u4EFB\u610F)" }),
3734
+ /* @__PURE__ */ jsx(
3735
+ "input",
3736
+ {
3737
+ id: "ffid-inquiry-company",
3738
+ style: inputStyle,
3739
+ type: "text",
3740
+ value: company,
3741
+ onChange: (e) => setCompany(e.target.value)
3742
+ }
3743
+ )
3744
+ ] }),
3745
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3746
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-phone", children: "\u96FB\u8A71\u756A\u53F7 (\u4EFB\u610F)" }),
3747
+ /* @__PURE__ */ jsx(
3748
+ "input",
3749
+ {
3750
+ id: "ffid-inquiry-phone",
3751
+ style: inputStyle,
3752
+ type: "tel",
3753
+ value: phone,
3754
+ onChange: (e) => setPhone(e.target.value)
3755
+ }
3756
+ )
3757
+ ] })
3758
+ ] }),
3759
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3760
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-category", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u7A2E\u5225" }),
3761
+ /* @__PURE__ */ jsx(
3762
+ "select",
3763
+ {
3764
+ id: "ffid-inquiry-category",
3765
+ style: inputStyle,
3766
+ value: category,
3767
+ onChange: (e) => setCategory(e.target.value),
3768
+ children: renderCategoryOptions(categoryOptions)
3769
+ }
3770
+ )
3771
+ ] }),
3772
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3773
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-message", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9" }),
3774
+ /* @__PURE__ */ jsx(
3775
+ "textarea",
3776
+ {
3777
+ id: "ffid-inquiry-message",
3778
+ style: { ...inputStyle, minHeight: 180, resize: "vertical" },
3779
+ value: message,
3780
+ onChange: (e) => setMessage(e.target.value),
3781
+ required: true,
3782
+ maxLength: 1e4
3783
+ }
3784
+ )
3785
+ ] }),
3786
+ /* @__PURE__ */ jsxs("fieldset", { style: { ...fieldsetStyle, border: "none", padding: 0 }, children: [
3787
+ /* @__PURE__ */ jsx("legend", { style: { ...labelStyle, marginBottom: SPACING_SM }, children: "\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u8CFC\u8AAD (\u4EFB\u610F)" }),
3788
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM, marginBottom: SPACING_SM }, children: [
3789
+ /* @__PURE__ */ jsx(
3790
+ "input",
3791
+ {
3792
+ type: "checkbox",
3793
+ checked: inquiryFollowup,
3794
+ onChange: (e) => setInquiryFollowup(e.target.checked)
3795
+ }
3796
+ ),
3797
+ /* @__PURE__ */ jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u304A\u554F\u3044\u5408\u308F\u305B\u306B\u95A2\u9023\u3059\u308B\u6848\u5185\u3092\u53D7\u3051\u53D6\u308B" })
3798
+ ] }),
3799
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM }, children: [
3800
+ /* @__PURE__ */ jsx(
3801
+ "input",
3802
+ {
3803
+ type: "checkbox",
3804
+ checked: general,
3805
+ onChange: (e) => setGeneral(e.target.checked)
3806
+ }
3807
+ ),
3808
+ /* @__PURE__ */ jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u5B9A\u671F\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u3092\u53D7\u3051\u53D6\u308B" })
3809
+ ] })
3810
+ ] }),
3811
+ separateLegalCheckboxes ? /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3812
+ /* @__PURE__ */ jsxs(
3813
+ "label",
3814
+ {
3815
+ style: {
3816
+ display: "flex",
3817
+ alignItems: "flex-start",
3818
+ gap: SPACING_SM,
3819
+ marginBottom: SPACING_SM
3820
+ },
3821
+ children: [
3822
+ /* @__PURE__ */ jsx(
3823
+ "input",
3824
+ {
3825
+ type: "checkbox",
3826
+ checked: agreedTerms,
3827
+ onChange: (e) => setAgreedTerms(e.target.checked),
3828
+ required: true
3829
+ }
3830
+ ),
3831
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3832
+ termsHref ? /* @__PURE__ */ jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3833
+ "\u5229\u7528\u898F\u7D04 (v",
3834
+ termsVersion,
3835
+ ")"
3836
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3837
+ "\u5229\u7528\u898F\u7D04 (v",
3838
+ termsVersion,
3839
+ ")"
3840
+ ] }),
3841
+ " ",
3842
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3843
+ ] })
3844
+ ]
3845
+ }
3846
+ ),
3847
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3848
+ /* @__PURE__ */ jsx(
3849
+ "input",
3850
+ {
3851
+ type: "checkbox",
3852
+ checked: agreedPrivacy,
3853
+ onChange: (e) => setAgreedPrivacy(e.target.checked),
3854
+ required: true
3855
+ }
3856
+ ),
3857
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3858
+ privacyHref ? /* @__PURE__ */ jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3859
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3860
+ privacyVersion,
3861
+ ")"
3862
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3863
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3864
+ privacyVersion,
3865
+ ")"
3866
+ ] }),
3867
+ " ",
3868
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3869
+ ] })
3870
+ ] })
3871
+ ] }) : /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3872
+ /* @__PURE__ */ jsx(
3873
+ "input",
3874
+ {
3875
+ type: "checkbox",
3876
+ checked: agreedLegal,
3877
+ onChange: (e) => setAgreedLegal(e.target.checked),
3878
+ required: true
3879
+ }
3880
+ ),
3881
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3882
+ termsHref ? /* @__PURE__ */ jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3883
+ "\u5229\u7528\u898F\u7D04 (v",
3884
+ termsVersion,
3885
+ ")"
3886
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3887
+ "\u5229\u7528\u898F\u7D04 (v",
3888
+ termsVersion,
3889
+ ")"
3890
+ ] }),
3891
+ " ",
3892
+ "\u3068",
3893
+ " ",
3894
+ privacyHref ? /* @__PURE__ */ jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3895
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3896
+ privacyVersion,
3897
+ ")"
3898
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3899
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3900
+ privacyVersion,
3901
+ ")"
3902
+ ] }),
3903
+ " ",
3904
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3905
+ ] })
3906
+ ] }) }),
3907
+ !isAuth && turnstileSlot && /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: turnstileSlot }),
3908
+ formError && /* @__PURE__ */ jsx("p", { role: "alert", style: { ...errorTextStyle, marginBottom: SPACING_MD }, children: formError }),
3909
+ /* @__PURE__ */ jsx(
3910
+ "button",
3911
+ {
3912
+ type: "submit",
3913
+ style: {
3914
+ ...submitButtonStyle,
3915
+ opacity: submitting ? SUBMIT_BUTTON_OPACITY_PENDING : 1,
3916
+ cursor: submitting ? "not-allowed" : "pointer"
3917
+ },
3918
+ disabled: submitting,
3919
+ children: submitting ? "\u9001\u4FE1\u4E2D..." : "\u9001\u4FE1\u3059\u308B"
3920
+ }
3921
+ )
3922
+ ]
3923
+ }
3924
+ );
3925
+ }
3926
+
3927
+ export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, withSubscription };
@@ -1,30 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkI6MKRVUB_cjs = require('../chunk-I6MKRVUB.cjs');
3
+ var chunk2LD6Y65W_cjs = require('../chunk-2LD6Y65W.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunkI6MKRVUB_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunk2LD6Y65W_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunkI6MKRVUB_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunk2LD6Y65W_cjs.FFIDAnnouncementList; }
14
+ });
15
+ Object.defineProperty(exports, "FFIDInquiryForm", {
16
+ enumerable: true,
17
+ get: function () { return chunk2LD6Y65W_cjs.FFIDInquiryForm; }
14
18
  });
15
19
  Object.defineProperty(exports, "FFIDLoginButton", {
16
20
  enumerable: true,
17
- get: function () { return chunkI6MKRVUB_cjs.FFIDLoginButton; }
21
+ get: function () { return chunk2LD6Y65W_cjs.FFIDLoginButton; }
18
22
  });
19
23
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
20
24
  enumerable: true,
21
- get: function () { return chunkI6MKRVUB_cjs.FFIDOrganizationSwitcher; }
25
+ get: function () { return chunk2LD6Y65W_cjs.FFIDOrganizationSwitcher; }
22
26
  });
23
27
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
24
28
  enumerable: true,
25
- get: function () { return chunkI6MKRVUB_cjs.FFIDSubscriptionBadge; }
29
+ get: function () { return chunk2LD6Y65W_cjs.FFIDSubscriptionBadge; }
26
30
  });
27
31
  Object.defineProperty(exports, "FFIDUserMenu", {
28
32
  enumerable: true,
29
- get: function () { return chunkI6MKRVUB_cjs.FFIDUserMenu; }
33
+ get: function () { return chunk2LD6Y65W_cjs.FFIDUserMenu; }
30
34
  });
@@ -1,3 +1,3 @@
1
- export { E as FFIDAnnouncementBadge, a0 as FFIDAnnouncementBadgeClassNames, a1 as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, a2 as FFIDAnnouncementListClassNames, a3 as FFIDAnnouncementListProps, O as FFIDLoginButton, a4 as FFIDLoginButtonProps, U as FFIDOrganizationSwitcher, a5 as FFIDOrganizationSwitcherClassNames, a6 as FFIDOrganizationSwitcherProps, W as FFIDSubscriptionBadge, a7 as FFIDSubscriptionBadgeClassNames, a8 as FFIDSubscriptionBadgeProps, Y as FFIDUserMenu, a9 as FFIDUserMenuClassNames, aa as FFIDUserMenuProps } from '../index-p4dJw3qR.cjs';
1
+ export { H as FFIDAnnouncementBadge, ab as FFIDAnnouncementBadgeClassNames, ac as FFIDAnnouncementBadgeProps, I as FFIDAnnouncementList, ad as FFIDAnnouncementListClassNames, ae as FFIDAnnouncementListProps, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormOrganization, T as FFIDInquiryFormPrefill, U as FFIDInquiryFormProps, V as FFIDInquiryFormSubmitData, W as FFIDInquiryFormSubmitResult, Y as FFIDLoginButton, af as FFIDLoginButtonProps, a2 as FFIDOrganizationSwitcher, ag as FFIDOrganizationSwitcherClassNames, ah as FFIDOrganizationSwitcherProps, a4 as FFIDSubscriptionBadge, ai as FFIDSubscriptionBadgeClassNames, aj as FFIDSubscriptionBadgeProps, a6 as FFIDUserMenu, ak as FFIDUserMenuClassNames, al as FFIDUserMenuProps } from '../index-R2ALICqm.cjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1,3 +1,3 @@
1
- export { E as FFIDAnnouncementBadge, a0 as FFIDAnnouncementBadgeClassNames, a1 as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, a2 as FFIDAnnouncementListClassNames, a3 as FFIDAnnouncementListProps, O as FFIDLoginButton, a4 as FFIDLoginButtonProps, U as FFIDOrganizationSwitcher, a5 as FFIDOrganizationSwitcherClassNames, a6 as FFIDOrganizationSwitcherProps, W as FFIDSubscriptionBadge, a7 as FFIDSubscriptionBadgeClassNames, a8 as FFIDSubscriptionBadgeProps, Y as FFIDUserMenu, a9 as FFIDUserMenuClassNames, aa as FFIDUserMenuProps } from '../index-p4dJw3qR.js';
1
+ export { H as FFIDAnnouncementBadge, ab as FFIDAnnouncementBadgeClassNames, ac as FFIDAnnouncementBadgeProps, I as FFIDAnnouncementList, ad as FFIDAnnouncementListClassNames, ae as FFIDAnnouncementListProps, Q as FFIDInquiryForm, R as FFIDInquiryFormCategoryItem, S as FFIDInquiryFormOrganization, T as FFIDInquiryFormPrefill, U as FFIDInquiryFormProps, V as FFIDInquiryFormSubmitData, W as FFIDInquiryFormSubmitResult, Y as FFIDLoginButton, af as FFIDLoginButtonProps, a2 as FFIDOrganizationSwitcher, ag as FFIDOrganizationSwitcherClassNames, ah as FFIDOrganizationSwitcherProps, a4 as FFIDSubscriptionBadge, ai as FFIDSubscriptionBadgeClassNames, aj as FFIDSubscriptionBadgeProps, a6 as FFIDUserMenu, ak as FFIDUserMenuClassNames, al as FFIDUserMenuProps } from '../index-R2ALICqm.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1 +1 @@
1
- export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-YQPG6Z7W.js';
1
+ export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-5SD6KOYJ.js';