import{s as it,o as ht,n as La}from"../chunks/scheduler.0cf4ef2e.js";import{S as gt,i as ut,e as l,s as n,c as i,h as pt,a as r,d as t,b as s,f as U,g as h,j as v,k,l as m,m as o,n as g,t as u,o as p,p as d}from"../chunks/index.abc433bf.js";import{C as dt}from"../chunks/CopyLLMTxtMenu.efc6b005.js";import{D as j}from"../chunks/Docstring.e4170f41.js";import{C as Sa}from"../chunks/CodeBlock.00dcd05e.js";import{E as xa}from"../chunks/ExampleCodeBlock.9d6d4e26.js";import{H as T,E as ct}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.86d448e2.js";function bt(I){let c,w="Example:",b,W,P;return W=new Sa({props:{code:"aW1wb3J0JTIwZ3JhZGlvJTIwYXMlMjBnciUwQWZyb20lMjBodWdnaW5nZmFjZV9odWIlMjBpbXBvcnQlMjBXZWJob29rc1NlcnZlciUyQyUyMFdlYmhvb2tQYXlsb2FkJTBBJTBBd2l0aCUyMGdyLkJsb2NrcygpJTIwYXMlMjB1aSUzQSUwQSUyMCUyMCUyMCUyMC4uLiUwQSUwQWFwcCUyMCUzRCUyMFdlYmhvb2tzU2VydmVyKHVpJTNEdWklMkMlMjB3ZWJob29rX3NlY3JldCUzRCUyMm15X3NlY3JldF9rZXklMjIpJTBBJTBBJTQwYXBwLmFkZF93ZWJob29rKCUyMiUyRnNheV9oZWxsbyUyMiklMEFhc3luYyUyMGRlZiUyMGhlbGxvKHBheWxvYWQlM0ElMjBXZWJob29rUGF5bG9hZCklM0ElMEElMjAlMjAlMjAlMjByZXR1cm4lMjAlN0IlMjJtZXNzYWdlJTIyJTNBJTIwJTIyaGVsbG8lMjIlN0QlMEElMEFhcHAubGF1bmNoKCk=",highlighted:`<span class="hljs-keyword">import</span> gradio <span class="hljs-keyword">as</span> gr
<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> WebhooksServer, WebhookPayload

<span class="hljs-keyword">with</span> gr.Blocks() <span class="hljs-keyword">as</span> ui:
    ...

app = WebhooksServer(ui=ui, webhook_secret=<span class="hljs-string">&quot;my_secret_key&quot;</span>)

<span class="hljs-meta">@app.add_webhook(<span class="hljs-params"><span class="hljs-string">&quot;/say_hello&quot;</span></span>)</span>
<span class="hljs-keyword">async</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">hello</span>(<span class="hljs-params">payload: WebhookPayload</span>):
    <span class="hljs-keyword">return</span> {<span class="hljs-string">&quot;message&quot;</span>: <span class="hljs-string">&quot;hello&quot;</span>}

