@mhosaic/feedback 0.22.0 → 0.24.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.
package/dist/embed.min.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var MhosaicFeedback=(()=>{var xe=Object.defineProperty;var Nr=Object.getOwnPropertyDescriptor;var Or=Object.getOwnPropertyNames;var Wr=Object.prototype.hasOwnProperty;var jr=(e,t,r)=>t in e?xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var j=(e,t)=>()=>(e&&(t=e(e=0)),t);var dt=(e,t)=>{for(var r in t)xe(e,r,{get:t[r],enumerable:!0})},Ur=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Or(t))!Wr.call(e,n)&&n!==r&&xe(e,n,{get:()=>t[n],enumerable:!(a=Nr(t,n))||a.enumerable});return e};var Vr=e=>Ur(xe({},"__esModule",{value:!0}),e);var Oe=(e,t,r)=>jr(e,typeof t!="symbol"?t+"":t,r);function te(e,t){for(var r in t)e[r]=t[r];return e}function Ye(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function v(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?Te.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 Se(e,s,a,n,null)}function Se(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?++St:n,__i:-1,__u:0};return n==null&&I.vnode!=null&&I.vnode(i),i}function U(e){return e.children}function Ce(e,t){this.props=e,this.context=t}function de(e,t){if(t==null)return e.__?de(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"?de(e):null}function co(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=te({},t);i.__v=t.__v+1,I.vnode&&I.vnode(i),Xe(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?de(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,Mt(a,i,n),t.__e=t.__=null,i.__e!=r&&Et(i)}}function Et(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}),Et(e)}function xt(e){(!e.__d&&(e.__d=!0)&&oe.push(e)&&!Ee.__r++||_t!=I.debounceRendering)&&((_t=I.debounceRendering)||Ct)(Ee)}function Ee(){try{for(var e,t=1;oe.length;)oe.length>t&&oe.sort(Rt),e=oe.shift(),t=oe.length,co(e)}finally{oe.length=Ee.__r=0}}function Tt(e,t,r,a,n,i,s,l,u,c,m){var d,h,g,C,k,y,f,b=a&&a.__k||qe,p=t.length;for(u=po(r,t,b,u,p),d=0;d<p;d++)(g=r.__k[d])!=null&&(h=g.__i!=-1&&b[g.__i]||Re,g.__i=d,y=Xe(e,g,h,n,i,s,l,u,c,m),C=g.__e,g.ref&&h.ref!=g.ref&&(h.ref&&Je(h.ref,null,g),m.push(g.ref,g.__c||C,g)),k==null&&C!=null&&(k=C),(f=!!(4&g.__u))||h.__k===g.__k?(u=Pt(g,u,e,f),f&&h.__e&&(h.__e=null)):typeof g.type=="function"&&y!==void 0?u=y:C&&(u=C.nextSibling),g.__u&=-7);return r.__e=k,u}function po(e,t,r,a,n){var i,s,l,u,c,m=r.length,d=m,h=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]=Se(null,s,null,null,null):Pe(s)?s=e.__k[i]=Se(U,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Se(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,u=i+h,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=uo(s,r,u,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>m?h--:n<m&&h++),typeof s.type!="function"&&(s.__u|=4)):c!=u&&(c==u-1?h--:c==u+1?h++:(c>u?h--:h++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<m;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=de(l)),Lt(l,l));return a}function Pt(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=Pt(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=de(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function uo(e,t,r,a){var n,i,s,l=e.key,u=e.type,c=t[r],m=c!=null&&(2&c.__u)==0;if(c===null&&l==null||m&&l==c.key&&u==c.type)return r;if(a>(m?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&&u==c.type)return s}return-1}function wt(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||lo.test(t)?r:r+"px"}function we(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||wt(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||wt(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(qt,"$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]=Ge,e.addEventListener(t,i?Ue:je,i)):e.removeEventListener(t,i?Ue:je,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 kt(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[ke]==null)t[ke]=Ge++;else if(t[ke]<r[me])return;return r(I.event?I.event(t):t)}}}function Xe(e,t,r,a,n,i,s,l,u,c){var m,d,h,g,C,k,y,f,b,p,w,E,T,x,F,P=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(u=!!(32&r.__u),i=[l=t.__e=r.__e]),(m=I.__b)&&m(t);e:if(typeof P=="function")try{if(f=t.props,b=P.prototype&&P.prototype.render,p=(m=P.contextType)&&a[m.__c],w=m?p?p.props.value:m.__:a,r.__c?y=(d=t.__c=r.__c).__=d.__E:(b?t.__c=d=new P(f,w):(t.__c=d=new Ce(f,w),d.constructor=P,d.render=mo),p&&p.sub(d),d.state||(d.state={}),d.__n=a,h=d.__d=!0,d.__h=[],d._sb=[]),b&&d.__s==null&&(d.__s=d.state),b&&P.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=te({},d.__s)),te(d.__s,P.getDerivedStateFromProps(f,d.__s))),g=d.props,C=d.state,d.__v=t,h)b&&P.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),b&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(b&&P.getDerivedStateFromProps==null&&f!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(f,w),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(f,d.__s,w)===!1){t.__v!=r.__v&&(d.props=f,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(z){z&&(z.__=t)}),qe.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(f,d.__s,w),b&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,C,k)})}if(d.context=w,d.props=f,d.__P=e,d.__e=!1,E=I.__r,T=0,b)d.state=d.__s,d.__d=!1,E&&E(t),m=d.render(d.props,d.state,d.context),qe.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,E&&E(t),m=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++T<25);d.state=d.__s,d.getChildContext!=null&&(a=te(te({},a),d.getChildContext())),b&&!h&&d.getSnapshotBeforeUpdate!=null&&(k=d.getSnapshotBeforeUpdate(g,C)),x=m!=null&&m.type===U&&m.key==null?At(m.props.children):m,l=Tt(e,Pe(x)?x:[x],t,r,a,n,i,s,l,u,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),y&&(d.__E=d.__=null)}catch(z){if(t.__v=null,u||i!=null)if(z.then){for(t.__u|=u?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--;)Ye(i[F]);Ve(t)}else t.__e=r.__e,t.__k=r.__k,z.then||Ve(t);I.__e(z,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=fo(r.__e,t,r,a,n,i,s,u,c);return(m=I.diffed)&&m(t),128&t.__u?void 0:l}function Ve(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ve))}function Mt(e,t,r){for(var a=0;a<r.length;a++)Je(r[a],r[++a],r[++a]);I.__c&&I.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){I.__e(i,n.__v)}})}function At(e){return typeof e!="object"||e==null||e.__b>0?e:Pe(e)?e.map(At):te({},e)}function fo(e,t,r,a,n,i,s,l,u){var c,m,d,h,g,C,k,y=r.props||Re,f=t.props,b=t.type;if(b=="svg"?n="http://www.w3.org/2000/svg":b=="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==!!b&&(b?g.localName==b:g.nodeType==3)){e=g,i[c]=null;break}}if(e==null){if(b==null)return document.createTextNode(f);e=document.createElementNS(n,b,f.is&&f),l&&(I.__m&&I.__m(t,i),l=!1),i=null}if(b==null)y===f||l&&e.data==f||(e.data=f);else{if(i=i&&Te.call(e.childNodes),!l&&i!=null)for(y={},c=0;c<e.attributes.length;c++)y[(g=e.attributes[c]).name]=g.value;for(c in y)g=y[c],c=="dangerouslySetInnerHTML"?d=g:c=="children"||c in f||c=="value"&&"defaultValue"in f||c=="checked"&&"defaultChecked"in f||we(e,c,null,g,n);for(c in f)g=f[c],c=="children"?h=g:c=="dangerouslySetInnerHTML"?m=g:c=="value"?C=g:c=="checked"?k=g:l&&typeof g!="function"||y[c]===g||we(e,c,g,y[c],n);if(m)l||d&&(m.__html==d.__html||m.__html==e.innerHTML)||(e.innerHTML=m.__html),t.__k=[];else if(d&&(e.innerHTML=""),Tt(t.type=="template"?e.content:e,Pe(h)?h:[h],t,r,a,b=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&de(r,0),l,u),i!=null)for(c=i.length;c--;)Ye(i[c]);l||(c="value",b=="progress"&&C==null?e.removeAttribute("value"):C!=null&&(C!==e[c]||b=="progress"&&!C||b=="option"&&C!=y[c])&&we(e,c,C,y[c],n),c="checked",k!=null&&k!=e[c]&&we(e,c,k,y[c],n))}return e}function Je(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){I.__e(n,r)}}function Lt(e,t,r){var a,n;if(I.unmount&&I.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||Je(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){I.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&Lt(a[n],t,r||typeof e.type!="function");r||Ye(e.__e),e.__c=e.__=e.__e=void 0}function mo(e,t,r){return this.constructor(e,r)}function pe(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),I.__&&I.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Xe(t,e=(!a&&r||t).__k=v(U,null,[e]),n||Re,Re,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Te.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),Mt(i,e,s)}var Te,I,St,io,oe,_t,Ct,Rt,We,ke,me,qt,Ge,je,Ue,so,Re,qe,lo,Pe,Z=j(()=>{"use strict";Re={},qe=[],lo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Pe=Array.isArray;Te=qe.slice,I={__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}},St=0,io=function(e){return e!=null&&e.constructor===void 0},Ce.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=te({},this.state),typeof e=="function"&&(e=e(te({},r),this.props)),e&&te(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),xt(this))},Ce.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),xt(this))},Ce.prototype.render=U,oe=[],Ct=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Rt=function(e,t){return e.__v.__b-t.__v.__b},Ee.__r=0,We=Math.random().toString(8),ke="__d"+We,me="__a"+We,qt=/(PointerCapture)$|Capture$/i,Ge=0,je=kt(!1),Ue=kt(!0),so=0});function Ae(e,t){K.__h&&K.__h(H,e,be||t),be=0;var r=H.__H||(H.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function q(e){return be=1,bo(Nt,e)}function bo(e,t,r){var a=Ae(ue++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):Nt(void 0,t),function(l){var u=a.__N?a.__N[0]:a.__[0],c=a.t(u,l);u!==c&&(a.__N=[c,a.__[1]],a.__c.setState({}))}],a.__c=H,!H.__f)){var n=function(l,u,c){if(!a.__c.__H)return!0;var m=a.__c.__H.__.filter(function(h){return h.__c});if(m.every(function(h){return!h.__N}))return!i||i.call(this,l,u,c);var d=a.__c.props!==l;return m.some(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(d=!0)}}),i&&i.call(this,l,u,c)||d};H.__f=!0;var i=H.shouldComponentUpdate,s=H.componentWillUpdate;H.componentWillUpdate=function(l,u,c){if(this.__e){var m=i;i=void 0,n(l,u,c),i=m}s&&s.call(this,l,u,c)},H.shouldComponentUpdate=n}return a.__N||a.__}function $(e,t){var r=Ae(ue++,3);!K.__s&&rt(r.__H,t)&&(r.__=e,r.u=t,H.__H.__h.push(r))}function tt(e,t){var r=Ae(ue++,4);!K.__s&&rt(r.__H,t)&&(r.__=e,r.u=t,H.__h.push(r))}function N(e){return be=5,Y(function(){return{current:e}},[])}function Y(e,t){var r=Ae(ue++,7);return rt(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function ie(e,t){return be=8,Y(function(){return e},t)}function go(){for(var e;e=Qt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Me),t.__h.some(et),t.__h=[]}catch(r){t.__h=[],K.__e(r,e.__v)}}}function ho(e){var t,r=function(){clearTimeout(a),Kt&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);Kt&&(t=requestAnimationFrame(r))}function Me(e){var t=H,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),H=t}function et(e){var t=H;e.__c=e.__(),H=t}function rt(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function Nt(e,t){return typeof t=="function"?t(e):t}var ue,H,Ze,zt,be,Qt,K,Bt,Ft,It,$t,Dt,Ht,Kt,V=j(()=>{"use strict";Z();be=0,Qt=[],K=I,Bt=K.__b,Ft=K.__r,It=K.diffed,$t=K.__c,Dt=K.unmount,Ht=K.__;K.__b=function(e){H=null,Bt&&Bt(e)},K.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Ht&&Ht(e,t)},K.__r=function(e){Ft&&Ft(e),ue=0;var t=(H=e.__c).__H;t&&(Ze===H?(t.__h=[],H.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Me),t.__h.some(et),t.__h=[],ue=0)),Ze=H},K.diffed=function(e){It&&It(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Qt.push(t)!==1&&zt===K.requestAnimationFrame||((zt=K.requestAnimationFrame)||ho)(go)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Ze=H=null},K.__c=function(e,t){t.some(function(r){try{r.__h.some(Me),r.__h=r.__h.filter(function(a){return!a.__||et(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],K.__e(a,r.__v)}}),$t&&$t(e,t)},K.unmount=function(e){Dt&&Dt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Me(a)}catch(n){t=n}}),r.__H=void 0,t&&K.__e(t,r.__v))};Kt=typeof requestAnimationFrame=="function"});function dr(e){return e==="en"?ha:ga}var ga,ha,pr=j(()=>{"use strict";ga={"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."},ha={"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 at(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 va(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 fr(e,t){let r=ur(at(e)),a=null,n=-1;for(let i of t){let s=ur(i);if(!va(r,s))continue;let u=s.filter(c=>!c.startsWith(":")).length*100+s.length;u>n&&(a=i,n=u)}return a}var ur,nt=j(()=>{"use strict";ur=e=>e.split("/").filter(Boolean)});var mr,br=j(()=>{"use strict";mr=`
1
+ "use strict";var MhosaicFeedback=(()=>{var we=Object.defineProperty;var Vr=Object.getOwnPropertyDescriptor;var Gr=Object.getOwnPropertyNames;var Yr=Object.prototype.hasOwnProperty;var Xr=(e,t,r)=>t in e?we(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var V=(e,t)=>()=>(e&&(t=e(e=0)),t);var ft=(e,t)=>{for(var r in t)we(e,r,{get:t[r],enumerable:!0})},Jr=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Gr(t))!Yr.call(e,n)&&n!==r&&we(e,n,{get:()=>t[n],enumerable:!(a=Vr(t,n))||a.enumerable});return e};var Zr=e=>Jr(we({},"__esModule",{value:!0}),e);var We=(e,t,r)=>Xr(e,typeof t!="symbol"?t+"":t,r);function te(e,t){for(var r in t)e[r]=t[r];return e}function Xe(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?Te.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 Ce(e,s,a,n,null)}function Ce(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?++qt:n,__i:-1,__u:0};return n==null&&H.vnode!=null&&H.vnode(i),i}function G(e){return e.children}function Re(e,t){this.props=e,this.context=t}function de(e,t){if(t==null)return e.__?de(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"?de(e):null}function bo(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=te({},t);i.__v=t.__v+1,H.vnode&&H.vnode(i),Je(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?de(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,zt(a,i,n),t.__e=t.__=null,i.__e!=r&&Mt(i)}}function Mt(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}),Mt(e)}function St(e){(!e.__d&&(e.__d=!0)&&re.push(e)&&!Ee.__r++||kt!=H.debounceRendering)&&((kt=H.debounceRendering)||Pt)(Ee)}function Ee(){try{for(var e,t=1;re.length;)re.length>t&&re.sort(Et),e=re.shift(),t=re.length,bo(e)}finally{re.length=Ee.__r=0}}function At(e,t,r,a,n,i,s,l,p,c,u){var d,g,h,R,C,v,m,f=a&&a.__k||Pe,b=t.length;for(p=go(r,t,f,p,b),d=0;d<b;d++)(h=r.__k[d])!=null&&(g=h.__i!=-1&&f[h.__i]||qe,h.__i=d,v=Je(e,h,g,n,i,s,l,p,c,u),R=h.__e,h.ref&&g.ref!=h.ref&&(g.ref&&Ze(g.ref,null,h),u.push(h.ref,h.__c||R,h)),C==null&&R!=null&&(C=R),(m=!!(4&h.__u))||g.__k===h.__k?(p=Lt(h,p,e,m),m&&g.__e&&(g.__e=null)):typeof h.type=="function"&&v!==void 0?p=v:R&&(p=R.nextSibling),h.__u&=-7);return r.__e=C,p}function go(e,t,r,a,n){var i,s,l,p,c,u=r.length,d=u,g=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]=Ce(null,s,null,null,null):Me(s)?s=e.__k[i]=Ce(G,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Ce(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,p=i+g,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=ho(s,r,p,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>u?g--:n<u&&g++),typeof s.type!="function"&&(s.__u|=4)):c!=p&&(c==p-1?g--:c==p+1?g++:(c>p?g--:g++,s.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<u;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=de(l)),Ft(l,l));return a}function Lt(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=Lt(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=de(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function ho(e,t,r,a){var n,i,s,l=e.key,p=e.type,c=t[r],u=c!=null&&(2&c.__u)==0;if(c===null&&l==null||u&&l==c.key&&p==c.type)return r;if(a>(u?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&&p==c.type)return s}return-1}function Ct(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||mo.test(t)?r:r+"px"}function ke(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||Ct(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||Ct(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Tt,"$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[be]=a[be]:(r[be]=Ye,e.addEventListener(t,i?Ve:Ue,i)):e.removeEventListener(t,i?Ve:Ue,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 Rt(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[Se]==null)t[Se]=Ye++;else if(t[Se]<r[be])return;return r(H.event?H.event(t):t)}}}function Je(e,t,r,a,n,i,s,l,p,c){var u,d,g,h,R,C,v,m,f,b,q,w,E,x,D,L=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(p=!!(32&r.__u),i=[l=t.__e=r.__e]),(u=H.__b)&&u(t);e:if(typeof L=="function")try{if(m=t.props,f=L.prototype&&L.prototype.render,b=(u=L.contextType)&&a[u.__c],q=u?b?b.props.value:u.__:a,r.__c?v=(d=t.__c=r.__c).__=d.__E:(f?t.__c=d=new L(m,q):(t.__c=d=new Re(m,q),d.constructor=L,d.render=yo),b&&b.sub(d),d.state||(d.state={}),d.__n=a,g=d.__d=!0,d.__h=[],d._sb=[]),f&&d.__s==null&&(d.__s=d.state),f&&L.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=te({},d.__s)),te(d.__s,L.getDerivedStateFromProps(m,d.__s))),h=d.props,R=d.state,d.__v=t,g)f&&L.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),f&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(f&&L.getDerivedStateFromProps==null&&m!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(m,q),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(m,d.__s,q)===!1){t.__v!=r.__v&&(d.props=m,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(T){T&&(T.__=t)}),Pe.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(m,d.__s,q),f&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,R,C)})}if(d.context=q,d.props=m,d.__P=e,d.__e=!1,w=H.__r,E=0,f)d.state=d.__s,d.__d=!1,w&&w(t),u=d.render(d.props,d.state,d.context),Pe.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,w&&w(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++E<25);d.state=d.__s,d.getChildContext!=null&&(a=te(te({},a),d.getChildContext())),f&&!g&&d.getSnapshotBeforeUpdate!=null&&(C=d.getSnapshotBeforeUpdate(h,R)),x=u!=null&&u.type===G&&u.key==null?Bt(u.props.children):u,l=At(e,Me(x)?x:[x],t,r,a,n,i,s,l,p,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),v&&(d.__E=d.__=null)}catch(T){if(t.__v=null,p||i!=null)if(T.then){for(t.__u|=p?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(D=i.length;D--;)Xe(i[D]);Ge(t)}else t.__e=r.__e,t.__k=r.__k,T.then||Ge(t);H.__e(T,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=vo(r.__e,t,r,a,n,i,s,p,c);return(u=H.diffed)&&u(t),128&t.__u?void 0:l}function Ge(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Ge))}function zt(e,t,r){for(var a=0;a<r.length;a++)Ze(r[a],r[++a],r[++a]);H.__c&&H.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){H.__e(i,n.__v)}})}function Bt(e){return typeof e!="object"||e==null||e.__b>0?e:Me(e)?e.map(Bt):te({},e)}function vo(e,t,r,a,n,i,s,l,p){var c,u,d,g,h,R,C,v=r.props||qe,m=t.props,f=t.type;if(f=="svg"?n="http://www.w3.org/2000/svg":f=="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((h=i[c])&&"setAttribute"in h==!!f&&(f?h.localName==f:h.nodeType==3)){e=h,i[c]=null;break}}if(e==null){if(f==null)return document.createTextNode(m);e=document.createElementNS(n,f,m.is&&m),l&&(H.__m&&H.__m(t,i),l=!1),i=null}if(f==null)v===m||l&&e.data==m||(e.data=m);else{if(i=i&&Te.call(e.childNodes),!l&&i!=null)for(v={},c=0;c<e.attributes.length;c++)v[(h=e.attributes[c]).name]=h.value;for(c in v)h=v[c],c=="dangerouslySetInnerHTML"?d=h:c=="children"||c in m||c=="value"&&"defaultValue"in m||c=="checked"&&"defaultChecked"in m||ke(e,c,null,h,n);for(c in m)h=m[c],c=="children"?g=h:c=="dangerouslySetInnerHTML"?u=h:c=="value"?R=h:c=="checked"?C=h:l&&typeof h!="function"||v[c]===h||ke(e,c,h,v[c],n);if(u)l||d&&(u.__html==d.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=""),At(t.type=="template"?e.content:e,Me(g)?g:[g],t,r,a,f=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&de(r,0),l,p),i!=null)for(c=i.length;c--;)Xe(i[c]);l||(c="value",f=="progress"&&R==null?e.removeAttribute("value"):R!=null&&(R!==e[c]||f=="progress"&&!R||f=="option"&&R!=v[c])&&ke(e,c,R,v[c],n),c="checked",C!=null&&C!=e[c]&&ke(e,c,C,v[c],n))}return e}function Ze(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){H.__e(n,r)}}function Ft(e,t,r){var a,n;if(H.unmount&&H.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||Ze(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){H.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&Ft(a[n],t,r||typeof e.type!="function");r||Xe(e.__e),e.__c=e.__=e.__e=void 0}function yo(e,t,r){return this.constructor(e,r)}function pe(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),H.__&&H.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Je(t,e=(!a&&r||t).__k=_(G,null,[e]),n||qe,qe,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Te.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),zt(i,e,s)}var Te,H,qt,uo,re,kt,Pt,Et,je,Se,be,Tt,Ye,Ue,Ve,fo,qe,Pe,mo,Me,Z=V(()=>{"use strict";qe={},Pe=[],mo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Me=Array.isArray;Te=Pe.slice,H={__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}},qt=0,uo=function(e){return e!=null&&e.constructor===void 0},Re.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=te({},this.state),typeof e=="function"&&(e=e(te({},r),this.props)),e&&te(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),St(this))},Re.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),St(this))},Re.prototype.render=G,re=[],Pt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Et=function(e,t){return e.__v.__b-t.__v.__b},Ee.__r=0,je=Math.random().toString(8),Se="__d"+je,be="__a"+je,Tt=/(PointerCapture)$|Capture$/i,Ye=0,Ue=Rt(!1),Ve=Rt(!0),fo=0});function Le(e,t){W.__h&&W.__h(O,e,ge||t),ge=0;var r=O.__H||(O.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function P(e){return ge=1,_o(jt,e)}function _o(e,t,r){var a=Le(ue++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):jt(void 0,t),function(l){var p=a.__N?a.__N[0]:a.__[0],c=a.t(p,l);p!==c&&(a.__N=[c,a.__[1]],a.__c.setState({}))}],a.__c=O,!O.__f)){var n=function(l,p,c){if(!a.__c.__H)return!0;var u=a.__c.__H.__.filter(function(g){return g.__c});if(u.every(function(g){return!g.__N}))return!i||i.call(this,l,p,c);var d=a.__c.props!==l;return u.some(function(g){if(g.__N){var h=g.__[0];g.__=g.__N,g.__N=void 0,h!==g.__[0]&&(d=!0)}}),i&&i.call(this,l,p,c)||d};O.__f=!0;var i=O.shouldComponentUpdate,s=O.componentWillUpdate;O.componentWillUpdate=function(l,p,c){if(this.__e){var u=i;i=void 0,n(l,p,c),i=u}s&&s.call(this,l,p,c)},O.shouldComponentUpdate=n}return a.__N||a.__}function N(e,t){var r=Le(ue++,3);!W.__s&&ot(r.__H,t)&&(r.__=e,r.u=t,O.__H.__h.push(r))}function rt(e,t){var r=Le(ue++,4);!W.__s&&ot(r.__H,t)&&(r.__=e,r.u=t,O.__h.push(r))}function j(e){return ge=5,Y(function(){return{current:e}},[])}function Y(e,t){var r=Le(ue++,7);return ot(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function ie(e,t){return ge=8,Y(function(){return e},t)}function xo(){for(var e;e=Wt.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ae),t.__h.some(tt),t.__h=[]}catch(r){t.__h=[],W.__e(r,e.__v)}}}function wo(e){var t,r=function(){clearTimeout(a),Ot&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);Ot&&(t=requestAnimationFrame(r))}function Ae(e){var t=O,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),O=t}function tt(e){var t=O;e.__c=e.__(),O=t}function ot(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function jt(e,t){return typeof t=="function"?t(e):t}var ue,O,et,It,ge,Wt,W,$t,Ht,Dt,Kt,Nt,Qt,Ot,X=V(()=>{"use strict";Z();ge=0,Wt=[],W=H,$t=W.__b,Ht=W.__r,Dt=W.diffed,Kt=W.__c,Nt=W.unmount,Qt=W.__;W.__b=function(e){O=null,$t&&$t(e)},W.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Qt&&Qt(e,t)},W.__r=function(e){Ht&&Ht(e),ue=0;var t=(O=e.__c).__H;t&&(et===O?(t.__h=[],O.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Ae),t.__h.some(tt),t.__h=[],ue=0)),et=O},W.diffed=function(e){Dt&&Dt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Wt.push(t)!==1&&It===W.requestAnimationFrame||((It=W.requestAnimationFrame)||wo)(xo)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),et=O=null},W.__c=function(e,t){t.some(function(r){try{r.__h.some(Ae),r.__h=r.__h.filter(function(a){return!a.__||tt(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],W.__e(a,r.__v)}}),Kt&&Kt(e,t)},W.unmount=function(e){Nt&&Nt(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Ae(a)}catch(n){t=n}}),r.__H=void 0,t&&W.__e(t,r.__v))};Ot=typeof requestAnimationFrame=="function"});function br(e){return e==="en"?ka:wa}var wa,ka,gr=V(()=>{"use strict";wa={"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."},ka={"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 st(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 Sa(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 vr(e,t){let r=hr(st(e)),a=null,n=-1;for(let i of t){let s=hr(i);if(!Sa(r,s))continue;let p=s.filter(c=>!c.startsWith(":")).length*100+s.length;p>n&&(a=i,n=p)}return a}var hr,lt=V(()=>{"use strict";hr=e=>e.split("/").filter(Boolean)});var yr,_r=V(()=>{"use strict";yr=`
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 he(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function ae(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function Fe(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function Ie(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 $e(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var ge,gr,hr,vr,yr,De=j(()=>{"use strict";ge={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},gr={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},hr={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},vr={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},yr={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function _r({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[gr[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return v("div",{class:"qa-pastille"},v("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${ge[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},v("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},v("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 xr=j(()=>{"use strict";Z();De()});function ve({dev:e,bot:t,human:r,strings:a}){return v("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},v("span",{class:`qa-lanes__icon qa-lane ${it[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},v("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},v("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"}))),v("span",{class:`qa-lanes__icon qa-lane ${it[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},v("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"},v("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),v("path",{d:"M12 4.5v4"}),v("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),v("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),v("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),v("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),v("span",{class:`qa-lanes__icon qa-lane ${it[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},v("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"},v("circle",{cx:"12",cy:"8",r:"3.6"}),v("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var it,st=j(()=>{"use strict";Z();it={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function ya(e){return{dev:ae(e.dev),bot:he(e.automated),human:ae(e.client)}}function _a(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",u=(i=t.get(l))!=null?i:[];u.push(s),t.set(l,u)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var u,c,m;let l=t.get(s);return{key:s,label:(m=(c=(u=l[0])==null?void 0:u.group)==null?void 0:c.label)!=null?m:"",scenarios:l}})}function wr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function kr({scenario:e,strings:t}){let r=ya(e),a=e.automated.provenance;return v("li",{class:"qa-row","data-testid":"qa-scenario-row"},v("span",{class:"qa-row__title"},e.priority?v("span",{class:`qa-tag ${hr[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,v("span",{class:"qa-row__name"},e.title),e.source==="testgen"?v("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?v("span",{class:"qa-tag"},t[vr[e.caseStatus]]):null,e.grounding?v("span",{class:"qa-tag"},t[yr[e.grounding]]):null,a?v("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),v(ve,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function Sr({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=q(new Set),s=m=>{i(d=>{let h=new Set(d);return h.has(m)?h.delete(m):h.add(m),h})},l=wr(a["panel.freshness"],{date:Ie(r.generated_at),version:$e(r.app_version),env:r.environment}),u;if(t==="no-tests")u=v("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")u=v("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let m=(c=e==null?void 0:e.scenarios)!=null?c:[],d=m.some(h=>h.group);if(m.length===0)u=v("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!d)u=v("ul",{class:"qa-panel__list"},m.map(h=>v(kr,{key:h.id,scenario:h,strings:a})));else{let h=_a(m);u=v("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},h.map(g=>{let C=n.has(g.key),k={dev:Fe(g.scenarios.map(y=>ae(y.dev))),bot:Fe(g.scenarios.map(y=>he(y.automated))),human:Fe(g.scenarios.map(y=>ae(y.client)))};return v("li",{key:g.key,class:"qa-suite","data-testid":"qa-panel-group"},v("button",{type:"button",class:"qa-suite__head","aria-expanded":C,"data-testid":"qa-suite-group",onClick:()=>s(g.key)},v("span",{class:`qa-suite__chev ${C?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),v("span",{class:"qa-suite__key"},g.key),v("span",{class:"qa-suite__label"},g.label),v("span",{class:"qa-suite__count"},wr(a["suite.cases"],{count:g.scenarios.length})),v(ve,{dev:k.dev,bot:k.bot,human:k.human,strings:a})),C?v("ul",{class:"qa-suite__list"},g.scenarios.map(y=>v(kr,{key:y.id,scenario:y,strings:a}))):null)}))}}return v("section",{class:"qa-panel","data-testid":"qa-panel"},u,v("footer",{class:"qa-panel__foot"},v("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var Cr=j(()=>{"use strict";Z();V();st();De()});function xa(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,u;for(let c of(l=t.get(i))!=null?l:[]){let m=(u=t.get(c.id))!=null?u:[];r.push({node:c,depth:s,hasChildren:m.length>0}),m.length>0&&a(c.id,s+1)}};return a(null,0),r}function wa(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let u=(a=l.external_key)!=null?a:l.id,c=(n=t.get(u))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let m of(i=l.pages)!=null?i:[])(m.role==="primary"?c.primaries:c.traversed).add(m.pattern);t.set(u,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var m,d,h,g;let u=(d=(m=s.scenario.group)==null?void 0:m.key)!=null?d:"~",c=(g=(h=l.scenario.group)==null?void 0:h.key)!=null?g:"~";return u!==c?u.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function Rr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function qr(e){return`${Math.round(e)}%`}function Er({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=q("pages"),[s,l]=q("");$(()=>{let y=f=>{f.key==="Escape"&&a()};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[a]);let u=t?at(t):null,c=Y(()=>xa(e.sitemap),[e]),m=Y(()=>wa(e),[e]),d=Y(()=>{let y=new Map;for(let f of e.sitemap)y.set(f.path_pattern,f.title);return y},[e]),h=y=>{var f;return(f=d.get(y))!=null?f:y},g=s.trim().toLowerCase(),C=g?m.filter(y=>{var f,b;return y.scenario.title.toLowerCase().includes(g)||((b=(f=y.scenario.group)==null?void 0:f.label)!=null?b:"").toLowerCase().includes(g)}):m,k=Rr(r["panel.freshness"],{date:Ie(e.generated_at),version:$e(e.app_version),env:e.environment});return v("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:y=>{y.target===y.currentTarget&&a()}},v("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},v("header",{class:"qa-modal__head"},v("h3",null,r["modal.title"]),v("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),v("div",{class:"qa-modal__freshness"},k),v("div",{class:"qa-kpi","data-testid":"qa-kpi"},v("div",{class:"qa-kpi__item"},v("span",{class:"qa-kpi__value"},qr(e.metric.pages_with_scenarios_pct)),v("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),v("div",{class:"qa-kpi__item"},v("span",{class:"qa-kpi__value"},qr(e.metric.scenarios_passing_pct)),v("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),v("nav",{class:"qa-tabs"},v("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),v("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),v("div",{class:"qa-modal__body"},n==="pages"?v("ul",{class:"qa-tree"},c.map(y=>{let f=u!==null&&y.node.path_pattern===u;return v("li",{key:y.node.id,class:`qa-tree__row ${f?"qa-tree__row--here":""}`,"data-testid":f?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+y.depth*1.1}rem`}},v("span",{class:`qa-dot ${ge[y.node.color]}`,"aria-hidden":"true"}),v("span",{class:`qa-tree__title ${y.node.structural?"qa-tree__title--structural":""}`},y.node.title||y.node.path_pattern),f?v("span",{class:"qa-tree__here"},` ${y.node.path_pattern} `):null,f?v("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,v("span",{class:"qa-tree__count"},String(y.node.counts.scenarios)))})):v("div",{class:"qa-scenarios"},v("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:y=>l(y.target.value)}),C.length===0?v("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):v("ul",{class:"qa-scenarios__list"},C.map(y=>{var w,E;let f=y.scenario,b={dev:ae(f.dev),bot:he(f.automated),human:ae(f.client)},p=[...y.traversed].map(h);return v("li",{key:(w=f.external_key)!=null?w:f.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},v("div",{class:"qa-scenarios__line"},v("span",{class:`qa-dot ${ge[f.color]}`,"aria-hidden":"true"}),(E=f.group)!=null&&E.key?v("span",{class:"qa-suitekey"},f.group.key):null,v("span",{class:"qa-scenarios__title"},f.title),f.source==="testgen"?v("span",{class:"qa-tag"},r["source.testgen"]):null,v(ve,{dev:b.dev,bot:b.bot,human:b.human,strings:r})),v("div",{class:"qa-scenarios__pages"},y.primaries.size?v("span",{class:"qa-scenarios__primary"},Rr(r["modal.appliesTo"],{count:y.primaries.size})):null,p.length?v("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${p.join(", ")}`):null))}))))))}var Tr=j(()=>{"use strict";Z();V();st();nt();De()});function ka(){if(He++,Ke)return;Ke=!0,ye=history.pushState,_e=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(lt))};history.pushState=function(...r){let a=ye.apply(this,r);return e(),a},history.replaceState=function(...r){let a=_e.apply(this,r);return e(),a}}function Sa(){He>0&&He--,!(He>0||!Ke)&&(Ke=!1,ye&&(history.pushState=ye),_e&&(history.replaceState=_e),ye=null,_e=null)}function Pr(e){return typeof e=="object"&&e!==null&&e.format===Ca}function Ar(){Mr||(Mr=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function qa(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 Ta(e,t){if(!e||!t)return Ea;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 Lr(e){var x,F,P,z;let{source:t}=e,r=dr((x=e.locale)!=null?x:"fr"),a=typeof t=="object"?t:null;if(a&&!Pr(a))return Ar(),Ra;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(Q=>Q.json()):Promise.resolve(t)).then(Q=>{Pr(Q)?(n=Q,h()):Ar()}).catch(()=>{})}let u=document.createElement("div");u.setAttribute("data-mqa-host",""),u.setAttribute("data-mqa-size",(F=e.size)!=null?F:"md"),((P=e.position)==null?void 0:P.right)!==void 0&&u.style.setProperty("--mqa-right",`${e.position.right}px`),((z=e.position)==null?void 0:z.bottom)!==void 0&&u.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(u);let c=u.attachShadow({mode:"open"}),m=document.createElement("style");m.textContent=mr,c.appendChild(m);let d=document.createElement("div");c.appendChild(d);let h=()=>{};function g(){return e.getCurrentPage?e.getCurrentPage():n?fr(window.location.pathname,qa(n)):null}function C(){let[D,Q]=q(0),O=ie(()=>Q(B=>B+1),[]);h=O;let M=Ta(n,g()),X=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},W=ie(()=>{l()},[]),re=ie(()=>{l(),k=!0,O()},[]),S=ie(()=>{k=!1,O()},[]);return $(()=>{let B=()=>O();return window.addEventListener("popstate",B),window.addEventListener(lt,B),()=>{window.removeEventListener("popstate",B),window.removeEventListener(lt,B)}},[]),v("div",{class:"qa-pastille-wrap",onMouseEnter:p,onMouseLeave:w},y?v("div",{class:"qa-panel-anchor"},v(Sr,{page:M.page,state:M.state,meta:X,strings:r})):null,v(_r,{color:M.color,state:M.state,strings:r,onHover:()=>{p(),y=!0,W(),O()},onOpenModal:re}),k&&n?v(Er,{artifact:n,currentPattern:M.pattern,strings:r,onClose:S}):null)}let k=!1,y=!1,f=null,b=140;function p(){f!==null&&(clearTimeout(f),f=null)}function w(){p(),f=setTimeout(()=>{f=null,!T&&(y=!1,h())},b)}function E(){pe(v(C,{}),d)}E(),ka();let T=!1;return{open(){T||(l(),k=!0,h())},close(){T||(k=!1,h())},dispose(){T||(T=!0,p(),pe(null,d),u.remove(),Sa())}}}var lt,Ke,He,ye,_e,Ca,Mr,Ra,Ea,zr=j(()=>{"use strict";Z();V();pr();nt();br();xr();Cr();Tr();lt="mqa:locationchange",Ke=!1,He=0,ye=null,_e=null;Ca=1;Mr=!1;Ra={open(){},close(){},dispose(){}};Ea={state:"unknown-page",color:"gray",pattern:null,page:null}});var Br={};dt(Br,{createQaMeter:()=>Pa});function Pa(e){return Lr(e)}var Fr=j(()=>{"use strict";zr()});var za={};dt(za,{configFromDataset:()=>Kr});var Gr=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function Yr(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.`)}function pt(e){var k,y;let t=((k=e.endpoint)!=null?k:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');Yr(t);let r=(y=e.fetch)!=null?y:globalThis.fetch;async function a(f){var x,F,P;let b=f;if(e.beforeSend&&(b=await e.beforeSend(f)),b===!1)throw new Error("Submission cancelled by beforeSend");let p=new FormData;for(let z of Gr)p.append(z,String(b[z]));p.append("technical_context",JSON.stringify(b.technical_context)),b.screenshot&&p.append("screenshot",b.screenshot,"screenshot.png"),b.synthetic&&p.append("synthetic","true"),(x=b.user)!=null&&x.id&&p.append("user",JSON.stringify(b.user)),b.widget_version&&p.append("widget_version",b.widget_version);let w={Authorization:`Bearer ${e.apiKey}`};b.synthetic&&(w["X-Mhosaic-Capture-Source"]="error-tracking");let E=(F=e.getSignedIdentity)==null?void 0:F.call(e);E&&E.userHash&&E.exp&&((P=b.user)!=null&&P.id)&&(w["X-Mhosaic-User"]=String(b.user.id),w["X-Mhosaic-User-Hmac"]=E.userHash,w["X-Mhosaic-User-Exp"]=String(E.exp),E.email&&(w["X-Mhosaic-User-Email"]=E.email));let T=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:w,body:p});if(!T.ok){let z=await T.text().catch(()=>"");throw new Error(`Feedback submit failed: ${T.status} ${z}`)}return T.json()}function n(f){var w;let b={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":f},p=(w=e.getSignedIdentity)==null?void 0:w.call(e);return p&&p.userHash&&p.exp&&(b["X-Mhosaic-User-Hmac"]=p.userHash,b["X-Mhosaic-User-Exp"]=String(p.exp),p.email&&(b["X-Mhosaic-User-Email"]=p.email)),b}async function i(f){let b=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(f)});if(b.status===404)return[];if(!b.ok){let p=await b.text().catch(()=>"");throw new Error(`listMine failed: ${b.status} ${p}`)}return b.json()}async function s(f){let b=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(f)});if(b.status===404)return[];if(!b.ok){let p=await b.text().catch(()=>"");throw new Error(`listChangelog failed: ${b.status} ${p}`)}return b.json()}async function l(f,b){let p=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"GET",headers:n(b)});if(!p.ok){let w=await p.text().catch(()=>"");throw new Error(`getReport failed: ${p.status} ${w}`)}return p.json()}async function u(f,b,p,w){let E=await r(`${t}/api/feedback/v1/reports/widget/${f}/comments/`,{method:"POST",headers:{...n(b),"Content-Type":"application/json"},body:JSON.stringify({body:p,...w!==void 0&&{client_nonce:w}})});if(!E.ok){let T=await E.text().catch(()=>"");throw new Error(`addComment failed: ${E.status} ${T}`)}return E.json()}async function c(f,b){let p=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"PATCH",headers:{...n(b),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!p.ok){let w=await p.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${p.status} ${w}`)}return p.json()}async function m(f,b){let p=await r(`${t}/api/feedback/v1/reports/widget/${f}/`,{method:"PATCH",headers:{...n(b),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!p.ok){let w=await p.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${p.status} ${w}`)}return p.json()}function d(f){var w,E,T;if(!f)return"";let b=new URLSearchParams;(w=f.status)==null||w.forEach(x=>b.append("status",x)),(E=f.type)==null||E.forEach(x=>b.append("type",x)),(T=f.severity)==null||T.forEach(x=>b.append("severity",x)),f.q&&b.set("q",f.q),f.mine&&b.set("mine","1"),f.ordering&&b.set("ordering",f.ordering),f.page&&f.page>1&&b.set("page",String(f.page));let p=b.toString();return p?`?${p}`:""}async function h(f,b){let p=await r(`${t}/api/feedback/v1/reports/widget/board/${d(b)}`,{method:"GET",headers:n(f)});if(p.status===404)return{count:0,next:null,previous:null,results:[]};if(!p.ok){let w=await p.text().catch(()=>"");throw new Error(`listBoard failed: ${p.status} ${w}`)}return p.json()}async function g(f,b){let p=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${d(b)}`,{method:"GET",headers:n(f)});if(p.status===404)return{total:0,by_status:{},resolution_rate:0,scope:"mine"};if(!p.ok){let w=await p.text().catch(()=>"");throw new Error(`fetchBoardKpis failed: ${p.status} ${w}`)}return p.json()}async function C(f,b){let p=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(f),"Content-Type":"application/json"},body:JSON.stringify({external_id:f,...b?{email:b}:{}})});if(!p.ok)throw new Error(`checkVisibility failed: ${p.status}`);return!!(await p.json()).show}return{submitReport:a,checkVisibility:C,listMine:i,listChangelog:s,getReport:l,addComment:u,closeAsResolved:c,reopenUnresolved:m,listBoard:h,fetchBoardKpis:g}}var Xr=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Jr=[/^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 Zr(e){return Jr.some(t=>t.test(e))}function ne(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)=>{Xr.test(l)||Zr(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 eo=[/\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 G(e){let t=e;for(let r of eo)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?ne(a):void 0,i=ne(window.location.pathname+window.location.search),s;try{let u=new URL(i,window.location.origin);s=u.pathname+u.search}catch(u){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:G(document.title||"").slice(0,200),pathname:s}}function to(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 ft(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(to).join(" "),u=G(l).slice(0,2e3),c={level:a,message:u,ts:Date.now()};if(a==="error"){let m=new Error().stack;m&&(c.stack=m.split(`
616
+ `});function ve(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function oe(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function Ie(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function $e(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 He(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var he,xr,wr,kr,Sr,De=V(()=>{"use strict";he={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},xr={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},wr={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},kr={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},Sr={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function Cr({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[xr[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 ${he[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 Rr=V(()=>{"use strict";Z();De()});function ye({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 ${ct[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 ${ct[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 ${ct[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 ct,dt=V(()=>{"use strict";Z();ct={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function Ca(e){return{dev:oe(e.dev),bot:ve(e.automated),human:oe(e.client)}}function Ra(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",p=(i=t.get(l))!=null?i:[];p.push(s),t.set(l,p)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var p,c,u;let l=t.get(s);return{key:s,label:(u=(c=(p=l[0])==null?void 0:p.group)==null?void 0:c.label)!=null?u:"",scenarios:l}})}function qr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function Pr({scenario:e,strings:t}){let r=Ca(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 ${wr[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[kr[e.caseStatus]]):null,e.grounding?_("span",{class:"qa-tag"},t[Sr[e.grounding]]):null,a?_("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),_(ye,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function Er({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=P(new Set),s=u=>{i(d=>{let g=new Set(d);return g.has(u)?g.delete(u):g.add(u),g})},l=qr(a["panel.freshness"],{date:$e(r.generated_at),version:He(r.app_version),env:r.environment}),p;if(t==="no-tests")p=_("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")p=_("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let u=(c=e==null?void 0:e.scenarios)!=null?c:[],d=u.some(g=>g.group);if(u.length===0)p=_("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!d)p=_("ul",{class:"qa-panel__list"},u.map(g=>_(Pr,{key:g.id,scenario:g,strings:a})));else{let g=Ra(u);p=_("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},g.map(h=>{let R=n.has(h.key),C={dev:Ie(h.scenarios.map(v=>oe(v.dev))),bot:Ie(h.scenarios.map(v=>ve(v.automated))),human:Ie(h.scenarios.map(v=>oe(v.client)))};return _("li",{key:h.key,class:"qa-suite","data-testid":"qa-panel-group"},_("button",{type:"button",class:"qa-suite__head","aria-expanded":R,"data-testid":"qa-suite-group",onClick:()=>s(h.key)},_("span",{class:`qa-suite__chev ${R?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),_("span",{class:"qa-suite__key"},h.key),_("span",{class:"qa-suite__label"},h.label),_("span",{class:"qa-suite__count"},qr(a["suite.cases"],{count:h.scenarios.length})),_(ye,{dev:C.dev,bot:C.bot,human:C.human,strings:a})),R?_("ul",{class:"qa-suite__list"},h.scenarios.map(v=>_(Pr,{key:v.id,scenario:v,strings:a}))):null)}))}}return _("section",{class:"qa-panel","data-testid":"qa-panel"},p,_("footer",{class:"qa-panel__foot"},_("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var Tr=V(()=>{"use strict";Z();X();dt();De()});function qa(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,p;for(let c of(l=t.get(i))!=null?l:[]){let u=(p=t.get(c.id))!=null?p:[];r.push({node:c,depth:s,hasChildren:u.length>0}),u.length>0&&a(c.id,s+1)}};return a(null,0),r}function Pa(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let p=(a=l.external_key)!=null?a:l.id,c=(n=t.get(p))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let u of(i=l.pages)!=null?i:[])(u.role==="primary"?c.primaries:c.traversed).add(u.pattern);t.set(p,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var u,d,g,h;let p=(d=(u=s.scenario.group)==null?void 0:u.key)!=null?d:"~",c=(h=(g=l.scenario.group)==null?void 0:g.key)!=null?h:"~";return p!==c?p.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function Mr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function Ar(e){return`${Math.round(e)}%`}function Lr({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=P("pages"),[s,l]=P("");N(()=>{let v=m=>{m.key==="Escape"&&a()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[a]);let p=t?st(t):null,c=Y(()=>qa(e.sitemap),[e]),u=Y(()=>Pa(e),[e]),d=Y(()=>{let v=new Map;for(let m of e.sitemap)v.set(m.path_pattern,m.title);return v},[e]),g=v=>{var m;return(m=d.get(v))!=null?m:v},h=s.trim().toLowerCase(),R=h?u.filter(v=>{var m,f;return v.scenario.title.toLowerCase().includes(h)||((f=(m=v.scenario.group)==null?void 0:m.label)!=null?f:"").toLowerCase().includes(h)}):u,C=Mr(r["panel.freshness"],{date:$e(e.generated_at),version:He(e.app_version),env:e.environment});return _("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:v=>{v.target===v.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"},Ar(e.metric.pages_with_scenarios_pct)),_("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),_("div",{class:"qa-kpi__item"},_("span",{class:"qa-kpi__value"},Ar(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(v=>{let m=p!==null&&v.node.path_pattern===p;return _("li",{key:v.node.id,class:`qa-tree__row ${m?"qa-tree__row--here":""}`,"data-testid":m?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+v.depth*1.1}rem`}},_("span",{class:`qa-dot ${he[v.node.color]}`,"aria-hidden":"true"}),_("span",{class:`qa-tree__title ${v.node.structural?"qa-tree__title--structural":""}`},v.node.title||v.node.path_pattern),m?_("span",{class:"qa-tree__here"},` ${v.node.path_pattern} `):null,m?_("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,_("span",{class:"qa-tree__count"},String(v.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:v=>l(v.target.value)}),R.length===0?_("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):_("ul",{class:"qa-scenarios__list"},R.map(v=>{var q,w;let m=v.scenario,f={dev:oe(m.dev),bot:ve(m.automated),human:oe(m.client)},b=[...v.traversed].map(g);return _("li",{key:(q=m.external_key)!=null?q:m.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},_("div",{class:"qa-scenarios__line"},_("span",{class:`qa-dot ${he[m.color]}`,"aria-hidden":"true"}),(w=m.group)!=null&&w.key?_("span",{class:"qa-suitekey"},m.group.key):null,_("span",{class:"qa-scenarios__title"},m.title),m.source==="testgen"?_("span",{class:"qa-tag"},r["source.testgen"]):null,_(ye,{dev:f.dev,bot:f.bot,human:f.human,strings:r})),_("div",{class:"qa-scenarios__pages"},v.primaries.size?_("span",{class:"qa-scenarios__primary"},Mr(r["modal.appliesTo"],{count:v.primaries.size})):null,b.length?_("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${b.join(", ")}`):null))}))))))}var zr=V(()=>{"use strict";Z();X();dt();lt();De()});function Ea(){if(Ke++,Ne)return;Ne=!0,_e=history.pushState,xe=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(pt))};history.pushState=function(...r){let a=_e.apply(this,r);return e(),a},history.replaceState=function(...r){let a=xe.apply(this,r);return e(),a}}function Ta(){Ke>0&&Ke--,!(Ke>0||!Ne)&&(Ne=!1,_e&&(history.pushState=_e),xe&&(history.replaceState=xe),_e=null,xe=null)}function Br(e){return typeof e=="object"&&e!==null&&e.format===Ma}function Ir(){Fr||(Fr=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function La(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 Ba(e,t){if(!e||!t)return za;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 $r(e){var x,D,L,T;let{source:t}=e,r=br((x=e.locale)!=null?x:"fr"),a=typeof t=="object"?t:null;if(a&&!Br(a))return Ir(),Aa;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(z=>z.json()):Promise.resolve(t)).then(z=>{Br(z)?(n=z,g()):Ir()}).catch(()=>{})}let p=document.createElement("div");p.setAttribute("data-mqa-host",""),p.setAttribute("data-mqa-size",(D=e.size)!=null?D:"md"),((L=e.position)==null?void 0:L.right)!==void 0&&p.style.setProperty("--mqa-right",`${e.position.right}px`),((T=e.position)==null?void 0:T.bottom)!==void 0&&p.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(p);let c=p.attachShadow({mode:"open"}),u=document.createElement("style");u.textContent=yr,c.appendChild(u);let d=document.createElement("div");c.appendChild(d);let g=()=>{};function h(){return e.getCurrentPage?e.getCurrentPage():n?vr(window.location.pathname,La(n)):null}function R(){let[$,z]=P(0),K=ie(()=>z(I=>I+1),[]);g=K;let Q=Ba(n,h()),M=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},U=ie(()=>{l()},[]),S=ie(()=>{l(),C=!0,K()},[]),B=ie(()=>{C=!1,K()},[]);return N(()=>{let I=()=>K();return window.addEventListener("popstate",I),window.addEventListener(pt,I),()=>{window.removeEventListener("popstate",I),window.removeEventListener(pt,I)}},[]),_("div",{class:"qa-pastille-wrap",onMouseEnter:b,onMouseLeave:q},v?_("div",{class:"qa-panel-anchor"},_(Er,{page:Q.page,state:Q.state,meta:M,strings:r})):null,_(Cr,{color:Q.color,state:Q.state,strings:r,onHover:()=>{b(),v=!0,U(),K()},onOpenModal:S}),C&&n?_(Lr,{artifact:n,currentPattern:Q.pattern,strings:r,onClose:B}):null)}let C=!1,v=!1,m=null,f=140;function b(){m!==null&&(clearTimeout(m),m=null)}function q(){b(),m=setTimeout(()=>{m=null,!E&&(v=!1,g())},f)}function w(){pe(_(R,{}),d)}w(),Ea();let E=!1;return{open(){E||(l(),C=!0,g())},close(){E||(C=!1,g())},dispose(){E||(E=!0,b(),pe(null,d),p.remove(),Ta())}}}var pt,Ne,Ke,_e,xe,Ma,Fr,Aa,za,Hr=V(()=>{"use strict";Z();X();gr();lt();_r();Rr();Tr();zr();pt="mqa:locationchange",Ne=!1,Ke=0,_e=null,xe=null;Ma=1;Fr=!1;Aa={open(){},close(){},dispose(){}};za={state:"unknown-page",color:"gray",pattern:null,page:null}});var Dr={};ft(Dr,{createQaMeter:()=>Fa});function Fa(e){return $r(e)}var Kr=V(()=>{"use strict";Hr()});var Da={};ft(Da,{configFromDataset:()=>jr});var eo=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function to(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.`)}function mt(e){var C,v;let t=((C=e.endpoint)!=null?C:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');to(t);let r=(v=e.fetch)!=null?v:globalThis.fetch;async function a(m){var D,L,T,$;let f=m;if(e.beforeSend&&(f=await e.beforeSend(m)),f===!1)throw new Error("Submission cancelled by beforeSend");let b=new FormData;for(let z of eo)b.append(z,String(f[z]));b.append("technical_context",JSON.stringify(f.technical_context)),((D=f.screenshots)!=null&&D.length?f.screenshots:f.screenshot?[f.screenshot]:[]).forEach((z,K)=>{b.append("screenshot",z,K===0?"screenshot.png":`screenshot-${K+1}.png`)}),f.synthetic&&b.append("synthetic","true"),(L=f.user)!=null&&L.id&&b.append("user",JSON.stringify(f.user)),f.widget_version&&b.append("widget_version",f.widget_version),f.page_path&&b.append("page_path",f.page_path);let w={Authorization:`Bearer ${e.apiKey}`};f.synthetic&&(w["X-Mhosaic-Capture-Source"]="error-tracking");let E=(T=e.getSignedIdentity)==null?void 0:T.call(e);E&&E.userHash&&E.exp&&(($=f.user)!=null&&$.id)&&(w["X-Mhosaic-User"]=String(f.user.id),w["X-Mhosaic-User-Hmac"]=E.userHash,w["X-Mhosaic-User-Exp"]=String(E.exp),E.email&&(w["X-Mhosaic-User-Email"]=E.email));let x=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:w,body:b});if(!x.ok){let z=await x.text().catch(()=>"");throw new Error(`Feedback submit failed: ${x.status} ${z}`)}return x.json()}function n(m){var q;let f={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":m},b=(q=e.getSignedIdentity)==null?void 0:q.call(e);return b&&b.userHash&&b.exp&&(f["X-Mhosaic-User-Hmac"]=b.userHash,f["X-Mhosaic-User-Exp"]=String(b.exp),b.email&&(f["X-Mhosaic-User-Email"]=b.email)),f}async function i(m){let f=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(m)});if(f.status===404)return[];if(!f.ok){let b=await f.text().catch(()=>"");throw new Error(`listMine failed: ${f.status} ${b}`)}return f.json()}async function s(m){let f=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(m)});if(f.status===404)return[];if(!f.ok){let b=await f.text().catch(()=>"");throw new Error(`listChangelog failed: ${f.status} ${b}`)}return f.json()}async function l(m,f){let b=await r(`${t}/api/feedback/v1/reports/widget/${m}/`,{method:"GET",headers:n(f)});if(!b.ok){let q=await b.text().catch(()=>"");throw new Error(`getReport failed: ${b.status} ${q}`)}return b.json()}async function p(m,f,b,q){let w=await r(`${t}/api/feedback/v1/reports/widget/${m}/comments/`,{method:"POST",headers:{...n(f),"Content-Type":"application/json"},body:JSON.stringify({body:b,...q!==void 0&&{client_nonce:q}})});if(!w.ok){let E=await w.text().catch(()=>"");throw new Error(`addComment failed: ${w.status} ${E}`)}return w.json()}async function c(m,f){let b=await r(`${t}/api/feedback/v1/reports/widget/${m}/`,{method:"PATCH",headers:{...n(f),"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 u(m,f){let b=await r(`${t}/api/feedback/v1/reports/widget/${m}/`,{method:"PATCH",headers:{...n(f),"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 d(m){var q,w,E;if(!m)return"";let f=new URLSearchParams;(q=m.status)==null||q.forEach(x=>f.append("status",x)),(w=m.type)==null||w.forEach(x=>f.append("type",x)),(E=m.severity)==null||E.forEach(x=>f.append("severity",x)),m.q&&f.set("q",m.q),m.mine&&f.set("mine","1"),m.ordering&&f.set("ordering",m.ordering),m.page&&m.page>1&&f.set("page",String(m.page)),m.pagePath&&f.set("page_path",m.pagePath);let b=f.toString();return b?`?${b}`:""}async function g(m,f){let b=await r(`${t}/api/feedback/v1/reports/widget/board/${d(f)}`,{method:"GET",headers:n(m)});if(b.status===404)return{count:0,next:null,previous:null,results:[]};if(!b.ok){let q=await b.text().catch(()=>"");throw new Error(`listBoard failed: ${b.status} ${q}`)}return b.json()}async function h(m,f){let b=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${d(f)}`,{method:"GET",headers:n(m)});if(b.status===404)return{total:0,by_status:{},resolution_rate:0,scope:"mine"};if(!b.ok){let q=await b.text().catch(()=>"");throw new Error(`fetchBoardKpis failed: ${b.status} ${q}`)}return b.json()}async function R(m,f){let b=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(m),"Content-Type":"application/json"},body:JSON.stringify({external_id:m,...f?{email:f}:{}})});if(!b.ok)throw new Error(`checkVisibility failed: ${b.status}`);return!!(await b.json()).show}return{submitReport:a,checkVisibility:R,listMine:i,listChangelog:s,getReport:l,addComment:p,closeAsResolved:c,reopenUnresolved:u,listBoard:g,fetchBoardKpis:h}}var ro=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,oo=[/^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 ao(e){return oo.some(t=>t.test(e))}function ne(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)=>{ro.test(l)||ao(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 no=[/\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 J(e){let t=e;for(let r of no)t=t.replace(r,"[redacted-token]");return t}function bt(){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?ne(a):void 0,i=ne(window.location.pathname+window.location.search),s;try{let p=new URL(i,window.location.origin);s=p.pathname+p.search}catch(p){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:J(document.title||"").slice(0,200),pathname:s}}function io(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 gt(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(io).join(" "),p=J(l).slice(0,2e3),c={level:a,message:p,ts:Date.now()};if(a==="error"){let u=new Error().stack;u&&(c.stack=u.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 mt(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,u=((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:u,status:c.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),c}catch(c){let m=c instanceof Error?c.message:String(c);throw e.push({url:t(l),method:u,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:G(m)}),c}},()=>{window.fetch=r}}function bt(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 gt(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?G(n):void 0;e.push({message:G(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(u){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?G(s):void 0;e.push({message:G(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 ht(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:ne(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 ce=class{constructor(t){Oe(this,"max",t);Oe(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 vt(e={}){var g;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(g=e.sanitizeUrl)!=null?g:ne,i=new ce(t),s=new ce(r),l=new ce(a),u=ft(i),c=mt(s,n),m=bt(s,n),d=gt(l),h=ht();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(){u(),c(),m(),d(),h.dispose()}}}var ro={"fab.label":"Send feedback","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.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.context.label":"Page","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.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.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.loading":"Loading\u2026","mine.error":"Could not load your reports.","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.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"},oo={"fab.label":"Envoyer un commentaire","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.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.context.label":"Page","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.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.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.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","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.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"},ao={fr:oo};function no(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=ao[t])!=null?r:null}function yt(e,t={}){var a;let r=(a=no(t.locale))!=null?a:{};return{...ro,...r,...e}}Z();V();V();var Ot="mhosaic.boardView.";function Wt(e){try{let t=localStorage.getItem(Ot+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function jt(e,t){try{localStorage.setItem(Ot+e,JSON.stringify(t))}catch(r){}}V();Z();Z();var vo=0;function o(e,t,r,a,n,i){t||(t={});var s,l,u=t;if("ref"in u)for(l in u={},t)l=="ref"?s=t[l]:u[l]=t[l];var c={type:e,props:u,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--vo,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)u[l]===void 0&&(u[l]=s[l]);return I.vnode&&I.vnode(c),c}function Ut({comment:e,strings:t}){let r=e.is_mine,a=!r&&e.author_source==="mcp",n=!r&&e.author_source==="system",i=a?"mcp":n?"system":"staff",s=i==="mcp"?"detail.author.mcp":i==="system"?"detail.author.system":"detail.author.staff",l=e.author_label||t[s];return o("div",{class:`comment-bubble ${r?"is-mine":"is-other"}`,children:[!r&&l&&o("div",{class:`comment-author comment-author--${i}`,children:l}),o("div",{class:"comment-body",children:e.body}),o("div",{class:"comment-time",children:yo(e.created_at)})]})}function yo(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var _o=["image/png","image/jpeg","image/webp"];function Vt(e){return _o.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function fe(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 ot(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 xo=3e4;function Le({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal"}){var D,Q,O;let[l,u]=q(null),[c,m]=q(null),[d,h]=q(""),[g,C]=q(!1),[k,y]=q(!1),[f,b]=q(!1),p=N(!0),w=async()=>{try{let M=await e.getReport(r,t);if(!p.current)return;u(M),m(null)}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",M),!p.current)return;m("load_failed")}};$(()=>{p.current=!0,w();let M=setInterval(()=>{w()},xo);return()=>{p.current=!1,clearInterval(M)}},[r,t]);let E=async()=>{if(!(!d.trim()||g)){C(!0);try{let M=`${r}:${Date.now()}`,X=await e.addComment(r,t,d.trim(),M);if(!p.current)return;h(""),u(W=>W&&{...W,comments:wo(W.comments,X)}),w()}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",M),!p.current)return;m(a["detail.send_failed"])}finally{p.current&&C(!1)}}},T=async()=>{if(!(k||f)){y(!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;m(a["detail.close_failed"])}finally{p.current&&y(!1)}}},x=async()=>{if(!(k||f)){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;m(a["detail.reopen_failed"])}finally{p.current&&b(!1)}}};if(!l&&!c)return o("div",{class:"mine-loading",children:a["mine.loading"]});if(!l)return 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 F=(D=l.is_mine)!=null?D:i,P=F&&l.status==="awaiting_validation",z=F;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--${l.status}`,children:(Q=a[`status.${l.status}`])!=null?Q:l.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--${l.status}`,children:(O=a[`status.${l.status}`])!=null?O:l.status})]}),o("div",{class:"report-detail-body",children:[o(ko,{detail:l,strings:a}),o("p",{class:"report-detail-description",children:l.description}),l.screenshot_url&&(()=>{let M=ot(l.screenshot_url);return M?o("a",{class:"report-detail-screenshot",href:M,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:l.screenshot_url,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:l.screenshot_url,alt:"",loading:"lazy"})})})(),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),l.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:l.comments.map(M=>o("li",{children:o(Ut,{comment:M,strings:a})}))}),l.status_history&&l.status_history.length>0&&o(Ao,{rows:l.status_history,strings:a}),l.technical_context&&o(Ro,{ctx:l.technical_context,strings:a}),z?o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:a["detail.compose_placeholder"],onInput:M=>h(M.target.value),disabled:g}),o("div",{class:"report-compose-actions",children:[P&&o("button",{type:"button",class:"btn",onClick:T,disabled:k||f,children:k?a["detail.close_busy"]:a["detail.close_cta"]}),P&&o("button",{type:"button",class:"btn btn--ghost",onClick:x,disabled:k||f,children:f?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:E,disabled:!d.trim()||g,children:g?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),c&&o("div",{class:"error",children:c})]})]})}function wo(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function ko({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:Gt(e.created_at)})]}),e.page_url&&(()=>{let i=ot(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:fe(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:fe(e.page_url,64)})]})})()]})}function Gt(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var So=20,Co=15;function Ro({ctx:e,strings:t}){var c,m,d;let r=(c=e.errors)!=null?c:[],a=((m=e.consoleLogs)!=null?m:[]).slice(-So),n=((d=e.networkRequests)!=null?d:[]).slice(-Co),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,u=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:u}),o("div",{class:"tech-body",children:[i&&o(qo,{device:i,strings:t}),r.length>0&&o(Eo,{errors:r,strings:t}),a.length>0&&o(To,{logs:a,strings:t}),n.length>0&&o(Po,{rows:n,strings:t})]})]})}function qo({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(U,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function Eo({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:Mo(r.stack)})]}))})]})}function To({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 Po({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:fe(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Mo(e){let t=e.split(`
618
+ `))}e.push(c)}catch(l){}n.apply(console,s)})}return()=>{for(let[a,n]of Object.entries(r))console[a]=n}}function ht(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,p=((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:p,status:c.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),c}catch(c){let u=c instanceof Error?c.message:String(c);throw e.push({url:t(l),method:p,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:J(u)}),c}},()=>{window.fetch=r}}function vt(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?J(n):void 0;e.push({message:J(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(p){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?J(s):void 0;e.push({message:J(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 _t(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:ne(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 ce=class{constructor(t){We(this,"max",t);We(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 xt(e={}){var h;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(h=e.sanitizeUrl)!=null?h:ne,i=new ce(t),s=new ce(r),l=new ce(a),p=gt(i),c=ht(s,n),u=vt(s,n),d=yt(l),g=_t();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:bt(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){p(),c(),u(),d(),g.dispose()}}}var so={"fab.label":"Send feedback","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.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","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.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.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.loading":"Loading\u2026","mine.error":"Could not load your reports.","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.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"},lo={"fab.label":"Envoyer un commentaire","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.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","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.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.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.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","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.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"},co={fr:lo};function po(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=co[t])!=null?r:null}function wt(e,t={}){var a;let r=(a=po(t.locale))!=null?a:{};return{...so,...r,...e}}Z();X();function fe(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var at="mfb:locationchange",Ut=!1;function ko(){if(!(Ut||typeof history=="undefined")){Ut=!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(at)),a}}}}function Vt(e){return ko(),window.addEventListener("popstate",e),window.addEventListener(at,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(at,e)}}X();var Gt="mhosaic.boardView.";function Yt(e){try{let t=localStorage.getItem(Gt+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function Xt(e,t){try{localStorage.setItem(Gt+e,JSON.stringify(t))}catch(r){}}X();Z();Z();var So=0;function o(e,t,r,a,n,i){t||(t={});var s,l,p=t;if("ref"in p)for(l in p={},t)l=="ref"?s=t[l]:p[l]=t[l];var c={type:e,props:p,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--So,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)p[l]===void 0&&(p[l]=s[l]);return H.vnode&&H.vnode(c),c}function Jt({comment:e,strings:t}){let r=e.is_mine,a=!r&&e.author_source==="mcp",n=!r&&e.author_source==="system",i=a?"mcp":n?"system":"staff",s=i==="mcp"?"detail.author.mcp":i==="system"?"detail.author.system":"detail.author.staff",l=e.author_label||t[s];return o("div",{class:`comment-bubble ${r?"is-mine":"is-other"}`,children:[!r&&l&&o("div",{class:`comment-author comment-author--${i}`,children:l}),o("div",{class:"comment-body",children:e.body}),o("div",{class:"comment-time",children:Co(e.created_at)})]})}function Co(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var Ro=["image/png","image/jpeg","image/webp"];function Zt(e){return Ro.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function me(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 nt(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 qo=3e4;function ze({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal"}){var $,z,K,Q;let[l,p]=P(null),[c,u]=P(null),[d,g]=P(""),[h,R]=P(!1),[C,v]=P(!1),[m,f]=P(!1),b=j(!0),q=async()=>{try{let M=await e.getReport(r,t);if(!b.current)return;p(M),u(null)}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",M),!b.current)return;u("load_failed")}};N(()=>{b.current=!0,q();let M=setInterval(()=>{q()},qo);return()=>{b.current=!1,clearInterval(M)}},[r,t]);let w=async()=>{if(!(!d.trim()||h)){R(!0);try{let M=`${r}:${Date.now()}`,U=await e.addComment(r,t,d.trim(),M);if(!b.current)return;g(""),p(S=>S&&{...S,comments:Po(S.comments,U)}),q()}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",M),!b.current)return;u(a["detail.send_failed"])}finally{b.current&&R(!1)}}},E=async()=>{if(!(C||m)){v(!0);try{let M=await e.closeAsResolved(r,t);if(!b.current)return;p(M)}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",M),!b.current)return;u(a["detail.close_failed"])}finally{b.current&&v(!1)}}},x=async()=>{if(!(C||m)){f(!0);try{let M=await e.reopenUnresolved(r,t);if(!b.current)return;p(M)}catch(M){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",M),!b.current)return;u(a["detail.reopen_failed"])}finally{b.current&&f(!1)}}};if(!l&&!c)return o("div",{class:"mine-loading",children:a["mine.loading"]});if(!l)return 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 D=($=l.is_mine)!=null?$:i,L=D&&l.status==="awaiting_validation",T=D;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--${l.status}`,children:(z=a[`status.${l.status}`])!=null?z:l.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--${l.status}`,children:(K=a[`status.${l.status}`])!=null?K:l.status})]}),o("div",{class:"report-detail-body",children:[o(Eo,{detail:l,strings:a}),o("p",{class:"report-detail-description",children:l.description}),((Q=l.screenshots)!=null&&Q.length?l.screenshots.map(M=>M.url):[l.screenshot_url]).filter(M=>!!M).map(M=>{let U=nt(M);return U?o("a",{class:"report-detail-screenshot",href:U,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:M,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:M,alt:"",loading:"lazy"})})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),l.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:l.comments.map(M=>o("li",{children:o(Jt,{comment:M,strings:a})}))}),l.status_history&&l.status_history.length>0&&o($o,{rows:l.status_history,strings:a}),l.technical_context&&o(Ao,{ctx:l.technical_context,strings:a}),T?o("div",{class:"report-compose",children:[o("textarea",{value:d,placeholder:a["detail.compose_placeholder"],onInput:M=>g(M.target.value),disabled:h}),o("div",{class:"report-compose-actions",children:[L&&o("button",{type:"button",class:"btn",onClick:E,disabled:C||m,children:C?a["detail.close_busy"]:a["detail.close_cta"]}),L&&o("button",{type:"button",class:"btn btn--ghost",onClick:x,disabled:C||m,children:m?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:w,disabled:!d.trim()||h,children:h?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),c&&o("div",{class:"error",children:c})]})]})}function Po(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function Eo({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:er(e.created_at)})]}),e.page_url&&(()=>{let i=nt(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:me(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:me(e.page_url,64)})]})})()]})}function er(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var To=20,Mo=15;function Ao({ctx:e,strings:t}){var c,u,d;let r=(c=e.errors)!=null?c:[],a=((u=e.consoleLogs)!=null?u:[]).slice(-To),n=((d=e.networkRequests)!=null?d:[]).slice(-Mo),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,p=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:p}),o("div",{class:"tech-body",children:[i&&o(Lo,{device:i,strings:t}),r.length>0&&o(zo,{errors:r,strings:t}),a.length>0&&o(Bo,{logs:a,strings:t}),n.length>0&&o(Fo,{rows:n,strings:t})]})]})}function Lo({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(G,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function zo({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:Io(r.stack)})]}))})]})}function Bo({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 Fo({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:me(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Io(e){let t=e.split(`
619
619
  `);return t.length<=12?e:t.slice(0,12).join(`
620
620
  `)+`
621
- \u2026`}function Ao({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:Gt(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 Lo=3e4,zo=["recent","oldest","updated","severity","status"],Bo=["new","in_progress","awaiting_validation","closed","rejected"],Fo=["bug","feature","question","praise","typo"],Io=["blocker","high","medium","low"];function Xt({api:e,externalId:t,strings:r}){let[a,n]=q(()=>Wt(t));$(()=>{jt(t,a)},[t,Yt(a)]);let[i,s]=q(null),[l,u]=q(null),[c,m]=q(!0),[d,h]=q(null),[g,C]=q(null),[k,y]=q(0),[f,b]=q(0),p=Y(()=>{var T,x,F,P,z,D;return((x=(T=a.status)==null?void 0:T.length)!=null?x:0)+((P=(F=a.type)==null?void 0:F.length)!=null?P:0)+((D=(z=a.severity)==null?void 0:z.length)!=null?D:0)+(a.q?1:0)+(a.mine?1:0)},[a]);$(()=>{let T=!1,x=null,F=async()=>{try{let[P,z]=await Promise.all([e.listBoard(t,a),e.fetchBoardKpis(t,a)]);if(T)return;s(P),u(z),h(null)}catch(P){if(T)return;h(P instanceof Error?P.message:String(P))}finally{T||m(!1),T||(x=setTimeout(F,Lo))}};return m(!0),F(),()=>{T=!0,x&&clearTimeout(x)}},[e,t,Yt(a),f]);let w=Y(()=>{var T;return!g||!i?null:(T=i.results.find(x=>x.id===g))!=null?T:null},[g,i]),E=T=>{C(T.id),y(x=>x+1)};return o("div",{class:"board-view",children:[o($o,{strings:r,kpis:l}),o(Ho,{filters:a,onChange:n,activeCount:p,strings:r}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":c&&!i,children:[d&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:r["board.list.error"]}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{h(null),m(!0),b(T=>T+1)},children:r["board.retry"]})]}),!d&&c&&!i&&o(Oo,{}),!d&&i&&i.results.length===0&&!c&&o(No,{strings:r}),!d&&i&&i.results.length>0&&o(Ko,{rows:i.results,selectedId:g,onPick:E,strings:r,total:i.count})]}),o("div",{class:`board-detail-wrap ${w?"has-selection":""}`,children:w?o(Le,{api:e,externalId:t,reportId:w.id,strings:r,onBack:()=>C(null),canModerate:w.is_mine,variant:"board"},k):o("div",{class:"board-detail-empty",children:[o(Vo,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function $o({strings:e,kpis:t}){let r=(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 ${r}`:r})]})]}),o(Do,{kpis:t,strings:e})]})}function Do({kpis:e,strings:t}){var a,n,i,s,l,u;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((u=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?u: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 Ho({filters:e,onChange:t,activeCount:r,strings:a}){var d,h,g,C,k,y,f,b;let n=p=>{if(p===""){let{status:w,...E}=e;t(E)}else t({...e,status:[p]})},i=p=>{if(p===""){let{type:w,...E}=e;t(E)}else t({...e,type:[p]})},s=p=>{if(p===""){let{severity:w,...E}=e;t(E)}else t({...e,severity:[p]})},l=p=>t({...e,ordering:p}),u=p=>t({...e,q:p}),c=()=>{if(e.mine){let{mine:p,...w}=e;t(w)}else t({...e,mine:!0})},m=()=>t({});return o("div",{class:"board-filters",children:[o("select",{class:"board-filter-select","aria-label":a["board.sort"],value:(d=e.ordering)!=null?d:"recent",onChange:p=>l(p.target.value),children:zo.map(p=>o("option",{value:p,children:a[`board.sort.${p}`]},p))}),o("select",{class:"board-filter-select","aria-label":a["board.filter.status"],value:(g=(h=e.status)==null?void 0:h[0])!=null?g:"",onChange:p=>n(p.target.value),children:[o("option",{value:"",children:a["board.filter.status"]}),Bo.map(p=>{var w;return o("option",{value:p,children:(w=a[`board.kpi.${p}`])!=null?w:p},p)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.type"],value:(k=(C=e.type)==null?void 0:C[0])!=null?k:"",onChange:p=>i(p.target.value),children:[o("option",{value:"",children:a["board.filter.type"]}),Fo.map(p=>{var w;return o("option",{value:p,children:(w=a[`type.${p}`])!=null?w:p},p)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.severity"],value:(f=(y=e.severity)==null?void 0:y[0])!=null?f:"",onChange:p=>s(p.target.value),children:[o("option",{value:"",children:a["board.filter.severity"]}),Io.map(p=>{var w;return o("option",{value:p,children:(w=a[`severity.${p}`])!=null?w:p},p)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:a["board.filter.search.placeholder"],value:(b=e.q)!=null?b:"",onInput:p=>u(p.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:c}),o("span",{children:a["board.filter.mine"]})]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:m,children:[o(jo,{}),a["board.filter.clear"]]})]})}function Ko({rows:e,selectedId:t,onPick:r,strings:a,total:n}){return o(U,{children:[o("div",{class:"board-list-count",children:a["board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(n))}),o("ul",{class:"board-list",role:"list",children:e.map(i=>o(Qo,{row:i,selected:i.id===t,onPick:r,strings:a},i.id))})]})}function Qo({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(Wo,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Go(e.created_at)})]})]})})}function No({strings:e}){return o("div",{class:"board-empty",children:[o(Uo,{}),o("h3",{children:e["board.list.empty.title"]}),o("p",{children:e["board.list.empty.description"]})]})}function Oo(){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 Wo(){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 jo(){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 Uo(){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 Vo(){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 Yt(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 Go(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`}V();function Yo(e){return`pill pill-status pill-status--${e}`}function Xo(e){return`pill pill-severity pill-severity--${e}`}function Jo(){return"pill pill-type"}function Zo(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 ea(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function ze({row:e,strings:t,onClick:r}){var n;let a=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:Yo(e.status),children:(n=t[`status.${e.status}`])!=null?n:e.status}),o("span",{class:Jo(),children:t[`type.${e.feedback_type}`]}),o("span",{class:Xo(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:a}),o("div",{class:"mine-row-meta",children:[o("span",{children:Zo(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",ea(e.comment_count,t)]})]})]})}var ta=3e4;function ra(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 oa(e){let t=new Map;for(let r of e){let a=ra(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:aa(r),rows:a}))}function aa(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Jt({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=q(null),[s,l]=q(null),[u,c]=q(!1),m=N(!0),d=async()=>{c(!0),l(null);try{let k=await e.listChangelog(t);if(!m.current)return;i(k)}catch(k){if(typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",k),!m.current)return;l(r["mine.error"])}finally{m.current&&c(!1)}};$(()=>{m.current=!0,d();let k=setInterval(()=>{d()},ta);return()=>{m.current=!1,clearInterval(k)}},[t]);let h=Y(()=>n?oa(n):[],[n]),g=n===null&&!s,C=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:()=>{d()},disabled:u,children:u?r["mine.loading"]:r["mine.refresh"]})]}),g&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),C&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),h.length>0&&o("div",{class:"changelog-groups",children:h.map(k=>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}",k.label)}),o("span",{class:"changelog-group-rule","aria-hidden":"true"}),o("span",{class:"changelog-group-count",children:r[k.rows.length===1?"changelog.resolved_one":"changelog.resolved_many"].replace("{count}",String(k.rows.length))})]}),o("ul",{class:"mine-rows",children:k.rows.map(y=>o("li",{children:o(ze,{row:y,strings:r,onClick:()=>a(y)})}))})]},k.weekKey))})]})}function na(){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 Zt({label:e,onClick:t}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:o(na,{})})}V();V();var er=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],ia=.35;function tr(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")sa(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=ia,e.fillRect(Be(t.x,t.w),Be(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&la(e,t,r);e.restore()}function Be(e,t){return t<0?e+t:e}function sa(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 la(e,t,r){if(!r)return;let a=Be(t.x,t.w),n=Be(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 u=n;u<n+s;u+=l)for(let c=a;c<a+i;c+=l){let m=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,m,d,c,u,m,d)}e.imageSmoothingEnabled=!1;for(let u=n;u<n+s;u+=l)for(let c=a;c<a+i;c+=l){let m=Math.min(l,a+i-c),d=Math.min(l,n+s-u);e.drawImage(r,c,u,1,1,c,u,m,d)}e.imageSmoothingEnabled=!0}var ee={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 rr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=N(null),i=N(null),s=N(null),[l,u]=q("rectangle"),[c,m]=q(er[0]),[d,h]=q([]),[g,C]=q([]),[k,y]=q([]),f=N(!1),[b,p]=q(null),[w,E]=q(!1),[T,x]=q(!1),F=N(1);function P(_){h(R=>(C(A=>[...A,R]),[...R,_])),y([])}function z(){h(_=>(C(R=>[...R,_]),[])),y([])}function D(){C(_=>{if(_.length===0)return _;let R=_[_.length-1];return h(A=>(y(L=>[A,...L]),R)),_.slice(0,-1)})}function Q(){y(_=>{if(_.length===0)return _;let R=_[0];return h(A=>(C(L=>[...L,A]),R)),_.slice(1)})}tt(()=>{let _=R=>{R.key==="Escape"&&(R.stopPropagation(),a())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[a]),$(()=>{let _=R=>{if(!(R.metaKey||R.ctrlKey))return;let L=R.key.toLowerCase();L==="z"?(R.preventDefault(),R.stopPropagation(),R.shiftKey?Q():D()):L==="y"&&(R.preventDefault(),R.stopPropagation(),Q())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[g,k,d]),$(()=>{let _=URL.createObjectURL(e),R=new Image;return R.onload=()=>{s.current=R,E(!0)},R.src=_,()=>URL.revokeObjectURL(_)},[e]),tt(()=>{if(!w||!n.current||!s.current||!i.current)return;let _=s.current,A=i.current.clientWidth-16,L=window.innerHeight*.65,J=Math.min(A/_.width,L/_.height,1);F.current=J;let le=n.current;le.width=_.width,le.height=_.height,le.style.width=`${_.width*J}px`,le.style.height=`${_.height*J}px`,O()},[w]),$(()=>{O()},[d,b]);function O(){let _=n.current,R=s.current;if(!_||!R)return;let A=_.getContext("2d");if(A){A.clearRect(0,0,_.width,_.height),A.drawImage(R,0,0);for(let L of d)tr(A,L,R);b&&tr(A,b,R)}}function M(_){let A=n.current.getBoundingClientRect();return{x:(_.clientX-A.left)/F.current,y:(_.clientY-A.top)/F.current}}let X=_=>{if(!w)return;let{x:R,y:A}=M(_),L=n.current.width,J=Math.max(3,Math.round(L/400)),le=Math.max(8,Math.round(L/80));if(l==="text"){let Ne=window.prompt(t["annotator.text_prompt"]);Ne&&Ne.trim()&&P({kind:"text",x:R,y:A,text:Ne.trim(),color:c,fontSize:Math.max(16,Math.round(L/50)),lineWidth:1});return}f.current=!0,l==="rectangle"?p({kind:"rectangle",x:R,y:A,w:0,h:0,color:c,lineWidth:J}):l==="arrow"?p({kind:"arrow",x1:R,y1:A,x2:R,y2:A,color:c,lineWidth:J}):l==="freehand"?p({kind:"freehand",points:[{x:R,y:A}],color:c,lineWidth:J}):l==="highlight"?p({kind:"highlight",x:R,y:A,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&p({kind:"blur",x:R,y:A,w:0,h:0,color:"#000000",lineWidth:0,tile:le})},W=_=>{if(!f.current)return;let{x:R,y:A}=M(_);p(L=>L&&(L.kind==="rectangle"||L.kind==="highlight"||L.kind==="blur"?{...L,w:R-L.x,h:A-L.y}:L.kind==="arrow"?{...L,x2:R,y2:A}:L.kind==="freehand"?{...L,points:[...L.points,{x:R,y:A}]}:L))},re=()=>{p(_=>(f.current&&_&&((_.kind==="rectangle"||_.kind==="highlight"||_.kind==="blur")&&Math.abs(_.w)<4&&Math.abs(_.h)<4||_.kind==="arrow"&&Math.hypot(_.x2-_.x1,_.y2-_.y1)<4||_.kind==="freehand"&&_.points.length<3||P(_)),null)),f.current=!1},S=async()=>{let _=n.current;if(_){x(!0);try{let R=await new Promise(A=>_.toBlob(A,"image/png",.92));R&&r(R)}finally{x(!1)}}},B=[{id:"rectangle",icon:ee.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:ee.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:ee.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:ee.text,label:t["annotator.tool.text"]},{id:"highlight",icon:ee.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:ee.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:_=>{_.target===_.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:ee.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:B.map(_=>o("button",{type:"button",onClick:()=>u(_.id),title:_.label,"aria-label":_.label,"aria-pressed":l===_.id,class:`annotator-tool ${l===_.id?"is-active":""}`,children:_.icon},_.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[er.map(_=>o("button",{type:"button",onClick:()=>m(_),"aria-label":_,"aria-pressed":c===_,class:`annotator-color ${c===_?"is-active":""}`,style:{backgroundColor:_}},_)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:_=>m(_.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:[ee.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:Q,disabled:k.length===0,title:t["annotator.redo"],children:[ee.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:z,disabled:d.length===0,children:[ee.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[d.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:w?o("canvas",{ref:n,onMouseDown:X,onMouseMove:W,onMouseUp:re,onMouseLeave:re,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:S,disabled:T||!w,children:T?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var ca=["bug","feature","question","praise","typo"],da=["blocker","high","medium","low"];function or({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n}){let[i,s]=q(""),[l,u]=q("bug"),[c,m]=q("medium"),[d,h]=q(""),[g,C]=q(null),[k,y]=q(null),[f,b]=q(!1),[p,w]=q(!1),E=N(null),T=N(null),x=a==="submitting",F=x?e["form.submitting"]:e["form.submit"],P=typeof window!="undefined"?window.location.href:"";$(()=>()=>{k&&URL.revokeObjectURL(k)},[k]);let z=S=>{if(h(""),S instanceof File){let B=Vt(S);if(B){h(B.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(B.maxMb)));return}}k&&URL.revokeObjectURL(k),C(S),y(URL.createObjectURL(S))},D=()=>{k&&URL.revokeObjectURL(k),y(null),C(null),h(""),E.current&&(E.current.value="")},Q=S=>{var _;let B=(_=S.target.files)==null?void 0:_[0];B&&z(B)},O=S=>{S.preventDefault(),S.stopPropagation(),b(!0)},M=S=>{S.preventDefault(),S.stopPropagation(),S.currentTarget===S.target&&b(!1)},X=S=>{var _,R;S.preventDefault(),S.stopPropagation(),b(!1);let B=(R=(_=S.dataTransfer)==null?void 0:_.files)==null?void 0:R[0];B&&z(B)};$(()=>{let S=T.current;if(!S)return;let B=_=>{var A;let R=(A=_.clipboardData)==null?void 0:A.items;if(R){for(let L of Array.from(R))if(L.kind==="file"&&L.type.startsWith("image/")){let J=L.getAsFile();if(J){_.preventDefault(),z(J);return}}}};return S.addEventListener("paste",B),()=>S.removeEventListener("paste",B)},[k]);let W=S=>{k&&URL.revokeObjectURL(k),C(S),y(URL.createObjectURL(S)),w(!1)};return o("form",{onSubmit:S=>{if(S.preventDefault(),!i.trim()){h(e["form.description.required"]);return}h("");let B={description:i.trim(),feedback_type:l,severity:c};g&&(B.screenshot=g,B.capture_method="manual"),t(B)},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:i,placeholder:e["form.description.placeholder"],onInput:S=>s(S.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:l,onChange:S=>u(S.target.value),children:ca.map(S=>o("option",{value:S,children:e[`type.${S}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:c,onChange:S=>m(S.target.value),children:da.map(S=>o("option",{value:S,children:e[`severity.${S}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:E,type:"file",accept:"image/png,image/jpeg,image/webp",class:"mfb-sr-only",onChange:Q,"aria-hidden":"true",tabIndex:-1}),k?o("div",{class:"screenshot-preview",children:[o("img",{src:k,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>w(!0),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:D,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"]]})]})]}):o("div",{ref:T,class:`screenshot-dropzone ${f?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var S;return(S=E.current)==null?void 0:S.click()},onKeyDown:S=>{var B;(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),(B=E.current)==null||B.click())},onDragOver:O,onDragLeave:M,onDrop:X,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"]})]})]}),P&&o("div",{class:"page-context",title:P,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:fe(P,90)})]}),d&&o("div",{class:"error",children:d}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children:e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:x,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:x,children:F})]}),p&&g&&o(rr,{imageBlob:g,strings:e,onCancel:()=>w(!1),onSave:W})]})}V();function pa(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 ua(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var fa={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function ar(e,t){return t==="all"?e:e.filter(r=>fa[r.status]===t)}function nr({rows:e,filter:t,onFilter:r,strings:a}){let n=pa(e),i=ua(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 u=t===l.key,c=u?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${u?" is-active":""}`,onClick:()=>r(c),"aria-pressed":u,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var ma=3e4;function ir({api:e,externalId:t,strings:r,onSelect:a}){var b;let[n,i]=q(null),[s,l]=q(null),[u,c]=q(!1),[m,d]=q("all"),h=N(!0),g=async()=>{c(!0),l(null);try{let p=await e.listMine(t);if(!h.current)return;i(p)}catch(p){if(typeof console!="undefined"&&console.warn("[mhosaic] listMine:",p),!h.current)return;l(r["mine.error"])}finally{h.current&&c(!1)}};$(()=>{h.current=!0,g();let p=setInterval(()=>{g()},ma);return()=>{h.current=!1,clearInterval(p)}},[t]);let C=n!==null&&n.length===0,k=n===null&&!s,y=n?ar(n,m):null,f=!!n&&n.length>0&&((b=y==null?void 0:y.length)!=null?b:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("button",{type:"button",class:"btn",onClick:()=>{g()},disabled:u,children:u?r["mine.loading"]:r["mine.refresh"]})]}),n&&n.length>0&&o(nr,{rows:n,filter:m,onFilter:d,strings:r}),k&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),C&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),f&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),y&&y.length>0&&o("ul",{class:"mine-rows",children:y.map(p=>o("li",{children:o(ze,{row:p,strings:r,onClick:()=>a(p)})}))})]})}V();function sr({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=N(null),i=N(null);return $(()=>{var u;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let m=(d=n.current)==null?void 0:d.getRootNode();m instanceof ShadowRoot&&m.querySelector(".annotator-backdrop")||(c.stopPropagation(),e())};window.addEventListener("keydown",s);let l=(u=n.current)==null?void 0:u.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()},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,children:"\xD7"}),t]})})}var lr=`
621
+ \u2026`}function $o({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:er(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 Ho=3e4,Do=["recent","oldest","updated","severity","status"],Ko=["new","in_progress","awaiting_validation","closed","rejected"],No=["bug","feature","question","praise","typo"],Qo=["blocker","high","medium","low"];function rr({api:e,externalId:t,strings:r,getCurrentPage:a}){let[n,i]=P(()=>Yt(t)),[s,l]=P(!0);N(()=>{Xt(t,n)},[t,tr(n)]);let[p,c]=P(null),[u,d]=P(null),[g,h]=P(!0),[R,C]=P(null),[v,m]=P(null),[f,b]=P(0),[q,w]=P(0),E=Y(()=>{var T,$,z,K,Q,M;return(($=(T=n.status)==null?void 0:T.length)!=null?$:0)+((K=(z=n.type)==null?void 0:z.length)!=null?K:0)+((M=(Q=n.severity)==null?void 0:Q.length)!=null?M:0)+(n.q?1:0)+(n.mine?1:0)},[n]);N(()=>{if(s)return Vt(()=>w(T=>T+1))},[s]);let x=Y(()=>s?{...n,pagePath:fe(a!==void 0?{getCurrentPage:a}:{})}:n,[tr(n),s,q]);N(()=>{let T=!1,$=null,z=async()=>{try{let[K,Q]=await Promise.all([e.listBoard(t,x),e.fetchBoardKpis(t,x)]);if(T)return;c(K),d(Q),C(null)}catch(K){if(T)return;C(K instanceof Error?K.message:String(K))}finally{T||h(!1),T||($=setTimeout(z,Ho))}};return h(!0),z(),()=>{T=!0,$&&clearTimeout($)}},[e,t,JSON.stringify(x)]);let D=Y(()=>{var T;return!v||!p?null:(T=p.results.find($=>$.id===v))!=null?T:null},[v,p]),L=T=>{m(T.id),b($=>$+1)};return o("div",{class:"board-view",children:[o(Oo,{strings:r,kpis:u}),o(jo,{filters:n,onChange:i,activeCount:E,strings:r,thisPage:s,onToggleThisPage:()=>l(T=>!T)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":g&&!p,children:[R&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:r["board.list.error"]}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{C(null),h(!0),w(T=>T+1)},children:r["board.retry"]})]}),!R&&g&&!p&&o(Yo,{}),!R&&p&&p.results.length===0&&!g&&o(Go,{strings:r}),!R&&p&&p.results.length>0&&o(Uo,{rows:p.results,selectedId:v,onPick:L,strings:r,total:p.count})]}),o("div",{class:`board-detail-wrap ${D?"has-selection":""}`,children:D?o(ze,{api:e,externalId:t,reportId:D.id,strings:r,onBack:()=>m(null),canModerate:D.is_mine,variant:"board"},f):o("div",{class:"board-detail-empty",children:[o(ea,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Oo({strings:e,kpis:t}){let r=(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 ${r}`:r})]})]}),o(Wo,{kpis:t,strings:e})]})}function Wo({kpis:e,strings:t}){var a,n,i,s,l,p;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((p=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?p: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 jo({filters:e,onChange:t,activeCount:r,strings:a,thisPage:n,onToggleThisPage:i}){var h,R,C,v,m,f,b,q;let s=w=>{if(w===""){let{status:E,...x}=e;t(x)}else t({...e,status:[w]})},l=w=>{if(w===""){let{type:E,...x}=e;t(x)}else t({...e,type:[w]})},p=w=>{if(w===""){let{severity:E,...x}=e;t(x)}else t({...e,severity:[w]})},c=w=>t({...e,ordering:w}),u=w=>t({...e,q:w}),d=()=>{if(e.mine){let{mine:w,...E}=e;t(E)}else t({...e,mine:!0})},g=()=>t({});return o("div",{class:"board-filters",children:[o("select",{class:"board-filter-select","aria-label":a["board.sort"],value:(h=e.ordering)!=null?h:"recent",onChange:w=>c(w.target.value),children:Do.map(w=>o("option",{value:w,children:a[`board.sort.${w}`]},w))}),o("select",{class:"board-filter-select","aria-label":a["board.filter.status"],value:(C=(R=e.status)==null?void 0:R[0])!=null?C:"",onChange:w=>s(w.target.value),children:[o("option",{value:"",children:a["board.filter.status"]}),Ko.map(w=>{var E;return o("option",{value:w,children:(E=a[`board.kpi.${w}`])!=null?E:w},w)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.type"],value:(m=(v=e.type)==null?void 0:v[0])!=null?m:"",onChange:w=>l(w.target.value),children:[o("option",{value:"",children:a["board.filter.type"]}),No.map(w=>{var E;return o("option",{value:w,children:(E=a[`type.${w}`])!=null?E:w},w)})]}),o("select",{class:"board-filter-select","aria-label":a["board.filter.severity"],value:(b=(f=e.severity)==null?void 0:f[0])!=null?b:"",onChange:w=>p(w.target.value),children:[o("option",{value:"",children:a["board.filter.severity"]}),Qo.map(w=>{var E;return o("option",{value:w,children:(E=a[`severity.${w}`])!=null?E:w},w)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:a["board.filter.search.placeholder"],value:(q=e.q)!=null?q:"",onInput:w=>u(w.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:d}),o("span",{children:a["board.filter.mine"]})]}),o("button",{type:"button",class:`board-chip ${n?"board-chip--on":""}`,onClick:i,children:["\u{1F4CD} ",a["board.scope.thisPage"],n?" \u2715":""]}),r>0&&o("button",{type:"button",class:"board-filter-clear",onClick:g,children:[o(Jo,{}),a["board.filter.clear"]]})]})}function Uo({rows:e,selectedId:t,onPick:r,strings:a,total:n}){return o(G,{children:[o("div",{class:"board-list-count",children:a["board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(n))}),o("ul",{class:"board-list",role:"list",children:e.map(i=>o(Vo,{row:i,selected:i.id===t,onPick:r,strings:a},i.id))})]})}function Vo({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(Xo,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:ta(e.created_at)})]})]})})}function Go({strings:e}){return o("div",{class:"board-empty",children:[o(Zo,{}),o("h3",{children:e["board.list.empty.title"]}),o("p",{children:e["board.list.empty.description"]})]})}function Yo(){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 Xo(){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 Jo(){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 Zo(){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 ea(){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 tr(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 ta(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`}X();function ra(e){return`pill pill-status pill-status--${e}`}function oa(e){return`pill pill-severity pill-severity--${e}`}function aa(){return"pill pill-type"}function na(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 ia(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function Be({row:e,strings:t,onClick:r}){var n;let a=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:ra(e.status),children:(n=t[`status.${e.status}`])!=null?n:e.status}),o("span",{class:aa(),children:t[`type.${e.feedback_type}`]}),o("span",{class:oa(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:a}),o("div",{class:"mine-row-meta",children:[o("span",{children:na(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",ia(e.comment_count,t)]})]})]})}var sa=3e4;function la(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 ca(e){let t=new Map;for(let r of e){let a=la(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:da(r),rows:a}))}function da(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]=P(null),[s,l]=P(null),[p,c]=P(!1),u=j(!0),d=async()=>{c(!0),l(null);try{let C=await e.listChangelog(t);if(!u.current)return;i(C)}catch(C){if(typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",C),!u.current)return;l(r["mine.error"])}finally{u.current&&c(!1)}};N(()=>{u.current=!0,d();let C=setInterval(()=>{d()},sa);return()=>{u.current=!1,clearInterval(C)}},[t]);let g=Y(()=>n?ca(n):[],[n]),h=n===null&&!s,R=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:()=>{d()},disabled:p,children:p?r["mine.loading"]:r["mine.refresh"]})]}),h&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),R&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),g.length>0&&o("div",{class:"changelog-groups",children:g.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(v=>o("li",{children:o(Be,{row:v,strings:r,onClick:()=>a(v)})}))})]},C.weekKey))})]})}function pa(){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 ar({label:e,onClick:t}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:o(pa,{})})}X();X();var nr=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],ua=.35;function ir(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")fa(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=ua,e.fillRect(Fe(t.x,t.w),Fe(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&ma(e,t,r);e.restore()}function Fe(e,t){return t<0?e+t:e}function fa(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 ma(e,t,r){if(!r)return;let a=Fe(t.x,t.w),n=Fe(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 p=n;p<n+s;p+=l)for(let c=a;c<a+i;c+=l){let u=Math.min(l,a+i-c),d=Math.min(l,n+s-p);e.drawImage(r,c,p,u,d,c,p,u,d)}e.imageSmoothingEnabled=!1;for(let p=n;p<n+s;p+=l)for(let c=a;c<a+i;c+=l){let u=Math.min(l,a+i-c),d=Math.min(l,n+s-p);e.drawImage(r,c,p,1,1,c,p,u,d)}e.imageSmoothingEnabled=!0}var ee={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 sr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=j(null),i=j(null),s=j(null),[l,p]=P("rectangle"),[c,u]=P(nr[0]),[d,g]=P([]),[h,R]=P([]),[C,v]=P([]),m=j(!1),[f,b]=P(null),[q,w]=P(!1),[E,x]=P(!1),D=j(1);function L(y){g(k=>(R(A=>[...A,k]),[...k,y])),v([])}function T(){g(y=>(R(k=>[...k,y]),[])),v([])}function $(){R(y=>{if(y.length===0)return y;let k=y[y.length-1];return g(A=>(v(F=>[A,...F]),k)),y.slice(0,-1)})}function z(){v(y=>{if(y.length===0)return y;let k=y[0];return g(A=>(R(F=>[...F,A]),k)),y.slice(1)})}rt(()=>{let y=k=>{k.key==="Escape"&&(k.stopPropagation(),a())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[a]),N(()=>{let y=k=>{if(!(k.metaKey||k.ctrlKey))return;let F=k.key.toLowerCase();F==="z"?(k.preventDefault(),k.stopPropagation(),k.shiftKey?z():$()):F==="y"&&(k.preventDefault(),k.stopPropagation(),z())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[h,C,d]),N(()=>{let y=URL.createObjectURL(e),k=new Image;return k.onload=()=>{s.current=k,w(!0)},k.src=y,()=>URL.revokeObjectURL(y)},[e]),rt(()=>{if(!q||!n.current||!s.current||!i.current)return;let y=s.current,A=i.current.clientWidth-16,F=window.innerHeight*.65,ae=Math.min(A/y.width,F/y.height,1);D.current=ae;let le=n.current;le.width=y.width,le.height=y.height,le.style.width=`${y.width*ae}px`,le.style.height=`${y.height*ae}px`,K()},[q]),N(()=>{K()},[d,f]);function K(){let y=n.current,k=s.current;if(!y||!k)return;let A=y.getContext("2d");if(A){A.clearRect(0,0,y.width,y.height),A.drawImage(k,0,0);for(let F of d)ir(A,F,k);f&&ir(A,f,k)}}function Q(y){let A=n.current.getBoundingClientRect();return{x:(y.clientX-A.left)/D.current,y:(y.clientY-A.top)/D.current}}let M=y=>{if(!q)return;let{x:k,y:A}=Q(y),F=n.current.width,ae=Math.max(3,Math.round(F/400)),le=Math.max(8,Math.round(F/80));if(l==="text"){let Oe=window.prompt(t["annotator.text_prompt"]);Oe&&Oe.trim()&&L({kind:"text",x:k,y:A,text:Oe.trim(),color:c,fontSize:Math.max(16,Math.round(F/50)),lineWidth:1});return}m.current=!0,l==="rectangle"?b({kind:"rectangle",x:k,y:A,w:0,h:0,color:c,lineWidth:ae}):l==="arrow"?b({kind:"arrow",x1:k,y1:A,x2:k,y2:A,color:c,lineWidth:ae}):l==="freehand"?b({kind:"freehand",points:[{x:k,y:A}],color:c,lineWidth:ae}):l==="highlight"?b({kind:"highlight",x:k,y:A,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&b({kind:"blur",x:k,y:A,w:0,h:0,color:"#000000",lineWidth:0,tile:le})},U=y=>{if(!m.current)return;let{x:k,y:A}=Q(y);b(F=>F&&(F.kind==="rectangle"||F.kind==="highlight"||F.kind==="blur"?{...F,w:k-F.x,h:A-F.y}:F.kind==="arrow"?{...F,x2:k,y2:A}:F.kind==="freehand"?{...F,points:[...F.points,{x:k,y:A}]}:F))},S=()=>{b(y=>(m.current&&y&&((y.kind==="rectangle"||y.kind==="highlight"||y.kind==="blur")&&Math.abs(y.w)<4&&Math.abs(y.h)<4||y.kind==="arrow"&&Math.hypot(y.x2-y.x1,y.y2-y.y1)<4||y.kind==="freehand"&&y.points.length<3||L(y)),null)),m.current=!1},B=async()=>{let y=n.current;if(y){x(!0);try{let k=await new Promise(A=>y.toBlob(A,"image/png",.92));k&&r(k)}finally{x(!1)}}},I=[{id:"rectangle",icon:ee.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:ee.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:ee.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:ee.text,label:t["annotator.tool.text"]},{id:"highlight",icon:ee.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:ee.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:y=>{y.target===y.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:ee.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:I.map(y=>o("button",{type:"button",onClick:()=>p(y.id),title:y.label,"aria-label":y.label,"aria-pressed":l===y.id,class:`annotator-tool ${l===y.id?"is-active":""}`,children:y.icon},y.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[nr.map(y=>o("button",{type:"button",onClick:()=>u(y),"aria-label":y,"aria-pressed":c===y,class:`annotator-color ${c===y?"is-active":""}`,style:{backgroundColor:y}},y)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:y=>u(y.target.value),"aria-label":t["annotator.color_picker"]})})]}),o("span",{class:"annotator-sep"}),o("button",{type:"button",class:"annotator-btn",onClick:$,disabled:h.length===0,title:t["annotator.undo"],children:[ee.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:z,disabled:C.length===0,title:t["annotator.redo"],children:[ee.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:T,disabled:d.length===0,children:[ee.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[d.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:q?o("canvas",{ref:n,onMouseDown:M,onMouseMove:U,onMouseUp:S,onMouseLeave:S,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:B,disabled:E||!q,children:E?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var ba=["bug","feature","question","praise","typo"],ga=["blocker","high","medium","low"];function lr({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n}){let[i,s]=P(""),[l,p]=P("bug"),[c,u]=P("medium"),[d,g]=P(""),[h,R]=P([]),[C,v]=P(!1),[m,f]=P(null),b=j(null),q=j(null),w=a==="submitting",E=w?e["form.submitting"]:e["form.submit"],x=typeof window!="undefined"?window.location.href:"",D=j(h);D.current=h,N(()=>()=>{D.current.forEach(S=>URL.revokeObjectURL(S.preview))},[]);let L=S=>{g("");let B=5-h.length,I=S.slice(0,Math.max(0,B));for(let y of I)if(y instanceof File){let k=Zt(y);if(k){g(k.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(k.maxMb)));return}}if(I.length){let y=I.map(k=>({blob:k,preview:URL.createObjectURL(k)}));R(k=>[...k,...y])}S.length>I.length&&g(e["form.screenshot.error_count"].replace("{max}",String(5)))},T=S=>{let B=h[S];B&&URL.revokeObjectURL(B.preview),R(I=>I.filter((y,k)=>k!==S)),g(""),b.current&&(b.current.value="")},$=S=>{var y;let B=S.target,I=Array.from((y=B.files)!=null?y:[]);I.length&&L(I),B.value=""},z=S=>{S.preventDefault(),S.stopPropagation(),v(!0)},K=S=>{S.preventDefault(),S.stopPropagation(),S.currentTarget===S.target&&v(!1)},Q=S=>{var I,y;S.preventDefault(),S.stopPropagation(),v(!1);let B=Array.from((y=(I=S.dataTransfer)==null?void 0:I.files)!=null?y:[]);B.length&&L(B)};N(()=>{let S=q.current;if(!S)return;let B=I=>{var k;let y=(k=I.clipboardData)==null?void 0:k.items;if(y){for(let A of Array.from(y))if(A.kind==="file"&&A.type.startsWith("image/")){let F=A.getAsFile();if(F){I.preventDefault(),L([F]);return}}}};return S.addEventListener("paste",B),()=>S.removeEventListener("paste",B)},[h.length]);let M=S=>{let B=m;if(B===null||!h[B]){f(null);return}URL.revokeObjectURL(h[B].preview);let I={blob:S,preview:URL.createObjectURL(S)};R(y=>y.map((k,A)=>A===B?I:k)),f(null)};return o("form",{onSubmit:S=>{if(S.preventDefault(),!i.trim()){g(e["form.description.required"]);return}g("");let B={description:i.trim(),feedback_type:l,severity:c};h.length&&(B.screenshots=h.map(I=>I.blob),B.capture_method="manual"),t(B)},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:i,placeholder:e["form.description.placeholder"],onInput:S=>s(S.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:l,onChange:S=>p(S.target.value),children:ba.map(S=>o("option",{value:S,children:e[`type.${S}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:c,onChange:S=>u(S.target.value),children:ga.map(S=>o("option",{value:S,children:e[`severity.${S}`]}))})]})]}),o("div",{class:"field",children:[o("label",{children:e["form.screenshot.label"]}),o("input",{ref:b,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"mfb-sr-only",onChange:$,"aria-hidden":"true",tabIndex:-1}),h.length>0&&o("div",{class:"screenshot-strip",children:h.map((S,B)=>o("div",{class:"screenshot-preview",children:[o("img",{src:S.preview,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>f(B),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:()=>T(B),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"]]})]})]},S.preview))}),h.length<5&&o("div",{ref:q,class:`screenshot-dropzone ${C?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var S;return(S=b.current)==null?void 0:S.click()},onKeyDown:S=>{var B;(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),(B=b.current)==null||B.click())},onDragOver:z,onDragLeave:K,onDrop:Q,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"]})]})]}),x&&o("div",{class:"page-context",title:x,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:me(x,90)})]}),d&&o("div",{class:"error",children:d}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children:e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:w,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:w,children:E})]}),m!==null&&h[m]&&o(sr,{imageBlob:h[m].blob,strings:e,onCancel:()=>f(null),onSave:M})]})}X();function ha(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 va(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var ya={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function cr(e,t){return t==="all"?e:e.filter(r=>ya[r.status]===t)}function dr({rows:e,filter:t,onFilter:r,strings:a}){let n=ha(e),i=va(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 p=t===l.key,c=p?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${p?" is-active":""}`,onClick:()=>r(c),"aria-pressed":p,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var _a=3e4;function pr({api:e,externalId:t,strings:r,onSelect:a}){var f;let[n,i]=P(null),[s,l]=P(null),[p,c]=P(!1),[u,d]=P("all"),g=j(!0),h=async()=>{c(!0),l(null);try{let b=await e.listMine(t);if(!g.current)return;i(b)}catch(b){if(typeof console!="undefined"&&console.warn("[mhosaic] listMine:",b),!g.current)return;l(r["mine.error"])}finally{g.current&&c(!1)}};N(()=>{g.current=!0,h();let b=setInterval(()=>{h()},_a);return()=>{g.current=!1,clearInterval(b)}},[t]);let R=n!==null&&n.length===0,C=n===null&&!s,v=n?cr(n,u):null,m=!!n&&n.length>0&&((f=v==null?void 0:v.length)!=null?f:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("button",{type:"button",class:"btn",onClick:()=>{h()},disabled:p,children:p?r["mine.loading"]:r["mine.refresh"]})]}),n&&n.length>0&&o(dr,{rows:n,filter:u,onFilter:d,strings:r}),C&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),R&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),m&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),v&&v.length>0&&o("ul",{class:"mine-rows",children:v.map(b=>o("li",{children:o(Be,{row:b,strings:r,onClick:()=>a(b)})}))})]})}X();function ur({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=j(null),i=j(null);return N(()=>{var p;i.current=document.activeElement;let s=c=>{var d;if(c.key!=="Escape")return;let u=(d=n.current)==null?void 0:d.getRootNode();u instanceof ShadowRoot&&u.querySelector(".annotator-backdrop")||(c.stopPropagation(),e())};window.addEventListener("keydown",s);let l=(p=n.current)==null?void 0:p.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()},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,children:"\xD7"}),t]})})}var fr=`
622
622
  :host {
623
623
  --mfb-accent: #3b82f6;
624
624
  --mfb-accent-contrast: #ffffff;
@@ -1026,6 +1026,12 @@
1026
1026
  .screenshot-cta strong { color: var(--mfb-accent); font-weight: 600; }
1027
1027
  .screenshot-formats { font-size: var(--mfb-text-xs); color: var(--mfb-text-muted); }
1028
1028
 
1029
+ .screenshot-strip {
1030
+ display: flex;
1031
+ flex-direction: column;
1032
+ gap: var(--mfb-space-2);
1033
+ margin-bottom: var(--mfb-space-2);
1034
+ }
1029
1035
  .screenshot-preview {
1030
1036
  position: relative;
1031
1037
  border: 1px solid var(--mfb-border);
@@ -1043,6 +1049,10 @@
1043
1049
  object-fit: contain;
1044
1050
  background: #1a1a1a;
1045
1051
  }
1052
+ /* In the multi-shot strip each preview stays compact so several fit. */
1053
+ .screenshot-strip .screenshot-preview img {
1054
+ max-height: 120px;
1055
+ }
1046
1056
  .screenshot-preview-actions {
1047
1057
  display: flex;
1048
1058
  gap: var(--mfb-space-2);
@@ -2305,5 +2315,5 @@
2305
2315
  @media (prefers-reduced-motion: reduce) {
2306
2316
  .skeleton-line { animation: none; }
2307
2317
  }
2308
- `;function ba(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function cr(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=lr,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null;function s(c){n=c,pe(v(u,{state:c}),a)}function l(c){let{selectedReportId:m,...d}=c;return d}function u({state:c}){var y;let m=ie(async f=>{s({...n,status:"submitting"});try{await e.onSubmit(f),s({...n,status:"success"}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,s({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(b){typeof console!="undefined"&&console.warn("[mhosaic] submit:",b),s({...n,status:"error",error:e.strings["form.error"]})}},[]),d=(y=e.getExternalId)==null?void 0:y.call(e),[h,g]=q(!e.requiresVisibilityCheck);$(()=>{if(!e.requiresVisibilityCheck){g(!0);return}if(!d||!e.checkVisibility){g(!1);return}let f=!1;return e.checkVisibility(d).then(b=>{f||g(b)}).catch(()=>{f||g(!1)}),()=>{f=!0}},[d]);let C=ba(e,d,h),k=!!(e.api&&d);return o(U,{children:[C&&o(Zt,{label:e.strings["fab.label"],onClick:()=>s({...n,open:!0})}),c.open&&o(sr,{onDismiss:()=>s(l({...n,open:!1,status:"idle"})),closeLabel:e.strings["form.close"],expanded:c.tab==="board",children:[k&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":c.tab==="send",class:`tab-button ${c.tab==="send"?"is-active":""}`,onClick:()=>s(l({...n,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="mine",class:`tab-button ${c.tab==="mine"?"is-active":""}`,onClick:()=>s(l({...n,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="changelog",class:`tab-button ${c.tab==="changelog"?"is-active":""}`,onClick:()=>s(l({...n,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":c.tab==="board",class:`tab-button tab-button--board ${c.tab==="board"?"is-active":""}`,onClick:()=>s(l({...n,tab:"board"})),children:e.strings["tab.board"]})]}),c.tab==="send"&&o(or,{strings:e.strings,onSubmit:m,onCancel:()=>s({...n,open:!1,status:"idle"}),status:c.status,...c.error!==void 0&&{errorMessage:c.error}}),c.tab==="mine"&&e.api&&d&&!c.selectedReportId&&o(ir,{api:e.api,externalId:d,strings:e.strings,onSelect:f=>s({...n,selectedReportId:f.id})}),(c.tab==="mine"||c.tab==="changelog")&&e.api&&d&&c.selectedReportId&&o(Le,{api:e.api,externalId:d,reportId:c.selectedReportId,strings:e.strings,onBack:()=>s(l({...n}))}),c.tab==="changelog"&&e.api&&d&&!c.selectedReportId&&o(Jt,{api:e.api,externalId:d,strings:e.strings,onSelect:f=>s({...n,selectedReportId:f.id})}),c.tab==="board"&&e.api&&d&&o(Xt,{api:e.api,externalId:d,strings:e.strings})]})]})}return s(n),{open(){s({...n,open:!0})},close(){s({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),pe(null,a),e.host.innerHTML=""},notifyIdentityChanged(){s({...n})}}}function Ma(){return{right:24+24/2,bottom:84}}function ct(e){var k,y,f,b,p,w,E,T;let t=(k=e.env)!=null?k:"prod",r=(y=e.locale)!=null?y:typeof navigator!="undefined"?navigator.language:void 0,a=yt((f=e.translations)!=null?f:{},r!==void 0?{locale:r}:{}),n=vt({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(b=e.metadata)!=null?b:{},l=pt({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}}),u=[],c=document.createElement("div");if(c.className="mhosaic-feedback",e.attachTo){let x=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;x==null||x.appendChild(c)}else document.body.appendChild(c);async function m(x){var O,M,X,W,re;let F=x.synthetic?void 0:x.screenshot,P=n.snapshot();if(i){let{userHash:S,exp:B,..._}=i;P.user=_}s&&Object.keys(s).length>0&&(P.metadata={...s});let z=F?(O=x.capture_method)!=null?O:"manual":"none",D={description:x.description,feedback_type:(M=x.feedback_type)!=null?M:"bug",severity:(X=x.severity)!=null?X:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:z,technical_context:P};D.widget_version="0.22.0",F&&(D.screenshot=F),x.synthetic&&(D.synthetic=!0),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(D.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let Q=D;for(let S of u)Q=await S(Q);try{let S=await l.submitReport(Q);return(W=e.onSubmitSuccess)==null||W.call(e,S),n.clear(),S}catch(S){let B=S instanceof Error?S:new Error(String(S));throw(re=e.onError)==null||re.call(e,B),B}}let d=cr({host:c,strings:a,showFAB:(p=e.showFAB)!=null?p:!0,onSubmit:async x=>{await m(x)},api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(w=e.requiresVisibilityCheck)!=null?w:!1,checkVisibility:x=>l.checkVisibility(x,i==null?void 0:i.email)}),h,g=!1;if((E=e.qaMeter)!=null&&E.source){let x=e.qaMeter,F=(T=x.locale)!=null?T:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(Fr(),Br)).then(({createQaMeter:P})=>{var z,D;g||(h=P({source:x.source,size:(z=x.size)!=null?z:"sm",position:(D=x.position)!=null?D:Ma(),locale:F,...x.getCurrentPage&&{getCurrentPage:x.getCurrentPage}}))})}let C={show(){d.open()},hide(){d.close()},open(x){d.open()},async submit(x){return m({description:x.description,...x.feedback_type!==void 0&&{feedback_type:x.feedback_type},...x.severity!==void 0&&{severity:x.severity},...x.synthetic!==void 0&&{synthetic:x.synthetic},...x.screenshot!==void 0&&{screenshot:x.screenshot}})},identify(x){i=x,d.notifyIdentityChanged()},setMetadata(x){s={...s,...x}},shutdown(){g=!0,h==null||h.dispose(),d.dispose(),n.dispose(),c.remove();let x=window;x.mhosaicFeedback===C&&delete x.mhosaicFeedback},_registerTransformer(x){u.push(x)}};return window.mhosaicFeedback=C,C}var Hr=window;function Kr(e){if(!e.key||!e.endpoint)return null;let t=e.env;return{apiKey:e.key,endpoint:e.endpoint,...t!==void 0&&{env:t},...e.qaSource?{qaMeter:{source:e.qaSource,...e.qaLocale?{locale:e.qaLocale}:{}}}:{}}}function Aa(){let e=document.currentScript;return e?Kr(e.dataset):null}var se=null,$r,Dr,Qe=(Dr=($r=Hr.Feedback)==null?void 0:$r.q)!=null?Dr:[];function Qr(e){let[t,r]=e;if(t==="init"){if(se)return;se=ct(r);return}if(!se){Qe.push(e);return}t==="identify"?se.identify(r):t==="setMetadata"?se.setMetadata(r):t==="open"&&se.open(r)}var Ir=Aa();Ir&&(se=ct(Ir));for(;Qe.length>0;)Qr(Qe.shift());var La=Object.assign(function(t,r){Qr([t,r])},{q:Qe});Hr.Feedback=La;return Vr(za);})();
2318
+ `;function xa(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function mr(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=fr,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null;function s(u){n=u,pe(_(c,{state:u}),a)}function l(u){let{selectedReportId:d,...g}=u;return g}function p(u){s({...n,open:!0,tab:"send"}),e.openToCurrentPageFeedback&&e.api&&u&&e.api.fetchBoardKpis(u,{pagePath:fe(e)}).then(d=>{d.total>0&&n.open&&n.tab==="send"&&s({...n,tab:"board"})}).catch(()=>{})}function c({state:u}){var m;let d=ie(async f=>{s({...n,status:"submitting"});try{await e.onSubmit(f),s({...n,status:"success"}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,s({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(b){typeof console!="undefined"&&console.warn("[mhosaic] submit:",b),s({...n,status:"error",error:e.strings["form.error"]})}},[]),g=(m=e.getExternalId)==null?void 0:m.call(e),[h,R]=P(!e.requiresVisibilityCheck);N(()=>{if(!e.requiresVisibilityCheck){R(!0);return}if(!g||!e.checkVisibility){R(!1);return}let f=!1;return e.checkVisibility(g).then(b=>{f||R(b)}).catch(()=>{f||R(!1)}),()=>{f=!0}},[g]);let C=xa(e,g,h),v=!!(e.api&&g);return o(G,{children:[C&&o(ar,{label:e.strings["fab.label"],onClick:()=>p(g)}),u.open&&o(ur,{onDismiss:()=>s(l({...n,open:!1,status:"idle"})),closeLabel:e.strings["form.close"],expanded:u.tab==="board",children:[v&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":u.tab==="send",class:`tab-button ${u.tab==="send"?"is-active":""}`,onClick:()=>s(l({...n,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":u.tab==="mine",class:`tab-button ${u.tab==="mine"?"is-active":""}`,onClick:()=>s(l({...n,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":u.tab==="changelog",class:`tab-button ${u.tab==="changelog"?"is-active":""}`,onClick:()=>s(l({...n,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":u.tab==="board",class:`tab-button tab-button--board ${u.tab==="board"?"is-active":""}`,onClick:()=>s(l({...n,tab:"board"})),children:e.strings["tab.board"]})]}),u.tab==="send"&&o(lr,{strings:e.strings,onSubmit:d,onCancel:()=>s({...n,open:!1,status:"idle"}),status:u.status,...u.error!==void 0&&{errorMessage:u.error}}),u.tab==="mine"&&e.api&&g&&!u.selectedReportId&&o(pr,{api:e.api,externalId:g,strings:e.strings,onSelect:f=>s({...n,selectedReportId:f.id})}),(u.tab==="mine"||u.tab==="changelog")&&e.api&&g&&u.selectedReportId&&o(ze,{api:e.api,externalId:g,reportId:u.selectedReportId,strings:e.strings,onBack:()=>s(l({...n}))}),u.tab==="changelog"&&e.api&&g&&!u.selectedReportId&&o(or,{api:e.api,externalId:g,strings:e.strings,onSelect:f=>s({...n,selectedReportId:f.id})}),u.tab==="board"&&e.api&&g&&o(rr,{api:e.api,externalId:g,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage}})]})]})}return s(n),{open(){var u;p((u=e.getExternalId)==null?void 0:u.call(e))},close(){s({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),pe(null,a),e.host.innerHTML=""},notifyIdentityChanged(){s({...n})}}}function Ia(){return{right:24+24/2,bottom:84}}function ut(e){var C,v,m,f,b,q,w,E;let t=(C=e.env)!=null?C:"prod",r=(v=e.locale)!=null?v:typeof navigator!="undefined"?navigator.language:void 0,a=wt((m=e.translations)!=null?m:{},r!==void 0?{locale:r}:{}),n=xt({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(f=e.metadata)!=null?f:{},l=mt({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}}),p=[],c=document.createElement("div");if(c.className="mhosaic-feedback",e.attachTo){let x=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;x==null||x.appendChild(c)}else document.body.appendChild(c);async function u(x){var M,U,S,B,I,y;let D=(M=x.screenshots)!=null&&M.length?x.screenshots:x.screenshot?[x.screenshot]:void 0,L=x.synthetic?void 0:D,T=n.snapshot();if(i){let{userHash:k,exp:A,...F}=i;T.user=F}s&&Object.keys(s).length>0&&(T.metadata={...s});let $=L!=null&&L.length?(U=x.capture_method)!=null?U:"manual":"none",z={description:x.description,feedback_type:(S=x.feedback_type)!=null?S:"bug",severity:(B=x.severity)!=null?B:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:$,technical_context:T};z.widget_version="0.24.0",L!=null&&L.length&&(z.screenshots=L,z.screenshot=L[0]),x.synthetic&&(z.synthetic=!0);let K=fe(e);K&&(z.page_path=K),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(z.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let Q=z;for(let k of p)Q=await k(Q);try{let k=await l.submitReport(Q);return(I=e.onSubmitSuccess)==null||I.call(e,k),n.clear(),k}catch(k){let A=k instanceof Error?k:new Error(String(k));throw(y=e.onError)==null||y.call(e,A),A}}let d=mr({host:c,strings:a,showFAB:(b=e.showFAB)!=null?b:!0,onSubmit:async x=>{await u(x)},api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(q=e.requiresVisibilityCheck)!=null?q:!1,checkVisibility:x=>l.checkVisibility(x,i==null?void 0:i.email),...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...e.openToCurrentPageFeedback!==void 0&&{openToCurrentPageFeedback:e.openToCurrentPageFeedback}}),g,h=!1;if((w=e.qaMeter)!=null&&w.source){let x=e.qaMeter,D=(E=x.locale)!=null?E:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(Kr(),Dr)).then(({createQaMeter:L})=>{var T,$;h||(g=L({source:x.source,size:(T=x.size)!=null?T:"sm",position:($=x.position)!=null?$:Ia(),locale:D,...x.getCurrentPage&&{getCurrentPage:x.getCurrentPage}}))})}let R={show(){d.open()},hide(){d.close()},open(x){d.open()},async submit(x){return u({description:x.description,...x.feedback_type!==void 0&&{feedback_type:x.feedback_type},...x.severity!==void 0&&{severity:x.severity},...x.synthetic!==void 0&&{synthetic:x.synthetic},...x.screenshot!==void 0&&{screenshot:x.screenshot},...x.screenshots!==void 0&&{screenshots:x.screenshots}})},identify(x){i=x,d.notifyIdentityChanged()},setMetadata(x){s={...s,...x}},shutdown(){h=!0,g==null||g.dispose(),d.dispose(),n.dispose(),c.remove();let x=window;x.mhosaicFeedback===R&&delete x.mhosaicFeedback},_registerTransformer(x){p.push(x)}};return window.mhosaicFeedback=R,R}var Wr=window;function jr(e){if(!e.key||!e.endpoint)return null;let t=e.env;return{apiKey:e.key,endpoint:e.endpoint,...t!==void 0&&{env:t},...e.qaSource?{qaMeter:{source:e.qaSource,...e.qaLocale?{locale:e.qaLocale}:{}}}:{}}}function $a(){let e=document.currentScript;return e?jr(e.dataset):null}var se=null,Qr,Or,Qe=(Or=(Qr=Wr.Feedback)==null?void 0:Qr.q)!=null?Or:[];function Ur(e){let[t,r]=e;if(t==="init"){if(se)return;se=ut(r);return}if(!se){Qe.push(e);return}t==="identify"?se.identify(r):t==="setMetadata"?se.setMetadata(r):t==="open"&&se.open(r)}var Nr=$a();Nr&&(se=ut(Nr));for(;Qe.length>0;)Ur(Qe.shift());var Ha=Object.assign(function(t,r){Ur([t,r])},{q:Qe});Wr.Feedback=Ha;return Zr(Da);})();
2309
2319
  //# sourceMappingURL=embed.min.js.map