PageSourceSearch

https://media.lordicon.com/assets/js/account-license.page.C7ez0Tbg.js

js lordicon.com collected 2026-09-24 08:31:06 UTC 5,258 bytes, 31 lines download raw bytes

1import{y as m,z as f,w as g,I as p,x as d,B as b,O as h,_ as w,a as S,H as L,T as E,S as _,k as x}from"./chunks/ui.NkqJAWMk.js";import{F as k}from"./chunks/form.hO27CKo8.js";import{B as T}from"./chunks/interfaces.rDC8GnQd.js";import{u as A}from"./chunks/use-blocks.BMpCx3em.js";import{s as O}from"./chunks/sidebar.partial.DfHbBlD5.js";import"./chunks/use-forms.CvN7xnEc.js";const C='@charset "UTF-8";:host{display:contents}:host .main{display:flex;flex-direction:column;gap:var(--space-xm)}:host .bottom{display:flex;flex-direction:row;align-items:center;gap:var(--space-xm)}:host .bottom li-button{flex:1}p{margin:0;word-break:break-word}b,strong{font-weight:600}a{text-decoration:none;color:var(--color-green-300)}a:hover{color:var(--color-green-500);text-decoration:underline}a:active{color:var(--color-green-700)}ul,ol{padding:0;margin:0;list-style:none}::selection{color:var(--color-navy-300);background:var(--color-green-200)}';var D=Object.defineProperty,I=Object.getOwnPropertyDescriptor,c=(i,t,s,o)=>{for(var e=o>1?void 0:o?I(t,s):t,n=i.length-1,r;n>=0;n--)(r=i[n])&&(e=(o?r(t,s,e):r(e))||e);return o&&e&&D(t,s,e),e};let a=class extends m{constructor(){super(...arguments),this.error=!1,this.collections=[]}async open(){await this.dialog.open({mask:!0,width:450,placement:"center"})}render(){const i=o=>{this.dispatchEvent(new CustomEvent("close"))},t=async o=>{o.preventDefault();const e=this.collection.value,n=this.persona.value.trim(),r=this.personb.value.trim();if(!e){this.error=!0,this.toastService?.show("Please select collection.");return}const u=this.collections.find(l=>l.id===e)?.title,v=(await this.httpService.get(`/api/library/collection-icons/${e}`)).map(l=>[l.family,l.style,l.index,l.name].join("-"));await this.dialog.close();const y=new CustomEvent("result",{detail:{title:u,icons:v,personA:{name:n,email:SITE_SESSION?.user?.email},personB:{name:r}}});this.dispatchEvent(y)},s=this.collections.map(o=>({value:o.id,title:o.title}));return f`
2            <li-dialog id="dialog" caption="Generate license" @close=${i}>
3                <div class="main">
4                    <p>
5                        Select the icon collection for which you want to generate a license document
6                        (you can generate a license only for collections you have created).
7                    </p>
8
9                    <li-field-select
10                        .items=${s}
11                        placeholder="Select"
12                        label="Select collection"
13                    ></li-field-select>
14
15                    <li-field-text
16                        id="persona"
17                        placeholder="Type here"
18                        label="Name of your company"
19                    ></li-field-text>
20
21                    <li-field-text
22                        id="personb"
23                        placeholder="Type here"
24                        label="Client name"
25                    ></li-field-text>
26
27                    <li-button class="primary editor expand" @click=${t}>Generate</li-button>
28                </div>
29            </li-dialog>
30        `}};a.styles=g(C);c([p("#dialog",!0)],a.prototype,"dialog",2);c([p("#persona",!0)],a.prototype,"persona",2);c([p("#personb",!0)],a.prototype,"personb",2);c([p("li-field-select",!0)],a.prototype,"collection",2);c([d({attribute:!1})],a.prototype,"httpService",2);c([d({attribute:!1})],a.prototype,"toastService",2);c([d({type:Boolean})],a.prototype,"error",2);c([d({type:Array})],a.prototype,"collections",2);a=c([b("li-dialog-collection-license")],a);async function P(i,t,s){const o=await i.get("/api/client/collections"),e=new a;e.httpService=i,e.toastService=t,e.collections=o.reduce((n,r)=>(r.collections.length&&n.push(...r.collections),n),[]),await h.instance.assign(e),e.addEventListener("close",()=>{h.instance.release(e)}),e.addEventListener("result",n=>{s(n.detail)}),e.open()}async function B(i,t,s,o,e){const{prepareLicense:n}=await w(async()=>{const{prepareLicense:r}=await import("./chunks/pdf.BVm_sOWB.js").then(u=>u.p);return{prepareLicense:r}},[]);n(i,t,s,o,e)}class K{constructor(t,s,o){this.http=t,this.toastService=s,this.statsService=o}onBlocksReady(t){if(t instanceof HTMLElement)switch(t.id){case"activate-key":this.initActivateKey(t);break;case"generate-license":this.initGenerateLicense(t);break}}initActivateKey(t){const s=new k(t.querySelector("form"));s.on("send",o=>{this.activateLicenseKey(s,o.key)})}initGenerateLicense(t){t.querySelector("#generate")?.addEventListener("click",async o=>{o.preventDefault(),this.statsService.track("collections_license_pdf"),P(this.http,this.toastService,async e=>{B(e.title,e.icons,e.personA,e.personB,new Date)})})}async activateLicenseKey(t,s){try{switch(t.busy=!0,(await this.http.post("/api/plan/license",{key:s})).status){case"INVALID":this.toastService.show("Invalid license code.");break;case"ENDED":this.toastService.show("Ended license code.");break;case"USED":this.toastService.show("Already used license code.");break;case"OK":window.location.href=x.WELCOME;break}}catch(o){this.toastService.showError(o)}finally{t.busy=!1}}}async function M(i){O();const t=new S(i);t.bindInjectable(K,[L,E,_],{tag:T}),A(t)}export{M as default};
31//# sourceMappingURL=account-license.page.C7ez0Tbg.js.map

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.