mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
3 lines
35 KiB
JavaScript
3 lines
35 KiB
JavaScript
import{d as we,s as w,h as D,v as G,o as g,c as x,j as e,t as n,F as N,E as O,a2 as m,a3 as R,a4 as Y,e as I,a5 as f,a as ge,a6 as F,p as xe,l as me,_ as he}from"./framework.gjrnbxUT.js";const ye={support:{BSD:"wip"},type:"external","arg-type":"custom",source:"amqp","lib-depends":["librabbitmq"],"ext-depends-windows":["openssl"]},ve={type:"external",source:"apcu"},fe={type:"builtin"},ze={type:"builtin","arg-type-unix":"with-prefix","arg-type-windows":"with","lib-depends":["bzip2"]},Se={type:"builtin"},De={type:"builtin"},Be={notes:!0,type:"builtin","arg-type":"with","lib-depends":["curl"],"ext-depends-windows":["zlib","openssl"]},ke={type:"builtin","arg-type":"custom","lib-suggests":["qdbm"]},qe={support:{BSD:"wip"},type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2","zlib"],"ext-depends-windows":["xml"]},Ee={type:"external",source:"ext-ds"},We={support:{Windows:"wip",BSD:"wip",Darwin:"wip",Linux:"wip"},type:"wip"},Ce={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-event","arg-type":"custom","lib-depends":["libevent"],"ext-depends":["openssl"],"ext-suggests":["sockets"]},Ie={type:"builtin"},Pe={support:{Linux:"no",BSD:"wip"},notes:!0,"arg-type":"custom",type:"builtin","lib-depends-unix":["libffi"],"lib-depends-windows":["libffi-win"]},_e={type:"builtin"},Ue={type:"builtin"},Le={type:"builtin","lib-suggests":["openssl"]},$e={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["zlib","libpng"],"ext-depends":["zlib"],"lib-suggests":["libavif","libwebp","libjpeg","freetype"]},Ne={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["gettext"]},Oe={support:{Windows:"wip",BSD:"no",Linux:"no"},notes:!0,type:"external","arg-type":"custom",source:"ext-glfw","lib-depends":["glfw"],"lib-depends-windows":[]},Ve={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["gmp"]},Ae={support:{BSD:"wip"},type:"external",source:"ext-gmssl","lib-depends":["gmssl"]},Te={support:{Windows:"wip",BSD:"wip"},type:"external",source:"grpc","arg-type-unix":"custom","cpp-extension":!0,"lib-depends":["grpc"]},je={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"with","lib-depends-unix":["libiconv"],"lib-depends-windows":["libiconv-win"]},Ge={support:{BSD:"wip"},type:"external",source:"igbinary","ext-suggests":["session","apcu"]},Xe={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-imagick","arg-type":"custom","lib-depends":["imagemagick"]},Me={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"ext-imap","arg-type":"custom","lib-depends":["imap"],"ext-suggests":["openssl"]},He={support:{Windows:"no",BSD:"wip",Darwin:"no"},type:"external",source:"inotify"},Re={support:{Windows:"no",BSD:"wip"},type:"builtin","lib-depends":["icu"]},Fe={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["ldap"],"lib-suggests":["gmp","libsodium"],"ext-suggests":["openssl"]},Ze={support:{BSD:"wip"},type:"builtin","arg-type":"none","ext-depends":["xml"]},Qe={type:"builtin","arg-type":"custom","ext-depends":["mbstring"],"lib-depends":["onig"]},Ke={type:"builtin","arg-type":"custom"},Ye={type:"wip",support:{Windows:"no",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},Je={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-memcache","arg-type":"custom","lib-depends":["zlib"],"ext-depends":["session"]},es={support:{Windows:"wip",BSD:"wip",Linux:"no"},type:"external",source:"memcached","arg-type":"custom","cpp-extension":!0,"lib-depends":["libmemcached"],"ext-depends":["session","zlib"]},ss={support:{BSD:"wip",Windows:"wip"},type:"external",source:"mongodb","arg-type":"custom","lib-suggests":["icu","openssl","zstd","zlib"]},is={support:{BSD:"wip"},type:"external",source:"msgpack","arg-type-unix":"with","arg-type-win":"enable"},ls={type:"builtin","arg-type":"with","ext-depends":["mysqlnd"]},ts={type:"builtin","arg-type-windows":"with","lib-depends":["zlib"]},ns={type:"wip",support:{Windows:"wip",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},os={type:"builtin","arg-type-unix":"custom"},as={notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["openssl","zlib"],"ext-depends":["zlib"]},ds={support:{BSD:"wip"},notes:!0,type:"external",source:"parallel","arg-type-windows":"with","lib-depends-windows":["pthreads4w"]},us={support:{Windows:"no"},type:"builtin","unix-only":!0},ps={type:"builtin"},cs={type:"builtin","arg-type":"with","ext-depends":["pdo","mysqlnd"]},rs={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","ext-depends":["pdo","pgsql"],"lib-depends":["postgresql"]},bs={support:{BSD:"wip"},type:"builtin","arg-type":"with","ext-depends":["pdo","sqlite3"],"lib-depends":["sqlite"]},ws={support:{BSD:"wip"},type:"external",source:"pdo_sqlsrv","arg-type":"with","ext-depends":["pdo","sqlsrv"]},gs={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","lib-depends":["postgresql"]},xs={type:"builtin","ext-depends":["zlib"]},ms={support:{Windows:"no"},type:"builtin","unix-only":!0},hs={support:{Windows:"wip",BSD:"wip"},type:"external",source:"protobuf"},ys={support:{BSD:"wip",Darwin:"partial"},notes:!0,type:"external",source:"rar","cpp-extension":!0},vs={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["readline"]},fs={support:{BSD:"wip"},type:"external",source:"redis","arg-type":"custom","ext-suggests":["session","igbinary"],"lib-suggests-unix":["zstd","liblz4"]},zs={type:"builtin"},Ss={type:"builtin"},Ds={type:"external",source:"ext-simdjson","cpp-extension":!0},Bs={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},ks={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-snappy","cpp-extension":!0,"arg-type":"custom","lib-depends":["snappy"],"ext-suggests":["apcu"]},qs={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},Es={type:"builtin"},Ws={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with","lib-depends":["libsodium"]},Cs={support:{BSD:"wip",Windows:"no"},notes:!0,type:"external",source:"spx","arg-type":"custom","lib-depends":["zlib"]},Is={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"with","lib-depends":["sqlite"]},Ps={support:{BSD:"wip"},type:"external",source:"sqlsrv","lib-depends-unix":["unixodbc"],"ext-depends-linux":["pcntl"],"cpp-extension":!0},_s={support:{BSD:"wip"},type:"external",source:"ext-ssh2","arg-type":"with-prefix","arg-type-windows":"with","lib-depends":["libssh2"],"ext-depends-windows":["openssl","zlib"]},Us={support:{Windows:"no",BSD:"wip"},notes:!0,type:"external",source:"swoole","arg-type":"custom","cpp-extension":!0,"unix-only":!0,"lib-depends":["libcares","brotli","nghttp2","zlib"],"ext-depends":["openssl","curl"],"ext-suggests":["swoole-hook-pgsql","swoole-hook-mysql","swoole-hook-sqlite"]},Ls={support:{BSD:"wip"},notes:!0,type:"external",source:"swow","arg-type":"custom","lib-suggests":["openssl","curl"],"ext-suggests":["openssl","curl"]},$s={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},Ns={support:{Windows:"no",BSD:"wip"},type:"builtin","unix-only":!0},Os={support:{BSD:"wip"},type:"builtin"},Vs={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["tidy"]},As={type:"builtin"},Ts={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uuid","arg-type":"with-prefix","lib-depends":["libuuid"]},js={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-uv","arg-type":"with-prefix","lib-depends":["libuv"],"ext-depends":["sockets"]},Gs={type:"builtin",support:{Windows:"wip",BSD:"no",Darwin:"no",Linux:"no"},notes:!0},Xs={support:{Windows:"wip",BSD:"wip"},notes:!0,type:"external",source:"xhprof","ext-depends":["ctype"]},Ms={support:{Windows:"wip",BSD:"wip"},type:"external",source:"xlswriter","arg-type":"custom","ext-depends":["zlib","zip"],"lib-suggests":["openssl"]},Hs={support:{BSD:"wip"},notes:!0,type:"builtin","arg-type":"custom","arg-type-windows":"with","lib-depends":["libxml2"],"ext-depends-windows":["iconv"]},Rs={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml","dom"]},Fs={support:{BSD:"wip"},type:"builtin","arg-type":"custom","lib-depends":["libxml2"],"ext-depends-windows":["xml"]},Zs={support:{Windows:"wip",BSD:"wip"},type:"builtin","arg-type":"with-prefix","lib-depends":["libxslt"],"ext-depends":["xml","dom"]},Qs={support:{BSD:"wip"},type:"external",source:"yac","arg-type-unix":"custom","ext-depends-unix":["igbinary"]},Ks={support:{BSD:"wip"},type:"external",source:"yaml","arg-type-unix":"with-prefix","arg-type-windows":"with","lib-depends":["libyaml"]},Ys={support:{BSD:"wip"},type:"builtin","arg-type":"with-prefix","arg-type-windows":"enable","lib-depends-unix":["libzip"],"ext-depends-windows":["zlib","bz2"],"lib-depends-windows":["libzip","zlib","bzip2","xz"]},Js={type:"builtin","arg-type":"custom","arg-type-windows":"enable","lib-depends":["zlib"]},ei={support:{Windows:"wip",BSD:"wip"},type:"external",source:"ext-zstd","arg-type":"custom","lib-depends":["zstd"]},si={amqp:ye,apcu:ve,bcmath:fe,bz2:ze,calendar:Se,ctype:De,curl:Be,dba:ke,dom:qe,ds:Ee,enchant:We,event:Ce,exif:Ie,ffi:Pe,fileinfo:_e,filter:Ue,ftp:Le,gd:$e,gettext:Ne,glfw:Oe,gmp:Ve,gmssl:Ae,grpc:Te,iconv:je,igbinary:Ge,imagick:Xe,imap:Me,inotify:He,intl:Re,ldap:Fe,libxml:Ze,mbregex:Qe,mbstring:Ke,mcrypt:Ye,memcache:Je,memcached:es,mongodb:ss,msgpack:is,mysqli:ls,mysqlnd:ts,oci8:ns,opcache:os,openssl:as,parallel:ds,"password-argon2":{support:{Windows:"wip",BSD:"wip"},notes:!0,type:"builtin","arg-type":"with-prefix","lib-depends":["libargon2"]},pcntl:us,pdo:ps,pdo_mysql:cs,pdo_pgsql:rs,pdo_sqlite:bs,pdo_sqlsrv:ws,pgsql:gs,phar:xs,posix:ms,protobuf:hs,rar:ys,readline:vs,redis:fs,session:zs,shmop:Ss,simdjson:Ds,simplexml:Bs,snappy:ks,soap:qs,sockets:Es,sodium:Ws,spx:Cs,sqlite3:Is,sqlsrv:Ps,ssh2:_s,swoole:Us,"swoole-hook-mysql":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["mysqlnd","pdo","pdo_mysql"],"ext-suggests":["mysqli"]},"swoole-hook-pgsql":{support:{Windows:"no",BSD:"wip",Darwin:"partial"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["pgsql","pdo"]},"swoole-hook-sqlite":{support:{Windows:"no",BSD:"wip"},notes:!0,type:"addon","arg-type":"custom","ext-depends":["sqlite3","pdo"]},swow:Ls,sysvmsg:$s,sysvsem:Ns,sysvshm:Os,tidy:Vs,tokenizer:As,uuid:Ts,uv:js,xdebug:Gs,xhprof:Xs,xlswriter:Ms,xml:Hs,xmlreader:Rs,xmlwriter:Fs,xsl:Zs,yac:Qs,yaml:Ks,zip:Ys,zlib:Js,zstd:ei},ii={source:"brotli","static-libs-unix":["libbrotlidec.a","libbrotlienc.a","libbrotlicommon.a"],"static-libs-windows":["brotlicommon.lib","brotlienc.lib","brotlidec.lib"],headers:["brotli"]},li={source:"bzip2","static-libs-unix":["libbz2.a"],"static-libs-windows":["libbz2.lib","libbz2_a.lib"],headers:["bzlib.h"]},ti={source:"curl","static-libs-unix":["libcurl.a"],"static-libs-windows":["libcurl_a.lib"],headers:["curl"],"lib-depends-unix":["openssl","zlib"],"lib-depends-windows":["openssl","zlib","libssh2","nghttp2"],"lib-suggests-unix":["libssh2","brotli","nghttp2","zstd","libcares"],"lib-suggests-windows":["brotli","zstd"],frameworks:["CoreFoundation","CoreServices","SystemConfiguration"]},ni={source:"freetype","static-libs-unix":["libfreetype.a"],"static-libs-windows":["libfreetype_a.lib"],"headers-unix":["freetype2/freetype/freetype.h","freetype2/ft2build.h"],"lib-depends":["zlib"],"lib-suggests":["libpng","bzip2","brotli"]},oi={source:"gettext","static-libs-unix":["libintl.a"],"lib-depends":["libiconv"],"lib-suggests":["ncurses","libxml2"],frameworks:["CoreFoundation"]},ai={source:"ext-glfw","static-libs-unix":["libglfw3.a"],frameworks:["CoreVideo","OpenGL","Cocoa","IOKit"]},di={source:"gmp","static-libs-unix":["libgmp.a"],"static-libs-windows":["libgmp.lib"],headers:["gmp.h"]},ui={source:"gmssl","static-libs-unix":["libgmssl.a"],"static-libs-windows":["gmssl.lib"],frameworks:["Security"]},pi={source:"grpc","static-libs-unix":["libgrpc.a","libboringssl.a","libcares.a"],"lib-depends":["zlib","openssl"],frameworks:["CoreFoundation"]},ci={source:"icu","cpp-library":!0,"static-libs-unix":["libicui18n.a","libicuio.a","libicuuc.a","libicudata.a"]},ri={source:"imagemagick","static-libs-unix":["libMagick++-7.Q16HDRI.a","libMagickWand-7.Q16HDRI.a","libMagickCore-7.Q16HDRI.a"],"lib-depends":["zlib","libpng","libjpeg","libwebp","freetype","libtiff"],"lib-suggests":["zstd","xz","bzip2","libzip","libxml2"]},bi={source:"imap","static-libs-unix":["libc-client.a"],"lib-suggests":["openssl"]},wi={source:"ldap","static-libs-unix":["liblber.a","libldap.a"],"lib-depends":["openssl","zlib","gmp","libsodium"]},gi={source:"libargon2","static-libs-unix":["libargon2.a"]},xi={source:"libavif","static-libs-unix":["libavif.a"],"static-libs-windows":["avif.lib"]},mi={source:"libcares","static-libs-unix":["libcares.a"],"headers-unix":["ares.h","ares_dns.h","ares_nameser.h","ares_rules.h"]},hi={source:"libevent","static-libs-unix":["libevent.a","libevent_core.a","libevent_extra.a","libevent_openssl.a"],"lib-depends":["openssl"]},yi={source:"libffi","static-libs-unix":["libffi.a"],"static-libs-windows":["libffi.lib"],"headers-unix":["ffi.h","ffitarget.h"],"headers-windows":["ffi.h","fficonfig.h","ffitarget.h"]},vi={source:"libiconv","static-libs-unix":["libiconv.a","libcharset.a"],headers:["iconv.h","libcharset.h","localcharset.h"]},fi={source:"libjpeg","static-libs-unix":["libjpeg.a","libturbojpeg.a"],"static-libs-windows":["libjpeg_a.lib"],"lib-suggests-windows":["zlib"]},zi={source:"liblz4","static-libs-unix":["liblz4.a"]},Si={source:"libmemcached","static-libs-unix":["libmemcached.a","libmemcachedutil.a"]},Di={source:"libpng","static-libs-unix":["libpng16.a"],"static-libs-windows":["libpng16_static.lib","libpng_a.lib"],"headers-unix":["png.h","pngconf.h","pnglibconf.h"],"headers-windows":["png.h","pngconf.h"],"lib-depends":["zlib"]},Bi={source:"librabbitmq","static-libs-unix":["librabbitmq.a"],"static-libs-windows":["rabbitmq.4.lib"],"lib-depends":["openssl"]},ki={source:"libsodium","static-libs-unix":["libsodium.a"]},qi={source:"libssh2","static-libs-unix":["libssh2.a"],"static-libs-windows":["libssh2.lib"],headers:["libssh2.h","libssh2_publickey.h","libssh2_sftp.h"],"lib-depends":["openssl"],"lib-suggests":["zlib"]},Ei={source:"libtiff","static-libs-unix":["libtiff.a"]},Wi={source:"libuuid","static-libs-unix":["libuuid.a"],headers:["uuid/uuid.h"]},Ci={source:"libuv","static-libs-unix":["libuv.a"]},Ii={source:"libwebp","static-libs-unix":["libwebp.a","libwebpdecoder.a","libwebpdemux.a","libwebpmux.a","libsharpyuv.a"],"static-libs-windows":["libwebp.lib","libwebpdecoder.lib","libwebpdemux.lib","libsharpyuv.lib"]},Pi={source:"libxml2","static-libs-unix":["libxml2.a"],"static-libs-windows":["libxml2s.lib","libxml2_a.lib"],headers:["libxml2"],"lib-depends-unix":["libiconv"],"lib-suggests-unix":["xz","icu","zlib"],"lib-depends-windows":["libiconv-win"],"lib-suggests-windows":["zlib"]},_i={source:"libxslt","static-libs-unix":["libxslt.a","libexslt.a"],"lib-depends":["libxml2"]},Ui={source:"libyaml","static-libs-unix":["libyaml.a"],"static-libs-windows":["yaml.lib"],headers:["yaml.h"]},Li={source:"libzip","static-libs-unix":["libzip.a"],"static-libs-windows":["zip.lib","libzip_a.lib"],headers:["zip.h","zipconf.h"],"lib-depends-unix":["zlib"],"lib-suggests-unix":["bzip2","xz","zstd","openssl"],"lib-depends-windows":["zlib","bzip2","xz"],"lib-suggests-windows":["zstd","openssl"]},$i={source:"ncurses","static-libs-unix":["libncurses.a"]},Ni={source:"nghttp2","static-libs-unix":["libnghttp2.a"],"static-libs-windows":["nghttp2.lib"],headers:["nghttp2"],"lib-depends":["zlib","openssl"],"lib-suggests":["libxml2"]},Oi={source:"onig","static-libs-unix":["libonig.a"],"static-libs-windows":["onig.lib","onig_a.lib"],headers:["oniggnu.h","oniguruma.h"]},Vi={source:"openssl","static-libs-unix":["libssl.a","libcrypto.a"],"static-libs-windows":["libssl.lib","libcrypto.lib"],headers:["openssl"],"lib-depends":["zlib"]},Ai={source:"postgresql","static-libs-unix":["libpq.a","libpgport.a","libpgcommon.a"],"lib-depends":["libiconv","libxml2","openssl","zlib","readline"],"lib-suggests":["icu","libxslt","ldap","zstd"]},Ti={source:"pthreads4w","static-libs-windows":["libpthreadVC3.lib"]},ji={source:"qdbm","static-libs-unix":["libqdbm.a"],"static-libs-windows":["qdbm_a.lib"],"headers-windows":["depot.h"]},Gi={source:"readline","static-libs-unix":["libreadline.a"],"lib-depends":["ncurses"]},Xi={source:"snappy","static-libs-unix":["libsnappy.a"],"headers-unix":["snappy.h","snappy-c.h","snappy-sinksource.h","snappy-stubs-public.h"],"lib-depends":["zlib"]},Mi={source:"sqlite","static-libs-unix":["libsqlite3.a"],"static-libs-windows":["libsqlite3_a.lib"],headers:["sqlite3.h","sqlite3ext.h"]},Hi={source:"tidy","static-libs-unix":["libtidy.a"]},Ri={source:"unixodbc","static-libs-unix":["libodbc.a","libodbccr.a","libodbcinst.a"],"lib-depends":["libiconv"]},Fi={source:"xz","static-libs-unix":["liblzma.a"],"static-libs-windows":["lzma.lib","liblzma_a.lib"],"headers-unix":["lzma"],"headers-windows":["lzma","lzma.h"],"lib-depends-unix":["libiconv"]},Zi={source:"zlib","static-libs-unix":["libz.a"],"static-libs-windows":["zlib_a.lib"],headers:["zlib.h","zconf.h"]},Qi={source:"zstd","static-libs-unix":["libzstd.a"],"static-libs-windows":[["zstd.lib","zstd_static.lib"]],"headers-unix":["zdict.h","zstd.h","zstd_errors.h"],"headers-windows":["zstd.h","zstd_errors.h"]},Ki={brotli:ii,bzip2:li,curl:ti,freetype:ni,gettext:oi,glfw:ai,gmp:di,gmssl:ui,grpc:pi,icu:ci,imagemagick:ri,imap:bi,ldap:wi,libargon2:gi,libavif:xi,libcares:mi,libevent:hi,libffi:yi,"libffi-win":{source:"libffi-win","static-libs-windows":["libffi.lib"],"headers-windows":["ffi.h","ffitarget.h","fficonfig.h"]},libiconv:vi,"libiconv-win":{source:"libiconv-win","static-libs-windows":["libiconv.lib","libiconv_a.lib"]},libjpeg:fi,liblz4:zi,libmemcached:Si,libpng:Di,librabbitmq:Bi,libsodium:ki,libssh2:qi,libtiff:Ei,libuuid:Wi,libuv:Ci,libwebp:Ii,libxml2:Pi,libxslt:_i,libyaml:Ui,libzip:Li,ncurses:$i,nghttp2:Ni,onig:Oi,openssl:Vi,"pkg-config":{source:"pkg-config"},postgresql:Ai,pthreads4w:Ti,qdbm:ji,readline:Gi,snappy:Xi,sqlite:Mi,tidy:Hi,unixodbc:Ri,xz:Fi,zlib:Zi,zstd:Qi};function _(s,t,d,a){return s.os==="linux"?s[t][d][a+"-linux"]??s[t][d][a+"-unix"]??s[t][d][a]??[]:s.os==="macos"?s[t][d][a+"-macos"]??s[t][d][a+"-unix"]??s[t][d][a]??[]:s.os==="windows"?s[t][d][a+"-windows"]??s[t][d][a]??[]:[]}function J(s,t){return _(s,"ext",t,"ext-depends")}function Yi(s,t){return _(s,"ext",t,"ext-suggests")}function Ji(s,t){return _(s,"ext",t,"lib-depends")}function el(s,t){return _(s,"ext",t,"lib-suggests")}function ee(s,t){return _(s,"lib",t,"lib-depends")}function sl(s,t){return _(s,"lib",t,"lib-suggests")}function il(s,t){const d=[],a=new Set,h=[];t.forEach(S=>{a.has(S)||nl(s,S,a,d)});const z=[];return d.forEach(S=>{t.indexOf(S)===-1&&h.push(S),[...Ji(s,S),...el(s,S)].forEach(o=>{z.indexOf(o)===-1&&z.push(o)})}),{exts:d,libs:ll(s,z),notIncludedExts:h}}function ll(s,t){const d=[],a=new Set;return t.forEach(h=>{a.has(h)||(console.log("before visited"),console.log(a),tl(s,h,a,d),console.log("after visited"),console.log(a))}),d}function tl(s,t,d,a){if(d.has(t))return;d.add(t),[...ee(s,t),...sl(s,t)].forEach(z=>{se(s,z,d,a)}),a.push(t)}function se(s,t,d,a){d.has(t)||(d.add(t),ee(s,t).forEach(h=>{se(s,h,d,a)}),a.push(t))}function ie(s,t,d,a){d.has(d)||(d.add(t),J(s,t).forEach(h=>{ie(s,h,d,a)}),a.push(t))}function nl(s,t,d,a){if(d.has(t))return;d.add(t),[...J(s,t),...Yi(s,t)].forEach(z=>{ie(s,z,d,a)}),a.push(t)}const E=s=>(xe("data-v-8ccd28bf"),s=s(),me(),s),ol={class:"option-line"},al=["id","value","disabled"],dl=["for"],ul={class:"option-line"},pl=E(()=>e("option",{value:"x86_64"},"x86_64",-1)),cl=["disabled"],rl={class:"box"},bl=E(()=>e("br",null,null,-1)),wl={class:"ext-item"},gl=["id","value","disabled"],xl=["for"],ml={style:{color:"orangered","font-weight":"bolder"}},hl={class:"details custom-block",open:""},yl={class:"box"},vl={class:"ext-item"},fl=["id","value","disabled"],zl=["for"],Sl={class:"tip custom-block"},Dl=E(()=>e("p",{class:"custom-block-title"},"TIP",-1)),Bl={class:"box"},kl={class:"ext-item"},ql=["id","value"],El=["for"],Wl={key:1,class:"warning custom-block"},Cl=E(()=>e("p",{class:"custom-block-title"},"WARNING",-1)),Il={key:2,class:"warning custom-block"},Pl=E(()=>e("p",{class:"custom-block-title"},"WARNING",-1)),_l={value:"native"},Ul={value:"spc"},Ll={key:0,value:"docker"},$l=["value"],Nl={for:"debug-yes"},Ol={for:"debug-no"},Vl={for:"zts-yes"},Al={for:"zts-no"},Tl={for:"show-download-yes"},jl={for:"show-download-no"},Gl={for:"pre-built-yes"},Xl={for:"pre-built-no"},Ml={key:0},Hl={for:"upx-yes"},Rl={for:"upx-no"},Fl=["placeholder"],Zl={key:3,class:"command-container"},Ql={key:0,class:"command-preview"},Kl=E(()=>e("br",null,null,-1)),Yl={key:1},Jl={class:"warning custom-block"},et=E(()=>e("p",{class:"custom-block-title"},"WARNING",-1)),st=E(()=>e("a",{href:"https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe",target:"_blank"},"https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-windows-x64.exe",-1)),it={key:4,class:"command-container"},lt={id:"download-ext-cmd",class:"command-preview"},tt={key:5,class:"command-container"},nt={id:"download-all-cmd",class:"command-preview"},ot={key:6,class:"command-container"},at={id:"download-pkg-cmd",class:"command-preview"},dt={class:"command-container"},ut={id:"build-cmd",class:"command-preview"},pt={name:"CliGenerator"},ct=we({...pt,props:{lang:{type:String,default:"zh"}},setup(s){const t=w(si),d=D(()=>{const p=[];for(const[l,i]of Object.entries(t.value))S(l,c.value)&&p.push(l);return p}),a=w(Ki),h=w([]),z=[{os:"linux",label:"Linux",disabled:!1},{os:"macos",label:"macOS",disabled:!1},{os:"windows",label:"Windows",disabled:!1}],S=(p,l)=>{var b,q;const r=new Map([["linux","Linux"],["macos","Darwin"],["windows","Windows"]]).get(l),u=((q=(b=t.value[p])==null?void 0:b.support)==null?void 0:q[r])??"yes";return u==="yes"||u==="partial"},Z=["7.4","8.0","8.1","8.2","8.3"],o={zh:{selectExt:"选择扩展",buildTarget:"选择编译目标",buildOptions:"编译选项",buildEnvironment:"编译环境",buildEnvNative:"本地构建(Git 源码)",buildEnvSpc:"本地构建(独立 spc 二进制)",buildEnvDocker:"Alpine Docker 构建",useDebug:"是否开启调试输出",yes:"是",no:"否",resultShow:"结果展示",selectCommon:"选择常用扩展",selectNone:"全部取消选择",useZTS:"是否编译线程安全版",hardcodedINI:"硬编码 INI 选项",hardcodedINIPlacehoder:"如需要硬编码 ini,每行写一个,例如:memory_limit=2G",resultShowDownload:"是否展示仅下载对应扩展依赖的命令",downloadExtOnlyCommand:"只下载对应扩展的依赖包命令",downloadAllCommand:"下载所有依赖包命令",downloadUPXCommand:"下载 UPX 命令",compileCommand:"编译命令",downloadPhpVersion:"下载 PHP 版本",downloadSPCBinaryCommand:"下载 spc 二进制命令",selectedArch:"选择系统架构",selectedSystem:"选择操作系统",buildLibs:"要构建的库",depTips:"选择扩展后,不可选中的项目为必需的依赖,编译的依赖库列表中可选的为现有扩展和依赖库的可选依赖。选择可选依赖后,将生成 --with-libs 参数。",microUnavailable:"micro 不支持 PHP 7.4 及更早版本!",windowsSAPIUnavailable:"Windows 目前不支持 fpm、embed 构建!",useUPX:"是否开启 UPX 压缩(减小二进制体积)",windowsDownSPCWarning:"Windows 下请手动下载 spc.exe 二进制文件,解压到当前目录并重命名为 spc.exe!",usePreBuilt:"如果可能,下载预编译的依赖库(减少编译时间)"},en:{selectExt:"Select Extensions",buildTarget:"Build Target",buildOptions:"Build Options",buildEnvironment:"Build Environment",buildEnvNative:"Native build (Git source code)",buildEnvSpc:"Native build (standalone spc binary)",buildEnvDocker:"Alpine docker build",useDebug:"Enable debug message",yes:"Yes",no:"No",resultShow:"Result",selectCommon:"Select common extensions",selectNone:"Unselect all",useZTS:"Enable ZTS",hardcodedINI:"Hardcoded INI options",hardcodedINIPlacehoder:"If you need to hardcode ini, write one per line, for example: memory_limit=2G",resultShowDownload:"Download with corresponding extension dependencies",downloadExtOnlyCommand:"Download sources by extensions command",downloadAllCommand:"Download all sources command",downloadUPXCommand:"Download UPX command",compileCommand:"Compile command",downloadPhpVersion:"Download PHP version",downloadSPCBinaryCommand:"Download spc binary command",selectedArch:"Select build architecture",selectedSystem:"Select Build OS",buildLibs:"Select Dependencies",depTips:"After selecting the extensions, the unselectable items are essential dependencies. In the compiled dependencies list, optional dependencies consist of existing extensions and optional dependencies of libraries. Optional dependencies will be added in --with-libs parameter.",microUnavailable:"Micro does not support PHP 7.4 and earlier versions!",windowsSAPIUnavailable:"Windows does not support fpm and embed build!",useUPX:"Enable UPX compression (reduce binary size)",windowsDownSPCWarning:"Please download the binary file manually, extract it to the current directory and rename to spc.exe on Windows!",usePreBuilt:"Download pre-built dependencies if possible (reduce compile time)"}},le=["cli","fpm","micro","embed","all"],te=()=>{y.value=["apcu","bcmath","calendar","ctype","curl","dba","dom","exif","filter","fileinfo","gd","iconv","intl","mbstring","mbregex","mysqli","mysqlnd","openssl","opcache","pcntl","pdo","pdo_mysql","pdo_sqlite","pdo_pgsql","pgsql","phar","posix","readline","redis","session","simplexml","sockets","sodium","sqlite3","tokenizer","xml","xmlreader","xmlwriter","xsl","zip","zlib"]},Q=D(()=>y.value.join(",")),ne=D(()=>{const p=B.value.filter(l=>V.value.indexOf(l)===-1);return p.length>0?' --with-libs="'+p.join(",")+'"':""}),y=w([]),B=w([]),X=w([]),V=w([]),v=w(["cli"]),A=w("spc"),U=w("8.2"),k=w(0),L=w(0),$=w(1),P=w(1),W=w(0),M=w(""),c=w("linux");G(c,()=>{c.value==="windows"&&(T.value="x86_64")});const T=w("x86_64"),j=D(()=>{switch(A.value){case"native":return"bin/spc";case"spc":return c.value==="windows"?".\\spc.exe":"./spc";case"docker":return"bin/spc-alpine-docker";default:return""}}),K=w("--build-cli"),oe=D(()=>{const p=M.value.split(`
|
||
`);let l=[];return p.forEach(i=>{i.indexOf("=")>=1&&l.push(i)})," "+l.map(i=>'-I "'+i+'"').join(" ")}),C=w(""),H=(p,l)=>p.includes(C.value)?l===0?p.substring(0,p.indexOf(C.value)):l===1?C.value:p.substring(p.indexOf(C.value)+C.value.length):l===0?p:"",ae=p=>{let l;v.value.indexOf("all")!==-1&&p.target.value==="all"?v.value=["all"]:(l=v.value.indexOf("all"))!==-1&&p.target.value!=="all"&&v.value.splice(l,1),K.value=v.value.map(i=>"--build-"+i).join(" ")},de=p=>{const l=new Set,i=r=>{let u=[];if(c.value==="linux"){if(u=t.value[r]["ext-depends-linux"]??t.value[r]["ext-depends-unix"]??t.value[r]["ext-depends"]??[],u.length===0)return}else if(c.value==="macos"){if(u=t.value[r]["ext-depends-macos"]??t.value[r]["ext-depends-unix"]??t.value[r]["ext-depends"]??[],u.length===0)return}else if(c.value==="windows"&&(u=t.value[r]["ext-depends-windows"]??t.value[r]["ext-depends"]??[],u.length===0))return;u.forEach(b=>{l.add(b),i(b)})};return p.forEach(r=>{i(r)}),Array.from(l)},ue=D(()=>`${j.value} download --all --with-php=${U.value}${P.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),pe=D(()=>`${j.value} download --with-php=${U.value} --for-extensions "${Q.value}"${P.value?" --prefer-pre-built":""}${k.value?" --debug":""}`),ce=D(()=>`${j.value} install-pkg upx${k.value?" --debug":""}`),re=D(()=>`${j.value} build ${K.value} "${Q.value}"${ne.value}${k.value?" --debug":""}${L.value?" --enable-zts":""}${W.value?" --with-upx-pack":""}${oe.value}`),be=p=>{const l=new Set,i=u=>{let b=[];if(c.value==="linux"){if(b=a.value[u]["lib-depends-linux"]??a.value[u]["lib-depends-unix"]??a.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="macos"){if(b=a.value[u]["lib-depends-macos"]??a.value[u]["lib-depends-unix"]??a.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="windows"&&(b=a.value[u]["lib-depends-windows"]??a.value[u]["lib-depends"]??[],b.length===0))return;b.forEach(q=>{l.add(q),i(q)})},r=u=>{let b=[];if(c.value==="linux"){if(b=t.value[u]["lib-depends-linux"]??t.value[u]["lib-depends-unix"]??t.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="macos"){if(b=t.value[u]["lib-depends-macos"]??t.value[u]["lib-depends-unix"]??t.value[u]["lib-depends"]??[],b.length===0)return}else if(c.value==="windows"&&(b=t.value[u]["lib-depends-windows"]??t.value[u]["lib-depends"]??[],b.length===0))return;b.forEach(q=>{l.add(q),i(q)})};return p.forEach(u=>{r(u)}),Array.from(l)};return G(c,()=>y.value=[]),G(c,()=>W.value=0),G(y,p=>{X.value=de(p),X.value.forEach(i=>{y.value.indexOf(i)===-1&&y.value.push(i)}),y.value.sort(),console.log("检测到变化!"),console.log(p);const l=il({ext:t.value,lib:a.value,os:c.value},y.value);h.value=l.libs.sort(),B.value=[],V.value=be(l.exts),V.value.forEach(i=>{B.value.indexOf(i)===-1&&B.value.push(i)})}),(p,l)=>(g(),x("div",null,[e("h2",null,n(o[s.lang].selectedSystem),1),e("div",ol,[(g(),x(N,null,O(z,(i,r)=>e("span",{key:r,style:{"margin-right":"8px"}},[m(e("input",{type:"radio",id:"os-"+i.os,value:i.os,disabled:i.disabled===!0,"onUpdate:modelValue":l[0]||(l[0]=u=>c.value=u)},null,8,al),[[f,c.value]]),e("label",{for:"os-"+i.os},n(i.label),9,dl)])),64))]),e("div",ul,[m(e("select",{"onUpdate:modelValue":l[1]||(l[1]=i=>T.value=i)},[pl,e("option",{value:"aarch64",disabled:c.value==="windows"},"aarch64",8,cl)],512),[[R,T.value]])]),e("h2",null,n(o[s.lang].selectExt)+n(y.value.length>0?" ("+y.value.length+")":""),1),e("div",rl,[m(e("input",{class:"input","onUpdate:modelValue":l[2]||(l[2]=i=>C.value=i),placeholder:"Highlight search..."},null,512),[[Y,C.value]]),bl,(g(!0),x(N,null,O(d.value,i=>(g(),x("div",wl,[e("span",null,[m(e("input",{type:"checkbox",id:i,value:i,"onUpdate:modelValue":l[3]||(l[3]=r=>y.value=r),disabled:X.value.indexOf(i)!==-1},null,8,gl),[[F,y.value]]),e("label",{for:i},[e("span",null,n(H(i,0)),1),e("span",ml,n(H(i,1)),1),e("span",null,n(H(i,2)),1)],8,xl)])]))),256))]),c.value!=="windows"?(g(),x("div",{key:0,class:"my-btn",onClick:te},n(o[s.lang].selectCommon),1)):I("",!0),e("div",{class:"my-btn",onClick:l[4]||(l[4]=i=>y.value=[])},n(o[s.lang].selectNone),1),e("details",hl,[e("summary",null,n(o[s.lang].buildLibs)+n(B.value.length>0?" ("+B.value.length+")":""),1),e("div",yl,[(g(!0),x(N,null,O(h.value,(i,r)=>(g(),x("div",vl,[m(e("input",{type:"checkbox",id:r,value:i,"onUpdate:modelValue":l[5]||(l[5]=u=>B.value=u),disabled:V.value.indexOf(i)!==-1},null,8,fl),[[F,B.value]]),e("label",{for:r},n(i),9,zl)]))),256))])]),e("div",Sl,[Dl,e("p",null,n(o[s.lang].depTips),1)]),e("h2",null,n(o[s.lang].buildTarget),1),e("div",Bl,[(g(),x(N,null,O(le,i=>e("div",kl,[m(e("input",{type:"checkbox",id:"build_"+i,value:i,"onUpdate:modelValue":l[6]||(l[6]=r=>v.value=r),onChange:ae},null,40,ql),[[F,v.value]]),e("label",{for:"build_"+i},n(i),9,El)])),64))]),U.value==="7.4"&&(v.value.indexOf("micro")!==-1||v.value.indexOf("all")!==-1)?(g(),x("div",Wl,[Cl,e("p",null,n(o[s.lang].microUnavailable),1)])):I("",!0),c.value==="windows"&&(v.value.indexOf("fpm")!==-1||v.value.indexOf("embed")!==-1)?(g(),x("div",Il,[Pl,e("p",null,n(o[s.lang].windowsSAPIUnavailable),1)])):I("",!0),e("h2",null,n(o[s.lang].buildOptions),1),e("table",null,[e("tr",null,[e("td",null,n(o[s.lang].buildEnvironment),1),e("td",null,[m(e("select",{"onUpdate:modelValue":l[7]||(l[7]=i=>A.value=i)},[e("option",_l,n(o[s.lang].buildEnvNative),1),e("option",Ul,n(o[s.lang].buildEnvSpc),1),c.value!=="windows"?(g(),x("option",Ll,n(o[s.lang].buildEnvDocker),1)):I("",!0)],512),[[R,A.value]])])]),e("tr",null,[e("td",null,n(o[s.lang].downloadPhpVersion),1),e("td",null,[m(e("select",{"onUpdate:modelValue":l[8]||(l[8]=i=>U.value=i)},[(g(),x(N,null,O(Z,i=>e("option",{value:i},n(i),9,$l)),64))],512),[[R,U.value]])])]),e("tr",null,[e("td",null,n(o[s.lang].useDebug),1),e("td",null,[m(e("input",{type:"radio",id:"debug-yes",value:1,"onUpdate:modelValue":l[9]||(l[9]=i=>k.value=i)},null,512),[[f,k.value]]),e("label",Nl,n(o[s.lang].yes),1),m(e("input",{type:"radio",id:"debug-no",value:0,"onUpdate:modelValue":l[10]||(l[10]=i=>k.value=i)},null,512),[[f,k.value]]),e("label",Ol,n(o[s.lang].no),1)])]),e("tr",null,[e("td",null,n(o[s.lang].useZTS),1),e("td",null,[m(e("input",{type:"radio",id:"zts-yes",value:1,"onUpdate:modelValue":l[11]||(l[11]=i=>L.value=i)},null,512),[[f,L.value]]),e("label",Vl,n(o[s.lang].yes),1),m(e("input",{type:"radio",id:"zts-no",value:0,"onUpdate:modelValue":l[12]||(l[12]=i=>L.value=i)},null,512),[[f,L.value]]),e("label",Al,n(o[s.lang].no),1)])]),e("tr",null,[e("td",null,n(o[s.lang].resultShowDownload),1),e("td",null,[m(e("input",{type:"radio",id:"show-download-yes",value:1,"onUpdate:modelValue":l[13]||(l[13]=i=>$.value=i)},null,512),[[f,$.value]]),e("label",Tl,n(o[s.lang].yes),1),m(e("input",{type:"radio",id:"show-download-no",value:0,"onUpdate:modelValue":l[14]||(l[14]=i=>$.value=i)},null,512),[[f,$.value]]),e("label",jl,n(o[s.lang].no),1)])]),e("tr",null,[e("td",null,n(o[s.lang].usePreBuilt),1),e("td",null,[m(e("input",{type:"radio",id:"pre-built-yes",value:1,"onUpdate:modelValue":l[15]||(l[15]=i=>P.value=i)},null,512),[[f,P.value]]),e("label",Gl,n(o[s.lang].yes),1),m(e("input",{type:"radio",id:"pre-built-no",value:0,"onUpdate:modelValue":l[16]||(l[16]=i=>P.value=i)},null,512),[[f,P.value]]),e("label",Xl,n(o[s.lang].no),1)])]),c.value!=="macos"?(g(),x("tr",Ml,[e("td",null,n(o[s.lang].useUPX),1),e("td",null,[m(e("input",{type:"radio",id:"upx-yes",value:1,"onUpdate:modelValue":l[17]||(l[17]=i=>W.value=i)},null,512),[[f,W.value]]),e("label",Hl,n(o[s.lang].yes),1),m(e("input",{type:"radio",id:"upx-no",value:0,"onUpdate:modelValue":l[18]||(l[18]=i=>W.value=i)},null,512),[[f,W.value]]),e("label",Rl,n(o[s.lang].no),1)])])):I("",!0)]),e("h2",null,n(o[s.lang].hardcodedINI),1),m(e("textarea",{class:"textarea",placeholder:o[s.lang].hardcodedINIPlacehoder,"onUpdate:modelValue":l[19]||(l[19]=i=>M.value=i),rows:"5"},null,8,Fl),[[Y,M.value]]),e("h2",null,n(o[s.lang].resultShow),1),A.value==="spc"?(g(),x("div",Zl,[e("b",null,n(o[s.lang].downloadSPCBinaryCommand),1),c.value!=="windows"?(g(),x("div",Ql,[ge(" curl -fsSL -o spc.tgz https://dl.static-php.dev/static-php-cli/spc-bin/nightly/spc-"+n(c.value)+"-"+n(T.value)+".tar.gz && tar -zxvf spc.tgz && rm spc.tgz",1),Kl])):(g(),x("div",Yl,[e("div",Jl,[et,e("p",null,n(o[s.lang].windowsDownSPCWarning),1),st])]))])):I("",!0),$.value?(g(),x("div",it,[e("b",null,n(o[s.lang].downloadExtOnlyCommand),1),e("div",lt,n(pe.value),1)])):(g(),x("div",tt,[e("b",null,n(o[s.lang].downloadAllCommand),1),e("div",nt,n(ue.value),1)])),W.value?(g(),x("div",ot,[e("b",null,n(o[s.lang].downloadUPXCommand),1),e("div",at,n(ce.value),1)])):I("",!0),e("div",dt,[e("b",null,n(o[s.lang].compileCommand),1),e("div",ut,n(re.value),1)])]))}}),bt=he(ct,[["__scopeId","data-v-8ccd28bf"]]);export{bt as C};
|