[{"data":1,"prerenderedAt":516},["ShallowReactive",2],{"i-simple-icons:github":3,"i-simple-icons:x":8,"i-brand:linkedin":10,"i-simple-icons:medium":14,"i-lucide:mail":16,"i-lucide:sun":18,"pattern:\u002Flearn\u002Fdesign-patterns\u002Fsingleton":20,"pattern-group:\u002Flearn\u002Fdesign-patterns\u002Fsingleton":487,"i-lucide:lightbulb":504,"i-lucide:wand-sparkles":506,"i-lucide:circle-dot":508,"i-lucide:factory":510,"i-lucide:hammer":512,"i-lucide:copy":514},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"currentColor\" d=\"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"currentColor\" d=\"M14.234 10.162L22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299l-.929-1.329L3.076 1.56h3.182l5.965 8.532l.929 1.329l7.754 11.09h-3.182z\"\u002F>",{"left":4,"top":11,"width":12,"height":12,"rotate":4,"vFlip":6,"hFlip":6,"body":13},32,448,"\u003Cpath fill=\"currentColor\" d=\"M416 32L31.9 32C14.3 32 0 46.5 0 64.3L0 447.7C0 465.5 14.3 480 31.9 480L416 480c17.6 0 32-14.5 32-32.3l0-383.4C448 46.5 433.6 32 416 32zM135.4 416l-66.4 0 0-213.8 66.5 0 0 213.8-.1 0zM102.2 96a38.5 38.5 0 1 1 0 77 38.5 38.5 0 1 1 0-77zM384.3 416l-66.4 0 0-104c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9l0 105.8-66.4 0 0-213.8 63.7 0 0 29.2 .9 0c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9l0 117.2z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":15},"\u003Cpath fill=\"currentColor\" d=\"M4.21 0A4.2 4.2 0 0 0 0 4.21v15.58A4.2 4.2 0 0 0 4.21 24h15.58A4.2 4.2 0 0 0 24 19.79v-1.093a5 5 0 0 1-.422.02c-2.577 0-4.027-2.146-4.09-4.832a8 8 0 0 1 .022-.708c.093-1.186.475-2.241 1.105-3.022a3.9 3.9 0 0 1 1.395-1.1c.468-.237 1.127-.367 1.664-.367h.023q.151 0 .303.01V4.211A4.2 4.2 0 0 0 19.79 0Zm.198 5.583h4.165l3.588 8.435l3.59-8.435h3.864v.146l-.019.004c-.705.16-1.063.397-1.063 1.254h-.003l.003 10.274c.06.676.424.885 1.063 1.03l.02.004v.145h-4.923v-.145l.019-.005c.639-.144.994-.353 1.054-1.03V7.267l-4.745 11.15h-.261L6.15 7.569v9.445c0 .857.358 1.094 1.063 1.253l.02.004v.147H4.405v-.147l.019-.004c.705-.16 1.065-.397 1.065-1.253V6.987c0-.857-.358-1.094-1.064-1.254l-.018-.004zm19.25 3.668c-1.086.023-1.733 1.323-1.813 3.124H24V9.298a1.4 1.4 0 0 0-.342-.047m-1.862 3.632c-.1 1.756.86 3.239 2.204 3.634v-3.634z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":17},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"m22 7l-8.991 5.727a2 2 0 0 1-2.009 0L2 7\"\u002F>\u003Crect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":19},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Ccircle cx=\"12\" cy=\"12\" r=\"4\"\u002F>\u003Cpath d=\"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41\"\u002F>\u003C\u002Fg>",{"id":21,"title":22,"body":23,"description":473,"example":474,"extension":475,"group":476,"icon":477,"meta":478,"navigation":231,"order":189,"path":479,"rawbody":480,"seo":481,"sitemap":482,"source":483,"stem":484,"summary":485,"__hash__":486},"patterns\u002Flearn\u002Fdesign-patterns\u002Fsingleton.md","Singleton",{"type":24,"value":25,"toc":463},"minimark",[26,31,35,43,46,50,66,70,75,86,90,120,124,127,165,171,175,374,445,451,459],[27,28,30],"h2",{"id":29},"the-idea","The idea",[32,33,34],"p",{},"Some things should exist only once in a program. A database connection, a configuration object or a log file is often like that. If every part of the code creates its own, you waste resources and the copies can drift apart.",[32,36,37,38,42],{},"The Singleton pattern makes the class itself responsible for this. Its constructor is private, so no other code can call ",[39,40,41],"code",{},"new",". Instead, the class offers a static method that returns the one instance. The first call creates it, and every later call returns the same object.",[32,44,45],{},"You get two things from this: a guarantee that there is only one instance, and one well-known place to get it from.",[27,47,49],{"id":48},"when-to-use-it","When to use it",[51,52,53,57,60,63],"ul",{},[54,55,56],"li",{},"Exactly one object must coordinate something, such as a connection pool or a print queue.",[54,58,59],{},"The object is expensive to create, and you want to create it only when it is first needed.",[54,61,62],{},"Many unrelated parts of the program need the same shared object, and passing it through every constructor would be awkward.",[54,64,65],{},"You want access to a shared resource to go through one place.",[27,67,69],{"id":68},"pros-and-cons","Pros and cons",[71,72,74],"h3",{"id":73},"pros","Pros",[51,76,77,80,83],{},[54,78,79],{},"The class guarantees that it has only one instance.",[54,81,82],{},"There is a single point of control: every caller goes through the same method.",[54,84,85],{},"The instance is created only when it is first asked for.",[71,87,89],{"id":88},"cons","Cons",[51,91,92,99,102,105],{},[54,93,94,95,98],{},"It makes code harder to test. A class that calls ",[39,96,97],{},"Database.getDatabase()"," cannot easily be given a fake database instead.",[54,100,101],{},"It is global state. Any part of the program can reach it, which makes bugs harder to trace.",[54,103,104],{},"It hides dependencies: a class's constructor doesn't tell you that it needs the database.",[54,106,107,108,111,112,115,116,119],{},"The simple version is not thread-safe. Two threads can both see ",[39,109,110],{},"null"," and each create an instance. When threads are involved, use a ",[39,113,114],{},"synchronized"," method, a field that is set when the class loads, or an ",[39,117,118],{},"enum",".",[27,121,123],{"id":122},"the-example","The example",[32,125,126],{},"The example models a database connection. Opening a connection is slow, so the program should open one and share it.",[51,128,129,150],{},[54,130,131,137,138,141,142,145,146,149],{},[132,133,134],"strong",{},[39,135,136],{},"Database",": the singleton. It is ",[39,139,140],{},"final",", so it cannot be subclassed. Its constructor is private and prints a message when the connection is made. The static field ",[39,143,144],{},"database"," holds the single instance, and ",[39,147,148],{},"getDatabase()"," creates it on the first call and returns it on every call.",[54,151,152,157,158,160,161,164],{},[132,153,154],{},[39,155,156],{},"Demo",": the client. It asks ",[39,159,97],{}," for the instance. Writing ",[39,162,163],{},"new Database()"," here would not compile.",[32,166,167,168,170],{},"Call ",[39,169,148],{}," a second time and you get the same object back, and the message is not printed again.",[27,172,174],{"id":173},"the-code","The code",[176,177,183],"pre",{"className":178,"code":179,"filename":180,"language":181,"meta":182,"style":182},"language-java shiki shiki-themes haytham-dark haytham-light","public final class Database {\n    private static Database database;\n\n    private Database() {\n        System.out.println(\"make connection database...\");\n    }\n\n    public static Database getDatabase() {\n        if (database == null) {\n            database = new Database();\n        }\n\n        return database;\n    }\n}\n","Database.java","java","",[39,184,185,208,226,233,246,273,279,284,301,325,342,348,353,363,368],{"__ignoreMap":182},[186,187,190,194,197,200,204],"span",{"class":188,"line":189},"line",1,[186,191,193],{"class":192},"sVsk0","public",[186,195,196],{"class":192}," final",[186,198,199],{"class":192}," class",[186,201,203],{"class":202},"sNwy7"," Database",[186,205,207],{"class":206},"sVG6I"," {\n",[186,209,211,214,217,219,223],{"class":188,"line":210},2,[186,212,213],{"class":192},"    private",[186,215,216],{"class":192}," static",[186,218,203],{"class":192},[186,220,222],{"class":221},"sWFPS"," database",[186,224,225],{"class":206},";\n",[186,227,229],{"class":188,"line":228},3,[186,230,232],{"emptyLinePlaceholder":231},true,"\n",[186,234,236,238,241,244],{"class":188,"line":235},4,[186,237,213],{"class":192},[186,239,203],{"class":240},"sVz7n",[186,242,243],{"class":206},"()",[186,245,207],{"class":206},[186,247,249,252,254,258,260,263,266,270],{"class":188,"line":248},5,[186,250,251],{"class":221},"        System",[186,253,119],{"class":206},[186,255,257],{"class":256},"s4Awn","out",[186,259,119],{"class":206},[186,261,262],{"class":240},"println",[186,264,265],{"class":206},"(",[186,267,269],{"class":268},"sUOzB","\"make connection database...\"",[186,271,272],{"class":206},");\n",[186,274,276],{"class":188,"line":275},6,[186,277,278],{"class":206},"    }\n",[186,280,282],{"class":188,"line":281},7,[186,283,232],{"emptyLinePlaceholder":231},[186,285,287,290,292,294,297,299],{"class":188,"line":286},8,[186,288,289],{"class":192},"    public",[186,291,216],{"class":192},[186,293,203],{"class":192},[186,295,296],{"class":240}," getDatabase",[186,298,243],{"class":206},[186,300,207],{"class":206},[186,302,304,307,310,313,316,320,323],{"class":188,"line":303},9,[186,305,306],{"class":192},"        if",[186,308,309],{"class":206}," (",[186,311,312],{"class":221},"database ",[186,314,315],{"class":206},"==",[186,317,319],{"class":318},"sheII"," null",[186,321,322],{"class":206},")",[186,324,207],{"class":206},[186,326,328,331,334,337,339],{"class":188,"line":327},10,[186,329,330],{"class":221},"            database ",[186,332,333],{"class":206},"=",[186,335,336],{"class":192}," new",[186,338,203],{"class":240},[186,340,341],{"class":206},"();\n",[186,343,345],{"class":188,"line":344},11,[186,346,347],{"class":206},"        }\n",[186,349,351],{"class":188,"line":350},12,[186,352,232],{"emptyLinePlaceholder":231},[186,354,356,359,361],{"class":188,"line":355},13,[186,357,358],{"class":192},"        return",[186,360,222],{"class":221},[186,362,225],{"class":206},[186,364,366],{"class":188,"line":365},14,[186,367,278],{"class":206},[186,369,371],{"class":188,"line":370},15,[186,372,373],{"class":206},"}\n",[176,375,378],{"className":178,"code":376,"filename":377,"language":181,"meta":182,"style":182},"public class Demo {\n    public static void main(String[] args) {\n        Database database = Database.getDatabase();\n    }\n}\n","Demo.java",[39,379,380,391,418,437,441],{"__ignoreMap":182},[186,381,382,384,386,389],{"class":188,"line":189},[186,383,193],{"class":192},[186,385,199],{"class":192},[186,387,388],{"class":202}," Demo",[186,390,207],{"class":206},[186,392,393,395,397,400,403,405,408,411,414,416],{"class":188,"line":210},[186,394,289],{"class":192},[186,396,216],{"class":192},[186,398,399],{"class":192}," void",[186,401,402],{"class":240}," main",[186,404,265],{"class":206},[186,406,407],{"class":192},"String",[186,409,410],{"class":206},"[]",[186,412,413],{"class":221}," args",[186,415,322],{"class":206},[186,417,207],{"class":206},[186,419,420,423,426,428,430,432,435],{"class":188,"line":228},[186,421,422],{"class":192},"        Database",[186,424,425],{"class":221}," database ",[186,427,333],{"class":206},[186,429,203],{"class":221},[186,431,119],{"class":206},[186,433,434],{"class":240},"getDatabase",[186,436,341],{"class":206},[186,438,439],{"class":188,"line":235},[186,440,278],{"class":206},[186,442,443],{"class":188,"line":248},[186,444,373],{"class":206},[32,446,447,448,450],{},"Running ",[39,449,156],{}," prints:",[176,452,457],{"className":453,"code":455,"language":456,"meta":182},[454],"language-text","make connection database...\n","text",[39,458,455],{"__ignoreMap":182},[460,461,462],"style",{},"html pre.shiki code .sVsk0, html code.shiki .sVsk0{--shiki-default:#9D9FFE;--shiki-light:#6762D3}html pre.shiki code .sNwy7, html code.shiki .sNwy7{--shiki-default:#D4D7FE;--shiki-light:#3F3B87}html pre.shiki code .sVG6I, html code.shiki .sVG6I{--shiki-default:#85858F;--shiki-light:#71717A}html pre.shiki code .sWFPS, html code.shiki .sWFPS{--shiki-default:#C4C4CC;--shiki-light:#3F3F46}html pre.shiki code .sVz7n, html code.shiki .sVz7n{--shiki-default:#EDEDEF;--shiki-light:#0B0B0C}html pre.shiki code .s4Awn, html code.shiki .s4Awn{--shiki-default:#C5DDFE;--shiki-light:#534DAF}html pre.shiki code .sUOzB, html code.shiki .sUOzB{--shiki-default:#9EC7FE;--shiki-light:#2873D1}html pre.shiki code .sheII, html code.shiki .sheII{--shiki-default:#70ADFF;--shiki-light:#195CAE}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}",{"title":182,"searchDepth":210,"depth":210,"links":464},[465,466,467,471,472],{"id":29,"depth":210,"text":30},{"id":48,"depth":210,"text":49},{"id":68,"depth":210,"text":69,"children":468},[469,470],{"id":73,"depth":228,"text":74},{"id":88,"depth":228,"text":89},{"id":122,"depth":210,"text":123},{"id":173,"depth":210,"text":174},"The Singleton pattern keeps a class to a single instance and gives the whole program one way to reach it. Learn when it helps and when it hurts, with a worked Java example of a database connection.","A shared database connection","md","Creational","lucide:circle-dot",{},"\u002Flearn\u002Fdesign-patterns\u002Fsingleton","---\ntitle: Singleton\ngroup: Creational\nicon: lucide:circle-dot\nsummary: 'A class that makes sure only one instance of itself exists, and hands everyone that same instance.'\ndescription: 'The Singleton pattern keeps a class to a single instance and gives the whole program one way to reach it. Learn when it helps and when it hurts, with a worked Java example of a database connection.'\nexample: 'A shared database connection'\norder: 1\nsource: https:\u002F\u002Fgithub.com\u002FHaythamasalama\u002FdesignPattern\u002Ftree\u002Fmaster\u002Fsrc\u002FCreational\u002FSingleton\n---\n\n## The idea\n\nSome things should exist only once in a program. A database connection, a configuration object or a log file is often like that. If every part of the code creates its own, you waste resources and the copies can drift apart.\n\nThe Singleton pattern makes the class itself responsible for this. Its constructor is private, so no other code can call `new`. Instead, the class offers a static method that returns the one instance. The first call creates it, and every later call returns the same object.\n\nYou get two things from this: a guarantee that there is only one instance, and one well-known place to get it from.\n\n## When to use it\n\n- Exactly one object must coordinate something, such as a connection pool or a print queue.\n- The object is expensive to create, and you want to create it only when it is first needed.\n- Many unrelated parts of the program need the same shared object, and passing it through every constructor would be awkward.\n- You want access to a shared resource to go through one place.\n\n## Pros and cons\n\n### Pros\n\n- The class guarantees that it has only one instance.\n- There is a single point of control: every caller goes through the same method.\n- The instance is created only when it is first asked for.\n\n### Cons\n\n- It makes code harder to test. A class that calls `Database.getDatabase()` cannot easily be given a fake database instead.\n- It is global state. Any part of the program can reach it, which makes bugs harder to trace.\n- It hides dependencies: a class's constructor doesn't tell you that it needs the database.\n- The simple version is not thread-safe. Two threads can both see `null` and each create an instance. When threads are involved, use a `synchronized` method, a field that is set when the class loads, or an `enum`.\n\n## The example\n\nThe example models a database connection. Opening a connection is slow, so the program should open one and share it.\n\n- **`Database`**: the singleton. It is `final`, so it cannot be subclassed. Its constructor is private and prints a message when the connection is made. The static field `database` holds the single instance, and `getDatabase()` creates it on the first call and returns it on every call.\n- **`Demo`**: the client. It asks `Database.getDatabase()` for the instance. Writing `new Database()` here would not compile.\n\nCall `getDatabase()` a second time and you get the same object back, and the message is not printed again.\n\n## The code\n\n```java [Database.java]\npublic final class Database {\n    private static Database database;\n\n    private Database() {\n        System.out.println(\"make connection database...\");\n    }\n\n    public static Database getDatabase() {\n        if (database == null) {\n            database = new Database();\n        }\n\n        return database;\n    }\n}\n```\n\n```java [Demo.java]\npublic class Demo {\n    public static void main(String[] args) {\n        Database database = Database.getDatabase();\n    }\n}\n```\n\nRunning `Demo` prints:\n\n```text\nmake connection database...\n```\n",{"title":22,"description":473},{"loc":479},"https:\u002F\u002Fgithub.com\u002FHaythamasalama\u002FdesignPattern\u002Ftree\u002Fmaster\u002Fsrc\u002FCreational\u002FSingleton","learn\u002Fdesign-patterns\u002Fsingleton","A class that makes sure only one instance of itself exists, and hands everyone that same instance.","RRoaRdpm6nhw50B4pHPyozdPCaYCP4yWXOBPoQIH3GQ",[488,489,494,499],{"path":479,"title":22,"icon":477,"summary":485,"order":189},{"path":490,"title":491,"icon":492,"summary":493,"order":210},"\u002Flearn\u002Fdesign-patterns\u002Ffactory","Factory","lucide:factory","One place decides which concrete class to create, so the rest of the code only asks for what it needs.",{"path":495,"title":496,"icon":497,"summary":498,"order":228},"\u002Flearn\u002Fdesign-patterns\u002Fbuilder","Builder","lucide:hammer","Build a complex object step by step, setting only the parts you need, then get the finished object in one call.",{"path":500,"title":501,"icon":502,"summary":503,"order":235},"\u002Flearn\u002Fdesign-patterns\u002Fprototype","Prototype","lucide:copy","Create a new object by copying an existing one, then change only what differs.",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":505},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 14c.2-1 .7-1.7 1.5-2.5c1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5c.7.7 1.3 1.5 1.5 2.5m0 4h6m-5 4h4\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":507},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m21.64 3.64l-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72M14 7l3 3M5 6v4m14 4v4M10 2v2M7 8H3m18 8h-4M11 3H9\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":509},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Ccircle cx=\"12\" cy=\"12\" r=\"1\"\u002F>\u003Ccircle cx=\"12\" cy=\"12\" r=\"10\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":511},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M12 16h.01M16 16h.01M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2zm5-3h.01\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":513},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"m15 12l-9.373 9.373a1 1 0 0 1-3.001-3L12 9m6 6l4-4\"\u002F>\u003Cpath d=\"m21.5 11.5l-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":515},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Crect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"\u002F>\u003Cpath d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"\u002F>\u003C\u002Fg>",1793131416350]