@feedlog-ai/webcomponents 0.0.36 → 0.0.38

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.
Files changed (73) hide show
  1. package/README.md +9 -17
  2. package/dist/cjs/feedlog-badge.cjs.entry.js +3 -3
  3. package/dist/cjs/feedlog-button_3.cjs.entry.js +16 -1385
  4. package/dist/cjs/feedlog-card.cjs.entry.js +3 -3
  5. package/dist/cjs/feedlog-issues-client.cjs.entry.js +102 -74
  6. package/dist/cjs/feedlog-issues.cjs.entry.js +4 -11
  7. package/dist/cjs/feedlog-toolkit.cjs.js +2 -2
  8. package/dist/cjs/{index-CXKBwRlh.js → index-prPyjPBk.js} +1 -1
  9. package/dist/cjs/loader.cjs.js +2 -2
  10. package/dist/cjs/purify.es-ppGw41aq.js +1384 -0
  11. package/dist/collection/components/feedlog-badge/feedlog-badge.css +35 -45
  12. package/dist/collection/components/feedlog-badge/feedlog-badge.js +1 -1
  13. package/dist/collection/components/feedlog-button/feedlog-button.css +16 -66
  14. package/dist/collection/components/feedlog-button/feedlog-button.js +1 -1
  15. package/dist/collection/components/feedlog-card/feedlog-card.css +22 -24
  16. package/dist/collection/components/feedlog-card/feedlog-card.js +1 -1
  17. package/dist/collection/components/feedlog-card/feedlog-card.stories.js +1 -1
  18. package/dist/collection/components/feedlog-issue/feedlog-issue.css +99 -187
  19. package/dist/collection/components/feedlog-issue/feedlog-issue.js +1 -1
  20. package/dist/collection/components/feedlog-issue/feedlog-issue.stories.js +19 -19
  21. package/dist/collection/components/feedlog-issues/feedlog-issues.css +34 -63
  22. package/dist/collection/components/feedlog-issues/feedlog-issues.js +2 -14
  23. package/dist/collection/components/feedlog-issues/feedlog-issues.stories.js +72 -52
  24. package/dist/collection/components/feedlog-issues-client/feedlog-issues-client.js +22 -28
  25. package/dist/collection/components/feedlog-issues-list/feedlog-issues-list.js +3 -3
  26. package/dist/collection/utils/markdown.js +6 -1
  27. package/dist/components/feedlog-badge.js +1 -1
  28. package/dist/components/feedlog-button.js +1 -1
  29. package/dist/components/feedlog-card.js +1 -1
  30. package/dist/components/feedlog-issue.js +1 -1
  31. package/dist/components/feedlog-issues-client.js +1 -1
  32. package/dist/components/feedlog-issues-list.js +1 -1
  33. package/dist/components/feedlog-issues.js +1 -1
  34. package/dist/components/index.js +1 -1
  35. package/dist/components/p-BoxVrJId.js +1 -0
  36. package/dist/components/{p-BRjVS8bz.js → p-CvIMO_S7.js} +2 -2
  37. package/dist/components/p-DFD585IK.js +1 -0
  38. package/dist/components/p-I6NOP29P.js +1 -0
  39. package/dist/components/p-fDVosM5p.js +1 -0
  40. package/dist/esm/feedlog-badge.entry.js +3 -3
  41. package/dist/esm/feedlog-button_3.entry.js +15 -1384
  42. package/dist/esm/feedlog-card.entry.js +3 -3
  43. package/dist/esm/feedlog-issues-client.entry.js +102 -74
  44. package/dist/esm/feedlog-issues.entry.js +4 -11
  45. package/dist/esm/feedlog-toolkit.js +3 -3
  46. package/dist/esm/{index-CgNWSmzU.js → index-Cu1eYdKa.js} +1 -1
  47. package/dist/esm/loader.js +3 -3
  48. package/dist/esm/purify.es-Bow7VsVH.js +1381 -0
  49. package/dist/feedlog-toolkit/feedlog-toolkit.css +1 -1
  50. package/dist/feedlog-toolkit/feedlog-toolkit.esm.js +1 -1
  51. package/dist/feedlog-toolkit/p-001d7353.entry.js +1 -0
  52. package/dist/feedlog-toolkit/p-556062d0.entry.js +1 -0
  53. package/dist/feedlog-toolkit/p-62554649.entry.js +1 -0
  54. package/dist/feedlog-toolkit/p-Bow7VsVH.js +2 -0
  55. package/dist/feedlog-toolkit/p-Cu1eYdKa.js +2 -0
  56. package/dist/feedlog-toolkit/p-b558fc9f.entry.js +1 -0
  57. package/dist/feedlog-toolkit/p-ca90ade9.entry.js +1 -0
  58. package/dist/types/components/feedlog-issues/feedlog-issues.d.ts +0 -5
  59. package/dist/types/components/feedlog-issues-client/feedlog-issues-client.d.ts +1 -0
  60. package/dist/types/index.d.ts +1 -1
  61. package/hydrate/index.js +130 -101
  62. package/hydrate/index.mjs +130 -101
  63. package/package.json +4 -7
  64. package/dist/components/p-BBbiSGNf.js +0 -1
  65. package/dist/components/p-CuFKEckF.js +0 -1
  66. package/dist/components/p-DMdb-G26.js +0 -1
  67. package/dist/components/p-DzATWlAC.js +0 -1
  68. package/dist/feedlog-toolkit/p-32663f65.entry.js +0 -1
  69. package/dist/feedlog-toolkit/p-891c349f.entry.js +0 -3
  70. package/dist/feedlog-toolkit/p-CgNWSmzU.js +0 -2
  71. package/dist/feedlog-toolkit/p-b51c95a6.entry.js +0 -1
  72. package/dist/feedlog-toolkit/p-da0268a8.entry.js +0 -1
  73. package/dist/feedlog-toolkit/p-f22117ae.entry.js +0 -1
