@mhosaic/feedback 0.31.0 → 0.32.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/{chunk-AA24TFKX.mjs → chunk-YNDBZR37.mjs} +264 -65
- package/dist/chunk-YNDBZR37.mjs.map +1 -0
- package/dist/embed.min.js +19 -5
- package/dist/embed.min.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +1 -1
- package/dist/widget.min.js +20 -6
- package/dist/widget.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-AA24TFKX.mjs.map +0 -1
package/dist/embed.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var MhosaicFeedback=(()=>{var Le=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var Eo=Object.getOwnPropertyNames;var To=Object.prototype.hasOwnProperty;var Ao=(e,t,r)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var te=(e,t)=>()=>(e&&(t=e(e=0)),t);var Bt=(e,t)=>{for(var r in t)Le(e,r,{get:t[r],enumerable:!0})},Mo=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Eo(t))!To.call(e,n)&&n!==r&&Le(e,n,{get:()=>t[n],enumerable:!(a=Po(t,n))||a.enumerable});return e};var Lo=e=>Mo(Le({},"__esModule",{value:!0}),e);var Se=(e,t,r)=>Ao(e,typeof t!="symbol"?t+"":t,r);function ce(e,t){for(var r in t)e[r]=t[r];return e}function dt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function y(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?Oe.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 Ie(e,s,a,n,null)}function Ie(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?++Yt:n,__i:-1,__u:0};return n==null&&K.vnode!=null&&K.vnode(i),i}function ee(e){return e.children}function De(e,t){this.props=e,this.context=t}function ye(e,t){if(t==null)return e.__?ye(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"?ye(e):null}function Go(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=ce({},t);i.__v=t.__v+1,K.vnode&&K.vnode(i),pt(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?ye(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,ar(a,i,n),t.__e=t.__=null,i.__e!=r&&tr(i)}}function tr(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}),tr(e)}function Vt(e){(!e.__d&&(e.__d=!0)&&ue.push(e)&&!Ne.__r++||Ut!=K.debounceRendering)&&((Ut=K.debounceRendering)||Jt)(Ne)}function Ne(){try{for(var e,t=1;ue.length;)ue.length>t&&ue.sort(Zt),e=ue.shift(),t=ue.length,Go(e)}finally{ue.length=Ne.__r=0}}function rr(e,t,r,a,n,i,s,l,p,c,m){var d,f,g,k,C,h,w,R=a&&a.__k||He,x=t.length;for(p=Xo(r,t,R,p,x),d=0;d<x;d++)(g=r.__k[d])!=null&&(f=g.__i!=-1&&R[g.__i]||$e,g.__i=d,h=pt(e,g,f,n,i,s,l,p,c,m),k=g.__e,g.ref&&f.ref!=g.ref&&(f.ref&&ut(f.ref,null,g),m.push(g.ref,g.__c||k,g)),C==null&&k!=null&&(C=k),(w=!!(4&g.__u))||f.__k===g.__k?(p=or(g,p,e,w),w&&f.__e&&(f.__e=null)):typeof g.type=="function"&&h!==void 0?p=h:k&&(p=k.nextSibling),g.__u&=-7);return r.__e=C,p}function Xo(e,t,r,a,n){var i,s,l,p,c,m=r.length,d=m,f=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]=Ie(null,s,null,null,null):Ke(s)?s=e.__k[i]=Ie(ee,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Ie(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,p=i+f,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=Yo(s,r,p,d))!=-1&&(d--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>m?f--:n<m&&f++),typeof s.type!="function"&&(s.__u|=4)):c!=p&&(c==p-1?f--:c==p+1?f++:(c>p?f--:f++,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=ye(l)),ir(l,l));return a}function or(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=or(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=ye(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Yo(e,t,r,a){var n,i,s,l=e.key,p=e.type,c=t[r],m=c!=null&&(2&c.__u)==0;if(c===null&&l==null||m&&l==c.key&&p==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&&p==c.type)return s}return-1}function Gt(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||Vo.test(t)?r:r+"px"}function Be(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||Gt(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||Gt(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(er,"$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[Re]=a[Re]:(r[Re]=ct,e.addEventListener(t,i?st:it,i)):e.removeEventListener(t,i?st:it,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 Xt(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[Fe]==null)t[Fe]=ct++;else if(t[Fe]<r[Re])return;return r(K.event?K.event(t):t)}}}function pt(e,t,r,a,n,i,s,l,p,c){var m,d,f,g,k,C,h,w,R,x,v,b,q,_,F,E=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(p=!!(32&r.__u),i=[l=t.__e=r.__e]),(m=K.__b)&&m(t);e:if(typeof E=="function")try{if(w=t.props,R=E.prototype&&E.prototype.render,x=(m=E.contextType)&&a[m.__c],v=m?x?x.props.value:m.__:a,r.__c?h=(d=t.__c=r.__c).__=d.__E:(R?t.__c=d=new E(w,v):(t.__c=d=new De(w,v),d.constructor=E,d.render=Zo),x&&x.sub(d),d.state||(d.state={}),d.__n=a,f=d.__d=!0,d.__h=[],d._sb=[]),R&&d.__s==null&&(d.__s=d.state),R&&E.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=ce({},d.__s)),ce(d.__s,E.getDerivedStateFromProps(w,d.__s))),g=d.props,k=d.state,d.__v=t,f)R&&E.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),R&&d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(R&&E.getDerivedStateFromProps==null&&w!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(w,v),t.__v==r.__v||!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(w,d.__s,v)===!1){t.__v!=r.__v&&(d.props=w,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(B){B&&(B.__=t)}),He.push.apply(d.__h,d._sb),d._sb=[],d.__h.length&&s.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(w,d.__s,v),R&&d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,k,C)})}if(d.context=v,d.props=w,d.__P=e,d.__e=!1,b=K.__r,q=0,R)d.state=d.__s,d.__d=!1,b&&b(t),m=d.render(d.props,d.state,d.context),He.push.apply(d.__h,d._sb),d._sb=[];else do d.__d=!1,b&&b(t),m=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++q<25);d.state=d.__s,d.getChildContext!=null&&(a=ce(ce({},a),d.getChildContext())),R&&!f&&d.getSnapshotBeforeUpdate!=null&&(C=d.getSnapshotBeforeUpdate(g,k)),_=m!=null&&m.type===ee&&m.key==null?nr(m.props.children):m,l=rr(e,Ke(_)?_:[_],t,r,a,n,i,s,l,p,c),d.base=t.__e,t.__u&=-161,d.__h.length&&s.push(d),h&&(d.__E=d.__=null)}catch(B){if(t.__v=null,p||i!=null)if(B.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(F=i.length;F--;)dt(i[F]);lt(t)}else t.__e=r.__e,t.__k=r.__k,B.then||lt(t);K.__e(B,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=Jo(r.__e,t,r,a,n,i,s,p,c);return(m=K.diffed)&&m(t),128&t.__u?void 0:l}function lt(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(lt))}function ar(e,t,r){for(var a=0;a<r.length;a++)ut(r[a],r[++a],r[++a]);K.__c&&K.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){K.__e(i,n.__v)}})}function nr(e){return typeof e!="object"||e==null||e.__b>0?e:Ke(e)?e.map(nr):ce({},e)}function Jo(e,t,r,a,n,i,s,l,p){var c,m,d,f,g,k,C,h=r.props||$e,w=t.props,R=t.type;if(R=="svg"?n="http://www.w3.org/2000/svg":R=="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==!!R&&(R?g.localName==R:g.nodeType==3)){e=g,i[c]=null;break}}if(e==null){if(R==null)return document.createTextNode(w);e=document.createElementNS(n,R,w.is&&w),l&&(K.__m&&K.__m(t,i),l=!1),i=null}if(R==null)h===w||l&&e.data==w||(e.data=w);else{if(i=i&&Oe.call(e.childNodes),!l&&i!=null)for(h={},c=0;c<e.attributes.length;c++)h[(g=e.attributes[c]).name]=g.value;for(c in h)g=h[c],c=="dangerouslySetInnerHTML"?d=g:c=="children"||c in w||c=="value"&&"defaultValue"in w||c=="checked"&&"defaultChecked"in w||Be(e,c,null,g,n);for(c in w)g=w[c],c=="children"?f=g:c=="dangerouslySetInnerHTML"?m=g:c=="value"?k=g:c=="checked"?C=g:l&&typeof g!="function"||h[c]===g||Be(e,c,g,h[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=""),rr(t.type=="template"?e.content:e,Ke(f)?f:[f],t,r,a,R=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&ye(r,0),l,p),i!=null)for(c=i.length;c--;)dt(i[c]);l||(c="value",R=="progress"&&k==null?e.removeAttribute("value"):k!=null&&(k!==e[c]||R=="progress"&&!k||R=="option"&&k!=h[c])&&Be(e,c,k,h[c],n),c="checked",C!=null&&C!=e[c]&&Be(e,c,C,h[c],n))}return e}function ut(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){K.__e(n,r)}}function ir(e,t,r){var a,n;if(K.unmount&&K.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||ut(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){K.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&ir(a[n],t,r||typeof e.type!="function");r||dt(e.__e),e.__c=e.__=e.__e=void 0}function Zo(e,t,r){return this.constructor(e,r)}function _e(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),K.__&&K.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],pt(t,e=(!a&&r||t).__k=y(ee,null,[e]),n||$e,$e,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Oe.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),ar(i,e,s)}var Oe,K,Yt,Wo,ue,Ut,Jt,Zt,nt,Fe,Re,er,ct,it,st,Uo,$e,He,Vo,Ke,ie=te(()=>{"use strict";$e={},He=[],Vo=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ke=Array.isArray;Oe=He.slice,K={__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}},Yt=0,Wo=function(e){return e!=null&&e.constructor===void 0},De.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ce({},this.state),typeof e=="function"&&(e=e(ce({},r),this.props)),e&&ce(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Vt(this))},De.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Vt(this))},De.prototype.render=ee,ue=[],Jt=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Zt=function(e,t){return e.__v.__b-t.__v.__b},Ne.__r=0,nt=Math.random().toString(8),Fe="__d"+nt,Re="__a"+nt,er=/(PointerCapture)$|Capture$/i,ct=0,it=Xt(!1),st=Xt(!0),Uo=0});function Qe(e,t){X.__h&&X.__h(G,e,qe||t),qe=0;var r=G.__H||(G.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function P(e){return qe=1,ea(gr,e)}function ea(e,t,r){var a=Qe(xe++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):gr(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=G,!G.__f)){var n=function(l,p,c){if(!a.__c.__H)return!0;var m=a.__c.__H.__.filter(function(f){return f.__c});if(m.every(function(f){return!f.__N}))return!i||i.call(this,l,p,c);var d=a.__c.props!==l;return m.some(function(f){if(f.__N){var g=f.__[0];f.__=f.__N,f.__N=void 0,g!==f.__[0]&&(d=!0)}}),i&&i.call(this,l,p,c)||d};G.__f=!0;var i=G.shouldComponentUpdate,s=G.componentWillUpdate;G.componentWillUpdate=function(l,p,c){if(this.__e){var m=i;i=void 0,n(l,p,c),i=m}s&&s.call(this,l,p,c)},G.shouldComponentUpdate=n}return a.__N||a.__}function H(e,t){var r=Qe(xe++,3);!X.__s&>(r.__H,t)&&(r.__=e,r.u=t,G.__H.__h.push(r))}function bt(e,t){var r=Qe(xe++,4);!X.__s&>(r.__H,t)&&(r.__=e,r.u=t,G.__h.push(r))}function V(e){return qe=5,re(function(){return{current:e}},[])}function re(e,t){var r=Qe(xe++,7);return gt(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function de(e,t){return qe=8,re(function(){return e},t)}function ta(){for(var e;e=br.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(je),t.__h.some(mt),t.__h=[]}catch(r){t.__h=[],X.__e(r,e.__v)}}}function ra(e){var t,r=function(){clearTimeout(a),mr&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);mr&&(t=requestAnimationFrame(r))}function je(e){var t=G,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),G=t}function mt(e){var t=G;e.__c=e.__(),G=t}function gt(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function gr(e,t){return typeof t=="function"?t(e):t}var xe,G,ft,sr,qe,br,X,lr,cr,dr,pr,ur,fr,mr,Z=te(()=>{"use strict";ie();qe=0,br=[],X=K,lr=X.__b,cr=X.__r,dr=X.diffed,pr=X.__c,ur=X.unmount,fr=X.__;X.__b=function(e){G=null,lr&&lr(e)},X.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),fr&&fr(e,t)},X.__r=function(e){cr&&cr(e),xe=0;var t=(G=e.__c).__H;t&&(ft===G?(t.__h=[],G.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(je),t.__h.some(mt),t.__h=[],xe=0)),ft=G},X.diffed=function(e){dr&&dr(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(br.push(t)!==1&&sr===X.requestAnimationFrame||((sr=X.requestAnimationFrame)||ra)(ta)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),ft=G=null},X.__c=function(e,t){t.some(function(r){try{r.__h.some(je),r.__h=r.__h.filter(function(a){return!a.__||mt(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],X.__e(a,r.__v)}}),pr&&pr(e,t)},X.unmount=function(e){ur&&ur(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{je(a)}catch(n){t=n}}),r.__H=void 0,t&&X.__e(t,r.__v))};mr=typeof requestAnimationFrame=="function"});function Nr(e){return e==="en"?dn:cn}var cn,dn,Or=te(()=>{"use strict";cn={"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."},dn={"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 xt(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 pn(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 jr(e,t){let r=Kr(xt(e)),a=null,n=-1;for(let i of t){let s=Kr(i);if(!pn(r,s))continue;let p=s.filter(c=>!c.startsWith(":")).length*100+s.length;p>n&&(a=i,n=p)}return a}var Kr,wt=te(()=>{"use strict";Kr=e=>e.split("/").filter(Boolean)});var Qr,Wr=te(()=>{"use strict";Qr=`
|
|
1
|
+
"use strict";var MhosaicFeedback=(()=>{var Ne=Object.defineProperty;var Oo=Object.getOwnPropertyDescriptor;var No=Object.getOwnPropertyNames;var Ho=Object.prototype.hasOwnProperty;var Wo=(e,t,r)=>t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ie=(e,t)=>()=>(e&&(t=e(e=0)),t);var jt=(e,t)=>{for(var r in t)Ne(e,r,{get:t[r],enumerable:!0})},jo=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of No(t))!Ho.call(e,n)&&n!==r&&Ne(e,n,{get:()=>t[n],enumerable:!(a=Oo(t,n))||a.enumerable});return e};var Qo=e=>jo(Ne({},"__esModule",{value:!0}),e);var Me=(e,t,r)=>Wo(e,typeof t!="symbol"?t+"":t,r);function fe(e,t){for(var r in t)e[r]=t[r];return e}function vt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function w(e,t,r){var a,n,i,s={};for(i in t)i=="key"?a=t[i]:i=="ref"?n=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Ye.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Qe(e,s,a,n,null)}function Qe(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?++sr:n,__i:-1,__u:0};return n==null&&W.vnode!=null&&W.vnode(i),i}function re(e){return e.children}function Ue(e,t){this.props=e,this.context=t}function Re(e,t){if(t==null)return e.__?Re(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"?Re(e):null}function la(e){if(e.__P&&e.__d){var t=e.__v,r=t.__e,a=[],n=[],i=fe({},t);i.__v=t.__v+1,W.vnode&&W.vnode(i),yt(e.__P,i,t,e.__n,e.__P.namespaceURI,32&t.__u?[r]:null,a,r==null?Re(t):r,!!(32&t.__u),n),i.__v=t.__v,i.__.__k[i.__i]=i,mr(a,i,n),t.__e=t.__=null,i.__e!=r&&pr(i)}}function pr(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}),pr(e)}function ar(e){(!e.__d&&(e.__d=!0)&&be.push(e)&&!Xe.__r++||or!=W.debounceRendering)&&((or=W.debounceRendering)||lr)(Xe)}function Xe(){try{for(var e,t=1;be.length;)be.length>t&&be.sort(cr),e=be.shift(),t=be.length,la(e)}finally{be.length=Xe.__r=0}}function ur(e,t,r,a,n,i,s,l,d,c,f){var p,u,g,S,C,_,k,R=a&&a.__k||Ge,x=t.length;for(d=ca(r,t,R,d,x),p=0;p<x;p++)(g=r.__k[p])!=null&&(u=g.__i!=-1&&R[g.__i]||Ve,g.__i=p,_=yt(e,g,u,n,i,s,l,d,c,f),S=g.__e,g.ref&&u.ref!=g.ref&&(u.ref&&_t(u.ref,null,g),f.push(g.ref,g.__c||S,g)),C==null&&S!=null&&(C=S),(k=!!(4&g.__u))||u.__k===g.__k?(d=fr(g,d,e,k),k&&u.__e&&(u.__e=null)):typeof g.type=="function"&&_!==void 0?d=_:S&&(d=S.nextSibling),g.__u&=-7);return r.__e=C,d}function ca(e,t,r,a,n){var i,s,l,d,c,f=r.length,p=f,u=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]=Qe(null,s,null,null,null):Je(s)?s=e.__k[i]=Qe(re,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?s=e.__k[i]=Qe(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):e.__k[i]=s,d=i+u,s.__=e,s.__b=e.__b+1,l=null,(c=s.__i=da(s,r,d,p))!=-1&&(p--,(l=r[c])&&(l.__u|=2)),l==null||l.__v==null?(c==-1&&(n>f?u--:n<f&&u++),typeof s.type!="function"&&(s.__u|=4)):c!=d&&(c==d-1?u--:c==d+1?u++:(c>d?u--:u++,s.__u|=4))):e.__k[i]=null;if(p)for(i=0;i<f;i++)(l=r[i])!=null&&(2&l.__u)==0&&(l.__e==a&&(a=Re(l)),gr(l,l));return a}function fr(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=fr(n[i],t,r,a));return t}e.__e!=t&&(a&&(t&&e.type&&!t.parentNode&&(t=Re(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function da(e,t,r,a){var n,i,s,l=e.key,d=e.type,c=t[r],f=c!=null&&(2&c.__u)==0;if(c===null&&l==null||f&&l==c.key&&d==c.type)return r;if(a>(f?1:0)){for(n=r-1,i=r+1;n>=0||i<t.length;)if((c=t[s=n>=0?n--:i++])!=null&&(2&c.__u)==0&&l==c.key&&d==c.type)return s}return-1}function nr(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||sa.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||nr(e.style,t,"");if(r)for(t in r)a&&r[t]==a[t]||nr(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(dr,"$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[Le]=a[Le]:(r[Le]=ht,e.addEventListener(t,i?bt:mt,i)):e.removeEventListener(t,i?bt:mt,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 ir(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t[je]==null)t[je]=ht++;else if(t[je]<r[Le])return;return r(W.event?W.event(t):t)}}}function yt(e,t,r,a,n,i,s,l,d,c){var f,p,u,g,S,C,_,k,R,x,v,b,P,y,F,E=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(d=!!(32&r.__u),i=[l=t.__e=r.__e]),(f=W.__b)&&f(t);e:if(typeof E=="function")try{if(k=t.props,R=E.prototype&&E.prototype.render,x=(f=E.contextType)&&a[f.__c],v=f?x?x.props.value:f.__:a,r.__c?_=(p=t.__c=r.__c).__=p.__E:(R?t.__c=p=new E(k,v):(t.__c=p=new Ue(k,v),p.constructor=E,p.render=ua),x&&x.sub(p),p.state||(p.state={}),p.__n=a,u=p.__d=!0,p.__h=[],p._sb=[]),R&&p.__s==null&&(p.__s=p.state),R&&E.getDerivedStateFromProps!=null&&(p.__s==p.state&&(p.__s=fe({},p.__s)),fe(p.__s,E.getDerivedStateFromProps(k,p.__s))),g=p.props,S=p.state,p.__v=t,u)R&&E.getDerivedStateFromProps==null&&p.componentWillMount!=null&&p.componentWillMount(),R&&p.componentDidMount!=null&&p.__h.push(p.componentDidMount);else{if(R&&E.getDerivedStateFromProps==null&&k!==g&&p.componentWillReceiveProps!=null&&p.componentWillReceiveProps(k,v),t.__v==r.__v||!p.__e&&p.shouldComponentUpdate!=null&&p.shouldComponentUpdate(k,p.__s,v)===!1){t.__v!=r.__v&&(p.props=k,p.state=p.__s,p.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(L){L&&(L.__=t)}),Ge.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&s.push(p);break e}p.componentWillUpdate!=null&&p.componentWillUpdate(k,p.__s,v),R&&p.componentDidUpdate!=null&&p.__h.push(function(){p.componentDidUpdate(g,S,C)})}if(p.context=v,p.props=k,p.__P=e,p.__e=!1,b=W.__r,P=0,R)p.state=p.__s,p.__d=!1,b&&b(t),f=p.render(p.props,p.state,p.context),Ge.push.apply(p.__h,p._sb),p._sb=[];else do p.__d=!1,b&&b(t),f=p.render(p.props,p.state,p.context),p.state=p.__s;while(p.__d&&++P<25);p.state=p.__s,p.getChildContext!=null&&(a=fe(fe({},a),p.getChildContext())),R&&!u&&p.getSnapshotBeforeUpdate!=null&&(C=p.getSnapshotBeforeUpdate(g,S)),y=f!=null&&f.type===re&&f.key==null?br(f.props.children):f,l=ur(e,Je(y)?y:[y],t,r,a,n,i,s,l,d,c),p.base=t.__e,t.__u&=-161,p.__h.length&&s.push(p),_&&(p.__E=p.__=null)}catch(L){if(t.__v=null,d||i!=null)if(L.then){for(t.__u|=d?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;i[i.indexOf(l)]=null,t.__e=l}else{for(F=i.length;F--;)vt(i[F]);gt(t)}else t.__e=r.__e,t.__k=r.__k,L.then||gt(t);W.__e(L,t,r)}else i==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):l=t.__e=pa(r.__e,t,r,a,n,i,s,d,c);return(f=W.diffed)&&f(t),128&t.__u?void 0:l}function gt(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(gt))}function mr(e,t,r){for(var a=0;a<r.length;a++)_t(r[a],r[++a],r[++a]);W.__c&&W.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){W.__e(i,n.__v)}})}function br(e){return typeof e!="object"||e==null||e.__b>0?e:Je(e)?e.map(br):fe({},e)}function pa(e,t,r,a,n,i,s,l,d){var c,f,p,u,g,S,C,_=r.props||Ve,k=t.props,R=t.type;if(R=="svg"?n="http://www.w3.org/2000/svg":R=="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==!!R&&(R?g.localName==R:g.nodeType==3)){e=g,i[c]=null;break}}if(e==null){if(R==null)return document.createTextNode(k);e=document.createElementNS(n,R,k.is&&k),l&&(W.__m&&W.__m(t,i),l=!1),i=null}if(R==null)_===k||l&&e.data==k||(e.data=k);else{if(i=i&&Ye.call(e.childNodes),!l&&i!=null)for(_={},c=0;c<e.attributes.length;c++)_[(g=e.attributes[c]).name]=g.value;for(c in _)g=_[c],c=="dangerouslySetInnerHTML"?p=g:c=="children"||c in k||c=="value"&&"defaultValue"in k||c=="checked"&&"defaultChecked"in k||We(e,c,null,g,n);for(c in k)g=k[c],c=="children"?u=g:c=="dangerouslySetInnerHTML"?f=g:c=="value"?S=g:c=="checked"?C=g:l&&typeof g!="function"||_[c]===g||We(e,c,g,_[c],n);if(f)l||p&&(f.__html==p.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(p&&(e.innerHTML=""),ur(t.type=="template"?e.content:e,Je(u)?u:[u],t,r,a,R=="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:r.__k&&Re(r,0),l,d),i!=null)for(c=i.length;c--;)vt(i[c]);l||(c="value",R=="progress"&&S==null?e.removeAttribute("value"):S!=null&&(S!==e[c]||R=="progress"&&!S||R=="option"&&S!=_[c])&&We(e,c,S,_[c],n),c="checked",C!=null&&C!=e[c]&&We(e,c,C,_[c],n))}return e}function _t(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){W.__e(n,r)}}function gr(e,t,r){var a,n;if(W.unmount&&W.unmount(e),(a=e.ref)&&(a.current&&a.current!=e.__e||_t(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(i){W.__e(i,t)}a.base=a.__P=null}if(a=e.__k)for(n=0;n<a.length;n++)a[n]&&gr(a[n],t,r||typeof e.type!="function");r||vt(e.__e),e.__c=e.__=e.__e=void 0}function ua(e,t,r){return this.constructor(e,r)}function qe(e,t,r){var a,n,i,s;t==document&&(t=document.documentElement),W.__&&W.__(e,t),n=(a=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],yt(t,e=(!a&&r||t).__k=w(re,null,[e]),n||Ve,Ve,t.namespaceURI,!a&&r?[r]:n?null:t.firstChild?Ye.call(t.childNodes):null,i,!a&&r?r:n?n.__e:t.firstChild,a,s),mr(i,e,s)}var Ye,W,sr,na,be,or,lr,cr,ft,je,Le,dr,ht,mt,bt,ia,Ve,Ge,sa,Je,de=ie(()=>{"use strict";Ve={},Ge=[],sa=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Je=Array.isArray;Ye=Ge.slice,W={__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}},sr=0,na=function(e){return e!=null&&e.constructor===void 0},Ue.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=fe({},this.state),typeof e=="function"&&(e=e(fe({},r),this.props)),e&&fe(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),ar(this))},Ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ar(this))},Ue.prototype.render=re,be=[],lr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,cr=function(e,t){return e.__v.__b-t.__v.__b},Xe.__r=0,ft=Math.random().toString(8),je="__d"+ft,Le="__a"+ft,dr=/(PointerCapture)$|Capture$/i,ht=0,mt=ir(!1),bt=ir(!0),ia=0});function et(e,t){X.__h&&X.__h(V,e,Be||t),Be=0;var r=V.__H||(V.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function q(e){return Be=1,fa(Rr,e)}function fa(e,t,r){var a=et(Pe++,2);if(a.t=e,!a.__c&&(a.__=[r?r(t):Rr(void 0,t),function(l){var d=a.__N?a.__N[0]:a.__[0],c=a.t(d,l);d!==c&&(a.__N=[c,a.__[1]],a.__c.setState({}))}],a.__c=V,!V.__f)){var n=function(l,d,c){if(!a.__c.__H)return!0;var f=a.__c.__H.__.filter(function(u){return u.__c});if(f.every(function(u){return!u.__N}))return!i||i.call(this,l,d,c);var p=a.__c.props!==l;return f.some(function(u){if(u.__N){var g=u.__[0];u.__=u.__N,u.__N=void 0,g!==u.__[0]&&(p=!0)}}),i&&i.call(this,l,d,c)||p};V.__f=!0;var i=V.shouldComponentUpdate,s=V.componentWillUpdate;V.componentWillUpdate=function(l,d,c){if(this.__e){var f=i;i=void 0,n(l,d,c),i=f}s&&s.call(this,l,d,c)},V.shouldComponentUpdate=n}return a.__N||a.__}function N(e,t){var r=et(Pe++,3);!X.__s&&St(r.__H,t)&&(r.__=e,r.u=t,V.__H.__h.push(r))}function kt(e,t){var r=et(Pe++,4);!X.__s&&St(r.__H,t)&&(r.__=e,r.u=t,V.__h.push(r))}function U(e){return Be=5,ne(function(){return{current:e}},[])}function ne(e,t){var r=et(Pe++,7);return St(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function me(e,t){return Be=8,ne(function(){return e},t)}function ma(){for(var e;e=Cr.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Ze),t.__h.some(wt),t.__h=[]}catch(r){t.__h=[],X.__e(r,e.__v)}}}function ba(e){var t,r=function(){clearTimeout(a),Sr&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,35);Sr&&(t=requestAnimationFrame(r))}function Ze(e){var t=V,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),V=t}function wt(e){var t=V;e.__c=e.__(),V=t}function St(e,t){return!e||e.length!==t.length||t.some(function(r,a){return r!==e[a]})}function Rr(e,t){return typeof t=="function"?t(e):t}var Pe,V,xt,hr,Be,Cr,X,vr,yr,_r,xr,wr,kr,Sr,oe=ie(()=>{"use strict";de();Be=0,Cr=[],X=W,vr=X.__b,yr=X.__r,_r=X.diffed,xr=X.__c,wr=X.unmount,kr=X.__;X.__b=function(e){V=null,vr&&vr(e)},X.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),kr&&kr(e,t)},X.__r=function(e){yr&&yr(e),Pe=0;var t=(V=e.__c).__H;t&&(xt===V?(t.__h=[],V.__h=[],t.__.some(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.some(Ze),t.__h.some(wt),t.__h=[],Pe=0)),xt=V},X.diffed=function(e){_r&&_r(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Cr.push(t)!==1&&hr===X.requestAnimationFrame||((hr=X.requestAnimationFrame)||ba)(ma)),t.__H.__.some(function(r){r.u&&(r.__H=r.u),r.u=void 0})),xt=V=null},X.__c=function(e,t){t.some(function(r){try{r.__h.some(Ze),r.__h=r.__h.filter(function(a){return!a.__||wt(a)})}catch(a){t.some(function(n){n.__h&&(n.__h=[])}),t=[],X.__e(a,r.__v)}}),xr&&xr(e,t)},X.unmount=function(e){wr&&wr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.some(function(a){try{Ze(a)}catch(n){t=n}}),r.__H=void 0,t&&X.__e(t,r.__v))};Sr=typeof requestAnimationFrame=="function"});function to(e){return e==="en"?Sn:kn}var kn,Sn,ro=ie(()=>{"use strict";kn={"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."},Sn={"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 Tt(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 Cn(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 ao(e,t){let r=oo(Tt(e)),a=null,n=-1;for(let i of t){let s=oo(i);if(!Cn(r,s))continue;let d=s.filter(c=>!c.startsWith(":")).length*100+s.length;d>n&&(a=i,n=d)}return a}var oo,Mt=ie(()=>{"use strict";oo=e=>e.split("/").filter(Boolean)});var no,io=ie(()=>{"use strict";no=`
|
|
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 Ee(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function me(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function Je(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function Ze(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 et(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var Pe,Ur,Vr,Gr,Xr,tt=te(()=>{"use strict";Pe={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},Ur={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},Vr={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},Gr={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},Xr={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function Yr({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[Ur[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return y("div",{class:"qa-pastille"},y("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${Pe[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},y("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},y("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 Jr=te(()=>{"use strict";ie();tt()});function Te({dev:e,bot:t,human:r,strings:a}){return y("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},y("span",{class:`qa-lanes__icon qa-lane ${kt[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},y("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},y("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"}))),y("span",{class:`qa-lanes__icon qa-lane ${kt[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},y("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"},y("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),y("path",{d:"M12 4.5v4"}),y("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),y("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),y("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),y("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),y("span",{class:`qa-lanes__icon qa-lane ${kt[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},y("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"},y("circle",{cx:"12",cy:"8",r:"3.6"}),y("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var kt,St=te(()=>{"use strict";ie();kt={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function un(e){return{dev:me(e.dev),bot:Ee(e.automated),human:me(e.client)}}function fn(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,m;let l=t.get(s);return{key:s,label:(m=(c=(p=l[0])==null?void 0:p.group)==null?void 0:c.label)!=null?m:"",scenarios:l}})}function Zr(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function eo({scenario:e,strings:t}){let r=un(e),a=e.automated.provenance;return y("li",{class:"qa-row","data-testid":"qa-scenario-row"},y("span",{class:"qa-row__title"},e.priority?y("span",{class:`qa-tag ${Vr[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,y("span",{class:"qa-row__name"},e.title),e.source==="testgen"?y("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?y("span",{class:"qa-tag"},t[Gr[e.caseStatus]]):null,e.grounding?y("span",{class:"qa-tag"},t[Xr[e.grounding]]):null,a?y("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),y(Te,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function to({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=P(new Set),s=m=>{i(d=>{let f=new Set(d);return f.has(m)?f.delete(m):f.add(m),f})},l=Zr(a["panel.freshness"],{date:Ze(r.generated_at),version:et(r.app_version),env:r.environment}),p;if(t==="no-tests")p=y("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")p=y("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let m=(c=e==null?void 0:e.scenarios)!=null?c:[],d=m.some(f=>f.group);if(m.length===0)p=y("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!d)p=y("ul",{class:"qa-panel__list"},m.map(f=>y(eo,{key:f.id,scenario:f,strings:a})));else{let f=fn(m);p=y("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},f.map(g=>{let k=n.has(g.key),C={dev:Je(g.scenarios.map(h=>me(h.dev))),bot:Je(g.scenarios.map(h=>Ee(h.automated))),human:Je(g.scenarios.map(h=>me(h.client)))};return y("li",{key:g.key,class:"qa-suite","data-testid":"qa-panel-group"},y("button",{type:"button",class:"qa-suite__head","aria-expanded":k,"data-testid":"qa-suite-group",onClick:()=>s(g.key)},y("span",{class:`qa-suite__chev ${k?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),y("span",{class:"qa-suite__key"},g.key),y("span",{class:"qa-suite__label"},g.label),y("span",{class:"qa-suite__count"},Zr(a["suite.cases"],{count:g.scenarios.length})),y(Te,{dev:C.dev,bot:C.bot,human:C.human,strings:a})),k?y("ul",{class:"qa-suite__list"},g.scenarios.map(h=>y(eo,{key:h.id,scenario:h,strings:a}))):null)}))}}return y("section",{class:"qa-panel","data-testid":"qa-panel"},p,y("footer",{class:"qa-panel__foot"},y("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var ro=te(()=>{"use strict";ie();Z();St();tt()});function mn(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 m=(p=t.get(c.id))!=null?p:[];r.push({node:c,depth:s,hasChildren:m.length>0}),m.length>0&&a(c.id,s+1)}};return a(null,0),r}function bn(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 m of(i=l.pages)!=null?i:[])(m.role==="primary"?c.primaries:c.traversed).add(m.pattern);t.set(p,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var m,d,f,g;let p=(d=(m=s.scenario.group)==null?void 0:m.key)!=null?d:"~",c=(g=(f=l.scenario.group)==null?void 0:f.key)!=null?g:"~";return p!==c?p.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function oo(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function ao(e){return`${Math.round(e)}%`}function no({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=P("pages"),[s,l]=P("");H(()=>{let h=w=>{w.key==="Escape"&&a()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[a]);let p=t?xt(t):null,c=re(()=>mn(e.sitemap),[e]),m=re(()=>bn(e),[e]),d=re(()=>{let h=new Map;for(let w of e.sitemap)h.set(w.path_pattern,w.title);return h},[e]),f=h=>{var w;return(w=d.get(h))!=null?w:h},g=s.trim().toLowerCase(),k=g?m.filter(h=>{var w,R;return h.scenario.title.toLowerCase().includes(g)||((R=(w=h.scenario.group)==null?void 0:w.label)!=null?R:"").toLowerCase().includes(g)}):m,C=oo(r["panel.freshness"],{date:Ze(e.generated_at),version:et(e.app_version),env:e.environment});return y("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:h=>{h.target===h.currentTarget&&a()}},y("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},y("header",{class:"qa-modal__head"},y("h3",null,r["modal.title"]),y("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),y("div",{class:"qa-modal__freshness"},C),y("div",{class:"qa-kpi","data-testid":"qa-kpi"},y("div",{class:"qa-kpi__item"},y("span",{class:"qa-kpi__value"},ao(e.metric.pages_with_scenarios_pct)),y("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),y("div",{class:"qa-kpi__item"},y("span",{class:"qa-kpi__value"},ao(e.metric.scenarios_passing_pct)),y("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),y("nav",{class:"qa-tabs"},y("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),y("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),y("div",{class:"qa-modal__body"},n==="pages"?y("ul",{class:"qa-tree"},c.map(h=>{let w=p!==null&&h.node.path_pattern===p;return y("li",{key:h.node.id,class:`qa-tree__row ${w?"qa-tree__row--here":""}`,"data-testid":w?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+h.depth*1.1}rem`}},y("span",{class:`qa-dot ${Pe[h.node.color]}`,"aria-hidden":"true"}),y("span",{class:`qa-tree__title ${h.node.structural?"qa-tree__title--structural":""}`},h.node.title||h.node.path_pattern),w?y("span",{class:"qa-tree__here"},` ${h.node.path_pattern} `):null,w?y("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,y("span",{class:"qa-tree__count"},String(h.node.counts.scenarios)))})):y("div",{class:"qa-scenarios"},y("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:h=>l(h.target.value)}),k.length===0?y("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):y("ul",{class:"qa-scenarios__list"},k.map(h=>{var v,b;let w=h.scenario,R={dev:me(w.dev),bot:Ee(w.automated),human:me(w.client)},x=[...h.traversed].map(f);return y("li",{key:(v=w.external_key)!=null?v:w.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},y("div",{class:"qa-scenarios__line"},y("span",{class:`qa-dot ${Pe[w.color]}`,"aria-hidden":"true"}),(b=w.group)!=null&&b.key?y("span",{class:"qa-suitekey"},w.group.key):null,y("span",{class:"qa-scenarios__title"},w.title),w.source==="testgen"?y("span",{class:"qa-tag"},r["source.testgen"]):null,y(Te,{dev:R.dev,bot:R.bot,human:R.human,strings:r})),y("div",{class:"qa-scenarios__pages"},h.primaries.size?y("span",{class:"qa-scenarios__primary"},oo(r["modal.appliesTo"],{count:h.primaries.size})):null,x.length?y("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${x.join(", ")}`):null))}))))))}var io=te(()=>{"use strict";ie();Z();St();wt();tt()});function gn(){if(rt++,ot)return;ot=!0,Ae=history.pushState,Me=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(Ct))};history.pushState=function(...r){let a=Ae.apply(this,r);return e(),a},history.replaceState=function(...r){let a=Me.apply(this,r);return e(),a}}function hn(){rt>0&&rt--,!(rt>0||!ot)&&(ot=!1,Ae&&(history.pushState=Ae),Me&&(history.replaceState=Me),Ae=null,Me=null)}function so(e){return typeof e=="object"&&e!==null&&e.format===vn}function co(){lo||(lo=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function _n(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 wn(e,t){if(!e||!t)return xn;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 po(e){var _,F,E,B;let{source:t}=e,r=Nr((_=e.locale)!=null?_:"fr"),a=typeof t=="object"?t:null;if(a&&!so(a))return co(),yn;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(I=>I.json()):Promise.resolve(t)).then(I=>{so(I)?(n=I,f()):co()}).catch(()=>{})}let p=document.createElement("div");p.setAttribute("data-mqa-host",""),p.setAttribute("data-mqa-size",(F=e.size)!=null?F:"md"),((E=e.position)==null?void 0:E.right)!==void 0&&p.style.setProperty("--mqa-right",`${e.position.right}px`),((B=e.position)==null?void 0:B.bottom)!==void 0&&p.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(p);let c=p.attachShadow({mode:"open"}),m=document.createElement("style");m.textContent=Qr,c.appendChild(m);let d=document.createElement("div");c.appendChild(d);let f=()=>{};function g(){return e.getCurrentPage?e.getCurrentPage():n?jr(window.location.pathname,_n(n)):null}function k(){let[D,I]=P(0),N=de(()=>I(W=>W+1),[]);f=N;let M=wn(n,g()),$=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},L=de(()=>{l()},[]),O=de(()=>{l(),C=!0,N()},[]),Q=de(()=>{C=!1,N()},[]);return H(()=>{let W=()=>N();return window.addEventListener("popstate",W),window.addEventListener(Ct,W),()=>{window.removeEventListener("popstate",W),window.removeEventListener(Ct,W)}},[]),y("div",{class:"qa-pastille-wrap",onMouseEnter:x,onMouseLeave:v},h?y("div",{class:"qa-panel-anchor"},y(to,{page:M.page,state:M.state,meta:$,strings:r})):null,y(Yr,{color:M.color,state:M.state,strings:r,onHover:()=>{x(),h=!0,L(),N()},onOpenModal:O}),C&&n?y(no,{artifact:n,currentPattern:M.pattern,strings:r,onClose:Q}):null)}let C=!1,h=!1,w=null,R=140;function x(){w!==null&&(clearTimeout(w),w=null)}function v(){x(),w=setTimeout(()=>{w=null,!q&&(h=!1,f())},R)}function b(){_e(y(k,{}),d)}b(),gn();let q=!1;return{open(){q||(l(),C=!0,f())},close(){q||(C=!1,f())},dispose(){q||(q=!0,x(),_e(null,d),p.remove(),hn())}}}var Ct,ot,rt,Ae,Me,vn,lo,yn,xn,uo=te(()=>{"use strict";ie();Z();Or();wt();Wr();Jr();ro();io();Ct="mqa:locationchange",ot=!1,rt=0,Ae=null,Me=null;vn=1;lo=!1;yn={open(){},close(){},dispose(){}};xn={state:"unknown-page",color:"gray",pattern:null,page:null}});var fo={};Bt(fo,{createQaMeter:()=>kn});function kn(e){return po(e)}var mo=te(()=>{"use strict";uo()});var qn={};Bt(qn,{configFromDataset:()=>yo});var zo=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function Bo(e){let t;try{t=new URL(e)}catch(r){throw new Error(`[mhosaic-feedback] \`endpoint\` is not a valid URL: ${e}`)}if(t.protocol!=="https:"&&!(t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]")))throw new Error(`[mhosaic-feedback] \`endpoint\` must use https:// (got ${t.protocol}//${t.hostname}). http:// is only allowed for localhost in dev.`)}var Ce=class extends Error{constructor(r){super(`rate limited; retry after ${r}s`);Se(this,"retryAfterSeconds");this.name="RateLimitError",this.retryAfterSeconds=r}};function Fo(e){let t=e.headers.get("Retry-After"),r=t?Number.parseInt(t,10):NaN;return Number.isFinite(r)&&r>=0?r:0}async function It(e,t){if(e.status===429)throw new Ce(Fo(e));if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`${t} failed: ${e.status} ${r}`)}}async function Ft(e,t){await It(e,t);let r=await e.json().catch(()=>{});if(!Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an array)`);return r}async function ze(e,t){await It(e,t);let r=await e.json().catch(()=>{});if(r===null||typeof r!="object"||Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an object)`);return r}function Dt(e){var w,R;let t=((w=e.endpoint)!=null?w:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');Bo(t);let r=(R=e.fetch)!=null?R:globalThis.fetch;async function a(x){var B,D,I,N;let v=x;if(e.beforeSend&&(v=await e.beforeSend(x)),v===!1)throw new Error("Submission cancelled by beforeSend");let b=new FormData;for(let M of zo)b.append(M,String(v[M]));b.append("technical_context",JSON.stringify(v.technical_context)),((B=v.screenshots)!=null&&B.length?v.screenshots:v.screenshot?[v.screenshot]:[]).forEach((M,$)=>{b.append("screenshot",M,$===0?"screenshot.png":`screenshot-${$+1}.png`)}),v.synthetic&&b.append("synthetic","true"),(D=v.user)!=null&&D.id&&b.append("user",JSON.stringify(v.user)),v.widget_version&&b.append("widget_version",v.widget_version),v.page_path&&b.append("page_path",v.page_path);let _={Authorization:`Bearer ${e.apiKey}`};v.synthetic&&(_["X-Mhosaic-Capture-Source"]="error-tracking");let F=(I=e.getSignedIdentity)==null?void 0:I.call(e);F&&F.userHash&&F.exp&&((N=v.user)!=null&&N.id)&&(_["X-Mhosaic-User"]=String(v.user.id),_["X-Mhosaic-User-Hmac"]=F.userHash,_["X-Mhosaic-User-Exp"]=String(F.exp),F.email&&(_["X-Mhosaic-User-Email"]=F.email));let E=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:_,body:b});if(!E.ok){let M=await E.text().catch(()=>"");throw new Error(`Feedback submit failed: ${E.status} ${M}`)}return E.json()}function n(x){var q;let v={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":x},b=(q=e.getSignedIdentity)==null?void 0:q.call(e);return b&&b.userHash&&b.exp&&(v["X-Mhosaic-User-Hmac"]=b.userHash,v["X-Mhosaic-User-Exp"]=String(b.exp),b.email&&(v["X-Mhosaic-User-Email"]=b.email)),v}async function i(x){let v=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(x)});return v.status===404?[]:Ft(v,"listMine")}async function s(x){let v=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(x)});return v.status===404?[]:Ft(v,"listChangelog")}async function l(x,v){let b=await r(`${t}/api/feedback/v1/reports/widget/${x}/`,{method:"GET",headers:n(v)});return ze(b,"getReport")}async function p(x,v){let b=await r(`${t}/api/feedback/v1/reports/widget/by-seq/${x}/`,{method:"GET",headers:n(v)});return ze(b,"getReportBySeq")}async function c(x,v,b,q,_){let F;if(_&&_.length>0){let B=new FormData;B.append("body",b),q!==void 0&&B.append("client_nonce",q),_.forEach((D,I)=>B.append("attachment",D,`attachment-${I+1}.png`)),F={method:"POST",headers:n(v),body:B}}else F={method:"POST",headers:{...n(v),"Content-Type":"application/json"},body:JSON.stringify({body:b,...q!==void 0&&{client_nonce:q}})};let E=await r(`${t}/api/feedback/v1/reports/widget/${x}/comments/`,F);if(!E.ok){let B=await E.text().catch(()=>"");throw new Error(`addComment failed: ${E.status} ${B}`)}return E.json()}async function m(x,v,b){let q=await r(`${t}/api/feedback/v1/reports/widget/${x}/`,{method:"PATCH",headers:{...n(v),"Content-Type":"application/json"},body:JSON.stringify({description:b})});if(!q.ok){let _=await q.text().catch(()=>"");throw new Error(`editDescription failed: ${q.status} ${_}`)}return q.json()}async function d(x,v){let b=await r(`${t}/api/feedback/v1/reports/widget/${x}/`,{method:"PATCH",headers:{...n(v),"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 f(x,v){let b=await r(`${t}/api/feedback/v1/reports/widget/${x}/`,{method:"PATCH",headers:{...n(v),"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 g(x){var q,_,F;if(!x)return"";let v=new URLSearchParams;(q=x.status)==null||q.forEach(E=>v.append("status",E)),(_=x.type)==null||_.forEach(E=>v.append("type",E)),(F=x.severity)==null||F.forEach(E=>v.append("severity",E)),x.q&&v.set("q",x.q),x.mine&&v.set("mine","1"),x.ordering&&v.set("ordering",x.ordering),x.page&&x.page>1&&v.set("page",String(x.page)),x.pagePath&&v.set("page_path",x.pagePath);let b=v.toString();return b?`?${b}`:""}async function k(x,v){let b=await r(`${t}/api/feedback/v1/reports/widget/board/${g(v)}`,{method:"GET",headers:n(x)});if(b.status===404)return{count:0,next:null,previous:null,results:[]};let q=await ze(b,"listBoard");if(!Array.isArray(q.results))throw new Error("listBoard: unexpected response shape (missing results[])");return q}async function C(x,v){let b=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${g(v)}`,{method:"GET",headers:n(x)});return b.status===404?{total:0,by_status:{},resolution_rate:0,scope:"mine"}:ze(b,"fetchBoardKpis")}async function h(x,v){let b=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(x),"Content-Type":"application/json"},body:JSON.stringify({external_id:x,...v?{email:v}:{}})});if(!b.ok)throw new Error(`checkVisibility failed: ${b.status}`);return!!(await b.json()).show}return{submitReport:a,checkVisibility:h,listMine:i,listChangelog:s,getReport:l,getReportBySeq:p,addComment:c,editDescription:m,closeAsResolved:d,reopenUnresolved:f,listBoard:k,fetchBoardKpis:C}}var Io=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Do=[/^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 $o(e){return Do.some(t=>t.test(e))}function be(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)=>{Io.test(l)||$o(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 Ho=[/\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 ae(e){let t=e;for(let r of Ho)t=t.replace(r,"[redacted-token]");return t}function $t(){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?be(a):void 0,i=be(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:ae(document.title||"").slice(0,200),pathname:s}}function No(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 Ht(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(No).join(" "),p=ae(l).slice(0,2e3),c={level:a,message:p,ts:Date.now()};if(a==="error"){let m=new Error().stack;m&&(c.stack=m.split(`
|
|
616
|
+
`});function Ie(e){return e.status==="passing"?"green":e.status==="failing"||e.status==="flaky"?"yellow":"gray"}function he(e){return e.rejected?"yellow":e.validated?e.stale?"gray":"green":"gray"}function it(e){return e.some(t=>t==="yellow")?"yellow":e.length>0&&e.every(t=>t==="green")?"green":"gray"}function st(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat("fr-CA",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(t)}function lt(e){return e?e.length>19?`${e.slice(0,19)}\u2026`:e:""}var Fe,so,lo,co,po,ct=ie(()=>{"use strict";Fe={green:"qa--green",yellow:"qa--yellow",red:"qa--red",gray:"qa--gray"},so={green:"color.green",yellow:"color.yellow",red:"color.red",gray:"color.gray"},lo={P0:"qa-prio--p0",P1:"qa-prio--p1",P2:"qa-prio--p2",P3:"qa-prio--p3"},co={covered:"case.covered",manual:"case.manual",blocked:"case.blocked","open-question":"case.openQuestion"},po={verified:"grounding.verified","confirm-live":"grounding.confirmLive","product-question":"grounding.productQuestion"}});function uo({color:e,state:t,strings:r,onOpenModal:a,onHover:n}){let i=r["pastille.label"],s=r[so[e]];t==="no-tests"?s=r["panel.noTests"]:t==="unknown-page"&&(s=r["pastille.unknownPage"]);let l=`${i} \u2014 ${s}`;return w("div",{class:"qa-pastille"},w("button",{type:"button","data-testid":"qa-pastille",class:`qa-pastille__dot ${Fe[e]}`,"aria-label":l,title:l,onClick:a,onMouseEnter:n,onFocus:n},w("svg",{class:"qa-pastille__ecg",viewBox:"0 0 24 12","aria-hidden":"true"},w("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 fo=ie(()=>{"use strict";de();ct()});function De({dev:e,bot:t,human:r,strings:a}){return w("span",{class:"qa-lanes","data-testid":"qa-lane-icons"},w("span",{class:`qa-lanes__icon qa-lane ${At[e]}`,title:a["lane.code"],"aria-label":a["lane.code"],"data-testid":"qa-lane-dev","data-state":e},w("svg",{class:"qa-lanes__svg",viewBox:"0 0 24 24","aria-hidden":"true"},w("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"}))),w("span",{class:`qa-lanes__icon qa-lane ${At[t]}`,title:a["lane.bot"],"aria-label":a["lane.bot"],"data-testid":"qa-lane-bot","data-state":t},w("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"},w("rect",{x:"4.5",y:"8.5",width:"15",height:"10.5",rx:"2.5"}),w("path",{d:"M12 4.5v4"}),w("circle",{cx:"12",cy:"3.4",r:"1.3",fill:"currentColor",stroke:"none"}),w("path",{d:"M2.5 12.5v3M21.5 12.5v3"}),w("circle",{cx:"9",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}),w("circle",{cx:"15",cy:"13.5",r:"1.2",fill:"currentColor",stroke:"none"}))),w("span",{class:`qa-lanes__icon qa-lane ${At[r]}`,title:a["lane.human"],"aria-label":a["lane.human"],"data-testid":"qa-lane-client","data-state":r},w("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"},w("circle",{cx:"12",cy:"8",r:"3.6"}),w("path",{d:"M5 20c0-3.6 3.1-6 7-6s7 2.4 7 6"}))))}var At,Lt=ie(()=>{"use strict";de();At={green:"qa--green",yellow:"qa--yellow",gray:"qa--gray"}});function Rn(e){return{dev:he(e.dev),bot:Ie(e.automated),human:he(e.client)}}function qn(e){var a,n,i;let t=new Map;for(let s of e){let l=(n=(a=s.group)==null?void 0:a.key)!=null?n:"\xB7",d=(i=t.get(l))!=null?i:[];d.push(s),t.set(l,d)}return[...t.keys()].sort((s,l)=>s==="X"?1:l==="X"?-1:s.localeCompare(l)).map(s=>{var d,c,f;let l=t.get(s);return{key:s,label:(f=(c=(d=l[0])==null?void 0:d.group)==null?void 0:c.label)!=null?f:"",scenarios:l}})}function mo(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function bo({scenario:e,strings:t}){let r=Rn(e),a=e.automated.provenance;return w("li",{class:"qa-row","data-testid":"qa-scenario-row"},w("span",{class:"qa-row__title"},e.priority?w("span",{class:`qa-tag ${lo[e.priority]}`,"data-testid":"qa-priority"},e.priority):null,w("span",{class:"qa-row__name"},e.title),e.source==="testgen"?w("span",{class:"qa-tag",title:t["source.testgenHint"]},t["source.testgen"]):null,e.caseStatus?w("span",{class:"qa-tag"},t[co[e.caseStatus]]):null,e.grounding?w("span",{class:"qa-tag"},t[po[e.grounding]]):null,a?w("span",{class:"qa-tag","data-testid":"qa-provenance"},a):null),w(De,{dev:r.dev,bot:r.bot,human:r.human,strings:t}))}function go({page:e,state:t,meta:r,strings:a}){var c;let[n,i]=q(new Set),s=f=>{i(p=>{let u=new Set(p);return u.has(f)?u.delete(f):u.add(f),u})},l=mo(a["panel.freshness"],{date:st(r.generated_at),version:lt(r.app_version),env:r.environment}),d;if(t==="no-tests")d=w("p",{class:"qa-panel__empty"},a["panel.noTests"]);else if(t==="unknown-page")d=w("p",{class:"qa-panel__empty"},a["panel.unknownPage"]);else{let f=(c=e==null?void 0:e.scenarios)!=null?c:[],p=f.some(u=>u.group);if(f.length===0)d=w("p",{class:"qa-panel__empty"},a["panel.noScenarios"]);else if(!p)d=w("ul",{class:"qa-panel__list"},f.map(u=>w(bo,{key:u.id,scenario:u,strings:a})));else{let u=qn(f);d=w("ul",{class:"qa-panel__groups","data-testid":"qa-suite-groups"},u.map(g=>{let S=n.has(g.key),C={dev:it(g.scenarios.map(_=>he(_.dev))),bot:it(g.scenarios.map(_=>Ie(_.automated))),human:it(g.scenarios.map(_=>he(_.client)))};return w("li",{key:g.key,class:"qa-suite","data-testid":"qa-panel-group"},w("button",{type:"button",class:"qa-suite__head","aria-expanded":S,"data-testid":"qa-suite-group",onClick:()=>s(g.key)},w("span",{class:`qa-suite__chev ${S?"is-open":""}`,"aria-hidden":"true"},"\u25B8"),w("span",{class:"qa-suite__key"},g.key),w("span",{class:"qa-suite__label"},g.label),w("span",{class:"qa-suite__count"},mo(a["suite.cases"],{count:g.scenarios.length})),w(De,{dev:C.dev,bot:C.bot,human:C.human,strings:a})),S?w("ul",{class:"qa-suite__list"},g.scenarios.map(_=>w(bo,{key:_.id,scenario:_,strings:a}))):null)}))}}return w("section",{class:"qa-panel","data-testid":"qa-panel"},d,w("footer",{class:"qa-panel__foot"},w("span",{class:"qa-panel__count",title:l,"data-testid":"qa-panel-freshness"},l)))}var ho=ie(()=>{"use strict";de();oe();Lt();ct()});function Pn(e){var n;let t=new Map;for(let i of e){let s=(n=t.get(i.parent_id))!=null?n:[];s.push(i),t.set(i.parent_id,s)}for(let i of t.values())i.sort((s,l)=>s.order-l.order);let r=[],a=(i,s)=>{var l,d;for(let c of(l=t.get(i))!=null?l:[]){let f=(d=t.get(c.id))!=null?d:[];r.push({node:c,depth:s,hasChildren:f.length>0}),f.length>0&&a(c.id,s+1)}};return a(null,0),r}function En(e){var a,n,i;let t=new Map;for(let s of e.pages)for(let l of s.scenarios){let d=(a=l.external_key)!=null?a:l.id,c=(n=t.get(d))!=null?n:{scenario:l,primaries:new Set,traversed:new Set};for(let f of(i=l.pages)!=null?i:[])(f.role==="primary"?c.primaries:c.traversed).add(f.pattern);t.set(d,c)}let r=s=>s?Number(s.slice(1)):9;return[...t.values()].sort((s,l)=>{var f,p,u,g;let d=(p=(f=s.scenario.group)==null?void 0:f.key)!=null?p:"~",c=(g=(u=l.scenario.group)==null?void 0:u.key)!=null?g:"~";return d!==c?d.localeCompare(c):r(s.scenario.priority)-r(l.scenario.priority)||s.scenario.title.localeCompare(l.scenario.title)})}function vo(e,t){return e.replace(/\{(\w+)\}/g,(r,a)=>{var n;return String((n=t[a])!=null?n:"")})}function yo(e){return`${Math.round(e)}%`}function _o({artifact:e,currentPattern:t,strings:r,onClose:a}){let[n,i]=q("pages"),[s,l]=q("");N(()=>{let _=k=>{k.key==="Escape"&&a()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[a]);let d=t?Tt(t):null,c=ne(()=>Pn(e.sitemap),[e]),f=ne(()=>En(e),[e]),p=ne(()=>{let _=new Map;for(let k of e.sitemap)_.set(k.path_pattern,k.title);return _},[e]),u=_=>{var k;return(k=p.get(_))!=null?k:_},g=s.trim().toLowerCase(),S=g?f.filter(_=>{var k,R;return _.scenario.title.toLowerCase().includes(g)||((R=(k=_.scenario.group)==null?void 0:k.label)!=null?R:"").toLowerCase().includes(g)}):f,C=vo(r["panel.freshness"],{date:st(e.generated_at),version:lt(e.app_version),env:e.environment});return w("div",{class:"qa-modal__backdrop","data-testid":"qa-sitemap-modal",onClick:_=>{_.target===_.currentTarget&&a()}},w("div",{class:"qa-modal",role:"dialog","aria-modal":"true"},w("header",{class:"qa-modal__head"},w("h3",null,r["modal.title"]),w("button",{type:"button",class:"qa-modal__close",title:r["modal.close"],"aria-label":r["modal.close"],"data-testid":"qa-modal-close",onClick:a},"\xD7")),w("div",{class:"qa-modal__freshness"},C),w("div",{class:"qa-kpi","data-testid":"qa-kpi"},w("div",{class:"qa-kpi__item"},w("span",{class:"qa-kpi__value"},yo(e.metric.pages_with_scenarios_pct)),w("span",{class:"qa-kpi__label"},r["modal.kpiPagesCovered"])),w("div",{class:"qa-kpi__item"},w("span",{class:"qa-kpi__value"},yo(e.metric.scenarios_passing_pct)),w("span",{class:"qa-kpi__label"},r["modal.kpiScenariosPassing"]))),w("nav",{class:"qa-tabs"},w("button",{type:"button",class:`qa-tabs__tab ${n==="pages"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-pages",onClick:()=>i("pages")},r["modal.tabPages"]),w("button",{type:"button",class:`qa-tabs__tab ${n==="scenarios"?"qa-tabs__tab--active":""}`,"data-testid":"qa-tab-scenarios",onClick:()=>i("scenarios")},r["modal.tabScenarios"])),w("div",{class:"qa-modal__body"},n==="pages"?w("ul",{class:"qa-tree"},c.map(_=>{let k=d!==null&&_.node.path_pattern===d;return w("li",{key:_.node.id,class:`qa-tree__row ${k?"qa-tree__row--here":""}`,"data-testid":k?"qa-tree-current":"qa-sitemap-node",style:{paddingLeft:`${.5+_.depth*1.1}rem`}},w("span",{class:`qa-dot ${Fe[_.node.color]}`,"aria-hidden":"true"}),w("span",{class:`qa-tree__title ${_.node.structural?"qa-tree__title--structural":""}`},_.node.title||_.node.path_pattern),k?w("span",{class:"qa-tree__here"},` ${_.node.path_pattern} `):null,k?w("span",{class:"qa-tree__here"},r["modal.youAreHere"]):null,w("span",{class:"qa-tree__count"},String(_.node.counts.scenarios)))})):w("div",{class:"qa-scenarios"},w("input",{type:"search",class:"qa-scenarios__search",placeholder:r["modal.search"],"data-testid":"qa-scenarios-search",value:s,onInput:_=>l(_.target.value)}),S.length===0?w("p",{class:"qa-scenarios__empty"},r["modal.noMatch"]):w("ul",{class:"qa-scenarios__list"},S.map(_=>{var v,b;let k=_.scenario,R={dev:he(k.dev),bot:Ie(k.automated),human:he(k.client)},x=[..._.traversed].map(u);return w("li",{key:(v=k.external_key)!=null?v:k.id,class:"qa-scenarios__item","data-testid":"qa-scenario-row"},w("div",{class:"qa-scenarios__line"},w("span",{class:`qa-dot ${Fe[k.color]}`,"aria-hidden":"true"}),(b=k.group)!=null&&b.key?w("span",{class:"qa-suitekey"},k.group.key):null,w("span",{class:"qa-scenarios__title"},k.title),k.source==="testgen"?w("span",{class:"qa-tag"},r["source.testgen"]):null,w(De,{dev:R.dev,bot:R.bot,human:R.human,strings:r})),w("div",{class:"qa-scenarios__pages"},_.primaries.size?w("span",{class:"qa-scenarios__primary"},vo(r["modal.appliesTo"],{count:_.primaries.size})):null,x.length?w("span",{class:"qa-scenarios__traversed"},`${r["modal.traversed"]}: ${x.join(", ")}`):null))}))))))}var xo=ie(()=>{"use strict";de();oe();Lt();Mt();ct()});function Tn(){if(dt++,pt)return;pt=!0,$e=history.pushState,Ke=history.replaceState;let e=()=>{window.dispatchEvent(new CustomEvent(Bt))};history.pushState=function(...r){let a=$e.apply(this,r);return e(),a},history.replaceState=function(...r){let a=Ke.apply(this,r);return e(),a}}function Mn(){dt>0&&dt--,!(dt>0||!pt)&&(pt=!1,$e&&(history.pushState=$e),Ke&&(history.replaceState=Ke),$e=null,Ke=null)}function wo(e){return typeof e=="object"&&e!==null&&e.format===An}function So(){ko||(ko=!0,typeof console!="undefined"&&console.warn("[mqa] QA Meter artifact has an unsupported `format` \u2014 refusing to mount."))}function Bn(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 Fn(e,t){if(!e||!t)return zn;let r=e.pages.find(n=>n.page&&n.page.path_pattern===t);return r&&r.page?{state:"known",color:r.color,pattern:t,page:r}:e.sitemap.some(n=>n.path_pattern===t)?{state:"no-tests",color:"gray",pattern:t,page:null}:{state:"unknown-page",color:"gray",pattern:t,page:null}}function Co(e){var y,F,E,L;let{source:t}=e,r=to((y=e.locale)!=null?y:"fr"),a=typeof t=="object"?t:null;if(a&&!wo(a))return So(),Ln;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(I=>I.json()):Promise.resolve(t)).then(I=>{wo(I)?(n=I,u()):So()}).catch(()=>{})}let d=document.createElement("div");d.setAttribute("data-mqa-host",""),d.setAttribute("data-mqa-size",(F=e.size)!=null?F:"md"),((E=e.position)==null?void 0:E.right)!==void 0&&d.style.setProperty("--mqa-right",`${e.position.right}px`),((L=e.position)==null?void 0:L.bottom)!==void 0&&d.style.setProperty("--mqa-bottom",`${e.position.bottom}px`),document.body.appendChild(d);let c=d.attachShadow({mode:"open"}),f=document.createElement("style");f.textContent=no,c.appendChild(f);let p=document.createElement("div");c.appendChild(p);let u=()=>{};function g(){return e.getCurrentPage?e.getCurrentPage():n?ao(window.location.pathname,Bn(n)):null}function S(){let[D,I]=q(0),Q=me(()=>I(J=>J+1),[]);u=Q;let A=Fn(n,g()),O=n?{generated_at:n.generated_at,app_version:n.app_version,environment:n.environment}:{generated_at:"",app_version:"",environment:""},H=me(()=>{l()},[]),Y=me(()=>{l(),C=!0,Q()},[]),ee=me(()=>{C=!1,Q()},[]);return N(()=>{let J=()=>Q();return window.addEventListener("popstate",J),window.addEventListener(Bt,J),()=>{window.removeEventListener("popstate",J),window.removeEventListener(Bt,J)}},[]),w("div",{class:"qa-pastille-wrap",onMouseEnter:x,onMouseLeave:v},_?w("div",{class:"qa-panel-anchor"},w(go,{page:A.page,state:A.state,meta:O,strings:r})):null,w(uo,{color:A.color,state:A.state,strings:r,onHover:()=>{x(),_=!0,H(),Q()},onOpenModal:Y}),C&&n?w(_o,{artifact:n,currentPattern:A.pattern,strings:r,onClose:ee}):null)}let C=!1,_=!1,k=null,R=140;function x(){k!==null&&(clearTimeout(k),k=null)}function v(){x(),k=setTimeout(()=>{k=null,!P&&(_=!1,u())},R)}function b(){qe(w(S,{}),p)}b(),Tn();let P=!1;return{open(){P||(l(),C=!0,u())},close(){P||(C=!1,u())},dispose(){P||(P=!0,x(),qe(null,p),d.remove(),Mn())}}}var Bt,pt,dt,$e,Ke,An,ko,Ln,zn,Ro=ie(()=>{"use strict";de();oe();ro();Mt();io();fo();ho();xo();Bt="mqa:locationchange",pt=!1,dt=0,$e=null,Ke=null;An=1;ko=!1;Ln={open(){},close(){},dispose(){}};zn={state:"unknown-page",color:"gray",pattern:null,page:null}});var qo={};jt(qo,{createQaMeter:()=>In});function In(e){return Co(e)}var Po=ie(()=>{"use strict";Ro()});var On={};jt(On,{configFromDataset:()=>Lo});var Uo=["description","feedback_type","severity","env","page_url","user_agent","capture_method"];function Vo(e){let t;try{t=new URL(e)}catch(r){throw new Error(`[mhosaic-feedback] \`endpoint\` is not a valid URL: ${e}`)}if(t.protocol!=="https:"&&!(t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]")))throw new Error(`[mhosaic-feedback] \`endpoint\` must use https:// (got ${t.protocol}//${t.hostname}). http:// is only allowed for localhost in dev.`)}var Ae=class extends Error{constructor(r){super(`rate limited; retry after ${r}s`);Me(this,"retryAfterSeconds");this.name="RateLimitError",this.retryAfterSeconds=r}};function Go(e){let t=e.headers.get("Retry-After"),r=t?Number.parseInt(t,10):NaN;return Number.isFinite(r)&&r>=0?r:0}async function Ut(e,t){if(e.status===429)throw new Ae(Go(e));if(!e.ok){let r=await e.text().catch(()=>"");throw new Error(`${t} failed: ${e.status} ${r}`)}}async function Qt(e,t){await Ut(e,t);let r=await e.json().catch(()=>{});if(!Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an array)`);return r}async function He(e,t){await Ut(e,t);let r=await e.json().catch(()=>{});if(r===null||typeof r!="object"||Array.isArray(r))throw new Error(`${t}: unexpected response shape (expected an object)`);return r}function Vt(e){var k,R;let t=((k=e.endpoint)!=null?k:"").replace(/\/+$/,"");if(!t)throw new Error('[mhosaic-feedback] `endpoint` is required (e.g. "https://feedback.example.com").');Vo(t);let r=(R=e.fetch)!=null?R:globalThis.fetch;async function a(x){var L,D,I,Q;let v=x;if(e.beforeSend&&(v=await e.beforeSend(x)),v===!1)throw new Error("Submission cancelled by beforeSend");let b=new FormData;for(let A of Uo)b.append(A,String(v[A]));b.append("technical_context",JSON.stringify(v.technical_context)),((L=v.screenshots)!=null&&L.length?v.screenshots:v.screenshot?[v.screenshot]:[]).forEach((A,O)=>{b.append("screenshot",A,O===0?"screenshot.png":`screenshot-${O+1}.png`)}),v.synthetic&&b.append("synthetic","true"),(D=v.user)!=null&&D.id&&b.append("user",JSON.stringify(v.user)),v.widget_version&&b.append("widget_version",v.widget_version),v.page_path&&b.append("page_path",v.page_path);let y={Authorization:`Bearer ${e.apiKey}`};v.synthetic&&(y["X-Mhosaic-Capture-Source"]="error-tracking");let F=(I=e.getSignedIdentity)==null?void 0:I.call(e);F&&F.userHash&&F.exp&&((Q=v.user)!=null&&Q.id)&&(y["X-Mhosaic-User"]=String(v.user.id),y["X-Mhosaic-User-Hmac"]=F.userHash,y["X-Mhosaic-User-Exp"]=String(F.exp),F.email&&(y["X-Mhosaic-User-Email"]=F.email));let E=await r(`${t}/api/feedback/v1/reports/`,{method:"POST",headers:y,body:b});if(!E.ok){let A=await E.text().catch(()=>"");throw new Error(`Feedback submit failed: ${E.status} ${A}`)}return E.json()}function n(x){var P;let v={Authorization:`Bearer ${e.apiKey}`,"X-Mhosaic-User":x},b=(P=e.getSignedIdentity)==null?void 0:P.call(e);return b&&b.userHash&&b.exp&&(v["X-Mhosaic-User-Hmac"]=b.userHash,v["X-Mhosaic-User-Exp"]=String(b.exp),b.email&&(v["X-Mhosaic-User-Email"]=b.email)),v}async function i(x){let v=await r(`${t}/api/feedback/v1/reports/widget/mine/`,{method:"GET",headers:n(x)});return v.status===404?[]:Qt(v,"listMine")}async function s(x){let v=await r(`${t}/api/feedback/v1/reports/widget/changelog/`,{method:"GET",headers:n(x)});return v.status===404?[]:Qt(v,"listChangelog")}async function l(x,v,b){let P=await r(`${t}/api/feedback/v1/reports/widget/${x}/`,{method:"GET",headers:n(v),...b!=null&&b.signal?{signal:b.signal}:{}});return He(P,"getReport")}async function d(x,v){let b=await r(`${t}/api/feedback/v1/reports/widget/by-seq/${x}/`,{method:"GET",headers:n(v)});return He(b,"getReportBySeq")}async function c(x,v,b,P,y){let F;if(y&&y.length>0){let L=new FormData;L.append("body",b),P!==void 0&&L.append("client_nonce",P),y.forEach((D,I)=>L.append("attachment",D,`attachment-${I+1}.png`)),F={method:"POST",headers:n(v),body:L}}else F={method:"POST",headers:{...n(v),"Content-Type":"application/json"},body:JSON.stringify({body:b,...P!==void 0&&{client_nonce:P}})};let E=await r(`${t}/api/feedback/v1/reports/widget/${x}/comments/`,F);if(!E.ok){let L=await E.text().catch(()=>"");throw new Error(`addComment failed: ${E.status} ${L}`)}return E.json()}async function f(x,v,b){let P=await r(`${t}/api/feedback/v1/reports/widget/${x}/`,{method:"PATCH",headers:{...n(v),"Content-Type":"application/json"},body:JSON.stringify({description:b})});if(!P.ok){let y=await P.text().catch(()=>"");throw new Error(`editDescription failed: ${P.status} ${y}`)}return P.json()}async function p(x,v){let b=await r(`${t}/api/feedback/v1/reports/widget/${x}/`,{method:"PATCH",headers:{...n(v),"Content-Type":"application/json"},body:JSON.stringify({status:"closed"})});if(!b.ok){let P=await b.text().catch(()=>"");throw new Error(`closeAsResolved failed: ${b.status} ${P}`)}return b.json()}async function u(x,v){let b=await r(`${t}/api/feedback/v1/reports/widget/${x}/`,{method:"PATCH",headers:{...n(v),"Content-Type":"application/json"},body:JSON.stringify({status:"in_progress"})});if(!b.ok){let P=await b.text().catch(()=>"");throw new Error(`reopenUnresolved failed: ${b.status} ${P}`)}return b.json()}function g(x){var P,y,F;if(!x)return"";let v=new URLSearchParams;(P=x.status)==null||P.forEach(E=>v.append("status",E)),(y=x.type)==null||y.forEach(E=>v.append("type",E)),(F=x.severity)==null||F.forEach(E=>v.append("severity",E)),x.q&&v.set("q",x.q),x.mine&&v.set("mine","1"),x.ordering&&v.set("ordering",x.ordering),x.page&&x.page>1&&v.set("page",String(x.page)),x.pagePath&&v.set("page_path",x.pagePath);let b=v.toString();return b?`?${b}`:""}async function S(x,v,b){let P=await r(`${t}/api/feedback/v1/reports/widget/board/${g(v)}`,{method:"GET",headers:n(x),...b!=null&&b.signal?{signal:b.signal}:{}});if(P.status===404)return{count:0,next:null,previous:null,results:[]};let y=await He(P,"listBoard");if(!Array.isArray(y.results))throw new Error("listBoard: unexpected response shape (missing results[])");return y}async function C(x,v,b){let P=await r(`${t}/api/feedback/v1/reports/widget/board/kpis/${g(v)}`,{method:"GET",headers:n(x),...b!=null&&b.signal?{signal:b.signal}:{}});return P.status===404?{total:0,by_status:{},resolution_rate:0,scope:"mine"}:He(P,"fetchBoardKpis")}async function _(x,v){let b=await r(`${t}/api/feedback/v1/widget/visibility/`,{method:"POST",headers:{...n(x),"Content-Type":"application/json"},body:JSON.stringify({external_id:x,...v?{email:v}:{}})});if(!b.ok)throw new Error(`checkVisibility failed: ${b.status}`);return!!(await b.json()).show}return{submitReport:a,checkVisibility:_,listMine:i,listChangelog:s,getReport:l,getReportBySeq:d,addComment:c,editDescription:f,closeAsResolved:p,reopenUnresolved:u,listBoard:S,fetchBoardKpis:C}}var Xo=/token|key|password|secret|auth|session|sig|credential|bearer|cookie/i,Yo=[/^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 Jo(e){return Yo.some(t=>t.test(e))}function ye(e){try{let t=/^https?:\/\//i.test(e),r=e.startsWith("/");if(!t&&!r)return e;let a=typeof window!="undefined"?window.location.origin:"http://localhost",n=new URL(e,a),i=new URLSearchParams;return n.searchParams.forEach((s,l)=>{Xo.test(l)||Jo(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 Zo=[/\b(?:sk|pk)_proj_[A-Za-z0-9_*-]+/g,/\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g,/\bBearer\s+[A-Za-z0-9._~+/=-]{16,}\b/g,/\bAuthorization\s*[:=]\s*["']?[A-Za-z0-9._~+/=-]{16,}["']?/gi,/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,/\b(?:sk|pk|rk|whsec)_(?:live|test)_[A-Za-z0-9]{16,}\b/g,/\bAKIA[0-9A-Z]{12,}\b/g,/\bxox[abprso]-[A-Za-z0-9-]{12,}\b/g,/\bAIza[0-9A-Za-z_-]{35}\b/g,/\bsk-(?:proj-|svcacct-)?[A-Za-z0-9_-]{20,}\b/g,/\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{40,}\b/g,/\bAC[a-f0-9]{32}\b/g,/\bSK[a-f0-9]{32}\b/g];function le(e){let t=e;for(let r of Zo)t=t.replace(r,"[redacted-token]");return t}function Gt(){var l;let e=navigator,t=(l=e.connection)==null?void 0:l.effectiveType,r=e.deviceMemory,a=document.referrer||void 0,n=a!==void 0?ye(a):void 0,i=ye(window.location.pathname+window.location.search),s;try{let d=new URL(i,window.location.origin);s=d.pathname+d.search}catch(d){s=window.location.pathname}return{viewport:{w:window.innerWidth,h:window.innerHeight,dpr:window.devicePixelRatio||1},screen:{w:window.screen.width,h:window.screen.height},platform:e.platform,language:e.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,timezoneOffset:new Date().getTimezoneOffset(),...t!==void 0&&{connection:t},online:e.onLine,...r!==void 0&&{deviceMemory:r},hardwareConcurrency:e.hardwareConcurrency,...n!==void 0&&{referrer:n},title:le(document.title||"").slice(0,200),pathname:s}}function ea(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 Xt(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(ea).join(" "),d=le(l).slice(0,2e3),c={level:a,message:d,ts:Date.now()};if(a==="error"){let f=new Error().stack;f&&(c.stack=f.split(`
|
|
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 Nt(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 m=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:ae(m)}),c}},()=>{window.fetch=r}}function Ot(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 Kt(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?ae(n):void 0;e.push({message:ae(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?ae(s):void 0;e.push({message:ae(i),...l!==void 0&&{stack:l},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function jt(e=1e3){let t=[],r=[],a=null;if(typeof PerformanceObserver!="undefined")try{a=new PerformanceObserver(n=>{for(let i of n.getEntries())if(i.entryType==="longtask")for(t.push({duration:i.duration,startTime:i.startTime});t.length>20;)t.shift();else if(i.entryType==="resource"){let s=i;if(s.duration>e)for(r.push({name:be(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 ve=class{constructor(t){Se(this,"max",t);Se(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 Qt(e={}){var g;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(g=e.sanitizeUrl)!=null?g:be,i=new ve(t),s=new ve(r),l=new ve(a),p=Ht(i),c=Nt(s,n),m=Ot(s,n),d=Kt(l),f=jt();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:$t(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){p(),c(),m(),d(),f.dispose()}}}var Oo={"fab.label":"Send feedback","page.badge.aria":"Feedback \u2014 {n} open on this page","page.badge.aria.one":"Feedback \u2014 1 open on this page","page.strip.text":"{n} open reports on this page","page.strip.text.one":"1 open report on this page","page.strip.view":"View","page.peek.title":"On this page","page.peek.viewAll":"View all {n}","page.peek.viewAll.one":"View 1 open report","form.title":"Send feedback","form.description.label":"What happened?","form.description.placeholder":"Describe the issue or idea in one or two sentences.","form.type.label":"Type","form.severity.label":"Severity","form.submit":"Send","form.cancel":"Cancel","form.close":"Close","form.submitting":"Sending\u2026","form.success":"Thanks \u2014 your feedback was sent.","form.success.seq":"Thanks \u2014 report #{seq} was sent. \u2713","form.discard.title":"Unsaved changes","form.discard.body":"Discard your feedback?","form.discard.keep":"Keep editing","form.discard.confirm":"Discard","form.error":"Could not send. Please try again.","form.description.required":"Please describe the issue before sending.","form.screenshot.label":"Screenshot","form.screenshot.cta_click":"Click","form.screenshot.cta_rest":"drop, or paste an image","form.screenshot.formats":"PNG, JPEG or WebP \u2014 up to 10 MB","form.screenshot.remove":"Remove screenshot","form.screenshot.annotate":"Annotate","form.screenshot.error_type":"Unsupported file type. Use PNG, JPEG or WebP.","form.screenshot.error_size":"File too large (max {max} MB).","form.screenshot.error_count":"Too many screenshots (max {max}).","form.context.label":"Page","form.capture.notice":"Console, network activity and errors are captured automatically to help us debug.","type.bug":"Bug","type.feature":"Feature request","type.question":"Question","type.praise":"Praise","type.typo":"Typo","severity.blocker":"Blocker","severity.high":"High","severity.medium":"Medium","severity.low":"Low","annotator.title":"Annotate screenshot","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Arrow","annotator.tool.freehand":"Freehand","annotator.tool.text":"Text","annotator.tool.highlight":"Highlight","annotator.tool.blur":"Blur (hide sensitive data)","annotator.text_prompt":"Enter text:","annotator.color_picker":"Custom color","annotator.undo":"Undo","annotator.redo":"Redo","annotator.clear":"Clear all","annotator.count_suffix":"annotations","annotator.loading":"Loading\u2026","annotator.apply":"Apply","annotator.applying":"Applying\u2026","tab.send":"Send","tab.mine":"My reports","tab.changelog":"This week","tab.board":"Board","board.kpi.total":"Total","board.kpi.new":"New","board.kpi.in_progress":"In progress","board.kpi.awaiting_validation":"Awaiting validation","board.kpi.closed":"Closed","board.kpi.rejected":"Rejected","board.kpi.resolution_rate":"Resolution rate","board.sort":"Sort","board.sort.recent":"Newest first","board.sort.oldest":"Oldest first","board.sort.updated":"Recently active","board.sort.severity":"Severity","board.sort.status":"Status","board.filter.status":"Status","board.filter.type":"Type","board.filter.severity":"Severity","board.filter.search.placeholder":"Search\u2026","board.filter.mine":"Mine only","board.filter.clear":"Clear filters","board.list.empty.title":"Nothing here yet","board.list.empty.description":"When reports land, they\u2019ll show up here.","board.list.loading":"Loading\u2026","board.list.error":"Couldn\u2019t load reports.","board.retry":"Try again","board.list.you":"you","board.list.count":"{n} of {total}","board.detail.empty":"Pick a report on the left to see its full thread.","board.detail.by":"By","board.detail.confirm_resolution":"Confirm resolution","board.detail.status_history":"History","board.scope.project":"Project reports","board.scope.mine":"Your reports","board.scope.thisPage":"This page","board.scope.allPages":"All pages","board.scope.onThisPage":"on this page","board.list.count.page":"{n} of {total} \xB7 this page","board.list.empty.page.title":"No feedback on this page yet.","board.list.empty.page.description":"Be the first to report something here \u2014 or browse the whole project.","board.back":"Back","changelog.empty.title":"Nothing resolved yet","changelog.empty.body":"Once a report you sent is fixed it will appear here, grouped by week.","changelog.week_of":"Week of {date}","changelog.resolved_one":"{count} resolved","changelog.resolved_many":"{count} resolved","mine.empty.title":"No reports yet","mine.empty.body":"Once you send feedback you can follow the thread here.","mine.refresh":"Refresh","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.jump.placeholder":"#","mine.jump.go":"Open","mine.jump.aria":"Open a report by number","mine.jump.not_found":"No report with that number.","error.rate_limited":"Too many requests \u2014 retry in {seconds}s.","error.rate_limited_generic":"Too many requests \u2014 try again in a moment.","mine.replies_one":"1 reply","mine.replies_many":"{count} replies","mine.filter.empty":"No reports match this filter.","kpi.new":"New","kpi.in_progress":"In progress","kpi.awaiting_validation":"Awaiting you","kpi.resolution_rate":"Resolution rate","detail.back":"Back","detail.thread":"Conversation","detail.no_replies":"No replies yet \u2014 we\u2019ll let you know when an operator responds.","detail.compose_placeholder":"Add a follow-up reply\u2026","detail.compose_send":"Reply","detail.compose_sending":"Sending\u2026","detail.attach_add":"Add image","detail.attach_remove":"Remove","detail.attachment_alt":"Attached image","detail.copy_link":"Copy link","detail.copied":"Link copied","detail.edit":"Edit","detail.edit_save":"Save","detail.edit_cancel":"Cancel","detail.edit_saving":"Saving\u2026","detail.edit_failed":"Could not save your changes.","detail.close_cta":"Mark as resolved","detail.close_busy":"Marking\u2026","detail.reopen_cta":"Still not fixed","detail.reopen_busy":"Reopening\u2026","detail.teammate_notice":"Viewing a teammate\u2019s report \u2014 replies are private to the submitter.","detail.load_failed.title":"Report not available","detail.load_failed.body":"It may have been deleted, or you no longer have access to it.","detail.load_failed.cta":"Back","detail.send_failed":"Couldn\u2019t send your reply. Try again.","detail.close_failed":"Couldn\u2019t mark as resolved. Try again.","detail.reopen_failed":"Couldn\u2019t reopen the report. Try again.","detail.history":"Status history","detail.context.submitted_at":"Submitted","detail.context.page":"Page","detail.context.capture.manual":"Manual capture","detail.context.capture.html2canvas":"Auto capture","detail.context.capture.display_media":"Screen share","detail.context.capture.none":"No screenshot","detail.author.staff":"Operator","detail.author.mcp":"Mhosaic Team","detail.author.system":"System","detail.tech.title":"What we received","detail.tech.errors_one":"error","detail.tech.errors_many":"errors","detail.tech.device":"Device","detail.tech.device.viewport":"Viewport","detail.tech.device.platform":"Platform","detail.tech.device.language":"Language","detail.tech.device.timezone":"Timezone","detail.tech.device.connection":"Connection","detail.tech.errors":"Runtime errors","detail.tech.console":"Console (last 20)","detail.tech.network":"Network (last 15)","status.new":"New","status.in_progress":"In progress","status.awaiting_validation":"Awaiting your validation","status.closed":"Closed","status.rejected":"Rejected","status.duplicate":"Duplicate","status.wontfix":"Won\u2019t fix"},Ko={"fab.label":"Envoyer un commentaire","page.badge.aria":"Retours \u2014 {n} ouverts sur cette page","page.badge.aria.one":"Retours \u2014 1 ouvert sur cette page","page.strip.text":"{n} retours ouverts sur cette page","page.strip.text.one":"1 retour ouvert sur cette page","page.strip.view":"Voir","page.peek.title":"Sur cette page","page.peek.viewAll":"Voir les {n}","page.peek.viewAll.one":"Voir 1 retour ouvert","form.title":"Envoyer un commentaire","form.description.label":"Qu\u2019est-il arriv\xE9 ?","form.description.placeholder":"D\xE9crivez le probl\xE8me ou l\u2019id\xE9e en une ou deux phrases.","form.type.label":"Type","form.severity.label":"S\xE9v\xE9rit\xE9","form.submit":"Envoyer","form.cancel":"Annuler","form.close":"Fermer","form.submitting":"Envoi\u2026","form.success":"Merci \u2014 votre commentaire a \xE9t\xE9 envoy\xE9.","form.success.seq":"Merci \u2014 rapport n\xB0{seq} envoy\xE9. \u2713","form.discard.title":"Modifications non enregistr\xE9es","form.discard.body":"Abandonner votre commentaire ?","form.discard.keep":"Continuer la saisie","form.discard.confirm":"Abandonner","form.error":"\xC9chec d\u2019envoi. Veuillez r\xE9essayer.","form.description.required":"D\xE9crivez le probl\xE8me avant d\u2019envoyer.","form.screenshot.label":"Capture d\u2019\xE9cran","form.screenshot.cta_click":"Cliquez","form.screenshot.cta_rest":"d\xE9posez ou collez une image","form.screenshot.formats":"PNG, JPEG ou WebP \u2014 jusqu\u2019\xE0 10 Mo","form.screenshot.remove":"Retirer la capture","form.screenshot.annotate":"Annoter","form.screenshot.error_type":"Format non support\xE9. Utilisez PNG, JPEG ou WebP.","form.screenshot.error_size":"Fichier trop volumineux (max {max} Mo).","form.screenshot.error_count":"Trop de captures d\u2019\xE9cran (max {max}).","form.context.label":"Page","form.capture.notice":"La console, l\u2019activit\xE9 r\xE9seau et les erreurs sont captur\xE9es automatiquement pour faciliter le diagnostic.","type.bug":"Bogue","type.feature":"Suggestion","type.question":"Question","type.praise":"Compliment","type.typo":"Coquille","severity.blocker":"Bloquant","severity.high":"\xC9lev\xE9e","severity.medium":"Moyenne","severity.low":"Faible","annotator.title":"Annoter la capture","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Fl\xE8che","annotator.tool.freehand":"Dessin libre","annotator.tool.text":"Texte","annotator.tool.highlight":"Surligner","annotator.tool.blur":"Flouter (donn\xE9es sensibles)","annotator.text_prompt":"Entrez le texte :","annotator.color_picker":"Couleur personnalis\xE9e","annotator.undo":"Annuler","annotator.redo":"Refaire","annotator.clear":"Tout effacer","annotator.count_suffix":"annotations","annotator.loading":"Chargement\u2026","annotator.apply":"Appliquer","annotator.applying":"Application\u2026","tab.send":"Envoyer","tab.mine":"Mes rapports","tab.changelog":"Cette semaine","tab.board":"Tableau","board.kpi.total":"Total","board.kpi.new":"Nouveau","board.kpi.in_progress":"En cours","board.kpi.awaiting_validation":"\xC0 valider","board.kpi.closed":"Ferm\xE9","board.kpi.rejected":"Refus\xE9","board.kpi.resolution_rate":"Taux de r\xE9solution","board.sort":"Trier","board.sort.recent":"Plus r\xE9cents","board.sort.oldest":"Plus anciens","board.sort.updated":"Activit\xE9 r\xE9cente","board.sort.severity":"S\xE9v\xE9rit\xE9","board.sort.status":"Statut","board.filter.status":"Statut","board.filter.type":"Type","board.filter.severity":"S\xE9v\xE9rit\xE9","board.filter.search.placeholder":"Rechercher\u2026","board.filter.mine":"Les miens","board.filter.clear":"Effacer les filtres","board.list.empty.title":"Rien \xE0 voir ici","board.list.empty.description":"Les rapports appara\xEEtront ici d\xE8s qu\u2019ils arrivent.","board.list.loading":"Chargement\u2026","board.list.error":"Impossible de charger les rapports.","board.retry":"R\xE9essayer","board.list.you":"vous","board.list.count":"{n} sur {total}","board.detail.empty":"S\xE9lectionnez un rapport \xE0 gauche pour voir le fil complet.","board.detail.by":"Par","board.detail.confirm_resolution":"Confirmer la r\xE9solution","board.detail.status_history":"Historique","board.scope.project":"Rapports du projet","board.scope.mine":"Vos rapports","board.scope.thisPage":"Cette page","board.scope.allPages":"Toutes les pages","board.scope.onThisPage":"sur cette page","board.list.count.page":"{n} sur {total} \xB7 cette page","board.list.empty.page.title":"Aucun retour sur cette page pour l\u2019instant.","board.list.empty.page.description":"Soyez le premier \xE0 signaler quelque chose ici \u2014 ou parcourez tout le projet.","board.back":"Retour","changelog.empty.title":"Rien de r\xE9solu pour l\u2019instant","changelog.empty.body":"Quand un rapport que vous avez envoy\xE9 est corrig\xE9, il appara\xEEtra ici, regroup\xE9 par semaine.","changelog.week_of":"Semaine du {date}","changelog.resolved_one":"{count} r\xE9solu","changelog.resolved_many":"{count} r\xE9solus","mine.empty.title":"Aucun rapport","mine.empty.body":"Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.","mine.refresh":"Actualiser","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.jump.placeholder":"#","mine.jump.go":"Ouvrir","mine.jump.aria":"Ouvrir un rapport par num\xE9ro","mine.jump.not_found":"Aucun rapport avec ce num\xE9ro.","error.rate_limited":"Trop de requ\xEAtes \u2014 r\xE9essaie dans {seconds} s.","error.rate_limited_generic":"Trop de requ\xEAtes \u2014 r\xE9essaie dans un instant.","mine.replies_one":"1 r\xE9ponse","mine.replies_many":"{count} r\xE9ponses","mine.filter.empty":"Aucun rapport ne correspond \xE0 ce filtre.","kpi.new":"Nouveau","kpi.in_progress":"En cours","kpi.awaiting_validation":"\xC0 valider","kpi.resolution_rate":"Taux de r\xE9solution","detail.back":"Retour","detail.thread":"Conversation","detail.no_replies":"Pas encore de r\xE9ponse \u2014 vous serez notifi\xE9 d\xE8s qu\u2019un op\xE9rateur r\xE9pondra.","detail.compose_placeholder":"Ajouter une r\xE9ponse\u2026","detail.compose_send":"R\xE9pondre","detail.compose_sending":"Envoi\u2026","detail.attach_add":"Ajouter une image","detail.attach_remove":"Retirer","detail.attachment_alt":"Image jointe","detail.copy_link":"Copier le lien","detail.copied":"Lien copi\xE9","detail.edit":"Modifier","detail.edit_save":"Enregistrer","detail.edit_cancel":"Annuler","detail.edit_saving":"Enregistrement\u2026","detail.edit_failed":"Impossible d\u2019enregistrer vos modifications.","detail.close_cta":"Marquer comme r\xE9solu","detail.close_busy":"Validation\u2026","detail.reopen_cta":"Toujours pas r\xE9gl\xE9","detail.reopen_busy":"R\xE9ouverture\u2026","detail.teammate_notice":"Vous consultez le rapport d\u2019un co\xE9quipier \u2014 les r\xE9ponses sont priv\xE9es au soumetteur.","detail.load_failed.title":"Rapport indisponible","detail.load_failed.body":"Il a peut-\xEAtre \xE9t\xE9 supprim\xE9, ou vous n\u2019y avez plus acc\xE8s.","detail.load_failed.cta":"Retour","detail.send_failed":"Impossible d\u2019envoyer votre r\xE9ponse. R\xE9essayez.","detail.close_failed":"Impossible de marquer comme r\xE9solu. R\xE9essayez.","detail.reopen_failed":"Impossible de rouvrir le rapport. R\xE9essayez.","detail.history":"Historique du statut","detail.context.submitted_at":"Envoy\xE9","detail.context.page":"Page","detail.context.capture.manual":"Capture manuelle","detail.context.capture.html2canvas":"Capture automatique","detail.context.capture.display_media":"Partage d\u2019\xE9cran","detail.context.capture.none":"Sans capture","detail.author.staff":"Op\xE9rateur","detail.author.mcp":"\xC9quipe Mhosaic","detail.author.system":"Syst\xE8me","detail.tech.title":"Ce que nous avons re\xE7u","detail.tech.errors_one":"erreur","detail.tech.errors_many":"erreurs","detail.tech.device":"Appareil","detail.tech.device.viewport":"Fen\xEAtre","detail.tech.device.platform":"Plateforme","detail.tech.device.language":"Langue","detail.tech.device.timezone":"Fuseau horaire","detail.tech.device.connection":"Connexion","detail.tech.errors":"Erreurs d\u2019ex\xE9cution","detail.tech.console":"Console (20 derniers)","detail.tech.network":"R\xE9seau (15 derniers)","status.new":"Nouveau","status.in_progress":"En cours","status.awaiting_validation":"En attente de validation","status.closed":"Ferm\xE9","status.rejected":"Rejet\xE9","status.duplicate":"Doublon","status.wontfix":"Non corrig\xE9"},jo={fr:Ko};function Qo(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=jo[t])!=null?r:null}function Wt(e,t={}){var a;let r=(a=Qo(t.locale))!=null?a:{};return{...Oo,...r,...e}}ie();Z();function se(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var ht="mfb:locationchange",hr=!1;function oa(){if(!(hr||typeof history=="undefined")){hr=!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(ht)),a}}}}function We(e){return oa(),window.addEventListener("popstate",e),window.addEventListener(ht,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(ht,e)}}Z();var vr="mhosaic.boardView.";function yr(e){try{let t=localStorage.getItem(vr+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function _r(e,t){try{localStorage.setItem(vr+e,JSON.stringify(t))}catch(r){}}function fe(e,t){let r=!1,a=!1,n=0,i=null,s=typeof document!="undefined"?document:null,l=()=>Math.min(t*2**n,t*10),p=async()=>{if(r)return;if(s!=null&&s.hidden){a=!0;return}let m=!1;try{m=await e()}catch(d){m=!1}r||(n=m?0:n+1,i=setTimeout(()=>{p()},l()))},c=()=>{r||!a||s!=null&&s.hidden||(a=!1,p())};return s==null||s.addEventListener("visibilitychange",c),p(),{stop(){r=!0,i&&clearTimeout(i),s==null||s.removeEventListener("visibilitychange",c)}}}function we(e,t){return e instanceof Ce?e.retryAfterSeconds>0?t["error.rate_limited"].replace("{seconds}",String(e.retryAfterSeconds)):t["error.rate_limited_generic"]:null}Z();ie();ie();var aa=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:--aa,__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 K.vnode&&K.vnode(c),c}var xr=/#(\d+)/g;function Ue(e,t){let r=e!=null?e:"";if(!r||!t)return[r];let a=[],n=0;xr.lastIndex=0;let i;for(;(i=xr.exec(r))!==null;){i.index>n&&a.push(r.slice(n,i.index));let s=Number(i[1]);a.push(o("button",{type:"button",class:"seq-link",onClick:()=>t(s),"aria-label":`Open report #${s}`,children:["#",s]})),n=i.index+i[0].length}return n<r.length&&a.push(r.slice(n)),a.length?a:[r]}function wr({comment:e,strings:t,onOpenSeq:r}){var m;let a=e.is_mine,n=!a&&e.author_source==="mcp",i=!a&&e.author_source==="system",s=n?"mcp":i?"system":"staff",l=s==="mcp"?"detail.author.mcp":s==="system"?"detail.author.system":"detail.author.staff",p=e.author_label||t[l],c=((m=e.attachments)!=null?m:[]).filter(d=>d.url);return o("div",{class:`comment-bubble ${a?"is-mine":"is-other"}`,children:[!a&&p&&o("div",{class:`comment-author comment-author--${s}`,children:p}),e.body&&o("div",{class:"comment-body",children:Ue(e.body,r)}),c.length>0&&o("div",{class:"comment-attachments",children:c.map(d=>o("a",{class:"comment-attachment",href:d.url,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:d.url,alt:t["detail.attachment_alt"],loading:"lazy"})},d.id))}),o("div",{class:"comment-time",children:na(e.created_at)})]})}function na(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var ia=["image/png","image/jpeg","image/webp"];function Ve(e){return ia.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function ke(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 vt(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 sa=3e4;function Ge({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal",onOpenSeq:l,buildPermalink:p}){var Tt,At,Mt,Lt,zt;let[c,m]=P(null),[d,f]=P(null),[g,k]=P(!1),[C,h]=P(!1),[w,R]=P(""),[x,v]=P(!1),[b,q]=P(!1),[_,F]=P(""),[E,B]=P(!1),[D,I]=P(!1),[N,M]=P(!1),[$,L]=P([]),[O,Q]=P(""),W=V(null),u=V(!0),S=V($);S.current=$,H(()=>()=>S.current.forEach(A=>URL.revokeObjectURL(A.preview)),[]);let T=A=>{Q("");let U=5-$.length,oe=A.slice(0,Math.max(0,U));for(let J of oe){let ne=Ve(J);if(ne){Q(ne.kind==="type"?a["form.screenshot.error_type"]:a["form.screenshot.error_size"].replace("{max}",String(ne.maxMb)));return}}if(oe.length){let J=oe.map(ne=>({blob:ne,preview:URL.createObjectURL(ne)}));L(ne=>[...ne,...J])}A.length>oe.length&&Q(a["form.screenshot.error_count"].replace("{max}",String(5)))},z=A=>{var J;let U=A.target,oe=Array.from((J=U.files)!=null?J:[]);oe.length&&T(oe),U.value=""},j=A=>{let U=$[A];U&&URL.revokeObjectURL(U.preview),L(oe=>oe.filter((J,ne)=>ne!==A)),Q("")},Y=async()=>{try{let A=await e.getReport(r,t);return u.current&&(m(A),f(null)),!0}catch(A){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",A),!u.current)return!1;let U=we(A,a);return f(U!=null?U:"load_failed"),!1}};H(()=>{u.current=!0;let A=fe(Y,sa);return()=>{u.current=!1,A.stop()}},[r,t]);let pe=async()=>{if(!(!_.trim()&&$.length===0||E)){B(!0);try{let A=`${r}:${Date.now()}`,U=$.map(J=>J.blob),oe=await e.addComment(r,t,_.trim(),A,U.length?U:void 0);if(!u.current)return;F(""),$.forEach(J=>URL.revokeObjectURL(J.preview)),L([]),Q(""),m(J=>J&&{...J,comments:la(J.comments,oe)}),Y()}catch(A){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",A),!u.current)return;f(a["detail.send_failed"])}finally{u.current&&B(!1)}}},xo=async()=>{if(!(!p||!c))try{if(await navigator.clipboard.writeText(p(c.id)),!u.current)return;k(!0),setTimeout(()=>{u.current&&k(!1)},2e3)}catch(A){}},wo=()=>{c&&(R(c.description),q(!1),h(!0))},ko=()=>{h(!1),q(!1)},So=async()=>{if(!c||x)return;let A=w.trim();if(A){v(!0),q(!1);try{let U=await e.editDescription(r,t,A);if(!u.current)return;m(U),h(!1)}catch(U){if(typeof console!="undefined"&&console.warn("[mhosaic] editDescription:",U),!u.current)return;q(!0)}finally{u.current&&v(!1)}}},Co=async()=>{if(!(D||N)){I(!0);try{let A=await e.closeAsResolved(r,t);if(!u.current)return;m(A)}catch(A){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",A),!u.current)return;f(a["detail.close_failed"])}finally{u.current&&I(!1)}}},Ro=async()=>{if(!(D||N)){M(!0);try{let A=await e.reopenUnresolved(r,t);if(!u.current)return;m(A)}catch(A){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",A),!u.current)return;f(a["detail.reopen_failed"])}finally{u.current&&M(!1)}}};if(!c&&!d)return o("div",{class:"mine-loading",children:a["mine.loading"]});if(!c)return d&&d!=="load_failed"?o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-body",children:d}),o("button",{type:"button",class:"btn",onClick:()=>{Y()},children:a["board.retry"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]}):o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:a["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:a["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]});let qt=(Tt=c.is_mine)!=null?Tt:i,Pt=(At=c.can_moderate)!=null?At:qt,Et=Pt&&c.status==="awaiting_validation",qo=Pt;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--${c.status}`,children:(Mt=a[`status.${c.status}`])!=null?Mt:c.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--${c.status}`,children:(Lt=a[`status.${c.status}`])!=null?Lt:c.status})]}),o("div",{class:"report-detail-body",children:[o(ca,{detail:c,strings:a}),C?o("div",{class:"report-detail-edit",children:[o("textarea",{class:"report-detail-edit-input",value:w,onInput:A=>{R(A.target.value),q(!1)},disabled:x}),b&&o("p",{class:"error",role:"alert",children:a["detail.edit_failed"]}),o("div",{class:"report-detail-edit-actions",children:[o("button",{type:"button",class:"btn btn--ghost",onClick:ko,disabled:x,children:a["detail.edit_cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:So,disabled:x||!w.trim(),children:x?a["detail.edit_saving"]:a["detail.edit_save"]})]})]}):o("div",{class:"report-detail-description-row",children:[o("p",{class:"report-detail-description",children:Ue(c.description,l)}),qt&&o("button",{type:"button",class:"btn btn--ghost report-detail-edit",onClick:wo,children:a["detail.edit"]})]}),p&&o("div",{class:"report-detail-permalink",children:o("button",{type:"button",class:"btn btn--ghost report-detail-copy-link",onClick:xo,children:g?a["detail.copied"]:a["detail.copy_link"]})}),((zt=c.screenshots)!=null&&zt.length?c.screenshots.map(A=>A.url):[c.screenshot_url]).filter(A=>!!A).map(A=>{let U=vt(A);return U?o("a",{class:"report-detail-screenshot",href:U,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:A,alt:"",loading:"lazy"})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:A,alt:"",loading:"lazy"})})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),c.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:c.comments.map(A=>o("li",{children:o(wr,{comment:A,strings:a,...l&&{onOpenSeq:l}})}))}),c.status_history&&c.status_history.length>0&&o(va,{rows:c.status_history,strings:a}),c.technical_context&&o(ua,{ctx:c.technical_context,strings:a}),qo?o("div",{class:"report-compose",children:[o("textarea",{value:_,placeholder:a["detail.compose_placeholder"],onInput:A=>F(A.target.value),disabled:E}),$.length>0&&o("div",{class:"compose-attachments",children:$.map((A,U)=>o("div",{class:"compose-attachment",children:[o("img",{src:A.preview,alt:a["detail.attachment_alt"]}),o("button",{type:"button",class:"compose-attachment-remove","aria-label":a["detail.attach_remove"],onClick:()=>j(U),disabled:E,children:"\xD7"})]},A.preview))}),O&&o("p",{class:"compose-attach-error",role:"alert",children:O}),o("input",{ref:W,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"compose-attach-input",onChange:z,hidden:!0}),o("div",{class:"report-compose-actions",children:[o("button",{type:"button",class:"btn btn--ghost compose-attach-btn",onClick:()=>{var A;return(A=W.current)==null?void 0:A.click()},disabled:E||$.length>=5,children:a["detail.attach_add"]}),Et&&o("button",{type:"button",class:"btn",onClick:Co,disabled:D||N,children:D?a["detail.close_busy"]:a["detail.close_cta"]}),Et&&o("button",{type:"button",class:"btn btn--ghost",onClick:Ro,disabled:D||N,children:N?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:pe,disabled:!_.trim()&&$.length===0||E,children:E?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),d&&o("div",{class:"error",children:d})]})]})}function la(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function ca({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:kr(e.created_at)})]}),e.page_url&&(()=>{let i=vt(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:ke(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:ke(e.page_url,64)})]})})()]})}function kr(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var da=20,pa=15;function ua({ctx:e,strings:t}){var c,m,d;let r=(c=e.errors)!=null?c:[],a=((m=e.consoleLogs)!=null?m:[]).slice(-da),n=((d=e.networkRequests)!=null?d:[]).slice(-pa),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(fa,{device:i,strings:t}),r.length>0&&o(ma,{errors:r,strings:t}),a.length>0&&o(ba,{logs:a,strings:t}),n.length>0&&o(ga,{rows:n,strings:t})]})]})}function fa({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(ee,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function ma({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:ha(r.stack)})]}))})]})}function ba({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 ga({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:ke(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function ha(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 Yt(e,t){if(typeof window=="undefined"||typeof window.fetch!="function")return()=>{};let r=window.fetch.bind(window);return window.fetch=async function(n,i){let s=performance.now(),l=typeof n=="string"?n:n instanceof URL?n.toString():n.url,d=((i==null?void 0:i.method)||(n instanceof Request?n.method:"GET")).toUpperCase();try{let c=await r(n,i);return e.push({url:t(l),method:d,status:c.status,durationMs:Math.round(performance.now()-s),ts:Date.now()}),c}catch(c){let f=c instanceof Error?c.message:String(c);throw e.push({url:t(l),method:d,status:0,durationMs:Math.round(performance.now()-s),ts:Date.now(),error:le(f)}),c}},()=>{window.fetch=r}}function Jt(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 Zt(e){if(typeof window=="undefined")return()=>{};let t=a=>{let n=a.error instanceof Error?a.error.stack:void 0,i=n!==void 0?le(n):void 0;e.push({message:le(a.message||"Unknown error"),...i!==void 0&&{stack:i},ts:Date.now(),source:"window.error"})},r=a=>{let n=a.reason,i=n instanceof Error?n.message:typeof n=="string"?n:(()=>{try{return JSON.stringify(n)}catch(d){return String(n)}})(),s=n instanceof Error?n.stack:void 0,l=s!==void 0?le(s):void 0;e.push({message:le(i),...l!==void 0&&{stack:l},ts:Date.now(),source:"unhandledrejection"})};return window.addEventListener("error",t),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",t),window.removeEventListener("unhandledrejection",r)}}function er(e=1e3){let t=[],r=[],a=null;if(typeof PerformanceObserver!="undefined")try{a=new PerformanceObserver(n=>{for(let i of n.getEntries())if(i.entryType==="longtask")for(t.push({duration:i.duration,startTime:i.startTime});t.length>20;)t.shift();else if(i.entryType==="resource"){let s=i;if(s.duration>e)for(r.push({name:ye(s.name),duration:s.duration,initiatorType:s.initiatorType});r.length>20;)r.shift()}}),a.observe({entryTypes:["longtask","resource"]})}catch(n){}return{snapshot(){let n=typeof performance!="undefined"?performance.getEntriesByType("navigation")[0]:void 0,i=n?{type:n.type,duration:n.duration}:void 0;return{...i!==void 0&&{navigation:i},longTasks:t.slice(),slowResources:r.slice()}},dispose(){a==null||a.disconnect()}}}var Ce=class{constructor(t){Me(this,"max",t);Me(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 tr(e={}){var g;let{maxConsole:t=50,maxNetwork:r=50,maxErrors:a=20}=e,n=(g=e.sanitizeUrl)!=null?g:ye,i=new Ce(t),s=new Ce(r),l=new Ce(a),d=Xt(i),c=Yt(s,n),f=Jt(s,n),p=Zt(l),u=er();return{snapshot(){return{consoleLogs:i.snapshot(),networkRequests:s.snapshot(),errors:l.snapshot(),device:Gt(),capturedAt:Date.now()}},clear(){i.clear(),s.clear(),l.clear()},dispose(){d(),c(),f(),p(),u.dispose()}}}var ta={"fab.label":"Send feedback","page.badge.aria":"Feedback \u2014 {n} open on this page","page.badge.aria.one":"Feedback \u2014 1 open on this page","page.strip.text":"{n} open reports on this page","page.strip.text.one":"1 open report on this page","page.strip.view":"View","page.peek.title":"On this page","page.peek.viewAll":"View all {n}","page.peek.viewAll.one":"View 1 open report","form.title":"Send feedback","form.description.label":"What happened?","form.description.placeholder":"Describe the issue or idea in one or two sentences.","form.type.label":"Type","form.severity.label":"Severity","form.submit":"Send","form.cancel":"Cancel","form.close":"Close","form.submitting":"Sending\u2026","form.success":"Thanks \u2014 your feedback was sent.","form.success.seq":"Thanks \u2014 report #{seq} was sent. \u2713","form.discard.title":"Unsaved changes","form.discard.body":"Discard your feedback?","form.discard.keep":"Keep editing","form.discard.confirm":"Discard","form.error":"Could not send. Please try again.","form.description.required":"Please describe the issue before sending.","form.screenshot.label":"Screenshot","form.screenshot.cta_click":"Click","form.screenshot.cta_rest":"drop, or paste an image","form.screenshot.formats":"PNG, JPEG or WebP \u2014 up to 10 MB","form.screenshot.remove":"Remove screenshot","form.screenshot.annotate":"Annotate","form.screenshot.error_type":"Unsupported file type. Use PNG, JPEG or WebP.","form.screenshot.error_size":"File too large (max {max} MB).","form.screenshot.error_count":"Too many screenshots (max {max}).","form.context.label":"Page","form.capture.notice":"Console, network activity and errors are captured automatically to help us debug.","type.bug":"Bug","type.feature":"Feature request","type.question":"Question","type.praise":"Praise","type.typo":"Typo","severity.blocker":"Blocker","severity.high":"High","severity.medium":"Medium","severity.low":"Low","annotator.title":"Annotate screenshot","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Arrow","annotator.tool.freehand":"Freehand","annotator.tool.text":"Text","annotator.tool.highlight":"Highlight","annotator.tool.blur":"Blur (hide sensitive data)","annotator.text_prompt":"Enter text:","annotator.color_picker":"Custom color","annotator.undo":"Undo","annotator.redo":"Redo","annotator.clear":"Clear all","annotator.count_suffix":"annotations","annotator.loading":"Loading\u2026","annotator.apply":"Apply","annotator.applying":"Applying\u2026","tab.send":"Send","tab.mine":"My reports","tab.changelog":"This week","tab.board":"Board","board.kpi.total":"Total","board.kpi.new":"New","board.kpi.in_progress":"In progress","board.kpi.awaiting_validation":"Awaiting validation","board.kpi.closed":"Closed","board.kpi.rejected":"Rejected","board.kpi.resolution_rate":"Resolution rate","board.sort":"Sort","board.sort.recent":"Newest first","board.sort.oldest":"Oldest first","board.sort.updated":"Recently active","board.sort.severity":"Severity","board.sort.status":"Status","board.filter.status":"Status","board.filter.type":"Type","board.filter.severity":"Severity","board.filter.search.placeholder":"Search\u2026","board.filter.mine":"Mine only","board.filter.clear":"Clear filters","board.list.empty.title":"Nothing here yet","board.list.empty.description":"When reports land, they\u2019ll show up here.","board.list.loading":"Loading\u2026","board.list.error":"Couldn\u2019t load reports.","board.retry":"Try again","board.list.you":"you","board.list.count":"{n} of {total}","board.list.loadMore":"Show more","board.detail.empty":"Pick a report on the left to see its full thread.","board.detail.by":"By","board.detail.confirm_resolution":"Confirm resolution","board.detail.status_history":"History","board.scope.project":"Project reports","board.scope.mine":"Your reports","board.scope.thisPage":"This page","board.scope.allPages":"All pages","board.scope.onThisPage":"on this page","board.list.count.page":"{n} of {total} \xB7 this page","board.list.empty.page.title":"No feedback on this page yet.","board.list.empty.page.description":"Be the first to report something here \u2014 or browse the whole project.","board.back":"Back","changelog.empty.title":"Nothing resolved yet","changelog.empty.body":"Once a report you sent is fixed it will appear here, grouped by week.","changelog.week_of":"Week of {date}","changelog.resolved_one":"{count} resolved","changelog.resolved_many":"{count} resolved","mine.empty.title":"No reports yet","mine.empty.body":"Once you send feedback you can follow the thread here.","mine.refresh":"Refresh","mine.loading":"Loading\u2026","mine.error":"Could not load your reports.","mine.jump.placeholder":"#","mine.jump.go":"Open","mine.jump.aria":"Open a report by number","mine.jump.not_found":"No report with that number.","error.rate_limited":"Too many requests \u2014 retry in {seconds}s.","error.rate_limited_generic":"Too many requests \u2014 try again in a moment.","mine.replies_one":"1 reply","mine.replies_many":"{count} replies","mine.filter.empty":"No reports match this filter.","kpi.new":"New","kpi.in_progress":"In progress","kpi.awaiting_validation":"Awaiting you","kpi.resolution_rate":"Resolution rate","detail.back":"Back","detail.thread":"Conversation","detail.no_replies":"No replies yet \u2014 we\u2019ll let you know when an operator responds.","detail.compose_placeholder":"Add a follow-up reply\u2026","detail.compose_send":"Reply","detail.compose_sending":"Sending\u2026","detail.attach_add":"Add image","detail.attach_remove":"Remove","detail.attachment_alt":"Attached image","detail.copy_link":"Copy link","detail.copied":"Link copied","detail.edit":"Edit","detail.edit_save":"Save","detail.edit_cancel":"Cancel","detail.edit_saving":"Saving\u2026","detail.edit_failed":"Could not save your changes.","detail.close_cta":"Mark as resolved","detail.close_busy":"Marking\u2026","detail.reopen_cta":"Still not fixed","detail.reopen_busy":"Reopening\u2026","detail.teammate_notice":"Viewing a teammate\u2019s report \u2014 replies are private to the submitter.","detail.load_failed.title":"Report not available","detail.load_failed.body":"It may have been deleted, or you no longer have access to it.","detail.load_failed.cta":"Back","detail.send_failed":"Couldn\u2019t send your reply. Try again.","detail.close_failed":"Couldn\u2019t mark as resolved. Try again.","detail.reopen_failed":"Couldn\u2019t reopen the report. Try again.","detail.history":"Status history","detail.context.submitted_at":"Submitted","detail.context.page":"Page","detail.context.capture.manual":"Manual capture","detail.context.capture.html2canvas":"Auto capture","detail.context.capture.display_media":"Screen share","detail.context.capture.none":"No screenshot","detail.author.staff":"Operator","detail.author.mcp":"Mhosaic Team","detail.author.system":"System","detail.tech.title":"What we received","detail.tech.errors_one":"error","detail.tech.errors_many":"errors","detail.tech.device":"Device","detail.tech.device.viewport":"Viewport","detail.tech.device.platform":"Platform","detail.tech.device.language":"Language","detail.tech.device.timezone":"Timezone","detail.tech.device.connection":"Connection","detail.tech.errors":"Runtime errors","detail.tech.console":"Console (last 20)","detail.tech.network":"Network (last 15)","status.new":"New","status.in_progress":"In progress","status.awaiting_validation":"Awaiting your validation","status.closed":"Closed","status.rejected":"Rejected","status.duplicate":"Duplicate","status.wontfix":"Won\u2019t fix"},ra={"fab.label":"Envoyer un commentaire","page.badge.aria":"Retours \u2014 {n} ouverts sur cette page","page.badge.aria.one":"Retours \u2014 1 ouvert sur cette page","page.strip.text":"{n} retours ouverts sur cette page","page.strip.text.one":"1 retour ouvert sur cette page","page.strip.view":"Voir","page.peek.title":"Sur cette page","page.peek.viewAll":"Voir les {n}","page.peek.viewAll.one":"Voir 1 retour ouvert","form.title":"Envoyer un commentaire","form.description.label":"Qu\u2019est-il arriv\xE9 ?","form.description.placeholder":"D\xE9crivez le probl\xE8me ou l\u2019id\xE9e en une ou deux phrases.","form.type.label":"Type","form.severity.label":"S\xE9v\xE9rit\xE9","form.submit":"Envoyer","form.cancel":"Annuler","form.close":"Fermer","form.submitting":"Envoi\u2026","form.success":"Merci \u2014 votre commentaire a \xE9t\xE9 envoy\xE9.","form.success.seq":"Merci \u2014 rapport n\xB0{seq} envoy\xE9. \u2713","form.discard.title":"Modifications non enregistr\xE9es","form.discard.body":"Abandonner votre commentaire ?","form.discard.keep":"Continuer la saisie","form.discard.confirm":"Abandonner","form.error":"\xC9chec d\u2019envoi. Veuillez r\xE9essayer.","form.description.required":"D\xE9crivez le probl\xE8me avant d\u2019envoyer.","form.screenshot.label":"Capture d\u2019\xE9cran","form.screenshot.cta_click":"Cliquez","form.screenshot.cta_rest":"d\xE9posez ou collez une image","form.screenshot.formats":"PNG, JPEG ou WebP \u2014 jusqu\u2019\xE0 10 Mo","form.screenshot.remove":"Retirer la capture","form.screenshot.annotate":"Annoter","form.screenshot.error_type":"Format non support\xE9. Utilisez PNG, JPEG ou WebP.","form.screenshot.error_size":"Fichier trop volumineux (max {max} Mo).","form.screenshot.error_count":"Trop de captures d\u2019\xE9cran (max {max}).","form.context.label":"Page","form.capture.notice":"La console, l\u2019activit\xE9 r\xE9seau et les erreurs sont captur\xE9es automatiquement pour faciliter le diagnostic.","type.bug":"Bogue","type.feature":"Suggestion","type.question":"Question","type.praise":"Compliment","type.typo":"Coquille","severity.blocker":"Bloquant","severity.high":"\xC9lev\xE9e","severity.medium":"Moyenne","severity.low":"Faible","annotator.title":"Annoter la capture","annotator.tool.rectangle":"Rectangle","annotator.tool.arrow":"Fl\xE8che","annotator.tool.freehand":"Dessin libre","annotator.tool.text":"Texte","annotator.tool.highlight":"Surligner","annotator.tool.blur":"Flouter (donn\xE9es sensibles)","annotator.text_prompt":"Entrez le texte :","annotator.color_picker":"Couleur personnalis\xE9e","annotator.undo":"Annuler","annotator.redo":"Refaire","annotator.clear":"Tout effacer","annotator.count_suffix":"annotations","annotator.loading":"Chargement\u2026","annotator.apply":"Appliquer","annotator.applying":"Application\u2026","tab.send":"Envoyer","tab.mine":"Mes rapports","tab.changelog":"Cette semaine","tab.board":"Tableau","board.kpi.total":"Total","board.kpi.new":"Nouveau","board.kpi.in_progress":"En cours","board.kpi.awaiting_validation":"\xC0 valider","board.kpi.closed":"Ferm\xE9","board.kpi.rejected":"Refus\xE9","board.kpi.resolution_rate":"Taux de r\xE9solution","board.sort":"Trier","board.sort.recent":"Plus r\xE9cents","board.sort.oldest":"Plus anciens","board.sort.updated":"Activit\xE9 r\xE9cente","board.sort.severity":"S\xE9v\xE9rit\xE9","board.sort.status":"Statut","board.filter.status":"Statut","board.filter.type":"Type","board.filter.severity":"S\xE9v\xE9rit\xE9","board.filter.search.placeholder":"Rechercher\u2026","board.filter.mine":"Les miens","board.filter.clear":"Effacer les filtres","board.list.empty.title":"Rien \xE0 voir ici","board.list.empty.description":"Les rapports appara\xEEtront ici d\xE8s qu\u2019ils arrivent.","board.list.loading":"Chargement\u2026","board.list.error":"Impossible de charger les rapports.","board.retry":"R\xE9essayer","board.list.you":"vous","board.list.count":"{n} sur {total}","board.list.loadMore":"Afficher plus","board.detail.empty":"S\xE9lectionnez un rapport \xE0 gauche pour voir le fil complet.","board.detail.by":"Par","board.detail.confirm_resolution":"Confirmer la r\xE9solution","board.detail.status_history":"Historique","board.scope.project":"Rapports du projet","board.scope.mine":"Vos rapports","board.scope.thisPage":"Cette page","board.scope.allPages":"Toutes les pages","board.scope.onThisPage":"sur cette page","board.list.count.page":"{n} sur {total} \xB7 cette page","board.list.empty.page.title":"Aucun retour sur cette page pour l\u2019instant.","board.list.empty.page.description":"Soyez le premier \xE0 signaler quelque chose ici \u2014 ou parcourez tout le projet.","board.back":"Retour","changelog.empty.title":"Rien de r\xE9solu pour l\u2019instant","changelog.empty.body":"Quand un rapport que vous avez envoy\xE9 est corrig\xE9, il appara\xEEtra ici, regroup\xE9 par semaine.","changelog.week_of":"Semaine du {date}","changelog.resolved_one":"{count} r\xE9solu","changelog.resolved_many":"{count} r\xE9solus","mine.empty.title":"Aucun rapport","mine.empty.body":"Apr\xE8s votre premier envoi vous pourrez suivre la conversation ici.","mine.refresh":"Actualiser","mine.loading":"Chargement\u2026","mine.error":"Impossible de charger vos rapports.","mine.jump.placeholder":"#","mine.jump.go":"Ouvrir","mine.jump.aria":"Ouvrir un rapport par num\xE9ro","mine.jump.not_found":"Aucun rapport avec ce num\xE9ro.","error.rate_limited":"Trop de requ\xEAtes \u2014 r\xE9essaie dans {seconds} s.","error.rate_limited_generic":"Trop de requ\xEAtes \u2014 r\xE9essaie dans un instant.","mine.replies_one":"1 r\xE9ponse","mine.replies_many":"{count} r\xE9ponses","mine.filter.empty":"Aucun rapport ne correspond \xE0 ce filtre.","kpi.new":"Nouveau","kpi.in_progress":"En cours","kpi.awaiting_validation":"\xC0 valider","kpi.resolution_rate":"Taux de r\xE9solution","detail.back":"Retour","detail.thread":"Conversation","detail.no_replies":"Pas encore de r\xE9ponse \u2014 vous serez notifi\xE9 d\xE8s qu\u2019un op\xE9rateur r\xE9pondra.","detail.compose_placeholder":"Ajouter une r\xE9ponse\u2026","detail.compose_send":"R\xE9pondre","detail.compose_sending":"Envoi\u2026","detail.attach_add":"Ajouter une image","detail.attach_remove":"Retirer","detail.attachment_alt":"Image jointe","detail.copy_link":"Copier le lien","detail.copied":"Lien copi\xE9","detail.edit":"Modifier","detail.edit_save":"Enregistrer","detail.edit_cancel":"Annuler","detail.edit_saving":"Enregistrement\u2026","detail.edit_failed":"Impossible d\u2019enregistrer vos modifications.","detail.close_cta":"Marquer comme r\xE9solu","detail.close_busy":"Validation\u2026","detail.reopen_cta":"Toujours pas r\xE9gl\xE9","detail.reopen_busy":"R\xE9ouverture\u2026","detail.teammate_notice":"Vous consultez le rapport d\u2019un co\xE9quipier \u2014 les r\xE9ponses sont priv\xE9es au soumetteur.","detail.load_failed.title":"Rapport indisponible","detail.load_failed.body":"Il a peut-\xEAtre \xE9t\xE9 supprim\xE9, ou vous n\u2019y avez plus acc\xE8s.","detail.load_failed.cta":"Retour","detail.send_failed":"Impossible d\u2019envoyer votre r\xE9ponse. R\xE9essayez.","detail.close_failed":"Impossible de marquer comme r\xE9solu. R\xE9essayez.","detail.reopen_failed":"Impossible de rouvrir le rapport. R\xE9essayez.","detail.history":"Historique du statut","detail.context.submitted_at":"Envoy\xE9","detail.context.page":"Page","detail.context.capture.manual":"Capture manuelle","detail.context.capture.html2canvas":"Capture automatique","detail.context.capture.display_media":"Partage d\u2019\xE9cran","detail.context.capture.none":"Sans capture","detail.author.staff":"Op\xE9rateur","detail.author.mcp":"\xC9quipe Mhosaic","detail.author.system":"Syst\xE8me","detail.tech.title":"Ce que nous avons re\xE7u","detail.tech.errors_one":"erreur","detail.tech.errors_many":"erreurs","detail.tech.device":"Appareil","detail.tech.device.viewport":"Fen\xEAtre","detail.tech.device.platform":"Plateforme","detail.tech.device.language":"Langue","detail.tech.device.timezone":"Fuseau horaire","detail.tech.device.connection":"Connexion","detail.tech.errors":"Erreurs d\u2019ex\xE9cution","detail.tech.console":"Console (20 derniers)","detail.tech.network":"R\xE9seau (15 derniers)","status.new":"Nouveau","status.in_progress":"En cours","status.awaiting_validation":"En attente de validation","status.closed":"Ferm\xE9","status.rejected":"Rejet\xE9","status.duplicate":"Doublon","status.wontfix":"Non corrig\xE9"},oa={fr:ra};function aa(e){var r;if(!e)return null;let t=e.toLowerCase().split(/[-_]/)[0];return(r=oa[t])!=null?r:null}function rr(e,t={}){var a;let r=(a=aa(t.locale))!=null?a:{};return{...ta,...r,...e}}de();oe();function pe(e){var r;let t=(r=e.getCurrentPage)==null?void 0:r.call(e);return t||(typeof window!="undefined"?window.location.pathname:"/")}var Ct="mfb:locationchange",qr=!1;function ga(){if(!(qr||typeof history=="undefined")){qr=!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(Ct)),a}}}}function tt(e){return ga(),window.addEventListener("popstate",e),window.addEventListener(Ct,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(Ct,e)}}oe();var _e=new Map;function Pr(e,t){return`${e}|${t}`}function Er(e){let t=_e.get(e);return t&&Date.now()-t.at<6e4?t:null}function Tr(e,t,r){if(!_e.has(e)&&_e.size>=50){let a=_e.keys().next().value;a!==void 0&&_e.delete(a)}_e.delete(e),_e.set(e,{page:t,kpis:r,at:Date.now()})}var Mr="mhosaic.boardView.";function Ar(e){try{let t=localStorage.getItem(Mr+e);if(!t)return{};let r=JSON.parse(t);return r&&typeof r=="object"?r:{}}catch(t){return{}}}function Lr(e,t){try{localStorage.setItem(Mr+e,JSON.stringify(t))}catch(r){}}function ge(e,t){let r=!1,a=!1,n=0,i=null,s=typeof document!="undefined"?document:null,l=()=>Math.min(t*2**n,t*10),d=async()=>{if(r)return;if(s!=null&&s.hidden){a=!0;return}let f=!1;try{f=await e()}catch(p){f=!1}r||(n=f?0:n+1,i=setTimeout(()=>{d()},l()))},c=()=>{r||!a||s!=null&&s.hidden||(a=!1,d())};return s==null||s.addEventListener("visibilitychange",c),d(),{stop(){r=!0,i&&clearTimeout(i),s==null||s.removeEventListener("visibilitychange",c)}}}function Ee(e,t){return e instanceof Ae?e.retryAfterSeconds>0?t["error.rate_limited"].replace("{seconds}",String(e.retryAfterSeconds)):t["error.rate_limited_generic"]:null}oe();de();de();var ha=0;function o(e,t,r,a,n,i){t||(t={});var s,l,d=t;if("ref"in d)for(l in d={},t)l=="ref"?s=t[l]:d[l]=t[l];var c={type:e,props:d,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--ha,__i:-1,__u:0,__source:n,__self:i};if(typeof e=="function"&&(s=e.defaultProps))for(l in s)d[l]===void 0&&(d[l]=s[l]);return W.vnode&&W.vnode(c),c}var Br=/#(\d+)/g;function ze(e,t){let r=e!=null?e:"";if(!r||!t)return[r];let a=[],n=0;Br.lastIndex=0;let i;for(;(i=Br.exec(r))!==null;){i.index>n&&a.push(r.slice(n,i.index));let s=Number(i[1]);a.push(o("button",{type:"button",class:"seq-link",onClick:()=>t(s),"aria-label":`Open report #${s}`,children:["#",s]})),n=i.index+i[0].length}return n<r.length&&a.push(r.slice(n)),a.length?a:[r]}function zr({comment:e,strings:t,onOpenSeq:r,stableUrl:a}){var p;let n=e.is_mine,i=!n&&e.author_source==="mcp",s=!n&&e.author_source==="system",l=i?"mcp":s?"system":"staff",d=l==="mcp"?"detail.author.mcp":l==="system"?"detail.author.system":"detail.author.staff",c=e.author_label||t[d],f=((p=e.attachments)!=null?p:[]).filter(u=>u.url);return o("div",{class:`comment-bubble ${n?"is-mine":"is-other"}`,children:[!n&&c&&o("div",{class:`comment-author comment-author--${l}`,children:c}),e.body&&o("div",{class:"comment-body",children:ze(e.body,r)}),f.length>0&&o("div",{class:"comment-attachments",children:f.map(u=>{let g=a?a(`att:${u.id}`,u.url):u.url;return o("a",{class:"comment-attachment",href:g,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:g,alt:t["detail.attachment_alt"],loading:"lazy"})},u.id)})}),o("div",{class:"comment-time",children:va(e.created_at)})]})}function va(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch(t){return e}}var ya=["image/png","image/jpeg","image/webp"];function rt(e){return ya.includes(e.type)?e.size>10485760?{kind:"size",maxMb:10485760/(1024*1024)}:null:{kind:"type"}}function Te(e,t=80){if(e.length<=t)return e;let r=Math.floor((t-1)/2),a=t-1-r;return`${e.slice(0,r)}\u2026${e.slice(e.length-a)}`}function Rt(e){if(!e)return;let t;try{t=new URL(e)}catch(r){return}if(t.protocol==="https:"||t.protocol==="http:"&&(t.hostname==="localhost"||t.hostname==="127.0.0.1"||t.hostname==="[::1]"))return t.toString()}var _a=3e4;function ot({api:e,externalId:t,reportId:r,strings:a,onBack:n,canModerate:i=!0,variant:s="modal",onOpenSeq:l,buildPermalink:d,seed:c}){var $t,Kt,Ot,Nt,Ht,Wt;let[f,p]=q(null),[u,g]=q(null),[S,C]=q(!1),[_,k]=q(!1),[R,x]=q(""),[v,b]=q(!1),[P,y]=q(!1),[F,E]=q(""),[L,D]=q(!1),[I,Q]=q(!1),[A,O]=q(!1),[H,Y]=q([]),[ee,J]=q(""),m=U(null),h=U(!0),M=U(new Map),[,B]=q(0),j=45*6e4,z=(T,K)=>{if(!K)return K;let G=M.current.get(T);return G&&Date.now()-G.at<j?G.url:(M.current.set(T,{url:K,at:Date.now()}),K)},$=T=>{M.current.delete(T),B(K=>K+1)},te=U(H);te.current=H,N(()=>()=>te.current.forEach(T=>URL.revokeObjectURL(T.preview)),[]);let ae=T=>{J("");let K=5-H.length,G=T.slice(0,Math.max(0,K));for(let Z of G){let ce=rt(Z);if(ce){J(ce.kind==="type"?a["form.screenshot.error_type"]:a["form.screenshot.error_size"].replace("{max}",String(ce.maxMb)));return}}if(G.length){let Z=G.map(ce=>({blob:ce,preview:URL.createObjectURL(ce)}));Y(ce=>[...ce,...Z])}T.length>G.length&&J(a["form.screenshot.error_count"].replace("{max}",String(5)))},ke=T=>{var Z;let K=T.target,G=Array.from((Z=K.files)!=null?Z:[]);G.length&&ae(G),K.value=""},se=T=>{let K=H[T];K&&URL.revokeObjectURL(K.preview),Y(G=>G.filter((Z,ce)=>ce!==T)),J("")},Se=async()=>{try{let T=await e.getReport(r,t);return h.current&&(p(T),g(null)),!0}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] getReport:",T),!h.current)return!1;let K=Ee(T,a);return g(K!=null?K:"load_failed"),!1}};N(()=>{h.current=!0;let T=ge(Se,_a);return()=>{h.current=!1,T.stop()}},[r,t]);let ve=async()=>{if(!(!F.trim()&&H.length===0||L)){D(!0);try{let T=`${r}:${Date.now()}`,K=H.map(Z=>Z.blob),G=await e.addComment(r,t,F.trim(),T,K.length?K:void 0);if(!h.current)return;E(""),H.forEach(Z=>URL.revokeObjectURL(Z.preview)),Y([]),J(""),p(Z=>Z&&{...Z,comments:xa(Z.comments,G)}),Se()}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] addComment:",T),!h.current)return;g(a["detail.send_failed"])}finally{h.current&&D(!1)}}},Oe=async()=>{if(!(!d||!f))try{if(await navigator.clipboard.writeText(d(f.id)),!h.current)return;C(!0),setTimeout(()=>{h.current&&C(!1)},2e3)}catch(T){}},zo=()=>{f&&(x(f.description),y(!1),k(!0))},Fo=()=>{k(!1),y(!1)},Io=async()=>{if(!f||v)return;let T=R.trim();if(T){b(!0),y(!1);try{let K=await e.editDescription(r,t,T);if(!h.current)return;p(K),k(!1)}catch(K){if(typeof console!="undefined"&&console.warn("[mhosaic] editDescription:",K),!h.current)return;y(!0)}finally{h.current&&b(!1)}}},Do=async()=>{if(!(I||A)){Q(!0);try{let T=await e.closeAsResolved(r,t);if(!h.current)return;p(T)}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] closeAsResolved:",T),!h.current)return;g(a["detail.close_failed"])}finally{h.current&&Q(!1)}}},$o=async()=>{if(!(I||A)){O(!0);try{let T=await e.reopenUnresolved(r,t);if(!h.current)return;p(T)}catch(T){if(typeof console!="undefined"&&console.warn("[mhosaic] reopenUnresolved:",T),!h.current)return;g(a["detail.reopen_failed"])}finally{h.current&&O(!1)}}};if(!f&&!u){if(c){let T=o("span",{class:`pill pill-status pill-status--${c.status}`,children:($t=a[`status.${c.status}`])!=null?$t:c.status});return o("div",{class:`report-detail variant-${s} is-seeded`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.back"]]}),T]}),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"]]}),T]}),o("div",{class:"report-detail-body",children:[o("div",{class:"report-detail-description-row",children:o("p",{class:"report-detail-description",children:ze(c.description,l)})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),o("div",{class:"mine-loading",children:a["mine.loading"]})]})]})}return o("div",{class:"mine-loading",children:a["mine.loading"]})}if(!f)return u&&u!=="load_failed"?o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-body",children:u}),o("button",{type:"button",class:"btn",onClick:()=>{Se()},children:a["board.retry"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]}):o("div",{class:"report-detail-empty-state",role:"alert",children:[o("p",{class:"report-detail-empty-state-title",children:a["detail.load_failed.title"]}),o("p",{class:"report-detail-empty-state-body",children:a["detail.load_failed.body"]}),o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.load_failed.cta"]]})]});let Ft=(Kt=f.is_mine)!=null?Kt:i,It=(Ot=f.can_moderate)!=null?Ot:Ft,Dt=It&&f.status==="awaiting_validation",Ko=It;return o("div",{class:`report-detail variant-${s}`,children:[s==="modal"&&o("div",{class:"report-detail-header",children:[o("button",{type:"button",class:"btn",onClick:n,children:["\u2190 ",a["detail.back"]]}),o("span",{class:`pill pill-status pill-status--${f.status}`,children:(Nt=a[`status.${f.status}`])!=null?Nt:f.status})]}),s==="board"&&o("div",{class:"report-detail-header report-detail-header--board",children:[o("button",{type:"button",class:"btn btn--ghost report-detail-back",onClick:n,"aria-label":a["board.back"],children:["\u2190 ",a["board.back"]]}),o("span",{class:`pill pill-status pill-status--${f.status}`,children:(Ht=a[`status.${f.status}`])!=null?Ht:f.status})]}),o("div",{class:"report-detail-body",children:[o(wa,{detail:f,strings:a}),_?o("div",{class:"report-detail-edit",children:[o("textarea",{class:"report-detail-edit-input",value:R,onInput:T=>{x(T.target.value),y(!1)},disabled:v}),P&&o("p",{class:"error",role:"alert",children:a["detail.edit_failed"]}),o("div",{class:"report-detail-edit-actions",children:[o("button",{type:"button",class:"btn btn--ghost",onClick:Fo,disabled:v,children:a["detail.edit_cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:Io,disabled:v||!R.trim(),children:v?a["detail.edit_saving"]:a["detail.edit_save"]})]})]}):o("div",{class:"report-detail-description-row",children:[o("p",{class:"report-detail-description",children:ze(f.description,l)}),Ft&&o("button",{type:"button",class:"btn btn--ghost report-detail-edit",onClick:zo,children:a["detail.edit"]})]}),d&&o("div",{class:"report-detail-permalink",children:o("button",{type:"button",class:"btn btn--ghost report-detail-copy-link",onClick:Oe,children:S?a["detail.copied"]:a["detail.copy_link"]})}),((Wt=f.screenshots)!=null&&Wt.length?f.screenshots.map(T=>T.url):[f.screenshot_url]).map((T,K)=>({url:z(`shot:${K}`,T!=null?T:null),pinKey:`shot:${K}`})).filter(T=>!!T.url).map(({url:T,pinKey:K})=>{let G=Rt(T);return G?o("a",{class:"report-detail-screenshot",href:G,target:"_blank",rel:"noopener noreferrer",children:o("img",{src:T,alt:"",loading:"lazy",onError:()=>$(K)})}):o("div",{class:"report-detail-screenshot",children:o("img",{src:T,alt:"",loading:"lazy",onError:()=>$(K)})})}),o("h3",{class:"report-detail-section",children:a["detail.thread"]}),f.comments.length===0?o("p",{class:"report-detail-empty",children:a["detail.no_replies"]}):o("ul",{class:"report-comments",children:f.comments.map(T=>o("li",{children:o(zr,{comment:T,strings:a,...l&&{onOpenSeq:l},stableUrl:(K,G)=>{var Z;return(Z=z(K,G))!=null?Z:G}})}))}),f.status_history&&f.status_history.length>0&&o(Ma,{rows:f.status_history,strings:a}),f.technical_context&&o(Ca,{ctx:f.technical_context,strings:a}),Ko?o("div",{class:"report-compose",children:[o("textarea",{value:F,placeholder:a["detail.compose_placeholder"],onInput:T=>E(T.target.value),disabled:L}),H.length>0&&o("div",{class:"compose-attachments",children:H.map((T,K)=>o("div",{class:"compose-attachment",children:[o("img",{src:T.preview,alt:a["detail.attachment_alt"]}),o("button",{type:"button",class:"compose-attachment-remove","aria-label":a["detail.attach_remove"],onClick:()=>se(K),disabled:L,children:"\xD7"})]},T.preview))}),ee&&o("p",{class:"compose-attach-error",role:"alert",children:ee}),o("input",{ref:m,type:"file",accept:"image/png,image/jpeg,image/webp",multiple:!0,class:"compose-attach-input",onChange:ke,hidden:!0}),o("div",{class:"report-compose-actions",children:[o("button",{type:"button",class:"btn btn--ghost compose-attach-btn",onClick:()=>{var T;return(T=m.current)==null?void 0:T.click()},disabled:L||H.length>=5,children:a["detail.attach_add"]}),Dt&&o("button",{type:"button",class:"btn",onClick:Do,disabled:I||A,children:I?a["detail.close_busy"]:a["detail.close_cta"]}),Dt&&o("button",{type:"button",class:"btn btn--ghost",onClick:$o,disabled:I||A,children:A?a["detail.reopen_busy"]:a["detail.reopen_cta"]}),o("button",{type:"button",class:"btn btn--primary",onClick:ve,disabled:!F.trim()&&H.length===0||L,children:L?a["detail.compose_sending"]:a["detail.compose_send"]})]})]}):o("p",{class:"report-detail-teammate-notice",role:"note",children:a["detail.teammate_notice"]}),u&&o("div",{class:"error",children:u})]})]})}function xa(e,t){return e.some(r=>r.id===t.id)?e:[...e,t]}function wa({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:Fr(e.created_at)})]}),e.page_url&&(()=>{let i=Rt(e.page_url);return o("div",{class:"report-detail-context-line",title:e.page_url,children:[o("span",{class:"report-detail-context-label",children:t["detail.context.page"]}),i?o("a",{class:"report-detail-context-url",href:i,target:"_blank",rel:"noopener noreferrer",children:Te(e.page_url,64)}):o("span",{class:"report-detail-context-url",children:Te(e.page_url,64)})]})})()]})}function Fr(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}catch(t){return e}}var ka=20,Sa=15;function Ca({ctx:e,strings:t}){var c,f,p;let r=(c=e.errors)!=null?c:[],a=((f=e.consoleLogs)!=null?f:[]).slice(-ka),n=((p=e.networkRequests)!=null?p:[]).slice(-Sa),i=e.device;if(!(!!i||r.length>0||a.length>0||n.length>0))return null;let l=r.length,d=l>0?`${t["detail.tech.title"]} \xB7 ${l} ${l===1?t["detail.tech.errors_one"]:t["detail.tech.errors_many"]}`:t["detail.tech.title"];return o("details",{class:"report-detail-tech",children:[o("summary",{children:d}),o("div",{class:"tech-body",children:[i&&o(Ra,{device:i,strings:t}),r.length>0&&o(qa,{errors:r,strings:t}),a.length>0&&o(Pa,{logs:a,strings:t}),n.length>0&&o(Ea,{rows:n,strings:t})]})]})}function Ra({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(re,{children:[o("dt",{children:a.label}),o("dd",{children:a.value})]}))})]})}function qa({errors:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.errors"]}),o("ul",{class:"tech-errors",children:e.map(r=>o("li",{children:[o("div",{class:"tech-errors-msg",children:r.message}),r.stack&&o("pre",{class:"tech-errors-stack",children:Ta(r.stack)})]}))})]})}function Pa({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 Ea({rows:e,strings:t}){return o("div",{class:"tech-section",children:[o("h4",{children:t["detail.tech.network"]}),o("ul",{class:"tech-network",children:e.map(r=>{let a=r.status>=400||r.status===0;return o("li",{class:`tech-network-row${a?" tech-network-row--fail":""}`,children:[o("span",{class:"tech-network-status",children:r.status||"\u2014"}),o("span",{class:"tech-network-method",children:r.method}),o("span",{class:"tech-network-url",title:r.url,children:Te(r.url,56)}),o("span",{class:"tech-network-time",children:[Math.round(r.durationMs),"ms"]})]})})})]})}function Ta(e){let t=e.split(`
|
|
619
619
|
`);return t.length<=12?e:t.slice(0,12).join(`
|
|
620
620
|
`)+`
|
|
621
|
-
\u2026`}function va({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:kr(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 ya=3e4,_a=300,xa=["recent","oldest","updated","severity","status"],wa=["new","in_progress","awaiting_validation","closed","rejected"],ka=["bug","feature","question","praise","typo"],Sa=["blocker","high","medium","low"];function Cr({api:e,externalId:t,strings:r,getCurrentPage:a,initialSelectedId:n}){var M,$;let[i,s]=P(()=>yr(t)),[l,p]=P(!0);H(()=>{_r(t,i)},[t,Sr(i)]);let[c,m]=P(null),[d,f]=P(null),[g,k]=P(!0),[C,h]=P(null),[w,R]=P(n!=null?n:null),[x,v]=P(0),[b,q]=P(0),[_,F]=P((M=i.q)!=null?M:""),E=Fa(_,_a);H(()=>{s(L=>{var O;if(((O=L.q)!=null?O:"")===E)return L;if(E===""){let{q:Q,...W}=L;return W}return{...L,q:E}})},[E]),H(()=>{var L;F((L=i.q)!=null?L:"")},[i.q]);let B=re(()=>{var L,O,Q,W,u,S;return((O=(L=i.status)==null?void 0:L.length)!=null?O:0)+((W=(Q=i.type)==null?void 0:Q.length)!=null?W:0)+((S=(u=i.severity)==null?void 0:u.length)!=null?S:0)+(i.q?1:0)+(i.mine?1:0)},[i]);H(()=>{if(l)return We(()=>q(L=>L+1))},[l]);let D=re(()=>{var O;let L=!!((O=i.q)!=null&&O.trim());return l&&!L?{...i,pagePath:se(a!==void 0?{getCurrentPage:a}:{})}:i},[Sr(i),l,b]);H(()=>{let L=!1;m(null),f(null),k(!0);let O=fe(async()=>{var Q;try{let[W,u]=await Promise.all([e.listBoard(t,D),e.fetchBoardKpis(t,D)]);return L||(m(W),f(u),h(null)),!0}catch(W){return L||h((Q=we(W,r))!=null?Q:r["board.list.error"]),!1}finally{L||k(!1)}},ya);return()=>{L=!0,O.stop()}},[e,t,JSON.stringify(D)]);let I=re(()=>{var L;return!w||!c?null:(L=c.results.find(O=>O.id===w))!=null?L:null},[w,c]),N=L=>{R(L.id),v(O=>O+1)};return o("div",{class:"board-view",children:[o(Ca,{strings:r,kpis:d,thisPage:l}),o(qa,{filters:i,onChange:s,searchDraft:_,onSearchDraftChange:F,activeCount:B,strings:r,thisPage:l,onToggleThisPage:()=>p(L=>!L)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":g&&!c,children:[C&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:C}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{h(null),k(!0),q(L=>L+1)},children:r["board.retry"]})]}),!C&&g&&!c&&o(Aa,{}),!C&&c&&c.results.length===0&&!g&&o(Ta,{strings:r,thisPage:l,onAllPages:()=>p(!1)}),!C&&c&&c.results.length>0&&o(Pa,{rows:c.results,selectedId:w,onPick:N,strings:r,total:c.count,thisPage:l})]}),o("div",{class:`board-detail-wrap ${I?"has-selection":""}`,children:I?o(Ge,{api:e,externalId:t,reportId:I.id,strings:r,onBack:()=>R(null),canModerate:($=I.can_moderate)!=null?$:I.is_mine,variant:"board",onOpenSeq:L=>{e.getReportBySeq(L,t).then(O=>{R(O.id),v(Q=>Q+1)}).catch(()=>{})}},x):o("div",{class:"board-detail-empty",children:[o(Ba,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Ca({strings:e,kpis:t,thisPage:r}){let a=r?e["board.scope.onThisPage"]:(t==null?void 0:t.scope)==="project"?e["board.scope.project"]:e["board.scope.mine"];return o("header",{class:"board-header",children:[o("div",{class:"board-header-title",children:[o("span",{class:"board-header-emoji","aria-hidden":"true",children:"\u{1F4CB}"}),o("div",{children:[o("h2",{class:"board-header-h",children:e["tab.board"]}),o("p",{class:"board-header-sub",children:t?`${t.total} \xB7 ${a}`:a})]})]}),o(Ra,{kpis:t,strings:e})]})}function Ra({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 qa({filters:e,onChange:t,searchDraft:r,onSearchDraftChange:a,activeCount:n,strings:i,thisPage:s,onToggleThisPage:l}){var k,C,h,w,R,x,v;let p=b=>{if(b===""){let{status:q,..._}=e;t(_)}else t({...e,status:[b]})},c=b=>{if(b===""){let{type:q,..._}=e;t(_)}else t({...e,type:[b]})},m=b=>{if(b===""){let{severity:q,..._}=e;t(_)}else t({...e,severity:[b]})},d=b=>t({...e,ordering:b}),f=()=>{if(e.mine){let{mine:b,...q}=e;t(q)}else t({...e,mine:!0})},g=()=>t({});return o("div",{class:"board-filters",children:[o("div",{class:"board-scope",role:"group","aria-label":i["board.scope.thisPage"],children:[o("button",{type:"button",class:`board-scope-btn ${s?"is-active":""}`,"aria-pressed":s,onClick:()=>!s&&l(),children:i["board.scope.thisPage"]}),o("button",{type:"button",class:`board-scope-btn ${s?"":"is-active"}`,"aria-pressed":!s,onClick:()=>s&&l(),children:i["board.scope.allPages"]})]}),o("select",{class:"board-filter-select","aria-label":i["board.sort"],value:(k=e.ordering)!=null?k:"recent",onChange:b=>d(b.target.value),children:xa.map(b=>o("option",{value:b,children:i[`board.sort.${b}`]},b))}),o("select",{class:"board-filter-select","aria-label":i["board.filter.status"],value:(h=(C=e.status)==null?void 0:C[0])!=null?h:"",onChange:b=>p(b.target.value),children:[o("option",{value:"",children:i["board.filter.status"]}),wa.map(b=>{var q;return o("option",{value:b,children:(q=i[`board.kpi.${b}`])!=null?q:b},b)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.type"],value:(R=(w=e.type)==null?void 0:w[0])!=null?R:"",onChange:b=>c(b.target.value),children:[o("option",{value:"",children:i["board.filter.type"]}),ka.map(b=>{var q;return o("option",{value:b,children:(q=i[`type.${b}`])!=null?q:b},b)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.severity"],value:(v=(x=e.severity)==null?void 0:x[0])!=null?v:"",onChange:b=>m(b.target.value),children:[o("option",{value:"",children:i["board.filter.severity"]}),Sa.map(b=>{var q;return o("option",{value:b,children:(q=i[`severity.${b}`])!=null?q:b},b)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:i["board.filter.search.placeholder"],value:r,onInput:b=>a(b.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:f}),o("span",{children:i["board.filter.mine"]})]}),n>0&&o("button",{type:"button",class:"board-filter-clear",onClick:g,children:[o(La,{}),i["board.filter.clear"]]})]})}function Pa({rows:e,selectedId:t,onPick:r,strings:a,total:n,thisPage:i}){return o(ee,{children:[o("div",{class:"board-list-count",children:a[i?"board.list.count.page":"board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(n))}),o("ul",{class:"board-list",role:"list",children:e.map(s=>o(Ea,{row:s,selected:s.id===t,onPick:r,strings:a},s.id))})]})}function Ea({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(Ma,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Ia(e.created_at)})]})]})})}function Ta({strings:e,thisPage:t,onAllPages:r}){return o("div",{class:"board-empty",children:[o(za,{}),o("h3",{children:e[t?"board.list.empty.page.title":"board.list.empty.title"]}),o("p",{children:e[t?"board.list.empty.page.description":"board.list.empty.description"]}),t&&o("button",{type:"button",class:"btn btn--ghost",onClick:r,children:e["board.scope.allPages"]})]})}function Aa(){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 Ma(){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 La(){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 za(){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 Ba(){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 Fa(e,t){let[r,a]=P(e);return H(()=>{let n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}function Sr(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 Ia(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`}Z();function Da(e){return`pill pill-status pill-status--${e}`}function $a(e){return`pill pill-severity pill-severity--${e}`}function Ha(){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 Oa(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function Xe({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:Da(e.status),children:(n=t[`status.${e.status}`])!=null?n:e.status}),o("span",{class:Ha(),children:t[`type.${e.feedback_type}`]}),o("span",{class:$a(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 ",Oa(e.comment_count,t)]})]})]})}var Ka=3e4;function ja(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 Qa(e){let t=new Map;for(let r of e){let a=ja(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:Wa(r),rows:a}))}function Wa(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Rr({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=P(null),[s,l]=P(null),[p,c]=P(!1),m=V(!0),d=async()=>{c(!0),l(null);try{let C=await e.listChangelog(t);return m.current&&i(C),!0}catch(C){return typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",C),m.current&&l(r["mine.error"]),!1}finally{m.current&&c(!1)}};H(()=>{m.current=!0;let C=fe(d,Ka);return()=>{m.current=!1,C.stop()}},[t]);let f=re(()=>n?Qa(n):[],[n]),g=n===null&&!s,k=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"]})]}),g&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),k&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),f.length>0&&o("div",{class:"changelog-groups",children:f.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(h=>o("li",{children:o(Xe,{row:h,strings:r,onClick:()=>a(h)})}))})]},C.weekKey))})]})}function Ua(){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 qr({label:e,onClick:t,count:r}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:[o(Ua,{}),r!==void 0&&r>0&&o("span",{class:"fab-badge","aria-hidden":"true",children:r>9?"9+":String(r)})]})}Z();Z();var Pr=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],Va=.35;function Er(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")Ga(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=Va,e.fillRect(Ye(t.x,t.w),Ye(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&Xa(e,t,r);e.restore()}function Ye(e,t){return t<0?e+t:e}function Ga(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 Xa(e,t,r){if(!r)return;let a=Ye(t.x,t.w),n=Ye(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 m=Math.min(l,a+i-c),d=Math.min(l,n+s-p);e.drawImage(r,c,p,m,d,c,p,m,d)}e.imageSmoothingEnabled=!1;for(let p=n;p<n+s;p+=l)for(let c=a;c<a+i;c+=l){let m=Math.min(l,a+i-c),d=Math.min(l,n+s-p);e.drawImage(r,c,p,1,1,c,p,m,d)}e.imageSmoothingEnabled=!0}var le={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 Tr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=V(null),i=V(null),s=V(null),[l,p]=P("rectangle"),[c,m]=P(Pr[0]),[d,f]=P([]),[g,k]=P([]),[C,h]=P([]),w=V(!1),[R,x]=P(null),[v,b]=P(!1),[q,_]=P(!1),F=V(1);function E(u){f(S=>(k(T=>[...T,S]),[...S,u])),h([])}function B(){f(u=>(k(S=>[...S,u]),[])),h([])}function D(){k(u=>{if(u.length===0)return u;let S=u[u.length-1];return f(T=>(h(z=>[T,...z]),S)),u.slice(0,-1)})}function I(){h(u=>{if(u.length===0)return u;let S=u[0];return f(T=>(k(z=>[...z,T]),S)),u.slice(1)})}bt(()=>{let u=S=>{S.key==="Escape"&&(S.stopPropagation(),a())};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[a]),H(()=>{let u=S=>{if(!(S.metaKey||S.ctrlKey))return;let z=S.key.toLowerCase();z==="z"?(S.preventDefault(),S.stopPropagation(),S.shiftKey?I():D()):z==="y"&&(S.preventDefault(),S.stopPropagation(),I())};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[g,C,d]),H(()=>{let u=URL.createObjectURL(e),S=new Image;return S.onload=()=>{s.current=S,b(!0)},S.src=u,()=>URL.revokeObjectURL(u)},[e]),bt(()=>{if(!v||!n.current||!s.current||!i.current)return;let u=s.current,T=i.current.clientWidth-16,z=window.innerHeight*.65,j=Math.min(T/u.width,z/u.height,1);F.current=j;let Y=n.current;Y.width=u.width,Y.height=u.height,Y.style.width=`${u.width*j}px`,Y.style.height=`${u.height*j}px`,N()},[v]),H(()=>{N()},[d,R]);function N(){let u=n.current,S=s.current;if(!u||!S)return;let T=u.getContext("2d");if(T){T.clearRect(0,0,u.width,u.height),T.drawImage(S,0,0);for(let z of d)Er(T,z,S);R&&Er(T,R,S)}}function M(u){let T=n.current.getBoundingClientRect();return{x:(u.clientX-T.left)/F.current,y:(u.clientY-T.top)/F.current}}let $=u=>{if(!v)return;let{x:S,y:T}=M(u),z=n.current.width,j=Math.max(3,Math.round(z/400)),Y=Math.max(8,Math.round(z/80));if(l==="text"){let pe=window.prompt(t["annotator.text_prompt"]);pe&&pe.trim()&&E({kind:"text",x:S,y:T,text:pe.trim(),color:c,fontSize:Math.max(16,Math.round(z/50)),lineWidth:1});return}w.current=!0,l==="rectangle"?x({kind:"rectangle",x:S,y:T,w:0,h:0,color:c,lineWidth:j}):l==="arrow"?x({kind:"arrow",x1:S,y1:T,x2:S,y2:T,color:c,lineWidth:j}):l==="freehand"?x({kind:"freehand",points:[{x:S,y:T}],color:c,lineWidth:j}):l==="highlight"?x({kind:"highlight",x:S,y:T,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&x({kind:"blur",x:S,y:T,w:0,h:0,color:"#000000",lineWidth:0,tile:Y})},L=u=>{if(!w.current)return;let{x:S,y:T}=M(u);x(z=>z&&(z.kind==="rectangle"||z.kind==="highlight"||z.kind==="blur"?{...z,w:S-z.x,h:T-z.y}:z.kind==="arrow"?{...z,x2:S,y2:T}:z.kind==="freehand"?{...z,points:[...z.points,{x:S,y:T}]}:z))},O=()=>{x(u=>(w.current&&u&&((u.kind==="rectangle"||u.kind==="highlight"||u.kind==="blur")&&Math.abs(u.w)<4&&Math.abs(u.h)<4||u.kind==="arrow"&&Math.hypot(u.x2-u.x1,u.y2-u.y1)<4||u.kind==="freehand"&&u.points.length<3||E(u)),null)),w.current=!1},Q=async()=>{let u=n.current;if(u){_(!0);try{let S=await new Promise(T=>u.toBlob(T,"image/png",.92));S&&r(S)}finally{_(!1)}}},W=[{id:"rectangle",icon:le.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:le.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:le.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:le.text,label:t["annotator.tool.text"]},{id:"highlight",icon:le.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:le.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:u=>{u.target===u.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:le.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:W.map(u=>o("button",{type:"button",onClick:()=>p(u.id),title:u.label,"aria-label":u.label,"aria-pressed":l===u.id,class:`annotator-tool ${l===u.id?"is-active":""}`,children:u.icon},u.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Pr.map(u=>o("button",{type:"button",onClick:()=>m(u),"aria-label":u,"aria-pressed":c===u,class:`annotator-color ${c===u?"is-active":""}`,style:{backgroundColor:u}},u)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:u=>m(u.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:[le.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:I,disabled:C.length===0,title:t["annotator.redo"],children:[le.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:B,disabled:d.length===0,children:[le.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:v?o("canvas",{ref:n,onMouseDown:$,onMouseMove:L,onMouseUp:O,onMouseLeave:O,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:Q,disabled:q||!v,children:q?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var Ya=["bug","feature","question","praise","typo"],Ja=["blocker","high","medium","low"];function Ar({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n,submittedSeq:i,onDirtyChange:s}){let[l,p]=P(""),[c,m]=P("bug"),[d,f]=P("medium"),[g,k]=P(""),[C,h]=P([]),[w,R]=P(!1),[x,v]=P(null),b=V(null),q=V(null),_=a==="submitting",F=_?e["form.submitting"]:e["form.submit"],E=typeof window!="undefined"?window.location.href:"",B=l.trim()!==""||C.length>0;H(()=>{s==null||s(B)},[B]);let D=V(C);D.current=C,H(()=>()=>{D.current.forEach(u=>URL.revokeObjectURL(u.preview))},[]);let I=u=>{k("");let S=5-C.length,T=u.slice(0,Math.max(0,S));for(let z of T)if(z instanceof File){let j=Ve(z);if(j){k(j.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(j.maxMb)));return}}if(T.length){let z=T.map(j=>({blob:j,preview:URL.createObjectURL(j)}));h(j=>[...j,...z])}u.length>T.length&&k(e["form.screenshot.error_count"].replace("{max}",String(5)))},N=u=>{let S=C[u];S&&URL.revokeObjectURL(S.preview),h(T=>T.filter((z,j)=>j!==u)),k(""),b.current&&(b.current.value="")},M=u=>{var z;let S=u.target,T=Array.from((z=S.files)!=null?z:[]);T.length&&I(T),S.value=""},$=u=>{u.preventDefault(),u.stopPropagation(),R(!0)},L=u=>{u.preventDefault(),u.stopPropagation(),u.currentTarget===u.target&&R(!1)},O=u=>{var T,z;u.preventDefault(),u.stopPropagation(),R(!1);let S=Array.from((z=(T=u.dataTransfer)==null?void 0:T.files)!=null?z:[]);S.length&&I(S)};H(()=>{let u=q.current;if(!u)return;let S=T=>{var j;let z=(j=T.clipboardData)==null?void 0:j.items;if(z){for(let Y of Array.from(z))if(Y.kind==="file"&&Y.type.startsWith("image/")){let pe=Y.getAsFile();if(pe){T.preventDefault(),I([pe]);return}}}};return u.addEventListener("paste",S),()=>u.removeEventListener("paste",S)},[C.length]);let Q=u=>{let S=x;if(S===null||!C[S]){v(null);return}URL.revokeObjectURL(C[S].preview);let T={blob:u,preview:URL.createObjectURL(u)};h(z=>z.map((j,Y)=>Y===S?T:j)),v(null)};return o("form",{onSubmit:u=>{if(u.preventDefault(),!l.trim()){k(e["form.description.required"]);return}k("");let S={description:l.trim(),feedback_type:c,severity:d};C.length&&(S.screenshots=C.map(T=>T.blob),S.capture_method="manual"),t(S)},children:[o("h2",{children:e["form.title"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:l,placeholder:e["form.description.placeholder"],onInput:u=>p(u.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:c,onChange:u=>m(u.target.value),children:Ya.map(u=>o("option",{value:u,children:e[`type.${u}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:d,onChange:u=>f(u.target.value),children:Ja.map(u=>o("option",{value:u,children:e[`severity.${u}`]}))})]})]}),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:M,"aria-hidden":"true",tabIndex:-1}),C.length>0&&o("div",{class:"screenshot-strip",children:C.map((u,S)=>o("div",{class:"screenshot-preview",children:[o("img",{src:u.preview,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>v(S),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:()=>N(S),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"]]})]})]},u.preview))}),C.length<5&&o("div",{ref:q,class:`screenshot-dropzone ${w?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var u;return(u=b.current)==null?void 0:u.click()},onKeyDown:u=>{var S;(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),(S=b.current)==null||S.click())},onDragOver:$,onDragLeave:L,onDrop:O,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"]})]})]}),E&&o("div",{class:"page-context",title:E,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:ke(E,90)})]}),o("div",{class:"capture-notice",children:e["form.capture.notice"]}),g&&o("div",{class:"error",children:g}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children:i!==void 0?e["form.success.seq"].replace("{seq}",String(i)):e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:_,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:_,children:F})]}),x!==null&&C[x]&&o(Tr,{imageBlob:C[x].blob,strings:e,onCancel:()=>v(null),onSave:Q})]})}Z();function Za(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 en(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var tn={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function Mr(e,t){return t==="all"?e:e.filter(r=>tn[r.status]===t)}function Lr({rows:e,filter:t,onFilter:r,strings:a}){let n=Za(e),i=en(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 rn=3e4;function zr({api:e,externalId:t,strings:r,onSelect:a,onOpenSeq:n}){var B;let[i,s]=P(null),[l,p]=P(null),[c,m]=P(!1),[d,f]=P("all"),[g,k]=P(""),[C,h]=P(!1),[w,R]=P(!1),x=V(!0),v=async D=>{if(D.preventDefault(),!n||w)return;let I=parseInt(g.replace(/^#/,"").trim(),10);if(!Number.isInteger(I)||I<=0){h(!0);return}R(!0),h(!1);try{let N=await n(I);if(!x.current)return;N?k(""):h(!0)}finally{x.current&&R(!1)}},b=async()=>{var D;m(!0),p(null);try{let I=await e.listMine(t);return x.current&&s(I),!0}catch(I){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",I),x.current&&p((D=we(I,r))!=null?D:r["mine.error"]),!1}finally{x.current&&m(!1)}};H(()=>{x.current=!0;let D=fe(b,rn);return()=>{x.current=!1,D.stop()}},[t]);let q=i!==null&&i.length===0,_=i===null&&!l,F=i?Mr(i,d):null,E=!!i&&i.length>0&&((B=F==null?void 0:F.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("div",{class:"mine-list-header-actions",children:[n&&o("form",{class:"mine-jump",onSubmit:v,children:[o("input",{type:"text",inputMode:"numeric",value:g,placeholder:r["mine.jump.placeholder"],"aria-label":r["mine.jump.aria"],onInput:D=>{k(D.target.value),h(!1)},disabled:w}),o("button",{type:"submit",class:"btn",disabled:w||!g.trim(),children:r["mine.jump.go"]})]}),o("button",{type:"button",class:"btn",onClick:()=>{b()},disabled:c,children:c?r["mine.loading"]:r["mine.refresh"]})]})]}),C&&o("div",{class:"mine-jump-error error",role:"alert",children:r["mine.jump.not_found"]}),i&&i.length>0&&o(Lr,{rows:i,filter:d,onFilter:f,strings:r}),_&&o("div",{class:"mine-loading",children:r["mine.loading"]}),l&&o("div",{class:"error",children:l}),q&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),E&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),F&&F.length>0&&o("ul",{class:"mine-rows",children:F.map(D=>o("li",{children:o(Xe,{row:D,strings:r,onClick:()=>a(D)})}))})]})}Z();function Br({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=V(null),i=V(null);return H(()=>{var p;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("escape"))};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("backdrop")},children:o("div",{ref:n,class:`modal ${a?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:()=>e("button"),children:"\xD7"}),t]})})}function Fr({open:e,strings:t,onView:r}){if(e===0)return null;let a=e===1?t["page.strip.text.one"]:t["page.strip.text"].replace("{n}",String(e));return o("div",{class:"page-strip",children:[o("span",{children:a}),o("button",{type:"button",class:"page-strip-view",onClick:r,children:t["page.strip.view"]})]})}Z();function Ir({api:e,externalId:t,strings:r,getCurrentPage:a,open:n,onViewAll:i,onPickRow:s,onSend:l}){let[p,c]=P(null),[m,d]=P(!1);return H(()=>{let f=!1,g=se(a!==void 0?{getCurrentPage:a}:{});return e.listBoard(t,{pagePath:g,status:["new","in_progress","awaiting_validation"]}).then(k=>{f||c(k.results.slice(0,5))}).catch(()=>{f||d(!0)}),()=>{f=!0}},[e,t]),o("div",{class:"page-peek",role:"region","aria-label":r["page.peek.title"],children:[o("div",{class:"page-peek-title",children:r["page.peek.title"]}),p===null&&!m&&o("div",{class:"page-peek-skeleton","aria-hidden":"true",children:[o("div",{})," ",o("div",{})]}),p!==null&&p.map(f=>o("button",{type:"button",class:"page-peek-row",onClick:()=>s==null?void 0:s(f.id),children:[o("span",{class:`page-peek-dot status-${f.status}`,"aria-hidden":"true"}),o("span",{class:"page-peek-desc",children:f.description})]},f.id)),o("div",{class:"page-peek-footer",children:[o("button",{type:"button",class:"page-peek-viewall",onClick:i,children:n===1?r["page.peek.viewAll.one"]:r["page.peek.viewAll"].replace("{n}",String(n))}),o("button",{type:"button",class:"page-peek-send",onClick:l,children:r["fab.label"]})]})]})}Z();var on=6e4;function an(e){var r,a,n;let t=e.by_status;return((r=t.new)!=null?r:0)+((a=t.in_progress)!=null?a:0)+((n=t.awaiting_validation)!=null?n:0)}var _t=new Map,yt=new Map;function nn(){_t.clear()}function sn(e,t,r){let a=`${t}|${r}`,n=_t.get(a);if(n&&Date.now()-n.fetchedAt<on)return Promise.resolve(n.open);let i=yt.get(a);if(i)return i;let s=e.fetchBoardKpis(t,{pagePath:r}).then(l=>{let p=an(l);return _t.set(a,{open:p,fetchedAt:Date.now()}),p}).finally(()=>yt.delete(a));return yt.set(a,s),s}function Dr(e){let{api:t,externalId:r,getCurrentPage:a,enabled:n}=e,[i,s]=P(0),[l,p]=P(0),c=de(()=>{nn(),p(m=>m+1)},[]);return H(()=>{if(!n||!t||!r){s(0);return}let m=!1,d=()=>{let g=se(a!==void 0?{getCurrentPage:a}:{});sn(t,r,g).then(k=>{m||s(k)}).catch(()=>{m||s(0)})};d();let f=We(d);return()=>{m=!0,f()}},[t,r,n,l]),{open:i,refresh:c}}var $r=`
|
|
621
|
+
\u2026`}function Ma({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:Fr(r.created_at)}),o("span",{class:"status-history-transition",children:[o("span",{class:`pill pill-status pill-status--${r.from_status}`,children:a}),o("span",{class:"status-history-arrow","aria-hidden":"true",children:"\u2192"}),o("span",{class:`pill pill-status pill-status--${r.to_status}`,children:n})]}),o("span",{class:`status-history-source status-history-source--${r.changed_by_source}`,children:t[i]})]})})})]})}var Aa=3e4,La=300,Ba=["recent","oldest","updated","severity","status"],za=["new","in_progress","awaiting_validation","closed","rejected"],Fa=["bug","feature","question","praise","typo"],Ia=["blocker","high","medium","low"];function $r({api:e,externalId:t,strings:r,getCurrentPage:a,initialSelectedId:n}){var B,j;let[i,s]=q(()=>Ar(t)),[l,d]=q(!0);N(()=>{Lr(t,i)},[t,Dr(i)]);let[c,f]=q(null),[p,u]=q(null),[g,S]=q(!0),[C,_]=q(!1),[k,R]=q(null),[x,v]=q(n!=null?n:null),[b,P]=q(0),[y,F]=q(0),[E,L]=q(null),[D,I]=q(!1),[Q,A]=q((B=i.q)!=null?B:""),O=Ga(Q,La);N(()=>{s(z=>{var $;if((($=z.q)!=null?$:"")===O)return z;if(O===""){let{q:te,...ae}=z;return ae}return{...z,q:O}})},[O]),N(()=>{var z;A((z=i.q)!=null?z:"")},[i.q]);let H=ne(()=>{var z,$,te,ae,ke,se;return(($=(z=i.status)==null?void 0:z.length)!=null?$:0)+((ae=(te=i.type)==null?void 0:te.length)!=null?ae:0)+((se=(ke=i.severity)==null?void 0:ke.length)!=null?se:0)+(i.q?1:0)+(i.mine?1:0)},[i]);N(()=>{if(l)return tt(()=>F(z=>z+1))},[l]);let Y=ne(()=>{var $;let z=!!(($=i.q)!=null&&$.trim());return l&&!z?{...i,pagePath:pe(a!==void 0?{getCurrentPage:a}:{})}:i},[Dr(i),l,y]);N(()=>{let z=!1,$=new AbortController,te=Pr(t,JSON.stringify(Y)),ae=Er(te);ae?(f(ae.page),u(ae.kpis),_(!1),S(!1)):(f(se=>se?{...se,results:Xa(se.results,Y)}:null),_(!0),S(!0)),L(null),I(!1);let ke=ge(async()=>{var se,Se;try{let ve=await e.listBoard(t,Y,{signal:$.signal}),Oe=(se=ve.kpis)!=null?se:await e.fetchBoardKpis(t,Y,{signal:$.signal});return z||(Tr(te,ve,Oe),f(ve),u(Oe),_(!1),R(null)),!0}catch(ve){return z||R((Se=Ee(ve,r))!=null?Se:r["board.list.error"]),!1}finally{z||S(!1)}},Aa);return()=>{z=!0,ke.stop(),$.abort()}},[e,t,JSON.stringify(Y)]);let ee=ne(()=>{if(!c)return[];if(!E||E.rows.length===0)return c.results;let z=new Set(c.results.map($=>$.id));return[...c.results,...E.rows.filter($=>!z.has($.id))]},[c,E]),J=E?E.hasMore:!!(c!=null&&c.next),m=async()=>{if(D||!c)return;let z=E?E.nextPage:2;I(!0);try{let $=await e.listBoard(t,{...Y,page:z});L(te=>{var ae;return{rows:[...(ae=te==null?void 0:te.rows)!=null?ae:[],...$.results],nextPage:z+1,hasMore:$.next!==null}})}catch($){}finally{I(!1)}},h=ne(()=>{var z;return x&&(z=ee.find($=>$.id===x))!=null?z:null},[x,ee]),M=z=>{v(z.id),P($=>$+1)};return o("div",{class:`board-view ${C?"is-stale":""}`,children:[o(Da,{strings:r,kpis:p,thisPage:l}),o(Ka,{filters:i,onChange:s,searchDraft:Q,onSearchDraftChange:A,activeCount:H,strings:r,thisPage:l,onToggleThisPage:()=>d(z=>!z)}),o("div",{class:"board-body",children:[o("div",{class:"board-list-wrap","aria-busy":g,children:[k&&o("div",{class:"board-error",role:"alert",children:[o("span",{children:k}),o("button",{type:"button",class:"btn btn--ghost",onClick:()=>{R(null),S(!0),F(z=>z+1)},children:r["board.retry"]})]}),!k&&g&&!c&&o(Wa,{}),!k&&c&&ee.length===0&&(!g||C)&&o(Ha,{strings:r,thisPage:l,onAllPages:()=>d(!1)}),!k&&c&&ee.length>0&&o(re,{children:[o(Oa,{rows:ee,selectedId:x,onPick:M,strings:r,total:c.count,thisPage:l}),J&&!C&&o("button",{type:"button",class:"btn btn--ghost board-load-more",onClick:()=>{m()},disabled:D,children:r["board.list.loadMore"]})]})]}),o("div",{class:`board-detail-wrap ${x?"has-selection":""}`,children:x?o(ot,{api:e,externalId:t,reportId:x,strings:r,onBack:()=>v(null),canModerate:h?(j=h.can_moderate)!=null?j:h.is_mine:!1,...h?{seed:h}:{},variant:"board",onOpenSeq:z=>{e.getReportBySeq(z,t).then($=>{v($.id),P(te=>te+1)}).catch(()=>{})}},b):o("div",{class:"board-detail-empty",children:[o(Va,{}),o("p",{children:r["board.detail.empty"]})]})})]})]})}function Da({strings:e,kpis:t,thisPage:r}){let a=r?e["board.scope.onThisPage"]:(t==null?void 0:t.scope)==="project"?e["board.scope.project"]:e["board.scope.mine"];return o("header",{class:"board-header",children:[o("div",{class:"board-header-title",children:[o("span",{class:"board-header-emoji","aria-hidden":"true",children:"\u{1F4CB}"}),o("div",{children:[o("h2",{class:"board-header-h",children:e["tab.board"]}),o("p",{class:"board-header-sub",children:t?`${t.total} \xB7 ${a}`:a})]})]}),o($a,{kpis:t,strings:e})]})}function $a({kpis:e,strings:t}){var a,n,i,s,l,d;let r=[{key:"new",label:t["board.kpi.new"],value:String((n=(a=e==null?void 0:e.by_status)==null?void 0:a.new)!=null?n:0),tone:"tone-new"},{key:"in_progress",label:t["board.kpi.in_progress"],value:String((s=(i=e==null?void 0:e.by_status)==null?void 0:i.in_progress)!=null?s:0),tone:"tone-progress"},{key:"awaiting_validation",label:t["board.kpi.awaiting_validation"],value:String((d=(l=e==null?void 0:e.by_status)==null?void 0:l.awaiting_validation)!=null?d:0),tone:"tone-validation"},{key:"rate",label:t["board.kpi.resolution_rate"],value:e?`${Math.round((e.resolution_rate||0)*100)}%`:"\u2014",tone:"tone-rate"}];return o("div",{class:`board-kpi-strip ${e?"is-ready":"is-loading"}`,"aria-live":"polite",children:r.map(c=>o("div",{class:`board-kpi-card ${c.tone}`,children:[o("div",{class:"board-kpi-value",children:c.value}),o("div",{class:"board-kpi-label",children:c.label})]},c.key))})}function Ka({filters:e,onChange:t,searchDraft:r,onSearchDraftChange:a,activeCount:n,strings:i,thisPage:s,onToggleThisPage:l}){var S,C,_,k,R,x,v;let d=b=>{if(b===""){let{status:P,...y}=e;t(y)}else t({...e,status:[b]})},c=b=>{if(b===""){let{type:P,...y}=e;t(y)}else t({...e,type:[b]})},f=b=>{if(b===""){let{severity:P,...y}=e;t(y)}else t({...e,severity:[b]})},p=b=>t({...e,ordering:b}),u=()=>{if(e.mine){let{mine:b,...P}=e;t(P)}else t({...e,mine:!0})},g=()=>t({});return o("div",{class:"board-filters",children:[o("div",{class:"board-scope",role:"group","aria-label":i["board.scope.thisPage"],children:[o("button",{type:"button",class:`board-scope-btn ${s?"is-active":""}`,"aria-pressed":s,onClick:()=>!s&&l(),children:i["board.scope.thisPage"]}),o("button",{type:"button",class:`board-scope-btn ${s?"":"is-active"}`,"aria-pressed":!s,onClick:()=>s&&l(),children:i["board.scope.allPages"]})]}),o("select",{class:"board-filter-select","aria-label":i["board.sort"],value:(S=e.ordering)!=null?S:"recent",onChange:b=>p(b.target.value),children:Ba.map(b=>o("option",{value:b,children:i[`board.sort.${b}`]},b))}),o("select",{class:"board-filter-select","aria-label":i["board.filter.status"],value:(_=(C=e.status)==null?void 0:C[0])!=null?_:"",onChange:b=>d(b.target.value),children:[o("option",{value:"",children:i["board.filter.status"]}),za.map(b=>{var P;return o("option",{value:b,children:(P=i[`board.kpi.${b}`])!=null?P:b},b)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.type"],value:(R=(k=e.type)==null?void 0:k[0])!=null?R:"",onChange:b=>c(b.target.value),children:[o("option",{value:"",children:i["board.filter.type"]}),Fa.map(b=>{var P;return o("option",{value:b,children:(P=i[`type.${b}`])!=null?P:b},b)})]}),o("select",{class:"board-filter-select","aria-label":i["board.filter.severity"],value:(v=(x=e.severity)==null?void 0:x[0])!=null?v:"",onChange:b=>f(b.target.value),children:[o("option",{value:"",children:i["board.filter.severity"]}),Ia.map(b=>{var P;return o("option",{value:b,children:(P=i[`severity.${b}`])!=null?P:b},b)})]}),o("input",{type:"search",class:"board-filter-search",placeholder:i["board.filter.search.placeholder"],value:r,onInput:b=>a(b.target.value)}),o("label",{class:"board-filter-toggle",children:[o("input",{type:"checkbox",checked:!!e.mine,onChange:u}),o("span",{children:i["board.filter.mine"]})]}),n>0&&o("button",{type:"button",class:"board-filter-clear",onClick:g,children:[o(Qa,{}),i["board.filter.clear"]]})]})}function Oa({rows:e,selectedId:t,onPick:r,strings:a,total:n,thisPage:i}){return o(re,{children:[o("div",{class:"board-list-count",children:a[i?"board.list.count.page":"board.list.count"].replace("{n}",String(e.length)).replace("{total}",String(n))}),o("ul",{class:"board-list",role:"list",children:e.map(s=>o(Na,{row:s,selected:s.id===t,onPick:r,strings:a},s.id))})]})}function Na({row:e,selected:t,onPick:r,strings:a}){var i,s;let n=e.is_mine?a["board.list.you"]:e.author_label||"\u2014";return o("li",{children:o("button",{type:"button",class:`board-row ${t?"is-selected":""}`,onClick:()=>r(e),"aria-pressed":t,children:[o("div",{class:"board-row-badges",children:[o("span",{class:`badge status-${e.status}`,children:(i=a[`status.${e.status}`])!=null?i:e.status}),o("span",{class:`badge severity-${e.severity}`,children:(s=a[`severity.${e.severity}`])!=null?s:e.severity})]}),o("div",{class:"board-row-description",children:e.description}),o("div",{class:"board-row-meta",children:[o("span",{class:"board-row-author",children:n}),e.comment_count>0&&o("span",{class:"board-row-comments",children:[o(ja,{})," ",e.comment_count]}),o("span",{class:"board-row-time",children:Ya(e.created_at)})]})]})})}function Ha({strings:e,thisPage:t,onAllPages:r}){return o("div",{class:"board-empty",children:[o(Ua,{}),o("h3",{children:e[t?"board.list.empty.page.title":"board.list.empty.title"]}),o("p",{children:e[t?"board.list.empty.page.description":"board.list.empty.description"]}),t&&o("button",{type:"button",class:"btn btn--ghost",onClick:r,children:e["board.scope.allPages"]})]})}function Wa(){return o("ul",{class:"board-list board-list-skeleton","aria-hidden":"true",children:Array.from({length:5}).map((e,t)=>o("li",{children:o("div",{class:"board-row skeleton-row",children:[o("div",{class:"skeleton-line skeleton-badges"}),o("div",{class:"skeleton-line skeleton-text"}),o("div",{class:"skeleton-line skeleton-text short"})]})},t))})}function ja(){return o("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",children:o("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function Qa(){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 Ua(){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 Va(){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 Ga(e,t){let[r,a]=q(e);return N(()=>{let n=setTimeout(()=>a(e),t);return()=>clearTimeout(n)},[e,t]),r}var Ir={blocker:0,high:1,medium:2,low:3};function Xa(e,t){var n,i,s,l;let r=e;(n=t.status)!=null&&n.length&&(r=r.filter(d=>t.status.includes(d.status))),(i=t.type)!=null&&i.length&&(r=r.filter(d=>t.type.includes(d.feedback_type))),(s=t.severity)!=null&&s.length&&(r=r.filter(d=>t.severity.includes(d.severity))),t.mine&&(r=r.filter(d=>d.is_mine));let a=r.slice();switch((l=t.ordering)!=null?l:"recent"){case"oldest":a.sort((d,c)=>d.created_at.localeCompare(c.created_at));break;case"updated":a.sort((d,c)=>c.updated_at.localeCompare(d.updated_at));break;case"severity":a.sort((d,c)=>{var f,p;return((f=Ir[d.severity])!=null?f:9)-((p=Ir[c.severity])!=null?p:9)});break;case"status":break;default:a.sort((d,c)=>c.created_at.localeCompare(d.created_at))}return a}function Dr(e){var t,r,a,n,i;return JSON.stringify({s:(t=e.status)==null?void 0:t.slice().sort(),t:(r=e.type)==null?void 0:r.slice().sort(),sv:(a=e.severity)==null?void 0:a.slice().sort(),q:(n=e.q)!=null?n:"",m:!!e.mine,o:(i=e.ordering)!=null?i:""})}function Ya(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let r=Math.max(0,Date.now()-t),a=Math.floor(r/6e4);if(a<1)return"just now";if(a<60)return`${a}m`;let n=Math.floor(a/60);if(n<24)return`${n}h`;let i=Math.floor(n/24);return i<7?`${i}d`:`${Math.floor(i/7)}w`}oe();function Ja(e){return`pill pill-status pill-status--${e}`}function Za(e){return`pill pill-severity pill-severity--${e}`}function en(){return"pill pill-type"}function tn(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 rn(e,t){return e===1?t["mine.replies_one"]:t["mine.replies_many"].replace("{count}",String(e))}function at({row:e,strings:t,onClick:r,extraMeta:a}){var i;let n=e.description.length>120?e.description.slice(0,117)+"\u2026":e.description;return o("button",{type:"button",class:"mine-row",onClick:r,children:[o("div",{class:"mine-row-pills",children:[o("span",{class:Ja(e.status),children:(i=t[`status.${e.status}`])!=null?i:e.status}),o("span",{class:en(),children:t[`type.${e.feedback_type}`]}),o("span",{class:Za(e.severity),children:t[`severity.${e.severity}`]})]}),o("div",{class:"mine-row-preview",children:n}),o("div",{class:"mine-row-meta",children:[o("span",{children:tn(e.updated_at||e.created_at)}),e.comment_count>0&&o("span",{children:["\xB7 ",rn(e.comment_count,t)]}),a&&o("span",{children:["\xB7 ",a]})]})]})}var on=3e4;function an(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 nn(e){let t=new Map;for(let r of e){let a=an(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:sn(r),rows:a}))}function sn(e){try{return new Date(e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch(t){return e}}function Kr({api:e,externalId:t,strings:r,onSelect:a}){let[n,i]=q(null),[s,l]=q(null),[d,c]=q(!1),f=U(!0),p=async()=>{c(!0),l(null);try{let C=await e.listChangelog(t);return f.current&&i(C),!0}catch(C){return typeof console!="undefined"&&console.warn("[mhosaic] listChangelog:",C),f.current&&l(r["mine.error"]),!1}finally{f.current&&c(!1)}};N(()=>{f.current=!0;let C=ge(p,on);return()=>{f.current=!1,C.stop()}},[t]);let u=ne(()=>n?nn(n):[],[n]),g=n===null&&!s,S=n!==null&&n.length===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.changelog"]}),o("button",{type:"button",class:"btn",onClick:()=>{p()},disabled:d,children:d?r["mine.loading"]:r["mine.refresh"]})]}),g&&o("div",{class:"mine-loading",children:r["mine.loading"]}),s&&o("div",{class:"error",children:s}),S&&o("div",{class:"mine-empty",children:[o("strong",{children:r["changelog.empty.title"]}),o("p",{children:r["changelog.empty.body"]})]}),u.length>0&&o("div",{class:"changelog-groups",children:u.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(_=>o("li",{children:o(at,{row:_,strings:r,onClick:()=>a(_),extraMeta:_.pr_number?`PR #${_.pr_number}`:void 0})}))})]},C.weekKey))})]})}function ln(){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 Or({label:e,onClick:t,count:r}){return o("button",{type:"button",class:"fab","aria-label":e,title:e,onClick:t,children:[o(ln,{}),r!==void 0&&r>0&&o("span",{class:"fab-badge","aria-hidden":"true",children:r>9?"9+":String(r)})]})}oe();oe();var Nr=["#ef4444","#f59e0b","#10b981","#3b82f6","#ffffff"],cn=.35;function Hr(e,t,r){if(e.save(),e.strokeStyle=t.color,e.fillStyle=t.color,e.lineWidth=t.lineWidth,e.lineCap="round",e.lineJoin="round",t.kind==="rectangle")e.strokeRect(t.x,t.y,t.w,t.h);else if(t.kind==="arrow")dn(e,t.x1,t.y1,t.x2,t.y2);else if(t.kind==="freehand"){if(t.points.length<2){e.restore();return}e.beginPath(),e.moveTo(t.points[0].x,t.points[0].y);for(let a=1;a<t.points.length;a++)e.lineTo(t.points[a].x,t.points[a].y);e.stroke()}else if(t.kind==="text"){e.font=`bold ${t.fontSize}px -apple-system, BlinkMacSystemFont, sans-serif`,e.textBaseline="top";let a=e.measureText(t.text),n=4,i=a.width+n*2,s=t.fontSize+n*2;e.fillStyle="rgba(0, 0, 0, 0.6)",e.fillRect(t.x-n,t.y-n,i,s),e.fillStyle=t.color,e.fillText(t.text,t.x,t.y)}else t.kind==="highlight"?(e.globalAlpha=cn,e.fillRect(nt(t.x,t.w),nt(t.y,t.h),Math.abs(t.w),Math.abs(t.h))):t.kind==="blur"&&pn(e,t,r);e.restore()}function nt(e,t){return t<0?e+t:e}function dn(e,t,r,a,n){let s=Math.atan2(n-r,a-t);e.beginPath(),e.moveTo(t,r),e.lineTo(a,n),e.stroke(),e.beginPath(),e.moveTo(a,n),e.lineTo(a-14*Math.cos(s-Math.PI/6),n-14*Math.sin(s-Math.PI/6)),e.lineTo(a-14*Math.cos(s+Math.PI/6),n-14*Math.sin(s+Math.PI/6)),e.closePath(),e.fill()}function pn(e,t,r){if(!r)return;let a=nt(t.x,t.w),n=nt(t.y,t.h),i=Math.abs(t.w),s=Math.abs(t.h);if(i<2||s<2)return;let l=Math.max(4,t.tile);for(let d=n;d<n+s;d+=l)for(let c=a;c<a+i;c+=l){let f=Math.min(l,a+i-c),p=Math.min(l,n+s-d);e.drawImage(r,c,d,f,p,c,d,f,p)}e.imageSmoothingEnabled=!1;for(let d=n;d<n+s;d+=l)for(let c=a;c<a+i;c+=l){let f=Math.min(l,a+i-c),p=Math.min(l,n+s-d);e.drawImage(r,c,d,1,1,c,d,f,p)}e.imageSmoothingEnabled=!0}var ue={rect:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("rect",{x:"2",y:"3",width:"12",height:"10",fill:"none",stroke:"currentColor","stroke-width":"1.5"})}),arrow:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M2 8h11M9 4l4 4-4 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),pencil:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M11.5 2.5l2 2L5 13H3v-2l8.5-8.5z",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})}),text:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 3h10M8 3v10M5 13h6",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})}),highlight:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("path",{d:"M3 13l3-3L11 5l-2-2-5 5-3 3v2h2zM10 4l2 2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M2 14h12",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})]}),blur:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:[o("rect",{x:"2",y:"2",width:"4",height:"4",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"7",y:"2",width:"3",height:"3",fill:"currentColor",opacity:"0.55"}),o("rect",{x:"11",y:"2",width:"3",height:"4",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"2",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.6"}),o("rect",{x:"6",y:"7",width:"3",height:"3",fill:"currentColor",opacity:"0.85"}),o("rect",{x:"10",y:"7",width:"4",height:"3",fill:"currentColor",opacity:"0.5"}),o("rect",{x:"2",y:"11",width:"4",height:"3",fill:"currentColor",opacity:"0.4"}),o("rect",{x:"7",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.65"}),o("rect",{x:"11",y:"11",width:"3",height:"3",fill:"currentColor",opacity:"0.85"})]}),undo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 7l3-3M4 7l3 3M4 7h6a3 3 0 0 1 0 6H7",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),redo:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M12 7l-3-3M12 7l-3 3M12 7H6a3 3 0 0 0 0 6h2",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),trash:o("svg",{width:"14",height:"14",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M3 4h10M6 4V2.5h4V4M5 4l.5 9h5L11 4",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})}),close:o("svg",{width:"16",height:"16",viewBox:"0 0 16 16","aria-hidden":"true",children:o("path",{d:"M4 4l8 8M12 4l-8 8",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})})};function Wr({imageBlob:e,strings:t,onSave:r,onCancel:a}){let n=U(null),i=U(null),s=U(null),[l,d]=q("rectangle"),[c,f]=q(Nr[0]),[p,u]=q([]),[g,S]=q([]),[C,_]=q([]),k=U(!1),[R,x]=q(null),[v,b]=q(!1),[P,y]=q(!1),F=U(1);function E(m){u(h=>(S(M=>[...M,h]),[...h,m])),_([])}function L(){u(m=>(S(h=>[...h,m]),[])),_([])}function D(){S(m=>{if(m.length===0)return m;let h=m[m.length-1];return u(M=>(_(B=>[M,...B]),h)),m.slice(0,-1)})}function I(){_(m=>{if(m.length===0)return m;let h=m[0];return u(M=>(S(B=>[...B,M]),h)),m.slice(1)})}kt(()=>{let m=h=>{h.key==="Escape"&&(h.stopPropagation(),a())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[a]),N(()=>{let m=h=>{if(!(h.metaKey||h.ctrlKey))return;let B=h.key.toLowerCase();B==="z"?(h.preventDefault(),h.stopPropagation(),h.shiftKey?I():D()):B==="y"&&(h.preventDefault(),h.stopPropagation(),I())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[g,C,p]),N(()=>{let m=URL.createObjectURL(e),h=new Image;return h.onload=()=>{s.current=h,b(!0)},h.src=m,()=>URL.revokeObjectURL(m)},[e]),kt(()=>{if(!v||!n.current||!s.current||!i.current)return;let m=s.current,M=i.current.clientWidth-16,B=window.innerHeight*.65,j=Math.min(M/m.width,B/m.height,1);F.current=j;let z=n.current;z.width=m.width,z.height=m.height,z.style.width=`${m.width*j}px`,z.style.height=`${m.height*j}px`,Q()},[v]),N(()=>{Q()},[p,R]);function Q(){let m=n.current,h=s.current;if(!m||!h)return;let M=m.getContext("2d");if(M){M.clearRect(0,0,m.width,m.height),M.drawImage(h,0,0);for(let B of p)Hr(M,B,h);R&&Hr(M,R,h)}}function A(m){let M=n.current.getBoundingClientRect();return{x:(m.clientX-M.left)/F.current,y:(m.clientY-M.top)/F.current}}let O=m=>{if(!v)return;let{x:h,y:M}=A(m),B=n.current.width,j=Math.max(3,Math.round(B/400)),z=Math.max(8,Math.round(B/80));if(l==="text"){let $=window.prompt(t["annotator.text_prompt"]);$&&$.trim()&&E({kind:"text",x:h,y:M,text:$.trim(),color:c,fontSize:Math.max(16,Math.round(B/50)),lineWidth:1});return}k.current=!0,l==="rectangle"?x({kind:"rectangle",x:h,y:M,w:0,h:0,color:c,lineWidth:j}):l==="arrow"?x({kind:"arrow",x1:h,y1:M,x2:h,y2:M,color:c,lineWidth:j}):l==="freehand"?x({kind:"freehand",points:[{x:h,y:M}],color:c,lineWidth:j}):l==="highlight"?x({kind:"highlight",x:h,y:M,w:0,h:0,color:c==="#ffffff"?"#fde047":c,lineWidth:1}):l==="blur"&&x({kind:"blur",x:h,y:M,w:0,h:0,color:"#000000",lineWidth:0,tile:z})},H=m=>{if(!k.current)return;let{x:h,y:M}=A(m);x(B=>B&&(B.kind==="rectangle"||B.kind==="highlight"||B.kind==="blur"?{...B,w:h-B.x,h:M-B.y}:B.kind==="arrow"?{...B,x2:h,y2:M}:B.kind==="freehand"?{...B,points:[...B.points,{x:h,y:M}]}:B))},Y=()=>{x(m=>(k.current&&m&&((m.kind==="rectangle"||m.kind==="highlight"||m.kind==="blur")&&Math.abs(m.w)<4&&Math.abs(m.h)<4||m.kind==="arrow"&&Math.hypot(m.x2-m.x1,m.y2-m.y1)<4||m.kind==="freehand"&&m.points.length<3||E(m)),null)),k.current=!1},ee=async()=>{let m=n.current;if(m){y(!0);try{let h=await new Promise(M=>m.toBlob(M,"image/png",.92));h&&r(h)}finally{y(!1)}}},J=[{id:"rectangle",icon:ue.rect,label:t["annotator.tool.rectangle"]},{id:"arrow",icon:ue.arrow,label:t["annotator.tool.arrow"]},{id:"freehand",icon:ue.pencil,label:t["annotator.tool.freehand"]},{id:"text",icon:ue.text,label:t["annotator.tool.text"]},{id:"highlight",icon:ue.highlight,label:t["annotator.tool.highlight"]},{id:"blur",icon:ue.blur,label:t["annotator.tool.blur"]}];return o("div",{class:"annotator-backdrop",role:"presentation",onClick:m=>{m.target===m.currentTarget&&a()},children:o("div",{class:"annotator",role:"dialog","aria-modal":"true","aria-label":t["annotator.title"],children:[o("div",{class:"annotator-header",children:[o("span",{children:t["annotator.title"]}),o("button",{type:"button",class:"modal-close","aria-label":t["form.close"],onClick:a,children:ue.close})]}),o("div",{class:"annotator-toolbar",children:[o("div",{class:"annotator-tools",children:J.map(m=>o("button",{type:"button",onClick:()=>d(m.id),title:m.label,"aria-label":m.label,"aria-pressed":l===m.id,class:`annotator-tool ${l===m.id?"is-active":""}`,children:m.icon},m.id))}),o("span",{class:"annotator-sep"}),o("div",{class:"annotator-colors",children:[Nr.map(m=>o("button",{type:"button",onClick:()=>f(m),"aria-label":m,"aria-pressed":c===m,class:`annotator-color ${c===m?"is-active":""}`,style:{backgroundColor:m}},m)),o("label",{class:"annotator-color annotator-color-picker",title:t["annotator.color_picker"],children:o("input",{type:"color",value:c,onInput:m=>f(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:[ue.undo,o("span",{children:t["annotator.undo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:I,disabled:C.length===0,title:t["annotator.redo"],children:[ue.redo,o("span",{children:t["annotator.redo"]})]}),o("button",{type:"button",class:"annotator-btn",onClick:L,disabled:p.length===0,children:[ue.trash,o("span",{children:t["annotator.clear"]})]}),o("span",{class:"annotator-spacer"}),o("span",{class:"annotator-count",children:[p.length," ",t["annotator.count_suffix"]]})]}),o("div",{ref:i,class:"annotator-canvas-wrap",children:v?o("canvas",{ref:n,onMouseDown:O,onMouseMove:H,onMouseUp:Y,onMouseLeave:Y,class:"annotator-canvas"}):o("span",{class:"annotator-loading",children:t["annotator.loading"]})}),o("div",{class:"annotator-footer",children:[o("button",{type:"button",class:"btn",onClick:a,children:t["form.cancel"]}),o("button",{type:"button",class:"btn btn--primary",onClick:ee,disabled:P||!v,children:P?t["annotator.applying"]:t["annotator.apply"]})]})]})})}var un=["bug","feature","question","praise","typo"],fn=["blocker","high","medium","low"];function jr({strings:e,onSubmit:t,onCancel:r,status:a,errorMessage:n,submittedSeq:i,onDirtyChange:s}){let[l,d]=q(""),[c,f]=q("bug"),[p,u]=q("medium"),[g,S]=q(""),[C,_]=q([]),[k,R]=q(!1),[x,v]=q(null),b=U(null),P=U(null),y=a==="submitting",F=y?e["form.submitting"]:e["form.submit"],E=typeof window!="undefined"?window.location.href:"",L=l.trim()!==""||C.length>0;N(()=>{s==null||s(L)},[L]);let D=U(C);D.current=C,N(()=>()=>{D.current.forEach(m=>URL.revokeObjectURL(m.preview))},[]);let I=m=>{S("");let h=5-C.length,M=m.slice(0,Math.max(0,h));for(let B of M)if(B instanceof File){let j=rt(B);if(j){S(j.kind==="type"?e["form.screenshot.error_type"]:e["form.screenshot.error_size"].replace("{max}",String(j.maxMb)));return}}if(M.length){let B=M.map(j=>({blob:j,preview:URL.createObjectURL(j)}));_(j=>[...j,...B])}m.length>M.length&&S(e["form.screenshot.error_count"].replace("{max}",String(5)))},Q=m=>{let h=C[m];h&&URL.revokeObjectURL(h.preview),_(M=>M.filter((B,j)=>j!==m)),S(""),b.current&&(b.current.value="")},A=m=>{var B;let h=m.target,M=Array.from((B=h.files)!=null?B:[]);M.length&&I(M),h.value=""},O=m=>{m.preventDefault(),m.stopPropagation(),R(!0)},H=m=>{m.preventDefault(),m.stopPropagation(),m.currentTarget===m.target&&R(!1)},Y=m=>{var M,B;m.preventDefault(),m.stopPropagation(),R(!1);let h=Array.from((B=(M=m.dataTransfer)==null?void 0:M.files)!=null?B:[]);h.length&&I(h)};N(()=>{let m=P.current;if(!m)return;let h=M=>{var j;let B=(j=M.clipboardData)==null?void 0:j.items;if(B){for(let z of Array.from(B))if(z.kind==="file"&&z.type.startsWith("image/")){let $=z.getAsFile();if($){M.preventDefault(),I([$]);return}}}};return m.addEventListener("paste",h),()=>m.removeEventListener("paste",h)},[C.length]);let ee=m=>{let h=x;if(h===null||!C[h]){v(null);return}URL.revokeObjectURL(C[h].preview);let M={blob:m,preview:URL.createObjectURL(m)};_(B=>B.map((j,z)=>z===h?M:j)),v(null)};return o("form",{onSubmit:m=>{if(m.preventDefault(),!l.trim()){S(e["form.description.required"]);return}S("");let h={description:l.trim(),feedback_type:c,severity:p};C.length&&(h.screenshots=C.map(M=>M.blob),h.capture_method="manual"),t(h)},children:[o("h2",{children:e["form.title"]}),o("div",{class:"field",children:[o("label",{for:"mfb-desc",children:e["form.description.label"]}),o("textarea",{id:"mfb-desc",value:l,placeholder:e["form.description.placeholder"],onInput:m=>d(m.target.value)})]}),o("div",{class:"row",children:[o("div",{class:"field",children:[o("label",{for:"mfb-type",children:e["form.type.label"]}),o("select",{id:"mfb-type",value:c,onChange:m=>f(m.target.value),children:un.map(m=>o("option",{value:m,children:e[`type.${m}`]}))})]}),o("div",{class:"field",children:[o("label",{for:"mfb-sev",children:e["form.severity.label"]}),o("select",{id:"mfb-sev",value:p,onChange:m=>u(m.target.value),children:fn.map(m=>o("option",{value:m,children:e[`severity.${m}`]}))})]})]}),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:A,"aria-hidden":"true",tabIndex:-1}),C.length>0&&o("div",{class:"screenshot-strip",children:C.map((m,h)=>o("div",{class:"screenshot-preview",children:[o("img",{src:m.preview,alt:""}),o("div",{class:"screenshot-preview-actions",children:[o("button",{type:"button",class:"btn btn--primary screenshot-annotate",onClick:()=>v(h),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:()=>Q(h),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"]]})]})]},m.preview))}),C.length<5&&o("div",{ref:P,class:`screenshot-dropzone ${k?"is-dragover":""}`,tabIndex:0,role:"button","aria-label":e["form.screenshot.label"],onClick:()=>{var m;return(m=b.current)==null?void 0:m.click()},onKeyDown:m=>{var h;(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),(h=b.current)==null||h.click())},onDragOver:O,onDragLeave:H,onDrop:Y,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"]})]})]}),E&&o("div",{class:"page-context",title:E,children:[o("span",{class:"page-context-label",children:e["form.context.label"]}),o("span",{class:"page-context-url",children:Te(E,90)})]}),o("div",{class:"capture-notice",children:e["form.capture.notice"]}),g&&o("div",{class:"error",children:g}),a==="error"&&n&&o("div",{class:"error",children:n}),a==="success"&&o("div",{class:"success",children:i!==void 0?e["form.success.seq"].replace("{seq}",String(i)):e["form.success"]}),o("div",{class:"actions",children:[o("button",{type:"button",class:"btn",onClick:r,disabled:y,children:e["form.cancel"]}),o("button",{type:"submit",class:"btn btn--primary",disabled:y,children:F})]}),x!==null&&C[x]&&o(Wr,{imageBlob:C[x].blob,strings:e,onCancel:()=>v(null),onSave:ee})]})}oe();function mn(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 bn(e){return e.total===0?null:Math.round((e.awaiting_validation+e.resolved)/e.total*100)}var gn={new:"new",in_progress:"in_progress",awaiting_validation:"awaiting_validation",closed:"resolved",rejected:"resolved",duplicate:"resolved",wontfix:"resolved"};function Qr(e,t){return t==="all"?e:e.filter(r=>gn[r.status]===t)}function Ur({rows:e,filter:t,onFilter:r,strings:a}){let n=mn(e),i=bn(n),s=[{key:"new",label:a["kpi.new"],value:String(n.new)},{key:"in_progress",label:a["kpi.in_progress"],value:String(n.in_progress)},{key:"awaiting_validation",label:a["kpi.awaiting_validation"],value:String(n.awaiting_validation)},{key:"resolved",label:a["kpi.resolution_rate"],value:i===null?"\u2014":`${i}%`}];return o("div",{class:"kpi-strip",role:"toolbar",children:s.map(l=>{let d=t===l.key,c=d?"all":l.key;return o("button",{type:"button",class:`kpi-cell kpi-cell--${l.key}${d?" is-active":""}`,onClick:()=>r(c),"aria-pressed":d,children:[o("span",{class:"kpi-value",children:l.value}),o("span",{class:"kpi-label",children:l.label})]})})})}var hn=3e4;function Vr({api:e,externalId:t,strings:r,onSelect:a,onOpenSeq:n}){var L;let[i,s]=q(null),[l,d]=q(null),[c,f]=q(!1),[p,u]=q("all"),[g,S]=q(""),[C,_]=q(!1),[k,R]=q(!1),x=U(!0),v=async D=>{if(D.preventDefault(),!n||k)return;let I=parseInt(g.replace(/^#/,"").trim(),10);if(!Number.isInteger(I)||I<=0){_(!0);return}R(!0),_(!1);try{let Q=await n(I);if(!x.current)return;Q?S(""):_(!0)}finally{x.current&&R(!1)}},b=async()=>{var D;f(!0),d(null);try{let I=await e.listMine(t);return x.current&&s(I),!0}catch(I){return typeof console!="undefined"&&console.warn("[mhosaic] listMine:",I),x.current&&d((D=Ee(I,r))!=null?D:r["mine.error"]),!1}finally{x.current&&f(!1)}};N(()=>{x.current=!0;let D=ge(b,hn);return()=>{x.current=!1,D.stop()}},[t]);let P=i!==null&&i.length===0,y=i===null&&!l,F=i?Qr(i,p):null,E=!!i&&i.length>0&&((L=F==null?void 0:F.length)!=null?L:0)===0;return o("div",{class:"mine-list",children:[o("div",{class:"mine-list-header",children:[o("h2",{children:r["tab.mine"]}),o("div",{class:"mine-list-header-actions",children:[n&&o("form",{class:"mine-jump",onSubmit:v,children:[o("input",{type:"text",inputMode:"numeric",value:g,placeholder:r["mine.jump.placeholder"],"aria-label":r["mine.jump.aria"],onInput:D=>{S(D.target.value),_(!1)},disabled:k}),o("button",{type:"submit",class:"btn",disabled:k||!g.trim(),children:r["mine.jump.go"]})]}),o("button",{type:"button",class:"btn",onClick:()=>{b()},disabled:c,children:c?r["mine.loading"]:r["mine.refresh"]})]})]}),C&&o("div",{class:"mine-jump-error error",role:"alert",children:r["mine.jump.not_found"]}),i&&i.length>0&&o(Ur,{rows:i,filter:p,onFilter:u,strings:r}),y&&o("div",{class:"mine-loading",children:r["mine.loading"]}),l&&o("div",{class:"error",children:l}),P&&o("div",{class:"mine-empty",children:[o("strong",{children:r["mine.empty.title"]}),o("p",{children:r["mine.empty.body"]})]}),E&&o("div",{class:"mine-empty",children:o("p",{children:r["mine.filter.empty"]})}),F&&F.length>0&&o("ul",{class:"mine-rows",children:F.map(D=>o("li",{children:o(at,{row:D,strings:r,onClick:()=>a(D)})}))})]})}oe();function Gr({onDismiss:e,children:t,closeLabel:r="Close",expanded:a=!1}){let n=U(null),i=U(null);return N(()=>{var d;i.current=document.activeElement;let s=c=>{var p;if(c.key!=="Escape")return;let f=(p=n.current)==null?void 0:p.getRootNode();f instanceof ShadowRoot&&f.querySelector(".annotator-backdrop")||(c.stopPropagation(),e("escape"))};window.addEventListener("keydown",s);let l=(d=n.current)==null?void 0:d.querySelector("textarea, input, select, button");return l==null||l.focus(),()=>{window.removeEventListener("keydown",s);let c=i.current;c&&typeof c.focus=="function"&&c.focus()}},[e]),o("div",{class:`backdrop ${a?"is-expanded":""}`,role:"presentation",onClick:s=>{s.target===s.currentTarget&&e("backdrop")},children:o("div",{ref:n,class:`modal ${a?"is-expanded":""}`,role:"dialog","aria-modal":"true",children:[o("button",{type:"button",class:"modal-close","aria-label":r,onClick:()=>e("button"),children:"\xD7"}),t]})})}function Xr({open:e,strings:t,onView:r}){if(e===0)return null;let a=e===1?t["page.strip.text.one"]:t["page.strip.text"].replace("{n}",String(e));return o("div",{class:"page-strip",children:[o("span",{children:a}),o("button",{type:"button",class:"page-strip-view",onClick:r,children:t["page.strip.view"]})]})}oe();function Yr({api:e,externalId:t,strings:r,getCurrentPage:a,open:n,onViewAll:i,onPickRow:s,onSend:l}){let[d,c]=q(null),[f,p]=q(!1);return N(()=>{let u=!1,g=pe(a!==void 0?{getCurrentPage:a}:{});return e.listBoard(t,{pagePath:g,status:["new","in_progress","awaiting_validation"]}).then(S=>{u||c(S.results.slice(0,5))}).catch(()=>{u||p(!0)}),()=>{u=!0}},[e,t]),o("div",{class:"page-peek",role:"region","aria-label":r["page.peek.title"],children:[o("div",{class:"page-peek-title",children:r["page.peek.title"]}),d===null&&!f&&o("div",{class:"page-peek-skeleton","aria-hidden":"true",children:[o("div",{})," ",o("div",{})]}),d!==null&&d.map(u=>o("button",{type:"button",class:"page-peek-row",onClick:()=>s==null?void 0:s(u.id),children:[o("span",{class:`page-peek-dot status-${u.status}`,"aria-hidden":"true"}),o("span",{class:"page-peek-desc",children:u.description})]},u.id)),o("div",{class:"page-peek-footer",children:[o("button",{type:"button",class:"page-peek-viewall",onClick:i,children:n===1?r["page.peek.viewAll.one"]:r["page.peek.viewAll"].replace("{n}",String(n))}),o("button",{type:"button",class:"page-peek-send",onClick:l,children:r["fab.label"]})]})]})}oe();var vn=6e4;function yn(e){var r,a,n;let t=e.by_status;return((r=t.new)!=null?r:0)+((a=t.in_progress)!=null?a:0)+((n=t.awaiting_validation)!=null?n:0)}var Pt=new Map,qt=new Map;function _n(){Pt.clear()}function Et(e,t,r){let a=`${t}|${r}`,n=Pt.get(a);if(n&&Date.now()-n.fetchedAt<vn)return Promise.resolve(n.kpis);let i=qt.get(a);if(i)return i;let s=e.fetchBoardKpis(t,{pagePath:r}).then(l=>(Pt.set(a,{kpis:l,fetchedAt:Date.now()}),l)).finally(()=>qt.delete(a));return qt.set(a,s),s}function xn(e,t,r){return Et(e,t,r).then(yn)}function Jr(e){let{api:t,externalId:r,getCurrentPage:a,enabled:n}=e,[i,s]=q(0),[l,d]=q(0),c=me(()=>{_n(),d(f=>f+1)},[]);return N(()=>{if(!n||!t||!r){s(0);return}let f=!1,p=()=>{let g=pe(a!==void 0?{getCurrentPage:a}:{});xn(t,r,g).then(S=>{f||s(S)}).catch(()=>{f||s(0)})};p();let u=tt(p);return()=>{f=!0,u()}},[t,r,n,l]),{open:i,refresh:c}}var Zr=`
|
|
622
622
|
:host {
|
|
623
623
|
--mfb-accent: #3b82f6;
|
|
624
624
|
--mfb-accent-contrast: #ffffff;
|
|
@@ -2378,6 +2378,20 @@ button.report-detail-edit {
|
|
|
2378
2378
|
min-height: 0;
|
|
2379
2379
|
overflow: hidden;
|
|
2380
2380
|
}
|
|
2381
|
+
/* Stale-while-revalidate: a query change keeps the previous rows visible
|
|
2382
|
+
* (locally pre-filtered where the row data allows) and dims them while the
|
|
2383
|
+
* server confirms \u2014 the instant local response is the #352 "never inert"
|
|
2384
|
+
* guarantee, the dim is the "still confirming" affordance. */
|
|
2385
|
+
.board-view.is-stale .board-list,
|
|
2386
|
+
.board-view.is-stale .board-list-count,
|
|
2387
|
+
.board-view.is-stale .board-kpi-strip {
|
|
2388
|
+
opacity: 0.55;
|
|
2389
|
+
transition: opacity 0.15s ease;
|
|
2390
|
+
}
|
|
2391
|
+
.board-load-more {
|
|
2392
|
+
margin: 4px auto 8px;
|
|
2393
|
+
flex: 0 0 auto;
|
|
2394
|
+
}
|
|
2381
2395
|
.board-list-count {
|
|
2382
2396
|
font-size: var(--mfb-text-xs);
|
|
2383
2397
|
color: var(--mfb-text-muted);
|
|
@@ -2666,5 +2680,5 @@ button.report-detail-edit {
|
|
|
2666
2680
|
background: var(--mfb-surface-2);
|
|
2667
2681
|
margin: var(--mfb-space-2) 0;
|
|
2668
2682
|
}
|
|
2669
|
-
`;function ln(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function Hr(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=$r,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null,s=!1;function l(f){n=f,_e(y(m,{state:f}),a)}function p(f){let{selectedReportId:g,boardSelectId:k,...C}=f;return C}function c(f){l({...n,open:!0,tab:"send"}),e.openToCurrentPageFeedback&&e.api&&f&&e.api.fetchBoardKpis(f,{pagePath:se(e)}).then(g=>{g.total>0&&n.open&&n.tab==="send"&&l({...n,tab:"board"})}).catch(()=>{})}function m({state:f}){var N;let g=de(async M=>{l({...n,status:"submitting"});try{let $=await e.onSubmit(M);R.refresh(),l({...n,status:"success",...$&&$.seq!==void 0&&{submittedSeq:$.seq}}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,l({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch($){typeof console!="undefined"&&console.warn("[mhosaic] submit:",$),l({...n,status:"error",error:e.strings["form.error"]})}},[]),k=(N=e.getExternalId)==null?void 0:N.call(e),C=M=>!e.api||!k?Promise.resolve(!1):e.api.getReportBySeq(M,k).then($=>(l({...n,open:!0,tab:"mine",selectedReportId:$.id}),!0)).catch(()=>!1),h=e.deepLinkParam===!1?void 0:M=>{let $=e.deepLinkParam||"mhfeedback";try{let L=new URL(window.location.href);return L.searchParams.set($,M),L.toString()}catch(L){return""}},w=e.showPageActivity!==!1,R=Dr({...e.api!==void 0&&{api:e.api},...k!==void 0&&{externalId:k},...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},enabled:w}),x=R.open===1?e.strings["page.badge.aria.one"]:R.open>0?e.strings["page.badge.aria"].replace("{n}",String(R.open)):e.strings["fab.label"],[v,b]=P(!e.requiresVisibilityCheck);H(()=>{if(!e.requiresVisibilityCheck){b(!0);return}if(!k||!e.checkVisibility){b(!1);return}let M=!1;return e.checkVisibility(k).then($=>{M||b($)}).catch(()=>{M||b(!1)}),()=>{M=!0}},[k]);let q=ln(e,k,v),_=!!(e.api&&k),[F,E]=P(!1),B=V({});return o(ee,{children:[q&&o("div",{class:"fab-area",onMouseEnter:()=>{B.current.close&&clearTimeout(B.current.close),B.current.open=setTimeout(()=>E(!0),250)},onMouseLeave:()=>{B.current.open&&clearTimeout(B.current.open),B.current.close=setTimeout(()=>E(!1),140)},onFocusIn:M=>{var $,L;B.current.close&&clearTimeout(B.current.close),(L=($=M.target).matches)!=null&&L.call($,":focus-visible")&&E(!0)},onFocusOut:()=>E(!1),onKeyDown:M=>M.key==="Escape"&&E(!1),children:[F&&!f.open&&w&&R.open>0&&e.api&&k&&o(Ir,{api:e.api,externalId:k,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},open:R.open,onViewAll:()=>{E(!1),l({...n,open:!0,tab:"board"})},onPickRow:M=>{E(!1),l({...n,open:!0,tab:"board",boardSelectId:M})},onSend:()=>{E(!1),c(k)}}),o(qr,{label:x,onClick:()=>c(k),...R.open>0&&{count:R.open}})]}),f.open&&o(Br,{onDismiss:M=>{if(M!=="button"&&s&&n.tab==="send"&&n.status!=="submitting"){l({...n,confirmingDiscard:!0});return}s=!1,l(p({...n,open:!1,status:"idle",confirmingDiscard:!1}))},closeLabel:e.strings["form.close"],expanded:f.tab==="board",children:[f.confirmingDiscard&&o("div",{class:"discard-confirm",role:"alertdialog","aria-modal":"true",children:o("div",{class:"discard-confirm-card",children:[o("p",{class:"discard-confirm-title",children:e.strings["form.discard.title"]}),o("p",{class:"discard-confirm-body",children:e.strings["form.discard.body"]}),o("div",{class:"discard-confirm-actions",children:[o("button",{type:"button",class:"btn",onClick:()=>l({...n,confirmingDiscard:!1}),children:e.strings["form.discard.keep"]}),o("button",{type:"button",class:"btn btn--primary",onClick:()=>{s=!1,l(p({...n,open:!1,status:"idle",confirmingDiscard:!1}))},children:e.strings["form.discard.confirm"]})]})]})}),_&&o("div",{class:"tab-strip",role:"tablist",children:[o("button",{type:"button",role:"tab","aria-selected":f.tab==="send",class:`tab-button ${f.tab==="send"?"is-active":""}`,onClick:()=>l(p({...n,tab:"send"})),children:e.strings["tab.send"]}),o("button",{type:"button",role:"tab","aria-selected":f.tab==="mine",class:`tab-button ${f.tab==="mine"?"is-active":""}`,onClick:()=>l(p({...n,tab:"mine"})),children:e.strings["tab.mine"]}),o("button",{type:"button",role:"tab","aria-selected":f.tab==="changelog",class:`tab-button ${f.tab==="changelog"?"is-active":""}`,onClick:()=>l(p({...n,tab:"changelog"})),children:e.strings["tab.changelog"]}),o("button",{type:"button",role:"tab","aria-selected":f.tab==="board",class:`tab-button tab-button--board ${f.tab==="board"?"is-active":""}`,onClick:()=>l(p({...n,tab:"board"})),children:e.strings["tab.board"]})]}),f.tab==="send"&&o(ee,{children:[_&&w&&o(Fr,{open:R.open,strings:e.strings,onView:()=>l(p({...n,tab:"board"}))}),o(Ar,{strings:e.strings,onSubmit:g,onCancel:()=>l({...n,open:!1,status:"idle"}),status:f.status,...f.error!==void 0&&{errorMessage:f.error},...f.submittedSeq!==void 0&&{submittedSeq:f.submittedSeq},onDirtyChange:M=>{s=M}})]}),f.tab==="mine"&&e.api&&k&&!f.selectedReportId&&o(zr,{api:e.api,externalId:k,strings:e.strings,onSelect:M=>l({...n,selectedReportId:M.id}),onOpenSeq:C}),(f.tab==="mine"||f.tab==="changelog")&&e.api&&k&&f.selectedReportId&&o(Ge,{api:e.api,externalId:k,reportId:f.selectedReportId,strings:e.strings,onBack:()=>l(p({...n})),onOpenSeq:C,...h&&{buildPermalink:h}}),f.tab==="changelog"&&e.api&&k&&!f.selectedReportId&&o(Rr,{api:e.api,externalId:k,strings:e.strings,onSelect:M=>l({...n,selectedReportId:M.id})}),f.tab==="board"&&e.api&&k&&o(Cr,{api:e.api,externalId:k,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...f.boardSelectId!==void 0&&{initialSelectedId:f.boardSelectId}})]})]})}l(n);function d(f){var w;let g=e.api,k=(w=e.getExternalId)==null?void 0:w.call(e);if(!g||!k||!f)return;let C=/^\d+$/.test(f)?parseInt(f,10):null;(C!==null?g.getReportBySeq(C,k):g.getReport(f,k)).then(R=>l({...n,open:!0,tab:"mine",selectedReportId:R.id})).catch(()=>{})}if(e.deepLinkParam!==!1)try{let f=e.deepLinkParam||"mhfeedback",g=new URLSearchParams(window.location.search).get(f);g&&d(g.trim())}catch(f){}return{open(){var f;c((f=e.getExternalId)==null?void 0:f.call(e))},close(){l({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),_e(null,a),e.host.innerHTML=""},notifyIdentityChanged(){l({...n})}}}function Sn(){return{right:24+24/2,bottom:84}}function Rt(e){var C,h,w,R,x,v,b,q;let t=(C=e.env)!=null?C:"prod",r=(h=e.locale)!=null?h:typeof navigator!="undefined"?navigator.language:void 0,a=Wt((w=e.translations)!=null?w:{},r!==void 0?{locale:r}:{}),n=Qt({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(R=e.metadata)!=null?R:{},l=Dt({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 _=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;_==null||_.appendChild(c)}else document.body.appendChild(c);async function m(_){var $,L,O,Q,W,u;let F=($=_.screenshots)!=null&&$.length?_.screenshots:_.screenshot?[_.screenshot]:void 0,E=_.synthetic?void 0:F,B=n.snapshot();if(i){let{userHash:S,exp:T,...z}=i;B.user=z}s&&Object.keys(s).length>0&&(B.metadata={...s});let D=E!=null&&E.length?(L=_.capture_method)!=null?L:"manual":"none",I={description:_.description,feedback_type:(O=_.feedback_type)!=null?O:"bug",severity:(Q=_.severity)!=null?Q:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:D,technical_context:B};I.widget_version="0.31.0",E!=null&&E.length&&(I.screenshots=E,I.screenshot=E[0]),_.synthetic&&(I.synthetic=!0);let N=se(e);N&&(I.page_path=N),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(I.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let M=I;for(let S of p)M=await S(M);try{let S=await l.submitReport(M);return(W=e.onSubmitSuccess)==null||W.call(e,S),n.clear(),S}catch(S){let T=S instanceof Error?S:new Error(String(S));throw(u=e.onError)==null||u.call(e,T),T}}let d=Hr({host:c,strings:a,showFAB:(x=e.showFAB)!=null?x:!0,onSubmit:_=>m(_),api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(v=e.requiresVisibilityCheck)!=null?v:!1,checkVisibility:_=>l.checkVisibility(_,i==null?void 0:i.email),...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...e.openToCurrentPageFeedback!==void 0&&{openToCurrentPageFeedback:e.openToCurrentPageFeedback},...e.showPageActivity!==void 0&&{showPageActivity:e.showPageActivity}}),f,g=!1;if((b=e.qaMeter)!=null&&b.source){let _=e.qaMeter,F=(q=_.locale)!=null?q:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(mo(),fo)).then(({createQaMeter:E})=>{var B,D;g||(f=E({source:_.source,size:(B=_.size)!=null?B:"sm",position:(D=_.position)!=null?D:Sn(),locale:F,..._.getCurrentPage&&{getCurrentPage:_.getCurrentPage}}))})}let k={show(){d.open()},hide(){d.close()},open(_){d.open()},async submit(_){return m({description:_.description,..._.feedback_type!==void 0&&{feedback_type:_.feedback_type},..._.severity!==void 0&&{severity:_.severity},..._.synthetic!==void 0&&{synthetic:_.synthetic},..._.screenshot!==void 0&&{screenshot:_.screenshot},..._.screenshots!==void 0&&{screenshots:_.screenshots}})},identify(_){i=_,d.notifyIdentityChanged()},setMetadata(_){s={...s,..._}},shutdown(){g=!0,f==null||f.dispose(),d.dispose(),n.dispose(),c.remove();let _=window;_.mhosaicFeedback===k&&delete _.mhosaicFeedback},_registerTransformer(_){p.push(_)}};return window.mhosaicFeedback=k,k}var vo=window;function yo(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 Cn(){let e=document.currentScript;return e?yo(e.dataset):null}var he=null,go,ho,at=(ho=(go=vo.Feedback)==null?void 0:go.q)!=null?ho:[];function _o(e){let[t,r]=e;if(t==="init"){if(he)return;he=Rt(r);return}if(!he){at.push(e);return}t==="identify"?he.identify(r):t==="setMetadata"?he.setMetadata(r):t==="open"&&he.open(r)}var bo=Cn();bo&&(he=Rt(bo));for(;at.length>0;)_o(at.shift());var Rn=Object.assign(function(t,r){_o([t,r])},{q:at});vo.Feedback=Rn;return Lo(qn);})();
|
|
2683
|
+
`;function wn(e,t,r){return!(!e.showFAB||e.getExternalId!==void 0&&!t||e.requiresVisibilityCheck&&!r)}function eo(e){let t=e.host.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=Zr,t.appendChild(r);let a=document.createElement("div");t.appendChild(a);let n={open:!1,status:"idle",tab:"send"},i=null,s=!1;function l(u){n=u,qe(w(f,{state:u}),a)}function d(u){let{selectedReportId:g,boardSelectId:S,...C}=u;return C}function c(u){l({...n,open:!0,tab:"send"}),e.openToCurrentPageFeedback&&e.api&&u&&Et(e.api,u,pe(e)).then(g=>{g.total>0&&n.open&&n.tab==="send"&&l({...n,tab:"board"})}).catch(()=>{})}function f({state:u}){var Q;let g=me(async A=>{l({...n,status:"submitting"});try{let O=await e.onSubmit(A);R.refresh(),l({...n,status:"success",...O&&O.seq!==void 0&&{submittedSeq:O.seq}}),i!==null&&clearTimeout(i),i=setTimeout(()=>{i=null,l({...n,open:!1,status:"idle",tab:e.api?"mine":"send"})},1200)}catch(O){typeof console!="undefined"&&console.warn("[mhosaic] submit:",O),l({...n,status:"error",error:e.strings["form.error"]})}},[]),S=(Q=e.getExternalId)==null?void 0:Q.call(e),C=A=>!e.api||!S?Promise.resolve(!1):e.api.getReportBySeq(A,S).then(O=>(l({...n,open:!0,tab:"mine",selectedReportId:O.id}),!0)).catch(()=>!1),_=e.deepLinkParam===!1?void 0:A=>{let O=e.deepLinkParam||"mhfeedback";try{let H=new URL(window.location.href);return H.searchParams.set(O,A),H.toString()}catch(H){return""}},k=e.showPageActivity!==!1,R=Jr({...e.api!==void 0&&{api:e.api},...S!==void 0&&{externalId:S},...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},enabled:k}),x=R.open===1?e.strings["page.badge.aria.one"]:R.open>0?e.strings["page.badge.aria"].replace("{n}",String(R.open)):e.strings["fab.label"],[v,b]=q(!e.requiresVisibilityCheck);N(()=>{if(!e.requiresVisibilityCheck){b(!0);return}if(!S||!e.checkVisibility){b(!1);return}let A=!1;return e.checkVisibility(S).then(O=>{A||b(O)}).catch(()=>{A||b(!1)}),()=>{A=!0}},[S]);let P=wn(e,S,v),y=!!(e.api&&S),[F,E]=q(!1),L=U({});return o(re,{children:[P&&o("div",{class:"fab-area",onMouseEnter:()=>{L.current.close&&clearTimeout(L.current.close),L.current.open=setTimeout(()=>E(!0),250)},onMouseLeave:()=>{L.current.open&&clearTimeout(L.current.open),L.current.close=setTimeout(()=>E(!1),140)},onFocusIn:A=>{var O,H;L.current.close&&clearTimeout(L.current.close),(H=(O=A.target).matches)!=null&&H.call(O,":focus-visible")&&E(!0)},onFocusOut:()=>E(!1),onKeyDown:A=>A.key==="Escape"&&E(!1),children:[F&&!u.open&&k&&R.open>0&&e.api&&S&&o(Yr,{api:e.api,externalId:S,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},open:R.open,onViewAll:()=>{E(!1),l({...n,open:!0,tab:"board"})},onPickRow:A=>{E(!1),l({...n,open:!0,tab:"board",boardSelectId:A})},onSend:()=>{E(!1),c(S)}}),o(Or,{label:x,onClick:()=>c(S),...R.open>0&&{count:R.open}})]}),u.open&&o(Gr,{onDismiss:A=>{if(A!=="button"&&s&&n.tab==="send"&&n.status!=="submitting"){l({...n,confirmingDiscard:!0});return}s=!1,l(d({...n,open:!1,status:"idle",confirmingDiscard:!1}))},closeLabel:e.strings["form.close"],expanded:u.tab==="board",children:[u.confirmingDiscard&&o("div",{class:"discard-confirm",role:"alertdialog","aria-modal":"true",children:o("div",{class:"discard-confirm-card",children:[o("p",{class:"discard-confirm-title",children:e.strings["form.discard.title"]}),o("p",{class:"discard-confirm-body",children:e.strings["form.discard.body"]}),o("div",{class:"discard-confirm-actions",children:[o("button",{type:"button",class:"btn",onClick:()=>l({...n,confirmingDiscard:!1}),children:e.strings["form.discard.keep"]}),o("button",{type:"button",class:"btn btn--primary",onClick:()=>{s=!1,l(d({...n,open:!1,status:"idle",confirmingDiscard:!1}))},children:e.strings["form.discard.confirm"]})]})]})}),y&&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:()=>l(d({...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:()=>l(d({...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:()=>l(d({...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:()=>l(d({...n,tab:"board"})),children:e.strings["tab.board"]})]}),u.tab==="send"&&o(re,{children:[y&&k&&o(Xr,{open:R.open,strings:e.strings,onView:()=>l(d({...n,tab:"board"}))}),o(jr,{strings:e.strings,onSubmit:g,onCancel:()=>l({...n,open:!1,status:"idle"}),status:u.status,...u.error!==void 0&&{errorMessage:u.error},...u.submittedSeq!==void 0&&{submittedSeq:u.submittedSeq},onDirtyChange:A=>{s=A}})]}),u.tab==="mine"&&e.api&&S&&!u.selectedReportId&&o(Vr,{api:e.api,externalId:S,strings:e.strings,onSelect:A=>l({...n,selectedReportId:A.id}),onOpenSeq:C}),(u.tab==="mine"||u.tab==="changelog")&&e.api&&S&&u.selectedReportId&&o(ot,{api:e.api,externalId:S,reportId:u.selectedReportId,strings:e.strings,onBack:()=>l(d({...n})),onOpenSeq:C,..._&&{buildPermalink:_}}),u.tab==="changelog"&&e.api&&S&&!u.selectedReportId&&o(Kr,{api:e.api,externalId:S,strings:e.strings,onSelect:A=>l({...n,selectedReportId:A.id})}),u.tab==="board"&&e.api&&S&&o($r,{api:e.api,externalId:S,strings:e.strings,...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...u.boardSelectId!==void 0&&{initialSelectedId:u.boardSelectId}})]})]})}l(n);function p(u){var k;let g=e.api,S=(k=e.getExternalId)==null?void 0:k.call(e);if(!g||!S||!u)return;let C=/^\d+$/.test(u)?parseInt(u,10):null;(C!==null?g.getReportBySeq(C,S):g.getReport(u,S)).then(R=>l({...n,open:!0,tab:"mine",selectedReportId:R.id})).catch(()=>{})}if(e.deepLinkParam!==!1)try{let u=e.deepLinkParam||"mhfeedback",g=new URLSearchParams(window.location.search).get(u);g&&p(g.trim())}catch(u){}return{open(){var u;c((u=e.getExternalId)==null?void 0:u.call(e))},close(){l({...n,open:!1,status:"idle"})},dispose(){i!==null&&(clearTimeout(i),i=null),qe(null,a),e.host.innerHTML=""},notifyIdentityChanged(){l({...n})}}}function Dn(){return{right:24+24/2,bottom:84}}function zt(e){var C,_,k,R,x,v,b,P;let t=(C=e.env)!=null?C:"prod",r=(_=e.locale)!=null?_:typeof navigator!="undefined"?navigator.language:void 0,a=rr((k=e.translations)!=null?k:{},r!==void 0?{locale:r}:{}),n=tr({...e.sanitizeUrl!==void 0&&{sanitizeUrl:e.sanitizeUrl}}),i=e.user,s=(R=e.metadata)!=null?R:{},l=Vt({apiKey:e.apiKey,endpoint:e.endpoint,...e.fetchImpl!==void 0&&{fetch:e.fetchImpl},...e.beforeSend!==void 0&&{beforeSend:e.beforeSend},getSignedIdentity:()=>!i||!i.userHash||!i.exp||!i.email?null:{userHash:i.userHash,exp:i.exp,email:i.email}}),d=[],c=document.createElement("div");if(c.className="mhosaic-feedback",e.attachTo){let y=typeof e.attachTo=="string"?document.querySelector(e.attachTo):e.attachTo;y==null||y.appendChild(c)}else document.body.appendChild(c);async function f(y){var O,H,Y,ee,J,m;let F=(O=y.screenshots)!=null&&O.length?y.screenshots:y.screenshot?[y.screenshot]:void 0,E=y.synthetic?void 0:F,L=n.snapshot();if(i){let{userHash:h,exp:M,...B}=i;L.user=B}s&&Object.keys(s).length>0&&(L.metadata={...s});let D=E!=null&&E.length?(H=y.capture_method)!=null?H:"manual":"none",I={description:y.description,feedback_type:(Y=y.feedback_type)!=null?Y:"bug",severity:(ee=y.severity)!=null?ee:"medium",env:t,page_url:window.location.href,user_agent:navigator.userAgent,capture_method:D,technical_context:L};I.widget_version="0.32.0",E!=null&&E.length&&(I.screenshots=E,I.screenshot=E[0]),y.synthetic&&(I.synthetic=!0);let Q=pe(e);Q&&(I.page_path=Q),(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""&&(I.user={id:String(i.id),...i.email!==void 0&&{email:i.email},...i.name!==void 0&&{name:i.name}});let A=I;for(let h of d)A=await h(A);try{let h=await l.submitReport(A);return(J=e.onSubmitSuccess)==null||J.call(e,h),n.clear(),h}catch(h){let M=h instanceof Error?h:new Error(String(h));throw(m=e.onError)==null||m.call(e,M),M}}let p=eo({host:c,strings:a,showFAB:(x=e.showFAB)!=null?x:!0,onSubmit:y=>f(y),api:l,getExternalId:()=>(i==null?void 0:i.id)!==void 0&&i.id!==null&&i.id!==""?String(i.id):void 0,requiresVisibilityCheck:(v=e.requiresVisibilityCheck)!=null?v:!1,checkVisibility:y=>l.checkVisibility(y,i==null?void 0:i.email),...e.getCurrentPage!==void 0&&{getCurrentPage:e.getCurrentPage},...e.openToCurrentPageFeedback!==void 0&&{openToCurrentPageFeedback:e.openToCurrentPageFeedback},...e.showPageActivity!==void 0&&{showPageActivity:e.showPageActivity}}),u,g=!1;if((b=e.qaMeter)!=null&&b.source){let y=e.qaMeter,F=(P=y.locale)!=null?P:String(r!=null?r:"").toLowerCase().startsWith("fr")?"fr":"en";Promise.resolve().then(()=>(Po(),qo)).then(({createQaMeter:E})=>{var L,D;g||(u=E({source:y.source,size:(L=y.size)!=null?L:"sm",position:(D=y.position)!=null?D:Dn(),locale:F,...y.getCurrentPage&&{getCurrentPage:y.getCurrentPage}}))})}let S={show(){p.open()},hide(){p.close()},open(y){p.open()},async submit(y){return f({description:y.description,...y.feedback_type!==void 0&&{feedback_type:y.feedback_type},...y.severity!==void 0&&{severity:y.severity},...y.synthetic!==void 0&&{synthetic:y.synthetic},...y.screenshot!==void 0&&{screenshot:y.screenshot},...y.screenshots!==void 0&&{screenshots:y.screenshots}})},identify(y){i=y,p.notifyIdentityChanged()},setMetadata(y){s={...s,...y}},shutdown(){g=!0,u==null||u.dispose(),p.dispose(),n.dispose(),c.remove();let y=window;y.mhosaicFeedback===S&&delete y.mhosaicFeedback},_registerTransformer(y){d.push(y)}};return window.mhosaicFeedback=S,S}var Ao=window;function Lo(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 $n(){let e=document.currentScript;return e?Lo(e.dataset):null}var we=null,To,Mo,ut=(Mo=(To=Ao.Feedback)==null?void 0:To.q)!=null?Mo:[];function Bo(e){let[t,r]=e;if(t==="init"){if(we)return;we=zt(r);return}if(!we){ut.push(e);return}t==="identify"?we.identify(r):t==="setMetadata"?we.setMetadata(r):t==="open"&&we.open(r)}var Eo=$n();Eo&&(we=zt(Eo));for(;ut.length>0;)Bo(ut.shift());var Kn=Object.assign(function(t,r){Bo([t,r])},{q:ut});Ao.Feedback=Kn;return Qo(On);})();
|
|
2670
2684
|
//# sourceMappingURL=embed.min.js.map
|