@mhosaic/feedback 0.35.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";var MhosaicFeedback=(()=>{var Oe=Object.defineProperty;var Fo=Object.getOwnPropertyDescriptor;var Io=Object.getOwnPropertyNames;var Do=Object.prototype.hasOwnProperty;var $o=(e,t,r)=>t in e?Oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ie=(e,t)=>()=>(e&&(t=e(e=0)),t);var Nt=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})},Ko=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Io(t))!Do.call(e,n)&&n!==r&&Oe(e,n,{get:()=>t[n],enumerable:!(a=Fo(t,n))||a.enumerable});return e};var Oo=e=>Ko(Oe({},"__esModule",{value:!0}),e);var Te=(e,t,r)=>$o(e,typeof t!="symbol"?t+"":t,r);function fe(e,t){for(var r in t)e[r]=t[r];return e}function ht(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function _(e,t,r){var a,n,i,s={};for(i in t)i=="key"?a=t[i]:i=="ref"?n=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Xe.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return We(e,s,a,n,null)}function We(e,t,r,a,n){var i={type:e,props:t,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n==null?++nr:n,__i:-1,__u:0};return n==null&&Q.vnode!=null&&Q.vnode(i),i}function oe(e){return e.children}function Qe(e,t){this.props=e,this.context=t}function Ce(e,t){if(t==null)return e.__?Ce(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Ce(e):null}function oa(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=fe({},t);i.__v=t.__v+1,Q.vnode&&Q.vnode(i),vt(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?Ce(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,ur(a,i,n),t.__e=t.__=null,i.__e!=r&&cr(i)}}function cr(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),cr(e)}function rr(e){(!e.__d&&(e.__d=!0)&&ge.push(e)&&!Ge.__r++||tr!=Q.debounceRendering)&&((tr=Q.debounceRendering)||ir)(Ge)}function Ge(){try{for(var e,t=1;ge.length;)ge.length>t&&ge.sort(sr),e=ge.shift(),t=ge.length,oa(e)}finally{ge.length=Ge.__r=0}}function dr(e,t,r,a,n,i,s,l,d,c,f){var u,p,g,y,C,x,w,q=a&&a.__k||Ve,z=t.length;for(d=aa(r,t,q,d,z),u=0;u<z;u++)(g=r.__k[u])!=null&&(p=g.__i!=-1&&q[g.__i]||Ue,g.__i=u,x=vt(e,g,p,n,i,s,l,d,c,f),y=g.__e,g.ref&&p.ref!=g.ref&&(p.ref&&yt(p.ref,null,g),f.push(g.ref,g.__c||y,g)),C==null&&y!=null&&(C=y),(w=!!(4&g.__u))||p.__k===g.__k?(d=pr(g,d,e,w),w&&p.__e&&(p.__e=null)):typeof g.type=="function"&&x!==void 0?d=x:y&&(d=y.nextSibling),g.__u&=-7);return r.__e=C,d}function aa(e,t,r,a,n){var i,s,l,d,c,f=r.length,u=f,p=0;for(e.__k=new Array(n),i=0;i<n;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=We(null,s,null,null,null):Ye(s)?s=e.__k[i]=We(oe,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=We(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,d=i+p,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=na(s,r,d,u))!=-1&&(u--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>f?p--:n<f&&p++),typeof s.type!="function"&&(s.__u|=4)):c!=d&&(c==d-1?p--:c==d+1?p++:(c>d?p--:p++,s.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<f;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=Ce(l)),mr(l,l));return a}function pr(e,t,r,a){var n,i;if(typeof e.type=="function"){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=pr(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=Ce(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function na(e,t,r,a){var n,i,s,l=e.key,d=e.type,c=t[r],f=c!=null&&(2&c.__u)==0;if(c===null&&l==null||f&&l==c.key&&d==c.type)return r;if(a>(f?1:0)){for(n=r-1,i=r+1;n>=0||i<t.length;)if((c=t[s=n>=0?n--:i++])!=null&&(2&c.__u)==0&&l==c.key&&d==c.type)return s}return-1}function or(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||ra.test(t)?r:r+"px"}function Ne(e,t,r,a,n){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(t in a)r&&t in r||or(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||or(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(lr,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?a?r[Me]=a[Me]:(r[Me]=bt,e.addEventListener(t,i?mt:ft,i)):e.removeEventListener(t,i?mt:ft,i);else{if(n=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r==null?"":r;break e}catch(l){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function ar(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[je]==null)t[je]=bt++;else if(t[je]<r[Me])return;return r(Q.event?Q.event(t):t)}}}function vt(e,t,r,a,n,i,s,l,d,c){var f,u,p,g,y,C,x,w,q,z,k,m,v,E,F,h=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(d=!!(32&r.__u),i=[l=t.__e=r.__e]),(f=Q.__b)&&f(t);e:if(typeof h=="function")try{if(w=t.props,q=h.prototype&&h.prototype.render,z=(f=h.contextType)&&a[f.__c],k=f?z?z.props.value:f.__:a,r.__c?x=(u=t.__c=r.__c).__=u.__E:(q?t.__c=u=new h(w,k):(t.__c=u=new Qe(w,k),u.constructor=h,u.render=sa),z&&z.sub(u),u.state||(u.state={}),u.__n=a,p=u.__d=!0,u.__h=[],u._sb=[]),q&&u.__s==null&&(u.__s=u.state),q&&h.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=fe({},u.__s)),fe(u.__s,h.getDerivedStateFromProps(w,u.__s))),g=u.props,y=u.state,u.__v=t,p)q&&h.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),q&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(q&&h.getDerivedStateFromProps==null&&w!==g&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(w,k),t.__v==r.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(w,u.__s,k)===!1){t.__v!=r.__v&&(u.props=w,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(B){B&&(B.__=t)}),Ve.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&s.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(w,u.__s,k),q&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(g,y,C)})}if(u.context=k,u.props=w,u.__P=e,u.__e=!1,m=Q.__r,v=0,q)u.state=u.__s,u.__d=!1,m&&m(t),f=u.render(u.props,u.state,u.context),Ve.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,m&&m(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++v<25);u.state=u.__s,u.getChildContext!=null&&(a=fe(fe({},a),u.getChildContext())),q&&!p&&u.getSnapshotBeforeUpdate!=null&&(C=u.getSnapshotBeforeUpdate(g,y)),E=f!=null&&f.type===oe&&f.key==null?fr(f.props.children):f,l=dr(e,Ye(E)?E:[E],t,r,a,n,i,s,l,d,c),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),x&&(u.__E=u.__=null)}catch(B){if(t.__v=null,d||i!=null)if(B.then){for(t.__u|=d?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(F=i.length;F--;)ht(i[F]);gt(t)}else t.__e=r.__e,t.__k=r.__k,B.then||gt(t);Q.__e(B,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=ia(r.__e,t,r,a,n,i,s,d,c);return(f=Q.diffed)&&f(t),128&t.__u?void 0:l}function gt(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(gt))}function ur(e,t,r){for(var a=0;a<r.length;a++)yt(r[a],r[++a],r[++a]);Q.__c&&Q.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){Q.__e(i,n.__v)}})}function fr(e){return typeof e!="object"||e==null||e.__b>0?e:Ye(e)?e.map(fr):fe({},e)}function ia(e,t,r,a,n,i,s,l,d){var c,f,u,p,g,y,C,x=r.props||Ue,w=t.props,q=t.type;if(q=="svg"?n="http://www.w3.org/2000/svg":q=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),i!=null){for(c=0;c<i.length;c++)if((g=i[c])&&"setAttribute"in g==!!q&&(q?g.localName==q:g.nodeType==3)){e=g,i[c]=null;break}}if(e==null){if(q==null)return document.createTextNode(w);e=document.createElementNS(n,q,w.is&&w),l&&(Q.__m&&Q.__m(t,i),l=!1),i=null}if(q==null)x===w||l&&e.data==w||(e.data=w);else{if(i=i&&Xe.call(e.childNodes),!l&&i!=null)for(x={},c=0;c<e.attributes.length;c++)x[(g=e.attributes[c]).name]=g.value;for(c in x)g=x[c],c=="dangerouslySetInnerHTML"?u=g:c=="children"||c in w||c=="value"&&"defaultValue"in w||c=="checked"&&"defaultChecked"in w||Ne(e,c,null,g,n);for(c in w)g=w[c],c=="children"?p=g:c=="dangerouslySetInnerHTML"?f=g:c=="value"?y=g:c=="checked"?C=g:l&&typeof g!="function"||x[c]===g||Ne(e,c,g,x[c],n);if(f)l||u&&(f.__html==u.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(u&&(e.innerHTML=""),dr(t.type=="template"?e.content:e,Ye(p)?p:[p],t,r,a,q=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&Ce(r,0),l,d),i!=null)for(c=i.length;c--;)ht(i[c]);l||(c="value",q=="progress"&&y==null?e.removeAttribute("value"):y!=null&&(y!==e[c]||q=="progress"&&!y||q=="option"&&y!=x[c])&&Ne(e,c,y,x[c],n),c="checked",C!=null&&C!=e[c]&&Ne(e,c,C,x[c],n))}return e}function yt(e,t,r){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&t==null||(e.__u=e(t))}else e.current=t}catch(n){Q.__e(n,r)}}function mr(e,t,r){var a,n;if(Q.unmount&&Q.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||yt(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){Q.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&mr(a[n],t,r||typeof e.type!="function");r||ht(e.__e),e.__c=e.__=e.__e=void 0}function sa(e,t,r){return this.constructor(e,r)}function Re(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),Q.__&&Q.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],vt(t,e=(!a&&r||t).__k=_(oe,null,[e]),n||Ue,Ue,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Xe.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),ur(i,e,s)}var Xe,Q,nr,ea,ge,tr,ir,sr,ut,je,Me,lr,bt,ft,mt,ta,Ue,Ve,ra,Ye,de=ie(()=>{"use strict";Ue={},Ve=[],ra=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ye=Array.isArray;Xe=Ve.slice,Q={__e:function(e,t,r,a){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,a||{}),s=n.__d),s)return n.__E=n}catch(l){e=l}throw e}},nr=0,ea=function(e){return e!=null&&e.constructor===void 0},Qe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=fe({},this.state),typeof e=="function"&&(e=e(fe({},r),this.props)),e&&fe(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),rr(this))},Qe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),rr(this))},Qe.prototype.render=oe,ge=[],ir=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,sr=function(e,t){return e.__v.__b-t.__v.__b},Ge.__r=0,ut=Math.random().toString(8),je="__d"+ut,Me="__a"+ut,lr=/(PointerCapture)$|Capture$/i,bt=0,ft=ar(!1),mt=ar(!0),ta=0});function Ze(e,t){Y.__h&&Y.__h(V,e,Le||t),Le=0;var r=V.__H||(V.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function P(e){return Le=1,la(Sr,e)}function la(e,t,r){var a=Ze(qe++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):Sr(void 0,t),function(l){var d=a.__N?a.__N[0]:a.__[0],c=a.t(d,l);d!==c&&(a.__N=[c,a.__[1]],a.__c.setState({}))}],a.__c=V,!V.__f)){var n=function(l,d,c){if(!a.__c.__H)return!0;var f=a.__c.__H.__.filter(function(p){return p.__c});if(f.every(function(p){return!p.__N}))return!i||i.call(this,l,d,c);var u=a.__c.props!==l;return f.some(function(p){if(p.__N){var g=p.__[0];p.__=p.__N,p.__N=void 0,g!==p.__[0]&&(u=!0)}}),i&&i.call(this,l,d,c)||u};V.__f=!0;var i=V.shouldComponentUpdate,s=V.componentWillUpdate;V.componentWillUpdate=function(l,d,c){if(this.__e){var f=i;i=void 0,n(l,d,c),i=f}s&&s.call(this,l,d,c)},V.shouldComponentUpdate=n}return a.__N||a.__}function W(e,t){var r=Ze(qe++,3);!Y.__s&&kt(r.__H,t)&&(r.__=e,r.u=t,V.__H.__h.push(r))}function wt(e,t){var r=Ze(qe++,4);!Y.__s&&kt(r.__H,t)&&(r.__=e,r.u=t,V.__h.push(r))}function U(e){return Le=5,ne(function(){return{current:e}},[])}function ne(e,t){var r=Ze(qe++,7);return kt(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function me(e,t){return Le=8,ne(function(){return e},t)}function ca(){for(var e;e=kr.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Je),t.__h.some(_t),t.__h=[]}catch(r){t.__h=[],Y.__e(r,e.__v)}}}function da(e){var t,r=function(){clearTimeout(a),wr&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);wr&&(t=requestAnimationFrame(r))}function Je(e){var t=V,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),V=t}function _t(e){var t=V;e.__c=e.__(),V=t}function kt(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function Sr(e,t){return typeof t=="function"?t(e):t}var qe,V,xt,gr,Le,kr,Y,br,hr,vr,yr,xr,_r,wr,re=ie(()=>{"use strict";de();Le=0,kr=[],Y=Q,br=Y.__b,hr=Y.__r,vr=Y.diffed,yr=Y.__c,xr=Y.unmount,_r=Y.__;Y.__b=function(e){V=null,br&&br(e)},Y.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),_r&&_r(e,t)},Y.__r=function(e){hr&&hr(e),qe=0;var t=(V=e.__c).__H;t&&(xt===V?(t.__h=[],V.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Je),t.__h.some(_t),t.__h=[],qe=0)),xt=V},Y.diffed=function(e){vr&&vr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(kr.push(t)!==1&&gr===Y.requestAnimationFrame||((gr=Y.requestAnimationFrame)||da)(ca)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),xt=V=null},Y.__c=function(e,t){t.some(function(r){try{r.__h.some(Je),r.__h=r.__h.filter(function(a){return!a.__||_t(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],Y.__e(a,r.__v)}}),yr&&yr(e,t)},Y.unmount=function(e){xr&&xr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Je(a)}catch(n){t=n}}),r.__H=void 0,t&&Y.__e(t,r.__v))};wr=typeof requestAnimationFrame=="function"});function Zr(e){return e==="en"?yn:vn}var vn,yn,eo=ie(()=>{"use strict";vn={"pastille.label":"Suivi des tests","pastille.loading":"Chargement\u2026","pastille.unavailable":"Statuts indisponibles","pastille.unknownPage":"Page inconnue","pastille.unknownPageHint":"Cette route n\u2019est pas encore au plan du site des tests.","panel.freshness":"Statuts g\xE9n\xE9r\xE9s le {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"Aucun sc\xE9nario li\xE9 \xE0 cette page.","panel.openSitemap":"Voir le plan du site","panel.sitemapLink":"Plan du site","panel.scenarioCountOne":"{count} sc\xE9nario","panel.scenarioCountMany":"{count} sc\xE9narios","panel.laneAutomated":"Automatis\xE9","panel.laneDev":"D\xE9v","panel.laneClient":"Client","lane.notTested":"Non test\xE9","lane.validatedBy":"Valid\xE9 par {by}","lane.rejectedBy":"Rejet\xE9 par {by}","lane.stale":"Valid\xE9 en v{version}, version actuelle v{current}","lane.clientPending":"Non test\xE9 \u2014 plateforme requise","lane.bot":"Automatis\xE9 (bot)","lane.code":"D\xE9veloppeur (code)","lane.human":"Humain","laneState.ok":"\xC0 jour","laneState.issue":"Probl\xE8me","laneState.none":"Non fait / p\xE9rim\xE9","color.green":"Valid\xE9","color.yellow":"En attente","color.red":"En \xE9chec","color.gray":"Non couvert","automated.passing":"R\xE9ussi","automated.failing":"En \xE9chec","automated.flaky":"Instable","automated.neverRun":"Jamais ex\xE9cut\xE9","source.testgen":"g\xE9n\xE9r\xE9","source.testgenHint":"Sc\xE9nario g\xE9n\xE9r\xE9 automatiquement (testgen)","suite.cases":"{count} cas","case.covered":"auto","case.manual":"manuel","case.blocked":"bloqu\xE9","case.openQuestion":"question produit","grounding.verified":"attendu v\xE9rifi\xE9","grounding.confirmLive":"\xE0 confirmer en live","grounding.productQuestion":"d\xE9cision produit","modal.title":"Plan du site \u2014 suivi des tests","modal.close":"Fermer","modal.tabPages":"Pages","modal.tabScenarios":"Sc\xE9narios","modal.youAreHere":"vous \xEAtes ici","modal.search":"Filtrer les sc\xE9narios\u2026","modal.noMatch":"Aucun sc\xE9nario ne correspond au filtre.","modal.traversed":"Travers\xE9es","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages avec \u2265 1 sc\xE9nario","modal.kpiScenariosPassing":"Sc\xE9narios passants","panel.noTests":"Aucun test ne couvre encore cette page.","panel.unknownPage":"Page inconnue du registre QA."},yn={"pastille.label":"Test tracking","pastille.loading":"Loading\u2026","pastille.unavailable":"Statuses unavailable","pastille.unknownPage":"Unknown page","pastille.unknownPageHint":"This route isn\u2019t in the test sitemap yet.","panel.freshness":"Statuses generated on {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"No scenario linked to this page.","panel.openSitemap":"View sitemap","panel.sitemapLink":"Sitemap","panel.scenarioCountOne":"{count} scenario","panel.scenarioCountMany":"{count} scenarios","panel.laneAutomated":"Automated","panel.laneDev":"Dev","panel.laneClient":"Client","lane.notTested":"Not tested","lane.validatedBy":"Validated by {by}","lane.rejectedBy":"Rejected by {by}","lane.stale":"Validated in v{version}, current version v{current}","lane.clientPending":"Not tested \u2014 platform required","lane.bot":"Automated (bot)","lane.code":"Developer (code)","lane.human":"Human","laneState.ok":"Up to date","laneState.issue":"Issue","laneState.none":"Not done / stale","color.green":"Validated","color.yellow":"Pending","color.red":"Failing","color.gray":"Not covered","automated.passing":"Passing","automated.failing":"Failing","automated.flaky":"Flaky","automated.neverRun":"Never run","source.testgen":"generated","source.testgenHint":"Auto-generated scenario (testgen)","suite.cases":"{count} cases","case.covered":"auto","case.manual":"manual","case.blocked":"blocked","case.openQuestion":"product question","grounding.verified":"expected verified","grounding.confirmLive":"confirm live","grounding.productQuestion":"product decision","modal.title":"Sitemap \u2014 test tracking","modal.close":"Close","modal.tabPages":"Pages","modal.tabScenarios":"Scenarios","modal.youAreHere":"you are here","modal.search":"Filter scenarios\u2026","modal.noMatch":"No scenario matches the filter.","modal.traversed":"Traversed","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages with \u2265 1 scenario","modal.kpiScenariosPassing":"Passing scenarios","panel.noTests":"No tests cover this page yet.","panel.unknownPage":"Page unknown to the QA registry."}});function Et(e){if(!e)return"/";let t=e.startsWith("/")?e:`/${e}`;return t=t.replace(/\/{2,}/g,"/"),t.length>1&&(t=t.replace(/\/+$/,"")),t.length>0?t:"/"}function xn(e,t){let r=t.length;for(;r>0;){let a=t[r-1];if(a!==void 0&&a.startsWith(":")&&a.endsWith("?"))r--;else break}return e.length<r||e.length>t.length?!1:e.every((a,n)=>{let i=t[n];return i!==void 0&&(i.startsWith(":")||i===a)})}function ro(e,t){let r=to(Et(e)),a=null,n=-1;for(let i of t){let s=to(i);if(!xn(r,s))continue;let d=s.filter(c=>!c.startsWith(":")).length*100+s.length;d>n&&(a=i,n=d)}return a}var to,Tt=ie(()=>{"use strict";to=e=>e.split("/").filter(Boolean)});var oo,ao=ie(()=>{"use strict";oo=`
1
+ "use strict";var MhosaicFeedback=(()=>{var Oe=Object.defineProperty;var $o=Object.getOwnPropertyDescriptor;var Ko=Object.getOwnPropertyNames;var Oo=Object.prototype.hasOwnProperty;var Ho=(e,t,r)=>t in e?Oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ie=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ht=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})},No=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ko(t))!Oo.call(e,n)&&n!==r&&Oe(e,n,{get:()=>t[n],enumerable:!(a=$o(t,n))||a.enumerable});return e};var jo=e=>No(Oe({},"__esModule",{value:!0}),e);var qe=(e,t,r)=>Ho(e,typeof t!="symbol"?t+"":t,r);function me(e,t){for(var r in t)e[r]=t[r];return e}function ht(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function x(e,t,r){var a,n,i,s={};for(i in t)i=="key"?a=t[i]:i=="ref"?n=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Ye.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return We(e,s,a,n,null)}function We(e,t,r,a,n){var i={type:e,props:t,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:n==null?++ar:n,__i:-1,__u:0};return n==null&&V.vnode!=null&&V.vnode(i),i}function ae(e){return e.children}function Qe(e,t){this.props=e,this.context=t}function Ce(e,t){if(t==null)return e.__?Ce(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Ce(e):null}function ia(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=me({},t);i.__v=t.__v+1,V.vnode&&V.vnode(i),vt(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?Ce(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,pr(a,i,n),t.__e=t.__=null,i.__e!=r&&lr(i)}}function lr(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),lr(e)}function tr(e){(!e.__d&&(e.__d=!0)&&be.push(e)&&!Ge.__r++||er!=V.debounceRendering)&&((er=V.debounceRendering)||nr)(Ge)}function Ge(){try{for(var e,t=1;be.length;)be.length>t&&be.sort(ir),e=be.shift(),t=be.length,ia(e)}finally{be.length=Ge.__r=0}}function dr(e,t,r,a,n,i,s,l,c,d,f){var u,p,g,_,T,y,v,S=a&&a.__k||Ve,z=t.length;for(c=sa(r,t,S,c,z),u=0;u<z;u++)(g=r.__k[u])!=null&&(p=g.__i!=-1&&S[g.__i]||Ue,g.__i=u,y=vt(e,g,p,n,i,s,l,c,d,f),_=g.__e,g.ref&&p.ref!=g.ref&&(p.ref&&yt(p.ref,null,g),f.push(g.ref,g.__c||_,g)),T==null&&_!=null&&(T=_),(v=!!(4&g.__u))||p.__k===g.__k?(c=cr(g,c,e,v),v&&p.__e&&(p.__e=null)):typeof g.type=="function"&&y!==void 0?c=y:_&&(c=_.nextSibling),g.__u&=-7);return r.__e=T,c}function sa(e,t,r,a,n){var i,s,l,c,d,f=r.length,u=f,p=0;for(e.__k=new Array(n),i=0;i<n;i++)(s=t[i])!=null&&typeof s!="boolean"&&typeof s!="function"?(typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?s=e.__k[i]=We(null,s,null,null,null):Xe(s)?s=e.__k[i]=We(ae,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=We(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,c=i+p,s.__=e,s.__b=e.__b+1,l=null,(d=s.__i=la(s,r,c,u))!=-1&&(u--,(l=r[d])&&(l.__u|=2)),l==null||l.__v==null?(d==-1&&(n>f?p--:n<f&&p++),typeof s.type!="function"&&(s.__u|=4)):d!=c&&(d==c-1?p--:d==c+1?p++:(d>c?p--:p++,s.__u|=4))):e.__k[i]=null;if(u)for(i=0;i<f;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=Ce(l)),fr(l,l));return a}function cr(e,t,r,a){var n,i;if(typeof e.type=="function"){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=cr(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=Ce(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function la(e,t,r,a){var n,i,s,l=e.key,c=e.type,d=t[r],f=d!=null&&(2&d.__u)==0;if(d===null&&l==null||f&&l==d.key&&c==d.type)return r;if(a>(f?1:0)){for(n=r-1,i=r+1;n>=0||i<t.length;)if((d=t[s=n>=0?n--:i++])!=null&&(2&d.__u)==0&&l==d.key&&c==d.type)return s}return-1}function rr(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||na.test(t)?r:r+"px"}function Ne(e,t,r,a,n){var i,s;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(t in a)r&&t in r||rr(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||rr(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(sr,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?a?r[Me]=a[Me]:(r[Me]=bt,e.addEventListener(t,i?mt:ft,i)):e.removeEventListener(t,i?mt:ft,i);else{if(n=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r==null?"":r;break e}catch(l){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function or(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[je]==null)t[je]=bt++;else if(t[je]<r[Me])return;return r(V.event?V.event(t):t)}}}function vt(e,t,r,a,n,i,s,l,c,d){var f,u,p,g,_,T,y,v,S,z,w,m,b,q,F,h=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(c=!!(32&r.__u),i=[l=t.__e=r.__e]),(f=V.__b)&&f(t);e:if(typeof h=="function")try{if(v=t.props,S=h.prototype&&h.prototype.render,z=(f=h.contextType)&&a[f.__c],w=f?z?z.props.value:f.__:a,r.__c?y=(u=t.__c=r.__c).__=u.__E:(S?t.__c=u=new h(v,w):(t.__c=u=new Qe(v,w),u.constructor=h,u.render=ca),z&&z.sub(u),u.state||(u.state={}),u.__n=a,p=u.__d=!0,u.__h=[],u._sb=[]),S&&u.__s==null&&(u.__s=u.state),S&&h.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=me({},u.__s)),me(u.__s,h.getDerivedStateFromProps(v,u.__s))),g=u.props,_=u.state,u.__v=t,p)S&&h.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),S&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(S&&h.getDerivedStateFromProps==null&&v!==g&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,w),t.__v==r.__v||!u.__e&&u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,w)===!1){t.__v!=r.__v&&(u.props=v,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(L){L&&(L.__=t)}),Ve.push.apply(u.__h,u._sb),u._sb=[],u.__h.length&&s.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,w),S&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(g,_,T)})}if(u.context=w,u.props=v,u.__P=e,u.__e=!1,m=V.__r,b=0,S)u.state=u.__s,u.__d=!1,m&&m(t),f=u.render(u.props,u.state,u.context),Ve.push.apply(u.__h,u._sb),u._sb=[];else do u.__d=!1,m&&m(t),f=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++b<25);u.state=u.__s,u.getChildContext!=null&&(a=me(me({},a),u.getChildContext())),S&&!p&&u.getSnapshotBeforeUpdate!=null&&(T=u.getSnapshotBeforeUpdate(g,_)),q=f!=null&&f.type===ae&&f.key==null?ur(f.props.children):f,l=dr(e,Xe(q)?q:[q],t,r,a,n,i,s,l,c,d),u.base=t.__e,t.__u&=-161,u.__h.length&&s.push(u),y&&(u.__E=u.__=null)}catch(L){if(t.__v=null,c||i!=null)if(L.then){for(t.__u|=c?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(F=i.length;F--;)ht(i[F]);gt(t)}else t.__e=r.__e,t.__k=r.__k,L.then||gt(t);V.__e(L,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=da(r.__e,t,r,a,n,i,s,c,d);return(f=V.diffed)&&f(t),128&t.__u?void 0:l}function gt(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(gt))}function pr(e,t,r){for(var a=0;a<r.length;a++)yt(r[a],r[++a],r[++a]);V.__c&&V.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){V.__e(i,n.__v)}})}function ur(e){return typeof e!="object"||e==null||e.__b>0?e:Xe(e)?e.map(ur):me({},e)}function da(e,t,r,a,n,i,s,l,c){var d,f,u,p,g,_,T,y=r.props||Ue,v=t.props,S=t.type;if(S=="svg"?n="http://www.w3.org/2000/svg":S=="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),i!=null){for(d=0;d<i.length;d++)if((g=i[d])&&"setAttribute"in g==!!S&&(S?g.localName==S:g.nodeType==3)){e=g,i[d]=null;break}}if(e==null){if(S==null)return document.createTextNode(v);e=document.createElementNS(n,S,v.is&&v),l&&(V.__m&&V.__m(t,i),l=!1),i=null}if(S==null)y===v||l&&e.data==v||(e.data=v);else{if(i=i&&Ye.call(e.childNodes),!l&&i!=null)for(y={},d=0;d<e.attributes.length;d++)y[(g=e.attributes[d]).name]=g.value;for(d in y)g=y[d],d=="dangerouslySetInnerHTML"?u=g:d=="children"||d in v||d=="value"&&"defaultValue"in v||d=="checked"&&"defaultChecked"in v||Ne(e,d,null,g,n);for(d in v)g=v[d],d=="children"?p=g:d=="dangerouslySetInnerHTML"?f=g:d=="value"?_=g:d=="checked"?T=g:l&&typeof g!="function"||y[d]===g||Ne(e,d,g,y[d],n);if(f)l||u&&(f.__html==u.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(u&&(e.innerHTML=""),dr(t.type=="template"?e.content:e,Xe(p)?p:[p],t,r,a,S=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&Ce(r,0),l,c),i!=null)for(d=i.length;d--;)ht(i[d]);l||(d="value",S=="progress"&&_==null?e.removeAttribute("value"):_!=null&&(_!==e[d]||S=="progress"&&!_||S=="option"&&_!=y[d])&&Ne(e,d,_,y[d],n),d="checked",T!=null&&T!=e[d]&&Ne(e,d,T,y[d],n))}return e}function yt(e,t,r){try{if(typeof e=="function"){var a=typeof e.__u=="function";a&&e.__u(),a&&t==null||(e.__u=e(t))}else e.current=t}catch(n){V.__e(n,r)}}function fr(e,t,r){var a,n;if(V.unmount&&V.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||yt(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){V.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&fr(a[n],t,r||typeof e.type!="function");r||ht(e.__e),e.__c=e.__=e.__e=void 0}function ca(e,t,r){return this.constructor(e,r)}function Re(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),V.__&&V.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],vt(t,e=(!a&&r||t).__k=x(ae,null,[e]),n||Ue,Ue,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Ye.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),pr(i,e,s)}var Ye,V,ar,oa,be,er,nr,ir,ut,je,Me,sr,bt,ft,mt,aa,Ue,Ve,na,Xe,pe=ie(()=>{"use strict";Ue={},Ve=[],na=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Xe=Array.isArray;Ye=Ve.slice,V={__e:function(e,t,r,a){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,a||{}),s=n.__d),s)return n.__E=n}catch(l){e=l}throw e}},ar=0,oa=function(e){return e!=null&&e.constructor===void 0},Qe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=me({},this.state),typeof e=="function"&&(e=e(me({},r),this.props)),e&&me(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),tr(this))},Qe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),tr(this))},Qe.prototype.render=ae,be=[],nr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ir=function(e,t){return e.__v.__b-t.__v.__b},Ge.__r=0,ut=Math.random().toString(8),je="__d"+ut,Me="__a"+ut,sr=/(PointerCapture)$|Capture$/i,bt=0,ft=or(!1),mt=or(!0),aa=0});function Ze(e,t){ee.__h&&ee.__h(X,e,Le||t),Le=0;var r=X.__H||(X.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function R(e){return Le=1,pa(kr,e)}function pa(e,t,r){var a=Ze(Ee++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):kr(void 0,t),function(l){var c=a.__N?a.__N[0]:a.__[0],d=a.t(c,l);c!==d&&(a.__N=[d,a.__[1]],a.__c.setState({}))}],a.__c=X,!X.__f)){var n=function(l,c,d){if(!a.__c.__H)return!0;var f=a.__c.__H.__.filter(function(p){return p.__c});if(f.every(function(p){return!p.__N}))return!i||i.call(this,l,c,d);var u=a.__c.props!==l;return f.some(function(p){if(p.__N){var g=p.__[0];p.__=p.__N,p.__N=void 0,g!==p.__[0]&&(u=!0)}}),i&&i.call(this,l,c,d)||u};X.__f=!0;var i=X.shouldComponentUpdate,s=X.componentWillUpdate;X.componentWillUpdate=function(l,c,d){if(this.__e){var f=i;i=void 0,n(l,c,d),i=f}s&&s.call(this,l,c,d)},X.shouldComponentUpdate=n}return a.__N||a.__}function Q(e,t){var r=Ze(Ee++,3);!ee.__s&&kt(r.__H,t)&&(r.__=e,r.u=t,X.__H.__h.push(r))}function wt(e,t){var r=Ze(Ee++,4);!ee.__s&&kt(r.__H,t)&&(r.__=e,r.u=t,X.__h.push(r))}function G(e){return Le=5,ne(function(){return{current:e}},[])}function ne(e,t){var r=Ze(Ee++,7);return kt(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function ge(e,t){return Le=8,ne(function(){return e},t)}function ua(){for(var e;e=wr.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Je),t.__h.some(_t),t.__h=[]}catch(r){t.__h=[],ee.__e(r,e.__v)}}}function fa(e){var t,r=function(){clearTimeout(a),_r&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);_r&&(t=requestAnimationFrame(r))}function Je(e){var t=X,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),X=t}function _t(e){var t=X;e.__c=e.__(),X=t}function kt(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function kr(e,t){return typeof t=="function"?t(e):t}var Ee,X,xt,mr,Le,wr,ee,gr,br,hr,vr,yr,xr,_r,oe=ie(()=>{"use strict";pe();Le=0,wr=[],ee=V,gr=ee.__b,br=ee.__r,hr=ee.diffed,vr=ee.__c,yr=ee.unmount,xr=ee.__;ee.__b=function(e){X=null,gr&&gr(e)},ee.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),xr&&xr(e,t)},ee.__r=function(e){br&&br(e),Ee=0;var t=(X=e.__c).__H;t&&(xt===X?(t.__h=[],X.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Je),t.__h.some(_t),t.__h=[],Ee=0)),xt=X},ee.diffed=function(e){hr&&hr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(wr.push(t)!==1&&mr===ee.requestAnimationFrame||((mr=ee.requestAnimationFrame)||fa)(ua)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),xt=X=null},ee.__c=function(e,t){t.some(function(r){try{r.__h.some(Je),r.__h=r.__h.filter(function(a){return!a.__||_t(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],ee.__e(a,r.__v)}}),vr&&vr(e,t)},ee.unmount=function(e){yr&&yr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Je(a)}catch(n){t=n}}),r.__H=void 0,t&&ee.__e(t,r.__v))};_r=typeof requestAnimationFrame=="function"});function ro(e){return e==="en"?kn:wn}var wn,kn,oo=ie(()=>{"use strict";wn={"pastille.label":"Suivi des tests","pastille.loading":"Chargement\u2026","pastille.unavailable":"Statuts indisponibles","pastille.unknownPage":"Page inconnue","pastille.unknownPageHint":"Cette route n\u2019est pas encore au plan du site des tests.","panel.freshness":"Statuts g\xE9n\xE9r\xE9s le {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"Aucun sc\xE9nario li\xE9 \xE0 cette page.","panel.openSitemap":"Voir le plan du site","panel.sitemapLink":"Plan du site","panel.scenarioCountOne":"{count} sc\xE9nario","panel.scenarioCountMany":"{count} sc\xE9narios","panel.laneAutomated":"Automatis\xE9","panel.laneDev":"D\xE9v","panel.laneClient":"Client","lane.notTested":"Non test\xE9","lane.validatedBy":"Valid\xE9 par {by}","lane.rejectedBy":"Rejet\xE9 par {by}","lane.stale":"Valid\xE9 en v{version}, version actuelle v{current}","lane.clientPending":"Non test\xE9 \u2014 plateforme requise","lane.bot":"Automatis\xE9 (bot)","lane.code":"D\xE9veloppeur (code)","lane.human":"Humain","laneState.ok":"\xC0 jour","laneState.issue":"Probl\xE8me","laneState.none":"Non fait / p\xE9rim\xE9","color.green":"Valid\xE9","color.yellow":"En attente","color.red":"En \xE9chec","color.gray":"Non couvert","automated.passing":"R\xE9ussi","automated.failing":"En \xE9chec","automated.flaky":"Instable","automated.neverRun":"Jamais ex\xE9cut\xE9","source.testgen":"g\xE9n\xE9r\xE9","source.testgenHint":"Sc\xE9nario g\xE9n\xE9r\xE9 automatiquement (testgen)","suite.cases":"{count} cas","case.covered":"auto","case.manual":"manuel","case.blocked":"bloqu\xE9","case.openQuestion":"question produit","grounding.verified":"attendu v\xE9rifi\xE9","grounding.confirmLive":"\xE0 confirmer en live","grounding.productQuestion":"d\xE9cision produit","modal.title":"Plan du site \u2014 suivi des tests","modal.close":"Fermer","modal.tabPages":"Pages","modal.tabScenarios":"Sc\xE9narios","modal.youAreHere":"vous \xEAtes ici","modal.search":"Filtrer les sc\xE9narios\u2026","modal.noMatch":"Aucun sc\xE9nario ne correspond au filtre.","modal.traversed":"Travers\xE9es","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages avec \u2265 1 sc\xE9nario","modal.kpiScenariosPassing":"Sc\xE9narios passants","panel.noTests":"Aucun test ne couvre encore cette page.","panel.unknownPage":"Page inconnue du registre QA."},kn={"pastille.label":"Test tracking","pastille.loading":"Loading\u2026","pastille.unavailable":"Statuses unavailable","pastille.unknownPage":"Unknown page","pastille.unknownPageHint":"This route isn\u2019t in the test sitemap yet.","panel.freshness":"Statuses generated on {date} \xB7 version {version} \xB7 env {env}","panel.noScenarios":"No scenario linked to this page.","panel.openSitemap":"View sitemap","panel.sitemapLink":"Sitemap","panel.scenarioCountOne":"{count} scenario","panel.scenarioCountMany":"{count} scenarios","panel.laneAutomated":"Automated","panel.laneDev":"Dev","panel.laneClient":"Client","lane.notTested":"Not tested","lane.validatedBy":"Validated by {by}","lane.rejectedBy":"Rejected by {by}","lane.stale":"Validated in v{version}, current version v{current}","lane.clientPending":"Not tested \u2014 platform required","lane.bot":"Automated (bot)","lane.code":"Developer (code)","lane.human":"Human","laneState.ok":"Up to date","laneState.issue":"Issue","laneState.none":"Not done / stale","color.green":"Validated","color.yellow":"Pending","color.red":"Failing","color.gray":"Not covered","automated.passing":"Passing","automated.failing":"Failing","automated.flaky":"Flaky","automated.neverRun":"Never run","source.testgen":"generated","source.testgenHint":"Auto-generated scenario (testgen)","suite.cases":"{count} cases","case.covered":"auto","case.manual":"manual","case.blocked":"blocked","case.openQuestion":"product question","grounding.verified":"expected verified","grounding.confirmLive":"confirm live","grounding.productQuestion":"product decision","modal.title":"Sitemap \u2014 test tracking","modal.close":"Close","modal.tabPages":"Pages","modal.tabScenarios":"Scenarios","modal.youAreHere":"you are here","modal.search":"Filter scenarios\u2026","modal.noMatch":"No scenario matches the filter.","modal.traversed":"Traversed","modal.appliesTo":"{count} pages","modal.kpiPagesCovered":"Pages with \u2265 1 scenario","modal.kpiScenariosPassing":"Passing scenarios","panel.noTests":"No tests cover this page yet.","panel.unknownPage":"Page unknown to the QA registry."}});function Pt(e){if(!e)return"/";let t=e.startsWith("/")?e:`/${e}`;return t=t.replace(/\/{2,}/g,"/"),t.length>1&&(t=t.replace(/\/+$/,"")),t.length>0?t:"/"}function Sn(e,t){let r=t.length;for(;r>0;){let a=t[r-1];if(a!==void 0&&a.startsWith(":")&&a.endsWith("?"))r--;else break}return e.length<r||e.length>t.length?!1:e.every((a,n)=>{let i=t[n];return i!==void 0&&(i.startsWith(":")||i===a)})}function no(e,t){let r=ao(Pt(e)),a=null,n=-1;for(let i of t){let s=ao(i);if(!Sn(r,s))continue;let c=s.filter(d=>!d.startsWith(":")).length*100+s.length;c>n&&(a=i,n=c)}return a}var ao,Tt=ie(()=>{"use strict";ao=e=>e.split("/").filter(Boolean)});var io,so=ie(()=>{"use strict";io=`
2
2
  :host {
3
3
  --mqa-z-index: 2147483639;
4
4
  --mqa-z-panel: 2147483638;
@@ -613,12 +613,12 @@
613
613
  background: var(--mqa-surface);
614
614
  border-radius: 4px;
615
615
  }
616
- `});function Fe(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function he(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function it(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function st(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("fr-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function lt(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var Be,no,io,so,lo,ct=ie(()=>{"use strict";Be={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},no={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},io={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},so={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},lo={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function co({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[no[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return _("div",{class:"qa-pastille"},_("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${Be[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},_("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},_("polyline",{points:"1,6 7,6 9,2 12,10 15,4 17,6 23,6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"}))))}var po=ie(()=>{"use strict";de();ct()});function Ie({dev:e,bot:t,human:r,strings:a}){return _("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},_("span",{class:`qa-lanes__icon qa-lane ${At[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},_("path",{d:"M8 7l-5 5 5 5M16 7l5 5-5 5",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"}))),_("span",{class:`qa-lanes__icon qa-lane ${At[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),_("path",{d:"M12 4.5v4"}),_("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),_("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),_("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),_("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),_("span",{class:`qa-lanes__icon qa-lane ${At[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},_("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},_("circle",{cx:"12",cy:"8",r:"3.6"}),_("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var At,Mt=ie(()=>{"use strict";de();At={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function _n(e){return{dev:he(e.dev),bot:Fe(e.automated),human:he(e.client)}}function wn(e){var a,n,i;let t=new Map;for(let s of e){let l=(n=(a=s.group)==null?void 0:a.key)!=null?n:"\xB7",d=(i=t.get(l))!=null?i:[];d.push(s),t.set(l,d)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var d,c,f;let l=t.get(s);return{key:s,label:(f=(c=(d=l[0])==null?void 0:d.group)==null?void 0:c.label)!=null?f:"",scenarios:l}})}function uo(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function fo({scenario:e,strings:t}){let r=_n(e),a=e.automated.provenance;return _("li",{class:"qa-row","data-testid":"qa-scenario-row"},_("span",{class:"qa-row__title"},e.priority?_("span",{class:`qa-tag ${io[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,_("span",{class:"qa-row__name"},e.title),e.source==="testgen"?_("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?_("span",{class:"qa-tag"},t[so[e.caseStatus]]):null,e.grounding?_("span",{class:"qa-tag"},t[lo[e.grounding]]):null,a?_("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),_(Ie,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function mo({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=P(new Set),s=f=>{i(u=>{let p=new Set(u);return p.has(f)?p.delete(f):p.add(f),p})},l=uo(a["panel.freshness"],{date:st(r.generated_at),version:lt(r.app_version),env:r.environment}),d;if(t==="no-tests")d=_("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")d=_("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let f=(c=e==null?void 0:e.scenarios)!=null?c:[],u=f.some(p=>p.group);if(f.length===0)d=_("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!u)d=_("ul",{class:"qa-panel__list"},f.map(p=>_(fo,{key:p.id,scenario:p,strings:a})));else{let p=wn(f);d=_("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},p.map(g=>{let y=n.has(g.key),C={dev:it(g.scenarios.map(x=>he(x.dev))),bot:it(g.scenarios.map(x=>Fe(x.automated))),human:it(g.scenarios.map(x=>he(x.client)))};return _("li",{key:g.key,class:"qa-suite","data-testid":"qa-panel-group"},_("button",{type:"button",class:"qa-suite__head","aria-expanded":y,"data-testid":"qa-suite-group",onClick:()=>s(g.key)},_("span",{class:`qa-suite__chev ${y?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),_("span",{class:"qa-suite__key"},g.key),_("span",{class:"qa-suite__label"},g.label),_("span",{class:"qa-suite__count"},uo(a["suite.cases"],{count:g.scenarios.length})),_(Ie,{dev:C.dev,bot:C.bot,human:C.human,strings:a})),y?_("ul",{class:"qa-suite__list"},g.scenarios.map(x=>_(fo,{key:x.id,scenario:x,strings:a}))):null)}))}}return _("section",{class:"qa-panel","data-testid":"qa-panel"},d,_("footer",{class:"qa-panel__foot"},_("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var go=ie(()=>{"use strict";de();re();Mt();ct()});function kn(e){var n;let t=new Map;for(let i of e){let s=(n=t.get(i.parent_id))!=null?n:[];s.push(i),t.set(i.parent_id,s)}for(let i of t.values())i.sort((s,l)=>s.order-l.order);let r=[],a=(i,s)=>{var l,d;for(let c of(l=t.get(i))!=null?l:[]){let f=(d=t.get(c.id))!=null?d:[];r.push({node:c,depth:s,hasChildren:f.length>0}),f.length>0&&a(c.id,s+1)}};return a(null,0),r}function Sn(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let d=(a=l.external_key)!=null?a:l.id,c=(n=t.get(d))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let f of(i=l.pages)!=null?i:[])(f.role==="primary"?c.primaries:c.traversed).add(f.pattern);t.set(d,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var f,u,p,g;let d=(u=(f=s.scenario.group)==null?void 0:f.key)!=null?u:"~",c=(g=(p=l.scenario.group)==null?void 0:p.key)!=null?g:"~";return d!==c?d.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function bo(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function ho(e){return`${Math.round(e)}%`}function vo({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=P("pages"),[s,l]=P("");W(()=>{let x=w=>{w.key==="Escape"&&a()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[a]);let d=t?Et(t):null,c=ne(()=>kn(e.sitemap),[e]),f=ne(()=>Sn(e),[e]),u=ne(()=>{let x=new Map;for(let w of e.sitemap)x.set(w.path_pattern,w.title);return x},[e]),p=x=>{var w;return(w=u.get(x))!=null?w:x},g=s.trim().toLowerCase(),y=g?f.filter(x=>{var w,q;return x.scenario.title.toLowerCase().includes(g)||((q=(w=x.scenario.group)==null?void 0:w.label)!=null?q:"").toLowerCase().includes(g)}):f,C=bo(r["panel.freshness"],{date:st(e.generated_at),version:lt(e.app_version),env:e.environment});return _("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:x=>{x.target===x.currentTarget&&a()}},_("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},_("header",{class:"qa-modal__head"},_("h3",null,r["modal.title"]),_("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),_("div",{class:"qa-modal__freshness"},C),_("div",{class:"qa-kpi","data-testid":"qa-kpi"},_("div",{class:"qa-kpi__item"},_("span",{class:"qa-kpi__value"},ho(e.metric.pages_with_scenarios_pct)),_("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),_("div",{class:"qa-kpi__item"},_("span",{class:"qa-kpi__value"},ho(e.metric.scenarios_passing_pct)),_("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),_("nav",{class:"qa-tabs"},_("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),_("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),_("div",{class:"qa-modal__body"},n==="pages"?_("ul",{class:"qa-tree"},c.map(x=>{let w=d!==null&&x.node.path_pattern===d;return _("li",{key:x.node.id,class:`qa-tree__row ${w?"qa-tree__row--here":""}`,"data-testid":w?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+x.depth*1.1}rem`}},_("span",{class:`qa-dot ${Be[x.node.color]}`,"aria-hidden":"true"}),_("span",{class:`qa-tree__title ${x.node.structural?"qa-tree__title--structural":""}`},x.node.title||x.node.path_pattern),w?_("span",{class:"qa-tree__here"},` ${x.node.path_pattern} `):null,w?_("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,_("span",{class:"qa-tree__count"},String(x.node.counts.scenarios)))})):_("div",{class:"qa-scenarios"},_("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:x=>l(x.target.value)}),y.length===0?_("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):_("ul",{class:"qa-scenarios__list"},y.map(x=>{var k,m;let w=x.scenario,q={dev:he(w.dev),bot:Fe(w.automated),human:he(w.client)},z=[...x.traversed].map(p);return _("li",{key:(k=w.external_key)!=null?k:w.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},_("div",{class:"qa-scenarios__line"},_("span",{class:`qa-dot ${Be[w.color]}`,"aria-hidden":"true"}),(m=w.group)!=null&&m.key?_("span",{class:"qa-suitekey"},w.group.key):null,_("span",{class:"qa-scenarios__title"},w.title),w.source==="testgen"?_("span",{class:"qa-tag"},r["source.testgen"]):null,_(Ie,{dev:q.dev,bot:q.bot,human:q.human,strings:r})),_("div",{class:"qa-scenarios__pages"},x.primaries.size?_("span",{class:"qa-scenarios__primary"},bo(r["modal.appliesTo"],{count:x.primaries.size})):null,z.length?_("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${z.join(", ")}`):null))}))))))}var yo=ie(()=>{"use strict";de();re();Mt();Tt();ct()});function Cn(){if(dt++,pt)return;pt=!0,De=history.pushState,$e=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(Lt))};history.pushState=function(...r){let a=De.apply(this,r);return e(),a},history.replaceState=function(...r){let a=$e.apply(this,r);return e(),a}}function Rn(){dt>0&&dt--,!(dt>0||!pt)&&(pt=!1,De&&(history.pushState=De),$e&&(history.replaceState=$e),De=null,$e=null)}function xo(e){return typeof e=="object"&&e!==null&&e.format===qn}function wo(){_o||(_o=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function En(e){let t=new Set;for(let r of e.pages)r.page&&t.add(r.page.path_pattern);for(let r of e.sitemap)t.add(r.path_pattern);return[...t]}function An(e,t){if(!e||!t)return Tn;let r=e.pages.find(n=>n.page&&n.page.path_pattern===t);return r&&r.page?{state:"known",color:r.color,pattern:t,page:r}:e.sitemap.some(n=>n.path_pattern===t)?{state:"no-tests",color:"gray",pattern:t,page:null}:{state:"unknown-page",color:"gray",pattern:t,page:null}}function ko(e){var E,F,h,B;let{source:t}=e,r=Zr((E=e.locale)!=null?E:"fr"),a=typeof t=="object"?t:null;if(a&&!xo(a))return wo(),Pn;let n=a,i=!1,s=null;function l(){if(n||i)return;i=!0,s=(typeof t=="function"?t():typeof t=="string"?fetch(t).then($=>$.json()):Promise.resolve(t)).then($=>{xo($)?(n=$,p()):wo()}).catch(()=>{})}let d=document.createElement("div");d.setAttribute("data-mqa-host",""),d.setAttribute("data-mqa-size",(F=e.size)!=null?F:"md"),((h=e.position)==null?void 0:h.right)!==void 0&&d.style.setProperty("--mqa-right",`${e.position.right}px`),((B=e.position)==null?void 0:B.bottom)!==void 0&&d.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(d);let c=d.attachShadow({mode:"open"}),f=document.createElement("style");f.textContent=oo,c.appendChild(f);let u=document.createElement("div");c.appendChild(u);let p=()=>{};function g(){return e.getCurrentPage?e.getCurrentPage():n?ro(window.location.pathname,En(n)):null}function y(){let[D,$]=P(0),H=me(()=>$(G=>G+1),[]);p=H;let R=An(n,g()),I=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},O=me(()=>{l()},[]),J=me(()=>{l(),C=!0,H()},[]),ee=me(()=>{C=!1,H()},[]);return W(()=>{let G=()=>H();return window.addEventListener("popstate",G),window.addEventListener(Lt,G),()=>{window.removeEventListener("popstate",G),window.removeEventListener(Lt,G)}},[]),_("div",{class:"qa-pastille-wrap",onMouseEnter:z,onMouseLeave:k},x?_("div",{class:"qa-panel-anchor"},_(mo,{page:R.page,state:R.state,meta:I,strings:r})):null,_(co,{color:R.color,state:R.state,strings:r,onHover:()=>{z(),x=!0,O(),H()},onOpenModal:J}),C&&n?_(vo,{artifact:n,currentPattern:R.pattern,strings:r,onClose:ee}):null)}let C=!1,x=!1,w=null,q=140;function z(){w!==null&&(clearTimeout(w),w=null)}function k(){z(),w=setTimeout(()=>{w=null,!v&&(x=!1,p())},q)}function m(){Re(_(y,{}),u)}m(),Cn();let v=!1;return{open(){v||(l(),C=!0,p())},close(){v||(C=!1,p())},dispose(){v||(v=!0,z(),Re(null,u),d.remove(),Rn())}}}var Lt,pt,dt,De,$e,qn,_o,Pn,Tn,So=ie(()=>{"use strict";de();re();eo();Tt();ao();po();go();yo();Lt="mqa:locationchange",pt=!1,dt=0,De=null,$e=null;qn=1;_o=!1;Pn={open(){},close(){},dispose(){}};Tn={state:"unknown-page",color:"gray",pattern:null,page:null}});var Co={};Nt(Co,{createQaMeter:()=>Mn});function Mn(e){return ko(e)}var Ro=ie(()=>{"use strict";So()});var Dn={};Nt(Dn,{createFeedback:()=>In});var Ho=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function No(e){let t;try{t=new URL(e)}catch(r){throw new Error(`[mhosaic-feedback] \`endpoint\` is not a valid URL: ${e}`)}if(t.protocol!=="https:"&&!(t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]")))throw new Error(`[mhosaic-feedback] \`endpoint\` must use https:// (got ${t.protocol}//${t.hostname}). http:// is only allowed for localhost in dev.`)}var Ae=class extends Error{constructor(r){super(`rate limited; retry after ${r}s`);Te(this,"retryAfterSeconds");this.name="RateLimitError",this.retryAfterSeconds=r}};function jo(e){let t=e.headers.get("Retry-After"),r=t?Number.parseInt(t,10):NaN;return Number.isFinite(r)&&r>=0?r:0}async function Wt(e,t){if(e.status===429)throw new Ae(jo(e));if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`${t} failed: ${e.status} ${r}`)}}async function jt(e,t){await Wt(e,t);let r=await e.json().catch(()=>{});if(!Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an array)`);return r}async function He(e,t){await Wt(e,t);let r=await e.json().catch(()=>{});if(r===null||typeof r!="object"||Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an object)`);return r}function Qt(e){var q,z;let t=((q=e.endpoint)!=null?q:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');No(t);let r=(z=e.fetch)!=null?z:globalThis.fetch;async function a(k){var D,$,H,R;let m=k;if(e.beforeSend&&(m=await e.beforeSend(k)),m===!1)throw new Error("Submission cancelled by beforeSend");let v=new FormData;for(let I of Ho)v.append(I,String(m[I]));v.append("technical_context",JSON.stringify(m.technical_context)),((D=m.screenshots)!=null&&D.length?m.screenshots:m.screenshot?[m.screenshot]:[]).forEach((I,O)=>{v.append("screenshot",I,O===0?"screenshot.png":`screenshot-${O+1}.png`)}),m.synthetic&&v.append("synthetic","true"),($=m.user)!=null&&$.id&&v.append("user",JSON.stringify(m.user)),m.widget_version&&v.append("widget_version",m.widget_version),m.page_path&&v.append("page_path",m.page_path);let F={Authorization:`Bearer ${e.apiKey}`};m.synthetic&&(F["X-Mhosaic-Capture-Source"]="error-tracking");let h=(H=e.getSignedIdentity)==null?void 0:H.call(e);h&&h.userHash&&h.exp&&((R=m.user)!=null&&R.id)&&(F["X-Mhosaic-User"]=String(m.user.id),F["X-Mhosaic-User-Hmac"]=h.userHash,F["X-Mhosaic-User-Exp"]=String(h.exp),h.email&&(F["X-Mhosaic-User-Email"]=h.email));let B=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:F,body:v});if(!B.ok){let I=await B.text().catch(()=>"");throw new Error(`Feedback submit failed: ${B.status} ${I}`)}return B.json()}function n(k){var E;let m={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":k},v=(E=e.getSignedIdentity)==null?void 0:E.call(e);return v&&v.userHash&&v.exp&&(m["X-Mhosaic-User-Hmac"]=v.userHash,m["X-Mhosaic-User-Exp"]=String(v.exp),v.email&&(m["X-Mhosaic-User-Email"]=v.email)),m}async function i(k){let m=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(k)});return m.status===404?[]:jt(m,"listMine")}async function s(k){var h;if(((h=k==null?void 0:k.onLine)!=null?h:typeof navigator!="undefined"?navigator.onLine:!0)===!1)return"offline";let v=`${t}/api/feedback/v1/widget-manifest/?pk=${encodeURIComponent(e.apiKey)}`,E;try{E=await r(v,{method:"GET",redirect:"manual"})}catch(B){return"blocked"}if(E.type==="opaqueredirect"||E.status>=300&&E.status<400)return"intercepted";let F;try{F=await r(v,{method:"GET",headers:{Authorization:`Bearer ${e.apiKey}`}})}catch(B){return"preflight"}return F.status===401||F.status===403?"key":F.status===429?"throttle":"healthy"}async function l(k){let m=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(k)});return m.status===404?[]:jt(m,"listChangelog")}async function d(k,m,v){let E=await r(`${t}/api/feedback/v1/reports/widget/${k}/`,{method:"GET",headers:n(m),...v!=null&&v.signal?{signal:v.signal}:{}});return He(E,"getReport")}async function c(k,m){let v=await r(`${t}/api/feedback/v1/reports/widget/by-seq/${k}/`,{method:"GET",headers:n(m)});return He(v,"getReportBySeq")}async function f(k,m,v,E,F){let h;if(F&&F.length>0){let D=new FormData;D.append("body",v),E!==void 0&&D.append("client_nonce",E),F.forEach(($,H)=>D.append("attachment",$,`attachment-${H+1}.png`)),h={method:"POST",headers:n(m),body:D}}else h={method:"POST",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({body:v,...E!==void 0&&{client_nonce:E}})};let B=await r(`${t}/api/feedback/v1/reports/widget/${k}/comments/`,h);if(!B.ok){let D=await B.text().catch(()=>"");throw new Error(`addComment failed: ${B.status} ${D}`)}return B.json()}async function u(k,m,v){let E=await r(`${t}/api/feedback/v1/reports/widget/${k}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({description:v})});if(!E.ok){let F=await E.text().catch(()=>"");throw new Error(`editDescription failed: ${E.status} ${F}`)}return E.json()}async function p(k,m){let v=await r(`${t}/api/feedback/v1/reports/widget/${k}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!v.ok){let E=await v.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${v.status} ${E}`)}return v.json()}async function g(k,m){let v=await r(`${t}/api/feedback/v1/reports/widget/${k}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!v.ok){let E=await v.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${v.status} ${E}`)}return v.json()}function y(k){var E,F,h;if(!k)return"";let m=new URLSearchParams;(E=k.status)==null||E.forEach(B=>m.append("status",B)),(F=k.type)==null||F.forEach(B=>m.append("type",B)),(h=k.severity)==null||h.forEach(B=>m.append("severity",B)),k.q&&m.set("q",k.q),k.mine&&m.set("mine","1"),k.ordering&&m.set("ordering",k.ordering),k.page&&k.page>1&&m.set("page",String(k.page)),k.pagePath&&m.set("page_path",k.pagePath);let v=m.toString();return v?`?${v}`:""}async function C(k,m,v){let E=await r(`${t}/api/feedback/v1/reports/widget/board/${y(m)}`,{method:"GET",headers:n(k),...v!=null&&v.signal?{signal:v.signal}:{}});if(E.status===404)return{count:0,next:null,previous:null,results:[]};let F=await He(E,"listBoard");if(!Array.isArray(F.results))throw new Error("listBoard: unexpected response shape (missing results[])");return F}async function x(k,m,v){let E=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${y(m)}`,{method:"GET",headers:n(k),...v!=null&&v.signal?{signal:v.signal}:{}});return E.status===404?{total:0,by_status:{},resolution_rate:0,scope:"mine"}:He(E,"fetchBoardKpis")}async function w(k,m){let v=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(k),"Content-Type":"application/json"},body:JSON.stringify({external_id:k,...m?{email:m}:{}})});if(!v.ok)throw new Error(`checkVisibility failed: ${v.status}`);return!!(await v.json()).show}return{submitReport:a,checkVisibility:w,listMine:i,listChangelog:l,diagnose:s,endpointHost:(()=>{try{return new URL(t).host}catch(k){return t}})(),getReport:d,getReportBySeq:c,addComment:f,editDescription:u,closeAsResolved:p,reopenUnresolved:g,listBoard:C,fetchBoardKpis:x}}var Wo=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Qo=[/^eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,/^(?:sk|pk)_proj_[A-Za-z0-9_-]{16,}$/,/^gh[pousr]_[A-Za-z0-9]{30,}$/,/^(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}$/,/^AKIA[0-9A-Z]{12,}$/,/^xox[abprso]-[A-Za-z0-9-]{12,}$/,/^[a-f0-9]{40,}$/i,/^[A-Za-z0-9_-]{40,}$/];function Uo(e){return Qo.some(t=>t.test(e))}function ye(e){try{let t=/^https?:\/\//i.test(e),r=e.startsWith("/");if(!t&&!r)return e;let a=typeof window!="undefined"?window.location.origin:"http://localhost",n=new URL(e,a),i=new URLSearchParams;return n.searchParams.forEach((s,l)=>{Wo.test(l)||Uo(s)?i.set(l,"[redacted]"):i.set(l,s)}),n.search=i.toString(),n.hash=n.hash?"#[redacted]":"",n.toString()}catch(t){return e}}var Vo=[/\b(?:sk|pk)_proj_[A-Za-z0-9_*-]+/g,/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,/\bBearer\s+[A-Za-z0-9._~+/=-]{16,}\b/g,/\bAuthorization\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{16,}["']?/gi,/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,/\b(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}\b/g,/\bAKIA[0-9A-Z]{12,}\b/g,/\bxox[abprso]-[A-Za-z0-9-]{12,}\b/g,/\bAIza[0-9A-Za-z_-]{35}\b/g,/\bsk-(?:proj-|svcacct-)?[A-Za-z0-9_-]{20,}\b/g,/\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{40,}\b/g,/\bAC[a-f0-9]{32}\b/g,/\bSK[a-f0-9]{32}\b/g];function le(e){let t=e;for(let r of Vo)t=t.replace(r,"[redacted-token]");return t}function Ut(){var l;let e=navigator,t=(l=e.connection)==null?void 0:l.effectiveType,r=e.deviceMemory,a=document.referrer||void 0,n=a!==void 0?ye(a):void 0,i=ye(window.location.pathname+window.location.search),s;try{let d=new URL(i,window.location.origin);s=d.pathname+d.search}catch(d){s=window.location.pathname}return{viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},screen:{w:window.screen.width,h:window.screen.height},platform:e.platform,language:e.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,timezoneOffset:new Date().getTimezoneOffset(),...t!==void 0&&{connection:t},online:e.onLine,...r!==void 0&&{deviceMemory:r},hardwareConcurrency:e.hardwareConcurrency,...n!==void 0&&{referrer:n},title:le(document.title||"").slice(0,200),pathname:s}}function Go(e){if(e==null)return String(e);if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(e instanceof Error)return`${e.name}: ${e.message}`;if(e instanceof Element)return`<${e.tagName.toLowerCase()}>`;try{return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)}catch(t){try{return String(e)}catch(r){return"[unserializable]"}}}function Vt(e){let t=["log","info","warn","error","debug"],r={};for(let a of t){let n=console[a];typeof n=="function"&&(r[a]=n,console[a]=function(...s){try{let l=s.map(Go).join(" "),d=le(l).slice(0,2e3),c={level:a,message:d,ts:Date.now()};if(a==="error"){let f=new Error().stack;f&&(c.stack=f.split(`
616
+ `});function Fe(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function ve(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function it(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function st(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("fr-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function lt(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var Be,lo,co,po,uo,dt=ie(()=>{"use strict";Be={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},lo={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},co={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},po={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},uo={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function fo({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[lo[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return x("div",{class:"qa-pastille"},x("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${Be[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},x("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},x("polyline",{points:"1,6 7,6 9,2 12,10 15,4 17,6 23,6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"}))))}var mo=ie(()=>{"use strict";pe();dt()});function Ie({dev:e,bot:t,human:r,strings:a}){return x("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},x("span",{class:`qa-lanes__icon qa-lane ${qt[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},x("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},x("path",{d:"M8 7l-5 5 5 5M16 7l5 5-5 5",fill:"none",stroke:"currentColor","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"}))),x("span",{class:`qa-lanes__icon qa-lane ${qt[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},x("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},x("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),x("path",{d:"M12 4.5v4"}),x("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),x("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),x("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),x("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),x("span",{class:`qa-lanes__icon qa-lane ${qt[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},x("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},x("circle",{cx:"12",cy:"8",r:"3.6"}),x("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var qt,At=ie(()=>{"use strict";pe();qt={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function Cn(e){return{dev:ve(e.dev),bot:Fe(e.automated),human:ve(e.client)}}function Rn(e){var a,n,i;let t=new Map;for(let s of e){let l=(n=(a=s.group)==null?void 0:a.key)!=null?n:"\xB7",c=(i=t.get(l))!=null?i:[];c.push(s),t.set(l,c)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var c,d,f;let l=t.get(s);return{key:s,label:(f=(d=(c=l[0])==null?void 0:c.group)==null?void 0:d.label)!=null?f:"",scenarios:l}})}function go(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function bo({scenario:e,strings:t}){let r=Cn(e),a=e.automated.provenance;return x("li",{class:"qa-row","data-testid":"qa-scenario-row"},x("span",{class:"qa-row__title"},e.priority?x("span",{class:`qa-tag ${co[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,x("span",{class:"qa-row__name"},e.title),e.source==="testgen"?x("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?x("span",{class:"qa-tag"},t[po[e.caseStatus]]):null,e.grounding?x("span",{class:"qa-tag"},t[uo[e.grounding]]):null,a?x("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),x(Ie,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function ho({page:e,state:t,meta:r,strings:a}){var d;let[n,i]=R(new Set),s=f=>{i(u=>{let p=new Set(u);return p.has(f)?p.delete(f):p.add(f),p})},l=go(a["panel.freshness"],{date:st(r.generated_at),version:lt(r.app_version),env:r.environment}),c;if(t==="no-tests")c=x("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")c=x("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let f=(d=e==null?void 0:e.scenarios)!=null?d:[],u=f.some(p=>p.group);if(f.length===0)c=x("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!u)c=x("ul",{class:"qa-panel__list"},f.map(p=>x(bo,{key:p.id,scenario:p,strings:a})));else{let p=Rn(f);c=x("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},p.map(g=>{let _=n.has(g.key),T={dev:it(g.scenarios.map(y=>ve(y.dev))),bot:it(g.scenarios.map(y=>Fe(y.automated))),human:it(g.scenarios.map(y=>ve(y.client)))};return x("li",{key:g.key,class:"qa-suite","data-testid":"qa-panel-group"},x("button",{type:"button",class:"qa-suite__head","aria-expanded":_,"data-testid":"qa-suite-group",onClick:()=>s(g.key)},x("span",{class:`qa-suite__chev ${_?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),x("span",{class:"qa-suite__key"},g.key),x("span",{class:"qa-suite__label"},g.label),x("span",{class:"qa-suite__count"},go(a["suite.cases"],{count:g.scenarios.length})),x(Ie,{dev:T.dev,bot:T.bot,human:T.human,strings:a})),_?x("ul",{class:"qa-suite__list"},g.scenarios.map(y=>x(bo,{key:y.id,scenario:y,strings:a}))):null)}))}}return x("section",{class:"qa-panel","data-testid":"qa-panel"},c,x("footer",{class:"qa-panel__foot"},x("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var vo=ie(()=>{"use strict";pe();oe();At();dt()});function En(e){var n;let t=new Map;for(let i of e){let s=(n=t.get(i.parent_id))!=null?n:[];s.push(i),t.set(i.parent_id,s)}for(let i of t.values())i.sort((s,l)=>s.order-l.order);let r=[],a=(i,s)=>{var l,c;for(let d of(l=t.get(i))!=null?l:[]){let f=(c=t.get(d.id))!=null?c:[];r.push({node:d,depth:s,hasChildren:f.length>0}),f.length>0&&a(d.id,s+1)}};return a(null,0),r}function Pn(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let c=(a=l.external_key)!=null?a:l.id,d=(n=t.get(c))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let f of(i=l.pages)!=null?i:[])(f.role==="primary"?d.primaries:d.traversed).add(f.pattern);t.set(c,d)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var f,u,p,g;let c=(u=(f=s.scenario.group)==null?void 0:f.key)!=null?u:"~",d=(g=(p=l.scenario.group)==null?void 0:p.key)!=null?g:"~";return c!==d?c.localeCompare(d):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function yo(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function xo(e){return`${Math.round(e)}%`}function _o({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=R("pages"),[s,l]=R("");Q(()=>{let y=v=>{v.key==="Escape"&&a()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[a]);let c=t?Pt(t):null,d=ne(()=>En(e.sitemap),[e]),f=ne(()=>Pn(e),[e]),u=ne(()=>{let y=new Map;for(let v of e.sitemap)y.set(v.path_pattern,v.title);return y},[e]),p=y=>{var v;return(v=u.get(y))!=null?v:y},g=s.trim().toLowerCase(),_=g?f.filter(y=>{var v,S;return y.scenario.title.toLowerCase().includes(g)||((S=(v=y.scenario.group)==null?void 0:v.label)!=null?S:"").toLowerCase().includes(g)}):f,T=yo(r["panel.freshness"],{date:st(e.generated_at),version:lt(e.app_version),env:e.environment});return x("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:y=>{y.target===y.currentTarget&&a()}},x("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},x("header",{class:"qa-modal__head"},x("h3",null,r["modal.title"]),x("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),x("div",{class:"qa-modal__freshness"},T),x("div",{class:"qa-kpi","data-testid":"qa-kpi"},x("div",{class:"qa-kpi__item"},x("span",{class:"qa-kpi__value"},xo(e.metric.pages_with_scenarios_pct)),x("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),x("div",{class:"qa-kpi__item"},x("span",{class:"qa-kpi__value"},xo(e.metric.scenarios_passing_pct)),x("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),x("nav",{class:"qa-tabs"},x("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),x("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),x("div",{class:"qa-modal__body"},n==="pages"?x("ul",{class:"qa-tree"},d.map(y=>{let v=c!==null&&y.node.path_pattern===c;return x("li",{key:y.node.id,class:`qa-tree__row ${v?"qa-tree__row--here":""}`,"data-testid":v?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+y.depth*1.1}rem`}},x("span",{class:`qa-dot ${Be[y.node.color]}`,"aria-hidden":"true"}),x("span",{class:`qa-tree__title ${y.node.structural?"qa-tree__title--structural":""}`},y.node.title||y.node.path_pattern),v?x("span",{class:"qa-tree__here"},` ${y.node.path_pattern} `):null,v?x("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,x("span",{class:"qa-tree__count"},String(y.node.counts.scenarios)))})):x("div",{class:"qa-scenarios"},x("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:y=>l(y.target.value)}),_.length===0?x("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):x("ul",{class:"qa-scenarios__list"},_.map(y=>{var w,m;let v=y.scenario,S={dev:ve(v.dev),bot:Fe(v.automated),human:ve(v.client)},z=[...y.traversed].map(p);return x("li",{key:(w=v.external_key)!=null?w:v.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},x("div",{class:"qa-scenarios__line"},x("span",{class:`qa-dot ${Be[v.color]}`,"aria-hidden":"true"}),(m=v.group)!=null&&m.key?x("span",{class:"qa-suitekey"},v.group.key):null,x("span",{class:"qa-scenarios__title"},v.title),v.source==="testgen"?x("span",{class:"qa-tag"},r["source.testgen"]):null,x(Ie,{dev:S.dev,bot:S.bot,human:S.human,strings:r})),x("div",{class:"qa-scenarios__pages"},y.primaries.size?x("span",{class:"qa-scenarios__primary"},yo(r["modal.appliesTo"],{count:y.primaries.size})):null,z.length?x("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${z.join(", ")}`):null))}))))))}var wo=ie(()=>{"use strict";pe();oe();At();Tt();dt()});function Tn(){if(ct++,pt)return;pt=!0,De=history.pushState,$e=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(Mt))};history.pushState=function(...r){let a=De.apply(this,r);return e(),a},history.replaceState=function(...r){let a=$e.apply(this,r);return e(),a}}function qn(){ct>0&&ct--,!(ct>0||!pt)&&(pt=!1,De&&(history.pushState=De),$e&&(history.replaceState=$e),De=null,$e=null)}function ko(e){return typeof e=="object"&&e!==null&&e.format===An}function Co(){So||(So=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function Ln(e){let t=new Set;for(let r of e.pages)r.page&&t.add(r.page.path_pattern);for(let r of e.sitemap)t.add(r.path_pattern);return[...t]}function Bn(e,t){if(!e||!t)return zn;let r=e.pages.find(n=>n.page&&n.page.path_pattern===t);return r&&r.page?{state:"known",color:r.color,pattern:t,page:r}:e.sitemap.some(n=>n.path_pattern===t)?{state:"no-tests",color:"gray",pattern:t,page:null}:{state:"unknown-page",color:"gray",pattern:t,page:null}}function Ro(e){var q,F,h,L;let{source:t}=e,r=ro((q=e.locale)!=null?q:"fr"),a=typeof t=="object"?t:null;if(a&&!ko(a))return Co(),Mn;let n=a,i=!1,s=null;function l(){if(n||i)return;i=!0,s=(typeof t=="function"?t():typeof t=="string"?fetch(t).then(K=>K.json()):Promise.resolve(t)).then(K=>{ko(K)?(n=K,p()):Co()}).catch(()=>{})}let c=document.createElement("div");c.setAttribute("data-mqa-host",""),c.setAttribute("data-mqa-size",(F=e.size)!=null?F:"md"),((h=e.position)==null?void 0:h.right)!==void 0&&c.style.setProperty("--mqa-right",`${e.position.right}px`),((L=e.position)==null?void 0:L.bottom)!==void 0&&c.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(c);let d=c.attachShadow({mode:"open"}),f=document.createElement("style");f.textContent=io,d.appendChild(f);let u=document.createElement("div");d.appendChild(u);let p=()=>{};function g(){return e.getCurrentPage?e.getCurrentPage():n?no(window.location.pathname,Ln(n)):null}function _(){let[D,K]=R(0),N=ge(()=>K(J=>J+1),[]);p=N;let C=Bn(n,g()),B=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},H=ge(()=>{l()},[]),Y=ge(()=>{l(),T=!0,N()},[]),re=ge(()=>{T=!1,N()},[]);return Q(()=>{let J=()=>N();return window.addEventListener("popstate",J),window.addEventListener(Mt,J),()=>{window.removeEventListener("popstate",J),window.removeEventListener(Mt,J)}},[]),x("div",{class:"qa-pastille-wrap",onMouseEnter:z,onMouseLeave:w},y?x("div",{class:"qa-panel-anchor"},x(ho,{page:C.page,state:C.state,meta:B,strings:r})):null,x(fo,{color:C.color,state:C.state,strings:r,onHover:()=>{z(),y=!0,H(),N()},onOpenModal:Y}),T&&n?x(_o,{artifact:n,currentPattern:C.pattern,strings:r,onClose:re}):null)}let T=!1,y=!1,v=null,S=140;function z(){v!==null&&(clearTimeout(v),v=null)}function w(){z(),v=setTimeout(()=>{v=null,!b&&(y=!1,p())},S)}function m(){Re(x(_,{}),u)}m(),Tn();let b=!1;return{open(){b||(l(),T=!0,p())},close(){b||(T=!1,p())},dispose(){b||(b=!0,z(),Re(null,u),c.remove(),qn())}}}var Mt,pt,ct,De,$e,An,So,Mn,zn,Eo=ie(()=>{"use strict";pe();oe();oo();Tt();so();mo();vo();wo();Mt="mqa:locationchange",pt=!1,ct=0,De=null,$e=null;An=1;So=!1;Mn={open(){},close(){},dispose(){}};zn={state:"unknown-page",color:"gray",pattern:null,page:null}});var Po={};Ht(Po,{createQaMeter:()=>Fn});function Fn(e){return Ro(e)}var To=ie(()=>{"use strict";Eo()});var Hn={};Ht(Hn,{createFeedback:()=>On});var Wo=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function Qo(e){let t;try{t=new URL(e)}catch(r){throw new Error(`[mhosaic-feedback] \`endpoint\` is not a valid URL: ${e}`)}if(t.protocol!=="https:"&&!(t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]")))throw new Error(`[mhosaic-feedback] \`endpoint\` must use https:// (got ${t.protocol}//${t.hostname}). http:// is only allowed for localhost in dev.`)}var Ae=class extends Error{constructor(r){super(`rate limited; retry after ${r}s`);qe(this,"retryAfterSeconds");this.name="RateLimitError",this.retryAfterSeconds=r}};function Uo(e){let t=e.headers.get("Retry-After"),r=t?Number.parseInt(t,10):NaN;return Number.isFinite(r)&&r>=0?r:0}async function jt(e,t){if(e.status===429)throw new Ae(Uo(e));if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`${t} failed: ${e.status} ${r}`)}}async function Nt(e,t){await jt(e,t);let r=await e.json().catch(()=>{});if(!Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an array)`);return r}async function He(e,t){await jt(e,t);let r=await e.json().catch(()=>{});if(r===null||typeof r!="object"||Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an object)`);return r}function Wt(e){var S,z;let t=((S=e.endpoint)!=null?S:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');Qo(t);let r=(z=e.fetch)!=null?z:globalThis.fetch;async function a(w){var D,K,N,C;let m=w;if(e.beforeSend&&(m=await e.beforeSend(w)),m===!1)throw new Error("Submission cancelled by beforeSend");let b=new FormData;for(let B of Wo)b.append(B,String(m[B]));b.append("technical_context",JSON.stringify(m.technical_context)),((D=m.screenshots)!=null&&D.length?m.screenshots:m.screenshot?[m.screenshot]:[]).forEach((B,H)=>{b.append("screenshot",B,H===0?"screenshot.png":`screenshot-${H+1}.png`)}),m.synthetic&&b.append("synthetic","true"),m.meta&&b.append("meta","true"),(K=m.user)!=null&&K.id&&b.append("user",JSON.stringify(m.user)),m.widget_version&&b.append("widget_version",m.widget_version),m.page_path&&b.append("page_path",m.page_path);let F={Authorization:`Bearer ${e.apiKey}`};m.synthetic&&(F["X-Mhosaic-Capture-Source"]="error-tracking");let h=(N=e.getSignedIdentity)==null?void 0:N.call(e);h&&h.userHash&&h.exp&&((C=m.user)!=null&&C.id)&&(F["X-Mhosaic-User"]=String(m.user.id),F["X-Mhosaic-User-Hmac"]=h.userHash,F["X-Mhosaic-User-Exp"]=String(h.exp),h.email&&(F["X-Mhosaic-User-Email"]=h.email));let L=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:F,body:b});if(!L.ok){let B=await L.text().catch(()=>"");throw new Error(`Feedback submit failed: ${L.status} ${B}`)}return L.json()}function n(w){var q;let m={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":w},b=(q=e.getSignedIdentity)==null?void 0:q.call(e);return b&&b.userHash&&b.exp&&(m["X-Mhosaic-User-Hmac"]=b.userHash,m["X-Mhosaic-User-Exp"]=String(b.exp),b.email&&(m["X-Mhosaic-User-Email"]=b.email)),m}async function i(w){let m=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(w)});return m.status===404?[]:Nt(m,"listMine")}async function s(w){var h;if(((h=w==null?void 0:w.onLine)!=null?h:typeof navigator!="undefined"?navigator.onLine:!0)===!1)return"offline";let b=`${t}/api/feedback/v1/widget-manifest/?pk=${encodeURIComponent(e.apiKey)}`,q;try{q=await r(b,{method:"GET",redirect:"manual"})}catch(L){return"blocked"}if(q.type==="opaqueredirect"||q.status>=300&&q.status<400)return"intercepted";let F;try{F=await r(b,{method:"GET",headers:{Authorization:`Bearer ${e.apiKey}`}})}catch(L){return"preflight"}return F.status===401||F.status===403?"key":F.status===429?"throttle":"healthy"}async function l(w){let m=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(w)});return m.status===404?[]:Nt(m,"listChangelog")}async function c(w,m,b){let q=await r(`${t}/api/feedback/v1/reports/widget/${w}/`,{method:"GET",headers:n(m),...b!=null&&b.signal?{signal:b.signal}:{}});return He(q,"getReport")}async function d(w,m){let b=await r(`${t}/api/feedback/v1/reports/widget/by-seq/${w}/`,{method:"GET",headers:n(m)});return He(b,"getReportBySeq")}async function f(w,m,b,q,F){let h;if(F&&F.length>0){let D=new FormData;D.append("body",b),q!==void 0&&D.append("client_nonce",q),F.forEach((K,N)=>D.append("attachment",K,`attachment-${N+1}.png`)),h={method:"POST",headers:n(m),body:D}}else h={method:"POST",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({body:b,...q!==void 0&&{client_nonce:q}})};let L=await r(`${t}/api/feedback/v1/reports/widget/${w}/comments/`,h);if(!L.ok){let D=await L.text().catch(()=>"");throw new Error(`addComment failed: ${L.status} ${D}`)}return L.json()}async function u(w,m,b){let q=await r(`${t}/api/feedback/v1/reports/widget/${w}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({description:b})});if(!q.ok){let F=await q.text().catch(()=>"");throw new Error(`editDescription failed: ${q.status} ${F}`)}return q.json()}async function p(w,m){let b=await r(`${t}/api/feedback/v1/reports/widget/${w}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!b.ok){let q=await b.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${b.status} ${q}`)}return b.json()}async function g(w,m){let b=await r(`${t}/api/feedback/v1/reports/widget/${w}/`,{method:"PATCH",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!b.ok){let q=await b.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${b.status} ${q}`)}return b.json()}function _(w){var q,F,h;if(!w)return"";let m=new URLSearchParams;(q=w.status)==null||q.forEach(L=>m.append("status",L)),(F=w.type)==null||F.forEach(L=>m.append("type",L)),(h=w.severity)==null||h.forEach(L=>m.append("severity",L)),w.q&&m.set("q",w.q),w.mine&&m.set("mine","1"),w.ordering&&m.set("ordering",w.ordering),w.page&&w.page>1&&m.set("page",String(w.page)),w.pagePath&&m.set("page_path",w.pagePath);let b=m.toString();return b?`?${b}`:""}async function T(w,m,b){let q=await r(`${t}/api/feedback/v1/reports/widget/board/${_(m)}`,{method:"GET",headers:n(w),...b!=null&&b.signal?{signal:b.signal}:{}});if(q.status===404)return{count:0,next:null,previous:null,results:[]};let F=await He(q,"listBoard");if(!Array.isArray(F.results))throw new Error("listBoard: unexpected response shape (missing results[])");return F}async function y(w,m,b){let q=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${_(m)}`,{method:"GET",headers:n(w),...b!=null&&b.signal?{signal:b.signal}:{}});return q.status===404?{total:0,by_status:{},resolution_rate:0,scope:"mine"}:He(q,"fetchBoardKpis")}async function v(w,m){let b=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(w),"Content-Type":"application/json"},body:JSON.stringify({external_id:w,...m?{email:m}:{}})});if(!b.ok)throw new Error(`checkVisibility failed: ${b.status}`);return!!(await b.json()).show}return{submitReport:a,checkVisibility:v,listMine:i,listChangelog:l,diagnose:s,endpointHost:(()=>{try{return new URL(t).host}catch(w){return t}})(),getReport:c,getReportBySeq:d,addComment:f,editDescription:u,closeAsResolved:p,reopenUnresolved:g,listBoard:T,fetchBoardKpis:y}}var Vo=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Go=[/^eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,/^(?:sk|pk)_proj_[A-Za-z0-9_-]{16,}$/,/^gh[pousr]_[A-Za-z0-9]{30,}$/,/^(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}$/,/^AKIA[0-9A-Z]{12,}$/,/^xox[abprso]-[A-Za-z0-9-]{12,}$/,/^[a-f0-9]{40,}$/i,/^[A-Za-z0-9_-]{40,}$/];function Yo(e){return Go.some(t=>t.test(e))}function xe(e){try{let t=/^https?:\/\//i.test(e),r=e.startsWith("/");if(!t&&!r)return e;let a=typeof window!="undefined"?window.location.origin:"http://localhost",n=new URL(e,a),i=new URLSearchParams;return n.searchParams.forEach((s,l)=>{Vo.test(l)||Yo(s)?i.set(l,"[redacted]"):i.set(l,s)}),n.search=i.toString(),n.hash=n.hash?"#[redacted]":"",n.toString()}catch(t){return e}}var Xo=[/\b(?:sk|pk)_proj_[A-Za-z0-9_*-]+/g,/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,/\bBearer\s+[A-Za-z0-9._~+/=-]{16,}\b/g,/\bAuthorization\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{16,}["']?/gi,/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,/\b(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}\b/g,/\bAKIA[0-9A-Z]{12,}\b/g,/\bxox[abprso]-[A-Za-z0-9-]{12,}\b/g,/\bAIza[0-9A-Za-z_-]{35}\b/g,/\bsk-(?:proj-|svcacct-)?[A-Za-z0-9_-]{20,}\b/g,/\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{40,}\b/g,/\bAC[a-f0-9]{32}\b/g,/\bSK[a-f0-9]{32}\b/g];function de(e){let t=e;for(let r of Xo)t=t.replace(r,"[redacted-token]");return t}function Qt(){var l;let e=navigator,t=(l=e.connection)==null?void 0:l.effectiveType,r=e.deviceMemory,a=document.referrer||void 0,n=a!==void 0?xe(a):void 0,i=xe(window.location.pathname+window.location.search),s;try{let c=new URL(i,window.location.origin);s=c.pathname+c.search}catch(c){s=window.location.pathname}return{viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},screen:{w:window.screen.width,h:window.screen.height},platform:e.platform,language:e.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,timezoneOffset:new Date().getTimezoneOffset(),...t!==void 0&&{connection:t},online:e.onLine,...r!==void 0&&{deviceMemory:r},hardwareConcurrency:e.hardwareConcurrency,...n!==void 0&&{referrer:n},title:de(document.title||"").slice(0,200),pathname:s}}function Jo(e){if(e==null)return String(e);if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);if(e instanceof Error)return`${e.name}: ${e.message}`;if(e instanceof Element)return`<${e.tagName.toLowerCase()}>`;try{return JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)}catch(t){try{return String(e)}catch(r){return"[unserializable]"}}}function Ut(e){let t=["log","info","warn","error","debug"],r={};for(let a of t){let n=console[a];typeof n=="function"&&(r[a]=n,console[a]=function(...s){try{let l=s.map(Jo).join(" "),c=de(l).slice(0,2e3),d={level:a,message:c,ts:Date.now()};if(a==="error"){let f=new Error().stack;f&&(d.stack=f.split(`
617
617
  `).slice(2,8).join(`
618
- `))}e.push(c)}catch(l){}n.apply(console,s)})}return()=>{for(let[a,n]of Object.entries(r))console[a]=n}}function Gt(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(n,i){let s=performance.now(),l=typeof n=="string"?n:n instanceof URL?n.toString():n.url,d=((i==null?void 0:i.method)||(n instanceof Request?n.method:"GET")).toUpperCase();try{let c=await r(n,i);return e.push({url:t(l),method:d,status:c.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),c}catch(c){let f=c instanceof Error?c.message:String(c);throw e.push({url:t(l),method:d,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:le(f)}),c}},()=>{window.fetch=r}}function Xt(e,t){if(typeof window=="undefined"||typeof window.XMLHttpRequest!="function")return()=>{};let r=window.XMLHttpRequest,a=r.prototype.open,n=r.prototype.send;return r.prototype.open=function(s,l){return this.__mfb={method:s.toUpperCase(),url:typeof l=="string"?l:l.toString(),start:performance.now()},a.apply(this,arguments)},r.prototype.send=function(s){return this.addEventListener("loadend",()=>{try{let l=this.__mfb;if(!l)return;e.push({url:t(l.url),method:l.method,status:this.status,durationMs:Math.round(performance.now()-l.start),ts:Date.now()})}catch(l){}}),n.call(this,s!=null?s:null)},()=>{r.prototype.open=a,r.prototype.send=n}}function Yt(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?le(n):void 0;e.push({message:le(a.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=a=>{let n=a.reason,i=n instanceof Error?n.message:typeof n=="string"?n:(()=>{try{return JSON.stringify(n)}catch(d){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?le(s):void 0;e.push({message:le(i),...l!==void 0&&{stack:l},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function Jt(e=1e3){let t=[],r=[],a=null;if(typeof PerformanceObserver!="undefined")try{a=new PerformanceObserver(n=>{for(let i of n.getEntries())if(i.entryType==="longtask")for(t.push({duration:i.duration,startTime:i.startTime});t.length>20;)t.shift();else if(i.entryType==="resource"){let s=i;if(s.duration>e)for(r.push({name:ye(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),a.observe({entryTypes:["longtask","resource"]})}catch(n){}return{snapshot(){let n=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=n?{type:n.type,duration:n.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){a==null||a.disconnect()}}}var Se=class{constructor(t){Te(this,"max",t);Te(this,"items",[])}push(t){for(this.items.push(t);this.items.length>this.max;)this.items.shift()}snapshot(){return this.items.slice()}clear(){this.items.length=0}};function Zt(e={}){var g;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(g=e.sanitizeUrl)!=null?g:ye,i=new Se(t),s=new Se(r),l=new Se(a),d=Vt(i),c=Gt(s,n),f=Xt(s,n),u=Yt(l),p=Jt();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:Ut(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){d(),c(),f(),u(),p.dispose()}}}var Xo={"fab.label":"Send feedback","page.badge.aria":"Feedback \u2014 {n} open on this page","page.badge.aria.one":"Feedback \u2014 1 open on this page","page.strip.text":"{n} open reports on this page","page.strip.text.one":"1 open report on this page","page.strip.view":"View","page.peek.title":"On this page","page.peek.viewAll":"View all {n}","page.peek.viewAll.one":"View 1 open report","form.title":"Send feedback","form.description.label":"What happened?","form.description.placeholder":"Describe the issue or idea in one or two sentences.","form.type.label":"Type","form.severity.label":"Severity","form.submit":"Send","form.cancel":"Cancel","form.close":"Close","form.submitting":"Sending\u2026","form.success":"Thanks \u2014 your feedback was sent.","form.success.seq":"Thanks \u2014 report #{seq} was sent. \u2713","form.discard.title":"Unsaved changes","form.discard.body":"Discard your feedback?","form.discard.keep":"Keep editing","form.discard.confirm":"Discard","form.error":"Could not send. Please try again.","form.description.required":"Please describe the issue before sending.","form.screenshot.label":"Screenshot","form.screenshot.cta_click":"Click","form.screenshot.cta_rest":"drop, or paste an image","form.screenshot.formats":"PNG, JPEG or WebP \u2014 up to 10 MB","form.screenshot.remove":"Remove screenshot","form.screenshot.annotate":"Annotate","form.screenshot.error_type":"Unsupported file type. Use PNG, JPEG or WebP.","form.screenshot.error_size":"File too large (max {max} MB).","form.screenshot.error_count":"Too many screenshots (max {max}).","form.context.label":"Page","form.capture.notice":"Console, network activity and errors are captured automatically to help us debug.","type.bug":"Bug","type.feature":"Feature request","type.question":"Question","type.praise":"Praise","type.typo":"Typo","severity.blocker":"Blocker","severity.high":"High","severity.medium":"Medium","severity.low":"Low","annotator.title":"Annotate screenshot","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Arrow","annotator.tool.freehand":"Freehand","annotator.tool.text":"Text","annotator.tool.highlight":"Highlight","annotator.tool.blur":"Blur (hide sensitive data)","annotator.text_prompt":"Enter text:","annotator.color_picker":"Custom color","annotator.undo":"Undo","annotator.redo":"Redo","annotator.clear":"Clear all","annotator.count_suffix":"annotations","annotator.loading":"Loading\u2026","annotator.apply":"Apply","annotator.applying":"Applying\u2026","tab.send":"Send","tab.mine":"My reports","tab.changelog":"This week","tab.board":"Board","board.kpi.total":"Total","board.kpi.new":"New","board.kpi.in_progress":"In progress","board.kpi.awaiting_validation":"Awaiting validation","board.kpi.closed":"Closed","board.kpi.rejected":"Rejected","board.kpi.resolution_rate":"Resolution rate","board.sort":"Sort","board.sort.recent":"Newest first","board.sort.oldest":"Oldest first","board.sort.updated":"Recently active","board.sort.severity":"Severity","board.sort.status":"Status","board.filter.status":"Status","board.filter.type":"Type","board.filter.severity":"Severity","board.filter.search.placeholder":"Search\u2026","board.filter.mine":"Mine only","board.filter.clear":"Clear filters","board.list.empty.title":"Nothing here yet","board.list.empty.description":"When reports land, they\u2019ll show up here.","board.list.loading":"Loading\u2026","board.list.error":"Couldn\u2019t load reports.","board.retry":"Try again","board.list.you":"you","board.list.count":"{n} of {total}","board.list.loadMore":"Show more","board.detail.empty":"Pick a report on the left to see its full thread.","board.detail.by":"By","board.detail.confirm_resolution":"Confirm resolution","board.detail.status_history":"History","board.scope.project":"Project reports","board.scope.mine":"Your reports","board.scope.thisPage":"This page","board.scope.allPages":"All pages","board.scope.onThisPage":"on this page","board.list.count.page":"{n} of {total} \xB7 this page","board.list.empty.page.title":"No feedback on this page yet.","board.list.empty.page.description":"Be the first to report something here \u2014 or browse the whole project.","board.back":"Back","changelog.empty.title":"Nothing resolved yet","changelog.empty.body":"Once a report you sent is fixed it will appear here, grouped by week.","changelog.week_of":"Week of {date}","changelog.resolved_one":"{count} resolved","changelog.resolved_many":"{count} resolved","mine.empty.title":"No reports yet","mine.empty.body":"Once you send feedback you can follow the thread here.","mine.refresh":"Refresh","mine.validate.banner":"{count} fix(es) awaiting your confirmation","mine.validate.confirm":"Fix works","mine.validate.reopen":"Still broken","mine.validate.view":"Review","diag.run":"Diagnose","diag.running":"Checking the connection\u2026","diag.offline":"You appear to be offline. Reconnect and retry.","diag.blocked":"The feedback service is unreachable from this network. A firewall or proxy is blocking it \u2014 ask IT to allow {host}.","diag.intercepted":"Your corporate network (SSL-inspection proxy) is intercepting widget traffic. Ask IT to add {host} to the inspection bypass list.","diag.preflight":"A network proxy is blocking the widget\u2019s secure requests (CORS preflight). Ask IT to allow {host}.","diag.key":"The widget\u2019s access key was rejected. Contact the site team.","diag.throttle":"Too many requests right now \u2014 wait a moment and retry.","diag.healthy":"The service is reachable \u2014 this looks like a temporary hiccup. Retry.","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.jump.placeholder":"#","mine.jump.go":"Open","mine.jump.aria":"Open a report by number","mine.jump.not_found":"No report with that number.","error.rate_limited":"Too many requests \u2014 retry in {seconds}s.","error.rate_limited_generic":"Too many requests \u2014 try again in a moment.","mine.replies_one":"1 reply","mine.replies_many":"{count} replies","mine.filter.empty":"No reports match this filter.","kpi.new":"New","kpi.in_progress":"In progress","kpi.awaiting_validation":"Awaiting you","kpi.resolution_rate":"Resolution rate","detail.back":"Back","detail.thread":"Conversation","detail.no_replies":"No replies yet \u2014 we\u2019ll let you know when an operator responds.","detail.compose_placeholder":"Add a follow-up reply\u2026","detail.compose_send":"Reply","detail.compose_sending":"Sending\u2026","detail.attach_add":"Add image","detail.attach_remove":"Remove","detail.attachment_alt":"Attached image","detail.copy_link":"Copy link","detail.copied":"Link copied","detail.edit":"Edit","detail.edit_save":"Save","detail.edit_cancel":"Cancel","detail.edit_saving":"Saving\u2026","detail.edit_failed":"Could not save your changes.","detail.close_cta":"Mark as resolved","detail.close_busy":"Marking\u2026","detail.reopen_cta":"Still not fixed","detail.reopen_busy":"Reopening\u2026","detail.teammate_notice":"Viewing a teammate\u2019s report \u2014 replies are private to the submitter.","detail.load_failed.title":"Report not available","detail.load_failed.body":"It may have been deleted, or you no longer have access to it.","detail.load_failed.cta":"Back","detail.send_failed":"Couldn\u2019t send your reply. Try again.","detail.close_failed":"Couldn\u2019t mark as resolved. Try again.","detail.reopen_failed":"Couldn\u2019t reopen the report. Try again.","detail.history":"Status history","detail.context.submitted_at":"Submitted","detail.context.page":"Page","detail.context.capture.manual":"Manual capture","detail.context.capture.html2canvas":"Auto capture","detail.context.capture.display_media":"Screen share","detail.context.capture.none":"No screenshot","detail.author.staff":"Operator","detail.author.mcp":"Mhosaic Team","detail.author.system":"System","detail.tech.title":"What we received","detail.tech.errors_one":"error","detail.tech.errors_many":"errors","detail.tech.device":"Device","detail.tech.device.viewport":"Viewport","detail.tech.device.platform":"Platform","detail.tech.device.language":"Language","detail.tech.device.timezone":"Timezone","detail.tech.device.connection":"Connection","detail.tech.errors":"Runtime errors","detail.tech.console":"Console (last 20)","detail.tech.network":"Network (last 15)","status.new":"New","status.in_progress":"In progress","status.awaiting_validation":"Awaiting your validation","status.closed":"Closed","status.rejected":"Rejected","status.duplicate":"Duplicate","status.wontfix":"Won\u2019t fix"},Yo={"fab.label":"Envoyer un commentaire","page.badge.aria":"Retours \u2014 {n} ouverts sur cette page","page.badge.aria.one":"Retours \u2014 1 ouvert sur cette page","page.strip.text":"{n} retours ouverts sur cette page","page.strip.text.one":"1 retour ouvert sur cette page","page.strip.view":"Voir","page.peek.title":"Sur cette page","page.peek.viewAll":"Voir les {n}","page.peek.viewAll.one":"Voir 1 retour ouvert","form.title":"Envoyer un commentaire","form.description.label":"Qu\u2019est-il arriv\xE9 ?","form.description.placeholder":"D\xE9crivez le probl\xE8me ou l\u2019id\xE9e en une ou deux phrases.","form.type.label":"Type","form.severity.label":"S\xE9v\xE9rit\xE9","form.submit":"Envoyer","form.cancel":"Annuler","form.close":"Fermer","form.submitting":"Envoi\u2026","form.success":"Merci \u2014 votre commentaire a \xE9t\xE9 envoy\xE9.","form.success.seq":"Merci \u2014 rapport n\xB0{seq} envoy\xE9. \u2713","form.discard.title":"Modifications non enregistr\xE9es","form.discard.body":"Abandonner votre commentaire ?","form.discard.keep":"Continuer la saisie","form.discard.confirm":"Abandonner","form.error":"\xC9chec d\u2019envoi. Veuillez r\xE9essayer.","form.description.required":"D\xE9crivez le probl\xE8me avant d\u2019envoyer.","form.screenshot.label":"Capture d\u2019\xE9cran","form.screenshot.cta_click":"Cliquez","form.screenshot.cta_rest":"d\xE9posez ou collez une image","form.screenshot.formats":"PNG, JPEG ou WebP \u2014 jusqu\u2019\xE0 10 Mo","form.screenshot.remove":"Retirer la capture","form.screenshot.annotate":"Annoter","form.screenshot.error_type":"Format non support\xE9. Utilisez PNG, JPEG ou WebP.","form.screenshot.error_size":"Fichier trop volumineux (max {max} Mo).","form.screenshot.error_count":"Trop de captures d\u2019\xE9cran (max {max}).","form.context.label":"Page","form.capture.notice":"La console, l\u2019activit\xE9 r\xE9seau et les erreurs sont captur\xE9es automatiquement pour faciliter le diagnostic.","type.bug":"Bogue","type.feature":"Suggestion","type.question":"Question","type.praise":"Compliment","type.typo":"Coquille","severity.blocker":"Bloquant","severity.high":"\xC9lev\xE9e","severity.medium":"Moyenne","severity.low":"Faible","annotator.title":"Annoter la capture","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Fl\xE8che","annotator.tool.freehand":"Dessin libre","annotator.tool.text":"Texte","annotator.tool.highlight":"Surligner","annotator.tool.blur":"Flouter (donn\xE9es sensibles)","annotator.text_prompt":"Entrez le texte :","annotator.color_picker":"Couleur personnalis\xE9e","annotator.undo":"Annuler","annotator.redo":"Refaire","annotator.clear":"Tout effacer","annotator.count_suffix":"annotations","annotator.loading":"Chargement\u2026","annotator.apply":"Appliquer","annotator.applying":"Application\u2026","tab.send":"Envoyer","tab.mine":"Mes rapports","tab.changelog":"Cette semaine","tab.board":"Tableau","board.kpi.total":"Total","board.kpi.new":"Nouveau","board.kpi.in_progress":"En cours","board.kpi.awaiting_validation":"\xC0 valider","board.kpi.closed":"Ferm\xE9","board.kpi.rejected":"Refus\xE9","board.kpi.resolution_rate":"Taux de r\xE9solution","board.sort":"Trier","board.sort.recent":"Plus r\xE9cents","board.sort.oldest":"Plus anciens","board.sort.updated":"Activit\xE9 r\xE9cente","board.sort.severity":"S\xE9v\xE9rit\xE9","board.sort.status":"Statut","board.filter.status":"Statut","board.filter.type":"Type","board.filter.severity":"S\xE9v\xE9rit\xE9","board.filter.search.placeholder":"Rechercher\u2026","board.filter.mine":"Les miens","board.filter.clear":"Effacer les filtres","board.list.empty.title":"Rien \xE0 voir ici","board.list.empty.description":"Les rapports appara\xEEtront ici d\xE8s qu\u2019ils arrivent.","board.list.loading":"Chargement\u2026","board.list.error":"Impossible de charger les rapports.","board.retry":"R\xE9essayer","board.list.you":"vous","board.list.count":"{n} sur {total}","board.list.loadMore":"Afficher plus","board.detail.empty":"S\xE9lectionnez un rapport \xE0 gauche pour voir le fil complet.","board.detail.by":"Par","board.detail.confirm_resolution":"Confirmer la r\xE9solution","board.detail.status_history":"Historique","board.scope.project":"Rapports du projet","board.scope.mine":"Vos rapports","board.scope.thisPage":"Cette page","board.scope.allPages":"Toutes les pages","board.scope.onThisPage":"sur cette page","board.list.count.page":"{n} sur {total} \xB7 cette page","board.list.empty.page.title":"Aucun retour sur cette page pour l\u2019instant.","board.list.empty.page.description":"Soyez le premier \xE0 signaler quelque chose ici \u2014 ou parcourez tout le projet.","board.back":"Retour","changelog.empty.title":"Rien de r\xE9solu pour l\u2019instant","changelog.empty.body":"Quand un rapport que vous avez envoy\xE9 est corrig\xE9, il appara\xEEtra ici, regroup\xE9 par semaine.","changelog.week_of":"Semaine du {date}","changelog.resolved_one":"{count} r\xE9solu","changelog.resolved_many":"{count} r\xE9solus","mine.empty.title":"Aucun rapport","mine.empty.body":"Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.","mine.refresh":"Actualiser","mine.validate.banner":"{count} correctif(s) \xE0 confirmer","mine.validate.confirm":"Corrig\xE9 \u2713","mine.validate.reopen":"Toujours cass\xE9","mine.validate.view":"Voir","diag.run":"Diagnostiquer","diag.running":"V\xE9rification de la connexion\u2026","diag.offline":"Vous semblez hors ligne. Reconnectez-vous puis r\xE9essayez.","diag.blocked":"Le service de feedback est injoignable depuis ce r\xE9seau. Un pare-feu ou proxy le bloque \u2014 demandez \xE0 votre TI d\u2019autoriser {host}.","diag.intercepted":"Votre r\xE9seau d\u2019entreprise (inspection SSL) intercepte le trafic du widget. Demandez \xE0 votre TI d\u2019ajouter {host} \xE0 la liste d\u2019exclusion.","diag.preflight":"Un proxy r\xE9seau bloque les requ\xEAtes s\xE9curis\xE9es du widget (pr\xE9flight CORS). Demandez \xE0 votre TI d\u2019autoriser {host}.","diag.key":"La cl\xE9 d\u2019acc\xE8s du widget a \xE9t\xE9 refus\xE9e. Contactez l\u2019\xE9quipe du site.","diag.throttle":"Trop de requ\xEAtes pour le moment \u2014 patientez puis r\xE9essayez.","diag.healthy":"Le service est joignable \u2014 le probl\xE8me semble passager. R\xE9essayez.","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.jump.placeholder":"#","mine.jump.go":"Ouvrir","mine.jump.aria":"Ouvrir un rapport par num\xE9ro","mine.jump.not_found":"Aucun rapport avec ce num\xE9ro.","error.rate_limited":"Trop de requ\xEAtes \u2014 r\xE9essaie dans {seconds} s.","error.rate_limited_generic":"Trop de requ\xEAtes \u2014 r\xE9essaie dans un instant.","mine.replies_one":"1 r\xE9ponse","mine.replies_many":"{count} r\xE9ponses","mine.filter.empty":"Aucun rapport ne correspond \xE0 ce filtre.","kpi.new":"Nouveau","kpi.in_progress":"En cours","kpi.awaiting_validation":"\xC0 valider","kpi.resolution_rate":"Taux de r\xE9solution","detail.back":"Retour","detail.thread":"Conversation","detail.no_replies":"Pas encore de r\xE9ponse \u2014 vous serez notifi\xE9 d\xE8s qu\u2019un op\xE9rateur r\xE9pondra.","detail.compose_placeholder":"Ajouter une r\xE9ponse\u2026","detail.compose_send":"R\xE9pondre","detail.compose_sending":"Envoi\u2026","detail.attach_add":"Ajouter une image","detail.attach_remove":"Retirer","detail.attachment_alt":"Image jointe","detail.copy_link":"Copier le lien","detail.copied":"Lien copi\xE9","detail.edit":"Modifier","detail.edit_save":"Enregistrer","detail.edit_cancel":"Annuler","detail.edit_saving":"Enregistrement\u2026","detail.edit_failed":"Impossible d\u2019enregistrer vos modifications.","detail.close_cta":"Marquer comme r\xE9solu","detail.close_busy":"Validation\u2026","detail.reopen_cta":"Toujours pas r\xE9gl\xE9","detail.reopen_busy":"R\xE9ouverture\u2026","detail.teammate_notice":"Vous consultez le rapport d\u2019un co\xE9quipier \u2014 les r\xE9ponses sont priv\xE9es au soumetteur.","detail.load_failed.title":"Rapport indisponible","detail.load_failed.body":"Il a peut-\xEAtre \xE9t\xE9 supprim\xE9, ou vous n\u2019y avez plus acc\xE8s.","detail.load_failed.cta":"Retour","detail.send_failed":"Impossible d\u2019envoyer votre r\xE9ponse. R\xE9essayez.","detail.close_failed":"Impossible de marquer comme r\xE9solu. R\xE9essayez.","detail.reopen_failed":"Impossible de rouvrir le rapport. R\xE9essayez.","detail.history":"Historique du statut","detail.context.submitted_at":"Envoy\xE9","detail.context.page":"Page","detail.context.capture.manual":"Capture manuelle","detail.context.capture.html2canvas":"Capture automatique","detail.context.capture.display_media":"Partage d\u2019\xE9cran","detail.context.capture.none":"Sans capture","detail.author.staff":"Op\xE9rateur","detail.author.mcp":"\xC9quipe Mhosaic","detail.author.system":"Syst\xE8me","detail.tech.title":"Ce que nous avons re\xE7u","detail.tech.errors_one":"erreur","detail.tech.errors_many":"erreurs","detail.tech.device":"Appareil","detail.tech.device.viewport":"Fen\xEAtre","detail.tech.device.platform":"Plateforme","detail.tech.device.language":"Langue","detail.tech.device.timezone":"Fuseau horaire","detail.tech.device.connection":"Connexion","detail.tech.errors":"Erreurs d\u2019ex\xE9cution","detail.tech.console":"Console (20 derniers)","detail.tech.network":"R\xE9seau (15 derniers)","status.new":"Nouveau","status.in_progress":"En cours","status.awaiting_validation":"En attente de validation","status.closed":"Ferm\xE9","status.rejected":"Rejet\xE9","status.duplicate":"Doublon","status.wontfix":"Non corrig\xE9"},Jo={fr:Yo};function Zo(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=Jo[t])!=null?r:null}function er(e,t={}){var a;let r=(a=Zo(t.locale))!=null?a:{};return{...Xo,...r,...e}}de();re();function pe(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var St="mfb:locationchange",Cr=!1;function pa(){if(!(Cr||typeof history=="undefined")){Cr=!0;for(let e of["pushState","replaceState"]){let t=history[e];history[e]=function(...r){let a=t.apply(this,r);return window.dispatchEvent(new Event(St)),a}}}}function et(e){return pa(),window.addEventListener("popstate",e),window.addEventListener(St,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(St,e)}}re();re();de();de();var ua=0;function o(e,t,r,a,n,i){t||(t={});var s,l,d=t;if("ref"in d)for(l in d={},t)l=="ref"?s=t[l]:d[l]=t[l];var c={type:e,props:d,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ua,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)d[l]===void 0&&(d[l]=s[l]);return Q.vnode&&Q.vnode(c),c}function tt({api:e,strings:t,host:r}){var l;let[a,n]=P("idle"),i=async()=>{n("running");try{n(await e.diagnose())}catch(d){n("blocked")}};if(a==="idle")return o("button",{type:"button",class:"btn diag-btn",onClick:()=>{i()},children:t["diag.run"]});if(a==="running")return o("div",{class:"diag-result",children:t["diag.running"]});let s=`diag.${a}`;return o("div",{class:"diag-result",children:((l=t[s])!=null?l:a).replace("{host}",r)})}var xe=new Map;function Rr(e,t){return`${e}|${t}`}function qr(e){let t=xe.get(e);return t&&Date.now()-t.at<6e4?t:null}function Pr(e,t,r){if(!xe.has(e)&&xe.size>=50){let a=xe.keys().next().value;a!==void 0&&xe.delete(a)}xe.delete(e),xe.set(e,{page:t,kpis:r,at:Date.now()})}var Er="mhosaic.boardView.";function Tr(e){try{let t=localStorage.getItem(Er+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function Ar(e,t){try{localStorage.setItem(Er+e,JSON.stringify(t))}catch(r){}}function be(e,t){let r=!1,a=!1,n=0,i=null,s=typeof document!="undefined"?document:null,l=()=>Math.min(t*2**n,t*10),d=async()=>{if(r)return;if(s!=null&&s.hidden){a=!0;return}let f=!1;try{f=await e()}catch(u){f=!1}r||(n=f?0:n+1,i=setTimeout(()=>{d()},l()))},c=()=>{r||!a||s!=null&&s.hidden||(a=!1,d())};return s==null||s.addEventListener("visibilitychange",c),d(),{stop(){r=!0,i&&clearTimeout(i),s==null||s.removeEventListener("visibilitychange",c)}}}function Pe(e,t){return e instanceof Ae?e.retryAfterSeconds>0?t["error.rate_limited"].replace("{seconds}",String(e.retryAfterSeconds)):t["error.rate_limited_generic"]:null}re();var Mr=/#(\d+)/g;function ze(e,t){let r=e!=null?e:"";if(!r||!t)return[r];let a=[],n=0;Mr.lastIndex=0;let i;for(;(i=Mr.exec(r))!==null;){i.index>n&&a.push(r.slice(n,i.index));let s=Number(i[1]);a.push(o("button",{type:"button",class:"seq-link",onClick:()=>t(s),"aria-label":`Open report #${s}`,children:["#",s]})),n=i.index+i[0].length}return n<r.length&&a.push(r.slice(n)),a.length?a:[r]}function Lr({comment:e,strings:t,onOpenSeq:r,stableUrl:a}){var u;let n=e.is_mine,i=!n&&e.author_source==="mcp",s=!n&&e.author_source==="system",l=i?"mcp":s?"system":"staff",d=l==="mcp"?"detail.author.mcp":l==="system"?"detail.author.system":"detail.author.staff",c=e.author_label||t[d],f=((u=e.attachments)!=null?u:[]).filter(p=>p.url);return o("div",{class:`comment-bubble ${n?"is-mine":"is-other"}`,children:[!n&&c&&o("div",{class:`comment-author comment-author--${l}`,children:c}),e.body&&o("div",{class:"comment-body",children:ze(e.body,r)}),f.length>0&&o("div",{class:"comment-attachments",children:f.map(p=>{let g=a?a(`att:${p.id}`,p.url):p.url;return o("a",{class:"comment-attachment",href:g,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:g,alt:t["detail.attachment_alt"],loading:"lazy"})},p.id)})}),o("div",{class:"comment-time",children:fa(e.created_at)})]})}function fa(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var ma=["image/png","image/jpeg","image/webp"];function rt(e){return ma.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function Ee(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),a=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-a)}`}function Ct(e){if(!e)return;let t;try{t=new URL(e)}catch(r){return}if(t.protocol==="https:"||t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]"))return t.toString()}var ga=3e4;function ot({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal",onOpenSeq:l,buildPermalink:d,seed:c}){var It,Dt,$t,Kt,Ot,Ht;let[f,u]=P(null),[p,g]=P(null),[y,C]=P(!1),[x,w]=P(!1),[q,z]=P(""),[k,m]=P(!1),[v,E]=P(!1),[F,h]=P(""),[B,D]=P(!1),[$,H]=P(!1),[R,I]=P(!1),[O,J]=P([]),[ee,G]=P(""),S=U(null),b=U(!0),T=U(new Map),[,A]=P(0),j=45*6e4,M=(L,N)=>{if(!N)return N;let X=T.current.get(L);return X&&Date.now()-X.at<j?X.url:(T.current.set(L,{url:N,at:Date.now()}),N)},K=L=>{T.current.delete(L),A(N=>N+1)},te=U(O);te.current=O,W(()=>()=>te.current.forEach(L=>URL.revokeObjectURL(L.preview)),[]);let ae=L=>{G("");let N=5-O.length,X=L.slice(0,Math.max(0,N));for(let Z of X){let ce=rt(Z);if(ce){G(ce.kind==="type"?a["form.screenshot.error_type"]:a["form.screenshot.error_size"].replace("{max}",String(ce.maxMb)));return}}if(X.length){let Z=X.map(ce=>({blob:ce,preview:URL.createObjectURL(ce)}));J(ce=>[...ce,...Z])}L.length>X.length&&G(a["form.screenshot.error_count"].replace("{max}",String(5)))},we=L=>{var Z;let N=L.target,X=Array.from((Z=N.files)!=null?Z:[]);X.length&&ae(X),N.value=""},se=L=>{let N=O[L];N&&URL.revokeObjectURL(N.preview),J(X=>X.filter((Z,ce)=>ce!==L)),G("")},ke=async()=>{try{let L=await e.getReport(r,t);return b.current&&(u(L),g(null)),!0}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",L),!b.current)return!1;let N=Pe(L,a);return g(N!=null?N:"load_failed"),!1}};W(()=>{b.current=!0;let L=be(ke,ga);return()=>{b.current=!1,L.stop()}},[r,t]);let ve=async()=>{if(!(!F.trim()&&O.length===0||B)){D(!0);try{let L=`${r}:${Date.now()}`,N=O.map(Z=>Z.blob),X=await e.addComment(r,t,F.trim(),L,N.length?N:void 0);if(!b.current)return;h(""),O.forEach(Z=>URL.revokeObjectURL(Z.preview)),J([]),G(""),u(Z=>Z&&{...Z,comments:ba(Z.comments,X)}),ke()}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",L),!b.current)return;g(a["detail.send_failed"])}finally{b.current&&D(!1)}}},Ke=async()=>{if(!(!d||!f))try{if(await navigator.clipboard.writeText(d(f.id)),!b.current)return;C(!0),setTimeout(()=>{b.current&&C(!1)},2e3)}catch(L){}},To=()=>{f&&(z(f.description),E(!1),w(!0))},Ao=()=>{w(!1),E(!1)},Mo=async()=>{if(!f||k)return;let L=q.trim();if(L){m(!0),E(!1);try{let N=await e.editDescription(r,t,L);if(!b.current)return;u(N),w(!1)}catch(N){if(typeof console!="undefined"&&console.warn("[mhosaic] editDescription:",N),!b.current)return;E(!0)}finally{b.current&&m(!1)}}},Lo=async()=>{if(!($||R)){H(!0);try{let L=await e.closeAsResolved(r,t);if(!b.current)return;u(L)}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",L),!b.current)return;g(a["detail.close_failed"])}finally{b.current&&H(!1)}}},zo=async()=>{if(!($||R)){I(!0);try{let L=await e.reopenUnresolved(r,t);if(!b.current)return;u(L)}catch(L){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",L),!b.current)return;g(a["detail.reopen_failed"])}finally{b.current&&I(!1)}}};if(!f&&!p){if(c){let L=o("span",{class:`pill pill-status pill-status--${c.status}`,children:(It=a[`status.${c.status}`])!=null?It:c.status});return o("div",{class:`report-detail variant-${s} is-seeded`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.back"]]}),L]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),L]}),o("div",{class:"report-detail-body",children:[o("div",{class:"report-detail-description-row",children:o("p",{class:"report-detail-description",children:ze(c.description,l)})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),o("div",{class:"mine-loading",children:a["mine.loading"]})]})]})}return o("div",{class:"mine-loading",children:a["mine.loading"]})}if(!f)return p&&p!=="load_failed"?o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-body",children:p}),o("button",{type:"button",class:"btn",onClick:()=>{ke()},children:a["board.retry"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]}):o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:a["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:a["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]});let zt=(Dt=f.is_mine)!=null?Dt:i,Bt=($t=f.can_moderate)!=null?$t:zt,Ft=Bt&&f.status==="awaiting_validation",Bo=Bt;return o("div",{class:`report-detail variant-${s}`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.back"]]}),o("span",{class:`pill pill-status pill-status--${f.status}`,children:(Kt=a[`status.${f.status}`])!=null?Kt:f.status})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),o("span",{class:`pill pill-status pill-status--${f.status}`,children:(Ot=a[`status.${f.status}`])!=null?Ot:f.status})]}),o("div",{class:"report-detail-body",children:[o(ha,{detail:f,strings:a}),x?o("div",{class:"report-detail-edit",children:[o("textarea",{class:"report-detail-edit-input",value:q,onInput:L=>{z(L.target.value),E(!1)},disabled:k}),v&&o("p",{class:"error",role:"alert",children:a["detail.edit_failed"]}),o("div",{class:"report-detail-edit-actions",children:[o("button",{type:"button",class:"btn btn--ghost",onClick:Ao,disabled:k,children:a["detail.edit_cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:Mo,disabled:k||!q.trim(),children:k?a["detail.edit_saving"]:a["detail.edit_save"]})]})]}):o("div",{class:"report-detail-description-row",children:[o("p",{class:"report-detail-description",children:ze(f.description,l)}),zt&&o("button",{type:"button",class:"btn btn--ghost report-detail-edit",onClick:To,children:a["detail.edit"]})]}),d&&o("div",{class:"report-detail-permalink",children:o("button",{type:"button",class:"btn btn--ghost report-detail-copy-link",onClick:Ke,children:y?a["detail.copied"]:a["detail.copy_link"]})}),((Ht=f.screenshots)!=null&&Ht.length?f.screenshots.map(L=>L.url):[f.screenshot_url]).map((L,N)=>({url:M(`shot:${N}`,L!=null?L:null),pinKey:`shot:${N}`})).filter(L=>!!L.url).map(({url:L,pinKey:N})=>{let X=Ct(L);return X?o("a",{class:"report-detail-screenshot",href:X,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:L,alt:"",loading:"lazy",onError:()=>K(N)})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:L,alt:"",loading:"lazy",onError:()=>K(N)})})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),f.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:f.comments.map(L=>o("li",{children:o(Lr,{comment:L,strings:a,...l&&{onOpenSeq:l},stableUrl:(N,X)=>{var Z;return(Z=M(N,X))!=null?Z:X}})}))}),f.status_history&&f.status_history.length>0&&o(Ra,{rows:f.status_history,strings:a}),f.technical_context&&o(xa,{ctx:f.technical_context,strings:a}),Bo?o("div",{class:"report-compose",children:[o("textarea",{value:F,placeholder:a["detail.compose_placeholder"],onInput:L=>h(L.target.value),disabled:B}),O.length>0&&o("div",{class:"compose-attachments",children:O.map((L,N)=>o("div",{class:"compose-attachment",children:[o("img",{src:L.preview,alt:a["detail.attachment_alt"]}),o("button",{type:"button",class:"compose-attachment-remove","aria-label":a["detail.attach_remove"],onClick:()=>se(N),disabled:B,children:"\xD7"})]},L.preview))}),ee&&o("p",{class:"compose-attach-error",role:"alert",children:ee}),o("input",{ref:S,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"compose-attach-input",onChange:we,hidden:!0}),o("div",{class:"report-compose-actions",children:[o("button",{type:"button",class:"btn btn--ghost compose-attach-btn",onClick:()=>{var L;return(L=S.current)==null?void 0:L.click()},disabled:B||O.length>=5,children:a["detail.attach_add"]}),Ft&&o("button",{type:"button",class:"btn",onClick:Lo,disabled:$||R,children:$?a["detail.close_busy"]:a["detail.close_cta"]}),Ft&&o("button",{type:"button",class:"btn btn--ghost",onClick:zo,disabled:$||R,children:R?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:ve,disabled:!F.trim()&&O.length===0||B,children:B?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),p&&o("div",{class:"error",children:p})]})]})}function ba(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function ha({detail:e,strings:t}){var n;let r=`detail.context.capture.${e.capture_method}`,a=(n=t[r])!=null?n:e.capture_method;return o("div",{class:"report-detail-context",children:[o("div",{class:"report-detail-context-pills",children:[o("span",{class:"pill pill-type",children:t[`type.${e.feedback_type}`]}),o("span",{class:`pill pill-severity pill-severity--${e.severity}`,children:t[`severity.${e.severity}`]}),o("span",{class:"pill pill-capture",children:a})]}),o("div",{class:"report-detail-context-line",children:[o("span",{class:"report-detail-context-label",children:t["detail.context.submitted_at"]}),o("span",{children:zr(e.created_at)})]}),e.page_url&&(()=>{let i=Ct(e.page_url);return o("div",{class:"report-detail-context-line",title:e.page_url,children:[o("span",{class:"report-detail-context-label",children:t["detail.context.page"]}),i?o("a",{class:"report-detail-context-url",href:i,target:"_blank",rel:"noopener noreferrer",children:Ee(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:Ee(e.page_url,64)})]})})()]})}function zr(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var va=20,ya=15;function xa({ctx:e,strings:t}){var c,f,u;let r=(c=e.errors)!=null?c:[],a=((f=e.consoleLogs)!=null?f:[]).slice(-va),n=((u=e.networkRequests)!=null?u:[]).slice(-ya),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,d=l>0?`${t["detail.tech.title"]} \xB7 ${l} ${l===1?t["detail.tech.errors_one"]:t["detail.tech.errors_many"]}`:t["detail.tech.title"];return o("details",{class:"report-detail-tech",children:[o("summary",{children:d}),o("div",{class:"tech-body",children:[i&&o(_a,{device:i,strings:t}),r.length>0&&o(wa,{errors:r,strings:t}),a.length>0&&o(ka,{logs:a,strings:t}),n.length>0&&o(Sa,{rows:n,strings:t})]})]})}function _a({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let a=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${a}`})}return e!=null&&e.platform&&r.push({label:t["detail.tech.device.platform"],value:e.platform}),e!=null&&e.language&&r.push({label:t["detail.tech.device.language"],value:e.language}),e!=null&&e.timezone&&r.push({label:t["detail.tech.device.timezone"],value:e.timezone}),e!=null&&e.connection&&r.push({label:t["detail.tech.device.connection"],value:e.connection}),r.length===0?null:o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.device"]}),o("dl",{class:"tech-device",children:r.map(a=>o(oe,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function wa({errors:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.errors"]}),o("ul",{class:"tech-errors",children:e.map(r=>o("li",{children:[o("div",{class:"tech-errors-msg",children:r.message}),r.stack&&o("pre",{class:"tech-errors-stack",children:Ca(r.stack)})]}))})]})}function ka({logs:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.console"]}),o("ul",{class:"tech-console",children:e.map(r=>o("li",{class:`tech-console-row tech-console-row--${r.level}`,children:[o("span",{class:"tech-console-level",children:r.level}),o("span",{class:"tech-console-msg",children:r.message})]}))})]})}function Sa({rows:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.network"]}),o("ul",{class:"tech-network",children:e.map(r=>{let a=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${a?" tech-network-row--fail":""}`,children:[o("span",{class:"tech-network-status",children:r.status||"\u2014"}),o("span",{class:"tech-network-method",children:r.method}),o("span",{class:"tech-network-url",title:r.url,children:Ee(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Ca(e){let t=e.split(`
618
+ `))}e.push(d)}catch(l){}n.apply(console,s)})}return()=>{for(let[a,n]of Object.entries(r))console[a]=n}}function Vt(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(n,i){let s=performance.now(),l=typeof n=="string"?n:n instanceof URL?n.toString():n.url,c=((i==null?void 0:i.method)||(n instanceof Request?n.method:"GET")).toUpperCase();try{let d=await r(n,i);return e.push({url:t(l),method:c,status:d.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),d}catch(d){let f=d instanceof Error?d.message:String(d);throw e.push({url:t(l),method:c,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:de(f)}),d}},()=>{window.fetch=r}}function Gt(e,t){if(typeof window=="undefined"||typeof window.XMLHttpRequest!="function")return()=>{};let r=window.XMLHttpRequest,a=r.prototype.open,n=r.prototype.send;return r.prototype.open=function(s,l){return this.__mfb={method:s.toUpperCase(),url:typeof l=="string"?l:l.toString(),start:performance.now()},a.apply(this,arguments)},r.prototype.send=function(s){return this.addEventListener("loadend",()=>{try{let l=this.__mfb;if(!l)return;e.push({url:t(l.url),method:l.method,status:this.status,durationMs:Math.round(performance.now()-l.start),ts:Date.now()})}catch(l){}}),n.call(this,s!=null?s:null)},()=>{r.prototype.open=a,r.prototype.send=n}}function Yt(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?de(n):void 0;e.push({message:de(a.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=a=>{let n=a.reason,i=n instanceof Error?n.message:typeof n=="string"?n:(()=>{try{return JSON.stringify(n)}catch(c){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?de(s):void 0;e.push({message:de(i),...l!==void 0&&{stack:l},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function Xt(e=1e3){let t=[],r=[],a=null;if(typeof PerformanceObserver!="undefined")try{a=new PerformanceObserver(n=>{for(let i of n.getEntries())if(i.entryType==="longtask")for(t.push({duration:i.duration,startTime:i.startTime});t.length>20;)t.shift();else if(i.entryType==="resource"){let s=i;if(s.duration>e)for(r.push({name:xe(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),a.observe({entryTypes:["longtask","resource"]})}catch(n){}return{snapshot(){let n=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=n?{type:n.type,duration:n.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){a==null||a.disconnect()}}}var Se=class{constructor(t){qe(this,"max",t);qe(this,"items",[])}push(t){for(this.items.push(t);this.items.length>this.max;)this.items.shift()}snapshot(){return this.items.slice()}clear(){this.items.length=0}};function Jt(e={}){var g;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(g=e.sanitizeUrl)!=null?g:xe,i=new Se(t),s=new Se(r),l=new Se(a),c=Ut(i),d=Vt(s,n),f=Gt(s,n),u=Yt(l),p=Xt();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:Qt(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){c(),d(),f(),u(),p.dispose()}}}var Zo={"fab.label":"Send feedback","page.badge.aria":"Feedback \u2014 {n} open on this page","page.badge.aria.one":"Feedback \u2014 1 open on this page","page.strip.text":"{n} open reports on this page","page.strip.text.one":"1 open report on this page","page.strip.view":"View","page.peek.title":"On this page","page.peek.viewAll":"View all {n}","page.peek.viewAll.one":"View 1 open report","form.title":"Send feedback","form.description.label":"What happened?","form.description.placeholder":"Describe the issue or idea in one or two sentences.","form.type.label":"Type","form.severity.label":"Severity","form.submit":"Send","form.cancel":"Cancel","form.close":"Close","form.submitting":"Sending\u2026","form.meta.action":"Report a problem with this feedback tool","form.meta.badge":"\u2192 goes to the feedback-tool team","form.meta.cancel":"Back to normal feedback","form.success":"Thanks \u2014 your feedback was sent.","form.success.seq":"Thanks \u2014 report #{seq} was sent. \u2713","form.discard.title":"Unsaved changes","form.discard.body":"Discard your feedback?","form.discard.keep":"Keep editing","form.discard.confirm":"Discard","form.error":"Could not send. Please try again.","form.description.required":"Please describe the issue before sending.","form.screenshot.label":"Screenshot","form.screenshot.cta_click":"Click","form.screenshot.cta_rest":"drop, or paste an image","form.screenshot.formats":"PNG, JPEG or WebP \u2014 up to 10 MB","form.screenshot.remove":"Remove screenshot","form.screenshot.annotate":"Annotate","form.screenshot.error_type":"Unsupported file type. Use PNG, JPEG or WebP.","form.screenshot.error_size":"File too large (max {max} MB).","form.screenshot.error_count":"Too many screenshots (max {max}).","form.context.label":"Page","form.capture.notice":"Console, network activity and errors are captured automatically to help us debug.","type.bug":"Bug","type.feature":"Feature request","type.question":"Question","type.praise":"Praise","type.typo":"Typo","severity.blocker":"Blocker","severity.high":"High","severity.medium":"Medium","severity.low":"Low","annotator.title":"Annotate screenshot","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Arrow","annotator.tool.freehand":"Freehand","annotator.tool.text":"Text","annotator.tool.highlight":"Highlight","annotator.tool.blur":"Blur (hide sensitive data)","annotator.text_prompt":"Enter text:","annotator.color_picker":"Custom color","annotator.undo":"Undo","annotator.redo":"Redo","annotator.clear":"Clear all","annotator.count_suffix":"annotations","annotator.loading":"Loading\u2026","annotator.apply":"Apply","annotator.applying":"Applying\u2026","tab.send":"Send","tab.mine":"My reports","tab.changelog":"This week","tab.board":"Board","board.kpi.total":"Total","board.kpi.new":"New","board.kpi.in_progress":"In progress","board.kpi.awaiting_validation":"Awaiting validation","board.kpi.closed":"Closed","board.kpi.rejected":"Rejected","board.kpi.resolution_rate":"Resolution rate","board.sort":"Sort","board.sort.recent":"Newest first","board.sort.oldest":"Oldest first","board.sort.updated":"Recently active","board.sort.severity":"Severity","board.sort.status":"Status","board.filter.status":"Status","board.filter.type":"Type","board.filter.severity":"Severity","board.filter.search.placeholder":"Search\u2026","board.filter.mine":"Mine only","board.filter.clear":"Clear filters","board.list.empty.title":"Nothing here yet","board.list.empty.description":"When reports land, they\u2019ll show up here.","board.list.loading":"Loading\u2026","board.list.error":"Couldn\u2019t load reports.","board.retry":"Try again","board.list.you":"you","board.list.count":"{n} of {total}","board.list.loadMore":"Show more","board.detail.empty":"Pick a report on the left to see its full thread.","board.detail.by":"By","board.detail.confirm_resolution":"Confirm resolution","board.detail.status_history":"History","board.scope.project":"Project reports","board.scope.mine":"Your reports","board.scope.thisPage":"This page","board.scope.allPages":"All pages","board.scope.onThisPage":"on this page","board.list.count.page":"{n} of {total} \xB7 this page","board.list.empty.page.title":"No feedback on this page yet.","board.list.empty.page.description":"Be the first to report something here \u2014 or browse the whole project.","board.back":"Back","changelog.empty.title":"Nothing resolved yet","changelog.empty.body":"Once a report you sent is fixed it will appear here, grouped by week.","changelog.week_of":"Week of {date}","changelog.resolved_one":"{count} resolved","changelog.resolved_many":"{count} resolved","mine.empty.title":"No reports yet","mine.empty.body":"Once you send feedback you can follow the thread here.","mine.refresh":"Refresh","mine.validate.banner":"{count} fix(es) awaiting your confirmation","mine.validate.confirm":"Fix works","mine.validate.reopen":"Still broken","mine.validate.view":"Review","diag.run":"Diagnose","diag.running":"Checking the connection\u2026","diag.offline":"You appear to be offline. Reconnect and retry.","diag.blocked":"The feedback service is unreachable from this network. A firewall or proxy is blocking it \u2014 ask IT to allow {host}.","diag.intercepted":"Your corporate network (SSL-inspection proxy) is intercepting widget traffic. Ask IT to add {host} to the inspection bypass list.","diag.preflight":"A network proxy is blocking the widget\u2019s secure requests (CORS preflight). Ask IT to allow {host}.","diag.key":"The widget\u2019s access key was rejected. Contact the site team.","diag.throttle":"Too many requests right now \u2014 wait a moment and retry.","diag.healthy":"The service is reachable \u2014 this looks like a temporary hiccup. Retry.","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.jump.placeholder":"#","mine.jump.go":"Open","mine.jump.aria":"Open a report by number","mine.jump.not_found":"No report with that number.","error.rate_limited":"Too many requests \u2014 retry in {seconds}s.","error.rate_limited_generic":"Too many requests \u2014 try again in a moment.","mine.replies_one":"1 reply","mine.replies_many":"{count} replies","mine.filter.empty":"No reports match this filter.","kpi.new":"New","kpi.in_progress":"In progress","kpi.awaiting_validation":"Awaiting you","kpi.resolution_rate":"Resolution rate","detail.back":"Back","detail.thread":"Conversation","detail.no_replies":"No replies yet \u2014 we\u2019ll let you know when an operator responds.","detail.compose_placeholder":"Add a follow-up reply\u2026","detail.compose_send":"Reply","detail.compose_sending":"Sending\u2026","detail.attach_add":"Add image","detail.attach_remove":"Remove","detail.attachment_alt":"Attached image","detail.copy_link":"Copy link","detail.copied":"Link copied","detail.edit":"Edit","detail.edit_save":"Save","detail.edit_cancel":"Cancel","detail.edit_saving":"Saving\u2026","detail.edit_failed":"Could not save your changes.","detail.close_cta":"Mark as resolved","detail.close_busy":"Marking\u2026","detail.reopen_cta":"Still not fixed","detail.reopen_busy":"Reopening\u2026","detail.teammate_notice":"Viewing a teammate\u2019s report \u2014 replies are private to the submitter.","detail.load_failed.title":"Report not available","detail.load_failed.body":"It may have been deleted, or you no longer have access to it.","detail.load_failed.cta":"Back","detail.send_failed":"Couldn\u2019t send your reply. Try again.","detail.close_failed":"Couldn\u2019t mark as resolved. Try again.","detail.reopen_failed":"Couldn\u2019t reopen the report. Try again.","detail.history":"Status history","detail.context.submitted_at":"Submitted","detail.context.page":"Page","detail.context.capture.manual":"Manual capture","detail.context.capture.html2canvas":"Auto capture","detail.context.capture.display_media":"Screen share","detail.context.capture.none":"No screenshot","detail.author.staff":"Operator","detail.author.mcp":"Mhosaic Team","detail.author.system":"System","detail.tech.title":"What we received","detail.tech.errors_one":"error","detail.tech.errors_many":"errors","detail.tech.device":"Device","detail.tech.device.viewport":"Viewport","detail.tech.device.platform":"Platform","detail.tech.device.language":"Language","detail.tech.device.timezone":"Timezone","detail.tech.device.connection":"Connection","detail.tech.errors":"Runtime errors","detail.tech.console":"Console (last 20)","detail.tech.network":"Network (last 15)","detail.verified.badge":"Agent-verified","detail.verified.title":"Proof of fix","detail.verified.functional":"Functional check","detail.verified.ui":"UI check","status.new":"New","status.in_progress":"In progress","status.awaiting_validation":"Awaiting your validation","status.closed":"Closed","status.rejected":"Rejected","status.duplicate":"Duplicate","status.wontfix":"Won\u2019t fix"},ea={"fab.label":"Envoyer un commentaire","page.badge.aria":"Retours \u2014 {n} ouverts sur cette page","page.badge.aria.one":"Retours \u2014 1 ouvert sur cette page","page.strip.text":"{n} retours ouverts sur cette page","page.strip.text.one":"1 retour ouvert sur cette page","page.strip.view":"Voir","page.peek.title":"Sur cette page","page.peek.viewAll":"Voir les {n}","page.peek.viewAll.one":"Voir 1 retour ouvert","form.title":"Envoyer un commentaire","form.description.label":"Qu\u2019est-il arriv\xE9 ?","form.description.placeholder":"D\xE9crivez le probl\xE8me ou l\u2019id\xE9e en une ou deux phrases.","form.type.label":"Type","form.severity.label":"S\xE9v\xE9rit\xE9","form.submit":"Envoyer","form.cancel":"Annuler","form.close":"Fermer","form.submitting":"Envoi\u2026","form.meta.action":"Signaler un probl\xE8me avec l'outil de feedback","form.meta.badge":"\u2192 envoy\xE9 \xE0 l'\xE9quipe de l'outil de feedback","form.meta.cancel":"Revenir au commentaire normal","form.success":"Merci \u2014 votre commentaire a \xE9t\xE9 envoy\xE9.","form.success.seq":"Merci \u2014 rapport n\xB0{seq} envoy\xE9. \u2713","form.discard.title":"Modifications non enregistr\xE9es","form.discard.body":"Abandonner votre commentaire ?","form.discard.keep":"Continuer la saisie","form.discard.confirm":"Abandonner","form.error":"\xC9chec d\u2019envoi. Veuillez r\xE9essayer.","form.description.required":"D\xE9crivez le probl\xE8me avant d\u2019envoyer.","form.screenshot.label":"Capture d\u2019\xE9cran","form.screenshot.cta_click":"Cliquez","form.screenshot.cta_rest":"d\xE9posez ou collez une image","form.screenshot.formats":"PNG, JPEG ou WebP \u2014 jusqu\u2019\xE0 10 Mo","form.screenshot.remove":"Retirer la capture","form.screenshot.annotate":"Annoter","form.screenshot.error_type":"Format non support\xE9. Utilisez PNG, JPEG ou WebP.","form.screenshot.error_size":"Fichier trop volumineux (max {max} Mo).","form.screenshot.error_count":"Trop de captures d\u2019\xE9cran (max {max}).","form.context.label":"Page","form.capture.notice":"La console, l\u2019activit\xE9 r\xE9seau et les erreurs sont captur\xE9es automatiquement pour faciliter le diagnostic.","type.bug":"Bogue","type.feature":"Suggestion","type.question":"Question","type.praise":"Compliment","type.typo":"Coquille","severity.blocker":"Bloquant","severity.high":"\xC9lev\xE9e","severity.medium":"Moyenne","severity.low":"Faible","annotator.title":"Annoter la capture","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Fl\xE8che","annotator.tool.freehand":"Dessin libre","annotator.tool.text":"Texte","annotator.tool.highlight":"Surligner","annotator.tool.blur":"Flouter (donn\xE9es sensibles)","annotator.text_prompt":"Entrez le texte :","annotator.color_picker":"Couleur personnalis\xE9e","annotator.undo":"Annuler","annotator.redo":"Refaire","annotator.clear":"Tout effacer","annotator.count_suffix":"annotations","annotator.loading":"Chargement\u2026","annotator.apply":"Appliquer","annotator.applying":"Application\u2026","tab.send":"Envoyer","tab.mine":"Mes rapports","tab.changelog":"Cette semaine","tab.board":"Tableau","board.kpi.total":"Total","board.kpi.new":"Nouveau","board.kpi.in_progress":"En cours","board.kpi.awaiting_validation":"\xC0 valider","board.kpi.closed":"Ferm\xE9","board.kpi.rejected":"Refus\xE9","board.kpi.resolution_rate":"Taux de r\xE9solution","board.sort":"Trier","board.sort.recent":"Plus r\xE9cents","board.sort.oldest":"Plus anciens","board.sort.updated":"Activit\xE9 r\xE9cente","board.sort.severity":"S\xE9v\xE9rit\xE9","board.sort.status":"Statut","board.filter.status":"Statut","board.filter.type":"Type","board.filter.severity":"S\xE9v\xE9rit\xE9","board.filter.search.placeholder":"Rechercher\u2026","board.filter.mine":"Les miens","board.filter.clear":"Effacer les filtres","board.list.empty.title":"Rien \xE0 voir ici","board.list.empty.description":"Les rapports appara\xEEtront ici d\xE8s qu\u2019ils arrivent.","board.list.loading":"Chargement\u2026","board.list.error":"Impossible de charger les rapports.","board.retry":"R\xE9essayer","board.list.you":"vous","board.list.count":"{n} sur {total}","board.list.loadMore":"Afficher plus","board.detail.empty":"S\xE9lectionnez un rapport \xE0 gauche pour voir le fil complet.","board.detail.by":"Par","board.detail.confirm_resolution":"Confirmer la r\xE9solution","board.detail.status_history":"Historique","board.scope.project":"Rapports du projet","board.scope.mine":"Vos rapports","board.scope.thisPage":"Cette page","board.scope.allPages":"Toutes les pages","board.scope.onThisPage":"sur cette page","board.list.count.page":"{n} sur {total} \xB7 cette page","board.list.empty.page.title":"Aucun retour sur cette page pour l\u2019instant.","board.list.empty.page.description":"Soyez le premier \xE0 signaler quelque chose ici \u2014 ou parcourez tout le projet.","board.back":"Retour","changelog.empty.title":"Rien de r\xE9solu pour l\u2019instant","changelog.empty.body":"Quand un rapport que vous avez envoy\xE9 est corrig\xE9, il appara\xEEtra ici, regroup\xE9 par semaine.","changelog.week_of":"Semaine du {date}","changelog.resolved_one":"{count} r\xE9solu","changelog.resolved_many":"{count} r\xE9solus","mine.empty.title":"Aucun rapport","mine.empty.body":"Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.","mine.refresh":"Actualiser","mine.validate.banner":"{count} correctif(s) \xE0 confirmer","mine.validate.confirm":"Corrig\xE9 \u2713","mine.validate.reopen":"Toujours cass\xE9","mine.validate.view":"Voir","diag.run":"Diagnostiquer","diag.running":"V\xE9rification de la connexion\u2026","diag.offline":"Vous semblez hors ligne. Reconnectez-vous puis r\xE9essayez.","diag.blocked":"Le service de feedback est injoignable depuis ce r\xE9seau. Un pare-feu ou proxy le bloque \u2014 demandez \xE0 votre TI d\u2019autoriser {host}.","diag.intercepted":"Votre r\xE9seau d\u2019entreprise (inspection SSL) intercepte le trafic du widget. Demandez \xE0 votre TI d\u2019ajouter {host} \xE0 la liste d\u2019exclusion.","diag.preflight":"Un proxy r\xE9seau bloque les requ\xEAtes s\xE9curis\xE9es du widget (pr\xE9flight CORS). Demandez \xE0 votre TI d\u2019autoriser {host}.","diag.key":"La cl\xE9 d\u2019acc\xE8s du widget a \xE9t\xE9 refus\xE9e. Contactez l\u2019\xE9quipe du site.","diag.throttle":"Trop de requ\xEAtes pour le moment \u2014 patientez puis r\xE9essayez.","diag.healthy":"Le service est joignable \u2014 le probl\xE8me semble passager. R\xE9essayez.","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.jump.placeholder":"#","mine.jump.go":"Ouvrir","mine.jump.aria":"Ouvrir un rapport par num\xE9ro","mine.jump.not_found":"Aucun rapport avec ce num\xE9ro.","error.rate_limited":"Trop de requ\xEAtes \u2014 r\xE9essaie dans {seconds} s.","error.rate_limited_generic":"Trop de requ\xEAtes \u2014 r\xE9essaie dans un instant.","mine.replies_one":"1 r\xE9ponse","mine.replies_many":"{count} r\xE9ponses","mine.filter.empty":"Aucun rapport ne correspond \xE0 ce filtre.","kpi.new":"Nouveau","kpi.in_progress":"En cours","kpi.awaiting_validation":"\xC0 valider","kpi.resolution_rate":"Taux de r\xE9solution","detail.back":"Retour","detail.thread":"Conversation","detail.no_replies":"Pas encore de r\xE9ponse \u2014 vous serez notifi\xE9 d\xE8s qu\u2019un op\xE9rateur r\xE9pondra.","detail.compose_placeholder":"Ajouter une r\xE9ponse\u2026","detail.compose_send":"R\xE9pondre","detail.compose_sending":"Envoi\u2026","detail.attach_add":"Ajouter une image","detail.attach_remove":"Retirer","detail.attachment_alt":"Image jointe","detail.copy_link":"Copier le lien","detail.copied":"Lien copi\xE9","detail.edit":"Modifier","detail.edit_save":"Enregistrer","detail.edit_cancel":"Annuler","detail.edit_saving":"Enregistrement\u2026","detail.edit_failed":"Impossible d\u2019enregistrer vos modifications.","detail.close_cta":"Marquer comme r\xE9solu","detail.close_busy":"Validation\u2026","detail.reopen_cta":"Toujours pas r\xE9gl\xE9","detail.reopen_busy":"R\xE9ouverture\u2026","detail.teammate_notice":"Vous consultez le rapport d\u2019un co\xE9quipier \u2014 les r\xE9ponses sont priv\xE9es au soumetteur.","detail.load_failed.title":"Rapport indisponible","detail.load_failed.body":"Il a peut-\xEAtre \xE9t\xE9 supprim\xE9, ou vous n\u2019y avez plus acc\xE8s.","detail.load_failed.cta":"Retour","detail.send_failed":"Impossible d\u2019envoyer votre r\xE9ponse. R\xE9essayez.","detail.close_failed":"Impossible de marquer comme r\xE9solu. R\xE9essayez.","detail.reopen_failed":"Impossible de rouvrir le rapport. R\xE9essayez.","detail.history":"Historique du statut","detail.context.submitted_at":"Envoy\xE9","detail.context.page":"Page","detail.context.capture.manual":"Capture manuelle","detail.context.capture.html2canvas":"Capture automatique","detail.context.capture.display_media":"Partage d\u2019\xE9cran","detail.context.capture.none":"Sans capture","detail.author.staff":"Op\xE9rateur","detail.author.mcp":"\xC9quipe Mhosaic","detail.author.system":"Syst\xE8me","detail.tech.title":"Ce que nous avons re\xE7u","detail.tech.errors_one":"erreur","detail.tech.errors_many":"erreurs","detail.tech.device":"Appareil","detail.tech.device.viewport":"Fen\xEAtre","detail.tech.device.platform":"Plateforme","detail.tech.device.language":"Langue","detail.tech.device.timezone":"Fuseau horaire","detail.tech.device.connection":"Connexion","detail.tech.errors":"Erreurs d\u2019ex\xE9cution","detail.tech.console":"Console (20 derniers)","detail.tech.network":"R\xE9seau (15 derniers)","detail.verified.badge":"V\xE9rifi\xE9 par l\u2019agent","detail.verified.title":"Preuve de correction","detail.verified.functional":"Fonctionnel v\xE9rifi\xE9","detail.verified.ui":"Interface v\xE9rifi\xE9e","status.new":"Nouveau","status.in_progress":"En cours","status.awaiting_validation":"En attente de validation","status.closed":"Ferm\xE9","status.rejected":"Rejet\xE9","status.duplicate":"Doublon","status.wontfix":"Non corrig\xE9"},ta={fr:ea};function ra(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=ta[t])!=null?r:null}function Zt(e,t={}){var a;let r=(a=ra(t.locale))!=null?a:{};return{...Zo,...r,...e}}pe();oe();function ue(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var St="mfb:locationchange",Sr=!1;function ma(){if(!(Sr||typeof history=="undefined")){Sr=!0;for(let e of["pushState","replaceState"]){let t=history[e];history[e]=function(...r){let a=t.apply(this,r);return window.dispatchEvent(new Event(St)),a}}}}function et(e){return ma(),window.addEventListener("popstate",e),window.addEventListener(St,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(St,e)}}oe();oe();pe();pe();var ga=0;function o(e,t,r,a,n,i){t||(t={});var s,l,c=t;if("ref"in c)for(l in c={},t)l=="ref"?s=t[l]:c[l]=t[l];var d={type:e,props:c,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ga,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)c[l]===void 0&&(c[l]=s[l]);return V.vnode&&V.vnode(d),d}function tt({api:e,strings:t,host:r}){var l;let[a,n]=R("idle"),i=async()=>{n("running");try{n(await e.diagnose())}catch(c){n("blocked")}};if(a==="idle")return o("button",{type:"button",class:"btn diag-btn",onClick:()=>{i()},children:t["diag.run"]});if(a==="running")return o("div",{class:"diag-result",children:t["diag.running"]});let s=`diag.${a}`;return o("div",{class:"diag-result",children:((l=t[s])!=null?l:a).replace("{host}",r)})}var _e=new Map;function Cr(e,t){return`${e}|${t}`}function Rr(e){let t=_e.get(e);return t&&Date.now()-t.at<6e4?t:null}function Er(e,t,r){if(!_e.has(e)&&_e.size>=50){let a=_e.keys().next().value;a!==void 0&&_e.delete(a)}_e.delete(e),_e.set(e,{page:t,kpis:r,at:Date.now()})}var Pr="mhosaic.boardView.";function Tr(e){try{let t=localStorage.getItem(Pr+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function qr(e,t){try{localStorage.setItem(Pr+e,JSON.stringify(t))}catch(r){}}function he(e,t){let r=!1,a=!1,n=0,i=null,s=typeof document!="undefined"?document:null,l=()=>Math.min(t*2**n,t*10),c=async()=>{if(r)return;if(s!=null&&s.hidden){a=!0;return}let f=!1;try{f=await e()}catch(u){f=!1}r||(n=f?0:n+1,i=setTimeout(()=>{c()},l()))},d=()=>{r||!a||s!=null&&s.hidden||(a=!1,c())};return s==null||s.addEventListener("visibilitychange",d),c(),{stop(){r=!0,i&&clearTimeout(i),s==null||s.removeEventListener("visibilitychange",d)}}}function Pe(e,t){return e instanceof Ae?e.retryAfterSeconds>0?t["error.rate_limited"].replace("{seconds}",String(e.retryAfterSeconds)):t["error.rate_limited_generic"]:null}oe();var Ar=/#(\d+)/g;function ze(e,t){let r=e!=null?e:"";if(!r||!t)return[r];let a=[],n=0;Ar.lastIndex=0;let i;for(;(i=Ar.exec(r))!==null;){i.index>n&&a.push(r.slice(n,i.index));let s=Number(i[1]);a.push(o("button",{type:"button",class:"seq-link",onClick:()=>t(s),"aria-label":`Open report #${s}`,children:["#",s]})),n=i.index+i[0].length}return n<r.length&&a.push(r.slice(n)),a.length?a:[r]}function Mr({comment:e,strings:t,onOpenSeq:r,stableUrl:a}){var u;let n=e.is_mine,i=!n&&e.author_source==="mcp",s=!n&&e.author_source==="system",l=i?"mcp":s?"system":"staff",c=l==="mcp"?"detail.author.mcp":l==="system"?"detail.author.system":"detail.author.staff",d=e.author_label||t[c],f=((u=e.attachments)!=null?u:[]).filter(p=>p.url);return o("div",{class:`comment-bubble ${n?"is-mine":"is-other"}`,children:[!n&&d&&o("div",{class:`comment-author comment-author--${l}`,children:d}),e.body&&o("div",{class:"comment-body",children:ze(e.body,r)}),f.length>0&&o("div",{class:"comment-attachments",children:f.map(p=>{let g=a?a(`att:${p.id}`,p.url):p.url;return o("a",{class:"comment-attachment",href:g,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:g,alt:t["detail.attachment_alt"],loading:"lazy"})},p.id)})}),o("div",{class:"comment-time",children:ba(e.created_at)})]})}function ba(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var Lr=["image/png","image/jpeg","image/webp"];var ha=[...Lr,"application/pdf","text/plain","text/csv","application/json",""],zr="image/png,image/jpeg,image/webp,application/pdf,text/plain,.log,.txt,.csv,.json";function Br(e){return ha.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function Fr(e){return Lr.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function Te(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),a=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-a)}`}function rt(e){if(!e)return;let t;try{t=new URL(e)}catch(r){return}if(t.protocol==="https:"||t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]"))return t.toString()}var va=3e4;function ot({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal",onOpenSeq:l,buildPermalink:c,seed:d}){var Ft,It,Dt,$t,Kt,Ot;let[f,u]=R(null),[p,g]=R(null),[_,T]=R(!1),[y,v]=R(!1),[S,z]=R(""),[w,m]=R(!1),[b,q]=R(!1),[F,h]=R(""),[L,D]=R(!1),[K,N]=R(!1),[C,B]=R(!1),[H,Y]=R([]),[re,J]=R(""),k=G(null),P=G(!0),O=G(new Map),[,$]=R(0),A=45*6e4,E=(M,j)=>{if(!j)return j;let Z=O.current.get(M);return Z&&Date.now()-Z.at<A?Z.url:(O.current.set(M,{url:j,at:Date.now()}),j)},I=M=>{O.current.delete(M),$(j=>j+1)},W=G(H);W.current=H,Q(()=>()=>W.current.forEach(M=>URL.revokeObjectURL(M.preview)),[]);let U=M=>{J("");let j=5-H.length,Z=M.slice(0,Math.max(0,j));for(let te of Z){let ce=Br(te);if(ce){J(ce.kind==="type"?a["form.screenshot.error_type"]:a["form.screenshot.error_size"].replace("{max}",String(ce.maxMb)));return}}if(Z.length){let te=Z.map(ce=>({blob:ce,preview:URL.createObjectURL(ce)}));Y(ce=>[...ce,...te])}M.length>Z.length&&J(a["form.screenshot.error_count"].replace("{max}",String(5)))},se=M=>{var te;let j=M.target,Z=Array.from((te=j.files)!=null?te:[]);Z.length&&U(Z),j.value=""},le=M=>{let j=H[M];j&&URL.revokeObjectURL(j.preview),Y(Z=>Z.filter((te,ce)=>ce!==M)),J("")},ke=async()=>{try{let M=await e.getReport(r,t);return P.current&&(u(M),g(null)),!0}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",M),!P.current)return!1;let j=Pe(M,a);return g(j!=null?j:"load_failed"),!1}};Q(()=>{P.current=!0;let M=he(ke,va);return()=>{P.current=!1,M.stop()}},[r,t]);let ye=async()=>{if(!(!F.trim()&&H.length===0||L)){D(!0);try{let M=`${r}:${Date.now()}`,j=H.map(te=>te.blob),Z=await e.addComment(r,t,F.trim(),M,j.length?j:void 0);if(!P.current)return;h(""),H.forEach(te=>URL.revokeObjectURL(te.preview)),Y([]),J(""),u(te=>te&&{...te,comments:ya(te.comments,Z)}),ke()}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",M),!P.current)return;g(a["detail.send_failed"])}finally{P.current&&D(!1)}}},Ke=async()=>{if(!(!c||!f))try{if(await navigator.clipboard.writeText(c(f.id)),!P.current)return;T(!0),setTimeout(()=>{P.current&&T(!1)},2e3)}catch(M){}},Lo=()=>{f&&(z(f.description),q(!1),v(!0))},zo=()=>{v(!1),q(!1)},Bo=async()=>{if(!f||w)return;let M=S.trim();if(M){m(!0),q(!1);try{let j=await e.editDescription(r,t,M);if(!P.current)return;u(j),v(!1)}catch(j){if(typeof console!="undefined"&&console.warn("[mhosaic] editDescription:",j),!P.current)return;q(!0)}finally{P.current&&m(!1)}}},Fo=async()=>{if(!(K||C)){N(!0);try{let M=await e.closeAsResolved(r,t);if(!P.current)return;u(M)}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",M),!P.current)return;g(a["detail.close_failed"])}finally{P.current&&N(!1)}}},Io=async()=>{if(!(K||C)){B(!0);try{let M=await e.reopenUnresolved(r,t);if(!P.current)return;u(M)}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",M),!P.current)return;g(a["detail.reopen_failed"])}finally{P.current&&B(!1)}}};if(!f&&!p){if(d){let M=o("span",{class:`pill pill-status pill-status--${d.status}`,children:(Ft=a[`status.${d.status}`])!=null?Ft:d.status});return o("div",{class:`report-detail variant-${s} is-seeded`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.back"]]}),M]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),M]}),o("div",{class:"report-detail-body",children:[o("div",{class:"report-detail-description-row",children:o("p",{class:"report-detail-description",children:ze(d.description,l)})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),o("div",{class:"mine-loading",children:a["mine.loading"]})]})]})}return o("div",{class:"mine-loading",children:a["mine.loading"]})}if(!f)return p&&p!=="load_failed"?o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-body",children:p}),o("button",{type:"button",class:"btn",onClick:()=>{ke()},children:a["board.retry"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]}):o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:a["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:a["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]});let Lt=(It=f.is_mine)!=null?It:i,zt=(Dt=f.can_moderate)!=null?Dt:Lt,Bt=zt&&f.status==="awaiting_validation",Do=zt;return o("div",{class:`report-detail variant-${s}`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.back"]]}),o("span",{class:"report-detail-header-pills",children:[o("span",{class:`pill pill-status pill-status--${f.status}`,children:($t=a[`status.${f.status}`])!=null?$t:f.status}),f.verification&&o("span",{class:"pill pill-verified",children:a["detail.verified.badge"]})]})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),o("span",{class:"report-detail-header-pills",children:[o("span",{class:`pill pill-status pill-status--${f.status}`,children:(Kt=a[`status.${f.status}`])!=null?Kt:f.status}),f.verification&&o("span",{class:"pill pill-verified",children:a["detail.verified.badge"]})]})]}),o("div",{class:"report-detail-body",children:[o(xa,{detail:f,strings:a}),y?o("div",{class:"report-detail-edit",children:[o("textarea",{class:"report-detail-edit-input",value:S,onInput:M=>{z(M.target.value),q(!1)},disabled:w}),b&&o("p",{class:"error",role:"alert",children:a["detail.edit_failed"]}),o("div",{class:"report-detail-edit-actions",children:[o("button",{type:"button",class:"btn btn--ghost",onClick:zo,disabled:w,children:a["detail.edit_cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:Bo,disabled:w||!S.trim(),children:w?a["detail.edit_saving"]:a["detail.edit_save"]})]})]}):o("div",{class:"report-detail-description-row",children:[o("p",{class:"report-detail-description",children:ze(f.description,l)}),Lt&&o("button",{type:"button",class:"btn btn--ghost report-detail-edit",onClick:Lo,children:a["detail.edit"]})]}),c&&o("div",{class:"report-detail-permalink",children:o("button",{type:"button",class:"btn btn--ghost report-detail-copy-link",onClick:Ke,children:_?a["detail.copied"]:a["detail.copy_link"]})}),((Ot=f.screenshots)!=null&&Ot.length?f.screenshots.map(M=>M.url):[f.screenshot_url]).map((M,j)=>({url:E(`shot:${j}`,M!=null?M:null),pinKey:`shot:${j}`})).filter(M=>!!M.url).map(({url:M,pinKey:j})=>{let Z=rt(M);return Z?o("a",{class:"report-detail-screenshot",href:Z,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:M,alt:"",loading:"lazy",onError:()=>I(j)})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:M,alt:"",loading:"lazy",onError:()=>I(j)})})}),f.verification&&o(Sa,{verification:f.verification,strings:a,pinUrl:E,unpinUrl:I}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),f.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:f.comments.map(M=>o("li",{children:o(Mr,{comment:M,strings:a,...l&&{onOpenSeq:l},stableUrl:(j,Z)=>{var te;return(te=E(j,Z))!=null?te:Z}})}))}),f.status_history&&f.status_history.length>0&&o(qa,{rows:f.status_history,strings:a}),f.technical_context&&o(ka,{ctx:f.technical_context,strings:a}),Do?o("div",{class:"report-compose",children:[o("textarea",{value:F,placeholder:a["detail.compose_placeholder"],onInput:M=>h(M.target.value),disabled:L}),H.length>0&&o("div",{class:"compose-attachments",children:H.map((M,j)=>o("div",{class:"compose-attachment",children:[o("img",{src:M.preview,alt:a["detail.attachment_alt"]}),o("button",{type:"button",class:"compose-attachment-remove","aria-label":a["detail.attach_remove"],onClick:()=>le(j),disabled:L,children:"\xD7"})]},M.preview))}),re&&o("p",{class:"compose-attach-error",role:"alert",children:re}),o("input",{ref:k,type:"file",accept:zr,multiple:!0,class:"compose-attach-input",onChange:se,hidden:!0}),o("div",{class:"report-compose-actions",children:[o("button",{type:"button",class:"btn btn--ghost compose-attach-btn",onClick:()=>{var M;return(M=k.current)==null?void 0:M.click()},disabled:L||H.length>=5,children:a["detail.attach_add"]}),Bt&&o("button",{type:"button",class:"btn",onClick:Fo,disabled:K||C,children:K?a["detail.close_busy"]:a["detail.close_cta"]}),Bt&&o("button",{type:"button",class:"btn btn--ghost",onClick:Io,disabled:K||C,children:C?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:ye,disabled:!F.trim()&&H.length===0||L,children:L?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),p&&o("div",{class:"error",children:p})]})]})}function ya(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function xa({detail:e,strings:t}){var n;let r=`detail.context.capture.${e.capture_method}`,a=(n=t[r])!=null?n:e.capture_method;return o("div",{class:"report-detail-context",children:[o("div",{class:"report-detail-context-pills",children:[o("span",{class:"pill pill-type",children:t[`type.${e.feedback_type}`]}),o("span",{class:`pill pill-severity pill-severity--${e.severity}`,children:t[`severity.${e.severity}`]}),o("span",{class:"pill pill-capture",children:a})]}),o("div",{class:"report-detail-context-line",children:[o("span",{class:"report-detail-context-label",children:t["detail.context.submitted_at"]}),o("span",{children:Ir(e.created_at)})]}),e.page_url&&(()=>{let i=rt(e.page_url);return o("div",{class:"report-detail-context-line",title:e.page_url,children:[o("span",{class:"report-detail-context-label",children:t["detail.context.page"]}),i?o("a",{class:"report-detail-context-url",href:i,target:"_blank",rel:"noopener noreferrer",children:Te(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:Te(e.page_url,64)})]})})()]})}function Ir(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var _a=20,wa=15;function ka({ctx:e,strings:t}){var d,f,u;let r=(d=e.errors)!=null?d:[],a=((f=e.consoleLogs)!=null?f:[]).slice(-_a),n=((u=e.networkRequests)!=null?u:[]).slice(-wa),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,c=l>0?`${t["detail.tech.title"]} \xB7 ${l} ${l===1?t["detail.tech.errors_one"]:t["detail.tech.errors_many"]}`:t["detail.tech.title"];return o("details",{class:"report-detail-tech",children:[o("summary",{children:c}),o("div",{class:"tech-body",children:[i&&o(Ca,{device:i,strings:t}),r.length>0&&o(Ra,{errors:r,strings:t}),a.length>0&&o(Ea,{logs:a,strings:t}),n.length>0&&o(Pa,{rows:n,strings:t})]})]})}function Sa({verification:e,strings:t,pinUrl:r,unpinUrl:a}){return o("details",{class:"report-detail-verification",children:[o("summary",{children:t["detail.verified.title"]}),o("div",{class:"verification-body",children:[o("p",{class:"verification-evidence",children:e.evidence}),o("div",{class:"verification-meta",children:[o("span",{children:[e.functional_ok?"\u2713":"\u2717"," ",t["detail.verified.functional"]]}),o("span",{children:[e.ui_ok?"\u2713":"\u2717"," ",t["detail.verified.ui"]]}),o("span",{children:[e.environment,e.app_version?` \xB7 ${e.app_version}`:""]})]}),e.screenshots.length>0&&o("div",{class:"verification-shots",children:e.screenshots.map((n,i)=>{var d,f;let s=`verif:${i}`,l=r(s,n.url);if(!l)return null;let c=rt(l);return c?o("a",{class:"report-detail-screenshot",href:c,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:l,alt:(d=n.caption)!=null?d:"",loading:"lazy",onError:()=>a(s)})},i):o("div",{class:"report-detail-screenshot",children:o("img",{src:l,alt:(f=n.caption)!=null?f:"",loading:"lazy",onError:()=>a(s)})},i)})})]})]})}function Ca({device:e,strings:t}){let r=[];if(e!=null&&e.viewport){let a=e.viewport.dpr?` @${e.viewport.dpr}x`:"";r.push({label:t["detail.tech.device.viewport"],value:`${e.viewport.w}\xD7${e.viewport.h}${a}`})}return e!=null&&e.platform&&r.push({label:t["detail.tech.device.platform"],value:e.platform}),e!=null&&e.language&&r.push({label:t["detail.tech.device.language"],value:e.language}),e!=null&&e.timezone&&r.push({label:t["detail.tech.device.timezone"],value:e.timezone}),e!=null&&e.connection&&r.push({label:t["detail.tech.device.connection"],value:e.connection}),r.length===0?null:o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.device"]}),o("dl",{class:"tech-device",children:r.map(a=>o(ae,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function Ra({errors:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.errors"]}),o("ul",{class:"tech-errors",children:e.map(r=>o("li",{children:[o("div",{class:"tech-errors-msg",children:r.message}),r.stack&&o("pre",{class:"tech-errors-stack",children:Ta(r.stack)})]}))})]})}function Ea({logs:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.console"]}),o("ul",{class:"tech-console",children:e.map(r=>o("li",{class:`tech-console-row tech-console-row--${r.level}`,children:[o("span",{class:"tech-console-level",children:r.level}),o("span",{class:"tech-console-msg",children:r.message})]}))})]})}function Pa({rows:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.network"]}),o("ul",{class:"tech-network",children:e.map(r=>{let a=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${a?" tech-network-row--fail":""}`,children:[o("span",{class:"tech-network-status",children:r.status||"\u2014"}),o("span",{class:"tech-network-method",children:r.method}),o("span",{class:"tech-network-url",title:r.url,children:Te(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Ta(e){let t=e.split(`
619
619
  `);return t.length<=12?e:t.slice(0,12).join(`
620
620
  `)+`
621
- \u2026`}function Ra({rows:e,strings:t}){return o("div",{class:"report-detail-history",children:[o("h3",{class:"report-detail-section",children:t["detail.history"]}),o("ol",{class:"status-history",children:e.map(r=>{var s,l;let a=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,n=(l=t[`status.${r.to_status}`])!=null?l:r.to_status,i=r.changed_by_source==="mcp"?"detail.author.mcp":r.changed_by_source==="system"?"detail.author.system":"detail.author.staff";return o("li",{class:"status-history-row",children:[o("span",{class:"status-history-time",children:zr(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:a}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:n})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var qa=3e4,Pa=300,Ea=["recent","oldest","updated","severity","status"],Ta=["new","in_progress","awaiting_validation","closed","rejected"],Aa=["bug","feature","question","praise","typo"],Ma=["blocker","high","medium","low"];function Ir({api:e,externalId:t,strings:r,getCurrentPage:a,initialSelectedId:n}){var A,j;let[i,s]=P(()=>Tr(t)),[l,d]=P(!0);W(()=>{Ar(t,i)},[t,Fr(i)]);let[c,f]=P(null),[u,p]=P(null),[g,y]=P(!0),[C,x]=P(!1),[w,q]=P(null),[z,k]=P(n!=null?n:null),[m,v]=P(0),[E,F]=P(0),[h,B]=P(null),[D,$]=P(!1),[H,R]=P((A=i.q)!=null?A:""),I=ja(H,Pa);W(()=>{s(M=>{var K;if(((K=M.q)!=null?K:"")===I)return M;if(I===""){let{q:te,...ae}=M;return ae}return{...M,q:I}})},[I]),W(()=>{var M;R((M=i.q)!=null?M:"")},[i.q]);let O=ne(()=>{var M,K,te,ae,we,se;return((K=(M=i.status)==null?void 0:M.length)!=null?K:0)+((ae=(te=i.type)==null?void 0:te.length)!=null?ae:0)+((se=(we=i.severity)==null?void 0:we.length)!=null?se:0)+(i.q?1:0)+(i.mine?1:0)},[i]);W(()=>{if(l)return et(()=>F(M=>M+1))},[l]);let J=ne(()=>{var K;let M=!!((K=i.q)!=null&&K.trim());return l&&!M?{...i,pagePath:pe(a!==void 0?{getCurrentPage:a}:{})}:i},[Fr(i),l,E]);W(()=>{let M=!1,K=new AbortController,te=Rr(t,JSON.stringify(J)),ae=qr(te);ae?(f(ae.page),p(ae.kpis),x(!1),y(!1)):(f(se=>se?{...se,results:Wa(se.results,J)}:null),x(!0),y(!0)),B(null),$(!1);let we=be(async()=>{var se,ke;try{let ve=await e.listBoard(t,J,{signal:K.signal}),Ke=(se=ve.kpis)!=null?se:await e.fetchBoardKpis(t,J,{signal:K.signal});return M||(Pr(te,ve,Ke),f(ve),p(Ke),x(!1),q(null)),!0}catch(ve){return M||q((ke=Pe(ve,r))!=null?ke:r["board.list.error"]),!1}finally{M||y(!1)}},qa);return()=>{M=!0,we.stop(),K.abort()}},[e,t,JSON.stringify(J)]);let ee=ne(()=>{if(!c)return[];if(!h||h.rows.length===0)return c.results;let M=new Set(c.results.map(K=>K.id));return[...c.results,...h.rows.filter(K=>!M.has(K.id))]},[c,h]),G=h?h.hasMore:!!(c!=null&&c.next),S=async()=>{if(D||!c)return;let M=h?h.nextPage:2;$(!0);try{let K=await e.listBoard(t,{...J,page:M});B(te=>{var ae;return{rows:[...(ae=te==null?void 0:te.rows)!=null?ae:[],...K.results],nextPage:M+1,hasMore:K.next!==null}})}catch(K){}finally{$(!1)}},b=ne(()=>{var M;return z&&(M=ee.find(K=>K.id===z))!=null?M:null},[z,ee]),T=M=>{k(M.id),v(K=>K+1)};return o("div",{class:`board-view ${C?"is-stale":""}`,children:[o(La,{strings:r,kpis:u,thisPage:l}),o(Ba,{filters:i,onChange:s,searchDraft:H,onSearchDraftChange:R,activeCount:O,strings:r,thisPage:l,onToggleThisPage:()=>d(M=>!M)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":g,children:[w&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:w}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{q(null),y(!0),F(M=>M+1)},children:r["board.retry"]}),o(tt,{api:e,strings:r,host:e.endpointHost})]}),!w&&g&&!c&&o($a,{}),!w&&c&&ee.length===0&&(!g||C)&&o(Da,{strings:r,thisPage:l,onAllPages:()=>d(!1)}),!w&&c&&ee.length>0&&o(oe,{children:[o(Fa,{rows:ee,selectedId:z,onPick:T,strings:r,total:c.count,thisPage:l}),G&&!C&&o("button",{type:"button",class:"btn btn--ghost board-load-more",onClick:()=>{S()},disabled:D,children:r["board.list.loadMore"]})]})]}),o("div",{class:`board-detail-wrap ${z?"has-selection":""}`,children:z?o(ot,{api:e,externalId:t,reportId:z,strings:r,onBack:()=>k(null),canModerate:b?(j=b.can_moderate)!=null?j:b.is_mine:!1,...b?{seed:b}:{},variant:"board",onOpenSeq:M=>{e.getReportBySeq(M,t).then(K=>{k(K.id),v(te=>te+1)}).catch(()=>{})}},m):o("div",{class:"board-detail-empty",children:[o(Na,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function La({strings:e,kpis:t,thisPage:r}){let a=r?e["board.scope.onThisPage"]:(t==null?void 0:t.scope)==="project"?e["board.scope.project"]:e["board.scope.mine"];return o("header",{class:"board-header",children:[o("div",{class:"board-header-title",children:[o("span",{class:"board-header-emoji","aria-hidden":"true",children:"\u{1F4CB}"}),o("div",{children:[o("h2",{class:"board-header-h",children:e["tab.board"]}),o("p",{class:"board-header-sub",children:t?`${t.total} \xB7 ${a}`:a})]})]}),o(za,{kpis:t,strings:e})]})}function za({kpis:e,strings:t}){var a,n,i,s,l,d;let r=[{key:"new",label:t["board.kpi.new"],value:String((n=(a=e==null?void 0:e.by_status)==null?void 0:a.new)!=null?n:0),tone:"tone-new"},{key:"in_progress",label:t["board.kpi.in_progress"],value:String((s=(i=e==null?void 0:e.by_status)==null?void 0:i.in_progress)!=null?s:0),tone:"tone-progress"},{key:"awaiting_validation",label:t["board.kpi.awaiting_validation"],value:String((d=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?d:0),tone:"tone-validation"},{key:"rate",label:t["board.kpi.resolution_rate"],value:e?`${Math.round((e.resolution_rate||0)*100)}%`:"\u2014",tone:"tone-rate"}];return o("div",{class:`board-kpi-strip ${e?"is-ready":"is-loading"}`,"aria-live":"polite",children:r.map(c=>o("div",{class:`board-kpi-card ${c.tone}`,children:[o("div",{class:"board-kpi-value",children:c.value}),o("div",{class:"board-kpi-label",children:c.label})]},c.key))})}function Ba({filters:e,onChange:t,searchDraft:r,onSearchDraftChange:a,activeCount:n,strings:i,thisPage:s,onToggleThisPage:l}){var y,C,x,w,q,z,k;let d=m=>{if(m===""){let{status:v,...E}=e;t(E)}else t({...e,status:[m]})},c=m=>{if(m===""){let{type:v,...E}=e;t(E)}else t({...e,type:[m]})},f=m=>{if(m===""){let{severity:v,...E}=e;t(E)}else t({...e,severity:[m]})},u=m=>t({...e,ordering:m}),p=()=>{if(e.mine){let{mine:m,...v}=e;t(v)}else t({...e,mine:!0})},g=()=>t({});return o("div",{class:"board-filters",children:[o("div",{class:"board-scope",role:"group","aria-label":i["board.scope.thisPage"],children:[o("button",{type:"button",class:`board-scope-btn ${s?"is-active":""}`,"aria-pressed":s,onClick:()=>!s&&l(),children:i["board.scope.thisPage"]}),o("button",{type:"button",class:`board-scope-btn ${s?"":"is-active"}`,"aria-pressed":!s,onClick:()=>s&&l(),children:i["board.scope.allPages"]})]}),o("select",{class:"board-filter-select","aria-label":i["board.sort"],value:(y=e.ordering)!=null?y:"recent",onChange:m=>u(m.target.value),children:Ea.map(m=>o("option",{value:m,children:i[`board.sort.${m}`]},m))}),o("select",{class:"board-filter-select","aria-label":i["board.filter.status"],value:(x=(C=e.status)==null?void 0:C[0])!=null?x:"",onChange:m=>d(m.target.value),children:[o("option",{value:"",children:i["board.filter.status"]}),Ta.map(m=>{var v;return o("option",{value:m,children:(v=i[`board.kpi.${m}`])!=null?v:m},m)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.type"],value:(q=(w=e.type)==null?void 0:w[0])!=null?q:"",onChange:m=>c(m.target.value),children:[o("option",{value:"",children:i["board.filter.type"]}),Aa.map(m=>{var v;return o("option",{value:m,children:(v=i[`type.${m}`])!=null?v:m},m)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.severity"],value:(k=(z=e.severity)==null?void 0:z[0])!=null?k:"",onChange:m=>f(m.target.value),children:[o("option",{value:"",children:i["board.filter.severity"]}),Ma.map(m=>{var v;return o("option",{value:m,children:(v=i[`severity.${m}`])!=null?v:m},m)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:i["board.filter.search.placeholder"],value:r,onInput:m=>a(m.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:p}),o("span",{children:i["board.filter.mine"]})]}),n>0&&o("button",{type:"button",class:"board-filter-clear",onClick:g,children:[o(Oa,{}),i["board.filter.clear"]]})]})}function Fa({rows:e,selectedId:t,onPick:r,strings:a,total:n,thisPage:i}){return o(oe,{children:[o("div",{class:"board-list-count",children:a[i?"board.list.count.page":"board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(n))}),o("ul",{class:"board-list",role:"list",children:e.map(s=>o(Ia,{row:s,selected:s.id===t,onPick:r,strings:a},s.id))})]})}function Ia({row:e,selected:t,onPick:r,strings:a}){var i,s;let n=e.is_mine?a["board.list.you"]:e.author_label||"\u2014";return o("li",{children:o("button",{type:"button",class:`board-row ${t?"is-selected":""}`,onClick:()=>r(e),"aria-pressed":t,children:[o("div",{class:"board-row-badges",children:[o("span",{class:`badge status-${e.status}`,children:(i=a[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=a[`severity.${e.severity}`])!=null?s:e.severity})]}),o("div",{class:"board-row-description",children:e.description}),o("div",{class:"board-row-meta",children:[o("span",{class:"board-row-author",children:n}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o(Ka,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Qa(e.created_at)})]})]})})}function Da({strings:e,thisPage:t,onAllPages:r}){return o("div",{class:"board-empty",children:[o(Ha,{}),o("h3",{children:e[t?"board.list.empty.page.title":"board.list.empty.title"]}),o("p",{children:e[t?"board.list.empty.page.description":"board.list.empty.description"]}),t&&o("button",{type:"button",class:"btn btn--ghost",onClick:r,children:e["board.scope.allPages"]})]})}function $a(){return o("ul",{class:"board-list board-list-skeleton","aria-hidden":"true",children:Array.from({length:5}).map((e,t)=>o("li",{children:o("div",{class:"board-row skeleton-row",children:[o("div",{class:"skeleton-line skeleton-badges"}),o("div",{class:"skeleton-line skeleton-text"}),o("div",{class:"skeleton-line skeleton-text short"})]})},t))})}function Ka(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function Oa(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Ha(){return o("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("circle",{cx:"32",cy:"32",r:"28",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2"}),o("path",{d:"M22 32h20M32 22v20",stroke:"currentColor","stroke-opacity":"0.35","stroke-width":"2","stroke-linecap":"round"})]})}function Na(){return o("svg",{width:"80",height:"80",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("rect",{x:"10",y:"12",width:"44",height:"36",rx:"4",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2"}),o("line",{x1:"18",y1:"22",x2:"46",y2:"22",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"30",x2:"38",y2:"30",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"38",x2:"32",y2:"38",stroke:"currentColor","stroke-opacity":"0.14","stroke-width":"2","stroke-linecap":"round"})]})}function ja(e,t){let[r,a]=P(e);return W(()=>{let n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}var Br={blocker:0,high:1,medium:2,low:3};function Wa(e,t){var n,i,s,l;let r=e;(n=t.status)!=null&&n.length&&(r=r.filter(d=>t.status.includes(d.status))),(i=t.type)!=null&&i.length&&(r=r.filter(d=>t.type.includes(d.feedback_type))),(s=t.severity)!=null&&s.length&&(r=r.filter(d=>t.severity.includes(d.severity))),t.mine&&(r=r.filter(d=>d.is_mine));let a=r.slice();switch((l=t.ordering)!=null?l:"recent"){case"oldest":a.sort((d,c)=>d.created_at.localeCompare(c.created_at));break;case"updated":a.sort((d,c)=>c.updated_at.localeCompare(d.updated_at));break;case"severity":a.sort((d,c)=>{var f,u;return((f=Br[d.severity])!=null?f:9)-((u=Br[c.severity])!=null?u:9)});break;case"status":break;default:a.sort((d,c)=>c.created_at.localeCompare(d.created_at))}return a}function Fr(e){var t,r,a,n,i;return JSON.stringify({s:(t=e.status)==null?void 0:t.slice().sort(),t:(r=e.type)==null?void 0:r.slice().sort(),sv:(a=e.severity)==null?void 0:a.slice().sort(),q:(n=e.q)!=null?n:"",m:!!e.mine,o:(i=e.ordering)!=null?i:""})}function Qa(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),a=Math.floor(r/6e4);if(a<1)return"just now";if(a<60)return`${a}m`;let n=Math.floor(a/60);if(n<24)return`${n}h`;let i=Math.floor(n/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}re();function Ua(e){return`pill pill-status pill-status--${e}`}function Va(e){return`pill pill-severity pill-severity--${e}`}function Ga(){return"pill pill-type"}function Xa(e){let t=Date.parse(e);if(!Number.isFinite(t))return"";let r=Math.max(1,Math.round((Date.now()-t)/1e3));if(r<60)return`${r}s`;let a=Math.round(r/60);if(a<60)return`${a}m`;let n=Math.round(a/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}function Ya(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function at({row:e,strings:t,onClick:r,extraMeta:a}){var i;let n=e.description.length>120?e.description.slice(0,117)+"\u2026":e.description;return o("button",{type:"button",class:"mine-row",onClick:r,children:[o("div",{class:"mine-row-pills",children:[o("span",{class:Ua(e.status),children:(i=t[`status.${e.status}`])!=null?i:e.status}),o("span",{class:Ga(),children:t[`type.${e.feedback_type}`]}),o("span",{class:Va(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:n}),o("div",{class:"mine-row-meta",children:[o("span",{children:Xa(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",Ya(e.comment_count,t)]}),a&&o("span",{children:["\xB7 ",a]})]})]})}var Ja=3e4;function Za(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=(t.getUTCDay()+6)%7;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()-r)).toISOString().slice(0,10)}function en(e){let t=new Map;for(let r of e){let a=Za(r.resolved_at);if(!a)continue;let n=t.get(a);n?n.push(r):t.set(a,[r])}return Array.from(t.entries()).sort(([r],[a])=>r<a?1:-1).map(([r,a])=>({weekKey:r,label:tn(r),rows:a}))}function tn(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Dr({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=P(null),[s,l]=P(null),[d,c]=P(!1),f=U(!0),u=async()=>{c(!0),l(null);try{let C=await e.listChangelog(t);return f.current&&i(C),!0}catch(C){return typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",C),f.current&&l(r["mine.error"]),!1}finally{f.current&&c(!1)}};W(()=>{f.current=!0;let C=be(u,Ja);return()=>{f.current=!1,C.stop()}},[t]);let p=ne(()=>n?en(n):[],[n]),g=n===null&&!s,y=n!==null&&n.length===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.changelog"]}),o("button",{type:"button",class:"btn",onClick:()=>{u()},disabled:d,children:d?r["mine.loading"]:r["mine.refresh"]})]}),g&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),y&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),p.length>0&&o("div",{class:"changelog-groups",children:p.map(C=>o("section",{class:"changelog-group",children:[o("header",{class:"changelog-group-header",children:[o("span",{class:"changelog-group-marker","aria-hidden":"true",children:"\u25CF"}),o("span",{class:"changelog-group-label",children:r["changelog.week_of"].replace("{date}",C.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[C.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(C.rows.length))})]}),o("ul",{class:"mine-rows",children:C.rows.map(x=>o("li",{children:o(at,{row:x,strings:r,onClick:()=>a(x),extraMeta:x.pr_number?`PR #${x.pr_number}`:void 0})}))})]},C.weekKey))})]})}function rn(){return o("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:[o("path",{d:"m8 2 1.88 1.88"}),o("path",{d:"M14.12 3.88 16 2"}),o("path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"}),o("path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"}),o("path",{d:"M12 20v-9"}),o("path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5"}),o("path",{d:"M6 13H2"}),o("path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4"}),o("path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4"}),o("path",{d:"M22 13h-4"}),o("path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4"})]})}function $r({label:e,onClick:t,count:r}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:[o(rn,{}),r!==void 0&&r>0&&o("span",{class:"fab-badge","aria-hidden":"true",children:r>9?"9+":String(r)})]})}re();re();var Kr=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],on=.35;function Or(e,t,r){if(e.save(),e.strokeStyle=t.color,e.fillStyle=t.color,e.lineWidth=t.lineWidth,e.lineCap="round",e.lineJoin="round",t.kind==="rectangle")e.strokeRect(t.x,t.y,t.w,t.h);else if(t.kind==="arrow")an(e,t.x1,t.y1,t.x2,t.y2);else if(t.kind==="freehand"){if(t.points.length<2){e.restore();return}e.beginPath(),e.moveTo(t.points[0].x,t.points[0].y);for(let a=1;a<t.points.length;a++)e.lineTo(t.points[a].x,t.points[a].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let a=e.measureText(t.text),n=4,i=a.width+n*2,s=t.fontSize+n*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-n,t.y-n,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=on,e.fillRect(nt(t.x,t.w),nt(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&nn(e,t,r);e.restore()}function nt(e,t){return t<0?e+t:e}function an(e,t,r,a,n){let s=Math.atan2(n-r,a-t);e.beginPath(),e.moveTo(t,r),e.lineTo(a,n),e.stroke(),e.beginPath(),e.moveTo(a,n),e.lineTo(a-14*Math.cos(s-Math.PI/6),n-14*Math.sin(s-Math.PI/6)),e.lineTo(a-14*Math.cos(s+Math.PI/6),n-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function nn(e,t,r){if(!r)return;let a=nt(t.x,t.w),n=nt(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let l=Math.max(4,t.tile);for(let d=n;d<n+s;d+=l)for(let c=a;c<a+i;c+=l){let f=Math.min(l,a+i-c),u=Math.min(l,n+s-d);e.drawImage(r,c,d,f,u,c,d,f,u)}e.imageSmoothingEnabled=!1;for(let d=n;d<n+s;d+=l)for(let c=a;c<a+i;c+=l){let f=Math.min(l,a+i-c),u=Math.min(l,n+s-d);e.drawImage(r,c,d,1,1,c,d,f,u)}e.imageSmoothingEnabled=!0}var ue={rect:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("rect",{x:"2",y:"3",width:"12",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.5"})}),arrow:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M2 8h11M9 4l4 4-4 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),pencil:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M11.5 2.5l2 2L5 13H3v-2l8.5-8.5z",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})}),text:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 3h10M8 3v10M5 13h6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})}),highlight:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("path",{d:"M3 13l3-3L11 5l-2-2-5 5-3 3v2h2zM10 4l2 2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M2 14h12",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}),blur:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("rect",{x:"2",y:"2",width:"4",height:"4",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"7",y:"2",width:"3",height:"3",fill:"currentColor",opacity:"0.55"}),o("rect",{x:"11",y:"2",width:"3",height:"4",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"2",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.6"}),o("rect",{x:"6",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"10",y:"7",width:"4",height:"3",fill:"currentColor",opacity:"0.5"}),o("rect",{x:"2",y:"11",width:"4",height:"3",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"7",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.65"}),o("rect",{x:"11",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.85"})]}),undo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 7l3-3M4 7l3 3M4 7h6a3 3 0 0 1 0 6H7",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),redo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M12 7l-3-3M12 7l-3 3M12 7H6a3 3 0 0 0 0 6h2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),trash:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 4h10M6 4V2.5h4V4M5 4l.5 9h5L11 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),close:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})})};function Hr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=U(null),i=U(null),s=U(null),[l,d]=P("rectangle"),[c,f]=P(Kr[0]),[u,p]=P([]),[g,y]=P([]),[C,x]=P([]),w=U(!1),[q,z]=P(null),[k,m]=P(!1),[v,E]=P(!1),F=U(1);function h(S){p(b=>(y(T=>[...T,b]),[...b,S])),x([])}function B(){p(S=>(y(b=>[...b,S]),[])),x([])}function D(){y(S=>{if(S.length===0)return S;let b=S[S.length-1];return p(T=>(x(A=>[T,...A]),b)),S.slice(0,-1)})}function $(){x(S=>{if(S.length===0)return S;let b=S[0];return p(T=>(y(A=>[...A,T]),b)),S.slice(1)})}wt(()=>{let S=b=>{b.key==="Escape"&&(b.stopPropagation(),a())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[a]),W(()=>{let S=b=>{if(!(b.metaKey||b.ctrlKey))return;let A=b.key.toLowerCase();A==="z"?(b.preventDefault(),b.stopPropagation(),b.shiftKey?$():D()):A==="y"&&(b.preventDefault(),b.stopPropagation(),$())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[g,C,u]),W(()=>{let S=URL.createObjectURL(e),b=new Image;return b.onload=()=>{s.current=b,m(!0)},b.src=S,()=>URL.revokeObjectURL(S)},[e]),wt(()=>{if(!k||!n.current||!s.current||!i.current)return;let S=s.current,T=i.current.clientWidth-16,A=window.innerHeight*.65,j=Math.min(T/S.width,A/S.height,1);F.current=j;let M=n.current;M.width=S.width,M.height=S.height,M.style.width=`${S.width*j}px`,M.style.height=`${S.height*j}px`,H()},[k]),W(()=>{H()},[u,q]);function H(){let S=n.current,b=s.current;if(!S||!b)return;let T=S.getContext("2d");if(T){T.clearRect(0,0,S.width,S.height),T.drawImage(b,0,0);for(let A of u)Or(T,A,b);q&&Or(T,q,b)}}function R(S){let T=n.current.getBoundingClientRect();return{x:(S.clientX-T.left)/F.current,y:(S.clientY-T.top)/F.current}}let I=S=>{if(!k)return;let{x:b,y:T}=R(S),A=n.current.width,j=Math.max(3,Math.round(A/400)),M=Math.max(8,Math.round(A/80));if(l==="text"){let K=window.prompt(t["annotator.text_prompt"]);K&&K.trim()&&h({kind:"text",x:b,y:T,text:K.trim(),color:c,fontSize:Math.max(16,Math.round(A/50)),lineWidth:1});return}w.current=!0,l==="rectangle"?z({kind:"rectangle",x:b,y:T,w:0,h:0,color:c,lineWidth:j}):l==="arrow"?z({kind:"arrow",x1:b,y1:T,x2:b,y2:T,color:c,lineWidth:j}):l==="freehand"?z({kind:"freehand",points:[{x:b,y:T}],color:c,lineWidth:j}):l==="highlight"?z({kind:"highlight",x:b,y:T,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&z({kind:"blur",x:b,y:T,w:0,h:0,color:"#000000",lineWidth:0,tile:M})},O=S=>{if(!w.current)return;let{x:b,y:T}=R(S);z(A=>A&&(A.kind==="rectangle"||A.kind==="highlight"||A.kind==="blur"?{...A,w:b-A.x,h:T-A.y}:A.kind==="arrow"?{...A,x2:b,y2:T}:A.kind==="freehand"?{...A,points:[...A.points,{x:b,y:T}]}:A))},J=()=>{z(S=>(w.current&&S&&((S.kind==="rectangle"||S.kind==="highlight"||S.kind==="blur")&&Math.abs(S.w)<4&&Math.abs(S.h)<4||S.kind==="arrow"&&Math.hypot(S.x2-S.x1,S.y2-S.y1)<4||S.kind==="freehand"&&S.points.length<3||h(S)),null)),w.current=!1},ee=async()=>{let S=n.current;if(S){E(!0);try{let b=await new Promise(T=>S.toBlob(T,"image/png",.92));b&&r(b)}finally{E(!1)}}},G=[{id:"rectangle",icon:ue.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:ue.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:ue.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:ue.text,label:t["annotator.tool.text"]},{id:"highlight",icon:ue.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:ue.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:S=>{S.target===S.currentTarget&&a()},children:o("div",{class:"annotator",role:"dialog","aria-modal":"true","aria-label":t["annotator.title"],children:[o("div",{class:"annotator-header",children:[o("span",{children:t["annotator.title"]}),o("button",{type:"button",class:"modal-close","aria-label":t["form.close"],onClick:a,children:ue.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:G.map(S=>o("button",{type:"button",onClick:()=>d(S.id),title:S.label,"aria-label":S.label,"aria-pressed":l===S.id,class:`annotator-tool ${l===S.id?"is-active":""}`,children:S.icon},S.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Kr.map(S=>o("button",{type:"button",onClick:()=>f(S),"aria-label":S,"aria-pressed":c===S,class:`annotator-color ${c===S?"is-active":""}`,style:{backgroundColor:S}},S)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:S=>f(S.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:D,disabled:g.length===0,title:t["annotator.undo"],children:[ue.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:$,disabled:C.length===0,title:t["annotator.redo"],children:[ue.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:B,disabled:u.length===0,children:[ue.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[u.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:k?o("canvas",{ref:n,onMouseDown:I,onMouseMove:O,onMouseUp:J,onMouseLeave:J,class:"annotator-canvas"}):o("span",{class:"annotator-loading",children:t["annotator.loading"]})}),o("div",{class:"annotator-footer",children:[o("button",{type:"button",class:"btn",onClick:a,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:ee,disabled:v||!k,children:v?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var sn=["bug","feature","question","praise","typo"],ln=["blocker","high","medium","low"];function Nr({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n,submittedSeq:i,onDirtyChange:s}){let[l,d]=P(""),[c,f]=P("bug"),[u,p]=P("medium"),[g,y]=P(""),[C,x]=P([]),[w,q]=P(!1),[z,k]=P(null),m=U(null),v=U(null),E=a==="submitting",F=E?e["form.submitting"]:e["form.submit"],h=typeof window!="undefined"?window.location.href:"",B=l.trim()!==""||C.length>0;W(()=>{s==null||s(B)},[B]);let D=U(C);D.current=C,W(()=>()=>{D.current.forEach(b=>URL.revokeObjectURL(b.preview))},[]);let $=b=>{y("");let T=5-C.length,A=b.slice(0,Math.max(0,T));for(let j of A)if(j instanceof File){let M=rt(j);if(M){y(M.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(M.maxMb)));return}}if(A.length){let j=A.map(M=>({blob:M,preview:URL.createObjectURL(M)}));x(M=>[...M,...j])}b.length>A.length&&y(e["form.screenshot.error_count"].replace("{max}",String(5)))},H=b=>{let T=C[b];T&&URL.revokeObjectURL(T.preview),x(A=>A.filter((j,M)=>M!==b)),y(""),m.current&&(m.current.value="")},R=b=>{var j;let T=b.target,A=Array.from((j=T.files)!=null?j:[]);A.length&&$(A),T.value=""},I=b=>{b.preventDefault(),b.stopPropagation(),q(!0)},O=b=>{b.preventDefault(),b.stopPropagation(),b.currentTarget===b.target&&q(!1)},J=b=>{var A,j;b.preventDefault(),b.stopPropagation(),q(!1);let T=Array.from((j=(A=b.dataTransfer)==null?void 0:A.files)!=null?j:[]);T.length&&$(T)},ee=b=>{var j;let T=(j=b.clipboardData)==null?void 0:j.items;if(!T)return;let A=[];for(let M of Array.from(T))if(M.kind==="file"&&M.type.startsWith("image/")){let K=M.getAsFile();K&&A.push(K)}A.length&&(b.preventDefault(),$(A))},G=b=>{let T=z;if(T===null||!C[T]){k(null);return}URL.revokeObjectURL(C[T].preview);let A={blob:b,preview:URL.createObjectURL(b)};x(j=>j.map((M,K)=>K===T?A:M)),k(null)};return o("form",{onSubmit:b=>{if(b.preventDefault(),!l.trim()){y(e["form.description.required"]);return}y("");let T={description:l.trim(),feedback_type:c,severity:u};C.length&&(T.screenshots=C.map(A=>A.blob),T.capture_method="manual"),t(T)},onPaste:ee,children:[o("h2",{children:e["form.title"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:l,placeholder:e["form.description.placeholder"],onInput:b=>d(b.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:c,onChange:b=>f(b.target.value),children:sn.map(b=>o("option",{value:b,children:e[`type.${b}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:u,onChange:b=>p(b.target.value),children:ln.map(b=>o("option",{value:b,children:e[`severity.${b}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:m,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"mfb-sr-only",onChange:R,"aria-hidden":"true",tabIndex:-1}),C.length>0&&o("div",{class:"screenshot-strip",children:C.map((b,T)=>o("div",{class:"screenshot-preview",children:[o("img",{src:b.preview,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>k(T),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),o("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),e["form.screenshot.annotate"]]}),o("button",{type:"button",class:"btn",onClick:()=>H(T),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14z"})}),e["form.screenshot.remove"]]})]})]},b.preview))}),C.length<5&&o("div",{ref:v,class:`screenshot-dropzone ${w?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var b;return(b=m.current)==null?void 0:b.click()},onKeyDown:b=>{var T;(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),(T=m.current)==null||T.click())},onDragOver:I,onDragLeave:O,onDrop:J,children:[o("svg",{class:"screenshot-icon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("polyline",{points:"17 8 12 3 7 8"}),o("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),o("div",{class:"screenshot-cta",children:[o("strong",{children:e["form.screenshot.cta_click"]}),", ",e["form.screenshot.cta_rest"]]}),o("div",{class:"screenshot-formats",children:e["form.screenshot.formats"]})]})]}),h&&o("div",{class:"page-context",title:h,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:Ee(h,90)})]}),o("div",{class:"capture-notice",children:e["form.capture.notice"]}),g&&o("div",{class:"error",children:g}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children:i!==void 0?e["form.success.seq"].replace("{seq}",String(i)):e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:E,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:E,children:F})]}),z!==null&&C[z]&&o(Hr,{imageBlob:C[z].blob,strings:e,onCancel:()=>k(null),onSave:G})]})}re();function cn(e){let t={new:0,in_progress:0,awaiting_validation:0,resolved:0,total:0};for(let r of e)switch(t.total+=1,r.status){case"new":t.new+=1;break;case"in_progress":t.in_progress+=1;break;case"awaiting_validation":t.awaiting_validation+=1;break;case"closed":case"rejected":case"duplicate":case"wontfix":t.resolved+=1;break}return t}function dn(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var pn={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function jr(e,t){return t==="all"?e:e.filter(r=>pn[r.status]===t)}function Wr({rows:e,filter:t,onFilter:r,strings:a}){let n=cn(e),i=dn(n),s=[{key:"new",label:a["kpi.new"],value:String(n.new)},{key:"in_progress",label:a["kpi.in_progress"],value:String(n.in_progress)},{key:"awaiting_validation",label:a["kpi.awaiting_validation"],value:String(n.awaiting_validation)},{key:"resolved",label:a["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(l=>{let d=t===l.key,c=d?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${d?" is-active":""}`,onClick:()=>r(c),"aria-pressed":d,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var un=3e4;function Qr({api:e,externalId:t,strings:r,onSelect:a,onOpenSeq:n}){var H;let[i,s]=P(null),[l,d]=P(null),[c,f]=P(!1),[u,p]=P("all"),[g,y]=P(null),C=async(R,I)=>{y(R);try{I==="confirm"?await e.closeAsResolved(R,t):await e.reopenUnresolved(R,t),await F()}catch(O){typeof console!="undefined"&&console.warn("[mhosaic] validate:",O),v.current&&d(r["mine.error"])}finally{v.current&&y(null)}},[x,w]=P(""),[q,z]=P(!1),[k,m]=P(!1),v=U(!0),E=async R=>{if(R.preventDefault(),!n||k)return;let I=parseInt(x.replace(/^#/,"").trim(),10);if(!Number.isInteger(I)||I<=0){z(!0);return}m(!0),z(!1);try{let O=await n(I);if(!v.current)return;O?w(""):z(!0)}finally{v.current&&m(!1)}},F=async()=>{var R;f(!0),d(null);try{let I=await e.listMine(t);return v.current&&s(I),!0}catch(I){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",I),v.current&&d((R=Pe(I,r))!=null?R:r["mine.error"]),!1}finally{v.current&&f(!1)}};W(()=>{v.current=!0;let R=be(F,un);return()=>{v.current=!1,R.stop()}},[t]);let h=i!==null&&i.length===0,B=i===null&&!l,D=i?jr(i,u):null,$=!!i&&i.length>0&&((H=D==null?void 0:D.length)!=null?H:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("div",{class:"mine-list-header-actions",children:[n&&o("form",{class:"mine-jump",onSubmit:E,children:[o("input",{type:"text",inputMode:"numeric",value:x,placeholder:r["mine.jump.placeholder"],"aria-label":r["mine.jump.aria"],onInput:R=>{w(R.target.value),z(!1)},disabled:k}),o("button",{type:"submit",class:"btn",disabled:k||!x.trim(),children:r["mine.jump.go"]})]}),o("button",{type:"button",class:"btn",onClick:()=>{F()},disabled:c,children:c?r["mine.loading"]:r["mine.refresh"]})]})]}),q&&o("div",{class:"mine-jump-error error",role:"alert",children:r["mine.jump.not_found"]}),i&&i.some(R=>R.status==="awaiting_validation")&&o("div",{class:"validate-banner",role:"status",children:[o("span",{children:r["mine.validate.banner"].replace("{count}",String(i.filter(R=>R.status==="awaiting_validation").length))}),o("button",{type:"button",class:"btn",onClick:()=>p("awaiting_validation"),children:r["mine.validate.view"]})]}),i&&i.length>0&&o(Wr,{rows:i,filter:u,onFilter:p,strings:r}),B&&o("div",{class:"mine-loading",children:r["mine.loading"]}),l&&o("div",{class:"error",children:[l,o(tt,{api:e,strings:r,host:e.endpointHost})]}),h&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),$&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),D&&D.length>0&&o("ul",{class:"mine-rows",children:D.map(R=>o("li",{children:[o(at,{row:R,strings:r,onClick:()=>a(R)}),R.status==="awaiting_validation"&&o("div",{class:"validate-actions",children:[o("button",{type:"button",class:"btn",disabled:g===R.id,onClick:()=>{C(R.id,"confirm")},children:r["mine.validate.confirm"]}),o("button",{type:"button",class:"btn btn--ghost",disabled:g===R.id,onClick:()=>{C(R.id,"reopen")},children:r["mine.validate.reopen"]})]})]}))})]})}re();function Ur({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=U(null),i=U(null);return W(()=>{var d;i.current=document.activeElement;let s=c=>{var u;if(c.key!=="Escape")return;let f=(u=n.current)==null?void 0:u.getRootNode();f instanceof ShadowRoot&&f.querySelector(".annotator-backdrop")||(c.stopPropagation(),e("escape"))};window.addEventListener("keydown",s);let l=(d=n.current)==null?void 0:d.querySelector("textarea, input, select, button");return l==null||l.focus(),()=>{window.removeEventListener("keydown",s);let c=i.current;c&&typeof c.focus=="function"&&c.focus()}},[e]),o("div",{class:`backdrop ${a?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e("backdrop")},children:o("div",{ref:n,class:`modal ${a?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:()=>e("button"),children:"\xD7"}),t]})})}function Vr({open:e,strings:t,onView:r}){if(e===0)return null;let a=e===1?t["page.strip.text.one"]:t["page.strip.text"].replace("{n}",String(e));return o("div",{class:"page-strip",children:[o("span",{children:a}),o("button",{type:"button",class:"page-strip-view",onClick:r,children:t["page.strip.view"]})]})}re();function Gr({api:e,externalId:t,strings:r,getCurrentPage:a,open:n,onViewAll:i,onPickRow:s,onSend:l}){let[d,c]=P(null),[f,u]=P(!1);return W(()=>{let p=!1,g=pe(a!==void 0?{getCurrentPage:a}:{});return e.listBoard(t,{pagePath:g,status:["new","in_progress","awaiting_validation"]}).then(y=>{p||c(y.results.slice(0,5))}).catch(()=>{p||u(!0)}),()=>{p=!0}},[e,t]),o("div",{class:"page-peek",role:"region","aria-label":r["page.peek.title"],children:[o("div",{class:"page-peek-title",children:r["page.peek.title"]}),d===null&&!f&&o("div",{class:"page-peek-skeleton","aria-hidden":"true",children:[o("div",{})," ",o("div",{})]}),d!==null&&d.map(p=>o("button",{type:"button",class:"page-peek-row",onClick:()=>s==null?void 0:s(p.id),children:[o("span",{class:`page-peek-dot status-${p.status}`,"aria-hidden":"true"}),o("span",{class:"page-peek-desc",children:p.description})]},p.id)),o("div",{class:"page-peek-footer",children:[o("button",{type:"button",class:"page-peek-viewall",onClick:i,children:n===1?r["page.peek.viewAll.one"]:r["page.peek.viewAll"].replace("{n}",String(n))}),o("button",{type:"button",class:"page-peek-send",onClick:l,children:r["fab.label"]})]})]})}re();var fn=6e4;function mn(e){var r,a,n;let t=e.by_status;return((r=t.new)!=null?r:0)+((a=t.in_progress)!=null?a:0)+((n=t.awaiting_validation)!=null?n:0)}var qt=new Map,Rt=new Map;function gn(){qt.clear()}function Pt(e,t,r){let a=`${t}|${r}`,n=qt.get(a);if(n&&Date.now()-n.fetchedAt<fn)return Promise.resolve(n.kpis);let i=Rt.get(a);if(i)return i;let s=e.fetchBoardKpis(t,{pagePath:r}).then(l=>(qt.set(a,{kpis:l,fetchedAt:Date.now()}),l)).finally(()=>Rt.delete(a));return Rt.set(a,s),s}function bn(e,t,r){return Pt(e,t,r).then(mn)}function Xr(e){let{api:t,externalId:r,getCurrentPage:a,enabled:n}=e,[i,s]=P(0),[l,d]=P(0),c=me(()=>{gn(),d(f=>f+1)},[]);return W(()=>{if(!n||!t||!r){s(0);return}let f=!1,u=()=>{let g=pe(a!==void 0?{getCurrentPage:a}:{});bn(t,r,g).then(y=>{f||s(y)}).catch(()=>{f||s(0)})};u();let p=et(u);return()=>{f=!0,p()}},[t,r,n,l]),{open:i,refresh:c}}var Yr=`
621
+ \u2026`}function qa({rows:e,strings:t}){return o("div",{class:"report-detail-history",children:[o("h3",{class:"report-detail-section",children:t["detail.history"]}),o("ol",{class:"status-history",children:e.map(r=>{var s,l;let a=(s=t[`status.${r.from_status}`])!=null?s:r.from_status,n=(l=t[`status.${r.to_status}`])!=null?l:r.to_status,i=r.changed_by_source==="mcp"?"detail.author.mcp":r.changed_by_source==="system"?"detail.author.system":"detail.author.staff";return o("li",{class:"status-history-row",children:[o("span",{class:"status-history-time",children:Ir(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:a}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:n})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var Aa=3e4,Ma=300,La=["recent","oldest","updated","severity","status"],za=["new","in_progress","awaiting_validation","closed","rejected"],Ba=["bug","feature","question","praise","typo"],Fa=["blocker","high","medium","low"];function Kr({api:e,externalId:t,strings:r,getCurrentPage:a,initialSelectedId:n}){var $,A;let[i,s]=R(()=>Tr(t)),[l,c]=R(!0);Q(()=>{qr(t,i)},[t,$r(i)]);let[d,f]=R(null),[u,p]=R(null),[g,_]=R(!0),[T,y]=R(!1),[v,S]=R(null),[z,w]=R(n!=null?n:null),[m,b]=R(0),[q,F]=R(0),[h,L]=R(null),[D,K]=R(!1),[N,C]=R(($=i.q)!=null?$:""),B=Va(N,Ma);Q(()=>{s(E=>{var I;if(((I=E.q)!=null?I:"")===B)return E;if(B===""){let{q:W,...U}=E;return U}return{...E,q:B}})},[B]),Q(()=>{var E;C((E=i.q)!=null?E:"")},[i.q]);let H=ne(()=>{var E,I,W,U,se,le;return((I=(E=i.status)==null?void 0:E.length)!=null?I:0)+((U=(W=i.type)==null?void 0:W.length)!=null?U:0)+((le=(se=i.severity)==null?void 0:se.length)!=null?le:0)+(i.q?1:0)+(i.mine?1:0)},[i]);Q(()=>{if(l)return et(()=>F(E=>E+1))},[l]);let Y=ne(()=>{var I;let E=!!((I=i.q)!=null&&I.trim());return l&&!E?{...i,pagePath:ue(a!==void 0?{getCurrentPage:a}:{})}:i},[$r(i),l,q]);Q(()=>{let E=!1,I=new AbortController,W=Cr(t,JSON.stringify(Y)),U=Rr(W);U?(f(U.page),p(U.kpis),y(!1),_(!1)):(f(le=>le?{...le,results:Ga(le.results,Y)}:null),y(!0),_(!0)),L(null),K(!1);let se=he(async()=>{var le,ke;try{let ye=await e.listBoard(t,Y,{signal:I.signal}),Ke=(le=ye.kpis)!=null?le:await e.fetchBoardKpis(t,Y,{signal:I.signal});return E||(Er(W,ye,Ke),f(ye),p(Ke),y(!1),S(null)),!0}catch(ye){return E||S((ke=Pe(ye,r))!=null?ke:r["board.list.error"]),!1}finally{E||_(!1)}},Aa);return()=>{E=!0,se.stop(),I.abort()}},[e,t,JSON.stringify(Y)]);let re=ne(()=>{if(!d)return[];if(!h||h.rows.length===0)return d.results;let E=new Set(d.results.map(I=>I.id));return[...d.results,...h.rows.filter(I=>!E.has(I.id))]},[d,h]),J=h?h.hasMore:!!(d!=null&&d.next),k=async()=>{if(D||!d)return;let E=h?h.nextPage:2;K(!0);try{let I=await e.listBoard(t,{...Y,page:E});L(W=>{var U;return{rows:[...(U=W==null?void 0:W.rows)!=null?U:[],...I.results],nextPage:E+1,hasMore:I.next!==null}})}catch(I){}finally{K(!1)}},P=ne(()=>{var E;return z&&(E=re.find(I=>I.id===z))!=null?E:null},[z,re]),O=E=>{w(E.id),b(I=>I+1)};return o("div",{class:`board-view ${T?"is-stale":""}`,children:[o(Ia,{strings:r,kpis:u,thisPage:l}),o($a,{filters:i,onChange:s,searchDraft:N,onSearchDraftChange:C,activeCount:H,strings:r,thisPage:l,onToggleThisPage:()=>c(E=>!E)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":g,children:[v&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:v}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{S(null),_(!0),F(E=>E+1)},children:r["board.retry"]}),o(tt,{api:e,strings:r,host:e.endpointHost})]}),!v&&g&&!d&&o(Na,{}),!v&&d&&re.length===0&&(!g||T)&&o(Ha,{strings:r,thisPage:l,onAllPages:()=>c(!1)}),!v&&d&&re.length>0&&o(ae,{children:[o(Ka,{rows:re,selectedId:z,onPick:O,strings:r,total:d.count,thisPage:l}),J&&!T&&o("button",{type:"button",class:"btn btn--ghost board-load-more",onClick:()=>{k()},disabled:D,children:r["board.list.loadMore"]})]})]}),o("div",{class:`board-detail-wrap ${z?"has-selection":""}`,children:z?o(ot,{api:e,externalId:t,reportId:z,strings:r,onBack:()=>w(null),canModerate:P?(A=P.can_moderate)!=null?A:P.is_mine:!1,...P?{seed:P}:{},variant:"board",onOpenSeq:E=>{e.getReportBySeq(E,t).then(I=>{w(I.id),b(W=>W+1)}).catch(()=>{})}},m):o("div",{class:"board-detail-empty",children:[o(Ua,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Ia({strings:e,kpis:t,thisPage:r}){let a=r?e["board.scope.onThisPage"]:(t==null?void 0:t.scope)==="project"?e["board.scope.project"]:e["board.scope.mine"];return o("header",{class:"board-header",children:[o("div",{class:"board-header-title",children:[o("span",{class:"board-header-emoji","aria-hidden":"true",children:"\u{1F4CB}"}),o("div",{children:[o("h2",{class:"board-header-h",children:e["tab.board"]}),o("p",{class:"board-header-sub",children:t?`${t.total} \xB7 ${a}`:a})]})]}),o(Da,{kpis:t,strings:e})]})}function Da({kpis:e,strings:t}){var a,n,i,s,l,c;let r=[{key:"new",label:t["board.kpi.new"],value:String((n=(a=e==null?void 0:e.by_status)==null?void 0:a.new)!=null?n:0),tone:"tone-new"},{key:"in_progress",label:t["board.kpi.in_progress"],value:String((s=(i=e==null?void 0:e.by_status)==null?void 0:i.in_progress)!=null?s:0),tone:"tone-progress"},{key:"awaiting_validation",label:t["board.kpi.awaiting_validation"],value:String((c=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?c:0),tone:"tone-validation"},{key:"rate",label:t["board.kpi.resolution_rate"],value:e?`${Math.round((e.resolution_rate||0)*100)}%`:"\u2014",tone:"tone-rate"}];return o("div",{class:`board-kpi-strip ${e?"is-ready":"is-loading"}`,"aria-live":"polite",children:r.map(d=>o("div",{class:`board-kpi-card ${d.tone}`,children:[o("div",{class:"board-kpi-value",children:d.value}),o("div",{class:"board-kpi-label",children:d.label})]},d.key))})}function $a({filters:e,onChange:t,searchDraft:r,onSearchDraftChange:a,activeCount:n,strings:i,thisPage:s,onToggleThisPage:l}){var _,T,y,v,S,z,w;let c=m=>{if(m===""){let{status:b,...q}=e;t(q)}else t({...e,status:[m]})},d=m=>{if(m===""){let{type:b,...q}=e;t(q)}else t({...e,type:[m]})},f=m=>{if(m===""){let{severity:b,...q}=e;t(q)}else t({...e,severity:[m]})},u=m=>t({...e,ordering:m}),p=()=>{if(e.mine){let{mine:m,...b}=e;t(b)}else t({...e,mine:!0})},g=()=>t({});return o("div",{class:"board-filters",children:[o("div",{class:"board-scope",role:"group","aria-label":i["board.scope.thisPage"],children:[o("button",{type:"button",class:`board-scope-btn ${s?"is-active":""}`,"aria-pressed":s,onClick:()=>!s&&l(),children:i["board.scope.thisPage"]}),o("button",{type:"button",class:`board-scope-btn ${s?"":"is-active"}`,"aria-pressed":!s,onClick:()=>s&&l(),children:i["board.scope.allPages"]})]}),o("select",{class:"board-filter-select","aria-label":i["board.sort"],value:(_=e.ordering)!=null?_:"recent",onChange:m=>u(m.target.value),children:La.map(m=>o("option",{value:m,children:i[`board.sort.${m}`]},m))}),o("select",{class:"board-filter-select","aria-label":i["board.filter.status"],value:(y=(T=e.status)==null?void 0:T[0])!=null?y:"",onChange:m=>c(m.target.value),children:[o("option",{value:"",children:i["board.filter.status"]}),za.map(m=>{var b;return o("option",{value:m,children:(b=i[`board.kpi.${m}`])!=null?b:m},m)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.type"],value:(S=(v=e.type)==null?void 0:v[0])!=null?S:"",onChange:m=>d(m.target.value),children:[o("option",{value:"",children:i["board.filter.type"]}),Ba.map(m=>{var b;return o("option",{value:m,children:(b=i[`type.${m}`])!=null?b:m},m)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.severity"],value:(w=(z=e.severity)==null?void 0:z[0])!=null?w:"",onChange:m=>f(m.target.value),children:[o("option",{value:"",children:i["board.filter.severity"]}),Fa.map(m=>{var b;return o("option",{value:m,children:(b=i[`severity.${m}`])!=null?b:m},m)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:i["board.filter.search.placeholder"],value:r,onInput:m=>a(m.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:p}),o("span",{children:i["board.filter.mine"]})]}),n>0&&o("button",{type:"button",class:"board-filter-clear",onClick:g,children:[o(Wa,{}),i["board.filter.clear"]]})]})}function Ka({rows:e,selectedId:t,onPick:r,strings:a,total:n,thisPage:i}){return o(ae,{children:[o("div",{class:"board-list-count",children:a[i?"board.list.count.page":"board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(n))}),o("ul",{class:"board-list",role:"list",children:e.map(s=>o(Oa,{row:s,selected:s.id===t,onPick:r,strings:a},s.id))})]})}function Oa({row:e,selected:t,onPick:r,strings:a}){var i,s;let n=e.is_mine?a["board.list.you"]:e.author_label||"\u2014";return o("li",{children:o("button",{type:"button",class:`board-row ${t?"is-selected":""}`,onClick:()=>r(e),"aria-pressed":t,children:[o("div",{class:"board-row-badges",children:[o("span",{class:`badge status-${e.status}`,children:(i=a[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=a[`severity.${e.severity}`])!=null?s:e.severity})]}),o("div",{class:"board-row-description",children:e.description}),o("div",{class:"board-row-meta",children:[o("span",{class:"board-row-author",children:n}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o(ja,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Ya(e.created_at)})]})]})})}function Ha({strings:e,thisPage:t,onAllPages:r}){return o("div",{class:"board-empty",children:[o(Qa,{}),o("h3",{children:e[t?"board.list.empty.page.title":"board.list.empty.title"]}),o("p",{children:e[t?"board.list.empty.page.description":"board.list.empty.description"]}),t&&o("button",{type:"button",class:"btn btn--ghost",onClick:r,children:e["board.scope.allPages"]})]})}function Na(){return o("ul",{class:"board-list board-list-skeleton","aria-hidden":"true",children:Array.from({length:5}).map((e,t)=>o("li",{children:o("div",{class:"board-row skeleton-row",children:[o("div",{class:"skeleton-line skeleton-badges"}),o("div",{class:"skeleton-line skeleton-text"}),o("div",{class:"skeleton-line skeleton-text short"})]})},t))})}function ja(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function Wa(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Qa(){return o("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("circle",{cx:"32",cy:"32",r:"28",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2"}),o("path",{d:"M22 32h20M32 22v20",stroke:"currentColor","stroke-opacity":"0.35","stroke-width":"2","stroke-linecap":"round"})]})}function Ua(){return o("svg",{width:"80",height:"80",viewBox:"0 0 64 64",fill:"none","aria-hidden":"true",children:[o("rect",{x:"10",y:"12",width:"44",height:"36",rx:"4",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2"}),o("line",{x1:"18",y1:"22",x2:"46",y2:"22",stroke:"currentColor","stroke-opacity":"0.22","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"30",x2:"38",y2:"30",stroke:"currentColor","stroke-opacity":"0.18","stroke-width":"2","stroke-linecap":"round"}),o("line",{x1:"18",y1:"38",x2:"32",y2:"38",stroke:"currentColor","stroke-opacity":"0.14","stroke-width":"2","stroke-linecap":"round"})]})}function Va(e,t){let[r,a]=R(e);return Q(()=>{let n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}var Dr={blocker:0,high:1,medium:2,low:3};function Ga(e,t){var n,i,s,l;let r=e;(n=t.status)!=null&&n.length&&(r=r.filter(c=>t.status.includes(c.status))),(i=t.type)!=null&&i.length&&(r=r.filter(c=>t.type.includes(c.feedback_type))),(s=t.severity)!=null&&s.length&&(r=r.filter(c=>t.severity.includes(c.severity))),t.mine&&(r=r.filter(c=>c.is_mine));let a=r.slice();switch((l=t.ordering)!=null?l:"recent"){case"oldest":a.sort((c,d)=>c.created_at.localeCompare(d.created_at));break;case"updated":a.sort((c,d)=>d.updated_at.localeCompare(c.updated_at));break;case"severity":a.sort((c,d)=>{var f,u;return((f=Dr[c.severity])!=null?f:9)-((u=Dr[d.severity])!=null?u:9)});break;case"status":break;default:a.sort((c,d)=>d.created_at.localeCompare(c.created_at))}return a}function $r(e){var t,r,a,n,i;return JSON.stringify({s:(t=e.status)==null?void 0:t.slice().sort(),t:(r=e.type)==null?void 0:r.slice().sort(),sv:(a=e.severity)==null?void 0:a.slice().sort(),q:(n=e.q)!=null?n:"",m:!!e.mine,o:(i=e.ordering)!=null?i:""})}function Ya(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),a=Math.floor(r/6e4);if(a<1)return"just now";if(a<60)return`${a}m`;let n=Math.floor(a/60);if(n<24)return`${n}h`;let i=Math.floor(n/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}oe();function Xa(e){return`pill pill-status pill-status--${e}`}function Ja(e){return`pill pill-severity pill-severity--${e}`}function Za(){return"pill pill-type"}function en(e){let t=Date.parse(e);if(!Number.isFinite(t))return"";let r=Math.max(1,Math.round((Date.now()-t)/1e3));if(r<60)return`${r}s`;let a=Math.round(r/60);if(a<60)return`${a}m`;let n=Math.round(a/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}function tn(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function at({row:e,strings:t,onClick:r,extraMeta:a}){var i;let n=e.description.length>120?e.description.slice(0,117)+"\u2026":e.description;return o("button",{type:"button",class:"mine-row",onClick:r,children:[o("div",{class:"mine-row-pills",children:[o("span",{class:Xa(e.status),children:(i=t[`status.${e.status}`])!=null?i:e.status}),o("span",{class:Za(),children:t[`type.${e.feedback_type}`]}),o("span",{class:Ja(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:n}),o("div",{class:"mine-row-meta",children:[o("span",{children:en(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",tn(e.comment_count,t)]}),a&&o("span",{children:["\xB7 ",a]})]})]})}var rn=3e4;function on(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=(t.getUTCDay()+6)%7;return new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()-r)).toISOString().slice(0,10)}function an(e){let t=new Map;for(let r of e){let a=on(r.resolved_at);if(!a)continue;let n=t.get(a);n?n.push(r):t.set(a,[r])}return Array.from(t.entries()).sort(([r],[a])=>r<a?1:-1).map(([r,a])=>({weekKey:r,label:nn(r),rows:a}))}function nn(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Or({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=R(null),[s,l]=R(null),[c,d]=R(!1),f=G(!0),u=async()=>{d(!0),l(null);try{let T=await e.listChangelog(t);return f.current&&i(T),!0}catch(T){return typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",T),f.current&&l(r["mine.error"]),!1}finally{f.current&&d(!1)}};Q(()=>{f.current=!0;let T=he(u,rn);return()=>{f.current=!1,T.stop()}},[t]);let p=ne(()=>n?an(n):[],[n]),g=n===null&&!s,_=n!==null&&n.length===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.changelog"]}),o("button",{type:"button",class:"btn",onClick:()=>{u()},disabled:c,children:c?r["mine.loading"]:r["mine.refresh"]})]}),g&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),_&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),p.length>0&&o("div",{class:"changelog-groups",children:p.map(T=>o("section",{class:"changelog-group",children:[o("header",{class:"changelog-group-header",children:[o("span",{class:"changelog-group-marker","aria-hidden":"true",children:"\u25CF"}),o("span",{class:"changelog-group-label",children:r["changelog.week_of"].replace("{date}",T.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[T.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(T.rows.length))})]}),o("ul",{class:"mine-rows",children:T.rows.map(y=>o("li",{children:o(at,{row:y,strings:r,onClick:()=>a(y),extraMeta:y.pr_number?`PR #${y.pr_number}`:void 0})}))})]},T.weekKey))})]})}function sn(){return o("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",children:[o("path",{d:"m8 2 1.88 1.88"}),o("path",{d:"M14.12 3.88 16 2"}),o("path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1"}),o("path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6"}),o("path",{d:"M12 20v-9"}),o("path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5"}),o("path",{d:"M6 13H2"}),o("path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4"}),o("path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4"}),o("path",{d:"M22 13h-4"}),o("path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4"})]})}function Hr({label:e,onClick:t,count:r}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:[o(sn,{}),r!==void 0&&r>0&&o("span",{class:"fab-badge","aria-hidden":"true",children:r>9?"9+":String(r)})]})}oe();oe();var Nr=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],ln=.35;function jr(e,t,r){if(e.save(),e.strokeStyle=t.color,e.fillStyle=t.color,e.lineWidth=t.lineWidth,e.lineCap="round",e.lineJoin="round",t.kind==="rectangle")e.strokeRect(t.x,t.y,t.w,t.h);else if(t.kind==="arrow")dn(e,t.x1,t.y1,t.x2,t.y2);else if(t.kind==="freehand"){if(t.points.length<2){e.restore();return}e.beginPath(),e.moveTo(t.points[0].x,t.points[0].y);for(let a=1;a<t.points.length;a++)e.lineTo(t.points[a].x,t.points[a].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let a=e.measureText(t.text),n=4,i=a.width+n*2,s=t.fontSize+n*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-n,t.y-n,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=ln,e.fillRect(nt(t.x,t.w),nt(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&cn(e,t,r);e.restore()}function nt(e,t){return t<0?e+t:e}function dn(e,t,r,a,n){let s=Math.atan2(n-r,a-t);e.beginPath(),e.moveTo(t,r),e.lineTo(a,n),e.stroke(),e.beginPath(),e.moveTo(a,n),e.lineTo(a-14*Math.cos(s-Math.PI/6),n-14*Math.sin(s-Math.PI/6)),e.lineTo(a-14*Math.cos(s+Math.PI/6),n-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function cn(e,t,r){if(!r)return;let a=nt(t.x,t.w),n=nt(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let l=Math.max(4,t.tile);for(let c=n;c<n+s;c+=l)for(let d=a;d<a+i;d+=l){let f=Math.min(l,a+i-d),u=Math.min(l,n+s-c);e.drawImage(r,d,c,f,u,d,c,f,u)}e.imageSmoothingEnabled=!1;for(let c=n;c<n+s;c+=l)for(let d=a;d<a+i;d+=l){let f=Math.min(l,a+i-d),u=Math.min(l,n+s-c);e.drawImage(r,d,c,1,1,d,c,f,u)}e.imageSmoothingEnabled=!0}var fe={rect:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("rect",{x:"2",y:"3",width:"12",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.5"})}),arrow:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M2 8h11M9 4l4 4-4 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),pencil:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M11.5 2.5l2 2L5 13H3v-2l8.5-8.5z",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})}),text:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 3h10M8 3v10M5 13h6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})}),highlight:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("path",{d:"M3 13l3-3L11 5l-2-2-5 5-3 3v2h2zM10 4l2 2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M2 14h12",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}),blur:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("rect",{x:"2",y:"2",width:"4",height:"4",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"7",y:"2",width:"3",height:"3",fill:"currentColor",opacity:"0.55"}),o("rect",{x:"11",y:"2",width:"3",height:"4",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"2",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.6"}),o("rect",{x:"6",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"10",y:"7",width:"4",height:"3",fill:"currentColor",opacity:"0.5"}),o("rect",{x:"2",y:"11",width:"4",height:"3",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"7",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.65"}),o("rect",{x:"11",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.85"})]}),undo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 7l3-3M4 7l3 3M4 7h6a3 3 0 0 1 0 6H7",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),redo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M12 7l-3-3M12 7l-3 3M12 7H6a3 3 0 0 0 0 6h2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),trash:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 4h10M6 4V2.5h4V4M5 4l.5 9h5L11 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),close:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})})};function Wr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=G(null),i=G(null),s=G(null),[l,c]=R("rectangle"),[d,f]=R(Nr[0]),[u,p]=R([]),[g,_]=R([]),[T,y]=R([]),v=G(!1),[S,z]=R(null),[w,m]=R(!1),[b,q]=R(!1),F=G(1);function h(k){p(P=>(_(O=>[...O,P]),[...P,k])),y([])}function L(){p(k=>(_(P=>[...P,k]),[])),y([])}function D(){_(k=>{if(k.length===0)return k;let P=k[k.length-1];return p(O=>(y($=>[O,...$]),P)),k.slice(0,-1)})}function K(){y(k=>{if(k.length===0)return k;let P=k[0];return p(O=>(_($=>[...$,O]),P)),k.slice(1)})}wt(()=>{let k=P=>{P.key==="Escape"&&(P.stopPropagation(),a())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[a]),Q(()=>{let k=P=>{if(!(P.metaKey||P.ctrlKey))return;let $=P.key.toLowerCase();$==="z"?(P.preventDefault(),P.stopPropagation(),P.shiftKey?K():D()):$==="y"&&(P.preventDefault(),P.stopPropagation(),K())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[g,T,u]),Q(()=>{let k=URL.createObjectURL(e),P=new Image;return P.onload=()=>{s.current=P,m(!0)},P.src=k,()=>URL.revokeObjectURL(k)},[e]),wt(()=>{if(!w||!n.current||!s.current||!i.current)return;let k=s.current,O=i.current.clientWidth-16,$=window.innerHeight*.65,A=Math.min(O/k.width,$/k.height,1);F.current=A;let E=n.current;E.width=k.width,E.height=k.height,E.style.width=`${k.width*A}px`,E.style.height=`${k.height*A}px`,N()},[w]),Q(()=>{N()},[u,S]);function N(){let k=n.current,P=s.current;if(!k||!P)return;let O=k.getContext("2d");if(O){O.clearRect(0,0,k.width,k.height),O.drawImage(P,0,0);for(let $ of u)jr(O,$,P);S&&jr(O,S,P)}}function C(k){let O=n.current.getBoundingClientRect();return{x:(k.clientX-O.left)/F.current,y:(k.clientY-O.top)/F.current}}let B=k=>{if(!w)return;let{x:P,y:O}=C(k),$=n.current.width,A=Math.max(3,Math.round($/400)),E=Math.max(8,Math.round($/80));if(l==="text"){let I=window.prompt(t["annotator.text_prompt"]);I&&I.trim()&&h({kind:"text",x:P,y:O,text:I.trim(),color:d,fontSize:Math.max(16,Math.round($/50)),lineWidth:1});return}v.current=!0,l==="rectangle"?z({kind:"rectangle",x:P,y:O,w:0,h:0,color:d,lineWidth:A}):l==="arrow"?z({kind:"arrow",x1:P,y1:O,x2:P,y2:O,color:d,lineWidth:A}):l==="freehand"?z({kind:"freehand",points:[{x:P,y:O}],color:d,lineWidth:A}):l==="highlight"?z({kind:"highlight",x:P,y:O,w:0,h:0,color:d==="#ffffff"?"#fde047":d,lineWidth:1}):l==="blur"&&z({kind:"blur",x:P,y:O,w:0,h:0,color:"#000000",lineWidth:0,tile:E})},H=k=>{if(!v.current)return;let{x:P,y:O}=C(k);z($=>$&&($.kind==="rectangle"||$.kind==="highlight"||$.kind==="blur"?{...$,w:P-$.x,h:O-$.y}:$.kind==="arrow"?{...$,x2:P,y2:O}:$.kind==="freehand"?{...$,points:[...$.points,{x:P,y:O}]}:$))},Y=()=>{z(k=>(v.current&&k&&((k.kind==="rectangle"||k.kind==="highlight"||k.kind==="blur")&&Math.abs(k.w)<4&&Math.abs(k.h)<4||k.kind==="arrow"&&Math.hypot(k.x2-k.x1,k.y2-k.y1)<4||k.kind==="freehand"&&k.points.length<3||h(k)),null)),v.current=!1},re=async()=>{let k=n.current;if(k){q(!0);try{let P=await new Promise(O=>k.toBlob(O,"image/png",.92));P&&r(P)}finally{q(!1)}}},J=[{id:"rectangle",icon:fe.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:fe.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:fe.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:fe.text,label:t["annotator.tool.text"]},{id:"highlight",icon:fe.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:fe.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:k=>{k.target===k.currentTarget&&a()},children:o("div",{class:"annotator",role:"dialog","aria-modal":"true","aria-label":t["annotator.title"],children:[o("div",{class:"annotator-header",children:[o("span",{children:t["annotator.title"]}),o("button",{type:"button",class:"modal-close","aria-label":t["form.close"],onClick:a,children:fe.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:J.map(k=>o("button",{type:"button",onClick:()=>c(k.id),title:k.label,"aria-label":k.label,"aria-pressed":l===k.id,class:`annotator-tool ${l===k.id?"is-active":""}`,children:k.icon},k.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Nr.map(k=>o("button",{type:"button",onClick:()=>f(k),"aria-label":k,"aria-pressed":d===k,class:`annotator-color ${d===k?"is-active":""}`,style:{backgroundColor:k}},k)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:d,onInput:k=>f(k.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:D,disabled:g.length===0,title:t["annotator.undo"],children:[fe.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:K,disabled:T.length===0,title:t["annotator.redo"],children:[fe.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:L,disabled:u.length===0,children:[fe.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[u.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:w?o("canvas",{ref:n,onMouseDown:B,onMouseMove:H,onMouseUp:Y,onMouseLeave:Y,class:"annotator-canvas"}):o("span",{class:"annotator-loading",children:t["annotator.loading"]})}),o("div",{class:"annotator-footer",children:[o("button",{type:"button",class:"btn",onClick:a,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:re,disabled:b||!w,children:b?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var pn=["bug","feature","question","praise","typo"],un=["blocker","high","medium","low"];function Qr({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n,submittedSeq:i,onDirtyChange:s,metaFeedbackEnabled:l}){let[c,d]=R(!1),[f,u]=R(""),[p,g]=R("bug"),[_,T]=R("medium"),[y,v]=R(""),[S,z]=R([]),[w,m]=R(!1),[b,q]=R(null),F=G(null),h=G(null),L=a==="submitting",D=L?e["form.submitting"]:e["form.submit"],K=typeof window!="undefined"?window.location.href:"",N=f.trim()!==""||S.length>0;Q(()=>{s==null||s(N)},[N]);let C=G(S);C.current=S,Q(()=>()=>{C.current.forEach(A=>URL.revokeObjectURL(A.preview))},[]);let B=A=>{v("");let E=5-S.length,I=A.slice(0,Math.max(0,E));for(let W of I)if(W instanceof File){let U=Fr(W);if(U){v(U.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(U.maxMb)));return}}if(I.length){let W=I.map(U=>({blob:U,preview:URL.createObjectURL(U)}));z(U=>[...U,...W])}A.length>I.length&&v(e["form.screenshot.error_count"].replace("{max}",String(5)))},H=A=>{let E=S[A];E&&URL.revokeObjectURL(E.preview),z(I=>I.filter((W,U)=>U!==A)),v(""),F.current&&(F.current.value="")},Y=A=>{var W;let E=A.target,I=Array.from((W=E.files)!=null?W:[]);I.length&&B(I),E.value=""},re=A=>{A.preventDefault(),A.stopPropagation(),m(!0)},J=A=>{A.preventDefault(),A.stopPropagation(),A.currentTarget===A.target&&m(!1)},k=A=>{var I,W;A.preventDefault(),A.stopPropagation(),m(!1);let E=Array.from((W=(I=A.dataTransfer)==null?void 0:I.files)!=null?W:[]);E.length&&B(E)},P=A=>{var W;let E=(W=A.clipboardData)==null?void 0:W.items;if(!E)return;let I=[];for(let U of Array.from(E))if(U.kind==="file"&&U.type.startsWith("image/")){let se=U.getAsFile();se&&I.push(se)}I.length&&(A.preventDefault(),B(I))},O=A=>{let E=b;if(E===null||!S[E]){q(null);return}URL.revokeObjectURL(S[E].preview);let I={blob:A,preview:URL.createObjectURL(A)};z(W=>W.map((U,se)=>se===E?I:U)),q(null)};return o("form",{onSubmit:A=>{if(A.preventDefault(),!f.trim()){v(e["form.description.required"]);return}v("");let E={description:f.trim(),feedback_type:p,severity:_};S.length&&(E.screenshots=S.map(I=>I.blob),E.capture_method="manual"),c&&(E.meta=!0),t(E)},onPaste:P,children:[o("h2",{children:e["form.title"]}),c&&o("div",{class:"meta-badge",children:e["form.meta.badge"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:f,placeholder:e["form.description.placeholder"],onInput:A=>u(A.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:p,onChange:A=>g(A.target.value),children:pn.map(A=>o("option",{value:A,children:e[`type.${A}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:_,onChange:A=>T(A.target.value),children:un.map(A=>o("option",{value:A,children:e[`severity.${A}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:F,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"mfb-sr-only",onChange:Y,"aria-hidden":"true",tabIndex:-1}),S.length>0&&o("div",{class:"screenshot-strip",children:S.map((A,E)=>o("div",{class:"screenshot-preview",children:[o("img",{src:A.preview,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>q(E),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),o("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),e["form.screenshot.annotate"]]}),o("button",{type:"button",class:"btn",onClick:()=>H(E),children:[o("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14z"})}),e["form.screenshot.remove"]]})]})]},A.preview))}),S.length<5&&o("div",{ref:h,class:`screenshot-dropzone ${w?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var A;return(A=F.current)==null?void 0:A.click()},onKeyDown:A=>{var E;(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),(E=F.current)==null||E.click())},onDragOver:re,onDragLeave:J,onDrop:k,children:[o("svg",{class:"screenshot-icon",width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:[o("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o("polyline",{points:"17 8 12 3 7 8"}),o("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),o("div",{class:"screenshot-cta",children:[o("strong",{children:e["form.screenshot.cta_click"]}),", ",e["form.screenshot.cta_rest"]]}),o("div",{class:"screenshot-formats",children:e["form.screenshot.formats"]})]})]}),K&&o("div",{class:"page-context",title:K,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:Te(K,90)})]}),o("div",{class:"capture-notice",children:e["form.capture.notice"]}),y&&o("div",{class:"error",children:y}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children:i!==void 0?e["form.success.seq"].replace("{seq}",String(i)):e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:L,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:L,children:D})]}),l&&o("button",{type:"button",class:"meta-toggle",onClick:()=>d(!c),disabled:L,children:c?e["form.meta.cancel"]:e["form.meta.action"]}),b!==null&&S[b]&&o(Wr,{imageBlob:S[b].blob,strings:e,onCancel:()=>q(null),onSave:O})]})}oe();function fn(e){let t={new:0,in_progress:0,awaiting_validation:0,resolved:0,total:0};for(let r of e)switch(t.total+=1,r.status){case"new":t.new+=1;break;case"in_progress":t.in_progress+=1;break;case"awaiting_validation":t.awaiting_validation+=1;break;case"closed":case"rejected":case"duplicate":case"wontfix":t.resolved+=1;break}return t}function mn(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var gn={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function Ur(e,t){return t==="all"?e:e.filter(r=>gn[r.status]===t)}function Vr({rows:e,filter:t,onFilter:r,strings:a}){let n=fn(e),i=mn(n),s=[{key:"new",label:a["kpi.new"],value:String(n.new)},{key:"in_progress",label:a["kpi.in_progress"],value:String(n.in_progress)},{key:"awaiting_validation",label:a["kpi.awaiting_validation"],value:String(n.awaiting_validation)},{key:"resolved",label:a["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(l=>{let c=t===l.key,d=c?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${c?" is-active":""}`,onClick:()=>r(d),"aria-pressed":c,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var bn=3e4;function Gr({api:e,externalId:t,strings:r,onSelect:a,onOpenSeq:n}){var N;let[i,s]=R(null),[l,c]=R(null),[d,f]=R(!1),[u,p]=R("all"),[g,_]=R(null),T=async(C,B)=>{_(C);try{B==="confirm"?await e.closeAsResolved(C,t):await e.reopenUnresolved(C,t),await F()}catch(H){typeof console!="undefined"&&console.warn("[mhosaic] validate:",H),b.current&&c(r["mine.error"])}finally{b.current&&_(null)}},[y,v]=R(""),[S,z]=R(!1),[w,m]=R(!1),b=G(!0),q=async C=>{if(C.preventDefault(),!n||w)return;let B=parseInt(y.replace(/^#/,"").trim(),10);if(!Number.isInteger(B)||B<=0){z(!0);return}m(!0),z(!1);try{let H=await n(B);if(!b.current)return;H?v(""):z(!0)}finally{b.current&&m(!1)}},F=async()=>{var C;f(!0),c(null);try{let B=await e.listMine(t);return b.current&&s(B),!0}catch(B){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",B),b.current&&c((C=Pe(B,r))!=null?C:r["mine.error"]),!1}finally{b.current&&f(!1)}};Q(()=>{b.current=!0;let C=he(F,bn);return()=>{b.current=!1,C.stop()}},[t]);let h=i!==null&&i.length===0,L=i===null&&!l,D=i?Ur(i,u):null,K=!!i&&i.length>0&&((N=D==null?void 0:D.length)!=null?N:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("div",{class:"mine-list-header-actions",children:[n&&o("form",{class:"mine-jump",onSubmit:q,children:[o("input",{type:"text",inputMode:"numeric",value:y,placeholder:r["mine.jump.placeholder"],"aria-label":r["mine.jump.aria"],onInput:C=>{v(C.target.value),z(!1)},disabled:w}),o("button",{type:"submit",class:"btn",disabled:w||!y.trim(),children:r["mine.jump.go"]})]}),o("button",{type:"button",class:"btn",onClick:()=>{F()},disabled:d,children:d?r["mine.loading"]:r["mine.refresh"]})]})]}),S&&o("div",{class:"mine-jump-error error",role:"alert",children:r["mine.jump.not_found"]}),i&&i.some(C=>C.status==="awaiting_validation")&&o("div",{class:"validate-banner",role:"status",children:[o("span",{children:r["mine.validate.banner"].replace("{count}",String(i.filter(C=>C.status==="awaiting_validation").length))}),o("button",{type:"button",class:"btn",onClick:()=>p("awaiting_validation"),children:r["mine.validate.view"]})]}),i&&i.length>0&&o(Vr,{rows:i,filter:u,onFilter:p,strings:r}),L&&o("div",{class:"mine-loading",children:r["mine.loading"]}),l&&o("div",{class:"error",children:[l,o(tt,{api:e,strings:r,host:e.endpointHost})]}),h&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),K&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),D&&D.length>0&&o("ul",{class:"mine-rows",children:D.map(C=>o("li",{children:[o(at,{row:C,strings:r,onClick:()=>a(C)}),C.status==="awaiting_validation"&&o("div",{class:"validate-actions",children:[o("button",{type:"button",class:"btn",disabled:g===C.id,onClick:()=>{T(C.id,"confirm")},children:r["mine.validate.confirm"]}),o("button",{type:"button",class:"btn btn--ghost",disabled:g===C.id,onClick:()=>{T(C.id,"reopen")},children:r["mine.validate.reopen"]})]})]}))})]})}oe();function Yr({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=G(null),i=G(null);return Q(()=>{var c;i.current=document.activeElement;let s=d=>{var u;if(d.key!=="Escape")return;let f=(u=n.current)==null?void 0:u.getRootNode();f instanceof ShadowRoot&&f.querySelector(".annotator-backdrop")||(d.stopPropagation(),e("escape"))};window.addEventListener("keydown",s);let l=(c=n.current)==null?void 0:c.querySelector("textarea, input, select, button");return l==null||l.focus(),()=>{window.removeEventListener("keydown",s);let d=i.current;d&&typeof d.focus=="function"&&d.focus()}},[e]),o("div",{class:`backdrop ${a?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e("backdrop")},children:o("div",{ref:n,class:`modal ${a?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:()=>e("button"),children:"\xD7"}),t]})})}function Xr({open:e,strings:t,onView:r}){if(e===0)return null;let a=e===1?t["page.strip.text.one"]:t["page.strip.text"].replace("{n}",String(e));return o("div",{class:"page-strip",children:[o("span",{children:a}),o("button",{type:"button",class:"page-strip-view",onClick:r,children:t["page.strip.view"]})]})}oe();function Jr({api:e,externalId:t,strings:r,getCurrentPage:a,open:n,onViewAll:i,onPickRow:s,onSend:l}){let[c,d]=R(null),[f,u]=R(!1);return Q(()=>{let p=!1,g=ue(a!==void 0?{getCurrentPage:a}:{});return e.listBoard(t,{pagePath:g,status:["new","in_progress","awaiting_validation"]}).then(_=>{p||d(_.results.slice(0,5))}).catch(()=>{p||u(!0)}),()=>{p=!0}},[e,t]),o("div",{class:"page-peek",role:"region","aria-label":r["page.peek.title"],children:[o("div",{class:"page-peek-title",children:r["page.peek.title"]}),c===null&&!f&&o("div",{class:"page-peek-skeleton","aria-hidden":"true",children:[o("div",{})," ",o("div",{})]}),c!==null&&c.map(p=>o("button",{type:"button",class:"page-peek-row",onClick:()=>s==null?void 0:s(p.id),children:[o("span",{class:`page-peek-dot status-${p.status}`,"aria-hidden":"true"}),o("span",{class:"page-peek-desc",children:p.description})]},p.id)),o("div",{class:"page-peek-footer",children:[o("button",{type:"button",class:"page-peek-viewall",onClick:i,children:n===1?r["page.peek.viewAll.one"]:r["page.peek.viewAll"].replace("{n}",String(n))}),o("button",{type:"button",class:"page-peek-send",onClick:l,children:r["fab.label"]})]})]})}oe();var hn=6e4;function vn(e){var r,a,n;let t=e.by_status;return((r=t.new)!=null?r:0)+((a=t.in_progress)!=null?a:0)+((n=t.awaiting_validation)!=null?n:0)}var Rt=new Map,Ct=new Map;function yn(){Rt.clear()}function Et(e,t,r){let a=`${t}|${r}`,n=Rt.get(a);if(n&&Date.now()-n.fetchedAt<hn)return Promise.resolve(n.kpis);let i=Ct.get(a);if(i)return i;let s=e.fetchBoardKpis(t,{pagePath:r}).then(l=>(Rt.set(a,{kpis:l,fetchedAt:Date.now()}),l)).finally(()=>Ct.delete(a));return Ct.set(a,s),s}function xn(e,t,r){return Et(e,t,r).then(vn)}function Zr(e){let{api:t,externalId:r,getCurrentPage:a,enabled:n}=e,[i,s]=R(0),[l,c]=R(0),d=ge(()=>{yn(),c(f=>f+1)},[]);return Q(()=>{if(!n||!t||!r){s(0);return}let f=!1,u=()=>{let g=ue(a!==void 0?{getCurrentPage:a}:{});xn(t,r,g).then(_=>{f||s(_)}).catch(()=>{f||s(0)})};u();let p=et(u);return()=>{f=!0,p()}},[t,r,n,l]),{open:i,refresh:d}}var eo=`
622
622
  :host {
623
623
  --mfb-accent: #3b82f6;
624
624
  --mfb-accent-contrast: #ffffff;
@@ -1015,6 +1015,12 @@
1015
1015
  /* REQ-A7: quiet transparency line under the form. */
1016
1016
  .capture-notice { color: var(--mfb-muted, #6b7280); font-size: 11px; line-height: 1.4; margin-top: 6px; }
1017
1017
 
1018
+ /* Meta-feedback: footer escape hatch + active-mode badge. Deliberately as
1019
+ quiet as the capture notice \u2014 never competes with the host's own flow. */
1020
+ .meta-toggle { background: none; border: none; padding: 0; margin-top: 10px; color: var(--mfb-muted, #6b7280); font-size: 11px; text-decoration: underline; cursor: pointer; align-self: flex-start; }
1021
+ .meta-toggle:hover { color: var(--mfb-text, #111827); }
1022
+ .meta-badge { display: inline-block; margin: 2px 0 6px; padding: 2px 8px; border-radius: 999px; background: var(--mfb-accent-soft, #eef2ff); color: var(--mfb-accent, #4f46e5); font-size: 11px; font-weight: 600; }
1023
+
1018
1024
  /* #85: inline "#NN" report reference rendered as a link (a button for a11y). */
1019
1025
  .seq-link {
1020
1026
  display: inline;
@@ -1525,6 +1531,10 @@
1525
1531
  .pill-status--awaiting_validation { background: #faf5ff; color: #6b21a8; border-color: #e9d5ff; }
1526
1532
  .pill-status--closed { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
1527
1533
  .pill-status--rejected, .pill-status--wontfix, .pill-status--duplicate { background: #f3f4f6; color: #374151; border-color: #e5e7eb; }
1534
+ /* Agent-verified fix badge (Phase B) \u2014 emerald, same family as
1535
+ .pill-status--closed but its own modifier since it layers alongside
1536
+ the status pill rather than replacing it. */
1537
+ .pill-verified { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
1528
1538
  .pill-type { background: var(--mfb-surface); color: var(--mfb-text-muted); border-color: var(--mfb-border); }
1529
1539
  .pill-severity { background: var(--mfb-surface); color: var(--mfb-text-muted); border-color: var(--mfb-border); }
1530
1540
  .pill-severity--blocker { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
@@ -1539,6 +1549,7 @@
1539
1549
  justify-content: space-between;
1540
1550
  gap: 8px;
1541
1551
  }
1552
+ .report-detail-header-pills { display: inline-flex; align-items: center; gap: 6px; }
1542
1553
  .report-detail-body { display: flex; flex-direction: column; gap: 10px; }
1543
1554
  .report-detail-description {
1544
1555
  font-size: 14px;
@@ -1892,12 +1903,14 @@ button.report-detail-edit {
1892
1903
  /* Transparency drawer \u2014 closed by default. The user can click open to
1893
1904
  verify what their browser sent: device, errors, console tail, network
1894
1905
  tail. Read-only; purely a trust-building gesture. */
1895
- .report-detail-tech {
1906
+ .report-detail-tech,
1907
+ .report-detail-verification {
1896
1908
  border: 1px solid var(--mfb-border);
1897
1909
  border-radius: var(--mfb-radius);
1898
1910
  background: var(--mfb-surface);
1899
1911
  }
1900
- .report-detail-tech > summary {
1912
+ .report-detail-tech > summary,
1913
+ .report-detail-verification > summary {
1901
1914
  cursor: pointer;
1902
1915
  padding: 8px 10px;
1903
1916
  font-size: 11px;
@@ -1907,15 +1920,19 @@ button.report-detail-edit {
1907
1920
  user-select: none;
1908
1921
  list-style: none;
1909
1922
  }
1910
- .report-detail-tech > summary::-webkit-details-marker { display: none; }
1911
- .report-detail-tech > summary::before {
1923
+ .report-detail-tech > summary::-webkit-details-marker,
1924
+ .report-detail-verification > summary::-webkit-details-marker { display: none; }
1925
+ .report-detail-tech > summary::before,
1926
+ .report-detail-verification > summary::before {
1912
1927
  content: '\u25B8';
1913
1928
  display: inline-block;
1914
1929
  margin-right: 6px;
1915
1930
  transition: transform 120ms;
1916
1931
  }
1917
- .report-detail-tech[open] > summary::before { transform: rotate(90deg); }
1918
- .tech-body {
1932
+ .report-detail-tech[open] > summary::before,
1933
+ .report-detail-verification[open] > summary::before { transform: rotate(90deg); }
1934
+ .tech-body,
1935
+ .verification-body {
1919
1936
  padding: 0 10px 10px 10px;
1920
1937
  display: flex;
1921
1938
  flex-direction: column;
@@ -1995,6 +2012,31 @@ button.report-detail-edit {
1995
2012
  .tech-network-url { word-break: break-all; }
1996
2013
  .tech-network-time { text-align: right; color: var(--mfb-text-muted); font-variant-numeric: tabular-nums; }
1997
2014
 
2015
+ /* Proof-of-fix drawer (Phase B) \u2014 shares the collapsible shell rules
2016
+ with .report-detail-tech above (grouped selectors): closed by
2017
+ default, rotating \u25B8 marker. Surfaces an agent's verification pass
2018
+ so the submitter can see the evidence behind the "V\xE9rifi\xE9 par
2019
+ l'agent" badge. */
2020
+ .verification-evidence {
2021
+ margin: 0;
2022
+ font-size: 12px;
2023
+ white-space: pre-wrap;
2024
+ }
2025
+ .verification-meta {
2026
+ display: flex;
2027
+ gap: 12px;
2028
+ flex-wrap: wrap;
2029
+ font-size: 11px;
2030
+ color: var(--mfb-text-muted);
2031
+ }
2032
+ .verification-shots {
2033
+ display: flex;
2034
+ gap: 8px;
2035
+ flex-wrap: wrap;
2036
+ }
2037
+ .verification-shots .report-detail-screenshot { width: 96px; flex: 0 0 auto; }
2038
+ .verification-shots .report-detail-screenshot img { max-height: 96px; }
2039
+
1998
2040
  /* KPI strip \u2014 four pills above the My Reports list. Each is clickable
1999
2041
  to filter the rows below. Borrowed from thePnr's FeedbackKPICards. */
2000
2042
  .kpi-strip {
@@ -2696,7 +2738,7 @@ button.report-detail-edit {
2696
2738
  background: var(--mfb-surface-2);
2697
2739
  margin: var(--mfb-space-2) 0;
2698
2740
  }
2699
- `;function hn(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function Jr(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=Yr,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null,s=!1;function l(p){n=p,Re(_(f,{state:p}),a)}function d(p){let{selectedReportId:g,boardSelectId:y,...C}=p;return C}function c(p){l({...n,open:!0,tab:"send"}),e.openToCurrentPageFeedback&&e.api&&p&&Pt(e.api,p,pe(e)).then(g=>{g.total>0&&n.open&&n.tab==="send"&&l({...n,tab:"board"})}).catch(()=>{})}function f({state:p}){var H;let g=me(async R=>{l({...n,status:"submitting"});try{let I=await e.onSubmit(R);q.refresh(),l({...n,status:"success",...I&&I.seq!==void 0&&{submittedSeq:I.seq}}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,l({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(I){typeof console!="undefined"&&console.warn("[mhosaic] submit:",I),l({...n,status:"error",error:e.strings["form.error"]})}},[]),y=(H=e.getExternalId)==null?void 0:H.call(e),C=R=>!e.api||!y?Promise.resolve(!1):e.api.getReportBySeq(R,y).then(I=>(l({...n,open:!0,tab:"mine",selectedReportId:I.id}),!0)).catch(()=>!1),x=e.deepLinkParam===!1?void 0:R=>{let I=e.deepLinkParam||"mhfeedback";try{let O=new URL(window.location.href);return O.searchParams.set(I,R),O.toString()}catch(O){return""}},w=e.showPageActivity!==!1,q=Xr({...e.api!==void 0&&{api:e.api},...y!==void 0&&{externalId:y},...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},enabled:w}),z=q.open===1?e.strings["page.badge.aria.one"]:q.open>0?e.strings["page.badge.aria"].replace("{n}",String(q.open)):e.strings["fab.label"],[k,m]=P(!e.requiresVisibilityCheck);W(()=>{if(!e.requiresVisibilityCheck){m(!0);return}if(!y||!e.checkVisibility){m(!1);return}let R=!1;return e.checkVisibility(y).then(I=>{R||m(I)}).catch(()=>{R||m(!1)}),()=>{R=!0}},[y]);let v=hn(e,y,k),E=!!(e.api&&y),[F,h]=P(!1),B=U({});return o(oe,{children:[v&&o("div",{class:"fab-area",onMouseEnter:()=>{B.current.close&&clearTimeout(B.current.close),B.current.open=setTimeout(()=>h(!0),250)},onMouseLeave:()=>{B.current.open&&clearTimeout(B.current.open),B.current.close=setTimeout(()=>h(!1),140)},onFocusIn:R=>{var I,O;B.current.close&&clearTimeout(B.current.close),(O=(I=R.target).matches)!=null&&O.call(I,":focus-visible")&&h(!0)},onFocusOut:()=>h(!1),onKeyDown:R=>R.key==="Escape"&&h(!1),children:[F&&!p.open&&w&&q.open>0&&e.api&&y&&o(Gr,{api:e.api,externalId:y,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},open:q.open,onViewAll:()=>{h(!1),l({...n,open:!0,tab:"board"})},onPickRow:R=>{h(!1),l({...n,open:!0,tab:"board",boardSelectId:R})},onSend:()=>{h(!1),c(y)}}),o($r,{label:z,onClick:()=>c(y),...q.open>0&&{count:q.open}})]}),p.open&&o(Ur,{onDismiss:R=>{if(R!=="button"&&s&&n.tab==="send"&&n.status!=="submitting"){l({...n,confirmingDiscard:!0});return}s=!1,l(d({...n,open:!1,status:"idle",confirmingDiscard:!1}))},closeLabel:e.strings["form.close"],expanded:p.tab==="board",children:[p.confirmingDiscard&&o("div",{class:"discard-confirm",role:"alertdialog","aria-modal":"true",children:o("div",{class:"discard-confirm-card",children:[o("p",{class:"discard-confirm-title",children:e.strings["form.discard.title"]}),o("p",{class:"discard-confirm-body",children:e.strings["form.discard.body"]}),o("div",{class:"discard-confirm-actions",children:[o("button",{type:"button",class:"btn",onClick:()=>l({...n,confirmingDiscard:!1}),children:e.strings["form.discard.keep"]}),o("button",{type:"button",class:"btn btn--primary",onClick:()=>{s=!1,l(d({...n,open:!1,status:"idle",confirmingDiscard:!1}))},children:e.strings["form.discard.confirm"]})]})]})}),E&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":p.tab==="send",class:`tab-button ${p.tab==="send"?"is-active":""}`,onClick:()=>l(d({...n,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":p.tab==="mine",class:`tab-button ${p.tab==="mine"?"is-active":""}`,onClick:()=>l(d({...n,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":p.tab==="changelog",class:`tab-button ${p.tab==="changelog"?"is-active":""}`,onClick:()=>l(d({...n,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":p.tab==="board",class:`tab-button tab-button--board ${p.tab==="board"?"is-active":""}`,onClick:()=>l(d({...n,tab:"board"})),children:e.strings["tab.board"]})]}),p.tab==="send"&&o(oe,{children:[E&&w&&o(Vr,{open:q.open,strings:e.strings,onView:()=>l(d({...n,tab:"board"}))}),o(Nr,{strings:e.strings,onSubmit:g,onCancel:()=>l({...n,open:!1,status:"idle"}),status:p.status,...p.error!==void 0&&{errorMessage:p.error},...p.submittedSeq!==void 0&&{submittedSeq:p.submittedSeq},onDirtyChange:R=>{s=R}})]}),p.tab==="mine"&&e.api&&y&&!p.selectedReportId&&o(Qr,{api:e.api,externalId:y,strings:e.strings,onSelect:R=>l({...n,selectedReportId:R.id}),onOpenSeq:C}),(p.tab==="mine"||p.tab==="changelog")&&e.api&&y&&p.selectedReportId&&o(ot,{api:e.api,externalId:y,reportId:p.selectedReportId,strings:e.strings,onBack:()=>l(d({...n})),onOpenSeq:C,...x&&{buildPermalink:x}}),p.tab==="changelog"&&e.api&&y&&!p.selectedReportId&&o(Dr,{api:e.api,externalId:y,strings:e.strings,onSelect:R=>l({...n,selectedReportId:R.id})}),p.tab==="board"&&e.api&&y&&o(Ir,{api:e.api,externalId:y,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...p.boardSelectId!==void 0&&{initialSelectedId:p.boardSelectId}})]})]})}l(n);function u(p){var w;let g=e.api,y=(w=e.getExternalId)==null?void 0:w.call(e);if(!g||!y||!p)return;let C=/^\d+$/.test(p)?parseInt(p,10):null;(C!==null?g.getReportBySeq(C,y):g.getReport(p,y)).then(q=>l({...n,open:!0,tab:"mine",selectedReportId:q.id})).catch(()=>{})}if(e.deepLinkParam!==!1)try{let p=e.deepLinkParam||"mhfeedback",g=new URLSearchParams(window.location.search).get(p);g&&u(g.trim())}catch(p){}return{open(){var p;c((p=e.getExternalId)==null?void 0:p.call(e))},close(){l({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),Re(null,a),e.host.innerHTML=""},notifyIdentityChanged(){l({...n})}}}function Ln(){return{right:24+24/2,bottom:84}}function qo(e){var x,w,q,z,k,m,v,E,F;let t=(x=e.env)!=null?x:"prod",r=(w=e.locale)!=null?w:typeof navigator!="undefined"?navigator.language:void 0,a=er((q=e.translations)!=null?q:{},r!==void 0?{locale:r}:{}),n=Zt({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(z=e.metadata)!=null?z:{},l=Qt({apiKey:e.apiKey,endpoint:e.endpoint,...e.fetchImpl!==void 0&&{fetch:e.fetchImpl},...e.beforeSend!==void 0&&{beforeSend:e.beforeSend},getSignedIdentity:()=>!i||!i.userHash||!i.exp||!i.email?null:{userHash:i.userHash,exp:i.exp,email:i.email}}),d=[],c=document.createElement("div");if(c.className="mhosaic-feedback",e.attachTo){let h=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;h==null||h.appendChild(c)}else document.body.appendChild(c);async function f(h){var J,ee,G,S,b,T;let B=(J=h.screenshots)!=null&&J.length?h.screenshots:h.screenshot?[h.screenshot]:void 0,D=h.synthetic?void 0:B,$=n.snapshot();if(i){let{userHash:A,exp:j,...M}=i;$.user=M}s&&Object.keys(s).length>0&&($.metadata={...s});let H=D!=null&&D.length?(ee=h.capture_method)!=null?ee:"manual":"none",R={description:h.description,feedback_type:(G=h.feedback_type)!=null?G:"bug",severity:(S=h.severity)!=null?S:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:H,technical_context:$};R.widget_version="0.35.0",D!=null&&D.length&&(R.screenshots=D,R.screenshot=D[0]),h.synthetic&&(R.synthetic=!0);let I=pe(e);I&&(R.page_path=I),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(R.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let O=R;for(let A of d)O=await A(O);try{let A=await l.submitReport(O);return(b=e.onSubmitSuccess)==null||b.call(e,A),n.clear(),A}catch(A){let j=A instanceof Error?A:new Error(String(A));throw(T=e.onError)==null||T.call(e,j),j}}let u={host:c,strings:a,showFAB:(k=e.showFAB)!=null?k:!0,onSubmit:h=>f(h),api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(m=e.requiresVisibilityCheck)!=null?m:!1,checkVisibility:h=>l.checkVisibility(h,i==null?void 0:i.email),...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...e.openToCurrentPageFeedback!==void 0&&{openToCurrentPageFeedback:e.openToCurrentPageFeedback},...e.showPageActivity!==void 0&&{showPageActivity:e.showPageActivity}},p=Jr(u);if(e.openToCurrentPageFeedback===void 0&&e.showFAB!==!1){let h=(v=e.fetchImpl)!=null?v:globalThis.fetch;(async()=>{var B,D;try{let $=await h(`${e.endpoint}/api/feedback/v1/widget-manifest/?pk=${encodeURIComponent(e.apiKey)}`);if(!$.ok)return;let H=await $.json(),R=(D=(B=H==null?void 0:H.config)==null?void 0:B.behavior)==null?void 0:D.openToCurrentPageFeedback;typeof R=="boolean"&&u.openToCurrentPageFeedback===void 0&&(u.openToCurrentPageFeedback=R)}catch($){}})()}let g,y=!1;if((E=e.qaMeter)!=null&&E.source){let h=e.qaMeter,B=(F=h.locale)!=null?F:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(Ro(),Co)).then(({createQaMeter:D})=>{var $,H;y||(g=D({source:h.source,size:($=h.size)!=null?$:"sm",position:(H=h.position)!=null?H:Ln(),locale:B,...h.getCurrentPage&&{getCurrentPage:h.getCurrentPage}}))})}let C={show(){p.open()},hide(){p.close()},open(h){p.open()},async submit(h){return f({description:h.description,...h.feedback_type!==void 0&&{feedback_type:h.feedback_type},...h.severity!==void 0&&{severity:h.severity},...h.synthetic!==void 0&&{synthetic:h.synthetic},...h.screenshot!==void 0&&{screenshot:h.screenshot},...h.screenshots!==void 0&&{screenshots:h.screenshots}})},identify(h){i=h,p.notifyIdentityChanged()},setMetadata(h){s={...s,...h}},shutdown(){y=!0,g==null||g.dispose(),p.dispose(),n.dispose(),c.remove();let h=window;h.mhosaicFeedback===C&&delete h.mhosaicFeedback},_registerTransformer(h){d.push(h)}};return window.mhosaicFeedback=C,C}var zn={enabled:!0,perFingerprintCooldownMs:3e5,sampleRate:1,maxDescriptionLen:200,globalRatePerMinute:30,maxDistinctFingerprints:200};function Po(e){var t;if(e instanceof Error)return{name:e.name||"Error",message:String((t=e.message)!=null?t:""),...e.stack&&{stack:String(e.stack)}};if(typeof e=="string")return{name:"Error",message:e};if(e&&typeof e=="object"){let r=e;return{name:typeof r.name=="string"&&r.name||"Error",message:typeof r.message=="string"&&r.message||(()=>{try{return JSON.stringify(e)}catch(a){return String(e)}})(),...typeof r.stack=="string"&&{stack:r.stack}}}return{name:"Error",message:String(e)}}function Bn(e,t){var n;let r=((n=e.stack)!=null?n:"").split(`
2741
+ `;function _n(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function to(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=eo,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null,s=!1;function l(p){n=p,Re(x(f,{state:p}),a)}function c(p){let{selectedReportId:g,boardSelectId:_,...T}=p;return T}function d(p){l({...n,open:!0,tab:"send"}),e.openToCurrentPageFeedback&&e.api&&p&&Et(e.api,p,ue(e)).then(g=>{g.total>0&&n.open&&n.tab==="send"&&l({...n,tab:"board"})}).catch(()=>{})}function f({state:p}){var N;let g=ge(async C=>{l({...n,status:"submitting"});try{let B=await e.onSubmit(C);S.refresh(),l({...n,status:"success",...B&&B.seq!==void 0&&{submittedSeq:B.seq}}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,l({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(B){typeof console!="undefined"&&console.warn("[mhosaic] submit:",B),l({...n,status:"error",error:e.strings["form.error"]})}},[]),_=(N=e.getExternalId)==null?void 0:N.call(e),T=C=>!e.api||!_?Promise.resolve(!1):e.api.getReportBySeq(C,_).then(B=>(l({...n,open:!0,tab:"mine",selectedReportId:B.id}),!0)).catch(()=>!1),y=e.deepLinkParam===!1?void 0:C=>{let B=e.deepLinkParam||"mhfeedback";try{let H=new URL(window.location.href);return H.searchParams.set(B,C),H.toString()}catch(H){return""}},v=e.showPageActivity!==!1,S=Zr({...e.api!==void 0&&{api:e.api},..._!==void 0&&{externalId:_},...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},enabled:v}),z=S.open===1?e.strings["page.badge.aria.one"]:S.open>0?e.strings["page.badge.aria"].replace("{n}",String(S.open)):e.strings["fab.label"],[w,m]=R(!e.requiresVisibilityCheck);Q(()=>{if(!e.requiresVisibilityCheck){m(!0);return}if(!_||!e.checkVisibility){m(!1);return}let C=!1;return e.checkVisibility(_).then(B=>{C||m(B)}).catch(()=>{C||m(!1)}),()=>{C=!0}},[_]);let b=_n(e,_,w),q=!!(e.api&&_),[F,h]=R(!1),L=G({});return o(ae,{children:[b&&o("div",{class:"fab-area",onMouseEnter:()=>{L.current.close&&clearTimeout(L.current.close),L.current.open=setTimeout(()=>h(!0),250)},onMouseLeave:()=>{L.current.open&&clearTimeout(L.current.open),L.current.close=setTimeout(()=>h(!1),140)},onFocusIn:C=>{var B,H;L.current.close&&clearTimeout(L.current.close),(H=(B=C.target).matches)!=null&&H.call(B,":focus-visible")&&h(!0)},onFocusOut:()=>h(!1),onKeyDown:C=>C.key==="Escape"&&h(!1),children:[F&&!p.open&&v&&S.open>0&&e.api&&_&&o(Jr,{api:e.api,externalId:_,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},open:S.open,onViewAll:()=>{h(!1),l({...n,open:!0,tab:"board"})},onPickRow:C=>{h(!1),l({...n,open:!0,tab:"board",boardSelectId:C})},onSend:()=>{h(!1),d(_)}}),o(Hr,{label:z,onClick:()=>d(_),...S.open>0&&{count:S.open}})]}),p.open&&o(Yr,{onDismiss:C=>{if(C!=="button"&&s&&n.tab==="send"&&n.status!=="submitting"){l({...n,confirmingDiscard:!0});return}s=!1,l(c({...n,open:!1,status:"idle",confirmingDiscard:!1}))},closeLabel:e.strings["form.close"],expanded:p.tab==="board",children:[p.confirmingDiscard&&o("div",{class:"discard-confirm",role:"alertdialog","aria-modal":"true",children:o("div",{class:"discard-confirm-card",children:[o("p",{class:"discard-confirm-title",children:e.strings["form.discard.title"]}),o("p",{class:"discard-confirm-body",children:e.strings["form.discard.body"]}),o("div",{class:"discard-confirm-actions",children:[o("button",{type:"button",class:"btn",onClick:()=>l({...n,confirmingDiscard:!1}),children:e.strings["form.discard.keep"]}),o("button",{type:"button",class:"btn btn--primary",onClick:()=>{s=!1,l(c({...n,open:!1,status:"idle",confirmingDiscard:!1}))},children:e.strings["form.discard.confirm"]})]})]})}),q&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":p.tab==="send",class:`tab-button ${p.tab==="send"?"is-active":""}`,onClick:()=>l(c({...n,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":p.tab==="mine",class:`tab-button ${p.tab==="mine"?"is-active":""}`,onClick:()=>l(c({...n,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":p.tab==="changelog",class:`tab-button ${p.tab==="changelog"?"is-active":""}`,onClick:()=>l(c({...n,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":p.tab==="board",class:`tab-button tab-button--board ${p.tab==="board"?"is-active":""}`,onClick:()=>l(c({...n,tab:"board"})),children:e.strings["tab.board"]})]}),p.tab==="send"&&o(ae,{children:[q&&v&&o(Xr,{open:S.open,strings:e.strings,onView:()=>l(c({...n,tab:"board"}))}),o(Qr,{strings:e.strings,onSubmit:g,onCancel:()=>l({...n,open:!1,status:"idle"}),status:p.status,...p.error!==void 0&&{errorMessage:p.error},...p.submittedSeq!==void 0&&{submittedSeq:p.submittedSeq},onDirtyChange:C=>{s=C},...e.metaFeedbackEnabled!==void 0&&{metaFeedbackEnabled:e.metaFeedbackEnabled}})]}),p.tab==="mine"&&e.api&&_&&!p.selectedReportId&&o(Gr,{api:e.api,externalId:_,strings:e.strings,onSelect:C=>l({...n,selectedReportId:C.id}),onOpenSeq:T}),(p.tab==="mine"||p.tab==="changelog")&&e.api&&_&&p.selectedReportId&&o(ot,{api:e.api,externalId:_,reportId:p.selectedReportId,strings:e.strings,onBack:()=>l(c({...n})),onOpenSeq:T,...y&&{buildPermalink:y}}),p.tab==="changelog"&&e.api&&_&&!p.selectedReportId&&o(Or,{api:e.api,externalId:_,strings:e.strings,onSelect:C=>l({...n,selectedReportId:C.id})}),p.tab==="board"&&e.api&&_&&o(Kr,{api:e.api,externalId:_,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...p.boardSelectId!==void 0&&{initialSelectedId:p.boardSelectId}})]})]})}l(n);function u(p){var v;let g=e.api,_=(v=e.getExternalId)==null?void 0:v.call(e);if(!g||!_||!p)return;let T=/^\d+$/.test(p)?parseInt(p,10):null;(T!==null?g.getReportBySeq(T,_):g.getReport(p,_)).then(S=>l({...n,open:!0,tab:"mine",selectedReportId:S.id})).catch(()=>{})}if(e.deepLinkParam!==!1)try{let p=e.deepLinkParam||"mhfeedback",g=new URLSearchParams(window.location.search).get(p);g&&u(g.trim())}catch(p){}return{open(){var p;d((p=e.getExternalId)==null?void 0:p.call(e))},close(){l({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),Re(null,a),e.host.innerHTML=""},notifyIdentityChanged(){l({...n})}}}function In(){return{right:24+24/2,bottom:84}}function qo(e){var y,v,S,z,w,m,b,q,F;let t=(y=e.env)!=null?y:"prod",r=(v=e.locale)!=null?v:typeof navigator!="undefined"?navigator.language:void 0,a=Zt((S=e.translations)!=null?S:{},r!==void 0?{locale:r}:{}),n=Jt({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(z=e.metadata)!=null?z:{},l=Wt({apiKey:e.apiKey,endpoint:e.endpoint,...e.fetchImpl!==void 0&&{fetch:e.fetchImpl},...e.beforeSend!==void 0&&{beforeSend:e.beforeSend},getSignedIdentity:()=>!i||!i.userHash||!i.exp||!i.email?null:{userHash:i.userHash,exp:i.exp,email:i.email}}),c=[],d=document.createElement("div");if(d.className="mhosaic-feedback",e.attachTo){let h=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;h==null||h.appendChild(d)}else document.body.appendChild(d);async function f(h){var Y,re,J,k,P,O;let L=(Y=h.screenshots)!=null&&Y.length?h.screenshots:h.screenshot?[h.screenshot]:void 0,D=h.synthetic?void 0:L,K=n.snapshot();if(i){let{userHash:$,exp:A,...E}=i;K.user=E}s&&Object.keys(s).length>0&&(K.metadata={...s});let N=D!=null&&D.length?(re=h.capture_method)!=null?re:"manual":"none",C={description:h.description,feedback_type:(J=h.feedback_type)!=null?J:"bug",severity:(k=h.severity)!=null?k:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:N,technical_context:K};C.widget_version="0.37.0",D!=null&&D.length&&(C.screenshots=D,C.screenshot=D[0]),h.synthetic&&(C.synthetic=!0),h.meta&&(C.meta=!0);let B=ue(e);B&&(C.page_path=B),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(C.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let H=C;for(let $ of c)H=await $(H);try{let $=await l.submitReport(H);return(P=e.onSubmitSuccess)==null||P.call(e,$),n.clear(),$}catch($){let A=$ instanceof Error?$:new Error(String($));throw(O=e.onError)==null||O.call(e,A),A}}let u={host:d,strings:a,showFAB:(w=e.showFAB)!=null?w:!0,onSubmit:h=>f(h),api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(m=e.requiresVisibilityCheck)!=null?m:!1,checkVisibility:h=>l.checkVisibility(h,i==null?void 0:i.email),...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...e.openToCurrentPageFeedback!==void 0&&{openToCurrentPageFeedback:e.openToCurrentPageFeedback},...e.metaFeedbackEnabled!==void 0&&{metaFeedbackEnabled:e.metaFeedbackEnabled},...e.showPageActivity!==void 0&&{showPageActivity:e.showPageActivity}},p=to(u);if((e.openToCurrentPageFeedback===void 0||e.metaFeedbackEnabled===void 0)&&e.showFAB!==!1){let h=(b=e.fetchImpl)!=null?b:globalThis.fetch;(async()=>{var L,D,K,N;try{let C=await h(`${e.endpoint}/api/feedback/v1/widget-manifest/?pk=${encodeURIComponent(e.apiKey)}`);if(!C.ok)return;let B=await C.json(),H=(D=(L=B==null?void 0:B.config)==null?void 0:L.behavior)==null?void 0:D.openToCurrentPageFeedback;typeof H=="boolean"&&u.openToCurrentPageFeedback===void 0&&(u.openToCurrentPageFeedback=H);let Y=(N=(K=B==null?void 0:B.config)==null?void 0:K.behavior)==null?void 0:N.metaFeedbackEnabled;typeof Y=="boolean"&&u.metaFeedbackEnabled===void 0&&(u.metaFeedbackEnabled=Y)}catch(C){}})()}let g,_=!1;if((q=e.qaMeter)!=null&&q.source){let h=e.qaMeter,L=(F=h.locale)!=null?F:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(To(),Po)).then(({createQaMeter:D})=>{var K,N;_||(g=D({source:h.source,size:(K=h.size)!=null?K:"sm",position:(N=h.position)!=null?N:In(),locale:L,...h.getCurrentPage&&{getCurrentPage:h.getCurrentPage}}))})}let T={show(){p.open()},hide(){p.close()},open(h){p.open()},async submit(h){return f({description:h.description,...h.feedback_type!==void 0&&{feedback_type:h.feedback_type},...h.severity!==void 0&&{severity:h.severity},...h.synthetic!==void 0&&{synthetic:h.synthetic},...h.screenshot!==void 0&&{screenshot:h.screenshot},...h.screenshots!==void 0&&{screenshots:h.screenshots}})},identify(h){i=h,p.notifyIdentityChanged()},setMetadata(h){s={...s,...h}},shutdown(){_=!0,g==null||g.dispose(),p.dispose(),n.dispose(),d.remove();let h=window;h.mhosaicFeedback===T&&delete h.mhosaicFeedback},_registerTransformer(h){c.push(h)}};return window.mhosaicFeedback=T,T}var Dn={enabled:!0,perFingerprintCooldownMs:3e5,sampleRate:1,maxDescriptionLen:200,globalRatePerMinute:30,maxDistinctFingerprints:200};function Ao(e){var t;if(e instanceof Error)return{name:e.name||"Error",message:String((t=e.message)!=null?t:""),...e.stack&&{stack:String(e.stack)}};if(typeof e=="string")return{name:"Error",message:e};if(e&&typeof e=="object"){let r=e;return{name:typeof r.name=="string"&&r.name||"Error",message:typeof r.message=="string"&&r.message||(()=>{try{return JSON.stringify(e)}catch(a){return String(e)}})(),...typeof r.stack=="string"&&{stack:r.stack}}}return{name:"Error",message:String(e)}}function $n(e,t){var n;let r=((n=e.stack)!=null?n:"").split(`
2700
2742
  `).slice(0,4).join(`
2701
- `),a=e.message.slice(0,30);return`${e.name}:${a}|${t}|${r}`}function Fn(e,t){return e.length<=t?e:e.slice(0,Math.max(0,t-1))+"\u2026"}function Eo(e,t={}){let r={...zn,...t};if(!r.enabled||typeof window=="undefined")return e;let a=e;if(a._errorTrackingArmed)return e;a._errorTrackingArmed=!0;let n=new Set,i=new Map,s=[];function l(p,g){if(r.globalRatePerMinute>0){let w=g-6e4;for(;s.length>0&&s[0]<w;)s.shift();if(s.length>=r.globalRatePerMinute)return!1}if(r.maxDistinctFingerprints>0&&!i.has(p)&&i.size>=r.maxDistinctFingerprints)return!1;if(r.perFingerprintCooldownMs<=0)return s.push(g),!0;let y=i.get(p);if(y!==void 0&&g-y<r.perFingerprintCooldownMs)return!1;let C=256,x=192;if(i.size>C){let w=g-r.perFingerprintCooldownMs*2;for(let[q,z]of i)z<w&&i.delete(q);if(i.size>C){let q=i.size-x,z=0;for(let k of i.keys()){if(z>=q)break;i.delete(k),z++}}}return s.push(g),!0}async function d(p){if(r.sampleRate<1&&Math.random()>=r.sampleRate)return;let g=Bn(p,window.location.pathname);if(n.has(g))return;let y=Date.now();if(!l(g,y))return;i.set(g,y);let C=Fn(p.message?`${p.name}: ${p.message}`:p.name,r.maxDescriptionLen);n.add(g);try{await a.submit({description:C,feedback_type:"bug",severity:"high",synthetic:!0})}catch(x){}finally{n.delete(g)}}function c(p){var y;let g=(y=p.error)!=null?y:{name:"Error",message:p.message,stack:`at ${p.filename}:${p.lineno}:${p.colno}`};d(Po(g))}function f(p){d(Po(p.reason))}window.addEventListener("error",c),window.addEventListener("unhandledrejection",f);let u=a.shutdown.bind(a);return a.shutdown=()=>{window.removeEventListener("error",c),window.removeEventListener("unhandledrejection",f),i.clear(),u()},e}function In(e){let{errorTracking:t,...r}=e,a=qo(r);return t!==!1&&Eo(a,typeof t=="object"?t:void 0),a}return Oo(Dn);})();
2743
+ `),a=e.message.slice(0,30);return`${e.name}:${a}|${t}|${r}`}function Kn(e,t){return e.length<=t?e:e.slice(0,Math.max(0,t-1))+"\u2026"}function Mo(e,t={}){let r={...Dn,...t};if(!r.enabled||typeof window=="undefined")return e;let a=e;if(a._errorTrackingArmed)return e;a._errorTrackingArmed=!0;let n=new Set,i=new Map,s=[];function l(p,g){if(r.globalRatePerMinute>0){let v=g-6e4;for(;s.length>0&&s[0]<v;)s.shift();if(s.length>=r.globalRatePerMinute)return!1}if(r.maxDistinctFingerprints>0&&!i.has(p)&&i.size>=r.maxDistinctFingerprints)return!1;if(r.perFingerprintCooldownMs<=0)return s.push(g),!0;let _=i.get(p);if(_!==void 0&&g-_<r.perFingerprintCooldownMs)return!1;let T=256,y=192;if(i.size>T){let v=g-r.perFingerprintCooldownMs*2;for(let[S,z]of i)z<v&&i.delete(S);if(i.size>T){let S=i.size-y,z=0;for(let w of i.keys()){if(z>=S)break;i.delete(w),z++}}}return s.push(g),!0}async function c(p){if(r.sampleRate<1&&Math.random()>=r.sampleRate)return;let g=$n(p,window.location.pathname);if(n.has(g))return;let _=Date.now();if(!l(g,_))return;i.set(g,_);let T=Kn(p.message?`${p.name}: ${p.message}`:p.name,r.maxDescriptionLen);n.add(g);try{await a.submit({description:T,feedback_type:"bug",severity:"high",synthetic:!0})}catch(y){}finally{n.delete(g)}}function d(p){var _;let g=(_=p.error)!=null?_:{name:"Error",message:p.message,stack:`at ${p.filename}:${p.lineno}:${p.colno}`};c(Ao(g))}function f(p){c(Ao(p.reason))}window.addEventListener("error",d),window.addEventListener("unhandledrejection",f);let u=a.shutdown.bind(a);return a.shutdown=()=>{window.removeEventListener("error",d),window.removeEventListener("unhandledrejection",f),i.clear(),u()},e}function On(e){let{errorTracking:t,...r}=e,a=qo(r);return t!==!1&&Mo(a,typeof t=="object"?t:void 0),a}return jo(Hn);})();
2702
2744
  //# sourceMappingURL=widget.min.js.map