app.launch()`,wrap:!1}}),{c(){c=l("p"),c.textContent=w,b=n(),i(W.$$.fragment)},l($){c=r($,"P",{"data-svelte-h":!0}),v(c)!=="svelte-11lpom8"&&(c.textContent=w),b=s($),h(W.$$.fragment,$)},m($,C){o($,c,C),o($,b,C),g(W,$,C),P=!0},p:La,i($){P||(u(W.$$.fragment,$),P=!0)},o($){p(W.$$.fragment,$),P=!1},d($){$&&(t(c),t(b)),d(W,$)}}}function mt(I){let c,w;return c=new Sa({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMHdlYmhvb2tfZW5kcG9pbnQlMkMlMjBXZWJob29rUGF5bG9hZCUwQSUwQSU0MHdlYmhvb2tfZW5kcG9pbnQlMEFhc3luYyUyMGRlZiUyMHRyaWdnZXJfdHJhaW5pbmcocGF5bG9hZCUzQSUyMFdlYmhvb2tQYXlsb2FkKSUzQSUwQSUyMCUyMCUyMCUyMGlmJTIwcGF5bG9hZC5yZXBvLnR5cGUlMjAlM0QlM0QlMjAlMjJkYXRhc2V0JTIyJTIwYW5kJTIwcGF5bG9hZC5ldmVudC5hY3Rpb24lMjAlM0QlM0QlMjAlMjJ1cGRhdGUlMjIlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBUcmlnZ2VyJTIwYSUyMHRyYWluaW5nJTIwam9iJTIwaWYlMjBhJTIwZGF0YXNldCUyMGlzJTIwdXBkYXRlZCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC4uLiUwQSUwQSUyMyUyMFNlcnZlciUyMGlzJTIwYXV0b21hdGljYWxseSUyMHN0YXJ0ZWQlMjBhdCUyMHRoZSUyMGVuZCUyMG9mJTIwdGhlJTIwc2NyaXB0Lg==",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> webhook_endpoint, WebhookPayload

<span class="hljs-meta">@webhook_endpoint</span>
<span class="hljs-keyword">async</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">trigger_training</span>(<span class="hljs-params">payload: WebhookPayload</span>):
    <span class="hljs-keyword">if</span> payload.repo.<span class="hljs-built_in">type</span> == <span class="hljs-string">&quot;dataset&quot;</span> <span class="hljs-keyword">and</span> payload.event.action == <span class="hljs-string">&quot;update&quot;</span>:
        <span class="hljs-comment"># Trigger a training job if a dataset is updated</span>
        ...

<span class="hljs-comment"># Server is automatically started at the end of the script.</span>`,wrap:!1}}),{c(){i(c.$$.fragment)},l(b){h(c.$$.fragment,b)},m(b,W){g(c,b,W),w=!0},p:La,i(b){w||(u(c.$$.fragment,b),w=!0)},o(b){p(c.$$.fragment,b),w=!1},d(b){d(c,b)}}}function ft(I){let c,w;return c=new Sa({props:{code:"ZnJvbSUyMGh1Z2dpbmdmYWNlX2h1YiUyMGltcG9ydCUyMHdlYmhvb2tfZW5kcG9pbnQlMkMlMjBXZWJob29rUGF5bG9hZCUwQSUwQSU0MHdlYmhvb2tfZW5kcG9pbnQlMEFhc3luYyUyMGRlZiUyMHRyaWdnZXJfdHJhaW5pbmcocGF5bG9hZCUzQSUyMFdlYmhvb2tQYXlsb2FkKSUzQSUwQSUyMCUyMCUyMCUyMGlmJTIwcGF5bG9hZC5yZXBvLnR5cGUlMjAlM0QlM0QlMjAlMjJkYXRhc2V0JTIyJTIwYW5kJTIwcGF5bG9hZC5ldmVudC5hY3Rpb24lMjAlM0QlM0QlMjAlMjJ1cGRhdGUlMjIlM0ElMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBUcmlnZ2VyJTIwYSUyMHRyYWluaW5nJTIwam9iJTIwaWYlMjBhJTIwZGF0YXNldCUyMGlzJTIwdXBkYXRlZCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMC4uLiUwQSUwQSUyMyUyMFN0YXJ0JTIwdGhlJTIwc2VydmVyJTIwbWFudWFsbHklMEF0cmlnZ2VyX3RyYWluaW5nLmxhdW5jaCgp",highlighted:`<span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> webhook_endpoint, WebhookPayload

<span class="hljs-meta">@webhook_endpoint</span>
<span class="hljs-keyword">async</span> <span class="hljs-keyword">def</span> <span class="hljs-title function_">trigger_training</span>(<span class="hljs-params">payload: WebhookPayload</span>):
    <span class="hljs-keyword">if</span> payload.repo.<span class="hljs-built_in">type</span> == <span class="hljs-string">&quot;dataset&quot;</span> <span class="hljs-keyword">and</span> payload.event.action == <span class="hljs-string">&quot;update&quot;</span>:
        <span class="hljs-comment"># Trigger a training job if a dataset is updated</span>
        ...

<span class="hljs-comment"># Start the server manually</span>
trigger_training.launch()`,wrap:!1}}),{c(){i(c.$$.fragment)},l(b){h(c.$$.fragment,b)},m(b,W){g(c,b,W),w=!0},p:La,i(b){w||(u(c.$$.fragment,b),w=!0)},o(b){p(c.$$.fragment,b),w=!1},d(b){d(c,b)}}}function yt(I){let c,w,b,W,P,$,C,Je,J,Ga=`Webhooks are a foundation for MLOps-related features. They allow you to listen for new changes on specific repos or to
all repos belonging to particular users/organizations you’re interested in following. To learn
more about webhooks on the Huggingface Hub, you can read the Webhooks <a href="https://huggingface.co/docs/hub/webhooks" rel="nofollow">guide</a>.`,He,x,Ea=`<p>Check out this <a href="../guides/webhooks_server">guide</a> for a step-by-step tutorial on how to set up your webhooks server and
deploy it as a Space.</p>`,Ye,L,Ja=`<p>This is an experimental feature. This means that we are still working on improving the API. Breaking changes might be
introduced in the future without prior notice. Make sure to pin the version of <code>huggingface_hub</code> in your requirements.
A warning is triggered when you use an experimental feature. You can disable it by setting <code>HF_HUB_DISABLE_EXPERIMENTAL_WARNING=1</code> as an environment variable.</p>`,Ze,H,Qe,Y,Ha=`The server is a <a href="https://gradio.app/" rel="nofollow">Gradio</a> app. It has a UI to display instructions for you or your users and an API
to listen to webhooks. Implementing a webhook endpoint is as simple as decorating a function. You can then debug it
by redirecting the Webhooks to your machine (using a Gradio tunnel) before deploying it to a Space.`,Be,Z,Ae,_,Q,fa,Te,Ya=`The <a href="/docs/huggingface_hub/main/en/package_reference/webhooks_server#huggingface_hub.WebhooksServer">WebhooksServer()</a> class lets you create an instance of a Gradio app that can receive Huggingface webhooks.
These webhooks can be registered using the <code>add_webhook()</code> decorator. Webhook endpoints are added to
the app as a POST endpoint to the FastAPI router. Once all the webhooks are registered, the <code>launch</code> method has to be
called to start the app.`,ya,Pe,Za=`It is recommended to accept <a href="/docs/huggingface_hub/main/en/package_reference/webhooks_server#huggingface_hub.WebhookPayload">WebhookPayload</a> as the first argument of the webhook function. It is a Pydantic
model that contains all the information about the webhook event. The data will be parsed automatically for you.`,ka,je,Qa=`Check out the <a href="../guides/webhooks_server">webhooks guide</a> for a step-by-step tutorial on how to set up your
WebhooksServer and deploy it on a Space.`,$a,B,Ba="<p><code>WebhooksServer</code> is experimental. Its API is subject to change in the future.</p>",_a,A,Aa="<p>You must have <code>gradio</code> installed to use <code>WebhooksServer</code> (<code>pip install --upgrade gradio</code>).</p>",va,S,Re,R,Ne,f,N,wa,Ce,Ra='Decorator to start a <a href="/docs/huggingface_hub/main/en/package_reference/webhooks_server#huggingface_hub.WebhooksServer">WebhooksServer()</a> and register the decorated function as a webhook endpoint.',Ma,Ie,Na=`This is a helper to get started quickly. If you need more flexibility (custom landing page or webhook secret),
you can use <a href="/docs/huggingface_hub/main/en/package_reference/webhooks_server#huggingface_hub.WebhooksServer">WebhooksServer()</a> directly. You can register multiple webhook endpoints (to the same server) by using
this decorator multiple times.`,Wa,xe,Oa=`Check out the <a href="../guides/webhooks_server">webhooks guide</a> for a step-by-step tutorial on how to set up your
server and deploy it on a Space.`,Ua,O,Fa="<p><code>webhook_endpoint</code> is experimental. Its API is subject to change in the future.</p>",Ta,F,Xa="<p>You must have <code>gradio</code> installed to use <code>webhook_endpoint</code> (<code>pip install --upgrade gradio</code>).</p>",Pa,Le,qa=`Examples:
The default usage is to register a function as a webhook endpoint. The function name will be used as the path.
The server will be started automatically at exit (i.e. at the end of the script).`,ja,G,Ca,Se,Da=`Advanced usage: register a function as a webhook endpoint and start the server manually. This is useful if you
are running it in a notebook.`,Ia,E,Oe,X,Fe,q,Va=`<a href="/docs/huggingface_hub/main/en/package_reference/webhooks_server#huggingface_hub.WebhookPayload">WebhookPayload</a> is the main data structure that contains the payload from Webhooks. This is
a <code>pydantic</code> class which makes it very easy to use with FastAPI. If you pass it as a parameter to a webhook endpoint, it
will be automatically validated and parsed as a Python object.`,Xe,D,za='For more information about webhooks payload, you can refer to the Webhooks Payload <a href="https://huggingface.co/docs/hub/webhooks#webhook-payloads" rel="nofollow">guide</a>.',qe,V,z,De,K,Ve,ee,ae,ze,te,Ke,oe,ne,ea,se,aa,le,re,ta,ie,oa,he,ge,na,ue,sa,pe,de,la,ce,ra,be,me,ia,fe,ha,ye,ke,ga,$e,ua,_e,ve,pa,we,da,Me,We,ca,Ue,ba,Ge,ma;return P=new dt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),C=new T({props:{title:"Webhooks Server",local:"webhooks-server",headingTag:"h1"}}),H=new T({props:{title:"Server",local:"server",headingTag:"h2"}}),Z=new T({props:{title:"WebhooksServer",local:"huggingface_hub.WebhooksServer",headingTag:"h3"}}),Q=new j({props:{name:"huggingface_hub.WebhooksServer",anchor:"huggingface_hub.WebhooksServer",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"huggingface_hub.WebhooksServer.ui",description:`<strong>ui</strong> (<code>gradio.Blocks</code>, optional) &#x2014;
A Gradio UI instance to be used as the Space landing page. If <code>None</code>, a UI displaying instructions
about the configured webhooks is created.`,name:"ui"},{anchor:"huggingface_hub.WebhooksServer.webhook_secret",description:`<strong>webhook_secret</strong> (<code>str</code>, optional) &#x2014;
A secret key to verify incoming webhook requests. You can set this value to any secret you want as long as
you also configure it in your <a href="https://huggingface.co/settings/webhooks" rel="nofollow">webhooks settings panel</a>. You
can also set this value as the <code>WEBHOOK_SECRET</code> environment variable. If no secret is provided, the
webhook endpoints are opened without any security.`,name:"webhook_secret"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_server.py#L43"}}),S=new xa({props:{anchor:"huggingface_hub.WebhooksServer.example",$$slots:{default:[bt]},$$scope:{ctx:I}}}),R=new T({props:{title:"@webhook_endpoint",local:"huggingface_hub.webhook_endpoint",headingTag:"h3"}}),N=new j({props:{name:"huggingface_hub.webhook_endpoint",anchor:"huggingface_hub.webhook_endpoint",parameters:[{name:"path",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"huggingface_hub.webhook_endpoint.path",description:`<strong>path</strong> (<code>str</code>, optional) &#x2014;
The URL path to register the webhook function. If not provided, the function name will be used as the path.
In any case, all webhooks are registered under <code>/webhooks</code>.`,name:"path"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_server.py#L226"}}),G=new xa({props:{anchor:"huggingface_hub.webhook_endpoint.example",$$slots:{default:[mt]},$$scope:{ctx:I}}}),E=new xa({props:{anchor:"huggingface_hub.webhook_endpoint.example-2",$$slots:{default:[ft]},$$scope:{ctx:I}}}),X=new T({props:{title:"Payload",local:"huggingface_hub.WebhookPayload",headingTag:"h2"}}),z=new j({props:{name:"class huggingface_hub.WebhookPayload",anchor:"huggingface_hub.WebhookPayload",parameters:[{name:"event",val:": WebhookPayloadEvent"},{name:"repo",val:": WebhookPayloadRepo"},{name:"discussion",val:": typing.Optional[huggingface_hub._webhooks_payload.WebhookPayloadDiscussion] = None"},{name:"comment",val:": typing.Optional[huggingface_hub._webhooks_payload.WebhookPayloadComment] = None"},{name:"webhook",val:": WebhookPayloadWebhook"},{name:"movedTo",val:": typing.Optional[huggingface_hub._webhooks_payload.WebhookPayloadMovedTo] = None"},{name:"updatedRefs",val:": typing.Optional[list[huggingface_hub._webhooks_payload.WebhookPayloadUpdatedRef]] = None"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_payload.py#L130"}}),K=new T({props:{title:"WebhookPayload",local:"huggingface_hub.WebhookPayload",headingTag:"h3"}}),ae=new j({props:{name:"class huggingface_hub.WebhookPayload",anchor:"huggingface_hub.WebhookPayload",parameters:[{name:"event",val:": WebhookPayloadEvent"},{name:"repo",val:": WebhookPayloadRepo"},{name:"discussion",val:": typing.Optional[huggingface_hub._webhooks_payload.WebhookPayloadDiscussion] = None"},{name:"comment",val:": typing.Optional[huggingface_hub._webhooks_payload.WebhookPayloadComment] = None"},{name:"webhook",val:": WebhookPayloadWebhook"},{name:"movedTo",val:": typing.Optional[huggingface_hub._webhooks_payload.WebhookPayloadMovedTo] = None"},{name:"updatedRefs",val:": typing.Optional[list[huggingface_hub._webhooks_payload.WebhookPayloadUpdatedRef]] = None"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_payload.py#L130"}}),te=new T({props:{title:"WebhookPayloadComment",local:"huggingface_hub.WebhookPayloadComment",headingTag:"h3"}}),ne=new j({props:{name:"class huggingface_hub.WebhookPayloadComment",anchor:"huggingface_hub.WebhookPayloadComment",parameters:[{name:"id",val:": str"},{name:"author",val:": ObjectId"},{name:"hidden",val:": bool"},{name:"content",val:": typing.Optional[str] = None"},{name:"url",val:": WebhookPayloadUrl"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_payload.py#L95"}}),se=new T({props:{title:"WebhookPayloadDiscussion",local:"huggingface_hub.WebhookPayloadDiscussion",headingTag:"h3"}}),re=new j({props:{name:"class huggingface_hub.WebhookPayloadDiscussion",anchor:"huggingface_hub.WebhookPayloadDiscussion",parameters:[{name:"id",val:": str"},{name:"num",val:": int"},{name:"author",val:": ObjectId"},{name:"url",val:": WebhookPayloadUrl"},{name:"title",val:": str"},{name:"isPullRequest",val:": bool"},{name:"status",val:": typing.Literal['closed', 'draft', 'open', 'merged']"},{name:"changes",val:": typing.Optional[huggingface_hub._webhooks_payload.WebhookPayloadDiscussionChanges] = None"},{name:"pinned",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_payload.py#L102"}}),ie=new T({props:{title:"WebhookPayloadDiscussionChanges",local:"huggingface_hub.WebhookPayloadDiscussionChanges",headingTag:"h3"}}),ge=new j({props:{name:"class huggingface_hub.WebhookPayloadDiscussionChanges",anchor:"huggingface_hub.WebhookPayloadDiscussionChanges",parameters:[{name:"base",val:": str"},{name:"mergeCommitId",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_payload.py#L90"}}),ue=new T({props:{title:"WebhookPayloadEvent",local:"huggingface_hub.WebhookPayloadEvent",headingTag:"h3"}}),de=new j({props:{name:"class huggingface_hub.WebhookPayloadEvent",anchor:"huggingface_hub.WebhookPayloadEvent",parameters:[{name:"action",val:": typing.Literal['create', 'delete', 'move', 'update']"},{name:"scope",val:": str"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_payload.py#L85"}}),ce=new T({props:{title:"WebhookPayloadMovedTo",local:"huggingface_hub.WebhookPayloadMovedTo",headingTag:"h3"}}),me=new j({props:{name:"class huggingface_hub.WebhookPayloadMovedTo",anchor:"huggingface_hub.WebhookPayloadMovedTo",parameters:[{name:"name",val:": str"},{name:"owner",val:": ObjectId"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_payload.py#L76"}}),fe=new T({props:{title:"WebhookPayloadRepo",local:"huggingface_hub.WebhookPayloadRepo",headingTag:"h3"}}),ke=new j({props:{name:"class huggingface_hub.WebhookPayloadRepo",anchor:"huggingface_hub.WebhookPayloadRepo",parameters:[{name:"id",val:": str"},{name:"owner",val:": ObjectId"},{name:"head_sha",val:": typing.Optional[str] = None"},{name:"name",val:": str"},{name:"private",val:": bool"},{name:"subdomain",val:": typing.Optional[str] = None"},{name:"tags",val:": typing.Optional[list[str]] = None"},{name:"type",val:": typing.Literal['dataset', 'model', 'space']"},{name:"url",val:": WebhookPayloadUrl"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_payload.py#L113"}}),$e=new T({props:{title:"WebhookPayloadUrl",local:"huggingface_hub.WebhookPayloadUrl",headingTag:"h3"}}),ve=new j({props:{name:"class huggingface_hub.WebhookPayloadUrl",anchor:"huggingface_hub.WebhookPayloadUrl",parameters:[{name:"web",val:": str"},{name:"api",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_payload.py#L71"}}),we=new T({props:{title:"WebhookPayloadWebhook",local:"huggingface_hub.WebhookPayloadWebhook",headingTag:"h3"}}),We=new j({props:{name:"class huggingface_hub.WebhookPayloadWebhook",anchor:"huggingface_hub.WebhookPayloadWebhook",parameters:[{name:"id",val:": str"},{name:"version",val:": typing.Literal[3]"}],source:"https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/_webhooks_payload.py#L81"}}),Ue=new ct({props:{source:"https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/package_reference/webhooks_server.md"}}),{c(){c=l("meta"),w=n(),b=l("p"),W=n(),i(P.$$.fragment),$=n(),i(C.$$.fragment),Je=n(),J=l("p"),J.innerHTML=Ga,He=n(),x=l("blockquote"),x.innerHTML=Ea,Ye=n(),L=l("blockquote"),L.innerHTML=Ja,Ze=n(),i(H.$$.fragment),Qe=n(),Y=l("p"),Y.innerHTML=Ha,Be=n(),i(Z.$$.fragment),Ae=n(),_=l("div"),i(Q.$$.fragment),fa=n(),Te=l("p"),Te.innerHTML=Ya,ya=n(),Pe=l("p"),Pe.innerHTML=Za,ka=n(),je=l("p"),je.innerHTML=Qa,$a=n(),B=l("blockquote"),B.innerHTML=Ba,_a=n(),A=l("blockquote"),A.innerHTML=Aa,va=n(),i(S.$$.fragment),Re=n(),i(R.$$.fragment),Ne=n(),f=l("div"),i(N.$$.fragment),wa=n(),Ce=l("p"),Ce.innerHTML=Ra,Ma=n(),Ie=l("p"),Ie.innerHTML=Na,Wa=n(),xe=l("p"),xe.innerHTML=Oa,Ua=n(),O=l("blockquote"),O.innerHTML=Fa,Ta=n(),F=l("blockquote"),F.innerHTML=Xa,Pa=n(),Le=l("p"),Le.textContent=qa,ja=n(),i(G.$$.fragment),Ca=n(),Se=l("p"),Se.textContent=Da,Ia=n(),i(E.$$.fragment),Oe=n(),i(X.$$.fragment),Fe=n(),q=l("p"),q.innerHTML=Va,Xe=n(),D=l("p"),D.innerHTML=za,qe=n(),V=l("div"),i(z.$$.fragment),De=n(),i(K.$$.fragment),Ve=n(),ee=l("div"),i(ae.$$.fragment),ze=n(),i(te.$$.fragment),Ke=n(),oe=l("div"),i(ne.$$.fragment),ea=n(),i(se.$$.fragment),aa=n(),le=l("div"),i(re.$$.fragment),ta=n(),i(ie.$$.fragment),oa=n(),he=l("div"),i(ge.$$.fragment),na=n(),i(ue.$$.fragment),sa=n(),pe=l("div"),i(de.$$.fragment),la=n(),i(ce.$$.fragment),ra=n(),be=l("div"),i(me.$$.fragment),ia=n(),i(fe.$$.fragment),ha=n(),ye=l("div"),i(ke.$$.fragment),ga=n(),i($e.$$.fragment),ua=n(),_e=l("div"),i(ve.$$.fragment),pa=n(),i(we.$$.fragment),da=n(),Me=l("div"),i(We.$$.fragment),ca=n(),i(Ue.$$.fragment),ba=n(),Ge=l("p"),this.h()},l(e){const a=pt("svelte-u9bgzb",document.head);c=r(a,"META",{name:!0,content:!0}),a.forEach(t),w=s(e),b=r(e,"P",{}),U(b).forEach(t),W=s(e),h(P.$$.fragment,e),$=s(e),h(C.$$.fragment,e),Je=s(e),J=r(e,"P",{"data-svelte-h":!0}),v(J)!=="svelte-1aa8i1a"&&(J.innerHTML=Ga),He=s(e),x=r(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),v(x)!=="svelte-14cicyf"&&(x.innerHTML=Ea),Ye=s(e),L=r(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),v(L)!=="svelte-yzysvm"&&(L.innerHTML=Ja),Ze=s(e),h(H.$$.fragment,e),Qe=s(e),Y=r(e,"P",{"data-svelte-h":!0}),v(Y)!=="svelte-1ocv8du"&&(Y.innerHTML=Ha),Be=s(e),h(Z.$$.fragment,e),Ae=s(e),_=r(e,"DIV",{class:!0});var M=U(_);h(Q.$$.fragment,M),fa=s(M),Te=r(M,"P",{"data-svelte-h":!0}),v(Te)!=="svelte-131oi8i"&&(Te.innerHTML=Ya),ya=s(M),Pe=r(M,"P",{"data-svelte-h":!0}),v(Pe)!=="svelte-17g55j7"&&(Pe.innerHTML=Za),ka=s(M),je=r(M,"P",{"data-svelte-h":!0}),v(je)!=="svelte-1tzqmi6"&&(je.innerHTML=Qa),$a=s(M),B=r(M,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),v(B)!=="svelte-1an35tm"&&(B.innerHTML=Ba),_a=s(M),A=r(M,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),v(A)!=="svelte-dwx3yh"&&(A.innerHTML=Aa),va=s(M),h(S.$$.fragment,M),M.forEach(t),Re=s(e),h(R.$$.fragment,e),Ne=s(e),f=r(e,"DIV",{class:!0});var y=U(f);h(N.$$.fragment,y),wa=s(y),Ce=r(y,"P",{"data-svelte-h":!0}),v(Ce)!=="svelte-mk1ugk"&&(Ce.innerHTML=Ra),Ma=s(y),Ie=r(y,"P",{"data-svelte-h":!0}),v(Ie)!=="svelte-o3rrqw"&&(Ie.innerHTML=Na),Wa=s(y),xe=r(y,"P",{"data-svelte-h":!0}),v(xe)!=="svelte-r8ecsk"&&(xe.innerHTML=Oa),Ua=s(y),O=r(y,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),v(O)!=="svelte-1kbi1dw"&&(O.innerHTML=Fa),Ta=s(y),F=r(y,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),v(F)!=="svelte-a1wf5j"&&(F.innerHTML=Xa),Pa=s(y),Le=r(y,"P",{"data-svelte-h":!0}),v(Le)!=="svelte-a86ntl"&&(Le.textContent=qa),ja=s(y),h(G.$$.fragment,y),Ca=s(y),Se=r(y,"P",{"data-svelte-h":!0}),v(Se)!=="svelte-t28ynx"&&(Se.textContent=Da),Ia=s(y),h(E.$$.fragment,y),y.forEach(t),Oe=s(e),h(X.$$.fragment,e),Fe=s(e),q=r(e,"P",{"data-svelte-h":!0}),v(q)!=="svelte-jhwv2r"&&(q.innerHTML=Va),Xe=s(e),D=r(e,"P",{"data-svelte-h":!0}),v(D)!=="svelte-es7vl3"&&(D.innerHTML=za),qe=s(e),V=r(e,"DIV",{class:!0});var Ee=U(V);h(z.$$.fragment,Ee),Ee.forEach(t),De=s(e),h(K.$$.fragment,e),Ve=s(e),ee=r(e,"DIV",{class:!0});var Ka=U(ee);h(ae.$$.fragment,Ka),Ka.forEach(t),ze=s(e),h(te.$$.fragment,e),Ke=s(e),oe=r(e,"DIV",{class:!0});var et=U(oe);h(ne.$$.fragment,et),et.forEach(t),ea=s(e),h(se.$$.fragment,e),aa=s(e),le=r(e,"DIV",{class:!0});var at=U(le);h(re.$$.fragment,at),at.forEach(t),ta=s(e),h(ie.$$.fragment,e),oa=s(e),he=r(e,"DIV",{class:!0});var tt=U(he);h(ge.$$.fragment,tt),tt.forEach(t),na=s(e),h(ue.$$.fragment,e),sa=s(e),pe=r(e,"DIV",{class:!0});var ot=U(pe);h(de.$$.fragment,ot),ot.forEach(t),la=s(e),h(ce.$$.fragment,e),ra=s(e),be=r(e,"DIV",{class:!0});var nt=U(be);h(me.$$.fragment,nt),nt.forEach(t),ia=s(e),h(fe.$$.fragment,e),ha=s(e),ye=r(e,"DIV",{class:!0});var st=U(ye);h(ke.$$.fragment,st),st.forEach(t),ga=s(e),h($e.$$.fragment,e),ua=s(e),_e=r(e,"DIV",{class:!0});var lt=U(_e);h(ve.$$.fragment,lt),lt.forEach(t),pa=s(e),h(we.$$.fragment,e),da=s(e),Me=r(e,"DIV",{class:!0});var rt=U(Me);h(We.$$.fragment,rt),rt.forEach(t),ca=s(e),h(Ue.$$.fragment,e),ba=s(e),Ge=r(e,"P",{}),U(Ge).forEach(t),this.h()},h(){k(c,"name","hf:doc:metadata"),k(c,"content",kt),k(x,"class","tip"),k(L,"class","warning"),k(B,"class","warning"),k(A,"class","warning"),k(_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(O,"class","warning"),k(F,"class","warning"),k(f,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,a){m(document.head,c),o(e,w,a),o(e,b,a),o(e,W,a),g(P,e,a),o(e,$,a),g(C,e,a),o(e,Je,a),o(e,J,a),o(e,He,a),o(e,x,a),o(e,Ye,a),o(e,L,a),o(e,Ze,a),g(H,e,a),o(e,Qe,a),o(e,Y,a),o(e,Be,a),g(Z,e,a),o(e,Ae,a),o(e,_,a),g(Q,_,null),m(_,fa),m(_,Te),m(_,ya),m(_,Pe),m(_,ka),m(_,je),m(_,$a),m(_,B),m(_,_a),m(_,A),m(_,va),g(S,_,null),o(e,Re,a),g(R,e,a),o(e,Ne,a),o(e,f,a),g(N,f,null),m(f,wa),m(f,Ce),m(f,Ma),m(f,Ie),m(f,Wa),m(f,xe),m(f,Ua),m(f,O),m(f,Ta),m(f,F),m(f,Pa),m(f,Le),m(f,ja),g(G,f,null),m(f,Ca),m(f,Se),m(f,Ia),g(E,f,null),o(e,Oe,a),g(X,e,a),o(e,Fe,a),o(e,q,a),o(e,Xe,a),o(e,D,a),o(e,qe,a),o(e,V,a),g(z,V,null),o(e,De,a),g(K,e,a),o(e,Ve,a),o(e,ee,a),g(ae,ee,null),o(e,ze,a),g(te,e,a),o(e,Ke,a),o(e,oe,a),g(ne,oe,null),o(e,ea,a),g(se,e,a),o(e,aa,a),o(e,le,a),g(re,le,null),o(e,ta,a),g(ie,e,a),o(e,oa,a),o(e,he,a),g(ge,he,null),o(e,na,a),g(ue,e,a),o(e,sa,a),o(e,pe,a),g(de,pe,null),o(e,la,a),g(ce,e,a),o(e,ra,a),o(e,be,a),g(me,be,null),o(e,ia,a),g(fe,e,a),o(e,ha,a),o(e,ye,a),g(ke,ye,null),o(e,ga,a),g($e,e,a),o(e,ua,a),o(e,_e,a),g(ve,_e,null),o(e,pa,a),g(we,e,a),o(e,da,a),o(e,Me,a),g(We,Me,null),o(e,ca,a),g(Ue,e,a),o(e,ba,a),o(e,Ge,a),ma=!0},p(e,[a]){const M={};a&2&&(M.$$scope={dirty:a,ctx:e}),S.$set(M);const y={};a&2&&(y.$$scope={dirty:a,ctx:e}),G.$set(y);const Ee={};a&2&&(Ee.$$scope={dirty:a,ctx:e}),E.$set(Ee)},i(e){ma||(u(P.$$.fragment,e),u(C.$$.fragment,e),u(H.$$.fragment,e),u(Z.$$.fragment,e),u(Q.$$.fragment,e),u(S.$$.fragment,e),u(R.$$.fragment,e),u(N.$$.fragment,e),u(G.$$.fragment,e),u(E.$$.fragment,e),u(X.$$.fragment,e),u(z.$$.fragment,e),u(K.$$.fragment,e),u(ae.$$.fragment,e),u(te.$$.fragment,e),u(ne.$$.fragment,e),u(se.$$.fragment,e),u(re.$$.fragment,e),u(ie.$$.fragment,e),u(ge.$$.fragment,e),u(ue.$$.fragment,e),u(de.$$.fragment,e),u(ce.$$.fragment,e),u(me.$$.fragment,e),u(fe.$$.fragment,e),u(ke.$$.fragment,e),u($e.$$.fragment,e),u(ve.$$.fragment,e),u(we.$$.fragment,e),u(We.$$.fragment,e),u(Ue.$$.fragment,e),ma=!0)},o(e){p(P.$$.fragment,e),p(C.$$.fragment,e),p(H.$$.fragment,e),p(Z.$$.fragment,e),p(Q.$$.fragment,e),p(S.$$.fragment,e),p(R.$$.fragment,e),p(N.$$.fragment,e),p(G.$$.fragment,e),p(E.$$.fragment,e),p(X.$$.fragment,e),p(z.$$.fragment,e),p(K.$$.fragment,e),p(ae.$$.fragment,e),p(te.$$.fragment,e),p(ne.$$.fragment,e),p(se.$$.fragment,e),p(re.$$.fragment,e),p(ie.$$.fragment,e),p(ge.$$.fragment,e),p(ue.$$.fragment,e),p(de.$$.fragment,e),p(ce.$$.fragment,e),p(me.$$.fragment,e),p(fe.$$.fragment,e),p(ke.$$.fragment,e),p($e.$$.fragment,e),p(ve.$$.fragment,e),p(we.$$.fragment,e),p(We.$$.fragment,e),p(Ue.$$.fragment,e),ma=!1},d(e){e&&(t(w),t(b),t(W),t($),t(Je),t(J),t(He),t(x),t(Ye),t(L),t(Ze),t(Qe),t(Y),t(Be),t(Ae),t(_),t(Re),t(Ne),t(f),t(Oe),t(Fe),t(q),t(Xe),t(D),t(qe),t(V),t(De),t(Ve),t(ee),t(ze),t(Ke),t(oe),t(ea),t(aa),t(le),t(ta),t(oa),t(he),t(na),t(sa),t(pe),t(la),t(ra),t(be),t(ia),t(ha),t(ye),t(ga),t(ua),t(_e),t(pa),t(da),t(Me),t(ca),t(ba),t(Ge)),t(c),d(P,e),d(C,e),d(H,e),d(Z,e),d(Q),d(S),d(R,e),d(N),d(G),d(E),d(X,e),d(z),d(K,e),d(ae),d(te,e),d(ne),d(se,e),d(re),d(ie,e),d(ge),d(ue,e),d(de),d(ce,e),d(me),d(fe,e),d(ke),d($e,e),d(ve),d(we,e),d(We),d(Ue,e)}}}const kt='{"title":"Webhooks Server","local":"webhooks-server","sections":[{"title":"Server","local":"server","sections":[{"title":"WebhooksServer","local":"huggingface_hub.WebhooksServer","sections":[],"depth":3},{"title":"@webhook_endpoint","local":"huggingface_hub.webhook_endpoint","sections":[],"depth":3}],"depth":2},{"title":"Payload","local":"huggingface_hub.WebhookPayload","sections":[{"title":"WebhookPayload","local":"huggingface_hub.WebhookPayload","sections":[],"depth":3},{"title":"WebhookPayloadComment","local":"huggingface_hub.WebhookPayloadComment","sections":[],"depth":3},{"title":"WebhookPayloadDiscussion","local":"huggingface_hub.WebhookPayloadDiscussion","sections":[],"depth":3},{"title":"WebhookPayloadDiscussionChanges","local":"huggingface_hub.WebhookPayloadDiscussionChanges","sections":[],"depth":3},{"title":"WebhookPayloadEvent","local":"huggingface_hub.WebhookPayloadEvent","sections":[],"depth":3},{"title":"WebhookPayloadMovedTo","local":"huggingface_hub.WebhookPayloadMovedTo","sections":[],"depth":3},{"title":"WebhookPayloadRepo","local":"huggingface_hub.WebhookPayloadRepo","sections":[],"depth":3},{"title":"WebhookPayloadUrl","local":"huggingface_hub.WebhookPayloadUrl","sections":[],"depth":3},{"title":"WebhookPayloadWebhook","local":"huggingface_hub.WebhookPayloadWebhook","sections":[],"depth":3}],"depth":2}],"depth":1}';function $t(I){return ht(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Pt extends gt{constructor(c){super(),ut(this,c,$t,yt,it,{})}}export{Pt as component};
