PageSourceSearch

https://static.compdf.com/assets/compdfkit/BYcAC9sn.js

js compdf.com collected 2026-09-24 17:46:24 UTC 3,464 bytes, 1 lines download raw bytes

1import{_ as W,a as N,b as j}from"./CzrSZTkf.js";import{_ as q,a as K}from"./BzPBVbTP.js";import{_ as O}from"./CCT_6l-w.js";import{_ as Y}from"./Oj_LILtE.js";import{d as Z,u as J,aq as Q,D as X,dD as L,E as ee,B as te,o as ne,k as oe,f as ae,v as n,H as se,I as le,i as o,g as p,t as ie,U as ce,n as V,l as e,e as re,Z as de,P as ue,_ as pe}from"./CLJNb8Rk.js";import{i as ge}from"./cFvG6zJ3.js";import"./B6kLx2Jr.js";import"./BCSV0ZCi.js";import"./Cy3dBbSh.js";import"./8nTD8BlH.js";import"./BHIbOJzg.js";import"./Dh4uePor.js";const fe={class:"tip lg:max-w-320px lg:h-72px lg:text-sm lg:px-24px lg:py-16px <lg:max-w-237px <lg:h-64px <lg:text-12px <lg:leading-16px"},me={class:"text-center text-white"},ve=Z({__name:"pdf-layer",setup(_e){const{locale:g,t:D}=J(),x=Q(),E=X().public,U=L[g.value].title,B=L[g.value].description,I=ee(U,B);te(I);const c=e(),z=e(!1),b=e(),f=e(!1),l=e(null),m=e(80),y=e(),P=e(!1),r=e(0),A=e("Standalone"),k=e(!1),G={"zh-cn":"zh-CN","zh-tw":"zh-TW",ja:"ja",th:"th",en:"en",ko:"en"};ne(()=>{let a=localStorage.getItem("lastUsedBackend");A.value=a||"Standalone",ge.init({pdfUrl:"https://static.compdf.com/files/ComPDFKit_Layers_Sample_File.pdf",license:E.key,path:"/",webFontURL:"https://static.compdf.com/fonts/",enableDefaultFont:!0,renderLayerPermission:!0,css:"/css/webview.css"},c.value).then(t=>{const{docViewer:d,UI:s,changeFile:u}=t;l.value=d,l.value&&(l.value.changeFile=u),s.setLanguage(G[g.value]),s.setHeaderItems(w=>{w.getHeader("rightHeaders").splice(0,1,{type:"actionButton",icon:"OpenFile",text:D("webview.open"),onClick:()=>{if(!H.value.access_token){h(!0);return}u()}})}),d.addEvent("documentloaded",async()=>{s.openElement("leftPanel"),s.setActiveElementTab("leftPanel","LAYER")})}),document.body.style.overflow="hidden",v(),addEventListener("resize",v),addEventListener("orientationchange",v)});const S=()=>{if(!H.value.access_token){h(!0);return}l.value&&(l.value.changeFile(),f.value=!1)};de("changeFile",S);const R=()=>{window.innerWidth<=930?c.value.style.height=window.outerHeight-m.value-r.value+"px":c.value.style.height="",y.value.style.height=window.outerHeight-m.value-r.value+"px",b.value.style.height=window.outerHeight-r.value+"px"},v=()=>{r.value=window.outerHeight-window.innerHeight,m.value=window.innerWidth>=930?80:67,R()},H=oe(()=>ue().user),i=e(!1),_=e(!1),h=a=>{_.value=a,i.value=!0},$=()=>{i.value=!1,_.value?S():window.open(x("/dashboard/overview"),"_blank"),_.value=!1};return(a,t)=>{const d=j,s=q,u=O,w=K,C=W,M=Y,T=N;return re(),ae("div",{class:"poppins flex flex-col overflow-hidden",ref_key:"container",ref:b},[n(d),se(p("div",fe,[p("span",me,ie(a.$t("webview.tip")),1)],512),[[le,o(z)]]),n(s,{onLogin:t[0]||(t[0]=F=>h(!1)),link:o(x)("/guides/pdf-sdk/web/overview"),showTip:!0,goContact:!0},null,8,["link"]),n(u,{modelValue:o(i),"onUpdate:modelValue":t[1]||(t[1]=F=>ce(i)?i.value=F:null),onSuccess:$},null,8,["modelValue"]),p("div",{class:"lg:flex lg:flex-1 lg:p-16px lg:pt-0 lg:gap-12px lg:bg-[#E5ECFF]",ref_key:"viewerContainer",ref:y},[n(w,{activeType:"view"}),n(C,{class:V(o(f)?"":"<lg:hidden lg:flex")},null,8,["class"]),n(M,{platform:"7",dialogVisible:o(P)},null,8,["dialogVisible"]),p("div",{id:"webviewer",ref_key:"viewer",ref:c,class:V(["bg-[#fff] rounded-8px overflow-hidden",o(f)?"<lg:hidden":""])},null,2),n(T,{showGuide:o(k),"onUpdate:closeGuide":t[2]||(t[2]=()=>k.value=!1)},null,8,["showGuide"])],512)],512)}}}),De=pe(ve,[["__scopeId","data-v-6cb3ca82"]]);export{De as default};

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.