Skip to content

Instantly share code, notes, and snippets.

@patrickbolle
Last active June 26, 2026 18:16
Show Gist options
  • Select an option

  • Save patrickbolle/5ebf48e1dda4899aee63ff52e516b308 to your computer and use it in GitHub Desktop.

Select an option

Save patrickbolle/5ebf48e1dda4899aee63ff52e516b308 to your computer and use it in GitHub Desktop.
Better Blog Comments widget script (auto-synced)
/* Better Blog Comments Widget CSS v1.1.2 */
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }#bbcomments-container,#bbcomments-container *,#bbcomments-container *:before,#bbcomments-container *:after{box-sizing:border-box}#bbcomments-container{font-family:inherit;font-size:var(--baseSize, 16px);line-height:1.5;color:inherit;--bbc-accent: var(--buttonColour, var(--accentColour, #1f2937));--bbc-accent-hover: var(--buttonColourHover, #111827);--bbc-accent-contrast: var(--buttonTextColour, #ffffff);--bbc-border: var(--borderColour, rgba(128, 128, 128, .25));--bbc-thread-color: var(--borderColour, rgba(128, 128, 128, .25));--bbc-error: #dc2626;--bbc-error-soft: rgba(220, 38, 38, .08);--bbc-error-ring: rgba(220, 38, 38, .22)}#bbcomments-container button:focus-visible,#bbcomments-container a:focus-visible,#bbcomments-container [role=radio]:focus-visible,#bbcomments-container [role=radiogroup]:focus-visible{outline:2px solid var(--bbc-accent);outline-offset:2px;border-radius:4px}.bbc-comments-container{margin-left:auto;margin-right:auto;padding:1rem}.bbc-comment-form{border-radius:.5rem;padding-top:1.5rem;padding-bottom:1.5rem}.bbc-error-message+.bbc-comment-form{padding-top:0}.bbc-form-title{margin-bottom:1.5rem;font-weight:600;color:currentColor;font-size:1.25em;line-height:1.3}.bbc-success-message{display:flex;flex-direction:column;align-items:center;text-align:center;padding:32px 24px;background-color:#f6fbf7;border:1px solid #d6ead9;border-radius:12px}.bbc-success-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;border-radius:9999px;background-color:#22c55e;color:#fff;margin-bottom:16px;box-shadow:0 4px 12px #22c55e40;animation:bbc-success-pop .28s ease-out}.bbc-success-icon svg path{stroke-dasharray:26;stroke-dashoffset:26;animation:bbc-success-check .32s .18s ease-out forwards}@keyframes bbc-success-check{to{stroke-dashoffset:0}}.bbc-success-title{font-weight:600;--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1));font-size:1.25em;line-height:1.4;margin:0 0 6px}.bbc-success-text{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));font-size:.9375em;line-height:1.45;max-width:28rem;margin:0}@keyframes bbc-success-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}.bbc-reply-success{padding:20px 16px}.bbc-reply-success .bbc-success-icon{width:44px;height:44px;margin-bottom:12px}.bbc-reply-success .bbc-success-title{font-size:1.1em}.bbc-error-message{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;background-color:var(--bbc-error-soft);border:1px solid var(--bbc-error-ring);border-radius:12px;margin-bottom:16px;animation:bbc-error-slide .24s ease-out}.bbc-error-icon{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9999px;background-color:var(--bbc-error);color:#fff;box-shadow:0 4px 10px var(--bbc-error-ring)}.bbc-error-body{display:flex;min-width:0px;flex-direction:column;font-family:inherit}.bbc-error-title{font-weight:600;--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1));font-family:inherit;font-size:1.125em;line-height:1.35;margin:0 0 2px}.bbc-error-text{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1));font-family:inherit;font-size:1em;line-height:1.5;margin:0}@keyframes bbc-error-slide{0%{transform:translateY(-4px);opacity:0}to{transform:translateY(0);opacity:1}}@media (prefers-reduced-motion: reduce){.bbc-error-message,.bbc-success-icon{animation:none}}.bbc-form-field{margin-bottom:1rem}.bbc-rating-field{margin-bottom:4px}.bbc-label{margin-bottom:.25rem;font-weight:500;display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;color:currentColor;font-size:.9375em;line-height:1.5}.bbc-label-error{color:var(--bbc-error);font-weight:400;font-size:.875em}.bbc-input{width:100%;border-radius:.5rem;padding:.625em .875em;font-size:.9375em;line-height:1.5;outline:none!important;box-shadow:none!important;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out,background-color .15s ease-in-out!important;border:1px solid var(--bbc-border);background-color:#8080800f;color:inherit;font-family:inherit}.bbc-input::-moz-placeholder{color:currentColor;opacity:.55}.bbc-input::placeholder{color:currentColor;opacity:.55}.bbc-input:focus{border-color:var(--bbc-accent);background-color:#80808005;outline:none!important;box-shadow:0 0 0 2px var(--bbc-accent)!important}.bbc-input--error,.bbc-input--error:focus{border-color:var(--bbc-error)!important;background-color:var(--bbc-error-soft);box-shadow:0 0 0 2px var(--bbc-error-ring)!important}.bbc-field-error{color:var(--bbc-error);font-size:.875em;line-height:1.4;margin-top:4px}.bbc-error-message{margin-top:.25rem;color:#c81e1e;font-size:.875em;line-height:1.4}.bbc-comment-content{margin-bottom:1rem;color:currentColor;font-size:1em;line-height:1.6;overflow-wrap:anywhere;min-width:0}.bbc-comment-content p{margin:0 0 .6em}.bbc-comment-content p:last-child{margin-bottom:0}.bbc-comment-content a{color:var(--bbc-accent);text-decoration:underline;text-underline-offset:2px;word-break:break-word}.bbc-comment-content a:hover{opacity:.8}.bbc-comment-content ul,.bbc-comment-content ol{margin:0 0 .6em;padding-left:1.4em}.bbc-comment-content li{margin:.15em 0}.bbc-comment-content code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-size:.9em;padding:.1em .35em;background-color:#8080801f;border-radius:4px}.bbc-comment-content blockquote{margin:.6em 0;padding:.2em 0 .2em .9em;border-left:3px solid var(--bbc-border);opacity:.85}.bbc-comment-meta{display:flex;flex-direction:column;min-width:0;line-height:1.2}.bbc-comment-meta-top{display:flex;flex-wrap:wrap;align-items:center;min-width:0}.bbc-comment-meta-top>*+*{margin-left:6px}.bbc-author-name{font-weight:600;color:currentColor;font-size:.9375em;line-height:1.4;overflow-wrap:anywhere;min-width:0}.bbc-comment-date{color:currentColor;opacity:.6;font-size:.875em;line-height:1.4}.bbc-comment-date:before{content:"·";margin-right:6px;color:currentColor;opacity:.5}.bbc-comments-title{margin-bottom:1.5rem;font-weight:600;color:currentColor;font-size:1.25em;line-height:1.3}.bbc-form-row{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));gap:1rem}@media (min-width: 768px){.bbc-form-row{grid-template-columns:repeat(2,minmax(0,1fr))}}.bbc-toggle-label{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:flex-start;color:currentColor;gap:10px;font-size:.9375em;line-height:1.4}.bbc-toggle-text{padding-top:1px;min-width:0}.bbc-toggle-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.bbc-toggle-track{position:relative;flex-shrink:0;width:40px;height:22px;border-radius:9999px;background:#80808059;transition:background-color .18s ease}.bbc-toggle-label:hover .bbc-toggle-track{background:#80808080}.bbc-toggle-input:checked+.bbc-toggle-track{background:var(--bbc-accent)}.bbc-toggle-label:hover .bbc-toggle-input:checked+.bbc-toggle-track{background:var(--bbc-accent-hover)}.bbc-toggle-thumb{position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #00000026;transition:transform .2s ease}.bbc-toggle-input:checked+.bbc-toggle-track .bbc-toggle-thumb{transform:translate(18px)}.bbc-toggle-input:focus-visible+.bbc-toggle-track{outline:2px solid var(--bbc-accent);outline-offset:2px}.bbc-form-actions{margin-top:.5rem;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px}.bbc-form-buttons{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.bbc-cancel-button{display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:.5rem;padding:.625rem 1rem;font-weight:500}.bbc-cancel-button:disabled{cursor:not-allowed;opacity:.5}.bbc-cancel-button{color:currentColor;opacity:.65;background:transparent;border:none;min-height:44px;font-size:.9375em;line-height:1.5;transition:color .18s ease,background-color .18s ease,opacity .18s ease}.bbc-cancel-button:hover:not(:disabled){opacity:.95;background-color:#8080801a}.bbc-submit-button{display:flex;min-width:160px;cursor:pointer;align-items:center;justify-content:center;border-radius:.5rem;padding:.625rem 1.25rem;font-weight:500}.bbc-submit-button:disabled{cursor:not-allowed;opacity:.5}.bbc-submit-button{background-color:var(--bbc-accent);color:var(--bbc-accent-contrast);border:none;min-height:44px;font-size:1em;line-height:1.5;transition:background-color .18s ease,box-shadow .18s ease,transform .06s ease}.bbc-submit-button:hover:not(:disabled){background-color:var(--bbc-accent-hover)}.bbc-submit-button:active:not(:disabled){transform:translateY(1px)}.bbc-honeypot{display:none}.bbc-loading-dots{display:flex}.bbc-loading-dots>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.bbc-loading-dots span{height:.375rem;width:.375rem;border-radius:9999px;background-color:currentColor;animation:bbc-loading 1s infinite}.bbc-loading-dots span:nth-child(2){animation-delay:.2s}.bbc-loading-dots span:nth-child(3){animation-delay:.4s}@keyframes bbc-loading{0%,to{transform:translateY(0)}50%{transform:translateY(-4px)}}.bbc-comments-section{margin-top:2rem}.bbc-comments-list{margin-top:.25rem}.bbc-no-comments{padding-top:2rem;padding-bottom:2rem;text-align:center;color:currentColor;opacity:.6}.bbc-pagination{display:flex;justify-content:center;margin-top:20px}.bbc-load-more{display:inline-flex;width:100%;cursor:pointer;align-items:center;justify-content:center;font-weight:500;color:currentColor;gap:8px;background-color:#80808014;border:1px solid var(--bbc-border);border-radius:8px;min-height:44px;padding:10px 16px;font-size:.9375em;line-height:1.4;transition:border-color .18s ease,background-color .18s ease,color .18s ease}.bbc-load-more:hover{border-color:var(--bbc-accent);background-color:#80808029}.bbc-load-more:focus-visible{outline:2px solid var(--bbc-accent);outline-offset:2px}.bbc-load-more:active{transform:translateY(1px)}.bbc-load-more-icon{flex-shrink:0;transition:transform .18s ease}.bbc-load-more:hover .bbc-load-more-icon{transform:translateY(2px)}.bbc-load-more-count{color:currentColor;opacity:.55;font-size:.875em}.bbc-load-more-count:before{content:"·";margin:0 6px;color:currentColor;opacity:.55}@media (prefers-reduced-motion: reduce){.bbc-load-more,.bbc-load-more-icon{transition:none}.bbc-load-more:hover .bbc-load-more-icon,.bbc-load-more:active{transform:none}}.bbc-comment{padding-top:1rem;padding-bottom:1rem;--bbc-comment-indent: 52px}.bbc-comment-header{display:flex;align-items:flex-start;justify-content:space-between}.bbc-comment-content,.bbc-comment-actions{padding-left:var(--bbc-comment-indent)}.bbc-comment-author{display:flex;align-items:center;min-width:0;flex:1}.bbc-avatar{margin-right:.75rem;height:2.5rem;width:2.5rem;border-radius:9999px;font-size:1.125rem;line-height:1.75rem;font-weight:500;display:grid;place-items:center;background-color:#8080801f;color:currentColor;flex-shrink:0;line-height:1}.bbc-avatar-initial{line-height:1}.bbc-avatar-img{-o-object-fit:cover;object-fit:cover}.bbc-comment-actions{margin-top:.5rem;display:flex;align-items:center}.bbc-comment-actions>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.bbc-action-button{display:inline-flex;cursor:pointer;align-items:center;border-style:none;background-color:transparent;font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;color:currentColor;opacity:.6;font-size:.875em;line-height:1.4;padding:12px 8px;margin:-12px -8px;min-height:44px;transition:opacity .18s ease}.bbc-action-button:hover{opacity:.95}.bbc-reply-icon{margin-right:.25rem;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.bbc-replies{position:relative;margin-top:6px;margin-left:20px;padding-left:36px;--bbc-elbow-h: 30px}.bbc-replies>.bbc-comment{position:relative;padding-top:14px}.bbc-replies>.bbc-comment:before{content:"";position:absolute;left:-36px;top:0;width:28px;height:var(--bbc-elbow-h);border-left:2px solid var(--bbc-thread-color);border-bottom:2px solid var(--bbc-thread-color);border-bottom-left-radius:12px}.bbc-replies>.bbc-comment:not(:last-child):after{content:"";position:absolute;left:-36px;top:0;bottom:0;width:2px;background:var(--bbc-thread-color)}.bbc-replies-toggle{display:inline-flex;cursor:pointer;align-items:center;border-style:none;background-color:transparent;font-weight:600;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;color:currentColor;opacity:.7;margin-top:6px;padding:12px 8px;margin-left:12px;font-size:.875em;line-height:1.4;min-height:44px;transition:opacity .18s ease}.bbc-replies-toggle:hover{opacity:1}.bbc-replies-toggle-icon{margin-right:4px;transition:transform .2s ease}.bbc-replies-toggle-icon.is-open{transform:rotate(180deg)}.bbc-reply-form-container{margin-top:1rem;padding-left:var(--bbc-comment-indent, 52px)}.bbc-reply-form{padding-top:0;padding-bottom:0}.bbc-reply-form .bbc-form-title{font-size:1em;margin-bottom:12px}.bbc-link{word-break:break-all;text-decoration-line:underline;color:var(--bbc-accent);text-underline-offset:2px;transition:opacity .18s ease}.bbc-link:hover{opacity:.8}.bbc-rating{display:flex;align-items:center;margin-top:3px;margin-bottom:8px;gap:2px}.bbc-rating .starIcon{width:16px;height:16px}.bbc-star-rating{display:inline-flex;align-items:center}.bbc-star{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;padding:4px;border-radius:6px;-webkit-tap-highlight-color:transparent}.bbc-star svg{display:block;transform-origin:center 60%;transition:transform .18s cubic-bezier(.22,1,.36,1),fill .18s ease-out}.bbc-star-rating.is-hovering .bbc-star.is-active svg{transform:scale(1.06)}.bbc-star-rating.is-hovering .bbc-star.is-lead svg{transform:scale(1.2)}.bbc-star:active svg{transform:scale(.9)}.bbc-star.is-pulse:not(.is-lead) svg{animation:bbc-star-commit .18s ease-out}.bbc-star-rating.is-hovering .bbc-star.is-pulse.is-lead svg{animation:bbc-star-commit-lead .18s ease-out}@keyframes bbc-star-commit{0%{transform:scale(1)}50%{transform:scale(1.12)}to{transform:scale(1)}}@keyframes bbc-star-commit-lead{0%{transform:scale(1.2)}50%{transform:scale(1.34)}to{transform:scale(1.2)}}.bbc-star:focus-visible{outline:2px solid var(--bbc-accent);outline-offset:2px}@media (prefers-reduced-motion: reduce){.bbc-star svg{transition:fill .18s ease-out}.bbc-star-rating.is-hovering .bbc-star.is-active svg,.bbc-star-rating.is-hovering .bbc-star.is-lead svg,.bbc-star:active svg,.bbc-star.is-pulse:not(.is-lead) svg,.bbc-star-rating.is-hovering .bbc-star.is-pulse.is-lead svg{transform:none;animation:none}}.bbc-turnstile{margin-top:1rem}#bbcomments-container .visible{visibility:visible}#bbcomments-container .collapse{visibility:collapse}#bbcomments-container .static{position:static}#bbcomments-container .absolute{position:absolute}#bbcomments-container .block{display:block}#bbcomments-container .inline{display:inline}#bbcomments-container .border{border-width:1px}#bbcomments-container .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#bbcomments-container .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}@media (max-width: 640px){.bbc-comments-container{padding:.75rem}.bbc-comment-form{padding-top:1rem;padding-bottom:1rem}.bbc-form-row{grid-template-columns:repeat(1,minmax(0,1fr))}.bbc-comment{padding-top:1rem;padding-bottom:1rem;--bbc-comment-indent: 40px}.bbc-avatar{width:32px;height:32px;margin-right:8px;font-size:1em}.bbc-comments-section{margin-top:1.5rem}.bbc-star{padding:6px 4px}.bbc-replies{margin-left:12px;padding-left:28px;--bbc-elbow-h: 32px}.bbc-replies>.bbc-comment:before{left:-28px;width:22px}.bbc-replies>.bbc-comment:not(:last-child):after{left:-28px}.bbc-replies-toggle{margin-left:12px}.bbc-reply-form-container{padding-left:var(--bbc-comment-indent, 52px)}}@keyframes skeleton-pulse{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.comments-skeleton{padding:var(--basePadding) 0}.comments-skeleton-title{height:24px;background-color:#e0e0e0;border-radius:4px;margin-bottom:16px;width:40%;animation:skeleton-pulse 1.5s ease-in-out infinite}.comment-skeleton{border:1px solid var(--borderColour);border-radius:4px;padding:var(--basePadding);margin-bottom:var(--marginPadding);background-color:#fff}.comment-skeleton-header{display:flex;align-items:center;margin-bottom:8px}.comment-skeleton-avatar{width:40px;height:40px;border-radius:50%;background-color:#e0e0e0;margin-right:12px;animation:skeleton-pulse 1.5s ease-in-out infinite}.comment-skeleton-meta{flex:1}.comment-skeleton-name{height:16px;background-color:#e0e0e0;border-radius:3px;width:30%;margin-bottom:4px;animation:skeleton-pulse 1.5s ease-in-out infinite}.comment-skeleton-date{height:14px;background-color:#e0e0e0;border-radius:3px;width:50%;animation:skeleton-pulse 1.5s ease-in-out infinite}.comment-skeleton-rating{height:20px;background-color:#e0e0e0;border-radius:3px;width:120px;margin-bottom:12px;animation:skeleton-pulse 1.5s ease-in-out infinite}.comment-skeleton-content{margin-bottom:8px}.comment-skeleton-line{height:16px;background-color:#e0e0e0;border-radius:3px;margin-bottom:6px;width:100%;animation:skeleton-pulse 1.5s ease-in-out infinite}.comment-skeleton-line:nth-child(2){width:85%}.comment-skeleton-line.short{width:60%}@keyframes slideInFromTop{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}.comment-slide-in{animation:slideInFromTop .8s ease-out}.admin-reply{position:relative}.admin-reply .commentName{font-weight:700!important;display:flex;width:auto!important;align-items:center}@media (prefers-reduced-motion: reduce){#bbcomments-container *,#bbcomments-container *:before,#bbcomments-container *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
// Better Blog Comments Widget JS v1.1.2
(function() {
(function() {
var e,t,n,r,o,i,s,a,l,c,u,d,f,p,h,m,g,v,y,b,w,S,k,x,O,T,E,C,A,L,R,_,N,P,I,D,M,j,$,F,U,z,B,H,q,V,W,K,G,Y,J,X,Z,Q,ee,te,ne,re,oe,ie,se,ae,le=Object.defineProperty,ce=e=>{throw TypeError(e)},ue=(e,t,n)=>((e,t,n)=>t in e?le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),de=(e,t,n)=>t.has(e)||ce("Cannot "+n),fe=(e,t,n)=>(de(e,t,"read from private field"),n?n.call(e):t.get(e)),pe=(e,t,n)=>t.has(e)?ce("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(de(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),me=(e,t,n)=>(de(e,t,"access private method"),n);function ge(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const ve=e=>"string"==typeof e,ye=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},be=e=>null==e?"":""+e,we=/###/g,Se=e=>e&&e.indexOf("###")>-1?e.replace(we,"."):e,ke=e=>!e||ve(e),xe=(e,t,n)=>{const r=ve(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(ke(e))return{};const t=Se(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return ke(e)?{}:{obj:e,k:Se(r[o])}},Oe=(e,t,n)=>{const{obj:r,k:o}=xe(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],s=t.slice(0,t.length-1),a=xe(e,s,Object);for(;void 0===a.obj&&s.length;)i=`${s[s.length-1]}.${i}`,s=s.slice(0,s.length-1),a=xe(e,s,Object),a&&a.obj&&void 0!==a.obj[`${a.k}.${i}`]&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=n},Te=(e,t)=>{const{obj:n,k:r}=xe(e,t);if(n)return n[r]},Ee=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?ve(e[r])||e[r]instanceof String||ve(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Ee(e[r],t[r],n):e[r]=t[r]);return e},Ce=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Ae={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const Le=e=>ve(e)?e.replace(/[&<>"'\/]/g,e=>Ae[e]):e;const Re=[" ",",","?","!",";"],_e=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Ne=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;i<r.length;){if(!o||"object"!=typeof o)return;let e,t="";for(let s=i;s<r.length;++s)if(s!==i&&(t+=n),t+=r[s],e=o[t],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&s<r.length-1)continue;i+=s-i+1;break}o=e}return o},Pe=e=>e&&e.replace("_","-"),Ie={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class De{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Ie,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(ve(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new De(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new De(this.logger,e)}}var Me=new De;class je{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(e=>{let[t,r]=e;for(let o=0;o<r;o++)t(...n)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(t=>{let[r,o]=t;for(let i=0;i<o;i++)r.apply(r,[e,...n])})}}}class $e extends je{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,t],n&&(Array.isArray(n)?s.push(...n):ve(n)&&o?s.push(...n.split(o)):s.push(n)));const a=Te(this.data,s);return!a&&!t&&!n&&e.indexOf(".")>-1&&(e=s[0],t=s[1],n=s.slice(2).join(".")),!a&&i&&ve(n)?Ne(this.data&&this.data[e]&&this.data[e][t],n,o):a}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let s=[e,t];n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."),r=t,t=s[1]),this.addNamespaces(t),Oe(this.data,s,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const o in n)(ve(n[o])||Array.isArray(n[o]))&&this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},s=[e,t];e.indexOf(".")>-1&&(s=e.split("."),r=n,n=t,t=s[1]),this.addNamespaces(t);let a=Te(this.data,s)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Ee(a,n,o):a={...a,...n},Oe(this.data,s,a),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Fe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))}),t}};const Ue={};class ze extends je{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var n,r;super(),n=e,r=this,["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach(e=>{n[e]&&(r[e]=n[e])}),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Me.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Re.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=_e.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!s){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:ve(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:ve(o)?[o]:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:s}=this.extractFromKey(e[e.length-1],t),a=s[s.length-1],l=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(c){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${a}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:i}const u=this.resolve(e,t);let d=u&&u.res;const f=u&&u.usedKey||i,p=u&&u.exactUsedKey||i,h=Object.prototype.toString.apply(d),m=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!ve(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(g&&d&&v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0)||ve(m)&&Array.isArray(d))if(g&&ve(m)&&Array.isArray(d))d=d.join(m),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,s=!1;const c=void 0!==t.count&&!ve(t.count),f=ze.hasDefaultValue(t),p=c?this.pluralResolver.getSuffix(l,t.count,t):"",h=t.ordinal&&c?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",m=c&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),g=m&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=g),this.isValidLookup(d)||(s=!0,d=i);const v=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&s?void 0:d,y=f&&g!==d&&this.options.updateMissing;if(s||r||y){if(this.logger.log(y?"updateKey":"missingKey",l,a,i,y?g:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=f&&r!==d?r:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,a,n,o,y,t),this.emit("missingKey",e,a,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&c?e.forEach(e=>{const n=this.pluralResolver.getSuffixes(e,t);m&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{r([e],i+n,t[`defaultValue${n}`]||g)})}):r(e,i,g))}d=this.extendTranslation(d,e,t,u,n),s&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${a}:${i}`),(s||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${i}`:i,r?d:void 0):this.options.parseMissingKeyHandler(d))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:s}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(o){const e=Array.isArray(d),n=e?[]:{},r=e?p:f;for(const i in d)if(Object.prototype.hasOwnProperty.call(d,i)){const e=`${r}${o}${i}`;n[i]=this.translate(e,{...t,joinArrays:!1,ns:s}),n[i]===e&&(n[i]=d[i])}d=n}}return r?(u.res=d,u.usedParams=this.getUsedParamsDetails(t),u):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const s=ve(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let a;if(s){const t=e.match(this.interpolator.nestingRegexp);a=t&&t.length}let l=n.replace&&!ve(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,n.lng||this.language||r.usedLng,n),s){const t=e.match(this.interpolator.nestingRegexp);a<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):i.translate(...r,t)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,a=ve(s)?[s]:s;return null!=e&&a&&a.length&&!1!==n.applyPostProcessor&&(e=Fe.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ve(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;const a=this.extractFromKey(e,s),l=a.key;n=l;let c=a.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const u=void 0!==s.count&&!ve(s.count),d=u&&!s.ordinal&&0===s.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==s.context&&(ve(s.context)||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);c.forEach(e=>{this.isValidLookup(t)||(i=e,!Ue[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Ue[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(n=>{if(this.isValidLookup(t))return;o=n;const i=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,n,e,s);else{let e;u&&(e=this.pluralResolver.getSuffix(n,s.count,s));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(i.push(l+e),s.ordinal&&0===e.indexOf(r)&&i.push(l+e.replace(r,this.options.pluralSeparator)),d&&i.push(l+t)),f){const n=`${l}${this.options.contextSeparator}${s.context}`;i.push(n),u&&(i.push(n+e),s.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let a;for(;a=i.pop();)this.isValidLookup(t)||(r=a,t=this.getResource(n,e,a,s))}))})}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!ve(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const Be=e=>e.charAt(0).toUpperCase()+e.slice(1);class He{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Me.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Pe(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=Pe(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(ve(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(t){}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(e=>e.toLowerCase()):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Be(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Be(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Be(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),ve(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return ve(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):ve(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}let qe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Ve={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const We=["v1","v2","v3"],Ke=["v4"],Ge={zero:0,one:1,two:2,few:3,many:4,other:5};class Ye{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Me.create("pluralResolver"),this.options.compatibilityJSON&&!Ke.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return qe.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:Ve[t.fc]}})}),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const r=Pe("dev"===e?"en":e),o=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let s;try{s=new Intl.PluralRules(r,{type:o})}catch(n){if(!e.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(r,t)}return this.pluralRulesCache[i]=s,s}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>Ge[e]-Ge[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!We.includes(this.options.compatibilityJSON)}}const Je=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=Te(e,n);return void 0!==r?r:Te(t,n)})(e,t,n);return!i&&o&&ve(n)&&(i=Ne(e,n,r),void 0===i&&(i=Ne(t,n,r))),i},Xe=e=>e.replace(/\$/g,"$$$$");class Ze{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Me.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:s,suffixEscaped:a,formatSeparator:l,unescapeSuffix:c,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:m,maxReplaces:g,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:Le,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Ce(o):i||"{{",this.suffix=s?Ce(s):a||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?Ce(d):f||Ce("$t("),this.nestingSuffix=p?Ce(p):h||Ce(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==v&&v,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,s;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Je(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),s=o.join(this.formatSeparator).trim();return this.format(Je(t,a,i,this.options.keySeparator,this.options.ignoreJSONStructure),s,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const c=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Xe(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Xe(this.escape(e)):Xe(e)}].forEach(t=>{for(s=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=l(n),void 0===i)if("function"==typeof c){const t=c(e,o,r);i=ve(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(u){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else ve(i)||this.useRawValueToEscape||(i=be(i));const a=t.safeValue(i);if(e=e.replace(o[0],a),u?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const s=i.match(/'/g),a=i.match(/"/g);(s&&s.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(l){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,l),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let a=[];o={...i},o=o.replace&&!ve(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let l=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),a=e,l=!0}if(r=t(s.call(this,n[1].trim(),o),o),r&&n[0]===e&&!ve(r))return r;ve(r)||(r=be(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),l&&(r=a.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const Qe=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const s=r+JSON.stringify(i);let a=t[s];return a||(a=e(Pe(r),o),t[s]=a),a(n)}};class et{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Me.create("formatter"),this.options=e,this.formats={number:Qe((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:Qe((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:Qe((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:Qe((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:Qe((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Qe(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}return o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const s=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},a=s.locale||s.lng||r.locale||r.lng||n;t=this.formats[o](e,a,{...i,...r,...s})}catch(s){this.logger.warn(s)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e)}}class tt extends je{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Me.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},s={},a={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const s=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[s]=2:this.state[s]<0||(1===this.state[s]?void 0===i[s]&&(i[s]=!0):(this.state[s]=1,r=!1,void 0===i[s]&&(i[s]=!0),void 0===o[s]&&(o[s]=!0),void 0===a[t]&&(a[t]=!0)))}),r||(s[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(a)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const s={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=xe(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{s[e]||(s[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===s[e][t]&&(s[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const s=(s,a)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}s&&a&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(s,a)},a=this.backend[n].bind(this.backend);if(2!==a.length)return a(e,t,s);try{const n=a(e,t);n&&"function"==typeof n.then?n.then(e=>s(null,e)).catch(s):s(null,n)}catch(l){s(l)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();ve(e)&&(e=this.languageUtils.toResolveHierarchy(e)),ve(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const l={...i,isUpdate:o},c=this.backend.create.bind(this.backend);if(c.length<6)try{let o;o=5===c.length?c(e,t,n,r,l):c(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>s(null,e)).catch(s):s(null,o)}catch(a){s(a)}else c(e,t,n,r,s,l)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const nt=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),ve(e[1])&&(t.defaultValue=e[1]),ve(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),rt=e=>(ve(e.ns)&&(e.ns=[e.ns]),ve(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ve(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),ot=()=>{};class it extends je{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=rt(e),this.services={},this.logger=Me,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(ve(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=nt();this.options={...r,...this.options,...rt(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?Me.init(o(this.modules.logger),this.options):Me.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=et);const n=new He(this.options);this.store=new $e(this.options.resources,this.options);const i=this.services;i.logger=Me,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new Ye(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Ze(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new tt(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)}),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new ze(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ot),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});const i=ye(),s=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ot;const n=ve(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>r(e))}this.options.preload&&this.options.preload.forEach(e=>r(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){const r=ye();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ot),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Fe.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=ye();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},s=t=>{e||t||!this.services.languageDetector||(t=[]);const n=ve(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e):s(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];i=r.options.overloadTranslationOptionHandler([e,t].concat(a))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const c=r.options.keySeparator||".";let u;return u=i.keyPrefix&&Array.isArray(e)?e.map(e=>`${i.keyPrefix}${c}${e}`):i.keyPrefix?`${i.keyPrefix}${c}${e}`:e,r.t(u,i)};return ve(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=ye();return this.options.ns?(ve(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ye();ve(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new He(nt());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new it(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ot;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new it(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new $e(this.store.data,r),o.services.resourceStore=o.store),o.translator=new ze(o.services,r),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit(e,...n)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const st=it.createInstance();function at(e){return(at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lt(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":at(XMLHttpRequest))}st.createInstance=it.createInstance,st.createInstance,st.dir,st.init,st.loadResources,st.reloadResources,st.use,st.changeLanguage,st.getFixedT,st.t,st.exists,st.setDefaultNamespace,st.hasLoadedNamespace,st.loadNamespaces,st.loadLanguages;var ct="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ut(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ft,pt={exports:{}},ht={exports:{}};function mt(){return ft||(ft=1,function(e,t){var n,r="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==ct&&ct,o=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();n=o,function(e){var t=void 0!==n&&n||"undefined"!=typeof self&&self||void 0!==t&&t,r="URLSearchParams"in t,o="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),s="FormData"in t,a="ArrayBuffer"in t;if(a)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function u(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function g(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:s&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=h(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(g)}),this.text=function(){var e,t,n,r=h(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=m(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},s&&(this.formData=function(){return this.text().then(S)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=u(e),t=d(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},p.prototype.delete=function(e){delete this.map[u(e)]},p.prototype.get=function(e){return e=u(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(u(e))},p.prototype.set=function(e,t){this.map[u(e)]=d(t)},p.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},p.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),f(e)},p.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),f(e)},p.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),f(e)},o&&(p.prototype[Symbol.iterator]=p.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,r,o=(t=t||{}).body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),b.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function S(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function k(e,t){if(!(this instanceof k))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},y.call(w.prototype),y.call(k.prototype),k.prototype.clone=function(){return new k(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},k.error=function(){var e=new k(null,{status:0,statusText:""});return e.type="error",e};var x=[301,302,303,307,308];k.redirect=function(e,t){if(-1===x.indexOf(t))throw new RangeError("Invalid status code");return new k(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(T){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function O(n,r){return new Promise(function(o,s){var l=new w(n,r);if(l.signal&&l.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var c=new XMLHttpRequest;function u(){c.abort()}c.onload=function(){var e,t,n={status:c.status,statusText:c.statusText,headers:(e=c.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t)};n.url="responseURL"in c?c.responseURL:n.headers.get("X-Request-URL");var r="response"in c?c.response:c.responseText;setTimeout(function(){o(new k(r,n))},0)},c.onerror=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},c.ontimeout=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},c.onabort=function(){setTimeout(function(){s(new e.DOMException("Aborted","AbortError"))},0)},c.open(l.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(n){return e}}(l.url),!0),"include"===l.credentials?c.withCredentials=!0:"omit"===l.credentials&&(c.withCredentials=!1),"responseType"in c&&(i?c.responseType="blob":a&&l.headers.get("Content-Type")&&-1!==l.headers.get("Content-Type").indexOf("application/octet-stream")&&(c.responseType="arraybuffer")),!r||"object"!=typeof r.headers||r.headers instanceof p?l.headers.forEach(function(e,t){c.setRequestHeader(t,e)}):Object.getOwnPropertyNames(r.headers).forEach(function(e){c.setRequestHeader(e,d(r.headers[e]))}),l.signal&&(l.signal.addEventListener("abort",u),c.onreadystatechange=function(){4===c.readyState&&l.signal.removeEventListener("abort",u)}),c.send(void 0===l._bodyInit?null:l._bodyInit)})}O.polyfill=!0,t.fetch||(t.fetch=O,t.Headers=p,t.Request=w,t.Response=k),e.Headers=p,e.Request=w,e.Response=k,e.fetch=O}({}),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var i=r.fetch?r:o;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(ht,ht.exports)),ht.exports}!function(e,t){var n="function"==typeof fetch?fetch:void 0;if(void 0!==ct&&ct.fetch?n=ct.fetch:"undefined"!=typeof window&&window.fetch&&(n=window.fetch),void 0!==dt&&"undefined"==typeof window){var r=n||mt();r.default&&(r=r.default),t.default=r,e.exports=t.default}}(pt,pt.exports);var gt=pt.exports;const vt=ut(gt),yt=ge({__proto__:null,default:vt},[gt]);function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach(function(t){St(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function St(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=kt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kt(e){return(kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var xt,Ot,Tt="function"==typeof fetch?fetch:void 0;"undefined"!=typeof global&&global.fetch?Tt=global.fetch:"undefined"!=typeof window&&window.fetch&&(Tt=window.fetch),lt()&&("undefined"!=typeof global&&global.XMLHttpRequest?xt=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(xt=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?Ot=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(Ot=window.ActiveXObject)),Tt||!yt||xt||Ot||(Tt=vt||yt),"function"!=typeof Tt&&(Tt=void 0);var Et=function(e,t){if(t&&"object"===kt(t)){var n="";for(var r in t)n+="&"+encodeURIComponent(r)+"="+encodeURIComponent(t[r]);if(!n)return e;e=e+(-1!==e.indexOf("?")?"&":"?")+n.slice(1)}return e},Ct=function(e,t,n,r){var o=function(e){if(!e.ok)return n(e.statusText||"Error",{status:e.status});e.text().then(function(t){n(null,{status:e.status,data:t})}).catch(n)};if(r){var i=r(e,t);if(i instanceof Promise)return void i.then(o).catch(n)}"function"==typeof fetch?fetch(e,t).then(o).catch(n):Tt(e,t).then(o).catch(n)},At=!1,Lt=function(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),r=r||function(){},Tt&&0!==t.indexOf("file:")?function(e,t,n,r){e.queryStringParams&&(t=Et(t,e.queryStringParams));var o=wt({},"function"==typeof e.customHeaders?e.customHeaders():e.customHeaders);"undefined"==typeof window&&"undefined"!=typeof global&&void 0!==global.process&&global.process.versions&&global.process.versions.node&&(o["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(o["Content-Type"]="application/json");var i="function"==typeof e.requestOptions?e.requestOptions(n):e.requestOptions,s=wt({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:o},At?{}:i),a="function"==typeof e.alternateFetch&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{Ct(t,s,r,a)}catch(l){if(!i||0===Object.keys(i).length||!l.message||l.message.indexOf("not implemented")<0)return r(l);try{Object.keys(i).forEach(function(e){delete s[e]}),Ct(t,s,r,a),At=!0}catch(c){r(c)}}}(e,t,n,r):lt()||"function"==typeof ActiveXObject?function(e,t,n,r){n&&"object"===kt(n)&&(n=Et("",n).slice(1)),e.queryStringParams&&(t=Et(t,e.queryStringParams));try{var o;(o=xt?new xt:new Ot("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",t,1),e.crossDomain||o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.withCredentials=!!e.withCredentials,n&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.overrideMimeType&&o.overrideMimeType("application/json");var i=e.customHeaders;if(i="function"==typeof i?i():i)for(var s in i)o.setRequestHeader(s,i[s]);o.onreadystatechange=function(){o.readyState>3&&r(o.status>=400?o.statusText:null,{status:o.status,data:o.responseText})},o.send(n)}catch(a){console&&console.log(a)}}(e,t,n,r):void r(new Error("No fetch and no xhr implementation found!"))};function Rt(e){return(Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(n),!0).forEach(function(t){It(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pt(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dt(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function It(e,t,n){return(t=Dt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dt(e){var t=function(e,t){if("object"!=Rt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==Rt(t)?t:t+""}var Mt=Pt(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)},[{key:"init",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.services=e,this.options=Nt(Nt(Nt({},{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(e){return JSON.parse(e)},stringify:JSON.stringify,parsePayload:function(e,t,n){return It({},t,n||"")},parseLoadPayload:function(e,t){},request:Lt,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}),this.options||{}),n),this.allOptions=r,this.services&&this.options.reloadInterval){var o=setInterval(function(){return t.reload()},this.options.reloadInterval);"object"===Rt(o)&&"function"==typeof o.unref&&o.unref()}}},{key:"readMulti",value:function(e,t,n){this._readAny(e,e,t,t,n)}},{key:"read",value:function(e,t,n){this._readAny([e],e,[t],t,n)}},{key:"_readAny",value:function(e,t,n,r,o){var i,s=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(e,n)),(a=function(e){return!!e&&"function"==typeof e.then}(i=a)?i:Promise.resolve(i)).then(function(i){if(!i)return o(null,{});var a=s.services.interpolator.interpolate(i,{lng:e.join("+"),ns:n.join("+")});s.loadUrl(a,o,t,r)})}},{key:"loadUrl",value:function(e,t,n,r){var o=this,i="string"==typeof n?[n]:n,s="string"==typeof r?[r]:r,a=this.options.parseLoadPayload(i,s);this.options.request(this.options,e,a,function(i,s){if(s&&(s.status>=500&&s.status<600||!s.status))return t("failed loading "+e+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return t("failed loading "+e+"; status code: "+s.status,!1);if(!s&&i&&i.message){var a=i.message.toLowerCase();if(["failed","fetch","network","load"].find(function(e){return a.indexOf(e)>-1}))return t("failed loading "+e+": "+i.message,!0)}if(i)return t(i,!1);var l,c;try{l="string"==typeof s.data?o.options.parse(s.data,n,r):s.data}catch(u){c="failed parsing "+e+" to json"}if(c)return t(c,!1);t(null,l)})}},{key:"create",value:function(e,t,n,r,o){var i=this;if(this.options.addPath){"string"==typeof e&&(e=[e]);var s=this.options.parsePayload(t,n,r),a=0,l=[],c=[];e.forEach(function(n){var r=i.options.addPath;"function"==typeof i.options.addPath&&(r=i.options.addPath(n,t));var u=i.services.interpolator.interpolate(r,{lng:n,ns:t});i.options.request(i.options,u,s,function(t,n){a+=1,l.push(t),c.push(n),a===e.length&&"function"==typeof o&&o(l,c)})})}}},{key:"reload",value:function(){var e=this,t=this.services,n=t.backendConnector,r=t.languageUtils,o=t.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var s=[],a=function(e){r.toResolveHierarchy(e).forEach(function(e){s.indexOf(e)<0&&s.push(e)})};a(i),this.allOptions.preload&&this.allOptions.preload.forEach(function(e){return a(e)}),s.forEach(function(t){e.allOptions.ns.forEach(function(e){n.read(t,e,"read",null,null,function(r,i){r&&o.warn("loading namespace ".concat(e," for language ").concat(t," failed"),r),!r&&i&&o.log("loaded namespace ".concat(e," for language ").concat(t),i),n.loaded("".concat(t,"|").concat(e),r,i)})})})}}}]);Mt.type="backend";const{slice:jt,forEach:$t}=[];const Ft=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Ut={create(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+60*n*1e3)),r&&(o.domain=r),document.cookie=function(e,t){const n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{path:"/"};let r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){const e=n.maxAge-0;if(Number.isNaN(e))throw new Error("maxAge should be a Number");r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Ft.test(n.domain))throw new TypeError("option domain is invalid");r+=`; Domain=${n.domain}`}if(n.path){if(!Ft.test(n.path))throw new TypeError("option path is invalid");r+=`; Path=${n.path}`}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite)switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(r+="; Partitioned"),r}(e,t,o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let e=n[r];for(;" "===e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(t))return e.substring(t.length,e.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var zt={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&"undefined"!=typeof document)return Ut.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=t;n&&"undefined"!=typeof document&&Ut.create(n,e,r,o,i)}},Bt={name:"querystring",lookup(e){var t;let n,{lookupQuerystring:r}=e;if("undefined"!=typeof window){let{search:e}=window.location;!window.location.search&&(null==(t=window.location.hash)?void 0:t.indexOf("?"))>-1&&(e=window.location.hash.substring(window.location.hash.indexOf("?")));const o=e.substring(1).split("&");for(let t=0;t<o.length;t++){const e=o[t].indexOf("=");if(e>0){o[t].substring(0,e)===r&&(n=o[t].substring(e+1))}}}return n}},Ht={name:"hash",lookup(e){var t;let n,{lookupHash:r,lookupFromHashIndex:o}=e;if("undefined"!=typeof window){const{hash:e}=window.location;if(e&&e.length>2){const i=e.substring(1);if(r){const e=i.split("&");for(let t=0;t<e.length;t++){const o=e[t].indexOf("=");if(o>0){e[t].substring(0,o)===r&&(n=e[t].substring(o+1))}}}if(n)return n;if(!n&&o>-1){const n=e.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(n))return;return null==(t=n["number"==typeof o?o:0])?void 0:t.replace("/","")}}}return n}};let qt=null;const Vt=()=>{if(null!==qt)return qt;try{if(qt="undefined"!=typeof window&&null!==window.localStorage,!qt)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){qt=!1}return qt};var Wt={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Vt())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Vt()&&window.localStorage.setItem(n,e)}};let Kt=null;const Gt=()=>{if(null!==Kt)return Kt;try{if(Kt="undefined"!=typeof window&&null!==window.sessionStorage,!Kt)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){Kt=!1}return Kt};var Yt={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Gt())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Gt()&&window.sessionStorage.setItem(n,e)}},Jt={name:"navigator",lookup(e){const t=[];if("undefined"!=typeof navigator){const{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let o=0;o<e.length;o++)t.push(e[o]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Xt={name:"htmlTag",lookup(e){let t,{htmlTag:n}=e;const r=n||("undefined"!=typeof document?document.documentElement:null);return r&&"function"==typeof r.getAttribute&&(t=r.getAttribute("lang")),t}},Zt={name:"path",lookup(e){var t;let{lookupFromPathIndex:n}=e;if("undefined"==typeof window)return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(!Array.isArray(r))return;return null==(t=r["number"==typeof n?n:0])?void 0:t.replace("/","")}},Qt={name:"subdomain",lookup(e){var t,n;let{lookupFromSubdomainIndex:r}=e;const o="number"==typeof r?r+1:1,i="undefined"!=typeof window&&(null==(n=null==(t=window.location)?void 0:t.hostname)?void 0:n.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(i)return i[o]}};let en=!1;try{document.cookie,en=!0}catch(pc){}const tn=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];en||tn.splice(1,1);class nn{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{languageUtils:{}},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=function(e){return $t.call(jt.call(arguments,1),t=>{if(t)for(const n in t)void 0===e[n]&&(e[n]=t[n])}),e}(t,this.options||{},{order:tn,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}),"string"==typeof this.options.convertDetectedLanguage&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=e=>e.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(zt),this.addDetector(Bt),this.addDetector(Wt),this.addDetector(Yt),this.addDetector(Jt),this.addDetector(Xt),this.addDetector(Zt),this.addDetector(Qt),this.addDetector(Ht)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&"string"==typeof n&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>{return null!=e&&!("string"==typeof(t=e)&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(e=>e.test(t)));var t}).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}}nn.type="languageDetector";const rn=!1;var on=Array.isArray,sn=Array.prototype.indexOf,an=Array.prototype.includes,ln=Array.from,cn=Object.defineProperty,un=Object.getOwnPropertyDescriptor,dn=Object.getOwnPropertyDescriptors,fn=Object.prototype,pn=Array.prototype,hn=Object.getPrototypeOf,mn=Object.isExtensible;function gn(e){return"function"==typeof e}const vn=()=>{};function yn(e){return e()}function bn(e){for(var t=0;t<e.length;t++)e[t]()}function wn(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}const Sn=16,kn=32,xn=64,On=512,Tn=1024,En=2048,Cn=4096,An=8192,Ln=16384,Rn=32768,_n=1<<25,Nn=65536,Pn=1<<17,In=1<<19,Dn=1<<25,Mn=65536,jn=1<<21,$n=1<<23,Fn=Symbol("$state"),Un=Symbol("legacy props"),zn=Symbol(""),Bn=Symbol("attributes"),Hn=Symbol("class"),qn=Symbol("style"),Vn=Symbol("text"),Wn=Symbol("form reset"),Kn=new class extends Error{constructor(){super(...arguments),ue(this,"name","StaleReactionError"),ue(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Gn(e){return e===this.v}function Yn(e,t){return e!=e?t==t:e!==t||null!==e&&"object"==typeof e||"function"==typeof e}function Jn(e){return!Yn(e,this.v)}function Xn(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let Zn=!1;const Qn=Symbol("uninitialized"),er="http://www.w3.org/1999/xhtml";let tr=null;function nr(e){tr=e}function rr(e){return ar().get(e)}function or(e,t=!1,n){tr={p:tr,i:!1,c:null,e:null,s:e,x:null,r:jo,l:Zn&&!t?{s:null,u:null,$:[]}:null}}function ir(e){var t=tr,n=t.e;if(null!==n)for(var r of(t.e=null,n))fi(r);return t.i=!0,tr=t.p,{}}function sr(){return!Zn||null!==tr&&null===tr.l}function ar(e){return null===tr&&Xn(),tr.c??(tr.c=new Map(function(e){let t=e.p;for(;null!==t;){const e=t.c;if(null!==e)return e;t=t.p}return null}(tr)||void 0))}let lr=[];function cr(){var e=lr;lr=[],bn(e)}function ur(e){if(0===lr.length&&!no){var t=lr;queueMicrotask(()=>{t===lr&&cr()})}lr.push(e)}function dr(){for(;lr.length>0;)cr()}function fr(e){if("object"!=typeof e||null===e||Fn in e)return e;const t=hn(e);if(t!==fn&&t!==pn)return e;var n=new Map,r=on(e),o=ko(0),i=Wo,s=e=>{if(Wo===i)return e();var t=Io,n=Wo;Mo(null),Ko(i);var r=e();return Mo(t),Ko(n),r};return r&&n.set("length",ko(e.length)),new Proxy(e,{defineProperty(e,t,r){"value"in r&&!1!==r.configurable&&!1!==r.enumerable&&!1!==r.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var o=n.get(t);return void 0===o?s(()=>{var e=ko(r.value);return n.set(t,e),e}):Oo(o,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(void 0===r){if(t in e){const e=s(()=>ko(Qn));n.set(t,e),Eo(o)}}else Oo(r,Qn),Eo(o);return!0},get(t,r,o){var i;if(r===Fn)return e;var a=n.get(r),l=r in t;if(void 0!==a||l&&!(null==(i=un(t,r))?void 0:i.writable)||(a=s(()=>ko(fr(l?t[r]:Qn))),n.set(r,a)),void 0!==a){var c=ni(a);return c===Qn?void 0:c}return Reflect.get(t,r,o)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&"value"in r){var o=n.get(t);o&&(r.value=ni(o))}else if(void 0===r){var i=n.get(t),s=null==i?void 0:i.v;if(void 0!==i&&s!==Qn)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return r},has(e,t){var r;if(t===Fn)return!0;var o=n.get(t),i=void 0!==o&&o.v!==Qn||Reflect.has(e,t);if((void 0!==o||null!==jo&&(!i||(null==(r=un(e,t))?void 0:r.writable)))&&(void 0===o&&(o=s(()=>ko(i?fr(e[t]):Qn)),n.set(t,o)),ni(o)===Qn))return!1;return i},set(e,t,i,a){var l,c=n.get(t),u=t in e;if(r&&"length"===t)for(var d=i;d<c.v;d+=1){var f=n.get(d+"");void 0!==f?Oo(f,Qn):d in e&&(f=s(()=>ko(Qn)),n.set(d+"",f))}void 0===c?u&&!(null==(l=un(e,t))?void 0:l.writable)||(Oo(c=s(()=>ko(void 0)),fr(i)),n.set(t,c)):(u=c.v!==Qn,Oo(c,s(()=>fr(i))));var p=Reflect.getOwnPropertyDescriptor(e,t);if((null==p?void 0:p.set)&&p.set.call(a,i),!u){if(r&&"string"==typeof t){var h=n.get("length"),m=Number(t);Number.isInteger(m)&&m>=h.v&&Oo(h,m+1)}Eo(o)}return!0},ownKeys(e){ni(o);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return void 0===t||t.v!==Qn});for(var[r,i]of n)i.v===Qn||r in e||t.push(r);return t},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}var pr,hr,mr,gr;function vr(e=""){return document.createTextNode(e)}function yr(e){return mr.call(e)}function br(e){return gr.call(e)}function wr(e,t){return yr(e)}function Sr(e,t=!1){var n=yr(e);return n instanceof Comment&&""===n.data?br(n):n}function kr(e,t=1,n=!1){let r=e;for(;t--;)r=br(r);return r}function xr(e,t,n){return null==t||t===er?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Or(e){var t=jo;if(null===t)return Io.f|=$n,e;if(0===(t.f&Rn)&&!(4&t.f))throw e;Tr(e,t)}function Tr(e,t){if(null===t||0===(t.f&Ln)){for(;null!==t;){if(128&t.f){if(0===(t.f&Rn))throw e;try{return void t.b.error(e)}catch(pc){e=pc}}t=t.parent}throw e}}const Er=-7169;function Cr(e,t){e.f=e.f&Er|t}function Ar(e){0!==(e.f&On)||null===e.deps?Cr(e,Tn):Cr(e,Cn)}function Lr(e){if(null!==e)for(const t of e)2&t.f&&0!==(t.f&Mn)&&(t.f^=Mn,Lr(t.deps))}function Rr(e,t,n){0!==(e.f&En)?t.add(e):0!==(e.f&Cn)&&n.add(e),Lr(e.deps),Cr(e,Tn)}function _r(e,t,n){if(null==e)return t(void 0),vn;const r=ii(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const Nr=[];function Pr(e,t=vn){let n=null;const r=new Set;function o(t){if(Yn(e,t)&&(e=t,n)){const t=!Nr.length;for(const n of r)n[1](),Nr.push(n,e);if(t){for(let e=0;e<Nr.length;e+=2)Nr[e][0](Nr[e+1]);Nr.length=0}}}function i(t){o(t(e))}return{set:o,update:i,subscribe:function(s,a=vn){const l=[s,a];return r.add(l),1===r.size&&(n=t(o,i)||vn),s(e),()=>{r.delete(l),0===r.size&&n&&(n(),n=null)}}}}let Ir=!1,Dr=Symbol("unmounted");function Mr(e,t,n){const r=n[t]??(n[t]={store:null,source:xo(void 0),unsubscribe:vn});if(r.store!==e&&!(Dr in n))if(r.unsubscribe(),r.store=e??null,null==e)r.source.v=void 0,r.unsubscribe=vn;else{var o=!0;r.unsubscribe=_r(e,e=>{o?r.source.v=e:Oo(r.source,e)}),o=!1}return e&&Dr in n?function(e){let t;return _r(e,e=>t=e)(),t}(e):ni(r.source)}function jr(){const e={};return[e,function(){ui(()=>{for(var t in e){e[t].unsubscribe()}cn(e,Dr,{enumerable:!1,value:!0})})}]}class $r{constructor(y,b,w,S){var k;pe(this,g),ue(this,"parent"),ue(this,"is_pending",!1),ue(this,"transform_error"),pe(this,e),pe(this,t,null),pe(this,n),pe(this,r),pe(this,o),pe(this,i,null),pe(this,s,null),pe(this,a,null),pe(this,l,null),pe(this,c,0),pe(this,u,0),pe(this,d,!1),pe(this,f,new Set),pe(this,p,new Set),pe(this,h,null),pe(this,m,function(e){let t,n=0,r=So(0);return()=>{ci()&&(ni(r),pi(()=>(0===n&&(t=ii(()=>e(()=>Eo(r)))),n+=1,()=>{ur(()=>{n-=1,0===n&&(null==t||t(),t=void 0,Eo(r))})})))}}(()=>(he(this,h,So(fe(this,c))),()=>{he(this,h,null)}))),he(this,e,y),he(this,n,b),he(this,r,e=>{var t=jo;t.b=this,t.f|=128,w(e)}),this.parent=jo.b,this.transform_error=S??(null==(k=this.parent)?void 0:k.transform_error)??(e=>e),he(this,o,mi(()=>{me(this,g,v).call(this)},589824))}defer_effect(e){Rr(e,fe(this,f),fe(this,p))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!fe(this,n).pending}update_pending_count(e,t){me(this,g,w).call(this,e,t),he(this,c,fe(this,c)+e),fe(this,h)&&!fe(this,d)&&(he(this,d,!0),ur(()=>{he(this,d,!1),fe(this,h)&&To(fe(this,h),fe(this,c))}))}get_effect_pending(){return fe(this,m).call(this),ni(fe(this,h))}error(e){if(!fe(this,n).onerror&&!fe(this,n).failed)throw e;(null==Zr?void 0:Zr.is_fork)?(fe(this,i)&&Zr.skip_effect(fe(this,i)),fe(this,s)&&Zr.skip_effect(fe(this,s)),fe(this,a)&&Zr.skip_effect(fe(this,a)),Zr.oncommit(()=>{me(this,g,S).call(this,e)})):me(this,g,S).call(this,e)}}function Fr(e,t,n,r){const o=sr()?Br:Wr;var i=e.filter(e=>!e.settled),s=t.map(o);if(0!==n.length||0!==i.length){var a,l,c,u,d=jo,f=(a=jo,l=Io,c=tr,u=Zr,function(e=!0){$o(a),Mo(l),nr(c),e&&0===(a.f&Ln)&&(null==u||u.activate(),null==u||u.apply())}),p=1===i.length?i[0].promise:i.length>1?Promise.all(i.map(e=>e.promise)):null,h=zr();0!==n.length?p?p.then(()=>{f(),g(),Ur()}):g():p.then(()=>m([])).finally(h)}else r(s);function m(e){if(0===(d.f&Ln)){f();try{r([...s,...e])}catch(t){Tr(t,d)}Ur()}}function g(){Promise.all(n.map(e=>qr(e))).then(m).catch(e=>Tr(e,d)).finally(h)}}function Ur(e=!0){$o(null),Mo(null),nr(null),e&&(null==Zr||Zr.deactivate())}function zr(){var e=jo,t=e.b,n=Zr,r=!!(null==t?void 0:t.is_rendered());return null==t||t.update_pending_count(1,n),n.increment(r,e),()=>{null==t||t.update_pending_count(-1,n),n.decrement(r,e)}}function Br(e){null!==jo&&(jo.f|=In);return{ctx:tr,deps:null,effects:null,equals:Gn,f:2050,fn:e,reactions:null,rv:0,v:Qn,wv:0,parent:jo,ac:null}}e=new WeakMap,t=new WeakMap,n=new WeakMap,r=new WeakMap,o=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,l=new WeakMap,c=new WeakMap,u=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,h=new WeakMap,m=new WeakMap,g=new WeakSet,v=function(){try{if(this.is_pending=this.has_pending_snippet(),he(this,u,0),he(this,c,0),he(this,i,gi(()=>{fe(this,r).call(this,fe(this,e))})),fe(this,u)>0){var t=he(this,l,document.createDocumentFragment());Ei(fe(this,i),t);const r=fe(this,n).pending;he(this,s,gi(()=>r(fe(this,e))))}else me(this,g,y).call(this,Zr)}catch(o){this.error(o)}},y=function(e){this.is_pending=!1,e.transfer_effects(fe(this,f),fe(this,p))},b=function(e){var t=jo,n=Io,r=tr;$o(fe(this,o)),Mo(fe(this,o)),nr(fe(this,o).ctx);try{return co.ensure(),e()}catch(pc){return Or(pc),null}finally{$o(t),Mo(n),nr(r)}},w=function(t,n){var r;this.has_pending_snippet()?(he(this,u,fe(this,u)+t),0===fe(this,u)&&(me(this,g,y).call(this,n),fe(this,s)&&ki(fe(this,s),()=>{he(this,s,null)}),fe(this,l)&&(fe(this,e).before(fe(this,l)),he(this,l,null)))):this.parent&&me(r=this.parent,g,w).call(r,t,n)},S=function(t){fe(this,i)&&(bi(fe(this,i)),he(this,i,null)),fe(this,s)&&(bi(fe(this,s)),he(this,s,null)),fe(this,a)&&(bi(fe(this,a)),he(this,a,null));var r=fe(this,n).onerror;let l=fe(this,n).failed;var c=!1,u=!1;const d=()=>{c?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(c=!0,u&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),null!==fe(this,a)&&ki(fe(this,a),()=>{he(this,a,null)}),me(this,g,b).call(this,()=>{me(this,g,v).call(this)}))},f=t=>{try{u=!0,null==r||r(t,d),u=!1}catch(n){Tr(n,fe(this,o)&&fe(this,o).parent)}l&&he(this,a,me(this,g,b).call(this,()=>{try{return gi(()=>{var n=jo;n.b=this,n.f|=128,l(fe(this,e),()=>t,()=>d)})}catch(n){return Tr(n,fe(this,o).parent),null}}))};ur(()=>{var e;try{e=this.transform_error(t)}catch(pc){return void Tr(pc,fe(this,o)&&fe(this,o).parent)}null!==e&&"object"==typeof e&&"function"==typeof e.then?e.then(f,e=>Tr(e,fe(this,o)&&fe(this,o).parent)):f(e)})};const Hr=Symbol("obsolete");function qr(e,t,n){let r=jo;null===r&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var o=void 0,i=So(Qn),s=!Io,a=new Set;return function(e){li(4718592,e)}(()=>{var t,n,l=jo,c=wn();o=c.promise;try{Promise.resolve(e()).then(c.resolve,e=>{e!==Kn&&c.reject(e)}).finally(Ur)}catch(p){c.reject(p),Ur()}var u=Zr;if(s){if(0!==(l.f&Rn))var d=zr();if(null==(t=r.b)?void 0:t.is_rendered())null==(n=u.async_deriveds.get(l))||n.reject(Hr);else for(const e of a.values())e.reject(Hr);a.add(c),u.async_deriveds.set(l,c)}const f=(e,t=void 0)=>{null==d||d(),a.delete(c),t!==Hr&&(u.activate(),t?(i.f|=$n,To(i,t)):(0!==(i.f&$n)&&(i.f^=$n),To(i,e)),u.deactivate())};c.promise.then(f,e=>f(null,e||"unknown"))}),ui(()=>{for(const e of a)e.reject(Hr)}),new Promise(e=>{!function t(n){function r(){n===o?e(i):t(o)}n.then(r,r)}(o)})}function Vr(e){const t=Br(e);return Uo(t),t}function Wr(e){const t=Br(e);return t.equals=Jn,t}function Kr(e){var t,n=jo,r=e.parent;if(!No&&null!==r&&e.v!==Qn&&24576&r.f)return console.warn("https://svelte.dev/e/derived_inert"),e.v;$o(r);try{e.f&=-65537,function(e){var t=e.effects;if(null!==t){e.effects=null;for(var n=0;n<t.length;n+=1)bi(t[n])}}(e),t=Xo(e)}finally{$o(n)}return t}function Gr(e){var t=Kr(e);e.equals(t)||(e.wv=Go(),(null==Zr?void 0:Zr.is_fork)&&null!==e.deps||(null!==Zr?(Zr.capture(e,t,!0),null==Qr||Qr.capture(e,t,!0)):e.v=t,null!==e.deps))?No||(null!==eo?(ci()||(null==Zr?void 0:Zr.is_fork))&&eo.set(e,t):Ar(e)):Cr(e,Tn)}function Yr(e){if(null!==e.effects)for(const t of e.effects)t.teardown&&null!==t.fn&&ei(t)}let Jr=null,Xr=null,Zr=null,Qr=null,eo=null,to=null,no=!1,ro=!1,oo=null,io=null;var so=0;let ao=1;const lo=class e{constructor(){pe(this,j),ue(this,"id",ao++),pe(this,k,!1),ue(this,"linked",!0),pe(this,x,null),pe(this,O,null),ue(this,"async_deriveds",new Map),ue(this,"current",new Map),ue(this,"previous",new Map),pe(this,T,new Set),pe(this,E,new Set),pe(this,C,0),pe(this,A,new Map),pe(this,L,null),pe(this,R,[]),pe(this,_,[]),pe(this,N,new Set),pe(this,P,new Set),pe(this,I,new Map),pe(this,D,new Set),ue(this,"is_fork",!1),pe(this,M,!1),null===Xr?Jr=Xr=this:(he(Xr,O,this),he(this,x,Xr)),Xr=this}skip_effect(e){fe(this,I).has(e)||fe(this,I).set(e,{d:[],m:[]}),fe(this,D).delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=fe(this,I).get(e);if(n){for(var r of(fe(this,I).delete(e),n.d))Cr(r,En),t(r);for(r of n.m)Cr(r,Cn),t(r)}fe(this,D).add(e)}capture(e,t,n=!1){e.v===Qn||this.previous.has(e)||this.previous.set(e,e.v),0===(e.f&$n)&&(this.current.set(e,[t,n]),null==eo||eo.set(e,t)),this.is_fork||(e.v=t)}activate(){Zr=this}deactivate(){Zr=null,eo=null}flush(){try{rn,ro=!0,Zr=this,me(this,j,F).call(this)}finally{so=0,to=null,oo=null,io=null,ro=!1,Zr=null,eo=null,bo.clear()}}discard(){var e;for(const t of fe(this,E))t(this);fe(this,E).clear();for(const t of this.async_deriveds.values())t.reject(Hr);me(this,j,q).call(this),null==(e=fe(this,L))||e.resolve()}register_created_effect(e){fe(this,_).push(e)}increment(e,t){if(he(this,C,fe(this,C)+1),e){let e=fe(this,A).get(t)??0;fe(this,A).set(t,e+1)}}decrement(e,t){if(he(this,C,fe(this,C)-1),e){let e=fe(this,A).get(t)??0;1===e?fe(this,A).delete(t):fe(this,A).set(t,e-1)}fe(this,M)||(he(this,M,!0),ur(()=>{he(this,M,!1),this.linked&&this.flush()}))}transfer_effects(e,t){for(const n of e)fe(this,N).add(n);for(const n of t)fe(this,P).add(n);e.clear(),t.clear()}oncommit(e){fe(this,T).add(e)}ondiscard(e){fe(this,E).add(e)}settled(){return(fe(this,L)??he(this,L,wn())).promise}static ensure(){if(null===Zr){const t=Zr=new e;ro||no||ur(()=>{fe(t,k)||t.flush()})}return Zr}apply(){eo=null}schedule(e){var t;if(to=e,(null==(t=e.b)?void 0:t.is_pending)&&16777228&e.f&&0===(e.f&Rn))e.b.defer_effect(e);else{for(var n=e;null!==n.parent;){var r=(n=n.parent).f;if(!(null===oo||n!==jo||null!==Io&&2&Io.f))return;if(96&r){if(0===(r&Tn))return;n.f^=Tn}}fe(this,R).push(n)}}};k=new WeakMap,x=new WeakMap,O=new WeakMap,T=new WeakMap,E=new WeakMap,C=new WeakMap,A=new WeakMap,L=new WeakMap,R=new WeakMap,_=new WeakMap,N=new WeakMap,P=new WeakMap,I=new WeakMap,D=new WeakMap,M=new WeakMap,j=new WeakSet,$=function(){if(this.is_fork)return!0;for(const n of fe(this,A).keys()){for(var e=n,t=!1;null!==e.parent;){if(fe(this,I).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1},F=function(){var e,t,n,r;he(this,k,!0),so++>1e3&&(me(this,j,q).call(this),function(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(e){Tr(e,to)}}());for(const d of fe(this,N))fe(this,P).delete(d),Cr(d,En),this.schedule(d);for(const d of fe(this,P))Cr(d,Cn),this.schedule(d);const o=fe(this,R);he(this,R,[]),this.apply();var i=oo=[],s=[],a=io=[];for(const d of o)try{me(this,j,U).call(this,d,i,s)}catch(pc){throw vo(d),me(this,j,$).call(this)||this.discard(),pc}if(Zr=null,a.length>0){var l=lo.ensure();for(const e of a)l.schedule(e)}if(oo=null,io=null,me(this,j,$).call(this)){me(this,j,H).call(this,s),me(this,j,H).call(this,i);for(const[e,t]of fe(this,I))go(e,t);return void(a.length>0&&me(e=Zr,j,F).call(e))}const c=me(this,j,z).call(this);if(c)return me(this,j,H).call(this,s),me(this,j,H).call(this,i),void me(t=c,j,B).call(t,this);fe(this,N).clear(),fe(this,P).clear();for(const d of fe(this,T))d(this);fe(this,T).clear(),Qr=this,fo(s),fo(i),Qr=null,null==(n=fe(this,L))||n.resolve();var u=Zr;if(0!==fe(this,C)||0!==fe(this,R).length&&null===u||me(this,j,q).call(this),fe(this,R).length>0)if(null!==u){const e=u;fe(e,R).push(...fe(this,R).filter(t=>!fe(e,R).includes(t)))}else u=this;null!==u&&me(r=u,j,F).call(r)},U=function(e,t,n){e.f^=Tn;for(var r=e.first;null!==r;){var o=r.f,i=!!(96&o);if(!(i&&0!==(o&Tn)||0!==(o&An)||fe(this,I).has(r))&&null!==r.fn){i?r.f^=Tn:4&o?t.push(r):Yo(r)&&(0!==(o&Sn)&&fe(this,P).add(r),ei(r));var s=r.first;if(null!==s){r=s;continue}}for(;null!==r;){var a=r.next;if(null!==a){r=a;break}r=r.parent}}},z=function(){for(var e=fe(this,x);null!==e;){if(!e.is_fork)for(const[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e;e=fe(e,x)}return null},B=function(e){var t;for(const[r,o]of e.current)!this.previous.has(r)&&e.previous.has(r)&&this.previous.set(r,e.previous.get(r)),this.current.set(r,o);for(const[r,o]of e.async_deriveds){const e=this.async_deriveds.get(r);e&&o.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(fe(e,N),fe(e,P));const n=e=>{var t=e.reactions;if(null!==t)for(const i of t){var r=i.f;if(2&r)n(i);else{var o=i;4194320&r&&!this.async_deriveds.has(o)&&(fe(this,P).delete(o),Cr(o,En),this.schedule(o))}}};for(const r of this.current.keys())n(r);this.oncommit(()=>e.discard()),me(t=e,j,q).call(t),Zr=this,me(this,j,F).call(this)},H=function(e){for(var t=0;t<e.length;t+=1)Rr(e[t],fe(this,N),fe(this,P))},q=function(){if(this.linked){var e=fe(this,x),t=fe(this,O);null===e?Jr=t:he(e,O,t),null===t?Xr=e:he(t,x,e),this.linked=!1}};let co=lo;let uo=null;function fo(e){var t=e.length;if(0!==t){for(var n=0;n<t;){var r=e[n++];if(!(24576&r.f)&&Yo(r)&&(uo=new Set,ei(r),null===r.deps&&null===r.first&&null===r.nodes&&null===r.teardown&&null===r.ac&&Si(r),(null==uo?void 0:uo.size)>0)){bo.clear();for(const e of uo){if(24576&e.f)continue;const t=[e];let n=e.parent;for(;null!==n;)uo.has(n)&&(uo.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){const n=t[e];24576&n.f||ei(n)}}uo.clear()}}uo=null}}function po(e,t,n,r){if(!n.has(e)&&(n.add(e),null!==e.reactions))for(const o of e.reactions){const e=o.f;2&e?po(o,t,n,r):4194320&e&&0===(e&En)&&ho(o,t,r)&&(Cr(o,En),mo(o))}}function ho(e,t,n){const r=n.get(e);if(void 0!==r)return r;if(null!==e.deps)for(const o of e.deps){if(an.call(t,o))return!0;if(2&o.f&&ho(o,t,n))return n.set(o,!0),!0}return n.set(e,!1),!1}function mo(e){Zr.schedule(e)}function go(e,t){if(0===(e.f&kn)||0===(e.f&Tn)){0!==(e.f&En)?t.d.push(e):0!==(e.f&Cn)&&t.m.push(e),Cr(e,Tn);for(var n=e.first;null!==n;)go(n,t),n=n.next}}function vo(e){Cr(e,Tn);for(var t=e.first;null!==t;)vo(t),t=t.next}let yo=new Set;const bo=new Map;let wo=!1;function So(e,t){return{f:0,v:e,reactions:null,equals:Gn,rv:0,wv:0}}function ko(e,t){const n=So(e);return Uo(n),n}function xo(e,t=!1,n=!0){var r;const o=So(e);return t||(o.equals=Jn),Zn&&n&&null!==tr&&null!==tr.l&&((r=tr.l).s??(r.s=[])).push(o),o}function Oo(e,t,n=!1){return null===Io||Do&&0===(Io.f&Pn)||!sr()||!(4325394&Io.f)||null!==Fo&&Fo.has(e)||function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),To(e,n?fr(t):t,io)}function To(e,t,n=null){if(!e.equals(t)){bo.set(e,No?t:e.v);var r=co.ensure();if(r.capture(e,t),2&e.f){const t=e;0!==(e.f&En)&&Kr(t),null===eo&&Ar(t)}e.wv=Go(),Co(e,En,n),!sr()||null===jo||0===(jo.f&Tn)||96&jo.f||(null===Ho?function(e){Ho=e}([e]):Ho.push(e)),!r.is_fork&&yo.size>0&&!wo&&function(){wo=!1;for(const e of yo){let t;0!==(e.f&Tn)&&Cr(e,Cn);try{t=Yo(e)}catch{t=!0}t&&ei(e)}yo.clear()}()}return t}function Eo(e){Oo(e,e.v+1)}function Co(e,t,n){var r=e.reactions;if(null!==r)for(var o=sr(),i=r.length,s=0;s<i;s++){var a=r[s],l=a.f;if(o||a!==jo){var c=0===(l&En);if(c&&Cr(a,t),0!==(l&Pn))yo.add(a);else if(2&l){var u=a;null==eo||eo.delete(u),0===(l&Mn)&&(l&On&&(null===jo||0===(jo.f&jn))&&(a.f|=Mn),Co(u,Cn,n))}else if(c){var d=a;0!==(l&Sn)&&null!==uo&&uo.add(d),null!==n?n.push(d):mo(d)}}}}let Ao=!1;function Lo(e){var t=Io,n=jo;Mo(null),$o(null);try{return e()}finally{Mo(t),$o(n)}}function Ro(e,t,n,r=n){e.addEventListener(t,()=>Lo(n));const o=e[Wn];e[Wn]=o?()=>{o(),r(!0)}:()=>r(!0),Ao||(Ao=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const n of e.target.elements)null==(t=n[Wn])||t.call(n)})},{capture:!0}))}let _o=!1,No=!1;function Po(e){No=e}let Io=null,Do=!1;function Mo(e){Io=e}let jo=null;function $o(e){jo=e}let Fo=null;function Uo(e){null!==Io&&(Fo??(Fo=new Set)).add(e)}let zo=null,Bo=0,Ho=null;let qo=1,Vo=0,Wo=Vo;function Ko(e){Wo=e}function Go(){return++qo}function Yo(e){var t=e.f;if(0!==(t&En))return!0;if(2&t&&(e.f&=-65537),0!==(t&Cn)){for(var n=e.deps,r=n.length,o=0;o<r;o++){var i=n[o];if(Yo(i)&&Gr(i),i.wv>e.wv)return!0}0!==(t&On)&&null===eo&&Cr(e,Tn)}return!1}function Jo(e,t,n=!0){var r=e.reactions;if(null!==r&&(null===Fo||!Fo.has(e)))for(var o=0;o<r.length;o++){var i=r[o];2&i.f?Jo(i,t,!1):t===i&&(n?Cr(i,En):0!==(i.f&Tn)&&Cr(i,Cn),mo(i))}}function Xo(e){var t,n=zo,r=Bo,o=Ho,i=Io,s=Fo,a=tr,l=Do,c=Wo,u=e.f;zo=null,Bo=0,Ho=null,Io=96&u?null:e,Fo=null,nr(e.ctx),Do=!1,Wo=++Vo,null!==e.ac&&(Lo(()=>{e.ac.abort(Kn)}),e.ac=null);try{e.f|=jn;var d=(0,e.fn)();e.f|=Rn;var f=e.deps,p=null==Zr?void 0:Zr.is_fork;if(null!==zo){var h;if(p||Qo(e,Bo),null!==f&&Bo>0)for(f.length=Bo+zo.length,h=0;h<zo.length;h++)f[Bo+h]=zo[h];else e.deps=f=zo;if(ci()&&0!==(e.f&On))for(h=Bo;h<f.length;h++)((t=f[h]).reactions??(t.reactions=[])).push(e)}else!p&&null!==f&&Bo<f.length&&(Qo(e,Bo),f.length=Bo);if(sr()&&null!==Ho&&!Do&&null!==f&&!(6146&e.f))for(h=0;h<Ho.length;h++)Jo(Ho[h],e);if(null!==i&&i!==e){if(Vo++,null!==i.deps)for(let e=0;e<r;e+=1)i.deps[e].rv=Vo;if(null!==n)for(const e of n)e.rv=Vo;null!==Ho&&(null===o?o=Ho:o.push(...Ho))}return 0!==(e.f&$n)&&(e.f^=$n),d}catch(m){return Or(m)}finally{e.f^=jn,zo=n,Bo=r,Ho=o,Io=i,Fo=s,nr(a),Do=l,Wo=c}}function Zo(e,t){let n=t.reactions;if(null!==n){var r=sn.call(n,e);if(-1!==r){var o=n.length-1;0===o?n=t.reactions=null:(n[r]=n[o],n.pop())}}if(null===n&&2&t.f&&(null===zo||!an.call(zo,t))){var i=t;0!==(i.f&On)&&(i.f^=On,i.f&=-65537),i.v!==Qn&&Ar(i),function(e){var t,n;if(null!==e.effects)for(const r of e.effects)(r.teardown||r.ac)&&(null==(t=r.teardown)||t.call(r),null==(n=r.ac)||n.abort(Kn),null!==r.fn&&(r.teardown=vn),r.ac=null,Qo(r,0),yi(r))}(i),Qo(i,0)}}function Qo(e,t){var n=e.deps;if(null!==n)for(var r=t;r<n.length;r++)Zo(e,n[r])}function ei(e){var t=e.f;if(0===(t&Ln)){Cr(e,Tn);var n=jo,r=_o;jo=e,_o=!0;try{16777232&t?function(e){var t=e.first;for(;null!==t;){var n=t.next;0===(t.f&kn)&&bi(t),t=n}}(e):yi(e),vi(e);var o=Xo(e);e.teardown="function"==typeof o?o:null,e.wv=qo}finally{_o=r,jo=n}}}async function ti(){await Promise.resolve(),function(){var e=no;no=!0;try{for(;;){if(dr(),null===Zr)return;Zr.flush()}}finally{no=e}}()}function ni(e){var t=!!(2&e.f);if(null!==Io&&!Do&&!(null!==jo&&0!==(jo.f&Ln)||null!==Fo&&Fo.has(e))){var n=Io.deps;if(0!==(Io.f&jn))e.rv<Vo&&(e.rv=Vo,null===zo&&null!==n&&n[Bo]===e?Bo++:null===zo?zo=[e]:zo.push(e));else{Io.deps??(Io.deps=[]),an.call(Io.deps,e)||Io.deps.push(e);var r=e.reactions;null===r?e.reactions=[Io]:an.call(r,Io)||r.push(Io)}}if(No&&bo.has(e))return bo.get(e);if(t){var o=e;if(No){var i=o.v;return(0===(o.f&Tn)&&null!==o.reactions||oi(o))&&(i=Kr(o)),bo.set(o,i),i}var s=0===(o.f&On)&&!Do&&null!==Io&&(_o||0!==(Io.f&On)),a=0===(o.f&Rn);Yo(o)&&(s&&(o.f|=On),Gr(o)),s&&!a&&(Yr(o),ri(o))}if(null==eo?void 0:eo.has(e))return eo.get(e);if(0!==(e.f&$n))throw e.v;return e.v}function ri(e){if(e.f|=On,null!==e.deps)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),2&t.f&&0===(t.f&On)&&(Yr(t),ri(t))}function oi(e){if(e.v===Qn)return!0;if(null===e.deps)return!1;for(const t of e.deps){if(bo.has(t))return!0;if(2&t.f&&oi(t))return!0}return!1}function ii(e){var t=Do;try{return Do=!0,e()}finally{Do=t}}function si(e,t=new Set){if(!("object"!=typeof e||null===e||e instanceof EventTarget||t.has(e))){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{si(e[r],t)}catch(pc){}const n=hn(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const t=dn(n);for(let n in t){const r=t[n].get;if(r)try{r.call(e)}catch(pc){}}}}}function ai(e){null===jo&&(null===Io&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}()),No&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function li(e,t){var n=jo;null!==n&&0!==(n.f&An)&&(e|=An);var r={ctx:tr,deps:null,nodes:null,f:e|En|On,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};null==Zr||Zr.register_created_effect(r);var o=r;if(4&e)null!==oo?oo.push(r):co.ensure().schedule(r);else if(null!==t){try{ei(r)}catch(s){throw bi(r),s}null===o.deps&&null===o.teardown&&null===o.nodes&&o.first===o.last&&0===(o.f&In)&&(o=o.first,0!==(e&Sn)&&0!==(e&Nn)&&null!==o&&(o.f|=Nn))}if(null!==o&&(o.parent=n,null!==n&&function(e,t){var n=t.last;null===n?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}(o,n),null!==Io&&2&Io.f&&0===(e&xn))){var i=Io;(i.effects??(i.effects=[])).push(o)}return r}function ci(){return null!==Io&&!Do}function ui(e){const t=li(8,null);return Cr(t,Tn),t.teardown=e,t}function di(e){ai();var t=jo.f;if(!(!Io&&0!==(t&kn)&&null!==tr&&!tr.i))return fi(e);var n=tr;(n.e??(n.e=[])).push(e)}function fi(e){return li(1048580,e)}function pi(e,t=0){return li(8|t,e)}function hi(e,t=[],n=[],r=[]){Fr(r,t,n,t=>{li(8,()=>{e(...t.map(ni))})})}function mi(e,t=0){return li(Sn|t,e)}function gi(e){return li(524320,e)}function vi(e){var t=e.teardown;if(null!==t){const e=No,n=Io;Po(!0),Mo(null);try{t.call(null)}finally{Po(e),Mo(n)}}}function yi(e,t=!1){var n=e.first;for(e.first=e.last=null;null!==n;){const e=n.ac;null!==e&&Lo(()=>{e.abort(Kn)});var r=n.next;0!==(n.f&xn)?n.parent=null:bi(n,t),n=r}}function bi(e,t=!0){var n=!1;(t||262144&e.f)&&null!==e.nodes&&null!==e.nodes.end&&(wi(e.nodes.start,e.nodes.end),n=!0),e.f|=_n,yi(e,t&&!n),Qo(e,0);var r=e.nodes&&e.nodes.t;if(null!==r)for(const i of r)i.stop();vi(e),e.f^=_n,e.f|=Ln;var o=e.parent;null!==o&&null!==o.first&&Si(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function wi(e,t){for(;null!==e;){var n=e===t?null:br(e);e.remove(),e=n}}function Si(e){var t=e.parent,n=e.prev,r=e.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==t&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function ki(e,t,n=!0){var r=[];xi(e,r,!0);var o=()=>{n&&bi(e),t&&t()},i=r.length;if(i>0){var s=()=>--i||o();for(var a of r)a.out(s)}else o()}function xi(e,t,n){if(0===(e.f&An)){e.f^=An;var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)(e.is_global||n)&&t.push(e);for(var o=e.first;null!==o;){var i=o.next;if(0===(o.f&xn))xi(o,t,!!(0!==(o.f&Nn)||0!==(o.f&kn)&&0!==(e.f&Sn))&&n);o=i}}}function Oi(e){Ti(e,!0)}function Ti(e,t){if(0!==(e.f&An)){e.f^=An,0===(e.f&Tn)&&(Cr(e,En),co.ensure().schedule(e));for(var n=e.first;null!==n;){var r=n.next;Ti(n,!!(0!==(n.f&Nn)||0!==(n.f&kn))&&t),n=r}var o=e.nodes&&e.nodes.t;if(null!==o)for(const e of o)(e.is_global||t)&&e.in()}}function Ei(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;null!==n;){var o=n===r?null:br(n);t.append(n),n=o}}const Ci={commentTitle:"Leave A Comment",replyTitle:"Leave A Reply",rating:"Rating",name:"Name",namePlaceholder:"Name",nameRequired:"Name is required",nameLength:"Name must be 50 characters or less.",email:"Email",emailPlaceholder:"Email (will not be published)",emailRequired:"Email address is required",emailValid:"Email address is not valid.",comment:"Comment",commentPlaceholder:"Comment (keep it friendly)",commentRequired:"Comment is required.",commentLength:"Comment must be 2000 characters or less.",notifyReply:"Notify me when someone replies to this comment",submit:"Submit Comment",submitReply:"Submit",submitting:"Submitting...",cancel:"Cancel",captchaError:"Please pass the captcha to submit a comment.",captchaReplyError:"Please pass the captcha.",admin:"Admin",reply:"Reply",hide:"Hide",commentFormLabel:"Comment form",commentLabel:"Comment",replyCommentLabel:"Reply comment",replyTo:"Reply to {{name}}",showReplyForm:"Show reply form",hideReplyForm:"Hide reply form",totalComments_one:"1 Comment",totalComments_zero:"0 Comment",totalComments_other:"{{count}} Comments",noComments:"Be the first to share your thoughts.",loadMoreComments_one:"Load {{count}} more comment",loadMoreComments_other:"Load {{count}} more comments",commentsRemaining:"{{count}} remaining",viewReplies_one:"View {{count}} reply",viewReplies_other:"View {{count}} replies",viewMoreReplies:"View {{count}} more replies",hideReplies:"Hide replies",commentPosted:"Comment posted!",commentSubmitted:"Comment submitted!",commentPostedMessage:"Comment posted successfully!",commentSubmittedMessage:"Comment submitted successfully! It will appear after approval.",commentError:"Sorry, comment submission failed. Please try again later.",replySubmitted:"Reply submitted!",replySubmittedMessage:"Reply submitted successfully! It will appear after approval.",replyError:"Failed to post reply. Please try again."},Ai=new nn;Ai.addDetector({name:"shopify",lookup(){var e,t;if(window.Shopify){const n=null==(e=window.Shopify)?void 0:e.locale,r=null==(t=window.Shopify)?void 0:t.country;return n.includes("-")?n:`${n}-${r}`}return"en-US"}});const Li={loadPath:"/apps/comments/customer/locales/{{lng}}/{{ns}}.json",parse:function(e){return JSON.parse(e)},requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"},reloadInterval:!1};st.use(Mt).use(Ai).init({detection:{order:["shopify"]},backend:Li,fallbackLng:"en-US",debug:!1,defaultNS:"translation",resources:{"en-US":{translation:Ci}},partialBundledLanguages:!0,initImmediate:!1});const Ri={subscribe:Pr(st.t.bind(st),e=>{const t=()=>e(st.t.bind(st));return st.on("languageChanged",t),st.on("loaded",t),st.on("initialized",t),()=>{st.off("languageChanged",t),st.off("loaded",t),st.off("initialized",t)}}).subscribe};const _i=["touchstart","touchmove"];function Ni(e){return _i.includes(e)}const Pi=Symbol("events"),Ii=new Set,Di=new Set;function Mi(e,t,n,r,o){var i={capture:r,passive:o},s=function(e,t,n,r={}){function o(e){if(r.capture||Ui.call(t,e),!e.cancelBubble)return Lo(()=>null==n?void 0:n.call(this,e))}return e.startsWith("pointer")||e.startsWith("touch")||"wheel"===e?ur(()=>{t.addEventListener(e,o,r)}):t.addEventListener(e,o,r),o}(e,t,n,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ui(()=>{t.removeEventListener(e,s,i)})}function ji(e,t,n){(t[Pi]??(t[Pi]={}))[e]=n}function $i(e){for(var t=0;t<e.length;t++)Ii.add(e[t]);for(var n of Di)n(e)}let Fi=null;function Ui(e){var t,n,r=this,o=r.ownerDocument,i=e.type,s=(null==(t=e.composedPath)?void 0:t.call(e))||[],a=s[0]||e.target;Fi=e;var l=0,c=Fi===e&&e[Pi];if(c){var u=s.indexOf(c);if(-1!==u&&(r===document||r===window))return void(e[Pi]=r);var d=s.indexOf(r);if(-1===d)return;u<=d&&(l=u)}if((a=s[l]||e.target)!==r){cn(e,"currentTarget",{configurable:!0,get:()=>a||o});var f=Io,p=jo;Mo(null),$o(null);try{for(var h,m=[];null!==a&&a!==r;){try{var g=null==(n=a[Pi])?void 0:n[i];null==g||a.disabled&&e.target!==a||g.call(a,e)}catch(v){h?m.push(v):h=v}if(e.cancelBubble)break;l++,a=l<s.length?s[l]:null}if(h){for(let e of m)queueMicrotask(()=>{throw e});throw h}}finally{e[Pi]=r,delete e.currentTarget,Mo(f),$o(p)}}}const zi=(null==(V=null==globalThis?void 0:globalThis.window)?void 0:V.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Bi(e){var t=xr("template");return t.innerHTML=function(e){return(null==zi?void 0:zi.createHTML(e))??e}(e.replaceAll("<!>","\x3c!----\x3e")),t.content}function Hi(e,t){var n=jo;null===n.nodes&&(n.nodes={start:e,end:t,a:null,t:null})}function qi(e,t){var n,r=!!(1&t),o=!!(2&t),i=!e.startsWith("<!>");return()=>{void 0===n&&(n=Bi(i?e:"<!>"+e),r||(n=yr(n)));var t=o||hr?document.importNode(n,!0):n.cloneNode(!0);r?Hi(yr(t),t.lastChild):Hi(t,t);return t}}function Vi(e,t,n="svg"){var r,o=`<${n}>${!e.startsWith("<!>")?e:"<!>"+e}</${n}>`;return()=>{if(!r){var e=Bi(o);r=yr(yr(e))}var t=r.cloneNode(!0);return Hi(t,t),t}}function Wi(e,t){return Vi(e,0,"svg")}function Ki(e=""){var t=vr(e+"");return Hi(t,t),t}function Gi(){var e=document.createDocumentFragment(),t=document.createComment(""),n=vr();return e.append(t,n),Hi(t,n),e}function Yi(e,t){null!==e&&e.before(t)}function Ji(e,t){var n=null==t?"":"object"==typeof t?`${t}`:t;n!==(e[Vn]??(e[Vn]=e.nodeValue))&&(e[Vn]=n,e.nodeValue=`${n}`)}function Xi(e,t){return function(e,{target:t,anchor:n,props:r={},events:o,context:i,intro:s=!0,transformError:a}){!function(){if(void 0===pr){pr=window,hr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;mr=un(t,"firstChild").get,gr=un(t,"nextSibling").get,mn(e)&&(e[Hn]=void 0,e[Bn]=null,e[qn]=void 0,e.__e=void 0),mn(n)&&(n[Vn]=void 0)}}();var l=void 0,c=function(e){co.ensure();const t=li(524352,e);return(e={})=>new Promise(n=>{e.outro?ki(t,()=>{bi(t),n(void 0)}):(bi(t),n(void 0))})}(()=>{var s=n??t.appendChild(vr());!function(e,t,n,r){new $r(e,t,n,r)}(s,{pending:()=>{}},t=>{or({}),i&&(tr.c=i),o&&(r.$$events=o),l=e(t,r)||{},ir()},a);var c=new Set,u=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!c.has(r)){c.add(r);var o=Ni(r);for(const e of[t,document]){var i=Zi.get(e);void 0===i&&(i=new Map,Zi.set(e,i));var s=i.get(r);void 0===s?(e.addEventListener(r,Ui,{passive:o}),i.set(r,1)):i.set(r,s+1)}}}};return u(ln(Ii)),Di.add(u),()=>{var e;for(var r of c)for(const e of[t,document]){var o=Zi.get(e),i=o.get(r);0==--i?(e.removeEventListener(r,Ui),o.delete(r),0===o.size&&Zi.delete(e)):o.set(r,i)}Di.delete(u),s!==n&&(null==(e=s.parentNode)||e.removeChild(s))}});return Qi.set(l,c),l}(e,t)}const Zi=new Map;let Qi=new WeakMap;class es{constructor(e,t=!0){ue(this,"anchor"),pe(this,W,new Map),pe(this,K,new Map),pe(this,G,new Map),pe(this,Y,new Set),pe(this,J,!0),pe(this,X,e=>{if(fe(this,W).has(e)){var t=fe(this,W).get(e),n=fe(this,K).get(t);if(n)Oi(n),fe(this,Y).delete(t);else{var r=fe(this,G).get(t);r&&(Oi(r.effect),fe(this,K).set(t,r.effect),fe(this,G).delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[t,n]of fe(this,W)){if(fe(this,W).delete(t),t===e)break;const r=fe(this,G).get(n);r&&(bi(r.effect),fe(this,G).delete(n))}for(const[e,r]of fe(this,K)){if(e===t||fe(this,Y).has(e))continue;const o=()=>{if(Array.from(fe(this,W).values()).includes(e)){var t=document.createDocumentFragment();Ei(r,t),t.append(vr()),fe(this,G).set(e,{effect:r,fragment:t})}else bi(r);fe(this,Y).delete(e),fe(this,K).delete(e)};fe(this,J)||!n?(fe(this,Y).add(e),ki(r,o,!1)):o()}}}),pe(this,Z,e=>{fe(this,W).delete(e);const t=Array.from(fe(this,W).values());for(const[n,r]of fe(this,G))t.includes(n)||(bi(r.effect),fe(this,G).delete(n))}),this.anchor=e,he(this,J,t)}ensure(e,t){var n=Zr;!t||fe(this,K).has(e)||fe(this,G).has(e)||fe(this,K).set(e,gi(()=>t(this.anchor)));fe(this,W).set(n,e),fe(this,X).call(this,n)}}function ts(e,t,n=!1){var r=new es(e);function o(e,t){r.ensure(e,t)}mi(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},n?Nn:0)}function ns(e,t){return t}function rs(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const t of e.pending.values())for(const n of t)r.add(e.items.get(n).e)}for(var o=0;o<t.length;o++){var i=t[o];if(null==r?void 0:r.has(i)){i.f|=Dn;Ei(i,document.createDocumentFragment())}else bi(t[o],n)}}var os;function is(e,t,n,r,o,i=null){var s=e,a=new Map;!(4&t)||(s=e.appendChild(vr()));var l,c=null,u=Wr(()=>{var e=n();return on(e)?e:null==e?[]:ln(e)}),d=new Map,f=!0;function p(e){0===(m.effect.f&Ln)&&(m.pending.delete(e),m.fallback=c,function(e,t,n,r,o){var i,s,a,l,c,u,d,f,p,h,m,g,v,y,b=!!(8&r),w=t.length,S=e.items,k=ss(e.effect.first),x=null,O=[],T=[];if(b)for(y=0;y<w;y+=1)g=o(t[y],y),0===((v=S.get(g).e).f&Dn)&&(null==(s=null==(i=v.nodes)?void 0:i.a)||s.measure(),(m??(m=new Set)).add(v));for(y=0;y<w;y+=1){if(g=o(t[y],y),v=S.get(g).e,null!==e.outrogroups)for(const t of e.outrogroups)t.pending.delete(v),t.done.delete(v);if(0!==(v.f&An)&&(Oi(v),b&&(null==(l=null==(a=v.nodes)?void 0:a.a)||l.unfix(),(m??(m=new Set)).delete(v))),0!==(v.f&Dn)){if(v.f^=Dn,v!==k){var E=x?x.next:k;v===e.effect.last&&(e.effect.last=v.prev),v.prev&&(v.prev.next=v.next),v.next&&(v.next.prev=v.prev),cs(e,x,v),cs(e,v,E),ls(v,E,n),O=[],T=[],k=ss((x=v).next);continue}ls(v,null,n)}if(v!==k){if(void 0!==h&&h.has(v)){if(O.length<T.length){var C,A=T[0];x=A.prev;var L=O[0],R=O[O.length-1];for(C=0;C<O.length;C+=1)ls(O[C],A,n);for(C=0;C<T.length;C+=1)h.delete(T[C]);cs(e,L.prev,R.next),cs(e,x,L),cs(e,R,A),k=A,x=R,y-=1,O=[],T=[]}else h.delete(v),ls(v,k,n),cs(e,v.prev,v.next),cs(e,v,null===x?e.effect.first:x.next),cs(e,x,v),x=v;continue}for(O=[],T=[];null!==k&&k!==v;)(h??(h=new Set)).add(k),T.push(k),k=ss(k.next);if(null===k)continue}0===(v.f&Dn)&&O.push(v),x=v,k=ss(v.next)}if(null!==e.outrogroups){for(const t of e.outrogroups)0===t.pending.size&&(rs(e,ln(t.done)),null==(c=e.outrogroups)||c.delete(t));0===e.outrogroups.size&&(e.outrogroups=null)}if(null!==k||void 0!==h){var _=[];if(void 0!==h)for(v of h)0===(v.f&An)&&_.push(v);for(;null!==k;)0===(k.f&An)&&k!==e.fallback&&_.push(k),k=ss(k.next);var N=_.length;if(N>0){var P=4&r&&0===w?n:null;if(b){for(y=0;y<N;y+=1)null==(d=null==(u=_[y].nodes)?void 0:u.a)||d.measure();for(y=0;y<N;y+=1)null==(p=null==(f=_[y].nodes)?void 0:f.a)||p.fix()}!function(e,t,n){for(var r,o=t.length,i=t.length,s=0;s<o;s++){let n=t[s];ki(n,()=>{if(r){if(r.pending.delete(n),r.done.add(n),0===r.pending.size){var t=e.outrogroups;rs(e,ln(r.done)),t.delete(r),0===t.size&&(e.outrogroups=null)}}else i-=1},!1)}if(0===i){var a=null!==n;if(a){var l=n,c=l.parentNode;c.textContent="",c.append(l),e.items.clear()}rs(e,t,!a)}else r={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(r)}(e,_,P)}}b&&ur(()=>{var e,t;if(void 0!==m)for(v of m)null==(t=null==(e=v.nodes)?void 0:e.a)||t.apply()})}(m,l,s,t,r),null!==c&&(0===l.length?0===(c.f&Dn)?Oi(c):(c.f^=Dn,ls(c,null,s)):ki(c,()=>{c=null})))}var h=mi(()=>{for(var e=(l=ni(u)).length,h=new Set,m=Zr,g=0;g<e;g+=1){var v=l[g],y=r(v,g),b=f?null:a.get(y);b?(b.v&&To(b.v,v),b.i&&To(b.i,g)):(b=as(a,f?s:os??(os=vr()),v,y,g,o,t,n),f||(b.e.f|=Dn),a.set(y,b)),h.add(y)}0===e&&i&&!c&&(f?c=gi(()=>i(s)):(c=gi(()=>i(os??(os=vr())))).f|=Dn),e>h.size&&function(){throw new Error("https://svelte.dev/e/each_key_duplicate")}(),f||(d.set(m,h),p(m)),ni(u)}),m={effect:h,items:a,pending:d,outrogroups:null,fallback:c};f=!1}function ss(e){for(;null!==e&&0===(e.f&kn);)e=e.next;return e}function as(e,t,n,r,o,i,s,a){var l=1&s?16&s?So(n):xo(n,!1,!1):null,c=2&s?So(o):null;return{v:l,i:c,e:gi(()=>(i(t,l??n,c??o,a),()=>{e.delete(r)}))}}function ls(e,t,n){if(e.nodes)for(var r=e.nodes.start,o=e.nodes.end,i=t&&0===(t.f&Dn)?t.nodes.start:n;null!==r;){var s=br(r);if(i.before(r),r===o)return;r=s}}function cs(e,t,n){null===t?e.effect.first=n:t.next=n,null===n?e.effect.last=t:n.prev=t}function us(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=us(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ds(e){return"object"==typeof e?function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=us(e))&&(r&&(r+=" "),r+=t);return r}(e):e??""}function fs(e,t,n,r,o,i){var s=e[Hn];if(s!==n||void 0===s){var a=function(e){var t=null==e?"":""+e;return""===t?null:t}(n);null==a?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a),e[Hn]=n}return i}function ps(e,t,n,r){if(e[qn]!==t){var o=function(e){return null==e?null:String(e)}(t);null==o?e.removeAttribute("style"):e.style.cssText=o,e[qn]=t}return r}W=new WeakMap,K=new WeakMap,G=new WeakMap,Y=new WeakMap,J=new WeakMap,X=new WeakMap,Z=new WeakMap;const hs=Symbol("is custom element"),ms=Symbol("is html");function gs(e,t,n,r){var o=function(e){return e[Bn]??(e[Bn]={[hs]:e.nodeName.includes("-"),[ms]:e.namespaceURI===er})}(e);o[t]!==(o[t]=n)&&("loading"===t&&(e[zn]=n),null==n?e.removeAttribute(t):"string"!=typeof n&&function(e){var t,n=e.getAttribute("is")||e.nodeName,r=vs.get(n);if(r)return r;vs.set(n,r=[]);var o=e,i=Element.prototype;for(;i!==o;){for(var s in t=dn(o))t[s].set&&"innerHTML"!==s&&"textContent"!==s&&"innerText"!==s&&r.push(s);o=hn(o)}return r}(e).includes(t)?e[t]=n:e.setAttribute(t,n))}var vs=new Map;function ys(e,t,n=t){var r=new WeakSet;Ro(e,"input",async o=>{var i=o?e.defaultValue:e.value;if(i=bs(e)?ws(i):i,n(i),null!==Zr&&r.add(Zr),await ti(),i!==(i=t())){var s=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=i??"",null!==a){var c=e.value.length;s===a&&a===l&&c>l?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=s,e.selectionEnd=Math.min(a,c))}}}),null==ii(t)&&e.value&&(n(bs(e)?ws(e.value):e.value),null!==Zr&&r.add(Zr)),pi(()=>{var n=t();if(e===document.activeElement){var o=Zr;if(r.has(o))return}bs(e)&&n===ws(e.value)||("date"!==e.type||n||e.value)&&n!==e.value&&(e.value=n??"")})}function bs(e){var t=e.type;return"number"===t||"range"===t}function ws(e){return""===e?null:+e}function Ss(e,t){return e===t||(null==e?void 0:e[Fn])===t}function ks(e={},t,n,r){var o=tr.r,i=jo;return li(4,()=>{var s,a;return pi(()=>{s=a,a=(null==r?void 0:r())||[],ii(()=>{Ss(n(...a),e)||(t(e,...a),s&&Ss(n(...s),e)&&t(null,...s))})}),()=>{let r=i;for(;r!==o&&null!==r.parent&&r.parent.f&_n;)r=r.parent;const s=r.teardown;r.teardown=()=>{a&&Ss(n(...a),e)&&t(null,...a),null==s||s()}}}),e}function xs(e=!1){const t=tr,n=t.l.u;if(!n)return;let r=()=>function(e){if("object"==typeof e&&e&&!(e instanceof EventTarget))if(Fn in e)si(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];"object"==typeof n&&n&&Fn in n&&si(n)}}(t.s);if(e){let e=0,n={};const o=Br(()=>{let r=!1;const o=t.s;for(const e in o)o[e]!==n[e]&&(n[e]=o[e],r=!0);return r&&e++,e});r=()=>ni(o)}var o;n.b.length&&(o=()=>{Os(t,r),bn(n.b)},ai(),li(1048584,o)),di(()=>{const e=ii(()=>n.m.map(yn));return()=>{for(const t of e)"function"==typeof t&&t()}}),n.a.length&&di(()=>{Os(t,r),bn(n.a)})}function Os(e,t){if(e.l.s)for(const n of e.l.s)ni(n);t()}const Ts={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(gn(r)&&(r=r()),"object"==typeof r&&null!==r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let o=e.props[r];gn(o)&&(o=o());const i=un(o,t);if(i&&i.set)return i.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(gn(r)&&(r=r()),"object"==typeof r&&null!==r&&t in r){const e=un(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===Fn||t===Un)return!1;for(let n of e.props)if(gn(n)&&(n=n()),null!=n&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props)if(gn(n)&&(n=n()),n){for(const e in n)t.includes(e)||t.push(e);for(const e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function Es(...e){return new Proxy({props:e},Ts)}function Cs(e,t,n,r){var o,i=!Zn||!!(2&n),s=!!(8&n),a=!!(16&n),l=r,c=!0,u=void 0,d=()=>a&&i?(u??(u=Br(r)),ni(u)):(c&&(c=!1,l=a?ii(r):r),l);let f;if(s){var p=Fn in e||Un in e;f=(null==(o=un(e,t))?void 0:o.set)??(p&&t in e?n=>e[t]=n:void 0)}var h,m,g=!1;if(s?[h,g]=function(e){var t=Ir;try{return Ir=!1,[e(),Ir]}finally{Ir=t}}(()=>e[t]):h=e[t],void 0===h&&void 0!==r&&(h=d(),f&&(i&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),f(h))),m=i?()=>{var n=e[t];return void 0===n?d():(c=!0,n)}:()=>{var n=e[t];return void 0!==n&&(l=void 0),void 0===n?l:n},i&&!(4&n))return m;if(f){var v=e.$$legacy;return function(e,t){return arguments.length>0?(i&&t&&!v&&!g||f(t?m():e),e):m()}}var y=!1,b=(1&n?Br:Wr)(()=>(y=!1,m()));s&&ni(b);var w=jo;return function(e,t){if(arguments.length>0){const n=t?ni(b):i&&s?fr(e):e;return Oo(b,n),y=!0,void 0!==l&&(l=n),e}return No&&y||0!==(w.f&Ln)?b.v:ni(b)}}function As(e){var t,n;null===tr&&Xn(),Zn&&null!==tr.l?(t=tr,n=t.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(e):di(()=>{const t=ii(e);if("function"==typeof t)return t})}"undefined"!=typeof window&&((Q=window.__svelte??(window.__svelte={})).v??(Q.v=new Set)).add("5"),Zn=!0;const Ls="/apps/comments/customer/comments/",Rs=e=>{if(e.status>=402)throw new TypeError("An error occurred with status "+e.status);return e.ok?e.json():e.text().then(e=>{throw new Error(e)})},_s=(e,t)=>fetch(Ls+e,{method:"POST",headers:{"Content-Type":"application/json"},redirect:"follow",body:JSON.stringify(t)}).then(Rs),Ns={content:"",name:"",email:"",rating:0,notifyOnReply:!0,cfToken:null,honeypot:""},Ps={content:"",name:"",email:"",notifyOnReply:!0,cfToken:null,honeypot:""},Is={adminName:"Admin",adminAvatarUrl:null,disableRatings:!1,starColor:"#FFD700",cfEnabled:!1,cfTurnstileSecretKey:"",cfTurnstileSiteKey:"",commentApprovalRequired:!1,commentCooldown:0,ccEmail:"",email:""},Ds=[{id:"115",name:"Example Name",email:"test@betterblogcomments.com",content:"This is an example test comment and rating from a user. This test comment will only display while you are editing your Shopify theme.",rating:4,blogId:"85068021968",articleId:"557694255312",createdAt:"2023-10-16T12:39:19.935Z",updatedAt:"2023-10-16T12:39:19.935Z",replies:[{parentId:115,id:"116",name:"Patrick from Better Blog Comments",email:"reply@test.com",content:"This is how an example reply comment, either from another user or from the admin will display. This test comment will only display while you are editing your Shopify theme.",rating:0,blogId:"85068021968",articleId:"557694255312",createdAt:"2023-10-16T12:52:53.118Z",updatedAt:"2023-10-16T12:52:53.118Z",spam:!1,approvedAt:null,shopDomain:null}],spam:!1,approvedAt:null,shopDomain:null,articleHandle:"blog-comment-test",blogHandle:"news",articleTitle:"blog comment test"}],Ms=window.bb_blog_id,js=window.bb_article_id;class $s{constructor(){pe(this,ee,ko(!1)),pe(this,te,ko(0)),pe(this,ne,ko(null)),pe(this,re,ko(null)),pe(this,oe,ko(null)),pe(this,ie,ko(fr([]))),pe(this,se,ko(fr(new Set))),pe(this,ae,ko(null)),ue(this,"toggleReplyForm",e=>{this.commentIdInReply=this.commentIdInReply===e?0:e}),ue(this,"closeReplyForm",()=>{this.commentIdInReply=0}),ue(this,"onComment",async e=>{this.loading=!0,this.successState=null,this.submitError=null;try{await _s("create",{...e,blogId:Ms,articleId:js}),this.approvalRequired?this.onSuccessfulComment():this.onSuccessfulComment(e)}catch(t){this.submitError={title:st.t("commentErrorTitle",{defaultValue:"Couldn't post your comment"}),message:st.t("commentError",{defaultValue:"Sorry, comment submission failed. Please try again later."})}}this.loading=!1}),ue(this,"onReply",e=>async t=>{this.loading=!0,this.replyError=null;try{await _s("reply",{commentId:e,...t}),this.closeReplyForm(),this.replySuccess={commentId:e,type:"submitted",title:st.t("replySubmitted",{defaultValue:"Reply submitted!"}),message:st.t("replySubmittedMessage",{defaultValue:"Reply submitted successfully! It will appear after approval."})},setTimeout(()=>{this.replySuccess&&this.replySuccess.commentId===e&&(this.replySuccess=null)},5e3)}catch(n){this.replyError={commentId:e,title:st.t("replyErrorTitle",{defaultValue:"Couldn't post your reply"}),message:st.t("replyError",{defaultValue:"Failed to post reply. Please try again."})}}this.loading=!1});const e={...Is,...window.bb_settings??{}};this.approvalRequired=e.commentApprovalRequired;const t=window.bb_comments||[];if(this.comments=Array.isArray(t)?t:[],"undefined"!=typeof window){"true"===localStorage.getItem("bbCommentsScrollAfterReload")&&(localStorage.removeItem("bbCommentsScrollAfterReload"),setTimeout(()=>{const e=document.getElementById("bbcomments-container");e&&e.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},500))}}get loading(){return ni(fe(this,ee))}set loading(e){Oo(fe(this,ee),e,!0)}get commentIdInReply(){return ni(fe(this,te))}set commentIdInReply(e){Oo(fe(this,te),e,!0)}get replySuccess(){return ni(fe(this,ne))}set replySuccess(e){Oo(fe(this,ne),e,!0)}get submitError(){return ni(fe(this,re))}set submitError(e){Oo(fe(this,re),e,!0)}get replyError(){return ni(fe(this,oe))}set replyError(e){Oo(fe(this,oe),e,!0)}get comments(){return ni(fe(this,ie))}set comments(e){Oo(fe(this,ie),e,!0)}get newCommentIds(){return ni(fe(this,se))}set newCommentIds(e){Oo(fe(this,se),e,!0)}get successState(){return ni(fe(this,ae))}set successState(e){Oo(fe(this,ae),e,!0)}addCommentToList(e){const t=`temp_${Date.now()}`,n=e=>e?e.replace(/<[^>]*>/g,"").trim():"",r=n(e.name),o=n(e.content);if(!r||!o)return void console.warn("Comment has empty name or content after sanitization, not displaying");const i={id:t,name:r,email:n(e.email),content:o,rating:e.rating||0,blogId:Ms,articleId:js,createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),replies:[],spam:!1,approvedAt:(new Date).toISOString(),shopDomain:null};this.comments=[i,...this.comments],this.newCommentIds=new Set([...this.newCommentIds,t]),setTimeout(()=>{const e=new Set(this.newCommentIds);e.delete(t),this.newCommentIds=e},1e3)}onSuccessfulComment(e=null){!this.approvalRequired&&e?(this.addCommentToList(e),this.successState={type:"posted",message:st.t("commentPostedMessage",{defaultValue:"Comment posted successfully!"})}):this.successState={type:"submitted",message:st.t("commentSubmittedMessage",{defaultValue:"Comment submitted successfully! It will appear after approval."})},setTimeout(()=>{this.successState=null},5e3)}}ee=new WeakMap,te=new WeakMap,ne=new WeakMap,re=new WeakMap,oe=new WeakMap,ie=new WeakMap,se=new WeakMap,ae=new WeakMap;const Fs={name:{required:!0,maxLength:50},email:{required:!0,pattern:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,maxLength:254},content:{required:!0,maxLength:2e3}},Us={name:"name",email:"email",content:"comment"},zs=(e,t,n,r)=>{const o=Fs[e];if(!o)return null;const i=Us[e]||e,s=null==t?"":String(t).trim();if(o.required&&!s)return r(`${i}Required`,{defaultValue:`${n} is required`});if(o.pattern&&s&&!o.pattern.test(s)){return r(`${i}Valid`,{defaultValue:"email"===e?"Please enter a valid email address":`${n} is not valid`})}return o.maxLength&&s&&s.length>o.maxLength?r(`${i}Length`,{defaultValue:`${n} must be ${o.maxLength} characters or less`}):null};var Bs=qi('<span role="radio"><svg viewBox="0 0 24 24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg></span>'),Hs=qi('<div role="radiogroup" tabindex="-1"></div>');function qs(e,t){or(t,!0);let n=Cs(t,"rating",3,0),r=Cs(t,"color",3,"#000"),o=Cs(t,"size",3,24),i=ko(0),s=ko(0),a=Vr(()=>ni(i)||n()),l=Vr(()=>n()>0?n():1),c=[];const u=e=>{t.onRatingChange(e),Oo(s,e,!0),setTimeout(()=>Oo(s,0),220)},d=e=>{var t;const n=Math.min(5,Math.max(1,e));null==(t=c[n-1])||t.focus(),u(n)};var f=Hs();is(f,20,()=>[1,2,3,4,5],e=>e,(e,t)=>{const f=Vr(()=>t<=ni(a));var p=Bs(),h=wr(p);ks(p,(e,t)=>c[t-1]=e,e=>null==c?void 0:c[e-1],()=>[t]),hi(()=>{fs(p,1,`bbc-star${ni(f)?" is-active":""}${t===ni(i)?" is-lead":""}${t===ni(s)?" is-pulse":""}`),gs(p,"aria-checked",n()===t),gs(p,"aria-label",`${t} ${1===t?"star":"stars"}`),gs(p,"tabindex",t===ni(l)?0:-1),gs(h,"width",o()),gs(h,"height",o()),gs(h,"fill",ni(f)?r():"none"),gs(h,"stroke",r())}),ji("click",p,()=>u(t)),ji("keydown",p,e=>((e,t)=>{"Enter"===e.key||" "===e.key?(e.preventDefault(),u(t)):"ArrowRight"===e.key||"ArrowDown"===e.key?(e.preventDefault(),d(t+1)):"ArrowLeft"===e.key||"ArrowUp"===e.key?(e.preventDefault(),d(t-1)):"Home"===e.key?(e.preventDefault(),d(1)):"End"===e.key&&(e.preventDefault(),d(5))})(e,t)),Mi("mouseenter",p,()=>Oo(i,t,!0)),Yi(e,p)}),hi(()=>fs(f,1,"bbc-star-rating"+(ni(i)?" is-hovering":""))),Mi("mouseleave",f,()=>Oo(i,0)),Yi(e,f),ir()}$i(["click","keydown"]);var Vs=qi('<span class="bbc-label-error" role="alert"> </span>'),Ws=qi("<textarea></textarea>"),Ks=qi('<input type="email"/>'),Gs=qi('<input type="text"/>'),Ys=qi('<div><label class="bbc-label"><span class="bbc-label-text"> </span> <!></label> <!></div>');function Js(e,t){or(t,!0);let n=Cs(t,"type",3,"text"),r=Cs(t,"placeholder",3,""),o=Cs(t,"required",3,!1),i=Cs(t,"rows",3,void 0),s=Cs(t,"className",3,""),a=Cs(t,"error",3,null),l=Cs(t,"onblur",3,void 0),c=Cs(t,"value",15,""),u=Vr(()=>!!a()),d=Vr(()=>`bbc-input${ni(u)?" bbc-input--error":""} ${s()}`.trim());var f=Ys(),p=wr(f),h=wr(p),m=wr(h),g=kr(h,2),v=e=>{var t=Vs(),n=wr(t);hi(()=>Ji(n,a())),Yi(e,t)};ts(g,e=>{ni(u)&&e(v)});var y=kr(p,2),b=e=>{var n=Ws();hi(()=>{gs(n,"id",t.name),fs(n,1,ds(ni(d))),gs(n,"rows",i()),gs(n,"placeholder",r()),gs(n,"aria-required",o()),gs(n,"aria-invalid",ni(u)?"true":"false")}),Mi("blur",n,function(...e){var n;null==(n=l()?()=>l()(t.name):null)||n.apply(this,e)}),ys(n,c),Yi(e,n)},w=e=>{var n=Ks();hi(()=>{gs(n,"id",t.name),fs(n,1,ds(ni(d))),gs(n,"placeholder",r()),gs(n,"aria-required",o()),gs(n,"aria-invalid",ni(u)?"true":"false")}),Mi("blur",n,function(...e){var n;null==(n=l()?()=>l()(t.name):null)||n.apply(this,e)}),ys(n,c),Yi(e,n)},S=e=>{var n=Gs();hi(()=>{gs(n,"id",t.name),fs(n,1,ds(ni(d))),gs(n,"placeholder",r()),gs(n,"aria-required",o()),gs(n,"aria-invalid",ni(u)?"true":"false")}),Mi("blur",n,function(...e){var n;null==(n=l()?()=>l()(t.name):null)||n.apply(this,e)}),ys(n,c),Yi(e,n)};ts(y,e=>{"textarea"===n()?e(b):"email"===n()?e(w,1):e(S,-1)}),hi(()=>{fs(f,1,`bbc-form-field ${s()}`),gs(p,"for",t.name),Ji(m,`${t.label??""}\n ${o()?"*":""}`)}),Yi(e,f),ir()}var Xs=qi('<div class="bbc-loading-dots" aria-hidden="true"><span></span> <span></span> <span></span></div>');function Zs(e){Yi(e,Xs())}var Qs=qi('<div role="status" aria-live="polite"><div class="bbc-success-icon" aria-hidden="true"><svg viewBox="0 0 24 24" width="28" height="28" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" fill="none"><path d="M20 6 9 17l-5-5"></path></svg></div> <h3 class="bbc-success-title"> </h3> <p class="bbc-success-text"> </p></div>');function ea(e,t){or(t,!0);const n=()=>Mr(Ri,"$t",r),[r,o]=jr();let i=Cs(t,"title",3,null),s=Cs(t,"className",3,""),a=Vr(()=>i()??("posted"===t.type?n()("commentPosted",{defaultValue:"Comment posted!"}):n()("commentSubmitted",{defaultValue:"Comment submitted!"})));var l=Qs(),c=kr(wr(l),2),u=wr(c),d=wr(kr(c,2));hi(()=>{fs(l,1,"bbc-success-message"+(s()?` ${s()}`:"")),Ji(u,ni(a)),Ji(d,t.message)}),Yi(e,l),ir(),o()}var ta=qi('<p class="bbc-field-error"> </p>');function na(e,t){let n=Cs(t,"message",3,"");var r=Gi(),o=Sr(r),i=e=>{var t=ta(),r=wr(t);hi(()=>Ji(r,n())),Yi(e,t)};ts(o,e=>{n()&&e(i)}),Yi(e,r)}var ra=qi("<div></div>");function oa(e,t){or(t,!0);const n="https://challenge.cloudflare.com/turnstile/v0/api.js";let r,o;var i;As(async()=>{var e;try{await new Promise((e,t)=>{if(window.turnstile)return e();const r=document.querySelector(`script[src="${n}"]`);if(r)return r.addEventListener("load",()=>e()),void r.addEventListener("error",t);const o=document.createElement("script");o.src=n,o.async=!0,o.defer=!0,o.onload=()=>e(),o.onerror=t,document.head.appendChild(o)}),o=window.turnstile.render(r,{sitekey:t.sitekey,callback:e=>{var n;return null==(n=t.onVerify)?void 0:n.call(t,e)},"error-callback":()=>{var e;return null==(e=t.onError)?void 0:e.call(t)},"expired-callback":()=>{var e;return null==(e=t.onError)?void 0:e.call(t)}})}catch(i){null==(e=t.onError)||e.call(t)}}),i=()=>{try{void 0!==o&&window.turnstile&&window.turnstile.remove(o)}catch(e){}},null===tr&&Xn(),As(()=>()=>ii(i));var s=ra();ks(s,e=>r=e,()=>r),Yi(e,s),ir()}var ia=qi('<div class="bbc-form-field bbc-rating-field"><label id="rating-label" class="bbc-label"> </label> <div class="bbc-stars-container" role="group" aria-labelledby="rating-label"><!></div></div>'),sa=qi('<div class="bbc-turnstile"><!> <!></div>'),aa=qi('<form class="bbc-comment-form" novalidate=""><h2 class="bbc-form-title"> </h2> <!> <div class="bbc-form-row"><!> <!></div> <div class="bbc-honeypot" style="position: absolute; left: -9999px; height: 0; width: 0; opacity: 0;" aria-hidden="true"><label for="website">Website</label> <input type="text" id="website" name="website" tabindex="-1" autocomplete="off"/></div> <!> <div class="bbc-form-field bbc-checkbox-field"><label class="bbc-toggle-label"><input type="checkbox" class="bbc-toggle-input"/> <span class="bbc-toggle-track" aria-hidden="true"><span class="bbc-toggle-thumb"></span></span> <span class="bbc-toggle-text"> </span></label></div> <div class="bbc-form-actions"><button type="submit" class="bbc-submit-button"><!></button> <!></div></form>');function la(e,t){or(t,!0);const n=()=>Mr(Ri,"$t",r),[r,o]=jr(),i=window.bb_star_color||Is.starColor,s={...Is,...window.bb_settings??{}},a=window.bb_turnstile_enable||Is.cfEnabled,l=window.bb_turnstile_site_key||Is.cfTurnstileSiteKey,c=rr("bbc-store");let u=ko(fr({...Ns})),d=ko(fr({}));const f=e=>"content"===e?n()("comment"):n()(e),p=e=>{Oo(d,{...ni(d),[e]:zs(e,ni(u)[e],f(e),n())},!0)},h=()=>{ni(u).cfToken=null},m=e=>{if(e.preventDefault(),c.loading)return;const t={name:zs("name",ni(u).name,n()("name"),n()),email:zs("email",ni(u).email,n()("email"),n()),content:zs("content",ni(u).content,n()("comment"),n())};a&&l&&!ni(u).cfToken&&(t.cfToken=n()("captchaError")),Oo(d,t,!0),Object.values(t).some(Boolean)||c.onComment({...ni(u)}).finally(()=>{Oo(u,{...Ns},!0),Oo(d,{},!0)})};var g=Gi(),v=Sr(g),y=e=>{ea(e,{get type(){return c.successState.type},get message(){return c.successState.message},className:"bbc-comment-form"})},b=e=>{var t=aa(),r=wr(t),o=wr(r),f=kr(r,2),g=e=>{var t=ia(),r=wr(t),o=wr(r);qs(wr(kr(r,2)),{get rating(){return ni(u).rating},onRatingChange:e=>ni(u).rating=e,get color(){return i},size:24}),hi(e=>Ji(o,e),[()=>n()("rating")]),Yi(e,t)};ts(f,e=>{s.disableRatings||e(g)});var v=kr(f,2),y=wr(v);{let e=Vr(()=>n()("name")),t=Vr(()=>n()("namePlaceholder"));Js(y,{get label(){return ni(e)},name:"name",get error(){return ni(d).name},get placeholder(){return ni(t)},onblur:p,required:!0,get value(){return ni(u).name},set value(e){ni(u).name=e}})}var b=kr(y,2);{let e=Vr(()=>n()("email")),t=Vr(()=>n()("emailPlaceholder"));Js(b,{get label(){return ni(e)},name:"email",type:"email",get error(){return ni(d).email},get placeholder(){return ni(t)},onblur:p,required:!0,get value(){return ni(u).email},set value(e){ni(u).email=e}})}var w=kr(v,2),S=kr(wr(w),2),k=kr(w,2);{let e=Vr(()=>n()("comment")),t=Vr(()=>n()("commentPlaceholder"));Js(k,{get label(){return ni(e)},name:"content",type:"textarea",get error(){return ni(d).content},get placeholder(){return ni(t)},onblur:p,required:!0,rows:4,get value(){return ni(u).content},set value(e){ni(u).content=e}})}var x=kr(k,2),O=wr(x),T=wr(O),E=wr(kr(T,4)),C=wr(kr(x,2)),A=wr(C),L=e=>{Zs(e)},R=e=>{var t=Ki();hi(e=>Ji(t,e),[()=>n()("submit")]),Yi(e,t)};ts(A,e=>{c.loading?e(L):e(R,-1)});var _=kr(C,2),N=e=>{var t=sa(),n=wr(t);oa(n,{get sitekey(){return l},onVerify:e=>ni(u).cfToken=e,onError:h});var r=kr(n,2),o=e=>{na(e,{get message(){return ni(d).cfToken}})};ts(r,e=>{ni(d).cfToken&&e(o)}),Yi(e,t)};ts(_,e=>{a&&l&&e(N)}),hi((e,n,r,i,s)=>{gs(t,"aria-label",e),Ji(o,n),gs(T,"aria-label",r),Ji(E,i),gs(C,"aria-label",s),C.disabled=c.loading},[()=>n()("commentFormLabel"),()=>n()("commentTitle"),()=>n()("notifyReply"),()=>n()("notifyReply"),()=>c.loading?n()("submitting"):n()("submit")]),Mi("submit",t,m),ys(S,()=>ni(u).honeypot,e=>ni(u).honeypot=e),function(e,t,n=t){Ro(e,"change",t=>{var r=t?e.defaultChecked:e.checked;n(r)}),null==ii(t)&&n(e.checked),pi(()=>{var n=t();e.checked=Boolean(n)})}(T,()=>ni(u).notifyOnReply,e=>ni(u).notifyOnReply=e),Yi(e,t)};ts(v,e=>{c.successState?e(y):e(b,-1)}),Yi(e,g),ir(),o()}var ca=Wi('<svg viewBox="-4 -4 61.867 61.867" class="starIcon"><polygon points="26.934,1.318 35.256,18.182 53.867,20.887 40.4,34.013 43.579,52.549 26.934,43.798 10.288,52.549 13.467,34.013 0,20.887 18.611,18.182 "></polygon></svg>');var ua=Wi('<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: inline-block; vertical-align: middle; margin-left: 4px;" aria-label="Verified admin"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.55879 3.6972C10.7552 2.02216 13.2447 2.02216 14.4412 3.6972L14.6317 3.96387C14.8422 4.25867 15.1958 4.41652 15.5558 4.37652L16.4048 4.28218C18.3156 4.06988 19.9301 5.68439 19.7178 7.59513L19.6235 8.44415C19.5835 8.8042 19.7413 9.15774 20.0361 9.36831L20.3028 9.55879C21.9778 10.7552 21.9778 13.2447 20.3028 14.4412L20.0361 14.6317C19.7413 14.8422 19.5835 15.1958 19.6235 15.5558L19.7178 16.4048C19.9301 18.3156 18.3156 19.9301 16.4048 19.7178L15.5558 19.6235C15.1958 19.5835 14.8422 19.7413 14.6317 20.0361L14.4412 20.3028C13.2447 21.9778 10.7553 21.9778 9.55879 20.3028L9.36831 20.0361C9.15774 19.7413 8.8042 19.5835 8.44414 19.6235L7.59513 19.7178C5.68439 19.9301 4.06988 18.3156 4.28218 16.4048L4.37652 15.5558C4.41652 15.1958 4.25867 14.8422 3.96387 14.6317L3.6972 14.4412C2.02216 13.2447 2.02216 10.7553 3.6972 9.55879L3.96387 9.36831C4.25867 9.15774 4.41652 8.8042 4.37652 8.44414L4.28218 7.59513C4.06988 5.68439 5.68439 4.06988 7.59513 4.28218L8.44415 4.37652C8.8042 4.41652 9.15774 4.25867 9.36831 3.96387L9.55879 3.6972ZM15.7071 9.29289C16.0976 9.68342 16.0976 10.3166 15.7071 10.7071L11.8882 14.526C11.3977 15.0166 10.6023 15.0166 10.1118 14.526L8.29289 12.7071C7.90237 12.3166 7.90237 11.6834 8.29289 11.2929C8.68342 10.9024 9.31658 10.9024 9.70711 11.2929L11 12.5858L14.2929 9.29289C14.6834 8.90237 15.3166 8.90237 15.7071 9.29289Z"></path></svg>');var da=qi('<button type="button" class="bbc-cancel-button"> </button>'),fa=qi('<div class="bbc-turnstile"><!> <!></div>'),pa=qi('<form class="bbc-comment-form bbc-reply-form" novalidate=""><h3 class="bbc-form-title"> </h3> <div class="bbc-form-row"><!> <!></div> <div class="bbc-honeypot" style="position: absolute; left: -9999px; height: 0; width: 0; opacity: 0;" aria-hidden="true"><label for="reply-website">Website</label> <input type="text" id="reply-website" name="website" tabindex="-1" autocomplete="off"/></div> <!> <div class="bbc-form-actions"><div class="bbc-form-buttons"><button type="submit" class="bbc-submit-button"><!></button> <!></div> <!></div></form>');
/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
function ha(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ma(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ha(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ha(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}$i(["click"]);const ga=Object.entries,va=Object.setPrototypeOf,ya=Object.isFrozen,ba=Object.getPrototypeOf,wa=Object.getOwnPropertyDescriptor;let Sa=Object.freeze,ka=Object.seal,xa=Object.create,Oa="undefined"!=typeof Reflect&&Reflect,Ta=Oa.apply,Ea=Oa.construct;Sa||(Sa=function(e){return e}),ka||(ka=function(e){return e}),Ta||(Ta=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e.apply(t,r)}),Ea||(Ea=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const Ca=Ga(Array.prototype.forEach),Aa=Ga(Array.prototype.lastIndexOf),La=Ga(Array.prototype.pop),Ra=Ga(Array.prototype.push),_a=Ga(Array.prototype.splice),Na=Array.isArray,Pa=Ga(String.prototype.toLowerCase),Ia=Ga(String.prototype.toString),Da=Ga(String.prototype.match),Ma=Ga(String.prototype.replace),ja=Ga(String.prototype.indexOf),$a=Ga(String.prototype.trim),Fa=Ga(Number.prototype.toString),Ua=Ga(Boolean.prototype.toString),za="undefined"==typeof BigInt?null:Ga(BigInt.prototype.toString),Ba="undefined"==typeof Symbol?null:Ga(Symbol.prototype.toString),Ha=Ga(Object.prototype.hasOwnProperty),qa=Ga(Object.prototype.toString),Va=Ga(RegExp.prototype.test),Wa=(Ka=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ea(Ka,t)});var Ka;function Ga(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Ta(e,t,r)}}function Ya(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Pa;if(va&&va(e,null),!Na(t))return e;let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(ya(t)||(t[r]=e),o=e)}e[o]=!0}return e}function Ja(e){for(let t=0;t<e.length;t++){Ha(e,t)||(e[t]=null)}return e}function Xa(e){const t=xa(null);for(const r of ga(e)){var n=ma(r,2);const o=n[0],i=n[1];Ha(e,o)&&(Na(i)?t[o]=Ja(i):i&&"object"==typeof i&&i.constructor===Object?t[o]=Xa(i):t[o]=i)}return t}function Za(e,t){for(;null!==e;){const n=wa(e,t);if(n){if(n.get)return Ga(n.get);if("function"==typeof n.value)return Ga(n.value)}e=ba(e)}return function(){return null}}const Qa=Sa(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),el=Sa(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tl=Sa(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),nl=Sa(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),rl=Sa(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ol=Sa(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),il=Sa(["#text"]),sl=Sa(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),al=Sa(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ll=Sa(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),cl=Sa(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ul=ka(/{{[\w\W]*|^[\w\W]*}}/g),dl=ka(/<%[\w\W]*|^[\w\W]*%>/g),fl=ka(/\${[\w\W]*/g),pl=ka(/^data-[\-\w.\u00B7-\uFFFF]+$/),hl=ka(/^aria-[\-\w]+$/),ml=ka(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),gl=ka(/^(?:\w+script|data):/i),vl=ka(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yl=ka(/^html$/i),bl=ka(/^[a-z][.\w]*(-[.\w]+)+$/i),wl=ka(/<[/\w!]/g),Sl=ka(/<[/\w]/g),kl=ka(/<\/no(script|embed|frames)/i),xl=ka(/\/>/i),Ol=1,Tl=3,El=7,Cl=8,Al=9,Ll=11,Rl=function(e,t,n,r){return Ha(e,t)&&Na(e[t])?Ya(r.base?Xa(r.base):{},e[t],r.transform):n};var _l=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window;const n=t=>e(t);if(n.version="3.4.11",n.removed=[],!t||!t.document||t.document.nodeType!==Al||!t.Element)return n.isSupported=!1,n;let r=t.document;const o=r,i=o.currentScript;t.DocumentFragment;const s=t.HTMLTemplateElement,a=t.Node,l=t.Element,c=t.NodeFilter,u=t.NamedNodeMap;void 0===u&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const d=t.DOMParser,f=t.trustedTypes,p=l.prototype,h=Za(p,"cloneNode"),m=Za(p,"remove"),g=Za(p,"nextSibling"),v=Za(p,"childNodes"),y=Za(p,"parentNode"),b=Za(p,"shadowRoot"),w=Za(p,"attributes"),S=a&&a.prototype?Za(a.prototype,"nodeType"):null,k=a&&a.prototype?Za(a.prototype,"nodeName"):null;if("function"==typeof s){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let x,O,T="",E=!1,C=0;const A=function(){if(C>0)throw Wa('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},L=function(e){A(),C++;try{return x.createHTML(e)}finally{C--}},R=function(){return E||(O=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(i){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(f,i),E=!0),O},_=r,N=_.implementation,P=_.createNodeIterator,I=_.createDocumentFragment,D=_.getElementsByTagName,M=o.importNode;let j={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof ga&&"function"==typeof y&&N&&void 0!==N.createHTMLDocument;const $=ul,F=dl,U=fl,z=pl,B=hl,H=gl,q=vl,V=bl;let W=ml,K=null;const G=Ya({},[...Qa,...el,...tl,...rl,...il]);let Y=null;const J=Ya({},[...sl,...al,...ll,...cl]);let X=Object.seal(xa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Z=null,Q=null;const ee=Object.seal(xa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let te=!0,ne=!0,re=!1,oe=!0,ie=!1,se=!0,ae=!1,le=!1,ce=null,ue=null,de=!1,fe=!1,pe=!1,he=!1,me=!0,ge=!1;const ve="user-content-";let ye=!0,be=!1,we={},Se=null;const ke=Ya({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let xe=null;const Oe=Ya({},["audio","video","img","source","image","track"]);let Te=null;const Ee=Ya({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ce="http://www.w3.org/1998/Math/MathML",Ae="http://www.w3.org/2000/svg",Le="http://www.w3.org/1999/xhtml";let Re=Le,_e=!1,Ne=null;const Pe=Ya({},[Ce,Ae,Le],Ia),Ie=Sa(["mi","mo","mn","ms","mtext"]);let De=Ya({},Ie);const Me=Sa(["annotation-xml"]);let je=Ya({},Me);const $e=Ya({},["title","style","font","a","script"]);let Fe=null;const Ue=["application/xhtml+xml","text/html"];let ze=null,Be=null;const He=r.createElement("form"),qe=function(e){return e instanceof RegExp||e instanceof Function},Ve=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Be&&Be===e)return;e&&"object"==typeof e||(e={}),e=Xa(e),Fe=-1===Ue.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ze="application/xhtml+xml"===Fe?Ia:Pa,K=Rl(e,"ALLOWED_TAGS",G,{transform:ze}),Y=Rl(e,"ALLOWED_ATTR",J,{transform:ze}),Ne=Rl(e,"ALLOWED_NAMESPACES",Pe,{transform:Ia}),Te=Rl(e,"ADD_URI_SAFE_ATTR",Ee,{transform:ze,base:Ee}),xe=Rl(e,"ADD_DATA_URI_TAGS",Oe,{transform:ze,base:Oe}),Se=Rl(e,"FORBID_CONTENTS",ke,{transform:ze}),Z=Rl(e,"FORBID_TAGS",Xa({}),{transform:ze}),Q=Rl(e,"FORBID_ATTR",Xa({}),{transform:ze}),we=!!Ha(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?Xa(e.USE_PROFILES):e.USE_PROFILES),te=!1!==e.ALLOW_ARIA_ATTR,ne=!1!==e.ALLOW_DATA_ATTR,re=e.ALLOW_UNKNOWN_PROTOCOLS||!1,oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,ie=e.SAFE_FOR_TEMPLATES||!1,se=!1!==e.SAFE_FOR_XML,ae=e.WHOLE_DOCUMENT||!1,fe=e.RETURN_DOM||!1,pe=e.RETURN_DOM_FRAGMENT||!1,he=e.RETURN_TRUSTED_TYPE||!1,de=e.FORCE_BODY||!1,me=!1!==e.SANITIZE_DOM,ge=e.SANITIZE_NAMED_PROPS||!1,ye=!1!==e.KEEP_CONTENT,be=e.IN_PLACE||!1,W=function(e){try{return Va(e,""),!0}catch(t){return!1}}(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ml,Re="string"==typeof e.NAMESPACE?e.NAMESPACE:Le,De=Ha(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof e.MATHML_TEXT_INTEGRATION_POINTS?Xa(e.MATHML_TEXT_INTEGRATION_POINTS):Ya({},Ie),je=Ha(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&"object"==typeof e.HTML_INTEGRATION_POINTS?Xa(e.HTML_INTEGRATION_POINTS):Ya({},Me);const t=Ha(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&"object"==typeof e.CUSTOM_ELEMENT_HANDLING?Xa(e.CUSTOM_ELEMENT_HANDLING):xa(null);if(X=xa(null),Ha(t,"tagNameCheck")&&qe(t.tagNameCheck)&&(X.tagNameCheck=t.tagNameCheck),Ha(t,"attributeNameCheck")&&qe(t.attributeNameCheck)&&(X.attributeNameCheck=t.attributeNameCheck),Ha(t,"allowCustomizedBuiltInElements")&&"boolean"==typeof t.allowCustomizedBuiltInElements&&(X.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),ka(X),ie&&(ne=!1),pe&&(fe=!0),we&&(K=Ya({},il),Y=xa(null),!0===we.html&&(Ya(K,Qa),Ya(Y,sl)),!0===we.svg&&(Ya(K,el),Ya(Y,al),Ya(Y,cl)),!0===we.svgFilters&&(Ya(K,tl),Ya(Y,al),Ya(Y,cl)),!0===we.mathMl&&(Ya(K,rl),Ya(Y,ll),Ya(Y,cl))),ee.tagCheck=null,ee.attributeCheck=null,Ha(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?ee.tagCheck=e.ADD_TAGS:Na(e.ADD_TAGS)&&(K===G&&(K=Xa(K)),Ya(K,e.ADD_TAGS,ze))),Ha(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?ee.attributeCheck=e.ADD_ATTR:Na(e.ADD_ATTR)&&(Y===J&&(Y=Xa(Y)),Ya(Y,e.ADD_ATTR,ze))),Ha(e,"ADD_URI_SAFE_ATTR")&&Na(e.ADD_URI_SAFE_ATTR)&&Ya(Te,e.ADD_URI_SAFE_ATTR,ze),Ha(e,"FORBID_CONTENTS")&&Na(e.FORBID_CONTENTS)&&(Se===ke&&(Se=Xa(Se)),Ya(Se,e.FORBID_CONTENTS,ze)),Ha(e,"ADD_FORBID_CONTENTS")&&Na(e.ADD_FORBID_CONTENTS)&&(Se===ke&&(Se=Xa(Se)),Ya(Se,e.ADD_FORBID_CONTENTS,ze)),ye&&(K["#text"]=!0),ae&&Ya(K,["html","head","body"]),K.table&&(Ya(K,["tbody"]),delete Z.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Wa('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Wa('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const t=x;x=e.TRUSTED_TYPES_POLICY;try{T=L("")}catch(n){throw x=t,n}}else null===e.TRUSTED_TYPES_POLICY?(x=void 0,T=""):(void 0===x&&(x=R()),x&&"string"==typeof T&&(T=L("")));Sa&&Sa(e),Be=e},We=Ya({},[...el,...tl,...nl]),Ke=Ya({},[...rl,...ol]),Ge=function(e){let t=y(e);t&&t.tagName||(t={namespaceURI:Re,tagName:"template"});const n=Pa(e.tagName),r=Pa(t.tagName);return!!Ne[e.namespaceURI]&&(e.namespaceURI===Ae?function(e,t,n){return t.namespaceURI===Le?"svg"===e:t.namespaceURI===Ce?"svg"===e&&("annotation-xml"===n||De[n]):Boolean(We[e])}(n,t,r):e.namespaceURI===Ce?function(e,t,n){return t.namespaceURI===Le?"math"===e:t.namespaceURI===Ae?"math"===e&&je[n]:Boolean(Ke[e])}(n,t,r):e.namespaceURI===Le?function(e,t,n){return!(t.namespaceURI===Ae&&!je[n])&&!(t.namespaceURI===Ce&&!De[n])&&!Ke[e]&&($e[e]||!We[e])}(n,t,r):!("application/xhtml+xml"!==Fe||!Ne[e.namespaceURI]))},Ye=function(e){Ra(n.removed,{element:e});try{y(e).removeChild(e)}catch(t){if(m(e),!y(e))throw Wa("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Je=function(e){const t=v(e);if(t){const e=[];Ca(t,t=>{Ra(e,t)}),Ca(e,e=>{try{m(e)}catch(t){}})}const n=w(e);if(n)for(let o=n.length-1;o>=0;--o){const t=n[o],i=t&&t.name;if("string"==typeof i)try{e.removeAttribute(i)}catch(r){}}},Xe=function(e,t){try{Ra(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(r){Ra(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(fe||pe)try{Ye(t)}catch(r){}else try{t.setAttribute(e,"")}catch(r){}},Ze=function(e){const t=w(e);if(t)for(let r=t.length-1;r>=0;--r){const o=t[r],i=o&&o.name;if("string"==typeof i&&!Y[ze(i)])try{e.removeAttribute(i)}catch(n){}}},Qe=function(e){let t=null,n=null;if(de)e="<remove></remove>"+e;else{const t=Da(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Fe&&Re===Le&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=x?L(e):e;if(Re===Le)try{t=(new d).parseFromString(o,Fe)}catch(s){}if(!t||!t.documentElement){t=N.createDocument(Re,"template",null);try{t.documentElement.innerHTML=_e?T:o}catch(s){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),Re===Le?D.call(t,ae?"html":"body")[0]:ae?t.documentElement:i},et=function(e){return P.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},tt=function(e){return e=Ma(e,$," "),e=Ma(e,F," "),e=Ma(e,U," ")},nt=function(e){var t;e.normalize();const n=P.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let r=n.nextNode();for(;r;)r.data=tt(r.data),r=n.nextNode();const o=null===(t=e.querySelectorAll)||void 0===t?void 0:t.call(e,"template");o&&Ca(o,e=>{ot(e.content)&&nt(e.content)})},rt=function(e){const t=k?k(e):null;return"string"==typeof t&&("form"===ze(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==w(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==S(e)||e.childNodes!==v(e)))},ot=function(e){if(!S||"object"!=typeof e||null===e)return!1;try{return S(e)===Ll}catch(t){return!1}},it=function(e){if(!S||"object"!=typeof e||null===e)return!1;try{return"number"==typeof S(e)}catch(t){return!1}};function st(e,t,r){0!==e.length&&Ca(e,e=>{e.call(n,t,r,Be)})}const at=function(e){if(st(j.beforeSanitizeElements,e,null),rt(e))return Ye(e),!0;const t=ze(k?k(e):e.nodeName);if(st(j.uponSanitizeElement,e,{tagName:t,allowedTags:K}),function(e,t){return!!(se&&e.hasChildNodes()&&!it(e.firstElementChild)&&Va(wl,e.textContent)&&Va(wl,e.innerHTML))||!(!se||e.namespaceURI!==Le||"style"!==t||!it(e.firstElementChild))||e.nodeType===El||!(!se||e.nodeType!==Cl||!Va(Sl,e.data))}(e,t))return Ye(e),!0;if(Z[t]||!(ee.tagCheck instanceof Function&&ee.tagCheck(t))&&!K[t])return function(e,t){if(!Z[t]&&ut(t)){if(X.tagNameCheck instanceof RegExp&&Va(X.tagNameCheck,t))return!1;if(X.tagNameCheck instanceof Function&&X.tagNameCheck(t))return!1}if(ye&&!Se[t]){const t=y(e),n=v(e);if(n&&t)for(let r=n.length-1;r>=0;--r){const o=be?n[r]:h(n[r],!0);t.insertBefore(o,g(e))}}return Ye(e),!0}(e,t);if((S?S(e):e.nodeType)===Ol&&!Ge(e))return Ye(e),!0;if(("noscript"===t||"noembed"===t||"noframes"===t)&&Va(kl,e.innerHTML))return Ye(e),!0;if(ie&&e.nodeType===Tl){const t=tt(e.textContent);e.textContent!==t&&(Ra(n.removed,{element:e.cloneNode()}),e.textContent=t)}return st(j.afterSanitizeElements,e,null),!1},lt=function(e,t,n){if(Q[t])return!1;if(me&&("id"===t||"name"===t)&&(n in r||n in He))return!1;const o=Y[t]||ee.attributeCheck instanceof Function&&ee.attributeCheck(t,e);if(ne&&Va(z,t));else if(te&&Va(B,t));else if(o)if(Te[t]);else if(Va(W,Ma(n,q,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ja(n,"data:")||!xe[e]){if(re&&!Va(H,Ma(n,q,"")));else if(n)return!1}else;else if(!(ut(e)&&(X.tagNameCheck instanceof RegExp&&Va(X.tagNameCheck,e)||X.tagNameCheck instanceof Function&&X.tagNameCheck(e))&&(X.attributeNameCheck instanceof RegExp&&Va(X.attributeNameCheck,t)||X.attributeNameCheck instanceof Function&&X.attributeNameCheck(t,e))||"is"===t&&X.allowCustomizedBuiltInElements&&(X.tagNameCheck instanceof RegExp&&Va(X.tagNameCheck,n)||X.tagNameCheck instanceof Function&&X.tagNameCheck(n))))return!1;return!0},ct=Ya({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ut=function(e){return!ct[Pa(e)]&&Va(V,e)},dt=function(e,t,n,r){if(x&&"object"==typeof f&&"function"==typeof f.getAttributeType&&!n)switch(f.getAttributeType(e,t)){case"TrustedHTML":return L(r);case"TrustedScriptURL":return function(e){A(),C++;try{return x.createScriptURL(e)}finally{C--}}(r)}return r},ft=function(e,t,r,o){try{r?e.setAttributeNS(r,t,o):e.setAttribute(t,o),rt(e)?Ye(e):La(n.removed)}catch(i){Xe(t,e)}},pt=function(e){st(j.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||rt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y,forceKeepAttr:void 0};let r=t.length;const o=ze(e.nodeName);for(;r--;){const i=t[r],s=i.name,a=i.namespaceURI,l=i.value,c=ze(s),u=l;let d="value"===s?u:$a(u);n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,st(j.uponSanitizeAttribute,e,n),d=n.attrValue,!ge||"id"!==c&&"name"!==c||0===ja(d,ve)||(Xe(s,e),d=ve+d),se&&Va(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)?Xe(s,e):"attributename"===c&&Da(d,"href")?Xe(s,e):n.forceKeepAttr||(n.keepAttr&&(oe||!Va(xl,d))?(ie&&(d=tt(d)),lt(o,c,d)?(d=dt(o,c,a,d),d!==u&&ft(e,s,a,d)):Xe(s,e)):Xe(s,e))}st(j.afterSanitizeAttributes,e,null)},ht=function(e){let t=null;const n=et(e);for(st(j.beforeSanitizeShadowDOM,e,null);t=n.nextNode();){st(j.uponSanitizeShadowNode,t,null),at(t),pt(t),ot(t.content)&&ht(t.content);if((S?S(t):t.nodeType)===Ol){const e=b(t);ot(e)&&(mt(e),ht(e))}}st(j.afterSanitizeShadowDOM,e,null)},mt=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const e=t.pop();if(e.shadow){ht(e.shadow);continue}const n=e.node,r=(S?S(n):n.nodeType)===Ol,o=v(n);if(o)for(let i=o.length-1;i>=0;--i)t.push({node:o[i],shadow:null});if(r){const e=k?k(n):null;if("string"==typeof e&&"template"===ze(e)){const e=n.content;ot(e)&&t.push({node:e,shadow:null})}}if(r){const e=b(n);ot(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,s=null,a=null;if(_e=!e,_e&&(e="\x3c!--\x3e"),"string"!=typeof e&&!it(e)&&(e=function(e){switch(typeof e){case"string":return e;case"number":return Fa(e);case"boolean":return Ua(e);case"bigint":return za?za(e):"0";case"symbol":return Ba?Ba(e):"Symbol()";case"undefined":default:return qa(e);case"function":case"object":{if(null===e)return qa(e);const t=e,n=Za(t,"toString");if("function"==typeof n){const e=n(t);return"string"==typeof e?e:qa(e)}return qa(e)}}}(e),"string"!=typeof e))throw Wa("dirty is not a string, aborting");if(!n.isSupported)return e;le?(K=ce,Y=ue):Ve(t),(j.uponSanitizeElement.length>0||j.uponSanitizeAttribute.length>0)&&(K=Xa(K)),j.uponSanitizeAttribute.length>0&&(Y=Xa(Y)),n.removed=[];const l=be&&"string"!=typeof e&&it(e);if(l){const t=k?k(e):e.nodeName;if("string"==typeof t){const e=ze(t);if(!K[e]||Z[e])throw Wa("root node is forbidden and cannot be sanitized in-place")}if(rt(e))throw Wa("root node is clobbered and cannot be sanitized in-place");try{mt(e)}catch(d){throw Je(e),d}}else if(it(e))r=Qe("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===Ol&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i),mt(i);else{if(!fe&&!ie&&!ae&&-1===e.indexOf("<"))return x&&he?L(e):e;if(r=Qe(e),!r)return fe?null:he?T:""}r&&de&&Ye(r.firstChild);const c=et(l?e:r);try{for(;s=c.nextNode();)at(s),pt(s),ot(s.content)&&ht(s.content)}catch(d){throw l&&Je(e),d}if(l)return Ca(n.removed,e=>{e.element&&function(e){const t=[e];for(;t.length>0;){const e=t.pop();(S?S(e):e.nodeType)===Ol&&Ze(e);const n=v(e);if(n)for(let r=n.length-1;r>=0;--r)t.push(n[r])}}(e.element)}),ie&&nt(e),e;if(fe){if(ie&&nt(r),pe)for(a=I.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return(Y.shadowroot||Y.shadowrootmode)&&(a=M.call(o,a,!0)),a}let u=ae?r.outerHTML:r.innerHTML;return ae&&K["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&Va(yl,r.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+u),ie&&(u=tt(u)),x&&he?L(u):u},n.setConfig=function(){Ve(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),le=!0,ce=K,ue=Y},n.clearConfig=function(){Be=null,le=!1,ce=null,ue=null,x=O,T=""},n.isValidAttribute=function(e,t,n){Be||Ve({});const r=ze(e),o=ze(t);return lt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&Ha(j,e)&&Ra(j[e],t)},n.removeHook=function(e,t){if(Ha(j,e)){if(void 0!==t){const n=Aa(j[e],t);return-1===n?void 0:_a(j[e],n,1)[0]}return La(j[e])}},n.removeHooks=function(e){Ha(j,e)&&(j[e]=[])},n.removeAllHooks=function(){j={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),Nl=qi('<a target="_blank" rel="noopener noreferrer" class="bbc-link"> </a>'),Pl=qi("<br/>"),Il=qi("<!> <!>",1);function Dl(e,t){or(t,!0);let n=Cs(t,"content",3,"");const r=["p","br","strong","em","u","s","a","ul","ol","li","blockquote","pre","code"],o=["href","rel","target","class","spellcheck"],i=/(https?:\/\/[^\s]+)/g;let s=Vr(()=>_l.sanitize(n()||"",{ALLOWED_TAGS:r,ALLOWED_ATTR:o,KEEP_CONTENT:!0})),a=Vr(()=>/<[a-z!/][\s\S]*>/i.test(ni(s))),l=Vr(()=>!ni(a)&&ni(s).trim()?ni(s).split("\n"):[]);var c=Gi(),u=Sr(c),d=e=>{var t=Gi();!function(e,t,n=!1,r=!1,o=!1){var i=e,s="";if(n)var a=e;hi(()=>{var e=jo;if(s!==(s=t()??"")){if(n)return e.nodes=null,a.innerHTML=s,void(""!==s&&Hi(yr(a),a.lastChild));if(null!==e.nodes&&(wi(e.nodes.start,e.nodes.end),e.nodes=null),""!==s){var l=xr(r?"svg":o?"math":"template",r?"http://www.w3.org/2000/svg":o?"http://www.w3.org/1998/Math/MathML":void 0);l.innerHTML=s;var c=r||o?l:l.content;if(Hi(yr(c),c.lastChild),r||o)for(;yr(c);)i.before(yr(c));else i.before(c)}}})}(Sr(t),()=>ni(s)),Yi(e,t)},f=e=>{var t=Gi();is(Sr(t),17,()=>ni(l),ns,(e,t,n)=>{var r=Il(),o=Sr(r);is(o,17,()=>ni(t).split(i),ns,(e,t)=>{var n=Gi(),r=Sr(n),o=e=>{var n=Nl(),r=wr(n);hi(()=>{gs(n,"href",ni(t)),Ji(r,ni(t))}),Yi(e,n)},i=Vr(()=>(e=>/^https?:\/\/[^\s]+$/.test(e))(ni(t))),s=e=>{var n=Ki();hi(()=>Ji(n,ni(t))),Yi(e,n)};ts(r,e=>{ni(i)?e(o):e(s,-1)}),Yi(e,n)});var s=kr(o,2),a=e=>{Yi(e,Pl())};ts(s,e=>{n<ni(l).length-1&&e(a)}),Yi(e,r)}),Yi(e,t)};ts(u,e=>{ni(a)?e(d):e(f,-1)}),Yi(e,c),ir()}var Ml=Wi('<svg viewBox="0 0 24 24" width="18" height="18" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" fill="none"><path d="M20 6 9 17l-5-5"></path></svg>'),jl=Wi('<svg viewBox="0 0 24 24" width="18" height="18" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" fill="none"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg>'),$l=qi('<div class="bbc-error-title"> </div>'),Fl=qi('<div class="bbc-error-message" role="alert"><div class="bbc-error-icon" aria-hidden="true"><!></div> <div class="bbc-error-body"><!> <div class="bbc-error-text"> </div></div></div>');function Ul(e,t){let n=Cs(t,"title",3,null),r=Cs(t,"type",3,"error"),o=Vr(()=>"success"===r());var i=Fl(),s=wr(i),a=wr(s),l=e=>{Yi(e,Ml())},c=e=>{Yi(e,jl())};ts(a,e=>{ni(o)?e(l):e(c,-1)});var u=wr(kr(s,2)),d=e=>{var t=$l(),r=wr(t);hi(()=>Ji(r,n())),Yi(e,t)};ts(u,e=>{n()&&e(d)});var f=wr(kr(u,2));hi(()=>{gs(i,"aria-live",ni(o)?"polite":"assertive"),Ji(f,t.message)}),Yi(e,i)}const zl=window.bb_star_color||Is.starColor,Bl={...Is,...window.bb_settings??{}},Hl=[0,1,2,3,4];var ql=qi('<button class="bbc-replies-toggle"><svg viewBox="0 0 24 24" width="14" height="14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg> <!></button>'),Vl=qi('<img class="bbc-avatar bbc-avatar-img" loading="lazy"/>'),Wl=qi('<div class="bbc-avatar"><span class="bbc-avatar-initial"> </span></div>'),Kl=qi('<time class="bbc-comment-date"> </time>'),Gl=qi('<div class="bbc-rating" role="img"></div>'),Yl=qi('<div class="bbc-reply-form-container"><!></div>'),Jl=qi('<div class="bbc-reply-form-container"><!> <!></div>'),Xl=qi('<div class="bbc-replies"></div>'),Zl=qi("<!> <!> <!>",1),Ql=qi('<div role="article"><div class="bbc-comment-header"><div class="bbc-comment-author"><!> <div class="bbc-comment-meta"><div class="bbc-comment-meta-top"><span class="bbc-author-name"> </span> <!> <!></div> <!></div></div></div> <div class="bbc-comment-content"><!></div> <div class="bbc-comment-actions"><button class="bbc-action-button"><svg viewBox="0 0 24 24" width="12" height="12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" class="bbc-reply-icon" aria-hidden="true"><path d="M9 14 4 9l5-5"></path><path d="M4 9h9a7 7 0 0 1 7 7v1"></path></svg> <span> </span></button></div> <!> <!></div>');function ec(e,t){or(t,!0);const n=()=>Mr(Ri,"$t",r),[r,o]=jr(),i=e=>{var t=ql(),r=wr(t),o=kr(r,2),i=e=>{var t=Ki();hi(e=>Ji(t,e),[()=>n()("hideReplies",{defaultValue:"Hide replies"})]),Yi(e,t)},s=e=>{var t=Ki();hi(e=>Ji(t,e),[()=>n()("viewReplies",{count:ni(L),defaultValue:`View ${ni(L)} ${1===ni(L)?"reply":"replies"}`})]),Yi(e,t)},a=e=>{var t=Ki();hi(e=>Ji(t,e),[()=>n()("viewMoreReplies",{count:ni(L),defaultValue:`View ${ni(L)} more replies`})]),Yi(e,t)};ts(o,e=>{ni(f)?e(i):ni(O)?e(s,1):e(a,-1)}),hi(()=>{gs(t,"aria-expanded",ni(f)),fs(r,0,"bbc-replies-toggle-icon"+(ni(f)?" is-open":""))}),ji("click",t,()=>Oo(f,!ni(f))),Yi(e,t)};let s=Cs(t,"content",3,""),a=Cs(t,"replies",19,()=>[]),l=Cs(t,"isNew",3,!1),c=Cs(t,"isAdminReply",3,!1),u=Cs(t,"depth",3,0);const d=rr("bbc-store");let f=ko(!1),p=Vr(()=>t.name||window.bb_settings&&window.bb_settings.adminName||Is.adminName),h=Vr(()=>t.createdAt?new Date(t.createdAt):null),m=Vr(()=>ni(h)&&!Number.isNaN(ni(h).getTime())),g=Vr(()=>ni(m)?new Intl.DateTimeFormat(t.locale,{day:"numeric",month:"short",...ni(h).getFullYear()===(new Date).getFullYear()?{}:{year:"numeric"}}).format(ni(h)):""),v=Vr(()=>(e=>{const t=e||"anon";let n=0;for(let r=0;r<t.length;r++)n=t.charCodeAt(r)+((n<<5)-n),n|=0;return`hsl(${Math.abs(n)%360}, 62%, 45%)`})(t.email||ni(p))),y=Vr(()=>c()?Bl.adminAvatarUrl:null);const b=e=>e.isAdminReply||e.isAdmin,w=(e,t)=>new Date(e.createdAt)-new Date(t.createdAt);let S=Vr(()=>a().filter(b).sort(w)),k=Vr(()=>a().filter(e=>!b(e)).sort(w)),x=Vr(()=>[...ni(S),...ni(k)]),O=Vr(()=>u()>=1),T=Vr(()=>ni(O)?0:Math.max(3,ni(S).length)),E=Vr(()=>Math.max(0,a().length-ni(T))),C=Vr(()=>ni(E)>0),A=Vr(()=>ni(C)&&!ni(f)?ni(x).slice(0,ni(T)):ni(x)),L=Vr(()=>ni(f)?0:ni(E)),R=Vr(()=>`bbc-comment${t.parentId?" bbc-reply":""}${l()?" comment-slide-in":""}${c()?" admin-reply":""}`);var _=Ql(),N=wr(_),P=wr(N),I=wr(P),D=e=>{var t=Vl();hi(()=>{gs(t,"src",ni(y)),gs(t,"alt",ni(p))}),Yi(e,t)},M=e=>{var t=Wl(),n=wr(t),r=wr(n);hi(e=>{ps(t,`background-color: ${ni(v)}; color: #fff;`),Ji(r,e)},[()=>(e=>{const t=(e||"").trim();return t?Array.from(t)[0].toUpperCase():"?"})(ni(p))]),Yi(e,t)};ts(I,e=>{ni(y)?e(D):e(M,-1)});var j=wr(kr(I,2)),$=wr(j),F=wr($),U=kr($,2),z=e=>{!function(e,t){let n=Cs(t,"color",3,"#323232"),r=Cs(t,"size",3,18);var o=ua(),i=wr(o);hi(()=>{gs(o,"width",r()),gs(o,"height",r()),gs(i,"fill",n())}),Yi(e,o)}(e,{get color(){return zl},size:15})};ts(U,e=>{c()&&e(z)});var B=kr(U,2),H=e=>{var n=Kl(),r=wr(n);hi(()=>{gs(n,"datetime",t.createdAt),Ji(r,ni(g))}),Yi(e,n)};ts(B,e=>{ni(g)&&e(H)});var q=kr(j,2),V=e=>{var n=Gl();is(n,20,()=>Hl,e=>e,(e,n)=>{{let r=Vr(()=>t.rating>n);!function(e,t){var n=ca();hi(()=>ps(n,`stroke:${t.color};stroke-width:6px;fill:${t.isFilled?t.color:"#fff"}`)),Yi(e,n)}(e,{get color(){return zl},get isFilled(){return ni(r)}})}}),hi(()=>gs(n,"aria-label",`${t.rating} out of 5 stars`)),Yi(e,n)};ts(q,e=>{t.rating>0&&!t.parentId&&!Bl.disableRatings&&e(V)});var W=kr(N,2);Dl(wr(W),{get content(){return s()}});var K=kr(W,2),G=wr(K),Y=kr(wr(G),2),J=wr(Y),X=kr(K,2),Z=e=>{var t=Yl();ea(wr(t),{get type(){return d.replySuccess.type},get title(){return d.replySuccess.title},get message(){return d.replySuccess.message},className:"bbc-reply-success"}),Yi(e,t)},Q=e=>{var n=Jl(),r=wr(n),o=e=>{Ul(e,{get title(){return d.replyError.title},get message(){return d.replyError.message},type:"error"})};ts(r,e=>{d.replyError&&d.replyError.commentId===t.id&&e(o)}),function(e,t){or(t,!0);const n=()=>Mr(Ri,"$t",r),[r,o]=jr(),i=window.bb_turnstile_enable||Is.cfEnabled,s=window.bb_turnstile_site_key||Is.cfTurnstileSiteKey,a=rr("bbc-store");let l=ko(fr({...Ps})),c=ko(fr({}));const u=e=>"content"===e?n()("comment"):n()(e),d=e=>{Oo(c,{...ni(c),[e]:zs(e,ni(l)[e],u(e),n())},!0)},f=()=>{ni(l).cfToken=null};var p=pa(),h=wr(p),m=wr(h),g=kr(h,2),v=wr(g);{let e=Vr(()=>n()("name")),t=Vr(()=>n()("namePlaceholder"));Js(v,{get label(){return ni(e)},name:"name",get error(){return ni(c).name},get placeholder(){return ni(t)},onblur:d,required:!0,get value(){return ni(l).name},set value(e){ni(l).name=e}})}var y=kr(v,2);{let e=Vr(()=>n()("email")),t=Vr(()=>n()("emailPlaceholder"));Js(y,{get label(){return ni(e)},name:"email",type:"email",get error(){return ni(c).email},get placeholder(){return ni(t)},onblur:d,required:!0,get value(){return ni(l).email},set value(e){ni(l).email=e}})}var b=kr(g,2),w=kr(wr(b),2),S=kr(b,2);{let e=Vr(()=>n()("comment")),t=Vr(()=>n()("commentPlaceholder"));Js(S,{get label(){return ni(e)},name:"content",type:"textarea",get error(){return ni(c).content},get placeholder(){return ni(t)},onblur:d,required:!0,rows:4,get value(){return ni(l).content},set value(e){ni(l).content=e}})}var k=wr(kr(S,2)),x=wr(k),O=wr(x),T=e=>{Zs(e)},E=e=>{var t=Ki();hi(e=>Ji(t,e),[()=>n()("submitReply")]),Yi(e,t)};ts(O,e=>{a.loading?e(T):e(E,-1)});var C=kr(x,2),A=e=>{var r=da(),o=wr(r);hi(e=>{r.disabled=a.loading,Ji(o,e)},[()=>n()("cancel",{defaultValue:"Cancel"})]),ji("click",r,function(...e){var n;null==(n=t.onClose)||n.apply(this,e)}),Yi(e,r)};ts(C,e=>{t.onClose&&e(A)});var L=kr(k,2),R=e=>{var t=fa(),n=wr(t);oa(n,{get sitekey(){return s},onVerify:e=>ni(l).cfToken=e,onError:f});var r=kr(n,2),o=e=>{na(e,{get message(){return ni(c).cfToken}})};ts(r,e=>{ni(c).cfToken&&e(o)}),Yi(e,t)};ts(L,e=>{i&&s&&e(R)}),hi((e,t)=>{gs(p,"aria-label",e),Ji(m,t),x.disabled=a.loading},[()=>n()("replyTo",{name:t.parentName,defaultValue:`Reply to ${t.parentName}`}),()=>n()("replyTo",{name:t.parentName,defaultValue:`Reply to ${t.parentName}`})]),Mi("submit",p,e=>{if(e.preventDefault(),a.loading)return;const t={name:zs("name",ni(l).name,n()("name"),n()),email:zs("email",ni(l).email,n()("email"),n()),content:zs("content",ni(l).content,n()("comment"),n())};i&&s&&!ni(l).cfToken&&(t.cfToken=n()("captchaReplyError")),Oo(c,t,!0),Object.values(t).some(Boolean)||a.onReply(a.commentIdInReply)({...ni(l)}).finally(()=>{Oo(l,{...Ps},!0),Oo(c,{},!0)})}),ys(w,()=>ni(l).honeypot,e=>ni(l).honeypot=e),Yi(e,p),ir(),o()}(kr(r,2),{get parentCommentId(){return t.id},onClose:()=>d.toggleReplyForm(t.id),get parentName(){return ni(p)}}),Yi(e,n)};ts(X,e=>{d.replySuccess&&d.replySuccess.commentId===t.id?e(Z):d.commentIdInReply===t.id&&e(Q,1)});var ee=kr(X,2),te=e=>{var n=Zl(),r=Sr(n),o=e=>{i(e)};ts(r,e=>{ni(C)&&ni(O)&&e(o)});var s=kr(r,2),a=e=>{var n=Xl();is(n,21,()=>ni(A),e=>e.id,(e,n)=>{{let r=Vr(()=>u()+1);ec(e,Es(()=>ni(n),{get locale(){return t.locale},get depth(){return ni(r)}}))}}),Yi(e,n)};ts(s,e=>{ni(A).length>0&&e(a)});var l=kr(s,2),c=e=>{i(e)};ts(l,e=>{ni(C)&&!ni(O)&&e(c)}),Yi(e,n)};ts(ee,e=>{a().length>0&&e(te)}),hi((e,n,r)=>{fs(_,1,ds(ni(R))),gs(_,"aria-label",e),Ji(F,ni(p)),gs(G,"aria-expanded",d.commentIdInReply===t.id),gs(G,"aria-label",n),Ji(J,r)},[()=>t.parentId?n()("replyCommentLabel",{defaultValue:"Reply comment"}):n()("commentLabel",{defaultValue:"Comment"}),()=>d.commentIdInReply===t.id?n()("hideReplyForm",{defaultValue:"Hide reply form"}):n()("showReplyForm",{defaultValue:"Show reply form"}),()=>d.commentIdInReply===t.id?n()("hide"):n()("reply")]),ji("click",G,()=>d.toggleReplyForm(t.id)),Yi(e,_),ir(),o()}$i(["click"]);var tc=qi('<div class="comment-skeleton"><div class="comment-skeleton-header"><div class="comment-skeleton-avatar"></div> <div class="comment-skeleton-meta"><div class="comment-skeleton-name"></div> <div class="comment-skeleton-date"></div></div></div> <div class="comment-skeleton-rating"></div> <div class="comment-skeleton-content"><div class="comment-skeleton-line"></div> <div class="comment-skeleton-line"></div> <div class="comment-skeleton-line short"></div></div></div>'),nc=qi('<div class="comments-skeleton"><div class="comments-skeleton-title"></div> <!></div>');function rc(e,t=!1){return[...e].sort(t?(e,t)=>new Date(e.createdAt)-new Date(t.createdAt):(e,t)=>new Date(t.createdAt)-new Date(e.createdAt)).map(e=>({...e,replies:e.replies?rc(e.replies,!0):[]}))}function oc(e){let t=e.length;return e.forEach(e=>{e.replies&&Array.isArray(e.replies)&&e.replies.length>0&&(t+=oc(e.replies))}),t}var ic=qi('<div class="bbc-no-comments"><p> </p></div>'),sc=qi('<span class="bbc-load-more-count"> </span>'),ac=qi('<div class="bbc-pagination"><button type="button" class="bbc-load-more"><svg viewBox="0 0 24 24" width="15" height="15" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" fill="none" aria-hidden="true" class="bbc-load-more-icon"><path d="m6 9 6 6 6-6"></path></svg> <span class="bbc-load-more-label"> </span> <!></button></div>'),lc=qi('<div class="bbc-comments-section"><h2 class="bbc-comments-title"> </h2> <div class="bbc-comments-list"></div> <!></div>');function cc(e,t){or(t,!0);const n=()=>Mr(Ri,"$t",r),[r,o]=jr();let i=Cs(t,"comments",19,()=>[]),s=Cs(t,"newCommentIds",19,()=>new Set),a=ko(!0),l=ko(10);const c=function(){var e,t;try{let n=`${(null==(e=window.Shopify)?void 0:e.locale)??"en"}`;return n.includes("-")?n:`${n}-${(null==(t=window.Shopify)?void 0:t.country)??"US"}`}catch(n){return"en-US"}}();As(()=>{Oo(a,!1)});let u=Vr(()=>i().length>0?i():window.Shopify&&window.Shopify.designMode?Ds:window.bb_comments||[]),d=Vr(()=>Array.isArray(ni(u))?ni(u):[]),f=Vr(()=>rc(ni(d))),p=Vr(()=>oc(ni(d))),h=Vr(()=>ni(f).slice(0,ni(l))),m=Vr(()=>ni(f).length-ni(h).length),g=Vr(()=>Math.min(10,ni(m)));var v=Gi(),y=Sr(v),b=e=>{!function(e){var t=nc();is(kr(wr(t),2),0,()=>[0,1,2],e=>e,(e,t)=>{Yi(e,tc())}),Yi(e,t)}(e)},w=e=>{var t=ic(),r=wr(t),o=wr(r);hi(e=>Ji(o,e),[()=>n()("noComments",{defaultValue:"Be the first to share your thoughts."})]),Yi(e,t)},S=e=>{var t=lc(),r=wr(t),o=wr(r),i=kr(r,2);is(i,23,()=>ni(h),(e,t)=>e.id??`idx-${t}`,(e,t)=>{{let n=Vr(()=>null!=ni(t).id&&s().has(ni(t).id));ec(e,Es(()=>ni(t),{get locale(){return c},get isNew(){return ni(n)}}))}});var a=kr(i,2),u=e=>{var t=ac(),r=wr(t),o=kr(wr(r),2),i=wr(o),s=kr(o,2),a=e=>{var t=sc(),r=wr(t);hi(e=>Ji(r,e),[()=>n()("commentsRemaining",{count:ni(m),defaultValue:`${ni(m)} remaining`})]),Yi(e,t)};ts(s,e=>{ni(m)>ni(g)&&e(a)}),hi(e=>Ji(i,e),[()=>n()("loadMoreComments",{count:ni(g),defaultValue:`Load ${ni(g)} more ${1===ni(g)?"comment":"comments"}`})]),ji("click",r,()=>Oo(l,Math.min(ni(l)+10,ni(f).length),!0)),Yi(e,t)};ts(a,e=>{ni(m)>0&&e(u)}),hi(e=>Ji(o,e),[()=>n()("totalComments",{count:ni(p)})]),Yi(e,t)};ts(y,e=>{ni(a)?e(b):0===ni(f).length?e(w,1):e(S,-1)}),Yi(e,v),ir(),o()}$i(["click"]);var uc=qi('<div class="bbc-comments-container"><!> <!> <!></div>');function dc(e,t){or(t,!1);const n=new $s;var r,o;r="bbc-store",o=n,ar().set(r,o),xs();var i=uc(),s=wr(i),a=e=>{Ul(e,{get title(){return n.submitError.title},get message(){return n.submitError.message},type:"error"})};ts(s,e=>{n.submitError&&!n.successState&&e(a)});var l=kr(s,2);la(l,{}),cc(kr(l,2),{get comments(){return n.comments},get newCommentIds(){return n.newCommentIds}}),Yi(e,i),ir()}const fc=()=>{const e=document.getElementById("bbcomments-container");if(e){if("true"!==e.dataset.bbcMounted){e.dataset.bbcMounted="true",window.bb_star_color&&e.style.setProperty("--bbc-star",window.bb_star_color);try{Xi(dc,{target:e})}catch(t){e.dataset.bbcMounted="",console.error("Better Blog Comments: Failed to initialize widget",t)}}}else console.warn("Better Blog Comments: Container element not found")};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",fc):fc();
})();
})();
{%- comment -%} Better Blog Comments Liquid Widget v1.1.2 {%- endcomment -%}
{%- comment -%} Robust metafield access that handles multiple scenarios {%- endcomment -%}
{%- assign comments = null -%}
{%- comment -%} Method 1: Try standard json access with definition {%- endcomment -%}
{%- assign comments_raw = article.metafields.bb_comments.comment_list.value -%}
{%- if comments_raw and comments_raw != blank -%}
{%- assign comments = comments_raw -%}
{%- endif -%}
{%- comment -%} Method 2: Fallback for direct access (in case of type conflicts) {%- endcomment -%}
{%- if comments == null or comments == blank -%}
{%- assign comments_direct = article.metafields.bb_comments.comment_list -%}
{%- if comments_direct and comments_direct != blank -%}
{%- assign comments = comments_direct -%}
{%- endif -%}
{%- endif -%}
{%- comment -%} Method 3: Ultimate fallback - empty array {%- endcomment -%}
{%- unless comments -%}
{%- assign comments = '' | split: ',' -%}
{%- endunless -%}
<style>
.bbcomments-block {
display: flex;
flex-direction: column;
align-items: center;
}
#bbcomments-container {
max-width: 1024px;
width: 100%;
}
</style>
{{ 'bbcomments.css' | asset_url | stylesheet_tag }}
<div class="bbcomments-block">
<div id="bbcomments-container" style="margin-top: 40px;"></div>
</div>
<script>
window.bb_article_id = "{{ article.id }}";
window.bb_blog_id = "{{ blog.id }}"
window.bb_settings = {{ shop.metafields.bb_comments.shop_setting.value | json }}
window.bb_comments = {{ comments | json }}
window.bb_app_url = "/api/customer/comments/";
window.bb_star_color = "{{ shop.metafields.bb_comments.shop_setting.value.starColor | default: '#FFD700' }}";
window.bb_turnstile_enable = {{ shop.metafields.bb_comments.shop_setting.value.cfEnabled | default: false}};
window.bb_turnstile_site_key = "{{ shop.metafields.bb_comments.shop_setting.value.cfTurnstileSiteKey }}";
const starDoms = document.querySelectorAll(".bb-comment__stars-inner");
starDoms.forEach(starDom => {
const rating = Number(starDom.getAttribute('data-rating'));
const ratingPercentage = rating / 5 * 100;
const ratingPercentageRounded = `${(Math.round(ratingPercentage / 10) * 10)}%`;
starDom.style.width = ratingPercentageRounded;
})
</script>
<script src="{{ 'bbcomments.js' | asset_url }}" defer></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment