From 55e4056f9f5905f60d382a1300af0d975ecf45f5 Mon Sep 17 00:00:00 2001 From: Kalyax Date: Wed, 9 Nov 2022 14:16:14 +0100 Subject: [PATCH] arthur essaye sur ton pc stp --- api/light.php | 5 ----- api/set_light.php | 5 +++++ assets/index.153d7b9d.js | 2 ++ assets/index.8b2241a3.css | 1 + index.html | 40 +++++++++++++++++++++++++++++++++++++++ index.php | 4 ---- scripts/led.sh | 2 ++ 7 files changed, 50 insertions(+), 9 deletions(-) delete mode 100644 api/light.php create mode 100644 api/set_light.php create mode 100644 assets/index.153d7b9d.js create mode 100644 assets/index.8b2241a3.css create mode 100644 index.html delete mode 100755 index.php diff --git a/api/light.php b/api/light.php deleted file mode 100644 index 879c44e..0000000 --- a/api/light.php +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/api/set_light.php b/api/set_light.php new file mode 100644 index 0000000..428905f --- /dev/null +++ b/api/set_light.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/assets/index.153d7b9d.js b/assets/index.153d7b9d.js new file mode 100644 index 0000000..07f5c8c --- /dev/null +++ b/assets/index.153d7b9d.js @@ -0,0 +1,2 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerpolicy&&(i.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?i.credentials="include":s.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function ue(e,t){return function(){return e.apply(t,arguments)}}const{toString:le}=Object.prototype,{getPrototypeOf:W}=Object,K=(e=>t=>{const n=le.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),S=e=>(e=e.toLowerCase(),t=>K(t)===e),k=e=>t=>typeof t===e,{isArray:_}=Array,z=k("undefined");function ge(e){return e!==null&&!z(e)&&e.constructor!==null&&!z(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const fe=S("ArrayBuffer");function Ce(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&fe(e.buffer),t}const Fe=k("string"),P=k("function"),de=k("number"),he=e=>e!==null&&typeof e=="object",De=e=>e===!0||e===!1,U=e=>{if(K(e)!=="object")return!1;const t=W(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},_e=S("Date"),Le=S("File"),Be=S("Blob"),Ue=S("FileList"),je=e=>he(e)&&P(e.pipe),ke=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||le.call(e)===t||P(e.toString)&&e.toString()===t)},Me=S("URLSearchParams"),Ie=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function M(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),_(e))for(r=0,s=e.length;r{U(e[r])&&U(n)?e[r]=J(e[r],n):U(n)?e[r]=J({},n):_(n)?e[r]=n.slice():e[r]=n};for(let n=0,r=arguments.length;n(M(t,(s,i)=>{n&&P(s)?e[i]=ue(s,n):e[i]=s},{allOwnKeys:r}),e),qe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ze=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Je=(e,t,n,r)=>{let s,i,o;const u={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!u[o]&&(t[o]=e[o],u[o]=!0);e=n!==!1&&W(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ve=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},$e=e=>{if(!e)return null;if(_(e))return e;let t=e.length;if(!de(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},We=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&W(Uint8Array)),Ke=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Xe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Qe=S("HTMLFormElement"),Ye=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),G=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ge=S("RegExp"),pe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};M(n,(s,i)=>{t(s,i,e)!==!1&&(r[i]=s)}),Object.defineProperties(e,r)},Ze=e=>{pe(e,(t,n)=>{const r=e[n];if(!!P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not read-only method '"+n+"'")})}})},ve=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return _(e)?r(e):r(String(e).split(t)),n},et=()=>{},tt=(e,t)=>(e=+e,Number.isFinite(e)?e:t),a={isArray:_,isArrayBuffer:fe,isBuffer:ge,isFormData:ke,isArrayBufferView:Ce,isString:Fe,isNumber:de,isBoolean:De,isObject:he,isPlainObject:U,isUndefined:z,isDate:_e,isFile:Le,isBlob:Be,isRegExp:Ge,isFunction:P,isStream:je,isURLSearchParams:Me,isTypedArray:We,isFileList:Ue,forEach:M,merge:J,extend:He,trim:Ie,stripBOM:qe,inherits:ze,toFlatObject:Je,kindOf:K,kindOfTest:S,endsWith:Ve,toArray:$e,forEachEntry:Ke,matchAll:Xe,isHTMLForm:Qe,hasOwnProperty:G,hasOwnProp:G,reduceDescriptors:pe,freezeMethods:Ze,toObjectSet:ve,toCamelCase:Ye,noop:et,toFiniteNumber:tt};function p(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}a.inherits(p,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const me=p.prototype,Ee={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ee[e]={value:e}});Object.defineProperties(p,Ee);Object.defineProperty(me,"isAxiosError",{value:!0});p.from=(e,t,n,r,s,i)=>{const o=Object.create(me);return a.toFlatObject(e,o,function(f){return f!==Error.prototype},u=>u!=="isAxiosError"),p.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};var nt=typeof self=="object"?self.FormData:window.FormData;function V(e){return a.isPlainObject(e)||a.isArray(e)}function ye(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map(function(s,i){return s=ye(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function rt(e){return a.isArray(e)&&!e.some(V)}const st=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function ot(e){return e&&a.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function I(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new(nt||FormData),n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,T){return!a.isUndefined(T[m])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,o=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&ot(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function c(l){if(l===null)return"";if(a.isDate(l))return l.toISOString();if(!f&&a.isBlob(l))throw new p("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(l)||a.isTypedArray(l)?f&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function d(l,m,T){let R=l;if(l&&!T&&typeof l=="object"){if(a.endsWith(m,"{}"))m=r?m:m.slice(0,-2),l=JSON.stringify(l);else if(a.isArray(l)&&rt(l)||a.isFileList(l)||a.endsWith(m,"[]")&&(R=a.toArray(l)))return m=ye(m),R.forEach(function(B,Pe){!(a.isUndefined(B)||B===null)&&t.append(o===!0?Z([m],Pe,i):o===null?m:m+"[]",c(B))}),!1}return V(l)?!0:(t.append(Z(T,m,i),c(l)),!1)}const E=[],y=Object.assign(st,{defaultVisitor:d,convertValue:c,isVisitable:V});function h(l,m){if(!a.isUndefined(l)){if(E.indexOf(l)!==-1)throw Error("Circular reference detected in "+m.join("."));E.push(l),a.forEach(l,function(R,N){(!(a.isUndefined(R)||R===null)&&s.call(t,R,a.isString(N)?N.trim():N,m,y))===!0&&h(R,m?m.concat(N):[N])}),E.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return h(e),t}function v(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function X(e,t){this._pairs=[],e&&I(e,this,t)}const we=X.prototype;we.append=function(t,n){this._pairs.push([t,n])};we.toString=function(t){const n=t?function(r){return t.call(this,r,v)}:v;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function it(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function be(e,t,n){if(!t)return e;const r=n&&n.encode||it,s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new X(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class ee{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Re={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},at=typeof URLSearchParams<"u"?URLSearchParams:X,ct=FormData,ut=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),O={isBrowser:!0,classes:{URLSearchParams:at,FormData:ct,Blob},isStandardBrowserEnv:ut,protocols:["http","https","file","blob","url","data"]};function lt(e,t){return I(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return O.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function ft(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function dt(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r=n.length;return o=!o&&a.isArray(s)?s.length:o,f?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!u):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=dt(s[o])),!u)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(ft(r),s,n,0)}),n}return null}function ht(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new p("Request failed with status code "+n.status,[p.ERR_BAD_REQUEST,p.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const pt=O.isStandardBrowserEnv?function(){return{write:function(n,r,s,i,o,u){const f=[];f.push(n+"="+encodeURIComponent(r)),a.isNumber(s)&&f.push("expires="+new Date(s).toGMTString()),a.isString(i)&&f.push("path="+i),a.isString(o)&&f.push("domain="+o),u===!0&&f.push("secure"),document.cookie=f.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function mt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Et(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function Se(e,t){return e&&!mt(t)?Et(e,t):t}const yt=O.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(o){const u=a.isString(o)?s(o):o;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}();function L(e,t,n){p.call(this,e==null?"canceled":e,p.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(L,p,{__CANCEL__:!0});function wt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}const bt=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Rt=e=>{const t={};let n,r,s;return e&&e.split(` +`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&bt[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},te=Symbol("internals"),Ae=Symbol("defaults");function F(e){return e&&String(e).trim().toLowerCase()}function j(e){return e===!1||e==null?e:a.isArray(e)?e.map(j):String(e)}function Ot(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function ne(e,t,n,r){if(a.isFunction(r))return r.call(this,t,n);if(!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function St(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function At(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}function C(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}function b(e,t){e&&this.set(e),this[Ae]=t||null}Object.assign(b.prototype,{set:function(e,t,n){const r=this;function s(i,o,u){const f=F(o);if(!f)throw new Error("header name must be a non-empty string");const c=C(r,f);c&&u!==!0&&(r[c]===!1||u===!1)||(r[c||o]=j(i))}return a.isPlainObject(e)?a.forEach(e,(i,o)=>{s(i,o,t)}):s(t,e,n),this},get:function(e,t){if(e=F(e),!e)return;const n=C(this,e);if(n){const r=this[n];if(!t)return r;if(t===!0)return Ot(r);if(a.isFunction(t))return t.call(this,r,n);if(a.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}},has:function(e,t){if(e=F(e),e){const n=C(this,e);return!!(n&&(!t||ne(this,this[n],n,t)))}return!1},delete:function(e,t){const n=this;let r=!1;function s(i){if(i=F(i),i){const o=C(n,i);o&&(!t||ne(n,n[o],o,t))&&(delete n[o],r=!0)}}return a.isArray(e)?e.forEach(s):s(e),r},clear:function(){return Object.keys(this).forEach(this.delete.bind(this))},normalize:function(e){const t=this,n={};return a.forEach(this,(r,s)=>{const i=C(n,s);if(i){t[i]=j(r),delete t[s];return}const o=e?St(s):String(s).trim();o!==s&&delete t[s],t[o]=j(r),n[o]=!0}),this},toJSON:function(e){const t=Object.create(null);return a.forEach(Object.assign({},this[Ae]||null,this),(n,r)=>{n==null||n===!1||(t[r]=e&&a.isArray(n)?n.join(", "):n)}),t}});Object.assign(b,{from:function(e){return a.isString(e)?new this(Rt(e)):e instanceof this?e:new this(e)},accessor:function(e){const n=(this[te]=this[te]={accessors:{}}).accessors,r=this.prototype;function s(i){const o=F(i);n[o]||(At(r,i),n[o]=!0)}return a.isArray(e)?e.forEach(s):s(e),this}});b.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]);a.freezeMethods(b.prototype);a.freezeMethods(b);function Tt(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(f){const c=Date.now(),d=r[i];o||(o=c),n[s]=f,r[s]=c;let E=i,y=0;for(;E!==s;)y+=n[E++],E=E%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o{const i=s.loaded,o=s.lengthComputable?s.total:void 0,u=i-n,f=r(u),c=i<=o;n=i;const d={loaded:i,total:o,progress:o?i/o:void 0,bytes:u,rate:f||void 0,estimated:f&&o&&c?(o-i)/f:void 0};d[t?"download":"upload"]=!0,e(d)}}function se(e){return new Promise(function(n,r){let s=e.data;const i=b.from(e.headers).normalize(),o=e.responseType;let u;function f(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}a.isFormData(s)&&O.isStandardBrowserEnv&&i.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",l=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(h+":"+l))}const d=Se(e.baseURL,e.url);c.open(e.method.toUpperCase(),be(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function E(){if(!c)return;const h=b.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:h,config:e,request:c};ht(function(R){n(R),f()},function(R){r(R),f()},m),c=null}if("onloadend"in c?c.onloadend=E:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(E)},c.onabort=function(){!c||(r(new p("Request aborted",p.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new p("Network Error",p.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let l=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||Re;e.timeoutErrorMessage&&(l=e.timeoutErrorMessage),r(new p(l,m.clarifyTimeoutError?p.ETIMEDOUT:p.ECONNABORTED,e,c)),c=null},O.isStandardBrowserEnv){const h=(e.withCredentials||yt(d))&&e.xsrfCookieName&&pt.read(e.xsrfCookieName);h&&i.set(e.xsrfHeaderName,h)}s===void 0&&i.setContentType(null),"setRequestHeader"in c&&a.forEach(i.toJSON(),function(l,m){c.setRequestHeader(m,l)}),a.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",re(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",re(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=h=>{!c||(r(!h||h.type?new L(null,e,c):h),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));const y=wt(d);if(y&&O.protocols.indexOf(y)===-1){r(new p("Unsupported protocol "+y+":",p.ERR_BAD_REQUEST,e));return}c.send(s||null)})}const oe={http:se,xhr:se},ie={getAdapter:e=>{if(a.isString(e)){const t=oe[e];if(!e)throw Error(a.hasOwnProp(e)?`Adapter '${e}' is not available in the build`:`Can not resolve adapter '${e}'`);return t}if(!a.isFunction(e))throw new TypeError("adapter is not a function");return e},adapters:oe},xt={"Content-Type":"application/x-www-form-urlencoded"};function Nt(){let e;return typeof XMLHttpRequest<"u"?e=ie.getAdapter("xhr"):typeof process<"u"&&a.kindOf(process)==="process"&&(e=ie.getAdapter("http")),e}function Pt(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const g={transitional:Re,adapter:Nt(),transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s&&s?JSON.stringify(Oe(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return lt(t,this.formSerializer).toString();if((u=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return I(u?{"files[]":t}:t,f&&new f,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Pt(t)):t}],transformResponse:[function(t){const n=this.transitional||g.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(u){if(o)throw u.name==="SyntaxError"?p.from(u,p.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],function(t){g.headers[t]={}});a.forEach(["post","put","patch"],function(t){g.headers[t]=a.merge(xt)});function H(e,t){const n=this||g,r=t||n,s=b.from(r.headers);let i=r.data;return a.forEach(e,function(u){i=u.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Te(e){return!!(e&&e.__CANCEL__)}function q(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new L}function ae(e){return q(e),e.headers=b.from(e.headers),e.data=H.call(e,e.transformRequest),(e.adapter||g.adapter)(e).then(function(r){return q(e),r.data=H.call(e,e.transformResponse,r),r.headers=b.from(r.headers),r},function(r){return Te(r)||(q(e),r&&r.response&&(r.response.data=H.call(e,e.transformResponse,r.response),r.response.headers=b.from(r.response.headers))),Promise.reject(r)})}function D(e,t){t=t||{};const n={};function r(c,d){return a.isPlainObject(c)&&a.isPlainObject(d)?a.merge(c,d):a.isPlainObject(d)?a.merge({},d):a.isArray(d)?d.slice():d}function s(c){if(a.isUndefined(t[c])){if(!a.isUndefined(e[c]))return r(void 0,e[c])}else return r(e[c],t[c])}function i(c){if(!a.isUndefined(t[c]))return r(void 0,t[c])}function o(c){if(a.isUndefined(t[c])){if(!a.isUndefined(e[c]))return r(void 0,e[c])}else return r(void 0,t[c])}function u(c){if(c in t)return r(e[c],t[c]);if(c in e)return r(void 0,e[c])}const f={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return a.forEach(Object.keys(e).concat(Object.keys(t)),function(d){const E=f[d]||s,y=E(d);a.isUndefined(y)&&E!==u||(n[d]=y)}),n}const xe="1.1.3",Q={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Q[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ce={};Q.transitional=function(t,n,r){function s(i,o){return"[Axios v"+xe+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,u)=>{if(t===!1)throw new p(s(o," has been removed"+(n?" in "+n:"")),p.ERR_DEPRECATED);return n&&!ce[o]&&(ce[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,u):!0}};function gt(e,t,n){if(typeof e!="object")throw new p("options must be an object",p.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const u=e[i],f=u===void 0||o(u,i,e);if(f!==!0)throw new p("option "+i+" must be "+f,p.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new p("Unknown option "+i,p.ERR_BAD_OPTION)}}const $={assertOptions:gt,validators:Q},A=$.validators;class x{constructor(t){this.defaults=t,this.interceptors={request:new ee,response:new ee}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=D(this.defaults,n);const{transitional:r,paramsSerializer:s}=n;r!==void 0&&$.assertOptions(r,{silentJSONParsing:A.transitional(A.boolean),forcedJSONParsing:A.transitional(A.boolean),clarifyTimeoutError:A.transitional(A.boolean)},!1),s!==void 0&&$.assertOptions(s,{encode:A.function,serialize:A.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();const i=n.headers&&a.merge(n.headers.common,n.headers[n.method]);i&&a.forEach(["delete","get","head","post","put","patch","common"],function(l){delete n.headers[l]}),n.headers=new b(n.headers,i);const o=[];let u=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(n)===!1||(u=u&&l.synchronous,o.unshift(l.fulfilled,l.rejected))});const f=[];this.interceptors.response.forEach(function(l){f.push(l.fulfilled,l.rejected)});let c,d=0,E;if(!u){const h=[ae.bind(this),void 0];for(h.unshift.apply(h,o),h.push.apply(h,f),E=h.length,c=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(u=>{r.subscribe(u),i=u}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,u){r.reason||(r.reason=new L(i,o,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Y(function(s){t=s}),cancel:t}}}function Ct(e){return function(n){return e.apply(null,n)}}function Ft(e){return a.isObject(e)&&e.isAxiosError===!0}function Ne(e){const t=new x(e),n=ue(x.prototype.request,t);return a.extend(n,x.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Ne(D(e,s))},n}const w=Ne(g);w.Axios=x;w.CanceledError=L;w.CancelToken=Y;w.isCancel=Te;w.VERSION=xe;w.toFormData=I;w.AxiosError=p;w.Cancel=w.CanceledError;w.all=function(t){return Promise.all(t)};w.spread=Ct;w.isAxiosError=Ft;w.formToJSON=e=>Oe(a.isHTMLForm(e)?new FormData(e):e);async function Dt(){return await w.get("/api/temp.php")}async function _t(e){const t=[7,0,2,3,12,13,14,6];return await w.post("/api/set_light.php",{light:t[e]})}window.setLightState=_t;Dt().then(e=>{document.getElementById("temp").innerHTML=e.data}); diff --git a/assets/index.8b2241a3.css b/assets/index.8b2241a3.css new file mode 100644 index 0000000..817b944 --- /dev/null +++ b/assets/index.8b2241a3.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.mx-20{margin-left:5rem;margin-right:5rem}.flex{display:flex}.justify-between{justify-content:space-between}.bg-green-800{--tw-bg-opacity: 1;background-color:rgb(22 101 52 / var(--tw-bg-opacity))}.bg-purple-300{--tw-bg-opacity: 1;background-color:rgb(216 180 254 / var(--tw-bg-opacity))}.text-center{text-align:center}.text-8xl{font-size:6rem;line-height:1}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}button{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}h1{--tw-bg-opacity: 1;background-color:rgb(253 224 71 / var(--tw-bg-opacity));font-size:1.875rem;line-height:2.25rem;font-weight:700;--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity))} diff --git a/index.html b/index.html new file mode 100644 index 0000000..bab9da2 --- /dev/null +++ b/index.html @@ -0,0 +1,40 @@ + + + + + + + Domotique + + + + +
+ DOMOTIQUE +
+
+
+

Temperature

+

°C

+
+
+

Radiateur

+ + +
+ +
+

Volets roulants

+ + +
+ +
+

Eclairage

+ + +
+
+ + + diff --git a/index.php b/index.php deleted file mode 100755 index 58fd55b..0000000 --- a/index.php +++ /dev/null @@ -1,4 +0,0 @@ -$output"; -?> diff --git a/scripts/led.sh b/scripts/led.sh index 99ecfdf..907b3ef 100644 --- a/scripts/led.sh +++ b/scripts/led.sh @@ -5,6 +5,8 @@ gpio mode $1 out if [ gpio read $1 = 1 ] then gpio write $1 0 + echo 0 else gpio write $1 1 + echo 1 fi \ No newline at end of file