@@ -1 +1 @@
1
- import{t,p as e,H as s,c as i,h as o}from"./index.js";import{d as r}from"./p-DzATWlAC.js";import{d as n}from"./p-DMdb-G26.js";import{d as h}from"./p-BRjVS8bz.js";import{d as a}from"./p-BBbiSGNf.js";import{d as u}from"./p-CuFKEckF.js";function l(t){if("string"!=typeof t)return"";let e=t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"");return e=e.replace(/\s*on\w+\s*=\s*["'][^"']*["']/gi,""),e=e.replace(/\s*on\w+\s*=\s*[^\s>]*/gi,""),e=e.replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,""),e=e.replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi,""),e=e.replace(/<(embed|object)\b[^<]*>/gi,""),e=e.replace(/javascript:/gi,""),e=e.replace(/data:(?!image\/(?:png|jpg|jpeg|gif|webp);)/gi,""),e}class c extends Error{constructor(t,e,s){super(t),this.statusCode=e,this.originalError=s,this.name="FeedlogError",Object.setPrototypeOf(this,c.prototype)}}class d extends c{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,d.prototype)}}class p extends c{constructor(t,e,s){super(t,e,s),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,p.prototype)}}class f extends c{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,f.prototype)}}class g{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new d("apiKey is required in FeedlogSDKConfig");this.endpoint=this.config.endpoint||"https://api.feedlog.app",this.timeout=this.config.timeout||3e4,this.endpoint=this.endpoint.replace(/\/$/,"")}async fetchIssues(t={}){try{const e=this.buildIssuesUrl(t),s=await this.fetchWithTimeout(e,{method:"GET",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include"});if(!s.ok)throw new p("Failed to fetch issues: "+s.statusText,s.status);const i=await s.json();return this.validateIssuesResponse(i)}catch(t){if(t instanceof c)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new p("Network error: Unable to reach API",void 0,t);throw new c("Failed to fetch issues: "+(t instanceof Error?t.message:"Unknown error"),void 0,t)}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new d("Issue ID is required");try{const e=`${this.endpoint}/api/issues/${encodeURIComponent(t)}/upvote`,s=await this.fetchWithTimeout(e,{method:"POST",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include",body:JSON.stringify({})});if(404===s.status)throw new p("Issue not found",404);if(401===s.status)throw new p("Unauthorized",401);if(403===s.status)throw new p("Forbidden: Domain not allowed for this repository",403);if(!s.ok)throw new p("Failed to toggle upvote: "+s.statusText,s.status);const i=await s.json();return this.validateUpvoteResponse(i)}catch(t){if(t instanceof c)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new p("Network error: Unable to reach API",void 0,t);throw new c("Failed to toggle upvote: "+(t instanceof Error?t.message:"Unknown error"),void 0,t)}}buildIssuesUrl(t){const e=new URL(this.endpoint+"/api/issues");if(t.repositoryIds){const s=Array.isArray(t.repositoryIds)?t.repositoryIds:[t.repositoryIds];for(const t of s)e.searchParams.append("repositoryIds",t)}return t.type&&e.searchParams.set("type",t.type),t.sortBy&&e.searchParams.set("sortBy",t.sortBy),t.cursor&&e.searchParams.set("cursor",t.cursor),void 0!==t.limit&&e.searchParams.set("limit",""+t.limit),""+e}getAuthHeaders(){const t={"Content-Type":"application/json"};return this.apiKey&&(t["x-api-key"]=this.apiKey),t}async fetchWithTimeout(t,e){const s=new AbortController,i=setTimeout((()=>s.abort()),this.timeout);try{const o=await fetch(t,{...e,signal:s.signal});return clearTimeout(i),o}catch(t){if(clearTimeout(i),t instanceof Error&&"AbortError"===t.name)throw new f(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new d("Invalid API response: expected object");const e=t;if(!Array.isArray(e.issues))throw new d("Invalid API response: issues must be an array");if(!e.pagination||"object"!=typeof e.pagination)throw new d("Invalid API response: pagination is required");return{issues:e.issues.map((t=>this.validateIssue(t))),pagination:{cursor:e.pagination.cursor,hasMore:!!e.pagination.hasMore}}}validateIssue(t){if(!t||"object"!=typeof t)throw new d("Invalid issue: expected object");const e=t;if("string"!=typeof e.id)throw new d("Invalid issue: id is required and must be a string");if(!["bug","enhancement"].includes(e.type+""))throw new d('Invalid issue: type must be "bug" or "enhancement"');if(!["open","in_progress","closed"].includes(e.status+""))throw new d('Invalid issue: status must be "open", "in_progress", or "closed"');if(!e.repository||"object"!=typeof e.repository)throw new d("Invalid issue: repository is required");const s=e.repository;if("string"!=typeof s.id)throw new d("Invalid issue: repository must have id");const i=null!==e.githubIssueLink&&"string"==typeof e.githubIssueLink?e.githubIssueLink+"":null,o=e.title,r=null!=o&&""!==o?l(o+""):null,n=e.body,h=null!=n&&""!==n?l(n+""):null,a=s.name,u=null!=a&&""!==a?a+"":null,c=s.description,p=null!=c&&""!==c?l(c+""):null;return{id:e.id+"",githubIssueLink:i,type:e.type||"bug",status:e.status||"open",pinnedAt:e.pinnedAt?e.pinnedAt+"":null,revision:Number(e.revision)||1,title:r,body:h,repository:{id:s.id+"",name:u,description:p},updatedAt:e.updatedAt+""||(new Date).toISOString(),createdAt:e.createdAt+""||(new Date).toISOString(),upvoteCount:Number(e.upvoteCount)||0,hasUpvoted:!!e.hasUpvoted}}validateUpvoteResponse(t){if(!t||"object"!=typeof t)throw new d("Invalid upvote response: expected object");const e=t;if("boolean"!=typeof e.upvoted)throw new d("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof e.upvoteCount)throw new d("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof e.anonymousUserId)throw new d("Invalid upvote response: anonymousUserId must be a string");return{upvoted:e.upvoted,upvoteCount:e.upvoteCount,anonymousUserId:e.anonymousUserId}}getEndpoint(){return this.endpoint}getTimeout(){return this.timeout}}const m=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=i(this,"feedlogUpvote"),this.feedlogError=i(this,"feedlogError"),this.maxWidth="42rem",this.theme="light",this.issues=[],this.loading=!0,this.error=null,this.cursor=null,this.hasMore=!1,this.isLoadingMore=!1,this.sdk=null,this.fetchRequestId=0,this.isDisconnected=!1,this.upvoteRequestIds=new Map,this.handleUpvote=async t=>{if(!this.sdk||this.isDisconnected)return;const{issueId:e,currentUpvoted:s,currentCount:i}=t.detail,o=(this.upvoteRequestIds.get(e)||0)+1;this.upvoteRequestIds.set(e,o),this.issues=this.issues.map((t=>t.id===e?Object.assign(Object.assign({},t),{hasUpvoted:!s,upvoteCount:s?i-1:i+1}):t));try{const t=await this.sdk.toggleUpvote(e);if(this.isDisconnected||this.upvoteRequestIds.get(e)!==o)return;this.issues=this.issues.map((s=>s.id===e?Object.assign(Object.assign({},s),{hasUpvoted:t.upvoted,upvoteCount:t.upvoteCount}):s)),this.feedlogUpvote.emit({issueId:e,upvoted:t.upvoted,upvoteCount:t.upvoteCount})}catch(t){if(this.isDisconnected||this.upvoteRequestIds.get(e)!==o)return;this.issues=this.issues.map((t=>t.id===e?Object.assign(Object.assign({},t),{hasUpvoted:s,upvoteCount:i}):t)),this.feedlogError.emit({error:t instanceof Error?t.message:"Failed to toggle upvote"})}}}componentWillLoad(){if(this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy,this.initializeSDK(),!(this.issues.length>0)||this.loading)return this.fetchIssues()}disconnectedCallback(){this.isDisconnected=!0,this.fetchRequestId++}componentDidUpdate(){(this.previousType!==this.type||this.previousLimit!==this.limit||this.previousSortBy!==this.sortBy)&&(this.fetchRequestId++,this.cursor=null,this.hasMore=!1,this.issues=[],this.fetchIssues(),this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy)}initializeSDK(){try{if(!this.apiKey)throw Error("API key is required for the Feedlog SDK");this.sdk=new g(Object.assign({apiKey:this.apiKey},this.endpoint&&{endpoint:this.endpoint})),this.error=null}catch(t){const e=t instanceof Error?t.message:"Failed to initialize SDK";this.error=e,this.feedlogError.emit({error:e})}}async fetchIssues(){if(!this.sdk)return;const t=this.fetchRequestId;try{this.loading=!0,this.error=null;const e={};this.type&&(e.type=this.type),this.sortBy&&(e.sortBy=this.sortBy),this.limit&&(e.limit=this.limit),this.cursor&&(e.cursor=this.cursor);const s=await this.sdk.fetchIssues(e);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=s.issues,this.cursor=s.pagination.cursor,this.hasMore=s.pagination.hasMore}catch(e){if(this.isDisconnected||t!==this.fetchRequestId)return;const s=e instanceof Error?e.message:"Couldn't load updates";this.error=s,this.issues=[],this.feedlogError.emit({error:s,code:null==e?void 0:e.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.loading=!1,this.isLoadingMore=!1)}}async loadMore(){if(!this.sdk||!this.hasMore||this.isLoadingMore||this.loading)return;const t=this.fetchRequestId;this.isLoadingMore=!0;try{const e={};this.type&&(e.type=this.type),this.sortBy&&(e.sortBy=this.sortBy),this.limit&&(e.limit=this.limit),this.cursor&&(e.cursor=this.cursor);const s=await this.sdk.fetchIssues(e);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=[...this.issues,...s.issues],this.cursor=s.pagination.cursor,this.hasMore=s.pagination.hasMore}catch(e){if(this.isDisconnected||t!==this.fetchRequestId)return;this.feedlogError.emit({error:e instanceof Error?e.message:"Failed to load more issues",code:null==e?void 0:e.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.isLoadingMore=!1)}}render(){var t,e;const s=null===(e=null===(t=this.el)||void 0===t?void 0:t.style)||void 0===e?void 0:e.getPropertyValue("--feedlog-background");return o("feedlog-issues",{key:"0528f8bbb5f1e735c3b50a4325221ee8bfdfadda",style:s?{"--feedlog-background":s}:void 0,issues:this.issues,limit:this.limit,maxWidth:this.maxWidth,theme:this.theme,heading:this.heading,subtitle:this.subtitle,emptyStateTitle:this.emptyStateTitle,emptyStateMessage:this.emptyStateMessage,getIssueUrl:this.getIssueUrl,loading:this.loading,error:this.error,hasMore:this.hasMore,isLoadingMore:this.isLoadingMore,onFeedlogUpvote:this.handleUpvote,onFeedlogLoadMore:async()=>this.loadMore()})}get el(){return this}},[1,"feedlog-issues-client",{apiKey:[1,"api-key"],type:[1],limit:[2],sortBy:[1,"sort-by"],endpoint:[1],maxWidth:[1,"max-width"],theme:[1],heading:[1],subtitle:[1],emptyStateTitle:[1,"empty-state-title"],emptyStateMessage:[1,"empty-state-message"],getIssueUrl:[16],issues:[32],loading:[32],error:[32],cursor:[32],hasMore:[32],isLoadingMore:[32]}]);function w(){"undefined"!=typeof customElements&&["feedlog-issues-client","feedlog-badge","feedlog-button","feedlog-issue","feedlog-issues","feedlog-issues-list"].forEach((e=>{switch(e){case"feedlog-issues-client":customElements.get(t(e))||customElements.define(t(e),m);break;case"feedlog-badge":customElements.get(t(e))||r();break;case"feedlog-button":customElements.get(t(e))||n();break;case"feedlog-issue":customElements.get(t(e))||h();break;case"feedlog-issues":customElements.get(t(e))||a();break;case"feedlog-issues-list":customElements.get(t(e))||u()}}))}w();const b=m,y=w;export{b as FeedlogIssuesClient,y as defineCustomElement}
1
+ import{t,p as e,H as s,c as i,h as o}from"./index.js";import{p as r,d as n}from"./p-CvIMO_S7.js";import{d as h}from"./p-DFD585IK.js";import{d as a}from"./p-I6NOP29P.js";import{d as u}from"./p-fDVosM5p.js";import{d as l}from"./p-BoxVrJId.js";function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function c(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var s=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};s.prototype=e.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(s,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})})),s}var f,p,b=c(r),m=d(p?f:(p=1,f=self.DOMPurify||(self.DOMPurify=b.default||b)));function g(t){return"string"!=typeof t?"":m.sanitize(t,{USE_PROFILES:{html:!0}})}class y extends Error{constructor(t,e,s){super(t),this.statusCode=e,this.originalError=s,this.name="FeedlogError",Object.setPrototypeOf(this,y.prototype)}}class w extends y{constructor(t){super(t),this.name="FeedlogValidationError",Object.setPrototypeOf(this,w.prototype)}}class v extends y{constructor(t,e,s){super(t,e,s),this.name="FeedlogNetworkError",Object.setPrototypeOf(this,v.prototype)}}class I extends y{constructor(t="Request timed out"){super(t),this.name="FeedlogTimeoutError",Object.setPrototypeOf(this,I.prototype)}}class j{constructor(t){if(this.config={credentials:"include",...t},this.apiKey=this.config.apiKey,!this.apiKey)throw new w("apiKey is required in FeedlogSDKConfig");this.endpoint=this.config.endpoint||"https://api.feedlog.app",this.timeout=this.config.timeout||3e4,this.endpoint=this.endpoint.replace(/\/$/,"")}async fetchIssues(t={}){try{const e=this.buildIssuesUrl(t),s=await this.fetchWithTimeout(e,{method:"GET",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include"});if(!s.ok)throw new v("Failed to fetch issues: "+s.statusText,s.status);const i=await s.json();return this.validateIssuesResponse(i)}catch(t){this.wrapFetchError(t,"Failed to fetch issues")}}async toggleUpvote(t){if(!t||"string"!=typeof t)throw new w("Issue ID is required");try{const e=`${this.endpoint}/api/issues/${encodeURIComponent(t)}/upvote`,s=await this.fetchWithTimeout(e,{method:"POST",headers:this.getAuthHeaders(),credentials:this.config.credentials||"include",body:JSON.stringify({})});if(404===s.status)throw new v("Issue not found",404);if(401===s.status)throw new v("Unauthorized",401);if(403===s.status)throw new v("Forbidden: Domain not allowed for this repository",403);if(!s.ok)throw new v("Failed to toggle upvote: "+s.statusText,s.status);const i=await s.json();return this.validateUpvoteResponse(i)}catch(t){this.wrapFetchError(t,"Failed to toggle upvote")}}buildIssuesUrl(t){const e=new URL(this.endpoint+"/api/issues");if(t.repositoryIds){const s=Array.isArray(t.repositoryIds)?t.repositoryIds:[t.repositoryIds];for(const t of s)e.searchParams.append("repositoryIds",t)}if(t.type&&e.searchParams.set("type",t.type),t.sortBy&&e.searchParams.set("sortBy",t.sortBy),t.cursor&&e.searchParams.set("cursor",t.cursor),void 0!==t.limit){const s=Number(t.limit);e.searchParams.set("limit",(Number.isFinite(s)?Math.max(1,Math.min(100,Math.floor(s))):10)+"")}return""+e}getAuthHeaders(){return{"Content-Type":"application/json","x-api-key":this.apiKey}}wrapFetchError(t,e){if(t instanceof y)throw t;if(t instanceof TypeError&&t.message.includes("fetch"))throw new v("Network error: Unable to reach API",void 0,t);throw new y(`${e}: ${t instanceof Error?t.message:"Unknown error"}`,void 0,t)}async fetchWithTimeout(t,e){const s=new AbortController,i=setTimeout((()=>s.abort()),this.timeout);try{const o=await fetch(t,{...e,signal:s.signal});return clearTimeout(i),o}catch(t){if(clearTimeout(i),t instanceof Error&&"AbortError"===t.name)throw new I(`Request timed out after ${this.timeout}ms`);throw t}}validateIssuesResponse(t){if(!t||"object"!=typeof t)throw new w("Invalid API response: expected object");const e=t;if(!Array.isArray(e.issues))throw new w("Invalid API response: issues must be an array");if(!e.pagination||"object"!=typeof e.pagination)throw new w("Invalid API response: pagination is required");return{issues:e.issues.map((t=>this.validateIssue(t))),pagination:{cursor:e.pagination.cursor,hasMore:!!e.pagination.hasMore}}}validateIssue(t){if(!t||"object"!=typeof t)throw new w("Invalid issue: expected object");const e=t;if("string"!=typeof e.id)throw new w("Invalid issue: id is required and must be a string");if(!["bug","enhancement"].includes(e.type+""))throw new w('Invalid issue: type must be "bug" or "enhancement"');if(!["open","in_progress","closed"].includes(e.status+""))throw new w('Invalid issue: status must be "open", "in_progress", or "closed"');if(!e.repository||"object"!=typeof e.repository)throw new w("Invalid issue: repository is required");const s=e.repository;if("string"!=typeof s.id)throw new w("Invalid issue: repository must have id");const i=null!==e.githubIssueLink&&"string"==typeof e.githubIssueLink?e.githubIssueLink+"":null,o=e.title,r=null!=o&&""!==o?g(o+""):null,n=e.body,h=null!=n&&""!==n?g(n+""):null,a=s.name,u=null!=a&&""!==a?a+"":null,l=s.description,d=null!=l&&""!==l?g(l+""):null,c="number"==typeof e.revision&&Number.isFinite(e.revision)?e.revision:1,f="number"==typeof e.upvoteCount&&Number.isFinite(e.upvoteCount)?e.upvoteCount:0,p="string"==typeof e.updatedAt&&e.updatedAt.length>0?e.updatedAt:(new Date).toISOString(),b="string"==typeof e.createdAt&&e.createdAt.length>0?e.createdAt:(new Date).toISOString();return{id:e.id+"",githubIssueLink:i,type:e.type||"bug",status:e.status||"open",pinnedAt:e.pinnedAt?e.pinnedAt+"":null,revision:c,title:r,body:h,repository:{id:s.id+"",name:u,description:d},updatedAt:p,createdAt:b,upvoteCount:f,hasUpvoted:!!e.hasUpvoted}}validateUpvoteResponse(t){if(!t||"object"!=typeof t)throw new w("Invalid upvote response: expected object");const e=t;if("boolean"!=typeof e.upvoted)throw new w("Invalid upvote response: upvoted must be a boolean");if("number"!=typeof e.upvoteCount)throw new w("Invalid upvote response: upvoteCount must be a number");if("string"!=typeof e.anonymousUserId)throw new w("Invalid upvote response: anonymousUserId must be a string");return{upvoted:e.upvoted,upvoteCount:e.upvoteCount,anonymousUserId:e.anonymousUserId}}getEndpoint(){return this.endpoint}getTimeout(){return this.timeout}}const E=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=i(this,"feedlogUpvote"),this.feedlogError=i(this,"feedlogError"),this.maxWidth="42rem",this.theme="light",this.issues=[],this.loading=!0,this.error=null,this.cursor=null,this.hasMore=!1,this.isLoadingMore=!1,this.sdk=null,this.fetchRequestId=0,this.isDisconnected=!1,this.upvoteRequestIds=new Map,this.handleUpvote=async t=>{if(!this.sdk||this.isDisconnected)return;const{issueId:e,currentUpvoted:s,currentCount:i}=t.detail,o=(this.upvoteRequestIds.get(e)||0)+1;this.upvoteRequestIds.set(e,o),this.issues=this.issues.map((t=>t.id===e?Object.assign(Object.assign({},t),{hasUpvoted:!s,upvoteCount:s?i-1:i+1}):t));try{const t=await this.sdk.toggleUpvote(e);if(this.isDisconnected||this.upvoteRequestIds.get(e)!==o)return;this.issues=this.issues.map((s=>s.id===e?Object.assign(Object.assign({},s),{hasUpvoted:t.upvoted,upvoteCount:t.upvoteCount}):s)),this.feedlogUpvote.emit({issueId:e,upvoted:t.upvoted,upvoteCount:t.upvoteCount})}catch(t){if(this.isDisconnected||this.upvoteRequestIds.get(e)!==o)return;this.issues=this.issues.map((t=>t.id===e?Object.assign(Object.assign({},t),{hasUpvoted:s,upvoteCount:i}):t)),this.feedlogError.emit({error:t instanceof Error?t.message:"Failed to toggle upvote"})}}}componentWillLoad(){if(this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy,this.initializeSDK(),!(this.issues.length>0)||this.loading)return this.fetchIssues()}disconnectedCallback(){this.isDisconnected=!0,this.fetchRequestId++}componentDidUpdate(){(this.previousType!==this.type||this.previousLimit!==this.limit||this.previousSortBy!==this.sortBy)&&(this.fetchRequestId++,this.cursor=null,this.hasMore=!1,this.issues=[],this.fetchIssues().catch((()=>{})),this.previousType=this.type,this.previousLimit=this.limit,this.previousSortBy=this.sortBy)}initializeSDK(){try{if(!this.apiKey)throw Error("API key is required for the Feedlog SDK");this.sdk=new j(Object.assign({apiKey:this.apiKey},this.endpoint&&{endpoint:this.endpoint})),this.error=null}catch(t){const e=t instanceof Error?t.message:"Failed to initialize SDK";this.error=e,this.feedlogError.emit({error:e})}}buildFetchParams(){const t={};return this.type&&(t.type=this.type),this.sortBy&&(t.sortBy=this.sortBy),this.limit&&(t.limit=this.limit),this.cursor&&(t.cursor=this.cursor),t}async fetchIssues(){if(!this.sdk)return;const t=this.fetchRequestId;try{this.loading=!0,this.error=null;const e=this.buildFetchParams(),s=await this.sdk.fetchIssues(e);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=s.issues,this.cursor=s.pagination.cursor,this.hasMore=s.pagination.hasMore}catch(e){if(this.isDisconnected||t!==this.fetchRequestId)return;const s=e instanceof Error?e.message:"Couldn't load updates";this.error=s,this.issues=[],this.feedlogError.emit({error:s,code:null==e?void 0:e.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.loading=!1,this.isLoadingMore=!1)}}async loadMore(){if(!this.sdk||!this.hasMore||this.isLoadingMore||this.loading)return;const t=this.fetchRequestId;this.isLoadingMore=!0;try{const e=this.buildFetchParams(),s=await this.sdk.fetchIssues(e);if(this.isDisconnected||t!==this.fetchRequestId)return;this.issues=[...this.issues,...s.issues],this.cursor=s.pagination.cursor,this.hasMore=s.pagination.hasMore}catch(e){if(this.isDisconnected||t!==this.fetchRequestId)return;this.feedlogError.emit({error:e instanceof Error?e.message:"Failed to load more issues",code:null==e?void 0:e.statusCode})}finally{this.isDisconnected||t!==this.fetchRequestId||(this.isLoadingMore=!1)}}render(){var t,e;const s=null===(e=null===(t=this.el)||void 0===t?void 0:t.style)||void 0===e?void 0:e.getPropertyValue("--feedlog-background");return o("feedlog-issues",{key:"2d9528bb33630664824ab584e10208359d579eb6",style:s?{"--feedlog-background":s}:void 0,issues:this.issues,limit:this.limit,maxWidth:this.maxWidth,theme:this.theme,heading:this.heading,subtitle:this.subtitle,emptyStateTitle:this.emptyStateTitle,emptyStateMessage:this.emptyStateMessage,getIssueUrl:this.getIssueUrl,loading:this.loading,error:this.error,hasMore:this.hasMore,isLoadingMore:this.isLoadingMore,onFeedlogUpvote:this.handleUpvote,onFeedlogLoadMore:async()=>this.loadMore(),part:"base"},o("slot",{key:"efe89b9fd0f337af7930823762296487ebcb758e",name:"header",slot:"header"}),o("slot",{key:"ffebd688ebf25bb464ceefd6a161f7140e03933b",name:"loading",slot:"loading"}),o("slot",{key:"b59010966b6f7768814ba838c05ffd62cfd1c26a",name:"error",slot:"error"}),o("slot",{key:"99b1abfcbb62703b3642fb02d79d8d1488421ee3",name:"empty-state",slot:"empty-state"}),o("slot",{key:"c47c1dc83e8434b8f66d1b42b65e812aa5e1f8ee",name:"load-more",slot:"load-more"}))}get el(){return this}},[257,"feedlog-issues-client",{apiKey:[1,"api-key"],type:[1],limit:[2],sortBy:[1,"sort-by"],endpoint:[1],maxWidth:[1,"max-width"],theme:[1],heading:[1],subtitle:[1],emptyStateTitle:[1,"empty-state-title"],emptyStateMessage:[1,"empty-state-message"],getIssueUrl:[16],issues:[32],loading:[32],error:[32],cursor:[32],hasMore:[32],isLoadingMore:[32]}]);function k(){"undefined"!=typeof customElements&&["feedlog-issues-client","feedlog-badge","feedlog-button","feedlog-issue","feedlog-issues","feedlog-issues-list"].forEach((e=>{switch(e){case"feedlog-issues-client":customElements.get(t(e))||customElements.define(t(e),E);break;case"feedlog-badge":customElements.get(t(e))||h();break;case"feedlog-button":customElements.get(t(e))||a();break;case"feedlog-issue":customElements.get(t(e))||n();break;case"feedlog-issues":customElements.get(t(e))||u();break;case"feedlog-issues-list":customElements.get(t(e))||l()}}))}k();const O=E,U=k;export{O as FeedlogIssuesClient,U as defineCustomElement}
@@ -1 +1 @@
1
- import{F as o,d as s}from"./p-CuFKEckF.js";const p=o,r=s;export{p as FeedlogIssuesList,r as defineCustomElement}
1
+ import{F as o,d as r}from"./p-BoxVrJId.js";const s=o,p=r;export{s as FeedlogIssuesList,p as defineCustomElement}
@@ -1 +1 @@
1
- import{F as o,d as s}from"./p-BBbiSGNf.js";const p=o,r=s;export{p as FeedlogIssues,r as defineCustomElement}
1
+ import{F as o,d as s}from"./p-fDVosM5p.js";const p=o,r=s;export{p as FeedlogIssues,r as defineCustomElement}
@@ -1 +1 @@
1
- const t=":root{--feedlog-font-size:16px;--feedlog-background:#ffffff;--feedlog-foreground:oklch(0.145 0 0);--feedlog-card:#ffffff;--feedlog-card-foreground:oklch(0.145 0 0);--feedlog-popover:oklch(1 0 0);--feedlog-popover-foreground:oklch(0.145 0 0);--feedlog-primary:#030213;--feedlog-primary-foreground:oklch(1 0 0);--feedlog-secondary:oklch(0.95 0.0058 264.53);--feedlog-secondary-foreground:#030213;--feedlog-muted:#ececf0;--feedlog-muted-foreground:#717182;--feedlog-accent:#e9ebef;--feedlog-accent-foreground:#030213;--feedlog-destructive:#d4183d;--feedlog-destructive-foreground:#ffffff;--feedlog-border:rgba(0, 0, 0, 0.1);--feedlog-input:transparent;--feedlog-input-background:#f3f3f5;--feedlog-switch-background:#cbced4;--feedlog-ring:oklch(0.708 0 0);--feedlog-radius:0.625rem;--feedlog-blue-100:oklch(0.932 0.032 255.585);--feedlog-blue-400:oklch(0.707 0.165 254.624);--feedlog-blue-500:oklch(0.623 0.214 259.815);--feedlog-blue-600:oklch(0.546 0.245 262.881);--feedlog-blue-700:oklch(0.488 0.243 264.376);--feedlog-blue-900:oklch(0.379 0.146 265.522);--feedlog-font-family:ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace}.dark{--feedlog-background:oklch(0.145 0 0);--feedlog-foreground:oklch(0.985 0 0);--feedlog-card:oklch(0.145 0 0);--feedlog-card-foreground:oklch(0.985 0 0);--feedlog-popover:oklch(0.145 0 0);--feedlog-popover-foreground:oklch(0.985 0 0);--feedlog-primary:oklch(0.985 0 0);--feedlog-primary-foreground:oklch(0.205 0 0);--feedlog-secondary:oklch(0.269 0 0);--feedlog-secondary-foreground:oklch(0.985 0 0);--feedlog-muted:oklch(0.269 0 0);--feedlog-muted-foreground:oklch(0.708 0 0);--feedlog-accent:oklch(0.269 0 0);--feedlog-accent-foreground:oklch(0.985 0 0);--feedlog-destructive:oklch(0.396 0.141 25.723);--feedlog-destructive-foreground:oklch(0.637 0.237 25.331);--feedlog-border:oklch(0.269 0 0);--feedlog-input:oklch(0.269 0 0);--feedlog-ring:oklch(0.439 0 0)}";var e,n,s,o,i,r,l,f,c,u,h,a,d,p,g,v,$,b=Object.create,m=Object.defineProperty,w=Object.getOwnPropertyDescriptor,y=Object.getOwnPropertyNames,k=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,j=t=>{throw TypeError(t)},S=(t,e)=>function(){return e||(0,t[y(t)[0]])((e={exports:{}}).exports,e),e.exports},M=(t,e,n)=>e.has(t)||j("Cannot "+n),x=(t,e,n)=>(M(t,e,"read from private field"),n?n.call(t):e.get(t)),E=(t,e,n)=>e.has(t)?j("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),N=(t,e,n)=>(M(t,e,"write to private field"),e.set(t,n),n),P=(t,e,n)=>(M(t,e,"access private method"),n),R=S({"node_modules/balanced-match/index.js"(t,e){function n(t,e,n){t instanceof RegExp&&(t=s(t,n)),e instanceof RegExp&&(e=s(e,n));var i=o(t,e,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+t.length,i[1]),post:n.slice(i[1]+e.length)}}function s(t,e){var n=e.match(t);return n?n[0]:null}function o(t,e,n){var s,o,i,r,l,f=n.indexOf(t),c=n.indexOf(e,f+1),u=f;if(f>=0&&c>0){if(t===e)return[f,c];for(s=[],i=n.length;u>=0&&!l;)u==f?(s.push(u),f=n.indexOf(t,u+1)):1==s.length?l=[s.pop(),c]:((o=s.pop())<i&&(i=o,r=c),c=n.indexOf(e,u+1)),u=f<c&&f>=0?f:c;s.length&&(l=[i,r])}return l}e.exports=n,n.range=o}}),W=S({"node_modules/brace-expansion/index.js"(t,e){var n=R();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),g(function(t){return t.split("\\\\").join(s).split("\\{").join(o).split("\\}").join(i).split("\\,").join(r).split("\\.").join(l)}(t),!0).map(c)):[]};var s="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",i="\0CLOSE"+Math.random()+"\0",r="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function f(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function c(t){return t.split(s).join("\\").split(o).join("{").split(i).join("}").split(r).join(",").split(l).join(".")}function u(t){if(!t)return[""];var e=[],s=n("{","}",t);if(!s)return t.split(",");var o=s.body,i=s.post,r=s.pre.split(",");r[r.length-1]+="{"+o+"}";var l=u(i);return i.length&&(r[r.length-1]+=l.shift(),r.push.apply(r,l)),e.push.apply(e,r),e}function h(t){return"{"+t+"}"}function a(t){return/^-?0\d/.test(t)}function d(t,e){return t<=e}function p(t,e){return t>=e}function g(t,e){var s=[],o=n("{","}",t);if(!o)return[t];var r=o.pre,l=o.post.length?g(o.post,!1):[""];if(/\$$/.test(o.pre))for(var c=0;c<l.length;c++)s.push(A=r+"{"+o.body+"}"+l[c]);else{var v,$,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),m=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),w=b||m,y=o.body.indexOf(",")>=0;if(!w&&!y)return o.post.match(/,(?!,).*\}/)?g(t=o.pre+"{"+o.body+i+o.post):[t];if(w)v=o.body.split(/\.\./);else if(1===(v=u(o.body)).length&&1===(v=g(v[0],!1).map(h)).length)return l.map((function(t){return o.pre+v[0]+t}));if(w){var k=f(v[0]),O=f(v[1]),j=Math.max(v[0].length,v[1].length),S=3==v.length?Math.abs(f(v[2])):1,M=d;O<k&&(S*=-1,M=p);var x=v.some(a);$=[];for(var E=k;M(E,O);E+=S){var N;if(m)"\\"===(N=String.fromCharCode(E))&&(N="");else if(N=E+"",x){var P=j-N.length;if(P>0){var R=Array(P+1).join("0");N=E<0?"-"+R+N.slice(1):R+N}}$.push(N)}}else{$=[];for(var W=0;W<v.length;W++)$.push.apply($,g(v[W],!1))}for(W=0;W<$.length;W++)for(c=0;c<l.length;c++){var A=r+$[W]+l[c];(!e||w||A)&&s.push(A)}}return s}}}),A=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(A||{}),L=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(L||{}),C="type",z="value",I="serialized:",_=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[s]])=>{if(31&s||32&s){const s=t[n],o=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);o&&Object.defineProperty(t,n,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.i.has(n)?e.i.get(n):s}}))},F=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},T=(t,e)=>e in t,D=(t,e)=>(0,console.error)(t,e),U=new Map,V="s-id",B="sty-id",G="c-id",Z="undefined"!=typeof window?window:{},H=Z.HTMLElement||class{},q={l:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)},J=(()=>{try{return!!Z.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),Y=!!J&&(()=>!!Z.document&&Object.getOwnPropertyDescriptor(Z.document.adoptedStyleSheets,"length").writable)(),K=!1,Q=[],X=[],tt=(t,e)=>n=>{t.push(n),K||(K=!0,e&&4&q.l?st(nt):q.raf(nt))},et=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){D(t)}t.length=0},nt=()=>{et(Q),et(X),(K=Q.length>0)&&q.raf(nt)},st=t=>Promise.resolve(void 0).then(t),ot=tt(X,!0),it=t=>{const e=new URL(t,q.u);return e.origin!==Z.location.origin?e.href:e.pathname},rt=t=>q.u=t,lt=t=>"object"==(t=typeof t)||"function"===t,ft=((t,e,n)=>(n=null!=t?b(k(t)):{},((t,e,n,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of y(e))O.call(t,n)||undefined===n||m(t,n,{get:()=>e[n],enumerable:!(s=w(e,n))||s.enumerable});return t})(m(n,"default",{value:t,enumerable:!0}),t)))(W()),ct=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},ut={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ht=t=>t.replace(/[[\]\\-]/g,"\\$&"),at=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),dt=t=>t.join(""),pt=(t,e)=>{const n=e;if("["!==t.charAt(n))throw Error("not in a brace expression");const s=[],o=[];let i=n+1,r=!1,l=!1,f=!1,c=!1,u=n,h="";t:for(;i<t.length;){const e=t.charAt(i);if("!"!==e&&"^"!==e||i!==n+1){if("]"===e&&r&&!f){u=i+1;break}if(r=!0,"\\"!==e||f){if("["===e&&!f)for(const[e,[r,f,c]]of Object.entries(ut))if(t.startsWith(e,i)){if(h)return["$.",!1,t.length-n,!0];i+=e.length,c?o.push(r):s.push(r),l=l||f;continue t}f=!1,h?(e>h?s.push(ht(h)+"-"+ht(e)):e===h&&s.push(ht(e)),h="",i++):t.startsWith("-]",i+1)?(s.push(ht(e+"-")),i+=2):t.startsWith("-",i+1)?(h=e,i+=2):(s.push(ht(e)),i++)}else f=!0,i++}else c=!0,i++}if(u<i)return["",!1,0,!1];if(!s.length&&!o.length)return["$.",!1,t.length-n,!0];if(0===o.length&&1===s.length&&/^\\?.$/.test(s[0])&&!c){const t=2===s[0].length?s[0].slice(-1):s[0];return[at(t),!1,u-n,!1]}const a="["+(c?"^":"")+dt(s)+"]",d="["+(c?"":"^")+dt(o)+"]";return[s.length&&o.length?"("+a+"|"+d+")":s.length?a:d,l,u-n,!0]},gt=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),vt=new Set(["!","?","+","*","@"]),$t=t=>vt.has(t),bt="(?!\\.)",mt=new Set(["[","."]),wt=new Set(["..","."]),yt=new Set("().*{}+?[]^$\\!"),kt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ot="[^/]",jt=Ot+"*?",St=Ot+"+?",Mt=class t{constructor(t,d,p={}){E(this,a),((t,e,n)=>{((t,e,n)=>{e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,e+"",n)})(this,"type"),E(this,e),E(this,n),E(this,s,!1),E(this,o,[]),E(this,i),E(this,r),E(this,l),E(this,f,!1),E(this,c),E(this,u),E(this,h,!1),this.type=t,t&&N(this,n,!0),N(this,i,d),N(this,e,x(this,i)?x(x(this,i),e):this),N(this,c,x(this,e)===this?p:x(x(this,e),c)),N(this,l,x(this,e)===this?[]:x(x(this,e),l)),"!"!==t||x(x(this,e),f)||x(this,l).push(this),N(this,r,x(this,i)?x(x(this,i),o).length:0)}get hasMagic(){if(void 0!==x(this,n))return x(this,n);for(const t of x(this,o))if("string"!=typeof t&&(t.type||t.hasMagic))return N(this,n,!0);return x(this,n)}toString(){return void 0!==x(this,u)?x(this,u):N(this,u,this.type?this.type+"("+x(this,o).map((t=>t+"")).join("|")+")":x(this,o).map((t=>t+"")).join(""))}push(...e){for(const n of e)if(""!==n){if("string"!=typeof n&&!(n instanceof t&&x(n,i)===this))throw Error("invalid part: "+n);x(this,o).push(n)}}toJSON(){var t;const n=null===this.type?x(this,o).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...x(this,o).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&n.unshift([]),this.isEnd()&&(this===x(this,e)||x(x(this,e),f)&&"!"===(null==(t=x(this,i))?void 0:t.type))&&n.push({}),n}isStart(){var n;if(x(this,e)===this)return!0;if(!(null==(n=x(this,i))?void 0:n.isStart()))return!1;if(0===x(this,r))return!0;const s=x(this,i);for(let e=0;e<x(this,r);e++){const n=x(s,o)[e];if(!(n instanceof t&&"!"===n.type))return!1}return!0}isEnd(){var t,n,s;if(x(this,e)===this)return!0;if("!"===(null==(t=x(this,i))?void 0:t.type))return!0;if(!(null==(n=x(this,i))?void 0:n.isEnd()))return!1;if(!this.type)return null==(s=x(this,i))?void 0:s.isEnd();const l=x(this,i)?x(x(this,i),o).length:0;return x(this,r)===l-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(e){const n=new t(this.type,e);for(const t of x(this,o))n.copyIn(t);return n}static fromGlob(e,n={}){var s;const o=new t(null,void 0,n);return P(s=t,p,g).call(s,e,o,0,n),o}toMMPattern(){if(this!==x(this,e))return x(this,e).toMMPattern();const t=""+this,[s,o,i,r]=this.toRegExpSource();if(!(i||x(this,n)||x(this,c).nocase&&!x(this,c).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return o;const l=(x(this,c).nocase?"i":"")+(r?"u":"");return Object.assign(RegExp(`^${s}$`,l),{_src:s,_glob:t})}get options(){return x(this,c)}toRegExpSource(r){var l;const u=null!=r?r:!!x(this,c).dot;if(x(this,e)===this&&P(this,a,d).call(this),!this.type){const c=this.isStart()&&this.isEnd(),h=x(this,o).map((e=>{var o;const[i,l,f,u]="string"==typeof e?P(o=t,p,$).call(o,e,x(this,n),c):e.toRegExpSource(r);return N(this,n,x(this,n)||f),N(this,s,x(this,s)||u),i})).join("");let a="";if(this.isStart()&&"string"==typeof x(this,o)[0]&&(1!==x(this,o).length||!wt.has(x(this,o)[0]))){const t=mt,e=u&&t.has(h.charAt(0))||h.startsWith("\\.")&&t.has(h.charAt(2))||h.startsWith("\\.\\.")&&t.has(h.charAt(4)),n=!u&&!r&&t.has(h.charAt(0));a=e?"(?!(?:^|/)\\.\\.?(?:$|/))":n?bt:""}let d="";return this.isEnd()&&x(x(this,e),f)&&"!"===(null==(l=x(this,i))?void 0:l.type)&&(d="(?:$|\\/)"),[a+h+d,gt(h),N(this,n,!!x(this,n)),x(this,s)]}const g="*"===this.type||"+"===this.type,b="!"===this.type?"(?:(?!(?:":"(?:";let m=P(this,a,v).call(this,u);if(this.isStart()&&this.isEnd()&&!m&&"!"!==this.type){const t=""+this;return N(this,o,[t]),this.type=null,N(this,n,void 0),[t,gt(""+this),!1,!1]}let w=!g||r||u?"":P(this,a,v).call(this,!0);w===m&&(w=""),w&&(m=`(?:${m})(?:${w})*?`);let y="";return y="!"===this.type&&x(this,h)?(this.isStart()&&!u?bt:"")+St:b+m+("!"===this.type?"))"+(!this.isStart()||u||r?"":bt)+jt+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&w?")":"*"===this.type&&w?")?":")"+this.type),[y,gt(m),N(this,n,!!x(this,n)),x(this,s)]}};e=new WeakMap,n=new WeakMap,s=new WeakMap,o=new WeakMap,i=new WeakMap,r=new WeakMap,l=new WeakMap,f=new WeakMap,c=new WeakMap,u=new WeakMap,h=new WeakMap,a=new WeakSet,d=function(){if(this!==x(this,e))throw Error("should only call on root");if(x(this,f))return this;let t;for(N(this,f,!0);t=x(this,l).pop();){if("!"!==t.type)continue;let e=t,n=x(e,i);for(;n;){for(let s=x(e,r)+1;!n.type&&s<x(n,o).length;s++)for(const e of x(t,o)){if("string"==typeof e)throw Error("string part in extglob AST??");e.copyIn(x(n,o)[s])}e=n,n=x(e,i)}}return this},p=new WeakSet,g=function(t,e,s,i){var r,l;let f=!1,c=!1,u=-1,a=!1;if(null===e.type){let n=s,o="";for(;n<t.length;){const s=t.charAt(n++);if(f||"\\"===s)f=!f,o+=s;else if(c)n===u+1?"^"!==s&&"!"!==s||(a=!0):"]"!==s||n===u+2&&a||(c=!1),o+=s;else if("["!==s)if(i.noext||!$t(s)||"("!==t.charAt(n))o+=s;else{e.push(o),o="";const l=new Mt(s,e);n=P(r=Mt,p,g).call(r,t,l,n,i),e.push(l)}else c=!0,u=n,a=!1,o+=s}return e.push(o),n}let d=s+1,v=new Mt(null,e);const $=[];let b="";for(;d<t.length;){const n=t.charAt(d++);if(f||"\\"===n)f=!f,b+=n;else if(c)d===u+1?"^"!==n&&"!"!==n||(a=!0):"]"!==n||d===u+2&&a||(c=!1),b+=n;else if("["!==n)if($t(n)&&"("===t.charAt(d)){v.push(b),b="";const e=new Mt(n,v);v.push(e),d=P(l=Mt,p,g).call(l,t,e,d,i)}else if("|"!==n){if(")"===n)return""===b&&0===x(e,o).length&&N(e,h,!0),v.push(b),b="",e.push(...$,v),d;b+=n}else v.push(b),b="",$.push(v),v=new Mt(null,e);else c=!0,u=d,a=!1,b+=n}return e.type=null,N(e,n,void 0),N(e,o,[t.substring(s-1)]),d},v=function(t){return x(this,o).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[n,o,i,r]=e.toRegExpSource(t);return N(this,s,x(this,s)||r),n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},$=function(t,e,n=!1){let s=!1,o="",i=!1;for(let r=0;r<t.length;r++){const l=t.charAt(r);if(s)s=!1,o+=(yt.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[n,s,l,f]=pt(t,r);if(l){o+=n,i=i||s,r+=l-1,e=e||f;continue}}"*"!==l?"?"!==l?o+=kt(l):(o+=Ot,e=!0):(o+=n&&"*"===t?St:jt,e=!0)}else r===t.length-1?o+="\\\\":s=!0}return[o,gt(t),!!e,i]},E(Mt,p);var xt=Mt,Et=(t,e,n={})=>(ct(e),!(!n.nocomment&&"#"===e.charAt(0))&&new te(e,n).match(t)),Nt=/^\*+([^+@!?\*\[\(]*)$/,Pt=t=>e=>!e.startsWith(".")&&e.endsWith(t),Rt=t=>e=>e.endsWith(t),Wt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),At=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Lt=/^\*+\.\*+$/,Ct=t=>!t.startsWith(".")&&t.includes("."),zt=t=>"."!==t&&".."!==t&&t.includes("."),It=/^\.\*+$/,_t=t=>"."!==t&&".."!==t&&t.startsWith("."),Ft=/^\*+$/,Tt=t=>0!==t.length&&!t.startsWith("."),Dt=t=>0!==t.length&&"."!==t&&".."!==t,Ut=/^\?+([^+@!?\*\[\(]*)?$/,Vt=([t,e=""])=>{const n=Ht([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Bt=([t,e=""])=>{const n=qt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Gt=([t,e=""])=>{const n=qt([t]);return e?t=>n(t)&&t.endsWith(e):n},Zt=([t,e=""])=>{const n=Ht([t]);return e?t=>n(t)&&t.endsWith(e):n},Ht=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},qt=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Jt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";Et.sep="win32"===Jt?"\\":"/";var Yt=Symbol("globstar **");Et.GLOBSTAR=Yt,Et.filter=(t,e={})=>n=>Et(n,t,e);var Kt=(t,e={})=>Object.assign({},t,e);Et.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return Et;const e=Et;return Object.assign(((n,s,o={})=>e(n,s,Kt(t,o))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,Kt(t,n))}static defaults(n){return e.defaults(Kt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,s={}){super(e,n,Kt(t,s))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Kt(t,s))}},unescape:(n,s={})=>e.unescape(n,Kt(t,s)),escape:(n,s={})=>e.escape(n,Kt(t,s)),filter:(n,s={})=>e.filter(n,Kt(t,s)),defaults:n=>e.defaults(Kt(t,n)),makeRe:(n,s={})=>e.makeRe(n,Kt(t,s)),braceExpand:(n,s={})=>e.braceExpand(n,Kt(t,s)),match:(n,s,o={})=>e.match(n,s,Kt(t,o)),sep:e.sep,GLOBSTAR:Yt})};var Qt=(t,e={})=>(ct(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,ft.default)(t));Et.braceExpand=Qt,Et.makeRe=(t,e={})=>new te(t,e).makeRe(),Et.match=(t,e,n={})=>{const s=new te(e,n);return t=t.filter((t=>s.match(t))),s.options.nonull&&!t.length&&t.push(e),t};var Xt=/[?*]|[+@!]\(.*?\)|\[|\]/,te=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){ct(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||Jt,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&Xt.test(t[2])||Xt.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,s),this.set=s.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const s=t[n];1===n&&""===s&&""===t[0]||"."!==s&&""!==s||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const s=t[n-1];s&&"."!==s&&".."!==s&&"**"!==s&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let s=-1;for(;-1!==(s=n.indexOf("**",s+1));){let o=s;for(;"**"===n[o+1];)o++;o>s&&n.splice(s+1,o-s);const i=n[s+2],r=n[s+3];if(".."!==n[s+1])continue;if(!i||"."===i||".."===i||!r||"."===r||".."===r)continue;e=!0,n.splice(s,1);const l=n.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const s=n[t];1===t&&""===s&&""===n[0]||"."!==s&&""!==s||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let o=0;for(;-1!==(o=n.indexOf("..",o+1));){const t=n[o-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,n.splice(o-1,2,...1===o&&"**"===n[o+1]?["."]:[]),0===n.length&&n.push(""),o-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const s=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);s&&(t[e]=s,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let s=0,o=0,i=[],r="";for(;s<t.length&&o<e.length;)if(t[s]===e[o])i.push("b"===r?e[o]:t[s]),s++,o++;else if(n&&"**"===t[s]&&e[o]===t[s+1])i.push(t[s]),s++;else if(n&&"**"===e[o]&&t[s]===e[o+1])i.push(e[o]),o++;else if("*"!==t[s]||!e[o]||!this.options.dot&&e[o].startsWith(".")||"**"===e[o]){if("*"!==e[o]||!t[s]||!this.options.dot&&t[s].startsWith(".")||"**"===t[s])return!1;if("a"===r)return!1;r="b",i.push(e[o]),s++,o++}else{if("b"===r)return!1;r="a",i.push(t[s]),s++,o++}return t.length===e.length&&i}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let s=0;s<t.length&&"!"===t.charAt(s);s++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const s=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),o="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),i=s?3:n?0:void 0,r=!o&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:o?0:void 0;if("number"==typeof i&&"number"==typeof r){const[n,s]=[t[i],e[r]];n.toLowerCase()===s.toLowerCase()&&(e[r]=n,r>i?e=e.slice(r):i>r&&(t=t.slice(i)))}}const{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,r=0,l=t.length,f=e.length;i<l&&r<f;i++,r++){this.debug("matchOne loop");var c=e[r],u=t[i];if(this.debug(e,c,u),!1===c)return!1;if(c===Yt){this.debug("GLOBSTAR",[e,c,u]);var h=i,a=r+1;if(a===f){for(this.debug("** at the end");i<l;i++)if("."===t[i]||".."===t[i]||!s.dot&&"."===t[i].charAt(0))return!1;return!0}for(;h<l;){var d=t[h];if(this.debug("\nglobstar while",t,h,e,a,d),this.matchOne(t.slice(h),e.slice(a),n))return this.debug("globstar found match!",h,l,d),!0;if("."===d||".."===d||!s.dot&&"."===d.charAt(0)){this.debug("dot detected!",t,h,e,a);break}this.debug("globstar swallow a segment, and continue"),h++}return!(!n||(this.debug("\n>>> no match, partial?",t,h,e,a),h!==l))}let o;if("string"==typeof c?(o=u===c,this.debug("string match",c,u,o)):(o=c.test(u),this.debug("pattern match",c,u,o)),!o)return!1}if(i===l&&r===f)return!0;if(i===l)return n;if(r===f)return i===l-1&&""===t[i];throw Error("wtf?")}braceExpand(){return Qt(this.pattern,this.options)}parse(t){ct(t);const e=this.options;if("**"===t)return Yt;if(""===t)return"";let n,s=null;(n=t.match(Ft))?s=e.dot?Dt:Tt:(n=t.match(Nt))?s=(e.nocase?e.dot?At:Wt:e.dot?Rt:Pt)(n[1]):(n=t.match(Ut))?s=(e.nocase?e.dot?Bt:Vt:e.dot?Gt:Zt)(n):(n=t.match(Lt))?s=e.dot?zt:Ct:(n=t.match(It))&&(s=_t);const o=xt.fromGlob(t,this.options).toMMPattern();return s&&"object"==typeof o&&Reflect.defineProperty(o,"test",{value:s}),o}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]);let o=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))s.add(e);return"string"==typeof t?(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Yt?Yt:t._src}));return e.forEach(((t,s)=>{const o=e[s+1],i=e[s-1];t===Yt&&i!==Yt&&(void 0===i?void 0!==o&&o!==Yt?e[s+1]="(?:\\/|"+n+"\\/)?"+o:e[s]=n:void 0===o?e[s-1]=i+"(?:\\/|"+n+")?":o!==Yt&&(e[s-1]=i+"(?:\\/|\\/"+n+"\\/)"+o,e[s+1]=Yt))})),e.filter((t=>t!==Yt)).join("/")})).join("|");const[i,r]=t.length>1?["(?:",")"]:["",""];o="^"+i+o+r+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=RegExp(o,[...s].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const o=this.set;this.debug(this.pattern,"set",o);let i=s[s.length-1];if(!i)for(let t=s.length-2;!i&&t>=0;t--)i=s[t];for(let t=0;t<o.length;t++){const r=o[t];let l=s;if(n.matchBase&&1===r.length&&(l=[i]),this.matchOne(l,r,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return Et.defaults(t).Minimatch}};Et.AST=xt,Et.Minimatch=te,Et.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),Et.unescape=gt;var ee=class t{static fromLocalValue(e){const n=e[C],s=z in e?e[z]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((e=>t.fromLocalValue(e)));case"date":return new Date(s);case"map":const e=new Map;for(const[n,o]of s){const s="object"==typeof n&&null!==n?t.fromLocalValue(n):n,i=t.fromLocalValue(o);e.set(s,i)}return e;case"object":const o={};for(const[e,n]of s)o[e]=t.fromLocalValue(n);return o;case"regexp":const{pattern:i,flags:r}=s;return RegExp(i,r);case"set":const l=new Set;for(const e of s)l.add(t.fromLocalValue(e));return l;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(C))return!1;const e=t[C];return!!Object.values({...A,...L}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(z))}};((t,e)=>{for(var n in e)m(t,n,{get:e[n],enumerable:!0})})({},{err:()=>se,map:()=>oe,ok:()=>ne,unwrap:()=>re,unwrapErr:()=>le});var ne=t=>({isOk:!0,isErr:!1,value:t}),se=t=>({isOk:!1,isErr:!0,value:t});function oe(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>ne(t))):ne(n)}if(t.isErr)return se(t.value);throw"should never get here"}var ie,re=t=>{if(t.isOk)return t.value;throw t.value},le=t=>{if(t.isErr)return t.value;throw t.value};function fe(){var e;const n=this.attachShadow({mode:"open"});if(void 0===ie&&(ie=null!=(e=function(t){if(!J)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(t))?e:null),ie)Y?n.adoptedStyleSheets.push(ie):n.adoptedStyleSheets=[...n.adoptedStyleSheets,ie];else if(!J){const e=document.createElement("style");e.innerHTML=t,n.prepend(e)}}var ce=(t,e,n,s)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const o=document.createTextNode("");if(o["s-nr"]=t,!e["s-cr"]||!e["s-cr"].parentNode)return;const i=e["s-cr"].parentNode,r=ue(i,"appendChild");if(void 0!==s){o["s-oo"]=s;const t=ue(i,"childNodes"),e=[o];t.forEach((t=>{t["s-nr"]&&e.push(t)})),e.sort(((t,e)=>!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0)?-1:!e["s-oo"]||e["s-oo"]<t["s-oo"]?1:0)),e.forEach((t=>r.call(i,t)))}else r.call(i,o);t["s-ol"]=o,t["s-sh"]=e["s-hn"]};function ue(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var he=new WeakMap,ae=(t,e,n)=>{let s=U.get(t);J&&n?(s=s||new CSSStyleSheet,"string"==typeof s?s=e:s.replaceSync(e)):s=e,U.set(t,s)},de=(t,e)=>{var n,s,o;const i=pe(e),r=U.get(i);if(!Z.document)return i;if(t=11===t.nodeType?t:Z.document,r)if("string"==typeof r){let o,l=he.get(t=t.head||t);l||he.set(t,l=new Set);const f=t.querySelector(`[${B}="${i}"]`);if(f)f.innerHTML=r;else if(!l.has(i)){o=Z.document.createElement("style"),o.innerHTML=r;const f=null!=(n=q.h)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=Z.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=f&&o.setAttribute("nonce",f),!(1&e.l))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(J){const e=new(null!=(s=t.defaultView)?s:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(r),Y?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=r+e.innerHTML:t.prepend(o)}else t.append(o);1&e.l&&t.insertBefore(o,null),4&e.l&&(o.innerHTML+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),l&&l.add(i)}}else{let e=he.get(t);if(e||he.set(t,e=new Set),!e.has(i)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let s;if(r.constructor===n.CSSStyleSheet)s=r;else{s=new n.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)s.insertRule(r.cssRules[t].cssText,t)}Y?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],e.add(i)}}return i},pe=t=>"sc-"+t.p,ge=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),ve=(t,e,...n)=>{let s=null,o=null,i=!1,r=!1;const l=[],f=e=>{for(let n=0;n<e.length;n++)s=e[n],Array.isArray(s)?f(s):null!=s&&"boolean"!=typeof s&&((i="function"!=typeof t&&!lt(s))&&(s+=""),i&&r?l[l.length-1].v+=s:l.push(i?$e(null,s):s),r=i)};if(f(n),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const c=$e(t,null);return c.$=e,l.length>0&&(c.m=l),c.k=o,c},$e=(t,e)=>({l:0,O:t,v:e,j:null,m:null,$:null,k:null}),be={},me=(t,e,n,s,o,i,r,l=[])=>{let f,c,u,h;if(1===i.nodeType){if(f=i.getAttribute(G),f&&(c=f.split("."),c[0]===r||"0"===c[0])){u=ye({l:0,S:c[0],M:c[1],N:c[2],P:c[3],O:i.tagName.toLowerCase(),j:i,$:{class:i.className||""}}),e.push(u),i.removeAttribute(G),t.m||(t.m=[]);const o=u.j.getAttribute("s-sn");"string"==typeof o&&("slot-fb"===u.O&&ke(o,c[2],u,i,t,e,n,s,l),u.j["s-sn"]=o,u.j.removeAttribute("s-sn")),void 0!==u.P&&(t.m[u.P]=u),t=u,s&&"0"===u.N&&(s[u.P]=u.j)}if(i.shadowRoot)for(h=i.shadowRoot.childNodes.length-1;h>=0;h--)me(t,e,n,s,o,i.shadowRoot.childNodes[h],r,l);const a=i.__childNodes||i.childNodes;for(h=a.length-1;h>=0;h--)me(t,e,n,s,o,a[h],r,l)}else if(8===i.nodeType)c=i.nodeValue.split("."),(c[1]===r||"0"===c[1])&&(f=c[0],u=ye({S:c[1],M:c[2],N:c[3],P:c[4]||"0",j:i,$:null,m:null,k:null,R:null,O:null,v:null}),"t"===f?(u.j=je(i,3),u.j&&3===u.j.nodeType&&(u.v=u.j.textContent,e.push(u),i.remove(),r===u.S&&(t.m||(t.m=[]),t.m[u.P]=u),s&&"0"===u.N&&(s[u.P]=u.j))):"c"===f?(u.j=je(i,8),u.j&&8===u.j.nodeType&&(e.push(u),i.remove())):u.S===r&&("s"===f?ke(i["s-sn"]=c[5]||"",c[2],u,i,t,e,n,s,l):"r"===f&&s&&i.remove()));else if(t&&"style"===t.O){const e=$e(null,i.textContent);e.j=i,e.P="0",t.m=[e]}return t},we=(t,e)=>{if(1===t.nodeType){const n=t[V]||t.getAttribute(V);n&&e.set(n,t);let s=0;if(t.shadowRoot)for(;s<t.shadowRoot.childNodes.length;s++)we(t.shadowRoot.childNodes[s],e);const o=t.__childNodes||t.childNodes;for(s=0;s<o.length;s++)we(o[s],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},ye=t=>({l:0,S:null,M:null,N:null,P:"0",j:null,$:null,m:null,k:null,R:null,O:null,v:null,...t});function ke(t,e,n,s,o,i,r,l,f){s["s-sr"]=!0,n.R=t||null,n.O="slot";const c=(null==o?void 0:o.j)?o.j["s-id"]||o.j.getAttribute("s-id"):"";if(l&&Z.document){const i=n.j=Z.document.createElement(n.O);n.R&&n.j.setAttribute("name",t),o.j.shadowRoot&&c&&c!==n.S?ue(o.j,"insertBefore")(i,ue(o.j,"children")[0]):ue(ue(s,"parentNode"),"insertBefore")(i,s),Oe(f,e,t,s,n.S),s.remove(),"0"===n.N&&(l[n.P]=n.j)}else{const i=n.j,r=c&&c!==n.S&&o.j.shadowRoot;Oe(f,e,t,s,r?c:n.S),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],s=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const s=t[n]["s-nr"]||void 0;s&&s.isConnected&&e.push(s)}return e})(o.childNodes)).forEach((t=>{s===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(s),r&&o.j.insertBefore(i,o.j.children[0])}i.push(n),r.push(n),o.m||(o.m=[]),o.m[n.P]=n}var Oe=(t,e,n,s,o)=>{var i,r;let l=s.nextSibling;if(t[e]=t[e]||[],l&&!(null==(i=l.nodeValue)?void 0:i.startsWith("s.")))do{!l||(l.getAttribute&&l.getAttribute("slot")||l["s-sn"])!==n&&(""!==n||l["s-sn"]||l.getAttribute&&l.getAttribute("slot")||8!==l.nodeType&&3!==l.nodeType)||(l["s-sn"]=n,t[e].push({slot:s,node:l,hostId:o})),l=null==l?void 0:l.nextSibling}while(l&&!(null==(r=l.nodeValue)?void 0:r.startsWith("s.")))},je=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},Se=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};Se("::slotted"),Se(":host"),Se(":host-context");var Me,xe=(t,e)=>"string"==typeof t&&t.startsWith(I)?t=function(t){return"string"==typeof t&&t.startsWith(I)?ee.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||lt(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,Ee=(t,e)=>{const n=t;return{emit:t=>Ne(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Ne=(t,e,n)=>{const s=q.ce(e,n);return t.dispatchEvent(s),s},Pe=(t,e,n,s,o,i,r)=>{if(n===s)return;let l=T(t,e),f=e.toLowerCase();if("class"===e){const e=t.classList,o=We(n);let i=We(s);if((t["s-si"]||t["s-sc"])&&r){const n=t["s-sc"]||t["s-si"];i.push(n),o.forEach((t=>{t.startsWith(n)&&i.push(t)})),i=[...new Set(i)].filter((t=>t)),e.add(...i)}else e.remove(...o.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!o.includes(t))))}else if("style"===e){for(const e in n)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)n&&s[e]===n[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}else if("key"===e);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){const r=lt(s);if((l||r&&null!==s)&&!o)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const o=null==s?"":s;"list"===e?l=!1:null!=n&&t[e]==o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!l||4&i||o)&&!r&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}else if(e="-"===e[2]?e.slice(3):T(Z,f)?f.slice(2):f[2]+e.slice(3),n||s){const o=e.endsWith(Ae);e=e.replace(Le,""),n&&q.rel(t,e,n,o),s&&q.ael(t,e,s,o)}},Re=/\s/,We=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(Re):[]),Ae="Capture",Le=RegExp(Ae+"$"),Ce=(t,e,n,s)=>{const o=11===e.j.nodeType&&e.j.host?e.j.host:e.j,i=t&&t.$||{},r=e.$||{};for(const t of ze(Object.keys(i)))t in r||Pe(o,t,i[t],void 0,n,e.l,s);for(const t of ze(Object.keys(r)))Pe(o,t,i[t],r[t],n,e.l,s)};function ze(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Ie=!1,_e=(t,e,n)=>{const s=e.m[n];let o,i,r=0;if(null!==s.v)o=s.j=Z.document.createTextNode(s.v);else{if(Ie||(Ie="svg"===s.O),!Z.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=s.j=Z.document.createElementNS(Ie?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.O),Ie&&"foreignObject"===s.O&&(Ie=!1),Ce(null,s,Ie),s.m){const e="template"===s.O?o.content:o;for(r=0;r<s.m.length;++r)i=_e(t,s,r),i&&e.appendChild(i)}"svg"===s.O?Ie=!1:"foreignObject"===o.tagName&&(Ie=!0)}return o["s-hn"]=Me,o},Fe=(t,e,n,s,o,i)=>{let r,l=t;for(l.shadowRoot&&l.tagName===Me&&(l=l.shadowRoot),"template"===n.O&&(l=l.content);o<=i;++o)s[o]&&(r=_e(null,n,o),r&&(s[o].j=r,Ve(l,r,e)))},Te=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.j;t&&t.remove()}}},De=(t,e,n=!1)=>t.O===e.O&&(n?(n&&!t.k&&e.k&&(t.k=e.k),!0):t.k===e.k),Ue=(t,e,n=!1)=>{const s=e.j=t.j,o=t.m,i=e.m,r=e.O,l=e.v;null===l?(Ce(t,e,Ie="svg"===r||"foreignObject"!==r&&Ie,n),null!==o&&null!==i?((t,e,n,s,o=!1)=>{let i,r,l=0,f=0,c=0,u=0,h=e.length-1,a=e[0],d=e[h],p=s.length-1,g=s[0],v=s[p];const $="template"===n.O?t.content:t;for(;l<=h&&f<=p;)if(null==a)a=e[++l];else if(null==d)d=e[--h];else if(null==g)g=s[++f];else if(null==v)v=s[--p];else if(De(a,g,o))Ue(a,g,o),a=e[++l],g=s[++f];else if(De(d,v,o))Ue(d,v,o),d=e[--h],v=s[--p];else if(De(a,v,o))Ue(a,v,o),Ve($,a.j,d.j.nextSibling),a=e[++l],v=s[--p];else if(De(d,g,o))Ue(d,g,o),Ve($,d.j,a.j),d=e[--h],g=s[++f];else{for(c=-1,u=l;u<=h;++u)if(e[u]&&null!==e[u].k&&e[u].k===g.k){c=u;break}c>=0?(r=e[c],r.O!==g.O?i=_e(e&&e[f],n,c):(Ue(r,g,o),e[c]=void 0,i=r.j),g=s[++f]):(i=_e(e&&e[f],n,f),g=s[++f]),i&&Ve(a.j.parentNode,i,a.j)}l>h?Fe(t,null==s[p+1]?null:s[p+1].j,n,s,f,p):f>p&&Te(e,l,h)})(s,o,e,i,n):null!==i?(null!==t.v&&(s.textContent=""),Fe(s,null,e,i,0,i.length-1)):n||null===o?n&&null!==o&&null===i&&(e.m=o):Te(o,0,o.length-1),Ie&&"svg"===r&&(Ie=!1)):t.v!==l&&(s.data=l)},Ve=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Be=(t,e,n=!1)=>{const s=t.$hostElement$,o=t.W||$e(null,null),i=(t=>t&&t.O===be)(e)?e:ve(null,null,e);if(Me=s.tagName,n&&i.$)for(const t of Object.keys(i.$))s.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.$[t]=s[t]);i.O=null,i.l|=4,t.W=i,i.j=o.j=s.shadowRoot||s,Ue(o,i,n)},Ge=(t,e)=>{if(e&&!t.A&&e["s-p"]){const n=e["s-p"].push(new Promise((s=>t.A=()=>{e["s-p"].splice(n-1,1),s()})))}},Ze=(t,e)=>{if(t.l|=16,4&t.l)return void(t.l|=512);Ge(t,t.L);const n=()=>He(t,e);if(!e)return ot(n);queueMicrotask((()=>{n()}))},He=(t,e)=>{const n=t.$hostElement$,s=n;if(!s)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=tn(s,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=qe(o,(()=>tn(s,"componentWillRender",void 0,n))),qe(o,(()=>Ye(t,s,e)))},qe=(t,e)=>Je(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Je=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ye=async(t,e,n)=>{var s;const o=t.$hostElement$,i=o["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,s=e.l,o=de(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&s&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);Ke(t,e,o,n),i&&(i.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(s=o["s-p"])?s:[],n=()=>Qe(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},Ke=(t,e,n,s)=>{try{e=e.render(),t.l&=-17,t.l|=2,Be(t,e,s)}catch(e){D(e,t.$hostElement$)}return null},Qe=t=>{const e=t.$hostElement$,n=e,s=t.L;tn(n,"componentDidRender",void 0,e),64&t.l?tn(n,"componentDidUpdate",void 0,e):(t.l|=64,en(e),tn(n,"componentDidLoad",void 0,e),t.C(e),s||Xe()),t.A&&(t.A(),t.A=void 0),512&t.l&&st((()=>Ze(t,!1))),t.l&=-517},Xe=()=>{var t;st((()=>Ne(Z,"appload",{detail:{namespace:"feedlog-toolkit"}}))),(null==(t=q.I)?void 0:t.size)&&q.I.clear()},tn=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){D(t,s)}},en=t=>t.classList.add("hydrated"),nn=(t,e,n,s)=>{const o=F(t);if(!o)return;const i=t,r=o.i.get(e),l=o.l,f=i;if(!((n=xe(n,s.t[e][0]))===r||Number.isNaN(r)&&Number.isNaN(n))){if(o.i.set(e,n),s._){const t=s._[e];t&&t.map((t=>{try{const[[s,i]]=Object.entries(t);(128&l||1&i)&&(f?f[s](n,r,e):o.F.push((()=>{o.T[s](n,r,e)})))}catch(t){D(t,i)}}))}if(2==(18&l)){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,r,e))return;Ze(o,!1)}}},sn=(t,e)=>{var n,s;const o=t.prototype;{t.watchers&&!e._&&(e._=t.watchers),t.deserializers&&!e.D&&(e.D=t.deserializers),t.serializers&&!e.U&&(e.U=t.serializers);const i=Object.entries(null!=(n=e.t)?n:{});i.map((([t,[n]])=>{if(31&n||32&n){const{get:s,set:i}=Object.getOwnPropertyDescriptor(o,t)||{};s&&(e.t[t][0]|=2048),i&&(e.t[t][0]|=4096),Object.defineProperty(o,t,{get(){return s?s.apply(this):((t,e)=>F(this).i.get(e))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(o,t,{set(s){const o=F(this);if(o){if(i)return void 0===(32&n?this[t]:o.$hostElement$[t])&&o.i.get(t)&&(s=o.i.get(t)),i.call(this,xe(s,n)),void nn(this,t,s=32&n?this[t]:o.$hostElement$[t],e);nn(this,t,s,e)}}})}}));{const n=new Map;o.attributeChangedCallback=function(t,s,r){q.jmp((()=>{var l;const f=n.get(t),c=F(this);if(this.hasOwnProperty(f),o.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==r)return;if(null==f){const n=null==c?void 0:c.l;if(c&&n&&!(8&n)&&r!==s){const o=this,i=null==(l=e._)?void 0:l[t];null==i||i.forEach((e=>{const[[i,l]]=Object.entries(e);null!=o[i]&&(128&n||1&l)&&o[i].call(o,r,s,t)}))}return}const u=i.find((([t])=>t===f));u&&4&u[1][0]&&(r=null!==r&&"false"!==r);const h=Object.getOwnPropertyDescriptor(o,f);r==this[f]||h.get&&!h.set||(this[f]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e._)?s:{}),...i.filter((([t,e])=>31&e[0])).map((([t,e])=>{const s=e[1]||t;return n.set(s,t),s}))]))}}return t},on=(t,e)=>{const n={l:e[0],p:e[1]};n.t=e[2],n._=t._,n.D=t.D,n.U=t.U,(()=>{if(!Z.document)return;const t=Z.document.querySelectorAll(`[${B}]`);let e=0;for(;e<t.length;e++)ae(t[e].getAttribute(B),ge(t[e].innerHTML),!0)})();const s=t.prototype.connectedCallback,o=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const n={l:0,$hostElement$:t,o:e,i:new Map,V:new Map};n.B=new Promise((t=>n.C=t)),t["s-p"]=[],t["s-rc"]=[];const s=n;t.__stencil__getHostRef=()=>s,512&e.l&&_(t,n)})(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!F(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&q.l)){const e=F(t);if(!e)return;const n=e.o,s=()=>{};if(1&e.l)(null==e?void 0:e.T)||(null==e?void 0:e.B)&&e.B.then((()=>{}));else{let s;if(e.l|=1,s=t.getAttribute(V),s){if(1&n.l){const e=de(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}((t,e,n,s)=>{var o,i,r,l;const f=t.shadowRoot,c=[],u=[],h=f?[]:null,a=$e(e,null);a.j=t,!Z.document||q.I&&q.I.size||we(Z.document.body,q.I=new Map),t[V]=n,t.removeAttribute(V),s.W=me(a,c,[],h,t,t,n,u);let d=0;const p=c.length;let g;for(;d<p;d++){g=c[d];const n=g.S+"."+g.M,s=q.I.get(n),i=g.j;if(f){if((null==(o=g.O)?void 0:(""+o).includes("-"))&&"slot-fb"!==g.O&&!g.j.shadowRoot){const e=F(g.j);if(e){const n=pe(e.o),s=Z.document.querySelector(`style[sty-id="${n}"]`);s&&t.shadowRoot.append(s.cloneNode(!0))}}}else i["s-hn"]=e.toUpperCase(),"slot"===g.O&&(i["s-cr"]=t["s-cr"]);"slot"===g.O&&(g.R=g.j["s-sn"]||g.j.name||null,g.m?(g.l|=2,g.j.childNodes.length||g.m.forEach((t=>{g.j.appendChild(t.j)}))):g.l|=1),s&&s.isConnected&&(s.parentElement.shadowRoot&&""===s["s-en"]&&s.parentNode.insertBefore(i,s.nextSibling),s.parentNode.removeChild(s),f||(i["s-oo"]=parseInt(g.M))),s&&!s["s-id"]&&q.I.delete(n)}const v=[],$=u.length;let b,m,w,y,k=0,O=0;for(;k<$;k++)if(b=u[k],b&&b.length)for(w=b.length,m=0;m<w;m++){if(y=b[m],v[y.hostId]||(v[y.hostId]=q.I.get(y.hostId)),!v[y.hostId])continue;const t=v[y.hostId];t.shadowRoot&&y.node.parentElement!==t&&t.insertBefore(y.node,null==(r=null==(i=b[m-1])?void 0:i.node)?void 0:r.nextSibling),t.shadowRoot&&f||(y.slot["s-cr"]||(y.slot["s-cr"]=t["s-cr"],y.slot["s-cr"]=!y.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),ce(y.node,y.slot,0,y.node["s-oo"]||O),(null==(l=y.node.parentElement)?void 0:l.shadowRoot)&&y.node.getAttribute&&y.node.getAttribute("slot")&&y.node.removeAttribute("slot")),O=(y.node["s-oo"]||O)+1}if(f){let e=0;const n=h.length;if(n){for(;e<n;e++){const t=h[e];t&&f.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}s.$hostElement$=t})(t,n.p,s,e)}{let n=t;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Ge(e,e.L=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let s;if(!(32&e.l)&&(e.l|=32,s=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128)),s&&s.style)){let t;"string"==typeof s.style&&(t=s.style);const e=pe(n);if(!U.has(e)){const s=()=>{};ae(e,t,!!(1&n.l)),s()}}const o=e.L,i=()=>Ze(e,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(t,e,n)}s()}})(this),s&&s.call(this)},disconnectedCallback(){(async t=>{he.has(t)&&he.delete(t),t.shadowRoot&&he.has(t.shadowRoot)&&he.delete(t.shadowRoot)})(this),o&&o.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${n.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else fe.call(this,n)}}),t.is=n.p,sn(t,n)},rn=t=>q.h=t,ln=t=>Object.assign(q,t);function fn(t,e){Be({$hostElement$:e},t)}function cn(t){return t}export{H,be as a,Ee as c,it as getAssetPath,ve as h,on as p,fn as render,rt as setAssetPath,rn as setNonce,ln as setPlatformOptions,cn as t}
1
+ const t=':root{--feedlog-background:#ffffff;--feedlog-foreground:#09090b;--feedlog-card:#ffffff;--feedlog-card-foreground:#09090b;--feedlog-popover:#ffffff;--feedlog-popover-foreground:#09090b;--feedlog-primary:#18181b;--feedlog-primary-foreground:#fafafa;--feedlog-secondary:#f4f4f5;--feedlog-secondary-foreground:#18181b;--feedlog-muted:#f4f4f5;--feedlog-muted-foreground:#71717a;--feedlog-accent:#f4f4f5;--feedlog-accent-foreground:#18181b;--feedlog-destructive:#ef4444;--feedlog-destructive-foreground:#fafafa;--feedlog-success:#22c55e;--feedlog-success-foreground:#ffffff;--feedlog-warning:#f59e0b;--feedlog-warning-foreground:#ffffff;--feedlog-border:#f0f0f2;--feedlog-input:#e4e4e7;--feedlog-ring:#18181b;--feedlog-badge-enhancement-bg:#eef2ff;--feedlog-badge-enhancement-text:#4338ca;--feedlog-badge-secondary-bg:#f1f5f9;--feedlog-badge-secondary-text:#475569;--feedlog-badge-destructive-bg:#fef2f2;--feedlog-badge-destructive-text:#b91c1c;--feedlog-space-1:0.25rem;--feedlog-space-2:0.5rem;--feedlog-space-3:0.75rem;--feedlog-space-4:1rem;--feedlog-space-5:1.25rem;--feedlog-space-6:1.5rem;--feedlog-space-8:2rem;--feedlog-space-10:2.5rem;--feedlog-font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--feedlog-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--feedlog-text-xs:0.75rem;--feedlog-text-sm:0.875rem;--feedlog-text-base:1rem;--feedlog-text-lg:1.125rem;--feedlog-text-xl:1.25rem;--feedlog-font-normal:400;--feedlog-font-medium:500;--feedlog-font-semibold:600;--feedlog-font-bold:700;--feedlog-radius-sm:0.25rem;--feedlog-radius:0.5rem;--feedlog-radius-lg:0.75rem;--feedlog-radius-full:9999px;--feedlog-shadow-sm:0 2px 8px -2px rgba(0, 0, 0, 0.05);--feedlog-shadow:0 4px 20px -2px rgba(0, 0, 0, 0.05);--feedlog-shadow-md:0 8px 30px -4px rgba(0, 0, 0, 0.06)}.dark{--feedlog-background:#09090b;--feedlog-foreground:#fafafa;--feedlog-card:#09090b;--feedlog-card-foreground:#fafafa;--feedlog-popover:#09090b;--feedlog-popover-foreground:#fafafa;--feedlog-primary:#fafafa;--feedlog-primary-foreground:#18181b;--feedlog-secondary:#27272a;--feedlog-secondary-foreground:#fafafa;--feedlog-muted:#27272a;--feedlog-muted-foreground:#a1a1aa;--feedlog-accent:#27272a;--feedlog-accent-foreground:#fafafa;--feedlog-destructive:#7f1d1d;--feedlog-destructive-foreground:#fafafa;--feedlog-success:#14532d;--feedlog-success-foreground:#fafafa;--feedlog-warning:#78350f;--feedlog-warning-foreground:#fafafa;--feedlog-border:#27272a;--feedlog-input:#27272a;--feedlog-ring:#d4d4d8;--feedlog-badge-enhancement-bg:rgba(67, 56, 202, 0.2);--feedlog-badge-enhancement-text:#c7d2fe;--feedlog-badge-secondary-bg:rgba(71, 85, 105, 0.2);--feedlog-badge-secondary-text:#cbd5e1;--feedlog-badge-destructive-bg:rgba(185, 28, 28, 0.2);--feedlog-badge-destructive-text:#fecaca}';var e,n,s,o,r,i,l,f,a,c,u,h,d,p,g,b,m,v=Object.create,$=Object.defineProperty,w=Object.getOwnPropertyDescriptor,y=Object.getOwnPropertyNames,x=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,S=t=>{throw TypeError(t)},j=(t,e)=>function(){return e||(0,t[y(t)[0]])((e={exports:{}}).exports,e),e.exports},M=(t,e,n)=>e.has(t)||S("Cannot "+n),k=(t,e,n)=>(M(t,e,"read from private field"),n?n.call(t):e.get(t)),E=(t,e,n)=>e.has(t)?S("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),N=(t,e,n)=>(M(t,e,"write to private field"),e.set(t,n),n),P=(t,e,n)=>(M(t,e,"access private method"),n),R=j({"node_modules/balanced-match/index.js"(t,e){function n(t,e,n){t instanceof RegExp&&(t=s(t,n)),e instanceof RegExp&&(e=s(e,n));var r=o(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function s(t,e){var n=e.match(t);return n?n[0]:null}function o(t,e,n){var s,o,r,i,l,f=n.indexOf(t),a=n.indexOf(e,f+1),c=f;if(f>=0&&a>0){if(t===e)return[f,a];for(s=[],r=n.length;c>=0&&!l;)c==f?(s.push(c),f=n.indexOf(t,c+1)):1==s.length?l=[s.pop(),a]:((o=s.pop())<r&&(r=o,i=a),a=n.indexOf(e,c+1)),c=f<a&&f>=0?f:a;s.length&&(l=[r,i])}return l}e.exports=n,n.range=o}}),W=j({"node_modules/brace-expansion/index.js"(t,e){var n=R();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),g(function(t){return t.split("\\\\").join(s).split("\\{").join(o).split("\\}").join(r).split("\\,").join(i).split("\\.").join(l)}(t),!0).map(a)):[]};var s="\0SLASH"+Math.random()+"\0",o="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",i="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function f(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function a(t){return t.split(s).join("\\").split(o).join("{").split(r).join("}").split(i).join(",").split(l).join(".")}function c(t){if(!t)return[""];var e=[],s=n("{","}",t);if(!s)return t.split(",");var o=s.body,r=s.post,i=s.pre.split(",");i[i.length-1]+="{"+o+"}";var l=c(r);return r.length&&(i[i.length-1]+=l.shift(),i.push.apply(i,l)),e.push.apply(e,i),e}function u(t){return"{"+t+"}"}function h(t){return/^-?0\d/.test(t)}function d(t,e){return t<=e}function p(t,e){return t>=e}function g(t,e){var s=[],o=n("{","}",t);if(!o)return[t];var i=o.pre,l=o.post.length?g(o.post,!1):[""];if(/\$$/.test(o.pre))for(var a=0;a<l.length;a++)s.push(A=i+"{"+o.body+"}"+l[a]);else{var b,m,v=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),$=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),w=v||$,y=o.body.indexOf(",")>=0;if(!w&&!y)return o.post.match(/,(?!,).*\}/)?g(t=o.pre+"{"+o.body+r+o.post):[t];if(w)b=o.body.split(/\.\./);else if(1===(b=c(o.body)).length&&1===(b=g(b[0],!1).map(u)).length)return l.map((function(t){return o.pre+b[0]+t}));if(w){var x=f(b[0]),O=f(b[1]),S=Math.max(b[0].length,b[1].length),j=3==b.length?Math.abs(f(b[2])):1,M=d;O<x&&(j*=-1,M=p);var k=b.some(h);m=[];for(var E=x;M(E,O);E+=j){var N;if($)"\\"===(N=String.fromCharCode(E))&&(N="");else if(N=E+"",k){var P=S-N.length;if(P>0){var R=Array(P+1).join("0");N=E<0?"-"+R+N.slice(1):R+N}}m.push(N)}}else{m=[];for(var W=0;W<b.length;W++)m.push.apply(m,g(b[W],!1))}for(W=0;W<m.length;W++)for(a=0;a<l.length;a++){var A=i+m[W]+l[a];(!e||w||A)&&s.push(A)}}return s}}}),A=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(A||{}),C=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(C||{}),L="type",I="value",z="serialized:",_=(t,e)=>{var n;Object.entries(null!=(n=e.o.t)?n:{}).map((([n,[s]])=>{if(31&s||32&s){const s=t[n],o=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);o&&Object.defineProperty(t,n,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.i.has(n)?e.i.get(n):s}}))},F=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},T=(t,e)=>e in t,U=(t,e)=>(0,console.error)(t,e),D=new Map,B="s-id",V="sty-id",G="c-id",H="undefined"!=typeof window?window:{},Z=H.HTMLElement||class{},q={l:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)},J=(()=>{try{return!!H.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),Y=!!J&&(()=>!!H.document&&Object.getOwnPropertyDescriptor(H.document.adoptedStyleSheets,"length").writable)(),K=!1,Q=[],X=[],tt=(t,e)=>n=>{t.push(n),K||(K=!0,e&&4&q.l?st(nt):q.raf(nt))},et=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){U(t)}t.length=0},nt=()=>{et(Q),et(X),(K=Q.length>0)&&q.raf(nt)},st=t=>Promise.resolve(void 0).then(t),ot=tt(X,!0),rt=t=>{const e=new URL(t,q.u);return e.origin!==H.location.origin?e.href:e.pathname},it=t=>q.u=t,lt=t=>"object"==(t=typeof t)||"function"===t,ft=((t,e,n)=>(n=null!=t?v(x(t)):{},((t,e,n,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of y(e))O.call(t,n)||undefined===n||$(t,n,{get:()=>e[n],enumerable:!(s=w(e,n))||s.enumerable});return t})($(n,"default",{value:t,enumerable:!0}),t)))(W()),at=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},ct={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ut=t=>t.replace(/[[\]\\-]/g,"\\$&"),ht=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),dt=t=>t.join(""),pt=(t,e)=>{const n=e;if("["!==t.charAt(n))throw Error("not in a brace expression");const s=[],o=[];let r=n+1,i=!1,l=!1,f=!1,a=!1,c=n,u="";t:for(;r<t.length;){const e=t.charAt(r);if("!"!==e&&"^"!==e||r!==n+1){if("]"===e&&i&&!f){c=r+1;break}if(i=!0,"\\"!==e||f){if("["===e&&!f)for(const[e,[i,f,a]]of Object.entries(ct))if(t.startsWith(e,r)){if(u)return["$.",!1,t.length-n,!0];r+=e.length,a?o.push(i):s.push(i),l=l||f;continue t}f=!1,u?(e>u?s.push(ut(u)+"-"+ut(e)):e===u&&s.push(ut(e)),u="",r++):t.startsWith("-]",r+1)?(s.push(ut(e+"-")),r+=2):t.startsWith("-",r+1)?(u=e,r+=2):(s.push(ut(e)),r++)}else f=!0,r++}else a=!0,r++}if(c<r)return["",!1,0,!1];if(!s.length&&!o.length)return["$.",!1,t.length-n,!0];if(0===o.length&&1===s.length&&/^\\?.$/.test(s[0])&&!a){const t=2===s[0].length?s[0].slice(-1):s[0];return[ht(t),!1,c-n,!1]}const h="["+(a?"^":"")+dt(s)+"]",d="["+(a?"":"^")+dt(o)+"]";return[s.length&&o.length?"("+h+"|"+d+")":s.length?h:d,l,c-n,!0]},gt=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),bt=new Set(["!","?","+","*","@"]),mt=t=>bt.has(t),vt="(?!\\.)",$t=new Set(["[","."]),wt=new Set(["..","."]),yt=new Set("().*{}+?[]^$\\!"),xt=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ot="[^/]",St=Ot+"*?",jt=Ot+"+?",Mt=class t{constructor(t,d,p={}){E(this,h),((t,e,n)=>{((t,e,n)=>{e in t?$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(t,e+"",n)})(this,"type"),E(this,e),E(this,n),E(this,s,!1),E(this,o,[]),E(this,r),E(this,i),E(this,l),E(this,f,!1),E(this,a),E(this,c),E(this,u,!1),this.type=t,t&&N(this,n,!0),N(this,r,d),N(this,e,k(this,r)?k(k(this,r),e):this),N(this,a,k(this,e)===this?p:k(k(this,e),a)),N(this,l,k(this,e)===this?[]:k(k(this,e),l)),"!"!==t||k(k(this,e),f)||k(this,l).push(this),N(this,i,k(this,r)?k(k(this,r),o).length:0)}get hasMagic(){if(void 0!==k(this,n))return k(this,n);for(const t of k(this,o))if("string"!=typeof t&&(t.type||t.hasMagic))return N(this,n,!0);return k(this,n)}toString(){return void 0!==k(this,c)?k(this,c):N(this,c,this.type?this.type+"("+k(this,o).map((t=>t+"")).join("|")+")":k(this,o).map((t=>t+"")).join(""))}push(...e){for(const n of e)if(""!==n){if("string"!=typeof n&&!(n instanceof t&&k(n,r)===this))throw Error("invalid part: "+n);k(this,o).push(n)}}toJSON(){var t;const n=null===this.type?k(this,o).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...k(this,o).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&n.unshift([]),this.isEnd()&&(this===k(this,e)||k(k(this,e),f)&&"!"===(null==(t=k(this,r))?void 0:t.type))&&n.push({}),n}isStart(){var n;if(k(this,e)===this)return!0;if(!(null==(n=k(this,r))?void 0:n.isStart()))return!1;if(0===k(this,i))return!0;const s=k(this,r);for(let e=0;e<k(this,i);e++){const n=k(s,o)[e];if(!(n instanceof t&&"!"===n.type))return!1}return!0}isEnd(){var t,n,s;if(k(this,e)===this)return!0;if("!"===(null==(t=k(this,r))?void 0:t.type))return!0;if(!(null==(n=k(this,r))?void 0:n.isEnd()))return!1;if(!this.type)return null==(s=k(this,r))?void 0:s.isEnd();const l=k(this,r)?k(k(this,r),o).length:0;return k(this,i)===l-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(e){const n=new t(this.type,e);for(const t of k(this,o))n.copyIn(t);return n}static fromGlob(e,n={}){var s;const o=new t(null,void 0,n);return P(s=t,p,g).call(s,e,o,0,n),o}toMMPattern(){if(this!==k(this,e))return k(this,e).toMMPattern();const t=""+this,[s,o,r,i]=this.toRegExpSource();if(!(r||k(this,n)||k(this,a).nocase&&!k(this,a).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return o;const l=(k(this,a).nocase?"i":"")+(i?"u":"");return Object.assign(RegExp(`^${s}$`,l),{_src:s,_glob:t})}get options(){return k(this,a)}toRegExpSource(i){var l;const c=null!=i?i:!!k(this,a).dot;if(k(this,e)===this&&P(this,h,d).call(this),!this.type){const a=this.isStart()&&this.isEnd(),u=k(this,o).map((e=>{var o;const[r,l,f,c]="string"==typeof e?P(o=t,p,m).call(o,e,k(this,n),a):e.toRegExpSource(i);return N(this,n,k(this,n)||f),N(this,s,k(this,s)||c),r})).join("");let h="";if(this.isStart()&&"string"==typeof k(this,o)[0]&&(1!==k(this,o).length||!wt.has(k(this,o)[0]))){const t=$t,e=c&&t.has(u.charAt(0))||u.startsWith("\\.")&&t.has(u.charAt(2))||u.startsWith("\\.\\.")&&t.has(u.charAt(4)),n=!c&&!i&&t.has(u.charAt(0));h=e?"(?!(?:^|/)\\.\\.?(?:$|/))":n?vt:""}let d="";return this.isEnd()&&k(k(this,e),f)&&"!"===(null==(l=k(this,r))?void 0:l.type)&&(d="(?:$|\\/)"),[h+u+d,gt(u),N(this,n,!!k(this,n)),k(this,s)]}const g="*"===this.type||"+"===this.type,v="!"===this.type?"(?:(?!(?:":"(?:";let $=P(this,h,b).call(this,c);if(this.isStart()&&this.isEnd()&&!$&&"!"!==this.type){const t=""+this;return N(this,o,[t]),this.type=null,N(this,n,void 0),[t,gt(""+this),!1,!1]}let w=!g||i||c?"":P(this,h,b).call(this,!0);w===$&&(w=""),w&&($=`(?:${$})(?:${w})*?`);let y="";return y="!"===this.type&&k(this,u)?(this.isStart()&&!c?vt:"")+jt:v+$+("!"===this.type?"))"+(!this.isStart()||c||i?"":vt)+St+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&w?")":"*"===this.type&&w?")?":")"+this.type),[y,gt($),N(this,n,!!k(this,n)),k(this,s)]}};e=new WeakMap,n=new WeakMap,s=new WeakMap,o=new WeakMap,r=new WeakMap,i=new WeakMap,l=new WeakMap,f=new WeakMap,a=new WeakMap,c=new WeakMap,u=new WeakMap,h=new WeakSet,d=function(){if(this!==k(this,e))throw Error("should only call on root");if(k(this,f))return this;let t;for(N(this,f,!0);t=k(this,l).pop();){if("!"!==t.type)continue;let e=t,n=k(e,r);for(;n;){for(let s=k(e,i)+1;!n.type&&s<k(n,o).length;s++)for(const e of k(t,o)){if("string"==typeof e)throw Error("string part in extglob AST??");e.copyIn(k(n,o)[s])}e=n,n=k(e,r)}}return this},p=new WeakSet,g=function(t,e,s,r){var i,l;let f=!1,a=!1,c=-1,h=!1;if(null===e.type){let n=s,o="";for(;n<t.length;){const s=t.charAt(n++);if(f||"\\"===s)f=!f,o+=s;else if(a)n===c+1?"^"!==s&&"!"!==s||(h=!0):"]"!==s||n===c+2&&h||(a=!1),o+=s;else if("["!==s)if(r.noext||!mt(s)||"("!==t.charAt(n))o+=s;else{e.push(o),o="";const l=new Mt(s,e);n=P(i=Mt,p,g).call(i,t,l,n,r),e.push(l)}else a=!0,c=n,h=!1,o+=s}return e.push(o),n}let d=s+1,b=new Mt(null,e);const m=[];let v="";for(;d<t.length;){const n=t.charAt(d++);if(f||"\\"===n)f=!f,v+=n;else if(a)d===c+1?"^"!==n&&"!"!==n||(h=!0):"]"!==n||d===c+2&&h||(a=!1),v+=n;else if("["!==n)if(mt(n)&&"("===t.charAt(d)){b.push(v),v="";const e=new Mt(n,b);b.push(e),d=P(l=Mt,p,g).call(l,t,e,d,r)}else if("|"!==n){if(")"===n)return""===v&&0===k(e,o).length&&N(e,u,!0),b.push(v),v="",e.push(...m,b),d;v+=n}else b.push(v),v="",m.push(b),b=new Mt(null,e);else a=!0,c=d,h=!1,v+=n}return e.type=null,N(e,n,void 0),N(e,o,[t.substring(s-1)]),d},b=function(t){return k(this,o).map((e=>{if("string"==typeof e)throw Error("string type in extglob ast??");const[n,o,r,i]=e.toRegExpSource(t);return N(this,s,k(this,s)||i),n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},m=function(t,e,n=!1){let s=!1,o="",r=!1;for(let i=0;i<t.length;i++){const l=t.charAt(i);if(s)s=!1,o+=(yt.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[n,s,l,f]=pt(t,i);if(l){o+=n,r=r||s,i+=l-1,e=e||f;continue}}"*"!==l?"?"!==l?o+=xt(l):(o+=Ot,e=!0):(o+=n&&"*"===t?jt:St,e=!0)}else i===t.length-1?o+="\\\\":s=!0}return[o,gt(t),!!e,r]},E(Mt,p);var kt=Mt,Et=(t,e,n={})=>(at(e),!(!n.nocomment&&"#"===e.charAt(0))&&new te(e,n).match(t)),Nt=/^\*+([^+@!?\*\[\(]*)$/,Pt=t=>e=>!e.startsWith(".")&&e.endsWith(t),Rt=t=>e=>e.endsWith(t),Wt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),At=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Ct=/^\*+\.\*+$/,Lt=t=>!t.startsWith(".")&&t.includes("."),It=t=>"."!==t&&".."!==t&&t.includes("."),zt=/^\.\*+$/,_t=t=>"."!==t&&".."!==t&&t.startsWith("."),Ft=/^\*+$/,Tt=t=>0!==t.length&&!t.startsWith("."),Ut=t=>0!==t.length&&"."!==t&&".."!==t,Dt=/^\?+([^+@!?\*\[\(]*)?$/,Bt=([t,e=""])=>{const n=Zt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Vt=([t,e=""])=>{const n=qt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Gt=([t,e=""])=>{const n=qt([t]);return e?t=>n(t)&&t.endsWith(e):n},Ht=([t,e=""])=>{const n=Zt([t]);return e?t=>n(t)&&t.endsWith(e):n},Zt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},qt=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},Jt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";Et.sep="win32"===Jt?"\\":"/";var Yt=Symbol("globstar **");Et.GLOBSTAR=Yt,Et.filter=(t,e={})=>n=>Et(n,t,e);var Kt=(t,e={})=>Object.assign({},t,e);Et.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return Et;const e=Et;return Object.assign(((n,s,o={})=>e(n,s,Kt(t,o))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,Kt(t,n))}static defaults(n){return e.defaults(Kt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,s={}){super(e,n,Kt(t,s))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Kt(t,s))}},unescape:(n,s={})=>e.unescape(n,Kt(t,s)),escape:(n,s={})=>e.escape(n,Kt(t,s)),filter:(n,s={})=>e.filter(n,Kt(t,s)),defaults:n=>e.defaults(Kt(t,n)),makeRe:(n,s={})=>e.makeRe(n,Kt(t,s)),braceExpand:(n,s={})=>e.braceExpand(n,Kt(t,s)),match:(n,s,o={})=>e.match(n,s,Kt(t,o)),sep:e.sep,GLOBSTAR:Yt})};var Qt=(t,e={})=>(at(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,ft.default)(t));Et.braceExpand=Qt,Et.makeRe=(t,e={})=>new te(t,e).makeRe(),Et.match=(t,e,n={})=>{const s=new te(e,n);return t=t.filter((t=>s.match(t))),s.options.nonull&&!t.length&&t.push(e),t};var Xt=/[?*]|[+@!]\(.*?\)|\[|\]/,te=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){at(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||Jt,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&Xt.test(t[2])||Xt.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,s),this.set=s.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const s=t[n];1===n&&""===s&&""===t[0]||"."!==s&&""!==s||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const s=t[n-1];s&&"."!==s&&".."!==s&&"**"!==s&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let s=-1;for(;-1!==(s=n.indexOf("**",s+1));){let o=s;for(;"**"===n[o+1];)o++;o>s&&n.splice(s+1,o-s);const r=n[s+2],i=n[s+3];if(".."!==n[s+1])continue;if(!r||"."===r||".."===r||!i||"."===i||".."===i)continue;e=!0,n.splice(s,1);const l=n.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const s=n[t];1===t&&""===s&&""===n[0]||"."!==s&&""!==s||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let o=0;for(;-1!==(o=n.indexOf("..",o+1));){const t=n[o-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,n.splice(o-1,2,...1===o&&"**"===n[o+1]?["."]:[]),0===n.length&&n.push(""),o-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const s=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);s&&(t[e]=s,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let s=0,o=0,r=[],i="";for(;s<t.length&&o<e.length;)if(t[s]===e[o])r.push("b"===i?e[o]:t[s]),s++,o++;else if(n&&"**"===t[s]&&e[o]===t[s+1])r.push(t[s]),s++;else if(n&&"**"===e[o]&&t[s]===e[o+1])r.push(e[o]),o++;else if("*"!==t[s]||!e[o]||!this.options.dot&&e[o].startsWith(".")||"**"===e[o]){if("*"!==e[o]||!t[s]||!this.options.dot&&t[s].startsWith(".")||"**"===t[s])return!1;if("a"===i)return!1;i="b",r.push(e[o]),s++,o++}else{if("b"===i)return!1;i="a",r.push(t[s]),s++,o++}return t.length===e.length&&r}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let s=0;s<t.length&&"!"===t.charAt(s);s++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const s=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),o="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),r=s?3:n?0:void 0,i=!o&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:o?0:void 0;if("number"==typeof r&&"number"==typeof i){const[n,s]=[t[r],e[i]];n.toLowerCase()===s.toLowerCase()&&(e[i]=n,i>r?e=e.slice(i):r>i&&(t=t.slice(r)))}}const{optimizationLevel:o=1}=this.options;o>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var r=0,i=0,l=t.length,f=e.length;r<l&&i<f;r++,i++){this.debug("matchOne loop");var a=e[i],c=t[r];if(this.debug(e,a,c),!1===a)return!1;if(a===Yt){this.debug("GLOBSTAR",[e,a,c]);var u=r,h=i+1;if(h===f){for(this.debug("** at the end");r<l;r++)if("."===t[r]||".."===t[r]||!s.dot&&"."===t[r].charAt(0))return!1;return!0}for(;u<l;){var d=t[u];if(this.debug("\nglobstar while",t,u,e,h,d),this.matchOne(t.slice(u),e.slice(h),n))return this.debug("globstar found match!",u,l,d),!0;if("."===d||".."===d||!s.dot&&"."===d.charAt(0)){this.debug("dot detected!",t,u,e,h);break}this.debug("globstar swallow a segment, and continue"),u++}return!(!n||(this.debug("\n>>> no match, partial?",t,u,e,h),u!==l))}let o;if("string"==typeof a?(o=c===a,this.debug("string match",a,c,o)):(o=a.test(c),this.debug("pattern match",a,c,o)),!o)return!1}if(r===l&&i===f)return!0;if(r===l)return n;if(i===f)return r===l-1&&""===t[r];throw Error("wtf?")}braceExpand(){return Qt(this.pattern,this.options)}parse(t){at(t);const e=this.options;if("**"===t)return Yt;if(""===t)return"";let n,s=null;(n=t.match(Ft))?s=e.dot?Ut:Tt:(n=t.match(Nt))?s=(e.nocase?e.dot?At:Wt:e.dot?Rt:Pt)(n[1]):(n=t.match(Dt))?s=(e.nocase?e.dot?Vt:Bt:e.dot?Gt:Ht)(n):(n=t.match(Ct))?s=e.dot?It:Lt:(n=t.match(zt))&&(s=_t);const o=kt.fromGlob(t,this.options).toMMPattern();return s&&"object"==typeof o&&Reflect.defineProperty(o,"test",{value:s}),o}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]);let o=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))s.add(e);return"string"==typeof t?(t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))(t):t===Yt?Yt:t._src}));return e.forEach(((t,s)=>{const o=e[s+1],r=e[s-1];t===Yt&&r!==Yt&&(void 0===r?void 0!==o&&o!==Yt?e[s+1]="(?:\\/|"+n+"\\/)?"+o:e[s]=n:void 0===o?e[s-1]=r+"(?:\\/|"+n+")?":o!==Yt&&(e[s-1]=r+"(?:\\/|\\/"+n+"\\/)"+o,e[s+1]=Yt))})),e.filter((t=>t!==Yt)).join("/")})).join("|");const[r,i]=t.length>1?["(?:",")"]:["",""];o="^"+r+o+i+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=RegExp(o,[...s].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const o=this.set;this.debug(this.pattern,"set",o);let r=s[s.length-1];if(!r)for(let t=s.length-2;!r&&t>=0;t--)r=s[t];for(let t=0;t<o.length;t++){const i=o[t];let l=s;if(n.matchBase&&1===i.length&&(l=[r]),this.matchOne(l,i,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return Et.defaults(t).Minimatch}};Et.AST=kt,Et.Minimatch=te,Et.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),Et.unescape=gt;var ee=class t{static fromLocalValue(e){const n=e[L],s=I in e?e[I]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((e=>t.fromLocalValue(e)));case"date":return new Date(s);case"map":const e=new Map;for(const[n,o]of s){const s="object"==typeof n&&null!==n?t.fromLocalValue(n):n,r=t.fromLocalValue(o);e.set(s,r)}return e;case"object":const o={};for(const[e,n]of s)o[e]=t.fromLocalValue(n);return o;case"regexp":const{pattern:r,flags:i}=s;return RegExp(r,i);case"set":const l=new Set;for(const e of s)l.add(t.fromLocalValue(e));return l;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+n)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(L))return!1;const e=t[L];return!!Object.values({...A,...C}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(I))}};((t,e)=>{for(var n in e)$(t,n,{get:e[n],enumerable:!0})})({},{err:()=>se,map:()=>oe,ok:()=>ne,unwrap:()=>ie,unwrapErr:()=>le});var ne=t=>({isOk:!0,isErr:!1,value:t}),se=t=>({isOk:!1,isErr:!0,value:t});function oe(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>ne(t))):ne(n)}if(t.isErr)return se(t.value);throw"should never get here"}var re,ie=t=>{if(t.isOk)return t.value;throw t.value},le=t=>{if(t.isErr)return t.value;throw t.value};function fe(){var e;const n=this.attachShadow({mode:"open"});if(void 0===re&&(re=null!=(e=function(t){if(!J)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(t))?e:null),re)Y?n.adoptedStyleSheets.push(re):n.adoptedStyleSheets=[...n.adoptedStyleSheets,re];else if(!J){const e=document.createElement("style");e.innerHTML=t,n.prepend(e)}}var ae=(t,e,n,s)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const o=document.createTextNode("");if(o["s-nr"]=t,!e["s-cr"]||!e["s-cr"].parentNode)return;const r=e["s-cr"].parentNode,i=ce(r,"appendChild");if(void 0!==s){o["s-oo"]=s;const t=ce(r,"childNodes"),e=[o];t.forEach((t=>{t["s-nr"]&&e.push(t)})),e.sort(((t,e)=>!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0)?-1:!e["s-oo"]||e["s-oo"]<t["s-oo"]?1:0)),e.forEach((t=>i.call(r,t)))}else i.call(r,o);t["s-ol"]=o,t["s-sh"]=e["s-hn"]};function ce(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var ue=new WeakMap,he=(t,e,n)=>{let s=D.get(t);J&&n?(s=s||new CSSStyleSheet,"string"==typeof s?s=e:s.replaceSync(e)):s=e,D.set(t,s)},de=(t,e)=>{var n,s,o;const r=pe(e),i=D.get(r);if(!H.document)return r;if(t=11===t.nodeType?t:H.document,i)if("string"==typeof i){let o,l=ue.get(t=t.head||t);l||ue.set(t,l=new Set);const f=t.querySelector(`[${V}="${r}"]`);if(f)f.innerHTML=i;else if(!l.has(r)){o=H.document.createElement("style"),o.innerHTML=i;const f=null!=(n=q.h)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=H.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=f&&o.setAttribute("nonce",f),!(1&e.l))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(J){const e=new(null!=(s=t.defaultView)?s:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(i),Y?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=i+e.innerHTML:t.prepend(o)}else t.append(o);1&e.l&&t.insertBefore(o,null),4&e.l&&(o.innerHTML+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),l&&l.add(r)}}else{let e=ue.get(t);if(e||ue.set(t,e=new Set),!e.has(r)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let s;if(i.constructor===n.CSSStyleSheet)s=i;else{s=new n.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)s.insertRule(i.cssRules[t].cssText,t)}Y?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],e.add(r)}}return r},pe=t=>"sc-"+t.p,ge=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),be=(t,e,...n)=>{let s=null,o=null,r=!1,i=!1;const l=[],f=e=>{for(let n=0;n<e.length;n++)s=e[n],Array.isArray(s)?f(s):null!=s&&"boolean"!=typeof s&&((r="function"!=typeof t&&!lt(s))&&(s+=""),r&&i?l[l.length-1].m+=s:l.push(r?me(null,s):s),i=r)};if(f(n),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const a=me(t,null);return a.v=e,l.length>0&&(a.$=l),a.O=o,a},me=(t,e)=>({l:0,S:t,m:e,j:null,$:null,v:null,O:null}),ve={},$e=(t,e,n,s,o,r,i,l=[])=>{let f,a,c,u;if(1===r.nodeType){if(f=r.getAttribute(G),f&&(a=f.split("."),a[0]===i||"0"===a[0])){c=ye({l:0,M:a[0],k:a[1],N:a[2],P:a[3],S:r.tagName.toLowerCase(),j:r,v:{class:r.className||""}}),e.push(c),r.removeAttribute(G),t.$||(t.$=[]);const o=c.j.getAttribute("s-sn");"string"==typeof o&&("slot-fb"===c.S&&xe(o,a[2],c,r,t,e,n,s,l),c.j["s-sn"]=o,c.j.removeAttribute("s-sn")),void 0!==c.P&&(t.$[c.P]=c),t=c,s&&"0"===c.N&&(s[c.P]=c.j)}if(r.shadowRoot)for(u=r.shadowRoot.childNodes.length-1;u>=0;u--)$e(t,e,n,s,o,r.shadowRoot.childNodes[u],i,l);const h=r.__childNodes||r.childNodes;for(u=h.length-1;u>=0;u--)$e(t,e,n,s,o,h[u],i,l)}else if(8===r.nodeType)a=r.nodeValue.split("."),(a[1]===i||"0"===a[1])&&(f=a[0],c=ye({M:a[1],k:a[2],N:a[3],P:a[4]||"0",j:r,v:null,$:null,O:null,R:null,S:null,m:null}),"t"===f?(c.j=Se(r,3),c.j&&3===c.j.nodeType&&(c.m=c.j.textContent,e.push(c),r.remove(),i===c.M&&(t.$||(t.$=[]),t.$[c.P]=c),s&&"0"===c.N&&(s[c.P]=c.j))):"c"===f?(c.j=Se(r,8),c.j&&8===c.j.nodeType&&(e.push(c),r.remove())):c.M===i&&("s"===f?xe(r["s-sn"]=a[5]||"",a[2],c,r,t,e,n,s,l):"r"===f&&s&&r.remove()));else if(t&&"style"===t.S){const e=me(null,r.textContent);e.j=r,e.P="0",t.$=[e]}return t},we=(t,e)=>{if(1===t.nodeType){const n=t[B]||t.getAttribute(B);n&&e.set(n,t);let s=0;if(t.shadowRoot)for(;s<t.shadowRoot.childNodes.length;s++)we(t.shadowRoot.childNodes[s],e);const o=t.__childNodes||t.childNodes;for(s=0;s<o.length;s++)we(o[s],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},ye=t=>({l:0,M:null,k:null,N:null,P:"0",j:null,v:null,$:null,O:null,R:null,S:null,m:null,...t});function xe(t,e,n,s,o,r,i,l,f){s["s-sr"]=!0,n.R=t||null,n.S="slot";const a=(null==o?void 0:o.j)?o.j["s-id"]||o.j.getAttribute("s-id"):"";if(l&&H.document){const r=n.j=H.document.createElement(n.S);n.R&&n.j.setAttribute("name",t),o.j.shadowRoot&&a&&a!==n.M?ce(o.j,"insertBefore")(r,ce(o.j,"children")[0]):ce(ce(s,"parentNode"),"insertBefore")(r,s),Oe(f,e,t,s,n.M),s.remove(),"0"===n.N&&(l[n.P]=n.j)}else{const r=n.j,i=a&&a!==n.M&&o.j.shadowRoot;Oe(f,e,t,s,i?a:n.M),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],s=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const o=this["s-cr"].parentElement;return(o.__childNodes?o.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const s=t[n]["s-nr"]||void 0;s&&s.isConnected&&e.push(s)}return e})(o.childNodes)).forEach((t=>{s===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(s),i&&o.j.insertBefore(r,o.j.children[0])}r.push(n),i.push(n),o.$||(o.$=[]),o.$[n.P]=n}var Oe=(t,e,n,s,o)=>{var r,i;let l=s.nextSibling;if(t[e]=t[e]||[],l&&!(null==(r=l.nodeValue)?void 0:r.startsWith("s.")))do{!l||(l.getAttribute&&l.getAttribute("slot")||l["s-sn"])!==n&&(""!==n||l["s-sn"]||l.getAttribute&&l.getAttribute("slot")||8!==l.nodeType&&3!==l.nodeType)||(l["s-sn"]=n,t[e].push({slot:s,node:l,hostId:o})),l=null==l?void 0:l.nextSibling}while(l&&!(null==(i=l.nodeValue)?void 0:i.startsWith("s.")))},Se=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},je=t=>{const e=(t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};je("::slotted"),je(":host"),je(":host-context");var Me,ke=(t,e)=>"string"==typeof t&&t.startsWith(z)?t=function(t){return"string"==typeof t&&t.startsWith(z)?ee.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||lt(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,Ee=(t,e)=>{const n=t;return{emit:t=>Ne(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Ne=(t,e,n)=>{const s=q.ce(e,n);return t.dispatchEvent(s),s},Pe=(t,e,n,s,o,r,i)=>{if(n===s)return;let l=T(t,e),f=e.toLowerCase();if("class"===e){const e=t.classList,o=We(n);let r=We(s);if((t["s-si"]||t["s-sc"])&&i){const n=t["s-sc"]||t["s-si"];r.push(n),o.forEach((t=>{t.startsWith(n)&&r.push(t)})),r=[...new Set(r)].filter((t=>t)),e.add(...r)}else e.remove(...o.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!o.includes(t))))}else if("style"===e){for(const e in n)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)n&&s[e]===n[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}else if("key"===e);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){const i=lt(s);if((l||i&&null!==s)&&!o)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const o=null==s?"":s;"list"===e?l=!1:null!=n&&t[e]==o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!l||4&r||o)&&!i&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}else if(e="-"===e[2]?e.slice(3):T(H,f)?f.slice(2):f[2]+e.slice(3),n||s){const o=e.endsWith(Ae);e=e.replace(Ce,""),n&&q.rel(t,e,n,o),s&&q.ael(t,e,s,o)}},Re=/\s/,We=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(Re):[]),Ae="Capture",Ce=RegExp(Ae+"$"),Le=(t,e,n,s)=>{const o=11===e.j.nodeType&&e.j.host?e.j.host:e.j,r=t&&t.v||{},i=e.v||{};for(const t of Ie(Object.keys(r)))t in i||Pe(o,t,r[t],void 0,n,e.l,s);for(const t of Ie(Object.keys(i)))Pe(o,t,r[t],i[t],n,e.l,s)};function Ie(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var ze=!1,_e=(t,e,n)=>{const s=e.$[n];let o,r,i=0;if(null!==s.m)o=s.j=H.document.createTextNode(s.m);else{if(ze||(ze="svg"===s.S),!H.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=s.j=H.document.createElementNS(ze?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.S),ze&&"foreignObject"===s.S&&(ze=!1),Le(null,s,ze),s.$){const e="template"===s.S?o.content:o;for(i=0;i<s.$.length;++i)r=_e(t,s,i),r&&e.appendChild(r)}"svg"===s.S?ze=!1:"foreignObject"===o.tagName&&(ze=!0)}return o["s-hn"]=Me,o},Fe=(t,e,n,s,o,r)=>{let i,l=t;for(l.shadowRoot&&l.tagName===Me&&(l=l.shadowRoot),"template"===n.S&&(l=l.content);o<=r;++o)s[o]&&(i=_e(null,n,o),i&&(s[o].j=i,Be(l,i,e)))},Te=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.j;t&&t.remove()}}},Ue=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.O&&e.O&&(t.O=e.O),!0):t.O===e.O),De=(t,e,n=!1)=>{const s=e.j=t.j,o=t.$,r=e.$,i=e.S,l=e.m;null===l?(Le(t,e,ze="svg"===i||"foreignObject"!==i&&ze,n),null!==o&&null!==r?((t,e,n,s,o=!1)=>{let r,i,l=0,f=0,a=0,c=0,u=e.length-1,h=e[0],d=e[u],p=s.length-1,g=s[0],b=s[p];const m="template"===n.S?t.content:t;for(;l<=u&&f<=p;)if(null==h)h=e[++l];else if(null==d)d=e[--u];else if(null==g)g=s[++f];else if(null==b)b=s[--p];else if(Ue(h,g,o))De(h,g,o),h=e[++l],g=s[++f];else if(Ue(d,b,o))De(d,b,o),d=e[--u],b=s[--p];else if(Ue(h,b,o))De(h,b,o),Be(m,h.j,d.j.nextSibling),h=e[++l],b=s[--p];else if(Ue(d,g,o))De(d,g,o),Be(m,d.j,h.j),d=e[--u],g=s[++f];else{for(a=-1,c=l;c<=u;++c)if(e[c]&&null!==e[c].O&&e[c].O===g.O){a=c;break}a>=0?(i=e[a],i.S!==g.S?r=_e(e&&e[f],n,a):(De(i,g,o),e[a]=void 0,r=i.j),g=s[++f]):(r=_e(e&&e[f],n,f),g=s[++f]),r&&Be(h.j.parentNode,r,h.j)}l>u?Fe(t,null==s[p+1]?null:s[p+1].j,n,s,f,p):f>p&&Te(e,l,u)})(s,o,e,r,n):null!==r?(null!==t.m&&(s.textContent=""),Fe(s,null,e,r,0,r.length-1)):n||null===o?n&&null!==o&&null===r&&(e.$=o):Te(o,0,o.length-1),ze&&"svg"===i&&(ze=!1)):t.m!==l&&(s.data=l)},Be=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Ve=(t,e,n=!1)=>{const s=t.$hostElement$,o=t.W||me(null,null),r=(t=>t&&t.S===ve)(e)?e:be(null,null,e);if(Me=s.tagName,n&&r.v)for(const t of Object.keys(r.v))s.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.v[t]=s[t]);r.S=null,r.l|=4,t.W=r,r.j=o.j=s.shadowRoot||s,De(o,r,n)},Ge=(t,e)=>{if(e&&!t.A&&e["s-p"]){const n=e["s-p"].push(new Promise((s=>t.A=()=>{e["s-p"].splice(n-1,1),s()})))}},He=(t,e)=>{if(t.l|=16,4&t.l)return void(t.l|=512);Ge(t,t.C);const n=()=>Ze(t,e);if(!e)return ot(n);queueMicrotask((()=>{n()}))},Ze=(t,e)=>{const n=t.$hostElement$,s=n;if(!s)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=tn(s,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=qe(o,(()=>tn(s,"componentWillRender",void 0,n))),qe(o,(()=>Ye(t,s,e)))},qe=(t,e)=>Je(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Je=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ye=async(t,e,n)=>{var s;const o=t.$hostElement$,r=o["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,s=e.l,o=de(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&s&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);Ke(t,e,o,n),r&&(r.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(s=o["s-p"])?s:[],n=()=>Qe(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},Ke=(t,e,n,s)=>{try{e=e.render(),t.l&=-17,t.l|=2,Ve(t,e,s)}catch(e){U(e,t.$hostElement$)}return null},Qe=t=>{const e=t.$hostElement$,n=e,s=t.C;tn(n,"componentDidRender",void 0,e),64&t.l?tn(n,"componentDidUpdate",void 0,e):(t.l|=64,en(e),tn(n,"componentDidLoad",void 0,e),t.L(e),s||Xe()),t.A&&(t.A(),t.A=void 0),512&t.l&&st((()=>He(t,!1))),t.l&=-517},Xe=()=>{var t;st((()=>Ne(H,"appload",{detail:{namespace:"feedlog-toolkit"}}))),(null==(t=q.I)?void 0:t.size)&&q.I.clear()},tn=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){U(t,s)}},en=t=>t.classList.add("hydrated"),nn=(t,e,n,s)=>{const o=F(t);if(!o)return;const r=t,i=o.i.get(e),l=o.l,f=r;if(!((n=ke(n,s.t[e][0]))===i||Number.isNaN(i)&&Number.isNaN(n))){if(o.i.set(e,n),s._){const t=s._[e];t&&t.map((t=>{try{const[[s,r]]=Object.entries(t);(128&l||1&r)&&(f?f[s](n,i,e):o.F.push((()=>{o.T[s](n,i,e)})))}catch(t){U(t,r)}}))}if(2==(18&l)){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,i,e))return;He(o,!1)}}},sn=(t,e)=>{var n,s;const o=t.prototype;{t.watchers&&!e._&&(e._=t.watchers),t.deserializers&&!e.U&&(e.U=t.deserializers),t.serializers&&!e.D&&(e.D=t.serializers);const r=Object.entries(null!=(n=e.t)?n:{});r.map((([t,[n]])=>{if(31&n||32&n){const{get:s,set:r}=Object.getOwnPropertyDescriptor(o,t)||{};s&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),Object.defineProperty(o,t,{get(){return s?s.apply(this):((t,e)=>F(this).i.get(e))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(o,t,{set(s){const o=F(this);if(o){if(r)return void 0===(32&n?this[t]:o.$hostElement$[t])&&o.i.get(t)&&(s=o.i.get(t)),r.call(this,ke(s,n)),void nn(this,t,s=32&n?this[t]:o.$hostElement$[t],e);nn(this,t,s,e)}}})}}));{const n=new Map;o.attributeChangedCallback=function(t,s,i){q.jmp((()=>{var l;const f=n.get(t),a=F(this);if(this.hasOwnProperty(f),o.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==i)return;if(null==f){const n=null==a?void 0:a.l;if(a&&n&&!(8&n)&&i!==s){const o=this,r=null==(l=e._)?void 0:l[t];null==r||r.forEach((e=>{const[[r,l]]=Object.entries(e);null!=o[r]&&(128&n||1&l)&&o[r].call(o,i,s,t)}))}return}const c=r.find((([t])=>t===f));c&&4&c[1][0]&&(i=null!==i&&"false"!==i);const u=Object.getOwnPropertyDescriptor(o,f);i==this[f]||u.get&&!u.set||(this[f]=i)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e._)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const s=e[1]||t;return n.set(s,t),s}))]))}}return t},on=(t,e)=>{const n={l:e[0],p:e[1]};n.t=e[2],n._=t._,n.U=t.U,n.D=t.D,(()=>{if(!H.document)return;const t=H.document.querySelectorAll(`[${V}]`);let e=0;for(;e<t.length;e++)he(t[e].getAttribute(V),ge(t[e].innerHTML),!0)})();const s=t.prototype.connectedCallback,o=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const n={l:0,$hostElement$:t,o:e,i:new Map,B:new Map};n.V=new Promise((t=>n.L=t)),t["s-p"]=[],t["s-rc"]=[];const s=n;t.__stencil__getHostRef=()=>s,512&e.l&&_(t,n)})(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!F(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&q.l)){const e=F(t);if(!e)return;const n=e.o,s=()=>{};if(1&e.l)(null==e?void 0:e.T)||(null==e?void 0:e.V)&&e.V.then((()=>{}));else{let s;if(e.l|=1,s=t.getAttribute(B),s){if(1&n.l){const e=de(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}((t,e,n,s)=>{var o,r,i,l;const f=t.shadowRoot,a=[],c=[],u=f?[]:null,h=me(e,null);h.j=t,!H.document||q.I&&q.I.size||we(H.document.body,q.I=new Map),t[B]=n,t.removeAttribute(B),s.W=$e(h,a,[],u,t,t,n,c);let d=0;const p=a.length;let g;for(;d<p;d++){g=a[d];const n=g.M+"."+g.k,s=q.I.get(n),r=g.j;if(f){if((null==(o=g.S)?void 0:(""+o).includes("-"))&&"slot-fb"!==g.S&&!g.j.shadowRoot){const e=F(g.j);if(e){const n=pe(e.o),s=H.document.querySelector(`style[sty-id="${n}"]`);s&&t.shadowRoot.append(s.cloneNode(!0))}}}else r["s-hn"]=e.toUpperCase(),"slot"===g.S&&(r["s-cr"]=t["s-cr"]);"slot"===g.S&&(g.R=g.j["s-sn"]||g.j.name||null,g.$?(g.l|=2,g.j.childNodes.length||g.$.forEach((t=>{g.j.appendChild(t.j)}))):g.l|=1),s&&s.isConnected&&(s.parentElement.shadowRoot&&""===s["s-en"]&&s.parentNode.insertBefore(r,s.nextSibling),s.parentNode.removeChild(s),f||(r["s-oo"]=parseInt(g.k))),s&&!s["s-id"]&&q.I.delete(n)}const b=[],m=c.length;let v,$,w,y,x=0,O=0;for(;x<m;x++)if(v=c[x],v&&v.length)for(w=v.length,$=0;$<w;$++){if(y=v[$],b[y.hostId]||(b[y.hostId]=q.I.get(y.hostId)),!b[y.hostId])continue;const t=b[y.hostId];t.shadowRoot&&y.node.parentElement!==t&&t.insertBefore(y.node,null==(i=null==(r=v[$-1])?void 0:r.node)?void 0:i.nextSibling),t.shadowRoot&&f||(y.slot["s-cr"]||(y.slot["s-cr"]=t["s-cr"],y.slot["s-cr"]=!y.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),ae(y.node,y.slot,0,y.node["s-oo"]||O),(null==(l=y.node.parentElement)?void 0:l.shadowRoot)&&y.node.getAttribute&&y.node.getAttribute("slot")&&y.node.removeAttribute("slot")),O=(y.node["s-oo"]||O)+1}if(f){let e=0;const n=u.length;if(n){for(;e<n;e++){const t=u[e];t&&f.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}s.$hostElement$=t})(t,n.p,s,e)}{let n=t;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Ge(e,e.C=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let s;if(!(32&e.l)&&(e.l|=32,s=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128)),s&&s.style)){let t;"string"==typeof s.style&&(t=s.style);const e=pe(n);if(!D.has(e)){const s=()=>{};he(e,t,!!(1&n.l)),s()}}const o=e.C,r=()=>He(e,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(t,e,n)}s()}})(this),s&&s.call(this)},disconnectedCallback(){(async t=>{ue.has(t)&&ue.delete(t),t.shadowRoot&&ue.has(t.shadowRoot)&&ue.delete(t.shadowRoot)})(this),o&&o.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${n.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else fe.call(this,n)}}),t.is=n.p,sn(t,n)},rn=t=>q.h=t,ln=t=>Object.assign(q,t);function fn(t,e){Ve({$hostElement$:e},t)}function an(t){return t}export{Z as H,ve as a,Ee as c,rt as getAssetPath,be as h,on as p,fn as render,it as setAssetPath,rn as setNonce,ln as setPlatformOptions,an as t}
@@ -0,0 +1 @@
1
+ import{t,p as e,H as i,c as s,h as o,a}from"./index.js";import{d as r}from"./p-DFD585IK.js";import{d as n}from"./p-CvIMO_S7.js";const l=e(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.feedlogUpvote=s(this,"feedlogUpvote"),this.issues=[],this.theme="light",this.currentPage=1,this.handleUpvote=t=>{t.stopPropagation(),this.feedlogUpvote.emit(t.detail)}}resetPage(){this.currentPage=1}renderEmptyStateIllustration(){return o("svg",{class:"empty-state-illustration",xmlns:"http://www.w3.org/2000/svg",width:"120",height:"96",viewBox:"0 0 120 96",fill:"none","aria-hidden":"true"},o("path",{d:"M20 36h80v44c0 4.4-3.6 8-8 8H28c-4.4 0-8-3.6-8-8V36z",fill:"var(--feedlog-empty-illustration-bg)",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linejoin":"round"}),o("path",{d:"M20 36l20-24h40l20 24",fill:"none",stroke:"var(--feedlog-empty-illustration-stroke)","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M44 52h32M44 60h24M44 68h28",stroke:"var(--feedlog-empty-illustration-muted)","stroke-width":"1.25","stroke-linecap":"round"}))}getVisibleIssues(){if(0===this.issues.length)return[];if(null==this.limit||this.issues.length<=this.limit)return this.issues;const t=(this.currentPage-1)*this.limit;return this.issues.slice(t,t+this.limit)}getPageNumbers(){if(null==this.limit)return[];const t=Math.ceil(this.issues.length/this.limit);if(t<=1)return[];const e=new Set([1,t]),i=Math.max(1,this.currentPage-1),s=Math.min(t,this.currentPage+1);for(let t=i;t<=s;t++)e.add(t);const o=Array.from(e).sort(((t,e)=>t-e)),a=[];for(let t=0;t<o.length;t++)t>0&&o[t]-o[t-1]>1&&a.push("ellipsis"),a.push(o[t]);return a}goToPage(t){const e=null!=this.limit?Math.ceil(this.issues.length/this.limit):1;this.currentPage=Math.max(1,Math.min(t,e))}renderPagination(){if(null==this.limit||this.issues.length<=this.limit)return null;const t=Math.ceil(this.issues.length/this.limit),e=this.getPageNumbers();return o("nav",{class:"pagination","aria-label":"Issues pagination",part:"pagination"},o("button",{type:"button",class:"pagination-btn pagination-arrow","aria-label":"Previous page",disabled:this.currentPage<=1,onClick:()=>this.goToPage(this.currentPage-1),part:"pagination-btn pagination-arrow"},"‹"),e.map(((t,e)=>"ellipsis"===t?o("span",{key:`ellipsis-${e}`,class:"pagination-ellipsis","aria-hidden":"true",part:"pagination-ellipsis"},"…"):o("button",{key:`page-${t}`,type:"button",class:"pagination-btn","aria-current":t===this.currentPage?"page":void 0,onClick:()=>this.goToPage(t),part:"pagination-btn "+(t===this.currentPage?"pagination-btn-active":"")},t))),o("button",{type:"button",class:"pagination-btn pagination-arrow","aria-label":"Next page",disabled:this.currentPage>=t,onClick:()=>this.goToPage(this.currentPage+1),part:"pagination-btn pagination-arrow"},"›"))}render(){const t=this.getVisibleIssues();return o(a,{key:"cfbc683e096ad29327539323e1db97aba4bba373",class:"dark"===this.theme?"dark":""},o("div",{key:"fb342265514ab879e37136955cb0dc444f381646",class:"issues-list",part:"base"},0===t.length?o("div",{class:"empty-state",part:"empty-state"},this.emptyStateTitle&&this.emptyStateMessage?o("div",{class:"empty-state-content",part:"empty-state-content"},this.renderEmptyStateIllustration(),o("h2",{class:"empty-state-title",part:"empty-state-title"},this.emptyStateTitle),o("p",{class:"empty-state-message",part:"empty-state-message"},this.emptyStateMessage)):o("slot",{name:"empty-state"},o("p",null,"No issues found"))):t.map((t=>{var e,i;return o("feedlog-issue",{key:t.id,issue:t,issueUrl:null!==(i=null===(e=this.getIssueUrl)||void 0===e?void 0:e.call(this,t))&&void 0!==i?i:void 0,theme:this.theme,onFeedlogUpvote:t=>this.handleUpvote(t),part:"issue"})}))),this.renderPagination())}static get watchers(){return{issues:[{resetPage:0}],limit:[{resetPage:0}]}}static get style(){return":host{display:block;--feedlog-muted-foreground:#64748b;--feedlog-foreground:oklch(0.145 0 0);--feedlog-empty-illustration-bg:oklch(0.96 0.01 260);--feedlog-empty-illustration-stroke:oklch(0.75 0.02 260);--feedlog-empty-illustration-muted:oklch(0.82 0.01 260)}:host(.dark){--feedlog-muted-foreground:oklch(0.72 0.02 260);--feedlog-foreground:oklch(0.985 0 0);--feedlog-empty-illustration-bg:oklch(0.28 0.02 260);--feedlog-empty-illustration-stroke:oklch(0.45 0.02 260);--feedlog-empty-illustration-muted:oklch(0.38 0.01 260)}.issues-list{display:flex;flex-direction:column;gap:0.5rem}.empty-state{text-align:center;padding:3rem 1.5rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}.empty-state-content{display:flex;flex-direction:column;align-items:center;text-align:center;max-width:20rem;margin-inline:auto}.empty-state-illustration{margin-bottom:1.5rem;opacity:0.9}.empty-state-title{margin:0 0 0.5rem 0;font-size:1.125rem;font-weight:600;color:var(--feedlog-foreground);line-height:1.4}.empty-state-message{margin:0;font-size:0.875rem;color:var(--feedlog-muted-foreground);line-height:1.5}.pagination{display:flex;align-items:center;justify-content:center;gap:0.25rem;margin-top:1.5rem;flex-wrap:wrap}.pagination-btn{min-width:2rem;height:2rem;padding:0 0.5rem;color:var(--feedlog-foreground);background:transparent;border:1px solid var(--feedlog-border, oklch(0.9 0 0));border-radius:var(--feedlog-radius, 0.375rem);font-size:0.875rem;font-weight:500;cursor:pointer;transition:background-color 0.15s, border-color 0.15s}.pagination-btn:hover:not(:disabled){background:var(--feedlog-muted, oklch(0.96 0 0))}.pagination-btn[aria-current='page']{background:var(--feedlog-accent-color, oklch(0.55 0.2 250));color:white;border-color:var(--feedlog-accent-color, oklch(0.55 0.2 250))}.pagination-btn:disabled{opacity:0.5;cursor:not-allowed}.pagination-arrow{font-size:1.25rem;line-height:1}.pagination-ellipsis{padding:0 0.25rem;color:var(--feedlog-muted-foreground);font-size:0.875rem}:host(.dark) .pagination-btn{border-color:oklch(0.4 0.02 260)}:host(.dark) .pagination-btn:hover:not(:disabled){background:oklch(0.35 0.02 260)}"}},[257,"feedlog-issues-list",{issues:[16],limit:[2],theme:[1],getIssueUrl:[16],emptyStateTitle:[1,"empty-state-title"],emptyStateMessage:[1,"empty-state-message"],currentPage:[32]},void 0,{issues:[{resetPage:0}],limit:[{resetPage:0}]}]);function d(){"undefined"!=typeof customElements&&["feedlog-issues-list","feedlog-badge","feedlog-issue"].forEach((e=>{switch(e){case"feedlog-issues-list":customElements.get(t(e))||customElements.define(t(e),l);break;case"feedlog-badge":customElements.get(t(e))||r();break;case"feedlog-issue":customElements.get(t(e))||n()}}))}d();export{l as F,d}