/*! * JavaScript Cookie v2.2.0 * https://github.com/js-cookie/js-cookie * * Copyright 2006, 2015 Klaus Hartl & Fagner Brack * Released under the MIT license */ !function(e){var r;if("function"==typeof define&&define.amd&&(define(e),r=!0),"object"==typeof exports&&(module.exports=e(),r=!0),!r){var t=window.Cookies,n=window.Cookies=e();n.noConflict=function(){return window.Cookies=t,n}}}(function(){function e(){for(var e=0,r={};e {if(document.getElementById("sv-ai-choice-20261030"))return;const s=document.createElement("style");s.id="sv-ai-choice-20261030";s.textContent="[data-ai-choice] .p-subsidy-ai__panel{left:auto!important;right:16px!important;bottom:var(--ai-choice-bottom,max(16px,env(safe-area-inset-bottom)))!important;width:min(480px,calc(100vw - 32px))!important;max-height:var(--ai-choice-height,calc(100dvh - 130px))!important;display:flex;flex-direction:column;border:2px solid #07c6ed;border-radius:22px;background:#fff;box-shadow:0 0 0 2px #fff,0 0 16px #00cff080,0 8px 28px #00388733;overflow-y:auto}\n[data-ai-choice] .p-subsidy-ai__panel[hidden]{display:none!important}\n[data-ai-choice] .p-subsidy-ai__header{display:flex;flex:none;gap:12px;padding:10px 16px;background:linear-gradient(115deg,#003cb8,#0055ed);border-radius:18px 18px 0 0}\n[data-ai-choice] .p-subsidy-ai__mark,[data-ai-choice] .p-subsidy-ai__heading>p{display:none}\n[data-ai-choice] .p-subsidy-ai__heading{display:flex;align-items:center;gap:16px;flex:1}\n[data-ai-choice] .p-subsidy-ai__heading h2{font-size:21px;color:#fff}\n[data-ai-choice] .sv-ai-free{padding:0 15px;border-radius:30px;background:#ffdb00;color:#002e87;font-size:15px;font-weight:800}\n[data-ai-choice] .p-subsidy-ai__tools{gap:8px}\n[data-ai-choice] .p-subsidy-ai__tools button{width:36px;height:36px;border:0;background:transparent;border-radius:5px}\n[data-ai-choice] .p-subsidy-ai__tools svg{width:28px;height:28px}\n[data-ai-choice] .p-subsidy-ai__controls{display:flex;flex-direction:column;gap:10px;flex:none;padding:10px 14px 12px;border:0}\n[data-ai-choice] .sv-ai-intro h3{margin:0 0 2px;font-size:23px;line-height:1.3;color:#00194b;font-weight:800}\n[data-ai-choice] .sv-ai-intro p{margin:0;font-size:13px;line-height:1.5;color:#0051c9}\n[data-ai-choice] .p-subsidy-ai__form{gap:10px}\n[data-ai-choice] .p-subsidy-ai__subsidies legend{font-size:13px;margin-bottom:6px;color:#00194b}\n[data-ai-choice] .p-subsidy-ai__options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:0;overflow:visible}\n[data-ai-choice] .p-subsidy-ai__option{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:78px;padding:9px 5px;border:1.5px solid #0061ff;border-radius:8px;background:#fff6bc;color:#0046b6;font-size:15px;line-height:1.35;font-weight:800;white-space:normal;text-align:center}\n[data-ai-choice] .p-subsidy-ai__option:has(input:checked){background:#0051db;border-color:#0051db;color:#fff}\n[data-ai-choice] .p-subsidy-ai__option:has(input:checked) span::before{content:'\u2713';position:absolute;top:4px;right:6px;margin:0;display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#fff;color:#0051db;font-size:12px}\n[data-ai-choice] .sv-ai-option-icon{width:31px;height:35px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linejoin:round;stroke-linecap:round}\n[data-ai-choice] .p-subsidy-ai__composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}\n[data-ai-choice] .p-subsidy-ai__composer textarea{width:100%;min-width:0;min-height:46px;height:46px;padding:10px 12px;font-size:15px;line-height:24px;border-radius:14px;resize:vertical}\n[data-ai-choice] .p-subsidy-ai__composer button{min-width:70px;padding:8px 15px;border:0;border-radius:16px;background:#0051db;color:#fff;font-size:16px;font-weight:700}\n[data-ai-choice] .p-subsidy-ai__meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px;font-size:12px;color:#0051c9}\n[data-ai-choice] #subsidy-ai-question-help{display:none}\n[data-ai-choice] .p-subsidy-ai__meta strong{font-size:12px;font-weight:500;color:#0051c9}\n[data-ai-choice] a.sv-ai-contact{font-size:12px;color:#0051c9!important;text-decoration:underline}\n[data-ai-choice] .p-subsidy-ai__error[hidden]{display:none!important}\n[data-ai-choice]:not([data-ai-conversation]) .p-subsidy-ai__messages{display:none}\n[data-ai-choice] .p-subsidy-ai__messages{flex:1 1 auto;min-height:100px;max-height:35dvh;overflow:auto;padding:12px}\n[data-ai-choice] .p-subsidy-ai__messages>.p-subsidy-ai-message{display:none}\n[data-ai-choice] .p-subsidy-ai__panel.is-expanded{inset:var(--ai-choice-expanded-top,210px) 16px 16px!important;width:auto!important;max-height:none!important}\n[data-ai-choice] .p-subsidy-ai__panel.is-expanded .p-subsidy-ai__messages{max-height:none}\n/* Override the older body:has(.sv-video-float) launcher offset. */\nhtml body [data-ai-choice] .p-subsidy-ai__launcher{left:auto!important;right:16px!important;bottom:max(16px,env(safe-area-inset-bottom))!important}\n@media(max-width:767px){[data-ai-choice] .p-subsidy-ai__panel{right:10px!important;bottom:var(--ai-choice-bottom,max(10px,env(safe-area-inset-bottom)))!important;width:calc(100vw - 20px)!important;border-radius:18px;max-height:var(--ai-choice-height,calc(100dvh - 100px))!important}[data-ai-choice] .p-subsidy-ai__header{padding:8px 12px}[data-ai-choice] .p-subsidy-ai__heading h2{font-size:20px}[data-ai-choice] .p-subsidy-ai__controls{padding:10px 11px 12px}[data-ai-choice] .sv-ai-intro h3{font-size:23px}[data-ai-choice] .sv-ai-intro p{font-size:13px}[data-ai-choice] .p-subsidy-ai__option{flex-direction:column;gap:3px;min-height:81px;font-size:13px}[data-ai-choice] .p-subsidy-ai__meta{font-size:11px}[data-ai-choice] .p-subsidy-ai__meta strong,[data-ai-choice] a.sv-ai-contact{font-size:11px}[data-ai-choice] .p-subsidy-ai__panel.is-expanded{inset:var(--ai-choice-expanded-top,110px) 10px 10px!important;width:auto!important}}\n@media(max-height:600px){[data-ai-choice] .p-subsidy-ai__panel{max-height:calc(100dvh - 90px)!important}}\n";document.head.append(s);})(); /* Approved AI option 1 v2, Chatwork 2026-10-28. Existing handlers own API and usage. */ (() => { if (!/^(?:www\.)?svltd\.co\.jp$|^svltd2\.(?:cmssv|cmsrender)\.awsv\.jp$/.test(location.hostname)) return; const init = () => document.querySelectorAll('[data-subsidy-ai]').forEach(root => { if (root.hasAttribute('data-ai-choice')) return; const panel = root.querySelector('[data-subsidy-ai-panel]'); const launcher = root.querySelector('[data-subsidy-ai-open]'); const input = root.querySelector('[data-subsidy-ai-input]'); const options = Array.from(root.querySelectorAll('[data-subsidy-ai-option]')); if (!panel || !launcher || !input || options.length !== 3) return; root.querySelectorAll('[data-subsidy-ai-auth-toggle],[data-subsidy-ai-auth-form],[data-subsidy-ai-auth-success]').forEach(node => node.remove()); root.setAttribute('data-ai-choice', ''); root.querySelector('.p-subsidy-ai__heading h2').textContent = '補助金AI'; const badge = document.createElement('span'); badge.className = 'sv-ai-free'; badge.textContent = '無料'; root.querySelector('.p-subsidy-ai__heading').append(badge); launcher.querySelector('span').textContent = '補助金AIに質問する(無料)'; const intro = document.createElement('div'); intro.className = 'sv-ai-intro'; intro.innerHTML = '

どの補助金が使える?

聞きたい補助金を選んで、質問を入力してください。AIが回答します

'; root.querySelector('.p-subsidy-ai__controls').prepend(intro); root.querySelector('.p-subsidy-ai__subsidies legend').textContent = '聞きたい補助金を選択(複数選択可)'; const labels = ['新事業・
ものづくり', '省力化', '成長加速化']; const paths = ['M3 21V10l6 4V9l6 5V3h5v18H3Zm3-3h1m4 0h1m4 0h1', 'm14 2-9 12h6l-1 8 9-12h-6l1-8Z', 'M4 21V12h4v9m4 0V8h4v13m4 0V3M3 8l6-5 5 2 7-4']; options.forEach((option, i) => { const label = option.closest('label'); label.querySelector('span').innerHTML = labels[i]; label.insertAdjacentHTML('afterbegin', ''); }); input.rows = 1; const updatePlaceholder = () => { if (!input.disabled && input.placeholder !== '選んだ補助金について質問する') input.placeholder = '選んだ補助金について質問する'; }; new MutationObserver(updatePlaceholder).observe(input, {attributes: true, attributeFilter: ['placeholder', 'disabled']}); updatePlaceholder(); const meta = root.querySelector('.p-subsidy-ai__meta'); const contact = document.createElement('a'); contact.href = '/inquiry/'; contact.className = 'sv-ai-contact'; contact.textContent = '解決しないときはお問い合わせ'; meta.append(contact); const log = root.querySelector('[data-subsidy-ai-log]'); const updateConversation = () => root.toggleAttribute('data-ai-conversation', !!log.children.length); new MutationObserver(updateConversation).observe(log, {childList: true}); updateConversation(); // The card stays at the same bottom-right position on every page. // Expansion alone reserves the height of the fixed navigation. const positionExpanded = () => { const header = document.querySelector('.l-header'); const top = Math.max(90, header ? header.getBoundingClientRect().bottom + 12 : 110); panel.style.setProperty('--ai-choice-expanded-top', Math.min(top, innerHeight - 160) + 'px'); }; window.addEventListener('resize', positionExpanded); root.querySelector('[data-subsidy-ai-expand]').addEventListener('click', positionExpanded); positionExpanded(); // Open without focus so initial display does not move the page or open the mobile keyboard. panel.hidden = true; launcher.hidden = false; launcher.setAttribute('aria-expanded', 'false'); let interacted = false; launcher.addEventListener('click', () => { interacted = true; }); root.querySelector('[data-subsidy-ai-close]').addEventListener('click', () => { interacted = true; }); root.dispatchEvent(new CustomEvent('sv-ai-refresh-usage', {detail: () => { const footer = document.querySelector('#site-footer,footer.p-footer-b'); const bounds = footer?.getBoundingClientRect(); const footerVisible = bounds && bounds.top < innerHeight && bounds.bottom > 0; if (interacted || root.dataset.locked === 'true' || footerVisible) return; panel.hidden = false; launcher.hidden = true; launcher.setAttribute('aria-expanded', 'true'); }})); const video = document.querySelector('.sv-video-float'); if (video) { const stackVideo = () => { const expanded = !panel.hidden && panel.classList.contains('is-expanded'); video.style.visibility = expanded ? 'hidden' : ''; if (expanded) return; const anchor = panel.hidden ? launcher : panel; const bounds = anchor.getBoundingClientRect(); video.style.setProperty('bottom', (innerHeight - bounds.top + 12) + 'px', 'important'); }; const videoSize = new ResizeObserver(stackVideo); [panel, launcher, video].forEach(node => videoSize.observe(node)); new MutationObserver(stackVideo).observe(panel, {attributes: true, attributeFilter: ['hidden', 'class']}); window.addEventListener('resize', stackVideo); stackVideo(); } const footer = document.querySelector('#site-footer,footer.p-footer-b'); if (footer) new IntersectionObserver(entries => { if (entries.some(entry => entry.isIntersecting) && !panel.hidden) { root.querySelector('[data-subsidy-ai-close]').click(); } }, {threshold: 0}).observe(footer); }); if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init, {once: true}); else init(); })(); /* ShareVision AI launcher positioning; keep chat state and menu placement independent. */ (function () { if (window.__svAiLauncherPosition) return; window.__svAiLauncherPosition = true; var style = document.createElement('style'); style.id = 'sv-ai-launcher-position-20260918'; style.textContent = ` html body button.p-subsidy-ai__launcher { right: var(--sv-ai-right, 24px) !important; bottom: max(var(--sv-ai-bottom, 24px), env(safe-area-inset-bottom)) !important; } html body button.p-subsidy-ai__launcher.is-at-copyright { display: none !important; } @media (max-width: 767px) { html body button.p-subsidy-ai__launcher { box-sizing: border-box; width: 52px !important; height: 52px !important; min-width: 52px !important; min-height: 52px !important; padding: 0 !important; gap: 0 !important; border-radius: 50% !important; justify-content: center; align-items: center; } html body button.p-subsidy-ai__launcher > span { display: none !important; } html body button.p-subsidy-ai__launcher > svg { width: 24px; height: 24px; flex: 0 0 24px; } }`; document.head.appendChild(style); function setup() { var queued = false, video = null, copyrightVisibleInitially = null; var videoResize = new ResizeObserver(schedule); var videoState = new MutationObserver(schedule); function schedule() { if (queued) return; queued = true; requestAnimationFrame(update); } function update() { queued = false; var button = document.querySelector('.p-subsidy-ai__launcher'); if (!button) return; button.setAttribute('aria-label', '補助金AIに質問する'); var inMenu = !!button.closest('.sv-menu-panel__ai'); var copyright = document.querySelector('.p-footer-b__bottom > p'); var copyrightVisible = false; if (copyright) { var copyrightRect = copyright.getBoundingClientRect(); copyrightVisible = copyrightRect.height > 0 && copyrightRect.top < window.innerHeight && copyrightRect.bottom > 0; if (copyrightVisibleInitially === null && copyrightRect.height > 0) copyrightVisibleInitially = copyrightVisible; } button.classList.toggle('is-at-copyright', !inMenu && copyrightVisibleInitially === false && copyrightVisible); var nextVideo = document.querySelector('.sv-video-float'); if (nextVideo !== video) { videoResize.disconnect(); videoState.disconnect(); video = nextVideo; if (video) { videoResize.observe(video); videoState.observe(video, { attributes: true, attributeFilter: ['class', 'style', 'hidden'] }); } } var bottom = window.innerWidth <= 767 ? 16 : 24; var right = bottom; if (video && !inMenu) { var rect = video.getBoundingClientRect(), css = getComputedStyle(video); if (rect.height && rect.width && css.position === 'fixed' && css.display !== 'none' && css.visibility !== 'hidden' && Number(css.opacity) > 0 && rect.top < window.innerHeight && rect.bottom > 0) { bottom = Math.max(bottom, window.innerHeight - rect.top + 12); right = Math.max(right, window.innerWidth - rect.right); } } button.style.setProperty('--sv-ai-bottom', bottom + 'px'); button.style.setProperty('--sv-ai-right', right + 'px'); } window.addEventListener('scroll', schedule, { passive: true }); window.addEventListener('resize', schedule, { passive: true }); window.addEventListener('load', schedule, { once: true }); new MutationObserver(schedule).observe(document.body, { childList: true, subtree: true }); schedule(); } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', setup, { once: true }); else setup(); })();