PageSourceSearch

https://yiki.one/ghost/assets/content-formatters-h9i5ivwI.js

js yiki.one collected 2026-10-04 08:11:03 UTC 32,498 bytes, 3 lines download raw bytes

1import{s as e,t}from"./react-BXwhMTuc.js";import{t as n}from"./jsx-runtime-BlNNh7jY.js";import{n as r}from"./dist-DziNzWI2.js";import{v as i}from"./ds-utils-Dn2QAdNL.js";import{d as a,ft as o,ir as s,t as c}from"./button-DNxLpTR1.js";import{t as l}from"./skeleton-VfSZYrIB.js";import{t as u}from"./use-navigate-with-base-path-C2ixI7D0.js";import{R as d,y as ee}from"./use-activity-pub-queries-NLmroslg.js";var f=e(t(),1);function te(e){if(e.handle)return e.handle;if(!e.preferredUsername||!e.id)return`@unknown@unknown`;try{return`@${e.preferredUsername}@${new URL(e.id).hostname.replace(/^www\./,``)}`}catch{return`@unknown@unknown`}}var p=n(),m=null,ne=({onFollow:e,onUnfollow:t,authorHandle:n,followedByMe:r})=>{let[,i]=f.useReducer(e=>e+1,0),a=m===n&&!r;return(0,p.jsx)(c,{className:`absolute -right-1.5 bottom-px z-10 flex size-4 items-center justify-center rounded-full p-0 outline-2 outline-white transition-transform hover:scale-105 active:scale-100 dark:outline-black`,title:a?`Unfollow`:`Follow`,onClick:r=>{a?(t(r),setTimeout(()=>{m=null,i()},0)):(m=n,i(),e(r))},children:a?(0,p.jsx)(s,{className:`-mb-px size-3! stroke-[2.4]!`}):(0,p.jsx)(o,{className:`size-[14px]! stroke-2!`})})},h=({author:e,size:t,isLoading:n=!1,disabled:o=!1,className:s=``,showFollowButton:c=!1})=>{let h=20,g=`shrink-0 items-center justify-center rounded-full relative z-10 flex bg-black/5 dark:bg-gray-900 ${t===`lg`||o?``:`cursor-pointer`} ${s}`,_=`z-10 object-cover rounded-full outline-[0.5px] outline-offset-[-0.5px] outline-black/10`,[v,y]=(0,f.useState)(e?.icon?.url),b=u(),re=ee(`index`,()=>{r.success(`Followed ${e?.name}`)},()=>{r.error(`Failed to follow`)}),ie=d(`index`,()=>{r.info(`Unfollowed ${e?.name}`)},()=>{r.error(`Failed to unfollow`)});switch((0,f.useEffect)(()=>{y(e?.icon?.url)},[e?.icon?.url]),t){case`2xs`:h=10,g=i(`size-4`,g),_=i(`size-4`,_);break;case`xs`:h=12,g=i(`size-6`,g),_=i(`size-6`,_);break;case`notification`:h=16,g=i(`size-9`,g),_=i(`size-9`,_);break;case`sm`:g=i(`size-10`,g),_=i(`size-10`,_);break;case`md`:g=i(`size-[60px]`,g),_=i(`size-[60px]`,_);break;case`lg`:h=32,g=i(`size-22`,g),_=i(`size-22`,_);break;default:g=i(`size-10`,g),_=i(`size-10`,_);break}if(!e||n)return(0,p.jsx)(l,{className:_,containerClassName:g});let x=te(e),S=e=>{e.stopPropagation(),b(`/profile/${x}`)},ae=e=>{e.stopPropagation(),re.mutate(x)},C=e=>{e.stopPropagation(),ie.mutate(x)},w=c||m===x;return v?(0,p.jsxs)(`div`,{className:g,onClick:t===`lg`||o?void 0:S,children:[(0,p.jsx)(`img`,{className:_,referrerPolicy:`no-referrer`,src:v,onError:()=>y(void 0)}),w&&(0,p.jsx)(ne,{authorHandle:x,followedByMe:!1,onFollow:ae,onUnfollow:C})]}):(0,p.jsxs)(`div`,{className:g,onClick:o?void 0:S,children:[(0,p.jsx)(a,{className:`text-gray-600`,size:h,strokeWidth:1.5}),w&&(0,p.jsx)(ne,{authorHandle:x,followedByMe:!1,onFollow:ae,onUnfollow:C})]})};function g(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _(e){if(Array.isArray(e))return e}function v(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function y(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b(e,t){return _(e)||v(e,t)||re(e,t)||y()}function re(e,t){if(e){if(typeof e==`string`)return g(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}var ie=Object.entries,x=Object.setPrototypeOf,S=Object.isFrozen,ae=Object.getPrototypeOf,C=Object.getOwnPropertyDescriptor,w=Object.freeze,T=Object.seal,oe=Object.create,se=typeof Reflect<`u`&&Reflect,ce=se.apply,E=se.construct;w||=function(e){return e},T||=function(e){return e},ce||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},E||=function(e){return new e(...[...arguments].slice(1))};var D=P(Array.prototype.forEach),le=P(Array.prototype.lastIndexOf),ue=P(Array.prototype.pop),O=P(Array.prototype.push),de=P(Array.prototype.splice),k=Array.isArray,fe=P
vendor: 7,408 bytes, line 2
2(String.prototype.toLowerCase),pe=P(String.prototype.toString),me=P(String.prototype.match),he=P(String.prototype.replace),ge=P(String.prototype.indexOf),_e=P(String.prototype.trim),ve=P(Number.prototype.toString),ye=P(Boolean.prototype.toString),be=typeof BigInt>`u`?null:P(BigInt.prototype.toString),xe=typeof Symbol>`u`?null:P(Symbol.prototype.toString),A=P(Object.prototype.hasOwnProperty),j=P(Object.prototype.toString),M=P(RegExp.prototype.test),N=Se(TypeError);function P(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return ce(e,t,n)}}function Se(e){return function(){return E(e,[...arguments])}}function F(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fe;if(x&&x(e,null),!k(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(S(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ce(e){for(let t=0;t<e.length;t++)A(e,t)||(e[t]=null);return e}function I(e){let t=oe(null);for(let r of ie(e)){var n=b(r,2);let i=n[0],a=n[1];A(e,i)&&(k(a)?t[i]=Ce(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=I(a):t[i]=a)}return t}function we(e){switch(typeof e){case`string`:return e;case`number`:return ve(e);case`boolean`:return ye(e);case`bigint`:return be?be(e):`0`;case`symbol`:return xe?xe(e):`Symbol()`;case`undefined`:return j(e);case`function`:case`object`:{if(e===null)return j(e);let t=e,n=L(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:j(e)}return j(e)}default:return j(e)}}function L(e,t){for(;e!==null;){let n=C(e,t);if(n){if(n.get)return P(n.get);if(typeof n.value==`function`)return P(n.value)}e=ae(e)}function n(){return null}return n}function Te(e){try{return M(e,``),!0}catch{return!1}}var Ee=w(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),De=w(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Oe=w([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),ke=w([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ae=w(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),je=w([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Me=w([`#text`]),Ne=w(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Pe=w(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Fe=w(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Ie=w([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Le=T(/{{[\w\W]*|^[\w\W]*}}/g),Re=T(/<%[\w\W]*|^[\w\W]*%>/g),ze=T(/\${[\w\W]*/g),Be=T(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ve=T(/^aria-[\-\w]+$/),He=T(/^(?:(?:(?
vendor: 14,866 bytes, line 2
2:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ue=T(/^(?:\w+script|data):/i),We=T(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ge=T(/^html$/i),Ke=T(/^[a-z][.\w]*(-[.\w]+)+$/i),qe=T(/<[/\w!]/g),Je=T(/<[/\w]/g),Ye=T(/<\/no(script|embed|frames)/i),Xe=T(/\/>/i),R={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ze=function(){return typeof window>`u`?null:window},Qe=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},$e=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},z=function(e,t,n,r){return A(e,t)&&k(e[t])?F(r.base?I(r.base):{},e[t],r.transform):n};function et(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ze(),t=e=>et(e);if(t.version=`3.4.13`,t.removed=[],!e||!e.document||e.document.nodeType!==R.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,ee=L(d,`cloneNode`),f=L(d,`remove`),te=L(d,`nextSibling`),p=L(d,`childNodes`),m=L(d,`parentNode`),ne=L(d,`shadowRoot`),h=L(d,`attributes`),g=o&&o.prototype?L(o.prototype,`nodeType`):null,_=o&&o.prototype?L(o.prototype,`nodeName`):null,v=o&&o.prototype?L(o.prototype,`ownerDocument`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let y,b=``,re,x=!1,S=0,ae=function(){if(S>0)throw N(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},C=function(e){ae(),S++;try{return y.createHTML(e)}finally{S--}},se=function(e){ae(),S++;try{return y.createScriptURL(e)}finally{S--}},ce=function(){return x||=(re=Qe(u,i),!0),re},E=n,ve=E.implementation,ye=E.createNodeIterator,be=E.createDocumentFragment,xe=E.getElementsByTagName,j=r.importNode,P=$e();t.isSupported=typeof ie==`function`&&typeof m==`function`&&ve&&ve.createHTMLDocument!==void 0;let Se=Le,Ce=Re,tt=ze,nt=Be,rt=Ve,it=Ue,at=We,ot=Ke,st=He,B=null,ct=F({},[...Ee,...De,...Oe,...Ae,...Me]),V=null,lt=F({},[...Ne,...Pe,...Fe,...Ie]),H=Object.seal(oe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ut=null,dt=null,U=Object.seal(oe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ft=!0,pt=!0,mt=!1,ht=!0,W=!1,G=!0,K=!1,gt=!1,_t=null,vt=null,yt=!1,q=!1,bt=!1,xt=!1,St=!0,Ct=!1,wt=`user-content-`,Tt=!0,Et=!1,Dt={},J=null,Ot=F({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),kt=null,At=F({},[`audio`,`video`,`img`,`source`,`image`,`track`]),jt=null,Mt=F({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Nt=`http://www.w3.org/1998/Math/MathML`,Pt=`http://www.w3.org/2000/svg`,Y=`http://www.w3.org/1999/xhtml`,Ft=Y,It=!1,Lt=null,Rt=F({},[Nt,Pt,Y],pe),zt=w([`mi`,`mo`,`mn`,`ms`,`mtext`]),Bt=F({},zt),Vt=w([`annotation-xml`]),Ht=F({},Vt),Ut=F({},[`title`,`style`,`font`,`a`,`script`]),Wt=null,Gt=[`application/xhtml+xml`,`text/html`],X=null,Kt=null,qt=n.createElement(`form`),Jt=function(e){return e instanceof RegExp||e instanceof Function},Yt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Kt&&Kt===e)return;(!e||typeof e!=`object`)&&(e={}),e=I(e),Wt=Gt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,X=Wt===`application/xhtml+xml`?pe:fe,B=z(e,`ALLOWED_TAGS`,ct,{transform:X}),V=z(e,`ALLOWED_ATTR`,lt,{transform:X}),Lt=z(e,`ALLOWED_NAMESPACES`,Rt,{transform:pe}),jt=z(e,`ADD_URI_SAFE_ATTR`,Mt,{transform:X,base:Mt}),kt=z(e,`ADD_DATA_URI_TAGS`,At,{transform:X,base:At}),J=z(e,`FORBID_CONTENTS`,Ot,{transform:X}),ut=z(e,`FORBID_TAGS`,I({}),{transform:X}),dt=z(e,`FORBID_ATTR`,I({}),{transform:X}),Dt=A(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?I(e.USE_PROFILES):e.USE_PROFILES:!1,ft=e.ALLOW_ARIA_ATTR!==!1,pt=e.ALLOW_DATA_ATTR!==!1,mt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ht=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,W=e.SAFE_FOR_TEMPLATES||!1,G=e.SAFE_FOR_XML!==!1,K=e.WHOLE_DOCUMENT||!1,q=e.RETURN_DOM||!1,bt=e.RETURN_DOM_FRAGMENT||!1,xt=e.RETURN_TRUSTED_TYPE||!1,yt=e.FORCE_BODY||!1,St=e.SANITIZE_DOM!==!1,Ct=e.SANITIZE_NAMED_PROPS||!1,Tt=e.KEEP_CONTENT!==!1,Et=e.IN_PLACE||!1,st=Te(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:He,Ft=typeof e.NAMESPACE==`string`?e.NAMESPACE:Y,Bt=A(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?I(e.MATHML_TEXT_INTEGRATION_POINTS):F({},zt),Ht=A(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?I(e.HTML_INTEGRATION_POINTS):F({},Vt);let t=A(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?I(e.CUSTOM_ELEMENT_HANDLING):oe(null);if(H=oe(null),A(t,`tagNameCheck`)&&Jt(t.tagNameCheck)&&(H.tagNameCheck=t.tagNameCheck),A(t,`attributeNameCheck`)&&Jt(t.attributeNameCheck)&&(H.attributeNameCheck=t.attributeNameCheck),A(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(H.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),T(H),W&&(pt=!1),bt&&(q=!0),Dt&&(B=F({},Me),V=oe(null),Dt.html===!0&&(F(B,Ee),F(V,Ne)),Dt.svg===!0&&(F(B,De),F(V,Pe),F(V,Ie)),Dt.svgFilters===!0&&(F(B,Oe),F(V,Pe),F(V,Ie)),Dt.mathMl===!0&&(F(B,Ae),F(V,Fe),F(V,Ie))),U.tagCheck=null,U.attributeCheck=null,A(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?U.tagCheck=e.ADD_TAGS:k(e.ADD_TAGS)&&(B===ct&&(B=I(B)),F(B,e.ADD_TAGS,X))),A(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?U.attributeCheck=e.ADD_ATTR:k(e.ADD_ATTR)&&(V===lt&&(V=I(V)),F(V,e.ADD_ATTR,X))),A(e,`ADD_URI_SAFE_ATTR`)&&k(e.ADD_URI_SAFE_ATTR)&&F(jt,e.ADD_URI_SAFE_ATTR,X),A(e,`FORBID_CONTENTS`)&&k(e.FORBID_CONTENTS)&&(J===Ot&&(J=I(J)),F(J,e.FORBID_CONTENTS,X)),A(e,`ADD_FORBID_CONTENTS`)&&k(e.ADD_FORBID_CONTENTS)&&(J===Ot&&(J=I(J)),F(J,e.ADD_FORBID_CONTENTS,X)),Tt&&(B[`#text`]=!0),K&&F(B,[`html`,`head`,`body`]),B.table&&(F(B,[`tbody`]),delete ut.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw N(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw N(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=y;y=e.TRUSTED_TYPES_POLICY;try{b=C(``)}catch(e){throw y=t,e}}else e.TRUSTED_TYPES_POLICY===null?(y=void 0,b=``):(y===void 0&&(y=ce()),y&&typeof b==`string`&&(b=C(``)));w&&w(e),Kt=e},Xt=F({},[...De,...Oe,...ke]),Zt=F({},[...Ae,...je]),Qt=function(e,t,n){return t.namespaceURI===Y?e===`svg`:t.namespaceURI===Nt?e===`svg`&&(n===`annotation-xml`||Bt[n]):!!Xt[e]},$t=function(e,t,n){return t.namespaceURI===Y?e===`math`:t.namespaceURI===Pt?e===`math`&&Ht[n]:!!Zt[e]},en=function(e,t,n){return t.namespaceURI===Pt&&!Ht[n]||t.namespaceURI===Nt&&!Bt[n]?!1:!Zt[e]&&(Ut[e]||!Xt[e])},tn=function(e){let t=m(e);(!t||!t.tagName)&&(t={namespaceURI:Ft,tagName:`template`});let n=fe(e.tagName),r=fe(t.tagName);return Lt[e.namespaceURI]?e.namespaceURI===Pt?Qt(n,t,r):e.namespaceURI===Nt?$t(n,t,r):e.namespaceURI===Y?en(n,t,r):!!(Wt===`application/xhtml+xml`&&Lt[e.namespaceURI]):!1},Z=function(e){O(t.removed,{element:e});try{m(e).removeChild(e)}catch{if(f(e),!m(e))throw N(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},nn=function(e){an(e);let t=p(e);if(t){let e=[];D(t,t=>{O(e,t)}),D(e,e=>{try{f(e)}catch{}})}let n=h(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},Q=function(e,n){try{O(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{O(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(q||bt)try{Z(n)}catch{}else try{n.setAttribute(e,``)}catch{}},rn=function(e){let t=h(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||V[X(i)]))try{e.removeAttribute(i)}catch{}}},an=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(g?g(e):e.nodeType)===R.element&&rn(e);let n=p(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},on=function(e){if(!G)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=g?g(e):e.nodeType;if(n===R.processingInstruction||n===R.comment&&M(Je,e.data)){try{f(e)}catch{}continue}if(n===R.element){let t=e,n=X(_?_(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&n!==`label`&&n!==`output`&&t.removeAttribute(`for`)}catch{}}let r=p(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},sn=function(e){let t=null,r=null;if(yt)e=`<remove></remove>`+e;else{let t=me(e,/^[\r\n\t ]+/);r=t&&t[0]}Wt===`application/xhtml+xml`&&Ft===Y&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=y?C(e):e;if(Ft===Y)try{t=new l().parseFromString(i,Wt)}catch{}if(!t||!t.documentElement){t=ve.createDocument(Ft,`template`,null);try{t.documentElement.innerHTML=It?b:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ft===Y?xe.call(t,K?`html`:`body`)[0]:K?t.documentElement:a},cn=function(e){let t=v?v(e):e.ownerDocument;return ye.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ln=function(e){return e=he(e,Se,` `),e=he(e,Ce,` `),e=he(e,tt,` `),e},un=function(e){e.normalize();let t=v?v(e):e.ownerDocument,n=ye.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=ln(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&D(i,e=>{fn(e.content)&&un(e.content)})},dn=function(e){let t=_?_(e):null;return typeof t!=`string`||X(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==h(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==g(e)||e.childNodes!==p(e)},fn=function(e){if(!g||typeof e!=`object`||!e)return!1;try{return g(e)===R.documentFragment}catch{return!1}},pn=function(e){if(!g||typeof e!=`object`||!e)return!1;try{return typeof g(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&D(e,e=>{e.call(t,n,r,Kt)})}let mn=function(e,t){return!!(G&&e.hasChildNodes()&&!pn(e.firstElementChild)&&M(qe,e.textContent)&&M(qe,e.innerHTML)||G&&e.namespaceURI===Y&&t===`style`&&pn(e.firstElementChild)||e.nodeType===R.processingInstruction||G&&e.nodeType===R.comment&&M(Je,e.data))},hn=function(e,t,n){if(!ut[t]&&bn(t)&&(H.tagNameCheck instanceof RegExp&&M(H.tagNameCheck,t)||H.tagNameCheck instanceof Function&&H.tagNameCheck(t)))return!1;if(Tt&&!J[t]){let t=m(e),r=p(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?ee(r[a],!0):r[a];t.insertBefore(i,te(e))}}}return Z(e),!0},gn=function(e,t,n,r){return e.length===0?t:t===n||t===r?I(t):t},_n=function(e,n){if($(P.beforeSanitizeElements,e,null),e!==n&&m(e)===null)return Et&&an(e),!0;if(dn(e))return Z(e),!0;let r=X(_?_(e):e.nodeName);if(B=gn(P.uponSanitizeElement,B,ct,_t),$(P.uponSanitizeElement,e,{tagName:r,allowedTags:B}),e!==n&&m(e)===null)return Et&&an(e),!0;if(mn(e,r))return Z(e),!0;if(ut[r]||!(U.tagCheck instanceof Function&&U.tagCheck(r))&&!B[r]){let t=hn(e,r,n);return t===!1&&$(P.afterSanitizeElements,e,null),t}if((g?g(e):e.nodeType)===R.element&&!tn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&M(Ye,e.innerHTML))return Z(e),!0;if(W&&e.nodeType===R.text){let n=ln(e.textContent);e.textContent!==n&&(O(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(P.afterSanitizeElements,e,null),!1},vn=function(e,t,r){if(dt[t]||G&&t===`patchsrc`||G&&t===`for`&&e!==`label`&&e!==`output`||St&&(t===`id`||t===`name`)&&(r in n||r in qt))return!1;let i=V[t]||U.attributeCheck instanceof Function&&U.attributeCheck(t,e);if(!(pt&&M(nt,t))&&!(ft&&M(rt,t))){if(!i){if(!(bn(e)&&(H.tagNameCheck instanceof RegExp&&M(H.tagNameCheck,e)||H.tagNameCheck instanceof Function&&H.tagNameCheck(e))&&(H.attributeNameCheck instanceof RegExp&&M(H.attributeNameCheck,t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(t,e))||t===`is`&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&M(H.tagNameCheck,r)||H.tagNameCheck instanceof Function&&H.tagNameCheck(r))))return!1}else if(!jt[t]&&!M(st,he(r,at,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ge(r,`data:`)===0&&kt[e])&&!(mt&&!M(it,he(r,at,``)))&&r)return!1}return!0},yn=F({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),bn=function(e){return!yn[fe(e)]&&M(ot,e)},xn=function(e,t,n,r){if(y&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return C(r);case`TrustedScriptURL`:return se(r)}return r},Sn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),dn(e)?Z(e):ue(t.removed)}catch{Q(n,e)}},Cn=function(e){$(P.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||dn(e))return;V=gn(P.uponSanitizeAttribute,V,lt,vt);let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0},r=t.length,i=X(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=X(o),u=c,d=o===`value`?u:_e(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,$(P.uponSanitizeAttribute,e,n),d=n.attrValue,Ct&&(l===`id`||l===`
2name`)&&ge(d,wt)!==0&&(Q(o,e),d=wt+d),G&&M(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Q(o,e);continue}if(l===`attributename`&&me(d,`href`)){Q(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){Q(o,e);continue}if(!ht&&M(Xe,d)){Q(o,e);continue}if(W&&(d=ln(d)),!vn(i,l,d)){Q(o,e);continue}d=xn(i,l,s,d),d!==u&&Sn(e,o,s,d)}}$(P.afterSanitizeAttributes,e,null)},wn=function(e){let t=null,n=cn(e);for($(P.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(P.uponSanitizeShadowNode,t,null),_n(t,e),Cn(t),fn(t.content)&&wn(t.content),(g?g(t):t.nodeType)===R.element){let e=ne(t);fn(e)&&(Tn(e),wn(e))}$(P.afterSanitizeShadowDOM,e,null)},Tn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){wn(e.shadow);continue}let n=e.node,r=(g?g(n):n.nodeType)===R.element,i=p(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=_?_(n):null;if(typeof e==`string`&&X(e)===`template`){let e=n.content;fn(e)&&t.push({node:e,shadow:null})}}if(r){let e=ne(n);fn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(It=!e,It&&(e=`<!-->`),typeof e!=`string`&&!pn(e)&&(e=we(e),typeof e!=`string`))throw N(`dirty is not a string, aborting`);if(!t.isSupported)return e;gt?(B=_t,V=vt):Yt(n),(P.uponSanitizeElement.length>0||P.uponSanitizeAttribute.length>0)&&(B=I(B)),P.uponSanitizeAttribute.length>0&&(V=I(V)),t.removed=[];let c=Et&&typeof e!=`string`&&pn(e);if(c){on(e);let t=_?_(e):e.nodeName;if(typeof t==`string`){let n=X(t);if(!B[n]||ut[n])throw nn(e),N(`root node is forbidden and cannot be sanitized in-place`)}if(dn(e))throw nn(e),N(`root node is clobbered and cannot be sanitized in-place`);try{Tn(e)}catch(t){throw nn(e),t}}else if(pn(e))i=sn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===R.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Tn(a);else{if(!q&&!W&&!K&&e.indexOf(`<`)===-1)return y&&xt?C(e):e;if(i=sn(e),!i)return q?null:xt?b:``}i&&yt&&Z(i.firstChild);let l=c?e:i;try{let e=cn(l);for(;o=e.nextNode();)_n(o,l),Cn(o),fn(o.content)&&wn(o.content)}catch(n){throw c&&(nn(e),D(t.removed,e=>{e.element&&an(e.element)})),n}if(c)return D(t.removed,e=>{e.element&&an(e.element)}),W&&un(e),e;if(q){if(W&&un(i),bt)for(s=be.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(V.shadowroot||V.shadowrootmode)&&(s=j.call(r,s,!0)),s}let u=K?i.outerHTML:i.innerHTML;return K&&B[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&M(Ge,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
3`+u),W&&(u=ln(u)),y&&xt?C(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Yt(e),gt=!0,_t=B,vt=V},t.clearConfig=function(){Kt=null,gt=!1,_t=null,vt=null,y=re,b=``},t.isValidAttribute=function(e,t,n){Kt||Yt({});let r=X(e),i=X(t);return vn(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&A(P,e)&&O(P[e],t)},t.removeHook=function(e,t){if(A(P,e)){if(t!==void 0){let n=le(P[e],t);return n===-1?void 0:de(P[e],n,1)[0]}return ue(P[e])}},t.removeHooks=function(e){A(P,e)&&(P[e]=[])},t.removeAllHooks=function(){P=$e()},t}var tt=et(),nt=[`http:`,`https:`,`mailto:`];function rt(e){try{let t=new URL(e);return nt.includes(t.protocol)}catch{return!1}}function it(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#x27;`)}function at(e){return tt.sanitize(e)}function ot(e){let t=[`platform.twitter.com`,`platform.x.com`],n=!1;try{let r=new URL(e.getAttribute(`src`)||``);n=r.protocol===`https:`&&t.includes(r.hostname)}catch{n=!1}if(!n){e.parentNode?.removeChild(e);return}e.textContent=``}function st(e){let t=!1;try{let n=new URL(e.getAttribute(`src`)||``,window.location.href);t=(n.protocol===`https:`||n.protocol===`http:`)&&n.origin!==window.location.origin}catch{t=!1}if(!t){e.parentNode?.removeChild(e);return}e.setAttribute(`sandbox`,`allow-scripts allow-same-origin allow-popups allow-presentation allow-forms`)}var B=tt(window);B.addHook(`uponSanitizeElement`,(e,t)=>{let n=e;t.tagName===`script`?ot(n):t.tagName===`iframe`&&st(n)});function ct(e){return B.sanitize(e,{ADD_TAGS:[`iframe`,`script`],ADD_ATTR:[`target`,`frameborder`,`allowfullscreen`,`async`,`charset`,`sandbox`],FORCE_BODY:!0})}function V(e,t=[]){if(t.length===0)return e.replace(/<br\s*\/?>/gi,` `).replace(/<\/p>\s*<p>|<\/div>\s*<div>|<\/h[1-6]>\s*<|<\/li>\s*<li>|<\/a>/gi,` `).replace(/<[^>]*>/g,``).replace(/\s+/g,` `).trim();let n=t.map(e=>e.toLowerCase()),r={},i=0,a=e.replace(/<\/(h[1-6]|p|div|li|blockquote|pre)>/gi,`<br>`);
3for(let e of n){let t=RegExp(`<${e}[^>]*>.*?<\\/${e}>|<${e}[^>]*\\/?>`,`gis`);a=a.replace(t,e=>{let t=`__EXCLUDED_TAG_${i+=1}__`;return r[t]=e,t})}let o=a;n.includes(`br`)||(o=a.replace(/<br\s*\/?>/gi,` `));let s=o.replace(/<[^>]*>/g,``).replace(/\s+/g,` `).trim();for(let[e,t]of Object.entries(r))s=s.replace(e,t);return s}var lt=e=>{let t=document.createElement(`div`);t.innerHTML=e;let n=t.getElementsByTagName(`a`);for(let e=0;e<n.length;e++)(n[e].getAttribute(`href`)||``).match(/^\s*(javascript|data|vbscript):/i)&&n[e].removeAttribute(`href`),n[e].setAttribute(`target`,`_blank`),n[e].setAttribute(`rel`,`noopener noreferrer`);return t.innerHTML},H=e=>{let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelectorAll(`.kg-video-card video`);for(let e=0;e<n.length;e++){let t=n[e];t.setAttribute(`playsinline`,``),t.setAttribute(`webkit-playsinline`,``),t.setAttribute(`x5-playsinline`,``),t.hasAttribute(`autoplay`)&&(t.setAttribute(`muted`,``),t.muted=!0)}return t.innerHTML};export{ct as a,tt as c,lt as i,h as l,it as n,at as o,rt as r,V as s,H as t,te as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.